@quidgest/ui 0.16.16 → 0.16.18
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.css +35 -9
- package/dist/ui.esm.js +126 -122
- package/dist/ui.js +5 -5
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +16 -16
- package/dist/ui.scss +38 -10
- package/esm/components/QCheckbox/QCheckbox.vue.js +23 -23
- package/esm/components/QSwitch/QSwitch.d.ts.map +1 -1
- package/esm/components/QSwitch/QSwitch.vue.js +28 -24
- package/esm/templates/theme.js +35 -35
- package/package.json +1 -1
package/dist/ui.min.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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.18
|
|
5
5
|
* (c) 2025 Quidgest - Consultores de Gestão, S.A.
|
|
6
6
|
* Released under the MIT License.
|
|
7
7
|
*/
|
|
8
|
-
const o={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",onBackground:"#202428",onPrimary:"#fff",onSecondary:"#fff",onHighlight:"#fff",onSuccess:"#fff",onWarning:"#fff",onDanger:"#fff",onInfo:"#fff",onNeutral:"#fff"},l={primary:"#
|
|
8
|
+
const o={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",onBackground:"#202428",onPrimary:"#fff",onSecondary:"#fff",onHighlight:"#fff",onSuccess:"#fff",onWarning:"#fff",onDanger:"#fff",onInfo:"#fff",onNeutral:"#fff"},l={primary:"#4da6e0",primaryLight:"#2d8bc7",primaryDark:"#87c4e8",secondary:"#4a6b82",secondaryLight:"#2c4a5e",secondaryDark:"#6b8ca3",highlight:"#ff9966",highlightLight:"#e67344",highlightDark:"#ffb088",info:"#3bb5d1",infoLight:"#2a9bb8",infoDark:"#66c7dd",success:"#4caf50",successLight:"#388e3c",successDark:"#81c784",warning:"#ffb74d",warningLight:"#e67e22",warningDark:"#ffcc80",danger:"#e57373",dangerLight:"#c62828",dangerDark:"#ef9a9a",background:"#121212",container:"#1e1e1e",neutral:"#9e9e9e",neutralLight:"#666666",neutralDark:"#d0d0d0",onBackground:"#ffffff",onPrimary:"#ffffff",onSecondary:"#ffffff",onHighlight:"#ffffff",onSuccess:"#ffffff",onWarning:"#000000",onDanger:"#ffffff",onInfo:"#ffffff",onNeutral:"#000000"},r=Object.freeze(Object.defineProperty({__proto__:null,defaultDarkColorScheme:l,defaultLightColorScheme:o},Symbol.toStringTag,{value:"Module"}))
|
|
9
9
|
function i(e){return null==e||("string"==typeof e||Array.isArray(e)?0===e.length:"object"==typeof e&&0===Object.keys(e).length)}function s(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function u(e={},t={}){const a={},n=new Set([...Object.keys(e),...Object.keys(t)])
|
|
10
10
|
for(const o of n){if("__proto__"===o||"constructor"===o||"prototype"===o)continue
|
|
11
11
|
const n=e[o],l=t[o]
|
|
@@ -130,7 +130,7 @@ if(!s.value)return{"--q-badge-main-color":null==(e=u.value)?void 0:e.mainColor,"
|
|
|
130
130
|
function c(e){e.stopImmediatePropagation()}function p(){o("click:remove")}return(e,a)=>(t.openBlock(),t.createElementBlock("span",{id:n.id,class:t.normalizeClass(i.value),role:r.value?"button":"presentation",style:t.normalizeStyle(d.value),tabindex:r.value?0:void 0,onKeydown:t.withKeys(t.withModifiers(c,["stop","prevent"]),["enter"])},["tonal"===n.variant?(t.openBlock(),t.createElementBlock("div",Me)):t.createCommentVNode("",!0),t.createElementVNode("div",Ve,[t.renderSlot(e.$slots,"default"),n.removable?(t.openBlock(),t.createBlock(t.unref(Y),{key:0,class:"q-badge__remove",pill:"",borderless:"",tabindex:"0",color:n.color,"aria-label":n.texts.removeText,onClick:p},{default:t.withCtx((()=>[t.createVNode(t.unref(re),t.normalizeProps(t.guardReactiveProps(n.icons.remove)),null,16)])),_:1},8,["color","aria-label"])):t.createCommentVNode("",!0)])],46,Se))}})),Ee=["id"],Ne=x(t.defineComponent({__name:"QBadgeIndicator",props:{id:{},class:{},content:{},placement:{default:"top-right"},color:{}},setup(e){const a=e,n=t.useSlots(),o=t.computed((()=>!a.content&&!n.content)),l=t.computed((()=>["q-badge-indicator",`q-badge-indicator--${a.placement}`,{"q-badge-indicator--dot":o.value}]))
|
|
131
131
|
return(e,n)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(["q-badge-indicator__wrapper",a.class])},[t.renderSlot(e.$slots,"default"),t.createVNode(t.unref($e),{pill:"",variant:"bold",class:t.normalizeClass(l.value),color:a.color},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"content",{},(()=>[t.createTextVNode(t.toDisplayString(a.content),1)]))])),_:3},8,["class","color"])],10,Ee))}})),De=["id"],Te=x(t.defineComponent({__name:"QButtonGroup",props:{id:{},class:{},disabled:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean}},setup(e){const a=e
|
|
132
132
|
return c({QButton:{disabled:t.toRef(a,"disabled"),borderless:t.toRef(a,"borderless")}}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(["q-button-group",{"q-button-group--elevated":a.elevated},a.class]),role:"group"},[t.renderSlot(e.$slots,"default")],10,De))}})),Pe={checked:{icon:"check"},indeterminate:{icon:"minus"}},Ae=["checked","disabled","required","aria-readonly"],qe=["id","aria-checked","disabled","onKeydown"],Re=t.defineComponent({inheritAttrs:!1,__name:"QCheckbox",props:t.mergeModels({id:{},class:{},label:{},for:{},required:{type:Boolean},labelPlacement:{default:"right"},disabled:{type:Boolean},readonly:{type:Boolean},indeterminate:{type:Boolean},color:{default:"primary"},size:{default:"regular"},icons:{default:()=>Pe}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),o=ke(t.toRef(a,"id")),l=t.useTemplateRef("inputEl"),r=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},a.class]))
|
|
133
|
-
function i(){!a.disabled&&!a.readonly&&(n.value=!n.value)}return t.watch(n,(e=>{l.value&&(l.value.checked=!!e)})),(e,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(r.value)},["right"!==a.labelPlacement?(t.openBlock(),t.createBlock(t.unref(He),{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",t.mergeProps({ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:n.value,disabled:a.disabled||a.readonly,required:a.required,"aria-readonly":a.readonly,tabindex:"-1","aria-hidden":"true"},e.$attrs),null,16,Ae),t.createElementVNode("button",{id:t.unref(o),role:"checkbox",type:"button",class:"q-checkbox__input","aria-checked":a.indeterminate?"mixed":n.value,disabled:a.disabled||a.readonly,onClick:t.withModifiers(i,["prevent"]),onKeydown:[t.withKeys(t.withModifiers(i,["prevent"]),["space"]),l[0]||(l[0]=t.withKeys(t.withModifiers((()=>{}),["prevent"]),["enter"]))]},[n.value||e.indeterminate?(t.openBlock(),t.createBlock(t.unref(re),t.mergeProps({key:0},n.value?a.icons.checked:a.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):t.createCommentVNode("",!0)],40,qe),"right"===a.labelPlacement?(t.openBlock(),t.createBlock(t.unref(He),{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)],2))}}),ze=["id"],Le=["for"],Oe=x(t.defineComponent({inheritAttrs:!1,__name:"QLabel",props:{id:{},class:{},label:{},for:{},required:{type:Boolean}},setup(e){const a=e,n=t.computed((()=>["q-label",{"q-label--required":a.required},a.class]))
|
|
133
|
+
function i(){!a.disabled&&!a.readonly&&(n.value=!n.value)}return t.watch(n,(e=>{l.value&&(l.value.checked=!!e)})),(e,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(r.value)},[a.label&&"right"!==a.labelPlacement?(t.openBlock(),t.createBlock(t.unref(He),{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",t.mergeProps({ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:n.value,disabled:a.disabled||a.readonly,required:a.required,"aria-readonly":a.readonly,tabindex:"-1","aria-hidden":"true"},e.$attrs),null,16,Ae),t.createElementVNode("button",{id:t.unref(o),role:"checkbox",type:"button",class:"q-checkbox__input","aria-checked":a.indeterminate?"mixed":n.value,disabled:a.disabled||a.readonly,onClick:t.withModifiers(i,["prevent"]),onKeydown:[t.withKeys(t.withModifiers(i,["prevent"]),["space"]),l[0]||(l[0]=t.withKeys(t.withModifiers((()=>{}),["prevent"]),["enter"]))]},[n.value||e.indeterminate?(t.openBlock(),t.createBlock(t.unref(re),t.mergeProps({key:0},n.value?a.icons.checked:a.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):t.createCommentVNode("",!0)],40,qe),a.label&&"right"===a.labelPlacement?(t.openBlock(),t.createBlock(t.unref(He),{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)],2))}}),ze=["id"],Le=["for"],Oe=x(t.defineComponent({inheritAttrs:!1,__name:"QLabel",props:{id:{},class:{},label:{},for:{},required:{type:Boolean}},setup(e){const a=e,n=t.computed((()=>["q-label",{"q-label--required":a.required},a.class]))
|
|
134
134
|
return(e,o)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(n.value)},[t.renderSlot(e.$slots,"prepend"),t.createElementVNode("label",t.mergeProps({for:a.for},e.$attrs),[t.renderSlot(e.$slots,"default",{},(()=>[t.createTextVNode(t.toDisplayString(a.label),1)]))],16,Le),t.renderSlot(e.$slots,"append")],10,ze))}})),Ie={class:"q-checkbox__label-wrapper"},Fe={key:0,class:"q-field__extras"},Ye=t.defineComponent({__name:"QCheckboxLabel",props:{id:{},class:{},label:{},for:{},required:{type:Boolean}},setup(e){const a=e
|
|
135
135
|
return(e,n)=>(t.openBlock(),t.createElementBlock("div",Ie,[t.createVNode(t.unref(Oe),{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",Fe,[t.renderSlot(e.$slots,"extras")])):t.createCommentVNode("",!0)]))}}),Qe=x(Re),He=x(Ye),Ue={selectColor:"Select a color"},We=["id"],je={key:0,class:"q-field__prepend"},Ge={key:1,class:"q-field__append"},Ke={key:1,class:"q-field__extras"},Xe=x(t.defineComponent({inheritAttrs:!1,__name:"QField",props:{id:{},class:{},label:{},for:{},required:{type:Boolean},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]))
|
|
136
136
|
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(Oe),{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",je,[t.renderSlot(e.$slots,"prepend")])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default"),e.$slots.append?(t.openBlock(),t.createElementBlock("div",Ge,[t.renderSlot(e.$slots,"append")])):t.createCommentVNode("",!0)],16)])),e.$slots.extras?(t.openBlock(),t.createElementBlock("div",Ke,[t.renderSlot(e.$slots,"extras")])):t.createCommentVNode("",!0)],10,We))}})),Ze={clearValue:"Clear value"},Je={clear:{icon:"close"}},et=x(t.defineComponent({__name:"QClearButton",props:{id:{},class:{},icons:{default:()=>Je},texts:{default:()=>Ze}},emits:["click"],setup(e,{emit:a}){const n=e,o=a
|
|
@@ -1493,14 +1493,14 @@ return["q-sidebar",`q-sidebar--${(null==(e=i.value)?void 0:e.initialWidth)??"sma
|
|
|
1493
1493
|
function m(){o("resize:start")}function v(e){u.value=e,o("resize",e)}function f(){o("resize:end",u.value)}function h(e){o("click:item",e)}function y(){l.value||(r.value=void 0)}return t.watch([()=>n.anchorWidth,i],(function(){var e
|
|
1494
1494
|
const t=null==(e=i.value)?void 0:e.initialWidth
|
|
1495
1495
|
u.value="number"==typeof t?t:void 0}),{immediate:!0,deep:!0}),(e,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(c.value),style:t.normalizeStyle({width:d.value})},[t.createVNode(Cc,{modelValue:l.value,"onUpdate:modelValue":a[0]||(a[0]=e=>l.value=e),panels:n.panels,"anchor-width":n.anchorWidth,"show-labels":n.showLabels,"onClick:item":h},t.createSlots({_:2},[t.renderList(n.panels,(a=>({name:a.id,fn:t.withCtx((()=>[t.renderSlot(e.$slots,`anchor:${a.id}`,{item:a})]))})))]),1032,["modelValue","panels","anchor-width","show-labels"]),t.createVNode(t.Transition,{name:"left"===e.position?"slide-right":"slide-left",onAfterLeave:y},{default:t.withCtx((()=>[l.value&&i.value?(t.openBlock(),t.createBlock(Dc,{key:0,"show-grip":"",title:i.value.title,"initial-width":i.value.initialWidth,"min-width":i.value.minWidth,"max-width":i.value.maxWidth,resizable:i.value.resizable,"resize-position":p.value,"onResize:start":m,onResize:v,"onResize:end":f},t.createSlots({_:2},[e.$slots[`header.prepend:${l.value}`]?{name:"header.prepend",fn:t.withCtx((()=>[t.renderSlot(e.$slots,`header.prepend:${l.value}`)])),key:"0"}:void 0,e.$slots[`header:${l.value}`]?{name:"header",fn:t.withCtx((()=>[t.renderSlot(e.$slots,`header:${l.value}`)])),key:"1"}:void 0,e.$slots[`header.append:${l.value}`]?{name:"header.append",fn:t.withCtx((()=>[t.renderSlot(e.$slots,`header.append:${l.value}`)])),key:"2"}:void 0,e.$slots[`content:${l.value}`]?{name:"content",fn:t.withCtx((()=>[t.renderSlot(e.$slots,`content:${l.value}`)])),key:"3"}:void 0,e.$slots[`footer:${l.value}`]?{name:"footer",fn:t.withCtx((()=>[t.renderSlot(e.$slots,`footer:${l.value}`)])),key:"4"}:void 0]),1032,["title","initial-width","min-width","max-width","resizable","resize-position"])):t.createCommentVNode("",!0)])),_:3},8,["name"])],6))}})),Pc=["id"],Ac=x(t.defineComponent({__name:"QSkeletonLoader",props:{id:{},class:{},type:{},width:{},height:{}},setup(e){const a=e,n=t.computed((()=>a.type?`q-skeleton-loader--${a.type}`:void 0)),o=t.computed((()=>({width:"number"==typeof a.width?`${a.width}px`:a.width,height:"number"==typeof a.height?`${a.height}px`:a.height})))
|
|
1496
|
-
return(e,l)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(["q-skeleton-loader",n.value,a.class]),style:t.normalizeStyle(o.value)},l[0]||(l[0]=[t.createElementVNode("div",{class:"q-skeleton-loader__bone"},null,-1)]),14,Pc))}})),qc=
|
|
1496
|
+
return(e,l)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(["q-skeleton-loader",n.value,a.class]),style:t.normalizeStyle(o.value)},l[0]||(l[0]=[t.createElementVNode("div",{class:"q-skeleton-loader__bone"},null,-1)]),14,Pc))}})),qc=["id","aria-checked","disabled"],Rc={class:"q-switch__labels"},zc={class:"q-switch__label q-switch__label--off","aria-hidden":"true"},Lc={class:"q-switch__label q-switch__label--on","aria-hidden":"true"},Oc=x(t.defineComponent({inheritAttrs:!1,__name:"QSwitch",props:t.mergeModels({id:{},class:{},label:{},required:{type:Boolean},showStateLabels:{type:Boolean},trueLabel:{default:"On"},falseLabel:{default:"Off"},checkedColor:{},uncheckedColor:{},disabled:{type:Boolean},readonly:{type:Boolean},size:{default:"medium"}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),o=e=>{a.readonly&&(e.preventDefault(),e.stopImmediatePropagation(),e.target.checked=!!n.value)},l=ke(t.toRef(a,"id")),{style:r}=L(t.toRef(a,"checkedColor")),{style:i}=L(t.toRef(a,"uncheckedColor")),s=t.computed((()=>["q-switch","medium"!==a.size?`q-switch--${a.size}`:void 0,{"q-switch--checked":n.value,"q-switch--disabled":a.disabled,"q-switch--readonly":a.readonly,"q-switch--with-labels":a.showStateLabels&&(a.trueLabel||a.falseLabel)},a.class])),u=t.computed((()=>{var e,t,a,n
|
|
1497
1497
|
return{"--q-switch-checked-background":null==(e=r.value)?void 0:e.mainColor,"--q-switch-on-checked-background":null==(t=r.value)?void 0:t.onMainColor,"--q-switch-unchecked-background":null==(a=i.value)?void 0:a.mainColor,"--q-switch-on-unchecked-background":null==(n=i.value)?void 0:n.onMainColor}}))
|
|
1498
|
-
return(e,r)=>(t.openBlock(),t.createElementBlock("div",
|
|
1498
|
+
return(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:"q-switch__container",onClick:r[1]||(r[1]=t.withModifiers((()=>{}),["stop"]))},[a.label?(t.openBlock(),t.createBlock(t.unref(Oe),{key:0,for:t.unref(l),required:a.required},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(a.label),1)])),_:1},8,["for","required"])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(s.value),style:t.normalizeStyle(u.value)},[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(l),"onUpdate:modelValue":r[0]||(r[0]=e=>n.value=e),class:"q-switch__input",type:"checkbox",role:"switch","aria-checked":n.value,disabled:a.disabled},e.$attrs,{onInput:o}),null,16,qc),[[t.vModelCheckbox,n.value]]),t.createElementVNode("div",Rc,[t.createElementVNode("span",zc,[a.showStateLabels?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(a.falseLabel),1)],64)):t.createCommentVNode("",!0)]),t.createElementVNode("span",Lc,[a.showStateLabels?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(a.trueLabel),1)],64)):t.createCommentVNode("",!0)])])],6)]))}})),Ic=["id","required","placeholder","readonly","disabled","maxlength","rows","cols","resize","wrap"],Fc=x(t.defineComponent({inheritAttrs:!1,__name:"QTextArea",props:t.mergeModels({id:{},class:{},label:{},for:{},required:{type:Boolean},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},rows:{default:3},cols:{},resize:{default:"vertical"},wrap:{default:"soft"},autosize:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),o=t.computed({get:()=>n.value,set:e=>{const t=a.maxLength
|
|
1499
1499
|
n.value=t?null==e?void 0:e.slice(0,t):e}})
|
|
1500
1500
|
t.watch(n,(e=>o.value=e),{immediate:!0})
|
|
1501
1501
|
const l=ke(a.id),r=t.computed((()=>a.readonly||a.disabled?void 0:a.placeholder)),i=t.computed((()=>({input:a.autosize?u:null}))),s=t.ref(),{triggerResize:u}=Nt({element:t.computed((()=>a.autosize?s.value:void 0)),styleProp:"minHeight"})
|
|
1502
|
-
return(e,n)=>(t.openBlock(),t.createBlock(t.unref(Xe),{class:t.normalizeClass(["q-text-area",a.class]),for:t.unref(l),label:a.label,size:a.size,readonly:a.readonly,disabled:a.disabled,required:a.required},t.createSlots({"label.prepend":t.withCtx((()=>[t.renderSlot(e.$slots,"label.prepend")])),"label.append":t.withCtx((()=>[t.renderSlot(e.$slots,"label.append")])),default:t.withCtx((()=>[t.withDirectives(t.createElementVNode("textarea",t.mergeProps({id:t.unref(l),ref_key:"textareaRef",ref:s,"onUpdate:modelValue":n[0]||(n[0]=e=>o.value=e),class:"q-text-area__input",required:a.required,placeholder:r.value,readonly:a.readonly,disabled:a.disabled,maxlength:a.maxLength,rows:a.rows,cols:a.cols,resize:a.resize,wrap:a.wrap},e.$attrs,t.toHandlers(i.value,!0)),null,16,
|
|
1503
|
-
return(e,n)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(["q-theme-provider",t.unref(o),a.class])},[t.renderSlot(e.$slots,"default")],10,
|
|
1502
|
+
return(e,n)=>(t.openBlock(),t.createBlock(t.unref(Xe),{class:t.normalizeClass(["q-text-area",a.class]),for:t.unref(l),label:a.label,size:a.size,readonly:a.readonly,disabled:a.disabled,required:a.required},t.createSlots({"label.prepend":t.withCtx((()=>[t.renderSlot(e.$slots,"label.prepend")])),"label.append":t.withCtx((()=>[t.renderSlot(e.$slots,"label.append")])),default:t.withCtx((()=>[t.withDirectives(t.createElementVNode("textarea",t.mergeProps({id:t.unref(l),ref_key:"textareaRef",ref:s,"onUpdate:modelValue":n[0]||(n[0]=e=>o.value=e),class:"q-text-area__input",required:a.required,placeholder:r.value,readonly:a.readonly,disabled:a.disabled,maxlength:a.maxLength,rows:a.rows,cols:a.cols,resize:a.resize,wrap:a.wrap},e.$attrs,t.toHandlers(i.value,!0)),null,16,Ic),[[t.vModelText,o.value]])])),_:2},[e.$slots.prepend?{name:"prepend",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"prepend")])),key:"0"}:void 0,e.$slots.append?{name:"append",fn:t.withCtx((()=>[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,["class","for","label","size","readonly","disabled","required"]))}})),Yc=["id"],Qc=x(t.defineComponent({__name:"QThemeProvider",props:{id:{},class:{},theme:{}},setup(e){const a=e,n=t.toRef(a,"theme"),{class:o}=z(n)
|
|
1503
|
+
return(e,n)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(["q-theme-provider",t.unref(o),a.class])},[t.renderSlot(e.$slots,"default")],10,Yc))}})),Hc={close:{icon:"close"}},Uc={class:"q-toast__title"},Wc=t.defineComponent({__name:"QToast",props:{id:{},class:{},block:{type:Boolean},color:{default:"info"},elevation:{default:"medium"},icons:{default:()=>Hc},text:{},timeout:{default:5e3},title:{},variant:{default:"tonal"}},emits:["dismiss"],setup(e,{emit:a}){const n=e,o=a,l=R(),{isUtilityColor:r,style:i}=L(t.toRef(n,"color")),s=t.computed((()=>{const e=r.value?`q-toast--${n.color}`:void 0,t=n.block?"q-toast--block":void 0,a=n.title?"q-toast--vertical":void 0
|
|
1504
1504
|
return["q-toast",`q-toast--${n.variant}`,e,t,a,n.class]})),u=t.computed((()=>{var e
|
|
1505
1505
|
const t=r.value?function(e){const t=l.current.value.scheme
|
|
1506
1506
|
if(e in t)return t[e]}(n.color):null==(e=i.value)?void 0:e.mainColor
|
|
@@ -1509,16 +1509,16 @@ return M(function(e,t){const a=$(e),n=t/100
|
|
|
1509
1509
|
return a.l=a.l+n*(100-a.l),E(a)}(S(t),88))})),d=t.computed((()=>{var e,t,a
|
|
1510
1510
|
return r.value?{"--q-toast-tonal-color":u.value}:{"--q-toast-main-color":null==(e=i.value)?void 0:e.mainColor,"--q-toast-on-main-color":null==(t=i.value)?void 0:t.onMainColor,"--q-toast-hover-color":null==(a=i.value)?void 0:a.hoverColor,"--q-toast-tonal-color":u.value}})),c=t.computed((()=>"bold"===n.variant?"bold":"ghost"))
|
|
1511
1511
|
let p
|
|
1512
|
-
function m(){void 0!==p&&window.clearTimeout(p),o("dismiss")}return t.onMounted((()=>{n.timeout>0&&(p=window.setTimeout(m,n.timeout))})),t.onUnmounted((()=>{void 0!==p&&window.clearTimeout(p)})),(e,a)=>(t.openBlock(),t.createBlock(t.unref(X),{id:n.id,elevation:n.elevation,width:n.block?"block":void 0,class:t.normalizeClass(s.value),style:t.normalizeStyle(d.value)},t.createSlots({default:t.withCtx((()=>[t.createVNode(t.unref(vd),{fluid:"",class:"q-toast__body"},{default:t.withCtx((()=>[t.createVNode(t.unref(fd),{align:"center",justify:"between"},{default:t.withCtx((()=>[t.createVNode(t.unref(md),null,{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default",{},(()=>[t.createElementVNode("span",null,t.toDisplayString(n.text),1)]))])),_:3}),n.title?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(md),{key:0,cols:"auto"},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"dismiss",{},(()=>[t.createVNode(t.unref(Y),{class:"q-toast__dismiss",variant:c.value,color:n.color,onClick:m},{default:t.withCtx((()=>[t.createVNode(t.unref(re),t.normalizeProps(t.guardReactiveProps(n.icons.close)),null,16)])),_:1},8,["variant","color"])]))])),_:3}))])),_:3})])),_:3})])),_:2},[n.title?{name:"header",fn:t.withCtx((()=>[t.createVNode(t.unref(vd),{fluid:""},{default:t.withCtx((()=>[t.createVNode(t.unref(fd),{align:"center",justify:"between"},{default:t.withCtx((()=>[t.createVNode(t.unref(md),null,{default:t.withCtx((()=>[t.createElementVNode("div",
|
|
1512
|
+
function m(){void 0!==p&&window.clearTimeout(p),o("dismiss")}return t.onMounted((()=>{n.timeout>0&&(p=window.setTimeout(m,n.timeout))})),t.onUnmounted((()=>{void 0!==p&&window.clearTimeout(p)})),(e,a)=>(t.openBlock(),t.createBlock(t.unref(X),{id:n.id,elevation:n.elevation,width:n.block?"block":void 0,class:t.normalizeClass(s.value),style:t.normalizeStyle(d.value)},t.createSlots({default:t.withCtx((()=>[t.createVNode(t.unref(vd),{fluid:"",class:"q-toast__body"},{default:t.withCtx((()=>[t.createVNode(t.unref(fd),{align:"center",justify:"between"},{default:t.withCtx((()=>[t.createVNode(t.unref(md),null,{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default",{},(()=>[t.createElementVNode("span",null,t.toDisplayString(n.text),1)]))])),_:3}),n.title?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(md),{key:0,cols:"auto"},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"dismiss",{},(()=>[t.createVNode(t.unref(Y),{class:"q-toast__dismiss",variant:c.value,color:n.color,onClick:m},{default:t.withCtx((()=>[t.createVNode(t.unref(re),t.normalizeProps(t.guardReactiveProps(n.icons.close)),null,16)])),_:1},8,["variant","color"])]))])),_:3}))])),_:3})])),_:3})])),_:2},[n.title?{name:"header",fn:t.withCtx((()=>[t.createVNode(t.unref(vd),{fluid:""},{default:t.withCtx((()=>[t.createVNode(t.unref(fd),{align:"center",justify:"between"},{default:t.withCtx((()=>[t.createVNode(t.unref(md),null,{default:t.withCtx((()=>[t.createElementVNode("div",Uc,[e.$slots["title.prepend"]?t.renderSlot(e.$slots,"title.prepend",{key:0}):t.createCommentVNode("",!0),t.createElementVNode("h4",null,t.toDisplayString(n.title),1),e.$slots["title.append"]?t.renderSlot(e.$slots,"title.append",{key:1}):t.createCommentVNode("",!0)])])),_:3}),t.createVNode(t.unref(md),{cols:"auto"},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"dismiss",{},(()=>[t.createVNode(t.unref(Y),{class:"q-toast__dismiss",variant:c.value,color:n.color,onClick:m},{default:t.withCtx((()=>[t.createVNode(t.unref(re),t.normalizeProps(t.guardReactiveProps(n.icons.close)),null,16)])),_:1},8,["variant","color"])]))])),_:3})])),_:3})])),_:3})])),key:"0"}:void 0]),1032,["id","elevation","width","class","style"]))}}),jc=t.defineComponent({__name:"QToaster",props:{id:{},class:{},placement:{default:"top-right"},maxToasts:{},reverseOrder:{type:Boolean}},setup(e){const a=e,{toasts:n,removeToast:o}=Ks(),l=t.computed((()=>{let e=[...n.value]
|
|
1513
1513
|
return a.reverseOrder&&(e=e.reverse()),e.slice(0,a.maxToasts)}))
|
|
1514
|
-
return(e,n)=>(t.openBlock(),t.createBlock(t.TransitionGroup,{id:a.id,name:"toast-stack",tag:"div",class:t.normalizeClass(["q-toaster",a.class]),"data-placement":a.placement},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(e=>(t.openBlock(),t.createElementBlock("div",{key:e.id,class:"q-toast__container"},[t.createVNode(t.unref(
|
|
1515
|
-
return t.watch(o,(e=>{n.value=e})),c({QToggleGroupItem:{disabled:t.toRef(a,"disabled"),borderless:t.toRef(a,"borderless")}}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(Te),{id:a.id,class:t.normalizeClass(a.class),elevated:a.elevated},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},8,["id","class","elevated"]))}}),
|
|
1514
|
+
return(e,n)=>(t.openBlock(),t.createBlock(t.TransitionGroup,{id:a.id,name:"toast-stack",tag:"div",class:t.normalizeClass(["q-toaster",a.class]),"data-placement":a.placement},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(e=>(t.openBlock(),t.createElementBlock("div",{key:e.id,class:"q-toast__container"},[t.createVNode(t.unref(Gc),t.mergeProps({ref_for:!0},e.props,{onDismiss:()=>t.unref(o)(e.id)}),null,16,["onDismiss"])])))),128))])),_:1},8,["id","class","data-placement"]))}}),Gc=x(Wc),Kc=x(jc),Xc=t.defineComponent({__name:"QToggleGroup",props:t.mergeModels({id:{},class:{},disabled:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean},multiple:{type:Boolean},required:{type:Boolean}},{modelValue:{type:[String,Number,Boolean,Symbol,Array]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),{active:o}=v({active:n,required:t.toRef(a,"required"),multiple:t.toRef(a,"multiple")})
|
|
1515
|
+
return t.watch(o,(e=>{n.value=e})),c({QToggleGroupItem:{disabled:t.toRef(a,"disabled"),borderless:t.toRef(a,"borderless")}}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(Te),{id:a.id,class:t.normalizeClass(a.class),elevated:a.elevated},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},8,["id","class","elevated"]))}}),Zc=t.defineComponent({__name:"QToggleGroupItem",props:{id:{},class:{},label:{},variant:{},color:{},disabled:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean},block:{type:Boolean},loading:{type:Boolean},size:{},iconPos:{},pill:{type:Boolean},value:{}},setup(e){const a=e,n=f(ke(a.value))
|
|
1516
1516
|
if(!n)throw new Error("QToggleGroupItem: Failed to retrieve group item. Ensure the component is used within a QToggleGroup context.")
|
|
1517
|
-
return(e,o)=>(t.openBlock(),t.createBlock(t.unref(xc),t.mergeProps({"model-value":t.unref(n).isActive.value},a,{"onUpdate:modelValue":t.unref(n).toggle}),{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},16,["model-value","onUpdate:modelValue"]))}}),
|
|
1517
|
+
return(e,o)=>(t.openBlock(),t.createBlock(t.unref(xc),t.mergeProps({"model-value":t.unref(n).isActive.value},a,{"onUpdate:modelValue":t.unref(n).toggle}),{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},16,["model-value","onUpdate:modelValue"]))}}),Jc=x(Xc),ep=x(Zc),tp={class:"q-tooltip__content"},ap=["innerHTML"],np=x(t.defineComponent({__name:"QTooltip",props:t.mergeModels({id:{},class:{},anchor:{},appearance:{default:"inverted"},arrow:{type:Boolean,default:!0},attach:{default:"body"},inline:{type:Boolean},delay:{default:500},disabled:{type:Boolean},html:{type:Boolean,default:!0},placement:{default:"right"},text:{},icon:{},trigger:{default:"hover"}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),o=ke(a.id)
|
|
1518
1518
|
function l(){return a.anchor?Ea(a.anchor):void 0}function r(){var e
|
|
1519
1519
|
null==(e=l())||e.setAttribute("aria-describedby",o)}function i(){var e
|
|
1520
|
-
null==(e=l())||e.removeAttribute("aria-describedby")}return t.onUnmounted((function(){a.anchor&&i()})),t.watch((()=>a.anchor),(function(e,t){t&&i(),e&&n&&r()})),(e,l)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.renderSlot(e.$slots,"anchor",{props:{"aria-describedby":t.unref(o)}}),t.createVNode(t.unref(Ta),{id:t.unref(o),modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=e=>n.value=e),anchor:a.anchor,role:"tooltip","non-modal":"",appearance:a.appearance,arrow:a.arrow,attach:a.attach,inline:a.inline,class:t.normalizeClass(["q-tooltip",a.class]),delay:a.delay,disabled:a.disabled,placement:a.placement,trigger:a.trigger,onEnter:r,onLeave:i},{default:t.withCtx((()=>[t.createElementVNode("div",
|
|
1521
|
-
function
|
|
1520
|
+
null==(e=l())||e.removeAttribute("aria-describedby")}return t.onUnmounted((function(){a.anchor&&i()})),t.watch((()=>a.anchor),(function(e,t){t&&i(),e&&n&&r()})),(e,l)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.renderSlot(e.$slots,"anchor",{props:{"aria-describedby":t.unref(o)}}),t.createVNode(t.unref(Ta),{id:t.unref(o),modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=e=>n.value=e),anchor:a.anchor,role:"tooltip","non-modal":"",appearance:a.appearance,arrow:a.arrow,attach:a.attach,inline:a.inline,class:t.normalizeClass(["q-tooltip",a.class]),delay:a.delay,disabled:a.disabled,placement:a.placement,trigger:a.trigger,onEnter:r,onLeave:i},{default:t.withCtx((()=>[t.createElementVNode("div",tp,[t.renderSlot(e.$slots,"default",{},(()=>[a.icon?(t.openBlock(),t.createBlock(t.unref(re),t.normalizeProps(t.mergeProps({key:0},a.icon)),null,16)):t.createCommentVNode("",!0),a.html?(t.openBlock(),t.createElementBlock("span",{key:1,innerHTML:a.text},null,8,ap)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString(a.text),1)],64))]))])])),_:3},8,["id","modelValue","anchor","appearance","arrow","attach","inline","class","delay","disabled","placement","trigger"])],64))}})),op=Object.freeze(Object.defineProperty({__proto__:null,QAccordion:_e,QAccordionItem:xe,QBadge:$e,QBadgeIndicator:Ne,QButton:Y,QButtonGroup:Te,QCard:X,QCheckbox:Qe,QCheckboxLabel:He,QCol:md,QCollapsible:ge,QColorPicker:ot,QCombobox:Ra,QContainer:vd,QDateTimePicker:Bu,QDialog:Ou,QDialogProvider:Iu,QDismissibleLayer:xt,QDivider:Yu,QDropdownMenu:Wu,QField:Xe,QFileUpload:id,QFocusTrap:ha,QIcon:re,QIconFont:ie,QIconImg:se,QIconSvg:ue,QInputGroup:wd,QLabel:Oe,QLineLoader:xd,QList:gt,QListItem:bt,QListItemGroup:kt,QMeter:Md,QOverlay:Ta,QPasswordField:Pd,QPopover:Od,QPropertyList:oc,QPropertyListGroup:rc,QPropertyListPanel:ic,QPropertyListRow:lc,QRadioButton:mc,QRadioGroup:vc,QRow:fd,QSelect:_c,QSidebar:Tc,QSkeletonLoader:Ac,QSpacer:hd,QSpinnerLoader:B,QSwitch:Oc,QTextArea:Fc,QTextField:at,QThemeProvider:Qc,QToast:Gc,QToaster:Kc,QToggle:xc,QToggleGroup:Jc,QToggleGroupItem:ep,QTooltip:np},Symbol.toStringTag,{value:"Module"}))
|
|
1521
|
+
function lp(e={}){return{install:a=>{const n=e.components||{}
|
|
1522
1522
|
for(const e in n)a.component(e,n[e])
|
|
1523
1523
|
const r=e.defaults||{}
|
|
1524
1524
|
a.provide(d,t.ref(r)),function(e,a){const n=[]
|
|
@@ -1526,9 +1526,9 @@ let r
|
|
|
1526
1526
|
if(a)for(const e of a.themes){const t={..."light"===e.mode?o:l,...e.colors}
|
|
1527
1527
|
n.push({name:e.name,mode:e.mode,scheme:t}),e.name===a.defaultTheme&&(r=e.name)}else r="default",n.push({name:r,mode:"light",scheme:o})
|
|
1528
1528
|
if(r){const a=A(t.ref(r),n)
|
|
1529
|
-
T(n),t.watch(a.name,
|
|
1529
|
+
T(n),t.watch(a.name,rp,{immediate:!0}),e.provide(q,a)}}(a,e.themes)
|
|
1530
1530
|
const i=function(){const e=t.ref([])
|
|
1531
1531
|
return{layers:e,register:function(t){e.value.push(t)},unregister:function(t){const a=e.value.indexOf(t);-1!==a&&e.value.splice(a,1)},isTop:function(t){return e.value[e.value.length-1]===t}}}()
|
|
1532
1532
|
a.provide(wt,i),function(e){const a={toasts:t.ref([])}
|
|
1533
|
-
e.provide(Gs,a)}(a)}}}function
|
|
1534
|
-
t.className=a.join(" "),t.classList.add(`q-theme--${e}`)}e.components=
|
|
1533
|
+
e.provide(Gs,a)}(a)}}}function rp(e){const t=document.documentElement,a=Array.from(t.classList).filter((e=>!e.startsWith("q-theme")))
|
|
1534
|
+
t.className=a.join(" "),t.classList.add(`q-theme--${e}`)}e.components=op,e.createFramework=(e={})=>lp({components:op,...e}),e.provideTheme=z,e.templates=r,e.useDialog=js,e.useTheme=R,e.useToast=Ks,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}))
|
package/dist/ui.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.16.
|
|
2
|
+
* Quidgest UI v0.16.18
|
|
3
3
|
* (c) 2025 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -266,6 +266,7 @@ $input-padding-x: 0.25rem !default;
|
|
|
266
266
|
outline-offset: 1px;
|
|
267
267
|
}
|
|
268
268
|
body {
|
|
269
|
+
background-color: var(--q-theme-background);
|
|
269
270
|
font-size: $font-size-base;
|
|
270
271
|
color: var(--q-theme-on-background);
|
|
271
272
|
caret-color: var(--q-theme-on-background);
|
|
@@ -289,6 +290,31 @@ body {
|
|
|
289
290
|
}
|
|
290
291
|
}
|
|
291
292
|
}
|
|
293
|
+
a {
|
|
294
|
+
text-decoration: underline;
|
|
295
|
+
text-decoration-color: transparent;
|
|
296
|
+
transition:
|
|
297
|
+
color 0.15s,
|
|
298
|
+
text-decoration-color 0.15s;
|
|
299
|
+
&:not(:visited) {
|
|
300
|
+
color: var(--q-theme-primary);
|
|
301
|
+
}
|
|
302
|
+
&:visited {
|
|
303
|
+
color: #6a0dad;
|
|
304
|
+
}
|
|
305
|
+
&:hover,
|
|
306
|
+
&:focus {
|
|
307
|
+
color: var(--q-theme-primary-dark);
|
|
308
|
+
text-decoration-color: currentcolor;
|
|
309
|
+
}
|
|
310
|
+
&:active {
|
|
311
|
+
color: var(--q-theme-primary-dark);
|
|
312
|
+
text-decoration: none;
|
|
313
|
+
}
|
|
314
|
+
&:focus {
|
|
315
|
+
outline: $outline;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
292
318
|
$transition-duration: 0.2s !default;
|
|
293
319
|
.fade-enter-from,
|
|
294
320
|
.fade-leave-to {
|
|
@@ -835,7 +861,7 @@ $transition-duration: 0.2s !default;
|
|
|
835
861
|
margin: 0;
|
|
836
862
|
font-size: 0.75rem;
|
|
837
863
|
color: var(--q-theme-neutral);
|
|
838
|
-
padding-top: 0.
|
|
864
|
+
padding-top: 0.5rem;
|
|
839
865
|
}
|
|
840
866
|
&__content {
|
|
841
867
|
display: flex;
|
|
@@ -1300,7 +1326,7 @@ $transition-duration: 0.2s !default;
|
|
|
1300
1326
|
align-items: center;
|
|
1301
1327
|
justify-content: center;
|
|
1302
1328
|
position: relative;
|
|
1303
|
-
color:
|
|
1329
|
+
color: var(--q-theme-neutral);
|
|
1304
1330
|
font-size: 0.875rem;
|
|
1305
1331
|
}
|
|
1306
1332
|
.q-divider--horizontal {
|
|
@@ -1311,15 +1337,14 @@ $transition-duration: 0.2s !default;
|
|
|
1311
1337
|
.q-divider--horizontal:not(.q-divider--labeled)::before {
|
|
1312
1338
|
content: '';
|
|
1313
1339
|
flex: 1;
|
|
1314
|
-
border-top: 1px
|
|
1340
|
+
border-top-width: 1px;
|
|
1315
1341
|
}
|
|
1316
1342
|
.q-divider--horizontal.q-divider--labeled .q-divider__line {
|
|
1317
1343
|
flex: 1;
|
|
1318
|
-
border-top: 1px
|
|
1344
|
+
border-top-width: 1px;
|
|
1319
1345
|
}
|
|
1320
1346
|
.q-divider--horizontal.q-divider--labeled .q-divider__label {
|
|
1321
1347
|
padding: 0 12px;
|
|
1322
|
-
background: white;
|
|
1323
1348
|
white-space: nowrap;
|
|
1324
1349
|
}
|
|
1325
1350
|
.q-divider--horizontal.q-divider--inset {
|
|
@@ -1337,17 +1362,16 @@ $transition-duration: 0.2s !default;
|
|
|
1337
1362
|
.q-divider--vertical:not(.q-divider--labeled)::before {
|
|
1338
1363
|
content: '';
|
|
1339
1364
|
flex: 1;
|
|
1340
|
-
border-left: 1px
|
|
1365
|
+
border-left-width: 1px;
|
|
1341
1366
|
}
|
|
1342
1367
|
.q-divider--vertical.q-divider--labeled .q-divider__line {
|
|
1343
|
-
border-left: 1px
|
|
1368
|
+
border-left-width: 1px;
|
|
1344
1369
|
height: 100%;
|
|
1345
1370
|
}
|
|
1346
1371
|
.q-divider--vertical.q-divider--labeled .q-divider__label {
|
|
1347
1372
|
writing-mode: vertical-rl;
|
|
1348
1373
|
text-orientation: mixed;
|
|
1349
1374
|
padding: 12px 0;
|
|
1350
|
-
background: white;
|
|
1351
1375
|
white-space: nowrap;
|
|
1352
1376
|
}
|
|
1353
1377
|
.q-divider--vertical.q-divider--inset {
|
|
@@ -2136,7 +2160,7 @@ $base-border: 1px solid rgb(0 0 0 / 10%);
|
|
|
2136
2160
|
}
|
|
2137
2161
|
}
|
|
2138
2162
|
&__cell {
|
|
2139
|
-
padding: 0.
|
|
2163
|
+
padding: 0.25rem 0.5rem;
|
|
2140
2164
|
&--label {
|
|
2141
2165
|
width: 20%;
|
|
2142
2166
|
font-size: 0.85rem;
|
|
@@ -2144,6 +2168,10 @@ $base-border: 1px solid rgb(0 0 0 / 10%);
|
|
|
2144
2168
|
opacity: 0.8;
|
|
2145
2169
|
}
|
|
2146
2170
|
}
|
|
2171
|
+
&-field__container {
|
|
2172
|
+
display: flex;
|
|
2173
|
+
align-items: center;
|
|
2174
|
+
}
|
|
2147
2175
|
&-group {
|
|
2148
2176
|
cursor: pointer;
|
|
2149
2177
|
td {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as x, mergeModels as C, useModel as _, toRef as g, useTemplateRef as B, computed as $, watch as w, createElementBlock as E, openBlock as r, normalizeClass as V, createBlock as n, createCommentVNode as
|
|
1
|
+
import { defineComponent as x, mergeModels as C, useModel as _, toRef as g, useTemplateRef as B, computed as $, watch as w, createElementBlock as E, openBlock as r, normalizeClass as V, createBlock as n, createCommentVNode as t, createElementVNode as b, unref as a, createSlots as f, withCtx as p, renderSlot as h, mergeProps as k, withKeys as y, withModifiers as d } from "vue";
|
|
2
2
|
import { DEFAULT_ICONS as M } from "./constants.js";
|
|
3
3
|
import { QIcon as P } from "../QIcon/index.js";
|
|
4
4
|
import { QCheckboxLabel as q } from "./index.js";
|
|
@@ -25,30 +25,30 @@ const I = ["checked", "disabled", "required", "aria-readonly"], K = ["id", "aria
|
|
|
25
25
|
}),
|
|
26
26
|
emits: ["update:modelValue"],
|
|
27
27
|
setup(s) {
|
|
28
|
-
const e = s,
|
|
28
|
+
const e = s, l = _(s, "modelValue"), i = z(g(e, "id")), c = B("inputEl"), v = $(() => [
|
|
29
29
|
"q-checkbox",
|
|
30
30
|
`q-checkbox--${e.size}`,
|
|
31
31
|
`q-checkbox--${e.color}`,
|
|
32
32
|
{
|
|
33
33
|
"q-checkbox--readonly": e.readonly,
|
|
34
34
|
"q-checkbox--disabled": e.disabled,
|
|
35
|
-
"q-checkbox--checked":
|
|
35
|
+
"q-checkbox--checked": l.value,
|
|
36
36
|
"q-checkbox--indeterminate": e.indeterminate
|
|
37
37
|
},
|
|
38
38
|
e.class
|
|
39
39
|
]);
|
|
40
40
|
function u() {
|
|
41
|
-
!e.disabled && !e.readonly && (
|
|
41
|
+
!e.disabled && !e.readonly && (l.value = !l.value);
|
|
42
42
|
}
|
|
43
|
-
return w(
|
|
44
|
-
c.value && (c.value.checked = !!
|
|
45
|
-
}), (
|
|
43
|
+
return w(l, (o) => {
|
|
44
|
+
c.value && (c.value.checked = !!o);
|
|
45
|
+
}), (o, m) => (r(), E(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
48
48
|
class: V(v.value)
|
|
49
49
|
},
|
|
50
50
|
[
|
|
51
|
-
e.labelPlacement !== "right" ? (r(), n(a(q), {
|
|
51
|
+
e.label && e.labelPlacement !== "right" ? (r(), n(a(q), {
|
|
52
52
|
key: 0,
|
|
53
53
|
for: a(i),
|
|
54
54
|
label: e.label,
|
|
@@ -57,33 +57,33 @@ const I = ["checked", "disabled", "required", "aria-readonly"], K = ["id", "aria
|
|
|
57
57
|
_: 2
|
|
58
58
|
/* DYNAMIC */
|
|
59
59
|
}, [
|
|
60
|
-
|
|
60
|
+
o.$slots.extras ? {
|
|
61
61
|
name: "extras",
|
|
62
62
|
fn: p(() => [
|
|
63
|
-
h(
|
|
63
|
+
h(o.$slots, "extras")
|
|
64
64
|
]),
|
|
65
65
|
key: "0"
|
|
66
66
|
} : void 0
|
|
67
|
-
]), 1032, ["for", "label", "required"])) :
|
|
68
|
-
|
|
67
|
+
]), 1032, ["for", "label", "required"])) : t("v-if", !0),
|
|
68
|
+
t(" Hidden native input for form submission "),
|
|
69
69
|
b("input", k({
|
|
70
70
|
ref: "inputEl",
|
|
71
71
|
type: "checkbox",
|
|
72
72
|
class: "q-checkbox__native-input",
|
|
73
|
-
checked:
|
|
73
|
+
checked: l.value,
|
|
74
74
|
disabled: e.disabled || e.readonly,
|
|
75
75
|
required: e.required,
|
|
76
76
|
"aria-readonly": e.readonly,
|
|
77
77
|
tabindex: "-1",
|
|
78
78
|
"aria-hidden": "true"
|
|
79
|
-
},
|
|
80
|
-
|
|
79
|
+
}, o.$attrs), null, 16, I),
|
|
80
|
+
t(" Custom interactive button "),
|
|
81
81
|
b("button", {
|
|
82
82
|
id: a(i),
|
|
83
83
|
role: "checkbox",
|
|
84
84
|
type: "button",
|
|
85
85
|
class: "q-checkbox__input",
|
|
86
|
-
"aria-checked": e.indeterminate ? "mixed" :
|
|
86
|
+
"aria-checked": e.indeterminate ? "mixed" : l.value,
|
|
87
87
|
disabled: e.disabled || e.readonly,
|
|
88
88
|
onClick: d(u, ["prevent"]),
|
|
89
89
|
onKeydown: [
|
|
@@ -92,15 +92,15 @@ const I = ["checked", "disabled", "required", "aria-readonly"], K = ["id", "aria
|
|
|
92
92
|
}, ["prevent"]), ["enter"]))
|
|
93
93
|
]
|
|
94
94
|
}, [
|
|
95
|
-
|
|
95
|
+
l.value || o.indeterminate ? (r(), n(
|
|
96
96
|
a(P),
|
|
97
|
-
k({ key: 0 },
|
|
97
|
+
k({ key: 0 }, l.value ? e.icons.checked : e.icons.indeterminate, { class: "q-checkbox__input-icon" }),
|
|
98
98
|
null,
|
|
99
99
|
16
|
|
100
100
|
/* FULL_PROPS */
|
|
101
|
-
)) :
|
|
101
|
+
)) : t("v-if", !0)
|
|
102
102
|
], 40, K),
|
|
103
|
-
e.labelPlacement === "right" ? (r(), n(a(q), {
|
|
103
|
+
e.label && e.labelPlacement === "right" ? (r(), n(a(q), {
|
|
104
104
|
key: 1,
|
|
105
105
|
for: a(i),
|
|
106
106
|
label: e.label,
|
|
@@ -109,14 +109,14 @@ const I = ["checked", "disabled", "required", "aria-readonly"], K = ["id", "aria
|
|
|
109
109
|
_: 2
|
|
110
110
|
/* DYNAMIC */
|
|
111
111
|
}, [
|
|
112
|
-
|
|
112
|
+
o.$slots.extras ? {
|
|
113
113
|
name: "extras",
|
|
114
114
|
fn: p(() => [
|
|
115
|
-
h(
|
|
115
|
+
h(o.$slots, "extras")
|
|
116
116
|
]),
|
|
117
117
|
key: "0"
|
|
118
118
|
} : void 0
|
|
119
|
-
]), 1032, ["for", "label", "required"])) :
|
|
119
|
+
]), 1032, ["for", "label", "required"])) : t("v-if", !0)
|
|
120
120
|
],
|
|
121
121
|
2
|
|
122
122
|
/* CLASS */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QSwitch.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSwitch/QSwitch.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QSwitch.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSwitch/QSwitch.vue"],"names":[],"mappings":"AA4CA;AAiIC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C,KAAK,WAAW,GAAG,YAAY,CAAC;AAqEjC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;;;;;;;;;;AAiGhB,wBAQG"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as L, mergeModels as g, useModel as S, toRef as c, computed as w, createElementBlock as
|
|
2
|
-
import { QLabel as
|
|
3
|
-
import { useId as
|
|
1
|
+
import { defineComponent as L, mergeModels as g, useModel as S, toRef as c, computed as w, createElementBlock as r, openBlock as i, withModifiers as B, createBlock as V, createCommentVNode as d, createElementVNode as a, unref as n, withCtx as z, createTextVNode as u, toDisplayString as h, normalizeStyle as M, normalizeClass as x, withDirectives as D, mergeProps as I, vModelCheckbox as N, Fragment as _ } from "vue";
|
|
2
|
+
import { QLabel as E } from "../QLabel/index.js";
|
|
3
|
+
import { useId as O } from "../../composables/uid.js";
|
|
4
4
|
import { useColor as q } from "../../composables/useColor/index.js";
|
|
5
|
-
const
|
|
5
|
+
const P = ["id", "aria-checked", "disabled"], Q = { class: "q-switch__labels" }, $ = {
|
|
6
6
|
class: "q-switch__label q-switch__label--off",
|
|
7
7
|
"aria-hidden": "true"
|
|
8
8
|
}, A = {
|
|
@@ -30,34 +30,38 @@ const O = { class: "q-switch__container" }, P = ["id", "aria-checked", "disabled
|
|
|
30
30
|
}),
|
|
31
31
|
emits: ["update:modelValue"],
|
|
32
32
|
setup(m) {
|
|
33
|
-
const e = m,
|
|
34
|
-
e.readonly && (t.preventDefault(), t.stopImmediatePropagation(), t.target.checked = !!
|
|
35
|
-
}, b =
|
|
33
|
+
const e = m, o = S(m, "modelValue"), v = (t) => {
|
|
34
|
+
e.readonly && (t.preventDefault(), t.stopImmediatePropagation(), t.target.checked = !!o.value);
|
|
35
|
+
}, b = O(c(e, "id")), { style: f } = q(c(e, "checkedColor")), { style: p } = q(c(e, "uncheckedColor")), y = w(() => [
|
|
36
36
|
"q-switch",
|
|
37
37
|
e.size !== "medium" ? `q-switch--${e.size}` : void 0,
|
|
38
38
|
{
|
|
39
|
-
"q-switch--checked":
|
|
39
|
+
"q-switch--checked": o.value,
|
|
40
40
|
"q-switch--disabled": e.disabled,
|
|
41
41
|
"q-switch--readonly": e.readonly,
|
|
42
42
|
"q-switch--with-labels": e.showStateLabels && (e.trueLabel || e.falseLabel)
|
|
43
43
|
},
|
|
44
44
|
e.class
|
|
45
45
|
]), C = w(() => {
|
|
46
|
-
var t,
|
|
46
|
+
var t, l, s, k;
|
|
47
47
|
return {
|
|
48
48
|
"--q-switch-checked-background": (t = f.value) == null ? void 0 : t.mainColor,
|
|
49
|
-
"--q-switch-on-checked-background": (
|
|
49
|
+
"--q-switch-on-checked-background": (l = f.value) == null ? void 0 : l.onMainColor,
|
|
50
50
|
"--q-switch-unchecked-background": (s = p.value) == null ? void 0 : s.mainColor,
|
|
51
51
|
"--q-switch-on-unchecked-background": (k = p.value) == null ? void 0 : k.onMainColor
|
|
52
52
|
};
|
|
53
53
|
});
|
|
54
|
-
return (t,
|
|
55
|
-
|
|
54
|
+
return (t, l) => (i(), r("div", {
|
|
55
|
+
class: "q-switch__container",
|
|
56
|
+
onClick: l[1] || (l[1] = B(() => {
|
|
57
|
+
}, ["stop"]))
|
|
58
|
+
}, [
|
|
59
|
+
e.label ? (i(), V(n(E), {
|
|
56
60
|
key: 0,
|
|
57
61
|
for: n(b),
|
|
58
62
|
required: e.required
|
|
59
63
|
}, {
|
|
60
|
-
default:
|
|
64
|
+
default: z(() => [
|
|
61
65
|
u(
|
|
62
66
|
h(e.label),
|
|
63
67
|
1
|
|
@@ -66,28 +70,28 @@ const O = { class: "q-switch__container" }, P = ["id", "aria-checked", "disabled
|
|
|
66
70
|
]),
|
|
67
71
|
_: 1
|
|
68
72
|
/* STABLE */
|
|
69
|
-
}, 8, ["for", "required"])) :
|
|
73
|
+
}, 8, ["for", "required"])) : d("v-if", !0),
|
|
70
74
|
a(
|
|
71
75
|
"div",
|
|
72
76
|
{
|
|
73
|
-
class:
|
|
74
|
-
style:
|
|
77
|
+
class: x(y.value),
|
|
78
|
+
style: M(C.value)
|
|
75
79
|
},
|
|
76
80
|
[
|
|
77
|
-
|
|
81
|
+
D(a("input", I({
|
|
78
82
|
id: n(b),
|
|
79
|
-
"onUpdate:modelValue":
|
|
83
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => o.value = s),
|
|
80
84
|
class: "q-switch__input",
|
|
81
85
|
type: "checkbox",
|
|
82
86
|
role: "switch",
|
|
83
|
-
"aria-checked":
|
|
87
|
+
"aria-checked": o.value,
|
|
84
88
|
disabled: e.disabled
|
|
85
89
|
}, t.$attrs, { onInput: v }), null, 16, P), [
|
|
86
|
-
[
|
|
90
|
+
[N, o.value]
|
|
87
91
|
]),
|
|
88
92
|
a("div", Q, [
|
|
89
93
|
a("span", $, [
|
|
90
|
-
e.showStateLabels ? (i(),
|
|
94
|
+
e.showStateLabels ? (i(), r(
|
|
91
95
|
_,
|
|
92
96
|
{ key: 0 },
|
|
93
97
|
[
|
|
@@ -99,10 +103,10 @@ const O = { class: "q-switch__container" }, P = ["id", "aria-checked", "disabled
|
|
|
99
103
|
],
|
|
100
104
|
64
|
|
101
105
|
/* STABLE_FRAGMENT */
|
|
102
|
-
)) :
|
|
106
|
+
)) : d("v-if", !0)
|
|
103
107
|
]),
|
|
104
108
|
a("span", A, [
|
|
105
|
-
e.showStateLabels ? (i(),
|
|
109
|
+
e.showStateLabels ? (i(), r(
|
|
106
110
|
_,
|
|
107
111
|
{ key: 0 },
|
|
108
112
|
[
|
|
@@ -114,7 +118,7 @@ const O = { class: "q-switch__container" }, P = ["id", "aria-checked", "disabled
|
|
|
114
118
|
],
|
|
115
119
|
64
|
|
116
120
|
/* STABLE_FRAGMENT */
|
|
117
|
-
)) :
|
|
121
|
+
)) : d("v-if", !0)
|
|
118
122
|
])
|
|
119
123
|
])
|
|
120
124
|
],
|
package/esm/templates/theme.js
CHANGED
|
@@ -35,41 +35,41 @@ const f = {
|
|
|
35
35
|
onInfo: "#fff",
|
|
36
36
|
onNeutral: "#fff"
|
|
37
37
|
}, a = {
|
|
38
|
-
primary: "#
|
|
39
|
-
primaryLight: "#
|
|
40
|
-
primaryDark: "#
|
|
41
|
-
secondary: "#
|
|
42
|
-
secondaryLight: "#
|
|
43
|
-
secondaryDark: "#
|
|
44
|
-
highlight: "#
|
|
45
|
-
highlightLight: "#
|
|
46
|
-
highlightDark: "#
|
|
47
|
-
info: "#
|
|
48
|
-
infoLight: "#
|
|
49
|
-
infoDark: "#
|
|
50
|
-
success: "#
|
|
51
|
-
successLight: "#
|
|
52
|
-
successDark: "#
|
|
53
|
-
warning: "#
|
|
54
|
-
warningLight: "#
|
|
55
|
-
warningDark: "#
|
|
56
|
-
danger: "#
|
|
57
|
-
dangerLight: "#
|
|
58
|
-
dangerDark: "#
|
|
59
|
-
background: "#
|
|
60
|
-
container: "#
|
|
61
|
-
neutral: "#
|
|
62
|
-
neutralLight: "#
|
|
63
|
-
neutralDark: "#
|
|
64
|
-
onBackground: "#
|
|
65
|
-
onPrimary: "#
|
|
66
|
-
onSecondary: "#
|
|
67
|
-
onHighlight: "#
|
|
68
|
-
onSuccess: "#
|
|
69
|
-
onWarning: "#
|
|
70
|
-
onDanger: "#
|
|
71
|
-
onInfo: "#
|
|
72
|
-
onNeutral: "#
|
|
38
|
+
primary: "#4da6e0",
|
|
39
|
+
primaryLight: "#2d8bc7",
|
|
40
|
+
primaryDark: "#87c4e8",
|
|
41
|
+
secondary: "#4a6b82",
|
|
42
|
+
secondaryLight: "#2c4a5e",
|
|
43
|
+
secondaryDark: "#6b8ca3",
|
|
44
|
+
highlight: "#ff9966",
|
|
45
|
+
highlightLight: "#e67344",
|
|
46
|
+
highlightDark: "#ffb088",
|
|
47
|
+
info: "#3bb5d1",
|
|
48
|
+
infoLight: "#2a9bb8",
|
|
49
|
+
infoDark: "#66c7dd",
|
|
50
|
+
success: "#4caf50",
|
|
51
|
+
successLight: "#388e3c",
|
|
52
|
+
successDark: "#81c784",
|
|
53
|
+
warning: "#ffb74d",
|
|
54
|
+
warningLight: "#e67e22",
|
|
55
|
+
warningDark: "#ffcc80",
|
|
56
|
+
danger: "#e57373",
|
|
57
|
+
dangerLight: "#c62828",
|
|
58
|
+
dangerDark: "#ef9a9a",
|
|
59
|
+
background: "#121212",
|
|
60
|
+
container: "#1e1e1e",
|
|
61
|
+
neutral: "#9e9e9e",
|
|
62
|
+
neutralLight: "#666666",
|
|
63
|
+
neutralDark: "#d0d0d0",
|
|
64
|
+
onBackground: "#ffffff",
|
|
65
|
+
onPrimary: "#ffffff",
|
|
66
|
+
onSecondary: "#ffffff",
|
|
67
|
+
onHighlight: "#ffffff",
|
|
68
|
+
onSuccess: "#ffffff",
|
|
69
|
+
onWarning: "#000000",
|
|
70
|
+
onDanger: "#ffffff",
|
|
71
|
+
onInfo: "#ffffff",
|
|
72
|
+
onNeutral: "#000000"
|
|
73
73
|
};
|
|
74
74
|
export {
|
|
75
75
|
a as defaultDarkColorScheme,
|