@8wave/ai-elements 0.98.0 → 0.99.0-beta.2
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/README.md +24 -5
- package/{dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js → dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js} +379 -362
- package/dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js.map +1 -0
- package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js → PkToolRequestGeolocation-B73evGBg.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js.map → PkToolRequestGeolocation-B73evGBg.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js → PkToolRequestOAuthConnection-BWP5dsK_.js} +3 -3
- package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js.map → PkToolRequestOAuthConnection-BWP5dsK_.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js → PkToolShowArtifact-bYYaMGxq.js} +7 -7
- package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js.map → PkToolShowArtifact-bYYaMGxq.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js → PkToolShowCalendarEvent-DdEWaTj-.js} +4 -4
- package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js.map → PkToolShowCalendarEvent-DdEWaTj-.js.map} +1 -1
- package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js → PkToolShowComparison-Dcar7HPW.js} +4 -4
- package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js.map → PkToolShowComparison-Dcar7HPW.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js → PkToolShowContactForm-DtjVW-n6.js} +13 -13
- package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js.map → PkToolShowContactForm-DtjVW-n6.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js → PkToolShowDiagram-X35nsoIY.js} +8 -8
- package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js.map → PkToolShowDiagram-X35nsoIY.js.map} +1 -1
- package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js → PkToolShowEmail-jVoK8qEh.js} +4 -4
- package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js.map → PkToolShowEmail-jVoK8qEh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-BNV4Ja6g.js → PkToolShowForm-BP8asXtz.js} +123 -97
- package/dist/_chunks/PkToolShowForm-BP8asXtz.js.map +1 -0
- package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js → PkToolShowImageGallery-WQL3T4Hr.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js.map → PkToolShowImageGallery-WQL3T4Hr.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js → PkToolShowLocation-w2t7lKpb.js} +4 -4
- package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js.map → PkToolShowLocation-w2t7lKpb.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js → PkToolShowMessage-BPo7WPim.js} +4 -4
- package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js.map → PkToolShowMessage-BPo7WPim.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-puiPFItN.js → PkToolShowProductList-BbY4ni7Y.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-puiPFItN.js.map → PkToolShowProductList-BbY4ni7Y.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js → PkToolShowQrCode-CN0ms27N.js} +4 -4
- package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js.map → PkToolShowQrCode-CN0ms27N.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js → PkToolShowSources-D2tBcx7n.js} +18 -18
- package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js.map → PkToolShowSources-D2tBcx7n.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js → PkToolShowSuggestedReply-Cdh_elSh.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js.map → PkToolShowSuggestedReply-Cdh_elSh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js → PkToolShowVideo-D3aU5FMO.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js.map → PkToolShowVideo-D3aU5FMO.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js → PkToolShowWeather-CzanXIJp.js} +3 -3
- package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js.map → PkToolShowWeather-CzanXIJp.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js → PkToolShowWebPages-DkMJrWmT.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js.map → PkToolShowWebPages-DkMJrWmT.js.map} +1 -1
- package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js → VvCheckbox.es-CRhIKQNR.js} +2 -2
- package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js.map → VvCheckbox.es-CRhIKQNR.js.map} +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js → VvCheckboxGroup.es-gOy2kM1Y.js} +5 -5
- package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js.map → VvCheckboxGroup.es-gOy2kM1Y.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-CFA-K-cQ.js → VvCombobox.es-BOwH3LmO.js} +9 -9
- package/dist/_chunks/VvCombobox.es-BOwH3LmO.js.map +1 -0
- package/dist/_chunks/{VvInputText.es-csEQ-bSG.js → VvInputText.es-D8nXroKO.js} +536 -513
- package/dist/_chunks/VvInputText.es-D8nXroKO.js.map +1 -0
- package/dist/_chunks/{VvRadio.es-BpymhC73.js → VvRadio.es-Djy5J33A.js} +2 -2
- package/dist/_chunks/{VvRadio.es-BpymhC73.js.map → VvRadio.es-Djy5J33A.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-CSNzOJKx.js → VvRadioGroup.es-DQq3JYCR.js} +5 -5
- package/dist/_chunks/VvRadioGroup.es-DQq3JYCR.js.map +1 -0
- package/dist/_chunks/{VvSelect.es-CjKMd0nH.js → VvSelect.es-CE4x1ww0.js} +4 -4
- package/dist/_chunks/{VvSelect.es-CjKMd0nH.js.map → VvSelect.es-CE4x1ww0.js.map} +1 -1
- package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js +1129 -0
- package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js.map +1 -0
- package/dist/_chunks/{dist-BNET2z7b.js → dist-CvMCBce7.js} +39 -21
- package/dist/_chunks/dist-CvMCBce7.js.map +1 -0
- package/dist/_chunks/dot-prop-CObyt75F.js +141 -0
- package/dist/_chunks/dot-prop-CObyt75F.js.map +1 -0
- package/dist/_chunks/{floating-ui.vue-CIKvCpTA.js → floating-ui.vue-BacoFpVq.js} +278 -305
- package/dist/_chunks/floating-ui.vue-BacoFpVq.js.map +1 -0
- package/dist/_chunks/{index.es-u1dF1xg2.js → index.es-DpqfagWZ.js} +12 -12
- package/dist/_chunks/{index.es-u1dF1xg2.js.map → index.es-DpqfagWZ.js.map} +1 -1
- package/dist/_chunks/{index.es-BYny0uhz.js → index.es-_oXVRjHy.js} +2352 -2329
- package/dist/_chunks/index.es-_oXVRjHy.js.map +1 -0
- package/dist/ai-elements.es.js +4818 -5765
- 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/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/PkChatbot-Bf5uY3cO.js +236 -0
- package/dist-vue/_chunks/{PkChatbot-DHkhT0Jf.js.map → PkChatbot-Bf5uY3cO.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js → PkChatbotAuth-BGn2MDYD.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js.map → PkChatbotAuth-BGn2MDYD.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js → PkChatbotEmptyState-CPqLqXek.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js.map → PkChatbotEmptyState-CPqLqXek.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js → PkChatbotFeedbackForm-C_y__RH8.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js.map → PkChatbotFeedbackForm-C_y__RH8.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js → PkChatbotInput-jvb0vuak.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js.map → PkChatbotInput-jvb0vuak.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotMessages-B3G12zah.js +752 -0
- package/dist-vue/_chunks/PkChatbotMessages-B3G12zah.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-ldThv0t5.js → PkChatbotStepToolDetail-BVI72gyx.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-ldThv0t5.js.map → PkChatbotStepToolDetail-BVI72gyx.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-BdU6YC_N.js +172 -0
- package/dist-vue/_chunks/{PkChatbotSteps-BpqdFhsG.js.map → PkChatbotSteps-BdU6YC_N.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-C08TsXiL.js → PkChatbotViewChat-c0Ecpzoc.js} +68 -68
- package/dist-vue/_chunks/PkChatbotViewChat-c0Ecpzoc.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-BQZi5kSC.js → PkChatbotViewConversations-BfhRCA_1.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-BQZi5kSC.js.map → PkChatbotViewConversations-BfhRCA_1.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-TLKE_tRw.js → PkChatbotViewFiles-BipRoidH.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-TLKE_tRw.js.map → PkChatbotViewFiles-BipRoidH.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-B6ANZY96.js → PkChatbotViewProfile-DuLwYpGZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-B6ANZY96.js.map → PkChatbotViewProfile-DuLwYpGZ.js.map} +1 -1
- package/{dist/_chunks/PkStreamingMarkdown-Djw604Ny.js → dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js} +344 -347
- package/dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js → PkToolShowArtifact-COwSXmF4.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js.map → PkToolShowArtifact-COwSXmF4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js → PkToolShowContactForm-DRRtCCxB.js} +10 -10
- package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js.map → PkToolShowContactForm-DRRtCCxB.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-C-mWyeka.js → PkToolShowForm-j7Ha-0X3.js} +128 -102
- package/dist-vue/_chunks/PkToolShowForm-j7Ha-0X3.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js → PkToolShowSources-BVLw4W5l.js} +43 -43
- package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js.map → PkToolShowSources-BVLw4W5l.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-BOBdBxmf.js → createChatbotApiClient-IH6wBh4s.js} +148 -160
- package/dist-vue/_chunks/createChatbotApiClient-IH6wBh4s.js.map +1 -0
- package/dist-vue/_chunks/{index.es-XfWQ82pb.js → index.es-Bk1O0p8N.js} +166 -156
- package/dist-vue/_chunks/index.es-Bk1O0p8N.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-BJ-EDmND.js → useChatbotStore-C3uKi2FS.js} +114 -106
- package/dist-vue/_chunks/useChatbotStore-C3uKi2FS.js.map +1 -0
- package/dist-vue/_chunks/{utils-BMa8jwJS.js → utils-Cru8TJxe.js} +48 -30
- package/dist-vue/_chunks/utils-Cru8TJxe.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +3 -3
- package/dist-vue/index.js +3732 -3213
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +43 -7
- package/dist-vue/packages/components/src/PkCheckboxField.d.ts +45 -0
- package/dist-vue/packages/components/src/PkEditorRepeater.d.ts +2 -2
- package/dist-vue/packages/components/src/{chat/PkToolRequestConfirm.d.ts → PkOfflineScreen.d.ts} +10 -3
- package/dist-vue/packages/components/src/PkPwaNotices.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +18 -3
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +24 -2
- package/dist-vue/packages/components/src/chat/PkToolApprovalBadge.d.ts +4 -0
- package/dist-vue/packages/components/src/chat/PkToolApprovalCard.d.ts +35 -0
- package/dist-vue/packages/components/src/chat/PkToolApprovalPreviewMessage.d.ts +11 -0
- package/dist-vue/packages/components/src/chat/index.d.ts +2 -1
- package/dist-vue/packages/components/src/chat/toolApprovalPreviews.d.ts +12 -0
- package/dist-vue/packages/components/src/chat/toolComponentMap.d.ts +5 -3
- package/dist-vue/packages/components/src/chat/useChatScroll.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/utils.d.ts +13 -0
- package/dist-vue/packages/components/src/index.d.ts +4 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +70 -1
- package/dist-vue/packages/composable/src/index.d.ts +1 -0
- package/dist-vue/packages/composable/src/useConnectivity.d.ts +28 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +129 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +30 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +30 -0
- package/dist-vue/style.css +1 -1
- package/package.json +3 -3
- package/dist/_chunks/PkStreamingMarkdown-Djw604Ny.js.map +0 -1
- package/dist/_chunks/PkToolRequestConfirm-FQ9nDFXy.js +0 -48
- package/dist/_chunks/PkToolRequestConfirm-FQ9nDFXy.js.map +0 -1
- package/dist/_chunks/PkToolShowForm-BNV4Ja6g.js.map +0 -1
- package/dist/_chunks/VvCombobox.es-CFA-K-cQ.js.map +0 -1
- package/dist/_chunks/VvInputText.es-csEQ-bSG.js.map +0 -1
- package/dist/_chunks/VvRadioGroup.es-CSNzOJKx.js.map +0 -1
- package/dist/_chunks/VvTextarea.es-eEyRRpuT.js +0 -1109
- package/dist/_chunks/VvTextarea.es-eEyRRpuT.js.map +0 -1
- package/dist/_chunks/dist-BNET2z7b.js.map +0 -1
- package/dist/_chunks/dot-prop-BXrC9bAX.js +0 -131
- package/dist/_chunks/dot-prop-BXrC9bAX.js.map +0 -1
- package/dist/_chunks/floating-ui.vue-CIKvCpTA.js.map +0 -1
- package/dist/_chunks/index.es-BYny0uhz.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-DHkhT0Jf.js +0 -236
- package/dist-vue/_chunks/PkChatbotMessages-B4qfTNOJ.js +0 -630
- package/dist-vue/_chunks/PkChatbotMessages-B4qfTNOJ.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-BpqdFhsG.js +0 -172
- package/dist-vue/_chunks/PkChatbotViewChat-C08TsXiL.js.map +0 -1
- package/dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js.map +0 -1
- package/dist-vue/_chunks/PkToolRequestConfirm-CQNa3seA.js +0 -48
- package/dist-vue/_chunks/PkToolRequestConfirm-CQNa3seA.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowForm-C-mWyeka.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BOBdBxmf.js.map +0 -1
- package/dist-vue/_chunks/index.es-XfWQ82pb.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-BJ-EDmND.js.map +0 -1
- package/dist-vue/_chunks/utils-BMa8jwJS.js.map +0 -1
|
@@ -0,0 +1,1129 @@
|
|
|
1
|
+
import { A as e, B as t, C as n, D as r, F as i, G as a, H as o, Ht as s, K as c, L as l, M as u, O as d, P as f, Q as p, S as m, T as h, Ut as g, V as ee, Wt as te, Y as ne, _, at as v, b as y, bt as re, dt as ie, et as b, f as x, g as S, i as ae, j as oe, kt as C, l as w, lt as T, mt as E, n as se, p as ce, q as le, qt as D, tt as ue, u as de, v as O, x as k, xt as A, y as j, yt as fe, z as M } from "./vue.runtime.esm-bundler-DbhD_IvR.js";
|
|
2
|
+
import { a as pe, i as me, t as he } from "./iconify-D4alNs0B.js";
|
|
3
|
+
import { c as ge, d as _e, l as ve, m as ye, n as be, o as N, p as P, r as F, s as xe } from "./dist-CvMCBce7.js";
|
|
4
|
+
import { a as I, c as Se, i as Ce, l as L, n as we, o as R, r as Te, s as Ee, t as De } from "./floating-ui.vue-BacoFpVq.js";
|
|
5
|
+
//#region ../../node_modules/.pnpm/@volverjs+ui-vue@0.0.16_@json-render+core@0.19.0_zod@4.4.3__@volverjs+style@0.1.24_@vue_2f22628193d1c391adccdccf4d8cf3c8/node_modules/@volverjs/ui-vue/dist/components/VvTextarea/VvTextarea.es.js
|
|
6
|
+
e(), ae(), v(), C();
|
|
7
|
+
var z = {
|
|
8
|
+
showPassword: "eye-on",
|
|
9
|
+
hidePassword: "eye-off",
|
|
10
|
+
showDatePicker: "calendar",
|
|
11
|
+
showTimePicker: "time",
|
|
12
|
+
showColorPicker: "color",
|
|
13
|
+
clear: "close",
|
|
14
|
+
add: "add",
|
|
15
|
+
remove: "trash",
|
|
16
|
+
edit: "edit",
|
|
17
|
+
download: "download"
|
|
18
|
+
}, B = { prefix: "normal" }, V = /* @__PURE__ */ (function(e) {
|
|
19
|
+
return e.local = "local", e.session = "session", e;
|
|
20
|
+
})({}), H = /* @__PURE__ */ (function(e) {
|
|
21
|
+
return e.absolute = "absolute", e.fixed = "fixed", e;
|
|
22
|
+
})({}), U = /* @__PURE__ */ (function(e) {
|
|
23
|
+
return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
|
|
24
|
+
})({}), W = /* @__PURE__ */ (function(e) {
|
|
25
|
+
return e.topStart = "top-start", e.topEnd = "top-end", e.bottomStart = "bottom-start", e.bottomEnd = "bottom-end", e.leftStart = "left-start", e.leftEnd = "left-end", e.rightStart = "right-start", e.rightEnd = "right-end", e;
|
|
26
|
+
})({}), G = /* @__PURE__ */ (function(e) {
|
|
27
|
+
return e.before = "before", e.after = "after", e;
|
|
28
|
+
})({}), Oe = /* @__PURE__ */ (function(e) {
|
|
29
|
+
return e.button = "button", e.submit = "submit", e.reset = "reset", e;
|
|
30
|
+
})({}), ke = /* @__PURE__ */ (function(e) {
|
|
31
|
+
return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
|
|
32
|
+
})({}), Ae = /* @__PURE__ */ (function(e) {
|
|
33
|
+
return e.button = "button", e.link = "link", e.menuitem = "menuitem", e;
|
|
34
|
+
})({}), K = /* @__PURE__ */ (function(e) {
|
|
35
|
+
return e.listbox = "listbox", e.menu = "menu", e;
|
|
36
|
+
})({}), q = /* @__PURE__ */ (function(e) {
|
|
37
|
+
return e.option = "option", e.presentation = "presentation", e;
|
|
38
|
+
})({}), je = /* @__PURE__ */ Symbol.for("volver"), Me = /* @__PURE__ */ Symbol.for("dropdownTrigger"), J = /* @__PURE__ */ Symbol.for("dropdownItem"), Y = /* @__PURE__ */ Symbol.for("dropdownAction"), Ne = {
|
|
39
|
+
to: { type: [String, Object] },
|
|
40
|
+
href: String,
|
|
41
|
+
target: String,
|
|
42
|
+
rel: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "noopener noreferrer"
|
|
45
|
+
}
|
|
46
|
+
}, Pe = {
|
|
47
|
+
valid: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
validLabel: {
|
|
52
|
+
type: [String, Array],
|
|
53
|
+
default: void 0
|
|
54
|
+
}
|
|
55
|
+
}, X = {
|
|
56
|
+
invalid: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !1
|
|
59
|
+
},
|
|
60
|
+
invalidLabel: {
|
|
61
|
+
type: [String, Array],
|
|
62
|
+
default: void 0
|
|
63
|
+
}
|
|
64
|
+
}, Z = {
|
|
65
|
+
loading: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: !1
|
|
68
|
+
},
|
|
69
|
+
loadingLabel: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: "Loading..."
|
|
72
|
+
}
|
|
73
|
+
}, Q = { disabled: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: !1
|
|
76
|
+
} }, Fe = { required: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: !1
|
|
79
|
+
} }, Ie = { selected: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: !1
|
|
82
|
+
} }, Le = { active: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: !1
|
|
85
|
+
} }, Re = { current: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: !1
|
|
88
|
+
} };
|
|
89
|
+
z.clear;
|
|
90
|
+
var ze = { pressed: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: !1
|
|
93
|
+
} }, Be = { label: {
|
|
94
|
+
type: [String, Number],
|
|
95
|
+
default: void 0
|
|
96
|
+
} }, Ve = { readonly: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: !1
|
|
99
|
+
} }, He = { modifiers: {
|
|
100
|
+
type: [String, Array],
|
|
101
|
+
default: void 0
|
|
102
|
+
} }, Ue = { hintLabel: {
|
|
103
|
+
type: String,
|
|
104
|
+
default: ""
|
|
105
|
+
} }, We = {
|
|
106
|
+
options: {
|
|
107
|
+
type: Array,
|
|
108
|
+
default: () => []
|
|
109
|
+
},
|
|
110
|
+
labelKey: {
|
|
111
|
+
type: [String, Function],
|
|
112
|
+
default: "label"
|
|
113
|
+
},
|
|
114
|
+
valueKey: {
|
|
115
|
+
type: [String, Function],
|
|
116
|
+
default: "value"
|
|
117
|
+
},
|
|
118
|
+
disabledKey: {
|
|
119
|
+
type: [String, Function],
|
|
120
|
+
default: "disabled"
|
|
121
|
+
}
|
|
122
|
+
}, Ge = { count: {
|
|
123
|
+
type: [Boolean, String],
|
|
124
|
+
default: !1,
|
|
125
|
+
validator: (e) => [
|
|
126
|
+
!0,
|
|
127
|
+
!1,
|
|
128
|
+
"limit",
|
|
129
|
+
"countdown"
|
|
130
|
+
].includes(e)
|
|
131
|
+
} }, Ke = { debounce: {
|
|
132
|
+
type: [Number, String],
|
|
133
|
+
default: void 0
|
|
134
|
+
} }, qe = {
|
|
135
|
+
icon: {
|
|
136
|
+
type: [String, Object],
|
|
137
|
+
default: void 0
|
|
138
|
+
},
|
|
139
|
+
iconPosition: {
|
|
140
|
+
type: String,
|
|
141
|
+
default: G.before,
|
|
142
|
+
validation: (e) => Object.values(G).includes(e)
|
|
143
|
+
}
|
|
144
|
+
}, Je = { tabindex: {
|
|
145
|
+
type: [String, Number],
|
|
146
|
+
default: 0
|
|
147
|
+
} }, Ye = { floating: {
|
|
148
|
+
type: Boolean,
|
|
149
|
+
default: !1
|
|
150
|
+
} }, Xe = { unselectable: {
|
|
151
|
+
type: Boolean,
|
|
152
|
+
default: !0
|
|
153
|
+
} }, Ze = { id: [String, Number] }, Qe = {
|
|
154
|
+
placement: {
|
|
155
|
+
type: String,
|
|
156
|
+
default: U.bottom,
|
|
157
|
+
validator: (e) => Object.values(U).includes(e) || Object.values(W).includes(e)
|
|
158
|
+
},
|
|
159
|
+
strategy: {
|
|
160
|
+
type: String,
|
|
161
|
+
default: void 0,
|
|
162
|
+
validator: (e) => Object.values(H).includes(e)
|
|
163
|
+
},
|
|
164
|
+
transitionName: {
|
|
165
|
+
type: String,
|
|
166
|
+
default: void 0
|
|
167
|
+
},
|
|
168
|
+
offset: {
|
|
169
|
+
type: [
|
|
170
|
+
Number,
|
|
171
|
+
String,
|
|
172
|
+
Object
|
|
173
|
+
],
|
|
174
|
+
default: 0
|
|
175
|
+
},
|
|
176
|
+
shift: {
|
|
177
|
+
type: [Boolean, Object],
|
|
178
|
+
default: !1
|
|
179
|
+
},
|
|
180
|
+
flip: {
|
|
181
|
+
type: [Boolean, Object],
|
|
182
|
+
default: !0
|
|
183
|
+
},
|
|
184
|
+
size: {
|
|
185
|
+
type: [Boolean, Object],
|
|
186
|
+
default: () => ({ padding: 10 })
|
|
187
|
+
},
|
|
188
|
+
autoPlacement: {
|
|
189
|
+
type: [Boolean, Object],
|
|
190
|
+
default: !1
|
|
191
|
+
},
|
|
192
|
+
arrow: {
|
|
193
|
+
type: Boolean,
|
|
194
|
+
default: !1
|
|
195
|
+
},
|
|
196
|
+
keepOpen: {
|
|
197
|
+
type: Boolean,
|
|
198
|
+
default: !1
|
|
199
|
+
},
|
|
200
|
+
autofocusFirst: {
|
|
201
|
+
type: Boolean,
|
|
202
|
+
default: !0
|
|
203
|
+
},
|
|
204
|
+
triggerWidth: {
|
|
205
|
+
type: Boolean,
|
|
206
|
+
default: !1
|
|
207
|
+
}
|
|
208
|
+
}, $e = {
|
|
209
|
+
...Ze,
|
|
210
|
+
name: {
|
|
211
|
+
type: String,
|
|
212
|
+
required: !0
|
|
213
|
+
}
|
|
214
|
+
}, et = { autofocus: {
|
|
215
|
+
type: Boolean,
|
|
216
|
+
default: !1
|
|
217
|
+
} }, tt = { autocomplete: {
|
|
218
|
+
type: String,
|
|
219
|
+
default: "off"
|
|
220
|
+
} }, nt = {
|
|
221
|
+
...$e,
|
|
222
|
+
...et,
|
|
223
|
+
...tt,
|
|
224
|
+
...Je,
|
|
225
|
+
...Q,
|
|
226
|
+
...Ve,
|
|
227
|
+
...Pe,
|
|
228
|
+
...X,
|
|
229
|
+
...Ue,
|
|
230
|
+
...Z,
|
|
231
|
+
...He,
|
|
232
|
+
...Ge,
|
|
233
|
+
...Ke,
|
|
234
|
+
...qe,
|
|
235
|
+
...Ye,
|
|
236
|
+
...Be,
|
|
237
|
+
minlength: {
|
|
238
|
+
type: [String, Number],
|
|
239
|
+
default: void 0
|
|
240
|
+
},
|
|
241
|
+
maxlength: {
|
|
242
|
+
type: [String, Number],
|
|
243
|
+
default: void 0
|
|
244
|
+
},
|
|
245
|
+
placeholder: {
|
|
246
|
+
type: String,
|
|
247
|
+
default: void 0
|
|
248
|
+
},
|
|
249
|
+
...Fe
|
|
250
|
+
};
|
|
251
|
+
({
|
|
252
|
+
...$e,
|
|
253
|
+
...Je,
|
|
254
|
+
...Pe,
|
|
255
|
+
...X,
|
|
256
|
+
...Ue,
|
|
257
|
+
...Q,
|
|
258
|
+
...Ve,
|
|
259
|
+
...He,
|
|
260
|
+
...Be,
|
|
261
|
+
...Z
|
|
262
|
+
}), {
|
|
263
|
+
...Pe,
|
|
264
|
+
...X,
|
|
265
|
+
...We,
|
|
266
|
+
...Ue,
|
|
267
|
+
...Q,
|
|
268
|
+
...Ve,
|
|
269
|
+
...He,
|
|
270
|
+
...Be,
|
|
271
|
+
...Z,
|
|
272
|
+
...Fe
|
|
273
|
+
}, {
|
|
274
|
+
...Q,
|
|
275
|
+
...Be,
|
|
276
|
+
...ze,
|
|
277
|
+
...Le,
|
|
278
|
+
...Re,
|
|
279
|
+
...Ne
|
|
280
|
+
}, Oe.button, ke.button;
|
|
281
|
+
var rt = {
|
|
282
|
+
storageType: {
|
|
283
|
+
type: String,
|
|
284
|
+
default: V.local,
|
|
285
|
+
validator: (e) => Object.values(V).includes(e)
|
|
286
|
+
},
|
|
287
|
+
storageKey: String
|
|
288
|
+
}, it = {
|
|
289
|
+
hard: "hard",
|
|
290
|
+
soft: "soft"
|
|
291
|
+
}, at = {
|
|
292
|
+
true: !0,
|
|
293
|
+
false: !1,
|
|
294
|
+
default: "default"
|
|
295
|
+
}, ot = [
|
|
296
|
+
"update:modelValue",
|
|
297
|
+
"focus",
|
|
298
|
+
"blur",
|
|
299
|
+
"keyup",
|
|
300
|
+
"suggestion:selected",
|
|
301
|
+
"suggestion:removed"
|
|
302
|
+
], st = {
|
|
303
|
+
...nt,
|
|
304
|
+
...rt,
|
|
305
|
+
modelValue: String,
|
|
306
|
+
cols: {
|
|
307
|
+
type: [String, Number],
|
|
308
|
+
default: 20
|
|
309
|
+
},
|
|
310
|
+
rows: {
|
|
311
|
+
type: [String, Number],
|
|
312
|
+
default: 2
|
|
313
|
+
},
|
|
314
|
+
wrap: {
|
|
315
|
+
type: String,
|
|
316
|
+
default: it.soft
|
|
317
|
+
},
|
|
318
|
+
spellcheck: {
|
|
319
|
+
type: [Boolean, String],
|
|
320
|
+
default: at.default
|
|
321
|
+
},
|
|
322
|
+
iconRemoveSuggestion: {
|
|
323
|
+
type: [String, Object],
|
|
324
|
+
default: z.remove
|
|
325
|
+
},
|
|
326
|
+
labelRemoveSuggestion: {
|
|
327
|
+
type: String,
|
|
328
|
+
default: "Remove suggestion"
|
|
329
|
+
},
|
|
330
|
+
maxSuggestions: {
|
|
331
|
+
type: Number,
|
|
332
|
+
default: 5
|
|
333
|
+
},
|
|
334
|
+
selectOnFocus: {
|
|
335
|
+
type: Boolean,
|
|
336
|
+
default: !1
|
|
337
|
+
},
|
|
338
|
+
resizable: Boolean
|
|
339
|
+
};
|
|
340
|
+
function $(e) {
|
|
341
|
+
return ((e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0)(A(e));
|
|
342
|
+
}
|
|
343
|
+
function ct(e) {
|
|
344
|
+
return typeof e == "string";
|
|
345
|
+
}
|
|
346
|
+
function lt(e) {
|
|
347
|
+
return Array.isArray(e) ? e.filter((e) => ct(e)).join(" ") : e;
|
|
348
|
+
}
|
|
349
|
+
function ut(e, t) {
|
|
350
|
+
let n = S(() => T(e) ? e.value : e), r = S(() => lt(n.value.invalidLabel)), i = S(() => lt(n.value.validLabel)), a = S(() => n.value.loadingLabel), o = S(() => n.value.hintLabel), s = S(() => !!(n.value.loading && (t.loading || a.value))), c = S(() => !s.value && !!(n.value.invalid && (t.invalid || r.value))), l = S(() => !s.value && !c.value && !!(n.value.valid && (t.valid || i.value))), u = S(() => !s.value && !c.value && !l.value && !!(t.hint || o.value)), f = S(() => c.value || l.value || s.value || u.value);
|
|
351
|
+
return {
|
|
352
|
+
hasInvalidLabelOrSlot: c,
|
|
353
|
+
hasHintLabelOrSlot: u,
|
|
354
|
+
hasValidLabelOrSlot: l,
|
|
355
|
+
hasLoadingLabelOrSlot: s,
|
|
356
|
+
hintSlotScope: S(() => ({
|
|
357
|
+
modelValue: n.value.modelValue,
|
|
358
|
+
valid: n.value.valid,
|
|
359
|
+
invalid: n.value.invalid,
|
|
360
|
+
loading: n.value.loading
|
|
361
|
+
})),
|
|
362
|
+
HintSlot: h({
|
|
363
|
+
name: "HintSlot",
|
|
364
|
+
props: { tag: {
|
|
365
|
+
type: String,
|
|
366
|
+
default: "small"
|
|
367
|
+
} },
|
|
368
|
+
setup() {
|
|
369
|
+
return {
|
|
370
|
+
isVisible: f,
|
|
371
|
+
invalidLabel: r,
|
|
372
|
+
validLabel: i,
|
|
373
|
+
loadingLabel: a,
|
|
374
|
+
hintLabel: o,
|
|
375
|
+
hasInvalidLabelOrSlot: c,
|
|
376
|
+
hasValidLabelOrSlot: l,
|
|
377
|
+
hasLoadingLabelOrSlot: s,
|
|
378
|
+
hasHintLabelOrSlot: u
|
|
379
|
+
};
|
|
380
|
+
},
|
|
381
|
+
render() {
|
|
382
|
+
if (this.isVisible) {
|
|
383
|
+
let e;
|
|
384
|
+
return this.hasInvalidLabelOrSlot && (e = "alert"), this.hasValidLabelOrSlot && (e = "status"), this.hasLoadingLabelOrSlot ? d(this.tag, { role: e }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? d(this.tag, { role: e }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? d(this.tag, { role: e }, this.$slots.valid?.() ?? this.validLabel) : d(this.tag, { role: e }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
|
|
385
|
+
}
|
|
386
|
+
return null;
|
|
387
|
+
}
|
|
388
|
+
})
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
var dt = {
|
|
392
|
+
...Ze,
|
|
393
|
+
...Qe,
|
|
394
|
+
...He,
|
|
395
|
+
modelValue: {
|
|
396
|
+
type: Boolean,
|
|
397
|
+
default: void 0
|
|
398
|
+
},
|
|
399
|
+
reference: {
|
|
400
|
+
type: Object,
|
|
401
|
+
default: null
|
|
402
|
+
},
|
|
403
|
+
role: {
|
|
404
|
+
type: String,
|
|
405
|
+
default: K.menu,
|
|
406
|
+
validator: (e) => Object.values(K).includes(e)
|
|
407
|
+
}
|
|
408
|
+
}, ft = { focusOnHover: {
|
|
409
|
+
type: Boolean,
|
|
410
|
+
default: !1
|
|
411
|
+
} }, pt = {
|
|
412
|
+
...Q,
|
|
413
|
+
...Ie,
|
|
414
|
+
...Xe,
|
|
415
|
+
...He,
|
|
416
|
+
deselectHintLabel: { type: String },
|
|
417
|
+
selectHintLabel: { type: String },
|
|
418
|
+
selectedHintLabel: { type: String },
|
|
419
|
+
focusOnHover: {
|
|
420
|
+
type: Boolean,
|
|
421
|
+
default: !1
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
function mt(e) {
|
|
425
|
+
return S(() => String(e?.value || le()));
|
|
426
|
+
}
|
|
427
|
+
function ht({ reference: e, id: n, expanded: r, aria: i }) {
|
|
428
|
+
let a = L();
|
|
429
|
+
return {
|
|
430
|
+
bus: a,
|
|
431
|
+
component: h({
|
|
432
|
+
name: "VvDropdownTriggerProvider",
|
|
433
|
+
setup() {
|
|
434
|
+
t(Me, {
|
|
435
|
+
reference: e,
|
|
436
|
+
id: n,
|
|
437
|
+
expanded: r,
|
|
438
|
+
aria: i,
|
|
439
|
+
bus: a
|
|
440
|
+
});
|
|
441
|
+
},
|
|
442
|
+
render() {
|
|
443
|
+
return d(ce, {}, this.$slots.default?.());
|
|
444
|
+
}
|
|
445
|
+
})
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
function gt({ role: e, ...n }) {
|
|
449
|
+
let r = S(() => e.value === K.listbox ? q.option : q.presentation);
|
|
450
|
+
return t(J, {
|
|
451
|
+
role: r,
|
|
452
|
+
...n
|
|
453
|
+
}), { itemRole: r };
|
|
454
|
+
}
|
|
455
|
+
function _t({ expanded: e }) {
|
|
456
|
+
t(Y, {
|
|
457
|
+
role: E(Ae.menuitem),
|
|
458
|
+
expanded: e
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
function vt(e, t, n) {
|
|
462
|
+
return S(() => {
|
|
463
|
+
let r = { [e]: !0 }, i = typeof t?.value == "string" ? t.value.split(" ") : t?.value;
|
|
464
|
+
return i && Array.isArray(i) && i.forEach((t) => {
|
|
465
|
+
t && (r[`${e}--${t}`] = !0);
|
|
466
|
+
}), n && Object.keys(n.value).forEach((t) => {
|
|
467
|
+
r[`${e}--${t}`] = A(n.value[t]);
|
|
468
|
+
}), r;
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
var yt = [
|
|
472
|
+
"id",
|
|
473
|
+
"tabindex",
|
|
474
|
+
"role",
|
|
475
|
+
"aria-labelledby"
|
|
476
|
+
], bt = /* @__PURE__ */ h({
|
|
477
|
+
name: "VvDropdown",
|
|
478
|
+
inheritAttrs: !1,
|
|
479
|
+
props: dt,
|
|
480
|
+
emits: [
|
|
481
|
+
"update:modelValue",
|
|
482
|
+
"beforeEnter",
|
|
483
|
+
"afterLeave",
|
|
484
|
+
"beforeExpand",
|
|
485
|
+
"beforeCollapse",
|
|
486
|
+
"afterExpand",
|
|
487
|
+
"afterCollapse",
|
|
488
|
+
"before-enter",
|
|
489
|
+
"after-leave",
|
|
490
|
+
"enter",
|
|
491
|
+
"afterEnter",
|
|
492
|
+
"enterCancelled",
|
|
493
|
+
"beforeLeave",
|
|
494
|
+
"leave",
|
|
495
|
+
"leaveCancelled"
|
|
496
|
+
],
|
|
497
|
+
setup(e, { expose: t, emit: u }) {
|
|
498
|
+
let d = e, m = u, { id: h } = fe(d), ee = mt(h), ne = c(), v = E("auto"), re = E("auto"), ie = E(), x = E(), ae = E(), oe = E(), C = S({
|
|
499
|
+
get: () => d.reference ?? ie.value,
|
|
500
|
+
set: (e) => {
|
|
501
|
+
ie.value = e;
|
|
502
|
+
}
|
|
503
|
+
}), w = E(!1);
|
|
504
|
+
l(() => {
|
|
505
|
+
_e(x.value, () => {
|
|
506
|
+
w.value = globalThis.getComputedStyle(x.value).getPropertyValue("--dropdown-custom-position")?.trim() === "true";
|
|
507
|
+
}, {
|
|
508
|
+
attributeFilter: ["style"],
|
|
509
|
+
window: globalThis.window
|
|
510
|
+
});
|
|
511
|
+
});
|
|
512
|
+
function T(e, t, n) {
|
|
513
|
+
return typeof e == "boolean" ? t() : n(e);
|
|
514
|
+
}
|
|
515
|
+
let le = S(() => {
|
|
516
|
+
let e = [];
|
|
517
|
+
if (d.autoPlacement ? e.push(T(d.autoPlacement, () => Te(), (e) => Te(e))) : d.flip && e.push(T(d.flip, () => I({ fallbackStrategy: "initialPlacement" }), (e) => I(e))), d.shift && e.push(T(d.shift, () => Ee(), (e) => Ee(e))), d.size) {
|
|
518
|
+
let t = ({ availableWidth: e, availableHeight: t }) => {
|
|
519
|
+
v.value = `${e}px`, re.value = `${t}px`;
|
|
520
|
+
};
|
|
521
|
+
e.push(T(d.size, () => Se({ apply: t }), (e) => Se({
|
|
522
|
+
...e,
|
|
523
|
+
apply: t
|
|
524
|
+
})));
|
|
525
|
+
}
|
|
526
|
+
return d.offset && e.push(["string", "number"].includes(typeof d.offset) ? R(Number(d.offset)) : R(d.offset)), d.arrow && e.push(De({ element: ae })), e;
|
|
527
|
+
}), { x: D, y: O, middlewareData: k, placement: pe, strategy: me } = we(C, x, {
|
|
528
|
+
whileElementsMounted: (...e) => Ce(...e, { animationFrame: d.strategy === H.fixed }),
|
|
529
|
+
placement: S(() => d.placement),
|
|
530
|
+
strategy: S(() => d.strategy),
|
|
531
|
+
middleware: le
|
|
532
|
+
}), he = S(() => {
|
|
533
|
+
if (w.value) return;
|
|
534
|
+
let e = d.triggerWidth && C.value ? `${C.value?.offsetWidth}px` : void 0;
|
|
535
|
+
return {
|
|
536
|
+
position: me.value,
|
|
537
|
+
top: `${O.value ?? 0}px`,
|
|
538
|
+
left: `${D.value ?? 0}px`,
|
|
539
|
+
maxWidth: e ? void 0 : v.value,
|
|
540
|
+
maxHeight: re.value,
|
|
541
|
+
width: e
|
|
542
|
+
};
|
|
543
|
+
}), ge = S(() => pe.value.split("-")[0]), P = S(() => {
|
|
544
|
+
if (w.value) return;
|
|
545
|
+
let e = {
|
|
546
|
+
[U.top]: U.bottom,
|
|
547
|
+
[U.right]: U.left,
|
|
548
|
+
[U.bottom]: U.top,
|
|
549
|
+
[U.left]: U.right
|
|
550
|
+
}[ge.value];
|
|
551
|
+
return {
|
|
552
|
+
left: k.value.arrow?.x === void 0 ? void 0 : `${k.value.arrow?.x}px`,
|
|
553
|
+
top: k.value.arrow?.y === void 0 ? void 0 : `${k.value.arrow?.y}px`,
|
|
554
|
+
[e]: `${-(ae.value?.offsetWidth ?? 0) / 2}px`
|
|
555
|
+
};
|
|
556
|
+
}), xe = ye(d, "modelValue", m), L = E(!1), z = S({
|
|
557
|
+
get: () => xe.value ?? L.value,
|
|
558
|
+
set: (e) => {
|
|
559
|
+
if (xe.value === void 0) {
|
|
560
|
+
L.value = e;
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
xe.value = e;
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
function B() {
|
|
567
|
+
z.value = !0;
|
|
568
|
+
}
|
|
569
|
+
function V() {
|
|
570
|
+
z.value = !1;
|
|
571
|
+
}
|
|
572
|
+
function W() {
|
|
573
|
+
z.value = !z.value;
|
|
574
|
+
}
|
|
575
|
+
function G(e) {
|
|
576
|
+
C.value = e;
|
|
577
|
+
}
|
|
578
|
+
be(x, () => {
|
|
579
|
+
!d.keepOpen && z.value && (z.value = !1);
|
|
580
|
+
}, { ignore: [C] });
|
|
581
|
+
let Oe = S(() => C.value?.getAttribute?.("id") ?? void 0), ke = S(() => ({
|
|
582
|
+
"aria-controls": ee.value,
|
|
583
|
+
"aria-haspopup": !0,
|
|
584
|
+
"aria-expanded": z.value
|
|
585
|
+
})), { component: Ae, bus: K } = ht({
|
|
586
|
+
reference: C,
|
|
587
|
+
id: ee,
|
|
588
|
+
expanded: z,
|
|
589
|
+
aria: ke
|
|
590
|
+
});
|
|
591
|
+
K.on("click", W);
|
|
592
|
+
let { role: q, modifiers: je } = fe(d), Me = vt("vv-dropdown", je, S(() => ({ arrow: d.arrow }))), { focused: J } = ve(x);
|
|
593
|
+
function Y(e) {
|
|
594
|
+
return e ? [...e.querySelectorAll("a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])")].filter((e) => !e.hasAttribute("disabled") && !e.getAttribute("aria-hidden")) : [];
|
|
595
|
+
}
|
|
596
|
+
function Ne() {
|
|
597
|
+
i(() => {
|
|
598
|
+
let e = Y(x.value);
|
|
599
|
+
e.length > 0 && e[0].focus({ preventScroll: !0 });
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
function Pe() {
|
|
603
|
+
i(() => {
|
|
604
|
+
let e = Y(oe.value);
|
|
605
|
+
e.length > 0 && e[0].focus({ preventScroll: !0 });
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
function X() {
|
|
609
|
+
i(() => {
|
|
610
|
+
if (J.value) {
|
|
611
|
+
let e = Y(x.value);
|
|
612
|
+
if (e.length === 0 || !document.activeElement) return;
|
|
613
|
+
let t = e.indexOf(document.activeElement);
|
|
614
|
+
t < e.length - 1 ? e[t + 1].focus({ preventScroll: !0 }) : e[0].focus({ preventScroll: !0 });
|
|
615
|
+
}
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
function Z() {
|
|
619
|
+
i(() => {
|
|
620
|
+
if (J.value) {
|
|
621
|
+
let e = Y(x.value);
|
|
622
|
+
if (e.length === 0 || !document.activeElement) return;
|
|
623
|
+
let t = e.indexOf(document.activeElement);
|
|
624
|
+
if (t > 0) {
|
|
625
|
+
e[t - 1].focus({ preventScroll: !0 });
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
e.at(-1)?.focus({ preventScroll: !0 });
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
p(z, (e) => {
|
|
633
|
+
e && d.autofocusFirst && Ne();
|
|
634
|
+
}), t({
|
|
635
|
+
toggle: W,
|
|
636
|
+
show: B,
|
|
637
|
+
hide: V,
|
|
638
|
+
init: G,
|
|
639
|
+
focusFirst: Ne,
|
|
640
|
+
focusFirstListElement: Pe,
|
|
641
|
+
focusNext: X,
|
|
642
|
+
focusPrev: Z,
|
|
643
|
+
customPosition: w
|
|
644
|
+
});
|
|
645
|
+
let { itemRole: Q } = gt({
|
|
646
|
+
role: q,
|
|
647
|
+
expanded: z,
|
|
648
|
+
focused: J,
|
|
649
|
+
hovered: N(x)
|
|
650
|
+
});
|
|
651
|
+
F("Escape", (e) => {
|
|
652
|
+
z.value && (e.preventDefault(), V());
|
|
653
|
+
}), F("ArrowDown", (e) => {
|
|
654
|
+
z.value && J.value && (e.preventDefault(), X());
|
|
655
|
+
}), F("ArrowUp", (e) => {
|
|
656
|
+
z.value && J.value && (e.preventDefault(), Z());
|
|
657
|
+
}), F([" ", "Enter"], (e) => {
|
|
658
|
+
let t = e.target;
|
|
659
|
+
z.value && J.value && t && t?.click();
|
|
660
|
+
});
|
|
661
|
+
let Fe = {
|
|
662
|
+
"before-enter": () => {
|
|
663
|
+
m(z.value ? "beforeExpand" : "beforeCollapse"), m("beforeEnter");
|
|
664
|
+
},
|
|
665
|
+
"after-leave": () => {
|
|
666
|
+
m(z.value ? "afterExpand" : "afterCollapse"), m("afterLeave");
|
|
667
|
+
},
|
|
668
|
+
enter: () => {
|
|
669
|
+
m("enter");
|
|
670
|
+
},
|
|
671
|
+
"after-enter": () => {
|
|
672
|
+
m("afterEnter");
|
|
673
|
+
},
|
|
674
|
+
"enter-cancelled": () => {
|
|
675
|
+
m("enterCancelled");
|
|
676
|
+
},
|
|
677
|
+
"before-leave": () => {
|
|
678
|
+
m("beforeLeave");
|
|
679
|
+
},
|
|
680
|
+
leave: () => {
|
|
681
|
+
m("leave");
|
|
682
|
+
},
|
|
683
|
+
"leave-cancelled": () => {
|
|
684
|
+
m("leaveCancelled");
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
return (e, t) => (M(), y(ce, null, [n(A(Ae), null, {
|
|
688
|
+
default: b(() => [o(e.$slots, "default", g(r({
|
|
689
|
+
init: G,
|
|
690
|
+
show: B,
|
|
691
|
+
hide: V,
|
|
692
|
+
toggle: W,
|
|
693
|
+
expanded: A(z),
|
|
694
|
+
aria: A(ke)
|
|
695
|
+
})))]),
|
|
696
|
+
_: 3
|
|
697
|
+
}), n(se, f({ name: e.transitionName }, a(Fe), { persisted: "" }), {
|
|
698
|
+
default: b(() => [ue(_("div", {
|
|
699
|
+
ref_key: "floatingEl",
|
|
700
|
+
ref: x,
|
|
701
|
+
style: te(A(he)),
|
|
702
|
+
class: s(A(Me))
|
|
703
|
+
}, [
|
|
704
|
+
d.arrow ? (M(), y("div", {
|
|
705
|
+
key: 0,
|
|
706
|
+
ref_key: "arrowEl",
|
|
707
|
+
ref: ae,
|
|
708
|
+
style: te(A(P)),
|
|
709
|
+
class: "vv-dropdown__arrow"
|
|
710
|
+
}, null, 4)) : j("v-if", !0),
|
|
711
|
+
o(e.$slots, "before", g(r({
|
|
712
|
+
show: B,
|
|
713
|
+
hide: V,
|
|
714
|
+
toggle: W,
|
|
715
|
+
expanded: A(z)
|
|
716
|
+
}))),
|
|
717
|
+
_("div", f(A(ne), {
|
|
718
|
+
id: A(ee),
|
|
719
|
+
ref_key: "listEl",
|
|
720
|
+
ref: oe,
|
|
721
|
+
tabindex: A(z) ? void 0 : -1,
|
|
722
|
+
role: A(q),
|
|
723
|
+
"aria-labelledby": A(Oe),
|
|
724
|
+
class: "vv-dropdown__list"
|
|
725
|
+
}), [o(e.$slots, "items", g(r({
|
|
726
|
+
show: B,
|
|
727
|
+
hide: V,
|
|
728
|
+
toggle: W,
|
|
729
|
+
expanded: A(z),
|
|
730
|
+
role: A(Q)
|
|
731
|
+
})))], 16, yt),
|
|
732
|
+
o(e.$slots, "after", g(r({
|
|
733
|
+
show: B,
|
|
734
|
+
hide: V,
|
|
735
|
+
toggle: W,
|
|
736
|
+
expanded: A(z)
|
|
737
|
+
})))
|
|
738
|
+
], 6), [[de, A(z)]])]),
|
|
739
|
+
_: 3
|
|
740
|
+
}, 16, ["name"])], 64));
|
|
741
|
+
}
|
|
742
|
+
});
|
|
743
|
+
function xt() {
|
|
744
|
+
return oe(J, {});
|
|
745
|
+
}
|
|
746
|
+
var St = /* @__PURE__ */ h({
|
|
747
|
+
name: "VvDropdownItem",
|
|
748
|
+
props: ft,
|
|
749
|
+
setup(e) {
|
|
750
|
+
let t = e, { role: n, expanded: r } = xt(), i = E(null);
|
|
751
|
+
_t({ expanded: r });
|
|
752
|
+
let a = N(i), { focused: s } = ge(i), { focused: c } = ve(i);
|
|
753
|
+
return p(a, (e) => {
|
|
754
|
+
e && t.focusOnHover && (s.value = !0);
|
|
755
|
+
}), (e, t) => (M(), y("div", f({ role: A(n) }, {
|
|
756
|
+
ref_key: "element",
|
|
757
|
+
ref: i,
|
|
758
|
+
class: ["vv-dropdown__item", { "focus-visible": A(s) || A(c) }]
|
|
759
|
+
}), [o(e.$slots, "default")], 16));
|
|
760
|
+
}
|
|
761
|
+
}), Ct = ["title"], wt = /* @__PURE__ */ h({
|
|
762
|
+
name: "VvDropdownOption",
|
|
763
|
+
props: pt,
|
|
764
|
+
setup(e) {
|
|
765
|
+
let t = e, { modifiers: n } = fe(t), i = vt("vv-dropdown-option", n, S(() => ({
|
|
766
|
+
disabled: t.disabled,
|
|
767
|
+
selected: t.selected,
|
|
768
|
+
unselectable: t.unselectable && t.selected
|
|
769
|
+
}))), a = S(() => t.selected ? t.unselectable ? t.deselectHintLabel : t.selectedHintLabel : t.disabled ? "" : t.selectHintLabel);
|
|
770
|
+
return (e, t) => (M(), O(St, {
|
|
771
|
+
class: s(A(i)),
|
|
772
|
+
tabindex: e.disabled ? -1 : 0,
|
|
773
|
+
"aria-selected": e.selected,
|
|
774
|
+
"aria-disabled": e.disabled,
|
|
775
|
+
"focus-on-hover": e.focusOnHover
|
|
776
|
+
}, {
|
|
777
|
+
default: b(() => [o(e.$slots, "default"), _("span", {
|
|
778
|
+
class: "vv-dropdown-option__hint",
|
|
779
|
+
title: A(a)
|
|
780
|
+
}, [o(e.$slots, "hint", g(r({
|
|
781
|
+
disabled: e.disabled,
|
|
782
|
+
selected: e.selected,
|
|
783
|
+
unselectable: e.unselectable
|
|
784
|
+
})), () => [m(D(A(a)), 1)])], 8, Ct)]),
|
|
785
|
+
_: 3
|
|
786
|
+
}, 8, [
|
|
787
|
+
"class",
|
|
788
|
+
"tabindex",
|
|
789
|
+
"aria-selected",
|
|
790
|
+
"aria-disabled",
|
|
791
|
+
"focus-on-hover"
|
|
792
|
+
]));
|
|
793
|
+
}
|
|
794
|
+
});
|
|
795
|
+
function Tt() {
|
|
796
|
+
return oe(je, void 0);
|
|
797
|
+
}
|
|
798
|
+
var Et = /* @__PURE__ */ h({
|
|
799
|
+
name: "VvIcon",
|
|
800
|
+
props: /* @__PURE__ */ u({
|
|
801
|
+
name: {},
|
|
802
|
+
color: {},
|
|
803
|
+
width: {},
|
|
804
|
+
height: {},
|
|
805
|
+
provider: {},
|
|
806
|
+
prefix: {},
|
|
807
|
+
src: {},
|
|
808
|
+
horizontalFlip: { type: Boolean },
|
|
809
|
+
verticalFlip: { type: Boolean },
|
|
810
|
+
flip: {},
|
|
811
|
+
mode: {},
|
|
812
|
+
inline: { type: Boolean },
|
|
813
|
+
rotate: {},
|
|
814
|
+
onLoad: { type: Function },
|
|
815
|
+
svg: {},
|
|
816
|
+
modifiers: {}
|
|
817
|
+
}, B),
|
|
818
|
+
setup(e) {
|
|
819
|
+
let t = e, n = S(() => typeof t.rotate == "string" ? Number.parseFloat(t.rotate) : t.rotate), r = E(!0), i = Tt(), { modifiers: a } = fe(t), o = vt("vv-icon", a), s = S(() => t.provider || i?.iconsProvider), c = S(() => {
|
|
820
|
+
let e = t.name ?? "", n = `@${s.value}:${t.prefix}:${e}`;
|
|
821
|
+
if (pe(n)) return n;
|
|
822
|
+
let r = i?.iconsCollections.find((t) => pe(`@${s.value}:${t.prefix}:${e}`));
|
|
823
|
+
return r ? `@${s.value}:${r.prefix}:${e}` : e;
|
|
824
|
+
});
|
|
825
|
+
function l(e) {
|
|
826
|
+
return globalThis.window === void 0 ? null : new globalThis.DOMParser().parseFromString(e, "text/html").querySelector("svg");
|
|
827
|
+
}
|
|
828
|
+
function u(e) {
|
|
829
|
+
let n = l(e), r = n?.innerHTML.trim() || "";
|
|
830
|
+
n && r && me(`@${s.value}:${t.prefix}:${t.name}`, {
|
|
831
|
+
body: r,
|
|
832
|
+
height: n.viewBox.baseVal.height,
|
|
833
|
+
width: n.viewBox.baseVal.width
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
return i && t.src && !pe(`@${s.value}:${t.prefix}:${t.name}`) && (r.value = !1, i.fetchIcon(t.src).then((e) => {
|
|
837
|
+
e && u(e), r.value = !0;
|
|
838
|
+
}).catch((e) => {
|
|
839
|
+
throw r.value = !0, /* @__PURE__ */ Error(`Error during fetch icon: ${e?.message}`);
|
|
840
|
+
})), t.svg && u(t.svg), (t, i) => A(r) ? (M(), O(A(he), f({
|
|
841
|
+
key: 0,
|
|
842
|
+
class: A(o)
|
|
843
|
+
}, {
|
|
844
|
+
inline: e.inline,
|
|
845
|
+
width: e.width,
|
|
846
|
+
height: e.height,
|
|
847
|
+
horizontalFlip: e.horizontalFlip,
|
|
848
|
+
verticalFlip: e.verticalFlip,
|
|
849
|
+
flip: e.flip,
|
|
850
|
+
rotate: A(n),
|
|
851
|
+
color: e.color,
|
|
852
|
+
icon: A(c)
|
|
853
|
+
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : j("v-if", !0);
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
function Dt(e, t, n) {
|
|
857
|
+
let r = t;
|
|
858
|
+
if (Array.isArray(e) && e.length) {
|
|
859
|
+
let i = e[0];
|
|
860
|
+
i() === t && (r = n);
|
|
861
|
+
}
|
|
862
|
+
if (typeof e == "function" && e() === t && (r = n), typeof e == "object") {
|
|
863
|
+
let i = e.default;
|
|
864
|
+
typeof i == "function" && (i = i()), (typeof i == "object" ? JSON.stringify(i) === JSON.stringify(t) : i === t) && (r = n);
|
|
865
|
+
}
|
|
866
|
+
return r;
|
|
867
|
+
}
|
|
868
|
+
function Ot(e, t, n) {
|
|
869
|
+
let r = Tt(), i = S(() => {
|
|
870
|
+
if (r?.defaults.value?.[e]) return r.defaults.value[e];
|
|
871
|
+
});
|
|
872
|
+
return S(() => {
|
|
873
|
+
if (i.value === void 0) return n;
|
|
874
|
+
let e = i.value, r = t, a = n;
|
|
875
|
+
return Object.keys(r).reduce((t, n) => {
|
|
876
|
+
let i = a[n];
|
|
877
|
+
return t[n] = n in e ? Dt(r[n], i, e[n]) : i, t;
|
|
878
|
+
}, {});
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
function kt(e, t, n = 0, { getter: r = (e) => e, setter: i = (e) => e } = {}) {
|
|
882
|
+
let a, o, s = S(() => {
|
|
883
|
+
let e = re(n) ?? 0, t = typeof e == "string" ? Number.parseInt(e) : e;
|
|
884
|
+
return Number.isNaN(t) ? 0 : t;
|
|
885
|
+
});
|
|
886
|
+
function c() {
|
|
887
|
+
a &&= (clearTimeout(a), void 0), o = void 0;
|
|
888
|
+
}
|
|
889
|
+
function l() {
|
|
890
|
+
if (!o) return;
|
|
891
|
+
let e = i(o.value);
|
|
892
|
+
return c(), t("update:modelValue", e), e;
|
|
893
|
+
}
|
|
894
|
+
return ie(c), {
|
|
895
|
+
model: S({
|
|
896
|
+
get: () => r(e?.value),
|
|
897
|
+
set: (e) => {
|
|
898
|
+
if (s.value <= 0) {
|
|
899
|
+
c(), t("update:modelValue", i(e));
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
o = { value: e }, a && clearTimeout(a), a = setTimeout(l, s.value);
|
|
903
|
+
}
|
|
904
|
+
}),
|
|
905
|
+
flush: l,
|
|
906
|
+
cancel: c
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
function At(e, t) {
|
|
910
|
+
let n = S(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), r = S(() => t?.value === G.before ? n.value : void 0), i = S(() => t?.value === G.after ? n.value : void 0);
|
|
911
|
+
return {
|
|
912
|
+
hasIcon: n,
|
|
913
|
+
hasIconLeft: S(() => t?.value === U.left ? n.value : void 0),
|
|
914
|
+
hasIconRight: S(() => t?.value === U.right ? n.value : void 0),
|
|
915
|
+
hasIconTop: S(() => t?.value === U.top ? n.value : void 0),
|
|
916
|
+
hasIconBottom: S(() => t?.value === U.bottom ? n.value : void 0),
|
|
917
|
+
hasIconBefore: r,
|
|
918
|
+
hasIconAfter: i
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
function jt(e, t) {
|
|
922
|
+
let { focused: n } = ge(e);
|
|
923
|
+
return p(n, (n) => {
|
|
924
|
+
t(n ? "focus" : "blur", A(e));
|
|
925
|
+
}), { focused: n };
|
|
926
|
+
}
|
|
927
|
+
function Mt(e, t) {
|
|
928
|
+
let n = S(() => (A(e) ?? "").length), r = S(() => t?.lowerLimit !== void 0 && n.value < t?.lowerLimit ? n.value - t.lowerLimit : t?.upperLimit === void 0 ? 0 : t.upperLimit - n.value);
|
|
929
|
+
return {
|
|
930
|
+
length: n,
|
|
931
|
+
gap: r,
|
|
932
|
+
formatted: S(() => t?.mode === !1 ? "" : t?.mode === "limit" && t?.upperLimit ? `${n.value} / ${t.lowerLimit ? `${t.lowerLimit}-` : ""}${t.upperLimit}` : t?.mode === "countdown" ? r.value === 0 ? void 0 : r.value : n.value)
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
function Nt(e, t = V.local, n) {
|
|
936
|
+
let r = E();
|
|
937
|
+
n && (r.value = n);
|
|
938
|
+
let i;
|
|
939
|
+
return l(() => {
|
|
940
|
+
e && p(e, (e, n) => {
|
|
941
|
+
let a = A(t) === V.session ? sessionStorage : localStorage;
|
|
942
|
+
if (n && n !== e && a.removeItem(n), e) {
|
|
943
|
+
i = P(e, i?.value ?? r.value, a), i.value && (r.value = i.value);
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
i = void 0;
|
|
947
|
+
}, { immediate: !0 }), T(t) && p(t, (t, n) => {
|
|
948
|
+
if (e?.value) {
|
|
949
|
+
if (t) {
|
|
950
|
+
let n = t === V.session ? sessionStorage : localStorage;
|
|
951
|
+
i = P(e.value, i?.value ?? r.value, n);
|
|
952
|
+
}
|
|
953
|
+
n && n !== t && (n === V.session ? sessionStorage : localStorage).removeItem(e.value);
|
|
954
|
+
}
|
|
955
|
+
});
|
|
956
|
+
}), p(r, (e) => {
|
|
957
|
+
i && (i.value = e);
|
|
958
|
+
}, {
|
|
959
|
+
deep: !0,
|
|
960
|
+
immediate: !0
|
|
961
|
+
}), r;
|
|
962
|
+
}
|
|
963
|
+
var Pt = ["for"], Ft = {
|
|
964
|
+
key: 0,
|
|
965
|
+
class: "vv-textarea__input-before"
|
|
966
|
+
}, It = { class: "vv-textarea__inner" }, Lt = ["id"], Rt = {
|
|
967
|
+
key: 1,
|
|
968
|
+
class: "vv-textarea__input-after"
|
|
969
|
+
}, zt = {
|
|
970
|
+
key: 2,
|
|
971
|
+
class: "vv-textarea__limit"
|
|
972
|
+
}, Bt = { class: "flex-1" }, Vt = ["title", "onClick"], Ht = /* @__PURE__ */ h({
|
|
973
|
+
name: "VvTextarea",
|
|
974
|
+
props: st,
|
|
975
|
+
emits: ot,
|
|
976
|
+
setup(e, { expose: t, emit: i }) {
|
|
977
|
+
let a = e, c = i, l = ne(), u = Tt(), d = Ot("VvTextarea", st, a), h = E(), te = E(), v = E(), { id: re, icon: ie, iconPosition: ae, iconRemoveSuggestion: oe, labelRemoveSuggestion: C, label: se, modelValue: le, count: de, valid: pe, invalid: me, loading: he, modifiers: ge, debounce: _e, minlength: ve, maxlength: ye, storageType: be } = fe(a), N = mt(re), P = S(() => `${N.value}-hint`), F = S(() => a.floating && $(a.placeholder) ? " " : a.placeholder), { model: I, flush: Se } = kt(le, c, _e);
|
|
978
|
+
t({ flush: Se });
|
|
979
|
+
let { hasIconBefore: Ce, hasIconAfter: L } = At(ie, ae), { hasIcon: we } = At(oe), { focused: R } = jt(h, c);
|
|
980
|
+
p(S(() => R.value && !a.disabled && !a.readonly), (e) => {
|
|
981
|
+
let t = I.value;
|
|
982
|
+
if (e || (t = Se() ?? t), e && d.value.selectOnFocus && h.value && h.value.select(), e && H.value?.size) {
|
|
983
|
+
v.value?.show();
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
if (H.value && !$(t)) {
|
|
987
|
+
let e = a.maxSuggestions;
|
|
988
|
+
H.value.size >= e && !H.value.has(t) && (H.value = new Set([...H.value].slice(H.value.size - e + 1))), H.value.add(t);
|
|
989
|
+
}
|
|
990
|
+
}), p(xe(h), (e) => {
|
|
991
|
+
e && a.autofocus && (R.value = !0);
|
|
992
|
+
});
|
|
993
|
+
let { formatted: Te } = Mt(I, {
|
|
994
|
+
mode: de?.value,
|
|
995
|
+
upperLimit: Number(ye?.value),
|
|
996
|
+
lowerLimit: Number(ve?.value)
|
|
997
|
+
}), Ee = S(() => !a.disabled && !a.readonly), De = S(() => Ee.value ? a.tabindex : -1), z = S(() => !$(le)), B = S(() => {
|
|
998
|
+
if (a.invalid === !0) return !0;
|
|
999
|
+
if (a.valid === !0) return !1;
|
|
1000
|
+
}), V = S(() => a.storageKey ?? (u?.experimentalFeatures.forceInputSuggestions ? a.name : void 0)), H = Nt(V, be, /* @__PURE__ */ new Set()), U = S(() => H.value ? [...H.value].filter((e) => $(I.value) || `${e}`.toLowerCase().includes(`${I.value}`.toLowerCase()) && e !== I.value).reverse() : []), W = S(() => V?.value && H.value && H.value.size > 0);
|
|
1001
|
+
function G(e) {
|
|
1002
|
+
I.value = e, v.value?.hide(), c("suggestion:selected", e);
|
|
1003
|
+
}
|
|
1004
|
+
function Oe(e) {
|
|
1005
|
+
H.value?.delete(e), c("suggestion:removed", e);
|
|
1006
|
+
}
|
|
1007
|
+
let { HintSlot: ke, hasHintLabelOrSlot: Ae, hasInvalidLabelOrSlot: K, hintSlotScope: q } = ut(d, l), je = vt("vv-textarea", ge, S(() => ({
|
|
1008
|
+
valid: pe.value,
|
|
1009
|
+
invalid: me.value,
|
|
1010
|
+
loading: he.value,
|
|
1011
|
+
disabled: a.disabled,
|
|
1012
|
+
readonly: a.readonly,
|
|
1013
|
+
required: a.required,
|
|
1014
|
+
"icon-before": Ce.value !== void 0,
|
|
1015
|
+
"icon-after": L.value !== void 0,
|
|
1016
|
+
floating: a.floating && !$(a.label),
|
|
1017
|
+
dirty: z.value,
|
|
1018
|
+
focus: R.value,
|
|
1019
|
+
resizable: a.resizable
|
|
1020
|
+
}))), Me = S(() => ({
|
|
1021
|
+
name: a.name,
|
|
1022
|
+
placeholder: F.value,
|
|
1023
|
+
tabindex: De.value,
|
|
1024
|
+
disabled: a.disabled,
|
|
1025
|
+
readonly: a.readonly,
|
|
1026
|
+
required: a.required,
|
|
1027
|
+
autocomplete: a.autocomplete,
|
|
1028
|
+
minlength: a.minlength,
|
|
1029
|
+
maxlength: a.maxlength,
|
|
1030
|
+
cols: a.cols,
|
|
1031
|
+
rows: a.rows,
|
|
1032
|
+
wrap: a.wrap,
|
|
1033
|
+
spellcheck: a.spellcheck,
|
|
1034
|
+
"aria-invalid": B.value,
|
|
1035
|
+
"aria-describedby": Ae.value ? P.value : void 0,
|
|
1036
|
+
"aria-errormessage": K.value ? P.value : void 0
|
|
1037
|
+
})), J = S(() => ({
|
|
1038
|
+
valid: a.valid,
|
|
1039
|
+
invalid: a.invalid,
|
|
1040
|
+
modelValue: a.modelValue,
|
|
1041
|
+
hintLabel: a.hintLabel,
|
|
1042
|
+
maxlength: a.maxlength,
|
|
1043
|
+
minlength: a.minlength,
|
|
1044
|
+
clear: Y
|
|
1045
|
+
}));
|
|
1046
|
+
function Y() {
|
|
1047
|
+
I.value = void 0;
|
|
1048
|
+
}
|
|
1049
|
+
return (e, t) => (M(), y("div", { class: s(A(je)) }, [
|
|
1050
|
+
A(se) ? (M(), y("label", {
|
|
1051
|
+
key: 0,
|
|
1052
|
+
for: A(N),
|
|
1053
|
+
class: "vv-textarea__label"
|
|
1054
|
+
}, D(A(se)), 9, Pt)) : j("v-if", !0),
|
|
1055
|
+
_("div", {
|
|
1056
|
+
ref_key: "wrapperEl",
|
|
1057
|
+
ref: te,
|
|
1058
|
+
class: "vv-textarea__wrapper"
|
|
1059
|
+
}, [
|
|
1060
|
+
e.$slots.before ? (M(), y("div", Ft, [o(e.$slots, "before", g(r(A(J))))])) : j("v-if", !0),
|
|
1061
|
+
_("div", It, [
|
|
1062
|
+
A(Ce) ? (M(), O(Et, f({ key: 0 }, A(Ce), { class: "vv-textarea__icon" }), null, 16)) : j("v-if", !0),
|
|
1063
|
+
ue(_("textarea", f({
|
|
1064
|
+
id: A(N),
|
|
1065
|
+
ref_key: "textareaEl",
|
|
1066
|
+
ref: h,
|
|
1067
|
+
"onUpdate:modelValue": t[0] ||= (e) => T(I) ? I.value = e : null
|
|
1068
|
+
}, A(Me), { onKeyup: t[1] ||= (e) => c("keyup", e) }), null, 16, Lt), [[w, A(I)]]),
|
|
1069
|
+
A(L) ? (M(), O(Et, f({ key: 1 }, A(L), { class: "vv-textarea__icon vv-textarea__icon-after" }), null, 16)) : j("v-if", !0)
|
|
1070
|
+
]),
|
|
1071
|
+
e.$slots.after ? (M(), y("div", Rt, [o(e.$slots, "after", g(r(A(J))))])) : j("v-if", !0),
|
|
1072
|
+
A(de) ? (M(), y("span", zt, [o(e.$slots, "count", g(r(A(J))), () => [m(D(A(Te)), 1)])])) : j("v-if", !0)
|
|
1073
|
+
], 512),
|
|
1074
|
+
n(A(ke), {
|
|
1075
|
+
id: A(P),
|
|
1076
|
+
class: "vv-textarea__hint"
|
|
1077
|
+
}, k({ _: 2 }, [
|
|
1078
|
+
e.$slots.hint ? {
|
|
1079
|
+
name: "hint",
|
|
1080
|
+
fn: b(() => [o(e.$slots, "hint", g(r(A(q))))]),
|
|
1081
|
+
key: "0"
|
|
1082
|
+
} : void 0,
|
|
1083
|
+
e.$slots.loading ? {
|
|
1084
|
+
name: "loading",
|
|
1085
|
+
fn: b(() => [o(e.$slots, "loading", g(r(A(q))))]),
|
|
1086
|
+
key: "1"
|
|
1087
|
+
} : void 0,
|
|
1088
|
+
e.$slots.valid ? {
|
|
1089
|
+
name: "valid",
|
|
1090
|
+
fn: b(() => [o(e.$slots, "valid", g(r(A(q))))]),
|
|
1091
|
+
key: "2"
|
|
1092
|
+
} : void 0,
|
|
1093
|
+
e.$slots.invalid ? {
|
|
1094
|
+
name: "invalid",
|
|
1095
|
+
fn: b(() => [o(e.$slots, "invalid", g(r(A(q))))]),
|
|
1096
|
+
key: "3"
|
|
1097
|
+
} : void 0
|
|
1098
|
+
]), 1032, ["id"]),
|
|
1099
|
+
A(W) ? (M(), O(bt, {
|
|
1100
|
+
key: 1,
|
|
1101
|
+
ref_key: "suggestionsDropdownEl",
|
|
1102
|
+
ref: v,
|
|
1103
|
+
reference: A(te),
|
|
1104
|
+
"autofocus-first": !1,
|
|
1105
|
+
"trigger-width": !0
|
|
1106
|
+
}, {
|
|
1107
|
+
items: b(() => [(M(!0), y(ce, null, ee(A(U), (t) => (M(), O(wt, {
|
|
1108
|
+
key: t,
|
|
1109
|
+
onClick: x((e) => G(t), ["stop"])
|
|
1110
|
+
}, {
|
|
1111
|
+
default: b(() => [_("div", Bt, [o(e.$slots, "suggestion", f({ ref_for: !0 }, { value: t }), () => [m(D(t), 1)])]), A(H) && A(we) ? (M(), y("button", {
|
|
1112
|
+
key: 0,
|
|
1113
|
+
type: "button",
|
|
1114
|
+
tabindex: "-1",
|
|
1115
|
+
class: "cursor-pointer",
|
|
1116
|
+
title: A(C),
|
|
1117
|
+
onClick: x((e) => Oe(t), ["stop"])
|
|
1118
|
+
}, [n(Et, f({ ref_for: !0 }, A(we)), null, 16)], 8, Vt)) : j("v-if", !0)]),
|
|
1119
|
+
_: 2
|
|
1120
|
+
}, 1032, ["onClick"]))), 128))]),
|
|
1121
|
+
_: 3
|
|
1122
|
+
}, 8, ["reference"])) : j("v-if", !0)
|
|
1123
|
+
], 2));
|
|
1124
|
+
}
|
|
1125
|
+
});
|
|
1126
|
+
//#endregion
|
|
1127
|
+
export { Ht as default };
|
|
1128
|
+
|
|
1129
|
+
//# sourceMappingURL=VvTextarea.es-BU2vqdEQ.js.map
|