@quidgest/ui 0.15.3 → 0.15.5
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/manifest/components.json +2 -0
- package/dist/ui.css +1 -1
- package/dist/ui.esm.js +7000 -6132
- package/dist/ui.js +23 -16
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1118 -967
- package/dist/ui.scss +2 -2
- package/esm/components/QColorPicker/QColorPicker.vue.js +1 -1
- package/esm/components/QCombobox/QCombobox.d.ts +14 -6
- 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 +22 -3
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.d.ts +2 -2
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +51 -50
- package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts +35 -0
- package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -0
- package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +50 -0
- package/esm/components/QDismissibleLayer/QDismissibleLayer.vue2.js +4 -0
- package/esm/components/QDismissibleLayer/index.d.ts +53 -0
- package/esm/components/QDismissibleLayer/index.d.ts.map +1 -0
- package/esm/components/QDismissibleLayer/index.js +6 -0
- package/esm/components/QDismissibleLayer/types.d.ts +25 -0
- package/esm/components/QDismissibleLayer/types.d.ts.map +1 -0
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +0 -4
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +10 -15
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +10 -15
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +72 -117
- package/esm/components/QDropdownMenu/index.d.ts +0 -3
- package/esm/components/QDropdownMenu/index.d.ts.map +1 -1
- package/esm/components/QFocusTrap/QFocusTrap.d.ts +28 -0
- package/esm/components/QFocusTrap/QFocusTrap.d.ts.map +1 -0
- package/esm/components/QFocusTrap/QFocusTrap.vue.js +32 -0
- package/esm/components/QFocusTrap/QFocusTrap.vue2.js +4 -0
- package/esm/components/QFocusTrap/index.d.ts +38 -0
- package/esm/components/QFocusTrap/index.d.ts.map +1 -0
- package/esm/components/QFocusTrap/index.js +6 -0
- package/esm/components/QFocusTrap/types.d.ts +6 -0
- package/esm/components/QFocusTrap/types.d.ts.map +1 -0
- package/esm/components/QList/QList.d.ts +0 -9
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +97 -82
- package/esm/components/QList/index.d.ts +0 -3
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.d.ts +2 -0
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +197 -148
- package/esm/components/QOverlay/index.d.ts +4 -0
- package/esm/components/QOverlay/index.d.ts.map +1 -1
- package/esm/components/QOverlay/types.d.ts +6 -1
- package/esm/components/QOverlay/types.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/QPasswordFieldMeterOverlay.vue.js +6 -5
- package/esm/components/QPasswordField/index.d.ts +3 -0
- package/esm/components/QPasswordField/index.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.d.ts +2 -6
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +106 -125
- package/esm/components/QSelect/index.d.ts +1 -3
- package/esm/components/QSelect/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/esm/components/index.d.ts +2 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +69 -65
- package/esm/index.d.ts +2 -0
- package/esm/utils/merge.d.ts.map +1 -1
- package/esm/utils/merge.js +12 -16
- package/esm/vendors/@vueuse/core/index.js +173 -67
- package/esm/vendors/@vueuse/integrations/useFocusTrap/component.js +24 -0
- package/esm/vendors/@vueuse/shared/index.js +36 -15
- package/esm/vendors/focus-trap/dist/focus-trap.esm.js +473 -0
- package/esm/vendors/tabbable/dist/index.esm.js +202 -0
- package/package.json +3 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DEFAULT_ICONS as
|
|
3
|
-
import { QButton as
|
|
1
|
+
import { defineComponent as L, mergeModels as S, useModel as V, ref as B, computed as v, createElementBlock as E, openBlock as g, Fragment as P, createVNode as y, createBlock as $, createCommentVNode as w, unref as b, mergeProps as Q, createSlots as R, withCtx as n, renderSlot as d, normalizeProps as x, guardReactiveProps as N } from "vue";
|
|
2
|
+
import { DEFAULT_ICONS as O } from "./constants.js";
|
|
3
|
+
import { QButton as U } from "../QButton/index.js";
|
|
4
4
|
import { QIcon as A } from "../QIcon/index.js";
|
|
5
5
|
import { QTextField as I } from "../QTextField/index.js";
|
|
6
6
|
import T from "./QPasswordFieldMessages.vue.js";
|
|
7
7
|
import D from "./QPasswordFieldMeterOverlay.vue.js";
|
|
8
|
-
const Y = /* @__PURE__ */
|
|
8
|
+
const Y = /* @__PURE__ */ L({
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
__name: "QPasswordField",
|
|
11
|
-
props: /* @__PURE__ */
|
|
11
|
+
props: /* @__PURE__ */ S({
|
|
12
12
|
id: {},
|
|
13
13
|
class: {},
|
|
14
14
|
label: {},
|
|
@@ -19,11 +19,12 @@ const Y = /* @__PURE__ */ S({
|
|
|
19
19
|
disabled: { type: Boolean },
|
|
20
20
|
invalid: { type: Boolean },
|
|
21
21
|
placeholder: {},
|
|
22
|
+
maxLength: {},
|
|
22
23
|
toggle: { type: Boolean },
|
|
23
24
|
meter: { type: Boolean },
|
|
24
25
|
meterLevels: {},
|
|
25
26
|
rules: {},
|
|
26
|
-
icons: { default: () =>
|
|
27
|
+
icons: { default: () => O }
|
|
27
28
|
}, {
|
|
28
29
|
modelValue: {},
|
|
29
30
|
modelModifiers: {},
|
|
@@ -39,13 +40,13 @@ const Y = /* @__PURE__ */ S({
|
|
|
39
40
|
function q(l, s) {
|
|
40
41
|
if (!l || !s) return;
|
|
41
42
|
let a = 0;
|
|
42
|
-
const
|
|
43
|
+
const r = [];
|
|
43
44
|
return s.forEach((m) => {
|
|
44
45
|
const c = m.test instanceof RegExp ? m.test.test(l) : m.test(l);
|
|
45
|
-
c === !0 ? a += m.weight : typeof c == "string" &&
|
|
46
|
+
c === !0 ? a += m.weight : typeof c == "string" && r.push(c);
|
|
46
47
|
}), {
|
|
47
48
|
score: k.value ? a / k.value : 0,
|
|
48
|
-
messages:
|
|
49
|
+
messages: r
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
52
|
function z() {
|
|
@@ -58,8 +59,8 @@ const Y = /* @__PURE__ */ S({
|
|
|
58
59
|
u.value = !1;
|
|
59
60
|
}
|
|
60
61
|
return (l, s) => {
|
|
61
|
-
var a,
|
|
62
|
-
return g(),
|
|
62
|
+
var a, r;
|
|
63
|
+
return g(), E(
|
|
63
64
|
P,
|
|
64
65
|
null,
|
|
65
66
|
[
|
|
@@ -82,10 +83,10 @@ const Y = /* @__PURE__ */ S({
|
|
|
82
83
|
onFocusin: F,
|
|
83
84
|
onFocusout: C
|
|
84
85
|
}), R({
|
|
85
|
-
"label.prepend":
|
|
86
|
+
"label.prepend": n(() => [
|
|
86
87
|
d(l.$slots, "label.prepend")
|
|
87
88
|
]),
|
|
88
|
-
"label.append":
|
|
89
|
+
"label.append": n(() => [
|
|
89
90
|
d(l.$slots, "label.append")
|
|
90
91
|
]),
|
|
91
92
|
_: 2
|
|
@@ -93,26 +94,26 @@ const Y = /* @__PURE__ */ S({
|
|
|
93
94
|
}, [
|
|
94
95
|
l.$slots.prepend ? {
|
|
95
96
|
name: "prepend",
|
|
96
|
-
fn:
|
|
97
|
+
fn: n(() => [
|
|
97
98
|
d(l.$slots, "prepend")
|
|
98
99
|
]),
|
|
99
100
|
key: "0"
|
|
100
101
|
} : void 0,
|
|
101
102
|
e.toggle ? {
|
|
102
103
|
name: "append",
|
|
103
|
-
fn:
|
|
104
|
+
fn: n(() => [
|
|
104
105
|
d(l.$slots, "append"),
|
|
105
|
-
y(b(
|
|
106
|
+
y(b(U), {
|
|
106
107
|
size: "small",
|
|
107
108
|
borderless: "",
|
|
108
109
|
"data-testid": "q-password-toggle",
|
|
109
110
|
disabled: e.disabled,
|
|
110
111
|
onClick: z
|
|
111
112
|
}, {
|
|
112
|
-
default:
|
|
113
|
+
default: n(() => [
|
|
113
114
|
y(
|
|
114
115
|
b(A),
|
|
115
|
-
N(
|
|
116
|
+
x(N(i.value ? e.icons.show : e.icons.hide)),
|
|
116
117
|
null,
|
|
117
118
|
16
|
|
118
119
|
/* FULL_PROPS */
|
|
@@ -126,7 +127,7 @@ const Y = /* @__PURE__ */ S({
|
|
|
126
127
|
} : void 0,
|
|
127
128
|
l.$slots.extras || e.rules && !e.meter ? {
|
|
128
129
|
name: "extras",
|
|
129
|
-
fn:
|
|
130
|
+
fn: n(() => [
|
|
130
131
|
d(l.$slots, "extras", {}, () => {
|
|
131
132
|
var o;
|
|
132
133
|
return [
|
|
@@ -148,7 +149,7 @@ const Y = /* @__PURE__ */ S({
|
|
|
148
149
|
score: t.value.score,
|
|
149
150
|
levels: e.meterLevels,
|
|
150
151
|
messages: t.value.messages,
|
|
151
|
-
anchor: (
|
|
152
|
+
anchor: (r = h.value) == null ? void 0 : r.$el
|
|
152
153
|
}, null, 8, ["modelValue", "score", "levels", "messages", "anchor"])) : w("v-if", !0)
|
|
153
154
|
],
|
|
154
155
|
64
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as p, mergeModels as u, useModel as f, computed as h, createBlock as d, openBlock as r, unref as
|
|
1
|
+
import { defineComponent as p, mergeModels as u, useModel as f, computed as h, createBlock as d, openBlock as r, unref as c, withCtx as v, createElementVNode as i, createElementBlock as y, createCommentVNode as m, createVNode as g, toDisplayString as B } from "vue";
|
|
2
2
|
import { QMeter as _ } from "../QMeter/index.js";
|
|
3
3
|
import { QOverlay as k } from "../QOverlay/index.js";
|
|
4
4
|
import V from "./QPasswordFieldMessages.vue.js";
|
|
@@ -30,6 +30,7 @@ const w = { class: "q-password-field__meter" }, C = {
|
|
|
30
30
|
trigger: {},
|
|
31
31
|
closeOnContentClick: { type: Boolean },
|
|
32
32
|
width: {},
|
|
33
|
+
focusTrap: { type: Boolean },
|
|
33
34
|
messages: {},
|
|
34
35
|
score: {},
|
|
35
36
|
levels: {}
|
|
@@ -54,7 +55,7 @@ const w = { class: "q-password-field__meter" }, C = {
|
|
|
54
55
|
}
|
|
55
56
|
return o.levels[o.levels.length - 1];
|
|
56
57
|
});
|
|
57
|
-
return (t, l) => (r(), d(
|
|
58
|
+
return (t, l) => (r(), d(c(k), {
|
|
58
59
|
modelValue: n.value,
|
|
59
60
|
"onUpdate:modelValue": l[0] || (l[0] = (e) => n.value = e),
|
|
60
61
|
trigger: "manual",
|
|
@@ -66,14 +67,14 @@ const w = { class: "q-password-field__meter" }, C = {
|
|
|
66
67
|
default: v(() => {
|
|
67
68
|
var e;
|
|
68
69
|
return [
|
|
69
|
-
|
|
70
|
+
i("div", w, [
|
|
70
71
|
s.value ? (r(), y("div", C, [
|
|
71
|
-
g(
|
|
72
|
+
g(c(_), {
|
|
72
73
|
"model-value": o.score,
|
|
73
74
|
max: 1,
|
|
74
75
|
color: s.value.color
|
|
75
76
|
}, null, 8, ["model-value", "color"]),
|
|
76
|
-
|
|
77
|
+
i(
|
|
77
78
|
"span",
|
|
78
79
|
null,
|
|
79
80
|
B(s.value.label),
|
|
@@ -34,6 +34,7 @@ declare const QPasswordField: {
|
|
|
34
34
|
readonly disabled?: boolean | undefined;
|
|
35
35
|
readonly invalid?: boolean | undefined;
|
|
36
36
|
readonly placeholder?: string | undefined;
|
|
37
|
+
readonly maxLength?: number | undefined;
|
|
37
38
|
readonly clearable?: boolean | undefined;
|
|
38
39
|
readonly type?: string | undefined;
|
|
39
40
|
readonly texts?: typeof import('../QTextField/types').DEFAULT_TEXTS | undefined;
|
|
@@ -139,6 +140,7 @@ declare const QPasswordField: {
|
|
|
139
140
|
invalid?: boolean;
|
|
140
141
|
} & {
|
|
141
142
|
placeholder?: string;
|
|
143
|
+
maxLength?: number;
|
|
142
144
|
clearable?: boolean;
|
|
143
145
|
type?: string;
|
|
144
146
|
texts?: typeof import('../QTextField/types').DEFAULT_TEXTS;
|
|
@@ -190,6 +192,7 @@ declare const QPasswordField: {
|
|
|
190
192
|
invalid?: boolean;
|
|
191
193
|
} & {
|
|
192
194
|
placeholder?: string;
|
|
195
|
+
maxLength?: number;
|
|
193
196
|
clearable?: boolean;
|
|
194
197
|
type?: string;
|
|
195
198
|
texts?: typeof import('../QTextField/types').DEFAULT_TEXTS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QPasswordField/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAKlD,QAAA,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QPasswordField/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAKlD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAO+mzB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAPlszB,CAAA;AAGvD,OAAO,EAAE,cAAc,EAAE,CAAA;AAGzB,YAAY,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -199,7 +199,6 @@ declare function __VLS_template(): {
|
|
|
199
199
|
}> & Readonly<{
|
|
200
200
|
"onUpdate:modelValue"?: ((value: Primitive) => any) | undefined;
|
|
201
201
|
}>, {
|
|
202
|
-
focusItem: (itemIdx: number, preventScroll?: boolean) => void;
|
|
203
202
|
getItem: (idx: number) => HTMLElement | undefined;
|
|
204
203
|
getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
|
|
205
204
|
getFirstFocusableItemIndex: () => number;
|
|
@@ -246,8 +245,7 @@ declare function __VLS_template(): {
|
|
|
246
245
|
selectable?: boolean;
|
|
247
246
|
}> & Readonly<{
|
|
248
247
|
"onUpdate:modelValue"?: ((value: Primitive) => any) | undefined;
|
|
249
|
-
}>, "
|
|
250
|
-
focusItem: (itemIdx: number, preventScroll?: boolean) => void;
|
|
248
|
+
}>, "getItem" | "getAdjacentItemIndex" | "getFirstFocusableItemIndex" | "getLastFocusableItemIndex" | ("groups" | "itemValue" | "itemLabel")> & import('vue').ShallowUnwrapRef<{
|
|
251
249
|
getItem: (idx: number) => HTMLElement | undefined;
|
|
252
250
|
getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
|
|
253
251
|
getFirstFocusableItemIndex: () => number;
|
|
@@ -471,7 +469,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
471
469
|
}> & Readonly<{
|
|
472
470
|
"onUpdate:modelValue"?: ((value: Primitive) => any) | undefined;
|
|
473
471
|
}>, {
|
|
474
|
-
focusItem: (itemIdx: number, preventScroll?: boolean) => void;
|
|
475
472
|
getItem: (idx: number) => HTMLElement | undefined;
|
|
476
473
|
getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
|
|
477
474
|
getFirstFocusableItemIndex: () => number;
|
|
@@ -518,8 +515,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
518
515
|
selectable?: boolean;
|
|
519
516
|
}> & Readonly<{
|
|
520
517
|
"onUpdate:modelValue"?: ((value: Primitive) => any) | undefined;
|
|
521
|
-
}>, "
|
|
522
|
-
focusItem: (itemIdx: number, preventScroll?: boolean) => void;
|
|
518
|
+
}>, "getItem" | "getAdjacentItemIndex" | "getFirstFocusableItemIndex" | "getLastFocusableItemIndex" | ("groups" | "itemValue" | "itemLabel")> & import('vue').ShallowUnwrapRef<{
|
|
523
519
|
getItem: (idx: number) => HTMLElement | undefined;
|
|
524
520
|
getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
|
|
525
521
|
getFirstFocusableItemIndex: () => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSelect/QSelect.vue"],"names":[],"mappings":"AAyHA;
|
|
1
|
+
{"version":3,"file":"QSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSelect/QSelect.vue"],"names":[],"mappings":"AAyHA;AAsSC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAatD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,OAAO,EAAY,QAAQ,EAAc,MAAM,KAAK,CAAA;AAEpD,KAAK,WAAW,GAAG,YAAY,CAAC;AAgKjC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,SAAS,CAAC;CACtB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WA4TT,OAAO,IAA6B;;yBAnBpB,GAAG;wBACJ,GAAG;wBACH,GAAG;gCACK,GAAG;;;YACb,GAAG;+BACM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAoFkrB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAjE90B;AAkCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA8BosB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OArB70B,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,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DEFAULT_TEXTS as
|
|
3
|
-
import { QButton as
|
|
4
|
-
import { QField as
|
|
5
|
-
import { QIcon as
|
|
6
|
-
import { QList as
|
|
7
|
-
import { QOverlay as
|
|
8
|
-
import { QSpinnerLoader as
|
|
9
|
-
import { QChevron as
|
|
10
|
-
import { QClearButton as
|
|
11
|
-
const
|
|
1
|
+
import { defineComponent as P, mergeModels as D, useModel as H, ref as y, computed as b, watch as X, nextTick as j, createElementBlock as f, openBlock as t, Fragment as N, createVNode as k, unref as n, mergeProps as z, withModifiers as A, createSlots as G, withCtx as i, toDisplayString as F, createCommentVNode as g, createTextVNode as J, renderSlot as d, createBlock as h, normalizeProps as W, createElementVNode as Y } from "vue";
|
|
2
|
+
import { DEFAULT_TEXTS as Z, DEFAULT_ICONS as ee } from "./types.js";
|
|
3
|
+
import { QButton as le } from "../QButton/index.js";
|
|
4
|
+
import { QField as oe } from "../QField/index.js";
|
|
5
|
+
import { QIcon as ae } from "../QIcon/index.js";
|
|
6
|
+
import { QList as te } from "../QList/index.js";
|
|
7
|
+
import { QOverlay as ne } from "../QOverlay/index.js";
|
|
8
|
+
import { QSpinnerLoader as ie } from "../QSpinnerLoader/index.js";
|
|
9
|
+
import { QChevron as se } from "../__internal__/QChevron/index.js";
|
|
10
|
+
import { QClearButton as re } from "../__internal__/QClearButton/index.js";
|
|
11
|
+
const de = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "q-select__value"
|
|
14
|
-
},
|
|
14
|
+
}, ue = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "q-select__placeholder"
|
|
17
|
-
},
|
|
17
|
+
}, ce = ["data-key"], fe = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "q-select__loader"
|
|
20
|
-
},
|
|
20
|
+
}, Ve = /* @__PURE__ */ P({
|
|
21
21
|
inheritAttrs: !1,
|
|
22
22
|
__name: "QSelect",
|
|
23
|
-
props: /* @__PURE__ */
|
|
23
|
+
props: /* @__PURE__ */ D({
|
|
24
24
|
id: {},
|
|
25
25
|
class: {},
|
|
26
26
|
label: {},
|
|
@@ -37,95 +37,76 @@ const fe = {
|
|
|
37
37
|
clearable: { type: Boolean },
|
|
38
38
|
loading: { type: Boolean },
|
|
39
39
|
emptyValue: { type: [String, Number, Boolean, Symbol] },
|
|
40
|
-
icons: { default: () =>
|
|
41
|
-
texts: { default: () =>
|
|
40
|
+
icons: { default: () => ee },
|
|
41
|
+
texts: { default: () => Z }
|
|
42
42
|
}, {
|
|
43
43
|
modelValue: { type: [String, Number, Boolean, Symbol] },
|
|
44
44
|
modelModifiers: {}
|
|
45
45
|
}),
|
|
46
|
-
emits: /* @__PURE__ */
|
|
47
|
-
setup(
|
|
48
|
-
const e =
|
|
46
|
+
emits: /* @__PURE__ */ D(["before-show", "before-hide", "show", "hide"], ["update:modelValue"]),
|
|
47
|
+
setup(x, { emit: O }) {
|
|
48
|
+
const e = x, m = O, p = H(x, "modelValue"), o = y(!1), v = y(null), q = y(null), _ = y(null), R = b(() => s.value === void 0), s = b(
|
|
49
49
|
() => {
|
|
50
50
|
var l;
|
|
51
|
-
return (l = e.items) == null ? void 0 : l.find((
|
|
51
|
+
return (l = e.items) == null ? void 0 : l.find((a) => a[e.itemValue] === p.value);
|
|
52
52
|
}
|
|
53
|
-
),
|
|
54
|
-
() =>
|
|
55
|
-
),
|
|
53
|
+
), M = b(
|
|
54
|
+
() => s.value ? s.value[e.itemLabel] : ""
|
|
55
|
+
), w = b(
|
|
56
56
|
() => e.clearable && !e.readonly && !e.disabled && !e.loading
|
|
57
57
|
);
|
|
58
58
|
function B(l) {
|
|
59
|
-
|
|
59
|
+
p.value = l, E();
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
61
|
+
function V() {
|
|
62
|
+
w.value && (B(e.emptyValue), C());
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
var
|
|
66
|
-
!((
|
|
64
|
+
function U(l) {
|
|
65
|
+
var a, u, c;
|
|
66
|
+
!((a = _.value) != null && a.contains(l.relatedTarget)) && !((c = (u = v.value) == null ? void 0 : u.fieldRef) != null && c.contains(l.relatedTarget)) && E();
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
68
|
+
function S() {
|
|
69
|
+
o.value || (m("before-show"), o.value = !0);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
|
|
71
|
+
function E() {
|
|
72
|
+
o.value && (m("before-hide"), o.value = !1);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
e.readonly || e.disabled || (
|
|
74
|
+
function L() {
|
|
75
|
+
e.readonly || e.disabled || (o.value ? E() : S());
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
var o;
|
|
80
|
-
if (!(!l.key || e.readonly || e.disabled)) {
|
|
81
|
-
if (window.clearTimeout($), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(l.key) && (l.preventDefault(), l.stopPropagation()), ["Enter", " ", "ArrowDown"].includes(l.key) && C(), ["Escape", "Tab"].includes(l.key) && (t.value ? t.value = !1 : E.value && l.key === "Escape" && x()), l.key === "Delete" && e.clearable && x(), /^[a-z]$/i.test(l.key)) {
|
|
82
|
-
w.value += l.key.toLowerCase();
|
|
83
|
-
const s = ((o = e.items) == null ? void 0 : o.length) || 0;
|
|
84
|
-
for (let a = 0; a < s; a++)
|
|
85
|
-
if (e.items[a][e.itemLabel].toLowerCase().startsWith(w.value)) {
|
|
86
|
-
W(a);
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
$ = window.setTimeout(function() {
|
|
91
|
-
w.value = "";
|
|
92
|
-
}, 500);
|
|
93
|
-
}
|
|
77
|
+
function $(l) {
|
|
78
|
+
!l.key || e.readonly || e.disabled || (["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(l.key) && (l.preventDefault(), l.stopPropagation()), ["Enter", " ", "ArrowDown"].includes(l.key) && S(), ["Escape", "Tab"].includes(l.key) && (o.value ? o.value = !1 : w.value && l.key === "Escape" && V()), l.key === "Delete" && e.clearable && V());
|
|
94
79
|
}
|
|
95
|
-
function
|
|
80
|
+
function I() {
|
|
96
81
|
var l;
|
|
97
|
-
e.loading ? (l =
|
|
82
|
+
e.loading ? (l = _.value) == null || l.focus() : Q(), m("show");
|
|
98
83
|
}
|
|
99
|
-
function
|
|
100
|
-
|
|
84
|
+
function K() {
|
|
85
|
+
C(), m("hide");
|
|
101
86
|
}
|
|
102
|
-
function
|
|
103
|
-
var l,
|
|
104
|
-
(
|
|
87
|
+
function C() {
|
|
88
|
+
var l, a;
|
|
89
|
+
(a = (l = v.value) == null ? void 0 : l.fieldRef) == null || a.focus();
|
|
105
90
|
}
|
|
106
|
-
function
|
|
91
|
+
function Q() {
|
|
107
92
|
var l;
|
|
108
|
-
(l =
|
|
109
|
-
}
|
|
110
|
-
function W(l) {
|
|
111
|
-
var o;
|
|
112
|
-
(o = _.value) == null || o.focusItem(l);
|
|
93
|
+
(l = q.value) == null || l.$el.focus();
|
|
113
94
|
}
|
|
114
|
-
return
|
|
95
|
+
return X(
|
|
115
96
|
() => e.loading,
|
|
116
97
|
(l) => {
|
|
117
|
-
!l &&
|
|
98
|
+
!l && o.value && j(Q);
|
|
118
99
|
}
|
|
119
|
-
), (l,
|
|
120
|
-
var
|
|
121
|
-
return
|
|
100
|
+
), (l, a) => {
|
|
101
|
+
var u, c;
|
|
102
|
+
return t(), f(
|
|
122
103
|
N,
|
|
123
104
|
null,
|
|
124
105
|
[
|
|
125
|
-
k(
|
|
106
|
+
k(n(oe), z({
|
|
126
107
|
id: e.id,
|
|
127
108
|
ref_key: "triggerEl",
|
|
128
|
-
ref:
|
|
109
|
+
ref: v,
|
|
129
110
|
label: e.label,
|
|
130
111
|
required: e.required,
|
|
131
112
|
role: "combobox",
|
|
@@ -141,23 +122,23 @@ const fe = {
|
|
|
141
122
|
readonly: e.readonly,
|
|
142
123
|
disabled: e.disabled,
|
|
143
124
|
"data-loading": e.loading,
|
|
144
|
-
"aria-expanded":
|
|
125
|
+
"aria-expanded": o.value,
|
|
145
126
|
"aria-haspopup": "listbox",
|
|
146
127
|
size: e.size,
|
|
147
128
|
invalid: e.invalid
|
|
148
129
|
}, l.$attrs, {
|
|
149
|
-
onClick:
|
|
150
|
-
onKeydown:
|
|
151
|
-
}),
|
|
152
|
-
append:
|
|
153
|
-
|
|
154
|
-
|
|
130
|
+
onClick: L,
|
|
131
|
+
onKeydown: A($, ["stop"])
|
|
132
|
+
}), G({
|
|
133
|
+
append: i(() => [
|
|
134
|
+
d(l.$slots, "append"),
|
|
135
|
+
w.value && p.value ? (t(), h(n(re), {
|
|
155
136
|
key: 0,
|
|
156
137
|
icons: e.icons,
|
|
157
138
|
texts: e.texts,
|
|
158
|
-
onClick:
|
|
139
|
+
onClick: V
|
|
159
140
|
}, null, 8, ["icons", "texts"])) : g("v-if", !0),
|
|
160
|
-
e.readonly ? g("v-if", !0) : (
|
|
141
|
+
e.readonly ? g("v-if", !0) : (t(), h(n(le), {
|
|
161
142
|
key: 1,
|
|
162
143
|
class: "q-select__chevron",
|
|
163
144
|
"aria-label": e.texts.showOptions,
|
|
@@ -166,11 +147,11 @@ const fe = {
|
|
|
166
147
|
borderless: "",
|
|
167
148
|
tabindex: "-1",
|
|
168
149
|
disabled: e.disabled,
|
|
169
|
-
onClick:
|
|
150
|
+
onClick: L
|
|
170
151
|
}, {
|
|
171
|
-
default:
|
|
172
|
-
k(
|
|
173
|
-
"model-value":
|
|
152
|
+
default: i(() => [
|
|
153
|
+
k(n(se), {
|
|
154
|
+
"model-value": o.value,
|
|
174
155
|
icons: e.icons
|
|
175
156
|
}, null, 8, ["model-value", "icons"])
|
|
176
157
|
]),
|
|
@@ -178,14 +159,14 @@ const fe = {
|
|
|
178
159
|
/* STABLE */
|
|
179
160
|
}, 8, ["aria-label", "disabled"]))
|
|
180
161
|
]),
|
|
181
|
-
default:
|
|
182
|
-
|
|
183
|
-
!e.readonly && !e.disabled ? (
|
|
162
|
+
default: i(() => [
|
|
163
|
+
R.value ? (t(), f("span", ue, [
|
|
164
|
+
!e.readonly && !e.disabled ? (t(), f(
|
|
184
165
|
N,
|
|
185
166
|
{ key: 0 },
|
|
186
167
|
[
|
|
187
|
-
|
|
188
|
-
|
|
168
|
+
J(
|
|
169
|
+
F(e.texts.placeholder),
|
|
189
170
|
1
|
|
190
171
|
/* TEXT */
|
|
191
172
|
)
|
|
@@ -193,10 +174,10 @@ const fe = {
|
|
|
193
174
|
64
|
|
194
175
|
/* STABLE_FRAGMENT */
|
|
195
176
|
)) : g("v-if", !0)
|
|
196
|
-
])) : (
|
|
177
|
+
])) : (t(), f(
|
|
197
178
|
"span",
|
|
198
|
-
|
|
199
|
-
|
|
179
|
+
de,
|
|
180
|
+
F(M.value),
|
|
200
181
|
1
|
|
201
182
|
/* TEXT */
|
|
202
183
|
))
|
|
@@ -204,15 +185,15 @@ const fe = {
|
|
|
204
185
|
_: 2
|
|
205
186
|
/* DYNAMIC */
|
|
206
187
|
}, [
|
|
207
|
-
(
|
|
188
|
+
(u = s.value) != null && u.icon || l.$slots.prepend ? {
|
|
208
189
|
name: "prepend",
|
|
209
|
-
fn:
|
|
210
|
-
var r,
|
|
190
|
+
fn: i(() => {
|
|
191
|
+
var r, T;
|
|
211
192
|
return [
|
|
212
|
-
|
|
213
|
-
(r =
|
|
214
|
-
|
|
215
|
-
|
|
193
|
+
d(l.$slots, "prepend"),
|
|
194
|
+
(r = s.value) != null && r.icon ? (t(), h(
|
|
195
|
+
n(ae),
|
|
196
|
+
W(z({ key: 0 }, (T = s.value) == null ? void 0 : T.icon)),
|
|
216
197
|
null,
|
|
217
198
|
16
|
|
218
199
|
/* FULL_PROPS */
|
|
@@ -223,60 +204,60 @@ const fe = {
|
|
|
223
204
|
} : void 0,
|
|
224
205
|
l.$slots.extras ? {
|
|
225
206
|
name: "extras",
|
|
226
|
-
fn:
|
|
227
|
-
|
|
207
|
+
fn: i(() => [
|
|
208
|
+
d(l.$slots, "extras")
|
|
228
209
|
]),
|
|
229
210
|
key: "1"
|
|
230
211
|
} : void 0
|
|
231
212
|
]), 1040, ["id", "label", "required", "tabindex", "class", "readonly", "disabled", "data-loading", "aria-expanded", "size", "invalid"]),
|
|
232
|
-
k(
|
|
233
|
-
modelValue:
|
|
234
|
-
"onUpdate:modelValue":
|
|
213
|
+
k(n(ne), {
|
|
214
|
+
modelValue: o.value,
|
|
215
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => o.value = r),
|
|
235
216
|
spy: "",
|
|
236
217
|
trigger: "manual",
|
|
237
218
|
placement: "bottom-start",
|
|
238
219
|
width: "anchor",
|
|
239
220
|
"scroll-lock": "",
|
|
240
|
-
anchor: (
|
|
221
|
+
anchor: (c = v.value) == null ? void 0 : c.$el,
|
|
241
222
|
offset: 2,
|
|
242
|
-
onEnter:
|
|
243
|
-
onLeave:
|
|
223
|
+
onEnter: I,
|
|
224
|
+
onLeave: K
|
|
244
225
|
}, {
|
|
245
|
-
default:
|
|
246
|
-
|
|
226
|
+
default: i(() => [
|
|
227
|
+
Y("div", {
|
|
247
228
|
ref_key: "contentRef",
|
|
248
|
-
ref:
|
|
229
|
+
ref: _,
|
|
249
230
|
"data-testid": "combobox-dropdown",
|
|
250
231
|
"data-key": e.id,
|
|
251
232
|
class: "q-select__body",
|
|
252
233
|
tabindex: "-1",
|
|
253
|
-
onFocusout:
|
|
254
|
-
onKeydown:
|
|
234
|
+
onFocusout: U,
|
|
235
|
+
onKeydown: A($, ["stop"])
|
|
255
236
|
}, [
|
|
256
|
-
|
|
257
|
-
e.loading ? (
|
|
258
|
-
k(
|
|
259
|
-
])) : (
|
|
237
|
+
d(l.$slots, "body.prepend"),
|
|
238
|
+
e.loading ? (t(), f("div", fe, [
|
|
239
|
+
k(n(ie), { size: 24 })
|
|
240
|
+
])) : (t(), h(n(te), {
|
|
260
241
|
key: 1,
|
|
261
242
|
ref_key: "listRef",
|
|
262
|
-
ref:
|
|
243
|
+
ref: q,
|
|
263
244
|
class: "q-select__items",
|
|
264
245
|
selectable: "",
|
|
265
|
-
"model-value":
|
|
246
|
+
"model-value": p.value,
|
|
266
247
|
items: e.items,
|
|
267
248
|
groups: l.groups,
|
|
268
249
|
"item-label": e.itemLabel,
|
|
269
250
|
"item-value": e.itemValue,
|
|
270
251
|
"onUpdate:modelValue": B
|
|
271
252
|
}, {
|
|
272
|
-
item:
|
|
273
|
-
|
|
253
|
+
item: i(({ item: r }) => [
|
|
254
|
+
d(l.$slots, "item", { item: r })
|
|
274
255
|
]),
|
|
275
256
|
_: 3
|
|
276
257
|
/* FORWARDED */
|
|
277
258
|
}, 8, ["model-value", "items", "groups", "item-label", "item-value"])),
|
|
278
|
-
|
|
279
|
-
], 40,
|
|
259
|
+
d(l.$slots, "body.append")
|
|
260
|
+
], 40, ce)
|
|
280
261
|
]),
|
|
281
262
|
_: 3
|
|
282
263
|
/* FORWARDED */
|
|
@@ -289,5 +270,5 @@ const fe = {
|
|
|
289
270
|
}
|
|
290
271
|
});
|
|
291
272
|
export {
|
|
292
|
-
|
|
273
|
+
Ve as default
|
|
293
274
|
};
|
|
@@ -228,7 +228,6 @@ declare const QSelect: {
|
|
|
228
228
|
}> & Readonly<{
|
|
229
229
|
"onUpdate:modelValue"?: ((value: import('../../types/primitive').Primitive) => any) | undefined;
|
|
230
230
|
}>, {
|
|
231
|
-
focusItem: (itemIdx: number, preventScroll?: boolean) => void;
|
|
232
231
|
getItem: (idx: number) => HTMLElement | undefined;
|
|
233
232
|
getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
|
|
234
233
|
getFirstFocusableItemIndex: () => number;
|
|
@@ -275,8 +274,7 @@ declare const QSelect: {
|
|
|
275
274
|
selectable?: boolean;
|
|
276
275
|
}> & Readonly<{
|
|
277
276
|
"onUpdate:modelValue"?: ((value: import('../../types/primitive').Primitive) => any) | undefined;
|
|
278
|
-
}>, "
|
|
279
|
-
focusItem: (itemIdx: number, preventScroll?: boolean) => void;
|
|
277
|
+
}>, "getItem" | "getAdjacentItemIndex" | "getFirstFocusableItemIndex" | "getLastFocusableItemIndex" | ("groups" | "itemValue" | "itemLabel")> & import('vue').ShallowUnwrapRef<{
|
|
280
278
|
getItem: (idx: number) => HTMLElement | undefined;
|
|
281
279
|
getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
|
|
282
280
|
getFirstFocusableItemIndex: () => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QSelect/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAI2wzB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QSelect/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAI2wzB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAJr2zB,CAAA;AAGzC,OAAO,EAAE,OAAO,EAAE,CAAA"}
|