@quidgest/ui 0.19.0 → 0.20.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 +21 -1
- package/dist/json/api.json +1414 -45
- package/dist/manifest/components.json +2 -0
- package/dist/ui.css +1374 -5
- package/dist/ui.esm.js +1459 -841
- package/dist/ui.js +1444 -826
- package/dist/ui.min.css +2 -1
- package/dist/ui.min.js +1444 -826
- package/dist/ui.scss +569 -7
- package/esm/components/QField/QField.d.ts.map +1 -1
- package/esm/components/QField/QField.vue.js +1 -1
- package/esm/components/QGauge/QGauge.d.ts +56 -0
- package/esm/components/QGauge/QGauge.d.ts.map +1 -0
- package/esm/components/QGauge/QGauge.vue.js +305 -0
- package/esm/components/QGauge/QGauge2.vue.js +5 -0
- package/esm/components/QGauge/constants.d.ts +6 -0
- package/esm/components/QGauge/constants.d.ts.map +1 -0
- package/esm/components/QGauge/constants.js +8 -0
- package/esm/components/QGauge/index.d.ts +124 -0
- package/esm/components/QGauge/index.d.ts.map +1 -0
- package/esm/components/QGauge/index.js +6 -0
- package/esm/components/QGauge/types.d.ts +146 -0
- package/esm/components/QGauge/types.d.ts.map +1 -0
- package/esm/components/QInputGroup/QInputGroup.d.ts +147 -3
- package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.vue.js +32 -23
- package/esm/components/QInputGroup/index.d.ts +81 -4
- package/esm/components/QInputGroup/index.d.ts.map +1 -1
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +3 -1
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +24 -28
- package/esm/components/QList/types.d.ts +1 -1
- package/esm/components/QOverlay/types.d.ts +3 -1
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.d.ts +2263 -0
- package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -0
- package/esm/components/QPhoneField/QPhoneField.vue.js +478 -0
- package/esm/components/QPhoneField/QPhoneField2.vue.js +5 -0
- package/esm/components/QPhoneField/constants.d.ts +11 -0
- package/esm/components/QPhoneField/constants.d.ts.map +1 -0
- package/esm/components/QPhoneField/constants.js +14 -0
- package/esm/components/QPhoneField/index.d.ts +1253 -0
- package/esm/components/QPhoneField/index.d.ts.map +1 -0
- package/esm/components/QPhoneField/index.js +6 -0
- package/esm/components/QPhoneField/types.d.ts +108 -0
- package/esm/components/QPhoneField/types.d.ts.map +1 -0
- package/esm/components/QSelect/QSelect.d.ts +16 -1
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +158 -129
- package/esm/components/QSelect/index.d.ts +31 -3
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSelect/types.d.ts +13 -0
- package/esm/components/QSelect/types.d.ts.map +1 -1
- package/esm/components/index.d.ts +2 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +64 -60
- package/esm/composables/useColor/index.d.ts +8 -0
- package/esm/composables/useColor/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.js +16 -18
- package/esm/composables/useDialog/index.d.ts +2 -88
- package/esm/composables/useDialog/index.d.ts.map +1 -1
- package/esm/composables/useDialog/index.js +6 -6
- package/esm/composables/useDialog/types.d.ts +14 -4
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/vendors/country-flag-icons/modules/countries.json.js +4 -0
- package/esm/vendors/country-flag-icons/modules/hasFlag.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouType.js +312 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +142 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js +145 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +45 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.js +258 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.util.js +57 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeParser.js +242 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeState.js +115 -0
- package/esm/vendors/libphonenumber-js/es6/ParseError.js +116 -0
- package/esm/vendors/libphonenumber-js/es6/PhoneNumber.js +164 -0
- package/esm/vendors/libphonenumber-js/es6/constants.js +4 -0
- package/esm/vendors/libphonenumber-js/es6/format.js +77 -0
- package/esm/vendors/libphonenumber-js/es6/formatIncompletePhoneNumber.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/getCountries.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/getExampleNumber.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/RFC3966.js +9 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/checkNumberLength.js +21 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extension/extractExtension.js +16 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +36 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +21 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +18 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumber.js +27 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +27 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractPhoneContext.js +15 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +13 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +12 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +43 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getIddPrefix.js +10 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getNumberType.js +61 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +14 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isCallingCode.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isCountryCode.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isObject.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +12 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/matchesEntirely.js +6 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/mergeArrays.js +39 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/parseDigits.js +82 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/stripIddPrefix.js +18 -0
- package/esm/vendors/libphonenumber-js/es6/isPossible.js +32 -0
- package/esm/vendors/libphonenumber-js/es6/isValid.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/metadata.js +474 -0
- package/esm/vendors/libphonenumber-js/es6/normalizeArguments.js +110 -0
- package/esm/vendors/libphonenumber-js/es6/parse.js +103 -0
- package/esm/vendors/libphonenumber-js/es6/parseIncompletePhoneNumber.js +48 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber.js +9 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumberWithError_.js +58 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber_.js +66 -0
- package/esm/vendors/libphonenumber-js/es6/tools/semver-compare.js +14 -0
- package/esm/vendors/libphonenumber-js/examples.mobile.json.js +250 -0
- package/esm/vendors/libphonenumber-js/max/exports/AsYouType.js +9 -0
- package/esm/vendors/libphonenumber-js/max/exports/formatIncompletePhoneNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getCountries.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getCountryCallingCode.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getExampleNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/isSupportedCountry.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/parsePhoneNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/withMetadataArgument.js +8 -0
- package/esm/vendors/libphonenumber-js/metadata.max.json.js +10489 -0
- package/package.json +3 -1
|
@@ -9,35 +9,36 @@ import { QField as ee } from "../QField/index.js";
|
|
|
9
9
|
import { QClearButton as te } from "../__internal__/QClearButton/index.js";
|
|
10
10
|
import { QList as ne } from "../QList/index.js";
|
|
11
11
|
import { QOverlay as re } from "../QOverlay/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as
|
|
12
|
+
import { DEFAULT_ICONS as s, DEFAULT_TEXTS as ie } from "./constants.js";
|
|
13
|
+
import { QPopover as ae } from "../QPopover/index.js";
|
|
14
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as oe, createSlots as se, createTextVNode as p, createVNode as m, defineComponent as h, mergeModels as g, mergeProps as _, nextTick as v, normalizeClass as y, normalizeProps as b, onBeforeUnmount as ce, onMounted as le, openBlock as x, ref as ue, renderList as de, renderSlot as S, toDisplayString as C, toRef as w, unref as T, useModel as fe, useTemplateRef as E, vModelText as pe, watch as D, withCtx as O, withDirectives as me, withModifiers as he } from "vue";
|
|
15
15
|
//#region src/components/QSelect/QSelect.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var
|
|
16
|
+
var ge = {
|
|
17
17
|
key: 0,
|
|
18
18
|
ref: "valueContainer",
|
|
19
19
|
class: "q-select__value-container"
|
|
20
|
-
},
|
|
20
|
+
}, _e = {
|
|
21
21
|
key: 1,
|
|
22
22
|
class: "q-select__multi-value"
|
|
23
|
-
},
|
|
23
|
+
}, ve = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "q-select__value"
|
|
26
|
-
},
|
|
26
|
+
}, ye = {
|
|
27
27
|
key: 1,
|
|
28
28
|
class: "q-select__placeholder"
|
|
29
|
-
},
|
|
29
|
+
}, be = [
|
|
30
30
|
"id",
|
|
31
31
|
"tabindex",
|
|
32
32
|
"aria-expanded",
|
|
33
|
+
"aria-controls",
|
|
33
34
|
"aria-keyshortcuts"
|
|
34
|
-
],
|
|
35
|
+
], xe = ["data-key"], Se = {
|
|
35
36
|
key: 0,
|
|
36
37
|
class: "q-select__loader"
|
|
37
|
-
},
|
|
38
|
+
}, k = /*@__PURE__*/ h({
|
|
38
39
|
inheritAttrs: !1,
|
|
39
40
|
__name: "QSelect",
|
|
40
|
-
props: /*@__PURE__*/
|
|
41
|
+
props: /*@__PURE__*/ g({
|
|
41
42
|
id: {},
|
|
42
43
|
class: {},
|
|
43
44
|
label: {},
|
|
@@ -52,6 +53,11 @@ var he = {
|
|
|
52
53
|
groups: { default: () => [] },
|
|
53
54
|
clearable: { type: Boolean },
|
|
54
55
|
inline: { type: Boolean },
|
|
56
|
+
overlayAnchor: {},
|
|
57
|
+
selectOnTab: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !0
|
|
60
|
+
},
|
|
55
61
|
multiple: { type: Boolean },
|
|
56
62
|
badges: { type: Boolean },
|
|
57
63
|
loading: { type: Boolean },
|
|
@@ -59,78 +65,83 @@ var he = {
|
|
|
59
65
|
itemValue: { default: "key" },
|
|
60
66
|
itemLabel: { default: "label" },
|
|
61
67
|
icons: { default: () => s },
|
|
62
|
-
texts: { default: () =>
|
|
68
|
+
texts: { default: () => ie }
|
|
63
69
|
}, {
|
|
64
70
|
modelValue: {},
|
|
65
|
-
modelModifiers: {}
|
|
71
|
+
modelModifiers: {},
|
|
72
|
+
open: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: !1
|
|
75
|
+
},
|
|
76
|
+
openModifiers: {}
|
|
66
77
|
}),
|
|
67
|
-
emits: /*@__PURE__*/
|
|
78
|
+
emits: /*@__PURE__*/ g([
|
|
68
79
|
"before-show",
|
|
69
80
|
"before-hide",
|
|
70
81
|
"show",
|
|
71
82
|
"hide"
|
|
72
|
-
], ["update:modelValue"]),
|
|
73
|
-
setup(s, { emit:
|
|
74
|
-
let g = s,
|
|
83
|
+
], ["update:modelValue", "update:open"]),
|
|
84
|
+
setup(s, { expose: ie, emit: h }) {
|
|
85
|
+
let g = s, k = h, A = fe(s, "modelValue"), j = a(w(g, "id")), M = l(() => `${j.value}_listbox`), { active: N } = e({
|
|
75
86
|
active: A,
|
|
76
|
-
required:
|
|
77
|
-
multiple:
|
|
78
|
-
}),
|
|
79
|
-
function
|
|
87
|
+
required: w(g, "required"),
|
|
88
|
+
multiple: w(g, "multiple")
|
|
89
|
+
}), P = fe(s, "open"), F = ue(0), I = !0, L = E("trigger"), Ce = E("input"), we = E("list"), R = E("content"), z = E("valueContainer"), B = E("allBadges"), Te = E("allPlainTexts"), Ee = E("hiddenItemsCountBadge"), V = null, H = null;
|
|
90
|
+
function De() {
|
|
80
91
|
H && clearTimeout(H), H = setTimeout(() => {
|
|
81
92
|
$();
|
|
82
93
|
}, 120);
|
|
83
94
|
}
|
|
84
|
-
|
|
95
|
+
le(() => {
|
|
85
96
|
$();
|
|
86
|
-
let e =
|
|
97
|
+
let e = L.value?.fieldRef;
|
|
87
98
|
e && (V = new ResizeObserver(() => {
|
|
88
|
-
|
|
99
|
+
De();
|
|
89
100
|
}), V.observe(e));
|
|
90
|
-
}),
|
|
101
|
+
}), ce(() => {
|
|
91
102
|
V?.disconnect(), H && clearTimeout(H);
|
|
92
103
|
});
|
|
93
104
|
let U = l(() => W.value.length === 0), W = l(() => {
|
|
94
|
-
if (g.multiple) return (A.value ?? []).map((e) =>
|
|
95
|
-
let e = A.value === void 0 ? void 0 :
|
|
105
|
+
if (g.multiple) return (A.value ?? []).map((e) => ke(e)).filter((e) => !!e);
|
|
106
|
+
let e = A.value === void 0 ? void 0 : ke(A.value);
|
|
96
107
|
return e ? [e] : [];
|
|
97
|
-
}),
|
|
108
|
+
}), Oe = l(() => {
|
|
98
109
|
let e = /* @__PURE__ */ new Map();
|
|
99
110
|
return g.items?.forEach((t, n) => {
|
|
100
111
|
e.set(t.key, n);
|
|
101
112
|
}), e;
|
|
102
|
-
}),
|
|
103
|
-
function
|
|
113
|
+
}), G = l(() => W.value?.map(q).filter(Boolean).join(", ")), K = l(() => g.clearable && !g.readonly && !g.disabled && !g.loading && !U.value);
|
|
114
|
+
function ke(e) {
|
|
104
115
|
return g.items?.find((t) => t[g.itemValue] === e);
|
|
105
116
|
}
|
|
106
|
-
function
|
|
107
|
-
g.multiple && e < A.value.length && (!g.required || A.value.length > 1) ?
|
|
117
|
+
function Ae(e) {
|
|
118
|
+
g.multiple && e < A.value.length && (!g.required || A.value.length > 1) ? N.value = A.value.toSpliced(e, 1) : Y();
|
|
108
119
|
}
|
|
109
|
-
function
|
|
120
|
+
function q(e) {
|
|
110
121
|
return e?.[g.itemLabel] ?? "";
|
|
111
122
|
}
|
|
112
|
-
function
|
|
113
|
-
return e + 1 < W.value.length -
|
|
123
|
+
function je(e) {
|
|
124
|
+
return e + 1 < W.value.length - F.value ? ", " : "";
|
|
114
125
|
}
|
|
115
|
-
function
|
|
116
|
-
Array.isArray(e) ? A.value = e.sort((e, t) =>
|
|
126
|
+
function J(e) {
|
|
127
|
+
Array.isArray(e) ? A.value = e.sort((e, t) => Oe.value.get(e) - Oe.value.get(t)) : (A.value = e, X());
|
|
117
128
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
129
|
+
function Y() {
|
|
130
|
+
J(g.emptyValue), Re();
|
|
120
131
|
}
|
|
121
|
-
function
|
|
122
|
-
!
|
|
132
|
+
function Me(e) {
|
|
133
|
+
!R.value?.contains(e.relatedTarget) && !L.value?.fieldRef?.contains(e.relatedTarget) && X(!1);
|
|
123
134
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
135
|
+
function Ne() {
|
|
136
|
+
P.value || g.readonly || g.disabled || (I = !0, k("before-show"), P.value = !0);
|
|
126
137
|
}
|
|
127
|
-
function
|
|
128
|
-
|
|
138
|
+
function X(e = !0) {
|
|
139
|
+
P.value &&= (I = e, k("before-hide"), !1);
|
|
129
140
|
}
|
|
130
|
-
function
|
|
131
|
-
g.readonly || g.disabled || (
|
|
141
|
+
function Pe() {
|
|
142
|
+
g.readonly || g.disabled || (P.value ? X() : Ne());
|
|
132
143
|
}
|
|
133
|
-
function
|
|
144
|
+
function Z(e) {
|
|
134
145
|
!e.key || g.readonly || g.disabled || ([
|
|
135
146
|
"Enter",
|
|
136
147
|
" ",
|
|
@@ -143,50 +154,59 @@ var he = {
|
|
|
143
154
|
"Enter",
|
|
144
155
|
" ",
|
|
145
156
|
"ArrowDown"
|
|
146
|
-
].includes(e.key) &&
|
|
157
|
+
].includes(e.key) && Ne(), ["Escape", "Tab"].includes(e.key) && (P.value ? X(e.key !== "Tab") : K.value && e.key === "Escape" && Y()), K.value && e.key === "Delete" && Y());
|
|
147
158
|
}
|
|
148
|
-
function
|
|
149
|
-
e.key.length === 1 && e.preventDefault(),
|
|
159
|
+
function Fe(e) {
|
|
160
|
+
e.key.length === 1 && e.preventDefault(), Z(e);
|
|
150
161
|
}
|
|
151
|
-
async function
|
|
152
|
-
await
|
|
162
|
+
async function Ie() {
|
|
163
|
+
await v(), g.loading ? R.value?.focus() : Q(), k("show");
|
|
153
164
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
165
|
+
function Le() {
|
|
166
|
+
I && Re(), I = !0, k("hide");
|
|
156
167
|
}
|
|
157
|
-
function
|
|
158
|
-
|
|
168
|
+
function Re() {
|
|
169
|
+
Ce.value?.focus();
|
|
159
170
|
}
|
|
160
|
-
function
|
|
161
|
-
|
|
171
|
+
function Q() {
|
|
172
|
+
we.value?.$el.focus();
|
|
162
173
|
}
|
|
163
174
|
async function $() {
|
|
164
|
-
if (await
|
|
165
|
-
|
|
175
|
+
if (await v(), await v(), !g.multiple || !z.value || U.value) {
|
|
176
|
+
F.value = 0;
|
|
166
177
|
return;
|
|
167
178
|
}
|
|
168
|
-
let e =
|
|
169
|
-
if (g.badges) for (let i of
|
|
179
|
+
let e = z.value.offsetWidth, t = Ee.value?.$el.scrollWidth ?? 30, n = t, r = 0;
|
|
180
|
+
if (g.badges) for (let i of B.value ?? []) {
|
|
170
181
|
let a = i.$el.scrollWidth + 4;
|
|
171
182
|
if (n + t + a <= e) n += a, r++;
|
|
172
183
|
else break;
|
|
173
184
|
}
|
|
174
|
-
else for (let i of
|
|
185
|
+
else for (let i of Te.value ?? []) {
|
|
175
186
|
let a = i.scrollWidth + 4;
|
|
176
187
|
if (n + t + a <= e) n += a, r++;
|
|
177
188
|
else break;
|
|
178
189
|
}
|
|
179
|
-
|
|
190
|
+
F.value = (g.badges ? B.value?.length ?? 0 : Te.value?.length ?? 0) - r;
|
|
180
191
|
}
|
|
181
|
-
return
|
|
182
|
-
!e &&
|
|
183
|
-
}),
|
|
184
|
-
|
|
192
|
+
return D(() => g.loading, (e) => {
|
|
193
|
+
!e && P.value && v(Q);
|
|
194
|
+
}), D(() => g.badges, $), D(W, $, { deep: !0 }), D(() => g.clearable, $), D([
|
|
195
|
+
P,
|
|
196
|
+
() => g.readonly,
|
|
197
|
+
() => g.disabled
|
|
198
|
+
], ([e, t, n]) => {
|
|
199
|
+
e && (t || n) && X(!1);
|
|
200
|
+
}, {
|
|
201
|
+
flush: "sync",
|
|
202
|
+
immediate: !0
|
|
203
|
+
}), D(N, J), ie({ focusList: Q }), (e, a) => (x(), f(c, null, [m(T(ee), {
|
|
204
|
+
id: T(j),
|
|
185
205
|
ref: "trigger",
|
|
186
206
|
label: g.label,
|
|
187
207
|
"label-position": g.labelPosition,
|
|
188
208
|
required: g.required,
|
|
189
|
-
class:
|
|
209
|
+
class: y([
|
|
190
210
|
"q-select",
|
|
191
211
|
{
|
|
192
212
|
"q-select--readonly": g.readonly,
|
|
@@ -199,18 +219,18 @@ var he = {
|
|
|
199
219
|
"data-loading": g.loading,
|
|
200
220
|
size: g.size,
|
|
201
221
|
invalid: g.invalid,
|
|
202
|
-
onClick:
|
|
203
|
-
onKeydown:
|
|
204
|
-
},
|
|
205
|
-
append:
|
|
206
|
-
|
|
207
|
-
|
|
222
|
+
onClick: Pe,
|
|
223
|
+
onKeydown: Z
|
|
224
|
+
}, se({
|
|
225
|
+
append: O(() => [
|
|
226
|
+
S(e.$slots, "append"),
|
|
227
|
+
K.value ? (x(), u(T(te), {
|
|
208
228
|
key: 0,
|
|
209
229
|
icons: g.icons,
|
|
210
230
|
texts: g.texts,
|
|
211
|
-
onClick:
|
|
231
|
+
onClick: Y
|
|
212
232
|
}, null, 8, ["icons", "texts"])) : d("v-if", !0),
|
|
213
|
-
g.readonly ? d("v-if", !0) : (
|
|
233
|
+
g.readonly ? d("v-if", !0) : (x(), u(T(n), {
|
|
214
234
|
key: 1,
|
|
215
235
|
class: "q-select__chevron",
|
|
216
236
|
"aria-label": g.texts.showOptions,
|
|
@@ -219,29 +239,33 @@ var he = {
|
|
|
219
239
|
borderless: "",
|
|
220
240
|
tabindex: "-1",
|
|
221
241
|
disabled: g.disabled,
|
|
222
|
-
onClick:
|
|
242
|
+
onClick: Pe
|
|
223
243
|
}, {
|
|
224
|
-
default:
|
|
225
|
-
"model-value":
|
|
244
|
+
default: O(() => [m(T(i), {
|
|
245
|
+
"model-value": P.value,
|
|
226
246
|
icons: g.icons
|
|
227
247
|
}, null, 8, ["model-value", "icons"])]),
|
|
228
248
|
_: 1
|
|
229
249
|
}, 8, ["aria-label", "disabled"]))
|
|
230
250
|
]),
|
|
231
|
-
default:
|
|
232
|
-
|
|
251
|
+
default: O(() => [S(e.$slots, "value", {
|
|
252
|
+
empty: U.value,
|
|
253
|
+
items: W.value,
|
|
254
|
+
value: A.value
|
|
255
|
+
}, () => [U.value ? (x(), f("span", ye, [!g.readonly && !g.disabled ? (x(), f(c, { key: 0 }, [p(C(g.texts.placeholder), 1)], 64)) : d("v-if", !0)])) : (x(), f(c, { key: 0 }, [g.badges || g.multiple ? (x(), f("span", ge, [g.multiple ? (x(), f(c, { key: 0 }, [
|
|
256
|
+
(x(!0), f(c, null, de(W.value, (e, t) => (x(), f(c, { key: `visible-${t}` }, [t < W.value.length - F.value ? (x(), f(c, { key: 0 }, [g.badges ? (x(), u(T(o), {
|
|
233
257
|
key: 0,
|
|
234
258
|
pill: "",
|
|
235
259
|
color: g.readonly || g.disabled ? "neutral" : void 0,
|
|
236
260
|
disabled: g.readonly || g.disabled,
|
|
237
261
|
removable: !g.readonly && !g.disabled && (!g.required || W.value.length > 1),
|
|
238
262
|
texts: g.texts,
|
|
239
|
-
"onClick:remove": () =>
|
|
263
|
+
"onClick:remove": () => Ae(t)
|
|
240
264
|
}, {
|
|
241
|
-
default:
|
|
265
|
+
default: O(() => [e?.icon ? (x(), u(T(r), _({
|
|
242
266
|
key: 0,
|
|
243
267
|
ref_for: !0
|
|
244
|
-
}, e.icon), null, 16)) : d("v-if", !0),
|
|
268
|
+
}, e.icon), null, 16)) : d("v-if", !0), p(" " + C(q(e)), 1)]),
|
|
245
269
|
_: 2
|
|
246
270
|
}, 1032, [
|
|
247
271
|
"color",
|
|
@@ -249,24 +273,24 @@ var he = {
|
|
|
249
273
|
"removable",
|
|
250
274
|
"texts",
|
|
251
275
|
"onClick:remove"
|
|
252
|
-
])) : g.multiple ? (
|
|
253
|
-
|
|
276
|
+
])) : g.multiple ? (x(), f("span", _e, C(q(e) + je(t)), 1)) : d("v-if", !0)], 64)) : d("v-if", !0)], 64))), 128)),
|
|
277
|
+
F.value > 0 ? (x(), f(c, { key: 0 }, [m(T(o), {
|
|
254
278
|
ref: "hiddenItemsCountBadge",
|
|
255
279
|
pill: "",
|
|
256
|
-
class:
|
|
280
|
+
class: y(["q-select__badge-count", { "q-select__badge-count--clickable": g.readonly || g.disabled }])
|
|
257
281
|
}, {
|
|
258
|
-
default:
|
|
282
|
+
default: O(() => [p(" +" + C(F.value), 1)]),
|
|
259
283
|
_: 1
|
|
260
|
-
}, 8, ["class"]), g.readonly || g.disabled ? (
|
|
284
|
+
}, 8, ["class"]), g.readonly || g.disabled ? (x(), u(T(ae), {
|
|
261
285
|
key: 0,
|
|
262
|
-
anchor:
|
|
263
|
-
text:
|
|
286
|
+
anchor: Ee.value?.$el,
|
|
287
|
+
text: G.value,
|
|
264
288
|
placement: "bottom-start"
|
|
265
289
|
}, {
|
|
266
|
-
default:
|
|
290
|
+
default: O(() => [p(C(G.value), 1)]),
|
|
267
291
|
_: 1
|
|
268
292
|
}, 8, ["anchor", "text"])) : d("v-if", !0)], 64)) : d("v-if", !0),
|
|
269
|
-
(
|
|
293
|
+
(x(!0), f(c, null, de(W.value, (e, t) => (x(), f(c, { key: `measure-${t}` }, [g.badges ? (x(), u(T(o), {
|
|
270
294
|
key: 0,
|
|
271
295
|
ref_for: !0,
|
|
272
296
|
ref: "allBadges",
|
|
@@ -276,55 +300,56 @@ var he = {
|
|
|
276
300
|
class: "q-select__badge-hidden",
|
|
277
301
|
removable: !g.readonly && !g.disabled && (!g.required || W.value.length > 1)
|
|
278
302
|
}, {
|
|
279
|
-
default:
|
|
303
|
+
default: O(() => [e?.icon ? (x(), u(T(r), _({
|
|
280
304
|
key: 0,
|
|
281
305
|
ref_for: !0
|
|
282
|
-
}, e.icon), null, 16)) : d("v-if", !0),
|
|
306
|
+
}, e.icon), null, 16)) : d("v-if", !0), p(" " + C(q(e)), 1)]),
|
|
283
307
|
_: 2
|
|
284
|
-
}, 1032, ["color", "removable"])) : g.multiple ? (
|
|
308
|
+
}, 1032, ["color", "removable"])) : g.multiple ? (x(), f("span", {
|
|
285
309
|
key: 1,
|
|
286
310
|
ref_for: !0,
|
|
287
311
|
ref: "allPlainTexts",
|
|
288
312
|
class: "q-select__multi-value--hidden"
|
|
289
|
-
},
|
|
290
|
-
], 64)) : (
|
|
313
|
+
}, C(q(e) + je(t)), 513)) : d("v-if", !0)], 64))), 128))
|
|
314
|
+
], 64)) : (x(), u(T(o), {
|
|
291
315
|
key: 1,
|
|
292
316
|
pill: "",
|
|
293
317
|
disabled: g.readonly || g.disabled,
|
|
294
318
|
removable: !g.readonly && !g.disabled && !g.required,
|
|
295
319
|
texts: g.texts,
|
|
296
|
-
"onClick:remove":
|
|
320
|
+
"onClick:remove": Y
|
|
297
321
|
}, {
|
|
298
|
-
default:
|
|
322
|
+
default: O(() => [W.value[0]?.icon ? (x(), u(T(r), b(_({ key: 0 }, W.value[0].icon)), null, 16)) : d("v-if", !0), p(" " + C(q(W.value[0])), 1)]),
|
|
299
323
|
_: 1
|
|
300
324
|
}, 8, [
|
|
301
325
|
"disabled",
|
|
302
326
|
"removable",
|
|
303
327
|
"texts"
|
|
304
|
-
]))], 512)) : (
|
|
305
|
-
id: `${
|
|
328
|
+
]))], 512)) : (x(), f("span", ve, C(G.value), 1))], 64))]), me(oe("input", _({
|
|
329
|
+
id: `${T(j)}_input`,
|
|
306
330
|
ref: "input"
|
|
307
331
|
}, e.$attrs, {
|
|
308
|
-
"onUpdate:modelValue": a[0] ||= (e) =>
|
|
332
|
+
"onUpdate:modelValue": a[0] ||= (e) => G.value = e,
|
|
309
333
|
class: "q-select__input",
|
|
310
334
|
inputmode: "none",
|
|
311
335
|
type: "text",
|
|
312
336
|
autocomplete: "off",
|
|
313
337
|
tabindex: g.disabled ? -1 : 0,
|
|
314
338
|
role: "combobox",
|
|
315
|
-
"aria-expanded":
|
|
339
|
+
"aria-expanded": P.value,
|
|
340
|
+
"aria-controls": P.value ? M.value : void 0,
|
|
316
341
|
"aria-haspopup": "listbox",
|
|
317
|
-
"aria-keyshortcuts":
|
|
318
|
-
onKeydown:
|
|
319
|
-
}), null, 16,
|
|
342
|
+
"aria-keyshortcuts": K.value ? "Delete" : void 0,
|
|
343
|
+
onKeydown: Fe
|
|
344
|
+
}), null, 16, be), [[pe, G.value]])]),
|
|
320
345
|
_: 2
|
|
321
346
|
}, [W.value.length === 1 && W.value[0].icon && !g.badges || e.$slots.prepend ? {
|
|
322
347
|
name: "prepend",
|
|
323
|
-
fn:
|
|
348
|
+
fn: O(() => [S(e.$slots, "prepend"), W.value.length === 1 && W.value[0].icon && !g.badges ? (x(), u(T(r), b(_({ key: 0 }, W.value[0].icon)), null, 16)) : d("v-if", !0)]),
|
|
324
349
|
key: "0"
|
|
325
350
|
} : void 0, e.$slots.extras ? {
|
|
326
351
|
name: "extras",
|
|
327
|
-
fn:
|
|
352
|
+
fn: O(() => [S(e.$slots, "extras")]),
|
|
328
353
|
key: "1"
|
|
329
354
|
} : void 0]), 1032, [
|
|
330
355
|
"id",
|
|
@@ -337,32 +362,33 @@ var he = {
|
|
|
337
362
|
"data-loading",
|
|
338
363
|
"size",
|
|
339
364
|
"invalid"
|
|
340
|
-
]),
|
|
341
|
-
modelValue:
|
|
342
|
-
"onUpdate:modelValue": a[1] ||= (e) =>
|
|
365
|
+
]), m(T(re), {
|
|
366
|
+
modelValue: P.value,
|
|
367
|
+
"onUpdate:modelValue": a[1] ||= (e) => P.value = e,
|
|
343
368
|
spy: "",
|
|
344
369
|
trigger: "manual",
|
|
345
370
|
placement: "bottom-start",
|
|
346
371
|
width: "anchor",
|
|
347
372
|
"scroll-lock": "",
|
|
348
373
|
inline: g.inline,
|
|
349
|
-
anchor:
|
|
374
|
+
anchor: g.overlayAnchor ?? L.value?.fieldRef,
|
|
350
375
|
offset: 2,
|
|
351
|
-
onEnter:
|
|
352
|
-
onLeave:
|
|
376
|
+
onEnter: Ie,
|
|
377
|
+
onLeave: Le
|
|
353
378
|
}, {
|
|
354
|
-
default:
|
|
379
|
+
default: O(() => [oe("div", {
|
|
355
380
|
ref: "content",
|
|
356
381
|
"data-testid": "combobox-dropdown",
|
|
357
|
-
"data-key":
|
|
382
|
+
"data-key": T(j),
|
|
358
383
|
class: "q-select__body",
|
|
359
384
|
tabindex: "-1",
|
|
360
|
-
onFocusout:
|
|
361
|
-
onKeydown:
|
|
385
|
+
onFocusout: Me,
|
|
386
|
+
onKeydown: he(Z, ["stop"])
|
|
362
387
|
}, [
|
|
363
|
-
|
|
364
|
-
g.loading ? (
|
|
388
|
+
S(e.$slots, "body.prepend"),
|
|
389
|
+
g.loading ? (x(), f("div", Se, [m(T(t), { size: 24 })])) : (x(), u(T(ne), {
|
|
365
390
|
key: 1,
|
|
391
|
+
id: M.value,
|
|
366
392
|
ref: "list",
|
|
367
393
|
class: "q-select__items",
|
|
368
394
|
selectable: "",
|
|
@@ -373,21 +399,24 @@ var he = {
|
|
|
373
399
|
groups: s.groups,
|
|
374
400
|
"item-label": g.itemLabel,
|
|
375
401
|
"item-value": g.itemValue,
|
|
376
|
-
"
|
|
402
|
+
"select-on-tab": g.selectOnTab,
|
|
403
|
+
"onUpdate:modelValue": J
|
|
377
404
|
}, {
|
|
378
|
-
item:
|
|
405
|
+
item: O(({ item: t }) => [S(e.$slots, "item", { item: t })]),
|
|
379
406
|
_: 3
|
|
380
407
|
}, 8, [
|
|
408
|
+
"id",
|
|
381
409
|
"required",
|
|
382
410
|
"multiple",
|
|
383
411
|
"model-value",
|
|
384
412
|
"items",
|
|
385
413
|
"groups",
|
|
386
414
|
"item-label",
|
|
387
|
-
"item-value"
|
|
415
|
+
"item-value",
|
|
416
|
+
"select-on-tab"
|
|
388
417
|
])),
|
|
389
|
-
|
|
390
|
-
], 40,
|
|
418
|
+
S(e.$slots, "body.append")
|
|
419
|
+
], 40, xe)]),
|
|
391
420
|
_: 3
|
|
392
421
|
}, 8, [
|
|
393
422
|
"modelValue",
|
|
@@ -397,4 +426,4 @@ var he = {
|
|
|
397
426
|
}
|
|
398
427
|
});
|
|
399
428
|
//#endregion
|
|
400
|
-
export {
|
|
429
|
+
export { k as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const QSelect: {
|
|
2
2
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3
3
|
modelValue?: any;
|
|
4
|
+
open?: boolean;
|
|
4
5
|
} & import('../../types/component').QBaseComponentProps & {
|
|
5
6
|
label?: string;
|
|
6
7
|
required?: boolean;
|
|
@@ -17,6 +18,8 @@ declare const QSelect: {
|
|
|
17
18
|
groups?: import('..').Group[];
|
|
18
19
|
clearable?: boolean;
|
|
19
20
|
inline?: boolean;
|
|
21
|
+
overlayAnchor?: import('..').QOverlayAnchor;
|
|
22
|
+
selectOnTab?: boolean;
|
|
20
23
|
multiple?: boolean;
|
|
21
24
|
badges?: boolean;
|
|
22
25
|
loading?: boolean;
|
|
@@ -31,8 +34,12 @@ declare const QSelect: {
|
|
|
31
34
|
onShow?: (() => any) | undefined;
|
|
32
35
|
"onBefore-show"?: (() => any) | undefined;
|
|
33
36
|
"onBefore-hide"?: (() => any) | undefined;
|
|
34
|
-
|
|
37
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
focusList: () => void;
|
|
40
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
35
41
|
"update:modelValue": (value: any) => any;
|
|
42
|
+
"update:open": (value: boolean) => any;
|
|
36
43
|
} & {
|
|
37
44
|
hide: () => any;
|
|
38
45
|
show: () => any;
|
|
@@ -42,6 +49,7 @@ declare const QSelect: {
|
|
|
42
49
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
43
50
|
texts: typeof import('./constants').DEFAULT_TEXTS;
|
|
44
51
|
groups: import('..').Group[];
|
|
52
|
+
selectOnTab: boolean;
|
|
45
53
|
itemValue: string;
|
|
46
54
|
itemLabel: string;
|
|
47
55
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
@@ -451,6 +459,7 @@ declare const QSelect: {
|
|
|
451
459
|
Defaults: {};
|
|
452
460
|
}, Readonly<{
|
|
453
461
|
modelValue?: any;
|
|
462
|
+
open?: boolean;
|
|
454
463
|
} & import('../../types/component').QBaseComponentProps & {
|
|
455
464
|
label?: string;
|
|
456
465
|
required?: boolean;
|
|
@@ -467,6 +476,8 @@ declare const QSelect: {
|
|
|
467
476
|
groups?: import('..').Group[];
|
|
468
477
|
clearable?: boolean;
|
|
469
478
|
inline?: boolean;
|
|
479
|
+
overlayAnchor?: import('..').QOverlayAnchor;
|
|
480
|
+
selectOnTab?: boolean;
|
|
470
481
|
multiple?: boolean;
|
|
471
482
|
badges?: boolean;
|
|
472
483
|
loading?: boolean;
|
|
@@ -481,10 +492,14 @@ declare const QSelect: {
|
|
|
481
492
|
onShow?: (() => any) | undefined;
|
|
482
493
|
"onBefore-show"?: (() => any) | undefined;
|
|
483
494
|
"onBefore-hide"?: (() => any) | undefined;
|
|
484
|
-
|
|
495
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
496
|
+
}>, {
|
|
497
|
+
focusList: () => void;
|
|
498
|
+
}, {}, {}, {}, {
|
|
485
499
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
486
500
|
texts: typeof import('./constants').DEFAULT_TEXTS;
|
|
487
501
|
groups: import('..').Group[];
|
|
502
|
+
selectOnTab: boolean;
|
|
488
503
|
itemValue: string;
|
|
489
504
|
itemLabel: string;
|
|
490
505
|
}>;
|
|
@@ -493,6 +508,7 @@ declare const QSelect: {
|
|
|
493
508
|
__isSuspense?: never;
|
|
494
509
|
} & import('vue').ComponentOptionsBase<Readonly<{
|
|
495
510
|
modelValue?: any;
|
|
511
|
+
open?: boolean;
|
|
496
512
|
} & import('../../types/component').QBaseComponentProps & {
|
|
497
513
|
label?: string;
|
|
498
514
|
required?: boolean;
|
|
@@ -509,6 +525,8 @@ declare const QSelect: {
|
|
|
509
525
|
groups?: import('..').Group[];
|
|
510
526
|
clearable?: boolean;
|
|
511
527
|
inline?: boolean;
|
|
528
|
+
overlayAnchor?: import('..').QOverlayAnchor;
|
|
529
|
+
selectOnTab?: boolean;
|
|
512
530
|
multiple?: boolean;
|
|
513
531
|
badges?: boolean;
|
|
514
532
|
loading?: boolean;
|
|
@@ -523,8 +541,12 @@ declare const QSelect: {
|
|
|
523
541
|
onShow?: (() => any) | undefined;
|
|
524
542
|
"onBefore-show"?: (() => any) | undefined;
|
|
525
543
|
"onBefore-hide"?: (() => any) | undefined;
|
|
526
|
-
|
|
544
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
545
|
+
}>, {
|
|
546
|
+
focusList: () => void;
|
|
547
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
527
548
|
"update:modelValue": (value: any) => any;
|
|
549
|
+
"update:open": (value: boolean) => any;
|
|
528
550
|
} & {
|
|
529
551
|
hide: () => any;
|
|
530
552
|
show: () => any;
|
|
@@ -534,11 +556,17 @@ declare const QSelect: {
|
|
|
534
556
|
icons: typeof import('./constants').DEFAULT_ICONS;
|
|
535
557
|
texts: typeof import('./constants').DEFAULT_TEXTS;
|
|
536
558
|
groups: import('..').Group[];
|
|
559
|
+
selectOnTab: boolean;
|
|
537
560
|
itemValue: string;
|
|
538
561
|
itemLabel: string;
|
|
539
562
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
540
563
|
$slots: {
|
|
541
564
|
prepend?(_: {}): any;
|
|
565
|
+
value?(_: {
|
|
566
|
+
empty: boolean;
|
|
567
|
+
items: import('..').Item[];
|
|
568
|
+
value: any;
|
|
569
|
+
}): any;
|
|
542
570
|
append?(_: {}): any;
|
|
543
571
|
extras?(_: {}): any;
|
|
544
572
|
'body.prepend'?(_: {}): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QSelect/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QSelect/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAOq70B,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAP/g1B,CAAA;AAGzC,OAAO,EAAE,OAAO,EAAE,CAAA;AAGlB,cAAc,SAAS,CAAA"}
|