@quidgest/ui 0.31.0 → 0.31.1
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/CHANGELOG.md +11 -0
- package/dist/json/api.json +13 -9
- package/dist/ui.css +77 -3
- package/dist/ui.esm.js +547 -539
- package/dist/ui.min.css +1 -1
- package/dist/ui.scss +80 -3
- package/lib/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/lib/components/QCombobox/QCombobox.vue.js +165 -165
- package/lib/components/QList/QListItem.d.ts.map +1 -1
- package/lib/components/QList/QListItem.vue.js +52 -33
- package/lib/components/QSelect/QSelect.d.ts.map +1 -1
- package/lib/components/QSelect/QSelect.vue.js +55 -55
- package/lib/templates/theme.d.ts.map +1 -1
- package/lib/templates/theme.js +23 -11
- package/lib/types/component.d.ts +3 -1
- package/lib/types/component.d.ts.map +1 -1
- package/lib/utils/color/merge.d.ts.map +1 -1
- package/lib/utils/color/merge.js +1 -0
- package/lib/utils/color/theme-colors.d.ts +1 -1
- package/lib/utils/color/theme-colors.d.ts.map +1 -1
- package/lib/utils/color/theme-colors.js +1 -0
- package/lib/utils/color/types.d.ts +3 -0
- package/lib/utils/color/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/ui.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.31.
|
|
2
|
+
* Quidgest UI v0.31.1
|
|
3
3
|
* (c) 2026 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3619,6 +3619,11 @@ $input-group-addon-background: rgb(var(--q-theme-neutral-light-rgb) / 25%);
|
|
|
3619
3619
|
cursor: inherit;
|
|
3620
3620
|
user-select: none;
|
|
3621
3621
|
}
|
|
3622
|
+
|
|
3623
|
+
|
|
3624
|
+
&__label-text {
|
|
3625
|
+
display: contents;
|
|
3626
|
+
}
|
|
3622
3627
|
&__check-container {
|
|
3623
3628
|
display: flex;
|
|
3624
3629
|
align-items: center;
|
|
@@ -4866,6 +4871,43 @@ $input-group-addon-background: rgb(var(--q-theme-neutral-light-rgb) / 25%);
|
|
|
4866
4871
|
width: 100%;
|
|
4867
4872
|
}
|
|
4868
4873
|
}
|
|
4874
|
+
@keyframes q-option-label-scroll {
|
|
4875
|
+
0% {
|
|
4876
|
+
transform: translateX(0);
|
|
4877
|
+
}
|
|
4878
|
+
85%,
|
|
4879
|
+
100% {
|
|
4880
|
+
transform: translateX(calc(var(--q-option-label-overflow, 0) * -1));
|
|
4881
|
+
}
|
|
4882
|
+
}
|
|
4883
|
+
@keyframes q-option-label-scroll-rtl {
|
|
4884
|
+
0% {
|
|
4885
|
+
transform: translateX(0);
|
|
4886
|
+
}
|
|
4887
|
+
85%,
|
|
4888
|
+
100% {
|
|
4889
|
+
transform: translateX(var(--q-option-label-overflow, 0));
|
|
4890
|
+
}
|
|
4891
|
+
}
|
|
4892
|
+
@mixin q-option-label-wrap {
|
|
4893
|
+
.q-list-item__content {
|
|
4894
|
+
white-space: normal;
|
|
4895
|
+
overflow-wrap: anywhere;
|
|
4896
|
+
}
|
|
4897
|
+
.q-list-item__label {
|
|
4898
|
+
flex: initial;
|
|
4899
|
+
width: auto;
|
|
4900
|
+
overflow: visible;
|
|
4901
|
+
white-space: normal;
|
|
4902
|
+
text-overflow: unset;
|
|
4903
|
+
overflow-wrap: anywhere;
|
|
4904
|
+
}
|
|
4905
|
+
.q-list-item__label-text {
|
|
4906
|
+
display: contents;
|
|
4907
|
+
width: auto;
|
|
4908
|
+
animation: none;
|
|
4909
|
+
}
|
|
4910
|
+
}
|
|
4869
4911
|
.q-select {
|
|
4870
4912
|
$this: &;
|
|
4871
4913
|
&:not(#{$this}--readonly):not(#{$this}--disabled) {
|
|
@@ -4967,7 +5009,9 @@ $input-group-addon-background: rgb(var(--q-theme-neutral-light-rgb) / 25%);
|
|
|
4967
5009
|
max-height: calc(var(--q-space-1) * 60);
|
|
4968
5010
|
align-items: start;
|
|
4969
5011
|
&--wrap,
|
|
4970
|
-
&--truncate
|
|
5012
|
+
&--truncate,
|
|
5013
|
+
&--wrap-on-focus,
|
|
5014
|
+
&--scroll-on-focus {
|
|
4971
5015
|
min-width: 0;
|
|
4972
5016
|
}
|
|
4973
5017
|
&--fit-content {
|
|
@@ -4979,7 +5023,10 @@ $input-group-addon-background: rgb(var(--q-theme-neutral-light-rgb) / 25%);
|
|
|
4979
5023
|
|
|
4980
5024
|
|
|
4981
5025
|
|
|
4982
|
-
|
|
5026
|
+
|
|
5027
|
+
&--truncate,
|
|
5028
|
+
&--wrap-on-focus,
|
|
5029
|
+
&--scroll-on-focus {
|
|
4983
5030
|
.q-list-item__container,
|
|
4984
5031
|
.q-list-item__content {
|
|
4985
5032
|
min-width: 0;
|
|
@@ -5000,6 +5047,30 @@ $input-group-addon-background: rgb(var(--q-theme-neutral-light-rgb) / 25%);
|
|
|
5000
5047
|
overflow-wrap: anywhere;
|
|
5001
5048
|
}
|
|
5002
5049
|
}
|
|
5050
|
+
|
|
5051
|
+
|
|
5052
|
+
&--wrap-on-focus .q-list-item:is(:focus, .q-list-item--highlighted) {
|
|
5053
|
+
@include q-option-label-wrap;
|
|
5054
|
+
}
|
|
5055
|
+
&--scroll-on-focus .q-list-item:is(:focus, .q-list-item--highlighted) {
|
|
5056
|
+
.q-list-item__label {
|
|
5057
|
+
|
|
5058
|
+
|
|
5059
|
+
flex: 1;
|
|
5060
|
+
min-width: 0;
|
|
5061
|
+
text-overflow: clip;
|
|
5062
|
+
}
|
|
5063
|
+
.q-list-item__label-text {
|
|
5064
|
+
display: inline-block;
|
|
5065
|
+
width: max-content;
|
|
5066
|
+
animation: q-option-label-scroll 2s ease-in-out 2 alternate;
|
|
5067
|
+
}
|
|
5068
|
+
}
|
|
5069
|
+
&--scroll-on-focus
|
|
5070
|
+
.q-list-item:is(:focus, .q-list-item--highlighted):dir(rtl)
|
|
5071
|
+
.q-list-item__label-text {
|
|
5072
|
+
animation-name: q-option-label-scroll-rtl;
|
|
5073
|
+
}
|
|
5003
5074
|
}
|
|
5004
5075
|
&__loader {
|
|
5005
5076
|
display: flex;
|
|
@@ -5015,6 +5086,12 @@ $input-group-addon-background: rgb(var(--q-theme-neutral-light-rgb) / 25%);
|
|
|
5015
5086
|
padding-inline: var(--q-space-2);
|
|
5016
5087
|
}
|
|
5017
5088
|
}
|
|
5089
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5090
|
+
.q-select__items--scroll-on-focus .q-list-item:is(:focus, .q-list-item--highlighted),
|
|
5091
|
+
.q-select__items--scroll-on-focus .q-list-item:is(:focus, .q-list-item--highlighted):dir(rtl) {
|
|
5092
|
+
@include q-option-label-wrap;
|
|
5093
|
+
}
|
|
5094
|
+
}
|
|
5018
5095
|
$sidebar-size-small: 19rem;
|
|
5019
5096
|
$sidebar-size-medium: 27rem;
|
|
5020
5097
|
$sidebar-size-large: 35rem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QCombobox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QCombobox/QCombobox.vue"],"names":[],"mappings":"AAmJA;
|
|
1
|
+
{"version":3,"file":"QCombobox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QCombobox/QCombobox.vue"],"names":[],"mappings":"AAmJA;AAgsBC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,GAAG,CAAA;AAGvC,OAAO,EAAY,QAAQ,EAAgD,MAAM,KAAK,CAAA;AAGtF,KAAK,WAAW,GAAG,cAAc,CAAC;AAshBnC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,WAAW,CAAC;AAOhB,iBAAS,cAAc;WAoYT,OAAO,IAA6B;;iCAxBZ,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACJ,GAAG;wBACH,GAAG;wBACH,G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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAFQ,GAAG,8CACX,GAAG,yBAAyB,GAAG,6DACjC,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAFQ,GAAG,8CACX,GAAG,yBAAyB,GAAG,6DACjC,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAFQ,GAAG,8CACX,GAAG,yBAAyB,GAAG,6DACjC,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAFQ,GAAG,8CACX,GAAG,yBAAyB,GAAG,6DACjC,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkuBhB,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"}
|
|
@@ -4,25 +4,25 @@ import { QSpinnerLoader as n } from "../QSpinnerLoader/index.js";
|
|
|
4
4
|
import { QButton as r } from "../QButton/index.js";
|
|
5
5
|
import { QChevron as i } from "../__internal__/QChevron/index.js";
|
|
6
6
|
import { getRenderedListItems as a } from "../QList/groupListItems.js";
|
|
7
|
-
import { QList as
|
|
8
|
-
import { QClearButton as
|
|
9
|
-
import { QTextField as
|
|
10
|
-
import { DEFAULT_ICONS as
|
|
11
|
-
import { Fragment as
|
|
7
|
+
import { QList as ee } from "../QList/index.js";
|
|
8
|
+
import { QClearButton as te } from "../__internal__/QClearButton/index.js";
|
|
9
|
+
import { QTextField as ne } from "../QTextField/index.js";
|
|
10
|
+
import { DEFAULT_ICONS as o, DEFAULT_TEXTS as s } from "./constants.js";
|
|
11
|
+
import { Fragment as re, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as ie, createVNode as p, defineComponent as m, mergeModels as h, mergeProps as ae, nextTick as g, normalizeClass as oe, onMounted as se, openBlock as _, ref as v, renderSlot as y, toDisplayString as b, toRef as ce, unref as x, useModel as S, useTemplateRef as C, watch as w, withCtx as T, withModifiers as le } from "vue";
|
|
12
12
|
//#region src/components/QCombobox/QCombobox.vue?vue&type=script&setup=true&lang.ts
|
|
13
|
-
var
|
|
13
|
+
var ue = {
|
|
14
14
|
class: "q-sr-only",
|
|
15
15
|
role: "status"
|
|
16
|
-
},
|
|
16
|
+
}, de = ["data-key"], fe = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "q-select__loader"
|
|
19
|
-
},
|
|
19
|
+
}, E = {
|
|
20
20
|
key: 2,
|
|
21
21
|
class: "q-select__loader"
|
|
22
|
-
},
|
|
22
|
+
}, D = /*@__PURE__*/ m({
|
|
23
23
|
inheritAttrs: !1,
|
|
24
24
|
__name: "QCombobox",
|
|
25
|
-
props: /*@__PURE__*/
|
|
25
|
+
props: /*@__PURE__*/ h({
|
|
26
26
|
id: {},
|
|
27
27
|
class: {},
|
|
28
28
|
label: {},
|
|
@@ -31,8 +31,8 @@ var le = {
|
|
|
31
31
|
labelPosition: {},
|
|
32
32
|
help: {},
|
|
33
33
|
helpDisplay: {},
|
|
34
|
-
icons: { default: () =>
|
|
35
|
-
texts: { default: () =>
|
|
34
|
+
icons: { default: () => o },
|
|
35
|
+
texts: { default: () => s },
|
|
36
36
|
size: {},
|
|
37
37
|
readonly: { type: Boolean },
|
|
38
38
|
disabled: { type: Boolean },
|
|
@@ -58,7 +58,7 @@ var le = {
|
|
|
58
58
|
search: { default: "" },
|
|
59
59
|
searchModifiers: {}
|
|
60
60
|
}),
|
|
61
|
-
emits: /*@__PURE__*/
|
|
61
|
+
emits: /*@__PURE__*/ h([
|
|
62
62
|
"before-show",
|
|
63
63
|
"before-hide",
|
|
64
64
|
"show",
|
|
@@ -68,194 +68,194 @@ var le = {
|
|
|
68
68
|
"update:open",
|
|
69
69
|
"update:search"
|
|
70
70
|
]),
|
|
71
|
-
setup(
|
|
72
|
-
let
|
|
73
|
-
|
|
74
|
-
let
|
|
75
|
-
let e =
|
|
76
|
-
if (e !== void 0 &&
|
|
77
|
-
}),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
setup(o, { expose: s, emit: m }) {
|
|
72
|
+
let h = o, D = m, O = S(o, "modelValue"), k = S(o, "open"), A = S(o, "search"), j = e(ce(h, "id")), M = c(() => `${j.value}_listbox`), pe = c(() => h.overflow === "fit-content" ? "auto" : "anchor"), me = c(() => h.overflow === "truncate" || h.overflow === "wrap-on-focus" || h.overflow === "scroll-on-focus"), N = v(void 0), P = C("trigger"), F = C("list"), he = C("toggleButton"), ge = C("clearButton"), _e = C("content");
|
|
73
|
+
se(G);
|
|
74
|
+
let I = c(() => h.clearable && !h.readonly && !h.disabled), L = c(() => h.filterMode === "manual" || !ve.value ? h.items ?? [] : h.items?.filter((e) => e[h.itemLabel].toLowerCase().startsWith(A.value.toLowerCase())) ?? []), R = c(() => a(L.value, h.groups)), z = c(() => h.items?.find((e) => e[h.itemValue] === O.value)), B = c(() => z.value === void 0), V = c(() => {
|
|
75
|
+
let e = N.value;
|
|
76
|
+
if (e !== void 0 && R.value[e]) return R.value[e];
|
|
77
|
+
}), ve = c(() => A.value.length > 0 && A.value !== z.value?.[h.itemLabel]), H = c(() => !!(k.value && !h.loading && L.value.length)), ye = c(() => !k.value || H.value ? "" : h.loading ? h.texts.loading : h.texts.noData), U = v();
|
|
78
|
+
w([
|
|
79
|
+
N,
|
|
80
|
+
R,
|
|
81
|
+
H
|
|
82
82
|
], ([e]) => {
|
|
83
|
-
|
|
83
|
+
U.value = e === void 0 ? void 0 : F.value?.getItem(e)?.id;
|
|
84
84
|
}, { flush: "post" });
|
|
85
|
-
function
|
|
86
|
-
|
|
85
|
+
function W(e) {
|
|
86
|
+
O.value = e, q();
|
|
87
|
+
}
|
|
88
|
+
function G() {
|
|
89
|
+
let e = z.value?.[h.itemLabel] || "";
|
|
90
|
+
A.value !== e && (A.value = e);
|
|
87
91
|
}
|
|
88
92
|
function K() {
|
|
89
|
-
|
|
90
|
-
j.value !== e && (j.value = e);
|
|
93
|
+
k.value || h.readonly || h.disabled || (D("before-show"), k.value = !0, Q());
|
|
91
94
|
}
|
|
92
95
|
function q() {
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
function J() {
|
|
96
|
-
A.value &&= (O("before-hide"), !1);
|
|
96
|
+
k.value &&= (D("before-hide"), !1);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
98
|
+
function be() {
|
|
99
|
+
k.value ? q() : J();
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
|
|
101
|
+
function xe() {
|
|
102
|
+
I.value && (O.value = h.emptyValue, N.value = void 0, Q());
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
if (
|
|
106
|
-
let e =
|
|
107
|
-
e !== -1 &&
|
|
104
|
+
function J() {
|
|
105
|
+
if (K(), z.value !== void 0) {
|
|
106
|
+
let e = R.value.indexOf(z.value);
|
|
107
|
+
e !== -1 && g(() => $(e));
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (!e.key ||
|
|
112
|
-
let t = e.altKey && e.key === "ArrowDown" && !
|
|
110
|
+
function Se(e) {
|
|
111
|
+
if (!e.key || h.readonly || h.disabled) return;
|
|
112
|
+
let t = e.altKey && e.key === "ArrowDown" && !k.value;
|
|
113
113
|
if (!((e.altKey || e.ctrlKey || e.metaKey) && !t)) {
|
|
114
|
-
if ((
|
|
114
|
+
if ((H.value ? [
|
|
115
115
|
"ArrowDown",
|
|
116
116
|
"ArrowUp",
|
|
117
117
|
"Home",
|
|
118
118
|
"End"
|
|
119
|
-
] : ["ArrowDown", "ArrowUp"]).includes(e.key) && (e.preventDefault(), e.stopPropagation()), e.key === "Escape")
|
|
120
|
-
else if (["ArrowDown", "ArrowUp"].includes(e.key))
|
|
121
|
-
if (
|
|
119
|
+
] : ["ArrowDown", "ArrowUp"]).includes(e.key) && (e.preventDefault(), e.stopPropagation()), e.key === "Escape") G(), k.value && (e.preventDefault(), e.stopPropagation(), q());
|
|
120
|
+
else if (["ArrowDown", "ArrowUp"].includes(e.key)) k.value ? g(() => {
|
|
121
|
+
if (N.value === void 0) Y();
|
|
122
122
|
else {
|
|
123
123
|
let t = e.key === "ArrowDown" ? "next" : "prev";
|
|
124
|
-
|
|
124
|
+
Ce(N.value, t);
|
|
125
125
|
}
|
|
126
|
-
}) : (
|
|
127
|
-
e.key === "ArrowDown" ?
|
|
126
|
+
}) : (K(), g(() => {
|
|
127
|
+
e.key === "ArrowDown" ? Y() : X();
|
|
128
128
|
}));
|
|
129
129
|
else if (e.key === "Enter") {
|
|
130
|
-
if (
|
|
131
|
-
|
|
132
|
-
} else if (e.key === "Home")
|
|
133
|
-
else if (e.key === "End")
|
|
130
|
+
if (V.value === void 0) return;
|
|
131
|
+
W(V.value[h.itemValue]);
|
|
132
|
+
} else if (e.key === "Home") N.value = F.value?.getFirstFocusableItemIndex();
|
|
133
|
+
else if (e.key === "End") N.value = F.value?.getLastFocusableItemIndex();
|
|
134
134
|
else if (e.key === "Tab") {
|
|
135
|
-
if (
|
|
136
|
-
|
|
135
|
+
if (V.value === void 0) return;
|
|
136
|
+
W(V.value[h.itemValue]);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
if (
|
|
140
|
+
function Y() {
|
|
141
|
+
if (B.value) N.value = F.value?.getFirstFocusableItemIndex();
|
|
142
142
|
else {
|
|
143
|
-
let e =
|
|
144
|
-
e === -1 ?
|
|
143
|
+
let e = R.value.findIndex((e) => e[h.itemValue] === O.value);
|
|
144
|
+
e === -1 ? N.value = F.value?.getFirstFocusableItemIndex() : N.value = e;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
147
|
+
function X() {
|
|
148
|
+
N.value = F.value?.getLastFocusableItemIndex();
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
|
|
150
|
+
function Ce(e, t) {
|
|
151
|
+
N.value = F.value?.getAdjacentItemIndex(e, t);
|
|
152
152
|
}
|
|
153
153
|
function Z(e) {
|
|
154
|
-
let t =
|
|
154
|
+
let t = he?.value?.$el === e.relatedTarget, n = ge?.value?.$el === e.relatedTarget, r = P?.value?.$el?.contains(e.relatedTarget), i = _e?.value?.contains(e.relatedTarget);
|
|
155
155
|
if (t || n || i || r) {
|
|
156
156
|
e.preventDefault(), e.stopPropagation();
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
|
-
|
|
159
|
+
q(), I.value && !A.value && (O.value = h.emptyValue), G();
|
|
160
160
|
}
|
|
161
161
|
function Q() {
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
function Ce() {
|
|
165
|
-
Q();
|
|
162
|
+
P.value?.inputRef?.focus();
|
|
166
163
|
}
|
|
167
164
|
function we() {
|
|
168
|
-
|
|
165
|
+
Q();
|
|
169
166
|
}
|
|
170
167
|
function Te() {
|
|
171
|
-
|
|
168
|
+
D("show");
|
|
169
|
+
}
|
|
170
|
+
function Ee() {
|
|
171
|
+
D("hide");
|
|
172
172
|
}
|
|
173
173
|
function $(e) {
|
|
174
|
-
let t =
|
|
175
|
-
if (
|
|
176
|
-
let e =
|
|
174
|
+
let t = F.value?.getItem(e);
|
|
175
|
+
if (F.value && t) {
|
|
176
|
+
let e = F.value.$el, n = t.offsetTop + t.offsetHeight;
|
|
177
177
|
t.offsetTop < e.scrollTop ? e.scrollTop = t.offsetTop : n > e.scrollTop + e.clientHeight && (e.scrollTop = n - e.clientHeight);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
return
|
|
181
|
-
e || (
|
|
182
|
-
}),
|
|
183
|
-
if (!
|
|
184
|
-
let e = t?.find((e) => e[
|
|
185
|
-
|
|
180
|
+
return w(k, (e) => {
|
|
181
|
+
e || (N.value = void 0);
|
|
182
|
+
}), w(O, G), w(() => h.items, (e, t) => {
|
|
183
|
+
if (!B.value) {
|
|
184
|
+
let e = t?.find((e) => e[h.itemValue] === O.value);
|
|
185
|
+
A.value === e?.[h.itemLabel] && G();
|
|
186
186
|
}
|
|
187
|
-
}, { deep: !0 }),
|
|
187
|
+
}, { deep: !0 }), w(N, (e) => {
|
|
188
188
|
e !== void 0 && $(e);
|
|
189
|
-
}),
|
|
190
|
-
e &&
|
|
191
|
-
}),
|
|
192
|
-
!e &&
|
|
193
|
-
}),
|
|
194
|
-
|
|
195
|
-
id:
|
|
189
|
+
}), w(A, (e) => {
|
|
190
|
+
e && k.value && h.selectionMode === "automatic" && g(Y);
|
|
191
|
+
}), w(() => h.loading, (e) => {
|
|
192
|
+
!e && k.value && g(Y);
|
|
193
|
+
}), s({ triggerEl: P }), (e, a) => (_(), d(re, null, [
|
|
194
|
+
p(x(ne), ae({
|
|
195
|
+
id: x(j),
|
|
196
196
|
ref: "trigger",
|
|
197
|
-
modelValue:
|
|
198
|
-
"onUpdate:modelValue": a[0] ||= (e) =>
|
|
199
|
-
label:
|
|
200
|
-
"label-position":
|
|
201
|
-
required:
|
|
202
|
-
help:
|
|
203
|
-
"help-display":
|
|
204
|
-
icons:
|
|
205
|
-
texts:
|
|
197
|
+
modelValue: A.value,
|
|
198
|
+
"onUpdate:modelValue": a[0] ||= (e) => A.value = e,
|
|
199
|
+
label: h.label,
|
|
200
|
+
"label-position": h.labelPosition,
|
|
201
|
+
required: h.required,
|
|
202
|
+
help: h.help,
|
|
203
|
+
"help-display": h.helpDisplay,
|
|
204
|
+
icons: h.icons,
|
|
205
|
+
texts: h.texts,
|
|
206
206
|
role: "combobox",
|
|
207
|
-
placeholder:
|
|
207
|
+
placeholder: h.placeholder,
|
|
208
208
|
class: [
|
|
209
209
|
"q-combobox",
|
|
210
210
|
{
|
|
211
|
-
"q-combobox--readonly":
|
|
212
|
-
"q-combobox--disabled":
|
|
211
|
+
"q-combobox--readonly": h.readonly,
|
|
212
|
+
"q-combobox--disabled": h.disabled
|
|
213
213
|
},
|
|
214
|
-
|
|
214
|
+
h.class
|
|
215
215
|
],
|
|
216
|
-
readonly:
|
|
217
|
-
disabled:
|
|
218
|
-
invalid:
|
|
219
|
-
"data-loading":
|
|
216
|
+
readonly: h.readonly,
|
|
217
|
+
disabled: h.disabled,
|
|
218
|
+
invalid: h.invalid,
|
|
219
|
+
"data-loading": h.loading,
|
|
220
220
|
autocomplete: "off",
|
|
221
|
-
"aria-expanded":
|
|
222
|
-
"aria-controls":
|
|
221
|
+
"aria-expanded": H.value,
|
|
222
|
+
"aria-controls": H.value ? M.value : void 0,
|
|
223
223
|
"aria-haspopup": "listbox",
|
|
224
224
|
"aria-autocomplete": "list",
|
|
225
|
-
"aria-activedescendant":
|
|
226
|
-
size:
|
|
225
|
+
"aria-activedescendant": U.value,
|
|
226
|
+
size: h.size
|
|
227
227
|
}, e.$attrs, {
|
|
228
|
-
onClick:
|
|
228
|
+
onClick: J,
|
|
229
229
|
onFocusout: Z,
|
|
230
|
-
onInput:
|
|
231
|
-
onKeydown:
|
|
232
|
-
}),
|
|
233
|
-
"label.prepend":
|
|
234
|
-
"label.append":
|
|
235
|
-
append:
|
|
236
|
-
|
|
237
|
-
|
|
230
|
+
onInput: K,
|
|
231
|
+
onKeydown: Se
|
|
232
|
+
}), ie({
|
|
233
|
+
"label.prepend": T(() => [y(e.$slots, "label.prepend")]),
|
|
234
|
+
"label.append": T(() => [y(e.$slots, "label.append")]),
|
|
235
|
+
append: T(() => [
|
|
236
|
+
y(e.$slots, "append"),
|
|
237
|
+
I.value && A.value ? (_(), l(x(te), {
|
|
238
238
|
key: 0,
|
|
239
239
|
ref: "clearButton",
|
|
240
|
-
icons:
|
|
241
|
-
texts:
|
|
242
|
-
onClick:
|
|
243
|
-
}, null, 8, ["icons", "texts"])) :
|
|
244
|
-
|
|
240
|
+
icons: h.icons,
|
|
241
|
+
texts: h.texts,
|
|
242
|
+
onClick: xe
|
|
243
|
+
}, null, 8, ["icons", "texts"])) : u("v-if", !0),
|
|
244
|
+
h.readonly ? u("v-if", !0) : (_(), l(x(r), {
|
|
245
245
|
key: 1,
|
|
246
246
|
ref: "toggleButton",
|
|
247
247
|
class: "q-combobox__chevron",
|
|
248
|
-
"aria-label":
|
|
248
|
+
"aria-label": h.texts.showOptions,
|
|
249
249
|
variant: "ghost",
|
|
250
250
|
color: "neutral",
|
|
251
251
|
borderless: "",
|
|
252
252
|
tabindex: -1,
|
|
253
|
-
disabled:
|
|
254
|
-
onMousedown:
|
|
253
|
+
disabled: h.disabled,
|
|
254
|
+
onMousedown: le(be, ["stop", "prevent"])
|
|
255
255
|
}, {
|
|
256
|
-
default:
|
|
257
|
-
"model-value":
|
|
258
|
-
icons:
|
|
256
|
+
default: T(() => [p(x(i), {
|
|
257
|
+
"model-value": k.value,
|
|
258
|
+
icons: h.icons
|
|
259
259
|
}, null, 8, ["model-value", "icons"])]),
|
|
260
260
|
_: 1
|
|
261
261
|
}, 8, ["aria-label", "disabled"]))
|
|
@@ -264,17 +264,17 @@ var le = {
|
|
|
264
264
|
}, [
|
|
265
265
|
e.$slots.prepend ? {
|
|
266
266
|
name: "prepend",
|
|
267
|
-
fn:
|
|
267
|
+
fn: T(() => [y(e.$slots, "prepend")]),
|
|
268
268
|
key: "0"
|
|
269
269
|
} : void 0,
|
|
270
270
|
e.$slots.errors ? {
|
|
271
271
|
name: "errors",
|
|
272
|
-
fn:
|
|
272
|
+
fn: T(() => [y(e.$slots, "errors")]),
|
|
273
273
|
key: "1"
|
|
274
274
|
} : void 0,
|
|
275
275
|
e.$slots.extras ? {
|
|
276
276
|
name: "extras",
|
|
277
|
-
fn:
|
|
277
|
+
fn: T(() => [y(e.$slots, "extras")]),
|
|
278
278
|
key: "2"
|
|
279
279
|
} : void 0
|
|
280
280
|
]), 1040, [
|
|
@@ -298,49 +298,49 @@ var le = {
|
|
|
298
298
|
"aria-activedescendant",
|
|
299
299
|
"size"
|
|
300
300
|
]),
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
"model-value":
|
|
301
|
+
f("span", ue, b(ye.value), 1),
|
|
302
|
+
p(x(t), {
|
|
303
|
+
"model-value": k.value,
|
|
304
304
|
spy: "",
|
|
305
305
|
"non-modal": "",
|
|
306
306
|
trigger: "manual",
|
|
307
307
|
placement: "bottom-start",
|
|
308
|
-
width:
|
|
308
|
+
width: pe.value,
|
|
309
309
|
offset: 4,
|
|
310
|
-
inline:
|
|
311
|
-
anchor:
|
|
312
|
-
"onUpdate:modelValue":
|
|
313
|
-
onEnter:
|
|
314
|
-
onLeave:
|
|
310
|
+
inline: h.inline,
|
|
311
|
+
anchor: P.value?.$el,
|
|
312
|
+
"onUpdate:modelValue": q,
|
|
313
|
+
onEnter: Te,
|
|
314
|
+
onLeave: Ee
|
|
315
315
|
}, {
|
|
316
|
-
default:
|
|
316
|
+
default: T(() => [f("div", {
|
|
317
317
|
ref: "content",
|
|
318
318
|
class: "q-select__body",
|
|
319
319
|
"data-testid": "combobox-dropdown",
|
|
320
|
-
"data-key":
|
|
320
|
+
"data-key": x(j),
|
|
321
321
|
onFocusout: Z
|
|
322
322
|
}, [
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
y(e.$slots, "body.prepend"),
|
|
324
|
+
h.loading ? (_(), d("div", fe, [p(x(n), { size: 24 })])) : L.value.length ? (_(), l(x(ee), {
|
|
325
325
|
key: 1,
|
|
326
|
-
id:
|
|
326
|
+
id: M.value,
|
|
327
327
|
ref: "list",
|
|
328
|
-
label:
|
|
329
|
-
"model-value":
|
|
330
|
-
class:
|
|
328
|
+
label: h.label,
|
|
329
|
+
"model-value": O.value,
|
|
330
|
+
class: oe(["q-select__items", `q-select__items--${h.overflow}`]),
|
|
331
331
|
selectable: "",
|
|
332
332
|
required: "",
|
|
333
|
-
icons:
|
|
334
|
-
highlighted:
|
|
335
|
-
items:
|
|
336
|
-
groups:
|
|
337
|
-
"item-label":
|
|
338
|
-
"item-value":
|
|
339
|
-
"item-title":
|
|
340
|
-
onMouseup:
|
|
341
|
-
"onUpdate:modelValue":
|
|
333
|
+
icons: h.icons,
|
|
334
|
+
highlighted: V.value?.[h.itemValue],
|
|
335
|
+
items: L.value,
|
|
336
|
+
groups: o.groups,
|
|
337
|
+
"item-label": h.itemLabel,
|
|
338
|
+
"item-value": h.itemValue,
|
|
339
|
+
"item-title": me.value,
|
|
340
|
+
onMouseup: we,
|
|
341
|
+
"onUpdate:modelValue": W
|
|
342
342
|
}, {
|
|
343
|
-
item:
|
|
343
|
+
item: T(({ item: t }) => [y(e.$slots, "item", { item: t })]),
|
|
344
344
|
_: 3
|
|
345
345
|
}, 8, [
|
|
346
346
|
"id",
|
|
@@ -354,9 +354,9 @@ var le = {
|
|
|
354
354
|
"item-label",
|
|
355
355
|
"item-value",
|
|
356
356
|
"item-title"
|
|
357
|
-
])) : (
|
|
358
|
-
|
|
359
|
-
], 40,
|
|
357
|
+
])) : (_(), d("div", E, b(h.texts.noData), 1)),
|
|
358
|
+
y(e.$slots, "body.append")
|
|
359
|
+
], 40, de)]),
|
|
360
360
|
_: 3
|
|
361
361
|
}, 8, [
|
|
362
362
|
"model-value",
|
|
@@ -368,4 +368,4 @@ var le = {
|
|
|
368
368
|
}
|
|
369
369
|
});
|
|
370
370
|
//#endregion
|
|
371
|
-
export {
|
|
371
|
+
export { D as default };
|
|
@@ -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":"AA4EA;AAgPC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAU3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,GAAG,CAAA;AAMvC,KAAK,WAAW,GAAG,cAAc,CAAC;AAuJnC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAkJT,OAAO,IAA6B;;yBAbrB,GAAG;yBACH,GAAG;wBACH,GAAG;;;;;;EAgB/B;AAqBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;iBAUnB,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"}
|