@mureka-fe/ui 1.1.6 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui.umd.cjs CHANGED
@@ -1 +1 @@
1
- (function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.MurekaUi={},b.Vue))})(this,(function(b,e){"use strict";function I(t={}){return{type:t.type??"primary",status:t.status,appearance:t.appearance??"default",ghostTextTone:t.ghostTextTone??"secondary",size:t.size??"medium",shape:t.shape??"rectangular",disabled:t.disabled??!1,loading:t.loading??!1,iconOnly:t.iconOnly??!1,nativeType:t.nativeType??"button"}}function le(t={}){const o=I(t),n=["mu-button",`mu-button--${o.type}`,`mu-button--appearance-${o.appearance}`,`mu-button--${o.size}`];return o.type==="ghost"&&o.ghostTextTone==="primary"&&n.push(`mu-button--ghost-text-${o.ghostTextTone}`),o.shape==="pill"&&n.push("mu-button--shape-pill"),o.status&&n.push(`mu-button--status-${o.status}`),o.iconOnly&&n.push("mu-button--icon-only"),o.disabled&&n.push("is-disabled"),o.loading&&n.push("is-loading"),n}function re(t={}){const o=I(t);return!o.disabled&&!o.loading}function ie(t={}){const o=t.iconOnly??!1,n=t.hasPrefix??!1,a=t.hasSuffix??!1,i=t.loading??!1,s=t.hasAriaLabel??!1;return{showPrefixSlot:!o&&!i&&n,showSuffixSlot:!o&&a,showLoadingIndicator:i,requiresAriaLabel:o&&!s,isInvalidIconOnlyCombination:o&&(n||a)}}const ce=["type","disabled","aria-busy"],de={key:0,class:"mu-button__prefix","aria-hidden":"true"},ue={class:"mu-button__content"},me={key:1,class:"mu-button__suffix","aria-hidden":"true"},fe=e.defineComponent({__name:"Button",props:{type:{default:"primary"},status:{},appearance:{default:"default"},ghostTextTone:{default:"secondary"},size:{default:"medium"},shape:{default:"rectangular"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},iconOnly:{type:Boolean,default:!1},nativeType:{default:"button"}},emits:["click"],setup(t,{emit:o}){const n=t,a=o,i=e.useSlots(),s=e.useAttrs(),l={small:{width:"var(--mu-button-icon-size-small)",height:"var(--mu-button-icon-size-small)"},medium:{width:"var(--mu-button-icon-size-medium)",height:"var(--mu-button-icon-size-medium)"},large:{width:"var(--mu-button-icon-size-large)",height:"var(--mu-button-icon-size-large)"}},u=e.computed(()=>I(n)),d=e.computed(()=>le(u.value)),r=e.computed(()=>l[u.value.size]),c=e.computed(()=>ie({iconOnly:u.value.iconOnly,hasPrefix:!!i.prefix,hasSuffix:!!i.suffix,loading:u.value.loading,hasDefaultSlot:!!i.default,hasAriaLabel:typeof s["aria-label"]=="string"&&s["aria-label"].trim().length>0}));function _(h){if(!re(u.value)){h.preventDefault(),h.stopPropagation();return}a("click",h)}return(h,g)=>(e.openBlock(),e.createElementBlock("button",{type:u.value.nativeType,class:e.normalizeClass(["mu-button",d.value]),disabled:u.value.disabled||u.value.loading,"aria-busy":u.value.loading?"true":void 0,onClick:_},[c.value.showLoadingIndicator||c.value.showPrefixSlot?(e.openBlock(),e.createElementBlock("span",de,[c.value.showLoadingIndicator?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"mu-button__loading-icon",style:e.normalizeStyle(r.value),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[...g[0]||(g[0]=[e.createElementVNode("path",{d:"M2.00293 12C2.00293 6.47853 6.47853 2.00293 12 2.00293C12.5509 2.00293 12.9971 2.4491 12.9971 3C12.9971 3.5509 12.5509 3.99707 12 3.99707C7.58034 3.99707 3.99707 7.58034 3.99707 12C3.99707 16.4197 7.58034 20.0029 12 20.0029C16.4197 20.0029 20.0029 16.4197 20.0029 12C20.0029 11.4491 20.4491 11.0029 21 11.0029C21.5509 11.0029 21.9971 11.4491 21.9971 12C21.9971 17.5215 17.5215 21.9971 12 21.9971C6.47853 21.9971 2.00293 17.5215 2.00293 12Z",fill:"currentColor"},null,-1)])],4)):e.renderSlot(h.$slots,"prefix",{key:1},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",ue,[e.renderSlot(h.$slots,"default",{},void 0,!0)]),c.value.showSuffixSlot?(e.openBlock(),e.createElementBlock("span",me,[e.renderSlot(h.$slots,"suffix",{},void 0,!0)])):e.createCommentVNode("",!0)],10,ce))}}),M=(t,o)=>{const n=t.__vccOpts||t;for(const[a,i]of o)n[a]=i;return n},A=M(fe,[["__scopeId","data-v-26f7fcfc"]]),pe=3e3,he={close:()=>{}},N=e.reactive({items:[]});let ge=1;const x=new Map;function ke(t){return typeof t=="string"?{title:t}:{title:t.title,description:t.description,duration:t.duration,closable:t.closable,resetOnHover:t.resetOnHover,icon:t.icon}}function O(t){return t.duration>0}function Ce(t){return N.items.findIndex(o=>o.id===t)}function q(t){return N.items.find(o=>o.id===t)}function R(t){const o=x.get(t);o&&o.timer!==null&&(globalThis.clearTimeout(o.timer),o.timer=null)}function D(t){const o=Ce(t);o<0||(R(t),x.delete(t),N.items.splice(o,1))}function K(t,o){const n=x.get(t);n&&(R(t),n.remainingDuration=o,n.deadline=Date.now()+o,n.isPaused=!1,n.timer=globalThis.setTimeout(()=>{D(t)},o))}function be(t,o){return{id:ge++,type:t,title:o.title,description:o.description,duration:o.duration??pe,closable:o.closable??!1,resetOnHover:o.resetOnHover??!1,icon:o.icon}}function _e(){return typeof globalThis.window<"u"&&typeof globalThis.document<"u"}function ye(t,o){if(!_e())return he;const n=ke(o),a=be(t,n);return N.items.push(a),x.set(a.id,{timer:null,deadline:0,remainingDuration:a.duration,isPaused:!1}),O(a)&&K(a.id,a.duration),{close:()=>D(a.id)}}function E(t){return o=>ye(t,o)}const we={success:E("success"),warning:E("warning"),loading:E("loading"),error:E("error"),danger:E("danger")};function Ve(t){D(t)}function Be(t){const o=x.get(t),n=q(t);!o||!n||o.isPaused||!n.resetOnHover||!O(n)||(o.remainingDuration=Math.max(o.deadline-Date.now(),0),R(t),o.isPaused=!0)}function ve(t){const o=x.get(t),n=q(t);!o||!n||!o.isPaused||!n.resetOnHover||!O(n)||K(t,o.remainingDuration||n.duration)}const Te={class:"mu-message-list","aria-live":"polite","aria-atomic":"true"},Se=["onMouseenter","onMouseleave"],Me={class:"mu-message__icon","aria-hidden":"true"},$e={class:"mu-message__content"},xe={class:"mu-message__title"},Ne={key:0,class:"mu-message__description"},Ee=["onClick"],Le=M(e.defineComponent({__name:"MessageList",setup(t){const o=e.computed(()=>N.items),n=e.defineComponent({name:"MarkupIcon",props:{markup:{type:String,required:!0}},setup(d){return()=>e.h("span",{class:"mu-message__icon-markup",innerHTML:d.markup})}});function a(d){return typeof d!="string"}function i(d){Be(d)}function s(d){ve(d)}function l(d){if(!(d instanceof globalThis.HTMLElement))return;const r=d.getBoundingClientRect();d.style.width=`${r.width}px`,d.style.height=`${r.height}px`}const u={success:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6.5L9.5 17L4 11.5" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',warning:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 4.5L20 18.5H4L12 4.5Z" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/><path d="M12 9.5V13.5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="16.5" r="1" fill="currentColor"/></svg>',loading:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2"/><path d="M12 8V12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M12 12H15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>',error:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2"/><path d="M12 9V12.5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="15.5" r="1" fill="currentColor"/></svg>',danger:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2"/><path d="M9 9L15 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M15 9L9 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>'};return(d,r)=>(e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(e.TransitionGroup,{name:"mu-message-fade",tag:"div",class:"mu-message-list__stack",onBeforeLeave:l},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id,class:e.normalizeClass(["mu-message",[`mu-message--${c.type}`,{"mu-message--compact":!c.description}]]),role:"status",onMouseenter:_=>i(c.id),onMouseleave:_=>s(c.id)},[e.createElementVNode("span",Me,[c.icon&&a(c.icon)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.icon),{key:0})):(e.openBlock(),e.createBlock(e.unref(n),{key:1,markup:typeof c.icon=="string"?c.icon:u[c.type]},null,8,["markup"]))]),e.createElementVNode("div",$e,[e.createElementVNode("div",xe,e.toDisplayString(c.title),1),c.description?(e.openBlock(),e.createElementBlock("p",Ne,e.toDisplayString(c.description),1)):e.createCommentVNode("",!0)]),c.closable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"mu-message__close","aria-label":"Close message",onClick:_=>e.unref(Ve)(c.id)},[...r[0]||(r[0]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5 5L19 19M19 5L5 19",stroke:"white","stroke-width":"1.8","stroke-linecap":"round"})],-1)])],8,Ee)):e.createCommentVNode("",!0)],42,Se))),128))]),_:1})]))}}),[["__scopeId","data-v-debf98d8"]]),ze={medium:{width:"548px",minHeight:"228px"},large:{width:"800px",minHeight:"500px"}};function Z(t={}){const o=t.size??"medium",n=ze[o],a=t.variant??"form";return{visible:t.visible??!1,title:t.title??"",status:t.status??"default",variant:a,size:o,width:t.width??n.width,minHeight:n.minHeight,maskClosable:t.maskClosable??!0,escToClose:t.escToClose??!0,closable:t.closable??!0,okText:t.okText??"Confirm",cancelText:t.cancelText??"Cancel",hideCancel:t.hideCancel??a==="feedback",hideOk:t.hideOk??!1,okLoading:t.okLoading??!1}}function He(t={}){const o=Z(t),n=["mu-modal",`mu-modal--${o.size}`,`mu-modal--${o.status}`,`mu-modal--variant-${o.variant}`];return o.variant==="feedback"&&n.push("mu-modal--feedback"),n}function Pe(t={}){const o=Z(t);return o.variant==="feedback"?{type:"secondary",status:o.status==="default"?void 0:o.status}:o.status==="danger"?{type:"secondary",status:"danger"}:{type:"primary"}}const Ie={key:0,class:"mu-modal-root"},Ae={class:"mu-modal__header"},Oe=["data-status"],Re={class:"mu-modal__body"},De={key:0,class:"mu-modal__footer"},X=M(e.defineComponent({inheritAttrs:!1,__name:"Modal",props:{visible:{type:Boolean,default:!1},title:{default:""},status:{default:"default"},variant:{default:"form"},size:{default:"medium"},width:{},maskClosable:{type:Boolean,default:!0},escToClose:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},okText:{default:"Confirm"},cancelText:{default:"Cancel"},okLoading:{type:Boolean,default:!1},hideOk:{type:Boolean,default:!1},hideCancel:{type:Boolean,default:void 0}},emits:["update:visible","ok","cancel","close"],setup(t,{emit:o}){const n=t,a=o,i=e.useAttrs(),s=e.computed(()=>Z(n)),l=e.computed(()=>[He(n),i.class]),u=e.computed(()=>{const{class:m,style:y,...v}=i;return v}),d=e.computed(()=>Pe(n)),r=e.computed(()=>s.value.variant==="feedback"&&s.value.hideCancel),c=e.computed(()=>[{width:s.value.width,minHeight:s.value.minHeight},i.style]),_=`mu-modal-title-${Math.random().toString(36).slice(2,10)}`,g=typeof globalThis.document<"u"?globalThis.document:null;function V(){a("update:visible",!1)}function C(){s.value.maskClosable&&(V(),a("cancel",new globalThis.MouseEvent("click")))}function p(){V(),a("close")}function B(m){a("cancel",m),V()}function S(m){a("ok",m)}function $(m){m.key!=="Escape"||!s.value.visible||!s.value.escToClose||(V(),a("close"))}return e.onMounted(()=>{g&&g.addEventListener("keydown",$)}),e.onBeforeUnmount(()=>{g&&(g.removeEventListener("keydown",$),g.body.style.overflow="")}),e.watch(()=>s.value.visible,m=>{g&&(g.body.style.overflow=m?"hidden":"")},{immediate:!0}),(m,y)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[s.value.visible?(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("div",{class:"mu-modal__mask",onClick:C}),e.createElementVNode("div",e.mergeProps(u.value,{class:l.value,style:c.value,role:"dialog","aria-modal":"true","aria-labelledby":_}),[e.createElementVNode("header",Ae,[e.createElementVNode("div",{id:_,class:"mu-modal__title","data-status":s.value.status},[e.renderSlot(m.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(s.value.title),1)],!0)],8,Oe),s.value.closable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"mu-modal__close","aria-label":"Close dialog",onClick:p},[...y[0]||(y[0]=[e.createElementVNode("span",{class:"mu-modal__close-icon","aria-hidden":"true"},[e.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5 5L15 15",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"}),e.createElementVNode("path",{d:"M15 5L5 15",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})])],-1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Re,[e.renderSlot(m.$slots,"default",{},void 0,!0)]),m.$slots.footer||!s.value.hideOk||!s.value.hideCancel?(e.openBlock(),e.createElementBlock("footer",De,[e.renderSlot(m.$slots,"footer",{},()=>[s.value.hideCancel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(A),{key:0,type:"ghost",class:"mu-modal__cancel",onClick:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.cancelText),1)]),_:1})),s.value.hideOk?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(A),e.mergeProps({key:1},d.value,{loading:s.value.okLoading,class:["mu-modal__ok",{"mu-modal__ok--block":r.value}],onClick:S}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.okText),1)]),_:1},16,["loading","class"]))],!0)])):e.createCommentVNode("",!0)],16)])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-e94991b0"]]);function Ze(t){return t===void 0?null:typeof t=="function"?t():t}function L(t={}){return typeof globalThis.document>"u"?Promise.resolve(!1):new Promise(o=>{const n=globalThis.document.createElement("div");globalThis.document.body.appendChild(n);const a=e.ref(!0);let i=null,s=!1;const l=()=>{i&&(i.unmount(),i=null),n.parentNode&&n.parentNode.removeChild(n)},u=c=>{s||(s=!0,a.value=!1,queueMicrotask(()=>{l(),o(c)}))},{content:d,...r}=t;i=e.createApp({render(){return e.h(X,{...r,visible:a.value,"onUpdate:visible":c=>{c||u(!1)},onOk:()=>u(!0),onCancel:()=>u(!1),onClose:()=>u(!1)},{default:()=>Ze(d)})}}),i.mount(n)})}const Ge={show:L,confirm:(t={})=>L(t),success:(t={})=>L({...t,variant:"feedback",status:"success"}),danger:(t={})=>L({...t,variant:"feedback",status:"danger"})},J=Symbol("MuRadioGroup"),je=["horizontal","vertical"];function Fe(t,o){return typeof o=="string"&&t.includes(o)}function Ue(t){return Fe(je,t)}function Q(t={}){return{modelValue:t.modelValue,value:t.value??!0,defaultChecked:t.defaultChecked??!1,disabled:t.disabled??!1,name:t.name}}function W(t={}){return{modelValue:t.modelValue,defaultValue:t.defaultValue,disabled:t.disabled??!1,name:t.name,direction:Ue(t.direction)?t.direction:"horizontal"}}function qe(t={}){return t.modelValue!==void 0}function Ke(t={}){return t.modelValue!==void 0}function G(t,o){return Object.is(t,o)}function Xe(t={},o={}){const n=Q(t),a=["mu-radio"];return o.checked&&a.push("is-checked"),(o.disabled||n.disabled)&&a.push("is-disabled"),a}function Je(t={}){const o=W(t),n=["mu-radio-group",`mu-radio-group--${o.direction}`];return o.disabled&&n.push("is-disabled"),n}const Qe=["checked","disabled","name","value"],We={class:"mu-radio__label"},Ye=M(e.defineComponent({inheritAttrs:!1,__name:"Radio",props:{modelValue:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:!0},defaultChecked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:{default:void 0}},emits:["update:modelValue","change","focus","blur"],setup(t,{emit:o}){const n=t,a=o,i=e.useAttrs(),s=e.inject(J,null),l=e.computed(()=>Q(n)),u=e.computed(()=>qe(n)),d=e.ref(l.value.defaultChecked),r=e.computed(()=>s?G(s.value.value,l.value.value):u.value?G(l.value.modelValue,l.value.value):d.value),c=e.computed(()=>l.value.disabled||!!(s!=null&&s.disabled.value)),_=e.computed(()=>(s==null?void 0:s.name.value)??l.value.name),h=e.computed(()=>String(l.value.value)),g=e.computed(()=>[Xe(n,{checked:r.value,disabled:c.value}),i.class]),V=e.computed(()=>{const{class:m,style:y,...v}=i;return v}),C=e.computed(()=>i.style);function p(m,y){u.value||(d.value=!0),a("update:modelValue",m),a("change",m,y)}function B(m){if(c.value)return;const y=l.value.value,v=m.target instanceof globalThis.HTMLInputElement?m.target:null;if(s){s.select(y,m),e.nextTick(()=>{v&&(v.checked=r.value)});return}p(y,m),e.nextTick(()=>{v&&(v.checked=r.value)})}function S(m){a("focus",m)}function $(m){a("blur",m)}return(m,y)=>(e.openBlock(),e.createElementBlock("label",e.mergeProps(V.value,{class:g.value,style:C.value}),[e.createElementVNode("input",{class:"mu-radio__input",type:"radio",checked:r.value,disabled:c.value,name:_.value,value:h.value,onChange:B,onFocus:S,onBlur:$},null,40,Qe),y[0]||(y[0]=e.createElementVNode("span",{class:"mu-radio__control","aria-hidden":"true"},[e.createElementVNode("span",{class:"mu-radio__dot"})],-1)),e.createElementVNode("span",We,[e.renderSlot(m.$slots,"default",{},void 0,!0)])],16))}}),[["__scopeId","data-v-f1283749"]]),et=M(e.defineComponent({inheritAttrs:!1,__name:"RadioGroup",props:{modelValue:{type:[String,Number,Boolean],default:void 0},defaultValue:{type:[String,Number,Boolean],default:void 0},disabled:{type:Boolean,default:!1},name:{default:void 0},direction:{default:"horizontal"}},emits:["update:modelValue","change"],setup(t,{emit:o}){const n=t,a=o,i=e.useAttrs(),s=e.computed(()=>W(n)),l=e.computed(()=>Ke(n)),u=e.ref(s.value.defaultValue),d=e.computed(()=>l.value?s.value.modelValue:u.value),r=e.computed(()=>s.value.disabled),c=e.computed(()=>s.value.name),_=e.computed(()=>[Je(n),i.class]),h=e.computed(()=>{const{class:C,style:p,...B}=i;return B}),g=e.computed(()=>i.style);function V(C,p){s.value.disabled||G(d.value,C)||(l.value||(u.value=C),a("update:modelValue",C),a("change",C,p))}return e.provide(J,{value:d,disabled:r,name:c,select:V}),(C,p)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(h.value,{role:"radiogroup",class:_.value,style:g.value}),[e.renderSlot(C.$slots,"default",{},void 0,!0)],16))}}),[["__scopeId","data-v-3879fec4"]]),tt=["circle","round","line"],ot=["small","medium"];function Y(t,o){return typeof o=="string"&&t.includes(o)}function nt(t){return Y(tt,t)}function at(t){return Y(ot,t)}function j(t={}){return{modelValue:t.modelValue,defaultChecked:t.defaultChecked??!1,disabled:t.disabled??!1,loading:t.loading??!1,type:nt(t.type)?t.type:"circle",size:at(t.size)?t.size:"medium",checkedValue:t.checkedValue??!0,uncheckedValue:t.uncheckedValue??!1,checkedColor:t.checkedColor,uncheckedColor:t.uncheckedColor,beforeChange:t.beforeChange,checkedText:t.checkedText,uncheckedText:t.uncheckedText}}function st(t={}){return t.modelValue!==void 0}function ee(t,o){return Object.is(t,o.checkedValue)}function lt(t,o){return ee(t,o)?o.uncheckedValue:o.checkedValue}function rt(t){return t.type!=="line"&&t.size!=="small"}function it(t={},o={}){const n=j(t),a=["mu-switch",`mu-switch--${n.type}`,`mu-switch--${n.size}`];return o.checked&&a.push("is-checked"),n.disabled&&a.push("is-disabled"),(n.loading||o.loading)&&a.push("is-loading"),a}const ct=["aria-checked","disabled"],dt={class:"mu-switch__thumb","aria-hidden":"true"},ut={key:0,class:"mu-switch__loading-icon",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mt={key:0,class:"mu-switch__label"},ft=M(e.defineComponent({inheritAttrs:!1,__name:"Switch",props:{modelValue:{type:[String,Number,Boolean],default:void 0},defaultChecked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{default:"circle"},size:{default:"medium"},checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},checkedColor:{},uncheckedColor:{},beforeChange:{},checkedText:{},uncheckedText:{}},emits:["update:modelValue","change","focus","blur"],setup(t,{emit:o}){const n=t,a=o,i=e.useAttrs(),s=e.useSlots(),l=e.ref(!1),u=j(n),d=e.ref(u.defaultChecked?u.checkedValue:u.uncheckedValue),r=e.computed(()=>j(n)),c=e.computed(()=>st(n)),_=e.computed(()=>c.value?r.value.modelValue:d.value),h=e.computed(()=>ee(_.value,r.value)),g=e.computed(()=>r.value.loading||l.value),V=e.computed(()=>rt(r.value)),C=e.computed(()=>V.value?h.value?!!(s.checked||r.value.checkedText):!!(s.unchecked||r.value.uncheckedText):!1),p=e.computed(()=>[it(n,{checked:h.value,loading:l.value}),{"has-label":C.value},i.class]),B=e.computed(()=>{const{class:f,style:w,type:k,...T}=i;return T}),S=e.computed(()=>{const f={};return r.value.checkedColor&&(f["--mu-switch-current-checked-bg"]=r.value.checkedColor,f["--mu-switch-current-checked-border"]=r.value.checkedColor,f["--mu-switch-current-checked-thumb"]=r.value.checkedColor,f["--mu-switch-current-checked-glow"]=`0 0 12px ${r.value.checkedColor}`),r.value.uncheckedColor&&(f["--mu-switch-current-unchecked-bg"]=r.value.uncheckedColor),[f,i.style]});function $(){}function m(f){const w=r.value.beforeChange;if(!w)return!0;try{const k=w(f);return k instanceof Promise?(l.value=!0,k.then(T=>T!==!1).catch(()=>!1)):k!==!1}catch{return!1}}function y(f,w){c.value||(d.value=f),a("update:modelValue",f),a("change",f,w)}function v(f){if(r.value.disabled||g.value)return;const w=lt(_.value,r.value),k=m(w);if(k instanceof Promise){k.then(T=>{T&&y(w,f)}).finally(()=>{l.value=!1});return}k&&y(w,f)}function H(f){a("focus",f)}function F(f){a("blur",f)}return(f,w)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps(B.value,{type:"button",role:"switch",class:p.value,style:S.value,"aria-checked":h.value?"true":"false",disabled:r.value.disabled||g.value,onClick:v,onFocus:H,onBlur:F}),[w[1]||(w[1]=e.createElementVNode("span",{class:"mu-switch__line-track","aria-hidden":"true"},null,-1)),e.createElementVNode("span",dt,[g.value?(e.openBlock(),e.createElementBlock("svg",ut,[...w[0]||(w[0]=[e.createElementVNode("path",{d:"M8 1.5C8.41421 1.5 8.75 1.83579 8.75 2.25C8.75 2.66421 8.41421 3 8 3C5.23858 3 3 5.23858 3 8C3 10.7614 5.23858 13 8 13C10.7614 13 13 10.7614 13 8C13 7.58579 13.3358 7.25 13.75 7.25C14.1642 7.25 14.5 7.58579 14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5Z",fill:"currentColor"},null,-1)])])):h.value?e.renderSlot(f.$slots,"checked-icon",{key:1},void 0,!0):e.renderSlot(f.$slots,"unchecked-icon",{key:2},void 0,!0)]),C.value?(e.openBlock(),e.createElementBlock("span",mt,[h.value?e.renderSlot(f.$slots,"checked",{key:0},()=>[e.createTextVNode(e.toDisplayString(r.value.checkedText),1)],!0):e.renderSlot(f.$slots,"unchecked",{key:1},()=>[e.createTextVNode(e.toDisplayString(r.value.uncheckedText),1)],!0)])):e.createCommentVNode("",!0)],16,ct))}}),[["__scopeId","data-v-8cfb8f2a"]]),te=Symbol("MuTabs"),pt=["line","segment"],ht=["small","medium","large"],gt=["white","ghost"],kt=["content","equal"];function P(t,o){return typeof o=="string"&&t.includes(o)}function Ct(t){return P(pt,t)}function bt(t){return P(ht,t)}function _t(t){return P(gt,t)}function yt(t){return P(kt,t)}function oe(t={}){const o=t,n=Ct(o.variant)?o.variant:"line";return{modelValue:t.modelValue,defaultValue:t.defaultValue,variant:n,appearance:n==="segment"&&_t(o.appearance)?o.appearance:n==="segment"?"white":void 0,size:bt(o.size)?o.size:"medium",layout:yt(o.layout)?o.layout:"content",disabled:t.disabled??!1}}function wt(t){return{value:t.value,disabled:t.disabled??!1}}function Vt(t={}){return t.modelValue!==void 0}function ne(t,o){return Object.is(t,o)}function Bt(t={}){const o=oe(t),n=["mu-tabs",`mu-tabs--variant-${o.variant}`,`mu-tabs--size-${o.size}`,`mu-tabs--layout-${o.layout}`];return o.variant==="segment"&&n.push(`mu-tabs--appearance-${o.appearance}`),o.disabled&&n.push("is-disabled"),n}function vt(t,o={}){const n=["mu-tab"];return o.active&&n.push("is-active"),(o.disabled||t.disabled)&&n.push("is-disabled"),n}const Tt=["aria-selected","disabled"],St={key:0,class:"mu-tab__prefix","aria-hidden":"true"},Mt={class:"mu-tab__content"},$t={key:1,class:"mu-tab__suffix","aria-hidden":"true"},xt=M(e.defineComponent({inheritAttrs:!1,__name:"Tab",props:{value:{},disabled:{type:Boolean}},emits:["click"],setup(t,{emit:o}){const n=t,a=o,i=e.useAttrs(),s=e.useSlots(),l=e.inject(te,null),u=e.ref(null),d=e.computed(()=>wt(n)),r=e.computed(()=>l?ne(l.value.value,d.value.value):!1),c=e.computed(()=>d.value.disabled||!!(l!=null&&l.disabled.value)),_=e.computed(()=>[vt(n,{active:r.value,disabled:c.value}),i.class]),h=e.computed(()=>{const{class:p,style:B,...S}=i;return S}),g=e.computed(()=>i.style);function V(){!l||!u.value||l.registerItem(d.value.value,u.value)}function C(p){if(c.value){p.preventDefault(),p.stopPropagation();return}l&&l.select(d.value.value,p),a("click",p)}return e.onMounted(()=>{V()}),e.onBeforeUnmount(()=>{l==null||l.unregisterItem(d.value.value)}),e.watch(()=>d.value.value,(p,B)=>{!l||!u.value||(l.unregisterItem(B),l.registerItem(p,u.value))}),(p,B)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps({ref_key:"buttonRef",ref:u},h.value,{type:"button",role:"tab",class:_.value,style:g.value,"aria-selected":r.value?"true":"false",disabled:c.value,onClick:C}),[e.unref(s).prefix?(e.openBlock(),e.createElementBlock("span",St,[e.renderSlot(p.$slots,"prefix",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",Mt,[e.renderSlot(p.$slots,"default",{},void 0,!0)]),e.unref(s).suffix?(e.openBlock(),e.createElementBlock("span",$t,[e.renderSlot(p.$slots,"suffix",{},void 0,!0)])):e.createCommentVNode("",!0)],16,Tt))}}),[["__scopeId","data-v-97f04990"]]),Nt=M(e.defineComponent({inheritAttrs:!1,__name:"Tabs",props:{modelValue:{},defaultValue:{},size:{},layout:{},disabled:{type:Boolean},variant:{},appearance:{}},emits:["update:modelValue","change"],setup(t,{emit:o}){const n=t,a=o,i=e.useAttrs(),s=e.ref(null),l=e.computed(()=>oe(n)),u=e.computed(()=>Vt(n)),d=e.ref(l.value.defaultValue),r=e.computed(()=>u.value?l.value.modelValue:d.value),c=e.computed(()=>l.value.variant),_=e.computed(()=>l.value.appearance),h=e.computed(()=>l.value.size),g=e.computed(()=>l.value.layout),V=e.computed(()=>l.value.disabled),C=e.ref(!1),p=e.ref(0),B=new Map,S=e.ref({transform:"translateX(0px)",width:"0px"}),$=e.computed(()=>[Bt(n),i.class]),m=e.computed(()=>{const{class:k,style:T,...U}=i;return U}),y=e.computed(()=>i.style);function v(){const k=s.value,T=r.value!==void 0?B.get(r.value):void 0;if(!k||!T){S.value={transform:"translateX(0px)",width:"0px"};return}const U=k.getBoundingClientRect(),se=T.getBoundingClientRect();S.value={transform:`translateX(${se.left-U.left}px)`,width:`${se.width}px`}}function H(){e.nextTick(()=>{v()})}function F(k,T){V.value||ne(r.value,k)||(u.value||(d.value=k),a("update:modelValue",k),a("change",k,T))}function f(k,T){B.set(k,T),p.value+=1,H()}function w(k){B.delete(k),p.value+=1,H()}return e.provide(te,{value:r,variant:c,appearance:_,size:h,layout:g,disabled:V,select:F,registerItem:f,unregisterItem:w}),e.watch([r,c,h,g,p],()=>{H()},{flush:"post"}),e.onMounted(()=>{globalThis.window.addEventListener("resize",v),e.nextTick(()=>{v(),C.value=!0})}),e.onBeforeUnmount(()=>{globalThis.window.removeEventListener("resize",v)}),(k,T)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({ref_key:"rootRef",ref:s},m.value,{role:"tablist",class:[$.value,{"is-ready":C.value}],style:y.value}),[e.renderSlot(k.$slots,"default",{},void 0,!0),e.createElementVNode("span",{class:"mu-tabs__indicator",style:e.normalizeStyle(S.value),"aria-hidden":"true"},null,4)],16))}}),[["__scopeId","data-v-28e8c4f7"]]),Et=["new","new-mini","soon","beta","free","details"],Lt=["neutral","cyan","yellow"],zt=["soft","outline","tonal","solid"],Ht=["mini","small","medium","large"],Pt=["rounded","pill"],It={neutral:"soft",cyan:"tonal",yellow:"outline"},At={neutral:["soft","outline","tonal"],cyan:["solid","outline","tonal"],yellow:["outline"]},Ot={new:{tone:"cyan",variant:"soft",size:"small",shape:"rounded"},"new-mini":{tone:"cyan",variant:"soft",size:"mini",shape:"rounded"},soon:{tone:"pink",variant:"soft",size:"small",shape:"rounded"},beta:{tone:"pink",variant:"solid",size:"small",shape:"rounded"},free:{tone:"blue",variant:"solid",size:"small",shape:"rounded"},details:{tone:"neutral",variant:"tonal",size:"small",shape:"rounded"}};function z(t,o){return typeof o=="string"&&t.includes(o)}function Rt(t){return z(Et,t)}function Dt(t){return z(Lt,t)}function Zt(t){return z(zt,t)}function Gt(t){return z(Ht,t)}function jt(t){return z(Pt,t)}function ae(t={}){const o=t;if(Rt(o.preset))return{mode:"preset",preset:o.preset,...Ot[o.preset]};const n=Dt(o.tone)?o.tone:"neutral",a=It[n],i=Zt(o.variant)?o.variant:void 0,s=i&&At[n].includes(i)?i:a;return{mode:"base",preset:void 0,tone:n,variant:s,size:Gt(o.size)?o.size:"small",shape:jt(o.shape)?o.shape:"rounded"}}function Ft(t={}){const o=ae(t),n=["mu-tag",`mu-tag--${o.mode}`,`mu-tag--tone-${o.tone}`,`mu-tag--variant-${o.variant}`,`mu-tag--${o.size}`,`mu-tag--shape-${o.shape}`];return o.preset&&n.push(`mu-tag--preset-${o.preset}`),o.mode==="base"&&o.tone==="yellow"&&o.variant==="outline"&&n.push("mu-tag--uppercase"),n}const Ut=["viewBox"],qt={key:0,d:"M0 6V0H1.12259L2.88078 4.98904C2.86977 4.83014 2.85601 4.6411 2.8395 4.42192C2.823 4.20274 2.80924 3.97534 2.79823 3.73973C2.79273 3.50411 2.78998 3.29041 2.78998 3.09863V0H3.61542V6H2.49282L0.742893 1.01096C0.753899 1.15342 0.764905 1.33151 0.775911 1.54521C0.79242 1.7589 0.803426 1.98082 0.808928 2.21096C0.819934 2.4411 0.825437 2.65479 0.825437 2.85205V6H0ZM5.55197 6V0H9.09309V0.789041H6.42693V2.49041H8.80419V3.27123H6.42693V5.21096H9.09309V6H5.55197ZM11.0462 6L10.3941 0H11.1947L11.5992 4.30685C11.6102 4.41644 11.6185 4.53699 11.624 4.66849C11.635 4.8 11.6432 4.92877 11.6487 5.05479C11.6597 5.18082 11.6652 5.29041 11.6652 5.38356C11.6762 5.29041 11.6872 5.18082 11.6982 5.05479C11.7093 4.92877 11.7203 4.8 11.7313 4.66849C11.7478 4.53699 11.7643 4.41644 11.7808 4.30685L12.3008 0H13.1263L13.6133 4.30685C13.6243 4.41644 13.6353 4.53699 13.6463 4.66849C13.6628 4.8 13.6793 4.92877 13.6958 5.05479C13.7123 5.18082 13.7233 5.29041 13.7288 5.38356C13.7343 5.29041 13.7398 5.18082 13.7453 5.05479C13.7563 4.92877 13.7673 4.8 13.7784 4.66849C13.7894 4.53699 13.8004 4.41644 13.8114 4.30685L14.2241 0H15L14.3231 6H13.2913L12.8043 1.63562C12.7933 1.52055 12.7823 1.4 12.7713 1.27397C12.7603 1.14247 12.7493 1.01644 12.7383 0.89589C12.7273 0.769863 12.7163 0.665753 12.7053 0.583561C12.6998 0.665753 12.6915 0.769863 12.6805 0.89589C12.6695 1.01644 12.6585 1.14247 12.6475 1.27397C12.6365 1.4 12.6227 1.52055 12.6062 1.63562L12.0862 6H11.0462Z",fill:"currentColor"},Kt={key:1,d:"M0 8V0H1.49679L3.84103 6.65205C3.82636 6.44018 3.80802 6.18813 3.78601 5.89589C3.76399 5.60365 3.74565 5.30046 3.73098 4.9863C3.72364 4.67215 3.71997 4.38721 3.71997 4.13151V0H4.82055V8H3.32376L0.990525 1.34794C1.0052 1.5379 1.01987 1.77534 1.03455 2.06027C1.05656 2.34521 1.07123 2.6411 1.07857 2.94795C1.09325 3.25479 1.10058 3.53973 1.10058 3.80274V8H0ZM7.40262 8V0H12.1241V1.05205H8.56924V3.32055H11.7389V4.36164H8.56924V6.94795H12.1241V8H7.40262ZM14.7282 8L13.8587 0H14.9263L15.4656 5.74247C15.4803 5.88858 15.4913 6.04932 15.4986 6.22466C15.5133 6.4 15.5243 6.57169 15.5316 6.73973C15.5463 6.90776 15.5536 7.05388 15.5536 7.17808C15.5683 7.05388 15.583 6.90776 15.5977 6.73973C15.6123 6.57169 15.627 6.4 15.6417 6.22466C15.6637 6.04932 15.6857 5.88858 15.7077 5.74247L16.4011 0H17.5017L18.151 5.74247C18.1657 5.88858 18.1804 6.04932 18.195 6.22466C18.2171 6.4 18.2391 6.57169 18.2611 6.73973C18.2831 6.90776 18.2978 7.05388 18.3051 7.17808C18.3124 7.05388 18.3198 6.90776 18.3271 6.73973C18.3418 6.57169 18.3565 6.4 18.3711 6.22466C18.3858 6.04932 18.4005 5.88858 18.4152 5.74247L18.9655 0H20L19.0975 8H17.7218L17.0724 2.18082C17.0578 2.0274 17.0431 1.86667 17.0284 1.69863C17.0138 1.52329 16.9991 1.35525 16.9844 1.19452C16.9697 1.02648 16.9551 0.887671 16.9404 0.778082C16.933 0.887671 16.922 1.02648 16.9074 1.19452C16.8927 1.35525 16.878 1.52329 16.8633 1.69863C16.8487 1.86667 16.8303 2.0274 16.8083 2.18082L16.1149 8H14.7282Z",fill:"currentColor"},Xt={key:1,class:"mu-tag__wordmark mu-tag__wordmark--soon",viewBox:"0 0 20 7",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},Jt={key:0,class:"mu-tag__prefix"},Qt={class:"mu-tag__content"},Wt={key:1,class:"mu-tag__suffix"},Yt=M(e.defineComponent({__name:"Tag",props:{preset:{},tone:{},variant:{},size:{},shape:{}},setup(t){const o=t,n=e.useSlots(),a=e.computed(()=>ae(o)),i=e.computed(()=>Ft(o));return(s,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(i.value)},[a.value.preset==="new"||a.value.preset==="new-mini"?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["mu-tag__wordmark mu-tag__wordmark--new",{"mu-tag__wordmark--new-mini":a.value.preset==="new-mini"}]),viewBox:a.value.preset==="new-mini"?"0 0 15 6":"0 0 20 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[a.value.preset==="new-mini"?(e.openBlock(),e.createElementBlock("path",qt)):(e.openBlock(),e.createElementBlock("path",Kt))],10,Ut)):a.value.preset==="soon"?(e.openBlock(),e.createElementBlock("svg",Xt,[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M2.07437 7C1.64519 7 1.27562 6.92543 0.965653 6.7763C0.661651 6.62716 0.426199 6.41278 0.259296 6.13316C0.0923927 5.85353 0.00596083 5.52108 0 5.13582H0.804711C0.804711 5.47759 0.914986 5.74789 1.13554 5.94674C1.36205 6.14558 1.67499 6.24501 2.07437 6.24501C2.4499 6.24501 2.74198 6.14869 2.95061 5.95606C3.1652 5.76343 3.27249 5.49623 3.27249 5.15446C3.27249 4.88105 3.20096 4.64181 3.0579 4.43675C2.9208 4.23169 2.72111 4.08877 2.45884 4.00799L1.57366 3.71904C1.1266 3.57612 0.780868 3.33688 0.536474 3.00133C0.298041 2.66578 0.178825 2.27119 0.178825 1.81758C0.178825 1.45095 0.256315 1.13404 0.411297 0.866845C0.572239 0.593431 0.79577 0.382157 1.08189 0.233023C1.36801 0.0776743 1.70479 0 2.09225 0C2.66449 0 3.12347 0.167776 3.4692 0.503329C3.81493 0.832668 3.99077 1.27386 3.99673 1.8269H3.19202C3.19202 1.49135 3.09367 1.23036 2.89696 1.04394C2.70621 0.85131 2.435 0.754994 2.08331 0.754994C1.73758 0.754994 1.46636 0.841989 1.26966 1.01598C1.07891 1.18997 0.983536 1.43231 0.983536 1.74301C0.983536 2.02264 1.05507 2.26498 1.19813 2.47004C1.34118 2.6751 1.54683 2.82113 1.81507 2.90812L2.70919 3.20639C3.14433 3.34931 3.48112 3.59166 3.71955 3.93342C3.95799 4.27519 4.0772 4.67599 4.0772 5.13582C4.0772 5.50866 3.99375 5.83489 3.82685 6.11451C3.65994 6.39414 3.42449 6.61163 3.12049 6.76698C2.82245 6.92233 2.47374 7 2.07437 7ZM7.39985 7C7.00643 7 6.66667 6.92233 6.38055 6.76698C6.10039 6.61163 5.88282 6.38793 5.72784 6.09587C5.57882 5.7976 5.50431 5.44652 5.50431 5.04261V1.96671C5.50431 1.55659 5.57882 1.2055 5.72784 0.913449C5.88282 0.621394 6.10039 0.397692 6.38055 0.242344C6.66667 0.0869955 7.00643 0.00932134 7.39985 0.00932134C7.79326 0.00932134 8.13005 0.0869955 8.41021 0.242344C8.69633 0.397692 8.9139 0.621394 9.06292 0.913449C9.2179 1.2055 9.29539 1.55348 9.29539 1.95739V5.04261C9.29539 5.44652 9.2179 5.7976 9.06292 6.09587C8.9139 6.38793 8.69633 6.61163 8.41021 6.76698C8.13005 6.92233 7.79326 7 7.39985 7ZM7.39985 6.24501C7.75154 6.24501 8.01977 6.14248 8.20456 5.93742C8.3953 5.72614 8.49068 5.42787 8.49068 5.04261V1.96671C8.49068 1.58145 8.3953 1.28629 8.20456 1.08123C8.01977 0.869951 7.75154 0.764314 7.39985 0.764314C7.05412 0.764314 6.78588 0.869951 6.59514 1.08123C6.40439 1.28629 6.30902 1.58145 6.30902 1.96671V5.04261C6.30902 5.42787 6.40439 5.72614 6.59514 5.93742C6.78588 6.14248 7.05412 6.24501 7.39985 6.24501ZM12.7611 7C12.3677 7 12.0279 6.92233 11.7418 6.76698C11.4616 6.61163 11.2441 6.38793 11.0891 6.09587C10.9401 5.7976 10.8656 5.44652 10.8656 5.04261V1.96671C10.8656 1.55659 10.9401 1.2055 11.0891 0.913449C11.2441 0.621394 11.4616 0.397692 11.7418 0.242344C12.0279 0.0869955 12.3677 0.00932134 12.7611 0.00932134C13.1545 0.00932134 13.4913 0.0869955 13.7715 0.242344C14.0576 0.397692 14.2751 0.621394 14.4242 0.913449C14.5791 1.2055 14.6566 1.55348 14.6566 1.95739V5.04261C14.6566 5.44652 14.5791 5.7976 14.4242 6.09587C14.2751 6.38793 14.0576 6.61163 13.7715 6.76698C13.4913 6.92233 13.1545 7 12.7611 7ZM12.7611 6.24501C13.1128 6.24501 13.381 6.14248 13.5658 5.93742C13.7566 5.72614 13.8519 5.42787 13.8519 5.04261V1.96671C13.8519 1.58145 13.7566 1.28629 13.5658 1.08123C13.381 0.869951 13.1128 0.764314 12.7611 0.764314C12.4154 0.764314 12.1471 0.869951 11.9564 1.08123C11.7656 1.28629 11.6703 1.58145 11.6703 1.96671V5.04261C11.6703 5.42787 11.7656 5.72614 11.9564 5.93742C12.1471 6.14248 12.4154 6.24501 12.7611 6.24501ZM16.2447 6.90679V0.10253H17.3176L19.3115 5.9281C19.2996 5.77275 19.2847 5.58322 19.2668 5.35952C19.2549 5.1296 19.243 4.89037 19.2311 4.64181C19.2251 4.38704 19.2221 4.1478 19.2221 3.9241V0.10253H20V6.90679H18.9271L16.9421 1.08123C16.954 1.23036 16.9659 1.41988 16.9779 1.6498C16.9898 1.8735 16.9987 2.11274 17.0047 2.36751C17.0166 2.61607 17.0226 2.8553 17.0226 3.08522V6.90679H16.2447Z",fill:"currentColor"},null,-1)])])):a.value.preset==="beta"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode("Beta")],64)):a.value.preset==="free"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode("1 Free")],64)):a.value.preset==="details"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[l[1]||(l[1]=e.createElementVNode("svg",{class:"mu-tag__icon mu-tag__icon--scan-text",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[e.createElementVNode("path",{d:"M1.5 3.5V2.5C1.5 2.23478 1.60536 1.98043 1.79289 1.79289C1.98043 1.60536 2.23478 1.5 2.5 1.5H3.5M8.5 1.5H9.5C9.76522 1.5 10.0196 1.60536 10.2071 1.79289C10.3946 1.98043 10.5 2.23478 10.5 2.5V3.5M10.5 8.5V9.5C10.5 9.76522 10.3946 10.0196 10.2071 10.2071C10.0196 10.3946 9.76522 10.5 9.5 10.5H8.5M3.5 10.5H2.5C2.23478 10.5 1.98043 10.3946 1.79289 10.2071C1.60536 10.0196 1.5 9.76522 1.5 9.5V8.5M3.5 4H7.5M3.5 6H8.5M3.5 8H6.5",stroke:"currentColor","stroke-opacity":"0.9","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),l[2]||(l[2]=e.createElementVNode("span",{class:"mu-tag__label"},"Details",-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.unref(n).prefix?(e.openBlock(),e.createElementBlock("span",Jt,[e.renderSlot(s.$slots,"prefix",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",Qt,[e.renderSlot(s.$slots,"default",{},void 0,!0)]),e.unref(n).suffix?(e.openBlock(),e.createElementBlock("span",Wt,[e.renderSlot(s.$slots,"suffix",{},void 0,!0)])):e.createCommentVNode("",!0)],64))],2))}}),[["__scopeId","data-v-4ec2983a"]]);b.MessageList=Le,b.MuButton=A,b.MuModal=X,b.MuRadio=Ye,b.MuRadioGroup=et,b.MuSwitch=ft,b.MuTab=xt,b.MuTabs=Nt,b.MuTag=Yt,b.message=we,b.muModal=Ge,b.openMuModal=L,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(_,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(_=typeof globalThis<"u"?globalThis:_||self,e(_.MurekaUi={},_.Vue))})(this,(function(_,e){"use strict";function L(t={}){return{type:t.type??"primary",status:t.status,appearance:t.appearance??"default",ghostTextTone:t.ghostTextTone??"secondary",size:t.size??"medium",shape:t.shape??"rectangular",disabled:t.disabled??!1,loading:t.loading??!1,iconOnly:t.iconOnly??!1,nativeType:t.nativeType??"button"}}function se(t={}){const o=L(t),a=["mu-button",`mu-button--${o.type}`,`mu-button--appearance-${o.appearance}`,`mu-button--${o.size}`];return o.type==="ghost"&&o.ghostTextTone==="primary"&&a.push(`mu-button--ghost-text-${o.ghostTextTone}`),o.shape==="pill"&&a.push("mu-button--shape-pill"),o.status&&a.push(`mu-button--status-${o.status}`),o.iconOnly&&a.push("mu-button--icon-only"),o.disabled&&a.push("is-disabled"),o.loading&&a.push("is-loading"),a}function le(t={}){const o=L(t);return!o.disabled&&!o.loading}function ce(t={}){const o=t.iconOnly??!1,a=t.hasPrefix??!1,s=t.hasSuffix??!1,r=t.loading??!1,n=t.hasAriaLabel??!1;return{showPrefixSlot:!o&&!r&&a,showSuffixSlot:!o&&s,showLoadingIndicator:r,requiresAriaLabel:o&&!n,isInvalidIconOnlyCombination:o&&(a||s)}}const ie=["type","disabled","aria-busy"],re={key:0,class:"mu-button__prefix","aria-hidden":"true"},de={class:"mu-button__content"},ue={key:1,class:"mu-button__suffix","aria-hidden":"true"},me=e.defineComponent({__name:"Button",props:{type:{default:"primary"},status:{},appearance:{default:"default"},ghostTextTone:{default:"secondary"},size:{default:"medium"},shape:{default:"rectangular"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},iconOnly:{type:Boolean,default:!1},nativeType:{default:"button"}},emits:["click"],setup(t,{emit:o}){const a=t,s=o,r=e.useSlots(),n=e.useAttrs(),l={small:{width:"var(--mu-button-icon-size-small)",height:"var(--mu-button-icon-size-small)"},medium:{width:"var(--mu-button-icon-size-medium)",height:"var(--mu-button-icon-size-medium)"},large:{width:"var(--mu-button-icon-size-large)",height:"var(--mu-button-icon-size-large)"}},u=e.computed(()=>L(a)),i=e.computed(()=>se(u.value)),c=e.computed(()=>l[u.value.size]),d=e.computed(()=>ce({iconOnly:u.value.iconOnly,hasPrefix:!!r.prefix,hasSuffix:!!r.suffix,loading:u.value.loading,hasDefaultSlot:!!r.default,hasAriaLabel:typeof n["aria-label"]=="string"&&n["aria-label"].trim().length>0}));function y(p){if(!le(u.value)){p.preventDefault(),p.stopPropagation();return}s("click",p)}return(p,g)=>(e.openBlock(),e.createElementBlock("button",{type:u.value.nativeType,class:e.normalizeClass(["mu-button",i.value]),disabled:u.value.disabled||u.value.loading,"aria-busy":u.value.loading?"true":void 0,onClick:y},[d.value.showLoadingIndicator||d.value.showPrefixSlot?(e.openBlock(),e.createElementBlock("span",re,[d.value.showLoadingIndicator?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"mu-button__loading-icon",style:e.normalizeStyle(c.value),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[...g[0]||(g[0]=[e.createElementVNode("path",{d:"M2.00293 12C2.00293 6.47853 6.47853 2.00293 12 2.00293C12.5509 2.00293 12.9971 2.4491 12.9971 3C12.9971 3.5509 12.5509 3.99707 12 3.99707C7.58034 3.99707 3.99707 7.58034 3.99707 12C3.99707 16.4197 7.58034 20.0029 12 20.0029C16.4197 20.0029 20.0029 16.4197 20.0029 12C20.0029 11.4491 20.4491 11.0029 21 11.0029C21.5509 11.0029 21.9971 11.4491 21.9971 12C21.9971 17.5215 17.5215 21.9971 12 21.9971C6.47853 21.9971 2.00293 17.5215 2.00293 12Z",fill:"currentColor"},null,-1)])],4)):e.renderSlot(p.$slots,"prefix",{key:1},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",de,[e.renderSlot(p.$slots,"default",{},void 0,!0)]),d.value.showSuffixSlot?(e.openBlock(),e.createElementBlock("span",ue,[e.renderSlot(p.$slots,"suffix",{},void 0,!0)])):e.createCommentVNode("",!0)],10,ie))}}),$=(t,o)=>{const a=t.__vccOpts||t;for(const[s,r]of o)a[s]=r;return a},A=$(me,[["__scopeId","data-v-42de128c"]]),fe=3e3,he={close:()=>{}},M=e.reactive({items:[]});let pe=1;const x=new Map;function ge(t){return typeof t=="string"?{title:t}:{title:t.title,description:t.description,duration:t.duration,closable:t.closable,resetOnHover:t.resetOnHover,icon:t.icon}}function O(t){return t.duration>0}function ke(t){return M.items.findIndex(o=>o.id===t)}function q(t){return M.items.find(o=>o.id===t)}function R(t){const o=x.get(t);o&&o.timer!==null&&(globalThis.clearTimeout(o.timer),o.timer=null)}function D(t){const o=ke(t);o<0||(R(t),x.delete(t),M.items.splice(o,1))}function K(t,o){const a=x.get(t);a&&(R(t),a.remainingDuration=o,a.deadline=Date.now()+o,a.isPaused=!1,a.timer=globalThis.setTimeout(()=>{D(t)},o))}function be(t,o){return{id:pe++,type:t,title:o.title,description:o.description,duration:o.duration??fe,closable:o.closable??!1,resetOnHover:o.resetOnHover??!1,icon:o.icon}}function _e(){return typeof globalThis.window<"u"&&typeof globalThis.document<"u"}function ye(t,o){if(!_e())return he;const a=ge(o),s=be(t,a);return M.items.push(s),x.set(s.id,{timer:null,deadline:0,remainingDuration:s.duration,isPaused:!1}),O(s)&&K(s.id,s.duration),{close:()=>D(s.id)}}function E(t){return o=>ye(t,o)}const Ce={success:E("success"),warning:E("warning"),loading:E("loading"),error:E("error"),danger:E("danger")};function we(t){D(t)}function ve(t){const o=x.get(t),a=q(t);!o||!a||o.isPaused||!a.resetOnHover||!O(a)||(o.remainingDuration=Math.max(o.deadline-Date.now(),0),R(t),o.isPaused=!0)}function Be(t){const o=x.get(t),a=q(t);!o||!a||!o.isPaused||!a.resetOnHover||!O(a)||K(t,o.remainingDuration||a.duration)}const Ve={class:"mu-message-list","aria-live":"polite","aria-atomic":"true"},Te=["onMouseenter","onMouseleave"],Se={class:"mu-message__icon","aria-hidden":"true"},$e={class:"mu-message__content"},Ne={class:"mu-message__title"},xe={key:0,class:"mu-message__description"},Me=["onClick"],Ee=$(e.defineComponent({__name:"MessageList",setup(t){const o=e.computed(()=>M.items),a=e.defineComponent({name:"MarkupIcon",props:{markup:{type:String,required:!0}},setup(i){return()=>e.h("span",{class:"mu-message__icon-markup",innerHTML:i.markup})}});function s(i){return typeof i!="string"}function r(i){ve(i)}function n(i){Be(i)}function l(i){if(!(i instanceof globalThis.HTMLElement))return;const c=i.getBoundingClientRect();i.style.width=`${c.width}px`,i.style.height=`${c.height}px`}const u={success:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6.5L9.5 17L4 11.5" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',warning:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 4.5L20 18.5H4L12 4.5Z" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/><path d="M12 9.5V13.5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="16.5" r="1" fill="currentColor"/></svg>',loading:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2"/><path d="M12 8V12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M12 12H15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>',error:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2"/><path d="M12 9V12.5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="15.5" r="1" fill="currentColor"/></svg>',danger:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2"/><path d="M9 9L15 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M15 9L9 15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>'};return(i,c)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(e.TransitionGroup,{name:"mu-message-fade",tag:"div",class:"mu-message-list__stack",onBeforeLeave:l},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.id,class:e.normalizeClass(["mu-message",[`mu-message--${d.type}`,{"mu-message--compact":!d.description}]]),role:"status",onMouseenter:y=>r(d.id),onMouseleave:y=>n(d.id)},[e.createElementVNode("span",Se,[d.icon&&s(d.icon)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.icon),{key:0})):(e.openBlock(),e.createBlock(e.unref(a),{key:1,markup:typeof d.icon=="string"?d.icon:u[d.type]},null,8,["markup"]))]),e.createElementVNode("div",$e,[e.createElementVNode("div",Ne,e.toDisplayString(d.title),1),d.description?(e.openBlock(),e.createElementBlock("p",xe,e.toDisplayString(d.description),1)):e.createCommentVNode("",!0)]),d.closable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"mu-message__close","aria-label":"Close message",onClick:y=>e.unref(we)(d.id)},[...c[0]||(c[0]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5 5L19 19M19 5L5 19",stroke:"white","stroke-width":"1.8","stroke-linecap":"round"})],-1)])],8,Me)):e.createCommentVNode("",!0)],42,Te))),128))]),_:1})]))}}),[["__scopeId","data-v-debf98d8"]]),Pe={medium:{width:"548px",minHeight:"228px"},large:{width:"800px",minHeight:"500px"}};function H(t={}){const o=t.size??"medium",a=Pe[o],s=t.variant??"form";return{visible:t.visible??!1,title:t.title??"",status:t.status??"default",variant:s,size:o,width:t.width??a.width,minHeight:a.minHeight,maskClosable:t.maskClosable??!0,escToClose:t.escToClose??!0,closable:t.closable??!0,okText:t.okText??"Confirm",cancelText:t.cancelText??"Cancel",hideCancel:t.hideCancel??s==="feedback",hideOk:t.hideOk??!1,okLoading:t.okLoading??!1}}function ze(t={}){const o=H(t),a=["mu-modal",`mu-modal--${o.size}`,`mu-modal--${o.status}`,`mu-modal--variant-${o.variant}`];return o.variant==="feedback"&&a.push("mu-modal--feedback"),a}function Ie(t={}){const o=H(t);return o.variant==="feedback"?{type:"secondary",status:o.status==="default"?void 0:o.status}:o.status==="danger"?{type:"secondary",status:"danger"}:{type:"primary"}}const Le={key:0,class:"mu-modal-root"},Ae={class:"mu-modal__header"},Oe=["data-status"],Re={class:"mu-modal__body"},De={key:0,class:"mu-modal__footer"},X=$(e.defineComponent({inheritAttrs:!1,__name:"Modal",props:{visible:{type:Boolean,default:!1},title:{default:""},status:{default:"default"},variant:{default:"form"},size:{default:"medium"},width:{},maskClosable:{type:Boolean,default:!0},escToClose:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},okText:{default:"Confirm"},cancelText:{default:"Cancel"},okLoading:{type:Boolean,default:!1},hideOk:{type:Boolean,default:!1},hideCancel:{type:Boolean,default:void 0}},emits:["update:visible","ok","cancel","close"],setup(t,{emit:o}){const a=t,s=o,r=e.useAttrs(),n=e.computed(()=>H(a)),l=e.computed(()=>[ze(a),r.class]),u=e.computed(()=>{const{class:m,style:C,...V}=r;return V}),i=e.computed(()=>Ie(a)),c=e.computed(()=>n.value.variant==="feedback"&&n.value.hideCancel),d=e.computed(()=>[{width:n.value.width,minHeight:n.value.minHeight},r.style]),y=`mu-modal-title-${Math.random().toString(36).slice(2,10)}`,g=typeof globalThis.document<"u"?globalThis.document:null;function v(){s("update:visible",!1)}function b(){n.value.maskClosable&&(v(),s("cancel",new globalThis.MouseEvent("click")))}function h(){v(),s("close")}function B(m){s("cancel",m),v()}function S(m){s("ok",m)}function N(m){m.key!=="Escape"||!n.value.visible||!n.value.escToClose||(v(),s("close"))}return e.onMounted(()=>{g&&g.addEventListener("keydown",N)}),e.onBeforeUnmount(()=>{g&&(g.removeEventListener("keydown",N),g.body.style.overflow="")}),e.watch(()=>n.value.visible,m=>{g&&(g.body.style.overflow=m?"hidden":"")},{immediate:!0}),(m,C)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[n.value.visible?(e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("div",{class:"mu-modal__mask",onClick:b}),e.createElementVNode("div",e.mergeProps(u.value,{class:l.value,style:d.value,role:"dialog","aria-modal":"true","aria-labelledby":y}),[e.createElementVNode("header",Ae,[e.createElementVNode("div",{id:y,class:"mu-modal__title","data-status":n.value.status},[e.renderSlot(m.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(n.value.title),1)],!0)],8,Oe),n.value.closable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"mu-modal__close","aria-label":"Close dialog",onClick:h},[...C[0]||(C[0]=[e.createElementVNode("span",{class:"mu-modal__close-icon","aria-hidden":"true"},[e.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M5 5L15 15",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"}),e.createElementVNode("path",{d:"M15 5L5 15",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})])],-1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Re,[e.renderSlot(m.$slots,"default",{},void 0,!0)]),m.$slots.footer||!n.value.hideOk||!n.value.hideCancel?(e.openBlock(),e.createElementBlock("footer",De,[e.renderSlot(m.$slots,"footer",{},()=>[n.value.hideCancel?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(A),{key:0,type:"ghost",class:"mu-modal__cancel",onClick:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value.cancelText),1)]),_:1})),n.value.hideOk?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(A),e.mergeProps({key:1},i.value,{loading:n.value.okLoading,class:["mu-modal__ok",{"mu-modal__ok--block":c.value}],onClick:S}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value.okText),1)]),_:1},16,["loading","class"]))],!0)])):e.createCommentVNode("",!0)],16)])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-e94991b0"]]);function He(t){return t===void 0?null:typeof t=="function"?t():t}function P(t={}){return typeof globalThis.document>"u"?Promise.resolve(!1):new Promise(o=>{const a=globalThis.document.createElement("div");globalThis.document.body.appendChild(a);const s=e.ref(!0);let r=null,n=!1;const l=()=>{r&&(r.unmount(),r=null),a.parentNode&&a.parentNode.removeChild(a)},u=d=>{n||(n=!0,s.value=!1,queueMicrotask(()=>{l(),o(d)}))},{content:i,...c}=t;r=e.createApp({render(){return e.h(X,{...c,visible:s.value,"onUpdate:visible":d=>{d||u(!1)},onOk:()=>u(!0),onCancel:()=>u(!1),onClose:()=>u(!1)},{default:()=>He(i)})}}),r.mount(a)})}const Ge={show:P,confirm:(t={})=>P(t),success:(t={})=>P({...t,variant:"feedback",status:"success"}),danger:(t={})=>P({...t,variant:"feedback",status:"danger"})},Z=Symbol("MuRadioGroup"),Ue=["horizontal","vertical"];function je(t,o){return typeof o=="string"&&t.includes(o)}function Fe(t){return je(Ue,t)}function J(t={}){return{modelValue:t.modelValue,value:t.value??!0,defaultChecked:t.defaultChecked??!1,disabled:t.disabled??!1,name:t.name}}function Q(t={}){return{modelValue:t.modelValue,defaultValue:t.defaultValue,disabled:t.disabled??!1,name:t.name,direction:Fe(t.direction)?t.direction:"horizontal"}}function qe(t={}){return t.modelValue!==void 0}function Ke(t={}){return t.modelValue!==void 0}function G(t,o){return Object.is(t,o)}function Xe(t={},o={}){const a=J(t),s=["mu-radio"];return o.checked&&s.push("is-checked"),(o.disabled||a.disabled)&&s.push("is-disabled"),s}function Ze(t={}){const o=Q(t),a=["mu-radio-group",`mu-radio-group--${o.direction}`];return o.disabled&&a.push("is-disabled"),a}const Je=["checked","disabled","name","value"],Qe={class:"mu-radio__label"},We=$(e.defineComponent({inheritAttrs:!1,__name:"Radio",props:{modelValue:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:!0},defaultChecked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:{default:void 0}},emits:["update:modelValue","change","focus","blur"],setup(t,{emit:o}){const a=t,s=o,r=e.useAttrs(),n=e.inject(Z,null),l=e.computed(()=>J(a)),u=e.computed(()=>qe(a)),i=e.ref(l.value.defaultChecked),c=e.computed(()=>n?G(n.value.value,l.value.value):u.value?G(l.value.modelValue,l.value.value):i.value),d=e.computed(()=>l.value.disabled||!!(n!=null&&n.disabled.value)),y=e.computed(()=>(n==null?void 0:n.name.value)??l.value.name),p=e.computed(()=>String(l.value.value)),g=e.computed(()=>[Xe(a,{checked:c.value,disabled:d.value}),r.class]),v=e.computed(()=>{const{class:m,style:C,...V}=r;return V}),b=e.computed(()=>r.style);function h(m,C){u.value||(i.value=!0),s("update:modelValue",m),s("change",m,C)}function B(m){if(d.value)return;const C=l.value.value,V=m.target instanceof globalThis.HTMLInputElement?m.target:null;if(n){n.select(C,m),e.nextTick(()=>{V&&(V.checked=c.value)});return}h(C,m),e.nextTick(()=>{V&&(V.checked=c.value)})}function S(m){s("focus",m)}function N(m){s("blur",m)}return(m,C)=>(e.openBlock(),e.createElementBlock("label",e.mergeProps(v.value,{class:g.value,style:b.value}),[e.createElementVNode("input",{class:"mu-radio__input",type:"radio",checked:c.value,disabled:d.value,name:y.value,value:p.value,onChange:B,onFocus:S,onBlur:N},null,40,Je),C[0]||(C[0]=e.createElementVNode("span",{class:"mu-radio__control","aria-hidden":"true"},[e.createElementVNode("span",{class:"mu-radio__dot"})],-1)),e.createElementVNode("span",Qe,[e.renderSlot(m.$slots,"default",{},void 0,!0)])],16))}}),[["__scopeId","data-v-f1283749"]]),Ye=$(e.defineComponent({inheritAttrs:!1,__name:"RadioGroup",props:{modelValue:{type:[String,Number,Boolean],default:void 0},defaultValue:{type:[String,Number,Boolean],default:void 0},disabled:{type:Boolean,default:!1},name:{default:void 0},direction:{default:"horizontal"}},emits:["update:modelValue","change"],setup(t,{emit:o}){const a=t,s=o,r=e.useAttrs(),n=e.computed(()=>Q(a)),l=e.computed(()=>Ke(a)),u=e.ref(n.value.defaultValue),i=e.computed(()=>l.value?n.value.modelValue:u.value),c=e.computed(()=>n.value.disabled),d=e.computed(()=>n.value.name),y=e.computed(()=>[Ze(a),r.class]),p=e.computed(()=>{const{class:b,style:h,...B}=r;return B}),g=e.computed(()=>r.style);function v(b,h){n.value.disabled||G(i.value,b)||(l.value||(u.value=b),s("update:modelValue",b),s("change",b,h))}return e.provide(Z,{value:i,disabled:c,name:d,select:v}),(b,h)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(p.value,{role:"radiogroup",class:y.value,style:g.value}),[e.renderSlot(b.$slots,"default",{},void 0,!0)],16))}}),[["__scopeId","data-v-3879fec4"]]),et=["circle","round","line"],tt=["small","medium"];function W(t,o){return typeof o=="string"&&t.includes(o)}function ot(t){return W(et,t)}function at(t){return W(tt,t)}function U(t={}){return{modelValue:t.modelValue,defaultChecked:t.defaultChecked??!1,disabled:t.disabled??!1,loading:t.loading??!1,type:ot(t.type)?t.type:"circle",size:at(t.size)?t.size:"medium",checkedValue:t.checkedValue??!0,uncheckedValue:t.uncheckedValue??!1,checkedColor:t.checkedColor,uncheckedColor:t.uncheckedColor,beforeChange:t.beforeChange,checkedText:t.checkedText,uncheckedText:t.uncheckedText}}function nt(t={}){return t.modelValue!==void 0}function Y(t,o){return Object.is(t,o.checkedValue)}function st(t,o){return Y(t,o)?o.uncheckedValue:o.checkedValue}function lt(t){return t.type!=="line"&&t.size!=="small"}function ct(t={},o={}){const a=U(t),s=["mu-switch",`mu-switch--${a.type}`,`mu-switch--${a.size}`];return o.checked&&s.push("is-checked"),a.disabled&&s.push("is-disabled"),(a.loading||o.loading)&&s.push("is-loading"),s}const it=["aria-checked","disabled"],rt={class:"mu-switch__thumb","aria-hidden":"true"},dt={key:0,class:"mu-switch__loading-icon",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ut={key:0,class:"mu-switch__label"},mt=$(e.defineComponent({inheritAttrs:!1,__name:"Switch",props:{modelValue:{type:[String,Number,Boolean],default:void 0},defaultChecked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{default:"circle"},size:{default:"medium"},checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},checkedColor:{},uncheckedColor:{},beforeChange:{},checkedText:{},uncheckedText:{}},emits:["update:modelValue","change","focus","blur"],setup(t,{emit:o}){const a=t,s=o,r=e.useAttrs(),n=e.useSlots(),l=e.ref(!1),u=U(a),i=e.ref(u.defaultChecked?u.checkedValue:u.uncheckedValue),c=e.computed(()=>U(a)),d=e.computed(()=>nt(a)),y=e.computed(()=>d.value?c.value.modelValue:i.value),p=e.computed(()=>Y(y.value,c.value)),g=e.computed(()=>c.value.loading||l.value),v=e.computed(()=>lt(c.value)),b=e.computed(()=>v.value?p.value?!!(n.checked||c.value.checkedText):!!(n.unchecked||c.value.uncheckedText):!1),h=e.computed(()=>[ct(a,{checked:p.value,loading:l.value}),{"has-label":b.value},r.class]),B=e.computed(()=>{const{class:f,style:w,type:k,...T}=r;return T}),S=e.computed(()=>{const f={};return c.value.checkedColor&&(f["--mu-switch-current-checked-bg"]=c.value.checkedColor,f["--mu-switch-current-checked-border"]=c.value.checkedColor,f["--mu-switch-current-checked-thumb"]=c.value.checkedColor,f["--mu-switch-current-checked-glow"]=`0 0 12px ${c.value.checkedColor}`),c.value.uncheckedColor&&(f["--mu-switch-current-unchecked-bg"]=c.value.uncheckedColor),[f,r.style]});function N(){}function m(f){const w=c.value.beforeChange;if(!w)return!0;try{const k=w(f);return k instanceof Promise?(l.value=!0,k.then(T=>T!==!1).catch(()=>!1)):k!==!1}catch{return!1}}function C(f,w){d.value||(i.value=f),s("update:modelValue",f),s("change",f,w)}function V(f){if(c.value.disabled||g.value)return;const w=st(y.value,c.value),k=m(w);if(k instanceof Promise){k.then(T=>{T&&C(w,f)}).finally(()=>{l.value=!1});return}k&&C(w,f)}function z(f){s("focus",f)}function j(f){s("blur",f)}return(f,w)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps(B.value,{type:"button",role:"switch",class:h.value,style:S.value,"aria-checked":p.value?"true":"false",disabled:c.value.disabled||g.value,onClick:V,onFocus:z,onBlur:j}),[w[1]||(w[1]=e.createElementVNode("span",{class:"mu-switch__line-track","aria-hidden":"true"},null,-1)),e.createElementVNode("span",rt,[g.value?(e.openBlock(),e.createElementBlock("svg",dt,[...w[0]||(w[0]=[e.createElementVNode("path",{d:"M8 1.5C8.41421 1.5 8.75 1.83579 8.75 2.25C8.75 2.66421 8.41421 3 8 3C5.23858 3 3 5.23858 3 8C3 10.7614 5.23858 13 8 13C10.7614 13 13 10.7614 13 8C13 7.58579 13.3358 7.25 13.75 7.25C14.1642 7.25 14.5 7.58579 14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5Z",fill:"currentColor"},null,-1)])])):p.value?e.renderSlot(f.$slots,"checked-icon",{key:1},void 0,!0):e.renderSlot(f.$slots,"unchecked-icon",{key:2},void 0,!0)]),b.value?(e.openBlock(),e.createElementBlock("span",ut,[p.value?e.renderSlot(f.$slots,"checked",{key:0},()=>[e.createTextVNode(e.toDisplayString(c.value.checkedText),1)],!0):e.renderSlot(f.$slots,"unchecked",{key:1},()=>[e.createTextVNode(e.toDisplayString(c.value.uncheckedText),1)],!0)])):e.createCommentVNode("",!0)],16,it))}}),[["__scopeId","data-v-8cfb8f2a"]]),ee=Symbol("MuTabs"),ft=["line","segment"],ht=["small","medium","large"],pt=["white","ghost"],gt=["content","equal"];function I(t,o){return typeof o=="string"&&t.includes(o)}function kt(t){return I(ft,t)}function bt(t){return I(ht,t)}function _t(t){return I(pt,t)}function yt(t){return I(gt,t)}function te(t={}){const o=t,a=kt(o.variant)?o.variant:"line";return{modelValue:t.modelValue,defaultValue:t.defaultValue,variant:a,appearance:a==="segment"&&_t(o.appearance)?o.appearance:a==="segment"?"white":void 0,size:bt(o.size)?o.size:"medium",layout:yt(o.layout)?o.layout:"content",disabled:t.disabled??!1}}function Ct(t){return{value:t.value,disabled:t.disabled??!1}}function wt(t={}){return t.modelValue!==void 0}function oe(t,o){return Object.is(t,o)}function vt(t={}){const o=te(t),a=["mu-tabs",`mu-tabs--variant-${o.variant}`,`mu-tabs--size-${o.size}`,`mu-tabs--layout-${o.layout}`];return o.variant==="segment"&&a.push(`mu-tabs--appearance-${o.appearance}`),o.disabled&&a.push("is-disabled"),a}function Bt(t,o={}){const a=["mu-tab"];return o.active&&a.push("is-active"),(o.disabled||t.disabled)&&a.push("is-disabled"),a}const Vt=["aria-selected","disabled"],Tt={key:0,class:"mu-tab__prefix","aria-hidden":"true"},St={class:"mu-tab__content"},$t={key:1,class:"mu-tab__suffix","aria-hidden":"true"},Nt=$(e.defineComponent({inheritAttrs:!1,__name:"Tab",props:{value:{},disabled:{type:Boolean}},emits:["click"],setup(t,{emit:o}){const a=t,s=o,r=e.useAttrs(),n=e.useSlots(),l=e.inject(ee,null),u=e.ref(null),i=e.computed(()=>Ct(a)),c=e.computed(()=>l?oe(l.value.value,i.value.value):!1),d=e.computed(()=>i.value.disabled||!!(l!=null&&l.disabled.value)),y=e.computed(()=>[Bt(a,{active:c.value,disabled:d.value}),r.class]),p=e.computed(()=>{const{class:h,style:B,...S}=r;return S}),g=e.computed(()=>r.style);function v(){!l||!u.value||l.registerItem(i.value.value,u.value)}function b(h){if(d.value){h.preventDefault(),h.stopPropagation();return}l&&l.select(i.value.value,h),s("click",h)}return e.onMounted(()=>{v()}),e.onBeforeUnmount(()=>{l==null||l.unregisterItem(i.value.value)}),e.watch(()=>i.value.value,(h,B)=>{!l||!u.value||(l.unregisterItem(B),l.registerItem(h,u.value))}),(h,B)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps({ref_key:"buttonRef",ref:u},p.value,{type:"button",role:"tab",class:y.value,style:g.value,"aria-selected":c.value?"true":"false",disabled:d.value,onClick:b}),[e.unref(n).prefix?(e.openBlock(),e.createElementBlock("span",Tt,[e.renderSlot(h.$slots,"prefix",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",St,[e.renderSlot(h.$slots,"default",{},void 0,!0)]),e.unref(n).suffix?(e.openBlock(),e.createElementBlock("span",$t,[e.renderSlot(h.$slots,"suffix",{},void 0,!0)])):e.createCommentVNode("",!0)],16,Vt))}}),[["__scopeId","data-v-97f04990"]]),xt=$(e.defineComponent({inheritAttrs:!1,__name:"Tabs",props:{modelValue:{},defaultValue:{},size:{},layout:{},disabled:{type:Boolean},variant:{},appearance:{}},emits:["update:modelValue","change"],setup(t,{emit:o}){const a=t,s=o,r=e.useAttrs(),n=e.ref(null),l=e.computed(()=>te(a)),u=e.computed(()=>wt(a)),i=e.ref(l.value.defaultValue),c=e.computed(()=>u.value?l.value.modelValue:i.value),d=e.computed(()=>l.value.variant),y=e.computed(()=>l.value.appearance),p=e.computed(()=>l.value.size),g=e.computed(()=>l.value.layout),v=e.computed(()=>l.value.disabled),b=e.ref(!1),h=e.ref(0),B=new Map,S=e.ref({transform:"translateX(0px)",width:"0px"}),N=e.computed(()=>[vt(a),r.class]),m=e.computed(()=>{const{class:k,style:T,...F}=r;return F}),C=e.computed(()=>r.style);function V(){const k=n.value,T=c.value!==void 0?B.get(c.value):void 0;if(!k||!T){S.value={transform:"translateX(0px)",width:"0px"};return}const F=k.getBoundingClientRect(),ne=T.getBoundingClientRect();S.value={transform:`translateX(${ne.left-F.left}px)`,width:`${ne.width}px`}}function z(){e.nextTick(()=>{V()})}function j(k,T){v.value||oe(c.value,k)||(u.value||(i.value=k),s("update:modelValue",k),s("change",k,T))}function f(k,T){B.set(k,T),h.value+=1,z()}function w(k){B.delete(k),h.value+=1,z()}return e.provide(ee,{value:c,variant:d,appearance:y,size:p,layout:g,disabled:v,select:j,registerItem:f,unregisterItem:w}),e.watch([c,d,p,g,h],()=>{z()},{flush:"post"}),e.onMounted(()=>{globalThis.window.addEventListener("resize",V),e.nextTick(()=>{V(),b.value=!0})}),e.onBeforeUnmount(()=>{globalThis.window.removeEventListener("resize",V)}),(k,T)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({ref_key:"rootRef",ref:n},m.value,{role:"tablist",class:[N.value,{"is-ready":b.value}],style:C.value}),[e.renderSlot(k.$slots,"default",{},void 0,!0),e.createElementVNode("span",{class:"mu-tabs__indicator",style:e.normalizeStyle(S.value),"aria-hidden":"true"},null,4)],16))}}),[["__scopeId","data-v-28e8c4f7"]]),Mt=["outline","solid","soft"];function Et(t,o){return typeof o=="string"&&t.includes(o)}function Pt(t){return Et(Mt,t)}function ae(t={}){return{variant:Pt(t.variant)?t.variant:"outline",selected:t.selected??!1,disabled:t.disabled??!1}}function zt(t={}){const o=ae(t),a=["mu-tag",`mu-tag--variant-${o.variant}`];return o.selected&&a.push("is-selected"),o.disabled&&a.push("is-disabled"),a}const It=["disabled","aria-pressed"],Lt={key:0,class:"mu-tag__prefix","aria-hidden":"true"},At={class:"mu-tag__content"},Ot={key:1,class:"mu-tag__suffix","aria-hidden":"true"},Rt=$(e.defineComponent({__name:"Tag",props:{variant:{},selected:{type:Boolean},disabled:{type:Boolean}},emits:["update:selected","click"],setup(t,{emit:o}){const a=t,s=o,r=e.useSlots(),n=e.computed(()=>ae(a)),l=e.computed(()=>zt(a));function u(i){n.value.disabled||(s("click",i),s("update:selected",!n.value.selected))}return(i,c)=>(e.openBlock(),e.createElementBlock("button",{type:"button",class:e.normalizeClass(l.value),disabled:n.value.disabled,"aria-pressed":n.value.selected,onClick:u},[e.unref(r).prefix?(e.openBlock(),e.createElementBlock("span",Lt,[e.renderSlot(i.$slots,"prefix",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",At,[e.renderSlot(i.$slots,"default",{},void 0,!0)]),e.unref(r).suffix?(e.openBlock(),e.createElementBlock("span",Ot,[e.renderSlot(i.$slots,"suffix",{},void 0,!0)])):e.createCommentVNode("",!0)],10,It))}}),[["__scopeId","data-v-e3e9ee4d"]]);_.MessageList=Ee,_.MuButton=A,_.MuModal=X,_.MuRadio=We,_.MuRadioGroup=Ye,_.MuSwitch=mt,_.MuTab=Nt,_.MuTabs=xt,_.MuTag=Rt,_.message=Ce,_.muModal=Ge,_.openMuModal=P,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mureka-fe/ui",
3
- "version": "1.1.6",
3
+ "version": "2.0.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/ui.umd.cjs",
@@ -1 +0,0 @@
1
- {"version":3,"file":"preset.demo.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tag/__docs__/demos/preset.demo.vue"],"names":[],"mappings":";AAuHA,wBAKG"}
@@ -1,3 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
- export default _default;
3
- //# sourceMappingURL=size.demo.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"size.demo.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tag/__docs__/demos/size.demo.vue"],"names":[],"mappings":";AAuHA,wBAKG"}