@quidgest/ui 0.16.48 → 0.16.49
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 +1 -1
- package/dist/ui.esm.js +8 -5
- package/dist/ui.js +3 -3
- package/dist/ui.min.js +5 -5
- package/dist/ui.scss +1 -1
- package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.vue.js +21 -19
- package/esm/components/QRadioGroup/QRadioButton.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioButton.vue.js +3 -2
- 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.49
|
|
5
5
|
* (c) 2025 Quidgest - Consultores de Gestão, S.A.
|
|
6
6
|
* Released under the MIT License.
|
|
7
7
|
*/
|
|
@@ -163,9 +163,9 @@ r.value>=e.length&&y(0)}),{immediate:!0,deep:!0}),t.watch(r,(function(){_(),w()}
|
|
|
163
163
|
return t.openBlock(),t.createElementBlock("div",{id:n.id,class:t.normalizeClass(["q-carousel",n.class]),tabindex:"0",onMouseenter:x,onMouseleave:B,onKeydown:C},[e.loading?(t.openBlock(),t.createElementBlock("div",Ke,[t.createVNode(t.unref(We),{width:"100%",height:"100%"}),t.createElementVNode("div",Xe,[t.createVNode(t.unref(We),{type:"text",width:"40%",height:"24px",class:"q-carousel__skeleton-title"}),t.createVNode(t.unref(We),{type:"text",width:"60%",height:"16px",class:"q-carousel__skeleton-subtitle"})]),n.showControls?(t.openBlock(),t.createElementBlock("div",Ze,[t.createVNode(t.unref(We),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"}),t.createVNode(t.unref(We),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"})])):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[null!=(l=e.slides)&&l.length?(t.openBlock(),t.createElementBlock("div",{key:0,class:"q-carousel__track",style:t.normalizeStyle(f.value),onTouchstart:S,onTouchmove:E,onTouchend:M},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.slides,((e,a)=>(t.openBlock(),t.createElementBlock("div",{key:e.id,class:t.normalizeClass(["q-carousel__slide",{"q-carousel__slide--active":a===r.value}]),style:t.normalizeStyle(k(e)),onClick:t.withModifiers((()=>function(e){const t=window.getSelection()
|
|
164
164
|
if(null!=t&&t.toString().length)return
|
|
165
165
|
const a=n.slides[e]
|
|
166
|
-
o("slide:click",a.id)}(a)),["stop","prevent"])},[e.image?(t.openBlock(),t.createElementBlock("img",{key:0,src:e.image,alt:e.title||`Slide ${a+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,et)):t.createCommentVNode("",!0)],14,Je)))),128))],36)):(t.openBlock(),t.createElementBlock("div",tt,[t.renderSlot(e.$slots,"empty")])),e.slides[r.value]?(t.openBlock(),t.createElementBlock("div",at,[null!=(i=e.slides[r.value])&&i.title?(t.openBlock(),t.createElementBlock("h2",nt,t.toDisplayString(e.slides[r.value].title),1)):t.createCommentVNode("",!0),null!=(s=e.slides[r.value])&&s.subtitle?(t.openBlock(),t.createElementBlock("p",ot,t.toDisplayString(e.slides[r.value].subtitle),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showIndicators&&e.slides.length>1?(t.openBlock(),t.createElementBlock("ol",lt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.slides,((e,a)=>(t.openBlock(),t.createElementBlock("li",{key:e.id,class:t.normalizeClass(["q-carousel__indicator",{"q-carousel__indicator--active":a===r.value}]),"data-testid":"carousel-indicator",style:t.normalizeStyle(a===r.value?h.value:{}),"aria-label":V(a),"aria-current":a===r.value,onClick:()=>y(a)},null,14,rt)))),128))])):t.createCommentVNode("",!0),e.showControls&&e.slides.length>1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createVNode(t.unref(X),{class:"q-carousel__control q-carousel__control--prev","data-testid":"carousel-prev","aria-label":e.texts.previousText,onClick:b},{default:t.withCtx((()=>[t.createVNode(t.unref(ve),t.mergeProps({class:"q-carousel__control-icon q-carousel__control-icon--prev"},n.icons.back),null,16),t.createElementVNode("span",it,t.toDisplayString(e.texts.previousText),1)])),_:1},8,["aria-label"]),t.createVNode(t.unref(X),{class:"q-carousel__control q-carousel__control--next","data-testid":"carousel-next","aria-label":e.texts.nextText,onClick:g},{default:t.withCtx((()=>[t.createVNode(t.unref(ve),t.mergeProps({class:"q-carousel__control-icon q-carousel__control-icon--next"},n.icons.forward),null,16),t.createElementVNode("span",st,t.toDisplayString(e.texts.nextText),1)])),_:1},8,["aria-label"])],64)):t.createCommentVNode("",!0)],64))],42,Ge)}}})),dt={checked:{icon:"check"},indeterminate:{icon:"minus"}},ct=["checked","disabled","required","aria-readonly"],pt=["id","aria-checked","disabled","onKeydown"],mt=t.defineComponent({inheritAttrs:!1,__name:"QCheckbox",props:t.mergeModels({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPlacement:{default:"right"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},indeterminate:{type:Boolean},icons:{default:()=>dt},hasFocusOutline:{type:Boolean,default:!0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),o=Me(t.toRef(a,"id")),l=t.useTemplateRef("inputEl"),r=t.useTemplateRef("buttonEl"),i=t.computed((()=>["q-checkbox",`q-checkbox--${a.size}`,`q-checkbox--${a.color}`,{"q-checkbox--readonly":a.readonly,"q-checkbox--disabled":a.disabled,"q-checkbox--checked":n.value,"q-checkbox--indeterminate":a.indeterminate,"q-checkbox--focus-style":a.hasFocusOutline},a.class]))
|
|
166
|
+
o("slide:click",a.id)}(a)),["stop","prevent"])},[e.image?(t.openBlock(),t.createElementBlock("img",{key:0,src:e.image,alt:e.title||`Slide ${a+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,et)):t.createCommentVNode("",!0)],14,Je)))),128))],36)):(t.openBlock(),t.createElementBlock("div",tt,[t.renderSlot(e.$slots,"empty")])),e.slides[r.value]?(t.openBlock(),t.createElementBlock("div",at,[null!=(i=e.slides[r.value])&&i.title?(t.openBlock(),t.createElementBlock("h2",nt,t.toDisplayString(e.slides[r.value].title),1)):t.createCommentVNode("",!0),null!=(s=e.slides[r.value])&&s.subtitle?(t.openBlock(),t.createElementBlock("p",ot,t.toDisplayString(e.slides[r.value].subtitle),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showIndicators&&e.slides.length>1?(t.openBlock(),t.createElementBlock("ol",lt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.slides,((e,a)=>(t.openBlock(),t.createElementBlock("li",{key:e.id,class:t.normalizeClass(["q-carousel__indicator",{"q-carousel__indicator--active":a===r.value}]),"data-testid":"carousel-indicator",style:t.normalizeStyle(a===r.value?h.value:{}),"aria-label":V(a),"aria-current":a===r.value,onClick:()=>y(a)},null,14,rt)))),128))])):t.createCommentVNode("",!0),e.showControls&&e.slides.length>1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createVNode(t.unref(X),{class:"q-carousel__control q-carousel__control--prev","data-testid":"carousel-prev","aria-label":e.texts.previousText,onClick:b},{default:t.withCtx((()=>[t.createVNode(t.unref(ve),t.mergeProps({class:"q-carousel__control-icon q-carousel__control-icon--prev"},n.icons.back),null,16),t.createElementVNode("span",it,t.toDisplayString(e.texts.previousText),1)])),_:1},8,["aria-label"]),t.createVNode(t.unref(X),{class:"q-carousel__control q-carousel__control--next","data-testid":"carousel-next","aria-label":e.texts.nextText,onClick:g},{default:t.withCtx((()=>[t.createVNode(t.unref(ve),t.mergeProps({class:"q-carousel__control-icon q-carousel__control-icon--next"},n.icons.forward),null,16),t.createElementVNode("span",st,t.toDisplayString(e.texts.nextText),1)])),_:1},8,["aria-label"])],64)):t.createCommentVNode("",!0)],64))],42,Ge)}}})),dt={checked:{icon:"check"},indeterminate:{icon:"minus"}},ct=["checked","disabled","readonly","required","aria-readonly"],pt=["id","aria-checked","disabled","readonly","onKeydown"],mt=t.defineComponent({inheritAttrs:!1,__name:"QCheckbox",props:t.mergeModels({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPlacement:{default:"right"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},indeterminate:{type:Boolean},icons:{default:()=>dt},hasFocusOutline:{type:Boolean,default:!0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),o=Me(t.toRef(a,"id")),l=t.useTemplateRef("inputEl"),r=t.useTemplateRef("buttonEl"),i=t.computed((()=>["q-checkbox",`q-checkbox--${a.size}`,`q-checkbox--${a.color}`,{"q-checkbox--readonly":a.readonly,"q-checkbox--disabled":a.disabled,"q-checkbox--checked":n.value,"q-checkbox--indeterminate":a.indeterminate,"q-checkbox--focus-style":a.hasFocusOutline},a.class]))
|
|
167
167
|
function s(){!a.disabled&&!a.readonly&&(n.value=!n.value)}function u(){var e
|
|
168
|
-
null==(e=r.value)||e.focus()}return t.watch(n,(e=>{l.value&&(l.value.checked=!!e)})),(e,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(i.value),onClick:t.withModifiers(s,["prevent"]),onMousedown:t.withModifiers(u,["prevent"])},[a.label&&"right"!==a.labelPlacement?(t.openBlock(),t.createBlock(t.unref(wt),{key:0,for:t.unref(o),label:a.label,required:a.required},t.createSlots({_:2},[e.$slots.extras?{name:"extras",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"extras")])),key:"0"}:void 0]),1032,["for","label","required"])):t.createCommentVNode("",!0),t.createElementVNode("input",{ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:n.value,disabled:a.disabled,required:a.required,"aria-readonly":a.readonly,tabindex:"-1","aria-hidden":"true"},null,8,ct),t.createElementVNode("button",t.mergeProps({id:t.unref(o),ref:"buttonEl",role:"checkbox",type:"button",class:"q-checkbox__input","data-testid":"checkbox-button","aria-checked":a.indeterminate?"mixed":n.value,disabled:a.disabled},e.$attrs,{onClick:t.withModifiers(s,["stop","prevent"]),onKeydown:[t.withKeys(t.withModifiers(s,["prevent"]),["space"]),l[0]||(l[0]=t.withKeys(t.withModifiers((()=>{}),["prevent"]),["enter"]))]}),[n.value||e.indeterminate?(t.openBlock(),t.createBlock(t.unref(ve),t.mergeProps({key:0},n.value?a.icons.checked:a.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):t.createCommentVNode("",!0)],16,pt),a.label&&"right"===a.labelPlacement?(t.openBlock(),t.createBlock(t.unref(wt),{key:1,for:t.unref(o),label:a.label,required:a.required},t.createSlots({_:2},[e.$slots.extras?{name:"extras",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"extras")])),key:"0"}:void 0]),1032,["for","label","required"])):t.createCommentVNode("",!0)],34))}}),vt=["id"],ft=["for"],ht=B(t.defineComponent({__name:"QLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{}},setup(e){const a=e,n=t.computed((()=>["q-label",{"q-label--required":a.required},a.class]))
|
|
168
|
+
null==(e=r.value)||e.focus()}return t.watch(n,(e=>{l.value&&(l.value.checked=!!e)})),(e,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(i.value),onClick:t.withModifiers(s,["prevent"]),onMousedown:t.withModifiers(u,["prevent"])},[a.label&&"right"!==a.labelPlacement?(t.openBlock(),t.createBlock(t.unref(wt),{key:0,for:t.unref(o),label:a.label,required:a.required},t.createSlots({_:2},[e.$slots.extras?{name:"extras",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"extras")])),key:"0"}:void 0]),1032,["for","label","required"])):t.createCommentVNode("",!0),t.createElementVNode("input",{ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:n.value,disabled:a.disabled,readonly:a.readonly,required:a.required,"aria-readonly":a.readonly,tabindex:"-1","aria-hidden":"true"},null,8,ct),t.createElementVNode("button",t.mergeProps({id:t.unref(o),ref:"buttonEl",role:"checkbox",type:"button",class:"q-checkbox__input","data-testid":"checkbox-button","aria-checked":a.indeterminate?"mixed":n.value,disabled:a.disabled,readonly:a.readonly},e.$attrs,{onClick:t.withModifiers(s,["stop","prevent"]),onKeydown:[t.withKeys(t.withModifiers(s,["prevent"]),["space"]),l[0]||(l[0]=t.withKeys(t.withModifiers((()=>{}),["prevent"]),["enter"]))]}),[n.value||e.indeterminate?(t.openBlock(),t.createBlock(t.unref(ve),t.mergeProps({key:0},n.value?a.icons.checked:a.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):t.createCommentVNode("",!0)],16,pt),a.label&&"right"===a.labelPlacement?(t.openBlock(),t.createBlock(t.unref(wt),{key:1,for:t.unref(o),label:a.label,required:a.required},t.createSlots({_:2},[e.$slots.extras?{name:"extras",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"extras")])),key:"0"}:void 0]),1032,["for","label","required"])):t.createCommentVNode("",!0)],34))}}),vt=["id"],ft=["for"],ht=B(t.defineComponent({__name:"QLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{}},setup(e){const a=e,n=t.computed((()=>["q-label",{"q-label--required":a.required},a.class]))
|
|
169
169
|
return(e,o)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(n.value)},[t.renderSlot(e.$slots,"prepend"),t.createElementVNode("label",{for:a.for},[t.renderSlot(e.$slots,"default",{},(()=>[t.createTextVNode(t.toDisplayString(a.label),1)]))],8,ft),t.renderSlot(e.$slots,"append")],10,vt))}})),yt={class:"q-checkbox__label-wrapper"},gt={key:0,class:"q-field__extras"},bt=t.defineComponent({__name:"QCheckboxLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{}},setup(e){const a=e
|
|
170
170
|
return(e,n)=>(t.openBlock(),t.createElementBlock("div",yt,[t.createVNode(t.unref(ht),{class:"q-checkbox__label",for:a.for,required:a.required},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(a.label),1)])),_:1},8,["for","required"]),e.$slots.extras?(t.openBlock(),t.createElementBlock("div",gt,[t.renderSlot(e.$slots,"extras")])):t.createCommentVNode("",!0)]))}}),kt=B(mt),wt=B(bt),_t={selectColor:"Select a color"},xt=["id"],Bt={key:0,class:"q-field__prepend"},Ct={key:1,class:"q-field__append"},St={key:1,class:"q-field__extras"},Et=B(t.defineComponent({inheritAttrs:!1,__name:"QField",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},size:{default:"medium"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean}},setup(e,{expose:a}){const n=e,o=t.useTemplateRef("field"),l=t.computed((()=>n.required&&!n.readonly&&!n.disabled)),r=t.computed((()=>["q-field",`q-field--${n.size}`,{"q-field--readonly":n.readonly,"q-field--disabled":n.disabled,"q-field--required":l.value,"q-field--invalid":n.invalid},n.class]))
|
|
171
171
|
return a({fieldRef:o}),(e,a)=>(t.openBlock(),t.createElementBlock("div",{id:n.id,class:t.normalizeClass(r.value)},[n.label?(t.openBlock(),t.createBlock(t.unref(ht),{key:0,class:"q-field__label",label:n.label,for:n.for,required:n.required},{prepend:t.withCtx((()=>[t.renderSlot(e.$slots,"label.prepend")])),append:t.withCtx((()=>[t.renderSlot(e.$slots,"label.append")])),_:3},8,["label","for","required"])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"control",{},(()=>[t.createElementVNode("div",t.mergeProps({ref:"field",class:"q-field__control"},e.$attrs),[e.$slots.prepend?(t.openBlock(),t.createElementBlock("div",Bt,[t.renderSlot(e.$slots,"prepend")])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default"),e.$slots.append?(t.openBlock(),t.createElementBlock("div",Ct,[t.renderSlot(e.$slots,"append")])):t.createCommentVNode("",!0)],16)])),e.$slots.extras?(t.openBlock(),t.createElementBlock("div",St,[t.renderSlot(e.$slots,"extras")])):t.createCommentVNode("",!0)],10,xt))}})),Mt={clearValue:"Clear value"},Vt={clear:{icon:"close"}},$t=B(t.defineComponent({__name:"QClearButton",props:{id:{},class:{},icons:{default:()=>Vt},texts:{default:()=>Mt}},emits:["click"],setup(e,{emit:a}){const n=e,o=a
|
|
@@ -1486,11 +1486,11 @@ i.value.style.minWidth=`${e}px`}()}),{immediate:!0}),(e,a)=>(t.openBlock(),t.cre
|
|
|
1486
1486
|
return n.required||!(null==(e=n.field.props)||!e.required)})),d=Me(t.toRef(n,"id")),c=t.computed((()=>({id:d.value,...n.field.props,readonly:s.value,required:u.value})))
|
|
1487
1487
|
function p(){o("focus",n.field)}function m(e){l.value=e,o("field-change",e)}return(e,a)=>(t.openBlock(),t.createElementBlock("tr",{id:n.id,class:t.normalizeClass(r.value),"data-group":n.field.group,onFocusin:p},[t.createElementVNode("td",{class:t.normalizeClass(i.value),onClick:t.withModifiers(p,["prevent","stop"])},[t.createVNode(t.unref(ht),{for:t.unref(d),label:n.field.label,required:u.value,onClick:a[0]||(a[0]=t.withModifiers((()=>{}),["stop"]))},null,8,["for","label","required"])],2),t.createElementVNode("td",{class:"q-property-list__cell",onClick:t.withModifiers(p,["prevent","stop"])},[t.renderSlot(e.$slots,"default",{},(()=>[n.field.component?(t.openBlock(),t.createElementBlock("div",Bc,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.field.component),t.mergeProps(c.value,{modelValue:l.value,"onUpdate:modelValue":[a[1]||(a[1]=e=>l.value=e),m]}),null,16,["modelValue"]))])):t.createCommentVNode("",!0)]))])],42,xc))}}),Sc=["id","aria-labelledby"],Ec=["id"],Mc={class:"q-property-list-group__content"},Vc=t.defineComponent({__name:"QPropertyListGroup",props:{id:{},class:{},title:{},noToggle:{type:Boolean},icons:{default:()=>bc},texts:{}},emits:["click"],setup(e,{emit:a}){const n=e,o=a,l=t.ref(!0),r=Me(),i=t.computed((()=>l.value?n.icons.open:n.icons.close)),s=t.computed((()=>["q-property-list-group",{"q-property-list-group--no-toggle":n.noToggle},n.class]))
|
|
1488
1488
|
function u(){n.noToggle||(l.value=!l.value,o("click"))}return(e,a)=>(t.openBlock(),t.createElementBlock("tr",{id:n.id,class:t.normalizeClass(s.value),role:"group","aria-labelledby":t.unref(r),onClick:u},[t.createElementVNode("td",{id:t.unref(r),colspan:"2"},[t.createElementVNode("div",Mc,[n.noToggle?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(X),{key:0,variant:"text",onClick:u},{default:t.withCtx((()=>[t.createVNode(t.unref(ve),t.normalizeProps(t.guardReactiveProps(i.value)),null,16)])),_:1})),t.createTextVNode(" "+t.toDisplayString(n.title),1)])],8,Ec)],10,Sc))}}),$c=["id"],Dc={class:"q-property-list-panel__label"},Nc={class:"q-property-list-panel__description"},Tc={key:1,class:"q-property-list-panel__empty"},Pc=t.defineComponent({__name:"QPropertyListPanel",props:{id:{},class:{},field:{},icons:{},texts:{default:()=>gc}},setup(e){const a=e
|
|
1489
|
-
return(e,n)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(["q-property-list-panel",a.class])},[a.field?t.renderSlot(e.$slots,"default",{key:0},(()=>[t.createElementVNode("div",Dc,t.toDisplayString(a.field.label),1),t.createElementVNode("div",Nc,t.toDisplayString(a.field.description),1)])):(t.openBlock(),t.createElementBlock("div",Tc,t.toDisplayString(a.texts.emptyMessage),1))],10,$c))}}),qc=B(_c),Ac=B(Cc),Rc=B(Vc),Lc=B(Pc),zc=["id","checked","name","value","disabled"],Oc=t.defineComponent({inheritAttrs:!1,__name:"QRadioButton",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},value:{},name:{},labelPlacement:{default:"end"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},invalid:{type:Boolean}},setup(e){const a=e,n=Me(t.toRef(a,"id")),o=t.useTemplateRef("inputEl"),l=f(a.value)
|
|
1489
|
+
return(e,n)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(["q-property-list-panel",a.class])},[a.field?t.renderSlot(e.$slots,"default",{key:0},(()=>[t.createElementVNode("div",Dc,t.toDisplayString(a.field.label),1),t.createElementVNode("div",Nc,t.toDisplayString(a.field.description),1)])):(t.openBlock(),t.createElementBlock("div",Tc,t.toDisplayString(a.texts.emptyMessage),1))],10,$c))}}),qc=B(_c),Ac=B(Cc),Rc=B(Vc),Lc=B(Pc),zc=["id","checked","name","value","disabled","readonly"],Oc=t.defineComponent({inheritAttrs:!1,__name:"QRadioButton",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},value:{},name:{},labelPlacement:{default:"end"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},invalid:{type:Boolean}},setup(e){const a=e,n=Me(t.toRef(a,"id")),o=t.useTemplateRef("inputEl"),l=f(a.value)
|
|
1490
1490
|
if(!l)throw new Error("QRadioButton must be used inside a QRadioGroup")
|
|
1491
1491
|
const r=t.computed((()=>"start"===a.labelPlacement?"append":"prepend")),i=t.computed((()=>["q-radio-button","regular"!==a.size?`q-radio-button--${a.size}`:void 0,"primary"!==a.color?`q-radio-button--${a.color}`:void 0,{"q-radio-button--readonly":a.readonly,"q-radio-button--disabled":a.disabled,"q-radio-button--invalid":a.invalid},a.class]))
|
|
1492
1492
|
function s(e){(a.readonly||a.disabled)&&["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault()}function u(e){(a.readonly||a.disabled)&&e.preventDefault()}function d(e){a.readonly||a.disabled?e.preventDefault():null==l||l.toggle()}function c(){var e
|
|
1493
|
-
null==(e=o.value)||e.focus()}return(e,o)=>(t.openBlock(),t.createBlock(t.unref(ht),{for:t.unref(n),class:t.normalizeClass(i.value),label:a.label,tabindex:a.disabled?void 0:-1,onMousedown:t.withModifiers(c,["prevent"]),onClick:d},t.createSlots({[r.value]:t.withCtx((()=>[t.createElementVNode("input",t.mergeProps({id:t.unref(n),ref:"inputEl",checked:t.unref(l).isActive.value,type:"radio",class:"q-radio-button__input",name:a.name,value:e.value,disabled:a.disabled},e.$attrs,{onChange:o[0]||(o[0]=(...e)=>t.unref(l).toggle&&t.unref(l).toggle(...e)),onClick:t.withModifiers(u,["stop"]),onKeydown:s}),null,16,zc),"end"===a.labelPlacement?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0)])),_:2},["start"===a.labelPlacement?{name:"prepend",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),key:"0"}:void 0]),1032,["for","class","label","tabindex"]))}}),Ic=["id"],Fc={key:1,class:"q-field__extras"},Yc=t.defineComponent({inheritAttrs:!1,__name:"QRadioGroup",props:t.mergeModels({id:{},class:{},label:{},required:{type:Boolean},for:{},name:{},orientation:{default:"vertical"},size:{default:"regular"},columns:{default:1},disabled:{type:Boolean},readonly:{type:Boolean},invalid:{type:Boolean},hasFocusOutline:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),{active:o}=v({active:n,required:!0})
|
|
1493
|
+
null==(e=o.value)||e.focus()}return(e,o)=>(t.openBlock(),t.createBlock(t.unref(ht),{for:t.unref(n),class:t.normalizeClass(i.value),label:a.label,tabindex:a.disabled?void 0:-1,onMousedown:t.withModifiers(c,["prevent"]),onClick:d},t.createSlots({[r.value]:t.withCtx((()=>[t.createElementVNode("input",t.mergeProps({id:t.unref(n),ref:"inputEl",checked:t.unref(l).isActive.value,type:"radio",class:"q-radio-button__input",name:a.name,value:e.value,disabled:a.disabled,readonly:a.readonly},e.$attrs,{onChange:o[0]||(o[0]=(...e)=>t.unref(l).toggle&&t.unref(l).toggle(...e)),onClick:t.withModifiers(u,["stop"]),onKeydown:s}),null,16,zc),"end"===a.labelPlacement?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0)])),_:2},["start"===a.labelPlacement?{name:"prepend",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),key:"0"}:void 0]),1032,["for","class","label","tabindex"]))}}),Ic=["id"],Fc={key:1,class:"q-field__extras"},Yc=t.defineComponent({inheritAttrs:!1,__name:"QRadioGroup",props:t.mergeModels({id:{},class:{},label:{},required:{type:Boolean},for:{},name:{},orientation:{default:"vertical"},size:{default:"regular"},columns:{default:1},disabled:{type:Boolean},readonly:{type:Boolean},invalid:{type:Boolean},hasFocusOutline:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),{active:o}=v({active:n,required:!0})
|
|
1494
1494
|
t.watch(o,(e=>{n.value=e}))
|
|
1495
1495
|
const l=Me(t.toRef(a,"id")),r=Me(t.toRef(a,"name")),i=t.computed((()=>["q-radio-group",{"q-radio-group--horizontal":"horizontal"===a.orientation,"q-radio-group--focus-style":a.hasFocusOutline},a.class])),s=t.computed((()=>a.columns>1?{"--q-radio-group-columns":a.columns}:{undefined:void 0}))
|
|
1496
1496
|
return c({QRadioButton:{size:t.toRef(a,"size"),disabled:t.toRef(a,"disabled"),readonly:t.toRef(a,"readonly"),invalid:t.toRef(a,"invalid"),name:r}}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(i.value)},[a.label?(t.openBlock(),t.createBlock(t.unref(ht),{key:0,for:t.unref(l),label:a.label,required:a.required},null,8,["for","label","required"])):t.createCommentVNode("",!0),t.createElementVNode("div",t.mergeProps({id:t.unref(l),class:["q-radio-group__group",{"q-radio-group--grid":a.columns>1}],role:"radiogroup",style:s.value},e.$attrs),[t.renderSlot(e.$slots,"default")],16,Ic),e.$slots.extras?(t.openBlock(),t.createElementBlock("div",Fc,[t.renderSlot(e.$slots,"extras")])):t.createCommentVNode("",!0)],2))}}),Qc=B(Oc),Hc=B(Yc),Uc={...Mt,placeholder:"Choose...",showOptions:"Show options"},jc={...b,...Vt},Wc={key:0,ref:"badgesContainer",class:"q-select__badge-container"},Gc={key:1,class:"q-select__value"},Kc={key:1,class:"q-select__placeholder"},Xc=["id","tabindex","aria-expanded","aria-keyshortcuts"],Zc=["data-key"],Jc={key:0,class:"q-select__loader"},ep=B(t.defineComponent({inheritAttrs:!1,__name:"QSelect",props:t.mergeModels({id:{},class:{},label:{},required:{type:Boolean},for:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},items:{},groups:{default:()=>[]},clearable:{type:Boolean},inline:{type:Boolean},multiple:{type:Boolean},badges:{type:Boolean},loading:{type:Boolean},emptyValue:{},itemValue:{default:"key"},itemLabel:{default:"label"},icons:{default:()=>jc},texts:{default:()=>Uc}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["before-show","before-hide","show","hide"],["update:modelValue"]),setup(e,{emit:a}){const n=e,o=a,l=t.useModel(e,"modelValue"),r=Me(t.toRef(n,"id")),{active:i}=v({active:l,required:t.toRef(n,"required"),multiple:t.toRef(n,"multiple")}),s=t.ref(!1),u=t.ref(0),d=t.useTemplateRef("trigger"),c=t.useTemplateRef("input"),p=t.useTemplateRef("list"),m=t.useTemplateRef("content"),f=t.useTemplateRef("badgesContainer"),h=t.useTemplateRef("allBadges")
|
package/dist/ui.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QCheckbox/QCheckbox.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QCheckbox/QCheckbox.vue"],"names":[],"mappings":"AAgEA;AA8IC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAU3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,KAAK,WAAW,GAAG,cAAc,CAAC;AAoEnC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAyHT,OAAO,IAA6B;;wBAdtB,GAAG;wBACF,GAAG;;;;;;;EAkB/B;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;OASnB,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"}
|
|
@@ -3,7 +3,7 @@ import { DEFAULT_ICONS as R } from "./constants.js";
|
|
|
3
3
|
import { QIcon as z } from "../QIcon/index.js";
|
|
4
4
|
import { QCheckboxLabel as q } from "./index.js";
|
|
5
5
|
import { useId as F } from "../../composables/uid.js";
|
|
6
|
-
const I = ["checked", "disabled", "required", "aria-readonly"], K = ["id", "aria-checked", "disabled", "onKeydown"], L = /* @__PURE__ */ E({
|
|
6
|
+
const I = ["checked", "disabled", "readonly", "required", "aria-readonly"], K = ["id", "aria-checked", "disabled", "readonly", "onKeydown"], L = /* @__PURE__ */ E({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "QCheckbox",
|
|
9
9
|
props: /* @__PURE__ */ _({
|
|
@@ -26,29 +26,29 @@ const I = ["checked", "disabled", "required", "aria-readonly"], K = ["id", "aria
|
|
|
26
26
|
}),
|
|
27
27
|
emits: ["update:modelValue"],
|
|
28
28
|
setup(c) {
|
|
29
|
-
const e = c,
|
|
29
|
+
const e = c, t = g(c, "modelValue"), i = F(w(e, "id")), u = f("inputEl"), x = f("buttonEl"), C = $(() => [
|
|
30
30
|
"q-checkbox",
|
|
31
31
|
`q-checkbox--${e.size}`,
|
|
32
32
|
`q-checkbox--${e.color}`,
|
|
33
33
|
{
|
|
34
34
|
"q-checkbox--readonly": e.readonly,
|
|
35
35
|
"q-checkbox--disabled": e.disabled,
|
|
36
|
-
"q-checkbox--checked":
|
|
36
|
+
"q-checkbox--checked": t.value,
|
|
37
37
|
"q-checkbox--indeterminate": e.indeterminate,
|
|
38
38
|
"q-checkbox--focus-style": e.hasFocusOutline
|
|
39
39
|
},
|
|
40
40
|
e.class
|
|
41
41
|
]);
|
|
42
42
|
function d() {
|
|
43
|
-
!e.disabled && !e.readonly && (
|
|
43
|
+
!e.disabled && !e.readonly && (t.value = !t.value);
|
|
44
44
|
}
|
|
45
45
|
function B() {
|
|
46
|
-
var
|
|
47
|
-
(
|
|
46
|
+
var o;
|
|
47
|
+
(o = x.value) == null || o.focus();
|
|
48
48
|
}
|
|
49
|
-
return M(
|
|
50
|
-
u.value && (u.value.checked = !!
|
|
51
|
-
}), (
|
|
49
|
+
return M(t, (o) => {
|
|
50
|
+
u.value && (u.value.checked = !!o);
|
|
51
|
+
}), (o, b) => (r(), V(
|
|
52
52
|
"div",
|
|
53
53
|
{
|
|
54
54
|
class: P(C.value),
|
|
@@ -65,10 +65,10 @@ const I = ["checked", "disabled", "required", "aria-readonly"], K = ["id", "aria
|
|
|
65
65
|
_: 2
|
|
66
66
|
/* DYNAMIC */
|
|
67
67
|
}, [
|
|
68
|
-
|
|
68
|
+
o.$slots.extras ? {
|
|
69
69
|
name: "extras",
|
|
70
70
|
fn: h(() => [
|
|
71
|
-
k(
|
|
71
|
+
k(o.$slots, "extras")
|
|
72
72
|
]),
|
|
73
73
|
key: "0"
|
|
74
74
|
} : void 0
|
|
@@ -78,8 +78,9 @@ const I = ["checked", "disabled", "required", "aria-readonly"], K = ["id", "aria
|
|
|
78
78
|
ref: "inputEl",
|
|
79
79
|
type: "checkbox",
|
|
80
80
|
class: "q-checkbox__native-input",
|
|
81
|
-
checked:
|
|
81
|
+
checked: t.value,
|
|
82
82
|
disabled: e.disabled,
|
|
83
|
+
readonly: e.readonly,
|
|
83
84
|
required: e.required,
|
|
84
85
|
"aria-readonly": e.readonly,
|
|
85
86
|
tabindex: "-1",
|
|
@@ -93,9 +94,10 @@ const I = ["checked", "disabled", "required", "aria-readonly"], K = ["id", "aria
|
|
|
93
94
|
type: "button",
|
|
94
95
|
class: "q-checkbox__input",
|
|
95
96
|
"data-testid": "checkbox-button",
|
|
96
|
-
"aria-checked": e.indeterminate ? "mixed" :
|
|
97
|
-
disabled: e.disabled
|
|
98
|
-
|
|
97
|
+
"aria-checked": e.indeterminate ? "mixed" : t.value,
|
|
98
|
+
disabled: e.disabled,
|
|
99
|
+
readonly: e.readonly
|
|
100
|
+
}, o.$attrs, {
|
|
99
101
|
onClick: a(d, ["stop", "prevent"]),
|
|
100
102
|
onKeydown: [
|
|
101
103
|
v(a(d, ["prevent"]), ["space"]),
|
|
@@ -103,9 +105,9 @@ const I = ["checked", "disabled", "required", "aria-readonly"], K = ["id", "aria
|
|
|
103
105
|
}, ["prevent"]), ["enter"]))
|
|
104
106
|
]
|
|
105
107
|
}), [
|
|
106
|
-
|
|
108
|
+
t.value || o.indeterminate ? (r(), s(
|
|
107
109
|
l(z),
|
|
108
|
-
y({ key: 0 },
|
|
110
|
+
y({ key: 0 }, t.value ? e.icons.checked : e.icons.indeterminate, { class: "q-checkbox__input-icon" }),
|
|
109
111
|
null,
|
|
110
112
|
16
|
|
111
113
|
/* FULL_PROPS */
|
|
@@ -120,10 +122,10 @@ const I = ["checked", "disabled", "required", "aria-readonly"], K = ["id", "aria
|
|
|
120
122
|
_: 2
|
|
121
123
|
/* DYNAMIC */
|
|
122
124
|
}, [
|
|
123
|
-
|
|
125
|
+
o.$slots.extras ? {
|
|
124
126
|
name: "extras",
|
|
125
127
|
fn: h(() => [
|
|
126
|
-
k(
|
|
128
|
+
k(o.$slots, "extras")
|
|
127
129
|
]),
|
|
128
130
|
key: "0"
|
|
129
131
|
} : void 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QRadioButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QRadioGroup/QRadioButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QRadioButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QRadioGroup/QRadioButton.vue"],"names":[],"mappings":"AAiCA;AA4IC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AA+FjD,iBAAS,cAAc;WAmFT,OAAO,IAA6B;;yBAbrB,GAAG;yBACF,GAAG;;;;;;EAiBhC;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;OAQnB,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"}
|
|
@@ -2,7 +2,7 @@ import { defineComponent as g, toRef as k, useTemplateRef as C, computed as r, c
|
|
|
2
2
|
import { QLabel as P } from "../QLabel/index.js";
|
|
3
3
|
import { useId as _ } from "../../composables/uid.js";
|
|
4
4
|
import { useGroupItem as $ } from "../../composables/useGroup/index.js";
|
|
5
|
-
const D = ["id", "checked", "name", "value", "disabled"], G = /* @__PURE__ */ g({
|
|
5
|
+
const D = ["id", "checked", "name", "value", "disabled", "readonly"], G = /* @__PURE__ */ g({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "QRadioButton",
|
|
8
8
|
props: {
|
|
@@ -68,7 +68,8 @@ const D = ["id", "checked", "name", "value", "disabled"], G = /* @__PURE__ */ g(
|
|
|
68
68
|
class: "q-radio-button__input",
|
|
69
69
|
name: e.name,
|
|
70
70
|
value: o.value,
|
|
71
|
-
disabled: e.disabled
|
|
71
|
+
disabled: e.disabled,
|
|
72
|
+
readonly: e.readonly
|
|
72
73
|
}, o.$attrs, {
|
|
73
74
|
onChange: l[0] || (l[0] = //@ts-ignore
|
|
74
75
|
(...w) => t(n).toggle && t(n).toggle(...w)),
|