@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.
Files changed (130) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/dist/json/api.json +1414 -45
  3. package/dist/manifest/components.json +2 -0
  4. package/dist/ui.css +1374 -5
  5. package/dist/ui.esm.js +1459 -841
  6. package/dist/ui.js +1444 -826
  7. package/dist/ui.min.css +2 -1
  8. package/dist/ui.min.js +1444 -826
  9. package/dist/ui.scss +569 -7
  10. package/esm/components/QField/QField.d.ts.map +1 -1
  11. package/esm/components/QField/QField.vue.js +1 -1
  12. package/esm/components/QGauge/QGauge.d.ts +56 -0
  13. package/esm/components/QGauge/QGauge.d.ts.map +1 -0
  14. package/esm/components/QGauge/QGauge.vue.js +305 -0
  15. package/esm/components/QGauge/QGauge2.vue.js +5 -0
  16. package/esm/components/QGauge/constants.d.ts +6 -0
  17. package/esm/components/QGauge/constants.d.ts.map +1 -0
  18. package/esm/components/QGauge/constants.js +8 -0
  19. package/esm/components/QGauge/index.d.ts +124 -0
  20. package/esm/components/QGauge/index.d.ts.map +1 -0
  21. package/esm/components/QGauge/index.js +6 -0
  22. package/esm/components/QGauge/types.d.ts +146 -0
  23. package/esm/components/QGauge/types.d.ts.map +1 -0
  24. package/esm/components/QInputGroup/QInputGroup.d.ts +147 -3
  25. package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
  26. package/esm/components/QInputGroup/QInputGroup.vue.js +32 -23
  27. package/esm/components/QInputGroup/index.d.ts +81 -4
  28. package/esm/components/QInputGroup/index.d.ts.map +1 -1
  29. package/esm/components/QList/QList.d.ts.map +1 -1
  30. package/esm/components/QList/QList.vue.js +3 -1
  31. package/esm/components/QList/QListItem.d.ts.map +1 -1
  32. package/esm/components/QList/QListItem.vue.js +24 -28
  33. package/esm/components/QList/types.d.ts +1 -1
  34. package/esm/components/QOverlay/types.d.ts +3 -1
  35. package/esm/components/QOverlay/types.d.ts.map +1 -1
  36. package/esm/components/QPhoneField/QPhoneField.d.ts +2263 -0
  37. package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -0
  38. package/esm/components/QPhoneField/QPhoneField.vue.js +478 -0
  39. package/esm/components/QPhoneField/QPhoneField2.vue.js +5 -0
  40. package/esm/components/QPhoneField/constants.d.ts +11 -0
  41. package/esm/components/QPhoneField/constants.d.ts.map +1 -0
  42. package/esm/components/QPhoneField/constants.js +14 -0
  43. package/esm/components/QPhoneField/index.d.ts +1253 -0
  44. package/esm/components/QPhoneField/index.d.ts.map +1 -0
  45. package/esm/components/QPhoneField/index.js +6 -0
  46. package/esm/components/QPhoneField/types.d.ts +108 -0
  47. package/esm/components/QPhoneField/types.d.ts.map +1 -0
  48. package/esm/components/QSelect/QSelect.d.ts +16 -1
  49. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  50. package/esm/components/QSelect/QSelect.vue.js +158 -129
  51. package/esm/components/QSelect/index.d.ts +31 -3
  52. package/esm/components/QSelect/index.d.ts.map +1 -1
  53. package/esm/components/QSelect/types.d.ts +13 -0
  54. package/esm/components/QSelect/types.d.ts.map +1 -1
  55. package/esm/components/index.d.ts +2 -0
  56. package/esm/components/index.d.ts.map +1 -1
  57. package/esm/components/index.js +64 -60
  58. package/esm/composables/useColor/index.d.ts +8 -0
  59. package/esm/composables/useColor/index.d.ts.map +1 -1
  60. package/esm/composables/useColor/index.js +16 -18
  61. package/esm/composables/useDialog/index.d.ts +2 -88
  62. package/esm/composables/useDialog/index.d.ts.map +1 -1
  63. package/esm/composables/useDialog/index.js +6 -6
  64. package/esm/composables/useDialog/types.d.ts +14 -4
  65. package/esm/composables/useDialog/types.d.ts.map +1 -1
  66. package/esm/index.d.ts +2 -0
  67. package/esm/vendors/country-flag-icons/modules/countries.json.js +4 -0
  68. package/esm/vendors/country-flag-icons/modules/hasFlag.js +7 -0
  69. package/esm/vendors/libphonenumber-js/es6/AsYouType.js +312 -0
  70. package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +142 -0
  71. package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js +145 -0
  72. package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +45 -0
  73. package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.js +258 -0
  74. package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.util.js +57 -0
  75. package/esm/vendors/libphonenumber-js/es6/AsYouTypeParser.js +242 -0
  76. package/esm/vendors/libphonenumber-js/es6/AsYouTypeState.js +115 -0
  77. package/esm/vendors/libphonenumber-js/es6/ParseError.js +116 -0
  78. package/esm/vendors/libphonenumber-js/es6/PhoneNumber.js +164 -0
  79. package/esm/vendors/libphonenumber-js/es6/constants.js +4 -0
  80. package/esm/vendors/libphonenumber-js/es6/format.js +77 -0
  81. package/esm/vendors/libphonenumber-js/es6/formatIncompletePhoneNumber.js +7 -0
  82. package/esm/vendors/libphonenumber-js/es6/getCountries.js +7 -0
  83. package/esm/vendors/libphonenumber-js/es6/getExampleNumber.js +7 -0
  84. package/esm/vendors/libphonenumber-js/es6/helpers/RFC3966.js +9 -0
  85. package/esm/vendors/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +7 -0
  86. package/esm/vendors/libphonenumber-js/es6/helpers/checkNumberLength.js +21 -0
  87. package/esm/vendors/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +11 -0
  88. package/esm/vendors/libphonenumber-js/es6/helpers/extension/extractExtension.js +16 -0
  89. package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +36 -0
  90. package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +21 -0
  91. package/esm/vendors/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +18 -0
  92. package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumber.js +27 -0
  93. package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +27 -0
  94. package/esm/vendors/libphonenumber-js/es6/helpers/extractPhoneContext.js +15 -0
  95. package/esm/vendors/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +11 -0
  96. package/esm/vendors/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +13 -0
  97. package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +12 -0
  98. package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +43 -0
  99. package/esm/vendors/libphonenumber-js/es6/helpers/getIddPrefix.js +10 -0
  100. package/esm/vendors/libphonenumber-js/es6/helpers/getNumberType.js +61 -0
  101. package/esm/vendors/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +14 -0
  102. package/esm/vendors/libphonenumber-js/es6/helpers/isCallingCode.js +7 -0
  103. package/esm/vendors/libphonenumber-js/es6/helpers/isCountryCode.js +7 -0
  104. package/esm/vendors/libphonenumber-js/es6/helpers/isObject.js +7 -0
  105. package/esm/vendors/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +12 -0
  106. package/esm/vendors/libphonenumber-js/es6/helpers/matchesEntirely.js +6 -0
  107. package/esm/vendors/libphonenumber-js/es6/helpers/mergeArrays.js +39 -0
  108. package/esm/vendors/libphonenumber-js/es6/helpers/parseDigits.js +82 -0
  109. package/esm/vendors/libphonenumber-js/es6/helpers/stripIddPrefix.js +18 -0
  110. package/esm/vendors/libphonenumber-js/es6/isPossible.js +32 -0
  111. package/esm/vendors/libphonenumber-js/es6/isValid.js +11 -0
  112. package/esm/vendors/libphonenumber-js/es6/metadata.js +474 -0
  113. package/esm/vendors/libphonenumber-js/es6/normalizeArguments.js +110 -0
  114. package/esm/vendors/libphonenumber-js/es6/parse.js +103 -0
  115. package/esm/vendors/libphonenumber-js/es6/parseIncompletePhoneNumber.js +48 -0
  116. package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber.js +9 -0
  117. package/esm/vendors/libphonenumber-js/es6/parsePhoneNumberWithError_.js +58 -0
  118. package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber_.js +66 -0
  119. package/esm/vendors/libphonenumber-js/es6/tools/semver-compare.js +14 -0
  120. package/esm/vendors/libphonenumber-js/examples.mobile.json.js +250 -0
  121. package/esm/vendors/libphonenumber-js/max/exports/AsYouType.js +9 -0
  122. package/esm/vendors/libphonenumber-js/max/exports/formatIncompletePhoneNumber.js +8 -0
  123. package/esm/vendors/libphonenumber-js/max/exports/getCountries.js +8 -0
  124. package/esm/vendors/libphonenumber-js/max/exports/getCountryCallingCode.js +8 -0
  125. package/esm/vendors/libphonenumber-js/max/exports/getExampleNumber.js +8 -0
  126. package/esm/vendors/libphonenumber-js/max/exports/isSupportedCountry.js +8 -0
  127. package/esm/vendors/libphonenumber-js/max/exports/parsePhoneNumber.js +8 -0
  128. package/esm/vendors/libphonenumber-js/max/exports/withMetadataArgument.js +8 -0
  129. package/esm/vendors/libphonenumber-js/metadata.max.json.js +10489 -0
  130. 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 { QPopover as ie } from "../QPopover/index.js";
13
- import { DEFAULT_ICONS as s, DEFAULT_TEXTS as ae } from "./constants.js";
14
- import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as oe, createTextVNode as m, createVNode as h, defineComponent as g, mergeModels as _, mergeProps as v, nextTick as y, normalizeClass as b, normalizeProps as x, onBeforeUnmount as se, onMounted as ce, openBlock as S, ref as le, renderList as ue, renderSlot as C, toDisplayString as w, toRef as T, unref as E, useModel as de, useTemplateRef as D, vModelText as fe, watch as O, withCtx as k, withDirectives as pe, withModifiers as me } from "vue";
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 he = {
16
+ var ge = {
17
17
  key: 0,
18
18
  ref: "valueContainer",
19
19
  class: "q-select__value-container"
20
- }, ge = {
20
+ }, _e = {
21
21
  key: 1,
22
22
  class: "q-select__multi-value"
23
- }, _e = {
23
+ }, ve = {
24
24
  key: 1,
25
25
  class: "q-select__value"
26
- }, ve = {
26
+ }, ye = {
27
27
  key: 1,
28
28
  class: "q-select__placeholder"
29
- }, ye = [
29
+ }, be = [
30
30
  "id",
31
31
  "tabindex",
32
32
  "aria-expanded",
33
+ "aria-controls",
33
34
  "aria-keyshortcuts"
34
- ], be = ["data-key"], xe = {
35
+ ], xe = ["data-key"], Se = {
35
36
  key: 0,
36
37
  class: "q-select__loader"
37
- }, A = /*@__PURE__*/ g({
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: () => ae }
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: ae }) {
74
- let g = s, _ = ae, A = de(s, "modelValue"), j = a(T(g, "id")), { active: M } = e({
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: T(g, "required"),
77
- multiple: T(g, "multiple")
78
- }), N = le(!1), P = le(0), F = D("trigger"), Se = D("input"), Ce = D("list"), I = D("content"), L = D("valueContainer"), R = D("allBadges"), z = D("allPlainTexts"), B = D("hiddenItemsCountBadge"), V = null, H = null;
79
- function we() {
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
- ce(() => {
95
+ le(() => {
85
96
  $();
86
- let e = F.value?.fieldRef;
97
+ let e = L.value?.fieldRef;
87
98
  e && (V = new ResizeObserver(() => {
88
- we();
99
+ De();
89
100
  }), V.observe(e));
90
- }), se(() => {
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) => Te(e)).filter((e) => !!e);
95
- let e = A.value === void 0 ? void 0 : Te(A.value);
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
- }), G = l(() => {
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
- }), K = l(() => W.value?.map(J).filter(Boolean).join(", ")), q = l(() => g.clearable && !g.readonly && !g.disabled && !g.loading && !U.value);
103
- function Te(e) {
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 Ee(e) {
107
- g.multiple && e < A.value.length && (!g.required || A.value.length > 1) ? M.value = A.value.toSpliced(e, 1) : X();
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 J(e) {
120
+ function q(e) {
110
121
  return e?.[g.itemLabel] ?? "";
111
122
  }
112
- function De(e) {
113
- return e + 1 < W.value.length - P.value ? ", " : "";
123
+ function je(e) {
124
+ return e + 1 < W.value.length - F.value ? ", " : "";
114
125
  }
115
- function Y(e) {
116
- Array.isArray(e) ? A.value = e.sort((e, t) => G.value.get(e) - G.value.get(t)) : (A.value = e, Z());
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 X() {
119
- Y(g.emptyValue), Pe();
129
+ function Y() {
130
+ J(g.emptyValue), Re();
120
131
  }
121
- function Oe(e) {
122
- !I.value?.contains(e.relatedTarget) && !F.value?.fieldRef?.contains(e.relatedTarget) && Z();
132
+ function Me(e) {
133
+ !R.value?.contains(e.relatedTarget) && !L.value?.fieldRef?.contains(e.relatedTarget) && X(!1);
123
134
  }
124
- function ke() {
125
- N.value ||= (_("before-show"), !0);
135
+ function Ne() {
136
+ P.value || g.readonly || g.disabled || (I = !0, k("before-show"), P.value = !0);
126
137
  }
127
- function Z() {
128
- N.value &&= (_("before-hide"), !1);
138
+ function X(e = !0) {
139
+ P.value &&= (I = e, k("before-hide"), !1);
129
140
  }
130
- function Ae() {
131
- g.readonly || g.disabled || (N.value ? Z() : ke());
141
+ function Pe() {
142
+ g.readonly || g.disabled || (P.value ? X() : Ne());
132
143
  }
133
- function Q(e) {
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) && ke(), ["Escape", "Tab"].includes(e.key) && (N.value ? Z() : q.value && e.key === "Escape" && X()), q.value && e.key === "Delete" && X());
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 je(e) {
149
- e.key.length === 1 && e.preventDefault(), Q(e);
159
+ function Fe(e) {
160
+ e.key.length === 1 && e.preventDefault(), Z(e);
150
161
  }
151
- async function Me() {
152
- await y(), g.loading ? I.value?.focus() : Fe(), _("show");
162
+ async function Ie() {
163
+ await v(), g.loading ? R.value?.focus() : Q(), k("show");
153
164
  }
154
- function Ne() {
155
- Pe(), _("hide");
165
+ function Le() {
166
+ I && Re(), I = !0, k("hide");
156
167
  }
157
- function Pe() {
158
- Se.value?.focus();
168
+ function Re() {
169
+ Ce.value?.focus();
159
170
  }
160
- function Fe() {
161
- Ce.value?.$el.focus();
171
+ function Q() {
172
+ we.value?.$el.focus();
162
173
  }
163
174
  async function $() {
164
- if (await y(), await y(), !g.multiple || !L.value || U.value) {
165
- P.value = 0;
175
+ if (await v(), await v(), !g.multiple || !z.value || U.value) {
176
+ F.value = 0;
166
177
  return;
167
178
  }
168
- let e = L.value.offsetWidth, t = B.value?.$el.scrollWidth ?? 30, n = t, r = 0;
169
- if (g.badges) for (let i of R.value ?? []) {
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 z.value ?? []) {
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
- P.value = (g.badges ? R.value?.length ?? 0 : z.value?.length ?? 0) - r;
190
+ F.value = (g.badges ? B.value?.length ?? 0 : Te.value?.length ?? 0) - r;
180
191
  }
181
- return O(() => g.loading, (e) => {
182
- !e && N.value && y(Fe);
183
- }), O(() => g.badges, $), O(W, $, { deep: !0 }), O(() => g.clearable, $), O(M, Y), (e, a) => (S(), f(c, null, [h(E(ee), {
184
- id: E(j),
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: b([
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: Ae,
203
- onKeydown: Q
204
- }, oe({
205
- append: k(() => [
206
- C(e.$slots, "append"),
207
- q.value ? (S(), u(E(te), {
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: X
231
+ onClick: Y
212
232
  }, null, 8, ["icons", "texts"])) : d("v-if", !0),
213
- g.readonly ? d("v-if", !0) : (S(), u(E(n), {
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: Ae
242
+ onClick: Pe
223
243
  }, {
224
- default: k(() => [h(E(i), {
225
- "model-value": N.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: k(() => [U.value ? (S(), f("span", ve, [!g.readonly && !g.disabled ? (S(), f(c, { key: 0 }, [m(w(g.texts.placeholder), 1)], 64)) : d("v-if", !0)])) : (S(), f(c, { key: 0 }, [g.badges || g.multiple ? (S(), f("span", he, [g.multiple ? (S(), f(c, { key: 0 }, [
232
- (S(!0), f(c, null, ue(W.value, (e, t) => (S(), f(c, { key: `visible-${t}` }, [t < W.value.length - P.value ? (S(), f(c, { key: 0 }, [g.badges ? (S(), u(E(o), {
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": () => Ee(t)
263
+ "onClick:remove": () => Ae(t)
240
264
  }, {
241
- default: k(() => [e?.icon ? (S(), u(E(r), v({
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), m(" " + w(J(e)), 1)]),
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 ? (S(), f("span", ge, w(J(e) + De(t)), 1)) : d("v-if", !0)], 64)) : d("v-if", !0)], 64))), 128)),
253
- P.value > 0 ? (S(), f(c, { key: 0 }, [h(E(o), {
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: b(["q-select__badge-count", { "q-select__badge-count--clickable": g.readonly || g.disabled }])
280
+ class: y(["q-select__badge-count", { "q-select__badge-count--clickable": g.readonly || g.disabled }])
257
281
  }, {
258
- default: k(() => [m(" +" + w(P.value), 1)]),
282
+ default: O(() => [p(" +" + C(F.value), 1)]),
259
283
  _: 1
260
- }, 8, ["class"]), g.readonly || g.disabled ? (S(), u(E(ie), {
284
+ }, 8, ["class"]), g.readonly || g.disabled ? (x(), u(T(ae), {
261
285
  key: 0,
262
- anchor: B.value?.$el,
263
- text: K.value,
286
+ anchor: Ee.value?.$el,
287
+ text: G.value,
264
288
  placement: "bottom-start"
265
289
  }, {
266
- default: k(() => [m(w(K.value), 1)]),
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
- (S(!0), f(c, null, ue(W.value, (e, t) => (S(), f(c, { key: `measure-${t}` }, [g.badges ? (S(), u(E(o), {
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: k(() => [e?.icon ? (S(), u(E(r), v({
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), m(" " + w(J(e)), 1)]),
306
+ }, e.icon), null, 16)) : d("v-if", !0), p(" " + C(q(e)), 1)]),
283
307
  _: 2
284
- }, 1032, ["color", "removable"])) : g.multiple ? (S(), f("span", {
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
- }, w(J(e) + De(t)), 513)) : d("v-if", !0)], 64))), 128))
290
- ], 64)) : (S(), u(E(o), {
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": X
320
+ "onClick:remove": Y
297
321
  }, {
298
- default: k(() => [W.value[0]?.icon ? (S(), u(E(r), x(v({ key: 0 }, W.value[0].icon)), null, 16)) : d("v-if", !0), m(" " + w(J(W.value[0])), 1)]),
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)) : (S(), f("span", _e, w(K.value), 1))], 64)), pe(p("input", v({
305
- id: `${E(j)}_input`,
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) => K.value = 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": N.value,
339
+ "aria-expanded": P.value,
340
+ "aria-controls": P.value ? M.value : void 0,
316
341
  "aria-haspopup": "listbox",
317
- "aria-keyshortcuts": q.value ? "Delete" : void 0,
318
- onKeydown: je
319
- }), null, 16, ye), [[fe, K.value]])]),
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: k(() => [C(e.$slots, "prepend"), W.value.length === 1 && W.value[0].icon && !g.badges ? (S(), u(E(r), x(v({ key: 0 }, W.value[0].icon)), null, 16)) : d("v-if", !0)]),
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: k(() => [C(e.$slots, "extras")]),
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
- ]), h(E(re), {
341
- modelValue: N.value,
342
- "onUpdate:modelValue": a[1] ||= (e) => N.value = 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: F.value?.fieldRef,
374
+ anchor: g.overlayAnchor ?? L.value?.fieldRef,
350
375
  offset: 2,
351
- onEnter: Me,
352
- onLeave: Ne
376
+ onEnter: Ie,
377
+ onLeave: Le
353
378
  }, {
354
- default: k(() => [p("div", {
379
+ default: O(() => [oe("div", {
355
380
  ref: "content",
356
381
  "data-testid": "combobox-dropdown",
357
- "data-key": E(j),
382
+ "data-key": T(j),
358
383
  class: "q-select__body",
359
384
  tabindex: "-1",
360
- onFocusout: Oe,
361
- onKeydown: me(Q, ["stop"])
385
+ onFocusout: Me,
386
+ onKeydown: he(Z, ["stop"])
362
387
  }, [
363
- C(e.$slots, "body.prepend"),
364
- g.loading ? (S(), f("div", xe, [h(E(t), { size: 24 })])) : (S(), u(E(ne), {
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
- "onUpdate:modelValue": Y
402
+ "select-on-tab": g.selectOnTab,
403
+ "onUpdate:modelValue": J
377
404
  }, {
378
- item: k(({ item: t }) => [C(e.$slots, "item", { item: t })]),
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
- C(e.$slots, "body.append")
390
- ], 40, be)]),
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 { A as default };
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
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
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
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
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"}