@quidgest/ui 0.16.50 → 0.16.52
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/json/api.json +12 -1
- package/dist/ui.esm.js +1373 -1357
- package/dist/ui.js +4 -4
- package/dist/ui.min.js +141 -140
- package/dist/ui.scss +1 -1
- package/esm/components/QCombobox/QCombobox.d.ts +16 -4
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/index.d.ts +8 -2
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +27 -18
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +21 -7
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +40 -36
- package/esm/components/QDropdownMenu/index.d.ts +9 -9
- package/esm/components/QList/QList.d.ts +9 -2
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +27 -25
- package/esm/components/QList/QListItem.d.ts +1 -0
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +25 -24
- package/esm/components/QList/index.d.ts +10 -1
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QList/types.d.ts +12 -0
- package/esm/components/QList/types.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.d.ts +3 -3
- package/esm/components/QOverlay/index.d.ts +18 -18
- package/esm/components/QOverlay/types.d.ts +1 -0
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPopover/QPopover.d.ts +1 -1
- package/esm/components/QPopover/index.d.ts +6 -6
- package/esm/components/QSelect/QSelect.d.ts +16 -4
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/index.d.ts +8 -2
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.d.ts +3 -3
- package/esm/components/QTooltip/index.d.ts +18 -18
- package/package.json +1 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { QList as
|
|
3
|
-
import { QOverlay as
|
|
4
|
-
import { QIcon as
|
|
5
|
-
import { DEFAULT_ICONS as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as U, mergeModels as _, useModel as A, ref as M, computed as q, useTemplateRef as z, resolveComponent as H, createBlock as x, openBlock as c, unref as y, normalizeClass as j, withCtx as u, createElementVNode as G, withModifiers as J, renderSlot as l, createVNode as E, createElementBlock as R, createCommentVNode as k, toDisplayString as W, Fragment as X, normalizeProps as b, guardReactiveProps as V, mergeProps as Y, nextTick as Z } from "vue";
|
|
2
|
+
import { QList as K } from "../QList/index.js";
|
|
3
|
+
import { QOverlay as ee } from "../QOverlay/index.js";
|
|
4
|
+
import { QIcon as te } from "../QIcon/index.js";
|
|
5
|
+
import { DEFAULT_ICONS as oe } from "./constants.js";
|
|
6
|
+
const ne = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "q-dropdown-menu__extra"
|
|
9
|
-
},
|
|
9
|
+
}, ue = /* @__PURE__ */ U({
|
|
10
10
|
__name: "QDropdownMenuContent",
|
|
11
11
|
props: /* @__PURE__ */ _({
|
|
12
12
|
id: {},
|
|
@@ -23,7 +23,7 @@ const oe = {
|
|
|
23
23
|
delay: { default: 500 },
|
|
24
24
|
trigger: { default: "hover" },
|
|
25
25
|
depth: { default: 0 },
|
|
26
|
-
icons: { default: () =>
|
|
26
|
+
icons: { default: () => oe },
|
|
27
27
|
offset: { default: 0 },
|
|
28
28
|
crossOffset: { default: -5 }
|
|
29
29
|
}, {
|
|
@@ -32,9 +32,9 @@ const oe = {
|
|
|
32
32
|
highlighted: {},
|
|
33
33
|
highlightedModifiers: {}
|
|
34
34
|
}),
|
|
35
|
-
emits: /* @__PURE__ */ _(["select", "hide", "focus-previous"], ["update:modelValue", "update:highlighted"]),
|
|
36
|
-
setup(
|
|
37
|
-
const t =
|
|
35
|
+
emits: /* @__PURE__ */ _(["select", "open", "hide", "focus-previous"], ["update:modelValue", "update:highlighted"]),
|
|
36
|
+
setup(d, { emit: $ }) {
|
|
37
|
+
const t = d, f = $, m = A(d, "modelValue"), s = A(d, "highlighted"), i = M(void 0), I = M([]), P = q(() => t.depth !== 0 ? t.offset : 4), S = q(() => t.depth !== 0 ? t.crossOffset : void 0), p = z("qListRef");
|
|
38
38
|
function B(e) {
|
|
39
39
|
var o;
|
|
40
40
|
const n = (o = t.items) == null ? void 0 : o.find((r) => r[t.itemValue] === e);
|
|
@@ -63,16 +63,16 @@ const oe = {
|
|
|
63
63
|
t.trigger === "hover" && (s.value = e, g(e));
|
|
64
64
|
}
|
|
65
65
|
function L(e) {
|
|
66
|
-
|
|
66
|
+
f("select", e), v();
|
|
67
67
|
}
|
|
68
68
|
function N() {
|
|
69
69
|
h();
|
|
70
70
|
}
|
|
71
71
|
function h() {
|
|
72
|
-
i.value = void 0, s.value = void 0, m.value = !1,
|
|
72
|
+
i.value = void 0, s.value = void 0, m.value = !1, f("focus-previous");
|
|
73
73
|
}
|
|
74
74
|
function v() {
|
|
75
|
-
h(),
|
|
75
|
+
h(), f("hide");
|
|
76
76
|
}
|
|
77
77
|
function g(e) {
|
|
78
78
|
i.value = e;
|
|
@@ -87,14 +87,17 @@ const oe = {
|
|
|
87
87
|
i.value = void 0, s.value = void 0, n == null || n.focus();
|
|
88
88
|
}
|
|
89
89
|
function T() {
|
|
90
|
-
|
|
90
|
+
Z(() => {
|
|
91
91
|
var e;
|
|
92
92
|
return (e = p.value) == null ? void 0 : e.$el.focus();
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
+
function F() {
|
|
96
|
+
f("open"), T();
|
|
97
|
+
}
|
|
95
98
|
return (e, n) => {
|
|
96
|
-
const a =
|
|
97
|
-
return
|
|
99
|
+
const a = H("q-dropdown-menu-content", !0);
|
|
100
|
+
return c(), x(y(ee), {
|
|
98
101
|
id: t.id,
|
|
99
102
|
modelValue: m.value,
|
|
100
103
|
"onUpdate:modelValue": n[0] || (n[0] = (o) => m.value = o),
|
|
@@ -106,24 +109,24 @@ const oe = {
|
|
|
106
109
|
"cross-offset": S.value,
|
|
107
110
|
placement: t.placement,
|
|
108
111
|
transition: t.transition,
|
|
109
|
-
class:
|
|
112
|
+
class: j(t.class),
|
|
110
113
|
"scroll-lock": "",
|
|
111
114
|
"non-modal": "",
|
|
112
|
-
onEnter:
|
|
115
|
+
onEnter: F,
|
|
113
116
|
onLeave: N
|
|
114
117
|
}, {
|
|
115
|
-
default:
|
|
116
|
-
|
|
118
|
+
default: u(() => [
|
|
119
|
+
G(
|
|
117
120
|
"div",
|
|
118
121
|
{
|
|
119
122
|
class: "q-dropdown-menu__body",
|
|
120
123
|
"data-testid": "dropdown-content",
|
|
121
124
|
tabindex: "-1",
|
|
122
|
-
onKeydown:
|
|
125
|
+
onKeydown: J(D, ["stop"])
|
|
123
126
|
},
|
|
124
127
|
[
|
|
125
128
|
l(e.$slots, "prepend"),
|
|
126
|
-
E(y(
|
|
129
|
+
E(y(K), {
|
|
127
130
|
ref: "qListRef",
|
|
128
131
|
class: "q-dropdown-menu__items",
|
|
129
132
|
highlighted: s.value,
|
|
@@ -132,38 +135,39 @@ const oe = {
|
|
|
132
135
|
"item-label": t.itemLabel,
|
|
133
136
|
"item-value": t.itemValue,
|
|
134
137
|
selectable: !1,
|
|
138
|
+
"select-on-tab": !1,
|
|
135
139
|
onClick: B,
|
|
136
140
|
"onMouseenter:item": O
|
|
137
141
|
}, {
|
|
138
|
-
item:
|
|
142
|
+
item: u(({ item: o }) => [
|
|
139
143
|
l(e.$slots, "item", { item: o })
|
|
140
144
|
]),
|
|
141
|
-
"item.append":
|
|
145
|
+
"item.append": u(({ item: o, element: r }) => {
|
|
142
146
|
var C;
|
|
143
147
|
return [
|
|
144
148
|
l(e.$slots, "item.append", { item: o }, () => [
|
|
145
|
-
o.extraInfo ? (
|
|
149
|
+
o.extraInfo ? (c(), R(
|
|
146
150
|
"span",
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
ne,
|
|
152
|
+
W(o.extraInfo),
|
|
149
153
|
1
|
|
150
154
|
/* TEXT */
|
|
151
155
|
)) : k("v-if", !0)
|
|
152
156
|
]),
|
|
153
|
-
((C = o.items) == null ? void 0 : C.length) > 0 ? (
|
|
154
|
-
|
|
157
|
+
((C = o.items) == null ? void 0 : C.length) > 0 ? (c(), R(
|
|
158
|
+
X,
|
|
155
159
|
{ key: 0 },
|
|
156
160
|
[
|
|
157
161
|
E(
|
|
158
|
-
y(
|
|
162
|
+
y(te),
|
|
159
163
|
b(V(t.icons.expand)),
|
|
160
164
|
null,
|
|
161
165
|
16
|
|
162
166
|
/* FULL_PROPS */
|
|
163
167
|
),
|
|
164
|
-
i.value === o.key ? (
|
|
168
|
+
i.value === o.key ? (c(), x(a, Y({
|
|
165
169
|
key: 0,
|
|
166
|
-
"model-value":
|
|
170
|
+
"model-value": d.modelValue
|
|
167
171
|
}, t, {
|
|
168
172
|
activator: r,
|
|
169
173
|
items: o.items,
|
|
@@ -177,10 +181,10 @@ const oe = {
|
|
|
177
181
|
onSelect: L,
|
|
178
182
|
onFocusPrevious: Q
|
|
179
183
|
}), {
|
|
180
|
-
item:
|
|
184
|
+
item: u((w) => [
|
|
181
185
|
l(e.$slots, "item", b(V(w)))
|
|
182
186
|
]),
|
|
183
|
-
"item.append":
|
|
187
|
+
"item.append": u((w) => [
|
|
184
188
|
l(e.$slots, "item.append", b(V(w)))
|
|
185
189
|
]),
|
|
186
190
|
_: 2
|
|
@@ -208,5 +212,5 @@ const oe = {
|
|
|
208
212
|
}
|
|
209
213
|
});
|
|
210
214
|
export {
|
|
211
|
-
|
|
215
|
+
ue as default
|
|
212
216
|
};
|
|
@@ -7,12 +7,12 @@ declare const QDropdownMenu: {
|
|
|
7
7
|
itemLabel?: string;
|
|
8
8
|
items?: import('..').Item[];
|
|
9
9
|
groups?: import('..').Group[];
|
|
10
|
-
appearance?: import('
|
|
11
|
-
placement?: import('
|
|
10
|
+
appearance?: import('..').QOverlayAppearance;
|
|
11
|
+
placement?: import('..').QOverlayPlacement;
|
|
12
12
|
transition?: string;
|
|
13
13
|
inline?: boolean;
|
|
14
14
|
delay?: number;
|
|
15
|
-
trigger?: import('
|
|
15
|
+
trigger?: import('..').QOverlayTrigger;
|
|
16
16
|
depth?: number;
|
|
17
17
|
icons?: typeof import('./constants').DEFAULT_ICONS;
|
|
18
18
|
}> & Readonly<{
|
|
@@ -37,12 +37,12 @@ declare const QDropdownMenu: {
|
|
|
37
37
|
itemLabel?: string;
|
|
38
38
|
items?: import('..').Item[];
|
|
39
39
|
groups?: import('..').Group[];
|
|
40
|
-
appearance?: import('
|
|
41
|
-
placement?: import('
|
|
40
|
+
appearance?: import('..').QOverlayAppearance;
|
|
41
|
+
placement?: import('..').QOverlayPlacement;
|
|
42
42
|
transition?: string;
|
|
43
43
|
inline?: boolean;
|
|
44
44
|
delay?: number;
|
|
45
|
-
trigger?: import('
|
|
45
|
+
trigger?: import('..').QOverlayTrigger;
|
|
46
46
|
depth?: number;
|
|
47
47
|
icons?: typeof import('./constants').DEFAULT_ICONS;
|
|
48
48
|
}> & Readonly<{
|
|
@@ -60,12 +60,12 @@ declare const QDropdownMenu: {
|
|
|
60
60
|
itemLabel?: string;
|
|
61
61
|
items?: import('..').Item[];
|
|
62
62
|
groups?: import('..').Group[];
|
|
63
|
-
appearance?: import('
|
|
64
|
-
placement?: import('
|
|
63
|
+
appearance?: import('..').QOverlayAppearance;
|
|
64
|
+
placement?: import('..').QOverlayPlacement;
|
|
65
65
|
transition?: string;
|
|
66
66
|
inline?: boolean;
|
|
67
67
|
delay?: number;
|
|
68
|
-
trigger?: import('
|
|
68
|
+
trigger?: import('..').QOverlayTrigger;
|
|
69
69
|
depth?: number;
|
|
70
70
|
icons?: typeof import('./constants').DEFAULT_ICONS;
|
|
71
71
|
}> & Readonly<{
|
|
@@ -57,6 +57,7 @@ declare function __VLS_template(): {
|
|
|
57
57
|
readonly icon?: import('..').Icon | undefined;
|
|
58
58
|
readonly description?: string | undefined;
|
|
59
59
|
readonly selectable?: boolean | undefined;
|
|
60
|
+
readonly selectOnTab?: boolean | undefined;
|
|
60
61
|
readonly highlighted?: boolean | undefined;
|
|
61
62
|
readonly disabled?: boolean | undefined;
|
|
62
63
|
readonly icons?: typeof import('./constants').DEFAULT_ICONS | undefined;
|
|
@@ -88,6 +89,7 @@ declare function __VLS_template(): {
|
|
|
88
89
|
click: () => any;
|
|
89
90
|
}, string, {
|
|
90
91
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
92
|
+
selectOnTab: boolean;
|
|
91
93
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
92
94
|
beforeCreate?: (() => void) | (() => void)[];
|
|
93
95
|
created?: (() => void) | (() => void)[];
|
|
@@ -110,12 +112,13 @@ declare function __VLS_template(): {
|
|
|
110
112
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
111
113
|
} & Readonly<{
|
|
112
114
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
115
|
+
selectOnTab: boolean;
|
|
113
116
|
}> & Omit<Readonly<{
|
|
114
117
|
modelValue?: boolean;
|
|
115
118
|
} & import('./types').QListItemProps> & Readonly<{
|
|
116
119
|
onClick?: (() => any) | undefined;
|
|
117
120
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
118
|
-
}>, "icons"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
121
|
+
}>, "icons" | "selectOnTab"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
119
122
|
$slots: {
|
|
120
123
|
prepend?(_: {}): any;
|
|
121
124
|
default?(_: {}): any;
|
|
@@ -141,6 +144,7 @@ declare const __VLS_component: import('vue').DefineComponent<QListProps, {
|
|
|
141
144
|
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
|
142
145
|
"onMouseenter:item"?: ((key: any) => any) | undefined;
|
|
143
146
|
}>, {
|
|
147
|
+
selectOnTab: boolean;
|
|
144
148
|
groups: Group[];
|
|
145
149
|
itemValue: string;
|
|
146
150
|
itemLabel: string;
|
|
@@ -156,6 +160,7 @@ declare const __VLS_component: import('vue').DefineComponent<QListProps, {
|
|
|
156
160
|
readonly icon?: import('..').Icon | undefined;
|
|
157
161
|
readonly description?: string | undefined;
|
|
158
162
|
readonly selectable?: boolean | undefined;
|
|
163
|
+
readonly selectOnTab?: boolean | undefined;
|
|
159
164
|
readonly highlighted?: boolean | undefined;
|
|
160
165
|
readonly disabled?: boolean | undefined;
|
|
161
166
|
readonly icons?: typeof import('./constants').DEFAULT_ICONS | undefined;
|
|
@@ -187,6 +192,7 @@ declare const __VLS_component: import('vue').DefineComponent<QListProps, {
|
|
|
187
192
|
click: () => any;
|
|
188
193
|
}, string, {
|
|
189
194
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
195
|
+
selectOnTab: boolean;
|
|
190
196
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
191
197
|
beforeCreate?: (() => void) | (() => void)[];
|
|
192
198
|
created?: (() => void) | (() => void)[];
|
|
@@ -209,12 +215,13 @@ declare const __VLS_component: import('vue').DefineComponent<QListProps, {
|
|
|
209
215
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
210
216
|
} & Readonly<{
|
|
211
217
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
218
|
+
selectOnTab: boolean;
|
|
212
219
|
}> & Omit<Readonly<{
|
|
213
220
|
modelValue?: boolean;
|
|
214
221
|
} & import('./types').QListItemProps> & Readonly<{
|
|
215
222
|
onClick?: (() => any) | undefined;
|
|
216
223
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
217
|
-
}>, "icons"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
224
|
+
}>, "icons" | "selectOnTab"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
218
225
|
$slots: {
|
|
219
226
|
prepend?(_: {}): any;
|
|
220
227
|
default?(_: {}): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QList.vue"],"names":[],"mappings":"AA+CA;AAqcC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AA+OhD,iBAAS,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAIrD;AAED;;;;GAIG;AACH,iBAAS,kBAAkB,IAAI,MAAM,CAIpC;AAED;;;;;;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;AA0DF,iBAAS,cAAc;WA4IT,OAAO,IAA6B;;yBAdpB,GAAG;;;;YACN,GAAG;;;;YACM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA9F2B,GAAG,8CAChC,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;EA8GzG;AAuBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAvI6C,GAAG,8CAChC,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;OAiJxG,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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as N, ref as b, computed as
|
|
1
|
+
import { defineComponent as N, ref as b, computed as D, toRef as V, watch as X, createBlock as A, openBlock as m, resolveDynamicComponent as Y, normalizeClass as Z, withCtx as v, renderSlot as L, createElementBlock as M, Fragment as q, renderList as E, unref as $ } from "vue";
|
|
2
2
|
import { QListItemGroup as ee, QListItem as te } from "./index.js";
|
|
3
3
|
import { useGroup as ne } from "../../composables/useGroup/index.js";
|
|
4
4
|
const oe = /* @__PURE__ */ N({
|
|
@@ -11,6 +11,7 @@ const oe = /* @__PURE__ */ N({
|
|
|
11
11
|
items: {},
|
|
12
12
|
groups: { default: () => [] },
|
|
13
13
|
selectable: { type: Boolean },
|
|
14
|
+
selectOnTab: { type: Boolean, default: !0 },
|
|
14
15
|
multiple: { type: Boolean },
|
|
15
16
|
disabled: { type: Boolean },
|
|
16
17
|
required: { type: Boolean },
|
|
@@ -18,8 +19,8 @@ const oe = /* @__PURE__ */ N({
|
|
|
18
19
|
itemLabel: { default: "label" }
|
|
19
20
|
},
|
|
20
21
|
emits: ["update:modelValue", "click", "mouseenter:item"],
|
|
21
|
-
setup(
|
|
22
|
-
const n =
|
|
22
|
+
setup(O, { expose: R, emit: G }) {
|
|
23
|
+
const n = O, g = G, h = b(!1), Q = D(() => u.value.length > 1 ? "div" : "ul"), u = D(() => n.groups.length ? n.groups.filter(
|
|
23
24
|
(e) => {
|
|
24
25
|
var t;
|
|
25
26
|
return (t = n.items) == null ? void 0 : t.some((l) => l.group === e.id);
|
|
@@ -47,8 +48,8 @@ const oe = /* @__PURE__ */ N({
|
|
|
47
48
|
return;
|
|
48
49
|
let t = -1;
|
|
49
50
|
n.multiple ? ((s = r.value) == null ? void 0 : s.length) > 0 && (t = n.items.findIndex(
|
|
50
|
-
(
|
|
51
|
-
)) : r.value && (t = n.items.findIndex((
|
|
51
|
+
(a) => r.value.includes(a[n.itemValue])
|
|
52
|
+
)) : r.value && (t = n.items.findIndex((a) => a[n.itemValue] === r.value)), t === -1 && (t = y());
|
|
52
53
|
const l = h.value;
|
|
53
54
|
c(t, l);
|
|
54
55
|
}
|
|
@@ -94,7 +95,7 @@ const oe = /* @__PURE__ */ N({
|
|
|
94
95
|
c(y());
|
|
95
96
|
break;
|
|
96
97
|
case "last":
|
|
97
|
-
c(
|
|
98
|
+
c(B());
|
|
98
99
|
break;
|
|
99
100
|
}
|
|
100
101
|
}
|
|
@@ -117,24 +118,24 @@ const oe = /* @__PURE__ */ N({
|
|
|
117
118
|
const e = o(), t = e.find((l) => x(l));
|
|
118
119
|
return t ? e.indexOf(t) : -1;
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
+
function B() {
|
|
121
122
|
const e = o(), t = [...e].reverse().find((l) => x(l));
|
|
122
123
|
return t ? e.indexOf(t) : -1;
|
|
123
124
|
}
|
|
124
|
-
function
|
|
125
|
+
function F(e, t, l) {
|
|
125
126
|
return t === "prev" && e <= 0 || t === "next" && e === l.length - 1;
|
|
126
127
|
}
|
|
127
128
|
function W(e) {
|
|
128
129
|
const t = _();
|
|
129
|
-
return
|
|
130
|
+
return T(t, e);
|
|
130
131
|
}
|
|
131
|
-
function
|
|
132
|
+
function T(e, t) {
|
|
132
133
|
const l = o();
|
|
133
|
-
if (
|
|
134
|
+
if (F(e, t, l))
|
|
134
135
|
return e;
|
|
135
136
|
let i = e + (t === "next" ? 1 : -1);
|
|
136
137
|
for (; !x(l[i]); ) {
|
|
137
|
-
if (
|
|
138
|
+
if (F(i, t, l))
|
|
138
139
|
return e;
|
|
139
140
|
i += t === "next" ? 1 : -1;
|
|
140
141
|
}
|
|
@@ -149,12 +150,12 @@ const oe = /* @__PURE__ */ N({
|
|
|
149
150
|
}
|
|
150
151
|
return X(r, (e) => {
|
|
151
152
|
g("update:modelValue", e);
|
|
152
|
-
}),
|
|
153
|
+
}), R({
|
|
153
154
|
getItem: P,
|
|
154
155
|
getActiveItemIndex: _,
|
|
155
|
-
getAdjacentItemIndex:
|
|
156
|
+
getAdjacentItemIndex: T,
|
|
156
157
|
getFirstFocusableItemIndex: y,
|
|
157
|
-
getLastFocusableItemIndex:
|
|
158
|
+
getLastFocusableItemIndex: B
|
|
158
159
|
}), (e, t) => (m(), A(Y(Q.value), {
|
|
159
160
|
id: n.id,
|
|
160
161
|
ref_key: "listRef",
|
|
@@ -169,19 +170,19 @@ const oe = /* @__PURE__ */ N({
|
|
|
169
170
|
}, {
|
|
170
171
|
default: v(() => [
|
|
171
172
|
L(e.$slots, "default", {}, () => [
|
|
172
|
-
(m(!0),
|
|
173
|
-
|
|
173
|
+
(m(!0), M(
|
|
174
|
+
q,
|
|
174
175
|
null,
|
|
175
|
-
|
|
176
|
+
E(u.value, (l, i) => (m(), A($(ee), {
|
|
176
177
|
id: l.id,
|
|
177
178
|
key: l.id,
|
|
178
|
-
title:
|
|
179
|
+
title: u.value.length === 1 ? void 0 : l.title
|
|
179
180
|
}, {
|
|
180
181
|
default: v(() => [
|
|
181
|
-
(m(!0),
|
|
182
|
-
|
|
182
|
+
(m(!0), M(
|
|
183
|
+
q,
|
|
183
184
|
null,
|
|
184
|
-
|
|
185
|
+
E(J(l.id), (s, a) => (m(), A($(te), {
|
|
185
186
|
key: s[n.itemValue],
|
|
186
187
|
ref_for: !0,
|
|
187
188
|
ref_key: "listItemsRef",
|
|
@@ -193,6 +194,7 @@ const oe = /* @__PURE__ */ N({
|
|
|
193
194
|
disabled: n.disabled || l.disabled || s.disabled,
|
|
194
195
|
highlighted: n.highlighted === s[n.itemValue],
|
|
195
196
|
selectable: n.selectable || n.multiple || s.selectable,
|
|
197
|
+
"select-on-tab": n.selectOnTab,
|
|
196
198
|
onClick: () => S(s[n.itemValue]),
|
|
197
199
|
onMouseenter: () => U(s[n.itemValue])
|
|
198
200
|
}, {
|
|
@@ -201,7 +203,7 @@ const oe = /* @__PURE__ */ N({
|
|
|
201
203
|
return [
|
|
202
204
|
L(e.$slots, "item.append", {
|
|
203
205
|
item: s,
|
|
204
|
-
element: (f = (d = k.value) == null ? void 0 : d[
|
|
206
|
+
element: (f = (d = k.value) == null ? void 0 : d[a + i * u.value.length]) == null ? void 0 : f.$el
|
|
205
207
|
})
|
|
206
208
|
];
|
|
207
209
|
}),
|
|
@@ -210,13 +212,13 @@ const oe = /* @__PURE__ */ N({
|
|
|
210
212
|
return [
|
|
211
213
|
L(e.$slots, "item", {
|
|
212
214
|
item: s,
|
|
213
|
-
element: (f = (d = k.value) == null ? void 0 : d[
|
|
215
|
+
element: (f = (d = k.value) == null ? void 0 : d[a + i * u.value.length]) == null ? void 0 : f.$el
|
|
214
216
|
})
|
|
215
217
|
];
|
|
216
218
|
}),
|
|
217
219
|
_: 2
|
|
218
220
|
/* DYNAMIC */
|
|
219
|
-
}, 1032, ["value", "label", "description", "icon", "disabled", "highlighted", "selectable", "onClick", "onMouseenter"]))),
|
|
221
|
+
}, 1032, ["value", "label", "description", "icon", "disabled", "highlighted", "selectable", "select-on-tab", "onClick", "onMouseenter"]))),
|
|
220
222
|
128
|
|
221
223
|
/* KEYED_FRAGMENT */
|
|
222
224
|
))
|
|
@@ -24,6 +24,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
24
24
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
icons: typeof DEFAULT_ICONS;
|
|
27
|
+
selectOnTab: boolean;
|
|
27
28
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
|
|
28
29
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
30
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QListItem.vue"],"names":[],"mappings":"AAiDA;
|
|
1
|
+
{"version":3,"file":"QListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QListItem.vue"],"names":[],"mappings":"AAiDA;AA2HC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAM3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAO7C,KAAK,WAAW,GAAG,cAAc,CAAC;AAgEnC,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,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as q, mergeModels as p, useModel as
|
|
2
|
-
import { DEFAULT_ICONS as
|
|
1
|
+
import { defineComponent as q, mergeModels as p, useModel as B, watch as w, createElementBlock as c, openBlock as o, withModifiers as V, normalizeClass as C, unref as s, renderSlot as d, createElementVNode as r, createCommentVNode as n, createBlock as f, createTextVNode as E, normalizeProps as h, mergeProps as _, toDisplayString as b, createVNode as I, guardReactiveProps as N } from "vue";
|
|
2
|
+
import { DEFAULT_ICONS as T } from "./constants.js";
|
|
3
3
|
import { QIcon as m } from "../QIcon/index.js";
|
|
4
|
-
import { useId as
|
|
5
|
-
import { useGroupItem as
|
|
6
|
-
const
|
|
4
|
+
import { useId as D } from "../../composables/uid.js";
|
|
5
|
+
import { useGroupItem as L } from "../../composables/useGroup/index.js";
|
|
6
|
+
const M = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], P = { class: "q-list-item__container" }, Q = { class: "q-list-item__content" }, x = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "q-list-item__description"
|
|
9
|
-
},
|
|
9
|
+
}, O = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "q-list-item__check-container"
|
|
12
|
-
},
|
|
12
|
+
}, G = /* @__PURE__ */ q({
|
|
13
13
|
__name: "QListItem",
|
|
14
14
|
props: /* @__PURE__ */ p({
|
|
15
15
|
value: {},
|
|
@@ -17,16 +17,17 @@ const P = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Q = { c
|
|
|
17
17
|
icon: {},
|
|
18
18
|
description: {},
|
|
19
19
|
selectable: { type: Boolean },
|
|
20
|
+
selectOnTab: { type: Boolean, default: !0 },
|
|
20
21
|
highlighted: { type: Boolean },
|
|
21
22
|
disabled: { type: Boolean },
|
|
22
|
-
icons: { default: () =>
|
|
23
|
+
icons: { default: () => T }
|
|
23
24
|
}, {
|
|
24
25
|
modelValue: { type: Boolean },
|
|
25
26
|
modelModifiers: {}
|
|
26
27
|
}),
|
|
27
28
|
emits: /* @__PURE__ */ p(["click"], ["update:modelValue"]),
|
|
28
|
-
setup(u, { emit:
|
|
29
|
-
const e = u, k =
|
|
29
|
+
setup(u, { emit: v }) {
|
|
30
|
+
const e = u, k = v, l = B(u, "modelValue"), y = D(), i = L(e.value);
|
|
30
31
|
if (!i)
|
|
31
32
|
throw new Error(
|
|
32
33
|
"QListItem: Failed to retrieve group item. Ensure the component is used within a QList context."
|
|
@@ -35,9 +36,9 @@ const P = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Q = { c
|
|
|
35
36
|
e.disabled || (k("click"), e.selectable && (i == null || i.toggle()));
|
|
36
37
|
}
|
|
37
38
|
function g(t) {
|
|
38
|
-
t.key === "Tab" && a(), (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), a());
|
|
39
|
+
t.key === "Tab" && e.selectOnTab && a(), (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), a());
|
|
39
40
|
}
|
|
40
|
-
return
|
|
41
|
+
return w(
|
|
41
42
|
i.isActive,
|
|
42
43
|
(t) => {
|
|
43
44
|
l.value = t;
|
|
@@ -45,7 +46,7 @@ const P = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Q = { c
|
|
|
45
46
|
{
|
|
46
47
|
immediate: !0
|
|
47
48
|
}
|
|
48
|
-
), (t,
|
|
49
|
+
), (t, S) => (o(), c("li", {
|
|
49
50
|
id: s(y),
|
|
50
51
|
"data-key": e.value,
|
|
51
52
|
role: "option",
|
|
@@ -64,10 +65,10 @@ const P = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Q = { c
|
|
|
64
65
|
onKeydown: g,
|
|
65
66
|
onClick: V(a, ["stop", "prevent"])
|
|
66
67
|
}, [
|
|
67
|
-
|
|
68
|
-
r("div",
|
|
69
|
-
r("div",
|
|
70
|
-
|
|
68
|
+
d(t.$slots, "prepend"),
|
|
69
|
+
r("div", P, [
|
|
70
|
+
r("div", Q, [
|
|
71
|
+
d(t.$slots, "default", {}, () => [
|
|
71
72
|
e.icon ? (o(), f(
|
|
72
73
|
s(m),
|
|
73
74
|
h(_({ key: 0 }, e.icon)),
|
|
@@ -76,13 +77,13 @@ const P = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Q = { c
|
|
|
76
77
|
/* FULL_PROPS */
|
|
77
78
|
)) : n("v-if", !0),
|
|
78
79
|
E(
|
|
79
|
-
" " +
|
|
80
|
+
" " + b(e.label),
|
|
80
81
|
1
|
|
81
82
|
/* TEXT */
|
|
82
83
|
)
|
|
83
84
|
])
|
|
84
85
|
]),
|
|
85
|
-
e.description ? (o(),
|
|
86
|
+
e.description ? (o(), c("div", x, [
|
|
86
87
|
I(
|
|
87
88
|
s(m),
|
|
88
89
|
h(N(e.icons.description)),
|
|
@@ -93,14 +94,14 @@ const P = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Q = { c
|
|
|
93
94
|
r(
|
|
94
95
|
"span",
|
|
95
96
|
null,
|
|
96
|
-
|
|
97
|
+
b(e.description),
|
|
97
98
|
1
|
|
98
99
|
/* TEXT */
|
|
99
100
|
)
|
|
100
101
|
])) : n("v-if", !0)
|
|
101
102
|
]),
|
|
102
|
-
|
|
103
|
-
e.selectable ? (o(),
|
|
103
|
+
d(t.$slots, "append"),
|
|
104
|
+
e.selectable ? (o(), c("div", O, [
|
|
104
105
|
l.value ? (o(), f(
|
|
105
106
|
s(m),
|
|
106
107
|
_({ key: 0 }, e.icons.check, { class: "q-list-item__check" }),
|
|
@@ -109,9 +110,9 @@ const P = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Q = { c
|
|
|
109
110
|
/* FULL_PROPS */
|
|
110
111
|
)) : n("v-if", !0)
|
|
111
112
|
])) : n("v-if", !0)
|
|
112
|
-
], 42,
|
|
113
|
+
], 42, M));
|
|
113
114
|
}
|
|
114
115
|
});
|
|
115
116
|
export {
|
|
116
|
-
|
|
117
|
+
G as default
|
|
117
118
|
};
|