@quidgest/ui 0.7.10 → 0.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui.esm.js +46 -46
- package/dist/ui.esm.js.map +1 -1
- package/dist/ui.js +1 -1
- package/dist/ui.js.map +1 -1
- package/dist/ui.min.js +2 -2
- 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
|
@@ -122,7 +122,7 @@ for(;!x(o[l]);){if(w(l,t,o))return e
|
|
|
122
122
|
l+="next"===t?1:-1}return l}function x(e){return-2===e.tabIndex}function _(e){return e?a.items.filter((t=>t.group===e)):a.items}return t.watch((()=>a.modelValue),(e=>{r.value=e})),o({focusItem:y,getItem:function(e){return b()[e]},getAdjacentItemIndex:B,getFirstFocusableItemIndex:g,getLastFocusableItemIndex:k}),(e,o)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d.value),{ref_key:"listRef",ref:c,class:t.normalizeClass(["q-list",{"q-list--disabled":a.disabled}]),role:"listbox",tabindex:a.disabled?-1:0,onFocus:m,onMousedown:p,onMouseup:f,onKeydown:v},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(o=>(t.openBlock(),t.createBlock(t.unref(J),{key:o.id,title:o.title,disabled:o.disabled},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_(o.id),(o=>(t.openBlock(),t.createBlock(t.unref(Z),{key:o[a.itemValue],value:o[a.itemValue],label:o[a.itemLabel],icon:o.icon,disabled:a.disabled||o.disabled,highlighted:a.highlighted===o[a.itemValue],selected:r.value===o[a.itemValue],onSelect:u},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"item",{item:o})])),_:2},1032,["value","label","icon","disabled","highlighted","selected"])))),128))])),_:2},1032,["title","disabled"])))),128))])),_:3},40,["class","tabindex"]))}})
|
|
123
123
|
let P=0
|
|
124
124
|
function O(){return"uid-"+ ++P}const U=["id","tabindex","aria-label","aria-selected"],H={class:"q-list-item__check-container"},j={check:{icon:"check"}},W=t.defineComponent({__name:"QListItem",props:{value:{type:[String,Number,Boolean,Symbol]},label:{},icon:{default:void 0},selected:{type:Boolean},highlighted:{type:Boolean},icons:{default:()=>j},disabled:{type:Boolean}},emits:["select"],setup(e,{emit:o}){const l=o,n=e,a=O()
|
|
125
|
-
function r(){n.disabled||l("select",n.value)}function i(e){"Tab"===e.key&&r(),("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation(),r())}return(e,o)=>(t.openBlock(),t.createElementBlock("li",{id:t.unref(a),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:i,onClick:t.withModifiers(r,["stop","prevent"])},[t.renderSlot(e.$slots,"default",{},(()=>[n.icon?(t.openBlock(),t.createBlock(t.unref(Q),t.normalizeProps(t.mergeProps({key:0},n.icon)),null,16)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(n.label)
|
|
125
|
+
function r(){n.disabled||l("select",n.value)}function i(e){"Tab"===e.key&&r(),("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation(),r())}return(e,o)=>(t.openBlock(),t.createElementBlock("li",{id:t.unref(a),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:i,onClick:t.withModifiers(r,["stop","prevent"])},[t.renderSlot(e.$slots,"default",{},(()=>[n.icon?(t.openBlock(),t.createBlock(t.unref(Q),t.normalizeProps(t.mergeProps({key:0},n.icon)),null,16)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(n.label),1)])),t.createElementVNode("div",H,[n.selected?(t.openBlock(),t.createBlock(t.unref(Q),t.mergeProps({key:0},n.icons.check,{class:"q-list-item__check"}),null,16)):t.createCommentVNode("",!0)])],42,U))}}),G=["aria-labelledby"],K=["id"],X=t.defineComponent({__name:"QListItemGroup",props:{title:{default:""},disabled:{type:Boolean}},setup(e){const o=e,l=O()
|
|
126
126
|
return(e,n)=>(t.openBlock(),t.createElementBlock("ul",{class:"q-list-item-group",role:"group","aria-labelledby":o.title?t.unref(l):void 0},[o.title?(t.openBlock(),t.createElementBlock("li",{key:0,id:t.unref(l),class:"q-list-item-group__title",role:"presentation"},t.toDisplayString(o.title),9,K)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default")],8,G))}}),Y=B(R),Z=B(W),J=B(X)
|
|
127
127
|
function ee(e,t,o="right",l){const n=e.getBoundingClientRect(),a=n.x+window.scrollX,r=n.y+window.scrollY,i=null==t?void 0:t.getBoundingClientRect(),d=(null==i?void 0:i.width)??0,s=(null==i?void 0:i.height)??0
|
|
128
128
|
let c=o
|
|
@@ -191,7 +191,7 @@ if(void 0!==i.value){const t=v.value.findIndex((e=>e[a.itemValue]===i.value))
|
|
|
191
191
|
c.value=-1===t?null==(e=p.value)?void 0:e.getFirstFocusableItemIndex():t}else c.value=null==(t=p.value)?void 0:t.getFirstFocusableItemIndex()}function $(e){var t,o,l;(null==(t=f.value)||!t.contains(e.relatedTarget))&&(null==(l=null==(o=u.value)?void 0:o.fieldRef)||!l.contains(e.relatedTarget))&&(C(),B())}function L(){var e,t
|
|
192
192
|
null==(t=null==(e=u.value)?void 0:e.inputRef)||t.focus()}function I(){n("show")}function z(){n("hide")}function D(e){var t
|
|
193
193
|
const o=null==(t=p.value)?void 0:t.getItem(e)
|
|
194
|
-
null==o||o.scrollIntoView({block:"nearest",inline:"start"})}return t.watch((()=>a.modelValue),(e=>{i.value=e})),t.watch(c,(e=>{void 0!==e&&D(e)})),t.watch(s,(e=>{!e&&m.value?S():d.value&&"automatic"===a.selectionMode&&t.nextTick(q),n("update:inputValue",e)})),o({triggerEl:u}),(e,o)=>{var l,n
|
|
194
|
+
null==o||o.scrollIntoView({block:"nearest",inline:"start"})}return t.watch((()=>a.modelValue),(e=>{i.value=e,B()})),t.watch(c,(e=>{void 0!==e&&D(e)})),t.watch(s,(e=>{!e&&m.value?S():d.value&&"automatic"===a.selectionMode&&t.nextTick(q),n("update:inputValue",e)})),o({triggerEl:u}),(e,o)=>{var l,n
|
|
195
195
|
return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(ve),{modelValue:s.value,"onUpdate:modelValue":o[0]||(o[0]=e=>s.value=e),id:a.id,label:a.label,required:a.required,ref_key:"triggerEl",ref:u,role:"combobox",placeholder:a.placeholder,class:t.normalizeClass(["q-combobox",...t.unref(r).class]),readonly:a.readonly,disabled:a.disabled,"aria-expanded":d.value,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":b.value,size:a.size,onClick:V,onFocusout:$,onKeydown:t.withModifiers(E,["stop"])},t.createSlots({"label.prepend":t.withCtx((()=>[t.renderSlot(e.$slots,"label.prepend")])),"label.append":t.withCtx((()=>[t.renderSlot(e.$slots,"label.append")])),_:2},[e.$slots.prepend?{name:"prepend",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"prepend")])),key:"0"}:void 0,m.value&&s.value||e.$slots.append?{name:"append",fn:t.withCtx((()=>[m.value&&s.value?(t.openBlock(),t.createBlock(t.unref(Q),t.mergeProps({key:0},a.icons.clear,{class:"q-combobox__clear",onClick:t.withModifiers(S,["stop","prevent"])}),null,16)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"append")])),key:"1"}:void 0,e.$slots.extras?{name:"extras",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"extras")])),key:"2"}:void 0]),1032,["modelValue","id","label","required","placeholder","class","readonly","disabled","aria-expanded","aria-activedescendant","size"]),null!=(l=u.value)&&l.fieldRef?(t.openBlock(),t.createBlock(t.unref(re),{key:0,"model-value":d.value,spy:"",trigger:"manual",placement:"bottom",width:"anchor",offset:4,anchor:null==(n=u.value)?void 0:n.fieldRef,onEnter:I,onLeave:z},{default:t.withCtx((()=>{var l
|
|
196
196
|
return[t.createElementVNode("div",{ref_key:"contentRef",ref:f,class:"q-select__body",onFocusout:$},[t.renderSlot(e.$slots,"body.prepend"),a.loading?(t.openBlock(),t.createBlock(t.unref(x),{key:0,class:"q-select__loader",size:24})):v.value.length?(t.openBlock(),t.createBlock(t.unref(Y),{key:1,ref_key:"listRef",ref:p,class:"q-select__items",modelValue:i.value,"onUpdate:modelValue":[o[1]||(o[1]=e=>i.value=e),w],highlighted:null==(l=y.value)?void 0:l[a.itemValue],items:v.value,groups:e.groups,"item-label":a.itemLabel,"item-value":a.itemValue,onMouseup:L},{item:t.withCtx((({item:o})=>[t.renderSlot(e.$slots,"item",{item:o})])),_:3},8,["modelValue","highlighted","items","groups","item-label","item-value"])):(t.openBlock(),t.createElementBlock("div",ye,t.toDisplayString(e.texts.noData),1)),t.renderSlot(e.$slots,"body.append")],544)]})),_:3},8,["model-value","anchor"])):t.createCommentVNode("",!0)],64)}}})),we={key:0,class:"q-input-group__prepend"},Be={key:0},xe={key:1,class:"q-input-group__append"},_e={key:0},Ce=B(t.defineComponent({__name:"QInputGroup",props:{id:{default:()=>O()},label:{default:""},readonly:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},prependIcon:{default:void 0},appendIcon:{default:void 0},size:{default:"large"}},setup(e){const o=e
|
|
197
197
|
return r({QField:{size:"block"}}),(e,l)=>(t.openBlock(),t.createBlock(t.unref(fe),{class:"q-input-group",id:o.id,label:o.label,readonly:o.readonly,disabled:o.disabled,required:o.required,size:o.size},{default:t.withCtx((()=>[e.$slots.prepend||o.prependIcon?(t.openBlock(),t.createElementBlock("div",we,[o.prependIcon?(t.openBlock(),t.createElementBlock("span",Be,[t.createVNode(t.unref(Q),t.normalizeProps(t.guardReactiveProps(o.prependIcon)),null,16)])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"prepend")])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default"),e.$slots.append||o.appendIcon?(t.openBlock(),t.createElementBlock("div",xe,[o.appendIcon?(t.openBlock(),t.createElementBlock("span",_e,[t.createVNode(t.unref(Q),t.normalizeProps(t.guardReactiveProps(o.appendIcon)),null,16)])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"append")])):t.createCommentVNode("",!0)])),_:3},8,["id","label","readonly","disabled","required","size"]))}})),Se={class:"q-line-loader"}
|