@quidgest/ui 0.15.8 → 0.15.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui.esm.js +13 -13
- package/dist/ui.js +6 -6
- package/dist/ui.min.js +7 -7
- package/dist/ui.scss +1 -1
- package/esm/components/QCombobox/QCombobox.d.ts +36 -39
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +71 -71
- package/esm/components/QCombobox/index.d.ts +36 -54
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QCombobox/types.d.ts +4 -9
- package/esm/components/QCombobox/types.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +2 -3
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +37 -38
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +24 -24
- package/esm/components/QDropdownMenu/index.d.ts +2 -2
- package/esm/components/QList/QList.d.ts +7 -8
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +46 -46
- package/esm/components/QList/QListItem.vue.js +19 -19
- package/esm/components/QList/index.d.ts +17 -17
- package/esm/components/QList/types.d.ts +3 -4
- package/esm/components/QList/types.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioGroup.d.ts +3 -4
- package/esm/components/QRadioGroup/QRadioGroup.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioGroup.vue.js +7 -7
- package/esm/components/QRadioGroup/index.d.ts +8 -8
- package/esm/components/QSelect/QSelect.d.ts +36 -39
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +49 -49
- package/esm/components/QSelect/index.d.ts +36 -54
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSelect/types.d.ts +4 -9
- package/esm/components/QSelect/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Primitive } from '../../types/primitive';
|
|
2
1
|
import { Item } from '../QList/types';
|
|
3
2
|
import { QDropdownMenuContentProps, DEFAULT_ICONS } from './types';
|
|
4
3
|
import { nextTick } from 'vue';
|
|
5
4
|
type __VLS_Props = QDropdownMenuContentProps;
|
|
6
5
|
type __VLS_PublicProps = {
|
|
7
6
|
modelValue?: boolean;
|
|
8
|
-
'
|
|
7
|
+
'highlighted'?: any;
|
|
9
8
|
} & __VLS_Props;
|
|
10
9
|
declare function __VLS_template(): {
|
|
11
10
|
attrs: Partial<{}>;
|
|
@@ -22,18 +21,18 @@ declare function __VLS_template(): {
|
|
|
22
21
|
$: import('vue').ComponentInternalInstance;
|
|
23
22
|
$data: {};
|
|
24
23
|
$props: {
|
|
25
|
-
readonly modelValue?:
|
|
24
|
+
readonly modelValue?: any;
|
|
26
25
|
readonly id?: string | undefined;
|
|
27
26
|
readonly class?: string | unknown[] | undefined;
|
|
28
|
-
readonly highlighted?:
|
|
27
|
+
readonly highlighted?: any;
|
|
29
28
|
readonly items?: Item[] | undefined;
|
|
30
29
|
readonly groups?: import('../QList/types').Group[] | undefined;
|
|
31
30
|
readonly itemValue?: string | undefined;
|
|
32
31
|
readonly itemLabel?: string | undefined;
|
|
33
32
|
readonly disabled?: boolean | undefined;
|
|
34
33
|
readonly selectable?: boolean | undefined;
|
|
35
|
-
readonly "onUpdate:modelValue"?: ((value:
|
|
36
|
-
readonly onClick?: ((key:
|
|
34
|
+
readonly "onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
35
|
+
readonly onClick?: ((key: any) => any) | undefined;
|
|
37
36
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
38
37
|
$attrs: {
|
|
39
38
|
[x: string]: unknown;
|
|
@@ -47,7 +46,7 @@ declare function __VLS_template(): {
|
|
|
47
46
|
$data: {};
|
|
48
47
|
$props: {
|
|
49
48
|
readonly modelValue?: boolean | undefined;
|
|
50
|
-
readonly value:
|
|
49
|
+
readonly value: any;
|
|
51
50
|
readonly label: string;
|
|
52
51
|
readonly icon?: import('..').Icon | undefined;
|
|
53
52
|
readonly selectable?: boolean | undefined;
|
|
@@ -124,12 +123,12 @@ declare function __VLS_template(): {
|
|
|
124
123
|
$root: import('vue').ComponentPublicInstance | null;
|
|
125
124
|
$parent: import('vue').ComponentPublicInstance | null;
|
|
126
125
|
$host: Element | null;
|
|
127
|
-
$emit: ((event: "update:modelValue", value:
|
|
126
|
+
$emit: ((event: "update:modelValue", value: any) => void) & ((event: "click", key: any) => void);
|
|
128
127
|
$el: any;
|
|
129
128
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
130
|
-
modelValue?:
|
|
129
|
+
modelValue?: any;
|
|
131
130
|
} & import('../../types/component').QBaseComponentProps & {
|
|
132
|
-
highlighted?:
|
|
131
|
+
highlighted?: any;
|
|
133
132
|
items?: Item[];
|
|
134
133
|
groups?: import('../QList/types').Group[];
|
|
135
134
|
itemValue?: string;
|
|
@@ -137,17 +136,17 @@ declare function __VLS_template(): {
|
|
|
137
136
|
disabled?: boolean;
|
|
138
137
|
selectable?: boolean;
|
|
139
138
|
}> & Readonly<{
|
|
140
|
-
"onUpdate:modelValue"?: ((value:
|
|
141
|
-
onClick?: ((key:
|
|
139
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
140
|
+
onClick?: ((key: any) => any) | undefined;
|
|
142
141
|
}>, {
|
|
143
142
|
getItem: (idx: number) => HTMLElement | undefined;
|
|
144
143
|
getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
|
|
145
144
|
getFirstFocusableItemIndex: () => number;
|
|
146
145
|
getLastFocusableItemIndex: () => number;
|
|
147
146
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
148
|
-
"update:modelValue": (value:
|
|
147
|
+
"update:modelValue": (value: any) => any;
|
|
149
148
|
} & {
|
|
150
|
-
click: (key:
|
|
149
|
+
click: (key: any) => any;
|
|
151
150
|
}, string, {
|
|
152
151
|
groups: import('../QList/types').Group[];
|
|
153
152
|
itemValue: string;
|
|
@@ -177,9 +176,9 @@ declare function __VLS_template(): {
|
|
|
177
176
|
itemValue: string;
|
|
178
177
|
itemLabel: string;
|
|
179
178
|
}> & Omit<Readonly<{
|
|
180
|
-
modelValue?:
|
|
179
|
+
modelValue?: any;
|
|
181
180
|
} & import('../../types/component').QBaseComponentProps & {
|
|
182
|
-
highlighted?:
|
|
181
|
+
highlighted?: any;
|
|
183
182
|
items?: Item[];
|
|
184
183
|
groups?: import('../QList/types').Group[];
|
|
185
184
|
itemValue?: string;
|
|
@@ -187,8 +186,8 @@ declare function __VLS_template(): {
|
|
|
187
186
|
disabled?: boolean;
|
|
188
187
|
selectable?: boolean;
|
|
189
188
|
}> & Readonly<{
|
|
190
|
-
"onUpdate:modelValue"?: ((value:
|
|
191
|
-
onClick?: ((key:
|
|
189
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
190
|
+
onClick?: ((key: any) => any) | undefined;
|
|
192
191
|
}>, "getItem" | "getAdjacentItemIndex" | "getFirstFocusableItemIndex" | "getLastFocusableItemIndex" | ("groups" | "itemValue" | "itemLabel")> & import('vue').ShallowUnwrapRef<{
|
|
193
192
|
getItem: (idx: number) => HTMLElement | undefined;
|
|
194
193
|
getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
|
|
@@ -212,13 +211,13 @@ declare function __VLS_template(): {
|
|
|
212
211
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
213
212
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
214
213
|
"update:modelValue": (value: boolean) => any;
|
|
215
|
-
"update:
|
|
214
|
+
"update:highlighted": (value: any) => any;
|
|
216
215
|
} & {
|
|
217
|
-
select: (item:
|
|
216
|
+
select: (item: any) => any;
|
|
218
217
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
219
|
-
onSelect?: ((item:
|
|
218
|
+
onSelect?: ((item: any) => any) | undefined;
|
|
220
219
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
221
|
-
"onUpdate:
|
|
220
|
+
"onUpdate:highlighted"?: ((value: any) => any) | undefined;
|
|
222
221
|
}>, {
|
|
223
222
|
transition: string;
|
|
224
223
|
icons: typeof DEFAULT_ICONS;
|
|
@@ -237,18 +236,18 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
237
236
|
$: import('vue').ComponentInternalInstance;
|
|
238
237
|
$data: {};
|
|
239
238
|
$props: {
|
|
240
|
-
readonly modelValue?:
|
|
239
|
+
readonly modelValue?: any;
|
|
241
240
|
readonly id?: string | undefined;
|
|
242
241
|
readonly class?: string | unknown[] | undefined;
|
|
243
|
-
readonly highlighted?:
|
|
242
|
+
readonly highlighted?: any;
|
|
244
243
|
readonly items?: Item[] | undefined;
|
|
245
244
|
readonly groups?: import('../QList/types').Group[] | undefined;
|
|
246
245
|
readonly itemValue?: string | undefined;
|
|
247
246
|
readonly itemLabel?: string | undefined;
|
|
248
247
|
readonly disabled?: boolean | undefined;
|
|
249
248
|
readonly selectable?: boolean | undefined;
|
|
250
|
-
readonly "onUpdate:modelValue"?: ((value:
|
|
251
|
-
readonly onClick?: ((key:
|
|
249
|
+
readonly "onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
250
|
+
readonly onClick?: ((key: any) => any) | undefined;
|
|
252
251
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
253
252
|
$attrs: {
|
|
254
253
|
[x: string]: unknown;
|
|
@@ -262,7 +261,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
262
261
|
$data: {};
|
|
263
262
|
$props: {
|
|
264
263
|
readonly modelValue?: boolean | undefined;
|
|
265
|
-
readonly value:
|
|
264
|
+
readonly value: any;
|
|
266
265
|
readonly label: string;
|
|
267
266
|
readonly icon?: import('..').Icon | undefined;
|
|
268
267
|
readonly selectable?: boolean | undefined;
|
|
@@ -339,12 +338,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
339
338
|
$root: import('vue').ComponentPublicInstance | null;
|
|
340
339
|
$parent: import('vue').ComponentPublicInstance | null;
|
|
341
340
|
$host: Element | null;
|
|
342
|
-
$emit: ((event: "update:modelValue", value:
|
|
341
|
+
$emit: ((event: "update:modelValue", value: any) => void) & ((event: "click", key: any) => void);
|
|
343
342
|
$el: any;
|
|
344
343
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
345
|
-
modelValue?:
|
|
344
|
+
modelValue?: any;
|
|
346
345
|
} & import('../../types/component').QBaseComponentProps & {
|
|
347
|
-
highlighted?:
|
|
346
|
+
highlighted?: any;
|
|
348
347
|
items?: Item[];
|
|
349
348
|
groups?: import('../QList/types').Group[];
|
|
350
349
|
itemValue?: string;
|
|
@@ -352,17 +351,17 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
352
351
|
disabled?: boolean;
|
|
353
352
|
selectable?: boolean;
|
|
354
353
|
}> & Readonly<{
|
|
355
|
-
"onUpdate:modelValue"?: ((value:
|
|
356
|
-
onClick?: ((key:
|
|
354
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
355
|
+
onClick?: ((key: any) => any) | undefined;
|
|
357
356
|
}>, {
|
|
358
357
|
getItem: (idx: number) => HTMLElement | undefined;
|
|
359
358
|
getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
|
|
360
359
|
getFirstFocusableItemIndex: () => number;
|
|
361
360
|
getLastFocusableItemIndex: () => number;
|
|
362
361
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
363
|
-
"update:modelValue": (value:
|
|
362
|
+
"update:modelValue": (value: any) => any;
|
|
364
363
|
} & {
|
|
365
|
-
click: (key:
|
|
364
|
+
click: (key: any) => any;
|
|
366
365
|
}, string, {
|
|
367
366
|
groups: import('../QList/types').Group[];
|
|
368
367
|
itemValue: string;
|
|
@@ -392,9 +391,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
392
391
|
itemValue: string;
|
|
393
392
|
itemLabel: string;
|
|
394
393
|
}> & Omit<Readonly<{
|
|
395
|
-
modelValue?:
|
|
394
|
+
modelValue?: any;
|
|
396
395
|
} & import('../../types/component').QBaseComponentProps & {
|
|
397
|
-
highlighted?:
|
|
396
|
+
highlighted?: any;
|
|
398
397
|
items?: Item[];
|
|
399
398
|
groups?: import('../QList/types').Group[];
|
|
400
399
|
itemValue?: string;
|
|
@@ -402,8 +401,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
402
401
|
disabled?: boolean;
|
|
403
402
|
selectable?: boolean;
|
|
404
403
|
}> & Readonly<{
|
|
405
|
-
"onUpdate:modelValue"?: ((value:
|
|
406
|
-
onClick?: ((key:
|
|
404
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
405
|
+
onClick?: ((key: any) => any) | undefined;
|
|
407
406
|
}>, "getItem" | "getAdjacentItemIndex" | "getFirstFocusableItemIndex" | "getLastFocusableItemIndex" | ("groups" | "itemValue" | "itemLabel")> & import('vue').ShallowUnwrapRef<{
|
|
408
407
|
getItem: (idx: number) => HTMLElement | undefined;
|
|
409
408
|
getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QDropdownMenuContent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/QDropdownMenuContent.vue"],"names":[],"mappings":"AAiDA;
|
|
1
|
+
{"version":3,"file":"QDropdownMenuContent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/QDropdownMenuContent.vue"],"names":[],"mappings":"AAiDA;AA2IC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAGxD,OAAO,EAAY,QAAQ,EAAO,MAAM,KAAK,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC,KAAK,WAAW,GAAG,yBAAyB,CAAC;AAwF9C,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,GAAG,CAAC;CACnB,GAAG,WAAW,CAAC;AAMhB,iBAAS,cAAc;WA8HT,OAAO,IAA6B;;;;YAZvB,GAAG;;;YACM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAmEs+Z,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAnDloa;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CA+Bw/Z,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OArBjoa,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 B, mergeModels as
|
|
1
|
+
import { defineComponent as B, mergeModels as c, useModel as m, ref as p, computed as h, createBlock as L, openBlock as g, unref as v, normalizeClass as M, withCtx as i, createElementVNode as O, createVNode as E, renderSlot as y, createElementBlock as I, createCommentVNode as N, toDisplayString as S, nextTick as q } from "vue";
|
|
2
2
|
import { QList as D } from "../QList/index.js";
|
|
3
3
|
import { QOverlay as Q } from "../QOverlay/index.js";
|
|
4
4
|
import { DEFAULT_ICONS as $ } from "./types.js";
|
|
@@ -11,7 +11,7 @@ const R = {
|
|
|
11
11
|
class: "q-dropdown-menu__extra"
|
|
12
12
|
}, j = /* @__PURE__ */ B({
|
|
13
13
|
__name: "QDropdownMenuContent",
|
|
14
|
-
props: /* @__PURE__ */
|
|
14
|
+
props: /* @__PURE__ */ c({
|
|
15
15
|
id: {},
|
|
16
16
|
class: {},
|
|
17
17
|
activator: {},
|
|
@@ -32,19 +32,19 @@ const R = {
|
|
|
32
32
|
}, {
|
|
33
33
|
modelValue: { type: Boolean },
|
|
34
34
|
modelModifiers: {},
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
highlighted: {},
|
|
36
|
+
highlightedModifiers: {}
|
|
37
37
|
}),
|
|
38
|
-
emits: /* @__PURE__ */
|
|
39
|
-
setup(
|
|
40
|
-
const e =
|
|
38
|
+
emits: /* @__PURE__ */ c(["select"], ["update:modelValue", "update:highlighted"]),
|
|
39
|
+
setup(l, { emit: V }) {
|
|
40
|
+
const e = l, _ = V, s = m(l, "modelValue"), n = m(l, "highlighted"), d = p([]), b = h(() => e.depth !== 0 ? e.offset : 4), k = h(() => e.depth !== 0 ? e.crossOffset : void 0), r = p(null);
|
|
41
41
|
function C(o) {
|
|
42
42
|
var u;
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
d.value = (
|
|
43
|
+
_("select", o);
|
|
44
|
+
const a = (u = e.items) == null ? void 0 : u.find((f) => f[e.itemValue] === f);
|
|
45
|
+
d.value = (a == null ? void 0 : a.items) ?? [];
|
|
46
46
|
const t = d.value.length > 0;
|
|
47
|
-
|
|
47
|
+
n.value = t ? o : void 0, t || w();
|
|
48
48
|
}
|
|
49
49
|
function w() {
|
|
50
50
|
s.value = !1;
|
|
@@ -55,48 +55,48 @@ const R = {
|
|
|
55
55
|
return (o = r.value) == null ? void 0 : o.$el.focus();
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
return (o,
|
|
58
|
+
return (o, a) => (g(), L(v(Q), {
|
|
59
59
|
id: e.id,
|
|
60
60
|
modelValue: s.value,
|
|
61
|
-
"onUpdate:modelValue":
|
|
61
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => s.value = t),
|
|
62
62
|
anchor: e.activator,
|
|
63
63
|
appearance: e.appearance,
|
|
64
64
|
inline: e.inline,
|
|
65
65
|
delay: e.delay,
|
|
66
|
-
offset:
|
|
66
|
+
offset: b.value,
|
|
67
67
|
"cross-offset": k.value,
|
|
68
68
|
placement: e.placement,
|
|
69
69
|
transition: e.transition,
|
|
70
|
-
class:
|
|
70
|
+
class: M(e.class),
|
|
71
71
|
trigger: e.trigger,
|
|
72
72
|
"scroll-lock": "",
|
|
73
73
|
onEnter: x
|
|
74
74
|
}, {
|
|
75
|
-
default:
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
default: i(() => [
|
|
76
|
+
O("div", R, [
|
|
77
|
+
E(v(D), {
|
|
78
78
|
ref_key: "listRef",
|
|
79
79
|
ref: r,
|
|
80
80
|
class: "q-dropdown-menu__items",
|
|
81
|
-
highlighted:
|
|
81
|
+
highlighted: n.value,
|
|
82
82
|
items: e.items,
|
|
83
83
|
groups: e.groups,
|
|
84
84
|
"item-label": e.itemLabel,
|
|
85
85
|
"item-value": e.itemValue,
|
|
86
86
|
onClick: C
|
|
87
87
|
}, {
|
|
88
|
-
item:
|
|
88
|
+
item: i(({ item: t }) => [
|
|
89
89
|
y(o.$slots, "item", { item: t })
|
|
90
90
|
]),
|
|
91
|
-
"item.append":
|
|
91
|
+
"item.append": i(({ item: t }) => [
|
|
92
92
|
y(o.$slots, "item.append", { item: t }, () => [
|
|
93
|
-
t.extraInfo ? (
|
|
93
|
+
t.extraInfo ? (g(), I(
|
|
94
94
|
"span",
|
|
95
95
|
T,
|
|
96
|
-
|
|
96
|
+
S(t.extraInfo),
|
|
97
97
|
1
|
|
98
98
|
/* TEXT */
|
|
99
|
-
)) :
|
|
99
|
+
)) : N("v-if", !0)
|
|
100
100
|
])
|
|
101
101
|
]),
|
|
102
102
|
_: 3
|
|
@@ -15,7 +15,7 @@ declare const QDropdownMenu: import('vue').DefineComponent<{
|
|
|
15
15
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
16
|
"update:modelValue": (value: boolean) => any;
|
|
17
17
|
} & {
|
|
18
|
-
select: (item:
|
|
18
|
+
select: (item: any) => any;
|
|
19
19
|
}, string, import('vue').PublicProps, Readonly<{
|
|
20
20
|
modelValue?: boolean;
|
|
21
21
|
} & import('../../types/component').QBaseComponentProps & {
|
|
@@ -31,7 +31,7 @@ declare const QDropdownMenu: import('vue').DefineComponent<{
|
|
|
31
31
|
itemLabel?: string;
|
|
32
32
|
icons?: typeof import('./types').DEFAULT_ICONS;
|
|
33
33
|
}> & Readonly<{
|
|
34
|
-
onSelect?: ((item:
|
|
34
|
+
onSelect?: ((item: any) => any) | undefined;
|
|
35
35
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
36
36
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
37
37
|
export { QDropdownMenu };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Group, QListProps } from './types';
|
|
2
|
-
import { Primitive } from '../../types/primitive';
|
|
3
2
|
type __VLS_Props = QListProps;
|
|
4
3
|
declare function getItem(idx: number): HTMLElement | undefined;
|
|
5
4
|
/**
|
|
@@ -29,7 +28,7 @@ declare function getLastFocusableItemIndex(): number;
|
|
|
29
28
|
*/
|
|
30
29
|
declare function getAdjacentItemIndex(idx: number, direction: 'next' | 'prev'): number;
|
|
31
30
|
type __VLS_PublicProps = {
|
|
32
|
-
modelValue?:
|
|
31
|
+
modelValue?: any;
|
|
33
32
|
} & __VLS_Props;
|
|
34
33
|
declare function __VLS_template(): {
|
|
35
34
|
attrs: Partial<{}>;
|
|
@@ -50,7 +49,7 @@ declare function __VLS_template(): {
|
|
|
50
49
|
$data: {};
|
|
51
50
|
$props: {
|
|
52
51
|
readonly modelValue?: boolean | undefined;
|
|
53
|
-
readonly value:
|
|
52
|
+
readonly value: any;
|
|
54
53
|
readonly label: string;
|
|
55
54
|
readonly icon?: import('..').Icon | undefined;
|
|
56
55
|
readonly selectable?: boolean | undefined;
|
|
@@ -130,12 +129,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
130
129
|
getFirstFocusableItemIndex: typeof getFirstFocusableItemIndex;
|
|
131
130
|
getLastFocusableItemIndex: typeof getLastFocusableItemIndex;
|
|
132
131
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
133
|
-
"update:modelValue": (value:
|
|
132
|
+
"update:modelValue": (value: any) => any;
|
|
134
133
|
} & {
|
|
135
|
-
click: (key:
|
|
134
|
+
click: (key: any) => any;
|
|
136
135
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
137
|
-
"onUpdate:modelValue"?: ((value:
|
|
138
|
-
onClick?: ((key:
|
|
136
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
137
|
+
onClick?: ((key: any) => any) | undefined;
|
|
139
138
|
}>, {
|
|
140
139
|
groups: Group[];
|
|
141
140
|
itemValue: string;
|
|
@@ -147,7 +146,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
147
146
|
$data: {};
|
|
148
147
|
$props: {
|
|
149
148
|
readonly modelValue?: boolean | undefined;
|
|
150
|
-
readonly value:
|
|
149
|
+
readonly value: any;
|
|
151
150
|
readonly label: string;
|
|
152
151
|
readonly icon?: import('..').Icon | undefined;
|
|
153
152
|
readonly selectable?: boolean | undefined;
|
|
@@ -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;AA6aC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAKhD,KAAK,WAAW,GAAG,UAAU,CAAC;AAyN9B,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;AAoDF,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,GAAG,CAAC;CAChB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAwIT,OAAO,IAA6B;;;;;YAbvB,GAAG;;;;YACM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAxEL,GAAG,8CAE3B,GAAG,yBACH,GAAG,6DAEF,GAAG;;;;;;;;;;;;;;;;;EAoFb;AAwBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAlHa,GAAG,8CAE3B,GAAG,yBACH,GAAG,6DAEF,GAAG;;;;;;;;;;;;;;;OAwHZ,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
|
|
1
|
+
import { defineComponent as N, mergeModels as _, useModel as X, ref as p, computed as D, createBlock as x, openBlock as d, resolveDynamicComponent as Y, normalizeClass as Z, withCtx as b, createElementBlock as M, Fragment as T, renderList as B, unref as E, renderSlot as U } from "vue";
|
|
2
2
|
import { QListItemGroup as ee, QListItem as te } from "./index.js";
|
|
3
|
-
const
|
|
3
|
+
const se = /* @__PURE__ */ N({
|
|
4
4
|
__name: "QList",
|
|
5
|
-
props: /* @__PURE__ */
|
|
5
|
+
props: /* @__PURE__ */ _({
|
|
6
6
|
id: {},
|
|
7
7
|
class: {},
|
|
8
|
-
highlighted: {
|
|
8
|
+
highlighted: {},
|
|
9
9
|
items: {},
|
|
10
10
|
groups: { default: () => [] },
|
|
11
11
|
itemValue: { default: "key" },
|
|
@@ -13,19 +13,19 @@ const oe = /* @__PURE__ */ J({
|
|
|
13
13
|
disabled: { type: Boolean },
|
|
14
14
|
selectable: { type: Boolean }
|
|
15
15
|
}, {
|
|
16
|
-
modelValue: {
|
|
16
|
+
modelValue: {},
|
|
17
17
|
modelModifiers: {}
|
|
18
18
|
}),
|
|
19
|
-
emits: /* @__PURE__ */
|
|
20
|
-
setup(
|
|
21
|
-
const n =
|
|
19
|
+
emits: /* @__PURE__ */ _(["click"], ["update:modelValue"]),
|
|
20
|
+
setup(y, { expose: $, emit: R }) {
|
|
21
|
+
const n = y, S = R, f = X(y, "modelValue"), v = p(!1), q = D(() => a.value.length > 1 ? "div" : "ul"), a = D(() => n.groups.length ? n.groups.filter(
|
|
22
22
|
(e) => {
|
|
23
23
|
var t;
|
|
24
24
|
return (t = n.items) == null ? void 0 : t.some((l) => l.group === e.id);
|
|
25
25
|
}
|
|
26
26
|
) : [{ id: "", title: "" }]), g = p(null), h = p(null);
|
|
27
27
|
function O(e) {
|
|
28
|
-
|
|
28
|
+
S("click", e);
|
|
29
29
|
}
|
|
30
30
|
function Q(e) {
|
|
31
31
|
f.value = e;
|
|
@@ -37,8 +37,8 @@ const oe = /* @__PURE__ */ J({
|
|
|
37
37
|
v.value = !1;
|
|
38
38
|
}
|
|
39
39
|
function G(e) {
|
|
40
|
-
var
|
|
41
|
-
if (!n.items || (
|
|
40
|
+
var s;
|
|
41
|
+
if (!n.items || (s = g.value) != null && s.contains(e.relatedTarget))
|
|
42
42
|
return;
|
|
43
43
|
let t;
|
|
44
44
|
f.value ? t = n.items.findIndex((i) => i[n.itemValue] === f.value) : t = k();
|
|
@@ -66,9 +66,9 @@ const oe = /* @__PURE__ */ J({
|
|
|
66
66
|
if (/^[a-z]$/i.test(e.key)) {
|
|
67
67
|
I.value += e.key.toLowerCase();
|
|
68
68
|
const l = ((t = n.items) == null ? void 0 : t.length) || 0;
|
|
69
|
-
for (let
|
|
70
|
-
if (n.items[
|
|
71
|
-
u(
|
|
69
|
+
for (let s = 0; s < l; s++)
|
|
70
|
+
if (n.items[s][n.itemLabel].toLowerCase().startsWith(I.value)) {
|
|
71
|
+
u(s);
|
|
72
72
|
break;
|
|
73
73
|
}
|
|
74
74
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -81,7 +81,7 @@ const oe = /* @__PURE__ */ J({
|
|
|
81
81
|
switch (e) {
|
|
82
82
|
case "next":
|
|
83
83
|
case "prev":
|
|
84
|
-
u(
|
|
84
|
+
u(W(e));
|
|
85
85
|
break;
|
|
86
86
|
case "first":
|
|
87
87
|
u(k());
|
|
@@ -92,60 +92,60 @@ const oe = /* @__PURE__ */ J({
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
function u(e, t = !1) {
|
|
95
|
-
var
|
|
96
|
-
(
|
|
95
|
+
var s;
|
|
96
|
+
(s = o()[e]) == null || s.focus({ preventScroll: t });
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function o() {
|
|
99
99
|
var t;
|
|
100
100
|
const e = (t = g.value) == null ? void 0 : t.querySelectorAll("li");
|
|
101
101
|
return e ? Array.from(e) : [];
|
|
102
102
|
}
|
|
103
103
|
function K(e) {
|
|
104
|
-
return
|
|
104
|
+
return o()[e];
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
return
|
|
106
|
+
function P() {
|
|
107
|
+
return o().indexOf(document.activeElement);
|
|
108
108
|
}
|
|
109
109
|
function k() {
|
|
110
|
-
const e =
|
|
110
|
+
const e = o(), t = e.find((l) => w(l));
|
|
111
111
|
return t ? e.indexOf(t) : -1;
|
|
112
112
|
}
|
|
113
113
|
function A() {
|
|
114
|
-
const e =
|
|
114
|
+
const e = o(), t = [...e].reverse().find((l) => w(l));
|
|
115
115
|
return t ? e.indexOf(t) : -1;
|
|
116
116
|
}
|
|
117
117
|
function L(e, t, l) {
|
|
118
118
|
return t === "prev" && e <= 0 || t === "next" && e === l.length - 1;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
const t =
|
|
120
|
+
function W(e) {
|
|
121
|
+
const t = P();
|
|
122
122
|
return C(t, e);
|
|
123
123
|
}
|
|
124
124
|
function C(e, t) {
|
|
125
|
-
const l =
|
|
125
|
+
const l = o();
|
|
126
126
|
if (L(e, t, l))
|
|
127
127
|
return e;
|
|
128
|
-
let
|
|
129
|
-
for (; !
|
|
130
|
-
if (L(
|
|
128
|
+
let s = e + (t === "next" ? 1 : -1);
|
|
129
|
+
for (; !w(l[s]); ) {
|
|
130
|
+
if (L(s, t, l))
|
|
131
131
|
return e;
|
|
132
|
-
|
|
132
|
+
s += t === "next" ? 1 : -1;
|
|
133
133
|
}
|
|
134
|
-
return
|
|
134
|
+
return s;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function w(e) {
|
|
137
137
|
return e.tabIndex === -2;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function J(e) {
|
|
140
140
|
var t;
|
|
141
141
|
return e ? (t = n.items) == null ? void 0 : t.filter((l) => l.group === e) : n.items;
|
|
142
142
|
}
|
|
143
|
-
return
|
|
143
|
+
return $({
|
|
144
144
|
getItem: K,
|
|
145
145
|
getAdjacentItemIndex: C,
|
|
146
146
|
getFirstFocusableItemIndex: k,
|
|
147
147
|
getLastFocusableItemIndex: A
|
|
148
|
-
}), (e, t) => (d(),
|
|
148
|
+
}), (e, t) => (d(), x(Y(q.value), {
|
|
149
149
|
id: n.id,
|
|
150
150
|
ref_key: "listRef",
|
|
151
151
|
ref: g,
|
|
@@ -158,19 +158,19 @@ const oe = /* @__PURE__ */ J({
|
|
|
158
158
|
onKeydown: H
|
|
159
159
|
}, {
|
|
160
160
|
default: b(() => [
|
|
161
|
-
(d(!0),
|
|
162
|
-
|
|
161
|
+
(d(!0), M(
|
|
162
|
+
T,
|
|
163
163
|
null,
|
|
164
|
-
|
|
164
|
+
B(a.value, (l, s) => (d(), x(E(ee), {
|
|
165
165
|
id: l.id,
|
|
166
166
|
key: l.id,
|
|
167
167
|
title: a.value.length === 1 ? void 0 : l.title
|
|
168
168
|
}, {
|
|
169
169
|
default: b(() => [
|
|
170
|
-
(d(!0),
|
|
171
|
-
|
|
170
|
+
(d(!0), M(
|
|
171
|
+
T,
|
|
172
172
|
null,
|
|
173
|
-
|
|
173
|
+
B(J(l.id), (i, F) => (d(), x(E(te), {
|
|
174
174
|
key: i[n.itemValue],
|
|
175
175
|
ref_for: !0,
|
|
176
176
|
ref_key: "listItemsRef",
|
|
@@ -189,18 +189,18 @@ const oe = /* @__PURE__ */ J({
|
|
|
189
189
|
append: b(() => {
|
|
190
190
|
var r, c;
|
|
191
191
|
return [
|
|
192
|
-
|
|
192
|
+
U(e.$slots, "item.append", {
|
|
193
193
|
item: i,
|
|
194
|
-
element: (c = (r = h.value) == null ? void 0 : r[F +
|
|
194
|
+
element: (c = (r = h.value) == null ? void 0 : r[F + s * a.value.length]) == null ? void 0 : c.$el
|
|
195
195
|
})
|
|
196
196
|
];
|
|
197
197
|
}),
|
|
198
198
|
default: b(() => {
|
|
199
199
|
var r, c;
|
|
200
200
|
return [
|
|
201
|
-
|
|
201
|
+
U(e.$slots, "item", {
|
|
202
202
|
item: i,
|
|
203
|
-
element: (c = (r = h.value) == null ? void 0 : r[F +
|
|
203
|
+
element: (c = (r = h.value) == null ? void 0 : r[F + s * a.value.length]) == null ? void 0 : c.$el
|
|
204
204
|
})
|
|
205
205
|
];
|
|
206
206
|
}),
|
|
@@ -224,5 +224,5 @@ const oe = /* @__PURE__ */ J({
|
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
export {
|
|
227
|
-
|
|
227
|
+
se as default
|
|
228
228
|
};
|