@quidgest/ui 0.16.27 → 0.16.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui.esm.js +669 -662
- package/dist/ui.js +10 -10
- package/dist/ui.min.js +5 -5
- package/dist/ui.scss +1 -1
- package/esm/components/QColorPicker/QColorPicker.d.ts.map +1 -1
- package/esm/components/QColorPicker/QColorPicker.vue.js +20 -16
- package/esm/components/QPropertyList/QPropertyListRow.d.ts +1 -0
- package/esm/components/QPropertyList/QPropertyListRow.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyListRow.vue.js +42 -43
- package/esm/components/QPropertyList/index.d.ts +1 -0
- package/esm/components/QPropertyList/index.d.ts.map +1 -1
- package/esm/components/QPropertyList/types.d.ts +4 -0
- package/esm/components/QPropertyList/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/ui.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
!function(e,t){"object"==typeof exports&&typeof module<"u"?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e=typeof globalThis<"u"?globalThis:e||self)["Quidgest UI"]={},e.Vue)}(this,(function(e,t){"use strict"
|
|
2
2
|
var a=Object.defineProperty,n=(e,t,n)=>((e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n)
|
|
3
3
|
/*!
|
|
4
|
-
* Quidgest UI v0.16.
|
|
4
|
+
* Quidgest UI v0.16.28
|
|
5
5
|
* (c) 2025 Quidgest - Consultores de Gestão, S.A.
|
|
6
6
|
* Released under the MIT License.
|
|
7
7
|
*/
|
|
@@ -173,7 +173,7 @@ const s=xe(t.toRef(o,"id")),u=t.ref(null),d=t.ref(null),c=t.computed((()=>o.read
|
|
|
173
173
|
function v(e){p.value&&(r.value="",l("click:clear",e))}return a({fieldRef:t.computed((()=>{var e
|
|
174
174
|
return null==(e=u.value)?void 0:e.fieldRef})),inputRef:d}),(e,a)=>(t.openBlock(),t.createBlock(t.unref(_t),{ref_key:"fieldRef",ref:u,class:t.normalizeClass(["q-text-field",o.class]),for:t.unref(s),label:o.label,size:o.size,readonly:o.readonly,disabled:o.disabled,required:o.required,invalid:o.invalid},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("input",t.mergeProps({id:t.unref(s),ref_key:"inputRef",ref:d,"onUpdate:modelValue":a[0]||(a[0]=e=>i.value=e),class:"q-text-field__input",type:o.type,maxlength:o.maxLength,required:o.required,placeholder:c.value,readonly:o.readonly,disabled:o.disabled},e.$attrs),null,16,St),[[t.vModelDynamic,i.value]])])),_:2},[e.$slots.prepend?{name:"prepend",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"prepend")])),key:"0"}:void 0,e.$slots.append||m.value?{name:"append",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"append"),m.value?(t.openBlock(),t.createBlock(t.unref(Ct),{key:0,"data-testid":"q-text-field__clear-button",texts:o.texts,onClick:v},null,8,["texts"])):t.createCommentVNode("",!0)])),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","invalid"]))}})),Vt=["readonly","disabled","aria-label"],Et=B(t.defineComponent({inheritAttrs:!1,__name:"QColorPicker",props:t.mergeModels({id:{},class:{},placeholder:{},label:{},size:{default:"small"},readonly:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},texts:{default:()=>yt}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,n=t.useModel(e,"modelValue"),o=t.ref(""),l=t.ref(""),r=t.computed((()=>a.readonly||a.disabled))
|
|
175
175
|
function i(e){return S(e,!0)}function s(e){const t=e.target
|
|
176
|
-
n.value=i(t.value)?t.value:""}function u(){i(l.value)?n.value=l.value:(n.value="",l.value="")}return t.watch(n,(function(e){e&&i(e)?o.value=e:o.value="#000000"}),{immediate:!0}),t.watch(n,(function(e){e&&i(e)?l.value=e:l.value=""}),{immediate:!0}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(Mt),{id:a.id,modelValue:l.value,"onUpdate:modelValue":n[
|
|
176
|
+
n.value=i(t.value)?t.value:""}function u(){i(l.value)?n.value=l.value:(n.value="",l.value="")}return t.watch(n,(function(e){e&&i(e)?o.value=e:o.value="#000000"}),{immediate:!0}),t.watch(n,(function(e){e&&i(e)?l.value=e:l.value=""}),{immediate:!0}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(Mt),{id:a.id,modelValue:l.value,"onUpdate:modelValue":n[2]||(n[2]=e=>l.value=e),"max-length":7,class:t.normalizeClass(["q-color-picker",a.class]),label:a.label,size:a.size,readonly:a.readonly,disabled:a.disabled,required:a.required,placeholder:a.placeholder,onChange:u},t.createSlots({"label.prepend":t.withCtx((()=>[t.renderSlot(e.$slots,"label.prepend")])),"label.append":t.withCtx((()=>[t.renderSlot(e.$slots,"label.append")])),prepend:t.withCtx((()=>[t.renderSlot(e.$slots,"prepend"),t.withDirectives(t.createElementVNode("input",t.mergeProps({"onUpdate:modelValue":n[0]||(n[0]=e=>o.value=e),type:"color",class:"q-color-picker__swatch",readonly:a.readonly,disabled:r.value,"aria-label":a.texts.selectColor},e.$attrs,{onChange:s,onClick:n[1]||(n[1]=t.withModifiers((()=>{}),["stop"]))}),null,16,Vt),[[t.vModelText,o.value]])])),_:2},[e.$slots.append?{name:"append",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"append")])),key:"0"}:void 0,e.$slots.extras?{name:"extras",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"extras")])),key:"1"}:void 0]),1032,["id","modelValue","class","label","size","readonly","disabled","required","placeholder"]))}})),$t={...xt,noData:"No data available",showOptions:"Show options"},Nt={...b,...Bt},Dt=t.defineComponent({__name:"QList",props:{id:{},class:{},modelValue:{},highlighted:{},items:{},groups:{default:()=>[]},itemValue:{default:"key"},itemLabel:{default:"label"},disabled:{type:Boolean},selectable:{type:Boolean},multiple:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","click","mouseenter:item"],setup(e,{expose:a,emit:n}){const o=e,l=n,r=t.ref(!1),i=t.computed((()=>s.value.length>1?"div":"ul")),s=t.computed((()=>o.groups.length?o.groups.filter((e=>{var t
|
|
177
177
|
return null==(t=o.items)?void 0:t.some((t=>t.group===e.id))})):[{id:"",title:""}])),{active:u}=v({active:t.toRef(o,"modelValue"),required:t.toRef(o,"required"),multiple:t.toRef(o,"multiple")}),d=t.ref(null),c=t.ref(null)
|
|
178
178
|
function p(){r.value=!0}function m(){r.value=!1}function f(e){var t
|
|
179
179
|
if(!o.items||null!=(t=d.value)&&t.contains(e.relatedTarget))return
|
|
@@ -1488,9 +1488,9 @@ null!=(e=i.value)&&e.contains(document.activeElement)||(r.value=void 0)}function
|
|
|
1488
1488
|
return[{"q-property-list__row--closed":e.group&&!l.value.includes(e.group),"q-property-list__row--selected":(null==(t=r.value)?void 0:t.id)===e.id}]}function m(e){r.value=e,o("select-field",r.value.id)}return t.watch((()=>n.block),(async e=>{var a
|
|
1489
1489
|
await t.nextTick(),e?null==(a=i.value)||a.removeAttribute("style"):function(){if(!i.value)return
|
|
1490
1490
|
const e=i.value.offsetWidth
|
|
1491
|
-
i.value.style.width=`${e}px`}()}),{immediate:!0}),(e,a)=>(t.openBlock(),t.createElementBlock("div",{id:n.id,ref_key:"componentRoot",ref:i,tabindex:"0",class:t.normalizeClass(u.value),onFocusout:d},[t.createElementVNode("table",hc,[a[0]||(a[0]=t.createElementVNode("thead",{class:"q-property-list__header"},[t.createElementVNode("tr",null,[t.createElementVNode("th",{colspan:"2"})])],-1)),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(a=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:a.id},[a.title?(t.openBlock(),t.createBlock(t.unref(Dc),{key:0,"data-key":a.id,title:a.title,icons:n.icons,"no-toggle":n.noToggle,onClick:()=>function(e){const t=l.value.indexOf(e);-1===t?l.value.push(e):l.value.splice(t,1)}(a.id)},null,8,["data-key","title","icons","no-toggle","onClick"])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c(a.id),(a=>(t.openBlock(),t.createBlock(t.unref(Nc),{key:a.id,class:t.normalizeClass(p(a)),field:a,"model-value":a.props.modelValue,readonly:n.readonly,onFocus:m,onFieldChange:e=>function(e,t){n.readonly||e.props.readonly||o("field-change",e,t)}(a,e)},{default:t.withCtx((()=>[t.renderSlot(e.$slots,a.id,{field:a})])),_:2},1032,["class","field","model-value","readonly","onFieldChange"])))),128))],64)))),128))])]),n.noPanel?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(Tc),{key:0,field:r.value,texts:n.texts},{default:t.withCtx((()=>[r.value?t.renderSlot(e.$slots,"panel",{key:0,field:r.value}):t.createCommentVNode("",!0)])),_:3},8,["field","texts"]))],42,fc))}}),gc=["id","data-group"],bc={key:0,class:"q-property-list-field__container"},kc=t.defineComponent({__name:"QPropertyListRow",props:t.mergeModels({id:{},class:{},field:{},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["focus","field-change"],["update:modelValue"]),setup(e,{emit:a}){const n=e,o=a,l=t.useModel(e,"modelValue"),r=t.computed((()=>["q-property-list__row",n.class])),i=t.computed((()=>{var e
|
|
1492
|
-
return
|
|
1493
|
-
function
|
|
1491
|
+
i.value.style.width=`${e}px`}()}),{immediate:!0}),(e,a)=>(t.openBlock(),t.createElementBlock("div",{id:n.id,ref_key:"componentRoot",ref:i,tabindex:"0",class:t.normalizeClass(u.value),onFocusout:d},[t.createElementVNode("table",hc,[a[0]||(a[0]=t.createElementVNode("thead",{class:"q-property-list__header"},[t.createElementVNode("tr",null,[t.createElementVNode("th",{colspan:"2"})])],-1)),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(a=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:a.id},[a.title?(t.openBlock(),t.createBlock(t.unref(Dc),{key:0,"data-key":a.id,title:a.title,icons:n.icons,"no-toggle":n.noToggle,onClick:()=>function(e){const t=l.value.indexOf(e);-1===t?l.value.push(e):l.value.splice(t,1)}(a.id)},null,8,["data-key","title","icons","no-toggle","onClick"])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c(a.id),(a=>(t.openBlock(),t.createBlock(t.unref(Nc),{key:a.id,class:t.normalizeClass(p(a)),field:a,"model-value":a.props.modelValue,readonly:n.readonly,onFocus:m,onFieldChange:e=>function(e,t){n.readonly||e.props.readonly||o("field-change",e,t)}(a,e)},{default:t.withCtx((()=>[t.renderSlot(e.$slots,a.id,{field:a})])),_:2},1032,["class","field","model-value","readonly","onFieldChange"])))),128))],64)))),128))])]),n.noPanel?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(Tc),{key:0,field:r.value,texts:n.texts},{default:t.withCtx((()=>[r.value?t.renderSlot(e.$slots,"panel",{key:0,field:r.value}):t.createCommentVNode("",!0)])),_:3},8,["field","texts"]))],42,fc))}}),gc=["id","data-group"],bc={key:0,class:"q-property-list-field__container"},kc=t.defineComponent({__name:"QPropertyListRow",props:t.mergeModels({id:{},class:{},field:{},readonly:{type:Boolean},required:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["focus","field-change"],["update:modelValue"]),setup(e,{emit:a}){const n=e,o=a,l=t.useModel(e,"modelValue"),r=t.computed((()=>["q-property-list__row",n.class])),i=t.computed((()=>["q-property-list__cell","q-property-list__cell-label"])),s=t.computed((()=>n.readonly||(n.field.props.readonly??!1))),u=t.computed((()=>{var e
|
|
1492
|
+
return n.required||!(null==(e=n.field.props)||!e.required)})),d=xe(t.toRef(n,"id")),c=t.computed((()=>({...n.field.props,id:d.value,readonly:s.value,required:u.value})))
|
|
1493
|
+
function p(){o("focus",n.field)}function m(e){l.value=e,o("field-change",e)}return(e,a)=>(t.openBlock(),t.createElementBlock("tr",{id:n.id,class:t.normalizeClass(r.value),"data-group":n.field.group,onFocusin:p},[t.createElementVNode("td",{class:t.normalizeClass(i.value),onClick:t.withModifiers(p,["prevent","stop"])},[t.createVNode(t.unref(ct),{for:t.unref(d),label:n.field.label,required:u.value,onClick:a[0]||(a[0]=t.withModifiers((()=>{}),["stop"]))},null,8,["for","label","required"])],2),t.createElementVNode("td",{class:"q-property-list__cell",onClick:t.withModifiers(p,["prevent","stop"])},[t.renderSlot(e.$slots,"default",{},(()=>[n.field.component?(t.openBlock(),t.createElementBlock("div",bc,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.field.component),t.mergeProps(c.value,{modelValue:l.value,"onUpdate:modelValue":[a[1]||(a[1]=e=>l.value=e),m]}),null,16,["modelValue"]))])):t.createCommentVNode("",!0)]))])],42,gc))}}),wc=["id","aria-labelledby"],_c=["id"],xc={class:"q-property-list-group__content"},Bc=t.defineComponent({__name:"QPropertyListGroup",props:{id:{},class:{},title:{},noToggle:{type:Boolean},icons:{default:()=>vc},texts:{}},emits:["click"],setup(e,{emit:a}){const n=e,o=a,l=t.ref(!0),r=xe(),i=t.computed((()=>l.value?n.icons.open:n.icons.close)),s=t.computed((()=>["q-property-list-group",{"q-property-list-group--no-toggle":n.noToggle},n.class]))
|
|
1494
1494
|
function u(){n.noToggle||(l.value=!l.value,o("click"))}return(e,a)=>(t.openBlock(),t.createElementBlock("tr",{id:n.id,class:t.normalizeClass(s.value),role:"group","aria-labelledby":t.unref(r),onClick:u},[t.createElementVNode("td",{id:t.unref(r),colspan:"2"},[t.createElementVNode("div",xc,[n.noToggle?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(U),{key:0,variant:"text",onClick:u},{default:t.withCtx((()=>[t.createVNode(t.unref(ue),t.normalizeProps(t.guardReactiveProps(i.value)),null,16)])),_:1})),t.createTextVNode(" "+t.toDisplayString(n.title),1)])],8,_c)],10,wc))}}),Cc=["id"],Sc={class:"q-property-list-panel__label"},Mc={class:"q-property-list-panel__description"},Vc={key:1,class:"q-property-list-panel__empty"},Ec=t.defineComponent({__name:"QPropertyListPanel",props:{id:{},class:{},field:{},icons:{},texts:{default:()=>mc}},setup(e){const a=e
|
|
1495
1495
|
return(e,n)=>(t.openBlock(),t.createElementBlock("div",{id:a.id,class:t.normalizeClass(["q-property-list-panel",a.class])},[a.field?t.renderSlot(e.$slots,"default",{key:0},(()=>[t.createElementVNode("div",Sc,t.toDisplayString(a.field.label),1),t.createElementVNode("div",Mc,t.toDisplayString(a.field.description),1)])):(t.openBlock(),t.createElementBlock("div",Vc,t.toDisplayString(a.texts.emptyMessage),1))],10,Cc))}}),$c=B(yc),Nc=B(kc),Dc=B(Bc),Tc=B(Ec),Pc=["id","checked","name","value","disabled"],Ac=t.defineComponent({inheritAttrs:!1,__name:"QRadioButton",props:{id:{},class:{},label:{},for:{},required:{type:Boolean},labelPlacement:{default:"end"},disabled:{type:Boolean},readonly:{type:Boolean},color:{default:"primary"},value:{},size:{default:"regular"},invalid:{type:Boolean},name:{}},setup(e){const a=e,n=xe(t.toRef(a,"id")),o=f(a.value)
|
|
1496
1496
|
if(!o)throw new Error("QRadioButton must be used inside a QRadioGroup")
|
package/dist/ui.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QColorPicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QColorPicker/QColorPicker.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QColorPicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QColorPicker/QColorPicker.vue"],"names":[],"mappings":"AA4CA;AAuJC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAMvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAMhD,KAAK,WAAW,GAAG,iBAAiB,CAAC;AAiGtC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;iCAfb,GAAG;gCACJ,GAAG;yBACT,GAAG;wBACJ,GAAG;wBACH,GAAG;;;;EAgB/B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;6EAQnB,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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as h, mergeModels as C, useModel as k, ref as p, computed as V, watch as m, createBlock as $, openBlock as g, unref as q, normalizeClass as B, createSlots as T, withCtx as t, renderSlot as r, withDirectives as x, createElementVNode as z, mergeProps as M,
|
|
1
|
+
import { defineComponent as h, mergeModels as C, useModel as k, ref as p, computed as V, watch as m, createBlock as $, openBlock as g, unref as q, normalizeClass as B, createSlots as T, withCtx as t, renderSlot as r, withDirectives as x, createElementVNode as z, mergeProps as M, withModifiers as S, vModelText as w } from "vue";
|
|
2
2
|
import { DEFAULT_TEXTS as D } from "./types.js";
|
|
3
3
|
import { QTextField as E } from "../QTextField/index.js";
|
|
4
4
|
import { isValidHex as F } from "../../utils/color.js";
|
|
5
|
-
const P = ["readonly", "disabled", "aria-label"],
|
|
5
|
+
const P = ["readonly", "disabled", "aria-label"], I = /* @__PURE__ */ h({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "QColorPicker",
|
|
8
8
|
props: /* @__PURE__ */ C({
|
|
@@ -21,28 +21,28 @@ const P = ["readonly", "disabled", "aria-label"], H = /* @__PURE__ */ h({
|
|
|
21
21
|
}),
|
|
22
22
|
emits: ["update:modelValue"],
|
|
23
23
|
setup(u) {
|
|
24
|
-
const l = u, d = k(u, "modelValue"), s = p(""),
|
|
25
|
-
function
|
|
24
|
+
const l = u, d = k(u, "modelValue"), s = p(""), o = p(""), c = V(() => l.readonly || l.disabled);
|
|
25
|
+
function i(e) {
|
|
26
26
|
return F(e, !0);
|
|
27
27
|
}
|
|
28
28
|
function f(e) {
|
|
29
|
-
const
|
|
30
|
-
d.value =
|
|
29
|
+
const a = e.target;
|
|
30
|
+
d.value = i(a.value) ? a.value : "";
|
|
31
31
|
}
|
|
32
32
|
function v() {
|
|
33
|
-
|
|
33
|
+
i(o.value) ? d.value = o.value : (d.value = "", o.value = "");
|
|
34
34
|
}
|
|
35
35
|
function b(e) {
|
|
36
|
-
e &&
|
|
36
|
+
e && i(e) ? s.value = e : s.value = "#000000";
|
|
37
37
|
}
|
|
38
38
|
m(d, b, { immediate: !0 });
|
|
39
39
|
function y(e) {
|
|
40
|
-
e &&
|
|
40
|
+
e && i(e) ? o.value = e : o.value = "";
|
|
41
41
|
}
|
|
42
|
-
return m(d, y, { immediate: !0 }), (e,
|
|
42
|
+
return m(d, y, { immediate: !0 }), (e, a) => (g(), $(q(E), {
|
|
43
43
|
id: l.id,
|
|
44
|
-
modelValue:
|
|
45
|
-
"onUpdate:modelValue":
|
|
44
|
+
modelValue: o.value,
|
|
45
|
+
"onUpdate:modelValue": a[2] || (a[2] = (n) => o.value = n),
|
|
46
46
|
"max-length": 7,
|
|
47
47
|
class: B(["q-color-picker", l.class]),
|
|
48
48
|
label: l.label,
|
|
@@ -62,14 +62,18 @@ const P = ["readonly", "disabled", "aria-label"], H = /* @__PURE__ */ h({
|
|
|
62
62
|
prepend: t(() => [
|
|
63
63
|
r(e.$slots, "prepend"),
|
|
64
64
|
x(z("input", M({
|
|
65
|
-
"onUpdate:modelValue":
|
|
65
|
+
"onUpdate:modelValue": a[0] || (a[0] = (n) => s.value = n),
|
|
66
66
|
type: "color",
|
|
67
67
|
class: "q-color-picker__swatch",
|
|
68
68
|
readonly: l.readonly,
|
|
69
69
|
disabled: c.value,
|
|
70
70
|
"aria-label": l.texts.selectColor
|
|
71
|
-
}, e.$attrs, {
|
|
72
|
-
|
|
71
|
+
}, e.$attrs, {
|
|
72
|
+
onChange: f,
|
|
73
|
+
onClick: a[1] || (a[1] = S(() => {
|
|
74
|
+
}, ["stop"]))
|
|
75
|
+
}), null, 16, P), [
|
|
76
|
+
[w, s.value]
|
|
73
77
|
])
|
|
74
78
|
]),
|
|
75
79
|
_: 2
|
|
@@ -93,5 +97,5 @@ const P = ["readonly", "disabled", "aria-label"], H = /* @__PURE__ */ h({
|
|
|
93
97
|
}
|
|
94
98
|
});
|
|
95
99
|
export {
|
|
96
|
-
|
|
100
|
+
I as default
|
|
97
101
|
};
|
|
@@ -9,6 +9,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
9
9
|
} & import('../../types/component').QBaseComponentProps & {
|
|
10
10
|
field: QPropertyListField;
|
|
11
11
|
readonly?: boolean;
|
|
12
|
+
required?: boolean;
|
|
12
13
|
}) & Partial<{}>> & import('vue').PublicProps;
|
|
13
14
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
14
15
|
attrs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QPropertyListRow.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/QPropertyListRow.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QPropertyListRow.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/QPropertyListRow.vue"],"names":[],"mappings":"AAgCA;AAyGC,OAAO,KAAK,EAAE,kBAAkB,EAAyB,MAAM,SAAS,CAAA;yBAKvD,CAAC,eACL,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA6K1D,mBAAmB,CAAC;;;;;qBA9Gf,CAAC;;;;;oBA8GgF,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;yBArCkB,GAAG;;UAuCzB;YA3KD,OAAO,SAAS,kBAAkB,GAAG,IAAI;YACzC,cAAc,SAAS,OAAO,GAAG,IAAI;sDA0KA;OAG/B,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAvLxE,wBAuL2E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1,82 +1,81 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as B, mergeModels as c, useModel as M, computed as l, toRef as R, createElementBlock as m, openBlock as d, normalizeClass as f, createElementVNode as v, withModifiers as i, createVNode as h, unref as y, renderSlot as N, createCommentVNode as P, createBlock as w, resolveDynamicComponent as E, mergeProps as F } from "vue";
|
|
2
|
+
import { QLabel as I } from "../QLabel/index.js";
|
|
3
|
+
import { useId as L } from "../../composables/uid.js";
|
|
4
|
+
const Q = ["id", "data-group"], x = {
|
|
3
5
|
key: 0,
|
|
4
6
|
class: "q-property-list-field__container"
|
|
5
|
-
},
|
|
7
|
+
}, U = /* @__PURE__ */ B({
|
|
6
8
|
__name: "QPropertyListRow",
|
|
7
|
-
props: /* @__PURE__ */
|
|
9
|
+
props: /* @__PURE__ */ c({
|
|
8
10
|
id: {},
|
|
9
11
|
class: {},
|
|
10
12
|
field: {},
|
|
11
|
-
readonly: { type: Boolean }
|
|
13
|
+
readonly: { type: Boolean },
|
|
14
|
+
required: { type: Boolean }
|
|
12
15
|
}, {
|
|
13
16
|
modelValue: {},
|
|
14
17
|
modelModifiers: {}
|
|
15
18
|
}),
|
|
16
|
-
emits: /* @__PURE__ */
|
|
17
|
-
setup(
|
|
18
|
-
const e =
|
|
19
|
-
var
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
"q-property-list__cell-label",
|
|
23
|
-
{
|
|
24
|
-
"q-property-list__cell--required": (l = e.field.props) == null ? void 0 : l.required
|
|
25
|
-
}
|
|
26
|
-
];
|
|
27
|
-
}), v = o(() => e.readonly || (e.field.props.readonly ?? !1)), g = o(() => ({
|
|
19
|
+
emits: /* @__PURE__ */ c(["focus", "field-change"], ["update:modelValue"]),
|
|
20
|
+
setup(n, { emit: _ }) {
|
|
21
|
+
const e = n, a = _, r = M(n, "modelValue"), q = l(() => ["q-property-list__row", e.class]), C = l(() => ["q-property-list__cell", "q-property-list__cell-label"]), V = l(() => e.readonly || (e.field.props.readonly ?? !1)), u = l(() => {
|
|
22
|
+
var o;
|
|
23
|
+
return e.required || !!((o = e.field.props) != null && o.required);
|
|
24
|
+
}), p = L(R(e, "id")), g = l(() => ({
|
|
28
25
|
...e.field.props,
|
|
29
|
-
|
|
26
|
+
id: p.value,
|
|
27
|
+
readonly: V.value,
|
|
28
|
+
required: u.value
|
|
30
29
|
}));
|
|
31
30
|
function s() {
|
|
32
31
|
a("focus", e.field);
|
|
33
32
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
33
|
+
function k(o) {
|
|
34
|
+
r.value = o, a("field-change", o);
|
|
36
35
|
}
|
|
37
|
-
return (
|
|
36
|
+
return (o, t) => (d(), m("tr", {
|
|
38
37
|
id: e.id,
|
|
39
|
-
class:
|
|
38
|
+
class: f(q.value),
|
|
40
39
|
"data-group": e.field.group,
|
|
41
40
|
onFocusin: s
|
|
42
41
|
}, [
|
|
43
|
-
|
|
42
|
+
v(
|
|
44
43
|
"td",
|
|
45
44
|
{
|
|
46
|
-
class:
|
|
47
|
-
onClick:
|
|
45
|
+
class: f(C.value),
|
|
46
|
+
onClick: i(s, ["prevent", "stop"])
|
|
48
47
|
},
|
|
49
48
|
[
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
)
|
|
49
|
+
h(y(I), {
|
|
50
|
+
for: y(p),
|
|
51
|
+
label: e.field.label,
|
|
52
|
+
required: u.value,
|
|
53
|
+
onClick: t[0] || (t[0] = i(() => {
|
|
54
|
+
}, ["stop"]))
|
|
55
|
+
}, null, 8, ["for", "label", "required"])
|
|
57
56
|
],
|
|
58
57
|
2
|
|
59
58
|
/* CLASS */
|
|
60
59
|
),
|
|
61
|
-
|
|
60
|
+
v("td", {
|
|
62
61
|
class: "q-property-list__cell",
|
|
63
|
-
onClick:
|
|
62
|
+
onClick: i(s, ["prevent", "stop"])
|
|
64
63
|
}, [
|
|
65
|
-
|
|
66
|
-
e.field.component ? (
|
|
67
|
-
(
|
|
68
|
-
modelValue:
|
|
64
|
+
N(o.$slots, "default", {}, () => [
|
|
65
|
+
e.field.component ? (d(), m("div", x, [
|
|
66
|
+
(d(), w(E(e.field.component), F(g.value, {
|
|
67
|
+
modelValue: r.value,
|
|
69
68
|
"onUpdate:modelValue": [
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
t[1] || (t[1] = (b) => r.value = b),
|
|
70
|
+
k
|
|
72
71
|
]
|
|
73
72
|
}), null, 16, ["modelValue"]))
|
|
74
|
-
])) :
|
|
73
|
+
])) : P("v-if", !0)
|
|
75
74
|
])
|
|
76
75
|
])
|
|
77
|
-
], 42,
|
|
76
|
+
], 42, Q));
|
|
78
77
|
}
|
|
79
78
|
});
|
|
80
79
|
export {
|
|
81
|
-
|
|
80
|
+
U as default
|
|
82
81
|
};
|
|
@@ -81,6 +81,7 @@ declare const QPropertyListRow: <T>(__VLS_props: NonNullable<Awaited<typeof __VL
|
|
|
81
81
|
class?: string | unknown[] | undefined;
|
|
82
82
|
field: import('./types').QPropertyListField;
|
|
83
83
|
readonly?: boolean | undefined;
|
|
84
|
+
required?: boolean | undefined;
|
|
84
85
|
} & import('vue').PublicProps;
|
|
85
86
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
86
87
|
attrs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACX,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,MAAM,SAAS,CAAA;AAKhB,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA;AACrD,QAAA,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACX,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,MAAM,SAAS,CAAA;AAKhB,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA;AACrD,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;2BAc+zQ,KAAK;;;;;;;;;cAA4J,KAAK;SAAiB,CAAC;CAdl9Q,CAAA;AAC3D,QAAA,MAAM,kBAAkB;;;;;;6FAAuC,CAAA;AAC/D,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;EAAuC,CAAA;AAG/D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA;AAGlF,YAAY,EACX,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,CAAA"}
|
|
@@ -118,6 +118,10 @@ export type QPropertyListRowProps = QBaseComponentProps & {
|
|
|
118
118
|
* When true, renders the field in a read-only state preventing user interaction.
|
|
119
119
|
*/
|
|
120
120
|
readonly?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* If true, indicates that the field is required, displaying a visual cue.
|
|
123
|
+
*/
|
|
124
|
+
required?: boolean;
|
|
121
125
|
};
|
|
122
126
|
/**
|
|
123
127
|
* Props for the QPropertyListPanel component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE9C,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG;IACtD;;;OAGG;IACH,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAE7B;;OAEG;IACH,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAE7B;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM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