quail-ui 0.2.71 → 0.2.72

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.
@@ -9,5 +9,5 @@ Minimum version required to store current data is: `+i+`.
9
9
 
10
10
  `)}${h.value}`,host:window.location.host}),$.push(w))}return $});function p($,m){for(const w in m)$=$.replace(`{${w}}`,m[w]);return $}function k($){switch($.name){case"mastodon":S();break;case"general":s.value=!0,r.value=decodeURIComponent(h.value),s1.toDataURL(r.value,{width:400,margin:1},(m,w)=>{if(m){console.error(m);return}o.value=w});break;default:window.open($.url,"_blank")}}function x(){j7(r.value),s.value=!1}function S($){i.value=!0;const m=localStorage.getItem("quailui_global_mastodon_host")||"";l.value=m,setTimeout(()=>{var w,E;(w=c.value)==null||w.focus(),(E=c.value)==null||E.select()},300)}function u(){const $=p(n.mastodon.url_template,{host:l.value,text:f.value,textWithUrl:`${f.value}${encodeURIComponent(`
11
11
 
12
- `)}${h.value}`});localStorage.setItem("quailui_global_mastodon_host",l.value),window.open($,"_blank"),i.value=!1}return($,m)=>{const w=e.resolveComponent("q-icon-color-mastodon"),E=e.resolveComponent("q-icon-arrow-right"),N=e.resolveComponent("q-button"),T=e.resolveComponent("q-dialog"),q=e.resolveComponent("q-icon-copy");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["q-share",d.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,D=>(e.openBlock(),e.createElementBlock("a",{key:`serv-${D.name}`,title:D.tooltip,class:e.normalizeClass(["q-share-link",D.name]),onClick:H=>k(D)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D.icon),{class:"icon share-icon"}))],10,N5))),128)),e.createVNode(T,{modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=D=>i.value=D),title:"Share to Mastodon"},{default:e.withCtx(()=>[e.createElementVNode("div",b5,[e.createVNode(w,{class:"service-icon"}),e.withDirectives(e.createElementVNode("input",{class:"text-field","onUpdate:modelValue":m[0]||(m[0]=D=>l.value=D),placeholder:"Instance Domain",ref_key:"mastodonHostInput",ref:c},null,512),[[e.vModelText,l.value]]),e.createVNode(N,{class:"primary icon ml-2",onClick:u},{default:e.withCtx(()=>[e.createVNode(E)]),_:1})])]),_:1},8,["modelValue"]),e.createVNode(T,{modelValue:s.value,"onUpdate:modelValue":m[2]||(m[2]=D=>s.value=D),title:"Share to ..."},{default:e.withCtx(()=>[e.createElementVNode("div",S5,[e.createElementVNode("div",H5,[e.createElementVNode("img",{src:o.value,alt:"QR Code",class:"frame shadow"},null,8,Q5)]),e.createElementVNode("div",D5,[e.createElementVNode("div",T5,[e.createVNode(N,{class:"outlined block",onClick:x},{default:e.withCtx(()=>[e.createVNode(q,{class:"icon"}),A5]),_:1})])])])]),_:1},8,["modelValue"])],2)}}}),W8="",q5=["src","alt"],le="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU2IiBoZWlnaHQ9IjI1NiIgdmlld0JveD0iMCAwIDI1NiAyNTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHNjcmlwdCB4bWxucz0iIi8+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8yMF8yKSI+CjxyZWN0IHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiBmaWxsPSIjRjJGMkYyIiBmaWxsLW9wYWNpdHk9IjAuNSIvPgo8Y2lyY2xlIGN4PSIxMjgiIGN5PSIxMjgiIHI9IjY0IiBmaWxsPSIjRDlEOUQ5IiBmaWxsLW9wYWNpdHk9IjAuNiIvPgo8Y2lyY2xlIGN4PSIxMjgiIGN5PSIyNzIiIHI9IjgwIiBmaWxsPSIjRDlEOUQ5IiBmaWxsLW9wYWNpdHk9IjAuNiIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzIwXzIiPgo8cmVjdCB3aWR0aD0iMjU2IiBoZWlnaHQ9IjI1NiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4=",j5=e.defineComponent({__name:"QAvatar",props:{src:{type:String,default:""},alt:{type:String,default:"An Avatar"},size:{type:Number,default:32},variant:{type:String,default:"circle"},borderType:{type:String,default:"none"},borderColor:{type:String,default:"#000"}},setup(t){const n=t,s=e.computed(()=>n.src||le),r=e.computed(()=>{const l=[];return n.variant==="circle"?l.push("circle"):n.variant==="rounded"?l.push("rounded"):n.variant==="square"&&l.push("square"),n.borderType==="solid"?l.push("border-solid"):n.borderType==="hollow"&&l.push("border-hollow"),l.join(" ")}),o=e.computed(()=>{const l={width:`${n.size}px`,height:`${n.size}px`,"max-width":`${n.size}px`,"max-height":`${n.size}px`};return n.borderType==="hollow"&&(l["border-color"]=n.borderColor),l});function i(l){const c=l.target;c.src=le}return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["q-avatar",r.value]),style:e.normalizeStyle(o.value)},[n.src===""?e.renderSlot(l.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("img",{key:1,src:s.value,alt:t.alt,onError:i},null,40,q5))],6))}}),G8="",Z5={class:"q-dropdown-menu-with-text-field"},F5={class:"q-dropdown-menu-with-text-field-top"},U5={class:"q-dropdown-menu-wrapper"},z5={class:"q-text-field-wrapper"},R5=["placeholder"],v5={key:0,class:"q-dropdown-menu-with-text-field-bottom"},O5=["textContent"],Y5={class:"text-xs text-hint"},W5=["textContent"],G5=e.defineComponent({__name:"QDropdownMenuWithTextField",props:{items:{type:Array,required:!0},placeholder:{default:"Type here"},defaultSelection:{type:Object},defaultText:{default:""},fillActionLabel:{default:""},fillActionValue:{default:""},hintText:{default:""},textDisabled:{default:!1},selectDisabled:{default:!1}},emits:["change"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.defaultText),i=e.ref(s.defaultSelection),l=e.ref(null),c=e.computed(()=>s.fillActionLabel!==""||s.hintText!=="");function a(C){i.value=C,h()}function d(){h()}function h(){const C={selected:i.value,text:o.value};r("change",C)}function f(){o.value=s.fillActionValue,h()}return e.onMounted(()=>{k1(()=>{i.value=s.defaultSelection,o.value=s.defaultText,(i.value===null||i.value===void 0)&&(i.value=s.items[0]),l.value.addEventListener("focus",()=>{l.value.select()})},300)()}),(C,p)=>{const k=e.resolveComponent("q-dropdown-menu");return e.openBlock(),e.createElementBlock("div",Z5,[e.createElementVNode("div",F5,[e.createElementVNode("div",U5,[e.createVNode(k,{items:t.items,"initial-item":i.value,"use-dialog":"always","use-filter":"","scroll-height":"400px",variant:"plain",onChange:a},null,8,["items","initial-item"])]),e.createElementVNode("div",z5,[e.withDirectives(e.createElementVNode("input",{ref_key:"textField",ref:l,class:"q-text-field text-field",placeholder:s.placeholder,"onUpdate:modelValue":p[0]||(p[0]=x=>o.value=x),onChange:d},null,40,R5),[[e.vModelText,o.value]])])]),c.value?(e.openBlock(),e.createElementBlock("div",v5,[e.createElementVNode("div",{class:"fill-action text-xs plain flex",onClick:f},[e.createElementVNode("span",{textContent:e.toDisplayString(s.fillActionLabel)},null,8,O5),e.createVNode(T1,{class:"icon"})]),e.createElementVNode("div",Y5,[e.createElementVNode("span",{textContent:e.toDisplayString(s.hintText)},null,8,W5)])])):e.createCommentVNode("",!0)])}}}),K8="",K5=_(G5,[["__scopeId","data-v-abade42e"]]),J5=t=>(e.pushScopeId("data-v-239de42a"),t=t(),e.popScopeId(),t),X5=["disabled"],e3={key:0,class:"ocean"},t3=[J5(()=>e.createElementVNode("div",{class:"wave"},null,-1))],o3=e.defineComponent({__name:"QButton",props:{class:{type:String,default:"primary"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(t){const n=t,s=e.computed(()=>{const o=["q-button touchable"];return o.push(n.class),n.loading&&o.push("loading"),o.join(" ")}),r=e.computed(()=>!n.disabled);return(o,i)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(s.value),disabled:!r.value},[n.loading?(e.openBlock(),e.createElementBlock("div",e3,t3)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],10,X5))}}),X8="",n3=_(o3,[["__scopeId","data-v-239de42a"]]),s3={class:"q-tabs"},r3={class:"q-tab-button-label"},i3=e.defineComponent({__name:"QTabs",props:{modelValue:Object,tabs:{type:Array,required:!0},initialIndex:{type:Number,default:0}},emits:["change","update:modelValue"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.tabs[s.initialIndex]),i=e.ref(s.initialIndex);e.watch(()=>s.modelValue,a=>{i.value=s.tabs.findIndex(d=>d.id===a.id),o.value=a||s.tabs[0]});function l(a,d){i.value=a,o.value=d,r("change",{index:a,tab:d}),r("update:modelValue",d)}function c(a,d){const h=[];return i.value===d?h.push("selected outlined"):h.push("plain"),a.icon&&h.push("with-icon"),a.title&&h.push("with-label"),h.join(" ")}return(a,d)=>{const h=e.resolveComponent("QButton");return e.openBlock(),e.createElementBlock("div",s3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,(f,C)=>(e.openBlock(),e.createBlock(h,{class:e.normalizeClass(["q-tab-button sm",c(f,C)]),key:`tab-button-${C}`,onClick:p=>l(C,f)},{default:e.withCtx(()=>[f.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.icon),{key:0,class:"q-tab-button-icon"})):e.createCommentVNode("",!0),e.createElementVNode("div",r3,e.toDisplayString(f.title),1)]),_:2},1032,["class","onClick"]))),128))])}}}),ec="",c3=_(i3,[["__scopeId","data-v-c10a45b7"]]),l3={class:"q-input-prepend-out"},a3={class:"q-text-field-wrapper"},d3={class:"q-text-field-inner"},h3={class:"q-input-prepend"},_3=["placeholder","disabled"],p3={class:"q-input-append"},C3={key:0,class:"q-text-field-hint"},u3={class:"q-text-field-hint-left"},f3={key:1,class:"q-text-field-hint-text"},m3={key:0,class:"q-text-field-counter"},g3={class:"q-input-append-out"},$3=e.defineComponent({__name:"QInput",props:{modelValue:{type:String,default:""},placeholder:{default:"Type here"},defaultText:{default:""},disabled:{default:!1},hintIcon:{type:Object,default:null},hintText:{default:""},error:{default:!1},max:{type:Number,default:-1}},emits:["change","blur","focus","keyup","update:modelValue"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.defaultText),i=e.ref(null);e.watch(()=>s.modelValue,p=>{o.value=p});const l=e.computed(()=>s.max===-1?!1:o.value.length>s.max),c=e.computed(()=>s.hintIcon||s.hintText||s.max!==-1||s.error),a=e.computed(()=>{const p=[];return s.disabled&&p.push("disabled"),s.error&&p.push("error"),l.value&&p.push("exceed"),o.value===""&&p.push("empty"),p.join(" ")});function d(p){C(),r("keyup",p)}function h(){C(),r("change",o.value)}function f(){o.value="",C(),i.value.focus(),r("change",o.value)}function C(){r("update:modelValue",o.value)}return e.onMounted(()=>{}),(p,k)=>{const x=e.resolveComponent("QIconEditorDelete"),S=e.resolveComponent("QButton");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["q-input",a.value])},[e.createElementVNode("div",l3,[e.renderSlot(p.$slots,"prepend-out",{},void 0,!0)]),e.createElementVNode("div",a3,[e.createElementVNode("div",d3,[e.createElementVNode("div",h3,[e.renderSlot(p.$slots,"prepend",{},void 0,!0)]),e.withDirectives(e.createElementVNode("input",{ref_key:"textField",ref:i,class:"q-text-field text-field",placeholder:s.placeholder,disabled:s.disabled,"onUpdate:modelValue":k[0]||(k[0]=u=>o.value=u),onChange:h,onKeyup:d,onFocus:k[1]||(k[1]=()=>r("focus")),onBlur:k[2]||(k[2]=()=>r("blur"))},null,40,_3),[[e.vModelText,o.value]]),e.createVNode(S,{class:"clear-btn plain icon",onClick:f},{default:e.withCtx(()=>[e.createVNode(x,{class:"icon"})]),_:1}),e.createElementVNode("div",p3,[e.renderSlot(p.$slots,"append",{},void 0,!0)])]),c.value?(e.openBlock(),e.createElementBlock("div",C3,[e.createElementVNode("div",u3,[t.hintIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.hintIcon),{key:0,class:"q-text-field-hint-icon"})):e.createCommentVNode("",!0),t.hintText?(e.openBlock(),e.createElementBlock("div",f3,e.toDisplayString(t.hintText),1)):e.createCommentVNode("",!0)]),t.max!==-1?(e.openBlock(),e.createElementBlock("div",m3,e.toDisplayString(o.value.length)+" / "+e.toDisplayString(t.max),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",g3,[e.renderSlot(p.$slots,"append-out",{},void 0,!0)])],2)}}}),tc="",w3=_($3,[["__scopeId","data-v-8cb7d55e"]]),k3={class:"q-search-input"},B3={key:0,class:"result"},M3=e.defineComponent({__name:"QSearchInput",props:{modelValue:{type:String,default:""},placeholder:{default:"Type here"},defaultText:{default:""},disabled:{default:!1},items:{type:Array,default:()=>[]}},emits:["change","blur","focus","keyup","select","update:modelValue"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.defaultText),i=e.ref(!1);e.watch(()=>s.modelValue,h=>{o.value=h}),e.watch(()=>o.value,h=>{o.value===""&&(i.value=!1)}),e.watch(()=>s.items,h=>{i.value=h.length>0&&o.value!==""});const l=e.computed(()=>s.items.map(h=>({title:h.title,subtitle:h.subtitle,action:()=>{r("select",h),i.value=!1}})));function c(h){d(),r("keyup",h)}function a(){d(),r("change",o.value)}function d(){r("update:modelValue",o.value)}return e.onMounted(()=>{}),(h,f)=>{const C=e.resolveComponent("QInput"),p=e.resolveComponent("QMenu");return e.openBlock(),e.createElementBlock("div",k3,[e.createVNode(C,{modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=k=>o.value=k),type:"text",placeholder:t.placeholder,disabled:t.disabled,onKeyup:c,onChange:a},null,8,["modelValue","placeholder","disabled"]),t.items&&i.value?(e.openBlock(),e.createElementBlock("div",B3,[e.createVNode(p,{items:l.value},null,8,["items"])])):e.createCommentVNode("",!0)])}}}),oc="",x3=_(M3,[["__scopeId","data-v-2bc84f25"]]),y3=e.defineComponent({__name:"QToggleButton",props:{modelValue:{type:Boolean,default:!1},class:{type:String,default:"outlined"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.modelValue);e.watch(()=>s.modelValue,c=>{o.value=c});const i=e.computed(()=>{const c=["q-button touchable outlined"];return c.push(s.class),s.loading&&c.push("loading"),o.value?c.push("toggle-on"):c.push("toggle-off"),c.join(" ")});function l(){o.value=!o.value,r("update:modelValue",o.value)}return(c,a)=>{const d=e.resolveComponent("QButton");return e.openBlock(),e.createBlock(d,{class:e.normalizeClass(i.value),disabled:t.disabled,loading:t.loading,onClick:l},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["class","disabled","loading"])}}}),V3=["rows","placeholder","disabled"],E3={key:0,class:"q-textarea-hint"},I3={class:"q-textarea-hint-left"},L3={key:1,class:"q-textarea-hint-text text-xs"},N3={key:0,class:"q-textarea-counter text-xs"},b3=e.defineComponent({__name:"QTextarea",props:{modelValue:{type:String,default:""},placeholder:{default:"Type here"},defaultText:{default:""},hintIcon:{type:Object,default:null},hintText:{default:""},disabled:{default:!1},rows:{type:Number,default:5},error:{default:!1},max:{type:Number,default:-1}},emits:["change","blur","focus","keyup","update:modelValue"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.defaultText);e.watch(()=>s.modelValue,f=>{o.value=f});const i=e.computed(()=>s.max===-1?!1:o.value.length>s.max),l=e.computed(()=>s.hintIcon||s.hintText||s.max!==-1),c=e.computed(()=>{const f=[];return s.disabled&&f.push("disabled"),s.error&&f.push("error"),i.value&&f.push("exceed"),f.join(" ")});function a(f){h(),r("keyup",f)}function d(){h(),r("change",o.value)}function h(){r("update:modelValue",o.value)}return e.onMounted(()=>{}),(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["q-textarea",c.value])},[e.withDirectives(e.createElementVNode("textarea",{class:"textarea","onUpdate:modelValue":C[0]||(C[0]=p=>o.value=p),onChange:d,onKeyup:a,rows:t.rows,placeholder:s.placeholder,disabled:t.disabled},null,40,V3),[[e.vModelText,o.value]]),l.value?(e.openBlock(),e.createElementBlock("div",E3,[e.createElementVNode("div",I3,[t.hintIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.hintIcon),{key:0,class:"q-textarea-hint-icon"})):e.createCommentVNode("",!0),t.hintText?(e.openBlock(),e.createElementBlock("div",L3,e.toDisplayString(t.hintText),1)):e.createCommentVNode("",!0)]),t.max!==-1?(e.openBlock(),e.createElementBlock("div",N3,e.toDisplayString(o.value.length)+" / "+e.toDisplayString(t.max),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),nc="",ae=Object.freeze(Object.defineProperty({__proto__:null,QAvatar:j5,QButton:n3,QDatetimePicker:Hr,QDialog:qr,QDropdownMenu:M7,QDropdownMenuWithTextField:K5,QFence:zr,QInput:w3,QLanguageSelector:S7,QLoading:Wr,QMenu:n7,QPackCover:q7,QPagination:I7,QProgress:b7,QSearchInput:x3,QShare:P5,QSwitch:c7,QTabs:c3,QTextFieldWithButton:_7,QTextarea:_(b3,[["__scopeId","data-v-0bce62e2"]]),QToggleButton:y3},Symbol.toStringTag,{value:"Module"})),rc="",de={install(t,n){n!=null&&n.debug&&console.log("options",n);for(const[s,r]of Object.entries(q1))n!=null&&n.debug&&console.log("[quail-ui] register icon component",s,r),t.component(s,r);for(const[s,r]of Object.entries(ae))n!=null&&n.debug&&console.log("[quail-ui] register common component",s,r),t.component(s,r);document.body.addEventListener("click",s=>{Z1()})}};R.Common=ae,R.Icons=q1,R.QuailUI=de,R.default=de,Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
12
+ `)}${h.value}`});localStorage.setItem("quailui_global_mastodon_host",l.value),window.open($,"_blank"),i.value=!1}return($,m)=>{const w=e.resolveComponent("q-icon-color-mastodon"),E=e.resolveComponent("q-icon-arrow-right"),N=e.resolveComponent("q-button"),T=e.resolveComponent("q-dialog"),q=e.resolveComponent("q-icon-copy");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["q-share",d.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,D=>(e.openBlock(),e.createElementBlock("a",{key:`serv-${D.name}`,title:D.tooltip,class:e.normalizeClass(["q-share-link",D.name]),onClick:H=>k(D)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D.icon),{class:"icon share-icon"}))],10,N5))),128)),e.createVNode(T,{modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=D=>i.value=D),title:"Share to Mastodon"},{default:e.withCtx(()=>[e.createElementVNode("div",b5,[e.createVNode(w,{class:"service-icon"}),e.withDirectives(e.createElementVNode("input",{class:"text-field","onUpdate:modelValue":m[0]||(m[0]=D=>l.value=D),placeholder:"Instance Domain",ref_key:"mastodonHostInput",ref:c},null,512),[[e.vModelText,l.value]]),e.createVNode(N,{class:"primary icon ml-2",onClick:u},{default:e.withCtx(()=>[e.createVNode(E)]),_:1})])]),_:1},8,["modelValue"]),e.createVNode(T,{modelValue:s.value,"onUpdate:modelValue":m[2]||(m[2]=D=>s.value=D),title:"Share to ..."},{default:e.withCtx(()=>[e.createElementVNode("div",S5,[e.createElementVNode("div",H5,[e.createElementVNode("img",{src:o.value,alt:"QR Code",class:"frame shadow"},null,8,Q5)]),e.createElementVNode("div",D5,[e.createElementVNode("div",T5,[e.createVNode(N,{class:"outlined block",onClick:x},{default:e.withCtx(()=>[e.createVNode(q,{class:"icon"}),A5]),_:1})])])])]),_:1},8,["modelValue"])],2)}}}),W8="",q5=["src","alt"],le="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU2IiBoZWlnaHQ9IjI1NiIgdmlld0JveD0iMCAwIDI1NiAyNTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHNjcmlwdCB4bWxucz0iIi8+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8yMF8yKSI+CjxyZWN0IHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiBmaWxsPSIjRjJGMkYyIiBmaWxsLW9wYWNpdHk9IjAuNSIvPgo8Y2lyY2xlIGN4PSIxMjgiIGN5PSIxMjgiIHI9IjY0IiBmaWxsPSIjRDlEOUQ5IiBmaWxsLW9wYWNpdHk9IjAuNiIvPgo8Y2lyY2xlIGN4PSIxMjgiIGN5PSIyNzIiIHI9IjgwIiBmaWxsPSIjRDlEOUQ5IiBmaWxsLW9wYWNpdHk9IjAuNiIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzIwXzIiPgo8cmVjdCB3aWR0aD0iMjU2IiBoZWlnaHQ9IjI1NiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4=",j5=e.defineComponent({__name:"QAvatar",props:{src:{type:String,default:""},alt:{type:String,default:"An Avatar"},size:{type:Number,default:32},variant:{type:String,default:"circle"},borderType:{type:String,default:"none"},borderColor:{type:String,default:"#000"}},setup(t){const n=t,s=e.computed(()=>n.src||le),r=e.computed(()=>{const l=[];return n.variant==="circle"?l.push("circle"):n.variant==="rounded"?l.push("rounded"):n.variant==="square"&&l.push("square"),n.borderType==="solid"?l.push("border-solid"):n.borderType==="hollow"&&l.push("border-hollow"),l.join(" ")}),o=e.computed(()=>{const l={width:`${n.size}px`,height:`${n.size}px`,"max-width":`${n.size}px`,"max-height":`${n.size}px`};return n.borderType==="hollow"&&(l["border-color"]=n.borderColor),l});function i(l){const c=l.target;c.src=le}return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["q-avatar",r.value]),style:e.normalizeStyle(o.value)},[n.src===""?e.renderSlot(l.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("img",{key:1,src:s.value,alt:t.alt,onError:i},null,40,q5))],6))}}),G8="",Z5={class:"q-dropdown-menu-with-text-field"},F5={class:"q-dropdown-menu-with-text-field-top"},U5={class:"q-dropdown-menu-wrapper"},z5={class:"q-text-field-wrapper"},R5=["placeholder"],v5={key:0,class:"q-dropdown-menu-with-text-field-bottom"},O5=["textContent"],Y5={class:"text-xs text-hint"},W5=["textContent"],G5=e.defineComponent({__name:"QDropdownMenuWithTextField",props:{items:{type:Array,required:!0},placeholder:{default:"Type here"},defaultSelection:{type:Object},defaultText:{default:""},fillActionLabel:{default:""},fillActionValue:{default:""},hintText:{default:""},textDisabled:{default:!1},selectDisabled:{default:!1}},emits:["change"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.defaultText),i=e.ref(s.defaultSelection),l=e.ref(null),c=e.computed(()=>s.fillActionLabel!==""||s.hintText!=="");function a(C){i.value=C,h()}function d(){h()}function h(){const C={selected:i.value,text:o.value};r("change",C)}function f(){o.value=s.fillActionValue,h()}return e.onMounted(()=>{k1(()=>{i.value=s.defaultSelection,o.value=s.defaultText,(i.value===null||i.value===void 0)&&(i.value=s.items[0]),l.value.addEventListener("focus",()=>{l.value.select()})},300)()}),(C,p)=>{const k=e.resolveComponent("q-dropdown-menu");return e.openBlock(),e.createElementBlock("div",Z5,[e.createElementVNode("div",F5,[e.createElementVNode("div",U5,[e.createVNode(k,{items:t.items,"initial-item":i.value,"use-dialog":"always","use-filter":"","scroll-height":"400px",variant:"plain",onChange:a},null,8,["items","initial-item"])]),e.createElementVNode("div",z5,[e.withDirectives(e.createElementVNode("input",{ref_key:"textField",ref:l,class:"q-text-field text-field",placeholder:s.placeholder,"onUpdate:modelValue":p[0]||(p[0]=x=>o.value=x),onChange:d},null,40,R5),[[e.vModelText,o.value]])])]),c.value?(e.openBlock(),e.createElementBlock("div",v5,[e.createElementVNode("div",{class:"fill-action text-xs plain flex",onClick:f},[e.createElementVNode("span",{textContent:e.toDisplayString(s.fillActionLabel)},null,8,O5),e.createVNode(T1,{class:"icon"})]),e.createElementVNode("div",Y5,[e.createElementVNode("span",{textContent:e.toDisplayString(s.hintText)},null,8,W5)])])):e.createCommentVNode("",!0)])}}}),K8="",K5=_(G5,[["__scopeId","data-v-abade42e"]]),J5=t=>(e.pushScopeId("data-v-239de42a"),t=t(),e.popScopeId(),t),X5=["disabled"],e3={key:0,class:"ocean"},t3=[J5(()=>e.createElementVNode("div",{class:"wave"},null,-1))],o3=e.defineComponent({__name:"QButton",props:{class:{type:String,default:"primary"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(t){const n=t,s=e.computed(()=>{const o=["q-button touchable"];return o.push(n.class),n.loading&&o.push("loading"),o.join(" ")}),r=e.computed(()=>!n.disabled);return(o,i)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(s.value),disabled:!r.value},[n.loading?(e.openBlock(),e.createElementBlock("div",e3,t3)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],10,X5))}}),X8="",n3=_(o3,[["__scopeId","data-v-239de42a"]]),s3={class:"q-tabs"},r3={class:"q-tab-button-label"},i3=e.defineComponent({__name:"QTabs",props:{modelValue:Object,tabs:{type:Array,required:!0},initialIndex:{type:Number,default:0}},emits:["change","update:modelValue"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.tabs[s.initialIndex]),i=e.ref(s.initialIndex);e.watch(()=>s.modelValue,a=>{i.value=s.tabs.findIndex(d=>d.id===a.id),o.value=a||s.tabs[0]});function l(a,d){i.value=a,o.value=d,r("change",{index:a,tab:d}),r("update:modelValue",d)}function c(a,d){const h=[];return i.value===d?h.push("selected outlined"):h.push("plain"),a.icon&&h.push("with-icon"),a.title&&h.push("with-label"),h.join(" ")}return(a,d)=>{const h=e.resolveComponent("QButton");return e.openBlock(),e.createElementBlock("div",s3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,(f,C)=>(e.openBlock(),e.createBlock(h,{class:e.normalizeClass(["q-tab-button sm",c(f,C)]),key:`tab-button-${C}`,onClick:p=>l(C,f)},{default:e.withCtx(()=>[f.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.icon),{key:0,class:"q-tab-button-icon"})):e.createCommentVNode("",!0),e.createElementVNode("div",r3,e.toDisplayString(f.title),1)]),_:2},1032,["class","onClick"]))),128))])}}}),ec="",c3=_(i3,[["__scopeId","data-v-c10a45b7"]]),l3={class:"q-input-prepend-out"},a3={class:"q-text-field-wrapper"},d3={class:"q-text-field-inner"},h3={class:"q-input-prepend"},_3=["placeholder","disabled"],p3={class:"q-input-append"},C3={key:0,class:"q-text-field-hint"},u3={class:"q-text-field-hint-left"},f3={key:1,class:"q-text-field-hint-text"},m3={key:0,class:"q-text-field-counter"},g3={class:"q-input-append-out"},$3=e.defineComponent({__name:"QInput",props:{modelValue:{type:String,default:""},placeholder:{default:"Type here"},defaultText:{default:""},disabled:{default:!1},hintIcon:{type:Object,default:null},hintText:{default:""},error:{default:!1},max:{type:Number,default:-1}},emits:["change","blur","focus","keyup","update:modelValue"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.defaultText),i=e.ref(null);e.watch(()=>s.modelValue,p=>{o.value=p});const l=e.computed(()=>s.max===-1?!1:o.value.length>s.max),c=e.computed(()=>s.hintIcon||s.hintText||s.max!==-1||s.error),a=e.computed(()=>{const p=[];return s.disabled&&p.push("disabled"),s.error&&p.push("error"),l.value&&p.push("exceed"),o.value===""&&p.push("empty"),p.join(" ")});function d(p){C(),r("keyup",p)}function h(){C(),r("change",o.value)}function f(){o.value="",C(),i.value.focus(),r("change",o.value)}function C(){r("update:modelValue",o.value)}return e.onMounted(()=>{}),(p,k)=>{const x=e.resolveComponent("QIconEditorDelete"),S=e.resolveComponent("QButton");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["q-input",a.value])},[e.createElementVNode("div",l3,[e.renderSlot(p.$slots,"prepend-out",{},void 0,!0)]),e.createElementVNode("div",a3,[e.createElementVNode("div",d3,[e.createElementVNode("div",h3,[e.renderSlot(p.$slots,"prepend",{},void 0,!0)]),e.withDirectives(e.createElementVNode("input",{ref_key:"textField",ref:i,class:"q-text-field text-field",placeholder:s.placeholder,disabled:s.disabled,"onUpdate:modelValue":k[0]||(k[0]=u=>o.value=u),onChange:h,onKeyup:d,onFocus:k[1]||(k[1]=()=>r("focus")),onBlur:k[2]||(k[2]=()=>r("blur"))},null,40,_3),[[e.vModelText,o.value]]),e.createVNode(S,{class:"clear-btn plain icon",onClick:f},{default:e.withCtx(()=>[e.createVNode(x,{class:"icon"})]),_:1}),e.createElementVNode("div",p3,[e.renderSlot(p.$slots,"append",{},void 0,!0)])]),c.value?(e.openBlock(),e.createElementBlock("div",C3,[e.createElementVNode("div",u3,[t.hintIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.hintIcon),{key:0,class:"q-text-field-hint-icon"})):e.createCommentVNode("",!0),t.hintText?(e.openBlock(),e.createElementBlock("div",f3,e.toDisplayString(t.hintText),1)):e.createCommentVNode("",!0)]),t.max!==-1?(e.openBlock(),e.createElementBlock("div",m3,e.toDisplayString(o.value.length)+" / "+e.toDisplayString(t.max),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",g3,[e.renderSlot(p.$slots,"append-out",{},void 0,!0)])],2)}}}),tc="",w3=_($3,[["__scopeId","data-v-b1f2b641"]]),k3={class:"q-search-input"},B3={key:0,class:"result"},M3=e.defineComponent({__name:"QSearchInput",props:{modelValue:{type:String,default:""},placeholder:{default:"Type here"},defaultText:{default:""},disabled:{default:!1},items:{type:Array,default:()=>[]}},emits:["change","blur","focus","keyup","select","update:modelValue"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.defaultText),i=e.ref(!1);e.watch(()=>s.modelValue,h=>{o.value=h}),e.watch(()=>o.value,h=>{o.value===""&&(i.value=!1)}),e.watch(()=>s.items,h=>{i.value=h.length>0&&o.value!==""});const l=e.computed(()=>s.items.map(h=>({title:h.title,subtitle:h.subtitle,action:()=>{r("select",h),i.value=!1}})));function c(h){d(),r("keyup",h)}function a(){d(),r("change",o.value)}function d(){r("update:modelValue",o.value)}return e.onMounted(()=>{}),(h,f)=>{const C=e.resolveComponent("QInput"),p=e.resolveComponent("QMenu");return e.openBlock(),e.createElementBlock("div",k3,[e.createVNode(C,{modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=k=>o.value=k),type:"text",placeholder:t.placeholder,disabled:t.disabled,onKeyup:c,onChange:a},null,8,["modelValue","placeholder","disabled"]),t.items&&i.value?(e.openBlock(),e.createElementBlock("div",B3,[e.createVNode(p,{items:l.value},null,8,["items"])])):e.createCommentVNode("",!0)])}}}),oc="",x3=_(M3,[["__scopeId","data-v-2bc84f25"]]),y3=e.defineComponent({__name:"QToggleButton",props:{modelValue:{type:Boolean,default:!1},class:{type:String,default:"outlined"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.modelValue);e.watch(()=>s.modelValue,c=>{o.value=c});const i=e.computed(()=>{const c=["q-button touchable outlined"];return c.push(s.class),s.loading&&c.push("loading"),o.value?c.push("toggle-on"):c.push("toggle-off"),c.join(" ")});function l(){o.value=!o.value,r("update:modelValue",o.value)}return(c,a)=>{const d=e.resolveComponent("QButton");return e.openBlock(),e.createBlock(d,{class:e.normalizeClass(i.value),disabled:t.disabled,loading:t.loading,onClick:l},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["class","disabled","loading"])}}}),V3=["rows","placeholder","disabled"],E3={key:0,class:"q-textarea-hint"},I3={class:"q-textarea-hint-left"},L3={key:1,class:"q-textarea-hint-text text-xs"},N3={key:0,class:"q-textarea-counter text-xs"},b3=e.defineComponent({__name:"QTextarea",props:{modelValue:{type:String,default:""},placeholder:{default:"Type here"},defaultText:{default:""},hintIcon:{type:Object,default:null},hintText:{default:""},disabled:{default:!1},rows:{type:Number,default:5},error:{default:!1},max:{type:Number,default:-1}},emits:["change","blur","focus","keyup","update:modelValue"],setup(t,{emit:n}){const s=t,r=n,o=e.ref(s.defaultText);e.watch(()=>s.modelValue,f=>{o.value=f});const i=e.computed(()=>s.max===-1?!1:o.value.length>s.max),l=e.computed(()=>s.hintIcon||s.hintText||s.max!==-1),c=e.computed(()=>{const f=[];return s.disabled&&f.push("disabled"),s.error&&f.push("error"),i.value&&f.push("exceed"),f.join(" ")});function a(f){h(),r("keyup",f)}function d(){h(),r("change",o.value)}function h(){r("update:modelValue",o.value)}return e.onMounted(()=>{}),(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["q-textarea",c.value])},[e.withDirectives(e.createElementVNode("textarea",{class:"textarea","onUpdate:modelValue":C[0]||(C[0]=p=>o.value=p),onChange:d,onKeyup:a,rows:t.rows,placeholder:s.placeholder,disabled:t.disabled},null,40,V3),[[e.vModelText,o.value]]),l.value?(e.openBlock(),e.createElementBlock("div",E3,[e.createElementVNode("div",I3,[t.hintIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.hintIcon),{key:0,class:"q-textarea-hint-icon"})):e.createCommentVNode("",!0),t.hintText?(e.openBlock(),e.createElementBlock("div",L3,e.toDisplayString(t.hintText),1)):e.createCommentVNode("",!0)]),t.max!==-1?(e.openBlock(),e.createElementBlock("div",N3,e.toDisplayString(o.value.length)+" / "+e.toDisplayString(t.max),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),nc="",ae=Object.freeze(Object.defineProperty({__proto__:null,QAvatar:j5,QButton:n3,QDatetimePicker:Hr,QDialog:qr,QDropdownMenu:M7,QDropdownMenuWithTextField:K5,QFence:zr,QInput:w3,QLanguageSelector:S7,QLoading:Wr,QMenu:n7,QPackCover:q7,QPagination:I7,QProgress:b7,QSearchInput:x3,QShare:P5,QSwitch:c7,QTabs:c3,QTextFieldWithButton:_7,QTextarea:_(b3,[["__scopeId","data-v-1288a75e"]]),QToggleButton:y3},Symbol.toStringTag,{value:"Module"})),rc="",de={install(t,n){n!=null&&n.debug&&console.log("options",n);for(const[s,r]of Object.entries(q1))n!=null&&n.debug&&console.log("[quail-ui] register icon component",s,r),t.component(s,r);for(const[s,r]of Object.entries(ae))n!=null&&n.debug&&console.log("[quail-ui] register common component",s,r),t.component(s,r);document.body.addEventListener("click",s=>{Z1()})}};R.Common=ae,R.Icons=q1,R.QuailUI=de,R.default=de,Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
13
13
  //# sourceMappingURL=index.umd.cjs.map