@quidgest/ui 0.15.4 → 0.15.7
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 +1 -0
- package/dist/ui.esm.js +1802 -1787
- package/dist/ui.js +16 -16
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +15 -9
- package/dist/ui.scss +2 -1
- package/esm/components/QColorPicker/QColorPicker.vue.js +1 -1
- package/esm/components/QCombobox/QCombobox.d.ts +12 -0
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +37 -36
- package/esm/components/QCombobox/index.d.ts +21 -0
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordField.d.ts +6 -0
- package/esm/components/QPasswordField/QPasswordField.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordField.vue.js +21 -20
- package/esm/components/QPasswordField/index.d.ts +3 -0
- package/esm/components/QPasswordField/index.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.vue.js +33 -30
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.vue.js +48 -38
- package/esm/components/QTextField/index.d.ts +3 -0
- package/esm/components/QTextField/index.d.ts.map +1 -1
- package/esm/components/QTextField/types.d.ts +5 -0
- package/esm/components/QTextField/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as b, mergeModels as h, useModel as z, computed as
|
|
2
|
-
import { QField as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { useTextareaAutosize as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as b, mergeModels as h, useModel as z, computed as t, watch as x, ref as g, createBlock as w, openBlock as q, unref as n, normalizeClass as $, createSlots as v, withCtx as a, withDirectives as B, createElementVNode as k, mergeProps as M, toHandlers as V, vModelText as A, renderSlot as o } from "vue";
|
|
2
|
+
import { QField as C } from "../QField/index.js";
|
|
3
|
+
import { useId as H } from "../../composables/uid.js";
|
|
4
|
+
import { useTextareaAutosize as L } from "../../vendors/@vueuse/core/index.js";
|
|
5
|
+
const R = ["id", "required", "placeholder", "readonly", "disabled", "maxlength", "rows", "cols", "resize", "wrap"], S = /* @__PURE__ */ b({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "QTextArea",
|
|
8
8
|
props: /* @__PURE__ */ h({
|
|
@@ -27,39 +27,42 @@ const H = ["id", "required", "placeholder", "readonly", "disabled", "maxlength",
|
|
|
27
27
|
modelModifiers: {}
|
|
28
28
|
}),
|
|
29
29
|
emits: ["update:modelValue"],
|
|
30
|
-
setup(
|
|
31
|
-
const e =
|
|
32
|
-
() =>
|
|
33
|
-
), f = o(() => ({ input: e.autosize ? c : null })), i = g(), { triggerResize: c } = C({
|
|
34
|
-
element: o(() => e.autosize ? i.value : void 0),
|
|
35
|
-
styleProp: "minHeight"
|
|
36
|
-
}), p = o({
|
|
37
|
-
get: () => d.value,
|
|
30
|
+
setup(i) {
|
|
31
|
+
const e = i, s = z(i, "modelValue"), d = t({
|
|
32
|
+
get: () => s.value,
|
|
38
33
|
set: (l) => {
|
|
39
|
-
|
|
34
|
+
const r = e.maxLength;
|
|
35
|
+
s.value = r ? l == null ? void 0 : l.slice(0, r) : l;
|
|
40
36
|
}
|
|
41
37
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
x(s, (l) => d.value = l, { immediate: !0 });
|
|
39
|
+
const p = H(e.id), m = t(
|
|
40
|
+
() => e.readonly || e.disabled ? void 0 : e.placeholder
|
|
41
|
+
), f = t(() => ({ input: e.autosize ? c : null })), u = g(), { triggerResize: c } = L({
|
|
42
|
+
element: t(() => e.autosize ? u.value : void 0),
|
|
43
|
+
styleProp: "minHeight"
|
|
44
|
+
});
|
|
45
|
+
return (l, r) => (q(), w(n(C), {
|
|
46
|
+
class: $(["q-text-area", e.class]),
|
|
47
|
+
for: n(p),
|
|
45
48
|
label: e.label,
|
|
46
49
|
size: e.size,
|
|
47
50
|
readonly: e.readonly,
|
|
48
51
|
disabled: e.disabled,
|
|
49
52
|
required: e.required
|
|
50
|
-
},
|
|
53
|
+
}, v({
|
|
51
54
|
"label.prepend": a(() => [
|
|
52
|
-
|
|
55
|
+
o(l.$slots, "label.prepend")
|
|
53
56
|
]),
|
|
54
57
|
"label.append": a(() => [
|
|
55
|
-
|
|
58
|
+
o(l.$slots, "label.append")
|
|
56
59
|
]),
|
|
57
60
|
default: a(() => [
|
|
58
|
-
|
|
59
|
-
id:
|
|
61
|
+
B(k("textarea", M({
|
|
62
|
+
id: n(p),
|
|
60
63
|
ref_key: "textareaRef",
|
|
61
|
-
ref:
|
|
62
|
-
"onUpdate:modelValue":
|
|
64
|
+
ref: u,
|
|
65
|
+
"onUpdate:modelValue": r[0] || (r[0] = (y) => d.value = y),
|
|
63
66
|
class: "q-text-area__input",
|
|
64
67
|
required: e.required,
|
|
65
68
|
placeholder: m.value,
|
|
@@ -70,8 +73,8 @@ const H = ["id", "required", "placeholder", "readonly", "disabled", "maxlength",
|
|
|
70
73
|
cols: e.cols,
|
|
71
74
|
resize: e.resize,
|
|
72
75
|
wrap: e.wrap
|
|
73
|
-
}, l.$attrs,
|
|
74
|
-
[
|
|
76
|
+
}, l.$attrs, V(f.value, !0)), null, 16, R), [
|
|
77
|
+
[A, d.value]
|
|
75
78
|
])
|
|
76
79
|
]),
|
|
77
80
|
_: 2
|
|
@@ -80,21 +83,21 @@ const H = ["id", "required", "placeholder", "readonly", "disabled", "maxlength",
|
|
|
80
83
|
l.$slots.prepend ? {
|
|
81
84
|
name: "prepend",
|
|
82
85
|
fn: a(() => [
|
|
83
|
-
|
|
86
|
+
o(l.$slots, "prepend")
|
|
84
87
|
]),
|
|
85
88
|
key: "0"
|
|
86
89
|
} : void 0,
|
|
87
90
|
l.$slots.append ? {
|
|
88
91
|
name: "append",
|
|
89
92
|
fn: a(() => [
|
|
90
|
-
|
|
93
|
+
o(l.$slots, "append")
|
|
91
94
|
]),
|
|
92
95
|
key: "1"
|
|
93
96
|
} : void 0,
|
|
94
97
|
l.$slots.extras ? {
|
|
95
98
|
name: "extras",
|
|
96
99
|
fn: a(() => [
|
|
97
|
-
|
|
100
|
+
o(l.$slots, "extras")
|
|
98
101
|
]),
|
|
99
102
|
key: "2"
|
|
100
103
|
} : void 0
|
|
@@ -102,5 +105,5 @@ const H = ["id", "required", "placeholder", "readonly", "disabled", "maxlength",
|
|
|
102
105
|
}
|
|
103
106
|
});
|
|
104
107
|
export {
|
|
105
|
-
|
|
108
|
+
S as default
|
|
106
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QTextField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/QTextField.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QTextField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/QTextField.vue"],"names":[],"mappings":"AAoDA;AAgIC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C,KAAK,WAAW,GAAG,eAAe,CAAC;AAoEpC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAmIT,OAAO,IAA6B;;iCAjBb,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACH,GAAG;wBACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAqEyrc,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;EAnD90c;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA+Bosc,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;OArB70c,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,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { QField as
|
|
3
|
-
import { QClearButton as
|
|
4
|
-
import { useId as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as C, mergeModels as y, useModel as R, computed as n, watch as V, ref as b, createBlock as h, openBlock as v, unref as r, normalizeClass as z, createSlots as M, withCtx as a, withDirectives as w, createElementVNode as L, mergeProps as Q, vModelDynamic as D, renderSlot as o, createCommentVNode as F } from "vue";
|
|
2
|
+
import { QField as N } from "../QField/index.js";
|
|
3
|
+
import { QClearButton as S } from "../__internal__/QClearButton/index.js";
|
|
4
|
+
import { useId as _ } from "../../composables/uid.js";
|
|
5
|
+
const A = ["id", "type", "maxlength", "required", "placeholder", "readonly", "disabled"], U = /* @__PURE__ */ C({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "QTextField",
|
|
8
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ y({
|
|
9
9
|
id: {},
|
|
10
10
|
class: {},
|
|
11
11
|
label: {},
|
|
@@ -16,6 +16,7 @@ const _ = ["id", "type", "required", "placeholder", "readonly", "disabled"], T =
|
|
|
16
16
|
disabled: { type: Boolean },
|
|
17
17
|
invalid: { type: Boolean },
|
|
18
18
|
placeholder: {},
|
|
19
|
+
maxLength: {},
|
|
19
20
|
clearable: { type: Boolean },
|
|
20
21
|
type: { default: "text" },
|
|
21
22
|
texts: {}
|
|
@@ -23,52 +24,61 @@ const _ = ["id", "type", "required", "placeholder", "readonly", "disabled"], T =
|
|
|
23
24
|
modelValue: {},
|
|
24
25
|
modelModifiers: {}
|
|
25
26
|
}),
|
|
26
|
-
emits: /* @__PURE__ */
|
|
27
|
-
setup(
|
|
28
|
-
const e =
|
|
27
|
+
emits: /* @__PURE__ */ y(["click:clear"], ["update:modelValue"]),
|
|
28
|
+
setup(i, { expose: x, emit: k }) {
|
|
29
|
+
const e = i, q = k, t = R(i, "modelValue"), s = n({
|
|
30
|
+
get: () => t.value,
|
|
31
|
+
set: (l) => {
|
|
32
|
+
const d = e.maxLength;
|
|
33
|
+
t.value = d ? l == null ? void 0 : l.slice(0, d) : l;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
V(t, (l) => s.value = l, { immediate: !0 });
|
|
37
|
+
const p = _(e.id), u = b(null), f = b(null), g = n(
|
|
29
38
|
() => e.readonly || e.disabled ? void 0 : e.placeholder
|
|
30
|
-
),
|
|
31
|
-
function
|
|
32
|
-
|
|
39
|
+
), m = n(() => e.clearable && !e.readonly && !e.disabled), c = n(() => m.value && t.value);
|
|
40
|
+
function B(l) {
|
|
41
|
+
m.value && (t.value = "", q("click:clear", l));
|
|
33
42
|
}
|
|
34
|
-
return
|
|
35
|
-
fieldRef:
|
|
43
|
+
return x({
|
|
44
|
+
fieldRef: n(() => {
|
|
36
45
|
var l;
|
|
37
|
-
return (l =
|
|
46
|
+
return (l = u.value) == null ? void 0 : l.fieldRef;
|
|
38
47
|
}),
|
|
39
|
-
inputRef:
|
|
40
|
-
}), (l,
|
|
48
|
+
inputRef: f
|
|
49
|
+
}), (l, d) => (v(), h(r(N), {
|
|
41
50
|
ref_key: "fieldRef",
|
|
42
|
-
ref:
|
|
43
|
-
class:
|
|
44
|
-
for: r(
|
|
51
|
+
ref: u,
|
|
52
|
+
class: z(["q-text-field", e.class]),
|
|
53
|
+
for: r(p),
|
|
45
54
|
label: e.label,
|
|
46
55
|
size: e.size,
|
|
47
56
|
readonly: e.readonly,
|
|
48
57
|
disabled: e.disabled,
|
|
49
58
|
required: e.required,
|
|
50
59
|
invalid: e.invalid
|
|
51
|
-
},
|
|
60
|
+
}, M({
|
|
52
61
|
"label.prepend": a(() => [
|
|
53
|
-
|
|
62
|
+
o(l.$slots, "label.prepend")
|
|
54
63
|
]),
|
|
55
64
|
"label.append": a(() => [
|
|
56
|
-
|
|
65
|
+
o(l.$slots, "label.append")
|
|
57
66
|
]),
|
|
58
67
|
default: a(() => [
|
|
59
|
-
|
|
60
|
-
id: r(
|
|
68
|
+
w(L("input", Q({
|
|
69
|
+
id: r(p),
|
|
61
70
|
ref_key: "inputRef",
|
|
62
|
-
ref:
|
|
63
|
-
"onUpdate:modelValue":
|
|
71
|
+
ref: f,
|
|
72
|
+
"onUpdate:modelValue": d[0] || (d[0] = ($) => s.value = $),
|
|
64
73
|
class: "q-text-field__input",
|
|
65
74
|
type: e.type,
|
|
75
|
+
maxlength: e.maxLength,
|
|
66
76
|
required: e.required,
|
|
67
|
-
placeholder:
|
|
77
|
+
placeholder: g.value,
|
|
68
78
|
readonly: e.readonly,
|
|
69
79
|
disabled: e.disabled
|
|
70
|
-
}, l.$attrs), null, 16,
|
|
71
|
-
[
|
|
80
|
+
}, l.$attrs), null, 16, A), [
|
|
81
|
+
[D, s.value]
|
|
72
82
|
])
|
|
73
83
|
]),
|
|
74
84
|
_: 2
|
|
@@ -77,27 +87,27 @@ const _ = ["id", "type", "required", "placeholder", "readonly", "disabled"], T =
|
|
|
77
87
|
l.$slots.prepend ? {
|
|
78
88
|
name: "prepend",
|
|
79
89
|
fn: a(() => [
|
|
80
|
-
|
|
90
|
+
o(l.$slots, "prepend")
|
|
81
91
|
]),
|
|
82
92
|
key: "0"
|
|
83
93
|
} : void 0,
|
|
84
|
-
l.$slots.append ||
|
|
94
|
+
l.$slots.append || c.value ? {
|
|
85
95
|
name: "append",
|
|
86
96
|
fn: a(() => [
|
|
87
|
-
|
|
88
|
-
|
|
97
|
+
o(l.$slots, "append"),
|
|
98
|
+
c.value ? (v(), h(r(S), {
|
|
89
99
|
key: 0,
|
|
90
100
|
"data-testid": "q-text-field__clear-button",
|
|
91
101
|
texts: e.texts,
|
|
92
|
-
onClick:
|
|
93
|
-
}, null, 8, ["texts"])) :
|
|
102
|
+
onClick: B
|
|
103
|
+
}, null, 8, ["texts"])) : F("v-if", !0)
|
|
94
104
|
]),
|
|
95
105
|
key: "1"
|
|
96
106
|
} : void 0,
|
|
97
107
|
l.$slots.extras ? {
|
|
98
108
|
name: "extras",
|
|
99
109
|
fn: a(() => [
|
|
100
|
-
|
|
110
|
+
o(l.$slots, "extras")
|
|
101
111
|
]),
|
|
102
112
|
key: "2"
|
|
103
113
|
} : void 0
|
|
@@ -105,5 +115,5 @@ const _ = ["id", "type", "required", "placeholder", "readonly", "disabled"], T =
|
|
|
105
115
|
}
|
|
106
116
|
});
|
|
107
117
|
export {
|
|
108
|
-
|
|
118
|
+
U as default
|
|
109
119
|
};
|
|
@@ -14,6 +14,7 @@ declare const QTextField: {
|
|
|
14
14
|
invalid?: boolean;
|
|
15
15
|
} & {
|
|
16
16
|
placeholder?: string;
|
|
17
|
+
maxLength?: number;
|
|
17
18
|
clearable?: boolean;
|
|
18
19
|
type?: string;
|
|
19
20
|
texts?: typeof import('./types').DEFAULT_TEXTS;
|
|
@@ -121,6 +122,7 @@ declare const QTextField: {
|
|
|
121
122
|
invalid?: boolean;
|
|
122
123
|
} & {
|
|
123
124
|
placeholder?: string;
|
|
125
|
+
maxLength?: number;
|
|
124
126
|
clearable?: boolean;
|
|
125
127
|
type?: string;
|
|
126
128
|
texts?: typeof import('./types').DEFAULT_TEXTS;
|
|
@@ -150,6 +152,7 @@ declare const QTextField: {
|
|
|
150
152
|
invalid?: boolean;
|
|
151
153
|
} & {
|
|
152
154
|
placeholder?: string;
|
|
155
|
+
maxLength?: number;
|
|
153
156
|
clearable?: boolean;
|
|
154
157
|
type?: string;
|
|
155
158
|
texts?: typeof import('./types').DEFAULT_TEXTS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,QAAA,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAO+ozB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAPtuzB,CAAA;AAG/C,OAAO,EAAE,UAAU,EAAE,CAAA;AAGrB,YAAY,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -4,6 +4,11 @@ export type QTextFieldProps = QFieldProps & {
|
|
|
4
4
|
* The placeholder text for the text field.
|
|
5
5
|
*/
|
|
6
6
|
placeholder?: string;
|
|
7
|
+
/**
|
|
8
|
+
* If set, defines the maximum string length
|
|
9
|
+
* that the user can enter into the text area field.
|
|
10
|
+
*/
|
|
11
|
+
maxLength?: number;
|
|
7
12
|
/**
|
|
8
13
|
* Whether the value of the field can be cleared.
|
|
9
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC3C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,aAAa;;CAEQ,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC3C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,aAAa;;CAEQ,CAAA"}
|