@volverjs/ui-vue 0.0.4 → 0.0.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/auto-imports.d.ts +12 -3
- package/bin/icons.cjs +1 -73
- package/dist/Volver.d.ts +19 -11
- package/dist/components/VvAccordion/VvAccordion.es.js +165 -106
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -1
- package/dist/components/VvAccordion/index.d.ts +8 -3
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +264 -164
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -12
- package/dist/components/VvAccordionGroup/index.d.ts +8 -0
- package/dist/components/VvAction/VvAction.es.js +266 -98
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +12 -12
- package/dist/components/VvAction/index.d.ts +2 -2
- package/dist/components/VvBadge/VvBadge.es.js +203 -44
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
- package/dist/components/VvBadge/index.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +237 -75
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -11
- package/dist/components/VvBreadcrumb/index.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +636 -360
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +18 -18
- package/dist/components/VvButton/index.d.ts +13 -13
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +251 -79
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
- package/dist/components/VvButtonGroup/index.d.ts +1 -1
- package/dist/components/VvCard/VvCard.es.js +57 -38
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +552 -274
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
- package/dist/components/VvCheckbox/index.d.ts +5 -5
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +651 -340
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +7 -7
- package/dist/components/VvCheckboxGroup/index.d.ts +3 -3
- package/dist/components/VvCombobox/VvCombobox.es.js +1532 -983
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +125 -51
- package/dist/components/VvCombobox/index.d.ts +36 -10
- package/dist/components/VvDialog/VvDialog.es.js +377 -141
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +12 -3
- package/dist/components/VvDialog/index.d.ts +4 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +440 -244
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +113 -41
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +13 -13
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -2
- package/dist/components/VvDropdown/index.d.ts +35 -11
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +363 -160
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +43 -28
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +275 -90
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +113 -65
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +7 -7
- package/dist/components/VvIcon/index.d.ts +2 -2
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +2 -2
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +974 -460
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +96 -16
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +64 -11
- package/dist/components/VvProgress/VvProgress.es.js +206 -45
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
- package/dist/components/VvProgress/index.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +489 -238
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
- package/dist/components/VvRadio/index.d.ts +5 -5
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +588 -304
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +7 -7
- package/dist/components/VvRadioGroup/index.d.ts +3 -3
- package/dist/components/VvSelect/VvSelect.es.js +621 -324
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +13 -13
- package/dist/components/VvSelect/index.d.ts +3 -3
- package/dist/components/VvTextarea/VvTextarea.es.js +664 -353
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +10 -10
- package/dist/components/VvTextarea/index.d.ts +2 -2
- package/dist/components/VvTooltip/VvTooltip.es.js +205 -47
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +7 -7
- package/dist/components/VvTooltip/index.d.ts +2 -2
- package/dist/components/index.es.js +3508 -2231
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -3
- package/dist/composables/group/useInjectedGroupState.d.ts +2 -2
- package/dist/composables/group/useProvideGroupState.d.ts +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/composables/useComponentIcon.d.ts +7 -7
- package/dist/composables/useDebouncedInput.d.ts +4 -1
- package/dist/composables/useDefaults.d.ts +2 -0
- package/dist/composables/useModifiers.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +2 -2
- package/dist/composables/useTextCount.d.ts +3 -3
- package/dist/composables/useUniqueId.d.ts +1 -1
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.es.js +215 -55
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +212 -53
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +38 -23
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +112 -3607
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +40 -16
- package/dist/resolvers/unplugin.d.ts +7 -1
- package/dist/resolvers/unplugin.es.js +77 -37
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/InputText/InputText.settings.d.ts +53 -0
- package/dist/stories/argTypes.d.ts +1 -1
- package/package.json +114 -36
- package/src/Volver.ts +49 -22
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +19 -22
- package/src/components/VvAccordion/index.ts +12 -4
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
- package/src/components/VvAccordionGroup/index.ts +8 -0
- package/src/components/VvAction/VvAction.vue +7 -7
- package/src/components/VvAction/index.ts +1 -1
- package/src/components/VvBadge/VvBadge.vue +2 -2
- package/src/components/VvBadge/index.ts +1 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
- package/src/components/VvButton/VvButton.vue +11 -11
- package/src/components/VvButton/index.ts +10 -9
- package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
- package/src/components/VvButtonGroup/index.ts +1 -1
- package/src/components/VvCard/VvCard.vue +2 -2
- package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
- package/src/components/VvCheckbox/index.ts +11 -7
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
- package/src/components/VvCheckboxGroup/index.ts +1 -1
- package/src/components/VvCombobox/VvCombobox.vue +39 -23
- package/src/components/VvCombobox/index.ts +1 -1
- package/src/components/VvDialog/VvDialog.vue +28 -11
- package/src/components/VvDialog/index.ts +5 -2
- package/src/components/VvDropdown/VvDropdown.vue +6 -5
- package/src/components/VvDropdown/VvDropdownAction.vue +7 -5
- package/src/components/VvDropdown/VvDropdownOption.vue +17 -10
- package/src/components/VvDropdown/index.ts +3 -3
- package/src/components/VvIcon/VvIcon.vue +3 -3
- package/src/components/VvIcon/index.ts +3 -3
- package/src/components/VvInputText/VvInputClearAction.ts +2 -2
- package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
- package/src/components/VvInputText/VvInputStepAction.ts +3 -2
- package/src/components/VvInputText/VvInputText.vue +128 -35
- package/src/components/VvInputText/VvInputTextActions.ts +5 -8
- package/src/components/VvInputText/index.ts +62 -1
- package/src/components/VvProgress/VvProgress.vue +2 -2
- package/src/components/VvProgress/index.ts +1 -1
- package/src/components/VvRadio/VvRadio.vue +3 -7
- package/src/components/VvRadio/index.ts +11 -7
- package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
- package/src/components/VvRadioGroup/index.ts +1 -1
- package/src/components/VvSelect/VvSelect.vue +4 -4
- package/src/components/VvSelect/index.ts +1 -1
- package/src/components/VvTextarea/VvTextarea.vue +4 -4
- package/src/components/VvTextarea/index.ts +1 -1
- package/src/components/VvTooltip/VvTooltip.vue +2 -2
- package/src/components/VvTooltip/index.ts +3 -3
- package/src/composables/dropdown/useInjectDropdown.ts +2 -2
- package/src/composables/dropdown/useProvideDropdown.ts +2 -2
- package/src/composables/group/useInjectedGroupState.ts +1 -1
- package/src/composables/group/useProvideGroupState.ts +1 -1
- package/src/composables/useComponentIcon.ts +1 -1
- package/src/composables/useDebouncedInput.ts +10 -3
- package/src/composables/useDefaults.ts +89 -0
- package/src/composables/useModifiers.ts +4 -2
- package/src/composables/useOptions.ts +1 -1
- package/src/composables/useVolver.ts +2 -2
- package/src/directives/index.ts +1 -1
- package/src/directives/v-tooltip.ts +2 -2
- package/src/index.ts +0 -2
- package/src/props/index.ts +8 -8
- package/src/resolvers/unplugin.ts +15 -1
- package/src/stories/Accordion/Accordion.stories.mdx +8 -2
- package/src/stories/Accordion/Accordion.test.ts +21 -15
- package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +1 -1
- package/src/stories/InputText/InputText.settings.ts +53 -0
- package/src/stories/InputText/InputText.stories.mdx +40 -0
- package/src/stories/InputText/InputText.test.ts +5 -2
- package/src/stories/argTypes.ts +2 -2
- package/src/types/group.d.ts +5 -0
package/dist/index.es.js
CHANGED
|
@@ -1,3638 +1,143 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import { addCollection, addIcon, addAPIProvider } from "@iconify/vue";
|
|
8
|
+
import { ref } from "vue";
|
|
9
|
+
const DEFAULT_ICONIFY_PROVIDER = "vv";
|
|
10
|
+
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
11
|
+
function useDefaultProps(component, defaults, name) {
|
|
12
|
+
const componentName = name || component.name;
|
|
13
|
+
if (!componentName) {
|
|
14
|
+
return component;
|
|
15
|
+
}
|
|
16
|
+
const componentDefaults = defaults == null ? void 0 : defaults[componentName];
|
|
17
|
+
const props = component.props;
|
|
18
|
+
if (!componentDefaults || !props) {
|
|
19
|
+
return { ...component, name: componentName };
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
...component,
|
|
23
|
+
name: componentName,
|
|
24
|
+
props: Object.keys(props).reduce((acc, key) => {
|
|
25
|
+
if (!(key in componentDefaults)) {
|
|
26
|
+
acc[key] = props[key];
|
|
27
|
+
return acc;
|
|
28
|
+
}
|
|
29
|
+
const customDefault = componentDefaults[key];
|
|
30
|
+
if (typeof props[key] === "function" || Array.isArray(props[key])) {
|
|
31
|
+
acc[key] = {
|
|
32
|
+
type: props[key],
|
|
33
|
+
default: customDefault
|
|
34
|
+
};
|
|
35
|
+
return acc;
|
|
36
|
+
}
|
|
37
|
+
acc[key] = {
|
|
38
|
+
...props[key],
|
|
39
|
+
default: customDefault
|
|
40
|
+
};
|
|
41
|
+
return acc;
|
|
29
42
|
}, {})
|
|
30
43
|
};
|
|
31
44
|
}
|
|
32
|
-
class
|
|
45
|
+
class Volver {
|
|
33
46
|
constructor({
|
|
34
|
-
fetchWithCredentials
|
|
35
|
-
fetchOptions
|
|
36
|
-
|
|
37
|
-
nuxt
|
|
38
|
-
iconsCollections
|
|
47
|
+
fetchWithCredentials,
|
|
48
|
+
fetchOptions,
|
|
49
|
+
iconsProvider,
|
|
50
|
+
nuxt,
|
|
51
|
+
iconsCollections,
|
|
52
|
+
defaults
|
|
39
53
|
} = {}) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
fetchIcon(l, e = { cache: "force-cache" }) {
|
|
54
|
-
return new Promise((s, o) => {
|
|
55
|
-
fetch(l, { ...this.fetchOptions, ...e }).catch((u) => o(u)).then((u) => u == null ? void 0 : u.text()).then((u) => s(u));
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const ms = {
|
|
60
|
-
/**
|
|
61
|
-
* Vue.use() hook
|
|
62
|
-
* @param {App} Vue
|
|
63
|
-
* @param {Object} options
|
|
64
|
-
*/
|
|
65
|
-
install(t, l) {
|
|
66
|
-
const e = new Ol(l);
|
|
67
|
-
t.config.globalProperties.$vv = e, l.components && Object.entries(l.components).forEach(([s, o]) => {
|
|
68
|
-
t.component(
|
|
69
|
-
s,
|
|
70
|
-
Lt(o, l.defaults)
|
|
71
|
-
);
|
|
72
|
-
}), l.aliases && Object.entries(l.aliases).forEach(([s, o]) => {
|
|
73
|
-
t.component(
|
|
74
|
-
s,
|
|
75
|
-
Lt(o, l.defaults, s)
|
|
76
|
-
);
|
|
77
|
-
}), l.directives && Object.entries(l.directives).forEach(([s, o]) => {
|
|
78
|
-
t.directive(s, o);
|
|
79
|
-
}), t.provide(zt, e);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
function Pe(t, l, e) {
|
|
83
|
-
return e ? Ze(t, e) === Ze(l, e) : bt(t, l);
|
|
84
|
-
}
|
|
85
|
-
function bt(t, l) {
|
|
86
|
-
if (t === l)
|
|
87
|
-
return !0;
|
|
88
|
-
if (t && l && typeof t == "object" && typeof l == "object") {
|
|
89
|
-
const e = Array.isArray(t), s = Array.isArray(l);
|
|
90
|
-
let o, u, d;
|
|
91
|
-
if (e && s) {
|
|
92
|
-
if (u = t.length, u != l.length)
|
|
93
|
-
return !1;
|
|
94
|
-
for (o = u; o-- !== 0; )
|
|
95
|
-
if (!bt(t[o], l[o]))
|
|
96
|
-
return !1;
|
|
97
|
-
return !0;
|
|
54
|
+
__publicField(this, "_fetchOptions", {});
|
|
55
|
+
__publicField(this, "_iconsCollections", []);
|
|
56
|
+
__publicField(this, "_iconsProvider", DEFAULT_ICONIFY_PROVIDER);
|
|
57
|
+
__publicField(this, "_nuxt", false);
|
|
58
|
+
__publicField(this, "defaults", ref({}));
|
|
59
|
+
if (fetchOptions) {
|
|
60
|
+
this._fetchOptions = fetchOptions;
|
|
61
|
+
}
|
|
62
|
+
if (fetchWithCredentials) {
|
|
63
|
+
this._fetchOptions = {
|
|
64
|
+
...this._fetchOptions,
|
|
65
|
+
credentials: "include"
|
|
66
|
+
};
|
|
98
67
|
}
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
const c = t instanceof Date, v = l instanceof Date;
|
|
102
|
-
if (c != v)
|
|
103
|
-
return !1;
|
|
104
|
-
if (c && v)
|
|
105
|
-
return t.getTime() == l.getTime();
|
|
106
|
-
const p = t instanceof RegExp, r = l instanceof RegExp;
|
|
107
|
-
if (p != r)
|
|
108
|
-
return !1;
|
|
109
|
-
if (p && r)
|
|
110
|
-
return t.toString() == l.toString();
|
|
111
|
-
const i = Object.keys(t);
|
|
112
|
-
if (u = i.length, u !== Object.keys(l).length)
|
|
113
|
-
return !1;
|
|
114
|
-
for (o = u; o-- !== 0; )
|
|
115
|
-
if (!Object.prototype.hasOwnProperty.call(l, i[o]))
|
|
116
|
-
return !1;
|
|
117
|
-
for (o = u; o-- !== 0; )
|
|
118
|
-
if (d = i[o], !bt(t[d], l[d]))
|
|
119
|
-
return !1;
|
|
120
|
-
return !0;
|
|
121
|
-
}
|
|
122
|
-
return t !== t && l !== l;
|
|
123
|
-
}
|
|
124
|
-
function Ze(t, l) {
|
|
125
|
-
if (t && Object.keys(t).length && l) {
|
|
126
|
-
if (l.indexOf(".") === -1)
|
|
127
|
-
return t[l];
|
|
128
|
-
{
|
|
129
|
-
const e = l.split(".");
|
|
130
|
-
let s = t;
|
|
131
|
-
for (let o = 0, u = e.length; o < u; ++o) {
|
|
132
|
-
if (t == null)
|
|
133
|
-
return null;
|
|
134
|
-
s = s[e[o]];
|
|
135
|
-
}
|
|
136
|
-
return s;
|
|
68
|
+
if (iconsProvider) {
|
|
69
|
+
this._iconsProvider = iconsProvider;
|
|
137
70
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
for (let s = 0; s < l.length; s++)
|
|
145
|
-
if (Pe(l[s], t)) {
|
|
146
|
-
e = s;
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return e;
|
|
151
|
-
}
|
|
152
|
-
function we(t, l) {
|
|
153
|
-
if (t != null && l && l.length) {
|
|
154
|
-
for (const e of l)
|
|
155
|
-
if (Pe(t, e))
|
|
156
|
-
return !0;
|
|
157
|
-
}
|
|
158
|
-
return !1;
|
|
159
|
-
}
|
|
160
|
-
function ge(t) {
|
|
161
|
-
return ((l) => l == null || l === "" || Array.isArray(l) && l.length === 0 || !(l instanceof Date) && typeof l == "object" && Object.keys(l).length === 0)(a(t));
|
|
162
|
-
}
|
|
163
|
-
function Ll(t, l) {
|
|
164
|
-
const e = Dl(t, l);
|
|
165
|
-
return e > -1 ? l.filter((s, o) => o !== e) : l;
|
|
166
|
-
}
|
|
167
|
-
function Bl(t) {
|
|
168
|
-
return typeof t == "string" || t instanceof String;
|
|
169
|
-
}
|
|
170
|
-
function tt(t) {
|
|
171
|
-
const l = We(t, void 0), e = n(() => !ge(l));
|
|
172
|
-
function s(o, u, d) {
|
|
173
|
-
if (l != null && l.value) {
|
|
174
|
-
const v = a(l.value)[o];
|
|
175
|
-
return n({
|
|
176
|
-
get() {
|
|
177
|
-
return v == null ? void 0 : v.value;
|
|
178
|
-
},
|
|
179
|
-
set(p) {
|
|
180
|
-
v.value = p;
|
|
181
|
-
}
|
|
71
|
+
if (nuxt) {
|
|
72
|
+
this._nuxt = nuxt;
|
|
73
|
+
}
|
|
74
|
+
if (iconsCollections && Array.isArray(iconsCollections)) {
|
|
75
|
+
iconsCollections.forEach((iconsCollection) => {
|
|
76
|
+
this.addCollection(iconsCollection, this._iconsProvider);
|
|
182
77
|
});
|
|
183
78
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
return c.value;
|
|
188
|
-
},
|
|
189
|
-
set(v) {
|
|
190
|
-
d && d(`update:${o}`, v);
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
return {
|
|
195
|
-
group: l,
|
|
196
|
-
isInGroup: e,
|
|
197
|
-
getGroupOrLocalRef: s
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
const Tl = {
|
|
201
|
-
/**
|
|
202
|
-
* Accordion name
|
|
203
|
-
*/
|
|
204
|
-
name: String,
|
|
205
|
-
/**
|
|
206
|
-
* Header title
|
|
207
|
-
*/
|
|
208
|
-
title: String,
|
|
209
|
-
/**
|
|
210
|
-
* Content text
|
|
211
|
-
*/
|
|
212
|
-
content: String,
|
|
213
|
-
/**
|
|
214
|
-
* (Optional) Defines if item is open. Event "update:modelValue" is emitted on accordion header click
|
|
215
|
-
*/
|
|
216
|
-
modelValue: {
|
|
217
|
-
type: Boolean,
|
|
218
|
-
default: void 0
|
|
219
|
-
},
|
|
220
|
-
/**
|
|
221
|
-
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
|
|
222
|
-
*/
|
|
223
|
-
modifiers: [String, Array],
|
|
224
|
-
/**
|
|
225
|
-
* If true, the accordion will be disabled
|
|
226
|
-
*/
|
|
227
|
-
disabled: Boolean
|
|
228
|
-
}, Nl = ["update:modelValue"];
|
|
229
|
-
function Rl(t, l) {
|
|
230
|
-
const { group: e, isInGroup: s, getGroupOrLocalRef: o } = tt(
|
|
231
|
-
Xt
|
|
232
|
-
), { title: u, content: d } = G(t), c = o("modelValue", t, l), v = o("disabled", t), p = o("collapse", t), r = o("modifiers", t);
|
|
233
|
-
return {
|
|
234
|
-
// group props
|
|
235
|
-
modelValue: c,
|
|
236
|
-
disabled: v,
|
|
237
|
-
isInGroup: s,
|
|
238
|
-
group: e,
|
|
239
|
-
collapse: p,
|
|
240
|
-
modifiers: r,
|
|
241
|
-
// local props
|
|
242
|
-
title: u,
|
|
243
|
-
content: d
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
function X(t, l, e) {
|
|
247
|
-
return n(() => {
|
|
248
|
-
const s = {
|
|
249
|
-
[t]: !0
|
|
250
|
-
}, o = typeof (l == null ? void 0 : l.value) == "string" ? l.value.split(" ") : l == null ? void 0 : l.value;
|
|
251
|
-
return o && Array.isArray(o) && o.forEach((u) => {
|
|
252
|
-
s[`${t}--${u}`] = !0;
|
|
253
|
-
}), e && Object.keys(e.value).forEach((u) => {
|
|
254
|
-
s[`${t}--${u}`] = a(e.value[u]);
|
|
255
|
-
}), s;
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
const Hl = ["id", "open"], xl = ["aria-controls", "aria-expanded"], Ml = ["aria-hidden"], Gl = {
|
|
259
|
-
name: "VvAccordion"
|
|
260
|
-
}, jl = /* @__PURE__ */ j({
|
|
261
|
-
...Gl,
|
|
262
|
-
props: Tl,
|
|
263
|
-
emits: Nl,
|
|
264
|
-
setup(t, { emit: l }) {
|
|
265
|
-
const e = t, s = yt(), o = n(
|
|
266
|
-
() => e.name || (s == null ? void 0 : s.id) || Gt()
|
|
267
|
-
), {
|
|
268
|
-
modifiers: u,
|
|
269
|
-
title: d,
|
|
270
|
-
content: c,
|
|
271
|
-
disabled: v,
|
|
272
|
-
collapse: p,
|
|
273
|
-
modelValue: r,
|
|
274
|
-
isInGroup: i
|
|
275
|
-
} = Rl(e, l), b = N(!1), _ = n({
|
|
276
|
-
get: () => i.value ? p.value && Array.isArray(r.value) ? r.value.includes(o.value) : r.value === o.value : r.value === void 0 ? b.value : r.value,
|
|
277
|
-
set: (y) => {
|
|
278
|
-
if (i.value) {
|
|
279
|
-
if (p.value && Array.isArray(r.value)) {
|
|
280
|
-
if (y) {
|
|
281
|
-
r.value.push(o.value);
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
r.value = r.value.filter(
|
|
285
|
-
(m) => m !== o.value
|
|
286
|
-
);
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
r.value = y ? o.value : null;
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
if (r.value === void 0 && typeof y == "boolean") {
|
|
293
|
-
b.value = y;
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
r.value = y;
|
|
297
|
-
}
|
|
298
|
-
}), k = X(
|
|
299
|
-
"vv-accordion",
|
|
300
|
-
u,
|
|
301
|
-
n(() => ({
|
|
302
|
-
disabled: v.value
|
|
303
|
-
}))
|
|
304
|
-
), A = Vl(_);
|
|
305
|
-
return (y, m) => (f(), g("details", {
|
|
306
|
-
id: a(o),
|
|
307
|
-
class: le(a(k)),
|
|
308
|
-
open: a(_),
|
|
309
|
-
onClick: m[0] || (m[0] = Rt((I) => a(A)(), ["prevent"]))
|
|
310
|
-
}, [
|
|
311
|
-
x("summary", {
|
|
312
|
-
"aria-controls": a(o),
|
|
313
|
-
"aria-expanded": a(_),
|
|
314
|
-
class: "vv-collapse__summary"
|
|
315
|
-
}, [
|
|
316
|
-
V(y.$slots, "summary", K(z({ open: a(_) })), () => [
|
|
317
|
-
Y(T(a(d)), 1)
|
|
318
|
-
])
|
|
319
|
-
], 8, xl),
|
|
320
|
-
x("div", {
|
|
321
|
-
"aria-hidden": !a(_),
|
|
322
|
-
class: "vv-collapse__content"
|
|
323
|
-
}, [
|
|
324
|
-
V(y.$slots, "details", K(z({ open: a(_) })), () => [
|
|
325
|
-
Y(T(a(c)), 1)
|
|
326
|
-
])
|
|
327
|
-
], 8, Ml)
|
|
328
|
-
], 10, Hl));
|
|
329
|
-
}
|
|
330
|
-
}), Wl = {
|
|
331
|
-
/**
|
|
332
|
-
* VModel
|
|
333
|
-
*/
|
|
334
|
-
modelValue: [String, Array],
|
|
335
|
-
/**
|
|
336
|
-
* Accordion items
|
|
337
|
-
* @type VvAccordionGroupItem
|
|
338
|
-
*/
|
|
339
|
-
items: { type: Array, default: () => [] },
|
|
340
|
-
/**
|
|
341
|
-
* If true, accordion items stay open when another item is opened
|
|
342
|
-
*/
|
|
343
|
-
collapse: Boolean,
|
|
344
|
-
/**
|
|
345
|
-
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion-group--'
|
|
346
|
-
*/
|
|
347
|
-
modifiers: [String, Array],
|
|
348
|
-
/**
|
|
349
|
-
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
|
|
350
|
-
*/
|
|
351
|
-
itemModifiers: {
|
|
352
|
-
type: [String, Array],
|
|
353
|
-
default: ""
|
|
354
|
-
},
|
|
355
|
-
/**
|
|
356
|
-
* If true, the accordion items will be disabled
|
|
357
|
-
*/
|
|
358
|
-
disabled: Boolean
|
|
359
|
-
}, Ul = ["update:modelValue"];
|
|
360
|
-
function lt(t) {
|
|
361
|
-
if (Object.keys(t).some(
|
|
362
|
-
(l) => l !== "key" && !Ee(t[l])
|
|
363
|
-
))
|
|
364
|
-
throw Error("One or more groupState props aren't ref.");
|
|
365
|
-
gt(
|
|
366
|
-
t.key,
|
|
367
|
-
n(() => t)
|
|
368
|
-
);
|
|
369
|
-
}
|
|
370
|
-
const Fl = {
|
|
371
|
-
name: "VvAccordionGroup"
|
|
372
|
-
}, bs = /* @__PURE__ */ j({
|
|
373
|
-
...Fl,
|
|
374
|
-
props: Wl,
|
|
375
|
-
emits: Ul,
|
|
376
|
-
setup(t, { emit: l }) {
|
|
377
|
-
const e = t, { disabled: s, collapse: o, modifiers: u, itemModifiers: d, items: c } = G(e);
|
|
378
|
-
_t(() => {
|
|
379
|
-
typeof e.modelValue == "string" && o.value && console.warn(
|
|
380
|
-
"[VvAccordionGroup]: modelValue is a string but collapse is true."
|
|
381
|
-
);
|
|
382
|
-
});
|
|
383
|
-
const v = N([]), p = n({
|
|
384
|
-
get: () => {
|
|
385
|
-
var i;
|
|
386
|
-
return e.modelValue !== void 0 ? o.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue : o.value ? v.value : (i = v.value) == null ? void 0 : i[0];
|
|
387
|
-
},
|
|
388
|
-
set: (i) => {
|
|
389
|
-
if (e.modelValue !== void 0)
|
|
390
|
-
return (Array.isArray(e.modelValue) || o.value) && !Array.isArray(i) && (i = [i]), l("update:modelValue", i);
|
|
391
|
-
v.value = Array.isArray(i) ? i : [i];
|
|
392
|
-
}
|
|
393
|
-
});
|
|
394
|
-
lt({
|
|
395
|
-
key: Xt,
|
|
396
|
-
modelValue: p,
|
|
397
|
-
disabled: s,
|
|
398
|
-
collapse: o,
|
|
399
|
-
modifiers: d
|
|
400
|
-
});
|
|
401
|
-
const r = X(
|
|
402
|
-
"vv-accordion-group",
|
|
403
|
-
u,
|
|
404
|
-
n(() => ({
|
|
405
|
-
disabled: s.value
|
|
406
|
-
}))
|
|
407
|
-
);
|
|
408
|
-
return (i, b) => (f(), g("div", {
|
|
409
|
-
class: le(a(r))
|
|
410
|
-
}, [
|
|
411
|
-
V(i.$slots, "default", {}, () => [
|
|
412
|
-
(f(!0), g(ie, null, Ne(a(c), (_) => (f(), H(jl, R({
|
|
413
|
-
key: _.title
|
|
414
|
-
}, {
|
|
415
|
-
name: _.name,
|
|
416
|
-
title: _.title,
|
|
417
|
-
content: _.content
|
|
418
|
-
}), {
|
|
419
|
-
header: te((k) => [
|
|
420
|
-
V(i.$slots, `header::${_.name}`, K(z(k)))
|
|
421
|
-
]),
|
|
422
|
-
details: te((k) => [
|
|
423
|
-
V(i.$slots, `details::${_.name}`, K(z(k)))
|
|
424
|
-
]),
|
|
425
|
-
_: 2
|
|
426
|
-
}, 1040))), 128))
|
|
427
|
-
])
|
|
428
|
-
], 2));
|
|
429
|
-
}
|
|
430
|
-
}), Kl = {
|
|
431
|
-
/**
|
|
432
|
-
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
433
|
-
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
434
|
-
*/
|
|
435
|
-
to: {
|
|
436
|
-
type: [String, Object]
|
|
437
|
-
},
|
|
438
|
-
/**
|
|
439
|
-
* Anchor href
|
|
440
|
-
*/
|
|
441
|
-
href: String,
|
|
442
|
-
/**
|
|
443
|
-
* Anchor target
|
|
444
|
-
*/
|
|
445
|
-
target: {
|
|
446
|
-
type: String,
|
|
447
|
-
validator: (t) => Object.values(Kt).includes(t)
|
|
448
|
-
},
|
|
449
|
-
/**
|
|
450
|
-
* Anchor rel
|
|
451
|
-
*/
|
|
452
|
-
rel: {
|
|
453
|
-
type: String,
|
|
454
|
-
default: "noopener noreferrer"
|
|
455
|
-
}
|
|
456
|
-
}, Ue = {
|
|
457
|
-
/**
|
|
458
|
-
* Valid status
|
|
459
|
-
*/
|
|
460
|
-
valid: Boolean,
|
|
461
|
-
/**
|
|
462
|
-
* Valid label
|
|
463
|
-
*/
|
|
464
|
-
validLabel: [String, Array]
|
|
465
|
-
}, Fe = {
|
|
466
|
-
/**
|
|
467
|
-
* Invalid status
|
|
468
|
-
*/
|
|
469
|
-
invalid: Boolean,
|
|
470
|
-
/**
|
|
471
|
-
* Invalid label
|
|
472
|
-
*/
|
|
473
|
-
invalidLabel: [String, Array]
|
|
474
|
-
}, at = {
|
|
475
|
-
/**
|
|
476
|
-
* Loading status
|
|
477
|
-
*/
|
|
478
|
-
loading: Boolean,
|
|
479
|
-
/**
|
|
480
|
-
* Loading label
|
|
481
|
-
*/
|
|
482
|
-
loadingLabel: {
|
|
483
|
-
type: String,
|
|
484
|
-
default: "Loading..."
|
|
485
|
-
}
|
|
486
|
-
}, De = {
|
|
487
|
-
/**
|
|
488
|
-
* Whether the form control is disabled
|
|
489
|
-
*/
|
|
490
|
-
disabled: Boolean
|
|
491
|
-
}, zl = {
|
|
492
|
-
/**
|
|
493
|
-
* Whether the item is selected
|
|
494
|
-
*/
|
|
495
|
-
selected: Boolean
|
|
496
|
-
}, ql = {
|
|
497
|
-
/**
|
|
498
|
-
* Whether the item is active
|
|
499
|
-
*/
|
|
500
|
-
active: Boolean
|
|
501
|
-
}, Yl = {
|
|
502
|
-
/**
|
|
503
|
-
* Whether the item is pressed
|
|
504
|
-
*/
|
|
505
|
-
pressed: Boolean
|
|
506
|
-
}, xe = {
|
|
507
|
-
/**
|
|
508
|
-
* The item label
|
|
509
|
-
*/
|
|
510
|
-
label: [String, Number]
|
|
511
|
-
}, Ke = {
|
|
512
|
-
/**
|
|
513
|
-
* The value is not editable
|
|
514
|
-
*/
|
|
515
|
-
readonly: Boolean
|
|
516
|
-
}, me = {
|
|
517
|
-
/**
|
|
518
|
-
* Component BEM modifiers
|
|
519
|
-
*/
|
|
520
|
-
modifiers: [String, Array]
|
|
521
|
-
}, ze = {
|
|
522
|
-
hintLabel: { type: String, default: "" }
|
|
523
|
-
}, kt = {
|
|
524
|
-
/**
|
|
525
|
-
* List of options, can be string[] or object[]
|
|
526
|
-
*/
|
|
527
|
-
options: {
|
|
528
|
-
type: Array,
|
|
529
|
-
default: () => []
|
|
530
|
-
},
|
|
531
|
-
/**
|
|
532
|
-
* Used when options are objects: key to use for option label
|
|
533
|
-
*/
|
|
534
|
-
labelKey: { type: [String, Function], default: "label" },
|
|
535
|
-
/**
|
|
536
|
-
* Used when options are objects: key to use for option label
|
|
537
|
-
*/
|
|
538
|
-
valueKey: { type: [String, Function], default: "value" },
|
|
539
|
-
/**
|
|
540
|
-
* Used when options are objects: key to use for option disabled
|
|
541
|
-
*/
|
|
542
|
-
disabledKey: { type: [String, Function], default: "disabled" }
|
|
543
|
-
}, Jl = {
|
|
544
|
-
/**
|
|
545
|
-
* Show character limit
|
|
546
|
-
*/
|
|
547
|
-
count: {
|
|
548
|
-
type: [Boolean, String],
|
|
549
|
-
default: !1,
|
|
550
|
-
validator: (t) => [!0, !1, "limit", "countdown"].includes(t)
|
|
551
|
-
}
|
|
552
|
-
}, Xl = {
|
|
553
|
-
/**
|
|
554
|
-
* Milliseconds to wait before emitting the input event
|
|
555
|
-
*/
|
|
556
|
-
debounce: [Number, String]
|
|
557
|
-
}, At = {
|
|
558
|
-
/**
|
|
559
|
-
* VvIcon name or props
|
|
560
|
-
* @see VVIcon
|
|
561
|
-
*/
|
|
562
|
-
icon: { type: [String, Object] },
|
|
563
|
-
/**
|
|
564
|
-
* VvIcon position
|
|
565
|
-
*/
|
|
566
|
-
iconPosition: {
|
|
567
|
-
type: String,
|
|
568
|
-
default: Ge.before,
|
|
569
|
-
validation: (t) => Object.values(Ge).includes(t)
|
|
570
|
-
}
|
|
571
|
-
}, ot = {
|
|
572
|
-
/**
|
|
573
|
-
* Global attribute tabindex
|
|
574
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
|
575
|
-
*/
|
|
576
|
-
tabindex: { type: [String, Number], default: 0 }
|
|
577
|
-
}, Ct = {
|
|
578
|
-
/**
|
|
579
|
-
* If true the label will be floating
|
|
580
|
-
*/
|
|
581
|
-
floating: Boolean
|
|
582
|
-
}, qe = {
|
|
583
|
-
/**
|
|
584
|
-
* If true the input will be unselectable
|
|
585
|
-
*/
|
|
586
|
-
unselectable: { type: Boolean, default: !0 }
|
|
587
|
-
}, st = {
|
|
588
|
-
/**
|
|
589
|
-
* Global attribute id
|
|
590
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
|
|
591
|
-
*/
|
|
592
|
-
id: [String, Number]
|
|
593
|
-
}, ht = {
|
|
594
|
-
/**
|
|
595
|
-
* Dropdown placement
|
|
596
|
-
*/
|
|
597
|
-
placement: {
|
|
598
|
-
type: String,
|
|
599
|
-
default: fe.bottom,
|
|
600
|
-
validator: (t) => Object.values(fe).includes(t) || Object.values(Ut).includes(t)
|
|
601
|
-
},
|
|
602
|
-
/**
|
|
603
|
-
* Dropdown show / hide transition name
|
|
604
|
-
*/
|
|
605
|
-
transitionName: {
|
|
606
|
-
type: String
|
|
607
|
-
},
|
|
608
|
-
/**
|
|
609
|
-
* Offset of the dropdown from the trigger
|
|
610
|
-
* @see https://floating-ui.com/docs/offset
|
|
611
|
-
*/
|
|
612
|
-
offset: {
|
|
613
|
-
type: [Number, String, Object],
|
|
614
|
-
default: 0
|
|
615
|
-
},
|
|
616
|
-
/**
|
|
617
|
-
* Move dropdown to the side if there is no space in the default position
|
|
618
|
-
* @see https://floating-ui.com/docs/shift
|
|
619
|
-
*/
|
|
620
|
-
shift: {
|
|
621
|
-
type: [Boolean, Object],
|
|
622
|
-
default: !1
|
|
623
|
-
},
|
|
624
|
-
/**
|
|
625
|
-
* Flip dropdown position if there is no space in the default position
|
|
626
|
-
* @see https://floating-ui.com/docs/flip
|
|
627
|
-
*/
|
|
628
|
-
flip: {
|
|
629
|
-
type: [Boolean, Object],
|
|
630
|
-
default: !0
|
|
631
|
-
},
|
|
632
|
-
/**
|
|
633
|
-
* Size of the dropdown
|
|
634
|
-
* @see https://floating-ui.com/docs/size
|
|
635
|
-
*/
|
|
636
|
-
size: {
|
|
637
|
-
type: [Boolean, Object],
|
|
638
|
-
default: () => ({ padding: 10 })
|
|
639
|
-
},
|
|
640
|
-
/**
|
|
641
|
-
* Automatically change the position of the dropdown
|
|
642
|
-
* @see https://floating-ui.com/docs/autoPlacement
|
|
643
|
-
*/
|
|
644
|
-
autoPlacement: {
|
|
645
|
-
type: [Boolean, Object],
|
|
646
|
-
default: !1
|
|
647
|
-
},
|
|
648
|
-
/**
|
|
649
|
-
* Add arrow to the dropdown
|
|
650
|
-
* @see https://floating-ui.com/docs/arrow
|
|
651
|
-
*/
|
|
652
|
-
arrow: {
|
|
653
|
-
type: Boolean,
|
|
654
|
-
default: !1
|
|
655
|
-
},
|
|
656
|
-
/**
|
|
657
|
-
* Close dropdown on click outside
|
|
658
|
-
*/
|
|
659
|
-
autoClose: {
|
|
660
|
-
type: Boolean,
|
|
661
|
-
default: !0
|
|
662
|
-
},
|
|
663
|
-
/**
|
|
664
|
-
* Autofocus first item on dropdown open
|
|
665
|
-
*/
|
|
666
|
-
autofocusFirst: {
|
|
667
|
-
type: Boolean,
|
|
668
|
-
default: !0
|
|
669
|
-
},
|
|
670
|
-
/**
|
|
671
|
-
* Set dropdown width to the same as the trigger
|
|
672
|
-
*/
|
|
673
|
-
triggerWidth: {
|
|
674
|
-
type: Boolean
|
|
675
|
-
}
|
|
676
|
-
}, nt = {
|
|
677
|
-
...st,
|
|
678
|
-
/**
|
|
679
|
-
* Input / Textarea name
|
|
680
|
-
* Name of the form control. Submitted with the form as part of a name/value pair
|
|
681
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
|
|
682
|
-
*/
|
|
683
|
-
name: { type: String, required: !0 }
|
|
684
|
-
}, tl = {
|
|
685
|
-
/**
|
|
686
|
-
* Global attribute autofocus
|
|
687
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
|
|
688
|
-
*/
|
|
689
|
-
autofocus: Boolean
|
|
690
|
-
}, ll = {
|
|
691
|
-
/**
|
|
692
|
-
* Global attribute autocomplete
|
|
693
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
|
694
|
-
*/
|
|
695
|
-
autocomplete: { type: String, default: "off" }
|
|
696
|
-
}, al = {
|
|
697
|
-
...nt,
|
|
698
|
-
...tl,
|
|
699
|
-
...ll,
|
|
700
|
-
...ot,
|
|
701
|
-
...De,
|
|
702
|
-
...Ke,
|
|
703
|
-
...Ue,
|
|
704
|
-
...Fe,
|
|
705
|
-
...ze,
|
|
706
|
-
...at,
|
|
707
|
-
...me,
|
|
708
|
-
...Jl,
|
|
709
|
-
...Xl,
|
|
710
|
-
...At,
|
|
711
|
-
...Ct,
|
|
712
|
-
...xe,
|
|
713
|
-
/**
|
|
714
|
-
* Input / Textarea minlength
|
|
715
|
-
* Minimum length (number of characters) of value
|
|
716
|
-
* Available for input types: text, search, url, tel, email, password
|
|
717
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
|
|
718
|
-
*/
|
|
719
|
-
minlength: Number,
|
|
720
|
-
/**
|
|
721
|
-
* Input / Textarea maxlength
|
|
722
|
-
* Maximum length (number of characters) of value
|
|
723
|
-
* Available for input types: text, search, url, tel, email, password
|
|
724
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
|
|
725
|
-
*/
|
|
726
|
-
maxlength: Number,
|
|
727
|
-
/**
|
|
728
|
-
* Input / Textarea placeholder
|
|
729
|
-
* Text that appears in the form control when it has no value set
|
|
730
|
-
* Available for input types: text, search, url, tel, email, password, number
|
|
731
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
|
|
732
|
-
*/
|
|
733
|
-
placeholder: String,
|
|
734
|
-
/**
|
|
735
|
-
* Input / Textarea required
|
|
736
|
-
* A value is required or must be check for the form to be submittable
|
|
737
|
-
* Available for all input types except color
|
|
738
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
|
|
739
|
-
*/
|
|
740
|
-
required: Boolean
|
|
741
|
-
}, ol = {
|
|
742
|
-
...nt,
|
|
743
|
-
...ot,
|
|
744
|
-
...Ue,
|
|
745
|
-
...Fe,
|
|
746
|
-
...ze,
|
|
747
|
-
...De,
|
|
748
|
-
...Ke,
|
|
749
|
-
...me,
|
|
750
|
-
...xe,
|
|
751
|
-
/**
|
|
752
|
-
* Input value
|
|
753
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
754
|
-
*/
|
|
755
|
-
value: [String, Number, Boolean],
|
|
756
|
-
/**
|
|
757
|
-
* Input value
|
|
758
|
-
*/
|
|
759
|
-
modelValue: [Object, Number, Boolean, String]
|
|
760
|
-
}, sl = {
|
|
761
|
-
...Ue,
|
|
762
|
-
...Fe,
|
|
763
|
-
...kt,
|
|
764
|
-
...ze,
|
|
765
|
-
...De,
|
|
766
|
-
...Ke,
|
|
767
|
-
...me,
|
|
768
|
-
...xe,
|
|
769
|
-
/**
|
|
770
|
-
* Input value
|
|
771
|
-
*/
|
|
772
|
-
modelValue: [String, Array],
|
|
773
|
-
/**
|
|
774
|
-
* Input name
|
|
775
|
-
*/
|
|
776
|
-
name: { type: String, required: !0 },
|
|
777
|
-
/**
|
|
778
|
-
* If true, the group will be displayed in a vertical column
|
|
779
|
-
*/
|
|
780
|
-
vertical: Boolean
|
|
781
|
-
}, nl = {
|
|
782
|
-
...De,
|
|
783
|
-
...xe,
|
|
784
|
-
...Yl,
|
|
785
|
-
...ql,
|
|
786
|
-
...Kl,
|
|
787
|
-
/**
|
|
788
|
-
* Button type
|
|
789
|
-
*/
|
|
790
|
-
type: {
|
|
791
|
-
type: String,
|
|
792
|
-
default: pt.button,
|
|
793
|
-
validator: (t) => Object.values(pt).includes(t)
|
|
79
|
+
if (defaults) {
|
|
80
|
+
this.defaults.value = defaults;
|
|
81
|
+
}
|
|
794
82
|
}
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
value: [String, Number]
|
|
798
|
-
}, Zl = {
|
|
799
|
-
name: "VvBadge"
|
|
800
|
-
}, ea = /* @__PURE__ */ j({
|
|
801
|
-
...Zl,
|
|
802
|
-
props: Ql,
|
|
803
|
-
setup(t) {
|
|
804
|
-
const l = t, { modifiers: e } = G(l), s = X("vv-badge", e);
|
|
805
|
-
return (o, u) => (f(), g("span", {
|
|
806
|
-
class: le(a(s)),
|
|
807
|
-
role: "status"
|
|
808
|
-
}, [
|
|
809
|
-
V(o.$slots, "default", {}, () => [
|
|
810
|
-
Y(T(o.value), 1)
|
|
811
|
-
])
|
|
812
|
-
], 2));
|
|
83
|
+
get nuxt() {
|
|
84
|
+
return this._nuxt;
|
|
813
85
|
}
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
routes: Array
|
|
817
|
-
}, la = { class: "vv-breadcrumb__list" }, aa = ["content"], oa = {
|
|
818
|
-
name: "VvBreadcrumb"
|
|
819
|
-
}, hs = /* @__PURE__ */ j({
|
|
820
|
-
...oa,
|
|
821
|
-
props: ta,
|
|
822
|
-
setup(t) {
|
|
823
|
-
const l = t, { modifiers: e } = G(l), s = X("vv-breadcrumb", e);
|
|
824
|
-
return (o, u) => (f(), g("nav", {
|
|
825
|
-
class: le(a(s)),
|
|
826
|
-
"aria-label": "breadcrumbs"
|
|
827
|
-
}, [
|
|
828
|
-
x("ol", la, [
|
|
829
|
-
(f(!0), g(ie, null, Ne(o.routes, (d, c) => {
|
|
830
|
-
var v, p, r, i;
|
|
831
|
-
return f(), g("li", {
|
|
832
|
-
key: `${d.label}-${c}`,
|
|
833
|
-
class: le({
|
|
834
|
-
"vv-breadcrumb__item": c < Number((v = o.routes) == null ? void 0 : v.length) - 1,
|
|
835
|
-
"vv-breadcrumb__item-active": c === Number((p = o.routes) == null ? void 0 : p.length) - 1
|
|
836
|
-
}),
|
|
837
|
-
itemprop: "itemListElement",
|
|
838
|
-
itemtype: "https://schema.org/ListItem",
|
|
839
|
-
itemscope: ""
|
|
840
|
-
}, [
|
|
841
|
-
(f(), H(Ht(d.to ? "router-link" : d.href ? "a" : "span"), R(d, {
|
|
842
|
-
class: {
|
|
843
|
-
"vv-breadcrumb__link": c < Number((r = o.routes) == null ? void 0 : r.length) - 1
|
|
844
|
-
},
|
|
845
|
-
"aria-current": c === Number((i = o.routes) == null ? void 0 : i.length) - 1 ? "page" : void 0,
|
|
846
|
-
itemprop: "item"
|
|
847
|
-
}), {
|
|
848
|
-
default: te(() => [
|
|
849
|
-
V(o.$slots, "label", K(z({ route: d, index: c })), () => [
|
|
850
|
-
Y(T(d.label), 1)
|
|
851
|
-
])
|
|
852
|
-
]),
|
|
853
|
-
_: 2
|
|
854
|
-
}, 1040, ["class", "aria-current"])),
|
|
855
|
-
x("meta", {
|
|
856
|
-
itemprop: "position",
|
|
857
|
-
content: `${c + 1}`
|
|
858
|
-
}, null, 8, aa)
|
|
859
|
-
], 2);
|
|
860
|
-
}), 128))
|
|
861
|
-
])
|
|
862
|
-
], 2));
|
|
86
|
+
get iconsProvider() {
|
|
87
|
+
return this._iconsProvider;
|
|
863
88
|
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
* Color
|
|
867
|
-
*/
|
|
868
|
-
color: String,
|
|
869
|
-
/**
|
|
870
|
-
* Width
|
|
871
|
-
*/
|
|
872
|
-
width: {
|
|
873
|
-
type: [String, Number]
|
|
874
|
-
},
|
|
875
|
-
/**
|
|
876
|
-
* Height
|
|
877
|
-
*/
|
|
878
|
-
height: {
|
|
879
|
-
type: [String, Number]
|
|
880
|
-
},
|
|
881
|
-
/**
|
|
882
|
-
* Icon name
|
|
883
|
-
* Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
|
|
884
|
-
* https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
885
|
-
*/
|
|
886
|
-
name: {
|
|
887
|
-
type: String,
|
|
888
|
-
required: !0
|
|
889
|
-
},
|
|
890
|
-
/**
|
|
891
|
-
* By default 'vv'
|
|
892
|
-
* If custom collection is not added with "addCollection" DS class method, this prop could not be used
|
|
893
|
-
* Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
894
|
-
*/
|
|
895
|
-
provider: {
|
|
896
|
-
type: String
|
|
897
|
-
},
|
|
898
|
-
/**
|
|
899
|
-
* The name of icon set.
|
|
900
|
-
* Icon default options prefix: simple | normal | detailed
|
|
901
|
-
*/
|
|
902
|
-
prefix: {
|
|
903
|
-
type: String,
|
|
904
|
-
default: "normal"
|
|
905
|
-
},
|
|
906
|
-
/**
|
|
907
|
-
* Url remote SVG icon
|
|
908
|
-
*/
|
|
909
|
-
src: String,
|
|
910
|
-
/**
|
|
911
|
-
* Horizontal flip
|
|
912
|
-
*/
|
|
913
|
-
horizontalFlip: Boolean,
|
|
914
|
-
/**
|
|
915
|
-
* Vertical flip
|
|
916
|
-
*/
|
|
917
|
-
verticalFlip: Boolean,
|
|
918
|
-
/**
|
|
919
|
-
* String alternative to "horizontalFlip" and "verticalFlip".
|
|
920
|
-
* Example: https://docs.iconify.design/icon-components/vue/transform.html
|
|
921
|
-
*/
|
|
922
|
-
flip: String,
|
|
923
|
-
/**
|
|
924
|
-
* Icon render mode
|
|
925
|
-
* 'style' = 'bg' or 'mask', depending on icon content
|
|
926
|
-
* 'bg' = span with style using `background`
|
|
927
|
-
* 'mask' = span with style using `mask`
|
|
928
|
-
* 'svg' = svg
|
|
929
|
-
* Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
|
|
930
|
-
*/
|
|
931
|
-
mode: String,
|
|
932
|
-
/**
|
|
933
|
-
* Toggles inline or block mode
|
|
934
|
-
* Example https://docs.iconify.design/icon-components/vue/inline.html
|
|
935
|
-
*/
|
|
936
|
-
inline: Boolean,
|
|
937
|
-
/**
|
|
938
|
-
* rotates icon
|
|
939
|
-
* Example https://docs.iconify.design/icon-components/vue/transform.html
|
|
940
|
-
*/
|
|
941
|
-
rotate: [Number, String],
|
|
942
|
-
/**
|
|
943
|
-
* A callback that is called when icon data has been loaded
|
|
944
|
-
*/
|
|
945
|
-
onLoad: Function,
|
|
946
|
-
/**
|
|
947
|
-
* SVG icon string
|
|
948
|
-
*/
|
|
949
|
-
svg: String,
|
|
950
|
-
/**
|
|
951
|
-
* Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
|
|
952
|
-
* @values string | Array<string>
|
|
953
|
-
*/
|
|
954
|
-
modifiers: {
|
|
955
|
-
type: [String, Array]
|
|
956
|
-
}
|
|
957
|
-
};
|
|
958
|
-
function rl() {
|
|
959
|
-
return We(zt);
|
|
960
|
-
}
|
|
961
|
-
const na = {
|
|
962
|
-
name: "VvIcon"
|
|
963
|
-
}, ee = /* @__PURE__ */ j({
|
|
964
|
-
...na,
|
|
965
|
-
props: sa,
|
|
966
|
-
setup(t) {
|
|
967
|
-
const l = t, e = N(!0), s = rl(), { modifiers: o } = G(l), u = X("vv-icon", o), d = n(() => l.provider || (s == null ? void 0 : s.provider)), c = n(() => {
|
|
968
|
-
const r = l.name ?? "", i = `@${d.value}:${l.prefix}:${l.name}`;
|
|
969
|
-
return Ye(r) ? r : Ye(i) ? i : (s == null ? void 0 : s.iconsCollections.find(
|
|
970
|
-
(b) => {
|
|
971
|
-
const _ = `@${d.value}:${b.prefix}:${r}`;
|
|
972
|
-
if (Ye(_))
|
|
973
|
-
return _;
|
|
974
|
-
}
|
|
975
|
-
)) || r;
|
|
976
|
-
});
|
|
977
|
-
function v(r) {
|
|
978
|
-
let i = null;
|
|
979
|
-
if (typeof window > "u") {
|
|
980
|
-
const { JSDOM: A } = require("jsdom");
|
|
981
|
-
i = new A().window;
|
|
982
|
-
}
|
|
983
|
-
return (i ? new i.DOMParser() : new window.DOMParser()).parseFromString(r, "text/html").querySelector("svg");
|
|
984
|
-
}
|
|
985
|
-
function p(r) {
|
|
986
|
-
const i = v(r), b = (i == null ? void 0 : i.innerHTML.trim()) || "";
|
|
987
|
-
i && b && Nt(`@${d.value}:${l.prefix}:${l.name}`, {
|
|
988
|
-
body: b,
|
|
989
|
-
// Set height and width from svg content
|
|
990
|
-
height: i.viewBox.baseVal.height,
|
|
991
|
-
width: i.viewBox.baseVal.width
|
|
992
|
-
});
|
|
993
|
-
}
|
|
994
|
-
return s && (l.src && !Ye(`@${d.value}:${l.prefix}:${l.name}`) ? (e.value = !1, s.fetchIcon(l.src).then((r) => {
|
|
995
|
-
r && (p(r), e.value = !0);
|
|
996
|
-
}).catch((r) => {
|
|
997
|
-
throw new Error(`During fetch icon: ${r == null ? void 0 : r.message}`);
|
|
998
|
-
})) : l.svg && p(l.svg)), (r, i) => a(e) ? (f(), H(a(fl), R({
|
|
999
|
-
key: 0,
|
|
1000
|
-
class: a(u)
|
|
1001
|
-
}, {
|
|
1002
|
-
inline: r.inline,
|
|
1003
|
-
width: r.width,
|
|
1004
|
-
height: r.height,
|
|
1005
|
-
horizontalFlip: r.horizontalFlip,
|
|
1006
|
-
verticalFlip: r.verticalFlip,
|
|
1007
|
-
flip: r.flip,
|
|
1008
|
-
rotate: r.rotate,
|
|
1009
|
-
color: r.color,
|
|
1010
|
-
onLoad: r.onLoad,
|
|
1011
|
-
icon: a(c)
|
|
1012
|
-
}), null, 16, ["class"])) : w("", !0);
|
|
1013
|
-
}
|
|
1014
|
-
}), ra = ["click", "mouseover", "mouseleave"], ia = nl;
|
|
1015
|
-
function ua() {
|
|
1016
|
-
return We(Qt, {});
|
|
1017
|
-
}
|
|
1018
|
-
function da() {
|
|
1019
|
-
return We(Zt, {});
|
|
1020
|
-
}
|
|
1021
|
-
function ca() {
|
|
1022
|
-
return We(el, {});
|
|
1023
|
-
}
|
|
1024
|
-
const va = {
|
|
1025
|
-
name: "VvAction"
|
|
1026
|
-
}, fa = /* @__PURE__ */ j({
|
|
1027
|
-
...va,
|
|
1028
|
-
props: ia,
|
|
1029
|
-
emits: ra,
|
|
1030
|
-
setup(t, { expose: l, emit: e }) {
|
|
1031
|
-
const s = t, o = rl(), u = N(null);
|
|
1032
|
-
l({ $el: u });
|
|
1033
|
-
const {
|
|
1034
|
-
reference: d,
|
|
1035
|
-
bus: c,
|
|
1036
|
-
aria: v,
|
|
1037
|
-
expanded: p
|
|
1038
|
-
} = ua();
|
|
1039
|
-
ve(
|
|
1040
|
-
() => u.value,
|
|
1041
|
-
(m) => {
|
|
1042
|
-
d && (d.value = m);
|
|
1043
|
-
}
|
|
1044
|
-
);
|
|
1045
|
-
const r = n(() => s.pressed || (p == null ? void 0 : p.value)), { role: i } = ca(), b = n(() => {
|
|
1046
|
-
switch (!0) {
|
|
1047
|
-
case s.disabled:
|
|
1048
|
-
return ke.button;
|
|
1049
|
-
case s.to !== void 0:
|
|
1050
|
-
return o != null && o.nuxt ? ke.nuxtLink : ke.routerLink;
|
|
1051
|
-
case s.href !== void 0:
|
|
1052
|
-
return ke.a;
|
|
1053
|
-
default:
|
|
1054
|
-
return ke.button;
|
|
1055
|
-
}
|
|
1056
|
-
}), _ = n(() => {
|
|
1057
|
-
const m = {
|
|
1058
|
-
...v == null ? void 0 : v.value,
|
|
1059
|
-
"aria-pressed": r.value ? !0 : void 0,
|
|
1060
|
-
role: i
|
|
1061
|
-
};
|
|
1062
|
-
switch (b.value) {
|
|
1063
|
-
case ke.a:
|
|
1064
|
-
return {
|
|
1065
|
-
...m,
|
|
1066
|
-
href: s.href,
|
|
1067
|
-
target: s.target,
|
|
1068
|
-
rel: s.rel
|
|
1069
|
-
};
|
|
1070
|
-
case ke.routerLink:
|
|
1071
|
-
case ke.nuxtLink:
|
|
1072
|
-
return {
|
|
1073
|
-
...m,
|
|
1074
|
-
to: s.to,
|
|
1075
|
-
target: s.target
|
|
1076
|
-
};
|
|
1077
|
-
default:
|
|
1078
|
-
return {
|
|
1079
|
-
...m,
|
|
1080
|
-
type: s.type,
|
|
1081
|
-
disabled: s.disabled
|
|
1082
|
-
};
|
|
1083
|
-
}
|
|
1084
|
-
}), k = (m) => {
|
|
1085
|
-
if (s.disabled) {
|
|
1086
|
-
m.preventDefault();
|
|
1087
|
-
return;
|
|
1088
|
-
}
|
|
1089
|
-
c == null || c.emit("click", m), e("click", m);
|
|
1090
|
-
}, A = (m) => {
|
|
1091
|
-
c == null || c.emit("mouseover", m), e("mouseover", m);
|
|
1092
|
-
}, y = (m) => {
|
|
1093
|
-
c == null || c.emit("mouseleave", m), e("mouseleave", m);
|
|
1094
|
-
};
|
|
1095
|
-
return (m, I) => (f(), H(Ht(a(b)), R(a(_), {
|
|
1096
|
-
ref_key: "element",
|
|
1097
|
-
ref: u,
|
|
1098
|
-
class: {
|
|
1099
|
-
active: m.active,
|
|
1100
|
-
pressed: a(r),
|
|
1101
|
-
disabled: m.disabled
|
|
1102
|
-
},
|
|
1103
|
-
onClickPassive: k,
|
|
1104
|
-
onMouseoverPassive: A,
|
|
1105
|
-
onMouseleavePassive: y
|
|
1106
|
-
}), {
|
|
1107
|
-
default: te(() => [
|
|
1108
|
-
V(m.$slots, "default", {}, () => [
|
|
1109
|
-
Y(T(m.label), 1)
|
|
1110
|
-
])
|
|
1111
|
-
]),
|
|
1112
|
-
_: 3
|
|
1113
|
-
}, 16, ["class"]));
|
|
89
|
+
get iconsCollections() {
|
|
90
|
+
return this._iconsCollections;
|
|
1114
91
|
}
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
...me,
|
|
1119
|
-
...qe,
|
|
1120
|
-
...at,
|
|
1121
|
-
/**
|
|
1122
|
-
* Button icon
|
|
1123
|
-
*/
|
|
1124
|
-
icon: [String, Object],
|
|
1125
|
-
/**
|
|
1126
|
-
* Button icon position
|
|
1127
|
-
*/
|
|
1128
|
-
iconPosition: {
|
|
1129
|
-
type: String,
|
|
1130
|
-
default: fe.left,
|
|
1131
|
-
validator: (t) => Object.values(fe).includes(t)
|
|
1132
|
-
},
|
|
1133
|
-
/**
|
|
1134
|
-
* Loading icon
|
|
1135
|
-
*/
|
|
1136
|
-
loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
|
|
1137
|
-
toggle: {
|
|
1138
|
-
type: Boolean,
|
|
1139
|
-
default: !1
|
|
1140
|
-
},
|
|
1141
|
-
modelValue: String
|
|
1142
|
-
};
|
|
1143
|
-
function ba(t, l) {
|
|
1144
|
-
var m;
|
|
1145
|
-
const { group: e, isInGroup: s, getGroupOrLocalRef: o } = tt(qt), {
|
|
1146
|
-
id: u,
|
|
1147
|
-
iconPosition: d,
|
|
1148
|
-
icon: c,
|
|
1149
|
-
label: v,
|
|
1150
|
-
pressed: p,
|
|
1151
|
-
modifiers: r
|
|
1152
|
-
} = G(t), i = o("modelValue", t, l), b = o("disabled", t), _ = o("toggle", t), k = o(
|
|
1153
|
-
"unselectable",
|
|
1154
|
-
t
|
|
1155
|
-
), A = ((m = e == null ? void 0 : e.value) == null ? void 0 : m.multiple) ?? N(!1), y = n(() => {
|
|
1156
|
-
var D;
|
|
1157
|
-
const I = r != null && r.value ? Array.isArray(r.value) ? r.value : r.value.split(" ") : [], O = (D = e == null ? void 0 : e.value.itemModifiers) != null && D.value ? Array.isArray(e.value.itemModifiers.value) ? e.value.itemModifiers.value : e.value.itemModifiers.value.split(" ") : [];
|
|
1158
|
-
return [...I, ...O];
|
|
1159
|
-
});
|
|
1160
|
-
return {
|
|
1161
|
-
// group props
|
|
1162
|
-
group: e,
|
|
1163
|
-
isInGroup: s,
|
|
1164
|
-
modelValue: i,
|
|
1165
|
-
disabled: b,
|
|
1166
|
-
toggle: _,
|
|
1167
|
-
unselectable: k,
|
|
1168
|
-
multiple: A,
|
|
1169
|
-
// local props
|
|
1170
|
-
id: u,
|
|
1171
|
-
modifiers: y,
|
|
1172
|
-
pressed: p,
|
|
1173
|
-
iconPosition: d,
|
|
1174
|
-
icon: c,
|
|
1175
|
-
label: v
|
|
1176
|
-
};
|
|
1177
|
-
}
|
|
1178
|
-
const Le = (t) => n(() => String((t == null ? void 0 : t.value) || Gt())), ha = {
|
|
1179
|
-
key: 1,
|
|
1180
|
-
class: "vv-button__label"
|
|
1181
|
-
}, ya = {
|
|
1182
|
-
key: 1,
|
|
1183
|
-
class: "vv-button__label"
|
|
1184
|
-
}, ga = {
|
|
1185
|
-
name: "VvButton"
|
|
1186
|
-
}, ys = /* @__PURE__ */ j({
|
|
1187
|
-
...ga,
|
|
1188
|
-
props: ma,
|
|
1189
|
-
emits: pa,
|
|
1190
|
-
setup(t, { expose: l, emit: e }) {
|
|
1191
|
-
const s = t, o = yt(), u = Ae(), {
|
|
1192
|
-
id: d,
|
|
1193
|
-
modifiers: c,
|
|
1194
|
-
iconPosition: v,
|
|
1195
|
-
icon: p,
|
|
1196
|
-
label: r,
|
|
1197
|
-
modelValue: i,
|
|
1198
|
-
disabled: b,
|
|
1199
|
-
toggle: _,
|
|
1200
|
-
unselectable: k
|
|
1201
|
-
} = ba(s, e), A = Le(d), y = n(() => (o == null ? void 0 : o.name) || A.value), m = N(null), I = n(() => {
|
|
1202
|
-
var C;
|
|
1203
|
-
return (C = m.value) == null ? void 0 : C.$el;
|
|
1204
|
-
});
|
|
1205
|
-
l({ $el: I });
|
|
1206
|
-
const O = n(() => _.value ? Array.isArray(i.value) ? we(y.value, i.value) : Pe(y.value, i.value) : s.pressed), D = X(
|
|
1207
|
-
"vv-button",
|
|
1208
|
-
c,
|
|
1209
|
-
n(() => ({
|
|
1210
|
-
reverse: [fe.right, fe.bottom].includes(v.value),
|
|
1211
|
-
column: [fe.top, fe.bottom].includes(v.value),
|
|
1212
|
-
"icon-only": Boolean(
|
|
1213
|
-
(p == null ? void 0 : p.value) && !(r != null && r.value) && !u.default
|
|
1214
|
-
)
|
|
1215
|
-
}))
|
|
1216
|
-
), L = n(
|
|
1217
|
-
() => typeof (p == null ? void 0 : p.value) == "string" ? { name: p == null ? void 0 : p.value } : p == null ? void 0 : p.value
|
|
1218
|
-
), M = () => {
|
|
1219
|
-
if (_.value) {
|
|
1220
|
-
if (Array.isArray(i.value)) {
|
|
1221
|
-
if (we(y.value, i.value)) {
|
|
1222
|
-
k.value && (i.value = i.value.filter(
|
|
1223
|
-
(C) => C !== y.value
|
|
1224
|
-
));
|
|
1225
|
-
return;
|
|
1226
|
-
}
|
|
1227
|
-
i.value.push(y.value);
|
|
1228
|
-
return;
|
|
1229
|
-
}
|
|
1230
|
-
if (Pe(y.value, i.value) && k.value) {
|
|
1231
|
-
i.value = void 0;
|
|
1232
|
-
return;
|
|
1233
|
-
}
|
|
1234
|
-
i.value = y.value;
|
|
1235
|
-
}
|
|
1236
|
-
};
|
|
1237
|
-
return (C, se) => (f(), H(fa, R({
|
|
1238
|
-
disabled: a(b),
|
|
1239
|
-
pressed: a(O),
|
|
1240
|
-
active: C.active,
|
|
1241
|
-
type: C.type,
|
|
1242
|
-
to: C.to,
|
|
1243
|
-
href: C.href,
|
|
1244
|
-
target: C.target,
|
|
1245
|
-
rel: C.rel
|
|
1246
|
-
}, {
|
|
1247
|
-
id: a(A),
|
|
1248
|
-
ref_key: "element",
|
|
1249
|
-
ref: m,
|
|
1250
|
-
class: a(D),
|
|
1251
|
-
onClick: M
|
|
1252
|
-
}), {
|
|
1253
|
-
default: te(() => [
|
|
1254
|
-
V(C.$slots, "default", {}, () => [
|
|
1255
|
-
C.loading ? V(C.$slots, "loading", { key: 0 }, () => [
|
|
1256
|
-
C.loadingIcon ? (f(), H(ee, {
|
|
1257
|
-
key: 0,
|
|
1258
|
-
class: "vv-button__loading-icon",
|
|
1259
|
-
name: C.loadingIcon
|
|
1260
|
-
}, null, 8, ["name"])) : w("", !0),
|
|
1261
|
-
C.loadingLabel ? (f(), g("span", ha, T(C.loadingLabel), 1)) : w("", !0)
|
|
1262
|
-
]) : (f(), g(ie, { key: 1 }, [
|
|
1263
|
-
V(C.$slots, "before"),
|
|
1264
|
-
a(p) ? (f(), H(ee, R({
|
|
1265
|
-
key: 0,
|
|
1266
|
-
class: "vv-button__icon"
|
|
1267
|
-
}, a(L)), null, 16)) : w("", !0),
|
|
1268
|
-
a(r) ? (f(), g("span", ya, [
|
|
1269
|
-
V(C.$slots, "label", {}, () => [
|
|
1270
|
-
Y(T(a(r)), 1)
|
|
1271
|
-
])
|
|
1272
|
-
])) : w("", !0),
|
|
1273
|
-
V(C.$slots, "after")
|
|
1274
|
-
], 64))
|
|
1275
|
-
])
|
|
1276
|
-
]),
|
|
1277
|
-
_: 3
|
|
1278
|
-
}, 16, ["id", "class"]));
|
|
92
|
+
addCollection(collection, providerName = this._iconsProvider) {
|
|
93
|
+
this._iconsCollections.push(collection);
|
|
94
|
+
return addCollection(collection, providerName);
|
|
1279
95
|
}
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
...De,
|
|
1283
|
-
...qe,
|
|
1284
|
-
/**
|
|
1285
|
-
* String or String[] of css classes (modifiers) that will be provided to each button'
|
|
1286
|
-
*/
|
|
1287
|
-
itemModifiers: { type: [String, Array], default: void 0 },
|
|
1288
|
-
toggle: { type: Boolean, default: !1 },
|
|
1289
|
-
multiple: { type: Boolean, default: !1 },
|
|
1290
|
-
modelValue: { type: [String, Array], default: void 0 }
|
|
1291
|
-
}, Sa = ["update:modelValue"], Va = {
|
|
1292
|
-
name: "VvButtonGroup"
|
|
1293
|
-
}, gs = /* @__PURE__ */ j({
|
|
1294
|
-
...Va,
|
|
1295
|
-
props: _a,
|
|
1296
|
-
emits: Sa,
|
|
1297
|
-
setup(t, { emit: l }) {
|
|
1298
|
-
const e = t, {
|
|
1299
|
-
disabled: s,
|
|
1300
|
-
toggle: o,
|
|
1301
|
-
modifiers: u,
|
|
1302
|
-
multiple: d,
|
|
1303
|
-
unselectable: c,
|
|
1304
|
-
itemModifiers: v
|
|
1305
|
-
} = G(e);
|
|
1306
|
-
_t(() => {
|
|
1307
|
-
typeof e.modelValue == "string" && d.value && console.warn(
|
|
1308
|
-
"[VvButtonGroup]: modelValue is a string but multiple is true."
|
|
1309
|
-
);
|
|
1310
|
-
});
|
|
1311
|
-
const p = n({
|
|
1312
|
-
get: () => d.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue,
|
|
1313
|
-
set: (i) => (i !== void 0 && (Array.isArray(e.modelValue) || d.value) && !Array.isArray(i) && (i = [i]), l("update:modelValue", i))
|
|
1314
|
-
});
|
|
1315
|
-
lt({
|
|
1316
|
-
key: qt,
|
|
1317
|
-
modelValue: p,
|
|
1318
|
-
disabled: s,
|
|
1319
|
-
toggle: o,
|
|
1320
|
-
multiple: d,
|
|
1321
|
-
unselectable: c,
|
|
1322
|
-
itemModifiers: v
|
|
1323
|
-
});
|
|
1324
|
-
const r = X("vv-button-group", u);
|
|
1325
|
-
return (i, b) => (f(), g("div", {
|
|
1326
|
-
class: le(a(r)),
|
|
1327
|
-
role: "group"
|
|
1328
|
-
}, [
|
|
1329
|
-
V(i.$slots, "default")
|
|
1330
|
-
], 2));
|
|
96
|
+
addIcon(name, data) {
|
|
97
|
+
return addIcon(name, data);
|
|
1331
98
|
}
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
modifiers: [String, Array]
|
|
1335
|
-
}, ka = {
|
|
1336
|
-
key: 0,
|
|
1337
|
-
class: "vv-card__header"
|
|
1338
|
-
}, Aa = {
|
|
1339
|
-
key: 1,
|
|
1340
|
-
class: "vv-card__content"
|
|
1341
|
-
}, Ca = {
|
|
1342
|
-
key: 2,
|
|
1343
|
-
class: "vv-card__footer"
|
|
1344
|
-
}, wa = {
|
|
1345
|
-
name: "VvCard"
|
|
1346
|
-
}, _s = /* @__PURE__ */ j({
|
|
1347
|
-
...wa,
|
|
1348
|
-
props: $a,
|
|
1349
|
-
setup(t) {
|
|
1350
|
-
const l = t, { modifiers: e } = G(l), s = X("vv-card", e);
|
|
1351
|
-
return (o, u) => (f(), g("article", {
|
|
1352
|
-
class: le(a(s))
|
|
1353
|
-
}, [
|
|
1354
|
-
o.$slots.header || o.title ? (f(), g("header", ka, [
|
|
1355
|
-
V(o.$slots, "header", {}, () => [
|
|
1356
|
-
Y(T(o.title), 1)
|
|
1357
|
-
])
|
|
1358
|
-
])) : w("", !0),
|
|
1359
|
-
V(o.$slots, "default"),
|
|
1360
|
-
o.$slots.content ? (f(), g("div", Aa, [
|
|
1361
|
-
V(o.$slots, "content")
|
|
1362
|
-
])) : w("", !0),
|
|
1363
|
-
o.$slots.footer ? (f(), g("footer", Ca, [
|
|
1364
|
-
V(o.$slots, "footer")
|
|
1365
|
-
])) : w("", !0)
|
|
1366
|
-
], 2));
|
|
99
|
+
addIconsAPIProvider(provider, customConfig) {
|
|
100
|
+
return addAPIProvider(provider, customConfig);
|
|
1367
101
|
}
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
/**
|
|
1372
|
-
* If true, the input will be indeterminated
|
|
1373
|
-
*/
|
|
1374
|
-
indeterminate: Boolean,
|
|
1375
|
-
/**
|
|
1376
|
-
* Value associated with the unchecked state
|
|
1377
|
-
*/
|
|
1378
|
-
uncheckedValue: [String, Number, Boolean],
|
|
1379
|
-
/**
|
|
1380
|
-
* If true, the input will be displayed as a switch
|
|
1381
|
-
*/
|
|
1382
|
-
switch: Boolean
|
|
1383
|
-
}, Ea = ["click", "update:modelValue", "change", "blur"];
|
|
1384
|
-
function Pa(t, l) {
|
|
1385
|
-
const { group: e, isInGroup: s, getGroupOrLocalRef: o } = tt(Jt), { id: u, switch: d, indeterminate: c } = G(t), v = o("modelValue", t, l), p = o("readonly", t), r = o("disabled", t), i = o("valid", t), b = o("invalid", t);
|
|
1386
|
-
return {
|
|
1387
|
-
// local props
|
|
1388
|
-
id: u,
|
|
1389
|
-
propsSwitch: d,
|
|
1390
|
-
indeterminate: c,
|
|
1391
|
-
// global props
|
|
1392
|
-
group: e,
|
|
1393
|
-
isInGroup: s,
|
|
1394
|
-
modelValue: v,
|
|
1395
|
-
readonly: p,
|
|
1396
|
-
disabled: r,
|
|
1397
|
-
valid: i,
|
|
1398
|
-
invalid: b
|
|
1399
|
-
};
|
|
1400
|
-
}
|
|
1401
|
-
function Je(t) {
|
|
1402
|
-
return Array.isArray(t) ? t.filter((l) => Bl(l)).join(" ") : t;
|
|
1403
|
-
}
|
|
1404
|
-
function Be(t, l) {
|
|
1405
|
-
const {
|
|
1406
|
-
invalid: e,
|
|
1407
|
-
valid: s,
|
|
1408
|
-
hint: o,
|
|
1409
|
-
loading: u
|
|
1410
|
-
} = l, {
|
|
1411
|
-
hintLabel: d,
|
|
1412
|
-
modelValue: c,
|
|
1413
|
-
valid: v,
|
|
1414
|
-
validLabel: p,
|
|
1415
|
-
invalid: r,
|
|
1416
|
-
invalidLabel: i,
|
|
1417
|
-
...b
|
|
1418
|
-
} = G(t), _ = Ze(b, "loading"), k = Ze(b, "loadingLabel"), A = n(() => r.value ? !!(r.value && e || i != null && i.value && Array.isArray(i.value) && i.value.length > 0 || i != null && i.value && !ge(i)) : !1), y = n(
|
|
1419
|
-
() => !!(d && d.value || o)
|
|
1420
|
-
), m = n(
|
|
1421
|
-
() => !!(p && p.value || s)
|
|
1422
|
-
), I = n(
|
|
1423
|
-
() => !!(_ != null && _.value && u || _ != null && _.value && (k != null && k.value))
|
|
1424
|
-
), O = n(
|
|
1425
|
-
() => y.value || m.value || A.value || I.value
|
|
1426
|
-
);
|
|
1427
|
-
return {
|
|
1428
|
-
hasInvalid: A,
|
|
1429
|
-
hasHint: y,
|
|
1430
|
-
hasValid: m,
|
|
1431
|
-
hasLoading: I,
|
|
1432
|
-
HintSlot: {
|
|
1433
|
-
name: "HintSlot",
|
|
1434
|
-
props: {
|
|
1435
|
-
params: {
|
|
1436
|
-
type: Object,
|
|
1437
|
-
default: () => ({})
|
|
1438
|
-
}
|
|
1439
|
-
},
|
|
1440
|
-
setup(D) {
|
|
1441
|
-
const L = n(() => {
|
|
1442
|
-
const M = $l({
|
|
1443
|
-
hintLabel: d,
|
|
1444
|
-
modelValue: c,
|
|
1445
|
-
valid: v,
|
|
1446
|
-
validLabel: p,
|
|
1447
|
-
invalid: r,
|
|
1448
|
-
invalidLabel: i,
|
|
1449
|
-
loading: _,
|
|
1450
|
-
loadingLabel: k,
|
|
1451
|
-
...D.params
|
|
1452
|
-
});
|
|
1453
|
-
return r != null && r.value ? (e == null ? void 0 : e(M)) || Je(i == null ? void 0 : i.value) || (d == null ? void 0 : d.value) : v != null && v.value ? (s == null ? void 0 : s(M)) || Je(p == null ? void 0 : p.value) || (d == null ? void 0 : d.value) : _ != null && _.value ? (u == null ? void 0 : u(M)) || Je(k == null ? void 0 : k.value) || (d == null ? void 0 : d.value) : (o == null ? void 0 : o(M)) || Je(d == null ? void 0 : d.value) || (d == null ? void 0 : d.value);
|
|
1454
|
-
});
|
|
1455
|
-
return {
|
|
1456
|
-
isVisible: O,
|
|
1457
|
-
hasInvalid: A,
|
|
1458
|
-
hasValid: m,
|
|
1459
|
-
hintContent: L
|
|
1460
|
-
};
|
|
1461
|
-
},
|
|
1462
|
-
render() {
|
|
1463
|
-
if (this.isVisible)
|
|
1464
|
-
return be(
|
|
1465
|
-
"small",
|
|
1466
|
-
{
|
|
1467
|
-
role: this.hasInvalid ? "alert" : this.hasValid ? "status" : void 0
|
|
1468
|
-
},
|
|
1469
|
-
this.hintContent
|
|
1470
|
-
);
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
};
|
|
1474
|
-
}
|
|
1475
|
-
const Oa = ["for"], Da = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], La = {
|
|
1476
|
-
name: "VvCheckbox"
|
|
1477
|
-
}, Ba = /* @__PURE__ */ j({
|
|
1478
|
-
...La,
|
|
1479
|
-
props: Ia,
|
|
1480
|
-
emits: Ea,
|
|
1481
|
-
setup(t, { emit: l }) {
|
|
1482
|
-
const e = t, s = Ae(), {
|
|
1483
|
-
id: o,
|
|
1484
|
-
disabled: u,
|
|
1485
|
-
readonly: d,
|
|
1486
|
-
valid: c,
|
|
1487
|
-
invalid: v,
|
|
1488
|
-
propsSwitch: p,
|
|
1489
|
-
modelValue: r,
|
|
1490
|
-
indeterminate: i,
|
|
1491
|
-
isInGroup: b
|
|
1492
|
-
} = Pa(e, l), _ = Le(o), k = n(() => m.value ? -1 : e.tabindex), A = N(), y = n(
|
|
1493
|
-
() => e.uncheckedValue !== void 0 && !b.value
|
|
1494
|
-
), m = n(() => u.value || d.value), I = n(() => {
|
|
1495
|
-
if (v.value === !0)
|
|
1496
|
-
return !0;
|
|
1497
|
-
if (c.value === !0)
|
|
1498
|
-
return !1;
|
|
1499
|
-
}), O = n(() => y.value ? r.value === e.value : Array.isArray(r.value) ? we(e.value, r.value) : Pe(e.value, r.value)), D = n(() => !!(i.value || !O.value && y.value && e.uncheckedValue !== r.value)), L = n(() => {
|
|
1500
|
-
if (!y.value)
|
|
1501
|
-
return ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0;
|
|
1502
|
-
}), M = n({
|
|
1503
|
-
get() {
|
|
1504
|
-
return O.value;
|
|
1505
|
-
},
|
|
1506
|
-
set(W) {
|
|
1507
|
-
if (y.value)
|
|
1508
|
-
r.value = W ? e.value : e.uncheckedValue;
|
|
1509
|
-
else if (Array.isArray(r.value) || b.value) {
|
|
1510
|
-
const F = new Set(
|
|
1511
|
-
Array.isArray(r.value) ? r.value : r.value !== void 0 ? [r.value] : []
|
|
1512
|
-
);
|
|
1513
|
-
W ? F.add(e.value) : F.delete(e.value), r.value = [...F];
|
|
1514
|
-
} else
|
|
1515
|
-
r.value = W ? e.value : void 0;
|
|
1516
|
-
l("change", W);
|
|
1517
|
-
}
|
|
1518
|
-
}), { modifiers: C } = G(e), se = X(
|
|
1519
|
-
"vv-checkbox",
|
|
1520
|
-
C,
|
|
1521
|
-
n(() => ({
|
|
1522
|
-
switch: p.value,
|
|
1523
|
-
valid: c.value,
|
|
1524
|
-
invalid: v.value,
|
|
1525
|
-
disabled: u.value,
|
|
1526
|
-
readonly: d.value,
|
|
1527
|
-
indeterminate: i.value
|
|
1528
|
-
}))
|
|
1529
|
-
);
|
|
1530
|
-
_t(() => {
|
|
1531
|
-
y.value && Array.isArray(r.value) && console.warn(
|
|
1532
|
-
"[VvCheckbox] The model value is an array but the component is in binary mode."
|
|
1533
|
-
);
|
|
1534
|
-
}), ve(
|
|
1535
|
-
() => D.value,
|
|
1536
|
-
(W) => {
|
|
1537
|
-
W ? A.value.indeterminate = !0 : A.value.indeterminate = !1;
|
|
1538
|
-
}
|
|
1539
|
-
), ml(() => {
|
|
1540
|
-
D.value && (A.value.indeterminate = !0);
|
|
102
|
+
fetchIcon(src, options = { cache: "force-cache" }) {
|
|
103
|
+
return new Promise((resolve, reject) => {
|
|
104
|
+
fetch(src, { ...this._fetchOptions, ...options }).catch((e) => reject(e)).then((response) => response == null ? void 0 : response.text()).then((svg) => resolve(svg));
|
|
1541
105
|
});
|
|
1542
|
-
const { HintSlot: P } = Be(e, s);
|
|
1543
|
-
return (W, F) => (f(), g("label", {
|
|
1544
|
-
class: le(a(se)),
|
|
1545
|
-
for: a(_)
|
|
1546
|
-
}, [
|
|
1547
|
-
Oe(x("input", {
|
|
1548
|
-
id: a(_),
|
|
1549
|
-
ref_key: "input",
|
|
1550
|
-
ref: A,
|
|
1551
|
-
"onUpdate:modelValue": F[0] || (F[0] = (ue) => Ee(M) ? M.value = ue : null),
|
|
1552
|
-
type: "checkbox",
|
|
1553
|
-
class: "vv-checkbox__input",
|
|
1554
|
-
name: W.name,
|
|
1555
|
-
disabled: a(m),
|
|
1556
|
-
value: a(L),
|
|
1557
|
-
tabindex: a(k),
|
|
1558
|
-
"aria-invalid": a(I)
|
|
1559
|
-
}, null, 8, Da), [
|
|
1560
|
-
[bl, a(M)]
|
|
1561
|
-
]),
|
|
1562
|
-
V(W.$slots, "default", { value: a(r) }, () => [
|
|
1563
|
-
Y(T(W.label), 1)
|
|
1564
|
-
]),
|
|
1565
|
-
pe(a(P), {
|
|
1566
|
-
class: "vv-checkbox__hint",
|
|
1567
|
-
params: { value: a(r) }
|
|
1568
|
-
}, null, 8, ["params"])
|
|
1569
|
-
], 10, Oa));
|
|
1570
106
|
}
|
|
1571
|
-
}), Ta = sl, Na = ["update:modelValue", "change"];
|
|
1572
|
-
function rt(t) {
|
|
1573
|
-
const { options: l, labelKey: e, valueKey: s, disabledKey: o } = G(t);
|
|
1574
|
-
return {
|
|
1575
|
-
options: l,
|
|
1576
|
-
getOptionLabel: (v) => typeof v != "object" && v !== null ? v : typeof e.value == "function" ? e.value(v) : v[e.value],
|
|
1577
|
-
getOptionValue: (v) => typeof v != "object" && v !== null ? v : typeof s.value == "function" ? s.value(v) : v[s.value],
|
|
1578
|
-
getOptionDisabled: (v) => typeof v != "object" && v !== null ? !1 : typeof o.value == "function" ? o.value(v) : v[o.value]
|
|
1579
|
-
};
|
|
1580
107
|
}
|
|
1581
|
-
const
|
|
1582
|
-
name: "VvCheckboxGroup"
|
|
1583
|
-
}, Ss = /* @__PURE__ */ j({
|
|
1584
|
-
...xa,
|
|
1585
|
-
props: Ta,
|
|
1586
|
-
emits: Na,
|
|
1587
|
-
setup(t, { emit: l }) {
|
|
1588
|
-
const e = t, s = Ae(), o = et(e, "modelValue", l), { disabled: u, readonly: d, vertical: c, valid: v, invalid: p, modifiers: r } = G(e);
|
|
1589
|
-
lt({
|
|
1590
|
-
key: Jt,
|
|
1591
|
-
modelValue: o,
|
|
1592
|
-
disabled: u,
|
|
1593
|
-
readonly: d,
|
|
1594
|
-
valid: v,
|
|
1595
|
-
invalid: p
|
|
1596
|
-
});
|
|
1597
|
-
const { getOptionLabel: i, getOptionValue: b } = rt(e), _ = X(
|
|
1598
|
-
"vv-checkbox-group",
|
|
1599
|
-
r,
|
|
1600
|
-
n(() => ({
|
|
1601
|
-
disabled: u.value,
|
|
1602
|
-
readonly: d.value,
|
|
1603
|
-
horizontal: !c.value,
|
|
1604
|
-
valid: v.value,
|
|
1605
|
-
invalid: p.value
|
|
1606
|
-
}))
|
|
1607
|
-
), k = (y, m) => ({
|
|
1608
|
-
id: `${e.name}_opt${m}`,
|
|
1609
|
-
name: e.name,
|
|
1610
|
-
label: i(y),
|
|
1611
|
-
value: b(y)
|
|
1612
|
-
}), { HintSlot: A } = Be(e, s);
|
|
1613
|
-
return (y, m) => (f(), g("fieldset", {
|
|
1614
|
-
class: le(a(_))
|
|
1615
|
-
}, [
|
|
1616
|
-
y.label ? (f(), g("legend", {
|
|
1617
|
-
key: 0,
|
|
1618
|
-
textContent: T(y.label)
|
|
1619
|
-
}, null, 8, Ra)) : w("", !0),
|
|
1620
|
-
x("div", Ha, [
|
|
1621
|
-
y.options.length > 0 ? (f(!0), g(ie, { key: 0 }, Ne(y.options, (I, O) => (f(), H(Ba, R({ key: O }, k(I, O)), null, 16))), 128)) : V(y.$slots, "default", { key: 1 })
|
|
1622
|
-
]),
|
|
1623
|
-
pe(a(A), { class: "vv-checkbox-group__hint" })
|
|
1624
|
-
], 2));
|
|
1625
|
-
}
|
|
1626
|
-
}), Ma = [
|
|
1627
|
-
"update:modelValue",
|
|
1628
|
-
"change:search",
|
|
1629
|
-
"focus",
|
|
1630
|
-
"blur"
|
|
1631
|
-
], Ga = {
|
|
1632
|
-
...nt,
|
|
1633
|
-
...ot,
|
|
1634
|
-
...Ue,
|
|
1635
|
-
...Fe,
|
|
1636
|
-
...ze,
|
|
1637
|
-
...at,
|
|
1638
|
-
...De,
|
|
1639
|
-
...Ke,
|
|
1640
|
-
...me,
|
|
1641
|
-
...kt,
|
|
1642
|
-
...At,
|
|
1643
|
-
...Ct,
|
|
1644
|
-
...qe,
|
|
1645
|
-
...ht,
|
|
1646
|
-
...xe,
|
|
1647
|
-
/**
|
|
1648
|
-
* modelValue can be a string, number, boolean, object or array of string, number, boolean, object
|
|
1649
|
-
*/
|
|
1650
|
-
modelValue: {
|
|
1651
|
-
type: [String, Number, Boolean, Object, Array],
|
|
1652
|
-
default: void 0
|
|
1653
|
-
},
|
|
1654
|
-
/**
|
|
1655
|
-
* Label for no search results
|
|
1656
|
-
*/
|
|
1657
|
-
noResultsLabel: { type: String, default: "No results" },
|
|
1658
|
-
/**
|
|
1659
|
-
* Label for no options available
|
|
1660
|
-
*/
|
|
1661
|
-
noOptionsLabel: { type: String, default: "No options available" },
|
|
1662
|
-
/**
|
|
1663
|
-
* Label for selected option hint
|
|
1664
|
-
*/
|
|
1665
|
-
selectedHintLabel: { type: String, default: "Selected" },
|
|
1666
|
-
/**
|
|
1667
|
-
* Label for deselect action button
|
|
1668
|
-
*/
|
|
1669
|
-
deselectActionLabel: { type: String, default: "Deselect" },
|
|
1670
|
-
/**
|
|
1671
|
-
* Label for select option hint
|
|
1672
|
-
*/
|
|
1673
|
-
selectHintLabel: { type: String, default: "Press enter to select" },
|
|
1674
|
-
/**
|
|
1675
|
-
* Label for deselected option hint
|
|
1676
|
-
*/
|
|
1677
|
-
deselectHintLabel: { type: String, default: "Press enter to remove" },
|
|
1678
|
-
/**
|
|
1679
|
-
* Select input placeholder
|
|
1680
|
-
*/
|
|
1681
|
-
placeholder: String,
|
|
1682
|
-
/**
|
|
1683
|
-
* Use input text to search on options
|
|
1684
|
-
*/
|
|
1685
|
-
searchable: Boolean,
|
|
1686
|
-
/**
|
|
1687
|
-
* On searchable select is the input search placeholder
|
|
1688
|
-
*/
|
|
1689
|
-
searchPlaceholder: {
|
|
1690
|
-
type: String,
|
|
1691
|
-
default: "Search..."
|
|
1692
|
-
},
|
|
108
|
+
const VolverPlugin = {
|
|
1693
109
|
/**
|
|
1694
|
-
*
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
type: [Number, String],
|
|
1698
|
-
default: 0
|
|
1699
|
-
},
|
|
1700
|
-
/**
|
|
1701
|
-
* Manage modelValue as string[] or object[]
|
|
1702
|
-
*/
|
|
1703
|
-
multiple: Boolean,
|
|
1704
|
-
/**
|
|
1705
|
-
* The max number of selected values
|
|
1706
|
-
*/
|
|
1707
|
-
maxValues: [Number, String],
|
|
1708
|
-
/**
|
|
1709
|
-
* The select label separator visible to the user
|
|
1710
|
-
*/
|
|
1711
|
-
separator: { type: String, default: ", " },
|
|
1712
|
-
/**
|
|
1713
|
-
* Show native select
|
|
1714
|
-
*/
|
|
1715
|
-
native: Boolean,
|
|
1716
|
-
/**
|
|
1717
|
-
* Show badges
|
|
1718
|
-
*/
|
|
1719
|
-
badges: Boolean,
|
|
1720
|
-
/**
|
|
1721
|
-
* Badge modifiers
|
|
1722
|
-
*/
|
|
1723
|
-
badgeModifiers: {
|
|
1724
|
-
type: [String, Array],
|
|
1725
|
-
default: "action sm"
|
|
1726
|
-
},
|
|
1727
|
-
/**
|
|
1728
|
-
* Set dropdown width to the same as the trigger
|
|
1729
|
-
*/
|
|
1730
|
-
triggerWidth: {
|
|
1731
|
-
...ht.triggerWidth,
|
|
1732
|
-
default: !0
|
|
1733
|
-
},
|
|
1734
|
-
/**
|
|
1735
|
-
* Dropdown modifiers
|
|
1736
|
-
*/
|
|
1737
|
-
dropdownModifiers: {
|
|
1738
|
-
type: [String, Array]
|
|
1739
|
-
},
|
|
1740
|
-
/**
|
|
1741
|
-
* Open dropdown on focus
|
|
1742
|
-
*/
|
|
1743
|
-
autoOpen: Boolean,
|
|
1744
|
-
/**
|
|
1745
|
-
* Close dropdown on select (not multiple)
|
|
1746
|
-
*/
|
|
1747
|
-
autoClose: Boolean
|
|
1748
|
-
}, ja = {
|
|
1749
|
-
...st,
|
|
1750
|
-
...me,
|
|
1751
|
-
...ht,
|
|
1752
|
-
/**
|
|
1753
|
-
* Show / hide dropdown programmatically
|
|
1754
|
-
*/
|
|
1755
|
-
modelValue: {
|
|
1756
|
-
type: Boolean,
|
|
1757
|
-
default: void 0
|
|
1758
|
-
},
|
|
1759
|
-
/**
|
|
1760
|
-
* Dropdown trigger element
|
|
1761
|
-
*/
|
|
1762
|
-
reference: {
|
|
1763
|
-
type: Object,
|
|
1764
|
-
default: null
|
|
1765
|
-
},
|
|
1766
|
-
/**
|
|
1767
|
-
* Dropdown role
|
|
110
|
+
* Vue.use() hook
|
|
111
|
+
* @param {App} Vue
|
|
112
|
+
* @param {Object} options
|
|
1768
113
|
*/
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
id: l,
|
|
1778
|
-
expanded: e,
|
|
1779
|
-
aria: s
|
|
1780
|
-
}) {
|
|
1781
|
-
const o = El(), u = j({
|
|
1782
|
-
name: "VvDropdownTriggerProvider",
|
|
1783
|
-
provide() {
|
|
1784
|
-
return {
|
|
1785
|
-
[Qt]: {
|
|
1786
|
-
reference: t,
|
|
1787
|
-
id: l,
|
|
1788
|
-
expanded: e,
|
|
1789
|
-
aria: s,
|
|
1790
|
-
bus: o
|
|
1791
|
-
}
|
|
1792
|
-
};
|
|
1793
|
-
},
|
|
1794
|
-
setup() {
|
|
1795
|
-
return {};
|
|
1796
|
-
},
|
|
1797
|
-
render() {
|
|
1798
|
-
var d, c;
|
|
1799
|
-
return be(ie, {}, (c = (d = this.$slots).default) == null ? void 0 : c.call(d));
|
|
1800
|
-
}
|
|
1801
|
-
});
|
|
1802
|
-
return {
|
|
1803
|
-
bus: o,
|
|
1804
|
-
component: u
|
|
1805
|
-
};
|
|
1806
|
-
}
|
|
1807
|
-
function Ua({
|
|
1808
|
-
role: t,
|
|
1809
|
-
expanded: l
|
|
1810
|
-
}) {
|
|
1811
|
-
const e = n(
|
|
1812
|
-
() => t.value === je.listbox ? mt.option : mt.presentation
|
|
1813
|
-
);
|
|
1814
|
-
return gt(Zt, {
|
|
1815
|
-
role: e,
|
|
1816
|
-
expanded: l
|
|
1817
|
-
}), { itemRole: e };
|
|
1818
|
-
}
|
|
1819
|
-
function Fa({
|
|
1820
|
-
expanded: t
|
|
1821
|
-
}) {
|
|
1822
|
-
gt(el, {
|
|
1823
|
-
role: Ft.menuitem,
|
|
1824
|
-
expanded: t
|
|
1825
|
-
});
|
|
1826
|
-
}
|
|
1827
|
-
const Ka = ["id", "tabindex", "role", "aria-labelledby"], za = {
|
|
1828
|
-
name: "VvDropdown",
|
|
1829
|
-
inheritAttrs: !1
|
|
1830
|
-
}, il = /* @__PURE__ */ j({
|
|
1831
|
-
...za,
|
|
1832
|
-
props: ja,
|
|
1833
|
-
emits: ["update:modelValue"],
|
|
1834
|
-
setup(t, { emit: l }) {
|
|
1835
|
-
const e = t, { id: s } = G(e), o = Le(s), u = yt(), d = N("auto"), c = N("auto"), v = N(null), p = N(null), r = N(null), i = N(null), b = n({
|
|
1836
|
-
get: () => e.reference ?? v.value,
|
|
1837
|
-
set: (h) => {
|
|
1838
|
-
v.value = h;
|
|
1839
|
-
}
|
|
1840
|
-
}), _ = n(() => {
|
|
1841
|
-
const h = [];
|
|
1842
|
-
if (e.autoPlacement ? typeof e.autoPlacement == "boolean" ? h.push(Et()) : h.push(
|
|
1843
|
-
Et(e.autoPlacement)
|
|
1844
|
-
) : e.flip && (typeof e.flip == "boolean" ? h.push(Pt()) : h.push(Pt(e.flip))), e.shift && (typeof e.shift == "boolean" ? h.push(Ot()) : h.push(Ot(e.shift))), e.size) {
|
|
1845
|
-
const U = ({
|
|
1846
|
-
availableWidth: ce,
|
|
1847
|
-
availableHeight: $e
|
|
1848
|
-
}) => {
|
|
1849
|
-
d.value = `${ce}px`, c.value = `${$e}px`;
|
|
1850
|
-
};
|
|
1851
|
-
typeof e.size == "boolean" ? h.push(
|
|
1852
|
-
Dt({
|
|
1853
|
-
apply: U
|
|
1854
|
-
})
|
|
1855
|
-
) : h.push(
|
|
1856
|
-
Dt({
|
|
1857
|
-
...e.size,
|
|
1858
|
-
apply: U
|
|
1859
|
-
})
|
|
1860
|
-
);
|
|
1861
|
-
}
|
|
1862
|
-
return e.offset && (h.push(ct(Number(e.offset))), ["string", "number"].includes(typeof e.offset) ? h.push(ct(Number(e.offset))) : h.push(ct(e.offset))), e.arrow && h.push(
|
|
1863
|
-
Cl({
|
|
1864
|
-
element: r
|
|
1865
|
-
})
|
|
1866
|
-
), h;
|
|
1867
|
-
}), { x: k, y: A, strategy: y, middlewareData: m, placement: I } = wl(
|
|
1868
|
-
b,
|
|
1869
|
-
p,
|
|
1870
|
-
{
|
|
1871
|
-
whileElementsMounted: Il,
|
|
1872
|
-
placement: e.placement,
|
|
1873
|
-
middleware: _
|
|
1874
|
-
}
|
|
1875
|
-
), O = n(() => ({
|
|
1876
|
-
position: y.value,
|
|
1877
|
-
top: `${A.value ?? 0}px`,
|
|
1878
|
-
left: `${k.value ?? 0}px`,
|
|
1879
|
-
maxWidth: d.value,
|
|
1880
|
-
maxHeight: c.value,
|
|
1881
|
-
width: e.triggerWidth && b.value ? `${b.value.offsetWidth}px` : void 0
|
|
1882
|
-
})), D = n(() => I.value.split("-")[0]), L = n(
|
|
1883
|
-
() => ({
|
|
1884
|
-
top: "bottom",
|
|
1885
|
-
right: "left",
|
|
1886
|
-
bottom: "top",
|
|
1887
|
-
left: "right"
|
|
1888
|
-
})[D.value] ?? "bottom"
|
|
1889
|
-
), M = n(() => {
|
|
1890
|
-
var h, U, ce, $e;
|
|
1891
|
-
return ["bottom", "top"].includes(L.value) ? {
|
|
1892
|
-
right: `${((h = m.value.arrow) == null ? void 0 : h.x) ?? 0}px`,
|
|
1893
|
-
[L.value]: `${-(((U = r.value) == null ? void 0 : U.offsetWidth) ?? 0) / 2}px`
|
|
1894
|
-
} : {
|
|
1895
|
-
top: `${((ce = m.value.arrow) == null ? void 0 : ce.y) ?? 0}px`,
|
|
1896
|
-
[L.value]: `${-((($e = r.value) == null ? void 0 : $e.offsetWidth) ?? 0) / 2}px`
|
|
1897
|
-
};
|
|
1898
|
-
}), C = et(e, "modelValue", l), se = N(!1), P = n({
|
|
1899
|
-
get: () => C.value ?? se.value,
|
|
1900
|
-
set: (h) => {
|
|
1901
|
-
if (C.value === void 0) {
|
|
1902
|
-
se.value = h;
|
|
1903
|
-
return;
|
|
1904
|
-
}
|
|
1905
|
-
C.value = h;
|
|
1906
|
-
}
|
|
1907
|
-
}), W = () => {
|
|
1908
|
-
P.value = !0;
|
|
1909
|
-
}, F = () => {
|
|
1910
|
-
P.value = !1;
|
|
1911
|
-
}, ue = () => {
|
|
1912
|
-
P.value = !P.value;
|
|
1913
|
-
}, he = (h) => {
|
|
1914
|
-
b.value = h;
|
|
1915
|
-
};
|
|
1916
|
-
ve(P, (h) => {
|
|
1917
|
-
h && e.autofocusFirst && Xe(() => {
|
|
1918
|
-
const U = ae(
|
|
1919
|
-
p.value
|
|
114
|
+
install(app, options) {
|
|
115
|
+
const volver = new Volver(options);
|
|
116
|
+
app.config.globalProperties.$vv = volver;
|
|
117
|
+
if (options.components) {
|
|
118
|
+
Object.entries(options.components).forEach(([name, component]) => {
|
|
119
|
+
app.component(
|
|
120
|
+
name,
|
|
121
|
+
useDefaultProps(component, options.defaults)
|
|
1920
122
|
);
|
|
1921
|
-
U.length > 0 && U[0].focus();
|
|
1922
123
|
});
|
|
1923
|
-
}), jt(
|
|
1924
|
-
p,
|
|
1925
|
-
() => {
|
|
1926
|
-
e.autoClose && (P.value = !1);
|
|
1927
|
-
},
|
|
1928
|
-
{ ignore: [b] }
|
|
1929
|
-
);
|
|
1930
|
-
const ye = n(() => {
|
|
1931
|
-
var h;
|
|
1932
|
-
return ((h = b.value) == null ? void 0 : h.getAttribute("id")) ?? void 0;
|
|
1933
|
-
}), ne = n(() => ({
|
|
1934
|
-
"aria-controls": o.value,
|
|
1935
|
-
"aria-haspopup": !0,
|
|
1936
|
-
"aria-expanded": P.value
|
|
1937
|
-
})), { component: de, bus: _e } = Wa({
|
|
1938
|
-
reference: b,
|
|
1939
|
-
id: o,
|
|
1940
|
-
expanded: P,
|
|
1941
|
-
aria: ne
|
|
1942
|
-
});
|
|
1943
|
-
_e.on("click", ue);
|
|
1944
|
-
const { role: re, modifiers: Ve } = G(e), { itemRole: J } = Ua({ role: re, expanded: P }), B = X(
|
|
1945
|
-
"vv-dropdown",
|
|
1946
|
-
Ve,
|
|
1947
|
-
n(() => ({
|
|
1948
|
-
arrow: e.arrow
|
|
1949
|
-
}))
|
|
1950
|
-
), { focused: Q } = Vt(p);
|
|
1951
|
-
function ae(h) {
|
|
1952
|
-
return h ? [
|
|
1953
|
-
...h.querySelectorAll(
|
|
1954
|
-
'a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])'
|
|
1955
|
-
)
|
|
1956
|
-
].filter(
|
|
1957
|
-
(U) => !U.hasAttribute("disabled") && !U.getAttribute("aria-hidden")
|
|
1958
|
-
) : [];
|
|
1959
124
|
}
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
if (h.length === 0 || !document.activeElement)
|
|
1967
|
-
return;
|
|
1968
|
-
const U = h.indexOf(
|
|
1969
|
-
document.activeElement
|
|
1970
|
-
);
|
|
1971
|
-
U < h.length - 1 ? h[U + 1].focus() : h[0].focus();
|
|
1972
|
-
}
|
|
1973
|
-
});
|
|
1974
|
-
}, Ce = () => {
|
|
1975
|
-
Xe(() => {
|
|
1976
|
-
if (Q.value) {
|
|
1977
|
-
const h = ae(
|
|
1978
|
-
p.value
|
|
1979
|
-
);
|
|
1980
|
-
if (h.length === 0 || !document.activeElement)
|
|
1981
|
-
return;
|
|
1982
|
-
const U = h.indexOf(
|
|
1983
|
-
document.activeElement
|
|
1984
|
-
);
|
|
1985
|
-
U > 0 ? h[U - 1].focus() : h[h.length - 1].focus();
|
|
1986
|
-
}
|
|
125
|
+
if (options.aliases) {
|
|
126
|
+
Object.entries(options.aliases).forEach(([name, component]) => {
|
|
127
|
+
app.component(
|
|
128
|
+
name,
|
|
129
|
+
useDefaultProps(component, options.defaults, name)
|
|
130
|
+
);
|
|
1987
131
|
});
|
|
1988
|
-
};
|
|
1989
|
-
return He("Escape", (h) => {
|
|
1990
|
-
P.value && (h.preventDefault(), F());
|
|
1991
|
-
}), He("ArrowDown", (h) => {
|
|
1992
|
-
P.value && Q.value && (h.preventDefault(), Se());
|
|
1993
|
-
}), He("ArrowUp", (h) => {
|
|
1994
|
-
P.value && Q.value && (h.preventDefault(), Ce());
|
|
1995
|
-
}), He([" ", "Enter"], (h) => {
|
|
1996
|
-
P.value && Q.value && (h.preventDefault(), document.activeElement.click());
|
|
1997
|
-
}), (h, U) => (f(), g(ie, null, [
|
|
1998
|
-
pe(a(de), null, {
|
|
1999
|
-
default: te(() => [
|
|
2000
|
-
V(h.$slots, "default", K(z({ init: he, show: W, hide: F, toggle: ue, expanded: a(P), aria: a(ne) })))
|
|
2001
|
-
]),
|
|
2002
|
-
_: 3
|
|
2003
|
-
}),
|
|
2004
|
-
pe(xt, { name: h.transitionName }, {
|
|
2005
|
-
default: te(() => [
|
|
2006
|
-
Oe(x("div", {
|
|
2007
|
-
ref_key: "floatingEl",
|
|
2008
|
-
ref: p,
|
|
2009
|
-
style: It(a(O)),
|
|
2010
|
-
class: le(a(B))
|
|
2011
|
-
}, [
|
|
2012
|
-
e.arrow ? (f(), g("div", {
|
|
2013
|
-
key: 0,
|
|
2014
|
-
ref_key: "arrowEl",
|
|
2015
|
-
ref: r,
|
|
2016
|
-
style: It(a(M)),
|
|
2017
|
-
class: "vv-dropdown__arrow"
|
|
2018
|
-
}, null, 4)) : w("", !0),
|
|
2019
|
-
V(h.$slots, "before", K(z({ expanded: a(P) }))),
|
|
2020
|
-
x("ul", R(a(u), {
|
|
2021
|
-
id: a(o),
|
|
2022
|
-
ref_key: "listEl",
|
|
2023
|
-
ref: i,
|
|
2024
|
-
tabindex: a(P) ? void 0 : -1,
|
|
2025
|
-
role: a(re),
|
|
2026
|
-
"aria-labelledby": a(ye),
|
|
2027
|
-
class: "vv-dropdown__list"
|
|
2028
|
-
}), [
|
|
2029
|
-
V(h.$slots, "items", K(z({
|
|
2030
|
-
role: a(J)
|
|
2031
|
-
})))
|
|
2032
|
-
], 16, Ka),
|
|
2033
|
-
V(h.$slots, "after", K(z({ expanded: a(P) })))
|
|
2034
|
-
], 6), [
|
|
2035
|
-
[St, a(P)]
|
|
2036
|
-
])
|
|
2037
|
-
]),
|
|
2038
|
-
_: 3
|
|
2039
|
-
}, 8, ["name"])
|
|
2040
|
-
], 64));
|
|
2041
|
-
}
|
|
2042
|
-
}), qa = {
|
|
2043
|
-
name: "VvDropdownItem"
|
|
2044
|
-
}, Ya = /* @__PURE__ */ j({
|
|
2045
|
-
...qa,
|
|
2046
|
-
setup(t) {
|
|
2047
|
-
const { role: l, expanded: e } = da(), s = N(null);
|
|
2048
|
-
Fa({ expanded: e });
|
|
2049
|
-
const o = kl(s), { focused: u } = Wt(s), { focused: d } = Vt(s);
|
|
2050
|
-
return ve(o, (c) => {
|
|
2051
|
-
c && (u.value = !0);
|
|
2052
|
-
}), (c, v) => (f(), g("li", R({ role: a(l) }, {
|
|
2053
|
-
ref_key: "element",
|
|
2054
|
-
ref: s,
|
|
2055
|
-
class: ["vv-dropdown__item", { "focus-visible": a(u) || a(d) }]
|
|
2056
|
-
}), [
|
|
2057
|
-
V(c.$slots, "default")
|
|
2058
|
-
], 16));
|
|
2059
|
-
}
|
|
2060
|
-
}), Ja = { class: "vv-dropdown-option__hint" }, Xa = {
|
|
2061
|
-
name: "VvDropdownOption"
|
|
2062
|
-
}, Qe = /* @__PURE__ */ j({
|
|
2063
|
-
...Xa,
|
|
2064
|
-
props: {
|
|
2065
|
-
...De,
|
|
2066
|
-
...zl,
|
|
2067
|
-
...qe,
|
|
2068
|
-
...me,
|
|
2069
|
-
deselectHintLabel: {
|
|
2070
|
-
type: String
|
|
2071
|
-
},
|
|
2072
|
-
selectHintLabel: {
|
|
2073
|
-
type: String
|
|
2074
|
-
},
|
|
2075
|
-
selectedHintLabel: {
|
|
2076
|
-
type: String
|
|
2077
132
|
}
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
"vv-dropdown-option",
|
|
2082
|
-
e,
|
|
2083
|
-
n(() => ({
|
|
2084
|
-
disabled: l.disabled,
|
|
2085
|
-
selected: l.selected,
|
|
2086
|
-
unselectable: l.unselectable && l.selected
|
|
2087
|
-
}))
|
|
2088
|
-
);
|
|
2089
|
-
return (o, u) => (f(), H(Ya, {
|
|
2090
|
-
class: le(a(s)),
|
|
2091
|
-
tabindex: o.disabled ? -1 : 0,
|
|
2092
|
-
"aria-selected": o.selected,
|
|
2093
|
-
"aria-disabled": o.disabled
|
|
2094
|
-
}, {
|
|
2095
|
-
default: te(() => [
|
|
2096
|
-
V(o.$slots, "default"),
|
|
2097
|
-
x("span", Ja, [
|
|
2098
|
-
V(o.$slots, "hint", K(z({ disabled: o.disabled, selected: o.selected, unselectable: o.unselectable })), () => [
|
|
2099
|
-
o.selected ? (f(), g(ie, { key: 0 }, [
|
|
2100
|
-
Y(T(o.unselectable ? t.deselectHintLabel : t.selectedHintLabel), 1)
|
|
2101
|
-
], 64)) : o.disabled ? w("", !0) : (f(), g(ie, { key: 1 }, [
|
|
2102
|
-
Y(T(t.selectHintLabel), 1)
|
|
2103
|
-
], 64))
|
|
2104
|
-
])
|
|
2105
|
-
])
|
|
2106
|
-
]),
|
|
2107
|
-
_: 3
|
|
2108
|
-
}, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]));
|
|
2109
|
-
}
|
|
2110
|
-
}), Qa = {
|
|
2111
|
-
...nt,
|
|
2112
|
-
...tl,
|
|
2113
|
-
...ll,
|
|
2114
|
-
...ot,
|
|
2115
|
-
...Ue,
|
|
2116
|
-
...Fe,
|
|
2117
|
-
...ze,
|
|
2118
|
-
...at,
|
|
2119
|
-
...De,
|
|
2120
|
-
...Ke,
|
|
2121
|
-
...me,
|
|
2122
|
-
...kt,
|
|
2123
|
-
...At,
|
|
2124
|
-
...Ct,
|
|
2125
|
-
...qe,
|
|
2126
|
-
...xe,
|
|
2127
|
-
/**
|
|
2128
|
-
* This Boolean attribute indicates that multiple options can be selected in the list.
|
|
2129
|
-
* If it is not specified, then only one option can be selected at a time.
|
|
2130
|
-
* When multiple is specified, most browsers will show a scrolling list box instead of a single line dropdown.
|
|
2131
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple
|
|
2132
|
-
*/
|
|
2133
|
-
multiple: Boolean,
|
|
2134
|
-
/**
|
|
2135
|
-
* A Boolean attribute indicating that an option with a non-empty string value must be selected.
|
|
2136
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-required
|
|
2137
|
-
*/
|
|
2138
|
-
required: Boolean,
|
|
2139
|
-
/**
|
|
2140
|
-
* If the control is presented as a scrolling list box (e.g. when multiple is specified),
|
|
2141
|
-
* this attribute represents the number of rows in the list that should be visible at one time.
|
|
2142
|
-
* Browsers are not required to present a select element as a scrolled list box. The default value is 0.
|
|
2143
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-size
|
|
2144
|
-
*/
|
|
2145
|
-
size: [String, Number],
|
|
2146
|
-
/**
|
|
2147
|
-
* modelValue can be a string, number, boolean, object or array of string, number, boolean, object
|
|
2148
|
-
*/
|
|
2149
|
-
modelValue: {
|
|
2150
|
-
type: [String, Number, Boolean, Object, Array],
|
|
2151
|
-
default: void 0
|
|
2152
|
-
},
|
|
2153
|
-
/**
|
|
2154
|
-
* Select placeholder
|
|
2155
|
-
*/
|
|
2156
|
-
placeholder: String
|
|
2157
|
-
}, Za = ["update:modelValue", "focus", "blur"];
|
|
2158
|
-
function it(t, l) {
|
|
2159
|
-
const { focused: e } = Wt(t);
|
|
2160
|
-
return ve(e, (s) => {
|
|
2161
|
-
l(s ? "focus" : "blur", a(t));
|
|
2162
|
-
}), {
|
|
2163
|
-
focused: e
|
|
2164
|
-
};
|
|
2165
|
-
}
|
|
2166
|
-
function ut(t, l) {
|
|
2167
|
-
const e = n(
|
|
2168
|
-
() => Boolean((t == null ? void 0 : t.value) && l.value === Ge.before)
|
|
2169
|
-
), s = n(
|
|
2170
|
-
() => Boolean((t == null ? void 0 : t.value) && l.value === Ge.after)
|
|
2171
|
-
), o = n(
|
|
2172
|
-
() => Boolean((t == null ? void 0 : t.value) && l.value === fe.left)
|
|
2173
|
-
), u = n(
|
|
2174
|
-
() => Boolean((t == null ? void 0 : t.value) && l.value === fe.right)
|
|
2175
|
-
), d = n(
|
|
2176
|
-
() => Boolean((t == null ? void 0 : t.value) && l.value === fe.top)
|
|
2177
|
-
), c = n(
|
|
2178
|
-
() => Boolean((t == null ? void 0 : t.value) && l.value === fe.bottom)
|
|
2179
|
-
);
|
|
2180
|
-
return {
|
|
2181
|
-
hasIcon: n(() => typeof (t == null ? void 0 : t.value) == "string" ? { name: t == null ? void 0 : t.value } : t == null ? void 0 : t.value),
|
|
2182
|
-
hasIconLeft: o,
|
|
2183
|
-
hasIconRight: u,
|
|
2184
|
-
hasIconTop: d,
|
|
2185
|
-
hasIconBottom: c,
|
|
2186
|
-
hasIconBefore: e,
|
|
2187
|
-
hasIconAfter: s
|
|
2188
|
-
};
|
|
2189
|
-
}
|
|
2190
|
-
const eo = ["for"], to = { class: "vv-select__wrapper" }, lo = {
|
|
2191
|
-
key: 0,
|
|
2192
|
-
class: "vv-select__input-before"
|
|
2193
|
-
}, ao = { class: "vv-select__inner" }, oo = ["id"], so = ["disabled", "hidden"], no = ["disabled", "value"], ro = {
|
|
2194
|
-
key: 1,
|
|
2195
|
-
class: "vv-select__input-after"
|
|
2196
|
-
}, io = {
|
|
2197
|
-
name: "VvSelect"
|
|
2198
|
-
}, uo = /* @__PURE__ */ j({
|
|
2199
|
-
...io,
|
|
2200
|
-
props: Qa,
|
|
2201
|
-
emits: Za,
|
|
2202
|
-
setup(t, { emit: l }) {
|
|
2203
|
-
const e = t, s = Ae(), o = N(), { HintSlot: u, hasHint: d, hasInvalid: c } = Be(e, s), {
|
|
2204
|
-
id: v,
|
|
2205
|
-
modifiers: p,
|
|
2206
|
-
disabled: r,
|
|
2207
|
-
readonly: i,
|
|
2208
|
-
loading: b,
|
|
2209
|
-
icon: _,
|
|
2210
|
-
iconPosition: k,
|
|
2211
|
-
invalid: A,
|
|
2212
|
-
valid: y,
|
|
2213
|
-
floating: m,
|
|
2214
|
-
multiple: I
|
|
2215
|
-
} = G(e), O = Le(v), D = n(() => `${O.value}-hint`), { focused: L } = it(o, l), M = $t(o);
|
|
2216
|
-
ve(M, (B) => {
|
|
2217
|
-
B && e.autofocus && (L.value = !0);
|
|
2218
|
-
});
|
|
2219
|
-
const { hasIcon: C, hasIconBefore: se, hasIconAfter: P } = ut(
|
|
2220
|
-
_,
|
|
2221
|
-
k
|
|
2222
|
-
), W = n(() => !ge(e.modelValue)), F = n(() => e.disabled || e.readonly), ue = n(() => F.value ? -1 : e.tabindex), he = n(() => {
|
|
2223
|
-
if (e.invalid === !0)
|
|
2224
|
-
return !0;
|
|
2225
|
-
if (e.valid === !0)
|
|
2226
|
-
return !1;
|
|
2227
|
-
}), ye = X(
|
|
2228
|
-
"vv-select",
|
|
2229
|
-
p,
|
|
2230
|
-
n(() => ({
|
|
2231
|
-
valid: y.value,
|
|
2232
|
-
invalid: A.value,
|
|
2233
|
-
loading: b.value,
|
|
2234
|
-
disabled: r.value,
|
|
2235
|
-
readonly: i.value,
|
|
2236
|
-
"icon-before": se.value,
|
|
2237
|
-
"icon-after": P.value,
|
|
2238
|
-
dirty: W.value,
|
|
2239
|
-
focus: L.value,
|
|
2240
|
-
floating: m.value,
|
|
2241
|
-
multiple: I.value
|
|
2242
|
-
}))
|
|
2243
|
-
), ne = n(() => ({
|
|
2244
|
-
name: e.name,
|
|
2245
|
-
tabindex: ue.value,
|
|
2246
|
-
disabled: F.value,
|
|
2247
|
-
required: e.required,
|
|
2248
|
-
size: e.size,
|
|
2249
|
-
autocomplete: e.autocomplete,
|
|
2250
|
-
multiple: e.multiple,
|
|
2251
|
-
"aria-invalid": he.value,
|
|
2252
|
-
"aria-describedby": !c.value && d.value ? D.value : void 0,
|
|
2253
|
-
"aria-errormessage": c.value ? D.value : void 0
|
|
2254
|
-
})), de = n(() => ({
|
|
2255
|
-
valid: e.valid,
|
|
2256
|
-
invalid: e.invalid,
|
|
2257
|
-
modelValue: e.modelValue
|
|
2258
|
-
})), { getOptionLabel: _e, getOptionValue: re, getOptionDisabled: Ve } = rt(e), J = n({
|
|
2259
|
-
get: () => e.modelValue,
|
|
2260
|
-
set: (B) => {
|
|
2261
|
-
Array.isArray(B) && (B = B.filter((Q) => Q !== void 0)), l("update:modelValue", B);
|
|
2262
|
-
}
|
|
2263
|
-
});
|
|
2264
|
-
return (B, Q) => (f(), g("div", {
|
|
2265
|
-
class: le(a(ye))
|
|
2266
|
-
}, [
|
|
2267
|
-
B.label ? (f(), g("label", {
|
|
2268
|
-
key: 0,
|
|
2269
|
-
for: a(O)
|
|
2270
|
-
}, T(B.label), 9, eo)) : w("", !0),
|
|
2271
|
-
x("div", to, [
|
|
2272
|
-
B.$slots.before ? (f(), g("div", lo, [
|
|
2273
|
-
V(B.$slots, "before", K(z(a(de))))
|
|
2274
|
-
])) : w("", !0),
|
|
2275
|
-
x("div", ao, [
|
|
2276
|
-
a(se) ? (f(), H(ee, R({
|
|
2277
|
-
key: 0,
|
|
2278
|
-
class: "vv-select__icon"
|
|
2279
|
-
}, a(C)), null, 16)) : w("", !0),
|
|
2280
|
-
Oe(x("select", R({
|
|
2281
|
-
id: a(O),
|
|
2282
|
-
ref_key: "select",
|
|
2283
|
-
ref: o,
|
|
2284
|
-
"onUpdate:modelValue": Q[0] || (Q[0] = (ae) => Ee(J) ? J.value = ae : null)
|
|
2285
|
-
}, a(ne)), [
|
|
2286
|
-
B.placeholder ? (f(), g("option", {
|
|
2287
|
-
key: 0,
|
|
2288
|
-
value: void 0,
|
|
2289
|
-
disabled: !B.unselectable,
|
|
2290
|
-
hidden: !B.unselectable
|
|
2291
|
-
}, T(B.placeholder), 9, so)) : w("", !0),
|
|
2292
|
-
(f(!0), g(ie, null, Ne(B.options, (ae, Se) => (f(), g("option", {
|
|
2293
|
-
key: Se,
|
|
2294
|
-
disabled: a(Ve)(ae),
|
|
2295
|
-
value: a(re)(ae)
|
|
2296
|
-
}, T(a(_e)(ae)), 9, no))), 128))
|
|
2297
|
-
], 16, oo), [
|
|
2298
|
-
[hl, a(J)]
|
|
2299
|
-
]),
|
|
2300
|
-
a(P) ? (f(), H(ee, R({
|
|
2301
|
-
key: 1,
|
|
2302
|
-
class: "vv-select__icon vv-select__icon-after"
|
|
2303
|
-
}, a(C)), null, 16)) : w("", !0)
|
|
2304
|
-
]),
|
|
2305
|
-
B.$slots.after ? (f(), g("div", ro, [
|
|
2306
|
-
V(B.$slots, "after", K(z(a(de))))
|
|
2307
|
-
])) : w("", !0)
|
|
2308
|
-
]),
|
|
2309
|
-
pe(a(u), {
|
|
2310
|
-
id: a(D),
|
|
2311
|
-
class: "vv-select__hint"
|
|
2312
|
-
}, null, 8, ["id"])
|
|
2313
|
-
], 2));
|
|
2314
|
-
}
|
|
2315
|
-
}), co = ["id"], vo = ["id", "for"], fo = ["id", "aria-controls", "aria-labelledby", "aria-describedby", "placeholder"], po = {
|
|
2316
|
-
key: 0,
|
|
2317
|
-
class: "vv-select__input-before"
|
|
2318
|
-
}, mo = { class: "vv-select__inner" }, bo = ["aria-labelledby", "tabindex"], ho = ["aria-label", "onClick"], yo = {
|
|
2319
|
-
key: 1,
|
|
2320
|
-
class: "vv-select__input-after"
|
|
2321
|
-
}, go = {
|
|
2322
|
-
name: "VvCombobox",
|
|
2323
|
-
components: { VvDropdown: il, VvDropdownOption: Qe }
|
|
2324
|
-
}, Vs = /* @__PURE__ */ j({
|
|
2325
|
-
...go,
|
|
2326
|
-
props: Ga,
|
|
2327
|
-
emits: Ma,
|
|
2328
|
-
setup(t, { emit: l }) {
|
|
2329
|
-
const e = t, s = Ae(), { HintSlot: o } = Be(e, s), u = N(null), d = N(null), c = N(null), { focused: v } = it(u, l), { focused: p } = Vt(c);
|
|
2330
|
-
ve(v, (S) => {
|
|
2331
|
-
if (e.autoOpen) {
|
|
2332
|
-
if (S && !b.value) {
|
|
2333
|
-
k();
|
|
2334
|
-
return;
|
|
2335
|
-
}
|
|
2336
|
-
!S && b.value && !p.value && A();
|
|
2337
|
-
}
|
|
2338
|
-
}), ve(p, (S) => {
|
|
2339
|
-
!v.value && !S && b.value && A();
|
|
2340
|
-
});
|
|
2341
|
-
const r = N(""), i = Al(
|
|
2342
|
-
r,
|
|
2343
|
-
Number(e.debounceSearch)
|
|
2344
|
-
);
|
|
2345
|
-
ve(
|
|
2346
|
-
i,
|
|
2347
|
-
() => l("change:search", i.value)
|
|
2348
|
-
);
|
|
2349
|
-
const b = N(!1), _ = () => {
|
|
2350
|
-
e.disabled || e.readonly || (b.value = !b.value);
|
|
2351
|
-
}, k = () => {
|
|
2352
|
-
e.disabled || e.readonly || b.value || (b.value = !0);
|
|
2353
|
-
}, A = () => {
|
|
2354
|
-
e.disabled || e.readonly || !b.value || (b.value = !1);
|
|
2355
|
-
};
|
|
2356
|
-
ve(b, (S) => {
|
|
2357
|
-
W.value && Xe(() => {
|
|
2358
|
-
if (S) {
|
|
2359
|
-
d.value && d.value.focus();
|
|
2360
|
-
return;
|
|
2361
|
-
}
|
|
2362
|
-
r.value = "";
|
|
133
|
+
if (options.directives) {
|
|
134
|
+
Object.entries(options.directives).forEach(([name, directive]) => {
|
|
135
|
+
app.directive(name, directive);
|
|
2363
136
|
});
|
|
2364
|
-
});
|
|
2365
|
-
const {
|
|
2366
|
-
id: y,
|
|
2367
|
-
icon: m,
|
|
2368
|
-
iconPosition: I,
|
|
2369
|
-
modifiers: O,
|
|
2370
|
-
disabled: D,
|
|
2371
|
-
readonly: L,
|
|
2372
|
-
loading: M,
|
|
2373
|
-
valid: C,
|
|
2374
|
-
invalid: se,
|
|
2375
|
-
floating: P,
|
|
2376
|
-
searchable: W
|
|
2377
|
-
} = G(e), F = Le(y), ue = n(() => `${F.value}-hint`), he = n(() => `${F.value}-dropdown`), ye = n(() => `${F.value}-search`), ne = n(() => `${F.value}-label`), { hasIcon: de, hasIconBefore: _e, hasIconAfter: re } = ut(
|
|
2378
|
-
m,
|
|
2379
|
-
I
|
|
2380
|
-
), Ve = n(() => !ge(e.modelValue)), J = n(() => D.value || L.value ? -1 : e.tabindex), B = X(
|
|
2381
|
-
"vv-select",
|
|
2382
|
-
O,
|
|
2383
|
-
n(() => ({
|
|
2384
|
-
disabled: D.value,
|
|
2385
|
-
loading: M.value,
|
|
2386
|
-
readonly: L.value,
|
|
2387
|
-
"icon-before": Boolean(_e.value),
|
|
2388
|
-
"icon-after": Boolean(re.value),
|
|
2389
|
-
valid: C.value,
|
|
2390
|
-
invalid: se.value,
|
|
2391
|
-
dirty: Ve.value,
|
|
2392
|
-
focus: v.value,
|
|
2393
|
-
floating: P.value
|
|
2394
|
-
}))
|
|
2395
|
-
), Q = n(
|
|
2396
|
-
() => e.searchable ? h.value : e.options
|
|
2397
|
-
), { getOptionLabel: ae, getOptionValue: Se, getOptionDisabled: Ce } = rt(e), h = n(() => {
|
|
2398
|
-
var S;
|
|
2399
|
-
return (S = e.options) == null ? void 0 : S.filter((Z) => ae(Z).toLowerCase().includes(i.value.toLowerCase().trim()));
|
|
2400
|
-
});
|
|
2401
|
-
function U(S) {
|
|
2402
|
-
return Array.isArray(e.modelValue) ? we(S, e.modelValue) || we(Se(S), e.modelValue) : Pe(S, e.modelValue) || Pe(Se(S), e.modelValue);
|
|
2403
|
-
}
|
|
2404
|
-
const ce = n(() => {
|
|
2405
|
-
let S = [];
|
|
2406
|
-
return Array.isArray(e.modelValue) ? S = e.modelValue : e.modelValue && (S = [e.modelValue]), e.options.filter(
|
|
2407
|
-
(Z) => S.includes(Se(Z))
|
|
2408
|
-
);
|
|
2409
|
-
}), $e = n(() => ce.value.map((S) => ae(S)).join(e.separator));
|
|
2410
|
-
ve(ce, () => {
|
|
2411
|
-
!e.multiple && e.autoClose && A();
|
|
2412
|
-
});
|
|
2413
|
-
const dt = () => {
|
|
2414
|
-
e.autoOpen ? k() : _();
|
|
2415
|
-
}, Me = (S) => {
|
|
2416
|
-
var Te;
|
|
2417
|
-
if (e.disabled || e.readonly)
|
|
2418
|
-
return;
|
|
2419
|
-
const Z = Se(S);
|
|
2420
|
-
let q = Z;
|
|
2421
|
-
if (e.multiple)
|
|
2422
|
-
if (Array.isArray(e.modelValue)) {
|
|
2423
|
-
if (e.maxValues !== void 0 && e.maxValues >= 0 && ((Te = e.modelValue) == null ? void 0 : Te.length) >= e.maxValues && !we(Z, e.modelValue))
|
|
2424
|
-
return;
|
|
2425
|
-
q = we(Z, e.modelValue) ? Ll(Z, e.modelValue) : [...e.modelValue, Z];
|
|
2426
|
-
} else
|
|
2427
|
-
q = [Z];
|
|
2428
|
-
else
|
|
2429
|
-
e.unselectable && Z === e.modelValue && (q = void 0);
|
|
2430
|
-
l("update:modelValue", q);
|
|
2431
|
-
}, E = n(() => ({
|
|
2432
|
-
id: F.value,
|
|
2433
|
-
name: e.name,
|
|
2434
|
-
tabindex: J.value,
|
|
2435
|
-
valid: C.value,
|
|
2436
|
-
validLabel: e.validLabel,
|
|
2437
|
-
invalid: se.value,
|
|
2438
|
-
invalidLabel: e.invalidLabel,
|
|
2439
|
-
hintLabel: e.hintLabel,
|
|
2440
|
-
loading: M.value,
|
|
2441
|
-
loadingLabel: e.loadingLabel,
|
|
2442
|
-
disabled: D.value,
|
|
2443
|
-
readonly: L.value,
|
|
2444
|
-
modifiers: e.modifiers,
|
|
2445
|
-
options: Q.value,
|
|
2446
|
-
labelKey: e.labelKey,
|
|
2447
|
-
valueKey: e.valueKey,
|
|
2448
|
-
icon: e.icon,
|
|
2449
|
-
iconPosition: e.iconPosition,
|
|
2450
|
-
floating: e.floating,
|
|
2451
|
-
unselectable: e.unselectable,
|
|
2452
|
-
multiple: e.multiple,
|
|
2453
|
-
label: e.label,
|
|
2454
|
-
placeholder: e.placeholder,
|
|
2455
|
-
modelValue: e.modelValue
|
|
2456
|
-
})), oe = n(() => ({
|
|
2457
|
-
id: he.value,
|
|
2458
|
-
reference: c.value,
|
|
2459
|
-
placement: e.placement,
|
|
2460
|
-
transitionName: e.transitionName,
|
|
2461
|
-
offset: e.offset,
|
|
2462
|
-
shift: e.shift,
|
|
2463
|
-
flip: e.flip,
|
|
2464
|
-
autoPlacement: e.autoPlacement,
|
|
2465
|
-
arrow: e.arrow,
|
|
2466
|
-
autoClose: e.autoClose,
|
|
2467
|
-
autofocusFirst: W.value ? !1 : e.autofocusFirst,
|
|
2468
|
-
triggerWidth: e.triggerWidth,
|
|
2469
|
-
modifiers: e.dropdownModifiers
|
|
2470
|
-
})), Re = n(() => ({
|
|
2471
|
-
valid: e.valid,
|
|
2472
|
-
invalid: e.invalid,
|
|
2473
|
-
modelValue: e.modelValue
|
|
2474
|
-
}));
|
|
2475
|
-
return He([" ", "Enter"], (S) => {
|
|
2476
|
-
e.autoOpen || !b.value && v.value && (S.preventDefault(), S.stopImmediatePropagation(), _());
|
|
2477
|
-
}), (S, Z) => S.native ? (f(), H(uo, R({ key: 1 }, a(E), {
|
|
2478
|
-
"onUpdate:modelValue": Z[2] || (Z[2] = (q) => l("update:modelValue", q))
|
|
2479
|
-
}), null, 16)) : (f(), g("div", {
|
|
2480
|
-
key: 0,
|
|
2481
|
-
id: a(F),
|
|
2482
|
-
class: le(a(B))
|
|
2483
|
-
}, [
|
|
2484
|
-
S.label ? (f(), g("label", {
|
|
2485
|
-
key: 0,
|
|
2486
|
-
id: a(ne),
|
|
2487
|
-
for: a(W) ? a(ye) : void 0
|
|
2488
|
-
}, T(S.label), 9, vo)) : w("", !0),
|
|
2489
|
-
x("div", {
|
|
2490
|
-
ref_key: "wrapperEl",
|
|
2491
|
-
ref: c,
|
|
2492
|
-
class: "vv-select__wrapper"
|
|
2493
|
-
}, [
|
|
2494
|
-
pe(il, R({
|
|
2495
|
-
modelValue: a(b),
|
|
2496
|
-
"onUpdate:modelValue": Z[1] || (Z[1] = (q) => Ee(b) ? b.value = q : null)
|
|
2497
|
-
}, a(oe), {
|
|
2498
|
-
role: a(je).listbox
|
|
2499
|
-
}), yl({
|
|
2500
|
-
default: te(({ aria: q }) => [
|
|
2501
|
-
S.$slots.before ? (f(), g("div", po, [
|
|
2502
|
-
V(S.$slots, "before", K(z(a(Re))))
|
|
2503
|
-
])) : w("", !0),
|
|
2504
|
-
x("div", mo, [
|
|
2505
|
-
a(_e) ? (f(), H(ee, R({
|
|
2506
|
-
key: 0,
|
|
2507
|
-
class: "vv-select__icon"
|
|
2508
|
-
}, a(de)), null, 16)) : w("", !0),
|
|
2509
|
-
x("div", R({
|
|
2510
|
-
ref_key: "inputEl",
|
|
2511
|
-
ref: u
|
|
2512
|
-
}, q, {
|
|
2513
|
-
"aria-labelledby": a(ne),
|
|
2514
|
-
class: "vv-select__input",
|
|
2515
|
-
role: "combobox",
|
|
2516
|
-
tabindex: a(J),
|
|
2517
|
-
onClickPassive: dt
|
|
2518
|
-
}), [
|
|
2519
|
-
V(S.$slots, "value", K(z({ selectedOptions: a(ce), onInput: Me })), () => [
|
|
2520
|
-
a($e) ? (f(), g(ie, { key: 0 }, [
|
|
2521
|
-
S.badges ? (f(!0), g(ie, { key: 1 }, Ne(a(ce), (Te, wt) => (f(), H(ea, {
|
|
2522
|
-
key: wt,
|
|
2523
|
-
modifiers: S.badgeModifiers,
|
|
2524
|
-
class: "vv-select__badge"
|
|
2525
|
-
}, {
|
|
2526
|
-
default: te(() => [
|
|
2527
|
-
Y(T(a(ae)(Te)) + " ", 1),
|
|
2528
|
-
S.unselectable && !a(L) && !a(D) ? (f(), g("button", {
|
|
2529
|
-
key: 0,
|
|
2530
|
-
"aria-label": S.deselectActionLabel,
|
|
2531
|
-
onClick: Rt((is) => Me(Te), ["stop"])
|
|
2532
|
-
}, [
|
|
2533
|
-
pe(ee, { name: "close" })
|
|
2534
|
-
], 8, ho)) : w("", !0)
|
|
2535
|
-
]),
|
|
2536
|
-
_: 2
|
|
2537
|
-
}, 1032, ["modifiers"]))), 128)) : (f(), g(ie, { key: 0 }, [
|
|
2538
|
-
Y(T(a($e)), 1)
|
|
2539
|
-
], 64))
|
|
2540
|
-
], 64)) : (f(), g(ie, { key: 1 }, [
|
|
2541
|
-
Y(T(S.placeholder), 1)
|
|
2542
|
-
], 64))
|
|
2543
|
-
])
|
|
2544
|
-
], 16, bo),
|
|
2545
|
-
a(re) ? (f(), H(ee, R({
|
|
2546
|
-
key: 1,
|
|
2547
|
-
class: "vv-select__icon vv-select__icon-after"
|
|
2548
|
-
}, a(de)), null, 16)) : w("", !0)
|
|
2549
|
-
]),
|
|
2550
|
-
S.$slots.after ? (f(), g("div", yo, [
|
|
2551
|
-
V(S.$slots, "after", K(z(a(Re))))
|
|
2552
|
-
])) : w("", !0)
|
|
2553
|
-
]),
|
|
2554
|
-
items: te(() => [
|
|
2555
|
-
a(h).length ? (f(!0), g(ie, { key: 0 }, Ne(a(h), (q, Te) => (f(), H(Qe, R({
|
|
2556
|
-
disabled: a(Ce)(q),
|
|
2557
|
-
selected: U(q),
|
|
2558
|
-
unselectable: S.unselectable,
|
|
2559
|
-
deselectHintLabel: S.deselectHintLabel,
|
|
2560
|
-
selectHintLabel: S.selectHintLabel,
|
|
2561
|
-
selectedHintLabel: S.selectedHintLabel
|
|
2562
|
-
}, {
|
|
2563
|
-
key: Te,
|
|
2564
|
-
class: "vv-dropdown-option",
|
|
2565
|
-
onClickPassive: (wt) => Me(q)
|
|
2566
|
-
}), {
|
|
2567
|
-
default: te(() => [
|
|
2568
|
-
V(S.$slots, "option", K(z({
|
|
2569
|
-
option: q,
|
|
2570
|
-
selectedOptions: a(ce),
|
|
2571
|
-
selected: U(q),
|
|
2572
|
-
disabled: a(Ce)(q)
|
|
2573
|
-
})), () => [
|
|
2574
|
-
Y(T(a(ae)(q)), 1)
|
|
2575
|
-
])
|
|
2576
|
-
]),
|
|
2577
|
-
_: 2
|
|
2578
|
-
}, 1040, ["onClickPassive"]))), 128)) : S.options.length ? (f(), H(Qe, {
|
|
2579
|
-
key: 2,
|
|
2580
|
-
modifiers: "inert"
|
|
2581
|
-
}, {
|
|
2582
|
-
default: te(() => [
|
|
2583
|
-
V(S.$slots, "no-results", {}, () => [
|
|
2584
|
-
Y(T(S.noResultsLabel), 1)
|
|
2585
|
-
])
|
|
2586
|
-
]),
|
|
2587
|
-
_: 3
|
|
2588
|
-
})) : (f(), H(Qe, {
|
|
2589
|
-
key: 1,
|
|
2590
|
-
modifiers: "inert"
|
|
2591
|
-
}, {
|
|
2592
|
-
default: te(() => [
|
|
2593
|
-
V(S.$slots, "no-options", {}, () => [
|
|
2594
|
-
Y(T(S.noOptionsLabel), 1)
|
|
2595
|
-
])
|
|
2596
|
-
]),
|
|
2597
|
-
_: 3
|
|
2598
|
-
}))
|
|
2599
|
-
]),
|
|
2600
|
-
_: 2
|
|
2601
|
-
}, [
|
|
2602
|
-
a(W) || S.$slots["dropdown::before"] ? {
|
|
2603
|
-
name: "before",
|
|
2604
|
-
fn: te(() => [
|
|
2605
|
-
V(S.$slots, "dropdown::before"),
|
|
2606
|
-
a(W) ? Oe((f(), g("input", {
|
|
2607
|
-
key: 0,
|
|
2608
|
-
id: a(ye),
|
|
2609
|
-
ref_key: "inputSearchEl",
|
|
2610
|
-
ref: d,
|
|
2611
|
-
"onUpdate:modelValue": Z[0] || (Z[0] = (q) => Ee(r) ? r.value = q : null),
|
|
2612
|
-
"aria-autocomplete": "list",
|
|
2613
|
-
"aria-controls": a(he),
|
|
2614
|
-
"aria-labelledby": a(ne),
|
|
2615
|
-
"aria-describedby": a(ue),
|
|
2616
|
-
autocomplete: "off",
|
|
2617
|
-
spellcheck: "false",
|
|
2618
|
-
type: "search",
|
|
2619
|
-
class: "vv-dropdown__search",
|
|
2620
|
-
placeholder: S.searchPlaceholder
|
|
2621
|
-
}, null, 8, fo)), [
|
|
2622
|
-
[St, a(b)],
|
|
2623
|
-
[Mt, a(r)]
|
|
2624
|
-
]) : w("", !0)
|
|
2625
|
-
]),
|
|
2626
|
-
key: "0"
|
|
2627
|
-
} : void 0,
|
|
2628
|
-
S.$slots["dropdown::after"] ? {
|
|
2629
|
-
name: "after",
|
|
2630
|
-
fn: te(() => [
|
|
2631
|
-
V(S.$slots, "dropdown::after")
|
|
2632
|
-
]),
|
|
2633
|
-
key: "1"
|
|
2634
|
-
} : void 0
|
|
2635
|
-
]), 1040, ["modelValue", "role"])
|
|
2636
|
-
], 512),
|
|
2637
|
-
pe(a(o), {
|
|
2638
|
-
id: a(ue),
|
|
2639
|
-
class: "vv-select__hint"
|
|
2640
|
-
}, null, 8, ["id"])
|
|
2641
|
-
], 10, co));
|
|
2642
|
-
}
|
|
2643
|
-
}), _o = ["open", "close", "update:modelValue"], So = {
|
|
2644
|
-
...st,
|
|
2645
|
-
/**
|
|
2646
|
-
* Dialog title
|
|
2647
|
-
*/
|
|
2648
|
-
title: String,
|
|
2649
|
-
/**
|
|
2650
|
-
* Show / hide dialog programmatically
|
|
2651
|
-
*/
|
|
2652
|
-
modelValue: Boolean,
|
|
2653
|
-
/**
|
|
2654
|
-
* Dialog transition
|
|
2655
|
-
*/
|
|
2656
|
-
transition: { type: String, default: "fade-block" },
|
|
2657
|
-
/**
|
|
2658
|
-
* Dialog size
|
|
2659
|
-
*/
|
|
2660
|
-
size: String,
|
|
2661
|
-
/**
|
|
2662
|
-
* Close dialog on click outside
|
|
2663
|
-
*/
|
|
2664
|
-
autoClose: { type: Boolean, default: !0 }
|
|
2665
|
-
}, Vo = {
|
|
2666
|
-
key: 0,
|
|
2667
|
-
class: "vv-dialog__header"
|
|
2668
|
-
}, $o = { class: "vv-dialog__content" }, ko = {
|
|
2669
|
-
key: 1,
|
|
2670
|
-
class: "vv-dialog__footer"
|
|
2671
|
-
}, Ao = {
|
|
2672
|
-
name: "VvDialog"
|
|
2673
|
-
}, $s = /* @__PURE__ */ j({
|
|
2674
|
-
...Ao,
|
|
2675
|
-
props: So,
|
|
2676
|
-
emits: _o,
|
|
2677
|
-
setup(t, { emit: l }) {
|
|
2678
|
-
const e = t, s = et(e, "modelValue", l), o = N(!0), u = N(null), d = n(() => {
|
|
2679
|
-
const { id: i } = e;
|
|
2680
|
-
return {
|
|
2681
|
-
id: i,
|
|
2682
|
-
open: o.value
|
|
2683
|
-
};
|
|
2684
|
-
}), c = n(() => e.size ? ["vv-dialog", `vv-dialog--${e.size}`] : "vv-dialog"), v = n(() => `vv-dialog--${e.transition}`), p = {
|
|
2685
|
-
"before-enter": () => {
|
|
2686
|
-
o.value = !0, l("open");
|
|
2687
|
-
},
|
|
2688
|
-
"after-leave": () => {
|
|
2689
|
-
o.value = !1, l("close");
|
|
2690
|
-
}
|
|
2691
|
-
};
|
|
2692
|
-
jt(u, () => {
|
|
2693
|
-
e.autoClose && (s.value = !1);
|
|
2694
|
-
});
|
|
2695
|
-
function r() {
|
|
2696
|
-
s.value = !1;
|
|
2697
137
|
}
|
|
2698
|
-
|
|
2699
|
-
s.value && (i.preventDefault(), r());
|
|
2700
|
-
}), (i, b) => (f(), H(xt, R({ name: a(v) }, gl(p)), {
|
|
2701
|
-
default: te(() => [
|
|
2702
|
-
Oe(x("dialog", R(a(d), { class: a(c) }), [
|
|
2703
|
-
x("article", {
|
|
2704
|
-
ref_key: "modalWrapper",
|
|
2705
|
-
ref: u,
|
|
2706
|
-
class: "vv-dialog__wrapper"
|
|
2707
|
-
}, [
|
|
2708
|
-
i.$slots.header || i.title ? (f(), g("header", Vo, [
|
|
2709
|
-
V(i.$slots, "header", {}, () => [
|
|
2710
|
-
Y(T(i.title) + " ", 1),
|
|
2711
|
-
x("button", {
|
|
2712
|
-
type: "button",
|
|
2713
|
-
"aria-label": "Close",
|
|
2714
|
-
class: "vv-dialog__close",
|
|
2715
|
-
onClickPassive: r
|
|
2716
|
-
}, [
|
|
2717
|
-
pe(ee, { name: "close" })
|
|
2718
|
-
], 32)
|
|
2719
|
-
])
|
|
2720
|
-
])) : w("", !0),
|
|
2721
|
-
x("div", $o, [
|
|
2722
|
-
V(i.$slots, "default")
|
|
2723
|
-
]),
|
|
2724
|
-
i.$slots.footer ? (f(), g("footer", ko, [
|
|
2725
|
-
V(i.$slots, "footer")
|
|
2726
|
-
])) : w("", !0)
|
|
2727
|
-
], 512)
|
|
2728
|
-
], 16), [
|
|
2729
|
-
[St, a(s)]
|
|
2730
|
-
])
|
|
2731
|
-
]),
|
|
2732
|
-
_: 3
|
|
2733
|
-
}, 16, ["name"]));
|
|
138
|
+
app.provide(INJECTION_KEY_VOLVER, volver);
|
|
2734
139
|
}
|
|
2735
|
-
}
|
|
2736
|
-
TEXT: "text",
|
|
2737
|
-
PASSWORD: "password",
|
|
2738
|
-
NUMBER: "number",
|
|
2739
|
-
EMAIL: "email",
|
|
2740
|
-
TEL: "tel",
|
|
2741
|
-
URL: "url",
|
|
2742
|
-
COLOR: "color",
|
|
2743
|
-
SEARCH: "search",
|
|
2744
|
-
DATE: "date",
|
|
2745
|
-
TIME: "time",
|
|
2746
|
-
DATETIME_LOCAL: "datetime-local",
|
|
2747
|
-
MONTH: "month",
|
|
2748
|
-
WEEK: "week"
|
|
2749
|
-
}, Ie = {
|
|
2750
|
-
PASSWORD_SHOW: "eye-on",
|
|
2751
|
-
PASSWORD_HIDE: "eye-off",
|
|
2752
|
-
DATE: "calendar",
|
|
2753
|
-
TIME: "time",
|
|
2754
|
-
COLOR: "color",
|
|
2755
|
-
SEARCH: "close"
|
|
2756
|
-
}, Co = ["update:modelValue", "focus", "blur", "keyup"], wo = {
|
|
2757
|
-
...al,
|
|
2758
|
-
/**
|
|
2759
|
-
* Input value
|
|
2760
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
2761
|
-
*/
|
|
2762
|
-
modelValue: [String, Number],
|
|
2763
|
-
/**
|
|
2764
|
-
* Type of form control
|
|
2765
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#type
|
|
2766
|
-
*/
|
|
2767
|
-
type: {
|
|
2768
|
-
type: String,
|
|
2769
|
-
default: $.TEXT,
|
|
2770
|
-
validator: (t) => Object.values($).includes(t)
|
|
2771
|
-
},
|
|
2772
|
-
/**
|
|
2773
|
-
* Minimum value
|
|
2774
|
-
* Available for input types: date, month, week, time, datetime-local, number, range.
|
|
2775
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min
|
|
2776
|
-
*/
|
|
2777
|
-
min: [Number, Date, String],
|
|
2778
|
-
/**
|
|
2779
|
-
* Maximum value
|
|
2780
|
-
* Available for input types: date, month, week, time, datetime-local, number, range.
|
|
2781
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max
|
|
2782
|
-
*/
|
|
2783
|
-
max: [Number, Date, String],
|
|
2784
|
-
/**
|
|
2785
|
-
* Incremental values that are valid
|
|
2786
|
-
* Available for input types: date, month, week, time, datetime-local and number
|
|
2787
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step
|
|
2788
|
-
*/
|
|
2789
|
-
step: { type: [String, Number], default: 1 },
|
|
2790
|
-
/**
|
|
2791
|
-
* Pattern the value must match to be valid
|
|
2792
|
-
* Available for input types: text, search, url, tel, email and password
|
|
2793
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern
|
|
2794
|
-
*/
|
|
2795
|
-
pattern: String,
|
|
2796
|
-
/**
|
|
2797
|
-
* Whether to allow multiple values
|
|
2798
|
-
* Available for input type email
|
|
2799
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#multiple
|
|
2800
|
-
*/
|
|
2801
|
-
multiple: Boolean,
|
|
2802
|
-
/**
|
|
2803
|
-
* VvIcon name for show password button
|
|
2804
|
-
* @see VVIcon
|
|
2805
|
-
*/
|
|
2806
|
-
iconShowPassword: {
|
|
2807
|
-
type: String,
|
|
2808
|
-
default: Ie.PASSWORD_SHOW
|
|
2809
|
-
},
|
|
2810
|
-
/**
|
|
2811
|
-
* VvIcon name for hide password button
|
|
2812
|
-
* @see VVIcon
|
|
2813
|
-
*/
|
|
2814
|
-
iconHidePassword: {
|
|
2815
|
-
type: String,
|
|
2816
|
-
default: Ie.PASSWORD_HIDE
|
|
2817
|
-
},
|
|
2818
|
-
/**
|
|
2819
|
-
* VvIcon name for clear button
|
|
2820
|
-
* @see VVIcon
|
|
2821
|
-
*/
|
|
2822
|
-
iconClear: {
|
|
2823
|
-
type: String,
|
|
2824
|
-
default: Ie.SEARCH
|
|
2825
|
-
},
|
|
2826
|
-
/**
|
|
2827
|
-
* Label for step up button
|
|
2828
|
-
*/
|
|
2829
|
-
labelStepUp: {
|
|
2830
|
-
type: String,
|
|
2831
|
-
default: "Increase value"
|
|
2832
|
-
},
|
|
2833
|
-
/**
|
|
2834
|
-
* Label for step down button
|
|
2835
|
-
*/
|
|
2836
|
-
labelStepDown: {
|
|
2837
|
-
type: String,
|
|
2838
|
-
default: "Decrease value"
|
|
2839
|
-
},
|
|
2840
|
-
/**
|
|
2841
|
-
* Label for show password button
|
|
2842
|
-
*/
|
|
2843
|
-
labelShowPassword: {
|
|
2844
|
-
type: String,
|
|
2845
|
-
default: "Show password"
|
|
2846
|
-
},
|
|
2847
|
-
/**
|
|
2848
|
-
* Label for hide password button
|
|
2849
|
-
*/
|
|
2850
|
-
labelHidePassword: {
|
|
2851
|
-
type: String,
|
|
2852
|
-
default: "Hide password"
|
|
2853
|
-
},
|
|
2854
|
-
/**
|
|
2855
|
-
* Label for clear button
|
|
2856
|
-
*/
|
|
2857
|
-
labelClear: {
|
|
2858
|
-
type: String,
|
|
2859
|
-
default: "Clear"
|
|
2860
|
-
}
|
|
2861
|
-
}, Bt = j({
|
|
2862
|
-
components: {
|
|
2863
|
-
VvIcon: ee
|
|
2864
|
-
},
|
|
2865
|
-
props: {
|
|
2866
|
-
disabled: {
|
|
2867
|
-
type: Boolean,
|
|
2868
|
-
default: !1
|
|
2869
|
-
},
|
|
2870
|
-
labelShow: {
|
|
2871
|
-
type: String,
|
|
2872
|
-
default: "Show password"
|
|
2873
|
-
},
|
|
2874
|
-
labelHide: {
|
|
2875
|
-
type: String,
|
|
2876
|
-
default: "Hide password"
|
|
2877
|
-
},
|
|
2878
|
-
iconShow: {
|
|
2879
|
-
type: String,
|
|
2880
|
-
default: Ie.PASSWORD_SHOW
|
|
2881
|
-
},
|
|
2882
|
-
iconHide: {
|
|
2883
|
-
type: String,
|
|
2884
|
-
default: Ie.PASSWORD_HIDE
|
|
2885
|
-
}
|
|
2886
|
-
},
|
|
2887
|
-
emits: ["toggle-password"],
|
|
2888
|
-
setup(t, { emit: l }) {
|
|
2889
|
-
const e = N(!1), s = n(
|
|
2890
|
-
() => e.value ? t.iconHide : t.iconShow
|
|
2891
|
-
);
|
|
2892
|
-
function o(u) {
|
|
2893
|
-
u == null || u.stopPropagation(), t.disabled || (e.value = !e.value, l("toggle-password", e.value));
|
|
2894
|
-
}
|
|
2895
|
-
return {
|
|
2896
|
-
active: e,
|
|
2897
|
-
activeIcon: s,
|
|
2898
|
-
onClick: o
|
|
2899
|
-
};
|
|
2900
|
-
},
|
|
2901
|
-
render() {
|
|
2902
|
-
const t = be(ee, {
|
|
2903
|
-
name: this.activeIcon,
|
|
2904
|
-
class: "vv-input-text__action-icon"
|
|
2905
|
-
});
|
|
2906
|
-
return be(
|
|
2907
|
-
"button",
|
|
2908
|
-
{
|
|
2909
|
-
disabled: this.disabled,
|
|
2910
|
-
class: "vv-input-text__action",
|
|
2911
|
-
ariaLabel: this.active ? this.labelHide : this.labelShow,
|
|
2912
|
-
type: "button",
|
|
2913
|
-
onClick: this.onClick
|
|
2914
|
-
},
|
|
2915
|
-
t
|
|
2916
|
-
);
|
|
2917
|
-
}
|
|
2918
|
-
}), vt = j({
|
|
2919
|
-
components: {
|
|
2920
|
-
VvIcon: ee
|
|
2921
|
-
},
|
|
2922
|
-
props: {
|
|
2923
|
-
disabled: {
|
|
2924
|
-
type: Boolean,
|
|
2925
|
-
default: !1
|
|
2926
|
-
},
|
|
2927
|
-
label: {
|
|
2928
|
-
type: String
|
|
2929
|
-
},
|
|
2930
|
-
mode: {
|
|
2931
|
-
type: String,
|
|
2932
|
-
validator: (t) => ["up", "down"].includes(t),
|
|
2933
|
-
default: "up"
|
|
2934
|
-
}
|
|
2935
|
-
},
|
|
2936
|
-
emits: ["step-up", "step-down"],
|
|
2937
|
-
setup(t, { emit: l }) {
|
|
2938
|
-
const e = n(() => t.mode === "up");
|
|
2939
|
-
return {
|
|
2940
|
-
isUp: e,
|
|
2941
|
-
onClick: (o) => {
|
|
2942
|
-
o == null || o.stopPropagation(), t.disabled || l(e.value ? "step-up" : "step-down");
|
|
2943
|
-
}
|
|
2944
|
-
};
|
|
2945
|
-
},
|
|
2946
|
-
render() {
|
|
2947
|
-
return be("button", {
|
|
2948
|
-
class: [
|
|
2949
|
-
"vv-input-text__action-chevron",
|
|
2950
|
-
this.isUp && "vv-input-text__action-chevron-up"
|
|
2951
|
-
],
|
|
2952
|
-
disabled: this.disabled,
|
|
2953
|
-
ariaLabel: this.label,
|
|
2954
|
-
onClick: this.onClick
|
|
2955
|
-
});
|
|
2956
|
-
}
|
|
2957
|
-
}), Tt = j({
|
|
2958
|
-
components: {
|
|
2959
|
-
VvIcon: ee
|
|
2960
|
-
},
|
|
2961
|
-
props: {
|
|
2962
|
-
disabled: {
|
|
2963
|
-
type: Boolean,
|
|
2964
|
-
default: !1
|
|
2965
|
-
},
|
|
2966
|
-
label: {
|
|
2967
|
-
type: String,
|
|
2968
|
-
default: "Clear"
|
|
2969
|
-
},
|
|
2970
|
-
icon: {
|
|
2971
|
-
type: String,
|
|
2972
|
-
default: "close"
|
|
2973
|
-
}
|
|
2974
|
-
},
|
|
2975
|
-
emits: ["clear"],
|
|
2976
|
-
setup(t, { emit: l }) {
|
|
2977
|
-
function e(s) {
|
|
2978
|
-
s == null || s.stopPropagation(), t.disabled || l("clear");
|
|
2979
|
-
}
|
|
2980
|
-
return {
|
|
2981
|
-
onClick: e
|
|
2982
|
-
};
|
|
2983
|
-
},
|
|
2984
|
-
render() {
|
|
2985
|
-
const t = be(ee, {
|
|
2986
|
-
name: this.icon,
|
|
2987
|
-
class: "vv-input-text__action-icon"
|
|
2988
|
-
});
|
|
2989
|
-
return be(
|
|
2990
|
-
"button",
|
|
2991
|
-
{
|
|
2992
|
-
disabled: this.disabled,
|
|
2993
|
-
class: "vv-input-text__action",
|
|
2994
|
-
ariaLabel: this.label,
|
|
2995
|
-
type: "button",
|
|
2996
|
-
onClick: this.onClick
|
|
2997
|
-
},
|
|
2998
|
-
t
|
|
2999
|
-
);
|
|
3000
|
-
}
|
|
3001
|
-
});
|
|
3002
|
-
function ft(t, l) {
|
|
3003
|
-
return {
|
|
3004
|
-
name: "VvInputTextActions",
|
|
3005
|
-
components: {
|
|
3006
|
-
VvIcon: ee,
|
|
3007
|
-
VvInputPasswordAction: Bt,
|
|
3008
|
-
VvInputStepAction: vt,
|
|
3009
|
-
VvInputClearAction: Tt
|
|
3010
|
-
},
|
|
3011
|
-
setup() {
|
|
3012
|
-
return {
|
|
3013
|
-
isDisabled: n(() => l.disabled || l.readonly),
|
|
3014
|
-
labelStepUp: l.labelStepUp,
|
|
3015
|
-
labelStepDown: l.labelStepDown,
|
|
3016
|
-
labelShowPassword: l.labelShowPassword,
|
|
3017
|
-
labelHidePassword: l.labelHidePassword,
|
|
3018
|
-
labelClear: l.labelClear,
|
|
3019
|
-
iconShowPassword: l.iconShowPassword,
|
|
3020
|
-
iconHidePassword: l.iconHidePassword
|
|
3021
|
-
};
|
|
3022
|
-
},
|
|
3023
|
-
render() {
|
|
3024
|
-
let e = null;
|
|
3025
|
-
switch (t) {
|
|
3026
|
-
case $.SEARCH: {
|
|
3027
|
-
const { onClear: s } = this.$attrs;
|
|
3028
|
-
e = [
|
|
3029
|
-
be(Tt, {
|
|
3030
|
-
disabled: this.isDisabled,
|
|
3031
|
-
label: this.labelShowPassword,
|
|
3032
|
-
onClear: s
|
|
3033
|
-
})
|
|
3034
|
-
];
|
|
3035
|
-
break;
|
|
3036
|
-
}
|
|
3037
|
-
case $.PASSWORD: {
|
|
3038
|
-
const { onTogglePassword: s } = this.$attrs;
|
|
3039
|
-
e = [
|
|
3040
|
-
be(Bt, {
|
|
3041
|
-
disabled: this.isDisabled,
|
|
3042
|
-
onTogglePassword: s,
|
|
3043
|
-
labelShow: this.labelShowPassword,
|
|
3044
|
-
labelHide: this.labelHidePassword,
|
|
3045
|
-
iconShow: this.iconShowPassword,
|
|
3046
|
-
iconHide: this.iconHidePassword
|
|
3047
|
-
})
|
|
3048
|
-
];
|
|
3049
|
-
break;
|
|
3050
|
-
}
|
|
3051
|
-
case $.NUMBER: {
|
|
3052
|
-
const { onStepUp: s, onStepDown: o } = this.$attrs;
|
|
3053
|
-
e = [
|
|
3054
|
-
be(vt, {
|
|
3055
|
-
mode: "up",
|
|
3056
|
-
disabled: this.isDisabled || l.max !== void 0 && l.modelValue === l.max,
|
|
3057
|
-
label: this.labelStepUp,
|
|
3058
|
-
onStepUp: s,
|
|
3059
|
-
onStepDown: o
|
|
3060
|
-
}),
|
|
3061
|
-
be(vt, {
|
|
3062
|
-
mode: "down",
|
|
3063
|
-
disabled: this.isDisabled || l.min !== void 0 && l.modelValue === l.min,
|
|
3064
|
-
label: this.labelStepDown,
|
|
3065
|
-
onStepUp: s,
|
|
3066
|
-
onStepDown: o
|
|
3067
|
-
})
|
|
3068
|
-
];
|
|
3069
|
-
break;
|
|
3070
|
-
}
|
|
3071
|
-
}
|
|
3072
|
-
return Array.isArray(e) ? be("div", { class: "vv-input-text__actions-group" }, e) : e;
|
|
3073
|
-
}
|
|
3074
|
-
};
|
|
3075
|
-
}
|
|
3076
|
-
function ul(t, l, e = 0) {
|
|
3077
|
-
let s;
|
|
3078
|
-
return typeof e == "string" && (e = parseInt(e)), n({
|
|
3079
|
-
get: () => t == null ? void 0 : t.value,
|
|
3080
|
-
set: (o) => {
|
|
3081
|
-
s && clearTimeout(s), s = setTimeout(() => {
|
|
3082
|
-
l("update:modelValue", o);
|
|
3083
|
-
}, e);
|
|
3084
|
-
}
|
|
3085
|
-
});
|
|
3086
|
-
}
|
|
3087
|
-
function dl(t, l) {
|
|
3088
|
-
const e = n(() => (a(t) ?? "").length), s = n(() => (l == null ? void 0 : l.lowerLimit) !== void 0 && e.value < (l == null ? void 0 : l.lowerLimit) ? e.value - l.lowerLimit : (l == null ? void 0 : l.upperLimit) !== void 0 && e.value < (l == null ? void 0 : l.upperLimit) ? l.upperLimit - e.value : 0), o = n(() => (l == null ? void 0 : l.mode) === !1 ? "" : (l == null ? void 0 : l.mode) === "limit" && (l != null && l.upperLimit) ? `${e.value} / ${l.lowerLimit ? `${l.lowerLimit}-` : ""}${l.upperLimit}` : (l == null ? void 0 : l.mode) === "countdown" ? s.value === 0 ? void 0 : s : e.value);
|
|
3089
|
-
return {
|
|
3090
|
-
length: e,
|
|
3091
|
-
gap: s,
|
|
3092
|
-
formatted: o
|
|
3093
|
-
};
|
|
3094
|
-
}
|
|
3095
|
-
const Io = ["for"], Eo = { class: "vv-input-text__wrapper" }, Po = {
|
|
3096
|
-
key: 0,
|
|
3097
|
-
class: "vv-input-text__input-before"
|
|
3098
|
-
}, Oo = { class: "vv-input-text__inner" }, Do = ["id"], Lo = {
|
|
3099
|
-
key: 1,
|
|
3100
|
-
class: "vv-input-text__input-after"
|
|
3101
|
-
}, Bo = {
|
|
3102
|
-
key: 2,
|
|
3103
|
-
class: "vv-input-text__limit"
|
|
3104
|
-
}, To = {
|
|
3105
|
-
name: "VvInputText"
|
|
3106
|
-
}, ks = /* @__PURE__ */ j({
|
|
3107
|
-
...To,
|
|
3108
|
-
props: wo,
|
|
3109
|
-
emits: Co,
|
|
3110
|
-
setup(t, { emit: l }) {
|
|
3111
|
-
const e = t, s = Ae(), o = N(), {
|
|
3112
|
-
id: u,
|
|
3113
|
-
icon: d,
|
|
3114
|
-
iconPosition: c,
|
|
3115
|
-
label: v,
|
|
3116
|
-
modelValue: p,
|
|
3117
|
-
count: r,
|
|
3118
|
-
valid: i,
|
|
3119
|
-
invalid: b,
|
|
3120
|
-
loading: _
|
|
3121
|
-
} = G(e), k = Le(u), A = n(() => `${k.value}-hint`), y = n(
|
|
3122
|
-
() => e.floating && ge(e.placeholder) ? " " : e.placeholder
|
|
3123
|
-
), m = ul(p, l, e.debounce), { focused: I } = it(o, l), O = $t(o);
|
|
3124
|
-
ve(O, (E) => {
|
|
3125
|
-
E && e.autofocus && (I.value = !0);
|
|
3126
|
-
});
|
|
3127
|
-
const D = N(!1), L = n(() => e.type === $.PASSWORD), M = () => {
|
|
3128
|
-
D.value = !D.value;
|
|
3129
|
-
}, C = n(
|
|
3130
|
-
() => e.type === $.TIME || e.type === $.DATETIME_LOCAL || e.type === $.DATE || e.type === $.WEEK || e.type === $.MONTH
|
|
3131
|
-
), se = n(() => e.type === $.NUMBER), P = () => {
|
|
3132
|
-
re.value && (o.value.stepUp(), m.value = a(o).value);
|
|
3133
|
-
}, W = () => {
|
|
3134
|
-
re.value && (o.value.stepDown(), m.value = a(o).value);
|
|
3135
|
-
}, F = n(() => e.type === $.SEARCH), ue = () => {
|
|
3136
|
-
m.value = void 0;
|
|
3137
|
-
}, { hasIcon: he, hasIconBefore: ye, hasIconAfter: ne } = ut(
|
|
3138
|
-
d,
|
|
3139
|
-
c
|
|
3140
|
-
), de = n(() => {
|
|
3141
|
-
switch (e.type) {
|
|
3142
|
-
case $.COLOR:
|
|
3143
|
-
return { name: Ie.COLOR };
|
|
3144
|
-
case $.DATE:
|
|
3145
|
-
case $.DATETIME_LOCAL:
|
|
3146
|
-
case $.WEEK:
|
|
3147
|
-
case $.MONTH:
|
|
3148
|
-
return { name: Ie.DATE };
|
|
3149
|
-
case $.TIME:
|
|
3150
|
-
return { name: Ie.TIME };
|
|
3151
|
-
default:
|
|
3152
|
-
return "";
|
|
3153
|
-
}
|
|
3154
|
-
}), { formatted: _e } = dl(m, {
|
|
3155
|
-
mode: e.count,
|
|
3156
|
-
upperLimit: e.maxlength,
|
|
3157
|
-
lowerLimit: e.minlength
|
|
3158
|
-
}), re = n(() => !e.disabled && !e.readonly), Ve = n(
|
|
3159
|
-
() => re.value ? e.tabindex : -1
|
|
3160
|
-
), J = n(() => !ge(p)), B = n(() => {
|
|
3161
|
-
if (b.value === !0)
|
|
3162
|
-
return !0;
|
|
3163
|
-
if (i.value === !0)
|
|
3164
|
-
return !1;
|
|
3165
|
-
}), { modifiers: Q } = G(e), ae = X(
|
|
3166
|
-
"vv-input-text",
|
|
3167
|
-
Q,
|
|
3168
|
-
n(() => ({
|
|
3169
|
-
valid: i.value,
|
|
3170
|
-
invalid: b.value,
|
|
3171
|
-
loading: _.value,
|
|
3172
|
-
disabled: e.disabled,
|
|
3173
|
-
readonly: e.readonly,
|
|
3174
|
-
"icon-before": ye.value,
|
|
3175
|
-
"icon-after": ne.value || !ge(de),
|
|
3176
|
-
floating: e.floating && !ge(e.label),
|
|
3177
|
-
dirty: J.value,
|
|
3178
|
-
focus: I.value
|
|
3179
|
-
}))
|
|
3180
|
-
), Se = n(() => {
|
|
3181
|
-
const E = (() => L.value && D.value || C.value && !J.value && !I.value ? $.TEXT : e.type)(), oe = {
|
|
3182
|
-
type: E,
|
|
3183
|
-
name: e.name,
|
|
3184
|
-
tabindex: Ve.value,
|
|
3185
|
-
disabled: e.disabled,
|
|
3186
|
-
readonly: e.readonly,
|
|
3187
|
-
required: e.required,
|
|
3188
|
-
autocomplete: e.autocomplete,
|
|
3189
|
-
"aria-invalid": B.value,
|
|
3190
|
-
"aria-describedby": !ce.value && U.value ? A.value : void 0,
|
|
3191
|
-
"aria-errormessage": ce.value ? A.value : void 0
|
|
3192
|
-
};
|
|
3193
|
-
return (E === $.DATE || E === $.MONTH || E === $.WEEK || E === $.TIME || E === $.DATETIME_LOCAL || E === $.NUMBER) && (oe.step = e.step, oe.max = String(e.max), oe.min = String(e.min)), (E === $.TEXT || E === $.SEARCH || E === $.URL || E === $.TEL || E === $.EMAIL || E === $.PASSWORD || E === $.NUMBER) && (oe.placeholder = y.value), (E === $.TEXT || E === $.SEARCH || E === $.URL || E === $.TEL || E === $.EMAIL || E === $.PASSWORD) && (oe.minlength = e.minlength, oe.maxlength = e.maxlength, oe.pattern = e.pattern), E === $.EMAIL && (oe.multiple = e.multiple), oe;
|
|
3194
|
-
}), Ce = n(() => ({
|
|
3195
|
-
valid: e.valid,
|
|
3196
|
-
invalid: e.invalid,
|
|
3197
|
-
modelValue: e.modelValue,
|
|
3198
|
-
togglePassword: M,
|
|
3199
|
-
stepUp: P,
|
|
3200
|
-
stepDown: W,
|
|
3201
|
-
clear: ue
|
|
3202
|
-
})), { HintSlot: h, hasHint: U, hasInvalid: ce } = Be(e, s), $e = ft(
|
|
3203
|
-
$.PASSWORD,
|
|
3204
|
-
e
|
|
3205
|
-
), dt = ft(
|
|
3206
|
-
$.NUMBER,
|
|
3207
|
-
e
|
|
3208
|
-
), Me = ft(
|
|
3209
|
-
$.SEARCH,
|
|
3210
|
-
e
|
|
3211
|
-
);
|
|
3212
|
-
return (E, oe) => (f(), g("div", {
|
|
3213
|
-
class: le(a(ae))
|
|
3214
|
-
}, [
|
|
3215
|
-
a(v) ? (f(), g("label", {
|
|
3216
|
-
key: 0,
|
|
3217
|
-
for: a(k),
|
|
3218
|
-
class: "vv-input-text__label"
|
|
3219
|
-
}, T(a(v)), 9, Io)) : w("", !0),
|
|
3220
|
-
x("div", Eo, [
|
|
3221
|
-
E.$slots.before ? (f(), g("div", Po, [
|
|
3222
|
-
V(E.$slots, "before", K(z(a(Ce))))
|
|
3223
|
-
])) : w("", !0),
|
|
3224
|
-
x("div", Oo, [
|
|
3225
|
-
a(ye) ? (f(), H(ee, R({
|
|
3226
|
-
key: 0,
|
|
3227
|
-
class: "vv-input-text__icon"
|
|
3228
|
-
}, a(he)), null, 16)) : w("", !0),
|
|
3229
|
-
Oe(x("input", R({
|
|
3230
|
-
id: a(k),
|
|
3231
|
-
ref_key: "input",
|
|
3232
|
-
ref: o,
|
|
3233
|
-
"onUpdate:modelValue": oe[0] || (oe[0] = (Re) => Ee(m) ? m.value = Re : null)
|
|
3234
|
-
}, a(Se), {
|
|
3235
|
-
onKeyup: oe[1] || (oe[1] = (Re) => l("keyup", Re))
|
|
3236
|
-
}), null, 16, Do), [
|
|
3237
|
-
[_l, a(m)]
|
|
3238
|
-
]),
|
|
3239
|
-
a(ne) || a(de) ? (f(), H(ee, R({
|
|
3240
|
-
key: 1,
|
|
3241
|
-
class: "vv-input-text__icon vv-input-text__icon-after"
|
|
3242
|
-
}, a(ne) ? a(he) : a(de)), null, 16)) : a(L) ? (f(), H(a($e), {
|
|
3243
|
-
key: 2,
|
|
3244
|
-
onTogglePassword: M
|
|
3245
|
-
})) : a(se) ? (f(), H(a(dt), {
|
|
3246
|
-
key: 3,
|
|
3247
|
-
onStepUp: P,
|
|
3248
|
-
onStepDown: W
|
|
3249
|
-
})) : a(F) ? (f(), H(a(Me), {
|
|
3250
|
-
key: 4,
|
|
3251
|
-
onClear: ue
|
|
3252
|
-
})) : w("", !0)
|
|
3253
|
-
]),
|
|
3254
|
-
E.$slots.after ? (f(), g("div", Lo, [
|
|
3255
|
-
V(E.$slots, "after", K(z(a(Ce))))
|
|
3256
|
-
])) : w("", !0),
|
|
3257
|
-
a(r) ? (f(), g("span", Bo, [
|
|
3258
|
-
V(E.$slots, "count", K(z(a(Ce))), () => [
|
|
3259
|
-
Y(T(a(_e)), 1)
|
|
3260
|
-
])
|
|
3261
|
-
])) : w("", !0)
|
|
3262
|
-
]),
|
|
3263
|
-
pe(a(h), {
|
|
3264
|
-
id: a(A),
|
|
3265
|
-
class: "vv-input-text__hint"
|
|
3266
|
-
}, null, 8, ["id"])
|
|
3267
|
-
], 2));
|
|
3268
|
-
}
|
|
3269
|
-
}), No = {
|
|
3270
|
-
...me,
|
|
3271
|
-
/**
|
|
3272
|
-
* Progress value
|
|
3273
|
-
* This attribute specifies how much of the task that has been completed.
|
|
3274
|
-
* It must be a valid floating point number between 0 and max, or between 0 and 1 if max is omitted.
|
|
3275
|
-
* If there is no value attribute, the progress bar is indeterminate.
|
|
3276
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#attr-max
|
|
3277
|
-
*/
|
|
3278
|
-
value: {
|
|
3279
|
-
type: [Number, String],
|
|
3280
|
-
default: void 0
|
|
3281
|
-
},
|
|
3282
|
-
/**
|
|
3283
|
-
* Progress max
|
|
3284
|
-
* This attribute describes how much work the task indicated by the progress element requires.
|
|
3285
|
-
* The max attribute, if present, must have a value greater than 0 and be a valid floating point number. The default value is 1.
|
|
3286
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#attr-max
|
|
3287
|
-
*/
|
|
3288
|
-
max: {
|
|
3289
|
-
type: [Number, String]
|
|
3290
|
-
},
|
|
3291
|
-
/**
|
|
3292
|
-
* Progress aria-label
|
|
3293
|
-
*/
|
|
3294
|
-
label: {
|
|
3295
|
-
type: String,
|
|
3296
|
-
required: !0
|
|
3297
|
-
}
|
|
3298
|
-
}, Ro = {
|
|
3299
|
-
name: "VvProgress"
|
|
3300
|
-
}, As = /* @__PURE__ */ j({
|
|
3301
|
-
...Ro,
|
|
3302
|
-
props: No,
|
|
3303
|
-
setup(t) {
|
|
3304
|
-
const l = t, { value: e, max: s, label: o } = G(l), u = n(() => l.value === void 0), { modifiers: d } = G(l), c = X(
|
|
3305
|
-
"vv-progress",
|
|
3306
|
-
d,
|
|
3307
|
-
n(() => ({ indeterminate: u.value }))
|
|
3308
|
-
);
|
|
3309
|
-
return (v, p) => (f(), g("progress", R({ role: "progressbar" }, {
|
|
3310
|
-
class: a(c),
|
|
3311
|
-
ariaLabel: a(o),
|
|
3312
|
-
max: a(s),
|
|
3313
|
-
value: a(e)
|
|
3314
|
-
}), null, 16));
|
|
3315
|
-
}
|
|
3316
|
-
}), Ho = ol, xo = ["click", "update:modelValue", "change", "blur"];
|
|
3317
|
-
function Mo(t, l) {
|
|
3318
|
-
const { id: e } = G(t), { group: s, isInGroup: o, getGroupOrLocalRef: u } = tt(Yt), d = u("modelValue", t, l), c = u("readonly", t), v = u("disabled", t), p = u("valid", t), r = u("invalid", t);
|
|
3319
|
-
return {
|
|
3320
|
-
// local props
|
|
3321
|
-
id: e,
|
|
3322
|
-
// global props
|
|
3323
|
-
group: s,
|
|
3324
|
-
isInGroup: o,
|
|
3325
|
-
modelValue: d,
|
|
3326
|
-
readonly: c,
|
|
3327
|
-
disabled: v,
|
|
3328
|
-
valid: p,
|
|
3329
|
-
invalid: r
|
|
3330
|
-
};
|
|
3331
|
-
}
|
|
3332
|
-
const Go = ["for"], jo = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Wo = {
|
|
3333
|
-
name: "VvRadio"
|
|
3334
|
-
}, Uo = /* @__PURE__ */ j({
|
|
3335
|
-
...Wo,
|
|
3336
|
-
props: Ho,
|
|
3337
|
-
emits: xo,
|
|
3338
|
-
setup(t, { emit: l }) {
|
|
3339
|
-
const e = t, s = Ae(), { id: o, disabled: u, readonly: d, modelValue: c, valid: v, invalid: p } = Mo(e, l), r = Le(o), i = n(() => _.value ? -1 : e.tabindex), b = N(), _ = n(() => u.value || d.value), k = n(() => {
|
|
3340
|
-
if (p.value === !0)
|
|
3341
|
-
return !0;
|
|
3342
|
-
if (v.value === !0)
|
|
3343
|
-
return !1;
|
|
3344
|
-
}), A = n(
|
|
3345
|
-
() => Array.isArray(c.value) ? we(e.value, c.value) : Pe(e.value, c.value)
|
|
3346
|
-
), y = n(
|
|
3347
|
-
() => ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0
|
|
3348
|
-
), m = n({
|
|
3349
|
-
get() {
|
|
3350
|
-
return A.value ? y.value : null;
|
|
3351
|
-
},
|
|
3352
|
-
set(L) {
|
|
3353
|
-
Array.isArray(c.value) ? c.value = [e.value] : c.value = e.value, l("change", L);
|
|
3354
|
-
}
|
|
3355
|
-
}), { modifiers: I } = G(e), O = X(
|
|
3356
|
-
"vv-radio",
|
|
3357
|
-
I,
|
|
3358
|
-
n(() => ({
|
|
3359
|
-
valid: v.value,
|
|
3360
|
-
invalid: p.value,
|
|
3361
|
-
disabled: u.value,
|
|
3362
|
-
readonly: d.value
|
|
3363
|
-
}))
|
|
3364
|
-
), { HintSlot: D } = Be(e, s);
|
|
3365
|
-
return (L, M) => (f(), g("label", {
|
|
3366
|
-
class: le(a(O)),
|
|
3367
|
-
for: a(r)
|
|
3368
|
-
}, [
|
|
3369
|
-
Oe(x("input", {
|
|
3370
|
-
id: a(r),
|
|
3371
|
-
ref_key: "input",
|
|
3372
|
-
ref: b,
|
|
3373
|
-
"onUpdate:modelValue": M[0] || (M[0] = (C) => Ee(m) ? m.value = C : null),
|
|
3374
|
-
type: "radio",
|
|
3375
|
-
class: "vv-radio__input",
|
|
3376
|
-
name: L.name,
|
|
3377
|
-
disabled: a(_),
|
|
3378
|
-
value: a(y),
|
|
3379
|
-
tabindex: a(i),
|
|
3380
|
-
"aria-invalid": a(k)
|
|
3381
|
-
}, null, 8, jo), [
|
|
3382
|
-
[Sl, a(m)]
|
|
3383
|
-
]),
|
|
3384
|
-
V(L.$slots, "default", { value: a(c) }, () => [
|
|
3385
|
-
Y(T(L.label), 1)
|
|
3386
|
-
]),
|
|
3387
|
-
pe(a(D), {
|
|
3388
|
-
class: "vv-radio__hint",
|
|
3389
|
-
params: { value: a(c) }
|
|
3390
|
-
}, null, 8, ["params"])
|
|
3391
|
-
], 10, Go));
|
|
3392
|
-
}
|
|
3393
|
-
}), Fo = sl, Ko = ["update:modelValue", "change"], zo = ["textContent"], qo = { class: "vv-radio-group__wrapper" }, Yo = {
|
|
3394
|
-
name: "VvRadioGroup"
|
|
3395
|
-
}, Cs = /* @__PURE__ */ j({
|
|
3396
|
-
...Yo,
|
|
3397
|
-
props: Fo,
|
|
3398
|
-
emits: Ko,
|
|
3399
|
-
setup(t, { emit: l }) {
|
|
3400
|
-
const e = t, s = Ae(), o = et(e, "modelValue", l), { disabled: u, readonly: d, vertical: c, valid: v, invalid: p, modifiers: r } = G(e);
|
|
3401
|
-
lt({
|
|
3402
|
-
key: Yt,
|
|
3403
|
-
modelValue: o,
|
|
3404
|
-
disabled: u,
|
|
3405
|
-
readonly: d,
|
|
3406
|
-
valid: v,
|
|
3407
|
-
invalid: p
|
|
3408
|
-
});
|
|
3409
|
-
const { getOptionLabel: i, getOptionValue: b } = rt(e), _ = X(
|
|
3410
|
-
"vv-radio-group",
|
|
3411
|
-
r,
|
|
3412
|
-
n(() => ({
|
|
3413
|
-
disabled: u.value,
|
|
3414
|
-
readonly: d.value,
|
|
3415
|
-
horizontal: !c.value,
|
|
3416
|
-
valid: v.value,
|
|
3417
|
-
invalid: p.value
|
|
3418
|
-
}))
|
|
3419
|
-
), k = (y, m) => ({
|
|
3420
|
-
id: `${e.name}_opt${m}`,
|
|
3421
|
-
name: e.name,
|
|
3422
|
-
label: i(y),
|
|
3423
|
-
value: b(y)
|
|
3424
|
-
}), { HintSlot: A } = Be(e, s);
|
|
3425
|
-
return (y, m) => (f(), g("fieldset", {
|
|
3426
|
-
class: le(a(_))
|
|
3427
|
-
}, [
|
|
3428
|
-
y.label ? (f(), g("legend", {
|
|
3429
|
-
key: 0,
|
|
3430
|
-
textContent: T(y.label)
|
|
3431
|
-
}, null, 8, zo)) : w("", !0),
|
|
3432
|
-
x("div", qo, [
|
|
3433
|
-
y.options.length > 0 ? (f(!0), g(ie, { key: 0 }, Ne(y.options, (I, O) => (f(), H(Uo, R({ key: O }, k(I, O)), null, 16))), 128)) : V(y.$slots, "default", { key: 1 })
|
|
3434
|
-
]),
|
|
3435
|
-
pe(a(A), { class: "vv-radio-group__hint" })
|
|
3436
|
-
], 2));
|
|
3437
|
-
}
|
|
3438
|
-
}), Jo = {
|
|
3439
|
-
hard: "hard",
|
|
3440
|
-
soft: "soft"
|
|
3441
|
-
}, Xo = {
|
|
3442
|
-
true: !0,
|
|
3443
|
-
false: !1,
|
|
3444
|
-
default: "default"
|
|
3445
|
-
}, Qo = ["update:modelValue", "focus", "blur", "keyup"], Zo = {
|
|
3446
|
-
...al,
|
|
3447
|
-
/**
|
|
3448
|
-
* Textarea value
|
|
3449
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#value
|
|
3450
|
-
*/
|
|
3451
|
-
modelValue: String,
|
|
3452
|
-
/**
|
|
3453
|
-
* The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is 20.
|
|
3454
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#cols
|
|
3455
|
-
*/
|
|
3456
|
-
cols: { type: [String, Number], default: 20 },
|
|
3457
|
-
/**
|
|
3458
|
-
* The number of visible text lines for the control. If it is specified, it must be a positive integer. If it is not specified, the default value is 2.
|
|
3459
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#rows
|
|
3460
|
-
*/
|
|
3461
|
-
rows: { type: [String, Number], default: 2 },
|
|
3462
|
-
/**
|
|
3463
|
-
* Indicates how the control should wrap the value for form submission.
|
|
3464
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
|
|
3465
|
-
*/
|
|
3466
|
-
wrap: { type: String, default: Jo.soft },
|
|
3467
|
-
/**
|
|
3468
|
-
* Specifies whether the <textarea> is subject to spell checking by the underlying browser/OS.
|
|
3469
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
|
|
3470
|
-
*/
|
|
3471
|
-
spellcheck: { type: [Boolean, String], default: Xo.default },
|
|
3472
|
-
/**
|
|
3473
|
-
* If true, the textarea will be resizable
|
|
3474
|
-
*/
|
|
3475
|
-
resizable: Boolean
|
|
3476
|
-
}, es = ["for"], ts = { class: "vv-textarea__wrapper" }, ls = {
|
|
3477
|
-
key: 0,
|
|
3478
|
-
class: "vv-textarea__input-before"
|
|
3479
|
-
}, as = { class: "vv-textarea__inner" }, os = ["id"], ss = {
|
|
3480
|
-
key: 1,
|
|
3481
|
-
class: "vv-textarea__input-after"
|
|
3482
|
-
}, ns = {
|
|
3483
|
-
key: 2,
|
|
3484
|
-
class: "vv-textarea__limit"
|
|
3485
|
-
}, rs = {
|
|
3486
|
-
name: "VvTextarea"
|
|
3487
|
-
}, ws = /* @__PURE__ */ j({
|
|
3488
|
-
...rs,
|
|
3489
|
-
props: Zo,
|
|
3490
|
-
emits: Qo,
|
|
3491
|
-
setup(t, { emit: l }) {
|
|
3492
|
-
const e = t, s = Ae(), o = N(), {
|
|
3493
|
-
id: u,
|
|
3494
|
-
icon: d,
|
|
3495
|
-
iconPosition: c,
|
|
3496
|
-
label: v,
|
|
3497
|
-
modelValue: p,
|
|
3498
|
-
count: r,
|
|
3499
|
-
valid: i,
|
|
3500
|
-
invalid: b,
|
|
3501
|
-
loading: _,
|
|
3502
|
-
modifiers: k
|
|
3503
|
-
} = G(e), A = Le(u), y = n(() => `${A.value}-hint`), m = n(
|
|
3504
|
-
() => e.floating && ge(e.placeholder) ? " " : e.placeholder
|
|
3505
|
-
), I = ul(p, l, e.debounce), { hasIcon: O, hasIconBefore: D, hasIconAfter: L } = ut(
|
|
3506
|
-
d,
|
|
3507
|
-
c
|
|
3508
|
-
), { focused: M } = it(o, l), C = $t(o);
|
|
3509
|
-
ve(C, (J) => {
|
|
3510
|
-
J && e.autofocus && (M.value = !0);
|
|
3511
|
-
});
|
|
3512
|
-
const { formatted: se } = dl(I, {
|
|
3513
|
-
mode: e.count,
|
|
3514
|
-
upperLimit: e.maxlength,
|
|
3515
|
-
lowerLimit: e.minlength
|
|
3516
|
-
}), P = n(() => !e.disabled && !e.readonly), W = n(
|
|
3517
|
-
() => P.value ? e.tabindex : -1
|
|
3518
|
-
), F = n(() => !ge(p)), ue = n(() => {
|
|
3519
|
-
if (e.invalid === !0)
|
|
3520
|
-
return !0;
|
|
3521
|
-
if (e.valid === !0)
|
|
3522
|
-
return !1;
|
|
3523
|
-
}), { HintSlot: he, hasHint: ye, hasInvalid: ne } = Be(e, s), de = X(
|
|
3524
|
-
"vv-textarea",
|
|
3525
|
-
k,
|
|
3526
|
-
n(() => ({
|
|
3527
|
-
valid: i.value,
|
|
3528
|
-
invalid: b.value,
|
|
3529
|
-
loading: _.value,
|
|
3530
|
-
disabled: e.disabled,
|
|
3531
|
-
readonly: e.readonly,
|
|
3532
|
-
"icon-before": D.value,
|
|
3533
|
-
"icon-after": L.value,
|
|
3534
|
-
floating: e.floating && !ge(e.label),
|
|
3535
|
-
dirty: F.value,
|
|
3536
|
-
focused: M.value,
|
|
3537
|
-
resizable: e.resizable
|
|
3538
|
-
}))
|
|
3539
|
-
), _e = n(
|
|
3540
|
-
() => ({
|
|
3541
|
-
name: e.name,
|
|
3542
|
-
placeholder: m.value,
|
|
3543
|
-
tabindex: W.value,
|
|
3544
|
-
disabled: e.disabled,
|
|
3545
|
-
readonly: e.readonly,
|
|
3546
|
-
required: e.required,
|
|
3547
|
-
autocomplete: e.autocomplete,
|
|
3548
|
-
minlength: e.minlength,
|
|
3549
|
-
maxlength: e.maxlength,
|
|
3550
|
-
cols: e.cols,
|
|
3551
|
-
rows: e.rows,
|
|
3552
|
-
wrap: e.wrap,
|
|
3553
|
-
spellcheck: e.spellcheck,
|
|
3554
|
-
"aria-invalid": ue.value,
|
|
3555
|
-
"aria-describedby": !ne.value && ye.value ? y.value : void 0,
|
|
3556
|
-
"aria-errormessage": ne.value ? y.value : void 0
|
|
3557
|
-
})
|
|
3558
|
-
), re = n(() => ({
|
|
3559
|
-
valid: e.valid,
|
|
3560
|
-
invalid: e.invalid,
|
|
3561
|
-
modelValue: e.modelValue,
|
|
3562
|
-
hintLabel: e.hintLabel,
|
|
3563
|
-
maxlength: e.maxlength,
|
|
3564
|
-
minlength: e.minlength,
|
|
3565
|
-
clear: Ve
|
|
3566
|
-
})), Ve = () => {
|
|
3567
|
-
I.value = void 0;
|
|
3568
|
-
};
|
|
3569
|
-
return (J, B) => (f(), g("div", {
|
|
3570
|
-
class: le(a(de))
|
|
3571
|
-
}, [
|
|
3572
|
-
a(v) ? (f(), g("label", {
|
|
3573
|
-
key: 0,
|
|
3574
|
-
for: a(A),
|
|
3575
|
-
class: "vv-textarea__label"
|
|
3576
|
-
}, T(a(v)), 9, es)) : w("", !0),
|
|
3577
|
-
x("div", ts, [
|
|
3578
|
-
J.$slots.before ? (f(), g("div", ls, [
|
|
3579
|
-
V(J.$slots, "before", K(z(a(re))))
|
|
3580
|
-
])) : w("", !0),
|
|
3581
|
-
x("div", as, [
|
|
3582
|
-
a(D) ? (f(), H(ee, R({
|
|
3583
|
-
key: 0,
|
|
3584
|
-
class: "vv-textarea__icon"
|
|
3585
|
-
}, a(O)), null, 16)) : w("", !0),
|
|
3586
|
-
Oe(x("textarea", R({
|
|
3587
|
-
id: a(A),
|
|
3588
|
-
ref_key: "textarea",
|
|
3589
|
-
ref: o,
|
|
3590
|
-
"onUpdate:modelValue": B[0] || (B[0] = (Q) => Ee(I) ? I.value = Q : null)
|
|
3591
|
-
}, a(_e), {
|
|
3592
|
-
onKeyup: B[1] || (B[1] = (Q) => l("keyup", Q))
|
|
3593
|
-
}), null, 16, os), [
|
|
3594
|
-
[Mt, a(I)]
|
|
3595
|
-
]),
|
|
3596
|
-
a(L) ? (f(), H(ee, R({
|
|
3597
|
-
key: 1,
|
|
3598
|
-
class: "vv-textarea__icon vv-textarea__icon-after"
|
|
3599
|
-
}, a(O)), null, 16)) : w("", !0)
|
|
3600
|
-
]),
|
|
3601
|
-
J.$slots.after ? (f(), g("div", ss, [
|
|
3602
|
-
V(J.$slots, "after", K(z(a(re))))
|
|
3603
|
-
])) : w("", !0),
|
|
3604
|
-
a(r) ? (f(), g("span", ns, [
|
|
3605
|
-
V(J.$slots, "count", K(z(a(re))), () => [
|
|
3606
|
-
Y(T(a(se)), 1)
|
|
3607
|
-
])
|
|
3608
|
-
])) : w("", !0)
|
|
3609
|
-
]),
|
|
3610
|
-
pe(a(he), {
|
|
3611
|
-
id: a(y),
|
|
3612
|
-
class: "vv-textarea__hint"
|
|
3613
|
-
}, null, 8, ["id"])
|
|
3614
|
-
], 2));
|
|
3615
|
-
}
|
|
3616
|
-
});
|
|
140
|
+
};
|
|
3617
141
|
export {
|
|
3618
|
-
|
|
3619
|
-
jl as VvAccordion,
|
|
3620
|
-
bs as VvAccordionGroup,
|
|
3621
|
-
ea as VvBadge,
|
|
3622
|
-
hs as VvBreadcrumb,
|
|
3623
|
-
ys as VvButton,
|
|
3624
|
-
gs as VvButtonGroup,
|
|
3625
|
-
_s as VvCard,
|
|
3626
|
-
Ba as VvCheckbox,
|
|
3627
|
-
Ss as VvCheckboxGroup,
|
|
3628
|
-
Vs as VvCombobox,
|
|
3629
|
-
$s as VvDialog,
|
|
3630
|
-
il as VvDropdown,
|
|
3631
|
-
ee as VvIcon,
|
|
3632
|
-
ks as VvInputText,
|
|
3633
|
-
As as VvProgress,
|
|
3634
|
-
Uo as VvRadio,
|
|
3635
|
-
Cs as VvRadioGroup,
|
|
3636
|
-
uo as VvSelect,
|
|
3637
|
-
ws as VvTextarea
|
|
142
|
+
VolverPlugin
|
|
3638
143
|
};
|