@8wave/ai-elements 0.126.0-beta.35 → 0.126.0-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{PkChatbotFilePreview-Cw3va5vW.js → PkChatbotFilePreview-CLUH7cTq.js} +2 -2
- package/dist/_chunks/{PkChatbotFilePreview-Cw3va5vW.js.map → PkChatbotFilePreview-CLUH7cTq.js.map} +1 -1
- package/dist/_chunks/{PkEditorRadioButtons-CY0D_EkU.js → PkEditorRadioButtons-YSngp-Wn.js} +2 -2
- package/dist/_chunks/{PkEditorRadioButtons-CY0D_EkU.js.map → PkEditorRadioButtons-YSngp-Wn.js.map} +1 -1
- package/dist/_chunks/{PkFilePreview-D4TgY0T9.js → PkFilePreview-BHqmp1EW.js} +5 -5
- package/dist/_chunks/{PkFilePreview-D4TgY0T9.js.map → PkFilePreview-BHqmp1EW.js.map} +1 -1
- package/dist/_chunks/{PkFilePreviewDialog-8H1GeV91.js → PkFilePreviewDialog-BHAgVlKs.js} +3 -3
- package/dist/_chunks/{PkFilePreviewDialog-8H1GeV91.js.map → PkFilePreviewDialog-BHAgVlKs.js.map} +1 -1
- package/dist/_chunks/{PkHeldImage-B6UYQ8Ox.js → PkHeldImage-WGwFM77v.js} +2 -2
- package/dist/_chunks/{PkHeldImage-B6UYQ8Ox.js.map → PkHeldImage-WGwFM77v.js.map} +1 -1
- package/dist/_chunks/{PkImageEditorDialog-BqHjVX97.js → PkImageEditorDialog-BDwL39Du.js} +18 -18
- package/dist/_chunks/{PkImageEditorDialog-BqHjVX97.js.map → PkImageEditorDialog-BDwL39Du.js.map} +1 -1
- package/dist/_chunks/{PkLazyImg-D3XOz-dS.js → PkLazyImg-DL7hxjyy.js} +2 -2
- package/dist/_chunks/{PkLazyImg-D3XOz-dS.js.map → PkLazyImg-DL7hxjyy.js.map} +1 -1
- package/dist/_chunks/{PkSelectionActions-BxUXWFNK.js → PkSelectionActions-DLsZ8-gW.js} +2 -2
- package/dist/_chunks/{PkSelectionActions-BxUXWFNK.js.map → PkSelectionActions-DLsZ8-gW.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-CSBzfuyE.js → PkToolChatFile-62j1S0Pq.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-CSBzfuyE.js.map → PkToolChatFile-62j1S0Pq.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-DNzNRszE.js → PkToolRequestGeolocation-B9EM_K6O.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-DNzNRszE.js.map → PkToolRequestGeolocation-B9EM_K6O.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-BDxYXz4s.js → PkToolRequestOAuthConnection-CfjfqCHX.js} +3 -3
- package/dist/_chunks/{PkToolRequestOAuthConnection-BDxYXz4s.js.map → PkToolRequestOAuthConnection-CfjfqCHX.js.map} +1 -1
- package/dist/_chunks/{PkToolShareDocument-Kq7SFbw5.js → PkToolShareDocument-CYBU4LPO.js} +3 -3
- package/dist/_chunks/{PkToolShareDocument-Kq7SFbw5.js.map → PkToolShareDocument-CYBU4LPO.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-d5tKvM01.js → PkToolShowArtifact-I_QZS7Pf.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-d5tKvM01.js.map → PkToolShowArtifact-I_QZS7Pf.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-fMI-paCP.js → PkToolShowCalendarEvent-js9lh-cX.js} +3 -3
- package/dist/_chunks/{PkToolShowCalendarEvent-fMI-paCP.js.map → PkToolShowCalendarEvent-js9lh-cX.js.map} +1 -1
- package/dist/_chunks/{PkToolShowChart-lLXuHRJu.js → PkToolShowChart-BalU3bxm.js} +3 -3
- package/dist/_chunks/{PkToolShowChart-lLXuHRJu.js.map → PkToolShowChart-BalU3bxm.js.map} +1 -1
- package/dist/_chunks/{PkToolShowComparison-CKSqPgJo.js → PkToolShowComparison-DeO7cMeF.js} +3 -3
- package/dist/_chunks/{PkToolShowComparison-CKSqPgJo.js.map → PkToolShowComparison-DeO7cMeF.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-Bni1QzXV.js → PkToolShowContactForm-BeJ5GR6t.js} +5 -5
- package/dist/_chunks/{PkToolShowContactForm-Bni1QzXV.js.map → PkToolShowContactForm-BeJ5GR6t.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-DWVSCu33.js → PkToolShowDiagram-j3TTzZ5I.js} +3 -3
- package/dist/_chunks/{PkToolShowDiagram-DWVSCu33.js.map → PkToolShowDiagram-j3TTzZ5I.js.map} +1 -1
- package/dist/_chunks/{PkToolShowEmail-D6Mw24jB.js → PkToolShowEmail-CQ4uyty9.js} +3 -3
- package/dist/_chunks/{PkToolShowEmail-D6Mw24jB.js.map → PkToolShowEmail-CQ4uyty9.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-CFXtO0j4.js → PkToolShowForm-B9VDoS_W.js} +15 -15
- package/dist/_chunks/{PkToolShowForm-CFXtO0j4.js.map → PkToolShowForm-B9VDoS_W.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-Ci_Kg44s.js → PkToolShowImageGallery-DFuc5IJ1.js} +3 -3
- package/dist/_chunks/{PkToolShowImageGallery-Ci_Kg44s.js.map → PkToolShowImageGallery-DFuc5IJ1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-DV0puCbD.js → PkToolShowLocation-PThC5tCV.js} +3 -3
- package/dist/_chunks/{PkToolShowLocation-DV0puCbD.js.map → PkToolShowLocation-PThC5tCV.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-Bq2dbSy1.js → PkToolShowMessage-9mlI4IQ6.js} +3 -3
- package/dist/_chunks/{PkToolShowMessage-Bq2dbSy1.js.map → PkToolShowMessage-9mlI4IQ6.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-BWWzkWWA.js → PkToolShowProductList-C2EJKYOV.js} +4 -4
- package/dist/_chunks/{PkToolShowProductList-BWWzkWWA.js.map → PkToolShowProductList-C2EJKYOV.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-DZkJIyMF.js → PkToolShowQrCode-DQiVo4Vh.js} +3 -3
- package/dist/_chunks/{PkToolShowQrCode-DZkJIyMF.js.map → PkToolShowQrCode-DQiVo4Vh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-Dv7hbDyy.js → PkToolShowSources-BL3DnfcN.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-Dv7hbDyy.js.map → PkToolShowSources-BL3DnfcN.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-B_dRrZfj.js → PkToolShowSuggestedReply-DLgtjBJ1.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-B_dRrZfj.js.map → PkToolShowSuggestedReply-DLgtjBJ1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DLgQjTq_.js → PkToolShowVideo-DcWXDcOZ.js} +3 -3
- package/dist/_chunks/{PkToolShowVideo-DLgQjTq_.js.map → PkToolShowVideo-DcWXDcOZ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-HElfkyLV.js → PkToolShowWeather-DLT47oC6.js} +2 -2
- package/dist/_chunks/{PkToolShowWeather-HElfkyLV.js.map → PkToolShowWeather-DLT47oC6.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-XxcYBQpr.js → PkToolShowWebPages-CPqMC6qt.js} +4 -4
- package/dist/_chunks/{PkToolShowWebPages-XxcYBQpr.js.map → PkToolShowWebPages-CPqMC6qt.js.map} +1 -1
- package/dist/_chunks/{VvButtonLocalized-BgY-V26j.js → VvButtonLocalized-D_gumqSJ.js} +2 -2
- package/dist/_chunks/{VvButtonLocalized-BgY-V26j.js.map → VvButtonLocalized-D_gumqSJ.js.map} +1 -1
- package/dist/_chunks/{VvCheckbox.es-KisDJtH_.js → VvCheckbox.es-D44kGZc-.js} +2 -2
- package/dist/_chunks/{VvCheckbox.es-KisDJtH_.js.map → VvCheckbox.es-D44kGZc-.js.map} +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-CIVHYElp.js → VvCheckboxGroup.es-Da5Vuel0.js} +2 -2
- package/dist/_chunks/{VvCheckboxGroup.es-CIVHYElp.js.map → VvCheckboxGroup.es-Da5Vuel0.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-DybZ6U_6.js → VvCombobox.es-BJzmLeTh.js} +467 -403
- package/dist/_chunks/VvCombobox.es-BJzmLeTh.js.map +1 -0
- package/dist/_chunks/{VvInputText.es-DFSPWDcH.js → VvInputText.es-CHcdm2K-.js} +280 -218
- package/dist/_chunks/VvInputText.es-CHcdm2K-.js.map +1 -0
- package/dist/_chunks/{VvRadio.es-vrNSXb3X.js → VvRadio.es-B3IskaN4.js} +2 -2
- package/dist/_chunks/{VvRadio.es-vrNSXb3X.js.map → VvRadio.es-B3IskaN4.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-DalxMbrj.js → VvRadioGroup.es-CBivcD0v.js} +2 -2
- package/dist/_chunks/{VvRadioGroup.es-DalxMbrj.js.map → VvRadioGroup.es-CBivcD0v.js.map} +1 -1
- package/dist/_chunks/{VvSelect.es-D55xq4Lw.js → VvSelect.es-CAVvkyxB.js} +2 -2
- package/dist/_chunks/{VvSelect.es-D55xq4Lw.js.map → VvSelect.es-CAVvkyxB.js.map} +1 -1
- package/dist/_chunks/{VvTextarea.es-BOhkaXfY.js → VvTextarea.es-CgvZOWO4.js} +446 -384
- package/dist/_chunks/VvTextarea.es-CgvZOWO4.js.map +1 -0
- package/dist/_chunks/{index.es-BYhSukum.js → index.es-CEYwDeKz.js} +126 -66
- package/dist/_chunks/index.es-CEYwDeKz.js.map +1 -0
- package/dist/_chunks/{index.es-CPvSmI-B.js → index.es-DDdkqLT6.js} +10 -10
- package/dist/_chunks/{index.es-CPvSmI-B.js.map → index.es-DDdkqLT6.js.map} +1 -1
- package/dist/ai-elements.es.js +377 -376
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/PkChatbot-aCgj2DMu.js +326 -0
- package/dist-vue/_chunks/PkChatbot-aCgj2DMu.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotAuth-449QUBoC.js → PkChatbotAuth-C5agN8ht.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotAuth-449QUBoC.js.map → PkChatbotAuth-C5agN8ht.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-DdQQlAr1.js → PkChatbotFeedbackForm-DjsLxYjT.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-DdQQlAr1.js.map → PkChatbotFeedbackForm-DjsLxYjT.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-_-h-egX7.js → PkChatbotMessages-CG3UZYcP.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotMessages-_-h-egX7.js.map → PkChatbotMessages-CG3UZYcP.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-Bg-Op2Oe.js → PkChatbotViewChat-IU3HJpxG.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewChat-Bg-Op2Oe.js.map → PkChatbotViewChat-IU3HJpxG.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-4zGrp7Fo.js +197 -0
- package/dist-vue/_chunks/PkChatbotViewConversations-4zGrp7Fo.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotViewProfile-BrZ7oiUY.js +85 -0
- package/dist-vue/_chunks/PkChatbotViewProfile-BrZ7oiUY.js.map +1 -0
- package/dist-vue/_chunks/{PkFilePreview-DydUI1G2.js → PkFilePreview-WqS-s3vk.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreview-DydUI1G2.js.map → PkFilePreview-WqS-s3vk.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreviewDialog-BuG1whsJ.js → PkFilePreviewDialog-BIaTAK05.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-BuG1whsJ.js.map → PkFilePreviewDialog-BIaTAK05.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-D0lDC69x.js → PkToolShowContactForm-DFufPNnQ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-D0lDC69x.js.map → PkToolShowContactForm-DFufPNnQ.js.map} +1 -1
- package/dist-vue/_chunks/{index.es-CwEgvvQD.js → index.es-BmedAjkp.js} +2 -2
- package/dist-vue/_chunks/{index.es-CwEgvvQD.js.map → index.es-BmedAjkp.js.map} +1 -1
- package/dist-vue/composables.js +8 -6
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +10 -10
- package/dist-vue/locales.js +20 -16
- package/dist-vue/packages/components/src/chat/PkChatbot.d.ts +7 -7
- package/package.json +2 -2
- package/dist/_chunks/VvCombobox.es-DybZ6U_6.js.map +0 -1
- package/dist/_chunks/VvInputText.es-DFSPWDcH.js.map +0 -1
- package/dist/_chunks/VvTextarea.es-BOhkaXfY.js.map +0 -1
- package/dist/_chunks/index.es-BYhSukum.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-CFJmT4nN.js +0 -299
- package/dist-vue/_chunks/PkChatbot-CFJmT4nN.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewConversations--smzyxqN.js +0 -226
- package/dist-vue/_chunks/PkChatbotViewConversations--smzyxqN.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewProfile-Cn7IQfnQ.js +0 -86
- package/dist-vue/_chunks/PkChatbotViewProfile-Cn7IQfnQ.js.map +0 -1
- package/dist-vue/_chunks/chatbotProfileContext-b-nve-mR.js +0 -5
- package/dist-vue/_chunks/chatbotProfileContext-b-nve-mR.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { A as e, B as t, D as n, Dt as r, E as i, Et as a, F as o, G as s, H as c, I as l, J as u, K as d, L as ee, M as f, N as p, Ot as m, P as h, Q as g, S as _, St as te, T as ne, Tt as v, U as y, V as b, W as x, Y as re, _ as S, b as C, bt as ie, c as ae, d as oe, et as se, f as w, g as
|
|
2
|
-
import { a as
|
|
3
|
-
import { a as
|
|
1
|
+
import { A as e, B as t, D as n, Dt as r, E as i, Et as a, F as o, G as s, H as c, I as l, J as u, K as d, L as ee, M as f, N as p, Ot as m, P as h, Q as g, S as _, St as te, T as ne, Tt as v, U as y, V as b, W as x, Y as re, _ as S, b as C, bt as ie, c as ae, d as oe, et as se, f as w, g as T, gt as E, h as D, k as ce, kt as O, l as le, nt as ue, ot as de, q as k, r as fe, s as pe, t as me, tt as A, u as he, ut as ge, v as j, w as M, wt as N, x as P, xt as F, y as I, z as L } from "./vue.runtime.esm-bundler-DZgpK-ja.js";
|
|
2
|
+
import { a as _e, i as R, t as ve } from "./iconify-BsIVfdEw.js";
|
|
3
|
+
import { a as ye, c as be, i as xe, l as Se, n as Ce, o as we, r as Te, s as Ee, t as De } from "./floating-ui.vue-SbFDfAS7.js";
|
|
4
4
|
import { S as Oe, c as ke, f as Ae, g as je, n as Me, p as Ne, r as Pe, t as Fe, u as Ie, w as z } from "./dist-CR8l0inH.js";
|
|
5
5
|
import { t as B } from "./dot-prop-Dmp6Zjqs.js";
|
|
6
|
-
// ../../node_modules/.pnpm/@volverjs+ui-vue@0.0.
|
|
7
|
-
|
|
6
|
+
// ../../node_modules/.pnpm/@volverjs+ui-vue@0.0.28_@json-render+core@0.19.0_zod@4.6.7__@volverjs+style@0.1.32_@vue_113cf0a066eeca009eded43485818201/node_modules/@volverjs/ui-vue/dist/components/VvCombobox/VvCombobox.es.js
|
|
7
|
+
ce(), fe(), de(), v();
|
|
8
8
|
var V = {
|
|
9
9
|
showPassword: "eye-on",
|
|
10
10
|
hidePassword: "eye-off",
|
|
@@ -36,7 +36,7 @@ var V = {
|
|
|
36
36
|
return e.listbox = "listbox", e.menu = "menu", e;
|
|
37
37
|
})({}), We = /* @__PURE__ */ (function(e) {
|
|
38
38
|
return e.option = "option", e.presentation = "presentation", e;
|
|
39
|
-
})({}), Ge = /* @__PURE__ */ Symbol.for("volver"),
|
|
39
|
+
})({}), Ge = /* @__PURE__ */ Symbol.for("volver"), Ke = /* @__PURE__ */ Symbol.for("buttonGroup"), G = /* @__PURE__ */ Symbol.for("dropdownTrigger"), qe = /* @__PURE__ */ Symbol.for("dropdownItem"), K = /* @__PURE__ */ Symbol.for("dropdownAction"), Je = {
|
|
40
40
|
to: { type: [String, Object] },
|
|
41
41
|
href: String,
|
|
42
42
|
target: String,
|
|
@@ -44,7 +44,7 @@ var V = {
|
|
|
44
44
|
type: String,
|
|
45
45
|
default: "noopener noreferrer"
|
|
46
46
|
}
|
|
47
|
-
},
|
|
47
|
+
}, q = {
|
|
48
48
|
valid: {
|
|
49
49
|
type: Boolean,
|
|
50
50
|
default: !1
|
|
@@ -254,7 +254,7 @@ var V = {
|
|
|
254
254
|
...st,
|
|
255
255
|
...X,
|
|
256
256
|
...tt,
|
|
257
|
-
...
|
|
257
|
+
...q,
|
|
258
258
|
...J,
|
|
259
259
|
...nt,
|
|
260
260
|
...Y,
|
|
@@ -268,7 +268,7 @@ var V = {
|
|
|
268
268
|
}), { ...Z }, {
|
|
269
269
|
...ft,
|
|
270
270
|
...st,
|
|
271
|
-
...
|
|
271
|
+
...q,
|
|
272
272
|
...J,
|
|
273
273
|
...nt,
|
|
274
274
|
...X,
|
|
@@ -278,7 +278,7 @@ var V = {
|
|
|
278
278
|
...et,
|
|
279
279
|
...Y
|
|
280
280
|
}, {
|
|
281
|
-
...
|
|
281
|
+
...q,
|
|
282
282
|
...J,
|
|
283
283
|
...rt,
|
|
284
284
|
...nt,
|
|
@@ -295,7 +295,7 @@ var ht = {
|
|
|
295
295
|
...Qe,
|
|
296
296
|
...Xe,
|
|
297
297
|
...Ze,
|
|
298
|
-
...
|
|
298
|
+
...Je,
|
|
299
299
|
type: {
|
|
300
300
|
type: String,
|
|
301
301
|
default: Ve.button,
|
|
@@ -314,7 +314,7 @@ Le.local;
|
|
|
314
314
|
var gt = {
|
|
315
315
|
...ft,
|
|
316
316
|
...st,
|
|
317
|
-
...
|
|
317
|
+
...q,
|
|
318
318
|
...J,
|
|
319
319
|
...nt,
|
|
320
320
|
...Y,
|
|
@@ -508,19 +508,19 @@ function Tt(e) {
|
|
|
508
508
|
return Array.isArray(e) ? e.filter((e) => wt(e)).join(" ") : e;
|
|
509
509
|
}
|
|
510
510
|
function Et(e, t) {
|
|
511
|
-
let r =
|
|
511
|
+
let r = D(() => ge(e) ? e.value : e), i = D(() => Tt(r.value.invalidLabel)), a = D(() => Tt(r.value.validLabel)), o = D(() => r.value.loadingLabel), s = D(() => r.value.hintLabel), c = D(() => !!(r.value.loading && (t.loading || o.value))), l = D(() => !c.value && !!(r.value.invalid && (t.invalid || i.value))), u = D(() => !c.value && !l.value && !!(r.value.valid && (t.valid || a.value))), d = D(() => !c.value && !l.value && !u.value && !!(t.hint || s.value)), ee = D(() => l.value || u.value || c.value || d.value);
|
|
512
512
|
return {
|
|
513
513
|
hasInvalidLabelOrSlot: l,
|
|
514
514
|
hasHintLabelOrSlot: d,
|
|
515
515
|
hasValidLabelOrSlot: u,
|
|
516
516
|
hasLoadingLabelOrSlot: c,
|
|
517
|
-
hintSlotScope:
|
|
517
|
+
hintSlotScope: D(() => ({
|
|
518
518
|
modelValue: r.value.modelValue,
|
|
519
519
|
valid: r.value.valid,
|
|
520
520
|
invalid: r.value.invalid,
|
|
521
521
|
loading: r.value.loading
|
|
522
522
|
})),
|
|
523
|
-
HintSlot:
|
|
523
|
+
HintSlot: M({
|
|
524
524
|
name: "HintSlot",
|
|
525
525
|
props: { tag: {
|
|
526
526
|
type: String,
|
|
@@ -553,16 +553,16 @@ function Dt() {
|
|
|
553
553
|
return e(Ge, void 0);
|
|
554
554
|
}
|
|
555
555
|
function Ot(e, t, n) {
|
|
556
|
-
return
|
|
556
|
+
return D(() => {
|
|
557
557
|
let r = { [e]: !0 }, i = typeof t?.value == "string" ? t.value.split(" ") : t?.value;
|
|
558
558
|
return i && Array.isArray(i) && i.forEach((t) => {
|
|
559
559
|
t && (r[`${e}--${t}`] = !0);
|
|
560
560
|
}), n && Object.keys(n.value).forEach((t) => {
|
|
561
|
-
r[`${e}--${t}`] =
|
|
561
|
+
r[`${e}--${t}`] = N(n.value[t]);
|
|
562
562
|
}), r;
|
|
563
563
|
});
|
|
564
564
|
}
|
|
565
|
-
var kt = /* @__PURE__ */
|
|
565
|
+
var kt = /* @__PURE__ */ M({
|
|
566
566
|
name: "VvIcon",
|
|
567
567
|
props: /* @__PURE__ */ f({
|
|
568
568
|
name: {},
|
|
@@ -583,12 +583,12 @@ var kt = /* @__PURE__ */ j({
|
|
|
583
583
|
modifiers: {}
|
|
584
584
|
}, H),
|
|
585
585
|
setup(e) {
|
|
586
|
-
let t = e, n =
|
|
586
|
+
let t = e, n = D(() => typeof t.rotate == "string" ? Number.parseFloat(t.rotate) : t.rotate), r = E(!0), i = Dt(), { modifiers: a } = F(t), o = Ot("vv-icon", a), s = D(() => t.provider || i?.iconsProvider), c = D(() => {
|
|
587
587
|
let e = t.name ?? "", n = `@${s.value}:${t.prefix}:${e}`;
|
|
588
|
-
if (
|
|
588
|
+
if (_e(n)) return n;
|
|
589
589
|
let r = i?.iconsCollections.find((t) => {
|
|
590
590
|
let n = `@${s.value}:${t.prefix}:${e}`;
|
|
591
|
-
return
|
|
591
|
+
return _e(n);
|
|
592
592
|
});
|
|
593
593
|
return r ? `@${s.value}:${r.prefix}:${e}` : e;
|
|
594
594
|
});
|
|
@@ -597,19 +597,19 @@ var kt = /* @__PURE__ */ j({
|
|
|
597
597
|
}
|
|
598
598
|
function u(e) {
|
|
599
599
|
let n = l(e), r = n?.innerHTML.trim() || "";
|
|
600
|
-
n && r &&
|
|
600
|
+
n && r && R(`@${s.value}:${t.prefix}:${t.name}`, {
|
|
601
601
|
body: r,
|
|
602
602
|
height: n.viewBox.baseVal.height,
|
|
603
603
|
width: n.viewBox.baseVal.width
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
|
-
return i && t.src && !
|
|
606
|
+
return i && t.src && !_e(`@${s.value}:${t.prefix}:${t.name}`) && (r.value = !1, i.fetchIcon(t.src).then((e) => {
|
|
607
607
|
e && u(e), r.value = !0;
|
|
608
608
|
}).catch((e) => {
|
|
609
609
|
throw r.value = !0, /* @__PURE__ */ Error(`Error during fetch icon: ${e?.message}`);
|
|
610
|
-
})), t.svg && u(t.svg), (t, i) =>
|
|
610
|
+
})), t.svg && u(t.svg), (t, i) => N(r) ? (L(), S(N(ve), h({
|
|
611
611
|
key: 0,
|
|
612
|
-
class:
|
|
612
|
+
class: N(o)
|
|
613
613
|
}, {
|
|
614
614
|
inline: e.inline,
|
|
615
615
|
width: e.width,
|
|
@@ -617,25 +617,25 @@ var kt = /* @__PURE__ */ j({
|
|
|
617
617
|
horizontalFlip: e.horizontalFlip,
|
|
618
618
|
verticalFlip: e.verticalFlip,
|
|
619
619
|
flip: e.flip,
|
|
620
|
-
rotate:
|
|
620
|
+
rotate: N(n),
|
|
621
621
|
color: e.color,
|
|
622
|
-
icon:
|
|
623
|
-
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) :
|
|
622
|
+
icon: N(c)
|
|
623
|
+
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : j("v-if", !0);
|
|
624
624
|
}
|
|
625
625
|
});
|
|
626
626
|
function At(e, t) {
|
|
627
|
-
let n =
|
|
627
|
+
let n = D(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), r = D(() => t?.value === Be.before ? n.value : void 0), i = D(() => t?.value === Be.after ? n.value : void 0);
|
|
628
628
|
return {
|
|
629
629
|
hasIcon: n,
|
|
630
|
-
hasIconLeft:
|
|
631
|
-
hasIconRight:
|
|
632
|
-
hasIconTop:
|
|
633
|
-
hasIconBottom:
|
|
630
|
+
hasIconLeft: D(() => t?.value === U.left ? n.value : void 0),
|
|
631
|
+
hasIconRight: D(() => t?.value === U.right ? n.value : void 0),
|
|
632
|
+
hasIconTop: D(() => t?.value === U.top ? n.value : void 0),
|
|
633
|
+
hasIconBottom: D(() => t?.value === U.bottom ? n.value : void 0),
|
|
634
634
|
hasIconBefore: r,
|
|
635
635
|
hasIconAfter: i
|
|
636
636
|
};
|
|
637
637
|
}
|
|
638
|
-
var jt =
|
|
638
|
+
var jt = M({
|
|
639
639
|
components: { VvIcon: kt },
|
|
640
640
|
props: {
|
|
641
641
|
inputType: {
|
|
@@ -657,7 +657,7 @@ var jt = j({
|
|
|
657
657
|
},
|
|
658
658
|
emits: ["clear"],
|
|
659
659
|
setup(e, { emit: t }) {
|
|
660
|
-
let { hasIcon: n } = At(
|
|
660
|
+
let { hasIcon: n } = At(D(() => e.icon));
|
|
661
661
|
function r(n) {
|
|
662
662
|
n?.stopPropagation(), e.disabled || t("clear");
|
|
663
663
|
}
|
|
@@ -682,19 +682,19 @@ var jt = j({
|
|
|
682
682
|
}), Mt = {
|
|
683
683
|
...$,
|
|
684
684
|
value: [String, Number]
|
|
685
|
-
}, Nt = /* @__PURE__ */
|
|
685
|
+
}, Nt = /* @__PURE__ */ M({
|
|
686
686
|
name: "VvBadge",
|
|
687
687
|
props: Mt,
|
|
688
688
|
setup(e) {
|
|
689
|
-
let { modifiers: t } =
|
|
690
|
-
return (e, t) => (
|
|
689
|
+
let { modifiers: t } = F(e), n = Ot("vv-badge", t);
|
|
690
|
+
return (e, t) => (L(), I("span", { class: a(N(n)) }, [c(e.$slots, "default", {}, () => [P(O(e.value), 1)])], 2));
|
|
691
691
|
}
|
|
692
692
|
});
|
|
693
693
|
function Pt(t) {
|
|
694
|
-
let n = e(t, void 0), r =
|
|
694
|
+
let n = e(t, void 0), r = D(() => n !== void 0);
|
|
695
695
|
function i(e, t, r) {
|
|
696
696
|
let i = n?.[e];
|
|
697
|
-
if (i) return
|
|
697
|
+
if (i) return D({
|
|
698
698
|
get() {
|
|
699
699
|
return i.value;
|
|
700
700
|
},
|
|
@@ -703,7 +703,7 @@ function Pt(t) {
|
|
|
703
703
|
}
|
|
704
704
|
});
|
|
705
705
|
let a = ie(t, e);
|
|
706
|
-
return
|
|
706
|
+
return D({
|
|
707
707
|
get() {
|
|
708
708
|
return a.value;
|
|
709
709
|
},
|
|
@@ -764,19 +764,19 @@ var Ft = ["update:modelValue"], It = {
|
|
|
764
764
|
}
|
|
765
765
|
};
|
|
766
766
|
function Lt(e, t) {
|
|
767
|
-
let { group: n, isInGroup: r, getGroupOrLocalRef: i } = Pt(
|
|
767
|
+
let { group: n, isInGroup: r, getGroupOrLocalRef: i } = Pt(Ke), { id: a, iconPosition: o, icon: s, label: c, pressed: l } = F(e);
|
|
768
768
|
return {
|
|
769
769
|
group: n,
|
|
770
770
|
isInGroup: r,
|
|
771
771
|
modelValue: i("modelValue", e, t),
|
|
772
772
|
toggle: i("toggle", e),
|
|
773
773
|
unselectable: i("unselectable", e),
|
|
774
|
-
multiple:
|
|
775
|
-
modifiers:
|
|
774
|
+
multiple: D(() => n?.multiple.value ?? !1),
|
|
775
|
+
modifiers: D(() => {
|
|
776
776
|
let t = e.modifiers, r = n?.modifiers.value, i = /* @__PURE__ */ new Set();
|
|
777
777
|
return t && (Array.isArray(t) || (t = t.split(" ")), t.forEach((e) => i.add(e))), r && (Array.isArray(r) || (r = r.split(" ")), r.forEach((e) => i.add(e))), [...i];
|
|
778
778
|
}),
|
|
779
|
-
disabled:
|
|
779
|
+
disabled: D(() => !!(e.disabled || n?.disabled.value)),
|
|
780
780
|
id: a,
|
|
781
781
|
pressed: l,
|
|
782
782
|
iconPosition: o,
|
|
@@ -790,40 +790,40 @@ var Rt = [
|
|
|
790
790
|
"mouseleave"
|
|
791
791
|
];
|
|
792
792
|
function zt() {
|
|
793
|
-
return e(
|
|
793
|
+
return e(G, {});
|
|
794
794
|
}
|
|
795
795
|
function Bt() {
|
|
796
|
-
return e(
|
|
796
|
+
return e(qe, {});
|
|
797
797
|
}
|
|
798
798
|
function Vt() {
|
|
799
|
-
return e(
|
|
799
|
+
return e(K, {});
|
|
800
800
|
}
|
|
801
|
-
var Ht = /* @__PURE__ */
|
|
801
|
+
var Ht = /* @__PURE__ */ M({
|
|
802
802
|
name: "VvAction",
|
|
803
803
|
props: ht,
|
|
804
804
|
emits: Rt,
|
|
805
805
|
setup(e, { expose: t, emit: n }) {
|
|
806
|
-
let r = e, i = n, a = ne(), o = Dt(), s =
|
|
806
|
+
let r = e, i = n, a = ne(), o = Dt(), s = E(null);
|
|
807
807
|
t({ $el: s });
|
|
808
808
|
let { reference: l, bus: u, aria: d, expanded: ee } = zt();
|
|
809
809
|
g(() => s.value, (e) => {
|
|
810
810
|
l && (l.value = e);
|
|
811
811
|
});
|
|
812
|
-
let f =
|
|
812
|
+
let f = D(() => r.pressed || ee?.value), { role: p, onAction: m } = Vt(), _ = D(() => {
|
|
813
813
|
switch (!0) {
|
|
814
814
|
case r.disabled: return W.button;
|
|
815
815
|
case r.to !== void 0: return o?.nuxt ? y(W.nuxtLink) : W.routerLink;
|
|
816
816
|
case r.href !== void 0: return W.a;
|
|
817
817
|
default: return r.defaultTag;
|
|
818
818
|
}
|
|
819
|
-
}),
|
|
819
|
+
}), te = D(() => {
|
|
820
820
|
let e = {
|
|
821
821
|
...d?.value,
|
|
822
|
-
ariaPressed:
|
|
822
|
+
ariaPressed: r.pressed && p?.value !== He.menuitem ? !0 : void 0,
|
|
823
823
|
ariaLabel: r.ariaLabel,
|
|
824
824
|
role: p?.value
|
|
825
825
|
};
|
|
826
|
-
switch (
|
|
826
|
+
switch (_.value) {
|
|
827
827
|
case W.a: return {
|
|
828
828
|
...e,
|
|
829
829
|
href: r.href,
|
|
@@ -844,36 +844,36 @@ var Ht = /* @__PURE__ */ j({
|
|
|
844
844
|
default: return e;
|
|
845
845
|
}
|
|
846
846
|
});
|
|
847
|
-
function te(e) {
|
|
848
|
-
r.disabled ? e.preventDefault() : a?.vnode.props?.onClick ? i("click", e) : u?.emit("click", e);
|
|
849
|
-
}
|
|
850
847
|
function v(e) {
|
|
851
|
-
a?.vnode.props?.
|
|
848
|
+
r.disabled ? e.preventDefault() : (l || m?.(), a?.vnode.props?.onClick ? i("click", e) : u?.emit("click", e));
|
|
852
849
|
}
|
|
853
850
|
function b(e) {
|
|
851
|
+
a?.vnode.props?.onMouseover ? i("mouseover", e) : u?.emit("mouseover", e);
|
|
852
|
+
}
|
|
853
|
+
function re(e) {
|
|
854
854
|
a?.vnode.props?.onMouseleave ? i("mouseleave", e) : u?.emit("mouseleave", e);
|
|
855
855
|
}
|
|
856
|
-
return (e, t) => (
|
|
856
|
+
return (e, t) => (L(), S(x(N(_)), h(N(te), {
|
|
857
857
|
ref_key: "rootEl",
|
|
858
858
|
ref: s,
|
|
859
859
|
class: {
|
|
860
860
|
active: e.active,
|
|
861
|
-
pressed:
|
|
861
|
+
pressed: N(f),
|
|
862
862
|
disabled: e.disabled,
|
|
863
863
|
current: e.current
|
|
864
864
|
},
|
|
865
|
-
onClickPassive:
|
|
866
|
-
onMouseoverPassive:
|
|
867
|
-
onMouseleavePassive:
|
|
865
|
+
onClickPassive: v,
|
|
866
|
+
onMouseoverPassive: b,
|
|
867
|
+
onMouseleavePassive: re
|
|
868
868
|
}), {
|
|
869
|
-
default:
|
|
869
|
+
default: A(() => [c(e.$slots, "default", {}, () => [P(O(e.label), 1)])]),
|
|
870
870
|
_: 3
|
|
871
871
|
}, 16, ["class"]));
|
|
872
872
|
}
|
|
873
873
|
});
|
|
874
874
|
function Ut(e) {
|
|
875
|
-
let t =
|
|
876
|
-
return
|
|
875
|
+
let t = k();
|
|
876
|
+
return D(() => String(e?.value || t));
|
|
877
877
|
}
|
|
878
878
|
var Wt = {
|
|
879
879
|
key: 1,
|
|
@@ -881,19 +881,19 @@ var Wt = {
|
|
|
881
881
|
}, Gt = {
|
|
882
882
|
key: 1,
|
|
883
883
|
class: "vv-button__label"
|
|
884
|
-
}, Kt = /* @__PURE__ */
|
|
884
|
+
}, Kt = /* @__PURE__ */ M({
|
|
885
885
|
name: "VvButton",
|
|
886
886
|
inheritAttrs: !1,
|
|
887
887
|
props: It,
|
|
888
888
|
emits: Ft,
|
|
889
889
|
setup(e, { expose: t, emit: n }) {
|
|
890
|
-
let r = e, i = n, a = d(), o = re(), { id: s, modifiers: l, iconPosition: u, icon: ee, label: f, modelValue: p, disabled: m, toggle: g, unselectable: _ } = Lt(r, i), te = Ut(s), ne =
|
|
891
|
-
t({ $el:
|
|
892
|
-
let y =
|
|
890
|
+
let r = e, i = n, a = d(), o = re(), { id: s, modifiers: l, iconPosition: u, icon: ee, label: f, modelValue: p, disabled: m, toggle: g, unselectable: _ } = Lt(r, i), te = Ut(s), ne = D(() => a?.name || te.value), v = E(null);
|
|
891
|
+
t({ $el: D(() => v.value?.$el) });
|
|
892
|
+
let y = D(() => g.value ? Array.isArray(p.value) ? Ct(ne.value, p.value) : vt(ne.value, p.value) : r.pressed), b = Ot("vv-button", l, D(() => ({
|
|
893
893
|
reverse: [U.right, U.bottom].includes(u.value),
|
|
894
894
|
column: [U.top, U.bottom].includes(u.value),
|
|
895
895
|
"icon-only": !(!ee?.value || f?.value || o.default)
|
|
896
|
-
}))), { hasIcon: x } = At(ee), C =
|
|
896
|
+
}))), { hasIcon: x } = At(ee), C = D(() => r.value === void 0 ? ne.value : r.value), ie = D(() => {
|
|
897
897
|
if (g.value) return { onClick: ae };
|
|
898
898
|
});
|
|
899
899
|
function ae() {
|
|
@@ -913,11 +913,11 @@ var Wt = {
|
|
|
913
913
|
p.value = C.value;
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
|
-
return (e, t) => (
|
|
917
|
-
...
|
|
918
|
-
...
|
|
919
|
-
disabled:
|
|
920
|
-
pressed:
|
|
916
|
+
return (e, t) => (L(), S(Ht, h({
|
|
917
|
+
...N(a),
|
|
918
|
+
...N(ie),
|
|
919
|
+
disabled: N(m),
|
|
920
|
+
pressed: N(y),
|
|
921
921
|
active: e.active,
|
|
922
922
|
type: e.type,
|
|
923
923
|
to: e.to,
|
|
@@ -926,19 +926,19 @@ var Wt = {
|
|
|
926
926
|
rel: e.rel,
|
|
927
927
|
ariaLabel: e.ariaLabel
|
|
928
928
|
}, {
|
|
929
|
-
id:
|
|
929
|
+
id: N(te),
|
|
930
930
|
ref_key: "rootEl",
|
|
931
931
|
ref: v,
|
|
932
|
-
class:
|
|
932
|
+
class: N(b)
|
|
933
933
|
}), {
|
|
934
|
-
default:
|
|
934
|
+
default: A(() => [c(e.$slots, "default", {}, () => [e.loading ? c(e.$slots, "loading", {}, () => [e.loadingIcon ? (L(), S(kt, {
|
|
935
935
|
key: 0,
|
|
936
936
|
class: "vv-button__loading-icon",
|
|
937
937
|
name: e.loadingIcon
|
|
938
|
-
}, null, 8, ["name"])) :
|
|
938
|
+
}, null, 8, ["name"])) : j("v-if", !0), e.loadingLabel ? (L(), I("span", Wt, O(e.loadingLabel), 1)) : j("v-if", !0)], void 0, 0) : (L(), I(w, { key: 1 }, [
|
|
939
939
|
c(e.$slots, "before"),
|
|
940
|
-
|
|
941
|
-
|
|
940
|
+
N(x) ? (L(), S(kt, h({ key: 0 }, N(x), { class: "vv-button__icon" }), null, 16)) : j("v-if", !0),
|
|
941
|
+
N(f) ? (L(), I("span", Gt, [c(e.$slots, "label", {}, () => [P(O(N(f)), 1)])])) : j("v-if", !0),
|
|
942
942
|
c(e.$slots, "after")
|
|
943
943
|
], 64))])]),
|
|
944
944
|
_: 3
|
|
@@ -978,7 +978,7 @@ var Wt = {
|
|
|
978
978
|
}
|
|
979
979
|
};
|
|
980
980
|
function Xt(e, t) {
|
|
981
|
-
let n = globalThis.HTMLElement !== void 0 && "popover" in globalThis.HTMLElement.prototype, r =
|
|
981
|
+
let n = globalThis.HTMLElement !== void 0 && "popover" in globalThis.HTMLElement.prototype, r = D(() => n && te(t)), i = D(() => r.value ? "manual" : void 0);
|
|
982
982
|
function a() {
|
|
983
983
|
return (n && e.value?.matches(":popover-open")) ?? !1;
|
|
984
984
|
}
|
|
@@ -1000,13 +1000,13 @@ function Xt(e, t) {
|
|
|
1000
1000
|
};
|
|
1001
1001
|
}
|
|
1002
1002
|
function Zt({ reference: e, id: r, expanded: i, aria: a }) {
|
|
1003
|
-
let o =
|
|
1003
|
+
let o = Se();
|
|
1004
1004
|
return {
|
|
1005
1005
|
bus: o,
|
|
1006
|
-
component:
|
|
1006
|
+
component: M({
|
|
1007
1007
|
name: "VvDropdownTriggerProvider",
|
|
1008
1008
|
setup() {
|
|
1009
|
-
t(
|
|
1009
|
+
t(G, {
|
|
1010
1010
|
reference: e,
|
|
1011
1011
|
id: r,
|
|
1012
1012
|
expanded: i,
|
|
@@ -1021,16 +1021,17 @@ function Zt({ reference: e, id: r, expanded: i, aria: a }) {
|
|
|
1021
1021
|
};
|
|
1022
1022
|
}
|
|
1023
1023
|
function Qt({ role: e, ...n }) {
|
|
1024
|
-
let r =
|
|
1025
|
-
return t(
|
|
1024
|
+
let r = D(() => e.value === Ue.listbox ? We.option : We.presentation);
|
|
1025
|
+
return t(qe, {
|
|
1026
1026
|
role: r,
|
|
1027
1027
|
...n
|
|
1028
1028
|
}), { itemRole: r };
|
|
1029
1029
|
}
|
|
1030
|
-
function $t({ expanded: e }) {
|
|
1031
|
-
t(
|
|
1032
|
-
role:
|
|
1033
|
-
expanded: e
|
|
1030
|
+
function $t({ expanded: e, onAction: n }) {
|
|
1031
|
+
t(K, {
|
|
1032
|
+
role: E(He.menuitem),
|
|
1033
|
+
expanded: e,
|
|
1034
|
+
onAction: n
|
|
1034
1035
|
});
|
|
1035
1036
|
}
|
|
1036
1037
|
var en = ["popover"], tn = [
|
|
@@ -1038,7 +1039,7 @@ var en = ["popover"], tn = [
|
|
|
1038
1039
|
"tabindex",
|
|
1039
1040
|
"role",
|
|
1040
1041
|
"aria-labelledby"
|
|
1041
|
-
], nn = /* @__PURE__ */
|
|
1042
|
+
], nn = /* @__PURE__ */ M({
|
|
1042
1043
|
name: "VvDropdown",
|
|
1043
1044
|
inheritAttrs: !1,
|
|
1044
1045
|
props: qt,
|
|
@@ -1060,12 +1061,12 @@ var en = ["popover"], tn = [
|
|
|
1060
1061
|
"leaveCancelled"
|
|
1061
1062
|
],
|
|
1062
1063
|
setup(e, { expose: t, emit: n }) {
|
|
1063
|
-
let l = e, u = n, { id: f } =
|
|
1064
|
+
let l = e, u = n, { id: f } = F(l), p = Ut(f), te = d(), ne = E(), v = E(), y = E(), b = E(), x = D({
|
|
1064
1065
|
get: () => l.reference ?? ne.value,
|
|
1065
1066
|
set: (e) => {
|
|
1066
1067
|
ne.value = e;
|
|
1067
1068
|
}
|
|
1068
|
-
}), { isTopLayer: re, popover: S, show: C, hide: ie } = Xt(v, () => l.topLayer), ae =
|
|
1069
|
+
}), { isTopLayer: re, popover: S, show: C, hide: ie } = Xt(v, () => l.topLayer), ae = D(() => re.value ? Re.fixed : l.strategy), oe = E(!1);
|
|
1069
1070
|
ee(() => {
|
|
1070
1071
|
je(v.value, () => {
|
|
1071
1072
|
oe.value = globalThis.getComputedStyle(v.value).getPropertyValue("--dropdown-custom-position")?.trim() === "true";
|
|
@@ -1074,81 +1075,81 @@ var en = ["popover"], tn = [
|
|
|
1074
1075
|
window: globalThis.window
|
|
1075
1076
|
});
|
|
1076
1077
|
});
|
|
1077
|
-
function
|
|
1078
|
+
function ce(e, t, n) {
|
|
1078
1079
|
return typeof e == "boolean" ? t() : n(e);
|
|
1079
1080
|
}
|
|
1080
|
-
function
|
|
1081
|
+
function O(e) {
|
|
1081
1082
|
return !e.width && !e.height;
|
|
1082
1083
|
}
|
|
1083
|
-
let
|
|
1084
|
+
let de = {
|
|
1084
1085
|
name: "uncap",
|
|
1085
1086
|
fn({ elements: e, rects: t, middlewareData: n }) {
|
|
1086
1087
|
let { style: r } = e.floating, i = t.floating.height >= Number.parseFloat(r.maxHeight) - 1 || t.floating.width >= Number.parseFloat(r.maxWidth) - 1;
|
|
1087
|
-
return n.uncap || !i ||
|
|
1088
|
+
return n.uncap || !i || O(t.floating) ? {} : (r.maxHeight = "", r.maxWidth = "", {
|
|
1088
1089
|
data: { uncapped: !0 },
|
|
1089
1090
|
reset: { rects: !0 }
|
|
1090
1091
|
});
|
|
1091
1092
|
}
|
|
1092
1093
|
};
|
|
1093
|
-
function
|
|
1094
|
+
function k(e) {
|
|
1094
1095
|
return l.triggerWidth && !oe.value ? e.reference.width : 0;
|
|
1095
1096
|
}
|
|
1096
|
-
let
|
|
1097
|
+
let fe = {
|
|
1097
1098
|
name: "triggerWidth",
|
|
1098
1099
|
fn({ elements: e, rects: t, middlewareData: n }) {
|
|
1099
|
-
let { style: r } = e.floating, i =
|
|
1100
|
+
let { style: r } = e.floating, i = k(t), a = Number.parseFloat(r.width) || 0;
|
|
1100
1101
|
return n.triggerWidth || Math.abs(i - a) < .01 ? {} : (r.width = i ? `${i}px` : "", { reset: { rects: !0 } });
|
|
1101
1102
|
}
|
|
1102
|
-
},
|
|
1103
|
+
}, pe = D(() => {
|
|
1103
1104
|
let e = [];
|
|
1104
|
-
l.triggerWidth && e.push(
|
|
1105
|
+
l.triggerWidth && e.push(fe), l.size && e.push(de), l.offset && e.push(["string", "number"].includes(typeof l.offset) ? we(Number(l.offset)) : we(l.offset));
|
|
1105
1106
|
let t = typeof l.size == "object" ? l.size.padding : void 0;
|
|
1106
|
-
if (l.autoPlacement ? e.push(
|
|
1107
|
+
if (l.autoPlacement ? e.push(ce(l.autoPlacement, () => Te(), (e) => Te(e))) : l.flip && e.push(ce(l.flip, () => ye({
|
|
1107
1108
|
fallbackStrategy: "initialPlacement",
|
|
1108
1109
|
padding: t
|
|
1109
|
-
}), (e) =>
|
|
1110
|
+
}), (e) => ye({
|
|
1110
1111
|
padding: t,
|
|
1111
1112
|
...e
|
|
1112
|
-
}))), l.shift && e.push(
|
|
1113
|
+
}))), l.shift && e.push(ce(l.shift, () => Ee(), (e) => Ee(e))), l.size) {
|
|
1113
1114
|
let t = ({ availableWidth: e, availableHeight: t, elements: n, rects: r }) => {
|
|
1114
|
-
if (
|
|
1115
|
+
if (O(r.floating) || oe.value) return;
|
|
1115
1116
|
let { style: i } = n.floating;
|
|
1116
|
-
i.maxWidth =
|
|
1117
|
+
i.maxWidth = k(r) ? "" : `${Math.max(0, e)}px`, i.maxHeight = `${Math.max(0, t)}px`;
|
|
1117
1118
|
};
|
|
1118
|
-
e.push(
|
|
1119
|
+
e.push(ce(l.size, () => be({ apply: t }), (e) => be({
|
|
1119
1120
|
...e,
|
|
1120
1121
|
apply: (n) => (t(n), e?.apply?.(n))
|
|
1121
1122
|
})));
|
|
1122
1123
|
}
|
|
1123
1124
|
return l.arrow && e.push(De({ element: y })), e;
|
|
1124
|
-
}), { x:
|
|
1125
|
-
placement:
|
|
1125
|
+
}), { x: he, y: ge, middlewareData: M, placement: P, strategy: _e, update: R } = Ce(x, v, {
|
|
1126
|
+
placement: D(() => l.placement),
|
|
1126
1127
|
strategy: ae,
|
|
1127
|
-
middleware:
|
|
1128
|
-
}),
|
|
1128
|
+
middleware: pe
|
|
1129
|
+
}), ve = D(() => {
|
|
1129
1130
|
if (!oe.value) return {
|
|
1130
|
-
position:
|
|
1131
|
-
top: `${
|
|
1132
|
-
left: `${
|
|
1131
|
+
position: _e.value,
|
|
1132
|
+
top: `${ge.value ?? 0}px`,
|
|
1133
|
+
left: `${he.value ?? 0}px`
|
|
1133
1134
|
};
|
|
1134
1135
|
});
|
|
1135
1136
|
g(() => l.triggerWidth, (e) => {
|
|
1136
1137
|
!e && v.value && (v.value.style.width = "");
|
|
1137
1138
|
});
|
|
1138
|
-
let
|
|
1139
|
+
let Se = D(() => P.value.split("-")[0]), Ae = D(() => {
|
|
1139
1140
|
if (oe.value) return;
|
|
1140
1141
|
let e = {
|
|
1141
1142
|
[U.top]: U.bottom,
|
|
1142
1143
|
[U.right]: U.left,
|
|
1143
1144
|
[U.bottom]: U.top,
|
|
1144
1145
|
[U.left]: U.right
|
|
1145
|
-
}[
|
|
1146
|
+
}[Se.value];
|
|
1146
1147
|
return {
|
|
1147
|
-
left:
|
|
1148
|
-
top:
|
|
1148
|
+
left: M.value.arrow?.x === void 0 ? void 0 : `${M.value.arrow?.x}px`,
|
|
1149
|
+
top: M.value.arrow?.y === void 0 ? void 0 : `${M.value.arrow?.y}px`,
|
|
1149
1150
|
[e]: `${-(y.value?.offsetWidth ?? 0) / 2}px`
|
|
1150
1151
|
};
|
|
1151
|
-
}), Fe = Oe(l, "modelValue", u), Ie =
|
|
1152
|
+
}), Fe = Oe(l, "modelValue", u), Ie = E(!1), z = D({
|
|
1152
1153
|
get: () => Fe.value ?? Ie.value,
|
|
1153
1154
|
set: (e) => {
|
|
1154
1155
|
Fe.value === void 0 ? Ie.value = e : Fe.value = e;
|
|
@@ -1160,12 +1161,12 @@ var en = ["popover"], tn = [
|
|
|
1160
1161
|
v,
|
|
1161
1162
|
ae
|
|
1162
1163
|
], ([e, t, n, r], i, a) => {
|
|
1163
|
-
e && t && n && a(
|
|
1164
|
+
e && t && n && a(xe(t, n, R, { animationFrame: r === Re.fixed }));
|
|
1164
1165
|
}, {
|
|
1165
1166
|
flush: "post",
|
|
1166
1167
|
immediate: !0
|
|
1167
1168
|
}), je(b, () => {
|
|
1168
|
-
z.value &&
|
|
1169
|
+
z.value && R();
|
|
1169
1170
|
}, {
|
|
1170
1171
|
childList: !0,
|
|
1171
1172
|
subtree: !0,
|
|
@@ -1188,7 +1189,7 @@ var en = ["popover"], tn = [
|
|
|
1188
1189
|
Me(v, () => {
|
|
1189
1190
|
!l.keepOpen && z.value && (z.value = !1);
|
|
1190
1191
|
}, { ignore: [x] });
|
|
1191
|
-
let ze =
|
|
1192
|
+
let ze = D(() => x.value?.getAttribute?.("id") ?? void 0), Be = D(() => ({
|
|
1192
1193
|
"aria-controls": p.value,
|
|
1193
1194
|
"aria-haspopup": !0,
|
|
1194
1195
|
"aria-expanded": z.value
|
|
@@ -1199,40 +1200,66 @@ var en = ["popover"], tn = [
|
|
|
1199
1200
|
aria: Be
|
|
1200
1201
|
});
|
|
1201
1202
|
W.on("click", H);
|
|
1202
|
-
let { role: He, modifiers:
|
|
1203
|
+
let { role: He, modifiers: We } = F(l), Ge = Ot("vv-dropdown", We, D(() => ({ arrow: l.arrow }))), { focused: Ke } = Ne(v);
|
|
1203
1204
|
function G(e) {
|
|
1204
|
-
return e
|
|
1205
|
+
return e?.getRootNode()?.activeElement ?? null;
|
|
1206
|
+
}
|
|
1207
|
+
let qe = "a[href], button, input:not([type=\"hidden\"]), textarea, select, details, [tabindex]:not([tabindex=\"-1\"])";
|
|
1208
|
+
function K(e) {
|
|
1209
|
+
return !e.hasAttribute("disabled") && e.getAttribute("aria-hidden") !== "true";
|
|
1205
1210
|
}
|
|
1206
|
-
function
|
|
1211
|
+
function Je(e) {
|
|
1212
|
+
return e ? [...e.querySelectorAll(qe)].filter(K) : [];
|
|
1213
|
+
}
|
|
1214
|
+
let q = E(!1), J;
|
|
1215
|
+
function Y() {
|
|
1216
|
+
let e = x.value?.$el ?? x.value;
|
|
1217
|
+
if (e instanceof HTMLElement) {
|
|
1218
|
+
if (e.matches(qe) && K(e)) return e;
|
|
1219
|
+
let t = e.querySelector(`[aria-controls="${CSS.escape(String(p.value))}"]`), n = t && K(t) ? t : Je(e).find((e) => !v.value?.contains(e));
|
|
1220
|
+
if (n) return n;
|
|
1221
|
+
}
|
|
1222
|
+
return J?.isConnected ? J : void 0;
|
|
1223
|
+
}
|
|
1224
|
+
function X() {
|
|
1225
|
+
let e = Y();
|
|
1226
|
+
e && (q.value = !0, e.focus({ preventScroll: !0 }), setTimeout(() => {
|
|
1227
|
+
q.value = !1;
|
|
1228
|
+
}));
|
|
1229
|
+
}
|
|
1230
|
+
function Z(e) {
|
|
1231
|
+
return e.composedPath().find((e) => e instanceof Element && e.classList.contains("vv-dropdown")) ?? G(v.value)?.closest(".vv-dropdown") ?? void 0;
|
|
1232
|
+
}
|
|
1233
|
+
function Ye() {
|
|
1207
1234
|
o(() => {
|
|
1208
|
-
let e =
|
|
1235
|
+
let e = Je(v.value);
|
|
1209
1236
|
e.length > 0 && e[0].focus({ preventScroll: !0 });
|
|
1210
1237
|
});
|
|
1211
1238
|
}
|
|
1212
|
-
function
|
|
1239
|
+
function Xe() {
|
|
1213
1240
|
o(() => {
|
|
1214
|
-
let e =
|
|
1241
|
+
let e = Je(b.value);
|
|
1215
1242
|
e.length > 0 && e[0].focus({ preventScroll: !0 });
|
|
1216
1243
|
});
|
|
1217
1244
|
}
|
|
1218
|
-
function
|
|
1245
|
+
function Ze() {
|
|
1219
1246
|
o(() => {
|
|
1220
|
-
if (
|
|
1221
|
-
let e = G(v.value);
|
|
1222
|
-
if (e.length === 0 || !
|
|
1223
|
-
let
|
|
1224
|
-
|
|
1247
|
+
if (Ke.value) {
|
|
1248
|
+
let e = Je(v.value), t = G(v.value);
|
|
1249
|
+
if (e.length === 0 || !t) return;
|
|
1250
|
+
let n = e.indexOf(t);
|
|
1251
|
+
n < e.length - 1 ? e[n + 1].focus({ preventScroll: !0 }) : e[0].focus({ preventScroll: !0 });
|
|
1225
1252
|
}
|
|
1226
1253
|
});
|
|
1227
1254
|
}
|
|
1228
|
-
function
|
|
1255
|
+
function Q() {
|
|
1229
1256
|
o(() => {
|
|
1230
|
-
if (
|
|
1231
|
-
let e = G(v.value);
|
|
1232
|
-
if (e.length === 0 || !
|
|
1233
|
-
let
|
|
1234
|
-
if (
|
|
1235
|
-
e[
|
|
1257
|
+
if (Ke.value) {
|
|
1258
|
+
let e = Je(v.value), t = G(v.value);
|
|
1259
|
+
if (e.length === 0 || !t) return;
|
|
1260
|
+
let n = e.indexOf(t);
|
|
1261
|
+
if (n > 0) {
|
|
1262
|
+
e[n - 1].focus({ preventScroll: !0 });
|
|
1236
1263
|
return;
|
|
1237
1264
|
}
|
|
1238
1265
|
e.at(-1)?.focus({ preventScroll: !0 });
|
|
@@ -1240,35 +1267,65 @@ var en = ["popover"], tn = [
|
|
|
1240
1267
|
});
|
|
1241
1268
|
}
|
|
1242
1269
|
g(z, (e) => {
|
|
1243
|
-
|
|
1270
|
+
if (e) {
|
|
1271
|
+
let e = G(v.value) ?? document.activeElement;
|
|
1272
|
+
J = e instanceof HTMLElement && !v.value?.contains(e) ? e : void 0;
|
|
1273
|
+
}
|
|
1274
|
+
e && l.autofocusFirst && Ye();
|
|
1244
1275
|
}), t({
|
|
1245
1276
|
toggle: H,
|
|
1246
1277
|
show: B,
|
|
1247
1278
|
hide: V,
|
|
1248
1279
|
init: Le,
|
|
1249
|
-
focusFirst:
|
|
1250
|
-
focusFirstListElement:
|
|
1251
|
-
focusNext:
|
|
1252
|
-
focusPrev:
|
|
1253
|
-
customPosition: oe
|
|
1280
|
+
focusFirst: Ye,
|
|
1281
|
+
focusFirstListElement: Xe,
|
|
1282
|
+
focusNext: Ze,
|
|
1283
|
+
focusPrev: Q,
|
|
1284
|
+
customPosition: oe,
|
|
1285
|
+
restoringFocus: q
|
|
1254
1286
|
});
|
|
1255
|
-
let {
|
|
1287
|
+
let Qe = ke(v), { onAction: $e } = Bt(), { expanded: et, onAction: tt } = Vt();
|
|
1288
|
+
tt && $t({ expanded: et });
|
|
1289
|
+
function $() {
|
|
1290
|
+
if (!z.value || l.keepOpen || He.value === Ue.listbox) return;
|
|
1291
|
+
let e = G(v.value), t = !!e && !!v.value?.contains(e);
|
|
1292
|
+
V(), t && X(), $e?.();
|
|
1293
|
+
}
|
|
1294
|
+
let { itemRole: nt } = Qt({
|
|
1256
1295
|
role: He,
|
|
1257
1296
|
expanded: z,
|
|
1258
|
-
focused:
|
|
1259
|
-
hovered:
|
|
1297
|
+
focused: Ke,
|
|
1298
|
+
hovered: Qe,
|
|
1299
|
+
onAction: $
|
|
1260
1300
|
});
|
|
1261
1301
|
Pe("Escape", (e) => {
|
|
1262
|
-
z.value
|
|
1302
|
+
if (!z.value) return;
|
|
1303
|
+
let t = Z(e);
|
|
1304
|
+
t && t !== v.value && v.value?.contains(t) || (e.preventDefault(), V(), t === v.value && X());
|
|
1263
1305
|
}), Pe("ArrowDown", (e) => {
|
|
1264
|
-
z.value &&
|
|
1306
|
+
z.value && Z(e) === v.value && (e.preventDefault(), Ze());
|
|
1265
1307
|
}), Pe("ArrowUp", (e) => {
|
|
1266
|
-
z.value &&
|
|
1267
|
-
}), Pe([" ", "Enter"], (e) => {
|
|
1268
|
-
let t = e.target;
|
|
1269
|
-
z.value && Ge.value && t && t?.click();
|
|
1308
|
+
z.value && Z(e) === v.value && (e.preventDefault(), Q());
|
|
1270
1309
|
});
|
|
1271
|
-
|
|
1310
|
+
function rt(e, t) {
|
|
1311
|
+
if (e instanceof HTMLElement && e.isContentEditable) return !0;
|
|
1312
|
+
switch (e.tagName) {
|
|
1313
|
+
case "BUTTON":
|
|
1314
|
+
case "SUMMARY":
|
|
1315
|
+
case "INPUT":
|
|
1316
|
+
case "TEXTAREA":
|
|
1317
|
+
case "SELECT": return !0;
|
|
1318
|
+
case "A":
|
|
1319
|
+
case "AREA": return t === "Enter" && e.hasAttribute("href");
|
|
1320
|
+
default: return !1;
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
Pe([" ", "Enter"], (e) => {
|
|
1324
|
+
if (!z.value || Z(e) !== v.value) return;
|
|
1325
|
+
let t = G(v.value);
|
|
1326
|
+
t instanceof HTMLElement && !rt(t, e.key) && t.click();
|
|
1327
|
+
});
|
|
1328
|
+
let it = {
|
|
1272
1329
|
"before-enter": () => {
|
|
1273
1330
|
u("beforeExpand"), u("beforeEnter");
|
|
1274
1331
|
},
|
|
@@ -1294,59 +1351,59 @@ var en = ["popover"], tn = [
|
|
|
1294
1351
|
u("leaveCancelled");
|
|
1295
1352
|
}
|
|
1296
1353
|
};
|
|
1297
|
-
return (e, t) => (
|
|
1298
|
-
default:
|
|
1354
|
+
return (e, t) => (L(), I(w, null, [_(N(Ve), null, {
|
|
1355
|
+
default: A(() => [c(e.$slots, "default", r(i({
|
|
1299
1356
|
init: Le,
|
|
1300
1357
|
show: B,
|
|
1301
1358
|
hide: V,
|
|
1302
1359
|
toggle: H,
|
|
1303
|
-
expanded:
|
|
1304
|
-
aria:
|
|
1360
|
+
expanded: N(z),
|
|
1361
|
+
aria: N(Be)
|
|
1305
1362
|
})))]),
|
|
1306
1363
|
_: 3
|
|
1307
|
-
}), _(
|
|
1308
|
-
default:
|
|
1364
|
+
}), _(me, h({ name: e.transitionName }, s(it), { persisted: "" }), {
|
|
1365
|
+
default: A(() => [ue(T("div", {
|
|
1309
1366
|
ref_key: "floatingEl",
|
|
1310
1367
|
ref: v,
|
|
1311
|
-
popover:
|
|
1312
|
-
style: m(
|
|
1313
|
-
class: a(
|
|
1368
|
+
popover: N(S),
|
|
1369
|
+
style: m(N(ve)),
|
|
1370
|
+
class: a(N(Ge))
|
|
1314
1371
|
}, [
|
|
1315
|
-
l.arrow ? (
|
|
1372
|
+
l.arrow ? (L(), I("div", {
|
|
1316
1373
|
key: 0,
|
|
1317
1374
|
ref_key: "arrowEl",
|
|
1318
1375
|
ref: y,
|
|
1319
|
-
style: m(
|
|
1376
|
+
style: m(N(Ae)),
|
|
1320
1377
|
class: "vv-dropdown__arrow"
|
|
1321
|
-
}, null, 4)) :
|
|
1378
|
+
}, null, 4)) : j("v-if", !0),
|
|
1322
1379
|
c(e.$slots, "before", r(i({
|
|
1323
1380
|
show: B,
|
|
1324
1381
|
hide: V,
|
|
1325
1382
|
toggle: H,
|
|
1326
|
-
expanded:
|
|
1383
|
+
expanded: N(z)
|
|
1327
1384
|
}))),
|
|
1328
|
-
|
|
1329
|
-
id:
|
|
1385
|
+
T("div", h(N(te), {
|
|
1386
|
+
id: N(p),
|
|
1330
1387
|
ref_key: "listEl",
|
|
1331
1388
|
ref: b,
|
|
1332
|
-
tabindex:
|
|
1333
|
-
role:
|
|
1334
|
-
"aria-labelledby":
|
|
1389
|
+
tabindex: N(z) ? void 0 : -1,
|
|
1390
|
+
role: N(He),
|
|
1391
|
+
"aria-labelledby": N(ze),
|
|
1335
1392
|
class: "vv-dropdown__list"
|
|
1336
1393
|
}), [c(e.$slots, "items", r(i({
|
|
1337
1394
|
show: B,
|
|
1338
1395
|
hide: V,
|
|
1339
1396
|
toggle: H,
|
|
1340
|
-
expanded:
|
|
1341
|
-
role:
|
|
1397
|
+
expanded: N(z),
|
|
1398
|
+
role: N(nt)
|
|
1342
1399
|
})))], 16, tn),
|
|
1343
1400
|
c(e.$slots, "after", r(i({
|
|
1344
1401
|
show: B,
|
|
1345
1402
|
hide: V,
|
|
1346
1403
|
toggle: H,
|
|
1347
|
-
expanded:
|
|
1404
|
+
expanded: N(z)
|
|
1348
1405
|
})))
|
|
1349
|
-
], 14, en), [[
|
|
1406
|
+
], 14, en), [[le, N(z)]])]),
|
|
1350
1407
|
_: 3
|
|
1351
1408
|
}, 16, ["name"])], 64));
|
|
1352
1409
|
}
|
|
@@ -1354,52 +1411,55 @@ var en = ["popover"], tn = [
|
|
|
1354
1411
|
class: "vv-dropdown-optgroup",
|
|
1355
1412
|
role: "presentation",
|
|
1356
1413
|
tabindex: "-1"
|
|
1357
|
-
}, an = /* @__PURE__ */
|
|
1414
|
+
}, an = /* @__PURE__ */ M({
|
|
1358
1415
|
name: "VvDropdownOptgroup",
|
|
1359
1416
|
props: { ...$e },
|
|
1360
1417
|
setup(e) {
|
|
1361
1418
|
let t = e;
|
|
1362
|
-
return (e, n) => (
|
|
1419
|
+
return (e, n) => (L(), I("li", rn, [c(e.$slots, "default", {}, () => [P(O(t.label), 1)])]));
|
|
1363
1420
|
}
|
|
1364
|
-
}), on = /* @__PURE__ */
|
|
1421
|
+
}), on = /* @__PURE__ */ M({
|
|
1365
1422
|
name: "VvDropdownItem",
|
|
1366
1423
|
props: Jt,
|
|
1367
1424
|
setup(e) {
|
|
1368
|
-
let t = e, { role: n, expanded: r } = Bt(),
|
|
1369
|
-
$t({
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1425
|
+
let t = e, { role: n, expanded: r, onAction: i } = Bt(), a = E(null);
|
|
1426
|
+
$t({
|
|
1427
|
+
expanded: r,
|
|
1428
|
+
onAction: i
|
|
1429
|
+
});
|
|
1430
|
+
let o = ke(a), { focused: s } = Ae(a), { focused: l } = Ne(a);
|
|
1431
|
+
return g(o, (e) => {
|
|
1432
|
+
e && t.focusOnHover && (s.value = !0);
|
|
1433
|
+
}), (e, t) => (L(), I("div", h({ role: N(n) }, {
|
|
1374
1434
|
ref_key: "element",
|
|
1375
|
-
ref:
|
|
1376
|
-
class: ["vv-dropdown__item", { "focus-visible":
|
|
1435
|
+
ref: a,
|
|
1436
|
+
class: ["vv-dropdown__item", { "focus-visible": N(s) || N(l) }]
|
|
1377
1437
|
}), [c(e.$slots, "default")], 16));
|
|
1378
1438
|
}
|
|
1379
|
-
}), sn = ["title"], cn = /* @__PURE__ */
|
|
1439
|
+
}), sn = ["title"], cn = /* @__PURE__ */ M({
|
|
1380
1440
|
name: "VvDropdownOption",
|
|
1381
1441
|
props: Yt,
|
|
1382
1442
|
setup(e) {
|
|
1383
|
-
let t = e, { modifiers: n } =
|
|
1443
|
+
let t = e, { modifiers: n } = F(t), o = Ot("vv-dropdown-option", n, D(() => ({
|
|
1384
1444
|
disabled: t.disabled,
|
|
1385
1445
|
selected: t.selected,
|
|
1386
1446
|
unselectable: t.unselectable && t.selected
|
|
1387
|
-
}))), s =
|
|
1388
|
-
return (e, t) => (
|
|
1389
|
-
class: a(
|
|
1447
|
+
}))), s = D(() => t.selected ? t.unselectable ? t.deselectHintLabel : t.selectedHintLabel : t.disabled ? "" : t.selectHintLabel);
|
|
1448
|
+
return (e, t) => (L(), S(on, {
|
|
1449
|
+
class: a(N(o)),
|
|
1390
1450
|
tabindex: e.disabled ? -1 : 0,
|
|
1391
1451
|
"aria-selected": e.selected,
|
|
1392
1452
|
"aria-disabled": e.disabled,
|
|
1393
1453
|
"focus-on-hover": e.focusOnHover
|
|
1394
1454
|
}, {
|
|
1395
|
-
default:
|
|
1455
|
+
default: A(() => [c(e.$slots, "default"), T("span", {
|
|
1396
1456
|
class: "vv-dropdown-option__hint",
|
|
1397
|
-
title:
|
|
1457
|
+
title: N(s)
|
|
1398
1458
|
}, [c(e.$slots, "hint", r(i({
|
|
1399
1459
|
disabled: e.disabled,
|
|
1400
1460
|
selected: e.selected,
|
|
1401
1461
|
unselectable: e.unselectable
|
|
1402
|
-
})), () => [
|
|
1462
|
+
})), () => [P(O(N(s)), 1)])], 8, sn)]),
|
|
1403
1463
|
_: 3
|
|
1404
1464
|
}, 8, [
|
|
1405
1465
|
"class",
|
|
@@ -1414,7 +1474,7 @@ var en = ["popover"], tn = [
|
|
|
1414
1474
|
...pt,
|
|
1415
1475
|
...mt,
|
|
1416
1476
|
...st,
|
|
1417
|
-
...
|
|
1477
|
+
...q,
|
|
1418
1478
|
...J,
|
|
1419
1479
|
...nt,
|
|
1420
1480
|
...Y,
|
|
@@ -1470,10 +1530,10 @@ function dn(e, t, n) {
|
|
|
1470
1530
|
return r;
|
|
1471
1531
|
}
|
|
1472
1532
|
function fn(e, t, n) {
|
|
1473
|
-
let r = Dt(), i =
|
|
1533
|
+
let r = Dt(), i = D(() => {
|
|
1474
1534
|
if (r?.defaults.value?.[e]) return r.defaults.value[e];
|
|
1475
1535
|
});
|
|
1476
|
-
return
|
|
1536
|
+
return D(() => {
|
|
1477
1537
|
if (i.value === void 0) return n;
|
|
1478
1538
|
let e = i.value, r = t, a = n;
|
|
1479
1539
|
return Object.keys(r).reduce((t, n) => {
|
|
@@ -1485,11 +1545,11 @@ function fn(e, t, n) {
|
|
|
1485
1545
|
function pn(e, t) {
|
|
1486
1546
|
let { focused: n } = Ae(e);
|
|
1487
1547
|
return g(n, (n) => {
|
|
1488
|
-
t(n ? "focus" : "blur",
|
|
1548
|
+
t(n ? "focus" : "blur", N(e));
|
|
1489
1549
|
}), { focused: n };
|
|
1490
1550
|
}
|
|
1491
1551
|
function mn(e) {
|
|
1492
|
-
let { options: t, labelKey: n, valueKey: r, disabledKey: i } =
|
|
1552
|
+
let { options: t, labelKey: n, valueKey: r, disabledKey: i } = F(e);
|
|
1493
1553
|
return {
|
|
1494
1554
|
options: t,
|
|
1495
1555
|
getOptionLabel: (e) => typeof e == "string" ? e : typeof n.value == "function" ? n.value(e) : String(n.value ? B(e, n.value) : e),
|
|
@@ -1504,7 +1564,7 @@ var hn = ["for"], gn = { class: "vv-select__wrapper" }, _n = {
|
|
|
1504
1564
|
}, vn = { class: "vv-select__inner" }, yn = ["id"], bn = ["disabled", "hidden"], xn = ["disabled", "value"], Sn = ["disabled", "label"], Cn = ["disabled", "value"], wn = {
|
|
1505
1565
|
key: 2,
|
|
1506
1566
|
class: "vv-select__input-after"
|
|
1507
|
-
}, Tn = /* @__PURE__ */
|
|
1567
|
+
}, Tn = /* @__PURE__ */ M({
|
|
1508
1568
|
name: "VvSelect",
|
|
1509
1569
|
props: un(),
|
|
1510
1570
|
emits: [
|
|
@@ -1514,131 +1574,131 @@ var hn = ["for"], gn = { class: "vv-select__wrapper" }, _n = {
|
|
|
1514
1574
|
"clear"
|
|
1515
1575
|
],
|
|
1516
1576
|
setup(e, { emit: t }) {
|
|
1517
|
-
let n = e, o = t, s = re(), l = fn("VvSelect", un(), n), u =
|
|
1577
|
+
let n = e, o = t, s = re(), l = fn("VvSelect", un(), n), u = E(), { HintSlot: d, hasHintLabelOrSlot: ee, hasInvalidLabelOrSlot: f, hintSlotScope: p } = Et(l, s), { focused: m } = pn(u, o);
|
|
1518
1578
|
function te(e) {
|
|
1519
1579
|
return typeof e != "string" && e.options?.length;
|
|
1520
1580
|
}
|
|
1521
|
-
let { id: ne, modifiers: v, disabled: y, readonly: x, loading: ie, icon: ae, iconPosition: oe, invalid: se, valid:
|
|
1581
|
+
let { id: ne, modifiers: v, disabled: y, readonly: x, loading: ie, icon: ae, iconPosition: oe, invalid: se, valid: ce, floating: le, multiple: de } = F(n), k = Ut(ne), fe = D(() => `${k.value}-hint`), me = D(() => n.disabled || n.readonly), he = D(() => me.value ? -1 : n.tabindex), M = D({
|
|
1522
1582
|
get: () => n.modelValue,
|
|
1523
1583
|
set: (e) => {
|
|
1524
1584
|
Array.isArray(e) && (e = e.filter((e) => e !== void 0), e.length === 0 && !n.unselectable && u.value) ? u.value.value = String(n.modelValue) : o("update:modelValue", e);
|
|
1525
1585
|
}
|
|
1526
|
-
}),
|
|
1527
|
-
g(
|
|
1586
|
+
}), P = D(() => Array.isArray(M.value) ? M.value.length > 0 : M.value !== void 0 && M.value !== null), _e = D(() => !me.value && n.unselectable), R = Ie(u);
|
|
1587
|
+
g(R, (e) => {
|
|
1528
1588
|
e && n.autofocus && (m.value = !0);
|
|
1529
1589
|
});
|
|
1530
|
-
let { hasIconBefore:
|
|
1590
|
+
let { hasIconBefore: ve, hasIconAfter: ye } = At(ae, oe), be = D(() => {
|
|
1531
1591
|
if (n.invalid === !0) return !0;
|
|
1532
1592
|
if (n.valid === !0) return !1;
|
|
1533
|
-
}),
|
|
1534
|
-
valid:
|
|
1593
|
+
}), xe = Ot("vv-select", v, D(() => ({
|
|
1594
|
+
valid: ce.value,
|
|
1535
1595
|
invalid: se.value,
|
|
1536
1596
|
loading: ie.value,
|
|
1537
1597
|
disabled: y.value,
|
|
1538
1598
|
readonly: x.value,
|
|
1539
|
-
"icon-before":
|
|
1540
|
-
"icon-after":
|
|
1541
|
-
dirty:
|
|
1542
|
-
focus: m.value && !
|
|
1543
|
-
floating:
|
|
1544
|
-
multiple:
|
|
1545
|
-
}))), { getOptionLabel:
|
|
1599
|
+
"icon-before": ve.value !== void 0,
|
|
1600
|
+
"icon-after": ye.value !== void 0,
|
|
1601
|
+
dirty: P.value,
|
|
1602
|
+
focus: m.value && !me.value,
|
|
1603
|
+
floating: le.value,
|
|
1604
|
+
multiple: de.value
|
|
1605
|
+
}))), { getOptionLabel: Se, getOptionValue: Ce, isOptionDisabled: we, getOptionGrouped: Te } = mn(n);
|
|
1546
1606
|
g(() => n.options, (e) => {
|
|
1547
|
-
if (e?.length && n.autoselectFirst && !
|
|
1607
|
+
if (e?.length && n.autoselectFirst && !P.value) {
|
|
1548
1608
|
let t = Ce(e[0]);
|
|
1549
|
-
|
|
1609
|
+
M.value = n.multiple ? [t] : t;
|
|
1550
1610
|
}
|
|
1551
1611
|
}, { immediate: !0 });
|
|
1552
1612
|
function Ee() {
|
|
1553
|
-
Array.isArray(
|
|
1613
|
+
Array.isArray(M.value) ? M.value = [] : M.value = void 0, o("clear");
|
|
1554
1614
|
}
|
|
1555
|
-
let De =
|
|
1615
|
+
let De = D(() => ({
|
|
1556
1616
|
name: n.name,
|
|
1557
|
-
tabindex:
|
|
1558
|
-
disabled:
|
|
1617
|
+
tabindex: he.value,
|
|
1618
|
+
disabled: me.value,
|
|
1559
1619
|
required: n.required,
|
|
1560
1620
|
size: n.size,
|
|
1561
1621
|
autocomplete: n.autocomplete,
|
|
1562
1622
|
multiple: n.multiple,
|
|
1563
1623
|
"aria-label": n.ariaLabel || void 0,
|
|
1564
1624
|
"aria-labelledby": n.ariaLabelledby || void 0,
|
|
1565
|
-
"aria-invalid":
|
|
1566
|
-
"aria-describedby": [n.ariaDescribedby, ee.value ?
|
|
1567
|
-
"aria-errormessage": f.value ?
|
|
1568
|
-
})), Oe =
|
|
1625
|
+
"aria-invalid": be.value,
|
|
1626
|
+
"aria-describedby": [n.ariaDescribedby, ee.value ? fe.value : void 0].filter(Boolean).join(" ") || void 0,
|
|
1627
|
+
"aria-errormessage": f.value ? fe.value : void 0
|
|
1628
|
+
})), Oe = D(() => ({
|
|
1569
1629
|
valid: n.valid,
|
|
1570
1630
|
invalid: n.invalid,
|
|
1571
1631
|
modelValue: n.modelValue
|
|
1572
1632
|
}));
|
|
1573
|
-
return (e, t) => (
|
|
1574
|
-
e.label ? (
|
|
1633
|
+
return (e, t) => (L(), I("div", { class: a(N(xe)) }, [
|
|
1634
|
+
e.label ? (L(), I("label", {
|
|
1575
1635
|
key: 0,
|
|
1576
|
-
for:
|
|
1577
|
-
},
|
|
1578
|
-
|
|
1579
|
-
e.$slots.before ? (
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
id:
|
|
1636
|
+
for: N(k)
|
|
1637
|
+
}, O(e.label), 9, hn)) : j("v-if", !0),
|
|
1638
|
+
T("div", gn, [
|
|
1639
|
+
e.$slots.before ? (L(), I("div", _n, [c(e.$slots, "before", r(i(N(Oe))))])) : j("v-if", !0),
|
|
1640
|
+
T("div", vn, [
|
|
1641
|
+
N(ve) ? (L(), S(kt, h({ key: 0 }, N(ve), { class: "vv-select__icon" }), null, 16)) : j("v-if", !0),
|
|
1642
|
+
ue(T("select", h({
|
|
1643
|
+
id: N(k),
|
|
1584
1644
|
ref_key: "selectEl",
|
|
1585
1645
|
ref: u
|
|
1586
|
-
},
|
|
1646
|
+
}, N(De), { "onUpdate:modelValue": t[0] ||= (e) => ge(M) ? M.value = e : null }), [e.placeholder ? (L(), I("option", {
|
|
1587
1647
|
key: 0,
|
|
1588
1648
|
value: void 0,
|
|
1589
|
-
disabled: !
|
|
1590
|
-
hidden: !
|
|
1591
|
-
},
|
|
1649
|
+
disabled: !N(_e),
|
|
1650
|
+
hidden: !N(_e)
|
|
1651
|
+
}, O(e.placeholder), 9, bn)) : j("v-if", !0), (L(!0), I(w, null, b(e.options, (e, t) => (L(), I(w, null, [te(e) ? (L(), I("optgroup", {
|
|
1592
1652
|
key: `group-${t}`,
|
|
1593
|
-
disabled:
|
|
1594
|
-
label:
|
|
1595
|
-
}, [(
|
|
1653
|
+
disabled: N(we)(e),
|
|
1654
|
+
label: N(Se)(e)
|
|
1655
|
+
}, [(L(!0), I(w, null, b(N(Te)(e), (e, n) => (L(), I("option", {
|
|
1596
1656
|
key: `group-${t}-item-${n}`,
|
|
1597
|
-
disabled:
|
|
1598
|
-
value:
|
|
1599
|
-
},
|
|
1657
|
+
disabled: N(we)(e),
|
|
1658
|
+
value: N(Ce)(e)
|
|
1659
|
+
}, O(N(Se)(e)), 9, Cn))), 128))], 8, Sn)) : (L(), I("option", {
|
|
1600
1660
|
key: t,
|
|
1601
|
-
disabled:
|
|
1602
|
-
value:
|
|
1603
|
-
},
|
|
1604
|
-
|
|
1661
|
+
disabled: N(we)(e),
|
|
1662
|
+
value: N(Ce)(e)
|
|
1663
|
+
}, O(N(Se)(e)), 9, xn))], 64))), 256))], 16, yn), [[pe, N(M)]]),
|
|
1664
|
+
N(ye) ? (L(), S(kt, h({ key: 1 }, N(ye), { class: "vv-select__icon vv-select__icon-after" }), null, 16)) : j("v-if", !0)
|
|
1605
1665
|
]),
|
|
1606
|
-
|
|
1666
|
+
N(_e) && N(l).showClearAction ? (L(), S(N(jt), {
|
|
1607
1667
|
key: 1,
|
|
1608
1668
|
"input-type": "select",
|
|
1609
1669
|
label: e.labelClear,
|
|
1610
1670
|
icon: e.iconClear,
|
|
1611
|
-
disabled: !
|
|
1671
|
+
disabled: !N(P),
|
|
1612
1672
|
onClear: Ee
|
|
1613
1673
|
}, null, 8, [
|
|
1614
1674
|
"label",
|
|
1615
1675
|
"icon",
|
|
1616
1676
|
"disabled"
|
|
1617
|
-
])) :
|
|
1618
|
-
e.$slots.after ? (
|
|
1677
|
+
])) : j("v-if", !0),
|
|
1678
|
+
e.$slots.after ? (L(), I("div", wn, [c(e.$slots, "after", r(i(N(Oe))))])) : j("v-if", !0)
|
|
1619
1679
|
]),
|
|
1620
|
-
_(
|
|
1621
|
-
id:
|
|
1680
|
+
_(N(d), {
|
|
1681
|
+
id: N(fe),
|
|
1622
1682
|
class: "vv-select__hint"
|
|
1623
1683
|
}, C({ _: 2 }, [
|
|
1624
1684
|
e.$slots.hint ? {
|
|
1625
1685
|
name: "hint",
|
|
1626
|
-
fn:
|
|
1686
|
+
fn: A(() => [c(e.$slots, "hint", r(i(N(p))))]),
|
|
1627
1687
|
key: "0"
|
|
1628
1688
|
} : void 0,
|
|
1629
1689
|
e.$slots.loading ? {
|
|
1630
1690
|
name: "loading",
|
|
1631
|
-
fn:
|
|
1691
|
+
fn: A(() => [c(e.$slots, "loading", r(i(N(p))))]),
|
|
1632
1692
|
key: "1"
|
|
1633
1693
|
} : void 0,
|
|
1634
1694
|
e.$slots.valid ? {
|
|
1635
1695
|
name: "valid",
|
|
1636
|
-
fn:
|
|
1696
|
+
fn: A(() => [c(e.$slots, "valid", r(i(N(p))))]),
|
|
1637
1697
|
key: "2"
|
|
1638
1698
|
} : void 0,
|
|
1639
1699
|
e.$slots.invalid ? {
|
|
1640
1700
|
name: "invalid",
|
|
1641
|
-
fn:
|
|
1701
|
+
fn: A(() => [c(e.$slots, "invalid", r(i(N(p))))]),
|
|
1642
1702
|
key: "3"
|
|
1643
1703
|
} : void 0
|
|
1644
1704
|
]), 1032, ["id"])
|
|
@@ -1665,7 +1725,7 @@ var hn = ["for"], gn = { class: "vv-select__wrapper" }, _n = {
|
|
|
1665
1725
|
}, Nn = ["aria-label", "onClick"], Pn = {
|
|
1666
1726
|
key: 2,
|
|
1667
1727
|
class: "vv-select__input-after"
|
|
1668
|
-
}, Fn = /* @__PURE__ */
|
|
1728
|
+
}, Fn = /* @__PURE__ */ M({
|
|
1669
1729
|
name: "VvCombobox",
|
|
1670
1730
|
components: {
|
|
1671
1731
|
VvDropdown: nn,
|
|
@@ -1691,53 +1751,57 @@ var hn = ["for"], gn = { class: "vv-select__wrapper" }, _n = {
|
|
|
1691
1751
|
"change:search"
|
|
1692
1752
|
], ["update:search"]),
|
|
1693
1753
|
setup(e, { emit: t }) {
|
|
1694
|
-
let n = e, o = t, s = re(), d = fn("VvCombobox", _t(), n), ee =
|
|
1695
|
-
function
|
|
1754
|
+
let n = e, o = t, s = re(), d = fn("VvCombobox", _t(), n), ee = E(null), f = E(null), p = E(null), m = E(), { HintSlot: te, hasHintLabelOrSlot: ne, hasInvalidLabelOrSlot: v, hintSlotScope: y } = Et(d, s), { focused: x } = pn(ee, o), { focused: ie } = Ne(p), se;
|
|
1755
|
+
function ce() {
|
|
1696
1756
|
clearTimeout(se), se = setTimeout(() => {
|
|
1697
|
-
!x.value && !ie.value &&
|
|
1757
|
+
!x.value && !ie.value && k.value && me();
|
|
1698
1758
|
}, 50);
|
|
1699
1759
|
}
|
|
1700
1760
|
l(() => clearTimeout(se)), g(x, (e) => {
|
|
1701
1761
|
if (n.autoOpen) {
|
|
1702
|
-
if (e && !
|
|
1703
|
-
|
|
1762
|
+
if (e && !k.value) {
|
|
1763
|
+
if (m.value?.restoringFocus) return;
|
|
1764
|
+
clearTimeout(se), pe();
|
|
1704
1765
|
return;
|
|
1705
1766
|
}
|
|
1706
|
-
!e &&
|
|
1767
|
+
!e && k.value && !ie.value && ce();
|
|
1707
1768
|
}
|
|
1708
1769
|
}), g(ie, (e) => {
|
|
1709
|
-
e ? clearTimeout(se) : !x.value &&
|
|
1770
|
+
e ? clearTimeout(se) : !x.value && k.value && ce();
|
|
1710
1771
|
});
|
|
1711
|
-
let
|
|
1712
|
-
g(
|
|
1713
|
-
o("update:search",
|
|
1772
|
+
let le = u(e, "search"), de = z(le, D(() => Number(n.debounceSearch)));
|
|
1773
|
+
g(de, () => {
|
|
1774
|
+
o("update:search", de.value), o("change:search", de.value);
|
|
1714
1775
|
});
|
|
1715
|
-
let
|
|
1776
|
+
let k = E(!1);
|
|
1777
|
+
function fe() {
|
|
1778
|
+
B.value || (k.value = !k.value);
|
|
1779
|
+
}
|
|
1716
1780
|
function pe() {
|
|
1717
|
-
B.value || (
|
|
1781
|
+
B.value || k.value || (k.value = !0);
|
|
1718
1782
|
}
|
|
1719
1783
|
function me() {
|
|
1720
|
-
B.value ||
|
|
1784
|
+
B.value || !k.value || (k.value = !1);
|
|
1721
1785
|
}
|
|
1722
|
-
function
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1786
|
+
function M() {
|
|
1787
|
+
if (d.value.searchable && f.value) {
|
|
1788
|
+
let e = f.value.closest(".vv-dropdown"), t = f.value.getRootNode();
|
|
1789
|
+
e?.contains(t.activeElement) || f.value.focus({ preventScroll: !0 });
|
|
1790
|
+
}
|
|
1727
1791
|
}
|
|
1728
|
-
function
|
|
1729
|
-
d.value.keepSearch || (
|
|
1792
|
+
function _e() {
|
|
1793
|
+
d.value.keepSearch || (le.value = "");
|
|
1730
1794
|
}
|
|
1731
|
-
function
|
|
1795
|
+
function R(e) {
|
|
1732
1796
|
return typeof e != "string" && e.options?.length;
|
|
1733
1797
|
}
|
|
1734
|
-
let { id:
|
|
1798
|
+
let { id: ve, icon: ye, iconPosition: be, modifiers: xe, disabled: Se, required: Ce, readonly: we, loading: Te, valid: Ee, invalid: De, floating: Oe } = F(n), ke = Ut(ve), Ae = D(() => `${ke.value}-hint`), je = D(() => `${ke.value}-dropdown`), Me = D(() => `${ke.value}-search`), Pe = D(() => `${ke.value}-label`), Ie = D(() => [n.ariaDescribedby, ne.value ? Ae.value : void 0].filter(Boolean).join(" ") || void 0), B = D(() => n.disabled || n.readonly), V = D(() => B.value ? -1 : n.tabindex), H = D({
|
|
1735
1799
|
get: () => Array.isArray(n.modelValue) ? n.modelValue : n.modelValue !== void 0 && n.modelValue !== null ? [n.modelValue] : [],
|
|
1736
1800
|
set: (e) => {
|
|
1737
1801
|
o("update:modelValue", n.multiple || Array.isArray(n.modelValue) ? e : e.pop());
|
|
1738
1802
|
}
|
|
1739
|
-
}), Le =
|
|
1740
|
-
disabled:
|
|
1803
|
+
}), Le = D(() => H.value.length), Re = D(() => Le.value > 0), U = D(() => n.multiple ? n.maxValues === void 0 ? 1 / 0 : Number(n.maxValues) : 1), ze = D(() => B.value || !n.unselectable ? !1 : Number(n.minValues) === 0 || Le.value > Number(n.minValues)), Be = D(() => B.value ? !1 : !n.multiple || Le.value < U.value), Ve = E(!1), W = D(() => Ve.value || Te.value), { hasIconBefore: He, hasIconAfter: We } = At(ye, be), Ge = Ot("vv-select", xe, D(() => ({
|
|
1804
|
+
disabled: Se.value,
|
|
1741
1805
|
required: Ce.value,
|
|
1742
1806
|
loading: W.value,
|
|
1743
1807
|
readonly: we.value,
|
|
@@ -1746,37 +1810,37 @@ var hn = ["for"], gn = { class: "vv-select__wrapper" }, _n = {
|
|
|
1746
1810
|
valid: Ee.value,
|
|
1747
1811
|
invalid: De.value,
|
|
1748
1812
|
dirty: Re.value,
|
|
1749
|
-
focus: (x.value || ie.value ||
|
|
1813
|
+
focus: (x.value || ie.value || k.value) && !B.value,
|
|
1750
1814
|
floating: Oe.value,
|
|
1751
1815
|
badges: n.badges
|
|
1752
|
-
}))),
|
|
1753
|
-
let e = [...
|
|
1754
|
-
for (let t of n.options)
|
|
1816
|
+
}))), Ke = E(/* @__PURE__ */ new Set()), { getOptionLabel: G, getOptionValue: qe, getOptionGrouped: K, isOptionDisabled: Je } = mn(n), q = D(() => {
|
|
1817
|
+
let e = [...Ke.value];
|
|
1818
|
+
for (let t of n.options) R(t) ? e.push(...K(t)) : e.push(t);
|
|
1755
1819
|
return e;
|
|
1756
|
-
}), J =
|
|
1757
|
-
let e = [...n.options, ...
|
|
1758
|
-
for (let t of H.value)
|
|
1759
|
-
let n =
|
|
1820
|
+
}), J = D(() => {
|
|
1821
|
+
let e = [...n.options, ...Ke.value];
|
|
1822
|
+
for (let t of H.value) q.value.some((e) => {
|
|
1823
|
+
let n = qe(e);
|
|
1760
1824
|
return typeof n == "object" && typeof t == "object" ? JSON.stringify(n) === JSON.stringify(t) : n === t;
|
|
1761
1825
|
}) || e.push(t);
|
|
1762
1826
|
return e;
|
|
1763
1827
|
});
|
|
1764
|
-
g(
|
|
1828
|
+
g(Ke, (e) => {
|
|
1765
1829
|
e.size > 0 && o("update:options", J.value);
|
|
1766
1830
|
});
|
|
1767
1831
|
function Y(e) {
|
|
1768
|
-
return
|
|
1832
|
+
return Je(e) || !Be.value && !Z(e);
|
|
1769
1833
|
}
|
|
1770
1834
|
let X = Fe(async () => {
|
|
1771
1835
|
if (d.value.searchFunction) {
|
|
1772
1836
|
Ve.value = !0;
|
|
1773
|
-
let e = await Promise.resolve(d.value.searchFunction(
|
|
1837
|
+
let e = await Promise.resolve(d.value.searchFunction(de.value, J.value));
|
|
1774
1838
|
return Ve.value = !1, e;
|
|
1775
1839
|
}
|
|
1776
|
-
let e =
|
|
1840
|
+
let e = de.value.toLowerCase().trim();
|
|
1777
1841
|
return e ? J.value?.reduce((t, n) => {
|
|
1778
|
-
if (
|
|
1779
|
-
let r =
|
|
1842
|
+
if (R(n)) {
|
|
1843
|
+
let r = G(n).toLowerCase(), i = K(n).filter((t) => G(t).toLowerCase().includes(e));
|
|
1780
1844
|
if (r.includes(e)) t.push(n);
|
|
1781
1845
|
else if (i.length > 0) {
|
|
1782
1846
|
let e = typeof n == "object" ? {
|
|
@@ -1787,39 +1851,39 @@ var hn = ["for"], gn = { class: "vv-select__wrapper" }, _n = {
|
|
|
1787
1851
|
}
|
|
1788
1852
|
return t;
|
|
1789
1853
|
}
|
|
1790
|
-
return
|
|
1854
|
+
return G(n).toLowerCase().includes(e) && t.push(n), t;
|
|
1791
1855
|
}, []) : J.value;
|
|
1792
1856
|
});
|
|
1793
1857
|
function Z(e) {
|
|
1794
|
-
let t =
|
|
1858
|
+
let t = qe(e);
|
|
1795
1859
|
return typeof t == "object" ? H.value.some((e) => typeof e == "object" && JSON.stringify(e) === JSON.stringify(t)) : H.value.includes(t);
|
|
1796
1860
|
}
|
|
1797
|
-
let Ye =
|
|
1861
|
+
let Ye = D(() => J.value.reduce((e, t) => R(t) ? [...e, ...K(t)] : [...e, t], []).filter((e) => Z(e))), Xe = D(() => Ye.value.map((e) => G(e)).join(n.separator));
|
|
1798
1862
|
function Ze() {
|
|
1799
|
-
n.autoOpen ?
|
|
1863
|
+
n.autoOpen ? pe() : fe();
|
|
1800
1864
|
}
|
|
1801
1865
|
function Q(e) {
|
|
1802
|
-
let t = Z(e), r =
|
|
1803
|
-
t && ze.value ? H.value = H.value.filter((e) => typeof r == "object" && typeof e == "object" ? JSON.stringify(e) !== JSON.stringify(r) : e !== r) : !t && Be.value && (n.multiple ? H.value = [...H.value, r] : H.value = [r]), !n.multiple && !n.keepOpen &&
|
|
1866
|
+
let t = Z(e), r = qe(e);
|
|
1867
|
+
t && ze.value ? H.value = H.value.filter((e) => typeof r == "object" && typeof e == "object" ? JSON.stringify(e) !== JSON.stringify(r) : e !== r) : !t && Be.value && (n.multiple ? H.value = [...H.value, r] : H.value = [r]), !n.multiple && !n.keepOpen && me();
|
|
1804
1868
|
}
|
|
1805
1869
|
function Qe() {
|
|
1806
1870
|
H.value = [], o("update:search", ""), o("clear");
|
|
1807
1871
|
}
|
|
1808
1872
|
g(J, (e) => {
|
|
1809
1873
|
if (e?.length && n.autoselectFirst && !Re.value) {
|
|
1810
|
-
let t = e.find((e) => !
|
|
1874
|
+
let t = e.find((e) => !R(e));
|
|
1811
1875
|
if (t) {
|
|
1812
1876
|
Q(t);
|
|
1813
1877
|
return;
|
|
1814
1878
|
}
|
|
1815
|
-
let n = e.find((e) =>
|
|
1879
|
+
let n = e.find((e) => R(e));
|
|
1816
1880
|
if (n) {
|
|
1817
|
-
let e =
|
|
1881
|
+
let e = K(n);
|
|
1818
1882
|
e.length && Q(e[0]);
|
|
1819
1883
|
}
|
|
1820
1884
|
}
|
|
1821
1885
|
}, { immediate: !0 });
|
|
1822
|
-
let $e =
|
|
1886
|
+
let $e = D(() => ({
|
|
1823
1887
|
id: ke.value,
|
|
1824
1888
|
name: n.name,
|
|
1825
1889
|
tabindex: V.value,
|
|
@@ -1830,7 +1894,7 @@ var hn = ["for"], gn = { class: "vv-select__wrapper" }, _n = {
|
|
|
1830
1894
|
hintLabel: d.value.hintLabel,
|
|
1831
1895
|
loading: W.value,
|
|
1832
1896
|
loadingLabel: d.value.loadingLabel,
|
|
1833
|
-
disabled:
|
|
1897
|
+
disabled: Se.value,
|
|
1834
1898
|
readonly: we.value,
|
|
1835
1899
|
modifiers: d.value.modifiers,
|
|
1836
1900
|
options: d.value.options,
|
|
@@ -1848,7 +1912,7 @@ var hn = ["for"], gn = { class: "vv-select__wrapper" }, _n = {
|
|
|
1848
1912
|
ariaDescribedby: n.ariaDescribedby,
|
|
1849
1913
|
placeholder: d.value.placeholder,
|
|
1850
1914
|
modelValue: n.modelValue
|
|
1851
|
-
})), et =
|
|
1915
|
+
})), et = D(() => ({
|
|
1852
1916
|
id: je.value,
|
|
1853
1917
|
reference: p.value,
|
|
1854
1918
|
placement: d.value.placement,
|
|
@@ -1863,20 +1927,20 @@ var hn = ["for"], gn = { class: "vv-select__wrapper" }, _n = {
|
|
|
1863
1927
|
triggerWidth: d.value.triggerWidth,
|
|
1864
1928
|
topLayer: d.value.topLayer,
|
|
1865
1929
|
modifiers: d.value.dropdownModifiers
|
|
1866
|
-
})), tt =
|
|
1930
|
+
})), tt = D(() => ({
|
|
1867
1931
|
valid: n.valid,
|
|
1868
1932
|
invalid: n.invalid,
|
|
1869
1933
|
modelValue: n.modelValue
|
|
1870
1934
|
}));
|
|
1871
1935
|
function $(e) {
|
|
1872
|
-
e.key !== " " && e.key !== "Enter" || n.autoOpen || !
|
|
1936
|
+
e.key !== " " && e.key !== "Enter" || n.autoOpen || !k.value && x.value && (e.preventDefault(), e.stopImmediatePropagation(), fe());
|
|
1873
1937
|
}
|
|
1874
1938
|
function nt() {
|
|
1875
1939
|
if (X.value?.length) {
|
|
1876
1940
|
if (X.value.length === 1) {
|
|
1877
1941
|
let e = X.value[0];
|
|
1878
|
-
if (
|
|
1879
|
-
let t =
|
|
1942
|
+
if (R(e)) {
|
|
1943
|
+
let t = K(e);
|
|
1880
1944
|
t.length && Q(t[0]);
|
|
1881
1945
|
return;
|
|
1882
1946
|
}
|
|
@@ -1885,195 +1949,195 @@ var hn = ["for"], gn = { class: "vv-select__wrapper" }, _n = {
|
|
|
1885
1949
|
}
|
|
1886
1950
|
m.value?.focusFirstListElement();
|
|
1887
1951
|
} else if (d.value.addable) {
|
|
1888
|
-
let e =
|
|
1889
|
-
if (!e ||
|
|
1890
|
-
|
|
1952
|
+
let e = le.value.trim();
|
|
1953
|
+
if (!e || q.value.some((t) => G(t).toLowerCase() === e.toLowerCase())) return;
|
|
1954
|
+
Ke.value.add(e), Q(e);
|
|
1891
1955
|
}
|
|
1892
1956
|
}
|
|
1893
|
-
return (e, t) => e.native ? (
|
|
1957
|
+
return (e, t) => e.native ? (L(), S(Tn, h({ key: 1 }, N($e), { "onUpdate:modelValue": t[3] ||= (e) => o("update:modelValue", e) }), null, 16)) : (L(), I("div", {
|
|
1894
1958
|
key: 0,
|
|
1895
|
-
id:
|
|
1896
|
-
class: a(
|
|
1959
|
+
id: N(ke),
|
|
1960
|
+
class: a(N(Ge))
|
|
1897
1961
|
}, [
|
|
1898
|
-
e.label ? (
|
|
1962
|
+
e.label ? (L(), I("label", {
|
|
1899
1963
|
key: 0,
|
|
1900
|
-
id:
|
|
1901
|
-
for:
|
|
1902
|
-
},
|
|
1903
|
-
|
|
1964
|
+
id: N(Pe),
|
|
1965
|
+
for: N(d).searchable ? N(Me) : void 0
|
|
1966
|
+
}, O(e.label), 9, Dn)) : j("v-if", !0),
|
|
1967
|
+
T("div", {
|
|
1904
1968
|
ref_key: "wrapperEl",
|
|
1905
1969
|
ref: p,
|
|
1906
1970
|
class: "vv-select__wrapper"
|
|
1907
1971
|
}, [_(nn, h({
|
|
1908
1972
|
ref_key: "dropdownEl",
|
|
1909
1973
|
ref: m,
|
|
1910
|
-
modelValue:
|
|
1911
|
-
"onUpdate:modelValue": t[2] ||= (e) =>
|
|
1912
|
-
},
|
|
1913
|
-
role:
|
|
1914
|
-
onAfterExpand:
|
|
1915
|
-
onAfterCollapse:
|
|
1974
|
+
modelValue: N(k),
|
|
1975
|
+
"onUpdate:modelValue": t[2] ||= (e) => ge(k) ? k.value = e : null
|
|
1976
|
+
}, N(et), {
|
|
1977
|
+
role: N(Ue).listbox,
|
|
1978
|
+
onAfterExpand: M,
|
|
1979
|
+
onAfterCollapse: _e
|
|
1916
1980
|
}), C({
|
|
1917
|
-
default:
|
|
1918
|
-
e.$slots.before ? (
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1981
|
+
default: A(({ aria: t }) => [
|
|
1982
|
+
e.$slots.before ? (L(), I("div", kn, [c(e.$slots, "before", r(i(N(tt))))])) : j("v-if", !0),
|
|
1983
|
+
T("div", An, [
|
|
1984
|
+
N(He) ? (L(), S(kt, h({ key: 0 }, N(He), { class: "vv-select__icon" }), null, 16)) : j("v-if", !0),
|
|
1985
|
+
T("div", h({
|
|
1922
1986
|
ref_key: "inputEl",
|
|
1923
1987
|
ref: ee
|
|
1924
1988
|
}, t, {
|
|
1925
1989
|
class: "vv-select__input",
|
|
1926
1990
|
role: "combobox",
|
|
1927
|
-
"aria-controls":
|
|
1928
|
-
"aria-expanded":
|
|
1991
|
+
"aria-controls": N(je),
|
|
1992
|
+
"aria-expanded": N(k),
|
|
1929
1993
|
"aria-label": e.ariaLabel || void 0,
|
|
1930
|
-
"aria-labelledby": e.ariaLabelledby || (e.label ?
|
|
1931
|
-
"aria-describedby":
|
|
1932
|
-
"aria-errormessage":
|
|
1933
|
-
tabindex:
|
|
1994
|
+
"aria-labelledby": e.ariaLabelledby || (e.label ? N(Pe) : void 0),
|
|
1995
|
+
"aria-describedby": N(Ie),
|
|
1996
|
+
"aria-errormessage": N(v) ? N(Ae) : void 0,
|
|
1997
|
+
tabindex: N(V),
|
|
1934
1998
|
onClickPassive: Ze,
|
|
1935
1999
|
onKeydown: $
|
|
1936
|
-
}), [
|
|
1937
|
-
selectedOptions:
|
|
2000
|
+
}), [N(Xe) ? c(e.$slots, "value", r(i({
|
|
2001
|
+
selectedOptions: N(Ye),
|
|
1938
2002
|
onInput: Q
|
|
1939
|
-
})), () => [e.badges ? (
|
|
2003
|
+
})), () => [e.badges ? (L(!0), I(w, { key: 1 }, b(N(Ye), (t, n) => (L(), S(Nt, {
|
|
1940
2004
|
key: n,
|
|
1941
2005
|
modifiers: e.badgeModifiers,
|
|
1942
2006
|
class: "vv-select__badge"
|
|
1943
2007
|
}, {
|
|
1944
|
-
default:
|
|
2008
|
+
default: A(() => [P(O(N(G)(t)) + " ", 1), N(ze) ? (L(), I("button", {
|
|
1945
2009
|
key: 0,
|
|
1946
|
-
"aria-label":
|
|
2010
|
+
"aria-label": N(d).deselectActionLabel,
|
|
1947
2011
|
type: "button",
|
|
1948
2012
|
onClick: oe((e) => Q(t), ["stop"])
|
|
1949
|
-
}, [_(kt, { name: "close" })], 8, Nn)) :
|
|
2013
|
+
}, [_(kt, { name: "close" })], 8, Nn)) : j("v-if", !0)]),
|
|
1950
2014
|
_: 2
|
|
1951
|
-
}, 1032, ["modifiers"]))), 128)) : (
|
|
1952
|
-
|
|
2015
|
+
}, 1032, ["modifiers"]))), 128)) : (L(), I("div", Mn, O(N(Xe)), 1))], void 0, 0) : c(e.$slots, "placeholder", {}, () => [P(O(e.placeholder), 1)], void 0, 1)], 16, jn),
|
|
2016
|
+
N(We) ? (L(), S(kt, h({ key: 1 }, N(We), { class: "vv-select__icon vv-select__icon-after" }), null, 16)) : j("v-if", !0)
|
|
1953
2017
|
]),
|
|
1954
|
-
|
|
2018
|
+
N(ze) && N(d).showClearAction ? (L(), S(N(jt), {
|
|
1955
2019
|
key: 1,
|
|
1956
2020
|
"input-type": "select",
|
|
1957
2021
|
label: e.labelClear,
|
|
1958
2022
|
icon: e.iconClear,
|
|
1959
|
-
disabled: !
|
|
2023
|
+
disabled: !N(Re),
|
|
1960
2024
|
onClear: Qe
|
|
1961
2025
|
}, null, 8, [
|
|
1962
2026
|
"label",
|
|
1963
2027
|
"icon",
|
|
1964
2028
|
"disabled"
|
|
1965
|
-
])) :
|
|
1966
|
-
e.$slots.after ? (
|
|
2029
|
+
])) : j("v-if", !0),
|
|
2030
|
+
e.$slots.after ? (L(), I("div", Pn, [c(e.$slots, "after", r(i(N(tt))))])) : j("v-if", !0)
|
|
1967
2031
|
]),
|
|
1968
|
-
items:
|
|
1969
|
-
default:
|
|
2032
|
+
items: A(() => [!N(Se) && N(X)?.length ? (L(!0), I(w, { key: 0 }, b(N(X), (t, n) => (L(), I(w, { key: n }, [R(t) ? (L(), I(w, { key: 0 }, [_(an, { label: N(G)(t) }, {
|
|
2033
|
+
default: A(() => [c(e.$slots, "option-group", h({ ref_for: !0 }, {
|
|
1970
2034
|
option: t,
|
|
1971
|
-
selectedOptions:
|
|
1972
|
-
}), () => [
|
|
2035
|
+
selectedOptions: N(Ye)
|
|
2036
|
+
}), () => [P(O(N(G)(t)), 1)])]),
|
|
1973
2037
|
_: 2
|
|
1974
|
-
}, 1032, ["label"]), (
|
|
2038
|
+
}, 1032, ["label"]), (L(!0), I(w, null, b(N(K)(t), (t, n) => (L(), S(cn, h({ ref_for: !0 }, {
|
|
1975
2039
|
selected: Z(t),
|
|
1976
2040
|
disabled: Y(t),
|
|
1977
|
-
unselectable:
|
|
1978
|
-
deselectHintLabel:
|
|
1979
|
-
selectHintLabel:
|
|
1980
|
-
selectedHintLabel:
|
|
2041
|
+
unselectable: N(ze),
|
|
2042
|
+
deselectHintLabel: N(d).deselectHintLabel,
|
|
2043
|
+
selectHintLabel: N(d).selectHintLabel,
|
|
2044
|
+
selectedHintLabel: N(d).selectedHintLabel,
|
|
1981
2045
|
focusOnHover: e.focusOnHover
|
|
1982
2046
|
}, {
|
|
1983
2047
|
key: n,
|
|
1984
2048
|
class: "vv-dropdown-option",
|
|
1985
2049
|
onClickPassive: (e) => Q(t)
|
|
1986
2050
|
}), {
|
|
1987
|
-
default:
|
|
2051
|
+
default: A(() => [c(e.$slots, "option", h({ ref_for: !0 }, {
|
|
1988
2052
|
option: t,
|
|
1989
|
-
selectedOptions:
|
|
2053
|
+
selectedOptions: N(Ye),
|
|
1990
2054
|
selected: Z(t),
|
|
1991
2055
|
disabled: Y(t)
|
|
1992
|
-
}), () => [
|
|
2056
|
+
}), () => [P(O(N(G)(t)), 1)])]),
|
|
1993
2057
|
_: 2
|
|
1994
|
-
}, 1040, ["onClickPassive"]))), 128))], 64)) : (
|
|
2058
|
+
}, 1040, ["onClickPassive"]))), 128))], 64)) : (L(), S(cn, h({
|
|
1995
2059
|
key: 1,
|
|
1996
2060
|
ref_for: !0
|
|
1997
2061
|
}, {
|
|
1998
2062
|
selected: Z(t),
|
|
1999
2063
|
disabled: Y(t),
|
|
2000
|
-
unselectable:
|
|
2001
|
-
deselectHintLabel:
|
|
2002
|
-
selectHintLabel:
|
|
2003
|
-
selectedHintLabel:
|
|
2064
|
+
unselectable: N(ze),
|
|
2065
|
+
deselectHintLabel: N(d).deselectHintLabel,
|
|
2066
|
+
selectHintLabel: N(d).selectHintLabel,
|
|
2067
|
+
selectedHintLabel: N(d).selectedHintLabel,
|
|
2004
2068
|
focusOnHover: e.focusOnHover
|
|
2005
2069
|
}, {
|
|
2006
2070
|
class: "vv-dropdown-option",
|
|
2007
2071
|
onClickPassive: (e) => Q(t)
|
|
2008
2072
|
}), {
|
|
2009
|
-
default:
|
|
2073
|
+
default: A(() => [c(e.$slots, "option", h({ ref_for: !0 }, {
|
|
2010
2074
|
option: t,
|
|
2011
|
-
selectedOptions:
|
|
2075
|
+
selectedOptions: N(Ye),
|
|
2012
2076
|
selected: Z(t),
|
|
2013
2077
|
disabled: Y(t)
|
|
2014
|
-
}), () => [
|
|
2078
|
+
}), () => [P(O(N(G)(t)), 1)])]),
|
|
2015
2079
|
_: 2
|
|
2016
|
-
}, 1040, ["onClickPassive"]))], 64))), 128)) : e.options.length ? (
|
|
2080
|
+
}, 1040, ["onClickPassive"]))], 64))), 128)) : e.options.length ? (L(), S(cn, {
|
|
2017
2081
|
key: 2,
|
|
2018
2082
|
modifiers: "inert"
|
|
2019
2083
|
}, {
|
|
2020
|
-
default:
|
|
2084
|
+
default: A(() => [c(e.$slots, "no-results", {}, () => [P(O(N(d).addable ? N(d).addOptionHintLabel : N(d).noResultsLabel), 1)])]),
|
|
2021
2085
|
_: 3
|
|
2022
|
-
})) : (
|
|
2086
|
+
})) : (L(), S(cn, {
|
|
2023
2087
|
key: 1,
|
|
2024
2088
|
modifiers: "inert"
|
|
2025
2089
|
}, {
|
|
2026
|
-
default:
|
|
2090
|
+
default: A(() => [c(e.$slots, "no-options", {}, () => [P(O(N(d).addable && le.value.length ? N(d).addOptionHintLabel : N(d).noOptionsLabel), 1)])]),
|
|
2027
2091
|
_: 3
|
|
2028
2092
|
}))]),
|
|
2029
|
-
after:
|
|
2093
|
+
after: A(() => [c(e.$slots, "dropdown::after", {}, () => [N(m)?.customPosition ? (L(), S(Kt, {
|
|
2030
2094
|
key: 0,
|
|
2031
|
-
label:
|
|
2095
|
+
label: N(d).closeLabel,
|
|
2032
2096
|
modifiers: "secondary",
|
|
2033
|
-
onClick: t[1] ||= (e) =>
|
|
2034
|
-
}, null, 8, ["label"])) :
|
|
2097
|
+
onClick: t[1] ||= (e) => N(m).hide()
|
|
2098
|
+
}, null, 8, ["label"])) : j("v-if", !0)])]),
|
|
2035
2099
|
_: 2
|
|
2036
|
-
}, [
|
|
2100
|
+
}, [N(d).searchable || e.$slots["dropdown::before"] ? {
|
|
2037
2101
|
name: "before",
|
|
2038
|
-
fn:
|
|
2102
|
+
fn: A(() => [c(e.$slots, "dropdown::before"), N(d).searchable && !N(Se) ? ue((L(), I("input", {
|
|
2039
2103
|
key: 0,
|
|
2040
|
-
id:
|
|
2104
|
+
id: N(Me),
|
|
2041
2105
|
ref_key: "inputSearchEl",
|
|
2042
2106
|
ref: f,
|
|
2043
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
2107
|
+
"onUpdate:modelValue": t[0] ||= (e) => le.value = e,
|
|
2044
2108
|
"aria-autocomplete": "list",
|
|
2045
|
-
"aria-controls":
|
|
2109
|
+
"aria-controls": N(je),
|
|
2046
2110
|
autocomplete: "off",
|
|
2047
2111
|
spellcheck: "false",
|
|
2048
2112
|
type: "search",
|
|
2049
2113
|
class: "vv-dropdown__search",
|
|
2050
|
-
placeholder:
|
|
2051
|
-
onKeyup:
|
|
2052
|
-
}, null, 40, On)), [[ae,
|
|
2114
|
+
placeholder: N(d).searchPlaceholder,
|
|
2115
|
+
onKeyup: he(nt, ["enter"])
|
|
2116
|
+
}, null, 40, On)), [[ae, le.value]]) : j("v-if", !0)]),
|
|
2053
2117
|
key: "0"
|
|
2054
2118
|
} : void 0]), 1040, ["modelValue", "role"])], 512),
|
|
2055
|
-
_(
|
|
2056
|
-
id:
|
|
2119
|
+
_(N(te), {
|
|
2120
|
+
id: N(Ae),
|
|
2057
2121
|
class: "vv-select__hint"
|
|
2058
2122
|
}, C({ _: 2 }, [
|
|
2059
2123
|
e.$slots.hint ? {
|
|
2060
2124
|
name: "hint",
|
|
2061
|
-
fn:
|
|
2125
|
+
fn: A(() => [c(e.$slots, "hint", r(i(N(y))))]),
|
|
2062
2126
|
key: "0"
|
|
2063
2127
|
} : void 0,
|
|
2064
2128
|
e.$slots.loading ? {
|
|
2065
2129
|
name: "loading",
|
|
2066
|
-
fn:
|
|
2130
|
+
fn: A(() => [c(e.$slots, "loading", r(i(N(y))))]),
|
|
2067
2131
|
key: "1"
|
|
2068
2132
|
} : void 0,
|
|
2069
2133
|
e.$slots.valid ? {
|
|
2070
2134
|
name: "valid",
|
|
2071
|
-
fn:
|
|
2135
|
+
fn: A(() => [c(e.$slots, "valid", r(i(N(y))))]),
|
|
2072
2136
|
key: "2"
|
|
2073
2137
|
} : void 0,
|
|
2074
2138
|
e.$slots.invalid ? {
|
|
2075
2139
|
name: "invalid",
|
|
2076
|
-
fn:
|
|
2140
|
+
fn: A(() => [c(e.$slots, "invalid", r(i(N(y))))]),
|
|
2077
2141
|
key: "3"
|
|
2078
2142
|
} : void 0
|
|
2079
2143
|
]), 1032, ["id"])
|
|
@@ -2082,4 +2146,4 @@ var hn = ["for"], gn = { class: "vv-select__wrapper" }, _n = {
|
|
|
2082
2146
|
});
|
|
2083
2147
|
export { Fn as default };
|
|
2084
2148
|
|
|
2085
|
-
//# sourceMappingURL=VvCombobox.es-
|
|
2149
|
+
//# sourceMappingURL=VvCombobox.es-BJzmLeTh.js.map
|