@quidgest/ui 0.17.6 → 0.17.8
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
CHANGED
package/dist/ui.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.17.
|
|
2
|
+
* Quidgest UI v0.17.8
|
|
3
3
|
* (c) 2026 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -164,8 +164,8 @@ const e=f-m
|
|
|
164
164
|
Math.abs(e)>a.swipeThreshold&&(e>0?V():A()),f=0,m=0,Q()}function j(e){return a.texts.goToSlide.replace("{0}",`${e+1}`)}return Y(()=>a.slides,function(e){if(0===e.length)return d.value=0,u.value=0,void z()
|
|
165
165
|
d.value>=e.length&&L(0)},{immediate:!0,deep:!0}),Y(d,function(){z(),Q()}),Y(u,e=>{e!==d.value&&L(e)}),$(Q),M(z),(l,n)=>(B(),s("div",{id:a.id,class:_(["q-carousel",a.class]),tabindex:"0",onMouseenter:F,onMouseleave:H,onKeydown:U},[t.loading?(B(),s("div",Jt,[c(P(Kt),{width:"100%",height:"100%"}),r("div",Xt,[c(P(Kt),{type:"text",width:"40%",height:"24px",class:"q-carousel__skeleton-title"}),c(P(Kt),{type:"text",width:"60%",height:"16px",class:"q-carousel__skeleton-subtitle"})]),a.showControls?(B(),s("div",el,[c(P(Kt),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"}),c(P(Kt),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"})])):i("",!0)])):(B(),s(e,{key:1},[t.slides?.length?(B(),s("div",{key:0,class:"q-carousel__track",style:q(x.value),onTouchstart:W,onTouchmove:O,onTouchend:N},[(B(!0),s(e,null,E(t.slides,(e,t)=>(B(),s("div",{key:e.id,class:_(["q-carousel__slide",{"q-carousel__slide--active":t===d.value}]),style:q(T(e)),onClick:X(()=>function(e){if(window.getSelection()?.toString().length)return
|
|
166
166
|
const t=a.slides[e]
|
|
167
|
-
o("slide:click",t.id)}(t),["stop","prevent"])},[e.image?(B(),s("img",{key:0,src:e.image,alt:e.title||`Slide ${t+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,ll)):i("",!0)],14,tl))),128))],36)):(B(),s("div",al,[S(l.$slots,"empty")])),t.slides[d.value]?(B(),s("div",nl,[t.slides[d.value]?.title?(B(),s("h2",ol,I(t.slides[d.value].title),1)):i("",!0),t.slides[d.value]?.subtitle?(B(),s("p",il,I(t.slides[d.value].subtitle),1)):i("",!0)])):i("",!0),t.showIndicators&&t.slides.length>1?(B(),s("ol",sl,[(B(!0),s(e,null,E(t.slides,(e,t)=>(B(),s("li",{key:e.id,class:_(["q-carousel__indicator",{"q-carousel__indicator--active":t===d.value}]),"data-testid":"carousel-indicator",style:q(t===d.value?C.value:{}),"aria-label":j(t),"aria-current":t===d.value,onClick:()=>L(t)},null,14,rl))),128))])):i("",!0),t.showControls&&t.slides.length>1?(B(),s(e,{key:4},[c(P(Ge),{class:"q-carousel__control q-carousel__control--prev","data-testid":"carousel-prev","aria-label":t.texts.previousText,onClick:A},{default:K(()=>[c(P(pt),b({class:"q-carousel__control-icon q-carousel__control-icon--prev"},a.icons.back),null,16),r("span",ul,I(t.texts.previousText),1)]),_:1},8,["aria-label"]),c(P(Ge),{class:"q-carousel__control q-carousel__control--next","data-testid":"carousel-next","aria-label":t.texts.nextText,onClick:V},{default:K(()=>[c(P(pt),b({class:"q-carousel__control-icon q-carousel__control-icon--next"},a.icons.forward),null,16),r("span",dl,I(t.texts.nextText),1)]),_:1},8,["aria-label"])],64)):i("",!0)],64))],42,Zt))}})),vl={checked:{icon:"check"},indeterminate:{icon:"minus"}},pl=["checked","disabled","readonly","required","aria-readonly"],fl=["id","aria-checked","disabled","readonly","onKeydown"],ml=/*@__PURE__*/v({inheritAttrs:!1,__name:"QCheckbox",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},labelPlacement:{default:"right"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},indeterminate:{type:Boolean},icons:{default:()=>vl},hasFocusOutline:{type:Boolean,default:!0},borderless:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=R(e,"modelValue"),a=Dt(Q(t,"id")),d=W("inputEl"),c=W("buttonEl"),v=n(()=>["q-checkbox",`q-checkbox--${t.size}`,`q-checkbox--${t.color}`,{"q-checkbox--readonly":t.readonly,"q-checkbox--disabled":t.disabled,"q-checkbox--checked":l.value,"q-checkbox--indeterminate":t.indeterminate,"q-checkbox--focus-style":t.hasFocusOutline,"q-checkbox--borderless":t.borderless},t.class])
|
|
168
|
-
function p(){t.disabled||t.readonly||(l.value=!l.value)}function f(){c.value?.focus()}return Y(l,e=>{d.value&&(d.value.checked=!!e)}),(n,d)=>(B(),s("div",{class:_(v.value),onClick:X(p,["prevent"]),onMousedown:X(f,["prevent"])},[t.label&&"right"!==t.labelPlacement?(B(),o(P(ql),{key:0,for:P(a),label:t.label,required:t.required},u({_:2},[n.$slots.extras?{name:"extras",fn:K(()=>[S(n.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):i("",!0),r("input",{ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:l.value,disabled:t.disabled,readonly:t.readonly,required:t.required,"aria-readonly":t.readonly,tabindex:"-1","aria-hidden":"true"},null,8,pl),r("button",b({id:P(a),ref:"buttonEl",role:"checkbox",type:"button",class:"q-checkbox__input","data-testid":"checkbox-button","aria-checked":t.indeterminate?"mixed":l.value,disabled:t.disabled,readonly:t.readonly},n.$attrs,{onClick:X(p,["stop","prevent"]),onKeydown:[J(X(p,["prevent"]),["space"]),d[0]||(d[0]=J(X(()=>{},["prevent"]),["enter"]))]}),[l.value||e.indeterminate?(B(),o(P(pt),b({key:0},l.value?t.icons.checked:t.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):i("",!0)],16,fl),t.label&&"right"===t.labelPlacement?(B(),o(P(ql),{key:1,for:P(a),label:t.label,required:t.required},u({_:2},[n.$slots.extras?{name:"extras",fn:K(()=>[S(n.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):i("",!0)],34))}}),hl=["id"],yl=["for"],gl=_e(/*@__PURE__*/v({__name:"QLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const t=e,l=n(()=>["q-label",t.labelPosition?`q-label--${t.labelPosition}`:"",{"q-label--required":t.required},t.class])
|
|
167
|
+
o("slide:click",t.id)}(t),["stop","prevent"])},[e.image?(B(),s("img",{key:0,src:e.image,alt:e.title||`Slide ${t+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,ll)):i("",!0)],14,tl))),128))],36)):(B(),s("div",al,[S(l.$slots,"empty")])),t.slides[d.value]?(B(),s("div",nl,[t.slides[d.value]?.title?(B(),s("h2",ol,I(t.slides[d.value].title),1)):i("",!0),t.slides[d.value]?.subtitle?(B(),s("p",il,I(t.slides[d.value].subtitle),1)):i("",!0)])):i("",!0),t.showIndicators&&t.slides.length>1?(B(),s("ol",sl,[(B(!0),s(e,null,E(t.slides,(e,t)=>(B(),s("li",{key:e.id,class:_(["q-carousel__indicator",{"q-carousel__indicator--active":t===d.value}]),"data-testid":"carousel-indicator",style:q(t===d.value?C.value:{}),"aria-label":j(t),"aria-current":t===d.value,onClick:()=>L(t)},null,14,rl))),128))])):i("",!0),t.showControls&&t.slides.length>1?(B(),s(e,{key:4},[c(P(Ge),{class:"q-carousel__control q-carousel__control--prev","data-testid":"carousel-prev","aria-label":t.texts.previousText,onClick:A},{default:K(()=>[c(P(pt),b({class:"q-carousel__control-icon q-carousel__control-icon--prev"},a.icons.back),null,16),r("span",ul,I(t.texts.previousText),1)]),_:1},8,["aria-label"]),c(P(Ge),{class:"q-carousel__control q-carousel__control--next","data-testid":"carousel-next","aria-label":t.texts.nextText,onClick:V},{default:K(()=>[c(P(pt),b({class:"q-carousel__control-icon q-carousel__control-icon--next"},a.icons.forward),null,16),r("span",dl,I(t.texts.nextText),1)]),_:1},8,["aria-label"])],64)):i("",!0)],64))],42,Zt))}})),vl={checked:{icon:"check"},indeterminate:{icon:"minus"}},pl=["checked","disabled","readonly","required","aria-label","aria-readonly"],fl=["id","aria-label","aria-checked","disabled","readonly","onKeydown"],ml=/*@__PURE__*/v({inheritAttrs:!1,__name:"QCheckbox",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},labelPlacement:{default:"right"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},indeterminate:{type:Boolean},icons:{default:()=>vl},hasFocusOutline:{type:Boolean,default:!0},borderless:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=R(e,"modelValue"),a=Dt(Q(t,"id")),d=W("inputEl"),c=W("buttonEl"),v=n(()=>["q-checkbox",`q-checkbox--${t.size}`,`q-checkbox--${t.color}`,{"q-checkbox--readonly":t.readonly,"q-checkbox--disabled":t.disabled,"q-checkbox--checked":l.value,"q-checkbox--indeterminate":t.indeterminate,"q-checkbox--focus-style":t.hasFocusOutline,"q-checkbox--borderless":t.borderless},t.class])
|
|
168
|
+
function p(){t.disabled||t.readonly||(l.value=!l.value)}function f(){c.value?.focus()}return Y(l,e=>{d.value&&(d.value.checked=!!e)}),(n,d)=>(B(),s("div",{class:_(v.value),onClick:X(p,["prevent"]),onMousedown:X(f,["prevent"])},[t.label&&"right"!==t.labelPlacement?(B(),o(P(ql),{key:0,for:P(a),label:t.label,required:t.required},u({_:2},[n.$slots.extras?{name:"extras",fn:K(()=>[S(n.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):i("",!0),r("input",{ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:l.value,disabled:t.disabled,readonly:t.readonly,required:t.required,"aria-label":t.label,"aria-readonly":t.readonly,tabindex:"-1","aria-hidden":"true"},null,8,pl),r("button",b({id:P(a),ref:"buttonEl",role:"checkbox",type:"button",class:"q-checkbox__input","data-testid":"checkbox-button","aria-label":t.label,"aria-checked":t.indeterminate?"mixed":l.value,disabled:t.disabled,readonly:t.readonly},n.$attrs,{onClick:X(p,["stop","prevent"]),onKeydown:[J(X(p,["prevent"]),["space"]),d[0]||(d[0]=J(X(()=>{},["prevent"]),["enter"]))]}),[l.value||e.indeterminate?(B(),o(P(pt),b({key:0},l.value?t.icons.checked:t.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):i("",!0)],16,fl),t.label&&"right"===t.labelPlacement?(B(),o(P(ql),{key:1,for:P(a),label:t.label,required:t.required},u({_:2},[n.$slots.extras?{name:"extras",fn:K(()=>[S(n.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):i("",!0)],34))}}),hl=["id"],yl=["for"],gl=_e(/*@__PURE__*/v({__name:"QLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const t=e,l=n(()=>["q-label",t.labelPosition?`q-label--${t.labelPosition}`:"",{"q-label--required":t.required},t.class])
|
|
169
169
|
return(e,a)=>(B(),s("div",{id:t.id,class:_(l.value)},[S(e.$slots,"prepend"),t.label||e.$slots.default?(B(),s("label",{key:0,for:t.for},[S(e.$slots,"default",{},()=>[d(I(t.label),1)])],8,yl)):S(e.$slots,"default",{key:1}),S(e.$slots,"append")],10,hl))}})),bl={class:"q-checkbox__label-wrapper"},kl={key:0,class:"q-field__extras"},_l=/*@__PURE__*/v({__name:"QCheckboxLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const t=e
|
|
170
170
|
return(e,l)=>(B(),s("div",bl,[c(P(gl),{class:"q-checkbox__label",for:t.for,label:t.label,required:t.required},null,8,["for","label","required"]),e.$slots.extras?(B(),s("div",kl,[S(e.$slots,"extras")])):i("",!0)]))}}),wl=_e(ml),ql=_e(_l),xl={selectColor:"Select a color"},$l=["id"],Ml={key:0,class:"q-field__prepend"},Bl={key:1,class:"q-field__append"},Cl={key:1,class:"q-field__extras"},Ll=_e(/*@__PURE__*/v({inheritAttrs:!1,__name:"QField",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{default:"topleft"},size:{default:"medium"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean}},setup(e,{expose:t}){const l=e,a=W("field"),u=n(()=>l.required&&!l.readonly&&!l.disabled),d=n(()=>["q-field",`q-field--${l.size}`,`q-field--label-${l.labelPosition}`,{"q-field--readonly":l.readonly,"q-field--disabled":l.disabled,"q-field--required":u.value,"q-field--invalid":l.invalid},l.class])
|
|
171
171
|
return t({fieldRef:a}),(e,t)=>(B(),s("div",{id:l.id,class:_(d.value)},[l.label?(B(),o(P(gl),{key:0,class:"q-field__label",label:l.label,"label-position":l.labelPosition,for:l.for,required:l.required},{prepend:K(()=>[S(e.$slots,"label.prepend")]),append:K(()=>[S(e.$slots,"label.append")]),_:3},8,["label","label-position","for","required"])):i("",!0),S(e.$slots,"control",{},()=>[r("div",b({ref:"field",class:"q-field__control"},e.$attrs),[e.$slots.prepend?(B(),s("div",Ml,[S(e.$slots,"prepend")])):i("",!0),S(e.$slots,"default"),e.$slots.append?(B(),s("div",Bl,[S(e.$slots,"append")])):i("",!0)],16)]),e.$slots.extras?(B(),s("div",Cl,[S(e.$slots,"extras")])):i("",!0)],10,$l))}})),Dl={clearValue:"Clear value"},El={clear:{icon:"close"}},Sl=_e(/*@__PURE__*/v({__name:"QClearButton",props:{id:{},class:{},icons:{default:()=>El},texts:{default:()=>Dl}},emits:["click"],setup(e,{emit:t}){const l=e,a=t
|
package/dist/ui.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.17.
|
|
2
|
+
* Quidgest UI v0.17.8
|
|
3
3
|
* (c) 2026 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).QuidgestUI={},e.Vue)}(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})
|
|
7
7
|
var o=Object.defineProperty,l=(e,t)=>{let l={}
|
|
8
8
|
for(var n in e)o(l,n,{get:e[n],enumerable:!0})
|
|
9
9
|
return t||o(l,Symbol.toStringTag,{value:"Module"}),l},n={primary:"#008ad2",primaryLight:"#cde5ff",primaryDark:"#006398",secondary:"#001d31",secondaryLight:"#e6eef3",secondaryDark:"#001425",highlight:"#ff8241",highlightLight:"#ffe4d6",highlightDark:"#cc4700",info:"#17a2b8",infoLight:"#bceff7",infoDark:"#11798a",success:"#28a745",successLight:"#c2f0cd",successDark:"#1e7d34",warning:"#ffa900",warningLight:"#ffeabf",warningDark:"#bf7f00",danger:"#b71c1c",dangerLight:"#f7cccc",dangerDark:"#891515",background:"#fff",container:"#fff",neutral:"#7c858d",neutralLight:"#c4c5ca",neutralDark:"#40474f",onPrimary:"#fff",onPrimaryLight:"#202428",onPrimaryDark:"#fff",onSecondary:"#fff",onSecondaryLight:"#202428",onSecondaryDark:"#fff",onHighlight:"#fff",onHighlightLight:"#202428",onHighlightDark:"#fff",onInfo:"#fff",onInfoLight:"#202428",onInfoDark:"#fff",onSuccess:"#fff",onSuccessLight:"#202428",onSuccessDark:"#fff",onWarning:"#fff",onWarningLight:"#202428",onWarningDark:"#fff",onDanger:"#fff",onDangerLight:"#202428",onDangerDark:"#fff",onBackground:"#202428",onContainer:"#202428",onNeutral:"#fff",onNeutralLight:"#202428",onNeutralDark:"#fff"},a={primary:"#4da6e0",primaryLight:"#1a2832",primaryDark:"#87c5f0",secondary:"#b8d4e6",secondaryLight:"#1a2832",secondaryDark:"#e6f2ff",highlight:"#ff9966",highlightLight:"#2d1a0f",highlightDark:"#ffb899",info:"#4cb8d1",infoLight:"#1f2a2d",infoDark:"#7dcce0",success:"#5cb85c",successLight:"#1e2a20",successDark:"#85d085",warning:"#ffcc4d",warningLight:"#332a1a",warningDark:"#ffd966",danger:"#e74c3c",dangerLight:"#2d1a1a",dangerDark:"#f17066",background:"#121212",container:"#1e1e1e",neutral:"#9ca3ab",neutralLight:"#2a2d31",neutralDark:"#c8ced6",onPrimary:"#000",onPrimaryLight:"#e0e0e0",onPrimaryDark:"#000",onSecondary:"#000",onSecondaryLight:"#e0e0e0",onSecondaryDark:"#000",onHighlight:"#000",onHighlightLight:"#e0e0e0",onHighlightDark:"#000",onInfo:"#000",onInfoLight:"#e0e0e0",onInfoDark:"#000",onSuccess:"#000",onSuccessLight:"#e0e0e0",onSuccessDark:"#000",onWarning:"#000",onWarningLight:"#e0e0e0",onWarningDark:"#000",onDanger:"#000",onDangerLight:"#e0e0e0",onDangerDark:"#000",onBackground:"#e0e0e0",onContainer:"#e0e0e0",onNeutral:"#000",onNeutralLight:"#e0e0e0",onNeutralDark:"#000"},r=l({defaultDarkColorScheme:()=>a,defaultLightColorScheme:()=>n})
|
|
@@ -163,8 +163,8 @@ const e=c-u
|
|
|
163
163
|
Math.abs(e)>l.swipeThreshold&&(e>0?y():k()),c=0,u=0,B()}function S(e){return l.texts.goToSlide.replace("{0}",`${e+1}`)}return(0,t.watch)(()=>l.slides,function(e){if(0===e.length)return r.value=0,a.value=0,void w()
|
|
164
164
|
r.value>=e.length&&g(0)},{immediate:!0,deep:!0}),(0,t.watch)(r,function(){w(),B()}),(0,t.watch)(a,e=>{e!==r.value&&g(e)}),(0,t.onMounted)(B),(0,t.onUnmounted)(w),(o,a)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{id:l.id,class:(0,t.normalizeClass)(["q-carousel",l.class]),tabindex:"0",onMouseenter:_,onMouseleave:x,onKeydown:C},[e.loading?((0,t.openBlock)(),(0,t.createElementBlock)("div",et,[(0,t.createVNode)((0,t.unref)(Je),{width:"100%",height:"100%"}),(0,t.createElementVNode)("div",tt,[(0,t.createVNode)((0,t.unref)(Je),{type:"text",width:"40%",height:"24px",class:"q-carousel__skeleton-title"}),(0,t.createVNode)((0,t.unref)(Je),{type:"text",width:"60%",height:"16px",class:"q-carousel__skeleton-subtitle"})]),l.showControls?((0,t.openBlock)(),(0,t.createElementBlock)("div",ot,[(0,t.createVNode)((0,t.unref)(Je),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"}),(0,t.createVNode)((0,t.unref)(Je),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"})])):(0,t.createCommentVNode)("",!0)])):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[e.slides?.length?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:"q-carousel__track",style:(0,t.normalizeStyle)(v.value),onTouchstart:q,onTouchmove:V,onTouchend:E},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.slides,(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:e.id,class:(0,t.normalizeClass)(["q-carousel__slide",{"q-carousel__slide--active":o===r.value}]),style:(0,t.normalizeStyle)(b(e)),onClick:(0,t.withModifiers)(()=>function(e){if(window.getSelection()?.toString().length)return
|
|
165
165
|
const t=l.slides[e]
|
|
166
|
-
n("slide:click",t.id)}(o),["stop","prevent"])},[e.image?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,src:e.image,alt:e.title||`Slide ${o+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,nt)):(0,t.createCommentVNode)("",!0)],14,lt))),128))],36)):((0,t.openBlock)(),(0,t.createElementBlock)("div",at,[(0,t.renderSlot)(o.$slots,"empty")])),e.slides[r.value]?((0,t.openBlock)(),(0,t.createElementBlock)("div",rt,[e.slides[r.value]?.title?((0,t.openBlock)(),(0,t.createElementBlock)("h2",it,(0,t.toDisplayString)(e.slides[r.value].title),1)):(0,t.createCommentVNode)("",!0),e.slides[r.value]?.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)("p",st,(0,t.toDisplayString)(e.slides[r.value].subtitle),1)):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),e.showIndicators&&e.slides.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("ol",ct,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.slides,(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:e.id,class:(0,t.normalizeClass)(["q-carousel__indicator",{"q-carousel__indicator--active":o===r.value}]),"data-testid":"carousel-indicator",style:(0,t.normalizeStyle)(o===r.value?h.value:{}),"aria-label":S(o),"aria-current":o===r.value,onClick:()=>g(o)},null,14,ut))),128))])):(0,t.createCommentVNode)("",!0),e.showControls&&e.slides.length>1?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:4},[(0,t.createVNode)((0,t.unref)(Z),{class:"q-carousel__control q-carousel__control--prev","data-testid":"carousel-prev","aria-label":e.texts.previousText,onClick:k},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({class:"q-carousel__control-icon q-carousel__control-icon--prev"},l.icons.back),null,16),(0,t.createElementVNode)("span",dt,(0,t.toDisplayString)(e.texts.previousText),1)]),_:1},8,["aria-label"]),(0,t.createVNode)((0,t.unref)(Z),{class:"q-carousel__control q-carousel__control--next","data-testid":"carousel-next","aria-label":e.texts.nextText,onClick:y},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({class:"q-carousel__control-icon q-carousel__control-icon--next"},l.icons.forward),null,16),(0,t.createElementVNode)("span",pt,(0,t.toDisplayString)(e.texts.nextText),1)]),_:1},8,["aria-label"])],64)):(0,t.createCommentVNode)("",!0)],64))],42,Xe))}})),ft={checked:{icon:"check"},indeterminate:{icon:"minus"}},vt=["checked","disabled","readonly","required","aria-readonly"],ht=["id","aria-checked","disabled","readonly","onKeydown"],gt=(0,t.defineComponent)({inheritAttrs:!1,__name:"QCheckbox",props:(0,t.mergeModels)({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},labelPlacement:{default:"right"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},indeterminate:{type:Boolean},icons:{default:()=>ft},hasFocusOutline:{type:Boolean,default:!0},borderless:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,l=(0,t.useModel)(e,"modelValue"),n=Ne((0,t.toRef)(o,"id")),a=(0,t.useTemplateRef)("inputEl"),r=(0,t.useTemplateRef)("buttonEl"),i=(0,t.computed)(()=>["q-checkbox",`q-checkbox--${o.size}`,`q-checkbox--${o.color}`,{"q-checkbox--readonly":o.readonly,"q-checkbox--disabled":o.disabled,"q-checkbox--checked":l.value,"q-checkbox--indeterminate":o.indeterminate,"q-checkbox--focus-style":o.hasFocusOutline,"q-checkbox--borderless":o.borderless},o.class])
|
|
167
|
-
function s(){o.disabled||o.readonly||(l.value=!l.value)}function c(){r.value?.focus()}return(0,t.watch)(l,e=>{a.value&&(a.value.checked=!!e)}),(a,r)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(i.value),onClick:(0,t.withModifiers)(s,["prevent"]),onMousedown:(0,t.withModifiers)(c,["prevent"])},[o.label&&"right"!==o.labelPlacement?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ct),{key:0,for:(0,t.unref)(n),label:o.label,required:o.required},(0,t.createSlots)({_:2},[a.$slots.extras?{name:"extras",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(a.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("input",{ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:l.value,disabled:o.disabled,readonly:o.readonly,required:o.required,"aria-readonly":o.readonly,tabindex:"-1","aria-hidden":"true"},null,8,vt),(0,t.createElementVNode)("button",(0,t.mergeProps)({id:(0,t.unref)(n),ref:"buttonEl",role:"checkbox",type:"button",class:"q-checkbox__input","data-testid":"checkbox-button","aria-checked":o.indeterminate?"mixed":l.value,disabled:o.disabled,readonly:o.readonly},a.$attrs,{onClick:(0,t.withModifiers)(s,["stop","prevent"]),onKeydown:[(0,t.withKeys)((0,t.withModifiers)(s,["prevent"]),["space"]),r[0]||(r[0]=(0,t.withKeys)((0,t.withModifiers)(()=>{},["prevent"]),["enter"]))]}),[l.value||e.indeterminate?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(ve),(0,t.mergeProps)({key:0},l.value?o.icons.checked:o.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):(0,t.createCommentVNode)("",!0)],16,ht),o.label&&"right"===o.labelPlacement?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ct),{key:1,for:(0,t.unref)(n),label:o.label,required:o.required},(0,t.createSlots)({_:2},[a.$slots.extras?{name:"extras",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(a.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):(0,t.createCommentVNode)("",!0)],34))}}),yt=["id"],kt=["for"],bt=_((0,t.defineComponent)({__name:"QLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const o=e,l=(0,t.computed)(()=>["q-label",o.labelPosition?`q-label--${o.labelPosition}`:"",{"q-label--required":o.required},o.class])
|
|
166
|
+
n("slide:click",t.id)}(o),["stop","prevent"])},[e.image?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,src:e.image,alt:e.title||`Slide ${o+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,nt)):(0,t.createCommentVNode)("",!0)],14,lt))),128))],36)):((0,t.openBlock)(),(0,t.createElementBlock)("div",at,[(0,t.renderSlot)(o.$slots,"empty")])),e.slides[r.value]?((0,t.openBlock)(),(0,t.createElementBlock)("div",rt,[e.slides[r.value]?.title?((0,t.openBlock)(),(0,t.createElementBlock)("h2",it,(0,t.toDisplayString)(e.slides[r.value].title),1)):(0,t.createCommentVNode)("",!0),e.slides[r.value]?.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)("p",st,(0,t.toDisplayString)(e.slides[r.value].subtitle),1)):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),e.showIndicators&&e.slides.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("ol",ct,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.slides,(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:e.id,class:(0,t.normalizeClass)(["q-carousel__indicator",{"q-carousel__indicator--active":o===r.value}]),"data-testid":"carousel-indicator",style:(0,t.normalizeStyle)(o===r.value?h.value:{}),"aria-label":S(o),"aria-current":o===r.value,onClick:()=>g(o)},null,14,ut))),128))])):(0,t.createCommentVNode)("",!0),e.showControls&&e.slides.length>1?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:4},[(0,t.createVNode)((0,t.unref)(Z),{class:"q-carousel__control q-carousel__control--prev","data-testid":"carousel-prev","aria-label":e.texts.previousText,onClick:k},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({class:"q-carousel__control-icon q-carousel__control-icon--prev"},l.icons.back),null,16),(0,t.createElementVNode)("span",dt,(0,t.toDisplayString)(e.texts.previousText),1)]),_:1},8,["aria-label"]),(0,t.createVNode)((0,t.unref)(Z),{class:"q-carousel__control q-carousel__control--next","data-testid":"carousel-next","aria-label":e.texts.nextText,onClick:y},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({class:"q-carousel__control-icon q-carousel__control-icon--next"},l.icons.forward),null,16),(0,t.createElementVNode)("span",pt,(0,t.toDisplayString)(e.texts.nextText),1)]),_:1},8,["aria-label"])],64)):(0,t.createCommentVNode)("",!0)],64))],42,Xe))}})),ft={checked:{icon:"check"},indeterminate:{icon:"minus"}},vt=["checked","disabled","readonly","required","aria-label","aria-readonly"],ht=["id","aria-label","aria-checked","disabled","readonly","onKeydown"],gt=(0,t.defineComponent)({inheritAttrs:!1,__name:"QCheckbox",props:(0,t.mergeModels)({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},labelPlacement:{default:"right"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},indeterminate:{type:Boolean},icons:{default:()=>ft},hasFocusOutline:{type:Boolean,default:!0},borderless:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,l=(0,t.useModel)(e,"modelValue"),n=Ne((0,t.toRef)(o,"id")),a=(0,t.useTemplateRef)("inputEl"),r=(0,t.useTemplateRef)("buttonEl"),i=(0,t.computed)(()=>["q-checkbox",`q-checkbox--${o.size}`,`q-checkbox--${o.color}`,{"q-checkbox--readonly":o.readonly,"q-checkbox--disabled":o.disabled,"q-checkbox--checked":l.value,"q-checkbox--indeterminate":o.indeterminate,"q-checkbox--focus-style":o.hasFocusOutline,"q-checkbox--borderless":o.borderless},o.class])
|
|
167
|
+
function s(){o.disabled||o.readonly||(l.value=!l.value)}function c(){r.value?.focus()}return(0,t.watch)(l,e=>{a.value&&(a.value.checked=!!e)}),(a,r)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(i.value),onClick:(0,t.withModifiers)(s,["prevent"]),onMousedown:(0,t.withModifiers)(c,["prevent"])},[o.label&&"right"!==o.labelPlacement?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ct),{key:0,for:(0,t.unref)(n),label:o.label,required:o.required},(0,t.createSlots)({_:2},[a.$slots.extras?{name:"extras",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(a.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("input",{ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:l.value,disabled:o.disabled,readonly:o.readonly,required:o.required,"aria-label":o.label,"aria-readonly":o.readonly,tabindex:"-1","aria-hidden":"true"},null,8,vt),(0,t.createElementVNode)("button",(0,t.mergeProps)({id:(0,t.unref)(n),ref:"buttonEl",role:"checkbox",type:"button",class:"q-checkbox__input","data-testid":"checkbox-button","aria-label":o.label,"aria-checked":o.indeterminate?"mixed":l.value,disabled:o.disabled,readonly:o.readonly},a.$attrs,{onClick:(0,t.withModifiers)(s,["stop","prevent"]),onKeydown:[(0,t.withKeys)((0,t.withModifiers)(s,["prevent"]),["space"]),r[0]||(r[0]=(0,t.withKeys)((0,t.withModifiers)(()=>{},["prevent"]),["enter"]))]}),[l.value||e.indeterminate?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(ve),(0,t.mergeProps)({key:0},l.value?o.icons.checked:o.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):(0,t.createCommentVNode)("",!0)],16,ht),o.label&&"right"===o.labelPlacement?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ct),{key:1,for:(0,t.unref)(n),label:o.label,required:o.required},(0,t.createSlots)({_:2},[a.$slots.extras?{name:"extras",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(a.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):(0,t.createCommentVNode)("",!0)],34))}}),yt=["id"],kt=["for"],bt=_((0,t.defineComponent)({__name:"QLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const o=e,l=(0,t.computed)(()=>["q-label",o.labelPosition?`q-label--${o.labelPosition}`:"",{"q-label--required":o.required},o.class])
|
|
168
168
|
return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{id:o.id,class:(0,t.normalizeClass)(l.value)},[(0,t.renderSlot)(e.$slots,"prepend"),o.label||e.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)("label",{key:0,for:o.for},[(0,t.renderSlot)(e.$slots,"default",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(o.label),1)])],8,kt)):(0,t.renderSlot)(e.$slots,"default",{key:1}),(0,t.renderSlot)(e.$slots,"append")],10,yt))}})),Bt={class:"q-checkbox__label-wrapper"},wt={key:0,class:"q-field__extras"},_t=(0,t.defineComponent)({__name:"QCheckboxLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const o=e
|
|
169
169
|
return(e,l)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",Bt,[(0,t.createVNode)((0,t.unref)(bt),{class:"q-checkbox__label",for:o.for,label:o.label,required:o.required},null,8,["for","label","required"]),e.$slots.extras?((0,t.openBlock)(),(0,t.createElementBlock)("div",wt,[(0,t.renderSlot)(e.$slots,"extras")])):(0,t.createCommentVNode)("",!0)]))}}),xt=_(gt),Ct=_(_t),qt={selectColor:"Select a color"},Vt=["id"],Et={key:0,class:"q-field__prepend"},St={key:1,class:"q-field__append"},$t={key:1,class:"q-field__extras"},Mt=_((0,t.defineComponent)({inheritAttrs:!1,__name:"QField",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{default:"topleft"},size:{default:"medium"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean}},setup(e,{expose:o}){const l=e,n=(0,t.useTemplateRef)("field"),a=(0,t.computed)(()=>l.required&&!l.readonly&&!l.disabled),r=(0,t.computed)(()=>["q-field",`q-field--${l.size}`,`q-field--label-${l.labelPosition}`,{"q-field--readonly":l.readonly,"q-field--disabled":l.disabled,"q-field--required":a.value,"q-field--invalid":l.invalid},l.class])
|
|
170
170
|
return o({fieldRef:n}),(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{id:l.id,class:(0,t.normalizeClass)(r.value)},[l.label?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(bt),{key:0,class:"q-field__label",label:l.label,"label-position":l.labelPosition,for:l.for,required:l.required},{prepend:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"label.prepend")]),append:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"label.append")]),_:3},8,["label","label-position","for","required"])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(e.$slots,"control",{},()=>[(0,t.createElementVNode)("div",(0,t.mergeProps)({ref:"field",class:"q-field__control"},e.$attrs),[e.$slots.prepend?((0,t.openBlock)(),(0,t.createElementBlock)("div",Et,[(0,t.renderSlot)(e.$slots,"prepend")])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(e.$slots,"default"),e.$slots.append?((0,t.openBlock)(),(0,t.createElementBlock)("div",St,[(0,t.renderSlot)(e.$slots,"append")])):(0,t.createCommentVNode)("",!0)],16)]),e.$slots.extras?((0,t.openBlock)(),(0,t.createElementBlock)("div",$t,[(0,t.renderSlot)(e.$slots,"extras")])):(0,t.createCommentVNode)("",!0)],10,Vt))}})),Nt={clearValue:"Clear value"},Dt={clear:{icon:"close"}},Lt=_((0,t.defineComponent)({__name:"QClearButton",props:{id:{},class:{},icons:{default:()=>Dt},texts:{default:()=>Nt}},emits:["click"],setup(e,{emit:o}){const l=e,n=o
|
package/dist/ui.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.17.
|
|
2
|
+
* Quidgest UI v0.17.8
|
|
3
3
|
* (c) 2026 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).QuidgestUI={},e.Vue)}(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})
|
|
7
7
|
var o=Object.defineProperty,l=(e,t)=>{let l={}
|
|
8
8
|
for(var n in e)o(l,n,{get:e[n],enumerable:!0})
|
|
9
9
|
return t||o(l,Symbol.toStringTag,{value:"Module"}),l},n={primary:"#008ad2",primaryLight:"#cde5ff",primaryDark:"#006398",secondary:"#001d31",secondaryLight:"#e6eef3",secondaryDark:"#001425",highlight:"#ff8241",highlightLight:"#ffe4d6",highlightDark:"#cc4700",info:"#17a2b8",infoLight:"#bceff7",infoDark:"#11798a",success:"#28a745",successLight:"#c2f0cd",successDark:"#1e7d34",warning:"#ffa900",warningLight:"#ffeabf",warningDark:"#bf7f00",danger:"#b71c1c",dangerLight:"#f7cccc",dangerDark:"#891515",background:"#fff",container:"#fff",neutral:"#7c858d",neutralLight:"#c4c5ca",neutralDark:"#40474f",onPrimary:"#fff",onPrimaryLight:"#202428",onPrimaryDark:"#fff",onSecondary:"#fff",onSecondaryLight:"#202428",onSecondaryDark:"#fff",onHighlight:"#fff",onHighlightLight:"#202428",onHighlightDark:"#fff",onInfo:"#fff",onInfoLight:"#202428",onInfoDark:"#fff",onSuccess:"#fff",onSuccessLight:"#202428",onSuccessDark:"#fff",onWarning:"#fff",onWarningLight:"#202428",onWarningDark:"#fff",onDanger:"#fff",onDangerLight:"#202428",onDangerDark:"#fff",onBackground:"#202428",onContainer:"#202428",onNeutral:"#fff",onNeutralLight:"#202428",onNeutralDark:"#fff"},a={primary:"#4da6e0",primaryLight:"#1a2832",primaryDark:"#87c5f0",secondary:"#b8d4e6",secondaryLight:"#1a2832",secondaryDark:"#e6f2ff",highlight:"#ff9966",highlightLight:"#2d1a0f",highlightDark:"#ffb899",info:"#4cb8d1",infoLight:"#1f2a2d",infoDark:"#7dcce0",success:"#5cb85c",successLight:"#1e2a20",successDark:"#85d085",warning:"#ffcc4d",warningLight:"#332a1a",warningDark:"#ffd966",danger:"#e74c3c",dangerLight:"#2d1a1a",dangerDark:"#f17066",background:"#121212",container:"#1e1e1e",neutral:"#9ca3ab",neutralLight:"#2a2d31",neutralDark:"#c8ced6",onPrimary:"#000",onPrimaryLight:"#e0e0e0",onPrimaryDark:"#000",onSecondary:"#000",onSecondaryLight:"#e0e0e0",onSecondaryDark:"#000",onHighlight:"#000",onHighlightLight:"#e0e0e0",onHighlightDark:"#000",onInfo:"#000",onInfoLight:"#e0e0e0",onInfoDark:"#000",onSuccess:"#000",onSuccessLight:"#e0e0e0",onSuccessDark:"#000",onWarning:"#000",onWarningLight:"#e0e0e0",onWarningDark:"#000",onDanger:"#000",onDangerLight:"#e0e0e0",onDangerDark:"#000",onBackground:"#e0e0e0",onContainer:"#e0e0e0",onNeutral:"#000",onNeutralLight:"#e0e0e0",onNeutralDark:"#000"},r=l({defaultDarkColorScheme:()=>a,defaultLightColorScheme:()=>n})
|
|
@@ -163,8 +163,8 @@ const e=c-u
|
|
|
163
163
|
Math.abs(e)>l.swipeThreshold&&(e>0?y():k()),c=0,u=0,B()}function S(e){return l.texts.goToSlide.replace("{0}",`${e+1}`)}return(0,t.watch)(()=>l.slides,function(e){if(0===e.length)return r.value=0,a.value=0,void w()
|
|
164
164
|
r.value>=e.length&&g(0)},{immediate:!0,deep:!0}),(0,t.watch)(r,function(){w(),B()}),(0,t.watch)(a,e=>{e!==r.value&&g(e)}),(0,t.onMounted)(B),(0,t.onUnmounted)(w),(o,a)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{id:l.id,class:(0,t.normalizeClass)(["q-carousel",l.class]),tabindex:"0",onMouseenter:_,onMouseleave:x,onKeydown:C},[e.loading?((0,t.openBlock)(),(0,t.createElementBlock)("div",et,[(0,t.createVNode)((0,t.unref)(Je),{width:"100%",height:"100%"}),(0,t.createElementVNode)("div",tt,[(0,t.createVNode)((0,t.unref)(Je),{type:"text",width:"40%",height:"24px",class:"q-carousel__skeleton-title"}),(0,t.createVNode)((0,t.unref)(Je),{type:"text",width:"60%",height:"16px",class:"q-carousel__skeleton-subtitle"})]),l.showControls?((0,t.openBlock)(),(0,t.createElementBlock)("div",ot,[(0,t.createVNode)((0,t.unref)(Je),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"}),(0,t.createVNode)((0,t.unref)(Je),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"})])):(0,t.createCommentVNode)("",!0)])):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[e.slides?.length?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:"q-carousel__track",style:(0,t.normalizeStyle)(v.value),onTouchstart:q,onTouchmove:V,onTouchend:E},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.slides,(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:e.id,class:(0,t.normalizeClass)(["q-carousel__slide",{"q-carousel__slide--active":o===r.value}]),style:(0,t.normalizeStyle)(b(e)),onClick:(0,t.withModifiers)(()=>function(e){if(window.getSelection()?.toString().length)return
|
|
165
165
|
const t=l.slides[e]
|
|
166
|
-
n("slide:click",t.id)}(o),["stop","prevent"])},[e.image?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,src:e.image,alt:e.title||`Slide ${o+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,nt)):(0,t.createCommentVNode)("",!0)],14,lt))),128))],36)):((0,t.openBlock)(),(0,t.createElementBlock)("div",at,[(0,t.renderSlot)(o.$slots,"empty")])),e.slides[r.value]?((0,t.openBlock)(),(0,t.createElementBlock)("div",rt,[e.slides[r.value]?.title?((0,t.openBlock)(),(0,t.createElementBlock)("h2",it,(0,t.toDisplayString)(e.slides[r.value].title),1)):(0,t.createCommentVNode)("",!0),e.slides[r.value]?.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)("p",st,(0,t.toDisplayString)(e.slides[r.value].subtitle),1)):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),e.showIndicators&&e.slides.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("ol",ct,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.slides,(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:e.id,class:(0,t.normalizeClass)(["q-carousel__indicator",{"q-carousel__indicator--active":o===r.value}]),"data-testid":"carousel-indicator",style:(0,t.normalizeStyle)(o===r.value?h.value:{}),"aria-label":S(o),"aria-current":o===r.value,onClick:()=>g(o)},null,14,ut))),128))])):(0,t.createCommentVNode)("",!0),e.showControls&&e.slides.length>1?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:4},[(0,t.createVNode)((0,t.unref)(Z),{class:"q-carousel__control q-carousel__control--prev","data-testid":"carousel-prev","aria-label":e.texts.previousText,onClick:k},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({class:"q-carousel__control-icon q-carousel__control-icon--prev"},l.icons.back),null,16),(0,t.createElementVNode)("span",dt,(0,t.toDisplayString)(e.texts.previousText),1)]),_:1},8,["aria-label"]),(0,t.createVNode)((0,t.unref)(Z),{class:"q-carousel__control q-carousel__control--next","data-testid":"carousel-next","aria-label":e.texts.nextText,onClick:y},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({class:"q-carousel__control-icon q-carousel__control-icon--next"},l.icons.forward),null,16),(0,t.createElementVNode)("span",pt,(0,t.toDisplayString)(e.texts.nextText),1)]),_:1},8,["aria-label"])],64)):(0,t.createCommentVNode)("",!0)],64))],42,Xe))}})),ft={checked:{icon:"check"},indeterminate:{icon:"minus"}},vt=["checked","disabled","readonly","required","aria-readonly"],ht=["id","aria-checked","disabled","readonly","onKeydown"],gt=(0,t.defineComponent)({inheritAttrs:!1,__name:"QCheckbox",props:(0,t.mergeModels)({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},labelPlacement:{default:"right"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},indeterminate:{type:Boolean},icons:{default:()=>ft},hasFocusOutline:{type:Boolean,default:!0},borderless:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,l=(0,t.useModel)(e,"modelValue"),n=Ne((0,t.toRef)(o,"id")),a=(0,t.useTemplateRef)("inputEl"),r=(0,t.useTemplateRef)("buttonEl"),i=(0,t.computed)(()=>["q-checkbox",`q-checkbox--${o.size}`,`q-checkbox--${o.color}`,{"q-checkbox--readonly":o.readonly,"q-checkbox--disabled":o.disabled,"q-checkbox--checked":l.value,"q-checkbox--indeterminate":o.indeterminate,"q-checkbox--focus-style":o.hasFocusOutline,"q-checkbox--borderless":o.borderless},o.class])
|
|
167
|
-
function s(){o.disabled||o.readonly||(l.value=!l.value)}function c(){r.value?.focus()}return(0,t.watch)(l,e=>{a.value&&(a.value.checked=!!e)}),(a,r)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(i.value),onClick:(0,t.withModifiers)(s,["prevent"]),onMousedown:(0,t.withModifiers)(c,["prevent"])},[o.label&&"right"!==o.labelPlacement?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ct),{key:0,for:(0,t.unref)(n),label:o.label,required:o.required},(0,t.createSlots)({_:2},[a.$slots.extras?{name:"extras",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(a.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("input",{ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:l.value,disabled:o.disabled,readonly:o.readonly,required:o.required,"aria-readonly":o.readonly,tabindex:"-1","aria-hidden":"true"},null,8,vt),(0,t.createElementVNode)("button",(0,t.mergeProps)({id:(0,t.unref)(n),ref:"buttonEl",role:"checkbox",type:"button",class:"q-checkbox__input","data-testid":"checkbox-button","aria-checked":o.indeterminate?"mixed":l.value,disabled:o.disabled,readonly:o.readonly},a.$attrs,{onClick:(0,t.withModifiers)(s,["stop","prevent"]),onKeydown:[(0,t.withKeys)((0,t.withModifiers)(s,["prevent"]),["space"]),r[0]||(r[0]=(0,t.withKeys)((0,t.withModifiers)(()=>{},["prevent"]),["enter"]))]}),[l.value||e.indeterminate?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(ve),(0,t.mergeProps)({key:0},l.value?o.icons.checked:o.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):(0,t.createCommentVNode)("",!0)],16,ht),o.label&&"right"===o.labelPlacement?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ct),{key:1,for:(0,t.unref)(n),label:o.label,required:o.required},(0,t.createSlots)({_:2},[a.$slots.extras?{name:"extras",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(a.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):(0,t.createCommentVNode)("",!0)],34))}}),yt=["id"],kt=["for"],bt=_((0,t.defineComponent)({__name:"QLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const o=e,l=(0,t.computed)(()=>["q-label",o.labelPosition?`q-label--${o.labelPosition}`:"",{"q-label--required":o.required},o.class])
|
|
166
|
+
n("slide:click",t.id)}(o),["stop","prevent"])},[e.image?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,src:e.image,alt:e.title||`Slide ${o+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,nt)):(0,t.createCommentVNode)("",!0)],14,lt))),128))],36)):((0,t.openBlock)(),(0,t.createElementBlock)("div",at,[(0,t.renderSlot)(o.$slots,"empty")])),e.slides[r.value]?((0,t.openBlock)(),(0,t.createElementBlock)("div",rt,[e.slides[r.value]?.title?((0,t.openBlock)(),(0,t.createElementBlock)("h2",it,(0,t.toDisplayString)(e.slides[r.value].title),1)):(0,t.createCommentVNode)("",!0),e.slides[r.value]?.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)("p",st,(0,t.toDisplayString)(e.slides[r.value].subtitle),1)):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),e.showIndicators&&e.slides.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("ol",ct,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.slides,(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:e.id,class:(0,t.normalizeClass)(["q-carousel__indicator",{"q-carousel__indicator--active":o===r.value}]),"data-testid":"carousel-indicator",style:(0,t.normalizeStyle)(o===r.value?h.value:{}),"aria-label":S(o),"aria-current":o===r.value,onClick:()=>g(o)},null,14,ut))),128))])):(0,t.createCommentVNode)("",!0),e.showControls&&e.slides.length>1?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:4},[(0,t.createVNode)((0,t.unref)(Z),{class:"q-carousel__control q-carousel__control--prev","data-testid":"carousel-prev","aria-label":e.texts.previousText,onClick:k},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({class:"q-carousel__control-icon q-carousel__control-icon--prev"},l.icons.back),null,16),(0,t.createElementVNode)("span",dt,(0,t.toDisplayString)(e.texts.previousText),1)]),_:1},8,["aria-label"]),(0,t.createVNode)((0,t.unref)(Z),{class:"q-carousel__control q-carousel__control--next","data-testid":"carousel-next","aria-label":e.texts.nextText,onClick:y},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ve),(0,t.mergeProps)({class:"q-carousel__control-icon q-carousel__control-icon--next"},l.icons.forward),null,16),(0,t.createElementVNode)("span",pt,(0,t.toDisplayString)(e.texts.nextText),1)]),_:1},8,["aria-label"])],64)):(0,t.createCommentVNode)("",!0)],64))],42,Xe))}})),ft={checked:{icon:"check"},indeterminate:{icon:"minus"}},vt=["checked","disabled","readonly","required","aria-label","aria-readonly"],ht=["id","aria-label","aria-checked","disabled","readonly","onKeydown"],gt=(0,t.defineComponent)({inheritAttrs:!1,__name:"QCheckbox",props:(0,t.mergeModels)({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},labelPlacement:{default:"right"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},indeterminate:{type:Boolean},icons:{default:()=>ft},hasFocusOutline:{type:Boolean,default:!0},borderless:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,l=(0,t.useModel)(e,"modelValue"),n=Ne((0,t.toRef)(o,"id")),a=(0,t.useTemplateRef)("inputEl"),r=(0,t.useTemplateRef)("buttonEl"),i=(0,t.computed)(()=>["q-checkbox",`q-checkbox--${o.size}`,`q-checkbox--${o.color}`,{"q-checkbox--readonly":o.readonly,"q-checkbox--disabled":o.disabled,"q-checkbox--checked":l.value,"q-checkbox--indeterminate":o.indeterminate,"q-checkbox--focus-style":o.hasFocusOutline,"q-checkbox--borderless":o.borderless},o.class])
|
|
167
|
+
function s(){o.disabled||o.readonly||(l.value=!l.value)}function c(){r.value?.focus()}return(0,t.watch)(l,e=>{a.value&&(a.value.checked=!!e)}),(a,r)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(i.value),onClick:(0,t.withModifiers)(s,["prevent"]),onMousedown:(0,t.withModifiers)(c,["prevent"])},[o.label&&"right"!==o.labelPlacement?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ct),{key:0,for:(0,t.unref)(n),label:o.label,required:o.required},(0,t.createSlots)({_:2},[a.$slots.extras?{name:"extras",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(a.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("input",{ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:l.value,disabled:o.disabled,readonly:o.readonly,required:o.required,"aria-label":o.label,"aria-readonly":o.readonly,tabindex:"-1","aria-hidden":"true"},null,8,vt),(0,t.createElementVNode)("button",(0,t.mergeProps)({id:(0,t.unref)(n),ref:"buttonEl",role:"checkbox",type:"button",class:"q-checkbox__input","data-testid":"checkbox-button","aria-label":o.label,"aria-checked":o.indeterminate?"mixed":l.value,disabled:o.disabled,readonly:o.readonly},a.$attrs,{onClick:(0,t.withModifiers)(s,["stop","prevent"]),onKeydown:[(0,t.withKeys)((0,t.withModifiers)(s,["prevent"]),["space"]),r[0]||(r[0]=(0,t.withKeys)((0,t.withModifiers)(()=>{},["prevent"]),["enter"]))]}),[l.value||e.indeterminate?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(ve),(0,t.mergeProps)({key:0},l.value?o.icons.checked:o.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):(0,t.createCommentVNode)("",!0)],16,ht),o.label&&"right"===o.labelPlacement?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ct),{key:1,for:(0,t.unref)(n),label:o.label,required:o.required},(0,t.createSlots)({_:2},[a.$slots.extras?{name:"extras",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(a.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):(0,t.createCommentVNode)("",!0)],34))}}),yt=["id"],kt=["for"],bt=_((0,t.defineComponent)({__name:"QLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const o=e,l=(0,t.computed)(()=>["q-label",o.labelPosition?`q-label--${o.labelPosition}`:"",{"q-label--required":o.required},o.class])
|
|
168
168
|
return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{id:o.id,class:(0,t.normalizeClass)(l.value)},[(0,t.renderSlot)(e.$slots,"prepend"),o.label||e.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)("label",{key:0,for:o.for},[(0,t.renderSlot)(e.$slots,"default",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(o.label),1)])],8,kt)):(0,t.renderSlot)(e.$slots,"default",{key:1}),(0,t.renderSlot)(e.$slots,"append")],10,yt))}})),Bt={class:"q-checkbox__label-wrapper"},wt={key:0,class:"q-field__extras"},_t=(0,t.defineComponent)({__name:"QCheckboxLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const o=e
|
|
169
169
|
return(e,l)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",Bt,[(0,t.createVNode)((0,t.unref)(bt),{class:"q-checkbox__label",for:o.for,label:o.label,required:o.required},null,8,["for","label","required"]),e.$slots.extras?((0,t.openBlock)(),(0,t.createElementBlock)("div",wt,[(0,t.renderSlot)(e.$slots,"extras")])):(0,t.createCommentVNode)("",!0)]))}}),xt=_(gt),Ct=_(_t),qt={selectColor:"Select a color"},Vt=["id"],Et={key:0,class:"q-field__prepend"},St={key:1,class:"q-field__append"},$t={key:1,class:"q-field__extras"},Mt=_((0,t.defineComponent)({inheritAttrs:!1,__name:"QField",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{default:"topleft"},size:{default:"medium"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean}},setup(e,{expose:o}){const l=e,n=(0,t.useTemplateRef)("field"),a=(0,t.computed)(()=>l.required&&!l.readonly&&!l.disabled),r=(0,t.computed)(()=>["q-field",`q-field--${l.size}`,`q-field--label-${l.labelPosition}`,{"q-field--readonly":l.readonly,"q-field--disabled":l.disabled,"q-field--required":a.value,"q-field--invalid":l.invalid},l.class])
|
|
170
170
|
return o({fieldRef:n}),(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{id:l.id,class:(0,t.normalizeClass)(r.value)},[l.label?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(bt),{key:0,class:"q-field__label",label:l.label,"label-position":l.labelPosition,for:l.for,required:l.required},{prepend:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"label.prepend")]),append:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"label.append")]),_:3},8,["label","label-position","for","required"])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(e.$slots,"control",{},()=>[(0,t.createElementVNode)("div",(0,t.mergeProps)({ref:"field",class:"q-field__control"},e.$attrs),[e.$slots.prepend?((0,t.openBlock)(),(0,t.createElementBlock)("div",Et,[(0,t.renderSlot)(e.$slots,"prepend")])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(e.$slots,"default"),e.$slots.append?((0,t.openBlock)(),(0,t.createElementBlock)("div",St,[(0,t.renderSlot)(e.$slots,"append")])):(0,t.createCommentVNode)("",!0)],16)]),e.$slots.extras?((0,t.openBlock)(),(0,t.createElementBlock)("div",$t,[(0,t.renderSlot)(e.$slots,"extras")])):(0,t.createCommentVNode)("",!0)],10,Vt))}})),Nt={clearValue:"Clear value"},Dt={clear:{icon:"close"}},Lt=_((0,t.defineComponent)({__name:"QClearButton",props:{id:{},class:{},icons:{default:()=>Dt},texts:{default:()=>Nt}},emits:["click"],setup(e,{emit:o}){const l=e,n=o
|
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":"AAkEA;AAiJC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAU3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,GAAG,CAAA;AAKvC,KAAK,WAAW,GAAG,cAAc,CAAC;AAqEnC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WA2HT,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"}
|
|
@@ -9,9 +9,11 @@ var w = [
|
|
|
9
9
|
"disabled",
|
|
10
10
|
"readonly",
|
|
11
11
|
"required",
|
|
12
|
+
"aria-label",
|
|
12
13
|
"aria-readonly"
|
|
13
14
|
], T = [
|
|
14
15
|
"id",
|
|
16
|
+
"aria-label",
|
|
15
17
|
"aria-checked",
|
|
16
18
|
"disabled",
|
|
17
19
|
"readonly",
|
|
@@ -94,6 +96,7 @@ var w = [
|
|
|
94
96
|
disabled: u.disabled,
|
|
95
97
|
readonly: u.readonly,
|
|
96
98
|
required: u.required,
|
|
99
|
+
"aria-label": u.label,
|
|
97
100
|
"aria-readonly": u.readonly,
|
|
98
101
|
tabindex: "-1",
|
|
99
102
|
"aria-hidden": "true"
|
|
@@ -106,6 +109,7 @@ var w = [
|
|
|
106
109
|
type: "button",
|
|
107
110
|
class: "q-checkbox__input",
|
|
108
111
|
"data-testid": "checkbox-button",
|
|
112
|
+
"aria-label": u.label,
|
|
109
113
|
"aria-checked": u.indeterminate ? "mixed" : d.value,
|
|
110
114
|
disabled: u.disabled,
|
|
111
115
|
readonly: u.readonly
|