@volverjs/ui-vue 0.0.10-beta.20 → 0.0.10-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/VvAccordion/VvAccordion.es.js +3 -1
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +6 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +1 -1
- package/dist/components/VvAction/VvAction.es.js +2 -1
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +7 -0
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +10 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +2 -1
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +3 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +33 -15
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +2 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +1 -1
- package/dist/components/VvCard/VvCard.es.js +5 -1
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +2 -1
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +13 -2
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +48 -15
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +42 -42
- package/dist/components/VvDialog/VvDialog.es.js +3 -0
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +42 -42
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +1 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +2 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +1 -1
- package/dist/components/VvIcon/index.d.ts +12 -0
- package/dist/components/VvInputFile/VvInputFile.es.js +258 -82
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +152 -29
- package/dist/components/VvInputFile/index.d.ts +119 -14
- package/dist/components/VvInputText/VvInputClearAction.d.ts +6 -4
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +79 -65
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
- package/dist/components/VvInputText/index.d.ts +6 -15
- package/dist/components/VvNav/VvNav.es.js +2 -1
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +2 -1
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +13 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +4 -0
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +1 -1
- package/dist/components/VvTab/VvTab.es.js +7 -2
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +4 -0
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +1 -1
- package/dist/components/common/HintSlot.d.ts +1 -1
- package/dist/components/index.es.js +354 -115
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
- package/dist/icons.es.js +210 -210
- package/dist/icons.umd.js +1 -1
- package/dist/stories/InputFile/InputFile.stories.d.ts +1 -2
- package/dist/stories/InputFile/{InputFileModifiers.stories.d.ts → InputFileDropArea.stories.d.ts} +4 -4
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +1 -0
- package/dist/types/input-file.d.ts +2 -0
- package/package.json +45 -45
- 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/VvIcon/index.ts +13 -0
- package/src/components/VvInputFile/VvInputFile.vue +103 -40
- package/src/components/VvInputFile/index.ts +88 -10
- package/src/components/VvInputText/VvInputClearAction.ts +10 -6
- package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
- package/src/components/VvInputText/VvInputText.vue +6 -6
- package/src/components/VvInputText/index.ts +7 -15
- package/src/stories/InputFile/InputFile.settings.ts +1 -1
- package/src/stories/InputFile/InputFile.stories.ts +7 -16
- package/src/stories/InputFile/{InputFileModifiers.stories.ts → InputFileDropArea.stories.ts} +18 -13
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +11 -3
- package/src/types/input-file.ts +4 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx, resolveDynamicComponent, mergeDefaults,
|
|
1
|
+
import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx, resolveDynamicComponent, mergeDefaults, createVNode, TransitionGroup, toHandlers, useSlots, h, onMounted, withDirectives, vModelCheckbox, createSlots, nextTick, Transition, normalizeStyle, vShow, vModelSelect, vModelText, vModelRadio, onBeforeUnmount } from "vue";
|
|
2
2
|
import { uid } from "uid";
|
|
3
3
|
import { useToggle, useStorage, useVModel, useMutationObserver, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
|
|
4
4
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
@@ -904,6 +904,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
904
904
|
class: "vv-accordion__summary",
|
|
905
905
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(onClick)(), ["prevent"]))
|
|
906
906
|
}, [
|
|
907
|
+
createCommentVNode(" @slot Slot for title "),
|
|
907
908
|
renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
|
|
908
909
|
createTextVNode(
|
|
909
910
|
toDisplayString(unref(title)),
|
|
@@ -916,6 +917,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
916
917
|
"aria-hidden": !unref(isOpen),
|
|
917
918
|
class: "vv-accordion__content"
|
|
918
919
|
}, [
|
|
920
|
+
createCommentVNode(" @slot Slot for content "),
|
|
919
921
|
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
|
|
920
922
|
createTextVNode(
|
|
921
923
|
toDisplayString(unref(content)),
|
|
@@ -1050,6 +1052,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
1050
1052
|
class: normalizeClass(unref(bemCssClasses))
|
|
1051
1053
|
},
|
|
1052
1054
|
[
|
|
1055
|
+
createCommentVNode(" @slot Default slot "),
|
|
1053
1056
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1054
1057
|
(openBlock(true), createElementBlock(
|
|
1055
1058
|
Fragment,
|
|
@@ -1066,9 +1069,11 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
1066
1069
|
}),
|
|
1067
1070
|
{
|
|
1068
1071
|
header: withCtx((data) => [
|
|
1072
|
+
createCommentVNode(" @slot Slot for accordion header "),
|
|
1069
1073
|
renderSlot(_ctx.$slots, `header::${item.name}`, normalizeProps(guardReactiveProps(data)))
|
|
1070
1074
|
]),
|
|
1071
1075
|
details: withCtx((data) => [
|
|
1076
|
+
createCommentVNode(" @slot Slot for accordion details "),
|
|
1072
1077
|
renderSlot(_ctx.$slots, `details::${item.name}`, normalizeProps(guardReactiveProps(data)))
|
|
1073
1078
|
]),
|
|
1074
1079
|
_: 2
|
|
@@ -1209,6 +1214,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1209
1214
|
onMouseleavePassive: onMouseleave
|
|
1210
1215
|
}), {
|
|
1211
1216
|
default: withCtx(() => [
|
|
1217
|
+
createCommentVNode(" @slot Default slot "),
|
|
1212
1218
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1213
1219
|
createTextVNode(
|
|
1214
1220
|
toDisplayString(_ctx.label),
|
|
@@ -1223,6 +1229,18 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1223
1229
|
};
|
|
1224
1230
|
}
|
|
1225
1231
|
});
|
|
1232
|
+
const ACTION_ICONS = {
|
|
1233
|
+
showPassword: "eye-on",
|
|
1234
|
+
hidePassword: "eye-off",
|
|
1235
|
+
showDatePicker: "calendar",
|
|
1236
|
+
showTimePicker: "time",
|
|
1237
|
+
showColorPicker: "color",
|
|
1238
|
+
clear: "close",
|
|
1239
|
+
add: "add",
|
|
1240
|
+
remove: "trash",
|
|
1241
|
+
edit: "edit",
|
|
1242
|
+
download: "download"
|
|
1243
|
+
};
|
|
1226
1244
|
const VvIconPropsDefaults = {
|
|
1227
1245
|
prefix: "normal"
|
|
1228
1246
|
/* normal */
|
|
@@ -1567,13 +1585,16 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1567
1585
|
16
|
|
1568
1586
|
/* FULL_PROPS */
|
|
1569
1587
|
)) : createCommentVNode("v-if", true),
|
|
1588
|
+
createCommentVNode(" @slot Header slot "),
|
|
1570
1589
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1590
|
+
createCommentVNode(" @slot Before title slot "),
|
|
1571
1591
|
renderSlot(_ctx.$slots, "title::before"),
|
|
1572
1592
|
_ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("strong", {
|
|
1573
1593
|
key: 0,
|
|
1574
1594
|
id: unref(hasTitleId),
|
|
1575
1595
|
class: "vv-alert__title"
|
|
1576
1596
|
}, [
|
|
1597
|
+
createCommentVNode(" @slot Title slot "),
|
|
1577
1598
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
1578
1599
|
createTextVNode(
|
|
1579
1600
|
toDisplayString(_ctx.title),
|
|
@@ -1582,8 +1603,10 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1582
1603
|
)
|
|
1583
1604
|
])
|
|
1584
1605
|
], 8, _hoisted_2$e)) : createCommentVNode("v-if", true),
|
|
1606
|
+
createCommentVNode(" @slot After title slot "),
|
|
1585
1607
|
renderSlot(_ctx.$slots, "title::after")
|
|
1586
1608
|
]),
|
|
1609
|
+
createCommentVNode(" @slot Close button slot "),
|
|
1587
1610
|
renderSlot(_ctx.$slots, "close", normalizeProps(guardReactiveProps({ close: unref(close) })), () => [
|
|
1588
1611
|
_ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("button", {
|
|
1589
1612
|
key: 0,
|
|
@@ -1599,6 +1622,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1599
1622
|
])
|
|
1600
1623
|
])) : createCommentVNode("v-if", true),
|
|
1601
1624
|
_ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_6$5, [
|
|
1625
|
+
createCommentVNode(" @slot Content slot "),
|
|
1602
1626
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1603
1627
|
createTextVNode(
|
|
1604
1628
|
toDisplayString(_ctx.content),
|
|
@@ -1608,6 +1632,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1608
1632
|
])
|
|
1609
1633
|
])) : createCommentVNode("v-if", true),
|
|
1610
1634
|
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", _hoisted_7$5, [
|
|
1635
|
+
createCommentVNode(" @slot Footer slot "),
|
|
1611
1636
|
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
1612
1637
|
createTextVNode(
|
|
1613
1638
|
toDisplayString(_ctx.footer),
|
|
@@ -1777,6 +1802,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1777
1802
|
"div",
|
|
1778
1803
|
normalizeProps(guardReactiveProps(unref(hasProps))),
|
|
1779
1804
|
[
|
|
1805
|
+
createCommentVNode(" @slot The slot before alert list "),
|
|
1780
1806
|
renderSlot(_ctx.$slots, "before"),
|
|
1781
1807
|
createVNode(TransitionGroup, mergeProps({
|
|
1782
1808
|
tag: "div",
|
|
@@ -1785,6 +1811,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1785
1811
|
class: "vv-alert-group__list"
|
|
1786
1812
|
}, toHandlers(alertGroupTransitionHandlers)), {
|
|
1787
1813
|
default: withCtx(() => [
|
|
1814
|
+
createCommentVNode(" @slot The slot for alert list "),
|
|
1788
1815
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1789
1816
|
(openBlock(true), createElementBlock(
|
|
1790
1817
|
Fragment,
|
|
@@ -1808,6 +1835,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1808
1835
|
_: 3
|
|
1809
1836
|
/* FORWARDED */
|
|
1810
1837
|
}, 16, ["name"]),
|
|
1838
|
+
createCommentVNode(" @slot The slot after alert list "),
|
|
1811
1839
|
renderSlot(_ctx.$slots, "after")
|
|
1812
1840
|
],
|
|
1813
1841
|
16
|
|
@@ -1983,6 +2011,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1983
2011
|
role: "status"
|
|
1984
2012
|
},
|
|
1985
2013
|
[
|
|
2014
|
+
createCommentVNode(" @slot Default slot "),
|
|
1986
2015
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1987
2016
|
createTextVNode(
|
|
1988
2017
|
toDisplayString(_ctx.value),
|
|
@@ -2050,6 +2079,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2050
2079
|
"default-tag": "span"
|
|
2051
2080
|
}), {
|
|
2052
2081
|
default: withCtx(() => [
|
|
2082
|
+
createCommentVNode(" @slot Slot for label "),
|
|
2053
2083
|
renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
|
|
2054
2084
|
createTextVNode(
|
|
2055
2085
|
toDisplayString(label),
|
|
@@ -2289,24 +2319,38 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2289
2319
|
onClick
|
|
2290
2320
|
}), {
|
|
2291
2321
|
default: withCtx(() => [
|
|
2322
|
+
createCommentVNode(" @slot Default slot "),
|
|
2292
2323
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2324
|
+
createCommentVNode(" #region loading "),
|
|
2325
|
+
_ctx.loading ? (openBlock(), createElementBlock(
|
|
2326
|
+
Fragment,
|
|
2327
|
+
{ key: 0 },
|
|
2328
|
+
[
|
|
2329
|
+
createCommentVNode(" @slot Slot for loading content "),
|
|
2330
|
+
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
2331
|
+
_ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$u, {
|
|
2332
|
+
key: 0,
|
|
2333
|
+
class: "vv-button__loading-icon",
|
|
2334
|
+
name: _ctx.loadingIcon
|
|
2335
|
+
}, null, 8, ["name"])) : createCommentVNode("v-if", true),
|
|
2336
|
+
_ctx.loadingLabel ? (openBlock(), createElementBlock(
|
|
2337
|
+
"span",
|
|
2338
|
+
_hoisted_1$g,
|
|
2339
|
+
toDisplayString(_ctx.loadingLabel),
|
|
2340
|
+
1
|
|
2341
|
+
/* TEXT */
|
|
2342
|
+
)) : createCommentVNode("v-if", true)
|
|
2343
|
+
])
|
|
2344
|
+
],
|
|
2345
|
+
64
|
|
2346
|
+
/* STABLE_FRAGMENT */
|
|
2347
|
+
)) : (openBlock(), createElementBlock(
|
|
2307
2348
|
Fragment,
|
|
2308
2349
|
{ key: 1 },
|
|
2309
2350
|
[
|
|
2351
|
+
createCommentVNode(" #endregion "),
|
|
2352
|
+
createCommentVNode(" #region button "),
|
|
2353
|
+
createCommentVNode(" @slot Before label and icon "),
|
|
2310
2354
|
renderSlot(_ctx.$slots, "before"),
|
|
2311
2355
|
unref(hasIcon) ? (openBlock(), createBlock(
|
|
2312
2356
|
_sfc_main$u,
|
|
@@ -2316,6 +2360,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2316
2360
|
/* FULL_PROPS */
|
|
2317
2361
|
)) : createCommentVNode("v-if", true),
|
|
2318
2362
|
unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$b, [
|
|
2363
|
+
createCommentVNode(" @slot Use this slot for button label "),
|
|
2319
2364
|
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
2320
2365
|
createTextVNode(
|
|
2321
2366
|
toDisplayString(unref(label)),
|
|
@@ -2324,11 +2369,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2324
2369
|
)
|
|
2325
2370
|
])
|
|
2326
2371
|
])) : createCommentVNode("v-if", true),
|
|
2372
|
+
createCommentVNode(" @slot After label and icon "),
|
|
2327
2373
|
renderSlot(_ctx.$slots, "after")
|
|
2328
2374
|
],
|
|
2329
2375
|
64
|
|
2330
2376
|
/* STABLE_FRAGMENT */
|
|
2331
|
-
))
|
|
2377
|
+
)),
|
|
2378
|
+
createCommentVNode(" #endregion ")
|
|
2332
2379
|
])
|
|
2333
2380
|
]),
|
|
2334
2381
|
_: 3
|
|
@@ -2413,6 +2460,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2413
2460
|
role: "group"
|
|
2414
2461
|
},
|
|
2415
2462
|
[
|
|
2463
|
+
createCommentVNode(" @slot Default slot "),
|
|
2416
2464
|
renderSlot(_ctx.$slots, "default")
|
|
2417
2465
|
],
|
|
2418
2466
|
2
|
|
@@ -2455,6 +2503,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2455
2503
|
},
|
|
2456
2504
|
[
|
|
2457
2505
|
_ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$f, [
|
|
2506
|
+
createCommentVNode(" @slot Title slot "),
|
|
2458
2507
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
2459
2508
|
createTextVNode(
|
|
2460
2509
|
toDisplayString(_ctx.title),
|
|
@@ -2463,11 +2512,14 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2463
2512
|
)
|
|
2464
2513
|
])
|
|
2465
2514
|
])) : createCommentVNode("v-if", true),
|
|
2515
|
+
createCommentVNode(" @slot Default slot "),
|
|
2466
2516
|
renderSlot(_ctx.$slots, "default"),
|
|
2467
2517
|
_ctx.$slots.content ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
|
|
2518
|
+
createCommentVNode(" @slot Content slot "),
|
|
2468
2519
|
renderSlot(_ctx.$slots, "content")
|
|
2469
2520
|
])) : createCommentVNode("v-if", true),
|
|
2470
2521
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3$6, [
|
|
2522
|
+
createCommentVNode(" @slot Footer slot "),
|
|
2471
2523
|
renderSlot(_ctx.$slots, "footer")
|
|
2472
2524
|
])) : createCommentVNode("v-if", true)
|
|
2473
2525
|
],
|
|
@@ -2851,6 +2903,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2851
2903
|
}, null, 8, _hoisted_2$9), [
|
|
2852
2904
|
[vModelCheckbox, unref(localModelValue)]
|
|
2853
2905
|
]),
|
|
2906
|
+
createCommentVNode(" @slot Use this slot for check label "),
|
|
2854
2907
|
renderSlot(_ctx.$slots, "default", { value: unref(modelValue) }, () => [
|
|
2855
2908
|
createTextVNode(
|
|
2856
2909
|
toDisplayString(_ctx.label),
|
|
@@ -2993,6 +3046,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2993
3046
|
textContent: toDisplayString(_ctx.label)
|
|
2994
3047
|
}, null, 8, _hoisted_1$d)) : createCommentVNode("v-if", true),
|
|
2995
3048
|
createElementVNode("div", _hoisted_2$8, [
|
|
3049
|
+
createCommentVNode(" #region options set up "),
|
|
2996
3050
|
_ctx.options.length > 0 ? (openBlock(true), createElementBlock(
|
|
2997
3051
|
Fragment,
|
|
2998
3052
|
{ key: 0 },
|
|
@@ -3007,7 +3061,16 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
3007
3061
|
}),
|
|
3008
3062
|
128
|
|
3009
3063
|
/* KEYED_FRAGMENT */
|
|
3010
|
-
)) :
|
|
3064
|
+
)) : (openBlock(), createElementBlock(
|
|
3065
|
+
Fragment,
|
|
3066
|
+
{ key: 1 },
|
|
3067
|
+
[
|
|
3068
|
+
createCommentVNode(" #endregion "),
|
|
3069
|
+
renderSlot(_ctx.$slots, "default")
|
|
3070
|
+
],
|
|
3071
|
+
2112
|
|
3072
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
3073
|
+
))
|
|
3011
3074
|
]),
|
|
3012
3075
|
createVNode(
|
|
3013
3076
|
unref(HintSlot),
|
|
@@ -4044,8 +4107,10 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4044
4107
|
key: 0,
|
|
4045
4108
|
for: unref(hasId)
|
|
4046
4109
|
}, toDisplayString(_ctx.label), 9, _hoisted_1$9)) : createCommentVNode("v-if", true),
|
|
4110
|
+
createCommentVNode(" #region native select "),
|
|
4047
4111
|
createElementVNode("div", _hoisted_2$7, [
|
|
4048
4112
|
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
|
|
4113
|
+
createCommentVNode(" @slot Slot before input "),
|
|
4049
4114
|
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
4050
4115
|
])) : createCommentVNode("v-if", true),
|
|
4051
4116
|
createElementVNode("div", _hoisted_4$4, [
|
|
@@ -4119,9 +4184,11 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4119
4184
|
)) : createCommentVNode("v-if", true)
|
|
4120
4185
|
]),
|
|
4121
4186
|
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
|
|
4187
|
+
createCommentVNode(" @slot Slot after input "),
|
|
4122
4188
|
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
4123
4189
|
])) : createCommentVNode("v-if", true)
|
|
4124
4190
|
]),
|
|
4191
|
+
createCommentVNode(" #endregion native select "),
|
|
4125
4192
|
createVNode(unref(HintSlot), {
|
|
4126
4193
|
id: unref(hasHintId),
|
|
4127
4194
|
class: "vv-select__hint"
|
|
@@ -4495,6 +4562,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4495
4562
|
}), createSlots({
|
|
4496
4563
|
default: withCtx(({ aria }) => [
|
|
4497
4564
|
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
4565
|
+
createCommentVNode(" @slot Slot before input "),
|
|
4498
4566
|
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
4499
4567
|
])) : createCommentVNode("v-if", true),
|
|
4500
4568
|
createElementVNode("div", _hoisted_5$3, [
|
|
@@ -4518,6 +4586,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4518
4586
|
tabindex: unref(hasTabindex),
|
|
4519
4587
|
onClickPassive: onClickInput
|
|
4520
4588
|
}), [
|
|
4589
|
+
createCommentVNode(" @slot Slot for value customization "),
|
|
4521
4590
|
renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
|
|
4522
4591
|
unref(hasValue) ? (openBlock(), createElementBlock(
|
|
4523
4592
|
Fragment,
|
|
@@ -4587,6 +4656,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4587
4656
|
)) : createCommentVNode("v-if", true)
|
|
4588
4657
|
]),
|
|
4589
4658
|
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
|
|
4659
|
+
createCommentVNode(" @slot Slot after input "),
|
|
4590
4660
|
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
4591
4661
|
])) : createCommentVNode("v-if", true)
|
|
4592
4662
|
]),
|
|
@@ -4627,6 +4697,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4627
4697
|
onClickPassive: ($event) => onInput(item)
|
|
4628
4698
|
}), {
|
|
4629
4699
|
default: withCtx(() => [
|
|
4700
|
+
createCommentVNode(" @slot Slot for option customization "),
|
|
4630
4701
|
renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
|
|
4631
4702
|
option,
|
|
4632
4703
|
selectedOptions: unref(selectedOptions),
|
|
@@ -4662,6 +4733,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4662
4733
|
onClickPassive: ($event) => onInput(option)
|
|
4663
4734
|
}), {
|
|
4664
4735
|
default: withCtx(() => [
|
|
4736
|
+
createCommentVNode(" @slot Slot for option customization "),
|
|
4665
4737
|
renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
|
|
4666
4738
|
option,
|
|
4667
4739
|
selectedOptions: unref(selectedOptions),
|
|
@@ -4690,6 +4762,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4690
4762
|
modifiers: "inert"
|
|
4691
4763
|
}, {
|
|
4692
4764
|
default: withCtx(() => [
|
|
4765
|
+
createCommentVNode(" @slot Slot for no options available "),
|
|
4693
4766
|
renderSlot(_ctx.$slots, "no-options", {}, () => [
|
|
4694
4767
|
createTextVNode(
|
|
4695
4768
|
toDisplayString(unref(propsDefaults).noOptionsLabel),
|
|
@@ -4705,6 +4778,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4705
4778
|
modifiers: "inert"
|
|
4706
4779
|
}, {
|
|
4707
4780
|
default: withCtx(() => [
|
|
4781
|
+
createCommentVNode(" @slot Slot for no results available "),
|
|
4708
4782
|
renderSlot(_ctx.$slots, "no-results", {}, () => [
|
|
4709
4783
|
createTextVNode(
|
|
4710
4784
|
toDisplayString(unref(propsDefaults).noResultsLabel),
|
|
@@ -4719,9 +4793,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4719
4793
|
];
|
|
4720
4794
|
}),
|
|
4721
4795
|
after: withCtx(() => [
|
|
4796
|
+
createCommentVNode(" @slot Slot after dropdown items "),
|
|
4722
4797
|
renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
|
|
4723
4798
|
var _a;
|
|
4724
4799
|
return [
|
|
4800
|
+
createCommentVNode(" Close button if dropdown custom position is enabled and floating-ui disabled "),
|
|
4725
4801
|
((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$n, {
|
|
4726
4802
|
key: 0,
|
|
4727
4803
|
label: unref(propsDefaults).closeLabel,
|
|
@@ -4737,6 +4813,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4737
4813
|
unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
|
|
4738
4814
|
name: "before",
|
|
4739
4815
|
fn: withCtx(() => [
|
|
4816
|
+
createCommentVNode(" @slot Slot before dropdown items "),
|
|
4740
4817
|
renderSlot(_ctx.$slots, "dropdown::before"),
|
|
4741
4818
|
unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
|
|
4742
4819
|
key: 0,
|
|
@@ -4969,6 +5046,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
4969
5046
|
},
|
|
4970
5047
|
[
|
|
4971
5048
|
_ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$7, [
|
|
5049
|
+
createCommentVNode(" @slot Header slot "),
|
|
4972
5050
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
4973
5051
|
createTextVNode(
|
|
4974
5052
|
toDisplayString(_ctx.title) + " ",
|
|
@@ -4992,9 +5070,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
4992
5070
|
])
|
|
4993
5071
|
])) : createCommentVNode("v-if", true),
|
|
4994
5072
|
createElementVNode("div", _hoisted_2$5, [
|
|
5073
|
+
createCommentVNode(" @slot Content slot "),
|
|
4995
5074
|
renderSlot(_ctx.$slots, "default")
|
|
4996
5075
|
]),
|
|
4997
5076
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3$3, [
|
|
5077
|
+
createCommentVNode(" @slot Footer slot "),
|
|
4998
5078
|
renderSlot(_ctx.$slots, "footer")
|
|
4999
5079
|
])) : createCommentVNode("v-if", true)
|
|
5000
5080
|
],
|
|
@@ -5074,14 +5154,6 @@ const INPUT_TYPES = {
|
|
|
5074
5154
|
MONTH: "month",
|
|
5075
5155
|
WEEK: "week"
|
|
5076
5156
|
};
|
|
5077
|
-
const TYPES_ICON = {
|
|
5078
|
-
PASSWORD_SHOW: "eye-on",
|
|
5079
|
-
PASSWORD_HIDE: "eye-off",
|
|
5080
|
-
DATE: "calendar",
|
|
5081
|
-
TIME: "time",
|
|
5082
|
-
COLOR: "color",
|
|
5083
|
-
SEARCH: "close"
|
|
5084
|
-
};
|
|
5085
5157
|
const VvInputTextEvents = [
|
|
5086
5158
|
"update:modelValue",
|
|
5087
5159
|
"update:masked",
|
|
@@ -5150,24 +5222,24 @@ const VvInputTextProps = {
|
|
|
5150
5222
|
* @see VVIcon
|
|
5151
5223
|
*/
|
|
5152
5224
|
iconShowPassword: {
|
|
5153
|
-
type: String,
|
|
5154
|
-
default:
|
|
5225
|
+
type: [String, Object],
|
|
5226
|
+
default: ACTION_ICONS.showPassword
|
|
5155
5227
|
},
|
|
5156
5228
|
/**
|
|
5157
5229
|
* VvIcon name for hide password button
|
|
5158
5230
|
* @see VVIcon
|
|
5159
5231
|
*/
|
|
5160
5232
|
iconHidePassword: {
|
|
5161
|
-
type: String,
|
|
5162
|
-
default:
|
|
5233
|
+
type: [String, Object],
|
|
5234
|
+
default: ACTION_ICONS.hidePassword
|
|
5163
5235
|
},
|
|
5164
5236
|
/**
|
|
5165
5237
|
* VvIcon name for clear button
|
|
5166
5238
|
* @see VVIcon
|
|
5167
5239
|
*/
|
|
5168
5240
|
iconClear: {
|
|
5169
|
-
type: String,
|
|
5170
|
-
default:
|
|
5241
|
+
type: [String, Object],
|
|
5242
|
+
default: ACTION_ICONS.clear
|
|
5171
5243
|
},
|
|
5172
5244
|
/**
|
|
5173
5245
|
* Label for step up button
|
|
@@ -5265,12 +5337,12 @@ const VvInputPasswordAction = defineComponent({
|
|
|
5265
5337
|
default: "Hide password"
|
|
5266
5338
|
},
|
|
5267
5339
|
iconShow: {
|
|
5268
|
-
type: String,
|
|
5269
|
-
default:
|
|
5340
|
+
type: [String, Object],
|
|
5341
|
+
default: ACTION_ICONS.showPassword
|
|
5270
5342
|
},
|
|
5271
5343
|
iconHide: {
|
|
5272
|
-
type: String,
|
|
5273
|
-
default:
|
|
5344
|
+
type: [String, Object],
|
|
5345
|
+
default: ACTION_ICONS.hidePassword
|
|
5274
5346
|
}
|
|
5275
5347
|
},
|
|
5276
5348
|
emits: ["toggle-password"],
|
|
@@ -5279,6 +5351,7 @@ const VvInputPasswordAction = defineComponent({
|
|
|
5279
5351
|
const activeIcon = computed(
|
|
5280
5352
|
() => active.value ? props.iconHide : props.iconShow
|
|
5281
5353
|
);
|
|
5354
|
+
const { hasIcon } = useComponentIcon(activeIcon);
|
|
5282
5355
|
function onClick(e) {
|
|
5283
5356
|
e == null ? void 0 : e.stopPropagation();
|
|
5284
5357
|
if (!props.disabled) {
|
|
@@ -5289,14 +5362,15 @@ const VvInputPasswordAction = defineComponent({
|
|
|
5289
5362
|
return {
|
|
5290
5363
|
active,
|
|
5291
5364
|
activeIcon,
|
|
5365
|
+
hasIcon,
|
|
5292
5366
|
onClick
|
|
5293
5367
|
};
|
|
5294
5368
|
},
|
|
5295
5369
|
render() {
|
|
5296
|
-
const icon = h(_sfc_main$u, {
|
|
5297
|
-
|
|
5370
|
+
const icon = this.hasIcon ? h(_sfc_main$u, {
|
|
5371
|
+
...this.hasIcon,
|
|
5298
5372
|
class: "vv-input-text__icon"
|
|
5299
|
-
});
|
|
5373
|
+
}) : void 0;
|
|
5300
5374
|
return h(
|
|
5301
5375
|
"button",
|
|
5302
5376
|
{
|
|
@@ -5369,12 +5443,13 @@ const VvInputClearAction = defineComponent({
|
|
|
5369
5443
|
default: "Clear"
|
|
5370
5444
|
},
|
|
5371
5445
|
icon: {
|
|
5372
|
-
type: String,
|
|
5446
|
+
type: [String, Object],
|
|
5373
5447
|
default: "close"
|
|
5374
5448
|
}
|
|
5375
5449
|
},
|
|
5376
5450
|
emits: ["clear"],
|
|
5377
5451
|
setup(props, { emit }) {
|
|
5452
|
+
const { hasIcon } = useComponentIcon(computed(() => props.icon));
|
|
5378
5453
|
function onClick(e) {
|
|
5379
5454
|
e == null ? void 0 : e.stopPropagation();
|
|
5380
5455
|
if (!props.disabled) {
|
|
@@ -5382,14 +5457,15 @@ const VvInputClearAction = defineComponent({
|
|
|
5382
5457
|
}
|
|
5383
5458
|
}
|
|
5384
5459
|
return {
|
|
5460
|
+
hasIcon,
|
|
5385
5461
|
onClick
|
|
5386
5462
|
};
|
|
5387
5463
|
},
|
|
5388
5464
|
render() {
|
|
5389
|
-
const icon = h(_sfc_main$u, {
|
|
5390
|
-
|
|
5465
|
+
const icon = this.hasIcon ? h(_sfc_main$u, {
|
|
5466
|
+
...this.hasIcon,
|
|
5391
5467
|
class: "vv-input-text__icon"
|
|
5392
|
-
});
|
|
5468
|
+
}) : void 0;
|
|
5393
5469
|
return h(
|
|
5394
5470
|
"button",
|
|
5395
5471
|
{
|
|
@@ -5749,14 +5825,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5749
5825
|
}
|
|
5750
5826
|
switch (props.type) {
|
|
5751
5827
|
case INPUT_TYPES.COLOR:
|
|
5752
|
-
return { name:
|
|
5828
|
+
return { name: ACTION_ICONS.showColorPicker };
|
|
5753
5829
|
case INPUT_TYPES.DATE:
|
|
5754
5830
|
case INPUT_TYPES.DATETIME_LOCAL:
|
|
5755
5831
|
case INPUT_TYPES.WEEK:
|
|
5756
5832
|
case INPUT_TYPES.MONTH:
|
|
5757
|
-
return { name:
|
|
5833
|
+
return { name: ACTION_ICONS.showDatePicker };
|
|
5758
5834
|
case INPUT_TYPES.TIME:
|
|
5759
|
-
return { name:
|
|
5835
|
+
return { name: ACTION_ICONS.showTimePicker };
|
|
5760
5836
|
}
|
|
5761
5837
|
return void 0;
|
|
5762
5838
|
});
|
|
@@ -5789,8 +5865,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5789
5865
|
loading: loading.value,
|
|
5790
5866
|
disabled: props.disabled,
|
|
5791
5867
|
readonly: props.readonly,
|
|
5792
|
-
"icon-before": hasIconBefore.value
|
|
5793
|
-
"icon-after": iconAfter.value
|
|
5868
|
+
"icon-before": !!hasIconBefore.value,
|
|
5869
|
+
"icon-after": !!iconAfter.value,
|
|
5794
5870
|
floating: props.floating && !isEmpty(props.label),
|
|
5795
5871
|
dirty: isDirty.value,
|
|
5796
5872
|
focus: isFocused.value,
|
|
@@ -5911,6 +5987,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5911
5987
|
}, toDisplayString(unref(label)), 9, _hoisted_1$6)) : createCommentVNode("v-if", true),
|
|
5912
5988
|
createElementVNode("div", _hoisted_2$4, [
|
|
5913
5989
|
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
5990
|
+
createCommentVNode(" @slot Slot before input icon "),
|
|
5914
5991
|
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
5915
5992
|
])) : createCommentVNode("v-if", true),
|
|
5916
5993
|
createElementVNode(
|
|
@@ -5940,6 +6017,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5940
6017
|
onKeypress: _cache[1] || (_cache[1] = ($event) => emit("keypress", $event))
|
|
5941
6018
|
}), null, 16, _hoisted_4$2),
|
|
5942
6019
|
(_ctx.unit || _ctx.$slots.unit) && unref(isDirty) ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
6020
|
+
createCommentVNode(" @slot Slot to replace unit"),
|
|
5943
6021
|
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
|
|
5944
6022
|
createTextVNode(
|
|
5945
6023
|
toDisplayString(_ctx.unit),
|
|
@@ -5952,6 +6030,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5952
6030
|
512
|
|
5953
6031
|
/* NEED_PATCH */
|
|
5954
6032
|
),
|
|
6033
|
+
createCommentVNode(" @slot Slot to replace right icon "),
|
|
5955
6034
|
unref(iconAfter) ? (openBlock(), createBlock(
|
|
5956
6035
|
_sfc_main$u,
|
|
5957
6036
|
mergeProps({ key: 1 }, unref(iconAfter), { class: "vv-input-text__icon vv-input-text__icon-after" }),
|
|
@@ -5969,10 +6048,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5969
6048
|
key: 4,
|
|
5970
6049
|
onClear
|
|
5971
6050
|
})) : createCommentVNode("v-if", true),
|
|
6051
|
+
createCommentVNode(" @slot Slot after input "),
|
|
5972
6052
|
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
|
|
6053
|
+
createCommentVNode(" @slot Slot before input icon "),
|
|
5973
6054
|
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
5974
6055
|
])) : createCommentVNode("v-if", true),
|
|
5975
6056
|
unref(count) ? (openBlock(), createElementBlock("span", _hoisted_7$2, [
|
|
6057
|
+
createCommentVNode(" @slot Slot to replace count "),
|
|
5976
6058
|
renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
|
|
5977
6059
|
createTextVNode(
|
|
5978
6060
|
toDisplayString(unref(countFormatted)),
|
|
@@ -6438,6 +6520,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
6438
6520
|
textContent: toDisplayString(_ctx.label)
|
|
6439
6521
|
}, null, 8, _hoisted_1$2)) : createCommentVNode("v-if", true),
|
|
6440
6522
|
createElementVNode("div", _hoisted_2$2, [
|
|
6523
|
+
createCommentVNode(" #region options "),
|
|
6441
6524
|
_ctx.options.length > 0 ? (openBlock(true), createElementBlock(
|
|
6442
6525
|
Fragment,
|
|
6443
6526
|
{ key: 0 },
|
|
@@ -6452,7 +6535,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
6452
6535
|
}),
|
|
6453
6536
|
128
|
|
6454
6537
|
/* KEYED_FRAGMENT */
|
|
6455
|
-
)) :
|
|
6538
|
+
)) : (openBlock(), createElementBlock(
|
|
6539
|
+
Fragment,
|
|
6540
|
+
{ key: 1 },
|
|
6541
|
+
[
|
|
6542
|
+
createCommentVNode(" #endregion "),
|
|
6543
|
+
createCommentVNode(" #region default "),
|
|
6544
|
+
renderSlot(_ctx.$slots, "default")
|
|
6545
|
+
],
|
|
6546
|
+
2112
|
|
6547
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
6548
|
+
)),
|
|
6549
|
+
createCommentVNode(" #endregion ")
|
|
6456
6550
|
]),
|
|
6457
6551
|
createVNode(
|
|
6458
6552
|
unref(HintSlot),
|
|
@@ -6568,6 +6662,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6568
6662
|
class: normalizeClass(unref(bemCssClasses))
|
|
6569
6663
|
},
|
|
6570
6664
|
[
|
|
6665
|
+
createCommentVNode(" #region nav "),
|
|
6571
6666
|
createVNode(
|
|
6572
6667
|
_sfc_main$8,
|
|
6573
6668
|
mergeProps({
|
|
@@ -6584,6 +6679,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6584
6679
|
16
|
|
6585
6680
|
/* FULL_PROPS */
|
|
6586
6681
|
),
|
|
6682
|
+
createCommentVNode(" #endregion "),
|
|
6683
|
+
createCommentVNode(" #region panels "),
|
|
6587
6684
|
(openBlock(true), createElementBlock(
|
|
6588
6685
|
Fragment,
|
|
6589
6686
|
null,
|
|
@@ -6611,7 +6708,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6611
6708
|
}),
|
|
6612
6709
|
128
|
|
6613
6710
|
/* KEYED_FRAGMENT */
|
|
6614
|
-
))
|
|
6711
|
+
)),
|
|
6712
|
+
createCommentVNode(" #endregion ")
|
|
6615
6713
|
],
|
|
6616
6714
|
2
|
|
6617
6715
|
/* CLASS */
|
|
@@ -6810,7 +6908,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6810
6908
|
class: "vv-textarea__label"
|
|
6811
6909
|
}, toDisplayString(unref(label)), 9, _hoisted_1$1)) : createCommentVNode("v-if", true),
|
|
6812
6910
|
createElementVNode("div", _hoisted_2$1, [
|
|
6911
|
+
createCommentVNode(" @slot Slot to replace icon before textarea "),
|
|
6813
6912
|
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
6913
|
+
createCommentVNode(" @slot Slot before input "),
|
|
6814
6914
|
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
6815
6915
|
])) : createCommentVNode("v-if", true),
|
|
6816
6916
|
createElementVNode("div", _hoisted_4$1, [
|
|
@@ -6840,9 +6940,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6840
6940
|
)) : createCommentVNode("v-if", true)
|
|
6841
6941
|
]),
|
|
6842
6942
|
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
|
|
6943
|
+
createCommentVNode(" @slot Slot after input "),
|
|
6843
6944
|
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
6844
6945
|
])) : createCommentVNode("v-if", true),
|
|
6845
6946
|
unref(count) ? (openBlock(), createElementBlock("span", _hoisted_7$1, [
|
|
6947
|
+
createCommentVNode(" @slot Slot to replace count "),
|
|
6846
6948
|
renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
|
|
6847
6949
|
createTextVNode(
|
|
6848
6950
|
toDisplayString(unref(countFormatted)),
|
|
@@ -6946,6 +7048,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
6946
7048
|
}
|
|
6947
7049
|
});
|
|
6948
7050
|
const VvInputFileProps = {
|
|
7051
|
+
...IdNameProps,
|
|
6949
7052
|
...ModifiersProps,
|
|
6950
7053
|
...ValidProps,
|
|
6951
7054
|
...InvalidProps,
|
|
@@ -6953,32 +7056,107 @@ const VvInputFileProps = {
|
|
|
6953
7056
|
...LabelProps,
|
|
6954
7057
|
...LoadingProps,
|
|
6955
7058
|
...ReadonlyProps,
|
|
6956
|
-
|
|
6957
|
-
|
|
7059
|
+
...IconProps,
|
|
7060
|
+
/**
|
|
7061
|
+
* Input value
|
|
7062
|
+
*/
|
|
6958
7063
|
modelValue: {
|
|
6959
7064
|
type: Object,
|
|
6960
7065
|
required: true
|
|
6961
7066
|
},
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
7067
|
+
/**
|
|
7068
|
+
* Whether to show progress bar
|
|
7069
|
+
*/
|
|
7070
|
+
progress: { type: [Number, String], default: void 0 },
|
|
7071
|
+
/**
|
|
7072
|
+
* Input
|
|
7073
|
+
* Text that appears in the form control when it has no value set
|
|
7074
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
|
|
7075
|
+
*/
|
|
7076
|
+
placeholder: { type: String, default: void 0 },
|
|
7077
|
+
/**
|
|
7078
|
+
* File types to accept
|
|
7079
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept
|
|
7080
|
+
*/
|
|
7081
|
+
accept: { type: String, default: "*" },
|
|
7082
|
+
/**
|
|
7083
|
+
* Whether to allow multiple values
|
|
7084
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#multiple
|
|
7085
|
+
*/
|
|
7086
|
+
multiple: { type: Boolean, default: false },
|
|
7087
|
+
/**
|
|
7088
|
+
* Max number of files
|
|
7089
|
+
*/
|
|
7090
|
+
max: { type: [Number, String], default: void 0 },
|
|
7091
|
+
/**
|
|
7092
|
+
* Show drop area
|
|
7093
|
+
*/
|
|
7094
|
+
dropArea: { type: Boolean, default: false },
|
|
7095
|
+
/**
|
|
7096
|
+
* Label for add button
|
|
7097
|
+
*/
|
|
7098
|
+
labelAdd: {
|
|
7099
|
+
type: String,
|
|
7100
|
+
default: "Add file"
|
|
7101
|
+
},
|
|
7102
|
+
/**
|
|
7103
|
+
* VvIcon name for add button
|
|
7104
|
+
* @see VVIcon
|
|
7105
|
+
*/
|
|
7106
|
+
iconAdd: {
|
|
7107
|
+
type: [String, Object],
|
|
7108
|
+
default: ACTION_ICONS.add
|
|
7109
|
+
},
|
|
7110
|
+
/**
|
|
7111
|
+
* Label for replace button
|
|
7112
|
+
*/
|
|
7113
|
+
labelReplace: {
|
|
7114
|
+
type: String,
|
|
7115
|
+
default: "Replace file"
|
|
7116
|
+
},
|
|
7117
|
+
/**
|
|
7118
|
+
* VvIcon name for replace button
|
|
7119
|
+
* @see VVIcon
|
|
7120
|
+
*/
|
|
7121
|
+
iconReplace: {
|
|
7122
|
+
type: [String, Object],
|
|
7123
|
+
default: ACTION_ICONS.edit
|
|
7124
|
+
},
|
|
7125
|
+
/**
|
|
7126
|
+
* Label for download button
|
|
7127
|
+
*/
|
|
7128
|
+
labelDownload: {
|
|
7129
|
+
type: String,
|
|
7130
|
+
default: "Downlaod file"
|
|
7131
|
+
},
|
|
7132
|
+
/**
|
|
7133
|
+
* VvIcon name for download button
|
|
7134
|
+
* @see VVIcon
|
|
7135
|
+
*/
|
|
7136
|
+
iconDownload: {
|
|
7137
|
+
type: [String, Object],
|
|
7138
|
+
default: ACTION_ICONS.download
|
|
7139
|
+
},
|
|
7140
|
+
/**
|
|
7141
|
+
* Label for remove button
|
|
7142
|
+
*/
|
|
7143
|
+
labelRemove: {
|
|
7144
|
+
type: String,
|
|
7145
|
+
default: "Remove file"
|
|
7146
|
+
}
|
|
6970
7147
|
};
|
|
6971
7148
|
const _hoisted_1 = ["for"];
|
|
6972
7149
|
const _hoisted_2 = { class: "vv-input-file__preview" };
|
|
6973
7150
|
const _hoisted_3 = ["src", "alt"];
|
|
6974
7151
|
const _hoisted_4 = { class: "vv-input-file__wrapper" };
|
|
6975
7152
|
const _hoisted_5 = ["id", "readonly", "placeholder", "aria-describedby", "aria-invalid", "aria-errormessage", "multiple", "accept", "name"];
|
|
6976
|
-
const _hoisted_6 =
|
|
6977
|
-
const _hoisted_7 =
|
|
7153
|
+
const _hoisted_6 = ["value"];
|
|
7154
|
+
const _hoisted_7 = { class: "vv-input-file__list" };
|
|
6978
7155
|
const _hoisted_8 = ["onClick"];
|
|
6979
|
-
const _hoisted_9 =
|
|
6980
|
-
const _hoisted_10 = { class: "vv-input-file__item-
|
|
6981
|
-
const _hoisted_11 =
|
|
7156
|
+
const _hoisted_9 = ["title", "onClick"];
|
|
7157
|
+
const _hoisted_10 = { class: "vv-input-file__item-name" };
|
|
7158
|
+
const _hoisted_11 = { class: "vv-input-file__item-info" };
|
|
7159
|
+
const _hoisted_12 = ["title", "onClick"];
|
|
6982
7160
|
const __default__ = {
|
|
6983
7161
|
name: "VvInputFile"
|
|
6984
7162
|
};
|
|
@@ -6995,19 +7173,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
6995
7173
|
VvInputFileProps,
|
|
6996
7174
|
props
|
|
6997
7175
|
);
|
|
6998
|
-
const { modifiers, id, readonly } = toRefs(props);
|
|
7176
|
+
const { modifiers, id, readonly, icon, iconPosition, iconDownload } = toRefs(props);
|
|
6999
7177
|
const hasId = useUniqueId(id);
|
|
7000
7178
|
const hasHintId = computed(() => `${hasId.value}-hint`);
|
|
7179
|
+
const hasProgress = computed(() => {
|
|
7180
|
+
if (!props.progress) {
|
|
7181
|
+
return false;
|
|
7182
|
+
}
|
|
7183
|
+
const progress = typeof props.progress === "string" ? parseInt(props.progress) : props.progress;
|
|
7184
|
+
return progress > 0 && progress < 100;
|
|
7185
|
+
});
|
|
7186
|
+
const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
|
|
7187
|
+
const { hasIcon: hasIconDownload } = useComponentIcon(iconDownload);
|
|
7001
7188
|
const bemCssClasses = useModifiers(
|
|
7002
7189
|
"vv-input-file",
|
|
7003
7190
|
modifiers,
|
|
7004
7191
|
computed(() => ({
|
|
7005
7192
|
dragging: isDragging.value,
|
|
7006
|
-
loading: props.loading,
|
|
7193
|
+
loading: props.loading && !hasProgress.value,
|
|
7007
7194
|
valid: props.valid === true,
|
|
7008
7195
|
invalid: props.invalid === true,
|
|
7009
|
-
"icon-before": !!
|
|
7010
|
-
"icon-after": !!
|
|
7196
|
+
"icon-before": !!hasIconBefore.value,
|
|
7197
|
+
"icon-after": !!hasIconAfter.value,
|
|
7198
|
+
"drop-area": hasDropArea.value
|
|
7011
7199
|
}))
|
|
7012
7200
|
);
|
|
7013
7201
|
const {
|
|
@@ -7028,8 +7216,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7028
7216
|
return typeof props.max === "string" ? parseInt(props.max) : props.max;
|
|
7029
7217
|
});
|
|
7030
7218
|
const hasDropArea = computed(() => {
|
|
7031
|
-
|
|
7032
|
-
return (_a = modifiers == null ? void 0 : modifiers.value) == null ? void 0 : _a.includes("drop-area");
|
|
7219
|
+
return props.dropArea && !readonly.value;
|
|
7033
7220
|
});
|
|
7034
7221
|
const isMultiple = computed(() => {
|
|
7035
7222
|
if (!props.multiple) {
|
|
@@ -7086,8 +7273,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7086
7273
|
toReturn.push(file);
|
|
7087
7274
|
}
|
|
7088
7275
|
localModelValue.value = toReturn;
|
|
7276
|
+
selectedFileIndex.value = toReturn.length - 1;
|
|
7089
7277
|
};
|
|
7090
|
-
const
|
|
7278
|
+
const onClickDropArea = () => {
|
|
7091
7279
|
if (!inputEl.value) {
|
|
7092
7280
|
return;
|
|
7093
7281
|
}
|
|
@@ -7104,17 +7292,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7104
7292
|
toReturn.splice(index, 1);
|
|
7105
7293
|
localModelValue.value = toReturn;
|
|
7106
7294
|
};
|
|
7107
|
-
const
|
|
7295
|
+
const selectedFileIndex = ref(0);
|
|
7296
|
+
const PREVIEW_MIME_TYPES = ["image/jpeg", "image/png"];
|
|
7108
7297
|
const previewSrc = computed(() => {
|
|
7109
7298
|
if (files.value.length === 0) {
|
|
7110
7299
|
return;
|
|
7111
7300
|
}
|
|
7112
|
-
if (files.value[
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7301
|
+
if (files.value[selectedFileIndex.value] instanceof File) {
|
|
7302
|
+
const currentFile2 = files.value[selectedFileIndex.value];
|
|
7303
|
+
if (!PREVIEW_MIME_TYPES.includes(currentFile2.type)) {
|
|
7304
|
+
return void 0;
|
|
7305
|
+
}
|
|
7306
|
+
return URL.createObjectURL(currentFile2);
|
|
7307
|
+
}
|
|
7308
|
+
const currentFile = files.value[selectedFileIndex.value];
|
|
7309
|
+
if (currentFile.thumbnailUrl) {
|
|
7310
|
+
return currentFile.thumbnailUrl;
|
|
7311
|
+
}
|
|
7312
|
+
if (!PREVIEW_MIME_TYPES.includes(currentFile.type)) {
|
|
7313
|
+
return void 0;
|
|
7314
|
+
}
|
|
7315
|
+
return currentFile.url;
|
|
7316
|
+
});
|
|
7317
|
+
watch(previewSrc, (_newValue, oldValue) => {
|
|
7318
|
+
if (oldValue) {
|
|
7319
|
+
URL.revokeObjectURL(oldValue);
|
|
7116
7320
|
}
|
|
7117
|
-
return files.value[currentFileIndex.value].url;
|
|
7118
7321
|
});
|
|
7119
7322
|
onBeforeUnmount(() => {
|
|
7120
7323
|
if (previewSrc.value) {
|
|
@@ -7137,7 +7340,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7137
7340
|
link.setAttribute("download", file.name);
|
|
7138
7341
|
document.body.appendChild(link);
|
|
7139
7342
|
link.click();
|
|
7343
|
+
document.body.removeChild(link);
|
|
7344
|
+
URL.revokeObjectURL(link.href);
|
|
7345
|
+
};
|
|
7346
|
+
const onClickSelectFile = (index) => {
|
|
7347
|
+
selectedFileIndex.value = index;
|
|
7140
7348
|
};
|
|
7349
|
+
const dropdAreaActionLabel = computed(() => {
|
|
7350
|
+
if (files.value.length === 0 || isMultiple.value) {
|
|
7351
|
+
return props.labelAdd;
|
|
7352
|
+
}
|
|
7353
|
+
return props.labelReplace;
|
|
7354
|
+
});
|
|
7355
|
+
const dropAreaActionIcon = computed(() => {
|
|
7356
|
+
if (files.value.length === 0 || isMultiple.value) {
|
|
7357
|
+
return props.iconAdd;
|
|
7358
|
+
}
|
|
7359
|
+
return props.iconReplace;
|
|
7360
|
+
});
|
|
7141
7361
|
return (_ctx, _cache) => {
|
|
7142
7362
|
return openBlock(), createElementBlock(
|
|
7143
7363
|
"div",
|
|
@@ -7159,42 +7379,46 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7159
7379
|
onDrop: withModifiers(onDrop, ["prevent", "stop"]),
|
|
7160
7380
|
onDragover: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
7161
7381
|
}, ["prevent", "stop"])),
|
|
7162
|
-
onClick: withModifiers(
|
|
7382
|
+
onClick: withModifiers(onClickDropArea, ["stop"])
|
|
7163
7383
|
},
|
|
7164
7384
|
[
|
|
7165
7385
|
renderSlot(_ctx.$slots, "drop-area", {}, () => [
|
|
7166
|
-
!unref(readonly) ? (openBlock(), createBlock(_sfc_main$n, {
|
|
7167
|
-
key: 0,
|
|
7168
|
-
modifiers: "action",
|
|
7169
|
-
"aria-label": "upload",
|
|
7170
|
-
label: !previewSrc.value ? _ctx.labelButton : void 0,
|
|
7171
|
-
class: normalizeClass([{
|
|
7172
|
-
"absolute top-8 right-8": previewSrc.value
|
|
7173
|
-
}, "z-1"]),
|
|
7174
|
-
icon: !previewSrc.value ? "image" : isMultiple.value ? "add" : "edit",
|
|
7175
|
-
onClick: withModifiers(onClick, ["stop"])
|
|
7176
|
-
}, null, 8, ["label", "class", "icon"])) : createCommentVNode("v-if", true),
|
|
7177
7386
|
createElementVNode("picture", _hoisted_2, [
|
|
7178
7387
|
previewSrc.value ? (openBlock(), createElementBlock("img", {
|
|
7179
7388
|
key: 0,
|
|
7180
7389
|
src: previewSrc.value,
|
|
7181
|
-
alt: files.value[
|
|
7390
|
+
alt: files.value[selectedFileIndex.value].name
|
|
7182
7391
|
}, null, 8, _hoisted_3)) : createCommentVNode("v-if", true)
|
|
7183
|
-
])
|
|
7392
|
+
]),
|
|
7393
|
+
!unref(readonly) ? (openBlock(), createBlock(_sfc_main$n, {
|
|
7394
|
+
key: 0,
|
|
7395
|
+
modifiers: "action",
|
|
7396
|
+
label: !previewSrc.value ? dropdAreaActionLabel.value : void 0,
|
|
7397
|
+
title: previewSrc.value ? dropdAreaActionLabel.value : void 0,
|
|
7398
|
+
class: normalizeClass({
|
|
7399
|
+
"vv-input-file__drop-area-action": previewSrc.value
|
|
7400
|
+
}),
|
|
7401
|
+
icon: dropAreaActionIcon.value,
|
|
7402
|
+
onClick: withModifiers(onClickDropArea, ["stop"])
|
|
7403
|
+
}, null, 8, ["label", "title", "class", "icon"])) : createCommentVNode("v-if", true)
|
|
7184
7404
|
])
|
|
7185
7405
|
],
|
|
7186
7406
|
32
|
|
7187
7407
|
/* NEED_HYDRATION */
|
|
7188
7408
|
)) : createCommentVNode("v-if", true),
|
|
7189
7409
|
createElementVNode("div", _hoisted_4, [
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7410
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(
|
|
7411
|
+
_sfc_main$u,
|
|
7412
|
+
normalizeProps(mergeProps({ key: 0 }, unref(hasIconBefore))),
|
|
7413
|
+
null,
|
|
7414
|
+
16
|
|
7415
|
+
/* FULL_PROPS */
|
|
7416
|
+
)) : createCommentVNode("v-if", true),
|
|
7194
7417
|
createElementVNode("input", {
|
|
7195
7418
|
id: unref(hasId),
|
|
7196
7419
|
ref_key: "inputEl",
|
|
7197
7420
|
ref: inputEl,
|
|
7421
|
+
type: "file",
|
|
7198
7422
|
readonly: unref(readonly),
|
|
7199
7423
|
placeholder: _ctx.placeholder,
|
|
7200
7424
|
"aria-describedby": unref(hasHintLabelOrSlot) ? hasHintId.value : void 0,
|
|
@@ -7202,57 +7426,72 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7202
7426
|
"aria-errormessage": unref(hasInvalidLabelOrSlot) ? hasHintId.value : void 0,
|
|
7203
7427
|
multiple: isMultiple.value,
|
|
7204
7428
|
accept: _ctx.accept,
|
|
7205
|
-
type: "file",
|
|
7206
7429
|
name: _ctx.name,
|
|
7207
7430
|
onChange
|
|
7208
7431
|
}, null, 40, _hoisted_5),
|
|
7209
|
-
|
|
7432
|
+
hasProgress.value ? (openBlock(), createElementBlock("progress", {
|
|
7210
7433
|
key: 1,
|
|
7211
|
-
|
|
7212
|
-
|
|
7434
|
+
class: "vv-input-file__progress",
|
|
7435
|
+
value: _ctx.progress,
|
|
7436
|
+
max: "100"
|
|
7437
|
+
}, toDisplayString(_ctx.progress) + "% ", 9, _hoisted_6)) : createCommentVNode("v-if", true),
|
|
7438
|
+
unref(hasIconAfter) ? (openBlock(), createBlock(
|
|
7439
|
+
_sfc_main$u,
|
|
7440
|
+
normalizeProps(mergeProps({ key: 2 }, unref(hasIconAfter))),
|
|
7441
|
+
null,
|
|
7442
|
+
16
|
|
7443
|
+
/* FULL_PROPS */
|
|
7444
|
+
)) : createCommentVNode("v-if", true)
|
|
7213
7445
|
]),
|
|
7214
|
-
createElementVNode("ul",
|
|
7446
|
+
createElementVNode("ul", _hoisted_7, [
|
|
7215
7447
|
(openBlock(true), createElementBlock(
|
|
7216
7448
|
Fragment,
|
|
7217
7449
|
null,
|
|
7218
7450
|
renderList(files.value, (file, index) => {
|
|
7219
7451
|
return openBlock(), createElementBlock("li", {
|
|
7220
7452
|
key: index,
|
|
7221
|
-
class: "vv-input-file__item",
|
|
7222
|
-
|
|
7453
|
+
class: normalizeClass(["vv-input-file__item", {
|
|
7454
|
+
active: index === selectedFileIndex.value && hasDropArea.value && files.value.length > 1
|
|
7455
|
+
}]),
|
|
7456
|
+
onClick: withModifiers(($event) => onClickSelectFile(index), ["stop"])
|
|
7223
7457
|
}, [
|
|
7224
|
-
|
|
7458
|
+
unref(hasIconDownload) ? (openBlock(), createElementBlock("button", {
|
|
7459
|
+
key: 0,
|
|
7225
7460
|
type: "button",
|
|
7226
|
-
class: "vv-input-file__item-
|
|
7227
|
-
title:
|
|
7228
|
-
"aria-label": "download-file",
|
|
7461
|
+
class: "vv-input-file__item-action",
|
|
7462
|
+
title: _ctx.labelDownload,
|
|
7229
7463
|
onClick: withModifiers(($event) => onClickDownloadFile(file), ["stop"])
|
|
7230
7464
|
}, [
|
|
7231
|
-
createVNode(
|
|
7232
|
-
|
|
7465
|
+
createVNode(
|
|
7466
|
+
_sfc_main$u,
|
|
7467
|
+
normalizeProps(guardReactiveProps(unref(hasIconDownload))),
|
|
7468
|
+
null,
|
|
7469
|
+
16
|
|
7470
|
+
/* FULL_PROPS */
|
|
7471
|
+
)
|
|
7472
|
+
], 8, _hoisted_9)) : createCommentVNode("v-if", true),
|
|
7233
7473
|
createElementVNode(
|
|
7234
7474
|
"div",
|
|
7235
|
-
|
|
7475
|
+
_hoisted_10,
|
|
7236
7476
|
toDisplayString(file.name),
|
|
7237
7477
|
1
|
|
7238
7478
|
/* TEXT */
|
|
7239
7479
|
),
|
|
7240
7480
|
createElementVNode(
|
|
7241
7481
|
"small",
|
|
7242
|
-
|
|
7482
|
+
_hoisted_11,
|
|
7243
7483
|
toDisplayString(sizeInKiB(file.size)) + " KB ",
|
|
7244
7484
|
1
|
|
7245
7485
|
/* TEXT */
|
|
7246
7486
|
),
|
|
7247
7487
|
!unref(readonly) ? (openBlock(), createElementBlock("button", {
|
|
7248
|
-
key:
|
|
7488
|
+
key: 1,
|
|
7249
7489
|
type: "button",
|
|
7250
7490
|
class: "vv-input-file__item-remove",
|
|
7251
|
-
title:
|
|
7252
|
-
"aria-label": "remove-file",
|
|
7491
|
+
title: _ctx.labelRemove,
|
|
7253
7492
|
onClick: withModifiers(($event) => onClickRemoveFile(index), ["stop"])
|
|
7254
|
-
}, null, 8,
|
|
7255
|
-
],
|
|
7493
|
+
}, null, 8, _hoisted_12)) : createCommentVNode("v-if", true)
|
|
7494
|
+
], 10, _hoisted_8);
|
|
7256
7495
|
}),
|
|
7257
7496
|
128
|
|
7258
7497
|
/* KEYED_FRAGMENT */
|