@quidgest/ui 0.5.2 → 0.5.3
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/index.d.ts +18 -2
- package/dist/ui.esm.js +113 -103
- package/dist/ui.esm.js.map +1 -1
- package/dist/ui.js +3 -3
- package/dist/ui.js.map +1 -1
- package/dist/ui.min.js +35 -31
- package/dist/ui.min.js.map +1 -1
- package/dist/ui.scss +1 -1
- package/package.json +1 -1
package/dist/ui.min.js
CHANGED
|
@@ -9,11 +9,11 @@ function c(e){if(!/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(e))throw new Error("
|
|
|
9
9
|
4===e.length&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3])
|
|
10
10
|
return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}function d(e,t){if(t<0||t>100)throw new Error("Amount must be in the range [0, 100]")
|
|
11
11
|
if(0===t)return e
|
|
12
|
-
const o=
|
|
12
|
+
const o=p(e),n=t/100
|
|
13
13
|
return o.l=o.l+n*(100-o.l),m(o)}function u(e,t){if(t<0||t>100)throw new Error("Amount must be in the range [0, 100]")
|
|
14
14
|
if(0===t)return e
|
|
15
|
-
const o=
|
|
16
|
-
return o.l=o.l-n*o.l,m(o)}function
|
|
15
|
+
const o=p(e),n=t/100
|
|
16
|
+
return o.l=o.l-n*o.l,m(o)}function f(e){return`#${e.r.toString(16).padStart(2,"0")}${e.g.toString(16).padStart(2,"0")}${e.b.toString(16).padStart(2,"0")}`}function p(e){const t=e.r/255,o=e.g/255,n=e.b/255,l=Math.max(t,o,n),a=Math.min(t,o,n)
|
|
17
17
|
let r,i=0
|
|
18
18
|
const s=(l+a)/2
|
|
19
19
|
if(l===a)i=r=0
|
|
@@ -32,7 +32,7 @@ if(o)for(const e of o.themes){const t="light"===e.mode?i:s
|
|
|
32
32
|
if(e.colors){let t
|
|
33
33
|
for(t in e.colors){const o=e.colors[t]
|
|
34
34
|
if(o&&!t.startsWith("on")&&!t.endsWith("Light")&&!t.endsWith("Dark")){const n=c(o),l=`${t}Light`,a=`${t}Dark`
|
|
35
|
-
l in e.colors||(e.colors[l]=
|
|
35
|
+
l in e.colors||(e.colors[l]=f(d(n,85))),a in e.colors||(e.colors[a]=f(u(n,25)))}}}e.colors=g(t,e.colors),e.name===o.defaultTheme&&(n=e)}else{const e="default"
|
|
36
36
|
n={name:e,mode:"light",colors:i},o={defaultTheme:e,themes:[n]}}if(n){const l=t.ref({activeTheme:n.name,themes:o.themes})
|
|
37
37
|
t.watch((()=>l.value.activeTheme),(e=>{const t=l.value.themes.find((t=>t.name===e))
|
|
38
38
|
t&&function(e){let t=document.getElementById(v)
|
|
@@ -56,10 +56,10 @@ const i=new Proxy(e,{get(e,o){const n=Reflect.get(e,o),r=t.unref(l[o])
|
|
|
56
56
|
return"class"===o||"style"===o?[r,n].filter((e=>null!=e)):"string"!=typeof o||function(e,t){var o
|
|
57
57
|
return typeof(null==(o=e.props)?void 0:o[t])<"u"}(a.vnode,o)?n:r??n}})
|
|
58
58
|
return o(i,n)}),e}B(w)
|
|
59
|
-
const
|
|
59
|
+
const C=["disabled","onClick"],S={key:0,class:"q-btn__spinner"},_={class:"q-btn__content"},E=t.defineComponent({__name:"QButton",props:{active:{type:Boolean},bStyle:{default:"secondary"},label:{default:""},disabled:{type:Boolean},iconOnRight:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean},block:{type:Boolean},loading:{type:Boolean},size:{default:"regular"}},emits:["click"],setup(e,{emit:o}){const n=e,l=t.computed((()=>n.disabled||n.loading))
|
|
60
60
|
function a(e){l.value||o("click",e)}const r=t.computed((()=>{const e=t.computed((()=>n.bStyle?`q-btn--${n.bStyle}`:void 0)),o=t.computed((()=>"regular"!==n.size?`q-btn--${n.size}`:void 0))
|
|
61
61
|
return["q-btn",e.value,o.value,{"q-btn--active":n.active,"q-btn--borderless":n.borderless,"q-btn--elevated":n.elevated,"q-btn--block":n.block,"q-btn--loading":n.loading}]}))
|
|
62
|
-
return(e,o)=>(t.openBlock(),t.createElementBlock("button",{type:"button",class:t.normalizeClass(r.value),disabled:l.value,onClick:t.withModifiers(a,["stop","prevent"])},[e.loading?(t.openBlock(),t.createElementBlock("div",
|
|
62
|
+
return(e,o)=>(t.openBlock(),t.createElementBlock("button",{type:"button",class:t.normalizeClass(r.value),disabled:l.value,onClick:t.withModifiers(a,["stop","prevent"])},[e.loading?(t.openBlock(),t.createElementBlock("div",S,[t.createVNode(t.unref(w),{size:23})])):t.createCommentVNode("",!0),t.createElementVNode("span",_,[e.iconOnRight?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(n.label),1)],64)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default"),e.iconOnRight?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(n.label),1)],64))])],10,C))}}),x=t.defineComponent({__name:"QButtonGroup",props:{bStyle:{},disabled:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean}},setup(e){const o=e
|
|
63
63
|
a({QButton:{bStyle:t.toRef(o,"bStyle"),disabled:t.toRef(o,"disabled"),borderless:t.toRef(o,"borderless"),elevated:!1}})
|
|
64
64
|
const n=t.computed((()=>["q-btn-group",{"q-btn-group--elevated":o.elevated}]))
|
|
65
65
|
return(e,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(n.value)},[t.renderSlot(e.$slots,"default")],2))}}),V=t.defineComponent({__name:"QButtonToggle",props:{modelValue:{},options:{},disabled:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean},mandatory:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,l=t.ref(n.modelValue)
|
|
@@ -98,25 +98,25 @@ const M=((e,t)=>{const o=e.__vccOpts||e
|
|
|
98
98
|
for(const[e,n]of t)o[e]=n
|
|
99
99
|
return o})({},[["render",function(e,o){return t.openBlock(),t.createElementBlock("div",F)}]]),P=t.defineComponent({__name:"QList",props:{modelValue:{type:[String,Number,Boolean,Symbol],default:void 0},items:{},groups:{default:()=>[]},itemValue:{default:"key"},itemLabel:{default:"label"},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:o,emit:n}){const l=e,a=t.ref(l.modelValue),r=t.computed((()=>i.value.length>1?"div":"ul")),i=t.computed((()=>l.groups.length?l.groups:[{title:""}])),s=t.ref(null)
|
|
100
100
|
function c(e){a.value=e,n("update:modelValue",e)}function d(){let e=0
|
|
101
|
-
a.value&&(e=l.items.findIndex((e=>e[l.itemValue]===a.value))),
|
|
101
|
+
a.value&&(e=l.items.findIndex((e=>e[l.itemValue]===a.value))),p(e)}function u(e){switch(["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&e.preventDefault(),e.key){case"ArrowDown":f("next")
|
|
102
102
|
break
|
|
103
|
-
case"ArrowUp":
|
|
103
|
+
case"ArrowUp":f("prev")
|
|
104
104
|
break
|
|
105
|
-
case"Home":
|
|
105
|
+
case"Home":f("first")
|
|
106
106
|
break
|
|
107
|
-
case"End":
|
|
107
|
+
case"End":f("last")}}function f(e){switch(e){case"next":case"prev":p(function(e){const t=m(),o=function(e){return e.indexOf(document.activeElement)}(t)
|
|
108
108
|
return"next"===e?o===t.length-1?o:o+1:0===o?0:o-1}(e))
|
|
109
109
|
break
|
|
110
|
-
case"first":
|
|
110
|
+
case"first":p(0)
|
|
111
111
|
break
|
|
112
|
-
case"last":
|
|
112
|
+
case"last":p(-1)}}function p(e){var t
|
|
113
113
|
null==(t=m().at(e))||t.focus()}function m(){var e
|
|
114
114
|
const t=null==(e=s.value)?void 0:e.querySelectorAll("li")
|
|
115
|
-
return t?Array.from(t).filter((e=>-1!==e.tabIndex)):[]}function h(e){return e?l.items.filter((t=>t.group===e)):l.items}return t.watch((()=>l.modelValue),(e=>{a.value=e})),o({focusItem:
|
|
115
|
+
return t?Array.from(t).filter((e=>-1!==e.tabIndex)):[]}function h(e){return e?l.items.filter((t=>t.group===e)):l.items}return t.watch((()=>l.modelValue),(e=>{a.value=e})),o({focusItem:p}),(e,o)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.value),{ref_key:"listRef",ref:s,class:t.normalizeClass(["q-list",{"q-list--disabled":l.disabled}]),role:"listbox",tabindex:l.disabled?-1:0,onFocus:d,onKeydown:u},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(e=>(t.openBlock(),t.createBlock(t.unref(G),t.mergeProps({key:e.title},e),{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h(e.title),(e=>(t.openBlock(),t.createBlock(t.unref(H),{key:e[l.itemValue],value:e[l.itemValue],label:e[l.itemLabel],icon:e.icon,disabled:l.disabled||e.disabled,selected:a.value===e[l.itemValue],onSelect:c},null,8,["value","label","icon","disabled","selected"])))),128))])),_:2},1040)))),128))])),_:1},40,["class","tabindex"]))}}),O=["tabindex","aria-label","aria-selected","onClick"],R={check:{name:"check"}},H=t.defineComponent({__name:"QListItem",props:{value:{type:[String,Number,Boolean,Symbol]},label:{},icon:{default:void 0},selected:{type:Boolean,default:!1},highlighted:{type:Boolean,default:!1},icons:{default:()=>R},disabled:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:o}){const n=e
|
|
116
116
|
function l(){n.disabled||o("select",n.value)}function a(e){"Tab"===e.key&&l(),("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation(),l())}return(e,o)=>(t.openBlock(),t.createElementBlock("li",{role:"option",tabindex:n.disabled?void 0:-2,class:t.normalizeClass(["q-list-item",{"q-list-item--disabled":n.disabled,"q-list-item--selected":n.selected,"q-list-item--highlighted":n.highlighted}]),"aria-label":n.label,"aria-selected":n.disabled?void 0:n.selected,onKeydown:a,onClick:t.withModifiers(l,["stop","prevent"])},[n.icon?(t.openBlock(),t.createBlock(t.unref($),t.normalizeProps(t.mergeProps({key:0},n.icon)),null,16)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(n.label)+" ",1),n.selected?(t.openBlock(),t.createBlock(t.unref($),t.mergeProps({key:1},n.icons.check,{class:"q-list-item__check"}),null,16)):t.createCommentVNode("",!0)],42,O))}})
|
|
117
|
-
let
|
|
118
|
-
const
|
|
119
|
-
return(e,n)=>o.title?(t.openBlock(),t.createElementBlock("ul",{key:1,class:"q-list-item-group",role:"group","aria-labelledby":o.id},[o.title?(t.openBlock(),t.createElementBlock("li",{key:0,id:o.id,class:"q-list-item-group__title",role:"presentation"},t.toDisplayString(o.title),9,U)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default")],8,
|
|
117
|
+
let j=0
|
|
118
|
+
const W=["aria-labelledby"],U=["id"],G=t.defineComponent({__name:"QListItemGroup",props:{id:{default:()=>"uid-"+ ++j},title:{default:""},disabled:{type:Boolean,default:!1}},setup(e){const o=e
|
|
119
|
+
return(e,n)=>o.title?(t.openBlock(),t.createElementBlock("ul",{key:1,class:"q-list-item-group",role:"group","aria-labelledby":o.id},[o.title?(t.openBlock(),t.createElementBlock("li",{key:0,id:o.id,class:"q-list-item-group__title",role:"presentation"},t.toDisplayString(o.title),9,U)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default")],8,W)):t.renderSlot(e.$slots,"default",{key:0})}})
|
|
120
120
|
function K(e,t,o="right",n){const l=e.getBoundingClientRect(),a=l.x+window.scrollX,r=l.y+window.scrollY,i=null==t?void 0:t.getBoundingClientRect(),s=(null==i?void 0:i.width)??0,c=(null==i?void 0:i.height)??0
|
|
121
121
|
let d=o
|
|
122
122
|
i&&!X(l,i,d)&&(d=function(e,t,o){const n={top:["bottom","left","right"],bottom:["top","left","right"],left:["right","top","bottom"],right:["left","top","bottom"]}
|
|
@@ -150,29 +150,33 @@ case"right":e=n.offset||0}const o={top:`${a.top+t}px`,left:`${a.left+e}px`}
|
|
|
150
150
|
return void 0!==a.width&&["top","bottom"].includes(a.placement)&&(o.width=`${a.width}px`),o})),s=t.ref(null)
|
|
151
151
|
function c(){const e=J(n.anchor)
|
|
152
152
|
if(e){const t=K(e,s.value,n.placement,n.width)
|
|
153
|
-
a.left=t.x,a.top=t.y,a.width=t.width,a.placement=t.placement}}let d,u,
|
|
154
|
-
function
|
|
155
|
-
d||(d=window.setTimeout((()=>a.visible=!0),e))}function m(){clearTimeout(d),d=void 0,a.visible=!1}function h(){r.value?m():
|
|
156
|
-
e&&(window.addEventListener("scroll",c),window.addEventListener("resize",c),u=new MutationObserver(c),u.observe(e,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),c())})),n.spy&&v()}function g(){window.removeEventListener("scroll",c),window.removeEventListener("resize",c),null==u||u.disconnect(),n.spy&&(clearTimeout(
|
|
153
|
+
a.left=t.x,a.top=t.y,a.width=t.width,a.placement=t.placement}}let d,u,f
|
|
154
|
+
function p(){const e="hover"===n.trigger?n.delay:0
|
|
155
|
+
d||(d=window.setTimeout((()=>a.visible=!0),e))}function m(){clearTimeout(d),d=void 0,a.visible=!1}function h(){r.value?m():p()}function v(){J(n.anchor)?(c(),f=window.setTimeout(v,100)):m()}function y(){t.nextTick((()=>{const e=J(n.anchor)
|
|
156
|
+
e&&(window.addEventListener("scroll",c),window.addEventListener("resize",c),u=new MutationObserver(c),u.observe(e,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),c())})),n.spy&&v()}function g(){window.removeEventListener("scroll",c),window.removeEventListener("resize",c),null==u||u.disconnect(),n.spy&&(clearTimeout(f),f=void 0)}return t.watch([()=>r.value,()=>n.placement],c),t.onBeforeUnmount(g),t.onMounted(c),t.watch((()=>n.disabled),(e=>{e||t.nextTick((()=>{const e=J(n.anchor)
|
|
157
157
|
if(e)switch(n.trigger){case"click":e.addEventListener("click",h)
|
|
158
158
|
break
|
|
159
|
-
case"hover":e.addEventListener("mouseenter",
|
|
159
|
+
case"hover":e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",m)}}))}),{immediate:!0}),t.watch((()=>r.value),(e=>{e?y():g()}),{immediate:!0}),(e,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.renderSlot(e.$slots,"trigger",{open:r.value}),(t.openBlock(),t.createBlock(t.Teleport,{to:n.attach},[t.createVNode(t.Transition,{name:n.transition,appear:"",onEnter:a[0]||(a[0]=e=>o("enter")),onLeave:a[1]||(a[1]=e=>o("leave"))},{default:t.withCtx((()=>[r.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(l.value),style:t.normalizeStyle(i.value)},[t.createElementVNode("div",{class:t.normalizeClass(["q-overlay__content"]),ref_key:"overlay",ref:s},[n.arrow?(t.openBlock(),t.createElementBlock("div",ee)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default")],512)],6)):t.createCommentVNode("",!0)])),_:3},8,["name"])],8,["to"]))],64))}}),oe={key:0,class:"q-popover__header"},ne={key:1,class:"q-popover__body"},le=["innerHTML"],ae={key:1},re=t.defineComponent({__name:"QPopover",props:{modelValue:{type:Boolean},anchor:{},arrow:{type:Boolean,default:!0},attach:{default:"body"},disabled:{type:Boolean},html:{type:Boolean,default:!0},placement:{default:"right"},spy:{type:Boolean,default:!0},text:{},title:{}},setup(e){const o=e
|
|
160
160
|
return(e,n)=>(t.openBlock(),t.createBlock(t.unref(te),{"model-value":o.modelValue,trigger:"click",anchor:o.anchor,arrow:o.arrow,attach:o.attach,"content-classes":["q-popover"],disabled:o.disabled,placement:o.placement,spy:o.spy},{default:t.withCtx((()=>[o.title||e.$slots.header?(t.openBlock(),t.createElementBlock("h3",oe,[t.createTextVNode(t.toDisplayString(o.title)+" ",1),t.renderSlot(e.$slots,"header")])):t.createCommentVNode("",!0),o.text||e.$slots.body?(t.openBlock(),t.createElementBlock("div",ne,[o.html?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:o.text},null,8,le)):(t.openBlock(),t.createElementBlock("span",ae,t.toDisplayString(o.text),1)),t.renderSlot(e.$slots,"body")])):t.createCommentVNode("",!0)])),_:3},8,["model-value","anchor","arrow","attach","disabled","placement","spy"]))}}),ie={mounted(e,t){e.clickOutsideEvent=function(o){const n=o.target
|
|
161
161
|
t.arg?e===n||e.contains(n)||n.closest(t.arg)||t.value(o,e):e===n||e.contains(n)||t.value(o,e)},document.addEventListener("click",e.clickOutsideEvent)},unmounted(e){document.removeEventListener("click",e.clickOutsideEvent)}},se={key:1,class:"q-select__placeholder"},ce={placeholder:"Choose..."},de={chevron:{name:"chevron-down"},clear:{name:"close"}},ue=t.defineComponent({__name:"QSelect",props:{modelValue:{type:[String,Number,Boolean,Symbol],default:void 0},clearable:{type:Boolean,default:!1},readonly:{type:Boolean},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icons:{default:()=>de},items:{},groups:{default:()=>[]},itemValue:{default:"key"},itemLabel:{default:"label"},size:{default:"medium"},texts:{default:()=>ce}},emits:["update:modelValue","before-show","before-hide","show","hide"],setup(e,{emit:o}){const n=e,l=t.ref(n.modelValue),a=t.ref(!1),r=t.ref(""),i=t.ref(null),s=t.ref(null),c=t.ref(null),d=t.computed((()=>{var e
|
|
162
|
-
return null==(e=n.items)?void 0:e.find((e=>e[n.itemValue]===l.value))})),u=t.computed((()=>d.value?d.value[n.itemLabel]:"")),
|
|
163
|
-
function
|
|
162
|
+
return null==(e=n.items)?void 0:e.find((e=>e[n.itemValue]===l.value))})),u=t.computed((()=>d.value?d.value[n.itemLabel]:"")),f=t.computed((()=>n.clearable&&!n.readonly&&!n.disabled&&!n.loading))
|
|
163
|
+
function p(){f.value&&(l.value=void 0,o("update:modelValue",l.value),v())}function m(){n.readonly||n.disabled||(a.value?v():a.value||(o("before-show"),a.value=!0))}function h(e){var t
|
|
164
164
|
null!=(t=i.value)&&t.$el.contains(e.target)||v()}function v(){a.value&&(o("before-hide"),a.value=!1)}let y
|
|
165
|
-
function g(e){if(e.key&&!n.readonly&&!n.disabled){if(window.clearTimeout(y),["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),["Enter"," "].includes(e.key)&&(a.value=!0),["Escape","Tab"].includes(e.key)&&(a.value?a.value=!1:n.clearable&&"Escape"===e.key&&
|
|
165
|
+
function g(e){if(e.key&&!n.readonly&&!n.disabled){if(window.clearTimeout(y),["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),["Enter"," "].includes(e.key)&&(a.value=!0),["Escape","Tab"].includes(e.key)&&(a.value?a.value=!1:n.clearable&&"Escape"===e.key&&p()),"Delete"===e.key&&n.clearable&&p(),/^[a-z]$/i.test(e.key)){r.value+=e.key.toLowerCase()
|
|
166
166
|
for(let e=0;e<n.items.length;e++)if(n.items[e][n.itemLabel].toLowerCase().startsWith(r.value)){B(e)
|
|
167
167
|
break}}y=window.setTimeout((function(){r.value=""}),500)}}function k(){var e
|
|
168
168
|
null==(e=s.value)||e.$el.focus(),o("show")}function b(){var e
|
|
169
169
|
null==(e=i.value)||e.$el.focus(),o("hide")}function B(e){var t
|
|
170
170
|
null==(t=s.value)||t.focusItem(e)}return t.watch((()=>n.modelValue),(e=>{l.value=e})),(e,o)=>{var r,y
|
|
171
|
-
return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(A),{ref_key:"inputRef",ref:i,role:"combobox",tabindex:"0",class:t.normalizeClass(["q-select",{"q-select--readonly":n.readonly,"q-select--disabled":n.disabled,"q-select--expanded":a.value}]),readonly:"",disabled:n.disabled,"aria-expanded":a.value,"aria-haspopup":"listbox",size:n.size,onClick:m,onKeydown:t.withModifiers(g,["stop"])},t.createSlots({append:t.withCtx((()=>[
|
|
172
|
-
return[t.createVNode(t.unref($),t.normalizeProps(t.guardReactiveProps(null==(e=d.value)?void 0:e.icon)),null,16)]})),key:"0"}:void 0]),1032,["class","disabled","aria-expanded","size","onKeydown"]),t.createVNode(t.unref(te),{"model-value":a.value,spy:"",trigger:"manual",placement:"bottom",width:"anchor",offset:2,anchor:null==(y=i.value)?void 0:y.$el,onEnter:k,onLeave:b},{default:t.withCtx((()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref_key:"contentRef",ref:c,class:"q-select__body"},[t.renderSlot(e.$slots,"body.prepend"),n.loading?(t.openBlock(),t.createBlock(t.unref(w),{key:0,class:"q-select__loader",size:24})):(t.openBlock(),t.createBlock(t.unref(P),{key:1,ref_key:"listRef",ref:s,class:"q-select__items",modelValue:l.value,"onUpdate:modelValue":[o[0]||(o[0]=e=>l.value=e),v],items:n.items,groups:e.groups,"item-label":n.itemLabel,"item-value":n.itemValue,onKeydown:t.withModifiers(g,["stop"])},null,8,["modelValue","items","groups","item-label","item-value","onKeydown"])),t.renderSlot(e.$slots,"body.append")])),[[t.unref(ie),h]])])),_:3},8,["model-value","anchor"])],64)}}}),
|
|
173
|
-
return(e,n)=>(t.openBlock(),t.createBlock(t.unref(te),{"model-value":o.modelValue,anchor:o.anchor,appearance:o.appearance,arrow:o.arrow,attach:o.attach,"content-classes":["q-tooltip"],delay:o.delay,disabled:o.disabled,placement:o.placement,trigger:o.trigger},{default:t.withCtx((()=>[o.html?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:o.text},null,8,
|
|
174
|
-
e.QButton=E,e.QButtonGroup=x,e.QButtonToggle=V,e.QIcon=$,e.QIconFont=q,e.QIconImg=z,e.QIconSvg=T,e.QInput=A,e.QLineLoader=M,e.QList=P,e.QListItem=H,e.QListItemGroup=G,e.QOverlay=te,e.QPopover=re,e.QSelect=ue,e.QSpinnerLoader=w,e.QTooltip=me,e.clickOutside=ie,e.createFramework=function(e={}){return{install:t=>{const o=e.
|
|
175
|
-
for(const e in o)t.
|
|
176
|
-
const n=e.
|
|
177
|
-
|
|
171
|
+
return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(A),{ref_key:"inputRef",ref:i,role:"combobox",tabindex:"0",class:t.normalizeClass(["q-select",{"q-select--readonly":n.readonly,"q-select--disabled":n.disabled,"q-select--expanded":a.value}]),readonly:"",disabled:n.disabled,"aria-expanded":a.value,"aria-haspopup":"listbox",size:n.size,onClick:m,onKeydown:t.withModifiers(g,["stop"])},t.createSlots({append:t.withCtx((()=>[f.value&&l.value?(t.openBlock(),t.createBlock(t.unref($),t.mergeProps({key:0},n.icons.clear,{class:"q-select__clear",onClick:t.withModifiers(p,["stop","prevent"])}),null,16,["onClick"])):t.createCommentVNode("",!0),n.readonly||n.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref($),t.mergeProps({key:1},n.icons.chevron,{class:"q-select__chevron"}),null,16))])),default:t.withCtx((()=>[l.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(u.value),1)],64)):(t.openBlock(),t.createElementBlock("span",se,t.toDisplayString(e.texts.placeholder),1))])),_:2},[null!=(r=d.value)&&r.icon?{name:"prepend",fn:t.withCtx((()=>{var e
|
|
172
|
+
return[t.createVNode(t.unref($),t.normalizeProps(t.guardReactiveProps(null==(e=d.value)?void 0:e.icon)),null,16)]})),key:"0"}:void 0]),1032,["class","disabled","aria-expanded","size","onKeydown"]),t.createVNode(t.unref(te),{"model-value":a.value,spy:"",trigger:"manual",placement:"bottom",width:"anchor",offset:2,anchor:null==(y=i.value)?void 0:y.$el,onEnter:k,onLeave:b},{default:t.withCtx((()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref_key:"contentRef",ref:c,class:"q-select__body"},[t.renderSlot(e.$slots,"body.prepend"),n.loading?(t.openBlock(),t.createBlock(t.unref(w),{key:0,class:"q-select__loader",size:24})):(t.openBlock(),t.createBlock(t.unref(P),{key:1,ref_key:"listRef",ref:s,class:"q-select__items",modelValue:l.value,"onUpdate:modelValue":[o[0]||(o[0]=e=>l.value=e),v],items:n.items,groups:e.groups,"item-label":n.itemLabel,"item-value":n.itemValue,onKeydown:t.withModifiers(g,["stop"])},null,8,["modelValue","items","groups","item-label","item-value","onKeydown"])),t.renderSlot(e.$slots,"body.append")])),[[t.unref(ie),h]])])),_:3},8,["model-value","anchor"])],64)}}}),fe=["innerHTML"],pe={key:1},me=t.defineComponent({__name:"QTooltip",props:{modelValue:{type:Boolean},anchor:{},appearance:{default:"inverted"},arrow:{type:Boolean,default:!0},attach:{default:"body"},delay:{default:500},disabled:{type:Boolean},html:{type:Boolean,default:!0},placement:{default:"right"},text:{},trigger:{default:"hover"}},setup(e){const o=e
|
|
173
|
+
return(e,n)=>(t.openBlock(),t.createBlock(t.unref(te),{"model-value":o.modelValue,anchor:o.anchor,appearance:o.appearance,arrow:o.arrow,attach:o.attach,"content-classes":["q-tooltip"],delay:o.delay,disabled:o.disabled,placement:o.placement,trigger:o.trigger},{default:t.withCtx((()=>[o.html?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:o.text},null,8,fe)):(t.openBlock(),t.createElementBlock("span",pe,t.toDisplayString(o.text),1))])),_:1},8,["model-value","anchor","appearance","arrow","attach","delay","disabled","placement","trigger"]))}})
|
|
174
|
+
e.QButton=E,e.QButtonGroup=x,e.QButtonToggle=V,e.QIcon=$,e.QIconFont=q,e.QIconImg=z,e.QIconSvg=T,e.QInput=A,e.QLineLoader=M,e.QList=P,e.QListItem=H,e.QListItemGroup=G,e.QOverlay=te,e.QPopover=re,e.QSelect=ue,e.QSpinnerLoader=w,e.QTooltip=me,e.clickOutside=ie,e.createFramework=function(e={}){return{install:t=>{const o=e.components||{}
|
|
175
|
+
for(const e in o)t.component(e,o[e])
|
|
176
|
+
const n=e.directives||{}
|
|
177
|
+
for(const e in n)t.directive(e,n[e])
|
|
178
|
+
const a=e.defaults||{}
|
|
179
|
+
t.provide(l,a),y(t,e.themes)}}},e.defaultDarkColorScheme=s,e.defaultLightColorScheme=i,e.useTheme=function(){const e=t.inject(v)
|
|
180
|
+
if(!e)throw new Error("[framework] Could not find theme instance")
|
|
181
|
+
return e},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}))
|
|
178
182
|
//# sourceMappingURL=ui.min.js.map
|