@quidgest/ui 0.16.29 → 0.16.31
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 -2
- package/dist/ui.css +21 -27
- package/dist/ui.esm.js +921 -902
- package/dist/ui.js +7 -7
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +160 -160
- package/dist/ui.scss +39 -37
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts +1 -0
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts.map +1 -1
- package/esm/components/QBadgeIndicator/QBadgeIndicator.vue.js +8 -8
- package/esm/components/QBadgeIndicator/index.d.ts +3 -0
- package/esm/components/QBadgeIndicator/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +31 -30
- package/esm/components/QDivider/QDivider.d.ts.map +1 -1
- package/esm/components/QDivider/QDivider.vue.js +41 -45
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +21 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +24 -15
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +12 -5
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +89 -80
- package/esm/components/QDropdownMenu/index.d.ts +69 -22
- package/esm/components/QDropdownMenu/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
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 F, mergeModels as x, useModel as C, ref as A, computed as M, useTemplateRef as U, resolveComponent as z, createBlock as q, openBlock as d, unref as y, normalizeClass as H, withCtx as r, createElementVNode as j, withModifiers as G, createVNode as E, renderSlot as f, createElementBlock as R, createCommentVNode as k, toDisplayString as J, Fragment as W, normalizeProps as b, guardReactiveProps as V, mergeProps as X, nextTick as Y } from "vue";
|
|
2
|
+
import { QList as Z } from "../QList/index.js";
|
|
3
|
+
import { QOverlay as K } from "../QOverlay/index.js";
|
|
4
|
+
import { QIcon as ee } from "../QIcon/index.js";
|
|
5
|
+
import { DEFAULT_ICONS as te } from "./types.js";
|
|
6
|
+
const oe = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "q-dropdown-menu__extra"
|
|
9
|
-
},
|
|
9
|
+
}, re = /* @__PURE__ */ F({
|
|
10
10
|
__name: "QDropdownMenuContent",
|
|
11
|
-
props: /* @__PURE__ */
|
|
11
|
+
props: /* @__PURE__ */ x({
|
|
12
12
|
id: {},
|
|
13
13
|
class: {},
|
|
14
14
|
activator: {},
|
|
@@ -23,7 +23,7 @@ const te = {
|
|
|
23
23
|
delay: { default: 500 },
|
|
24
24
|
trigger: { default: "hover" },
|
|
25
25
|
depth: { default: 0 },
|
|
26
|
-
icons: { default: () =>
|
|
26
|
+
icons: { default: () => te },
|
|
27
27
|
offset: { default: 0 },
|
|
28
28
|
crossOffset: { default: -5 }
|
|
29
29
|
}, {
|
|
@@ -32,139 +32,139 @@ const te = {
|
|
|
32
32
|
highlighted: {},
|
|
33
33
|
highlightedModifiers: {}
|
|
34
34
|
}),
|
|
35
|
-
emits: /* @__PURE__ */
|
|
36
|
-
setup(
|
|
37
|
-
const e =
|
|
38
|
-
function
|
|
35
|
+
emits: /* @__PURE__ */ x(["select", "hide", "focus-previous"], ["update:modelValue", "update:highlighted"]),
|
|
36
|
+
setup(u, { emit: P }) {
|
|
37
|
+
const e = u, c = P, m = C(u, "modelValue"), i = C(u, "highlighted"), s = A(void 0), _ = A([]), S = M(() => e.depth !== 0 ? e.offset : 4), B = M(() => e.depth !== 0 ? e.crossOffset : void 0), p = U("qListRef");
|
|
38
|
+
function D(t) {
|
|
39
39
|
var o;
|
|
40
|
-
const n = (o = e.items) == null ? void 0 : o.find((
|
|
41
|
-
|
|
42
|
-
const a =
|
|
43
|
-
|
|
40
|
+
const n = (o = e.items) == null ? void 0 : o.find((l) => l[e.itemValue] === t);
|
|
41
|
+
_.value = (n == null ? void 0 : n.items) ?? [];
|
|
42
|
+
const a = _.value.length > 0;
|
|
43
|
+
i.value = t, a ? g(t) : I(t);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function O(t) {
|
|
46
46
|
var n;
|
|
47
47
|
if (t.key)
|
|
48
48
|
switch (["Enter", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"].includes(t.key) && (t.preventDefault(), t.stopPropagation()), t.key) {
|
|
49
49
|
case "ArrowRight":
|
|
50
|
-
const a = (n =
|
|
51
|
-
e.items && (a || a === 0) && e.items[a] && (
|
|
50
|
+
const a = (n = p.value) == null ? void 0 : n.getActiveItemIndex();
|
|
51
|
+
e.items && (a || a === 0) && e.items[a] && (i.value = e.items[a].key, g(e.items[a].key));
|
|
52
52
|
break;
|
|
53
53
|
case "ArrowLeft":
|
|
54
|
-
|
|
54
|
+
h();
|
|
55
55
|
break;
|
|
56
56
|
case "Escape":
|
|
57
57
|
case "Tab":
|
|
58
|
-
|
|
58
|
+
v();
|
|
59
59
|
break;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
e.trigger === "hover" && (
|
|
62
|
+
function $(t) {
|
|
63
|
+
e.trigger === "hover" && (i.value = t, g(t));
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
65
|
+
function I(t) {
|
|
66
|
+
c("select", t), v();
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
68
|
+
function N() {
|
|
69
|
+
h();
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
|
|
71
|
+
function h() {
|
|
72
|
+
s.value = void 0, i.value = void 0, m.value = !1, c("focus-previous");
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
74
|
+
function v() {
|
|
75
|
+
h(), c("hide");
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
77
|
+
function g(t) {
|
|
78
|
+
s.value = t;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Q() {
|
|
81
81
|
var a, o;
|
|
82
82
|
const t = (a = e.items) == null ? void 0 : a.findIndex(
|
|
83
|
-
(
|
|
83
|
+
(l) => l[e.itemValue] === s.value
|
|
84
84
|
);
|
|
85
85
|
if (!t && t !== 0) return;
|
|
86
|
-
const n = (o =
|
|
87
|
-
|
|
86
|
+
const n = (o = p.value) == null ? void 0 : o.getItem(t);
|
|
87
|
+
s.value = void 0, i.value = void 0, n == null || n.focus();
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
89
|
+
function T() {
|
|
90
|
+
Y(() => {
|
|
91
91
|
var t;
|
|
92
|
-
return (t =
|
|
92
|
+
return (t = p.value) == null ? void 0 : t.$el.focus();
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
return (t, n) => {
|
|
96
|
-
const a =
|
|
97
|
-
return
|
|
96
|
+
const a = z("q-dropdown-menu-content", !0);
|
|
97
|
+
return d(), q(y(K), {
|
|
98
98
|
id: e.id,
|
|
99
|
-
modelValue:
|
|
100
|
-
"onUpdate:modelValue": n[0] || (n[0] = (o) =>
|
|
99
|
+
modelValue: m.value,
|
|
100
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => m.value = o),
|
|
101
101
|
anchor: e.activator,
|
|
102
102
|
appearance: e.appearance,
|
|
103
103
|
inline: e.inline,
|
|
104
104
|
delay: e.delay,
|
|
105
|
-
offset:
|
|
106
|
-
"cross-offset":
|
|
105
|
+
offset: S.value,
|
|
106
|
+
"cross-offset": B.value,
|
|
107
107
|
placement: e.placement,
|
|
108
108
|
transition: e.transition,
|
|
109
|
-
class:
|
|
109
|
+
class: H(e.class),
|
|
110
110
|
"scroll-lock": "",
|
|
111
111
|
"non-modal": "",
|
|
112
|
-
onEnter:
|
|
113
|
-
onLeave:
|
|
112
|
+
onEnter: T,
|
|
113
|
+
onLeave: N
|
|
114
114
|
}, {
|
|
115
|
-
default:
|
|
116
|
-
|
|
115
|
+
default: r(() => [
|
|
116
|
+
j(
|
|
117
117
|
"div",
|
|
118
118
|
{
|
|
119
119
|
class: "q-dropdown-menu__body",
|
|
120
120
|
"data-testid": "dropdown-content",
|
|
121
121
|
tabindex: "-1",
|
|
122
|
-
onKeydown:
|
|
122
|
+
onKeydown: G(O, ["stop"])
|
|
123
123
|
},
|
|
124
124
|
[
|
|
125
|
-
|
|
125
|
+
E(y(Z), {
|
|
126
126
|
ref: "qListRef",
|
|
127
127
|
class: "q-dropdown-menu__items",
|
|
128
|
-
highlighted:
|
|
128
|
+
highlighted: i.value,
|
|
129
129
|
items: e.items,
|
|
130
130
|
groups: e.groups,
|
|
131
131
|
"item-label": e.itemLabel,
|
|
132
132
|
"item-value": e.itemValue,
|
|
133
133
|
selectable: !1,
|
|
134
|
-
onClick:
|
|
135
|
-
"onMouseenter:item":
|
|
134
|
+
onClick: D,
|
|
135
|
+
"onMouseenter:item": $
|
|
136
136
|
}, {
|
|
137
|
-
item:
|
|
138
|
-
|
|
137
|
+
item: r(({ item: o }) => [
|
|
138
|
+
f(t.$slots, "item", { item: o })
|
|
139
139
|
]),
|
|
140
|
-
"item.append":
|
|
141
|
-
var
|
|
140
|
+
"item.append": r(({ item: o, element: l }) => {
|
|
141
|
+
var L;
|
|
142
142
|
return [
|
|
143
|
-
|
|
144
|
-
o.extraInfo ? (
|
|
143
|
+
f(t.$slots, "item.append", { item: o }, () => [
|
|
144
|
+
o.extraInfo ? (d(), R(
|
|
145
145
|
"span",
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
oe,
|
|
147
|
+
J(o.extraInfo),
|
|
148
148
|
1
|
|
149
149
|
/* TEXT */
|
|
150
|
-
)) :
|
|
150
|
+
)) : k("v-if", !0)
|
|
151
151
|
]),
|
|
152
|
-
((
|
|
153
|
-
|
|
152
|
+
((L = o.items) == null ? void 0 : L.length) > 0 ? (d(), R(
|
|
153
|
+
W,
|
|
154
154
|
{ key: 0 },
|
|
155
155
|
[
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
E(
|
|
157
|
+
y(ee),
|
|
158
|
+
b(V(e.icons.expand)),
|
|
159
159
|
null,
|
|
160
160
|
16
|
|
161
161
|
/* FULL_PROPS */
|
|
162
162
|
),
|
|
163
|
-
|
|
163
|
+
s.value === o.key ? (d(), q(a, X({
|
|
164
164
|
key: 0,
|
|
165
|
-
"model-value":
|
|
165
|
+
"model-value": u.modelValue
|
|
166
166
|
}, e, {
|
|
167
|
-
activator:
|
|
167
|
+
activator: l,
|
|
168
168
|
items: o.items,
|
|
169
169
|
groups: o.groups,
|
|
170
170
|
depth: e.depth + 1,
|
|
@@ -172,14 +172,23 @@ const te = {
|
|
|
172
172
|
placement: "right-start",
|
|
173
173
|
"non-modal": "",
|
|
174
174
|
inline: "",
|
|
175
|
-
onHide:
|
|
176
|
-
onSelect:
|
|
177
|
-
onFocusPrevious:
|
|
178
|
-
}),
|
|
175
|
+
onHide: v,
|
|
176
|
+
onSelect: I,
|
|
177
|
+
onFocusPrevious: Q
|
|
178
|
+
}), {
|
|
179
|
+
item: r((w) => [
|
|
180
|
+
f(t.$slots, "item", b(V(w)))
|
|
181
|
+
]),
|
|
182
|
+
"item.append": r((w) => [
|
|
183
|
+
f(t.$slots, "item.append", b(V(w)))
|
|
184
|
+
]),
|
|
185
|
+
_: 2
|
|
186
|
+
/* DYNAMIC */
|
|
187
|
+
}, 1040, ["model-value", "activator", "items", "groups", "depth", "delay"])) : k("v-if", !0)
|
|
179
188
|
],
|
|
180
189
|
64
|
|
181
190
|
/* STABLE_FRAGMENT */
|
|
182
|
-
)) :
|
|
191
|
+
)) : k("v-if", !0)
|
|
183
192
|
];
|
|
184
193
|
}),
|
|
185
194
|
_: 3
|
|
@@ -197,5 +206,5 @@ const te = {
|
|
|
197
206
|
}
|
|
198
207
|
});
|
|
199
208
|
export {
|
|
200
|
-
|
|
209
|
+
re as default
|
|
201
210
|
};
|
|
@@ -1,24 +1,58 @@
|
|
|
1
|
-
declare const QDropdownMenu:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
1
|
+
declare const QDropdownMenu: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3
|
+
modelValue?: boolean;
|
|
4
|
+
} & import('../../types/component').QBaseComponentProps & {
|
|
5
|
+
activator?: import('../../utils/getElement').Selector;
|
|
6
|
+
itemValue?: string;
|
|
7
|
+
itemLabel?: string;
|
|
8
|
+
items?: import('../QList/types').Item[];
|
|
9
|
+
groups?: import('../QList/types').Group[];
|
|
10
|
+
appearance?: import('../../composables/overlay').Appearance;
|
|
11
|
+
placement?: import('../../composables/overlay').Placement;
|
|
12
|
+
transition?: string;
|
|
13
|
+
inline?: boolean;
|
|
14
|
+
delay?: number;
|
|
15
|
+
trigger?: import('../../composables/overlay').Trigger;
|
|
16
|
+
depth?: number;
|
|
17
|
+
icons?: typeof import('./types').DEFAULT_ICONS;
|
|
18
|
+
}> & Readonly<{
|
|
19
|
+
onSelect?: ((item: any) => any) | undefined;
|
|
20
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
"update:modelValue": (value: boolean) => any;
|
|
23
|
+
} & {
|
|
24
|
+
select: (item: any) => any;
|
|
25
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
26
|
+
P: {};
|
|
27
|
+
B: {};
|
|
28
|
+
D: {};
|
|
29
|
+
C: {};
|
|
30
|
+
M: {};
|
|
31
|
+
Defaults: {};
|
|
32
|
+
}, Readonly<{
|
|
33
|
+
modelValue?: boolean;
|
|
34
|
+
} & import('../../types/component').QBaseComponentProps & {
|
|
35
|
+
activator?: import('../../utils/getElement').Selector;
|
|
36
|
+
itemValue?: string;
|
|
37
|
+
itemLabel?: string;
|
|
38
|
+
items?: import('../QList/types').Item[];
|
|
39
|
+
groups?: import('../QList/types').Group[];
|
|
40
|
+
appearance?: import('../../composables/overlay').Appearance;
|
|
41
|
+
placement?: import('../../composables/overlay').Placement;
|
|
42
|
+
transition?: string;
|
|
43
|
+
inline?: boolean;
|
|
44
|
+
delay?: number;
|
|
45
|
+
trigger?: import('../../composables/overlay').Trigger;
|
|
46
|
+
depth?: number;
|
|
47
|
+
icons?: typeof import('./types').DEFAULT_ICONS;
|
|
48
|
+
}> & Readonly<{
|
|
49
|
+
onSelect?: ((item: any) => any) | undefined;
|
|
50
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
51
|
+
}>, {}, {}, {}, {}, {}>;
|
|
52
|
+
__isFragment?: never;
|
|
53
|
+
__isTeleport?: never;
|
|
54
|
+
__isSuspense?: never;
|
|
55
|
+
} & import('vue').ComponentOptionsBase<Readonly<{
|
|
22
56
|
modelValue?: boolean;
|
|
23
57
|
} & import('../../types/component').QBaseComponentProps & {
|
|
24
58
|
activator?: import('../../utils/getElement').Selector;
|
|
@@ -37,6 +71,19 @@ declare const QDropdownMenu: import('vue').DefineComponent<{
|
|
|
37
71
|
}> & Readonly<{
|
|
38
72
|
onSelect?: ((item: any) => any) | undefined;
|
|
39
73
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
40
|
-
}>, {}, {}, {}, {},
|
|
74
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
75
|
+
"update:modelValue": (value: boolean) => any;
|
|
76
|
+
} & {
|
|
77
|
+
select: (item: any) => any;
|
|
78
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
79
|
+
$slots: {
|
|
80
|
+
item?(_: {
|
|
81
|
+
item: import('../QList/types').Item;
|
|
82
|
+
}): any;
|
|
83
|
+
'item.append'?(_: {
|
|
84
|
+
item: import('../QList/types').Item;
|
|
85
|
+
}): any;
|
|
86
|
+
};
|
|
87
|
+
});
|
|
41
88
|
export { QDropdownMenu };
|
|
42
89
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA;AAGrD,OAAO,EAAE,aAAa,EAAE,CAAA"}
|