@volverjs/ui-vue 0.0.3 → 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/LICENSE +1 -1
- package/README.md +54 -15
- package/auto-imports.d.ts +12 -3
- package/bin/icons.cjs +1 -73
- package/dist/Volver.d.ts +23 -11
- package/dist/components/VvAccordion/VvAccordion.es.js +180 -74
- 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 +280 -122
- 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 +338 -0
- package/dist/components/VvAction/VvAction.umd.js +1 -0
- package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
- package/dist/components/VvAction/index.d.ts +24 -0
- package/dist/components/VvBadge/VvBadge.es.js +251 -22
- 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 +280 -62
- 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 +720 -261
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +54 -54
- package/dist/components/VvButton/index.d.ts +30 -75
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +296 -49
- 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 +60 -28
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +630 -172
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
- package/dist/components/VvCheckbox/index.d.ts +6 -6
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +736 -228
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +9 -9
- package/dist/components/VvCheckboxGroup/index.d.ts +4 -4
- package/dist/components/VvCombobox/VvCombobox.es.js +1673 -768
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +159 -61
- package/dist/components/VvCombobox/index.d.ts +54 -23
- package/dist/components/VvDialog/VvDialog.es.js +426 -115
- 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 +504 -190
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +114 -42
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
- package/dist/components/VvDropdown/index.d.ts +35 -14
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +454 -0
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +48 -18
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +361 -0
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
- package/dist/components/VvIcon/VvIcon.es.js +116 -52
- 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 +1054 -376
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +107 -20
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +67 -3
- package/dist/components/VvProgress/VvProgress.es.js +254 -23
- 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 +568 -137
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
- package/dist/components/VvRadio/index.d.ts +6 -6
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +674 -193
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +9 -9
- package/dist/components/VvRadioGroup/index.d.ts +4 -4
- package/dist/components/VvSelect/VvSelect.es.js +703 -251
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +24 -17
- package/dist/components/VvSelect/index.d.ts +8 -8
- package/dist/components/VvTextarea/VvTextarea.es.js +747 -272
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +21 -14
- package/dist/components/VvTextarea/index.d.ts +7 -7
- package/dist/components/VvTooltip/VvTooltip.es.js +252 -24
- 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 +3676 -2007
- 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/constants.d.ts +30 -0
- package/dist/directives/index.es.js +288 -0
- package/dist/directives/index.umd.js +1 -0
- package/dist/directives/v-tooltip.es.js +285 -0
- package/dist/directives/v-tooltip.umd.js +1 -0
- 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 +115 -3269
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +215 -23
- package/dist/resolvers/unplugin.d.ts +14 -8
- package/dist/resolvers/unplugin.es.js +94 -33
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
- package/dist/stories/InputText/InputText.settings.d.ts +53 -0
- package/dist/stories/argTypes.d.ts +1 -1
- package/package.json +167 -63
- package/src/Volver.ts +60 -26
- 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 +144 -0
- package/src/components/VvAction/index.ts +5 -0
- 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 +41 -124
- package/src/components/VvButton/index.ts +16 -88
- 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 +85 -57
- package/src/components/VvCombobox/index.ts +12 -10
- 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 +46 -0
- package/src/components/VvDropdown/VvDropdownOption.vue +72 -0
- package/src/components/VvDropdown/index.ts +6 -11
- 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 +3 -5
- 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 +9 -11
- 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 +8 -9
- package/src/composables/useOptions.ts +1 -1
- package/src/composables/useVolver.ts +2 -2
- package/src/constants.ts +36 -0
- 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 +111 -19
- package/src/resolvers/unplugin.ts +96 -49
- 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 +3 -2
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
- package/src/stories/Button/Button.stories.mdx +4 -2
- package/src/stories/Button/Button.test.ts +3 -1
- package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
- package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
- package/src/stories/Button/ButtonState.stories.mdx +2 -11
- package/src/stories/Card/Card.stories.mdx +2 -1
- package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
- package/src/stories/Combobox/Combobox.settings.ts +44 -0
- package/src/stories/Combobox/Combobox.stories.mdx +40 -1
- package/src/stories/Dialog/Dialog.stories.mdx +2 -1
- package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
- package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
- package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
- package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
- package/src/stories/Icon/Icon.stories.mdx +2 -1
- package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
- package/src/stories/InputText/InputText.settings.ts +53 -0
- package/src/stories/InputText/InputText.stories.mdx +42 -1
- package/src/stories/InputText/InputText.test.ts +5 -2
- package/src/stories/Progress/Progress.stories.mdx +2 -1
- package/src/stories/Radio/Radio.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
- package/src/stories/Select/Select.stories.mdx +2 -1
- package/src/stories/Textarea/Textarea.stories.mdx +2 -1
- package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
- package/src/stories/argTypes.ts +2 -2
- package/src/types/group.d.ts +5 -0
|
@@ -1,36 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { unref, toRefs, computed, h, inject, defineComponent, ref, openBlock, createBlock, mergeProps, createCommentVNode, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withModifiers, withDirectives, isRef, vModelDynamic, createTextVNode, createVNode } from "vue";
|
|
2
|
+
import { Mask } from "maska";
|
|
3
|
+
import { toReactive, useFocus, useElementVisibility } from "@vueuse/core";
|
|
4
|
+
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
5
|
+
import { nanoid } from "nanoid";
|
|
6
|
+
function resolveFieldData(data, field) {
|
|
7
|
+
if (data && Object.keys(data).length && field) {
|
|
8
|
+
if (field.indexOf(".") === -1) {
|
|
9
|
+
return data[field];
|
|
10
|
+
} else {
|
|
11
|
+
const fields = field.split(".");
|
|
12
|
+
let value = data;
|
|
13
|
+
for (let i = 0, len = fields.length; i < len; ++i) {
|
|
14
|
+
if (data == null) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
value = value[fields[i]];
|
|
18
|
+
}
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
} else {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function isEmpty(value) {
|
|
26
|
+
return ((value2) => value2 === null || value2 === void 0 || value2 === "" || Array.isArray(value2) && value2.length === 0 || !(value2 instanceof Date) && typeof value2 === "object" && Object.keys(value2).length === 0)(unref(value));
|
|
27
|
+
}
|
|
28
|
+
function isString(value) {
|
|
29
|
+
return typeof value === "string" || value instanceof String;
|
|
30
|
+
}
|
|
31
|
+
function joinLines(errors) {
|
|
32
|
+
if (Array.isArray(errors)) {
|
|
33
|
+
return errors.filter((e) => isString(e)).join(" ");
|
|
34
|
+
}
|
|
35
|
+
return errors;
|
|
5
36
|
}
|
|
6
|
-
function
|
|
37
|
+
function HintSlotFactory(parentProps, parentSlots) {
|
|
7
38
|
const {
|
|
8
|
-
invalid:
|
|
9
|
-
valid:
|
|
10
|
-
hint:
|
|
11
|
-
loading:
|
|
12
|
-
} =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
39
|
+
invalid: invalidSlot,
|
|
40
|
+
valid: validSlot,
|
|
41
|
+
hint: hintSlot,
|
|
42
|
+
loading: loadingSlot
|
|
43
|
+
} = parentSlots;
|
|
44
|
+
const {
|
|
45
|
+
hintLabel,
|
|
46
|
+
modelValue,
|
|
47
|
+
valid,
|
|
48
|
+
validLabel,
|
|
49
|
+
invalid,
|
|
50
|
+
invalidLabel,
|
|
51
|
+
...otherProps
|
|
52
|
+
} = toRefs(parentProps);
|
|
53
|
+
const loading = resolveFieldData(otherProps, "loading");
|
|
54
|
+
const loadingLabel = resolveFieldData(otherProps, "loadingLabel");
|
|
55
|
+
const hasInvalid = computed(() => {
|
|
56
|
+
if (!invalid.value) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
if (invalid.value && invalidSlot) {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
if ((invalidLabel == null ? void 0 : invalidLabel.value) && Array.isArray(invalidLabel.value) && invalidLabel.value.length > 0) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
if ((invalidLabel == null ? void 0 : invalidLabel.value) && !isEmpty(invalidLabel)) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
});
|
|
70
|
+
const hasHint = computed(
|
|
71
|
+
() => !!(hintLabel && hintLabel.value || hintSlot)
|
|
72
|
+
);
|
|
73
|
+
const hasValid = computed(
|
|
74
|
+
() => !!(validLabel && validLabel.value || validSlot)
|
|
75
|
+
);
|
|
76
|
+
const hasLoading = computed(
|
|
77
|
+
() => !!((loading == null ? void 0 : loading.value) && loadingSlot || (loading == null ? void 0 : loading.value) && (loadingLabel == null ? void 0 : loadingLabel.value))
|
|
78
|
+
);
|
|
79
|
+
const isVisible = computed(
|
|
80
|
+
() => hasHint.value || hasValid.value || hasInvalid.value || hasLoading.value
|
|
28
81
|
);
|
|
29
82
|
return {
|
|
30
|
-
hasInvalid
|
|
31
|
-
hasHint
|
|
32
|
-
hasValid
|
|
33
|
-
hasLoading
|
|
83
|
+
hasInvalid,
|
|
84
|
+
hasHint,
|
|
85
|
+
hasValid,
|
|
86
|
+
hasLoading,
|
|
34
87
|
HintSlot: {
|
|
35
88
|
name: "HintSlot",
|
|
36
89
|
props: {
|
|
@@ -39,30 +92,37 @@ function Oe(t, n) {
|
|
|
39
92
|
default: () => ({})
|
|
40
93
|
}
|
|
41
94
|
},
|
|
42
|
-
setup(
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
hintLabel
|
|
46
|
-
modelValue
|
|
47
|
-
valid
|
|
48
|
-
validLabel
|
|
49
|
-
invalid
|
|
50
|
-
invalidLabel
|
|
51
|
-
loading
|
|
52
|
-
loadingLabel
|
|
53
|
-
...
|
|
95
|
+
setup(props) {
|
|
96
|
+
const hintContent = computed(() => {
|
|
97
|
+
const slotProps = toReactive({
|
|
98
|
+
hintLabel,
|
|
99
|
+
modelValue,
|
|
100
|
+
valid,
|
|
101
|
+
validLabel,
|
|
102
|
+
invalid,
|
|
103
|
+
invalidLabel,
|
|
104
|
+
loading,
|
|
105
|
+
loadingLabel,
|
|
106
|
+
...props.params
|
|
54
107
|
});
|
|
55
|
-
|
|
108
|
+
if (invalid == null ? void 0 : invalid.value) {
|
|
109
|
+
return (invalidSlot == null ? void 0 : invalidSlot(slotProps)) || joinLines(invalidLabel == null ? void 0 : invalidLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
|
|
110
|
+
}
|
|
111
|
+
if (valid == null ? void 0 : valid.value)
|
|
112
|
+
return (validSlot == null ? void 0 : validSlot(slotProps)) || joinLines(validLabel == null ? void 0 : validLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
|
|
113
|
+
if (loading == null ? void 0 : loading.value)
|
|
114
|
+
return (loadingSlot == null ? void 0 : loadingSlot(slotProps)) || joinLines(loadingLabel == null ? void 0 : loadingLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
|
|
115
|
+
return (hintSlot == null ? void 0 : hintSlot(slotProps)) || joinLines(hintLabel == null ? void 0 : hintLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
|
|
56
116
|
});
|
|
57
117
|
return {
|
|
58
|
-
isVisible
|
|
59
|
-
hasInvalid
|
|
60
|
-
hasValid
|
|
61
|
-
hintContent
|
|
118
|
+
isVisible,
|
|
119
|
+
hasInvalid,
|
|
120
|
+
hasValid,
|
|
121
|
+
hintContent
|
|
62
122
|
};
|
|
63
123
|
},
|
|
64
124
|
render() {
|
|
65
|
-
if (this.isVisible)
|
|
125
|
+
if (this.isVisible) {
|
|
66
126
|
return h(
|
|
67
127
|
"small",
|
|
68
128
|
{
|
|
@@ -70,11 +130,12 @@ function Oe(t, n) {
|
|
|
70
130
|
},
|
|
71
131
|
this.hintContent
|
|
72
132
|
);
|
|
133
|
+
}
|
|
73
134
|
}
|
|
74
135
|
}
|
|
75
136
|
};
|
|
76
137
|
}
|
|
77
|
-
const
|
|
138
|
+
const VvIconProps = {
|
|
78
139
|
/**
|
|
79
140
|
* Color
|
|
80
141
|
*/
|
|
@@ -98,7 +159,7 @@ const He = {
|
|
|
98
159
|
*/
|
|
99
160
|
name: {
|
|
100
161
|
type: String,
|
|
101
|
-
required:
|
|
162
|
+
required: true
|
|
102
163
|
},
|
|
103
164
|
/**
|
|
104
165
|
* By default 'vv'
|
|
@@ -167,102 +228,276 @@ const He = {
|
|
|
167
228
|
modifiers: {
|
|
168
229
|
type: [String, Array]
|
|
169
230
|
}
|
|
170
|
-
}
|
|
231
|
+
};
|
|
232
|
+
var Side = /* @__PURE__ */ ((Side2) => {
|
|
233
|
+
Side2["left"] = "left";
|
|
234
|
+
Side2["right"] = "right";
|
|
235
|
+
Side2["top"] = "top";
|
|
236
|
+
Side2["bottom"] = "bottom";
|
|
237
|
+
return Side2;
|
|
238
|
+
})(Side || {});
|
|
239
|
+
var Placement = /* @__PURE__ */ ((Placement2) => {
|
|
240
|
+
Placement2["topStart"] = "top-start";
|
|
241
|
+
Placement2["topEnd"] = "top-end";
|
|
242
|
+
Placement2["bottomStart"] = "bottom-start";
|
|
243
|
+
Placement2["bottomEnd"] = "bottom-end";
|
|
244
|
+
Placement2["leftStart"] = "left-start";
|
|
245
|
+
Placement2["leftEnd"] = "left-end";
|
|
246
|
+
Placement2["rightStart"] = "right-start";
|
|
247
|
+
Placement2["rightEnd"] = "right-end";
|
|
248
|
+
return Placement2;
|
|
249
|
+
})(Placement || {});
|
|
250
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
251
|
+
Position2["before"] = "before";
|
|
252
|
+
Position2["after"] = "after";
|
|
253
|
+
return Position2;
|
|
254
|
+
})(Position || {});
|
|
255
|
+
var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
256
|
+
ButtonType2["button"] = "button";
|
|
257
|
+
ButtonType2["submit"] = "submit";
|
|
258
|
+
ButtonType2["reset"] = "reset";
|
|
259
|
+
return ButtonType2;
|
|
260
|
+
})(ButtonType || {});
|
|
261
|
+
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
262
|
+
AnchorTarget2["_blank"] = "_blank";
|
|
263
|
+
AnchorTarget2["_self"] = "_self";
|
|
264
|
+
AnchorTarget2["_parent"] = "_parent";
|
|
265
|
+
AnchorTarget2["_top"] = "_top";
|
|
266
|
+
return AnchorTarget2;
|
|
267
|
+
})(AnchorTarget || {});
|
|
268
|
+
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
269
|
+
function useVolver() {
|
|
270
|
+
return inject(INJECTION_KEY_VOLVER);
|
|
271
|
+
}
|
|
272
|
+
function useModifiers(prefix, modifiers, others) {
|
|
273
|
+
return computed(() => {
|
|
274
|
+
const toReturn = {
|
|
275
|
+
[prefix]: true
|
|
276
|
+
};
|
|
277
|
+
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
278
|
+
if (modifiersArray) {
|
|
279
|
+
if (Array.isArray(modifiersArray)) {
|
|
280
|
+
modifiersArray.forEach((modifier) => {
|
|
281
|
+
if (modifier) {
|
|
282
|
+
toReturn[`${prefix}--${modifier}`] = true;
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
if (others) {
|
|
288
|
+
Object.keys(others.value).forEach((key) => {
|
|
289
|
+
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
return toReturn;
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
const __default__$1 = {
|
|
171
296
|
name: "VvIcon"
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
)) || s;
|
|
297
|
+
};
|
|
298
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
299
|
+
...__default__$1,
|
|
300
|
+
props: VvIconProps,
|
|
301
|
+
setup(__props) {
|
|
302
|
+
const props = __props;
|
|
303
|
+
const show = ref(true);
|
|
304
|
+
const volver = useVolver();
|
|
305
|
+
const { modifiers } = toRefs(props);
|
|
306
|
+
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
307
|
+
const provider = computed(() => {
|
|
308
|
+
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
185
309
|
});
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
310
|
+
const icon = computed(() => {
|
|
311
|
+
const _name = props.name ?? "";
|
|
312
|
+
const iconName = `@${provider.value}:${props.prefix}:${props.name}`;
|
|
313
|
+
if (iconExists(_name)) {
|
|
314
|
+
return _name;
|
|
315
|
+
} else if (iconExists(iconName)) {
|
|
316
|
+
return iconName;
|
|
317
|
+
} else {
|
|
318
|
+
return (volver == null ? void 0 : volver.iconsCollections.find(
|
|
319
|
+
(iconsCollection) => {
|
|
320
|
+
const icon2 = `@${provider.value}:${iconsCollection.prefix}:${_name}`;
|
|
321
|
+
if (iconExists(icon2)) {
|
|
322
|
+
return icon2;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
)) || _name;
|
|
191
326
|
}
|
|
192
|
-
|
|
327
|
+
});
|
|
328
|
+
function getSvgContent(svg) {
|
|
329
|
+
let dom = null;
|
|
330
|
+
if (typeof window === "undefined") {
|
|
331
|
+
const { JSDOM } = require("jsdom");
|
|
332
|
+
dom = new JSDOM().window;
|
|
333
|
+
}
|
|
334
|
+
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
335
|
+
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
336
|
+
const svgEl = svgDomString.querySelector("svg");
|
|
337
|
+
return svgEl;
|
|
193
338
|
}
|
|
194
|
-
function
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
339
|
+
function addIconFromSvg(svg) {
|
|
340
|
+
const svgContentEl = getSvgContent(svg);
|
|
341
|
+
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
342
|
+
if (svgContentEl && svgContent) {
|
|
343
|
+
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
344
|
+
body: svgContent,
|
|
345
|
+
// Set height and width from svg content
|
|
346
|
+
height: svgContentEl.viewBox.baseVal.height,
|
|
347
|
+
width: svgContentEl.viewBox.baseVal.width
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
if (volver) {
|
|
352
|
+
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
353
|
+
show.value = false;
|
|
354
|
+
volver.fetchIcon(props.src).then((svg) => {
|
|
355
|
+
if (svg) {
|
|
356
|
+
addIconFromSvg(svg);
|
|
357
|
+
show.value = true;
|
|
358
|
+
}
|
|
359
|
+
}).catch((e) => {
|
|
360
|
+
throw new Error(`During fetch icon: ${e == null ? void 0 : e.message}`);
|
|
361
|
+
});
|
|
362
|
+
} else if (props.svg) {
|
|
363
|
+
addIconFromSvg(props.svg);
|
|
364
|
+
}
|
|
202
365
|
}
|
|
203
|
-
return
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
icon: i(T)
|
|
221
|
-
}), null, 16, ["class"])) : _("", !0);
|
|
366
|
+
return (_ctx, _cache) => {
|
|
367
|
+
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
368
|
+
key: 0,
|
|
369
|
+
class: unref(bemCssClasses)
|
|
370
|
+
}, {
|
|
371
|
+
inline: _ctx.inline,
|
|
372
|
+
width: _ctx.width,
|
|
373
|
+
height: _ctx.height,
|
|
374
|
+
horizontalFlip: _ctx.horizontalFlip,
|
|
375
|
+
verticalFlip: _ctx.verticalFlip,
|
|
376
|
+
flip: _ctx.flip,
|
|
377
|
+
rotate: _ctx.rotate,
|
|
378
|
+
color: _ctx.color,
|
|
379
|
+
onLoad: _ctx.onLoad,
|
|
380
|
+
icon: unref(icon)
|
|
381
|
+
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
382
|
+
};
|
|
222
383
|
}
|
|
223
384
|
});
|
|
224
|
-
|
|
225
|
-
|
|
385
|
+
const LinkProps = {
|
|
386
|
+
/**
|
|
387
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
388
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
389
|
+
*/
|
|
390
|
+
to: {
|
|
391
|
+
type: [String, Object]
|
|
392
|
+
},
|
|
393
|
+
/**
|
|
394
|
+
* Anchor href
|
|
395
|
+
*/
|
|
396
|
+
href: String,
|
|
397
|
+
/**
|
|
398
|
+
* Anchor target
|
|
399
|
+
*/
|
|
400
|
+
target: {
|
|
401
|
+
type: String,
|
|
402
|
+
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
403
|
+
},
|
|
404
|
+
/**
|
|
405
|
+
* Anchor rel
|
|
406
|
+
*/
|
|
407
|
+
rel: {
|
|
408
|
+
type: String,
|
|
409
|
+
default: "noopener noreferrer"
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
const ValidProps = {
|
|
413
|
+
/**
|
|
414
|
+
* Valid status
|
|
415
|
+
*/
|
|
226
416
|
valid: Boolean,
|
|
417
|
+
/**
|
|
418
|
+
* Valid label
|
|
419
|
+
*/
|
|
227
420
|
validLabel: [String, Array]
|
|
228
|
-
}
|
|
421
|
+
};
|
|
422
|
+
const InvalidProps = {
|
|
423
|
+
/**
|
|
424
|
+
* Invalid status
|
|
425
|
+
*/
|
|
229
426
|
invalid: Boolean,
|
|
427
|
+
/**
|
|
428
|
+
* Invalid label
|
|
429
|
+
*/
|
|
230
430
|
invalidLabel: [String, Array]
|
|
231
|
-
}
|
|
431
|
+
};
|
|
432
|
+
const LoadingProps = {
|
|
433
|
+
/**
|
|
434
|
+
* Loading status
|
|
435
|
+
*/
|
|
232
436
|
loading: Boolean,
|
|
233
|
-
|
|
234
|
-
|
|
437
|
+
/**
|
|
438
|
+
* Loading label
|
|
439
|
+
*/
|
|
440
|
+
loadingLabel: {
|
|
441
|
+
type: String,
|
|
442
|
+
default: "Loading..."
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
const DisabledProps = {
|
|
235
446
|
/**
|
|
236
447
|
* Whether the form control is disabled
|
|
237
448
|
*/
|
|
238
449
|
disabled: Boolean
|
|
239
|
-
}
|
|
450
|
+
};
|
|
451
|
+
const ActiveProps = {
|
|
452
|
+
/**
|
|
453
|
+
* Whether the item is active
|
|
454
|
+
*/
|
|
455
|
+
active: Boolean
|
|
456
|
+
};
|
|
457
|
+
const PressedProps = {
|
|
458
|
+
/**
|
|
459
|
+
* Whether the item is pressed
|
|
460
|
+
*/
|
|
461
|
+
pressed: Boolean
|
|
462
|
+
};
|
|
463
|
+
const LabelProps = {
|
|
464
|
+
/**
|
|
465
|
+
* The item label
|
|
466
|
+
*/
|
|
467
|
+
label: [String, Number]
|
|
468
|
+
};
|
|
469
|
+
const ReadonlyProps = {
|
|
240
470
|
/**
|
|
241
471
|
* The value is not editable
|
|
242
472
|
*/
|
|
243
473
|
readonly: Boolean
|
|
244
|
-
}
|
|
474
|
+
};
|
|
475
|
+
const ModifiersProps = {
|
|
245
476
|
/**
|
|
246
477
|
* Component BEM modifiers
|
|
247
478
|
*/
|
|
248
479
|
modifiers: [String, Array]
|
|
249
|
-
}
|
|
480
|
+
};
|
|
481
|
+
const HintProps = {
|
|
250
482
|
hintLabel: { type: String, default: "" }
|
|
251
|
-
}
|
|
483
|
+
};
|
|
484
|
+
const CountProps = {
|
|
252
485
|
/**
|
|
253
486
|
* Show character limit
|
|
254
487
|
*/
|
|
255
488
|
count: {
|
|
256
489
|
type: [Boolean, String],
|
|
257
|
-
default:
|
|
258
|
-
validator: (
|
|
490
|
+
default: false,
|
|
491
|
+
validator: (value) => [true, false, "limit", "countdown"].includes(value)
|
|
259
492
|
}
|
|
260
|
-
}
|
|
493
|
+
};
|
|
494
|
+
const DebounceProps = {
|
|
261
495
|
/**
|
|
262
496
|
* Milliseconds to wait before emitting the input event
|
|
263
497
|
*/
|
|
264
498
|
debounce: [Number, String]
|
|
265
|
-
}
|
|
499
|
+
};
|
|
500
|
+
const IconProps = {
|
|
266
501
|
/**
|
|
267
502
|
* VvIcon name or props
|
|
268
503
|
* @see VVIcon
|
|
@@ -273,64 +508,156 @@ const xe = {
|
|
|
273
508
|
*/
|
|
274
509
|
iconPosition: {
|
|
275
510
|
type: String,
|
|
276
|
-
default:
|
|
277
|
-
validation: (
|
|
511
|
+
default: Position.before,
|
|
512
|
+
validation: (value) => Object.values(Position).includes(value)
|
|
278
513
|
}
|
|
279
|
-
}
|
|
514
|
+
};
|
|
515
|
+
const TabindexProps = {
|
|
280
516
|
/**
|
|
281
517
|
* Global attribute tabindex
|
|
282
518
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
|
283
519
|
*/
|
|
284
520
|
tabindex: { type: [String, Number], default: 0 }
|
|
285
|
-
}
|
|
521
|
+
};
|
|
522
|
+
const FloatingLabelProps = {
|
|
286
523
|
/**
|
|
287
524
|
* If true the label will be floating
|
|
288
525
|
*/
|
|
289
526
|
floating: Boolean
|
|
290
|
-
}
|
|
527
|
+
};
|
|
528
|
+
const IdProps = {
|
|
291
529
|
/**
|
|
292
530
|
* Global attribute id
|
|
293
531
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
|
|
294
532
|
*/
|
|
295
533
|
id: [String, Number]
|
|
296
534
|
};
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
535
|
+
({
|
|
536
|
+
/**
|
|
537
|
+
* Dropdown placement
|
|
538
|
+
*/
|
|
539
|
+
placement: {
|
|
540
|
+
type: String,
|
|
541
|
+
default: Side.bottom,
|
|
542
|
+
validator: (value) => {
|
|
543
|
+
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
/**
|
|
547
|
+
* Dropdown show / hide transition name
|
|
548
|
+
*/
|
|
549
|
+
transitionName: {
|
|
550
|
+
type: String
|
|
551
|
+
},
|
|
552
|
+
/**
|
|
553
|
+
* Offset of the dropdown from the trigger
|
|
554
|
+
* @see https://floating-ui.com/docs/offset
|
|
555
|
+
*/
|
|
556
|
+
offset: {
|
|
557
|
+
type: [Number, String, Object],
|
|
558
|
+
default: 0
|
|
559
|
+
},
|
|
560
|
+
/**
|
|
561
|
+
* Move dropdown to the side if there is no space in the default position
|
|
562
|
+
* @see https://floating-ui.com/docs/shift
|
|
563
|
+
*/
|
|
564
|
+
shift: {
|
|
565
|
+
type: [Boolean, Object],
|
|
566
|
+
default: false
|
|
567
|
+
},
|
|
568
|
+
/**
|
|
569
|
+
* Flip dropdown position if there is no space in the default position
|
|
570
|
+
* @see https://floating-ui.com/docs/flip
|
|
571
|
+
*/
|
|
572
|
+
flip: {
|
|
573
|
+
type: [Boolean, Object],
|
|
574
|
+
default: true
|
|
575
|
+
},
|
|
576
|
+
/**
|
|
577
|
+
* Size of the dropdown
|
|
578
|
+
* @see https://floating-ui.com/docs/size
|
|
579
|
+
*/
|
|
580
|
+
size: {
|
|
581
|
+
type: [Boolean, Object],
|
|
582
|
+
default: () => ({ padding: 10 })
|
|
583
|
+
},
|
|
584
|
+
/**
|
|
585
|
+
* Automatically change the position of the dropdown
|
|
586
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
587
|
+
*/
|
|
588
|
+
autoPlacement: {
|
|
589
|
+
type: [Boolean, Object],
|
|
590
|
+
default: false
|
|
591
|
+
},
|
|
592
|
+
/**
|
|
593
|
+
* Add arrow to the dropdown
|
|
594
|
+
* @see https://floating-ui.com/docs/arrow
|
|
595
|
+
*/
|
|
596
|
+
arrow: {
|
|
597
|
+
type: Boolean,
|
|
598
|
+
default: false
|
|
599
|
+
},
|
|
600
|
+
/**
|
|
601
|
+
* Close dropdown on click outside
|
|
602
|
+
*/
|
|
603
|
+
autoClose: {
|
|
604
|
+
type: Boolean,
|
|
605
|
+
default: true
|
|
606
|
+
},
|
|
607
|
+
/**
|
|
608
|
+
* Autofocus first item on dropdown open
|
|
609
|
+
*/
|
|
610
|
+
autofocusFirst: {
|
|
611
|
+
type: Boolean,
|
|
612
|
+
default: true
|
|
613
|
+
},
|
|
614
|
+
/**
|
|
615
|
+
* Set dropdown width to the same as the trigger
|
|
616
|
+
*/
|
|
617
|
+
triggerWidth: {
|
|
618
|
+
type: Boolean
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
const IdNameProps = {
|
|
622
|
+
...IdProps,
|
|
300
623
|
/**
|
|
301
624
|
* Input / Textarea name
|
|
302
625
|
* Name of the form control. Submitted with the form as part of a name/value pair
|
|
303
626
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
|
|
304
627
|
*/
|
|
305
|
-
name: { type: String, required:
|
|
306
|
-
}
|
|
628
|
+
name: { type: String, required: true }
|
|
629
|
+
};
|
|
630
|
+
const AutofocusProps = {
|
|
307
631
|
/**
|
|
308
632
|
* Global attribute autofocus
|
|
309
633
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
|
|
310
634
|
*/
|
|
311
635
|
autofocus: Boolean
|
|
312
|
-
}
|
|
636
|
+
};
|
|
637
|
+
const AutocompleteProps = {
|
|
313
638
|
/**
|
|
314
639
|
* Global attribute autocomplete
|
|
315
640
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
|
316
641
|
*/
|
|
317
642
|
autocomplete: { type: String, default: "off" }
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
...
|
|
321
|
-
...
|
|
322
|
-
...
|
|
323
|
-
...
|
|
324
|
-
...
|
|
325
|
-
...
|
|
326
|
-
...
|
|
327
|
-
|
|
328
|
-
...
|
|
329
|
-
...
|
|
330
|
-
...
|
|
331
|
-
...
|
|
332
|
-
...
|
|
333
|
-
...
|
|
643
|
+
};
|
|
644
|
+
const InputTextareaProps = {
|
|
645
|
+
...IdNameProps,
|
|
646
|
+
...AutofocusProps,
|
|
647
|
+
...AutocompleteProps,
|
|
648
|
+
...TabindexProps,
|
|
649
|
+
...DisabledProps,
|
|
650
|
+
...ReadonlyProps,
|
|
651
|
+
...ValidProps,
|
|
652
|
+
...InvalidProps,
|
|
653
|
+
...HintProps,
|
|
654
|
+
...LoadingProps,
|
|
655
|
+
...ModifiersProps,
|
|
656
|
+
...CountProps,
|
|
657
|
+
...DebounceProps,
|
|
658
|
+
...IconProps,
|
|
659
|
+
...FloatingLabelProps,
|
|
660
|
+
...LabelProps,
|
|
334
661
|
/**
|
|
335
662
|
* Input / Textarea minlength
|
|
336
663
|
* Minimum length (number of characters) of value
|
|
@@ -358,12 +685,24 @@ const ze = {
|
|
|
358
685
|
* Available for all input types except color
|
|
359
686
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
|
|
360
687
|
*/
|
|
361
|
-
required: Boolean
|
|
688
|
+
required: Boolean
|
|
689
|
+
};
|
|
690
|
+
({
|
|
691
|
+
...DisabledProps,
|
|
692
|
+
...LabelProps,
|
|
693
|
+
...PressedProps,
|
|
694
|
+
...ActiveProps,
|
|
695
|
+
...LinkProps,
|
|
362
696
|
/**
|
|
363
|
-
*
|
|
697
|
+
* Button type
|
|
364
698
|
*/
|
|
365
|
-
|
|
366
|
-
|
|
699
|
+
type: {
|
|
700
|
+
type: String,
|
|
701
|
+
default: ButtonType.button,
|
|
702
|
+
validator: (value) => Object.values(ButtonType).includes(value)
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
const INPUT_TYPES = {
|
|
367
706
|
TEXT: "text",
|
|
368
707
|
PASSWORD: "password",
|
|
369
708
|
NUMBER: "number",
|
|
@@ -377,15 +716,18 @@ const ze = {
|
|
|
377
716
|
DATETIME_LOCAL: "datetime-local",
|
|
378
717
|
MONTH: "month",
|
|
379
718
|
WEEK: "week"
|
|
380
|
-
}
|
|
719
|
+
};
|
|
720
|
+
const TYPES_ICON = {
|
|
381
721
|
PASSWORD_SHOW: "eye-on",
|
|
382
722
|
PASSWORD_HIDE: "eye-off",
|
|
383
723
|
DATE: "calendar",
|
|
384
724
|
TIME: "time",
|
|
385
725
|
COLOR: "color",
|
|
386
726
|
SEARCH: "close"
|
|
387
|
-
}
|
|
388
|
-
|
|
727
|
+
};
|
|
728
|
+
const VvInputTextEvents = ["update:modelValue", "focus", "blur", "keyup"];
|
|
729
|
+
const VvInputTextProps = {
|
|
730
|
+
...InputTextareaProps,
|
|
389
731
|
/**
|
|
390
732
|
* Input value
|
|
391
733
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
@@ -397,8 +739,8 @@ const ze = {
|
|
|
397
739
|
*/
|
|
398
740
|
type: {
|
|
399
741
|
type: String,
|
|
400
|
-
default:
|
|
401
|
-
validator: (
|
|
742
|
+
default: INPUT_TYPES.TEXT,
|
|
743
|
+
validator: (value) => Object.values(INPUT_TYPES).includes(value)
|
|
402
744
|
},
|
|
403
745
|
/**
|
|
404
746
|
* Minimum value
|
|
@@ -436,7 +778,7 @@ const ze = {
|
|
|
436
778
|
*/
|
|
437
779
|
iconShowPassword: {
|
|
438
780
|
type: String,
|
|
439
|
-
default:
|
|
781
|
+
default: TYPES_ICON.PASSWORD_SHOW
|
|
440
782
|
},
|
|
441
783
|
/**
|
|
442
784
|
* VvIcon name for hide password button
|
|
@@ -444,7 +786,7 @@ const ze = {
|
|
|
444
786
|
*/
|
|
445
787
|
iconHidePassword: {
|
|
446
788
|
type: String,
|
|
447
|
-
default:
|
|
789
|
+
default: TYPES_ICON.PASSWORD_HIDE
|
|
448
790
|
},
|
|
449
791
|
/**
|
|
450
792
|
* VvIcon name for clear button
|
|
@@ -452,7 +794,7 @@ const ze = {
|
|
|
452
794
|
*/
|
|
453
795
|
iconClear: {
|
|
454
796
|
type: String,
|
|
455
|
-
default:
|
|
797
|
+
default: TYPES_ICON.SEARCH
|
|
456
798
|
},
|
|
457
799
|
/**
|
|
458
800
|
* Label for step up button
|
|
@@ -488,15 +830,76 @@ const ze = {
|
|
|
488
830
|
labelClear: {
|
|
489
831
|
type: String,
|
|
490
832
|
default: "Clear"
|
|
833
|
+
},
|
|
834
|
+
/**
|
|
835
|
+
* Input mask, only for text type
|
|
836
|
+
* @see https://beholdr.github.io/maska/
|
|
837
|
+
*/
|
|
838
|
+
mask: {
|
|
839
|
+
type: String,
|
|
840
|
+
default: void 0
|
|
841
|
+
},
|
|
842
|
+
/**
|
|
843
|
+
* Show mask before typing
|
|
844
|
+
* @see https://beholdr.github.io/maska/#/?id=maskinput-options
|
|
845
|
+
*/
|
|
846
|
+
maskEager: {
|
|
847
|
+
type: Boolean,
|
|
848
|
+
default: false
|
|
849
|
+
},
|
|
850
|
+
/**
|
|
851
|
+
* Write values reverse (ex. for numbers)
|
|
852
|
+
* @see https://beholdr.github.io/maska/#/?id=maskinput-options
|
|
853
|
+
*/
|
|
854
|
+
maskReversed: {
|
|
855
|
+
type: Boolean,
|
|
856
|
+
default: false
|
|
857
|
+
},
|
|
858
|
+
/**
|
|
859
|
+
* Add mask custom tokens
|
|
860
|
+
* @see https://beholdr.github.io/maska/#/?id=custom-tokens
|
|
861
|
+
*/
|
|
862
|
+
maskTokens: {
|
|
863
|
+
type: Object,
|
|
864
|
+
default: void 0
|
|
865
|
+
},
|
|
866
|
+
/**
|
|
867
|
+
* Replace default tokens
|
|
868
|
+
* @see https://beholdr.github.io/maska/#/?id=custom-tokens
|
|
869
|
+
*/
|
|
870
|
+
maskTokensReplace: {
|
|
871
|
+
type: Boolean,
|
|
872
|
+
default: false
|
|
873
|
+
},
|
|
874
|
+
/**
|
|
875
|
+
* Adjust input width to content
|
|
876
|
+
*/
|
|
877
|
+
autoWidth: {
|
|
878
|
+
type: Boolean,
|
|
879
|
+
default: false
|
|
880
|
+
},
|
|
881
|
+
/**
|
|
882
|
+
* Hide type number, password and search actions
|
|
883
|
+
*/
|
|
884
|
+
hideActions: {
|
|
885
|
+
type: Boolean,
|
|
886
|
+
default: false
|
|
887
|
+
},
|
|
888
|
+
/**
|
|
889
|
+
* Add unit label to input
|
|
890
|
+
*/
|
|
891
|
+
unit: {
|
|
892
|
+
type: String
|
|
491
893
|
}
|
|
492
|
-
}
|
|
894
|
+
};
|
|
895
|
+
const VvInputPasswordAction = defineComponent({
|
|
493
896
|
components: {
|
|
494
|
-
VvIcon:
|
|
897
|
+
VvIcon: _sfc_main$1
|
|
495
898
|
},
|
|
496
899
|
props: {
|
|
497
900
|
disabled: {
|
|
498
901
|
type: Boolean,
|
|
499
|
-
default:
|
|
902
|
+
default: false
|
|
500
903
|
},
|
|
501
904
|
labelShow: {
|
|
502
905
|
type: String,
|
|
@@ -508,31 +911,36 @@ const ze = {
|
|
|
508
911
|
},
|
|
509
912
|
iconShow: {
|
|
510
913
|
type: String,
|
|
511
|
-
default:
|
|
914
|
+
default: TYPES_ICON.PASSWORD_SHOW
|
|
512
915
|
},
|
|
513
916
|
iconHide: {
|
|
514
917
|
type: String,
|
|
515
|
-
default:
|
|
918
|
+
default: TYPES_ICON.PASSWORD_HIDE
|
|
516
919
|
}
|
|
517
920
|
},
|
|
518
921
|
emits: ["toggle-password"],
|
|
519
|
-
setup(
|
|
520
|
-
const
|
|
521
|
-
|
|
922
|
+
setup(props, { emit }) {
|
|
923
|
+
const active = ref(false);
|
|
924
|
+
const activeIcon = computed(
|
|
925
|
+
() => active.value ? props.iconHide : props.iconShow
|
|
522
926
|
);
|
|
523
|
-
function
|
|
524
|
-
|
|
927
|
+
function onClick(e) {
|
|
928
|
+
e == null ? void 0 : e.stopPropagation();
|
|
929
|
+
if (!props.disabled) {
|
|
930
|
+
active.value = !active.value;
|
|
931
|
+
emit("toggle-password", active.value);
|
|
932
|
+
}
|
|
525
933
|
}
|
|
526
934
|
return {
|
|
527
|
-
active
|
|
528
|
-
activeIcon
|
|
529
|
-
onClick
|
|
935
|
+
active,
|
|
936
|
+
activeIcon,
|
|
937
|
+
onClick
|
|
530
938
|
};
|
|
531
939
|
},
|
|
532
940
|
render() {
|
|
533
|
-
const
|
|
941
|
+
const icon = h(_sfc_main$1, {
|
|
534
942
|
name: this.activeIcon,
|
|
535
|
-
class: "vv-input-
|
|
943
|
+
class: "vv-input-text__icon"
|
|
536
944
|
});
|
|
537
945
|
return h(
|
|
538
946
|
"button",
|
|
@@ -543,56 +951,63 @@ const ze = {
|
|
|
543
951
|
type: "button",
|
|
544
952
|
onClick: this.onClick
|
|
545
953
|
},
|
|
546
|
-
|
|
954
|
+
icon
|
|
547
955
|
);
|
|
548
956
|
}
|
|
549
|
-
})
|
|
957
|
+
});
|
|
958
|
+
const VvInputStepAction = defineComponent({
|
|
550
959
|
components: {
|
|
551
|
-
VvIcon:
|
|
960
|
+
VvIcon: _sfc_main$1
|
|
552
961
|
},
|
|
553
962
|
props: {
|
|
554
963
|
disabled: {
|
|
555
964
|
type: Boolean,
|
|
556
|
-
default:
|
|
965
|
+
default: false
|
|
557
966
|
},
|
|
558
967
|
label: {
|
|
559
968
|
type: String
|
|
560
969
|
},
|
|
561
970
|
mode: {
|
|
562
971
|
type: String,
|
|
563
|
-
validator: (
|
|
972
|
+
validator: (v) => ["up", "down"].includes(v),
|
|
564
973
|
default: "up"
|
|
565
974
|
}
|
|
566
975
|
},
|
|
567
976
|
emits: ["step-up", "step-down"],
|
|
568
|
-
setup(
|
|
569
|
-
const
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
977
|
+
setup(props, { emit }) {
|
|
978
|
+
const isUp = computed(() => props.mode === "up");
|
|
979
|
+
const onClick = (e) => {
|
|
980
|
+
e == null ? void 0 : e.stopPropagation();
|
|
981
|
+
if (!props.disabled) {
|
|
982
|
+
emit(isUp.value ? "step-up" : "step-down");
|
|
574
983
|
}
|
|
575
984
|
};
|
|
985
|
+
return {
|
|
986
|
+
isUp,
|
|
987
|
+
onClick
|
|
988
|
+
};
|
|
576
989
|
},
|
|
577
990
|
render() {
|
|
578
991
|
return h("button", {
|
|
579
992
|
class: [
|
|
580
|
-
"vv-input-text__action-chevron",
|
|
993
|
+
"vv-input-text__action vv-input-text__action-chevron",
|
|
581
994
|
this.isUp && "vv-input-text__action-chevron-up"
|
|
582
995
|
],
|
|
583
996
|
disabled: this.disabled,
|
|
584
997
|
ariaLabel: this.label,
|
|
998
|
+
type: "button",
|
|
585
999
|
onClick: this.onClick
|
|
586
1000
|
});
|
|
587
1001
|
}
|
|
588
|
-
})
|
|
1002
|
+
});
|
|
1003
|
+
const VvInputClearAction = defineComponent({
|
|
589
1004
|
components: {
|
|
590
|
-
VvIcon:
|
|
1005
|
+
VvIcon: _sfc_main$1
|
|
591
1006
|
},
|
|
592
1007
|
props: {
|
|
593
1008
|
disabled: {
|
|
594
1009
|
type: Boolean,
|
|
595
|
-
default:
|
|
1010
|
+
default: false
|
|
596
1011
|
},
|
|
597
1012
|
label: {
|
|
598
1013
|
type: String,
|
|
@@ -604,18 +1019,21 @@ const ze = {
|
|
|
604
1019
|
}
|
|
605
1020
|
},
|
|
606
1021
|
emits: ["clear"],
|
|
607
|
-
setup(
|
|
608
|
-
function e
|
|
609
|
-
|
|
1022
|
+
setup(props, { emit }) {
|
|
1023
|
+
function onClick(e) {
|
|
1024
|
+
e == null ? void 0 : e.stopPropagation();
|
|
1025
|
+
if (!props.disabled) {
|
|
1026
|
+
emit("clear");
|
|
1027
|
+
}
|
|
610
1028
|
}
|
|
611
1029
|
return {
|
|
612
|
-
onClick
|
|
1030
|
+
onClick
|
|
613
1031
|
};
|
|
614
1032
|
},
|
|
615
1033
|
render() {
|
|
616
|
-
const
|
|
1034
|
+
const icon = h(_sfc_main$1, {
|
|
617
1035
|
name: this.icon,
|
|
618
|
-
class: "vv-input-
|
|
1036
|
+
class: "vv-input-text__icon"
|
|
619
1037
|
});
|
|
620
1038
|
return h(
|
|
621
1039
|
"button",
|
|
@@ -626,51 +1044,54 @@ const ze = {
|
|
|
626
1044
|
type: "button",
|
|
627
1045
|
onClick: this.onClick
|
|
628
1046
|
},
|
|
629
|
-
|
|
1047
|
+
icon
|
|
630
1048
|
);
|
|
631
1049
|
}
|
|
632
1050
|
});
|
|
633
|
-
function
|
|
1051
|
+
function VvInputTextActionsFactory(type, parentProps) {
|
|
634
1052
|
return {
|
|
635
1053
|
name: "VvInputTextActions",
|
|
636
1054
|
components: {
|
|
637
|
-
VvIcon:
|
|
638
|
-
VvInputPasswordAction
|
|
639
|
-
VvInputStepAction
|
|
640
|
-
VvInputClearAction
|
|
1055
|
+
VvIcon: _sfc_main$1,
|
|
1056
|
+
VvInputPasswordAction,
|
|
1057
|
+
VvInputStepAction,
|
|
1058
|
+
VvInputClearAction
|
|
641
1059
|
},
|
|
642
1060
|
setup() {
|
|
1061
|
+
const isDisabled = computed(() => {
|
|
1062
|
+
return parentProps.disabled || parentProps.readonly;
|
|
1063
|
+
});
|
|
643
1064
|
return {
|
|
644
|
-
isDisabled
|
|
645
|
-
labelStepUp:
|
|
646
|
-
labelStepDown:
|
|
647
|
-
labelShowPassword:
|
|
648
|
-
labelHidePassword:
|
|
649
|
-
labelClear:
|
|
650
|
-
iconShowPassword:
|
|
651
|
-
iconHidePassword:
|
|
1065
|
+
isDisabled,
|
|
1066
|
+
labelStepUp: parentProps.labelStepUp,
|
|
1067
|
+
labelStepDown: parentProps.labelStepDown,
|
|
1068
|
+
labelShowPassword: parentProps.labelShowPassword,
|
|
1069
|
+
labelHidePassword: parentProps.labelHidePassword,
|
|
1070
|
+
labelClear: parentProps.labelClear,
|
|
1071
|
+
iconShowPassword: parentProps.iconShowPassword,
|
|
1072
|
+
iconHidePassword: parentProps.iconHidePassword
|
|
652
1073
|
};
|
|
653
1074
|
},
|
|
654
1075
|
render() {
|
|
655
|
-
let
|
|
656
|
-
switch (
|
|
657
|
-
case
|
|
658
|
-
const { onClear
|
|
659
|
-
|
|
660
|
-
h(
|
|
1076
|
+
let actions = null;
|
|
1077
|
+
switch (type) {
|
|
1078
|
+
case INPUT_TYPES.SEARCH: {
|
|
1079
|
+
const { onClear } = this.$attrs;
|
|
1080
|
+
actions = [
|
|
1081
|
+
h(VvInputClearAction, {
|
|
661
1082
|
disabled: this.isDisabled,
|
|
662
1083
|
label: this.labelShowPassword,
|
|
663
|
-
onClear
|
|
1084
|
+
onClear
|
|
664
1085
|
})
|
|
665
1086
|
];
|
|
666
1087
|
break;
|
|
667
1088
|
}
|
|
668
|
-
case
|
|
669
|
-
const { onTogglePassword
|
|
670
|
-
|
|
671
|
-
h(
|
|
1089
|
+
case INPUT_TYPES.PASSWORD: {
|
|
1090
|
+
const { onTogglePassword } = this.$attrs;
|
|
1091
|
+
actions = [
|
|
1092
|
+
h(VvInputPasswordAction, {
|
|
672
1093
|
disabled: this.isDisabled,
|
|
673
|
-
onTogglePassword
|
|
1094
|
+
onTogglePassword,
|
|
674
1095
|
labelShow: this.labelShowPassword,
|
|
675
1096
|
labelHide: this.labelHidePassword,
|
|
676
1097
|
iconShow: this.iconShowPassword,
|
|
@@ -679,206 +1100,463 @@ function X(t, n) {
|
|
|
679
1100
|
];
|
|
680
1101
|
break;
|
|
681
1102
|
}
|
|
682
|
-
case
|
|
683
|
-
const { onStepUp
|
|
684
|
-
|
|
685
|
-
h(
|
|
1103
|
+
case INPUT_TYPES.NUMBER: {
|
|
1104
|
+
const { onStepUp, onStepDown } = this.$attrs;
|
|
1105
|
+
actions = [
|
|
1106
|
+
h(VvInputStepAction, {
|
|
686
1107
|
mode: "up",
|
|
687
|
-
disabled: this.isDisabled ||
|
|
1108
|
+
disabled: this.isDisabled || parentProps.max !== void 0 && parentProps.modelValue === parentProps.max,
|
|
688
1109
|
label: this.labelStepUp,
|
|
689
|
-
onStepUp
|
|
690
|
-
onStepDown
|
|
1110
|
+
onStepUp,
|
|
1111
|
+
onStepDown
|
|
691
1112
|
}),
|
|
692
|
-
h(
|
|
1113
|
+
h(VvInputStepAction, {
|
|
693
1114
|
mode: "down",
|
|
694
|
-
disabled: this.isDisabled ||
|
|
1115
|
+
disabled: this.isDisabled || parentProps.min !== void 0 && parentProps.modelValue === parentProps.min,
|
|
695
1116
|
label: this.labelStepDown,
|
|
696
|
-
onStepUp
|
|
697
|
-
onStepDown
|
|
1117
|
+
onStepUp,
|
|
1118
|
+
onStepDown
|
|
698
1119
|
})
|
|
699
1120
|
];
|
|
700
1121
|
break;
|
|
701
1122
|
}
|
|
702
1123
|
}
|
|
703
|
-
return Array.isArray(
|
|
1124
|
+
return Array.isArray(actions) ? h("div", { class: "vv-input-text__actions-group" }, actions) : actions;
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
|
|
1129
|
+
function useDebouncedInput(modelValue, emit, ms = 0, {
|
|
1130
|
+
getter = (value) => value,
|
|
1131
|
+
setter = (value) => value
|
|
1132
|
+
} = {}) {
|
|
1133
|
+
let timeout;
|
|
1134
|
+
if (typeof ms === "string") {
|
|
1135
|
+
ms = parseInt(ms);
|
|
1136
|
+
}
|
|
1137
|
+
return computed({
|
|
1138
|
+
get: () => getter(modelValue == null ? void 0 : modelValue.value),
|
|
1139
|
+
set: (value) => {
|
|
1140
|
+
if (timeout) {
|
|
1141
|
+
clearTimeout(timeout);
|
|
1142
|
+
}
|
|
1143
|
+
timeout = setTimeout(() => {
|
|
1144
|
+
emit("update:modelValue", setter(value));
|
|
1145
|
+
}, ms);
|
|
1146
|
+
}
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
function useComponentFocus(inputTemplateRef, emit) {
|
|
1150
|
+
const { focused } = useFocus(inputTemplateRef);
|
|
1151
|
+
watch(focused, (newValue) => {
|
|
1152
|
+
emit(newValue ? "focus" : "blur", unref(inputTemplateRef));
|
|
1153
|
+
});
|
|
1154
|
+
return {
|
|
1155
|
+
focused
|
|
1156
|
+
};
|
|
1157
|
+
}
|
|
1158
|
+
function useComponentIcon(icon, iconPosition) {
|
|
1159
|
+
const hasIconBefore = computed(
|
|
1160
|
+
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.before)
|
|
1161
|
+
);
|
|
1162
|
+
const hasIconAfter = computed(
|
|
1163
|
+
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.after)
|
|
1164
|
+
);
|
|
1165
|
+
const hasIconLeft = computed(
|
|
1166
|
+
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
|
|
1167
|
+
);
|
|
1168
|
+
const hasIconRight = computed(
|
|
1169
|
+
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
|
|
1170
|
+
);
|
|
1171
|
+
const hasIconTop = computed(
|
|
1172
|
+
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
|
|
1173
|
+
);
|
|
1174
|
+
const hasIconBottom = computed(
|
|
1175
|
+
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
|
|
1176
|
+
);
|
|
1177
|
+
const hasIcon = computed(() => {
|
|
1178
|
+
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
1179
|
+
return { name: icon == null ? void 0 : icon.value };
|
|
1180
|
+
}
|
|
1181
|
+
return icon == null ? void 0 : icon.value;
|
|
1182
|
+
});
|
|
1183
|
+
return {
|
|
1184
|
+
hasIcon,
|
|
1185
|
+
hasIconLeft,
|
|
1186
|
+
hasIconRight,
|
|
1187
|
+
hasIconTop,
|
|
1188
|
+
hasIconBottom,
|
|
1189
|
+
hasIconBefore,
|
|
1190
|
+
hasIconAfter
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
function useTextCount(text, options) {
|
|
1194
|
+
const length = computed(() => {
|
|
1195
|
+
return (unref(text) ?? "").length;
|
|
1196
|
+
});
|
|
1197
|
+
const gap = computed(() => {
|
|
1198
|
+
if ((options == null ? void 0 : options.lowerLimit) !== void 0 && length.value < (options == null ? void 0 : options.lowerLimit)) {
|
|
1199
|
+
return length.value - options.lowerLimit;
|
|
1200
|
+
}
|
|
1201
|
+
if ((options == null ? void 0 : options.upperLimit) !== void 0 && length.value < (options == null ? void 0 : options.upperLimit)) {
|
|
1202
|
+
return options.upperLimit - length.value;
|
|
1203
|
+
}
|
|
1204
|
+
return 0;
|
|
1205
|
+
});
|
|
1206
|
+
const formatted = computed(() => {
|
|
1207
|
+
if ((options == null ? void 0 : options.mode) === false) {
|
|
1208
|
+
return "";
|
|
1209
|
+
}
|
|
1210
|
+
if ((options == null ? void 0 : options.mode) === "limit" && (options == null ? void 0 : options.upperLimit)) {
|
|
1211
|
+
return `${length.value} / ${options.lowerLimit ? `${options.lowerLimit}-` : ""}${options.upperLimit}`;
|
|
1212
|
+
}
|
|
1213
|
+
if ((options == null ? void 0 : options.mode) === "countdown") {
|
|
1214
|
+
if (gap.value === 0) {
|
|
1215
|
+
return void 0;
|
|
1216
|
+
}
|
|
1217
|
+
return gap;
|
|
704
1218
|
}
|
|
1219
|
+
return length.value;
|
|
1220
|
+
});
|
|
1221
|
+
return {
|
|
1222
|
+
length,
|
|
1223
|
+
gap,
|
|
1224
|
+
formatted
|
|
705
1225
|
};
|
|
706
1226
|
}
|
|
707
|
-
const
|
|
1227
|
+
const _hoisted_1 = ["for"];
|
|
1228
|
+
const _hoisted_2 = { class: "vv-input-text__wrapper" };
|
|
1229
|
+
const _hoisted_3 = {
|
|
708
1230
|
key: 0,
|
|
709
1231
|
class: "vv-input-text__input-before"
|
|
710
|
-
}
|
|
1232
|
+
};
|
|
1233
|
+
const _hoisted_4 = ["onClick"];
|
|
1234
|
+
const _hoisted_5 = ["id"];
|
|
1235
|
+
const _hoisted_6 = {
|
|
711
1236
|
key: 1,
|
|
1237
|
+
class: "vv-input-text__unit"
|
|
1238
|
+
};
|
|
1239
|
+
const _hoisted_7 = {
|
|
1240
|
+
key: 5,
|
|
712
1241
|
class: "vv-input-text__input-after"
|
|
713
|
-
}
|
|
714
|
-
|
|
1242
|
+
};
|
|
1243
|
+
const _hoisted_8 = {
|
|
1244
|
+
key: 6,
|
|
715
1245
|
class: "vv-input-text__limit"
|
|
716
|
-
}
|
|
1246
|
+
};
|
|
1247
|
+
const __default__ = {
|
|
717
1248
|
name: "VvInputText"
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
1249
|
+
};
|
|
1250
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1251
|
+
...__default__,
|
|
1252
|
+
props: VvInputTextProps,
|
|
1253
|
+
emits: VvInputTextEvents,
|
|
1254
|
+
setup(__props, { expose, emit }) {
|
|
1255
|
+
const props = __props;
|
|
1256
|
+
const slots = useSlots();
|
|
1257
|
+
const inputEl = ref();
|
|
1258
|
+
const innerEl = ref();
|
|
1259
|
+
expose({ $inner: innerEl });
|
|
1260
|
+
const {
|
|
1261
|
+
id,
|
|
1262
|
+
icon,
|
|
1263
|
+
iconPosition,
|
|
1264
|
+
label,
|
|
1265
|
+
modelValue,
|
|
1266
|
+
count,
|
|
1267
|
+
valid,
|
|
1268
|
+
invalid,
|
|
1269
|
+
loading
|
|
1270
|
+
} = toRefs(props);
|
|
1271
|
+
const hasId = useUniqueId(id);
|
|
1272
|
+
const hasDescribedBy = computed(() => `${hasId.value}-hint`);
|
|
1273
|
+
const inputTextPlaceholder = computed(
|
|
1274
|
+
() => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
|
|
1275
|
+
);
|
|
1276
|
+
const localModelValue = useDebouncedInput(
|
|
1277
|
+
modelValue,
|
|
1278
|
+
emit,
|
|
1279
|
+
props.debounce,
|
|
1280
|
+
{
|
|
1281
|
+
getter: (value) => {
|
|
1282
|
+
if (mask.value) {
|
|
1283
|
+
return mask.value.masked(value ?? "");
|
|
1284
|
+
}
|
|
1285
|
+
return value;
|
|
1286
|
+
},
|
|
1287
|
+
setter: (value) => {
|
|
1288
|
+
if (mask.value) {
|
|
1289
|
+
value = mask.value.unmasked(value);
|
|
1290
|
+
}
|
|
1291
|
+
if (props.type === INPUT_TYPES.NUMBER) {
|
|
1292
|
+
return Number(value);
|
|
1293
|
+
}
|
|
1294
|
+
return value;
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
);
|
|
1298
|
+
const { focused } = useComponentFocus(inputEl, emit);
|
|
1299
|
+
const isFocused = computed(
|
|
1300
|
+
() => focused.value && !props.disabled && !props.readonly
|
|
1301
|
+
);
|
|
1302
|
+
const isVisible = useElementVisibility(inputEl);
|
|
1303
|
+
watch(isVisible, (newValue) => {
|
|
1304
|
+
if (newValue && props.autofocus && !props.disabled && !props.readonly) {
|
|
1305
|
+
focused.value = true;
|
|
1306
|
+
}
|
|
738
1307
|
});
|
|
739
|
-
const
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
1308
|
+
const showPassword = ref(false);
|
|
1309
|
+
const isPassword = computed(() => props.type === INPUT_TYPES.PASSWORD);
|
|
1310
|
+
const onTogglePassword = () => {
|
|
1311
|
+
showPassword.value = !showPassword.value;
|
|
1312
|
+
};
|
|
1313
|
+
const isDateTime = computed(
|
|
1314
|
+
() => props.type === INPUT_TYPES.TIME || props.type === INPUT_TYPES.DATETIME_LOCAL || props.type === INPUT_TYPES.DATE || props.type === INPUT_TYPES.WEEK || props.type === INPUT_TYPES.MONTH
|
|
1315
|
+
);
|
|
1316
|
+
const isNumber = computed(() => props.type === INPUT_TYPES.NUMBER);
|
|
1317
|
+
const onStepUp = () => {
|
|
1318
|
+
if (isClickable.value) {
|
|
1319
|
+
inputEl.value.stepUp();
|
|
1320
|
+
localModelValue.value = unref(inputEl).value;
|
|
1321
|
+
}
|
|
1322
|
+
};
|
|
1323
|
+
const onStepDown = () => {
|
|
1324
|
+
if (isClickable.value) {
|
|
1325
|
+
inputEl.value.stepDown();
|
|
1326
|
+
localModelValue.value = unref(inputEl).value;
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
const isSearch = computed(() => props.type === INPUT_TYPES.SEARCH);
|
|
1330
|
+
const onClear = () => {
|
|
1331
|
+
localModelValue.value = void 0;
|
|
1332
|
+
};
|
|
1333
|
+
const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
|
|
1334
|
+
icon,
|
|
1335
|
+
iconPosition
|
|
1336
|
+
);
|
|
1337
|
+
const defaultAfterIcon = computed(() => {
|
|
1338
|
+
switch (props.type) {
|
|
1339
|
+
case INPUT_TYPES.COLOR:
|
|
1340
|
+
return { name: TYPES_ICON.COLOR };
|
|
1341
|
+
case INPUT_TYPES.DATE:
|
|
1342
|
+
case INPUT_TYPES.DATETIME_LOCAL:
|
|
1343
|
+
case INPUT_TYPES.WEEK:
|
|
1344
|
+
case INPUT_TYPES.MONTH:
|
|
1345
|
+
return { name: TYPES_ICON.DATE };
|
|
1346
|
+
case INPUT_TYPES.TIME:
|
|
1347
|
+
return { name: TYPES_ICON.TIME };
|
|
763
1348
|
default:
|
|
764
1349
|
return "";
|
|
765
1350
|
}
|
|
766
|
-
})
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
1351
|
+
});
|
|
1352
|
+
const { formatted: countFormatted } = useTextCount(localModelValue, {
|
|
1353
|
+
mode: props.count,
|
|
1354
|
+
upperLimit: props.maxlength,
|
|
1355
|
+
lowerLimit: props.minlength
|
|
1356
|
+
});
|
|
1357
|
+
const isClickable = computed(() => !props.disabled && !props.readonly);
|
|
1358
|
+
const hasTabindex = computed(
|
|
1359
|
+
() => isClickable.value ? props.tabindex : -1
|
|
1360
|
+
);
|
|
1361
|
+
const isDirty = computed(() => !isEmpty(modelValue));
|
|
1362
|
+
const isInvalid = computed(() => {
|
|
1363
|
+
if (invalid.value === true) {
|
|
1364
|
+
return true;
|
|
1365
|
+
}
|
|
1366
|
+
if (valid.value === true) {
|
|
1367
|
+
return false;
|
|
1368
|
+
}
|
|
1369
|
+
return void 0;
|
|
1370
|
+
});
|
|
1371
|
+
const { modifiers } = toRefs(props);
|
|
1372
|
+
const bemCssClasses = useModifiers(
|
|
778
1373
|
"vv-input-text",
|
|
779
|
-
|
|
1374
|
+
modifiers,
|
|
780
1375
|
computed(() => ({
|
|
781
|
-
valid:
|
|
782
|
-
invalid:
|
|
783
|
-
loading:
|
|
784
|
-
disabled:
|
|
785
|
-
readonly:
|
|
786
|
-
"icon-before":
|
|
787
|
-
"icon-after":
|
|
788
|
-
floating:
|
|
789
|
-
dirty:
|
|
790
|
-
focus:
|
|
1376
|
+
valid: valid.value,
|
|
1377
|
+
invalid: invalid.value,
|
|
1378
|
+
loading: loading.value,
|
|
1379
|
+
disabled: props.disabled,
|
|
1380
|
+
readonly: props.readonly,
|
|
1381
|
+
"icon-before": hasIconBefore.value,
|
|
1382
|
+
"icon-after": hasIconAfter.value || !isEmpty(defaultAfterIcon),
|
|
1383
|
+
floating: props.floating && !isEmpty(props.label),
|
|
1384
|
+
dirty: isDirty.value,
|
|
1385
|
+
focus: isFocused.value,
|
|
1386
|
+
"auto-width": props.autoWidth
|
|
791
1387
|
}))
|
|
792
|
-
)
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
1388
|
+
);
|
|
1389
|
+
const hasAttrs = computed(() => {
|
|
1390
|
+
const type = (() => {
|
|
1391
|
+
if (isPassword.value && showPassword.value) {
|
|
1392
|
+
return INPUT_TYPES.TEXT;
|
|
1393
|
+
}
|
|
1394
|
+
if (isDateTime.value && !isDirty.value && !focused.value) {
|
|
1395
|
+
return INPUT_TYPES.TEXT;
|
|
1396
|
+
}
|
|
1397
|
+
return props.type;
|
|
1398
|
+
})();
|
|
1399
|
+
const toReturn = {
|
|
1400
|
+
type,
|
|
1401
|
+
name: props.name,
|
|
1402
|
+
tabindex: hasTabindex.value,
|
|
1403
|
+
disabled: props.disabled,
|
|
1404
|
+
readonly: props.readonly,
|
|
1405
|
+
required: props.required,
|
|
1406
|
+
autocomplete: props.autocomplete,
|
|
1407
|
+
"aria-invalid": isInvalid.value,
|
|
1408
|
+
"aria-describedby": !hasInvalid.value && hasHint.value ? hasDescribedBy.value : void 0,
|
|
1409
|
+
"aria-errormessage": hasInvalid.value ? hasDescribedBy.value : void 0
|
|
804
1410
|
};
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
1411
|
+
if (type === INPUT_TYPES.DATE || type === INPUT_TYPES.MONTH || type === INPUT_TYPES.WEEK || type === INPUT_TYPES.TIME || type === INPUT_TYPES.DATETIME_LOCAL || type === INPUT_TYPES.NUMBER) {
|
|
1412
|
+
toReturn.step = props.step;
|
|
1413
|
+
toReturn.max = props.max !== void 0 ? String(props.max) : void 0;
|
|
1414
|
+
toReturn.min = props.min !== void 0 ? String(props.min) : void 0;
|
|
1415
|
+
}
|
|
1416
|
+
if (type === INPUT_TYPES.TEXT || type === INPUT_TYPES.SEARCH || type === INPUT_TYPES.URL || type === INPUT_TYPES.TEL || type === INPUT_TYPES.EMAIL || type === INPUT_TYPES.PASSWORD || type === INPUT_TYPES.NUMBER) {
|
|
1417
|
+
toReturn.placeholder = inputTextPlaceholder.value;
|
|
1418
|
+
}
|
|
1419
|
+
if (type === INPUT_TYPES.TEXT || type === INPUT_TYPES.SEARCH || type === INPUT_TYPES.URL || type === INPUT_TYPES.TEL || type === INPUT_TYPES.EMAIL || type === INPUT_TYPES.PASSWORD) {
|
|
1420
|
+
toReturn.minlength = props.minlength;
|
|
1421
|
+
toReturn.maxlength = props.maxlength;
|
|
1422
|
+
toReturn.pattern = props.pattern;
|
|
1423
|
+
}
|
|
1424
|
+
if (type === INPUT_TYPES.EMAIL) {
|
|
1425
|
+
toReturn.multiple = props.multiple;
|
|
1426
|
+
}
|
|
1427
|
+
return toReturn;
|
|
1428
|
+
});
|
|
1429
|
+
const slotProps = computed(() => ({
|
|
1430
|
+
valid: props.valid,
|
|
1431
|
+
invalid: props.invalid,
|
|
1432
|
+
modelValue: props.modelValue,
|
|
1433
|
+
togglePassword: onTogglePassword,
|
|
1434
|
+
stepUp: onStepUp,
|
|
1435
|
+
stepDown: onStepDown,
|
|
1436
|
+
clear: onClear
|
|
1437
|
+
}));
|
|
1438
|
+
const { HintSlot, hasHint, hasInvalid } = HintSlotFactory(props, slots);
|
|
1439
|
+
const PasswordInputActions = VvInputTextActionsFactory(
|
|
1440
|
+
INPUT_TYPES.PASSWORD,
|
|
1441
|
+
props
|
|
823
1442
|
);
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
1443
|
+
const NumberInputActions = VvInputTextActionsFactory(
|
|
1444
|
+
INPUT_TYPES.NUMBER,
|
|
1445
|
+
props
|
|
1446
|
+
);
|
|
1447
|
+
const SearchInputActions = VvInputTextActionsFactory(
|
|
1448
|
+
INPUT_TYPES.SEARCH,
|
|
1449
|
+
props
|
|
1450
|
+
);
|
|
1451
|
+
const mask = ref();
|
|
1452
|
+
watch(
|
|
1453
|
+
[
|
|
1454
|
+
() => props.mask,
|
|
1455
|
+
() => props.type,
|
|
1456
|
+
() => props.maskEager,
|
|
1457
|
+
() => props.maskReversed,
|
|
1458
|
+
() => props.maskTokens,
|
|
1459
|
+
() => props.maskTokensReplace
|
|
1460
|
+
],
|
|
1461
|
+
([newMask, newType, eager, reversed, tokens, tokensReplace]) => {
|
|
1462
|
+
if (newMask && newType === INPUT_TYPES.TEXT) {
|
|
1463
|
+
mask.value = new Mask({
|
|
1464
|
+
mask: newMask,
|
|
1465
|
+
eager,
|
|
1466
|
+
reversed,
|
|
1467
|
+
tokens,
|
|
1468
|
+
tokensReplace
|
|
1469
|
+
});
|
|
1470
|
+
return;
|
|
1471
|
+
}
|
|
1472
|
+
mask.value = void 0;
|
|
1473
|
+
},
|
|
1474
|
+
{ immediate: true }
|
|
1475
|
+
);
|
|
1476
|
+
const onClickInner = () => {
|
|
1477
|
+
if (isClickable.value) {
|
|
1478
|
+
focused.value = true;
|
|
1479
|
+
}
|
|
1480
|
+
};
|
|
1481
|
+
const hasStyle = computed(() => {
|
|
1482
|
+
if (!props.autoWidth) {
|
|
1483
|
+
return void 0;
|
|
1484
|
+
}
|
|
1485
|
+
return {
|
|
1486
|
+
width: localModelValue.value !== void 0 ? `${String(localModelValue.value).length + 1}ch` : void 0
|
|
1487
|
+
};
|
|
1488
|
+
});
|
|
1489
|
+
return (_ctx, _cache) => {
|
|
1490
|
+
return openBlock(), createElementBlock("div", {
|
|
1491
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
1492
|
+
}, [
|
|
1493
|
+
unref(label) ? (openBlock(), createElementBlock("label", {
|
|
1494
|
+
key: 0,
|
|
1495
|
+
for: unref(hasId),
|
|
1496
|
+
class: "vv-input-text__label"
|
|
1497
|
+
}, toDisplayString(unref(label)), 9, _hoisted_1)) : createCommentVNode("", true),
|
|
1498
|
+
createElementVNode("div", _hoisted_2, [
|
|
1499
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
1500
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
1501
|
+
])) : createCommentVNode("", true),
|
|
1502
|
+
createElementVNode("div", {
|
|
1503
|
+
ref_key: "innerEl",
|
|
1504
|
+
ref: innerEl,
|
|
1505
|
+
class: "vv-input-text__inner",
|
|
1506
|
+
onClick: withModifiers(onClickInner, ["stop"])
|
|
1507
|
+
}, [
|
|
1508
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$1, mergeProps({
|
|
1509
|
+
key: 0,
|
|
1510
|
+
class: "vv-input-text__icon"
|
|
1511
|
+
}, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
|
|
1512
|
+
withDirectives(createElementVNode("input", mergeProps({
|
|
1513
|
+
id: unref(hasId),
|
|
1514
|
+
ref_key: "inputEl",
|
|
1515
|
+
ref: inputEl,
|
|
1516
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
|
|
1517
|
+
}, unref(hasAttrs), {
|
|
1518
|
+
style: unref(hasStyle),
|
|
1519
|
+
onKeyup: _cache[1] || (_cache[1] = ($event) => emit("keyup", $event))
|
|
1520
|
+
}), null, 16, _hoisted_5), [
|
|
1521
|
+
[vModelDynamic, unref(localModelValue)]
|
|
1522
|
+
]),
|
|
1523
|
+
(_ctx.unit || _ctx.$slots.unit) && unref(isDirty) ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
1524
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
|
|
1525
|
+
createTextVNode(toDisplayString(_ctx.unit), 1)
|
|
1526
|
+
])
|
|
1527
|
+
])) : createCommentVNode("", true)
|
|
1528
|
+
], 8, _hoisted_4),
|
|
1529
|
+
unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(_sfc_main$1, mergeProps({
|
|
852
1530
|
key: 1,
|
|
853
1531
|
class: "vv-input-text__icon vv-input-text__icon-after"
|
|
854
|
-
},
|
|
1532
|
+
}, unref(hasIconAfter) ? unref(hasIcon) : unref(defaultAfterIcon)), null, 16)) : unref(isPassword) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(PasswordInputActions), {
|
|
855
1533
|
key: 2,
|
|
856
|
-
onTogglePassword
|
|
857
|
-
})) :
|
|
1534
|
+
onTogglePassword
|
|
1535
|
+
})) : unref(isNumber) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(NumberInputActions), {
|
|
858
1536
|
key: 3,
|
|
859
|
-
onStepUp
|
|
860
|
-
onStepDown
|
|
861
|
-
})) :
|
|
1537
|
+
onStepUp,
|
|
1538
|
+
onStepDown
|
|
1539
|
+
})) : unref(isSearch) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(SearchInputActions), {
|
|
862
1540
|
key: 4,
|
|
863
|
-
onClear
|
|
864
|
-
})) :
|
|
1541
|
+
onClear
|
|
1542
|
+
})) : createCommentVNode("", true),
|
|
1543
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
1544
|
+
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
1545
|
+
])) : createCommentVNode("", true),
|
|
1546
|
+
unref(count) ? (openBlock(), createElementBlock("span", _hoisted_8, [
|
|
1547
|
+
renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
|
|
1548
|
+
createTextVNode(toDisplayString(unref(countFormatted)), 1)
|
|
1549
|
+
])
|
|
1550
|
+
])) : createCommentVNode("", true)
|
|
865
1551
|
]),
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
])
|
|
873
|
-
])) : _("", !0)
|
|
874
|
-
]),
|
|
875
|
-
Ce(i(Se), {
|
|
876
|
-
id: i(w),
|
|
877
|
-
class: "vv-input-text__hint"
|
|
878
|
-
}, null, 8, ["id"])
|
|
879
|
-
], 2));
|
|
1552
|
+
createVNode(unref(HintSlot), {
|
|
1553
|
+
id: unref(hasDescribedBy),
|
|
1554
|
+
class: "vv-input-text__hint"
|
|
1555
|
+
}, null, 8, ["id"])
|
|
1556
|
+
], 2);
|
|
1557
|
+
};
|
|
880
1558
|
}
|
|
881
1559
|
});
|
|
882
1560
|
export {
|
|
883
|
-
|
|
1561
|
+
_sfc_main as default
|
|
884
1562
|
};
|