@quidgest/ui 0.16.3 → 0.16.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 +7 -0
- package/dist/ui.css +810 -32
- package/dist/ui.esm.js +5731 -5219
- package/dist/ui.js +18 -18
- package/dist/ui.min.css +2 -1
- package/dist/ui.min.js +1042 -1006
- package/dist/ui.scss +463 -40
- package/esm/_virtual/_plugin-vue_export-helper.js +9 -0
- package/esm/components/QCombobox/QCombobox.d.ts +14 -0
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +9 -8
- package/esm/components/QCombobox/index.d.ts +7 -0
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.d.ts +9 -1
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +125 -97
- package/esm/components/QDialog/QDialogProvider.d.ts +3 -0
- package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -0
- package/esm/components/QDialog/QDialogProvider.vue.js +26 -0
- package/esm/components/QDialog/QDialogProvider.vue2.js +4 -0
- package/esm/components/QDialog/index.d.ts +26 -2
- package/esm/components/QDialog/index.d.ts.map +1 -1
- package/esm/components/QDialog/index.js +6 -4
- package/esm/components/QDialog/types.d.ts +9 -0
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -1
- package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +26 -24
- package/esm/components/QDivider/QDivider.d.ts +21 -0
- package/esm/components/QDivider/QDivider.d.ts.map +1 -0
- package/esm/components/QDivider/QDivider.vue.js +57 -0
- package/esm/components/QDivider/QDivider.vue2.js +4 -0
- package/esm/components/QDivider/index.d.ts +25 -0
- package/esm/components/QDivider/index.d.ts.map +1 -0
- package/esm/components/QDivider/index.js +6 -0
- package/esm/components/QDivider/types.d.ts +11 -0
- package/esm/components/QDivider/types.d.ts.map +1 -0
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +14 -0
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QGrid/QCol.d.ts +19 -0
- package/esm/components/QGrid/QCol.d.ts.map +1 -0
- package/esm/components/QGrid/QCol.vue.js +46 -0
- package/esm/components/QGrid/QCol.vue2.js +4 -0
- package/esm/components/QGrid/QContainer.d.ts +19 -0
- package/esm/components/QGrid/QContainer.d.ts.map +1 -0
- package/esm/components/QGrid/QContainer.vue.js +24 -0
- package/esm/components/QGrid/QContainer.vue2.js +4 -0
- package/esm/components/QGrid/QRow.d.ts +23 -0
- package/esm/components/QGrid/QRow.d.ts.map +1 -0
- package/esm/components/QGrid/QRow.vue.js +36 -0
- package/esm/components/QGrid/QRow.vue2.js +4 -0
- package/esm/components/QGrid/QSpacer.d.ts +3 -0
- package/esm/components/QGrid/QSpacer.d.ts.map +1 -0
- package/esm/components/QGrid/QSpacer.vue.js +10 -0
- package/esm/components/QGrid/index.d.ts +66 -0
- package/esm/components/QGrid/index.d.ts.map +1 -0
- package/esm/components/QGrid/index.js +12 -0
- package/esm/components/QGrid/types.d.ts +47 -0
- package/esm/components/QGrid/types.d.ts.map +1 -0
- package/esm/components/QList/QList.d.ts +1 -0
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +130 -120
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +57 -43
- package/esm/components/QList/index.d.ts +7 -0
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QList/types.d.ts +8 -0
- package/esm/components/QList/types.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +29 -27
- package/esm/components/QOverlay/index.d.ts +3 -0
- package/esm/components/QOverlay/index.d.ts.map +1 -1
- package/esm/components/QOverlay/types.d.ts +4 -0
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +8 -7
- package/esm/components/QSelect/QSelect.d.ts +14 -0
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +1 -0
- package/esm/components/QSelect/index.d.ts +7 -0
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts +39 -0
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -0
- package/esm/components/QSidebar/QSidebar.vue.js +155 -0
- package/esm/components/QSidebar/QSidebar.vue2.js +4 -0
- package/esm/components/QSidebar/QSidebarAnchor.d.ts +219 -0
- package/esm/components/QSidebar/QSidebarAnchor.d.ts.map +1 -0
- package/esm/components/QSidebar/QSidebarAnchor.vue.js +110 -0
- package/esm/components/QSidebar/QSidebarAnchor.vue2.js +4 -0
- package/esm/components/QSidebar/QSidebarPanel.d.ts +41 -0
- package/esm/components/QSidebar/QSidebarPanel.d.ts.map +1 -0
- package/esm/components/QSidebar/QSidebarPanel.vue.js +90 -0
- package/esm/components/QSidebar/QSidebarPanel.vue2.js +4 -0
- package/esm/components/QSidebar/index.d.ts +72 -0
- package/esm/components/QSidebar/index.d.ts.map +1 -0
- package/esm/components/QSidebar/index.js +6 -0
- package/esm/components/QSidebar/types.d.ts +63 -0
- package/esm/components/QSidebar/types.d.ts.map +1 -0
- package/esm/components/QToggleGroup/types.d.ts +1 -1
- package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.vue.js +47 -46
- package/esm/components/index.d.ts +3 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +78 -68
- package/esm/composables/index.d.ts +2 -1
- package/esm/composables/index.d.ts.map +1 -1
- package/esm/composables/theme.js +3 -3
- package/esm/composables/useDialog/index.d.ts +69 -0
- package/esm/composables/useDialog/index.d.ts.map +1 -0
- package/esm/composables/useDialog/index.js +21 -0
- package/esm/composables/useDialog/types.d.ts +25 -0
- package/esm/composables/useDialog/types.d.ts.map +1 -0
- package/esm/composables/useDismissibleLayerStack/index.d.ts +14 -0
- package/esm/composables/useDismissibleLayerStack/index.d.ts.map +1 -0
- package/esm/composables/useDismissibleLayerStack/index.js +32 -0
- package/esm/framework.d.ts.map +1 -1
- package/esm/framework.js +35 -31
- package/esm/index.d.ts +7 -0
- package/esm/index.js +4 -2
- package/esm/symbols/dismissibleLayer.d.ts +4 -0
- package/esm/symbols/dismissibleLayer.d.ts.map +1 -0
- package/esm/symbols/dismissibleLayer.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type QContainerProps = {
|
|
2
|
+
/**
|
|
3
|
+
* If true, container spans full width, otherwise constrained by breakpoints.
|
|
4
|
+
*/
|
|
5
|
+
fluid?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type QRowProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Space between columns in pixels.
|
|
10
|
+
*/
|
|
11
|
+
gutter?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Horizontal alignment.
|
|
14
|
+
*/
|
|
15
|
+
justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
16
|
+
/**
|
|
17
|
+
* Vertical alignment.
|
|
18
|
+
*/
|
|
19
|
+
align?: 'start' | 'center' | 'end' | 'baseline' | 'stretch';
|
|
20
|
+
};
|
|
21
|
+
export type QColProps = {
|
|
22
|
+
/**
|
|
23
|
+
* Number of columns (1–12) or 'auto'.
|
|
24
|
+
*/
|
|
25
|
+
cols?: number | 'auto';
|
|
26
|
+
/**
|
|
27
|
+
* Small breakpoint columns.
|
|
28
|
+
*/
|
|
29
|
+
sm?: number | 'auto';
|
|
30
|
+
/**
|
|
31
|
+
* Medium breakpoint columns.
|
|
32
|
+
*/
|
|
33
|
+
md?: number | 'auto';
|
|
34
|
+
/**
|
|
35
|
+
* Large breakpoint columns.
|
|
36
|
+
*/
|
|
37
|
+
lg?: number | 'auto';
|
|
38
|
+
/**
|
|
39
|
+
* Extra-large breakpoint columns.
|
|
40
|
+
*/
|
|
41
|
+
xl?: number | 'auto';
|
|
42
|
+
/**
|
|
43
|
+
* Extra-extra-large breakpoint columns.
|
|
44
|
+
*/
|
|
45
|
+
xxl?: number | 'auto';
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QGrid/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAEtE;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,CAAA;CAC3D,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEtB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEpB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEpB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEpB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEpB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QList.vue"],"names":[],"mappings":"AA6CA;
|
|
1
|
+
{"version":3,"file":"QList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QList.vue"],"names":[],"mappings":"AA6CA;AAibC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAMhD,KAAK,WAAW,GAAG,UAAU,CAAC;AAoN9B,iBAAS,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAIrD;AAaD;;;;;;GAMG;AACH,iBAAS,0BAA0B,IAAI,MAAM,CAO5C;AAED;;;;;;GAMG;AACH,iBAAS,yBAAyB,IAAI,MAAM,CAO3C;AAmCD;;;;;;;;GAQG;AACH,iBAAS,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAuB7E;AA4DF,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,GAAG,CAAC;CAChB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAsIT,OAAO,IAA6B;;yBAdpB,GAAG;;;;YACN,GAAG;;;;YACM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCApEb,GAAG,8CAE3B,GAAG,yBACH,GAAG,6DAEF,GAAG;;;;;;;;;;;;;;;;;EAgFL;AAsBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA5GK,GAAG,8CAE3B,GAAG,yBACH,GAAG,6DAEF,GAAG;;;;;;;;;;;;;;;OAkHJ,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,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { QListItemGroup as
|
|
3
|
-
|
|
1
|
+
import { defineComponent as X, mergeModels as D, useModel as Y, ref as p, computed as M, toRef as _, watch as Z, createBlock as y, openBlock as d, resolveDynamicComponent as ee, normalizeClass as te, withCtx as b, renderSlot as x, createElementBlock as q, Fragment as T, renderList as $, unref as E } from "vue";
|
|
2
|
+
import { QListItemGroup as ne, QListItem as le } from "./index.js";
|
|
3
|
+
import { useGroup as ie } from "../../composables/useGroup/index.js";
|
|
4
|
+
const re = /* @__PURE__ */ X({
|
|
4
5
|
__name: "QList",
|
|
5
|
-
props: /* @__PURE__ */
|
|
6
|
+
props: /* @__PURE__ */ D({
|
|
6
7
|
id: {},
|
|
7
8
|
class: {},
|
|
8
9
|
highlighted: {},
|
|
@@ -11,24 +12,27 @@ const se = /* @__PURE__ */ N({
|
|
|
11
12
|
itemValue: { default: "key" },
|
|
12
13
|
itemLabel: { default: "label" },
|
|
13
14
|
disabled: { type: Boolean },
|
|
14
|
-
selectable: { type: Boolean }
|
|
15
|
+
selectable: { type: Boolean },
|
|
16
|
+
multiple: { type: Boolean },
|
|
17
|
+
required: { type: Boolean }
|
|
15
18
|
}, {
|
|
16
19
|
modelValue: {},
|
|
17
20
|
modelModifiers: {}
|
|
18
21
|
}),
|
|
19
|
-
emits: /* @__PURE__ */
|
|
20
|
-
setup(
|
|
21
|
-
const n =
|
|
22
|
+
emits: /* @__PURE__ */ D(["click"], ["update:modelValue"]),
|
|
23
|
+
setup(A, { expose: R, emit: G }) {
|
|
24
|
+
const n = A, O = G, f = Y(A, "modelValue"), v = p(!1), Q = M(() => a.value.length > 1 ? "div" : "ul"), a = M(() => n.groups.length ? n.groups.filter(
|
|
22
25
|
(e) => {
|
|
23
26
|
var t;
|
|
24
27
|
return (t = n.items) == null ? void 0 : t.some((l) => l.group === e.id);
|
|
25
28
|
}
|
|
26
|
-
) : [{ id: "", title: "" }]),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
) : [{ id: "", title: "" }]), { active: S } = ie({
|
|
30
|
+
active: f,
|
|
31
|
+
required: _(n, "required"),
|
|
32
|
+
multiple: _(n, "multiple")
|
|
33
|
+
}), g = p(null), h = p(null);
|
|
34
|
+
function U(e) {
|
|
35
|
+
O("click", e);
|
|
32
36
|
}
|
|
33
37
|
function j() {
|
|
34
38
|
v.value = !0;
|
|
@@ -36,20 +40,20 @@ const se = /* @__PURE__ */ N({
|
|
|
36
40
|
function z() {
|
|
37
41
|
v.value = !1;
|
|
38
42
|
}
|
|
39
|
-
function
|
|
40
|
-
var
|
|
41
|
-
if (!n.items || (
|
|
43
|
+
function H(e) {
|
|
44
|
+
var i;
|
|
45
|
+
if (!n.items || (i = g.value) != null && i.contains(e.relatedTarget))
|
|
42
46
|
return;
|
|
43
47
|
let t;
|
|
44
|
-
f.value ? t = n.items.findIndex((
|
|
48
|
+
f.value ? t = n.items.findIndex((s) => s[n.itemValue] === f.value) : t = I();
|
|
45
49
|
const l = v.value;
|
|
46
|
-
|
|
50
|
+
r(t, l);
|
|
47
51
|
}
|
|
48
|
-
const
|
|
49
|
-
let
|
|
50
|
-
function
|
|
52
|
+
const k = p("");
|
|
53
|
+
let L;
|
|
54
|
+
function K(e) {
|
|
51
55
|
var t;
|
|
52
|
-
switch (window.clearTimeout(
|
|
56
|
+
switch (window.clearTimeout(L), ["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key) && e.preventDefault(), e.key) {
|
|
53
57
|
case "ArrowDown":
|
|
54
58
|
m("next");
|
|
55
59
|
break;
|
|
@@ -64,159 +68,165 @@ const se = /* @__PURE__ */ N({
|
|
|
64
68
|
break;
|
|
65
69
|
}
|
|
66
70
|
if (/^[a-z]$/i.test(e.key)) {
|
|
67
|
-
|
|
71
|
+
k.value += e.key.toLowerCase();
|
|
68
72
|
const l = ((t = n.items) == null ? void 0 : t.length) || 0;
|
|
69
|
-
for (let
|
|
70
|
-
if (n.items[
|
|
71
|
-
|
|
73
|
+
for (let i = 0; i < l; i++)
|
|
74
|
+
if (n.items[i][n.itemLabel].toLowerCase().startsWith(k.value)) {
|
|
75
|
+
r(i);
|
|
72
76
|
break;
|
|
73
77
|
}
|
|
74
78
|
e.preventDefault(), e.stopPropagation();
|
|
75
79
|
}
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
L = window.setTimeout(function() {
|
|
81
|
+
k.value = "";
|
|
78
82
|
}, 500);
|
|
79
83
|
}
|
|
80
84
|
function m(e) {
|
|
81
85
|
switch (e) {
|
|
82
86
|
case "next":
|
|
83
87
|
case "prev":
|
|
84
|
-
|
|
88
|
+
r(J(e));
|
|
85
89
|
break;
|
|
86
90
|
case "first":
|
|
87
|
-
|
|
91
|
+
r(I());
|
|
88
92
|
break;
|
|
89
93
|
case "last":
|
|
90
|
-
|
|
94
|
+
r(C());
|
|
91
95
|
break;
|
|
92
96
|
}
|
|
93
97
|
}
|
|
94
|
-
function
|
|
95
|
-
var
|
|
96
|
-
(
|
|
98
|
+
function r(e, t = !1) {
|
|
99
|
+
var i;
|
|
100
|
+
(i = o()[e]) == null || i.focus({ preventScroll: t });
|
|
97
101
|
}
|
|
98
102
|
function o() {
|
|
99
103
|
var t;
|
|
100
104
|
const e = (t = g.value) == null ? void 0 : t.querySelectorAll("li");
|
|
101
105
|
return e ? Array.from(e) : [];
|
|
102
106
|
}
|
|
103
|
-
function
|
|
107
|
+
function P(e) {
|
|
104
108
|
return o()[e];
|
|
105
109
|
}
|
|
106
|
-
function
|
|
110
|
+
function W() {
|
|
107
111
|
return o().indexOf(document.activeElement);
|
|
108
112
|
}
|
|
109
|
-
function
|
|
113
|
+
function I() {
|
|
110
114
|
const e = o(), t = e.find((l) => w(l));
|
|
111
115
|
return t ? e.indexOf(t) : -1;
|
|
112
116
|
}
|
|
113
|
-
function
|
|
117
|
+
function C() {
|
|
114
118
|
const e = o(), t = [...e].reverse().find((l) => w(l));
|
|
115
119
|
return t ? e.indexOf(t) : -1;
|
|
116
120
|
}
|
|
117
|
-
function
|
|
121
|
+
function V(e, t, l) {
|
|
118
122
|
return t === "prev" && e <= 0 || t === "next" && e === l.length - 1;
|
|
119
123
|
}
|
|
120
|
-
function
|
|
121
|
-
const t =
|
|
122
|
-
return
|
|
124
|
+
function J(e) {
|
|
125
|
+
const t = W();
|
|
126
|
+
return F(t, e);
|
|
123
127
|
}
|
|
124
|
-
function
|
|
128
|
+
function F(e, t) {
|
|
125
129
|
const l = o();
|
|
126
|
-
if (
|
|
130
|
+
if (V(e, t, l))
|
|
127
131
|
return e;
|
|
128
|
-
let
|
|
129
|
-
for (; !w(l[
|
|
130
|
-
if (
|
|
132
|
+
let i = e + (t === "next" ? 1 : -1);
|
|
133
|
+
for (; !w(l[i]); ) {
|
|
134
|
+
if (V(i, t, l))
|
|
131
135
|
return e;
|
|
132
|
-
|
|
136
|
+
i += t === "next" ? 1 : -1;
|
|
133
137
|
}
|
|
134
|
-
return
|
|
138
|
+
return i;
|
|
135
139
|
}
|
|
136
140
|
function w(e) {
|
|
137
141
|
return e.tabIndex === -2;
|
|
138
142
|
}
|
|
139
|
-
function
|
|
143
|
+
function N(e) {
|
|
140
144
|
var t;
|
|
141
145
|
return e ? (t = n.items) == null ? void 0 : t.filter((l) => l.group === e) : n.items;
|
|
142
146
|
}
|
|
143
|
-
return
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
return Z(
|
|
148
|
+
S,
|
|
149
|
+
(e) => {
|
|
150
|
+
f.value = e;
|
|
151
|
+
},
|
|
152
|
+
{ deep: !0 }
|
|
153
|
+
), R({
|
|
154
|
+
getItem: P,
|
|
155
|
+
getAdjacentItemIndex: F,
|
|
156
|
+
getFirstFocusableItemIndex: I,
|
|
157
|
+
getLastFocusableItemIndex: C
|
|
158
|
+
}), (e, t) => (d(), y(ee(Q.value), {
|
|
149
159
|
id: n.id,
|
|
150
160
|
ref_key: "listRef",
|
|
151
161
|
ref: g,
|
|
152
|
-
class:
|
|
162
|
+
class: te(["q-list", { "q-list--disabled": n.disabled }, n.class]),
|
|
153
163
|
role: "listbox",
|
|
154
164
|
tabindex: n.disabled ? -1 : 0,
|
|
155
|
-
onFocus:
|
|
165
|
+
onFocus: H,
|
|
156
166
|
onMousedown: j,
|
|
157
167
|
onMouseup: z,
|
|
158
|
-
onKeydown:
|
|
168
|
+
onKeydown: K
|
|
159
169
|
}, {
|
|
160
170
|
default: b(() => [
|
|
161
|
-
(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
)
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
)
|
|
171
|
+
x(e.$slots, "default", {}, () => [
|
|
172
|
+
(d(!0), q(
|
|
173
|
+
T,
|
|
174
|
+
null,
|
|
175
|
+
$(a.value, (l, i) => (d(), y(E(ne), {
|
|
176
|
+
id: l.id,
|
|
177
|
+
key: l.id,
|
|
178
|
+
title: a.value.length === 1 ? void 0 : l.title
|
|
179
|
+
}, {
|
|
180
|
+
default: b(() => [
|
|
181
|
+
(d(!0), q(
|
|
182
|
+
T,
|
|
183
|
+
null,
|
|
184
|
+
$(N(l.id), (s, B) => (d(), y(E(le), {
|
|
185
|
+
key: s[n.itemValue],
|
|
186
|
+
ref_for: !0,
|
|
187
|
+
ref_key: "listItemsRef",
|
|
188
|
+
ref: h,
|
|
189
|
+
value: s[n.itemValue],
|
|
190
|
+
label: s[n.itemLabel],
|
|
191
|
+
description: s.description,
|
|
192
|
+
icon: s.icon,
|
|
193
|
+
disabled: n.disabled || l.disabled || s.disabled,
|
|
194
|
+
highlighted: n.highlighted === s[n.itemValue],
|
|
195
|
+
selectable: n.selectable || n.multiple || s.selectable,
|
|
196
|
+
onClick: () => U(s[n.itemValue])
|
|
197
|
+
}, {
|
|
198
|
+
append: b(() => {
|
|
199
|
+
var u, c;
|
|
200
|
+
return [
|
|
201
|
+
x(e.$slots, "item.append", {
|
|
202
|
+
item: s,
|
|
203
|
+
element: (c = (u = h.value) == null ? void 0 : u[B + i * a.value.length]) == null ? void 0 : c.$el
|
|
204
|
+
})
|
|
205
|
+
];
|
|
206
|
+
}),
|
|
207
|
+
default: b(() => {
|
|
208
|
+
var u, c;
|
|
209
|
+
return [
|
|
210
|
+
x(e.$slots, "item", {
|
|
211
|
+
item: s,
|
|
212
|
+
element: (c = (u = h.value) == null ? void 0 : u[B + i * a.value.length]) == null ? void 0 : c.$el
|
|
213
|
+
})
|
|
214
|
+
];
|
|
215
|
+
}),
|
|
216
|
+
_: 2
|
|
217
|
+
/* DYNAMIC */
|
|
218
|
+
}, 1032, ["value", "label", "description", "icon", "disabled", "highlighted", "selectable", "onClick"]))),
|
|
219
|
+
128
|
|
220
|
+
/* KEYED_FRAGMENT */
|
|
221
|
+
))
|
|
222
|
+
]),
|
|
223
|
+
_: 2
|
|
224
|
+
/* DYNAMIC */
|
|
225
|
+
}, 1032, ["id", "title"]))),
|
|
226
|
+
128
|
|
227
|
+
/* KEYED_FRAGMENT */
|
|
228
|
+
))
|
|
229
|
+
])
|
|
220
230
|
]),
|
|
221
231
|
_: 3
|
|
222
232
|
/* FORWARDED */
|
|
@@ -224,5 +234,5 @@ const se = /* @__PURE__ */ N({
|
|
|
224
234
|
}
|
|
225
235
|
});
|
|
226
236
|
export {
|
|
227
|
-
|
|
237
|
+
re as default
|
|
228
238
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QListItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QListItem.vue"],"names":[],"mappings":"AAiDA;AAyHC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAMvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAO7C,KAAK,WAAW,GAAG,cAAc,CAAC;AA6DnC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAmGT,OAAO,IAA6B;;yBAZrB,GAAG;yBACH,GAAG;wBACH,GAAG;;;;EAe/B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;uFASnB,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,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DEFAULT_ICONS as
|
|
3
|
-
import { QIcon as
|
|
4
|
-
import { useId as
|
|
5
|
-
|
|
1
|
+
import { defineComponent as q, mergeModels as p, useModel as w, watch as B, createElementBlock as d, openBlock as o, withModifiers as V, normalizeClass as C, unref as s, renderSlot as c, createElementVNode as r, createCommentVNode as n, createBlock as f, createTextVNode as E, normalizeProps as h, mergeProps as _, toDisplayString as v, createVNode as I, guardReactiveProps as N } from "vue";
|
|
2
|
+
import { DEFAULT_ICONS as D } from "./types.js";
|
|
3
|
+
import { QIcon as m } from "../QIcon/index.js";
|
|
4
|
+
import { useId as L } from "../../composables/uid.js";
|
|
5
|
+
import { useGroupItem as M } from "../../composables/useGroup/index.js";
|
|
6
|
+
const P = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Q = { class: "q-list-item__container" }, x = { class: "q-list-item__content" }, S = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "q-list-item__description"
|
|
8
9
|
}, T = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "q-list-item__check-container"
|
|
11
|
-
},
|
|
12
|
+
}, O = /* @__PURE__ */ q({
|
|
12
13
|
__name: "QListItem",
|
|
13
14
|
props: /* @__PURE__ */ p({
|
|
14
15
|
value: {},
|
|
@@ -18,86 +19,99 @@ const M = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], P = { c
|
|
|
18
19
|
highlighted: { type: Boolean },
|
|
19
20
|
disabled: { type: Boolean },
|
|
20
21
|
description: {},
|
|
21
|
-
icons: { default: () =>
|
|
22
|
+
icons: { default: () => D }
|
|
22
23
|
}, {
|
|
23
24
|
modelValue: { type: Boolean },
|
|
24
25
|
modelModifiers: {}
|
|
25
26
|
}),
|
|
26
27
|
emits: /* @__PURE__ */ p(["click"], ["update:modelValue"]),
|
|
27
|
-
setup(
|
|
28
|
-
const e =
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
setup(u, { emit: b }) {
|
|
29
|
+
const e = u, k = b, l = w(u, "modelValue"), y = L(), i = M(e.value);
|
|
30
|
+
if (!i)
|
|
31
|
+
throw new Error(
|
|
32
|
+
"QListItem: Failed to retrieve group item. Ensure the component is used within a QList context."
|
|
33
|
+
);
|
|
34
|
+
function a() {
|
|
35
|
+
e.disabled || (k("click"), e.selectable && (i == null || i.toggle()));
|
|
31
36
|
}
|
|
32
|
-
function
|
|
33
|
-
t.key === "Tab" &&
|
|
37
|
+
function g(t) {
|
|
38
|
+
t.key === "Tab" && a(), (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), a());
|
|
34
39
|
}
|
|
35
|
-
return (
|
|
36
|
-
|
|
40
|
+
return B(
|
|
41
|
+
i.isActive,
|
|
42
|
+
(t) => {
|
|
43
|
+
l.value = t;
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
immediate: !0
|
|
47
|
+
}
|
|
48
|
+
), (t, $) => (o(), d("li", {
|
|
49
|
+
id: s(y),
|
|
37
50
|
"data-key": e.value,
|
|
38
51
|
role: "option",
|
|
39
52
|
tabindex: e.disabled ? void 0 : -2,
|
|
40
|
-
class:
|
|
53
|
+
class: C([
|
|
41
54
|
"q-list-item",
|
|
42
55
|
{
|
|
43
56
|
"q-list-item--selected": l.value,
|
|
57
|
+
"q-list-item--selectable": e.selectable,
|
|
44
58
|
"q-list-item--disabled": e.disabled,
|
|
45
59
|
"q-list-item--highlighted": e.highlighted
|
|
46
60
|
}
|
|
47
61
|
]),
|
|
48
62
|
"aria-label": e.label,
|
|
49
63
|
"aria-selected": e.disabled ? void 0 : l.value,
|
|
50
|
-
onKeydown:
|
|
51
|
-
onClick:
|
|
64
|
+
onKeydown: g,
|
|
65
|
+
onClick: V(a, ["stop", "prevent"])
|
|
52
66
|
}, [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
e.icon ? (
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
c(t.$slots, "prepend"),
|
|
68
|
+
r("div", Q, [
|
|
69
|
+
r("div", x, [
|
|
70
|
+
c(t.$slots, "default", {}, () => [
|
|
71
|
+
e.icon ? (o(), f(
|
|
72
|
+
s(m),
|
|
73
|
+
h(_({ key: 0 }, e.icon)),
|
|
60
74
|
null,
|
|
61
75
|
16
|
|
62
76
|
/* FULL_PROPS */
|
|
63
|
-
)) :
|
|
64
|
-
|
|
65
|
-
" " +
|
|
77
|
+
)) : n("v-if", !0),
|
|
78
|
+
E(
|
|
79
|
+
" " + v(e.label),
|
|
66
80
|
1
|
|
67
81
|
/* TEXT */
|
|
68
82
|
)
|
|
69
83
|
])
|
|
70
84
|
]),
|
|
71
|
-
e.description ? (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
85
|
+
e.description ? (o(), d("div", S, [
|
|
86
|
+
I(
|
|
87
|
+
s(m),
|
|
88
|
+
h(N(e.icons.description)),
|
|
75
89
|
null,
|
|
76
90
|
16
|
|
77
91
|
/* FULL_PROPS */
|
|
78
92
|
),
|
|
79
|
-
|
|
93
|
+
r(
|
|
80
94
|
"span",
|
|
81
95
|
null,
|
|
82
|
-
|
|
96
|
+
v(e.description),
|
|
83
97
|
1
|
|
84
98
|
/* TEXT */
|
|
85
99
|
)
|
|
86
|
-
])) :
|
|
100
|
+
])) : n("v-if", !0)
|
|
87
101
|
]),
|
|
88
|
-
|
|
89
|
-
e.selectable ? (
|
|
90
|
-
l.value ? (
|
|
91
|
-
|
|
102
|
+
c(t.$slots, "append"),
|
|
103
|
+
e.selectable ? (o(), d("div", T, [
|
|
104
|
+
l.value ? (o(), f(
|
|
105
|
+
s(m),
|
|
92
106
|
_({ key: 0 }, e.icons.check, { class: "q-list-item__check" }),
|
|
93
107
|
null,
|
|
94
108
|
16
|
|
95
109
|
/* FULL_PROPS */
|
|
96
|
-
)) :
|
|
97
|
-
])) :
|
|
98
|
-
], 42,
|
|
110
|
+
)) : n("v-if", !0)
|
|
111
|
+
])) : n("v-if", !0)
|
|
112
|
+
], 42, P));
|
|
99
113
|
}
|
|
100
114
|
});
|
|
101
115
|
export {
|
|
102
|
-
|
|
116
|
+
O as default
|
|
103
117
|
};
|
|
@@ -10,6 +10,8 @@ declare const QList: {
|
|
|
10
10
|
itemLabel?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
selectable?: boolean;
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
required?: boolean;
|
|
13
15
|
}> & Readonly<{
|
|
14
16
|
onClick?: ((key: any) => any) | undefined;
|
|
15
17
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
@@ -120,6 +122,8 @@ declare const QList: {
|
|
|
120
122
|
itemLabel?: string;
|
|
121
123
|
disabled?: boolean;
|
|
122
124
|
selectable?: boolean;
|
|
125
|
+
multiple?: boolean;
|
|
126
|
+
required?: boolean;
|
|
123
127
|
}> & Readonly<{
|
|
124
128
|
onClick?: ((key: any) => any) | undefined;
|
|
125
129
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
@@ -146,6 +150,8 @@ declare const QList: {
|
|
|
146
150
|
itemLabel?: string;
|
|
147
151
|
disabled?: boolean;
|
|
148
152
|
selectable?: boolean;
|
|
153
|
+
multiple?: boolean;
|
|
154
|
+
required?: boolean;
|
|
149
155
|
}> & Readonly<{
|
|
150
156
|
onClick?: ((key: any) => any) | undefined;
|
|
151
157
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
@@ -164,6 +170,7 @@ declare const QList: {
|
|
|
164
170
|
itemLabel: string;
|
|
165
171
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
166
172
|
$slots: {
|
|
173
|
+
default?(_: {}): any;
|
|
167
174
|
item?(_: {
|
|
168
175
|
item: import('./types').Item;
|
|
169
176
|
element: HTMLLIElement | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QList/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAKlD,QAAA,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QList/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAKlD,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCASg1yB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAT56yB,CAAA;AACrC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA8B,CAAA;AAC7C,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;EAAmC,CAAA;AAGvD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,CAAA;AAG3C,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -38,6 +38,14 @@ export type QListProps = QBaseComponentProps & {
|
|
|
38
38
|
* Indicates whether the list items are selectable.
|
|
39
39
|
*/
|
|
40
40
|
selectable?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Indicates if options can be deselected.
|
|
43
|
+
*/
|
|
44
|
+
multiple?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Indicates if there should be at least one option selected.
|
|
47
|
+
*/
|
|
48
|
+
required?: boolean;
|
|
41
49
|
};
|
|
42
50
|
export type QListItemProps = {
|
|
43
51
|
/**
|