@quidgest/ui 0.16.52 → 0.16.53
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/json/api.json +23 -31
- package/dist/ui.esm.js +5095 -5104
- package/dist/ui.js +7 -7
- package/dist/ui.min.js +26 -26
- package/dist/ui.scss +1 -1
- package/esm/components/QDialog/QDialog.d.ts +4 -13
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +71 -78
- package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -1
- package/esm/components/QDialog/QDialogProvider.vue.js +16 -17
- package/esm/components/QDialog/index.d.ts +10 -85
- package/esm/components/QDialog/index.d.ts.map +1 -1
- package/esm/components/QDialog/types.d.ts +6 -0
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.d.ts +4 -9
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +156 -158
- package/esm/components/QOverlay/index.d.ts +10 -93
- package/esm/components/QOverlay/index.d.ts.map +1 -1
- package/esm/components/QOverlay/types.d.ts +6 -0
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +14 -13
- package/esm/composables/useDialog/index.d.ts +1 -0
- package/esm/composables/useDialog/index.d.ts.map +1 -1
- package/esm/composables/useDialog/index.js +11 -11
- package/package.json +1 -1
package/dist/ui.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
!function(e,t){"object"==typeof exports&&typeof module<"u"?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e=typeof globalThis<"u"?globalThis:e||self)["Quidgest UI"]={},e.Vue)}(this,(function(e,t){"use strict"
|
|
2
2
|
var a=Object.defineProperty,n=(e,t,n)=>((e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n)
|
|
3
3
|
/*!
|
|
4
|
-
* Quidgest UI v0.16.
|
|
4
|
+
* Quidgest UI v0.16.53
|
|
5
5
|
* (c) 2025 Quidgest - Consultores de Gestão, S.A.
|
|
6
6
|
* Released under the MIT License.
|
|
7
7
|
*/
|
|
@@ -283,28 +283,28 @@ case"right":o=window.innerWidth-e.right-(t.width+n)
|
|
|
283
283
|
break
|
|
284
284
|
default:throw new Error(`[Quidgest UI] Invalid side value: ${l}`)}return o}function va(e){return function(e){return"x"===e?"y":"x"}(function(e){const t=fa(e)
|
|
285
285
|
return["left","right"].includes(t)?"x":"y"}(e))}function fa(e){const[t]=e.split("-")
|
|
286
|
-
return t}function ha(e){return e<0}function ya(e){return"string"==typeof e?document.querySelector(e):e}const ga=["id"],ka=["role"],ba=B(t.defineComponent({inheritAttrs:!1,__name:"QOverlay",props:
|
|
287
|
-
t.watch(
|
|
288
|
-
const
|
|
289
|
-
const e=
|
|
290
|
-
return{top:`${
|
|
291
|
-
function
|
|
292
|
-
if(!e||!
|
|
293
|
-
const t={placement:n.placement,width:n.width,offset:n.offset,crossOffset:n.crossOffset,arrow:n.arrow},a=pa(e,
|
|
294
|
-
|
|
295
|
-
function
|
|
296
|
-
t.nextTick((()=>null==e?void 0:e.focus()))}}function
|
|
286
|
+
return t}function ha(e){return e<0}function ya(e){return"string"==typeof e?document.querySelector(e):e}const ga=["id"],ka=["role"],ba=B(t.defineComponent({inheritAttrs:!1,__name:"QOverlay",props:{id:{},class:{},modelValue:{type:Boolean},anchor:{},appearance:{default:"regular"},arrow:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},offset:{default:8},crossOffset:{default:0},placement:{default:"right"},transition:{default:"fade"},width:{default:"auto"},centerVertically:{type:Boolean},attach:{default:"body"},inline:{type:Boolean},delay:{default:500},nonModal:{type:Boolean},scrollLock:{type:Boolean},persistent:{type:Boolean},spy:{type:Boolean},trigger:{default:"click"},focusWrap:{type:Boolean},initialFocus:{},focusWithinOnActivate:{type:Boolean,default:!1},closingFocus:{},returnFocusOnDeactivate:{type:Boolean,default:!0}},emits:["update:modelValue","enter","leave"],setup(e,{emit:a}){const n=e,l=a,{class:o}=H(),r=t.computed((()=>["q-overlay",`q-overlay--${fa(c.placement)}`,o.value,{"q-overlay--independent":i.value,"q-overlay--inverted":"inverted"===n.appearance,"q-overlay--center":n.centerVertically},n.class])),i=t.computed((()=>void 0===n.anchor)),s=t.computed((()=>n.modelValue&&!n.nonModal)),u=t.computed((()=>(n.modelValue||c.animating)&&n.scrollLock)),d=t.computed((()=>!n.inline&&(n.modelValue||c.animating))),c=t.reactive({animating:!1,top:0,left:0,width:0,placement:n.placement}),p=t.reactive({top:void 0,left:void 0,hidden:!0})
|
|
287
|
+
t.watch((()=>n.modelValue),(function(){c.animating=!0}))
|
|
288
|
+
const m=t.computed((()=>{if(i.value)return
|
|
289
|
+
const e=T(),t="anchor"===n.width?null==e?void 0:e.getBoundingClientRect().width:void 0
|
|
290
|
+
return{top:`${c.top}px`,left:`${c.left}px`,width:void 0!==t?`${t}px`:void 0}})),v=t.computed((()=>{if(n.arrow)return{top:void 0!==p.top?`${p.top}px`:void 0,left:void 0!==p.left?`${p.left}px`:void 0,opacity:p.hidden?0:1}})),f=t.ref(null),h=t.ref(null),y=t.ref(null)
|
|
291
|
+
function g(){const e=T()
|
|
292
|
+
if(!e||!y.value)return
|
|
293
|
+
const t={placement:n.placement,width:n.width,offset:n.offset,crossOffset:n.crossOffset,arrow:n.arrow},a=pa(e,y.value,(null==f?void 0:f.value)??void 0,t)
|
|
294
|
+
c.left=a.overlayCoords.x,c.top=a.overlayCoords.y,c.placement=a.placement,p.hidden=void 0===a.arrowCoords,a.arrowCoords&&(p.top=a.arrowCoords.y,p.left=a.arrowCoords.x)}let k,b,w
|
|
295
|
+
function _(){B(0)}function x(){B(n.delay)}function B(e){k&&S(),k=window.setTimeout((()=>{l("update:modelValue",!0)}),e)}function C(){if(k&&S(),l("update:modelValue",!1),n.anchor&&"click"===n.trigger){const e=T()
|
|
296
|
+
t.nextTick((()=>null==e?void 0:e.focus()))}}function S(){clearTimeout(k),k=void 0}function V(){t.nextTick(z),l("enter")}function M(){D()}function $(){l("leave")}function E(){D(),i.value||(window.removeEventListener("resize",g),n.scrollLock||window.removeEventListener("scroll",g)),n.spy&&(clearTimeout(w),w=void 0)}function D(){c.animating=!1}function T(){return n.anchor?ya(n.anchor):null}function N(e){n.persistent&&e.preventDefault()}function q(e){var t
|
|
297
297
|
if(n.persistent)return void e.preventDefault()
|
|
298
298
|
let a=!1
|
|
299
299
|
e.defaultPrevented||"pointerdown"===e.detail.originalEvent.type&&(a=!0)
|
|
300
|
-
const l=e.detail.originalEvent.target;((null==(t=
|
|
301
|
-
if(e)switch(
|
|
300
|
+
const l=e.detail.originalEvent.target;((null==(t=T())?void 0:t.contains(l))||"focusin"===e.detail.originalEvent.type&&a)&&e.preventDefault()}function P(){C()}function A(){const e=T()
|
|
301
|
+
if(e)switch(b=new MutationObserver(g),b.observe(e,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),n.trigger){case"click":e.addEventListener("click",_)
|
|
302
302
|
break
|
|
303
|
-
case"hover":e.addEventListener("mouseenter",
|
|
304
|
-
|
|
305
|
-
if(e)switch(null==
|
|
303
|
+
case"hover":e.addEventListener("mouseenter",x),e.addEventListener("mouseleave",C),e.addEventListener("focusin",_),e.addEventListener("focusout",C)}}function R(){T()?(g(),w=window.setTimeout(R,100)):C()}function z(){var e
|
|
304
|
+
i.value||(window.addEventListener("resize",g),n.scrollLock||window.addEventListener("scroll",g),n.spy?R():g()),(i.value||"click"===n.trigger)&&!n.initialFocus&&!n.focusWithinOnActivate&&(null==(e=h.value)||e.focus())}return t.watch((()=>n.placement),(()=>t.nextTick(g))),t.onMounted((()=>{t.nextTick(A)})),t.onBeforeUnmount((function(){const e=T()
|
|
305
|
+
if(e)switch(null==b||b.disconnect(),n.trigger){case"click":e.removeEventListener("click",_)
|
|
306
306
|
break
|
|
307
|
-
case"hover":e.removeEventListener("mouseenter",
|
|
307
|
+
case"hover":e.removeEventListener("mouseenter",x),e.removeEventListener("mouseleave",C),e.removeEventListener("focusin",_),e.removeEventListener("focusout",C)}})),(e,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.Teleport,{disabled:!d.value,to:n.attach},[t.createVNode(t.Transition,{name:"fade",appear:""},{default:t.withCtx((()=>[s.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([n.backdropClass,"q-overlay__underlay",{"q-overlay__underlay--blur":n.backdropBlur}]),onMousedown:a[0]||(a[0]=t.withModifiers((()=>{}),["prevent"]))},null,34)):t.createCommentVNode("",!0)])),_:1}),t.createVNode(t.Transition,{name:n.transition,appear:"",onEnter:V,onAfterEnter:M,onLeave:$,onAfterLeave:E},{default:t.withCtx((()=>[n.modelValue?(t.openBlock(),t.createElementBlock("div",{key:0,id:n.id,ref_key:"overlayContainerRef",ref:y,tabindex:"-1",class:t.normalizeClass(r.value),style:t.normalizeStyle(m.value)},[t.createVNode(t.unref(ta),{onDismiss:P,onInteractOutside:q,onPointerDownOutside:N},{default:t.withCtx((()=>[y.value?(t.openBlock(),t.createBlock(t.unref(ca),{key:0,active:!n.nonModal&&n.modelValue&&n.focusWrap,"initial-focus":n.initialFocus,"focus-within-on-activate":n.focusWithinOnActivate,"closing-focus":n.closingFocus,"return-focus-on-deactivate":n.returnFocusOnDeactivate},{default:t.withCtx((()=>[t.createElementVNode("div",t.mergeProps({ref_key:"overlayRef",ref:h,class:"q-overlay__content",tabindex:"-1",role:s.value?"dialog":void 0},e.$attrs),[n.arrow?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"arrowRef",ref:f,role:"presentation",class:"q-overlay__arrow",style:t.normalizeStyle(v.value)},null,4)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default")],16,ka)])),_:3},8,["active","initial-focus","focus-within-on-activate","closing-focus","return-focus-on-deactivate"])):t.createCommentVNode("",!0)])),_:3})],14,ga)):t.createCommentVNode("",!0)])),_:3},8,["name"])],8,["disabled","to"])),u.value?(t.openBlock(),t.createBlock(t.unref(ua),{key:0})):t.createCommentVNode("",!0)],64))}})),wa=["data-key"],_a={key:0,class:"q-select__loader"},xa={key:2,class:"q-select__loader"},Ba=B(t.defineComponent({inheritAttrs:!1,__name:"QCombobox",props:t.mergeModels({id:{},class:{},label:{},required:{type:Boolean},for:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},clearable:{type:Boolean},texts:{default:()=>Rt},itemValue:{default:"key"},itemLabel:{default:"label"},items:{},groups:{default:()=>[]},selectionMode:{default:"automatic"},filterMode:{default:"builtin"},inline:{type:Boolean},loading:{type:Boolean},emptyValue:{},icons:{default:()=>zt}},{modelValue:{},modelModifiers:{},open:{type:Boolean},openModifiers:{},search:{default:""},searchModifiers:{}}),emits:t.mergeModels(["before-show","before-hide","show","hide"],["update:modelValue","update:open","update:search"]),setup(e,{expose:a,emit:n}){const l=e,o=n,r=t.useModel(e,"modelValue"),i=t.useModel(e,"open"),s=t.useModel(e,"search"),u=t.ref(void 0),d=t.ref(null),c=t.ref(null),p=t.ref(null),m=t.ref(null),v=t.ref(null)
|
|
308
308
|
t.onMounted(x)
|
|
309
309
|
const f=t.computed((()=>l.clearable&&!l.readonly&&!l.disabled)),h=t.computed((()=>{var e
|
|
310
310
|
return"manual"!==l.filterMode&&w.value?(null==(e=l.items)?void 0:e.filter((e=>e[l.itemLabel].toLowerCase().startsWith(s.value.toLowerCase()))))??[]:l.items??[]})),y=t.computed((()=>{var e
|
|
@@ -1167,7 +1167,7 @@ return e.install=t=>{t.component("Vue3DatePicker",e)},e})()
|
|
|
1167
1167
|
Object.entries(Object.freeze(Object.defineProperty({__proto__:null,default:qs},Symbol.toStringTag,{value:"Module"}))).forEach((([e,t])=>{"default"!==e&&(qs[e]=t)}))
|
|
1168
1168
|
const Ps=t.reactive({dialogs:[]})
|
|
1169
1169
|
function As(){return{...Ps,addDialog:function(e,t,a){const n=Me(t).value
|
|
1170
|
-
return Ps.dialogs.push({id:n,props:e,options:a}),n},removeDialog:function(e){const t=Ps.dialogs.findIndex((t=>t.id===e));-1!==t&&Ps.dialogs.splice(t,1)}}}const Rs=Symbol.for("q-toast")
|
|
1170
|
+
return Ps.dialogs.push({id:n,props:{...e,modelValue:!0},options:a}),n},removeDialog:function(e){const t=Ps.dialogs.findIndex((t=>t.id===e));-1!==t&&Ps.dialogs.splice(t,1)}}}const Rs=Symbol.for("q-toast")
|
|
1171
1171
|
function zs(){const{toasts:e}=function(){const e=t.inject(Rs)
|
|
1172
1172
|
if(!e)throw new Error("useInjectedToast must be used after provideToast")
|
|
1173
1173
|
return e}()
|
|
@@ -1267,12 +1267,12 @@ if(!l)throw new Error("Input element is required")
|
|
|
1267
1267
|
n.value=new Ks(l,null==a?void 0:a.value),a&&t.watch(a,(e=>{var t
|
|
1268
1268
|
null==(t=n.value)||t.update(e)}),{deep:!0})})),t.onUnmounted((()=>{var e
|
|
1269
1269
|
null==(e=n.value)||e.destroy(),n.value=null}))}(y,h),(e,n)=>(t.openBlock(),t.createBlock(t.unref(Vt),{id:a.id,class:t.normalizeClass(["q-date-time-picker",a.class]),label:a.label,readonly:a.readonly,disabled:a.disabled,required:a.required,size:a.size,invalid:a.invalid},t.createSlots({prepend:t.withCtx((()=>[t.createVNode(t.unref(ve),t.mergeProps({class:"q-date-time-picker__input-icon"},f.value),null,16)])),default:t.withCtx((()=>[t.createVNode(t.unref(qs),{modelValue:l.value,"onUpdate:modelValue":n[0]||(n[0]=e=>l.value=e),"model-type":o.value,"min-time":m.value,"max-time":v.value,disabled:a.disabled,readonly:a.readonly,format:a.format,is24:!p.value,locale:a.locale,"enable-time-picker":u.value,"enable-seconds":d.value,"time-picker":c.value,config:r.value,teleport:!a.inline,offset:16,dark:s.value,ui:{menu:["q-date-time-picker__menu",t.unref(i).class.value]},"text-input":{enterSubmit:!0},"auto-apply":a.closeOnSelect,"hide-input-icon":"",clearable:""},{"dp-input":t.withCtx((({value:n,onInput:l,onBlur:o,onFocus:r,onKeypress:i,onPaste:s})=>[t.createElementVNode("input",t.mergeProps({ref_key:"inputRef",ref:y,"data-test-id":"dp-input",class:"dp__input",type:"text",value:n,placeholder:a.placeholder,disabled:a.disabled,readonly:a.readonly,required:a.required},e.$attrs,{onInput:l,onBlur:o,onFocus:r,onKeypress:i,onKeydown:i,onPaste:s}),null,16,cu)])),"clear-icon":t.withCtx((({clear:e})=>[t.createVNode(t.unref(Et),{texts:a.texts,onClick:e},null,8,["texts","onClick"])])),_:1},8,["modelValue","model-type","min-time","max-time","disabled","readonly","format","is24","locale","enable-time-picker","enable-seconds","time-picker","config","teleport","dark","ui","auto-apply"])])),_:2},[e.$slots.extras?{name:"extras",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"extras")])),key:"0"}:void 0]),1032,["id","class","label","readonly","disabled","required","size","invalid"]))}})),mu=B(t.defineComponent({__name:"QDefaultsProvider",props:{id:{},class:{},defaults:{}},setup(e){const a=e
|
|
1270
|
-
return c(t.toRef(a,"defaults")),(e,a)=>t.renderSlot(e.$slots,"default")}})),vu=[{id:"button",icon:{icon:"check"},props:{variant:"bold",label:"Ok"}}],fu={icon:"check-circle-outline"},hu={close:{icon:"close"}},yu={key:0,class:"q-dialog__header"},gu={key:0,class:"q-dialog__header-title"},ku={key:1,class:"q-dialog__body"},bu={key:0,class:"q-dialog__body-icon"},wu={class:"q-dialog__body-text"},_u=["innerHTML"],xu={key:1},Bu={key:0,class:"q-dialog__input"},Cu={key:2,class:"q-dialog__footer"},Su={key:0,class:"q-dialog__footer-buttons"},Vu=t.defineComponent({__name:"QDialog",props:
|
|
1271
|
-
function
|
|
1272
|
-
return[t.renderSlot(e.$slots,"body.icon",{},(()=>[n.icon?(t.openBlock(),t.createElementBlock("span",bu,[t.createVNode(t.unref(ve),t.normalizeProps(t.guardReactiveProps(n.icon)),null,16)])):t.createCommentVNode("",!0)])),t.createElementVNode("div",wu,[n.html?(t.openBlock(),t.createElementBlock("div",{key:0,innerHTML:n.text},null,8,_u)):(t.openBlock(),t.createElementBlock("div",xu,t.toDisplayString(n.text),1))]),n.input?(t.openBlock(),t.createElementBlock("div",Bu,[t.createVNode(t.unref(qt),{modelValue:
|
|
1273
|
-
if(e.action){if(null!=(a=n.input)&&a.validator&&(
|
|
1274
|
-
null==(l=e.action)||l.call(e,t.unref(
|
|
1275
|
-
return(e,a)=>(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o),(e=>(t.openBlock(),t.createBlock(t.unref($u),t.mergeProps({key:e.id,ref_for:!0},e.props,{
|
|
1270
|
+
return c(t.toRef(a,"defaults")),(e,a)=>t.renderSlot(e.$slots,"default")}})),vu=[{id:"button",icon:{icon:"check"},props:{variant:"bold",label:"Ok"}}],fu={icon:"check-circle-outline"},hu={close:{icon:"close"}},yu={key:0,class:"q-dialog__header"},gu={key:0,class:"q-dialog__header-title"},ku={key:1,class:"q-dialog__body"},bu={key:0,class:"q-dialog__body-icon"},wu={class:"q-dialog__body-text"},_u=["innerHTML"],xu={key:1},Bu={key:0,class:"q-dialog__input"},Cu={key:2,class:"q-dialog__footer"},Su={key:0,class:"q-dialog__footer-buttons"},Vu=t.defineComponent({__name:"QDialog",props:{id:{},class:{},modelValue:{type:Boolean},title:{},text:{},icon:{default:()=>fu},buttons:{default:()=>vu},backdropBlur:{type:Boolean,default:!0},size:{default:"small"},centerVertically:{type:Boolean},attach:{default:"body"},inline:{type:Boolean},focusWrap:{type:Boolean,default:!0},initialFocus:{},focusWithinOnActivate:{type:Boolean,default:!0},closingFocus:{},returnFocusOnDeactivate:{type:Boolean,default:!0},dismissible:{type:Boolean},html:{type:Boolean,default:!0},input:{},icons:{default:()=>hu}},emits:["update:modelValue"],setup(e,{emit:a}){const n=e,l=a,o=t.ref(""),r=t.ref(""),i=t.computed((()=>["q-dialog",n.class])),s=t.computed((()=>`q-overlay--${n.size}`))
|
|
1271
|
+
function u(){d(!1)}function d(e){l("update:modelValue",e)}return(e,a)=>(t.openBlock(),t.createBlock(t.unref(ba),{id:n.id,"model-value":n.modelValue,"backdrop-class":"q-dialog__underlay","scroll-lock":"",persistent:"",inline:n.inline,attach:n.attach,"backdrop-blur":n.backdropBlur,"center-vertically":n.centerVertically,"focus-wrap":n.focusWrap,"initial-focus":n.initialFocus,"focus-within-on-activate":n.focusWithinOnActivate,"closing-focus":n.closingFocus,"return-focus-on-deactivate":n.returnFocusOnDeactivate,class:t.normalizeClass(s.value),"onUpdate:modelValue":d},{default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(i.value)},[n.title||e.$slots.header||e.$slots["header.prepend"]||e.$slots["header.append"]?(t.openBlock(),t.createElementBlock("div",yu,[t.renderSlot(e.$slots,"header",{},(()=>[t.renderSlot(e.$slots,"header.prepend"),n.title?(t.openBlock(),t.createElementBlock("span",gu,t.toDisplayString(n.title),1)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"header.append")]))])):t.createCommentVNode("",!0),n.icon||n.text||e.$slots.body?(t.openBlock(),t.createElementBlock("div",ku,[t.renderSlot(e.$slots,"body",{},(()=>{var l
|
|
1272
|
+
return[t.renderSlot(e.$slots,"body.icon",{},(()=>[n.icon?(t.openBlock(),t.createElementBlock("span",bu,[t.createVNode(t.unref(ve),t.normalizeProps(t.guardReactiveProps(n.icon)),null,16)])):t.createCommentVNode("",!0)])),t.createElementVNode("div",wu,[n.html?(t.openBlock(),t.createElementBlock("div",{key:0,innerHTML:n.text},null,8,_u)):(t.openBlock(),t.createElementBlock("div",xu,t.toDisplayString(n.text),1))]),n.input?(t.openBlock(),t.createElementBlock("div",Bu,[t.createVNode(t.unref(qt),{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=e=>o.value=e),invalid:!!r.value,placeholder:null==(l=n.input)?void 0:l.placeholder,size:"block"},{extras:t.withCtx((()=>[r.value?(t.openBlock(),t.createBlock(t.unref(ve),{key:0,icon:"exclamation-sign"})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(r.value),1)])),_:1},8,["modelValue","invalid","placeholder"])])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"body.append")]}))])):t.createCommentVNode("",!0),n.buttons||e.$slots["footer.append"]?(t.openBlock(),t.createElementBlock("div",Cu,[n.buttons?(t.openBlock(),t.createElementBlock("span",Su,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.buttons,(e=>(t.openBlock(),t.createBlock(t.unref(X),t.mergeProps({ref_for:!0},e.props,{key:e.id,onClick:()=>function(e){var a,l
|
|
1273
|
+
if(e.action){if(null!=(a=n.input)&&a.validator&&(r.value=n.input.validator(t.unref(o)),t.unref(r)))return
|
|
1274
|
+
null==(l=e.action)||l.call(e,t.unref(o))}u()}(e)}),{default:t.withCtx((()=>[e.icon?(t.openBlock(),t.createBlock(t.unref(ve),t.mergeProps({key:0,ref_for:!0},e.icon),null,16)):t.createCommentVNode("",!0)])),_:2},1040,["onClick"])))),128))])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"footer.append")])):t.createCommentVNode("",!0),n.dismissible?(t.openBlock(),t.createBlock(t.unref(X),{key:3,class:"q-dialog__close",variant:"text",onClick:u},{default:t.withCtx((()=>[t.createVNode(t.unref(ve),t.normalizeProps(t.guardReactiveProps(n.icons.close)),null,16)])),_:1})):t.createCommentVNode("",!0)],2)])),_:3},8,["id","model-value","inline","attach","backdrop-blur","center-vertically","focus-wrap","initial-focus","focus-within-on-activate","closing-focus","return-focus-on-deactivate","class"]))}}),Mu=t.defineComponent({inheritAttrs:!1,__name:"QDialogProvider",props:{inline:{type:Boolean}},emits:["leave"],setup(e,{emit:a}){const n=e,l=a,{dialogs:o,removeDialog:r}=As()
|
|
1275
|
+
return(e,a)=>(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o),(e=>(t.openBlock(),t.createBlock(t.unref($u),t.mergeProps({key:e.id,ref_for:!0},e.props,{inline:n.inline,"onUpdate:modelValue":t=>function(e,t){t||(r(e),l("leave",e))}(e.id,t)}),null,16,["inline","onUpdate:modelValue"])))),128))}}),$u=B(Vu),Eu=B(Mu),Du=["id"],Tu={class:"q-divider__label"},Nu=B(t.defineComponent({__name:"QDivider",props:{id:{},class:{},direction:{default:"horizontal"},inset:{type:Boolean},thickness:{default:1},color:{default:"neutral"}},setup(e){const a=e,n=t.computed((()=>!!t.useSlots().default)),l=t.computed((()=>["q-divider",`q-divider--${a.direction}`,{"q-divider--inset":a.inset,"q-divider--labeled":n.value},a.class])),{isUtilityColor:o,style:r}=U(t.toRef(a,"color")),i=t.computed((()=>{var e
|
|
1276
1276
|
const t={}
|
|
1277
1277
|
return a.thickness>=0&&1!==a.thickness&&(t["--q-divider-thickness"]=`${a.thickness}px`),"neutral"!==a.color&&(t["--q-divider-color"]=o.value?`var(--q-theme-${a.color})`:null==(e=r.value)?void 0:e.mainColor),t}))
|
|
1278
1278
|
return(e,o)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(l.value),style:t.normalizeStyle(i.value),role:"separator"},[n.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o[0]||(o[0]=t.createElementVNode("div",{class:"q-divider__line"},null,-1)),t.createElementVNode("span",Tu,[t.renderSlot(e.$slots,"default")]),o[1]||(o[1]=t.createElementVNode("div",{class:"q-divider__line"},null,-1))],64)):t.createCommentVNode("",!0)],14,Du))}})),qu={expand:{icon:"chevron-right"}},Pu={key:0,class:"q-dropdown-menu__extra"},Au=t.defineComponent({__name:"QDropdownMenuContent",props:t.mergeModels({id:{},class:{},activator:{},itemValue:{default:"key"},itemLabel:{default:"label"},items:{},groups:{default:()=>[]},appearance:{default:"regular"},placement:{default:"bottom-start"},transition:{default:"fade"},inline:{type:Boolean},delay:{default:500},trigger:{default:"hover"},depth:{default:0},icons:{default:()=>qu},offset:{default:0},crossOffset:{default:-5}},{modelValue:{type:Boolean},modelModifiers:{},highlighted:{},highlightedModifiers:{}}),emits:t.mergeModels(["select","open","hide","focus-previous"],["update:modelValue","update:highlighted"]),setup(e,{emit:a}){const n=e,l=a,o=t.useModel(e,"modelValue"),r=t.useModel(e,"highlighted"),i=t.ref(void 0),s=t.ref([]),u=t.computed((()=>0!==n.depth?n.offset:4)),d=t.computed((()=>0!==n.depth?n.crossOffset:void 0)),c=t.useTemplateRef("qListRef")
|
|
@@ -1341,7 +1341,7 @@ return(e,l)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normaliz
|
|
|
1341
1341
|
return{width:`${Math.max(0,Math.min(l.value,100))}%`,backgroundColor:null==(e=o.value)?void 0:e.mainColor}})),i=t.computed((()=>{var e
|
|
1342
1342
|
return"string"==typeof a.valueLabel?a.valueLabel:null==(e=a.valueLabel)?void 0:e.call(a,n.value,a.max)}))
|
|
1343
1343
|
return(e,n)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(["q-meter",a.class])},[t.createElementVNode("div",kd,[t.createVNode(t.unref(ht),{label:a.label},null,8,["label"]),t.createVNode(t.unref(ht),{label:i.value,class:"q-meter__value-label"},null,8,["label"])]),t.createElementVNode("div",bd,[t.createElementVNode("div",{class:"q-meter__fill",style:t.normalizeStyle(r.value)},null,4)])],10,gd))}})),_d={show:{icon:"eye"},hide:{icon:"eye-off"}},xd={class:"q-password-field__messages"},Bd=t.defineComponent({__name:"QPasswordFieldMessages",props:{messages:{}},setup(e){const a=e
|
|
1344
|
-
return(e,n)=>(t.openBlock(),t.createElementBlock("ul",xd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.messages,(e=>(t.openBlock(),t.createElementBlock("li",{key:e},t.toDisplayString(e),1)))),128))]))}}),Cd={class:"q-password-field__meter"},Sd={key:0,class:"q-password-field__meter-score"},Vd=t.defineComponent({inheritAttrs:!1,__name:"QPasswordFieldMeterOverlay",props:t.mergeModels({id:{},class:{},anchor:{},appearance:{},arrow:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},offset:{},crossOffset:{},placement:{},transition:{},width:{},centerVertically:{type:Boolean},attach:{},inline:{type:Boolean},delay:{},nonModal:{type:Boolean},scrollLock:{type:Boolean},persistent:{type:Boolean},spy:{type:Boolean},trigger:{},focusWrap:{type:Boolean},initialFocus:{},focusWithinOnActivate:{type:Boolean},closingFocus:{},returnFocusOnDeactivate:{type:Boolean},messages:{},score:{},levels:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),l=t.computed((()=>{if(!a.levels.length)return void console.warn("Levels array is empty.")
|
|
1344
|
+
return(e,n)=>(t.openBlock(),t.createElementBlock("ul",xd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.messages,(e=>(t.openBlock(),t.createElementBlock("li",{key:e},t.toDisplayString(e),1)))),128))]))}}),Cd={class:"q-password-field__meter"},Sd={key:0,class:"q-password-field__meter-score"},Vd=t.defineComponent({inheritAttrs:!1,__name:"QPasswordFieldMeterOverlay",props:t.mergeModels({id:{},class:{},modelValue:{type:Boolean},anchor:{},appearance:{},arrow:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},offset:{},crossOffset:{},placement:{},transition:{},width:{},centerVertically:{type:Boolean},attach:{},inline:{type:Boolean},delay:{},nonModal:{type:Boolean},scrollLock:{type:Boolean},persistent:{type:Boolean},spy:{type:Boolean},trigger:{},focusWrap:{type:Boolean},initialFocus:{},focusWithinOnActivate:{type:Boolean},closingFocus:{},returnFocusOnDeactivate:{type:Boolean},messages:{},score:{},levels:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),l=t.computed((()=>{if(!a.levels.length)return void console.warn("Levels array is empty.")
|
|
1345
1345
|
const e=[...a.levels].sort(((e,t)=>(e.threshold??1/0)-(t.threshold??1/0)))
|
|
1346
1346
|
for(const t of e){const e=t.threshold??1/0
|
|
1347
1347
|
if(a.score<e)return t}return a.levels[a.levels.length-1]}))
|
package/dist/ui.scss
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_ICONS } from './constants';
|
|
2
2
|
import { DialogButton, QDialogProps } from './types';
|
|
3
|
-
type __VLS_Props = QDialogProps;
|
|
4
|
-
type __VLS_PublicProps = {
|
|
5
|
-
modelValue?: boolean;
|
|
6
|
-
} & __VLS_Props;
|
|
7
3
|
declare function __VLS_template(): {
|
|
8
4
|
attrs: Partial<{}>;
|
|
9
5
|
slots: {
|
|
@@ -19,15 +15,10 @@ declare function __VLS_template(): {
|
|
|
19
15
|
rootEl: any;
|
|
20
16
|
};
|
|
21
17
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
23
|
-
"update:modelValue": (
|
|
24
|
-
} & {
|
|
25
|
-
|
|
26
|
-
leave: () => any;
|
|
27
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
29
|
-
onEnter?: (() => any) | undefined;
|
|
30
|
-
onLeave?: (() => any) | undefined;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<QDialogProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
19
|
+
"update:modelValue": (val: boolean) => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<QDialogProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
|
|
31
22
|
}>, {
|
|
32
23
|
size: import('./types').QDialogSize;
|
|
33
24
|
html: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QDialog.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialog.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QDialog.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialog.vue"],"names":[],"mappings":"AAuGA;AAkLC,OAAO,EAAiC,aAAa,EAAE,MAAM,aAAa,CAAA;AAS1E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AA4E1D,iBAAS,cAAc;WA4PT,OAAO,IAA6B;;wBAhBtB,GAAG;kCACQ,GAAG;iCACJ,GAAG;sBACd,GAAG;6BACI,GAAG;+BACD,GAAG;iCACD,GAAG;;;;EAexC;AAqBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;6EASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DEFAULT_ICONS as
|
|
3
|
-
import { QButton as
|
|
1
|
+
import { defineComponent as A, ref as h, computed as k, createBlock as c, openBlock as t, unref as a, normalizeClass as g, withCtx as p, createElementVNode as B, createElementBlock as i, createCommentVNode as s, renderSlot as n, toDisplayString as v, createVNode as m, normalizeProps as V, guardReactiveProps as b, createTextVNode as L, Fragment as U, renderList as w, mergeProps as $ } from "vue";
|
|
2
|
+
import { DEFAULT_ICONS as E, DEFAULT_BUTTONS as Q, DEFAULT_ICON as M } from "./constants.js";
|
|
3
|
+
import { QButton as q } from "../QButton/index.js";
|
|
4
4
|
import { QIcon as f } from "../QIcon/index.js";
|
|
5
|
-
import { QOverlay as
|
|
6
|
-
import { QTextField as
|
|
7
|
-
const
|
|
5
|
+
import { QOverlay as S } from "../QOverlay/index.js";
|
|
6
|
+
import { QTextField as W } from "../QTextField/index.js";
|
|
7
|
+
const I = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "q-dialog__header"
|
|
10
|
-
},
|
|
10
|
+
}, P = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "q-dialog__header-title"
|
|
13
|
-
},
|
|
13
|
+
}, H = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "q-dialog__body"
|
|
16
|
-
},
|
|
16
|
+
}, x = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "q-dialog__body-icon"
|
|
19
|
-
},
|
|
19
|
+
}, R = { class: "q-dialog__body-text" }, j = ["innerHTML"], G = { key: 1 }, J = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "q-dialog__input"
|
|
22
|
-
},
|
|
22
|
+
}, K = {
|
|
23
23
|
key: 2,
|
|
24
24
|
class: "q-dialog__footer"
|
|
25
|
-
},
|
|
25
|
+
}, X = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "q-dialog__footer-buttons"
|
|
28
|
-
},
|
|
28
|
+
}, ae = /* @__PURE__ */ A({
|
|
29
29
|
__name: "QDialog",
|
|
30
|
-
props:
|
|
30
|
+
props: {
|
|
31
31
|
id: {},
|
|
32
32
|
class: {},
|
|
33
|
+
modelValue: { type: Boolean },
|
|
33
34
|
title: {},
|
|
34
35
|
text: {},
|
|
35
|
-
icon: { default: () =>
|
|
36
|
-
buttons: { default: () =>
|
|
36
|
+
icon: { default: () => M },
|
|
37
|
+
buttons: { default: () => Q },
|
|
37
38
|
backdropBlur: { type: Boolean, default: !0 },
|
|
38
39
|
size: { default: "small" },
|
|
39
40
|
centerVertically: { type: Boolean },
|
|
@@ -47,36 +48,29 @@ const R = {
|
|
|
47
48
|
dismissible: { type: Boolean },
|
|
48
49
|
html: { type: Boolean, default: !0 },
|
|
49
50
|
input: {},
|
|
50
|
-
icons: { default: () =>
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const e = _, h = D, v = U(_, "modelValue"), u = B(""), d = B(""), O = V(() => ["q-dialog", e.class]), L = V(() => `q-overlay--${e.size}`);
|
|
58
|
-
function k() {
|
|
59
|
-
v.value = !1;
|
|
51
|
+
icons: { default: () => E }
|
|
52
|
+
},
|
|
53
|
+
emits: ["update:modelValue"],
|
|
54
|
+
setup(C, { emit: F }) {
|
|
55
|
+
const e = C, T = F, u = h(""), r = h(""), D = k(() => ["q-dialog", e.class]), O = k(() => `q-overlay--${e.size}`);
|
|
56
|
+
function _() {
|
|
57
|
+
y(!1);
|
|
60
58
|
}
|
|
61
59
|
function N(o) {
|
|
62
|
-
var
|
|
60
|
+
var d, l;
|
|
63
61
|
if (o.action) {
|
|
64
|
-
if ((
|
|
62
|
+
if ((d = e.input) != null && d.validator && (r.value = e.input.validator(a(u)), a(r)))
|
|
65
63
|
return;
|
|
66
64
|
(l = o.action) == null || l.call(o, a(u));
|
|
67
65
|
}
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
function z() {
|
|
71
|
-
h("enter");
|
|
66
|
+
_();
|
|
72
67
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
68
|
+
function y(o) {
|
|
69
|
+
T("update:modelValue", o);
|
|
75
70
|
}
|
|
76
|
-
return (o,
|
|
71
|
+
return (o, d) => (t(), c(a(S), {
|
|
77
72
|
id: e.id,
|
|
78
|
-
|
|
79
|
-
"onUpdate:modelValue": n[1] || (n[1] = (l) => v.value = l),
|
|
73
|
+
"model-value": e.modelValue,
|
|
80
74
|
"backdrop-class": "q-dialog__underlay",
|
|
81
75
|
"scroll-lock": "",
|
|
82
76
|
persistent: "",
|
|
@@ -89,72 +83,71 @@ const R = {
|
|
|
89
83
|
"focus-within-on-activate": e.focusWithinOnActivate,
|
|
90
84
|
"closing-focus": e.closingFocus,
|
|
91
85
|
"return-focus-on-deactivate": e.returnFocusOnDeactivate,
|
|
92
|
-
class:
|
|
93
|
-
|
|
94
|
-
onLeave: A
|
|
86
|
+
class: g(O.value),
|
|
87
|
+
"onUpdate:modelValue": y
|
|
95
88
|
}, {
|
|
96
89
|
default: p(() => [
|
|
97
|
-
|
|
90
|
+
B(
|
|
98
91
|
"div",
|
|
99
92
|
{
|
|
100
|
-
class:
|
|
93
|
+
class: g(D.value)
|
|
101
94
|
},
|
|
102
95
|
[
|
|
103
|
-
e.title || o.$slots.header || o.$slots["header.prepend"] || o.$slots["header.append"] ? (t(), i("div",
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
e.title || o.$slots.header || o.$slots["header.prepend"] || o.$slots["header.append"] ? (t(), i("div", I, [
|
|
97
|
+
n(o.$slots, "header", {}, () => [
|
|
98
|
+
n(o.$slots, "header.prepend"),
|
|
106
99
|
e.title ? (t(), i(
|
|
107
100
|
"span",
|
|
108
|
-
|
|
109
|
-
|
|
101
|
+
P,
|
|
102
|
+
v(e.title),
|
|
110
103
|
1
|
|
111
104
|
/* TEXT */
|
|
112
105
|
)) : s("v-if", !0),
|
|
113
|
-
|
|
106
|
+
n(o.$slots, "header.append")
|
|
114
107
|
])
|
|
115
108
|
])) : s("v-if", !0),
|
|
116
|
-
e.icon || e.text || o.$slots.body ? (t(), i("div",
|
|
117
|
-
|
|
109
|
+
e.icon || e.text || o.$slots.body ? (t(), i("div", H, [
|
|
110
|
+
n(o.$slots, "body", {}, () => {
|
|
118
111
|
var l;
|
|
119
112
|
return [
|
|
120
|
-
|
|
121
|
-
e.icon ? (t(), i("span",
|
|
122
|
-
|
|
113
|
+
n(o.$slots, "body.icon", {}, () => [
|
|
114
|
+
e.icon ? (t(), i("span", x, [
|
|
115
|
+
m(
|
|
123
116
|
a(f),
|
|
124
|
-
|
|
117
|
+
V(b(e.icon)),
|
|
125
118
|
null,
|
|
126
119
|
16
|
|
127
120
|
/* FULL_PROPS */
|
|
128
121
|
)
|
|
129
122
|
])) : s("v-if", !0)
|
|
130
123
|
]),
|
|
131
|
-
|
|
124
|
+
B("div", R, [
|
|
132
125
|
e.html ? (t(), i("div", {
|
|
133
126
|
key: 0,
|
|
134
127
|
innerHTML: e.text
|
|
135
|
-
}, null, 8,
|
|
128
|
+
}, null, 8, j)) : (t(), i(
|
|
136
129
|
"div",
|
|
137
|
-
|
|
138
|
-
|
|
130
|
+
G,
|
|
131
|
+
v(e.text),
|
|
139
132
|
1
|
|
140
133
|
/* TEXT */
|
|
141
134
|
))
|
|
142
135
|
]),
|
|
143
|
-
e.input ? (t(), i("div",
|
|
144
|
-
|
|
136
|
+
e.input ? (t(), i("div", J, [
|
|
137
|
+
m(a(W), {
|
|
145
138
|
modelValue: u.value,
|
|
146
|
-
"onUpdate:modelValue":
|
|
147
|
-
invalid: !!
|
|
139
|
+
"onUpdate:modelValue": d[0] || (d[0] = (z) => u.value = z),
|
|
140
|
+
invalid: !!r.value,
|
|
148
141
|
placeholder: (l = e.input) == null ? void 0 : l.placeholder,
|
|
149
142
|
size: "block"
|
|
150
143
|
}, {
|
|
151
144
|
extras: p(() => [
|
|
152
|
-
|
|
145
|
+
r.value ? (t(), c(a(f), {
|
|
153
146
|
key: 0,
|
|
154
147
|
icon: "exclamation-sign"
|
|
155
148
|
})) : s("v-if", !0),
|
|
156
|
-
|
|
157
|
-
" " +
|
|
149
|
+
L(
|
|
150
|
+
" " + v(r.value),
|
|
158
151
|
1
|
|
159
152
|
/* TEXT */
|
|
160
153
|
)
|
|
@@ -163,23 +156,23 @@ const R = {
|
|
|
163
156
|
/* STABLE */
|
|
164
157
|
}, 8, ["modelValue", "invalid", "placeholder"])
|
|
165
158
|
])) : s("v-if", !0),
|
|
166
|
-
|
|
159
|
+
n(o.$slots, "body.append")
|
|
167
160
|
];
|
|
168
161
|
})
|
|
169
162
|
])) : s("v-if", !0),
|
|
170
|
-
e.buttons || o.$slots["footer.append"] ? (t(), i("div",
|
|
171
|
-
e.buttons ? (t(), i("span",
|
|
163
|
+
e.buttons || o.$slots["footer.append"] ? (t(), i("div", K, [
|
|
164
|
+
e.buttons ? (t(), i("span", X, [
|
|
172
165
|
(t(!0), i(
|
|
173
|
-
|
|
166
|
+
U,
|
|
174
167
|
null,
|
|
175
|
-
|
|
168
|
+
w(e.buttons, (l) => (t(), c(a(q), $({ ref_for: !0 }, l.props, {
|
|
176
169
|
key: l.id,
|
|
177
170
|
onClick: () => N(l)
|
|
178
171
|
}), {
|
|
179
172
|
default: p(() => [
|
|
180
173
|
l.icon ? (t(), c(
|
|
181
174
|
a(f),
|
|
182
|
-
|
|
175
|
+
$({
|
|
183
176
|
key: 0,
|
|
184
177
|
ref_for: !0
|
|
185
178
|
}, l.icon),
|
|
@@ -195,18 +188,18 @@ const R = {
|
|
|
195
188
|
/* KEYED_FRAGMENT */
|
|
196
189
|
))
|
|
197
190
|
])) : s("v-if", !0),
|
|
198
|
-
|
|
191
|
+
n(o.$slots, "footer.append")
|
|
199
192
|
])) : s("v-if", !0),
|
|
200
|
-
e.dismissible ? (t(), c(a(
|
|
193
|
+
e.dismissible ? (t(), c(a(q), {
|
|
201
194
|
key: 3,
|
|
202
195
|
class: "q-dialog__close",
|
|
203
196
|
variant: "text",
|
|
204
|
-
onClick:
|
|
197
|
+
onClick: _
|
|
205
198
|
}, {
|
|
206
199
|
default: p(() => [
|
|
207
|
-
|
|
200
|
+
m(
|
|
208
201
|
a(f),
|
|
209
|
-
|
|
202
|
+
V(b(e.icons.close)),
|
|
210
203
|
null,
|
|
211
204
|
16
|
|
212
205
|
/* FULL_PROPS */
|
|
@@ -222,9 +215,9 @@ const R = {
|
|
|
222
215
|
]),
|
|
223
216
|
_: 3
|
|
224
217
|
/* FORWARDED */
|
|
225
|
-
}, 8, ["id", "
|
|
218
|
+
}, 8, ["id", "model-value", "inline", "attach", "backdrop-blur", "center-vertically", "focus-wrap", "initial-focus", "focus-within-on-activate", "closing-focus", "return-focus-on-deactivate", "class"]));
|
|
226
219
|
}
|
|
227
220
|
});
|
|
228
221
|
export {
|
|
229
|
-
|
|
222
|
+
ae as default
|
|
230
223
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QDialogProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialogProvider.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QDialogProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDialog/QDialogProvider.vue"],"names":[],"mappings":"AASA;AAgDC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;;;;;;AAmFpD,wBAOG"}
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { QDialog as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
const x = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as f, createElementBlock as d, openBlock as r, Fragment as _, renderList as g, unref as t, createBlock as k, mergeProps as v } from "vue";
|
|
2
|
+
import { QDialog as B } from "./index.js";
|
|
3
|
+
import { useDialog as D } from "../../composables/useDialog/index.js";
|
|
4
|
+
const x = /* @__PURE__ */ f({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "QDialogProvider",
|
|
7
7
|
props: {
|
|
8
8
|
inline: { type: Boolean }
|
|
9
9
|
},
|
|
10
10
|
emits: ["leave"],
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
s(e),
|
|
11
|
+
setup(i, { emit: l }) {
|
|
12
|
+
const a = i, m = l, { dialogs: p, removeDialog: s } = D();
|
|
13
|
+
function u(e, n) {
|
|
14
|
+
n || (s(e), m("leave", e));
|
|
15
15
|
}
|
|
16
|
-
return (e,
|
|
17
|
-
|
|
16
|
+
return (e, n) => (r(!0), d(
|
|
17
|
+
_,
|
|
18
18
|
null,
|
|
19
|
-
|
|
20
|
-
key:
|
|
19
|
+
g(t(p), (o) => (r(), k(t(B), v({
|
|
20
|
+
key: o.id,
|
|
21
21
|
ref_for: !0
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}), null, 16, ["inline", "onLeave"]))),
|
|
22
|
+
}, o.props, {
|
|
23
|
+
inline: a.inline,
|
|
24
|
+
"onUpdate:modelValue": (c) => u(o.id, c)
|
|
25
|
+
}), null, 16, ["inline", "onUpdate:modelValue"]))),
|
|
27
26
|
128
|
|
28
27
|
/* KEYED_FRAGMENT */
|
|
29
28
|
));
|