@volverjs/ui-vue 0.0.9-beta.1 → 0.0.9-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/auto-imports.d.ts +2 -0
- package/dist/components/VvAccordion/VvAccordion.es.js +7 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +7 -0
- package/dist/components/VvAction/VvAction.es.js +9 -1
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +9 -0
- package/dist/components/VvAction/index.d.ts +4 -0
- package/dist/components/VvAlert/VvAlert.es.js +14 -6
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +6 -6
- package/dist/components/VvAlert/index.d.ts +3 -3
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +14 -6
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.es.js +7 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +7 -0
- package/dist/components/VvBadge/VvBadge.es.js +7 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +7 -0
- package/dist/components/VvButton/VvButton.es.js +11 -2
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +9 -0
- package/dist/components/VvButton/index.d.ts +4 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +7 -0
- package/dist/components/VvCard/VvCard.es.js +7 -0
- package/dist/components/VvCheckbox/VvCheckbox.es.js +91 -14
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +97 -15
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/VvCombobox/VvCombobox.es.js +127 -84
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +35 -14
- package/dist/components/VvCombobox/index.d.ts +24 -7
- package/dist/components/VvDialog/VvDialog.es.js +34 -26
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +21 -10
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +4 -11
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +9 -0
- package/dist/components/VvDropdown/index.d.ts +1 -7
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +9 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +7 -0
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +7 -0
- package/dist/components/VvInputText/VvInputText.es.js +87 -14
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +4 -4
- package/dist/components/VvNav/VvNav.es.js +10 -2
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/index.d.ts +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +7 -0
- package/dist/components/VvRadio/VvRadio.es.js +91 -14
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +97 -15
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +4 -4
- package/dist/components/VvSelect/VvSelect.es.js +87 -14
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +4 -4
- package/dist/components/VvTab/VvTab.es.js +10 -2
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +87 -14
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +4 -4
- package/dist/components/VvTooltip/VvTooltip.es.js +7 -0
- package/dist/components/common/HintSlot.d.ts +4 -3
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.es.js +905 -437
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +27 -0
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.es.js +81 -0
- package/dist/composables/index.umd.js +1 -0
- package/dist/constants.d.ts +10 -0
- package/dist/directives/index.es.js +7 -0
- package/dist/directives/v-tooltip.es.js +7 -0
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +7 -0
- package/dist/resolvers/unplugin.es.js +3 -0
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +43 -258
- package/dist/stories/Alert/Alert.settings.d.ts +3 -7
- package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +2 -2
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +6 -0
- package/dist/stories/Button/Button.settings.d.ts +3 -13
- package/dist/stories/Combobox/Combobox.settings.d.ts +117 -19
- package/dist/stories/Nav/Nav.settings.d.ts +3 -21
- package/package.json +54 -46
- 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/VvAction/VvAction.vue +2 -1
- package/src/components/VvAlert/VvAlert.vue +5 -1
- package/src/components/VvAlert/index.ts +3 -3
- package/src/components/VvAlertGroup/VvAlertGroup.vue +2 -0
- package/src/components/VvButton/VvButton.vue +1 -0
- package/src/components/VvCheckbox/VvCheckbox.vue +8 -1
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +8 -1
- package/src/components/VvCombobox/VvCombobox.vue +9 -4
- package/src/components/VvCombobox/index.ts +24 -0
- package/src/components/VvDialog/VvDialog.vue +16 -17
- package/src/components/VvDropdown/VvDropdown.vue +7 -3
- package/src/components/VvDropdown/index.ts +2 -8
- package/src/components/VvInputText/VvInputText.vue +8 -1
- package/src/components/VvNav/VvNav.vue +1 -1
- package/src/components/VvNav/index.ts +1 -1
- package/src/components/VvRadio/VvRadio.vue +8 -1
- package/src/components/VvRadioGroup/VvRadioGroup.vue +8 -1
- package/src/components/VvSelect/VvSelect.vue +8 -1
- package/src/components/VvTextarea/VvTextarea.vue +8 -1
- package/src/components/common/HintSlot.ts +26 -13
- package/src/components/index.ts +5 -0
- package/src/composables/alert/useAlert.ts +103 -0
- package/src/composables/index.ts +1 -0
- package/src/constants.ts +21 -0
- package/src/props/index.ts +7 -0
- package/src/resolvers/unplugin.ts +3 -0
- package/src/stories/Alert/Alert.settings.ts +3 -1
- package/src/stories/AlertGroup/AlertGroup.test.ts +13 -0
- package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +3 -3
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +118 -0
- package/src/stories/Button/Button.settings.ts +5 -3
- package/src/stories/Combobox/Combobox.settings.ts +119 -2
- package/src/stories/Nav/Nav.settings.ts +3 -1
- package/src/stories/Tab/Tab.stories.ts +3 -3
- package/src/stories/Textarea/TextareaLength.stories.ts +1 -1
- package/src/types/alert.d.ts +20 -0
- /package/dist/components/{VvNavItemTitle → VvNav}/VvNavItemTitle.vue.d.ts +0 -0
- /package/dist/components/{VvNavSeparator → VvNav}/VvNavSeparator.d.ts +0 -0
- /package/src/components/{VvNavItemTitle → VvNav}/VvNavItemTitle.vue +0 -0
- /package/src/components/{VvNavSeparator → VvNav}/VvNavSeparator.ts +0 -0
|
@@ -79,6 +79,9 @@ const INJECTION_KEY_DROPDOWN_ITEM = Symbol.for(
|
|
|
79
79
|
const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
|
|
80
80
|
"dropdownAction"
|
|
81
81
|
);
|
|
82
|
+
const INJECTION_KEY_ALERT_GROUP = Symbol.for(
|
|
83
|
+
"alertGroup"
|
|
84
|
+
);
|
|
82
85
|
const LinkProps = {
|
|
83
86
|
/**
|
|
84
87
|
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
@@ -484,6 +487,13 @@ const ActionProps = {
|
|
|
484
487
|
type: String,
|
|
485
488
|
default: ButtonType.button,
|
|
486
489
|
validator: (value) => Object.values(ButtonType).includes(value)
|
|
490
|
+
},
|
|
491
|
+
/**
|
|
492
|
+
* Button aria-label
|
|
493
|
+
*/
|
|
494
|
+
ariaLabel: {
|
|
495
|
+
type: String,
|
|
496
|
+
default: void 0
|
|
487
497
|
}
|
|
488
498
|
};
|
|
489
499
|
function equals(obj1, obj2, field) {
|
|
@@ -723,14 +733,14 @@ function useModifiers(prefix, modifiers, others) {
|
|
|
723
733
|
return toReturn;
|
|
724
734
|
});
|
|
725
735
|
}
|
|
726
|
-
const _hoisted_1$
|
|
727
|
-
const _hoisted_2$
|
|
728
|
-
const _hoisted_3$
|
|
729
|
-
const __default__$
|
|
736
|
+
const _hoisted_1$i = ["id", "open"];
|
|
737
|
+
const _hoisted_2$d = ["aria-controls", "aria-expanded"];
|
|
738
|
+
const _hoisted_3$7 = ["aria-hidden"];
|
|
739
|
+
const __default__$n = {
|
|
730
740
|
name: "VvAccordion"
|
|
731
741
|
};
|
|
732
|
-
const _sfc_main$
|
|
733
|
-
...__default__$
|
|
742
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
743
|
+
...__default__$n,
|
|
734
744
|
props: VvAccordionProps,
|
|
735
745
|
emits: VvAccordionEvents,
|
|
736
746
|
setup(__props, { emit }) {
|
|
@@ -812,7 +822,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
812
822
|
renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
|
|
813
823
|
createTextVNode(toDisplayString(unref(title)), 1)
|
|
814
824
|
])
|
|
815
|
-
], 8, _hoisted_2$
|
|
825
|
+
], 8, _hoisted_2$d),
|
|
816
826
|
createElementVNode("div", {
|
|
817
827
|
"aria-hidden": !unref(isOpen),
|
|
818
828
|
class: "vv-accordion__content"
|
|
@@ -820,8 +830,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
820
830
|
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
|
|
821
831
|
createTextVNode(toDisplayString(unref(content)), 1)
|
|
822
832
|
])
|
|
823
|
-
], 8, _hoisted_3$
|
|
824
|
-
], 10, _hoisted_1$
|
|
833
|
+
], 8, _hoisted_3$7)
|
|
834
|
+
], 10, _hoisted_1$i);
|
|
825
835
|
};
|
|
826
836
|
}
|
|
827
837
|
});
|
|
@@ -874,11 +884,11 @@ function useProvideGroupState(groupState) {
|
|
|
874
884
|
computed(() => groupState)
|
|
875
885
|
);
|
|
876
886
|
}
|
|
877
|
-
const __default__$
|
|
887
|
+
const __default__$m = {
|
|
878
888
|
name: "VvAccordionGroup"
|
|
879
889
|
};
|
|
880
|
-
const _sfc_main$
|
|
881
|
-
...__default__$
|
|
890
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
891
|
+
...__default__$m,
|
|
882
892
|
props: VvAccordionGroupProps,
|
|
883
893
|
emits: VvAccordionGroupEvents,
|
|
884
894
|
setup(__props, { emit }) {
|
|
@@ -945,7 +955,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
945
955
|
}, [
|
|
946
956
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
947
957
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => {
|
|
948
|
-
return openBlock(), createBlock(_sfc_main$
|
|
958
|
+
return openBlock(), createBlock(_sfc_main$q, mergeProps({
|
|
949
959
|
key: item.title
|
|
950
960
|
}, {
|
|
951
961
|
name: item.name,
|
|
@@ -966,88 +976,128 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
966
976
|
};
|
|
967
977
|
}
|
|
968
978
|
});
|
|
969
|
-
const
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
979
|
+
const VvActionEvents = ["click", "mouseover", "mouseleave"];
|
|
980
|
+
const VvActionProps = ActionProps;
|
|
981
|
+
function useVolver() {
|
|
982
|
+
return inject(INJECTION_KEY_VOLVER);
|
|
983
|
+
}
|
|
984
|
+
function useInjectedDropdownTrigger() {
|
|
985
|
+
return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
|
|
986
|
+
}
|
|
987
|
+
function useInjectedDropdownItem() {
|
|
988
|
+
return inject(INJECTION_KEY_DROPDOWN_ITEM, {});
|
|
989
|
+
}
|
|
990
|
+
function useInjectedDropdownAction() {
|
|
991
|
+
return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
|
|
992
|
+
}
|
|
993
|
+
const __default__$l = {
|
|
994
|
+
name: "VvAction"
|
|
975
995
|
};
|
|
976
|
-
const _sfc_main$
|
|
977
|
-
...__default__$
|
|
978
|
-
props:
|
|
979
|
-
|
|
996
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
997
|
+
...__default__$l,
|
|
998
|
+
props: VvActionProps,
|
|
999
|
+
emits: VvActionEvents,
|
|
1000
|
+
setup(__props, { expose: __expose, emit }) {
|
|
980
1001
|
const props = __props;
|
|
981
|
-
const
|
|
982
|
-
const
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1002
|
+
const volver = useVolver();
|
|
1003
|
+
const element = ref(null);
|
|
1004
|
+
__expose({ $el: element });
|
|
1005
|
+
const {
|
|
1006
|
+
reference: dropdownTriggerReference,
|
|
1007
|
+
bus: dropdownEventBus,
|
|
1008
|
+
aria: dropdownAria,
|
|
1009
|
+
expanded: dropdownExpanded
|
|
1010
|
+
} = useInjectedDropdownTrigger();
|
|
1011
|
+
watch(
|
|
1012
|
+
() => element.value,
|
|
1013
|
+
(newValue) => {
|
|
1014
|
+
if (dropdownTriggerReference) {
|
|
1015
|
+
dropdownTriggerReference.value = newValue;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
);
|
|
1019
|
+
const pressed = computed(() => {
|
|
1020
|
+
return props.pressed || (dropdownExpanded == null ? void 0 : dropdownExpanded.value);
|
|
1021
|
+
});
|
|
1022
|
+
const { role } = useInjectedDropdownAction();
|
|
1023
|
+
const hasTag = computed(() => {
|
|
1024
|
+
switch (true) {
|
|
1025
|
+
case props.disabled:
|
|
1026
|
+
return ActionTag.button;
|
|
1027
|
+
case props.to !== void 0:
|
|
1028
|
+
return (volver == null ? void 0 : volver.nuxt) ? ActionTag.nuxtLink : ActionTag.routerLink;
|
|
1029
|
+
case props.href !== void 0:
|
|
1030
|
+
return ActionTag.a;
|
|
1031
|
+
default:
|
|
1032
|
+
return ActionTag.button;
|
|
1033
|
+
}
|
|
1034
|
+
});
|
|
1035
|
+
const hasProps = computed(() => {
|
|
1036
|
+
const toReturn = {
|
|
1037
|
+
...dropdownAria == null ? void 0 : dropdownAria.value,
|
|
1038
|
+
ariaPressed: pressed.value ? true : void 0,
|
|
1039
|
+
ariaLabel: props.ariaLabel,
|
|
1040
|
+
role: role == null ? void 0 : role.value
|
|
1041
|
+
};
|
|
1042
|
+
switch (hasTag.value) {
|
|
1043
|
+
case ActionTag.a:
|
|
1044
|
+
return {
|
|
1045
|
+
...toReturn,
|
|
1046
|
+
href: props.href,
|
|
1047
|
+
target: props.target,
|
|
1048
|
+
rel: props.rel
|
|
1049
|
+
};
|
|
1050
|
+
case ActionTag.routerLink:
|
|
1051
|
+
case ActionTag.nuxtLink:
|
|
1052
|
+
return {
|
|
1053
|
+
...toReturn,
|
|
1054
|
+
to: props.to,
|
|
1055
|
+
target: props.target
|
|
1056
|
+
};
|
|
1057
|
+
default:
|
|
1058
|
+
return {
|
|
1059
|
+
...toReturn,
|
|
1060
|
+
type: props.type,
|
|
1061
|
+
disabled: props.disabled
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
});
|
|
1065
|
+
const onClick = (e) => {
|
|
1066
|
+
if (props.disabled) {
|
|
1067
|
+
e.preventDefault();
|
|
1068
|
+
return;
|
|
1069
|
+
}
|
|
1070
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
|
|
1071
|
+
emit("click", e);
|
|
1072
|
+
};
|
|
1073
|
+
const onMouseover = (e) => {
|
|
1074
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
|
|
1075
|
+
emit("mouseover", e);
|
|
1076
|
+
};
|
|
1077
|
+
const onMouseleave = (e) => {
|
|
1078
|
+
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
|
|
1079
|
+
emit("mouseleave", e);
|
|
992
1080
|
};
|
|
993
|
-
}
|
|
994
|
-
});
|
|
995
|
-
const VvBreadcrumbProps = {
|
|
996
|
-
...ModifiersProps,
|
|
997
|
-
routes: Array
|
|
998
|
-
};
|
|
999
|
-
const _hoisted_1$e = { class: "vv-breadcrumb__list" };
|
|
1000
|
-
const _hoisted_2$b = ["content"];
|
|
1001
|
-
const __default__$j = {
|
|
1002
|
-
name: "VvBreadcrumb"
|
|
1003
|
-
};
|
|
1004
|
-
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
1005
|
-
...__default__$j,
|
|
1006
|
-
props: VvBreadcrumbProps,
|
|
1007
|
-
setup(__props) {
|
|
1008
|
-
const props = __props;
|
|
1009
|
-
const { modifiers } = toRefs(props);
|
|
1010
|
-
const bemCssClasses = useModifiers("vv-breadcrumb", modifiers);
|
|
1011
1081
|
return (_ctx, _cache) => {
|
|
1012
|
-
return openBlock(),
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
(
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
"vv-breadcrumb__link": index < Number((_c = _ctx.routes) == null ? void 0 : _c.length) - 1
|
|
1032
|
-
},
|
|
1033
|
-
"aria-current": index === Number((_d = _ctx.routes) == null ? void 0 : _d.length) - 1 ? "page" : void 0,
|
|
1034
|
-
itemprop: "item"
|
|
1035
|
-
}), {
|
|
1036
|
-
default: withCtx(() => [
|
|
1037
|
-
renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
|
|
1038
|
-
createTextVNode(toDisplayString(route.label), 1)
|
|
1039
|
-
])
|
|
1040
|
-
]),
|
|
1041
|
-
_: 2
|
|
1042
|
-
}, 1040, ["class", "aria-current"])),
|
|
1043
|
-
createElementVNode("meta", {
|
|
1044
|
-
itemprop: "position",
|
|
1045
|
-
content: `${index + 1}`
|
|
1046
|
-
}, null, 8, _hoisted_2$b)
|
|
1047
|
-
], 2);
|
|
1048
|
-
}), 128))
|
|
1049
|
-
])
|
|
1050
|
-
], 2);
|
|
1082
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
|
|
1083
|
+
ref_key: "element",
|
|
1084
|
+
ref: element,
|
|
1085
|
+
class: {
|
|
1086
|
+
active: _ctx.active,
|
|
1087
|
+
pressed: unref(pressed),
|
|
1088
|
+
disabled: _ctx.disabled
|
|
1089
|
+
},
|
|
1090
|
+
onClickPassive: onClick,
|
|
1091
|
+
onMouseoverPassive: onMouseover,
|
|
1092
|
+
onMouseleavePassive: onMouseleave
|
|
1093
|
+
}), {
|
|
1094
|
+
default: withCtx(() => [
|
|
1095
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1096
|
+
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
1097
|
+
])
|
|
1098
|
+
]),
|
|
1099
|
+
_: 3
|
|
1100
|
+
}, 16, ["class"]);
|
|
1051
1101
|
};
|
|
1052
1102
|
}
|
|
1053
1103
|
});
|
|
@@ -1145,14 +1195,11 @@ const VvIconProps = {
|
|
|
1145
1195
|
type: [String, Array]
|
|
1146
1196
|
}
|
|
1147
1197
|
};
|
|
1148
|
-
|
|
1149
|
-
return inject(INJECTION_KEY_VOLVER);
|
|
1150
|
-
}
|
|
1151
|
-
const __default__$i = {
|
|
1198
|
+
const __default__$k = {
|
|
1152
1199
|
name: "VvIcon"
|
|
1153
1200
|
};
|
|
1154
|
-
const _sfc_main$
|
|
1155
|
-
...__default__$
|
|
1201
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
1202
|
+
...__default__$k,
|
|
1156
1203
|
props: VvIconProps,
|
|
1157
1204
|
setup(__props) {
|
|
1158
1205
|
const props = __props;
|
|
@@ -1244,124 +1291,307 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
1244
1291
|
};
|
|
1245
1292
|
}
|
|
1246
1293
|
});
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
function useInjectedDropdownTrigger() {
|
|
1250
|
-
return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
|
|
1251
|
-
}
|
|
1252
|
-
function useInjectedDropdownItem() {
|
|
1253
|
-
return inject(INJECTION_KEY_DROPDOWN_ITEM, {});
|
|
1294
|
+
function useInjectedAlertGroup() {
|
|
1295
|
+
return inject(INJECTION_KEY_ALERT_GROUP, {});
|
|
1254
1296
|
}
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1297
|
+
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
|
|
1298
|
+
const VvAlertProps = {
|
|
1299
|
+
...IdProps,
|
|
1300
|
+
...ModifiersProps,
|
|
1301
|
+
...IconProps,
|
|
1302
|
+
/**
|
|
1303
|
+
* The alert is dismissable
|
|
1304
|
+
* @default false
|
|
1305
|
+
* @type boolean
|
|
1306
|
+
*/
|
|
1307
|
+
dismissable: {
|
|
1308
|
+
type: Boolean,
|
|
1309
|
+
default: false
|
|
1310
|
+
},
|
|
1311
|
+
/**
|
|
1312
|
+
* The alert auto close after the specified time in milliseconds
|
|
1313
|
+
* @default 0
|
|
1314
|
+
* @type number
|
|
1315
|
+
*/
|
|
1316
|
+
autoClose: {
|
|
1317
|
+
type: Number,
|
|
1318
|
+
default: 0
|
|
1319
|
+
},
|
|
1320
|
+
/**
|
|
1321
|
+
* The alert close label
|
|
1322
|
+
* @default 'Close'
|
|
1323
|
+
* @type string
|
|
1324
|
+
*/
|
|
1325
|
+
closeLabel: {
|
|
1326
|
+
type: String,
|
|
1327
|
+
default: "Close"
|
|
1328
|
+
},
|
|
1329
|
+
/**
|
|
1330
|
+
* The alert title
|
|
1331
|
+
* @default ''
|
|
1332
|
+
* @type string
|
|
1333
|
+
*/
|
|
1334
|
+
title: {
|
|
1335
|
+
type: String,
|
|
1336
|
+
default: void 0
|
|
1337
|
+
},
|
|
1338
|
+
/**
|
|
1339
|
+
* The alert content
|
|
1340
|
+
* @default ''
|
|
1341
|
+
* @type string
|
|
1342
|
+
*/
|
|
1343
|
+
content: {
|
|
1344
|
+
type: String,
|
|
1345
|
+
default: void 0
|
|
1346
|
+
},
|
|
1347
|
+
/**
|
|
1348
|
+
* The alert footer
|
|
1349
|
+
* @default ''
|
|
1350
|
+
* @type string
|
|
1351
|
+
*/
|
|
1352
|
+
footer: {
|
|
1353
|
+
type: String,
|
|
1354
|
+
default: void 0
|
|
1355
|
+
},
|
|
1356
|
+
/**
|
|
1357
|
+
* The alert role
|
|
1358
|
+
* @default 'alert'
|
|
1359
|
+
* @type string
|
|
1360
|
+
* @values 'alert', 'alertdialog'
|
|
1361
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Alert_Role
|
|
1362
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Alertdialog_role
|
|
1363
|
+
*/
|
|
1364
|
+
role: {
|
|
1365
|
+
type: String,
|
|
1366
|
+
default: "alert"
|
|
1367
|
+
}
|
|
1368
|
+
};
|
|
1369
|
+
const VvAlertEvents = ["close"];
|
|
1370
|
+
const useVvAlert = (props, emit) => {
|
|
1371
|
+
const { bus } = useInjectedAlertGroup();
|
|
1372
|
+
const hasId = useUniqueId(computed(() => props.id));
|
|
1373
|
+
const hasTitleId = computed(() => `${hasId.value}-title`);
|
|
1374
|
+
const hasIcon = computed(
|
|
1375
|
+
() => typeof props.icon === "string" ? { name: props.icon } : props.icon
|
|
1376
|
+
);
|
|
1377
|
+
const hasClass = useModifiers(
|
|
1378
|
+
"vv-alert",
|
|
1379
|
+
computed(() => props.modifiers),
|
|
1380
|
+
computed(() => ({
|
|
1381
|
+
dismissable: props.autoClose > 0 || props.dismissable,
|
|
1382
|
+
"auto-close": props.autoClose > 0,
|
|
1383
|
+
hover: isMouseover.value
|
|
1384
|
+
}))
|
|
1385
|
+
);
|
|
1386
|
+
const hasStyle = computed(() => ({
|
|
1387
|
+
"--alert-duration": `${props.autoClose}ms`
|
|
1388
|
+
}));
|
|
1389
|
+
const close = () => {
|
|
1390
|
+
if (timeout) {
|
|
1391
|
+
clearTimeout(timeout);
|
|
1392
|
+
}
|
|
1393
|
+
emit("close", hasId.value);
|
|
1394
|
+
bus == null ? void 0 : bus.emit("close", hasId.value);
|
|
1395
|
+
};
|
|
1396
|
+
let timeout;
|
|
1397
|
+
watch(
|
|
1398
|
+
() => props.autoClose,
|
|
1399
|
+
(value) => {
|
|
1400
|
+
if (value > 0) {
|
|
1401
|
+
timeout = setTimeout(close, value);
|
|
1332
1402
|
return;
|
|
1333
1403
|
}
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1404
|
+
if (timeout) {
|
|
1405
|
+
clearTimeout(timeout);
|
|
1406
|
+
}
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
immediate: true
|
|
1410
|
+
}
|
|
1411
|
+
);
|
|
1412
|
+
const isMouseover = ref(false);
|
|
1413
|
+
const onMouseover = withModifiers(() => {
|
|
1414
|
+
isMouseover.value = true;
|
|
1415
|
+
if (timeout) {
|
|
1416
|
+
clearTimeout(timeout);
|
|
1417
|
+
}
|
|
1418
|
+
}, ["passive"]);
|
|
1419
|
+
const onMouseleave = withModifiers(() => {
|
|
1420
|
+
isMouseover.value = false;
|
|
1421
|
+
if (props.autoClose > 0) {
|
|
1422
|
+
timeout = setTimeout(close, props.autoClose);
|
|
1423
|
+
}
|
|
1424
|
+
}, ["passive"]);
|
|
1425
|
+
return {
|
|
1426
|
+
close,
|
|
1427
|
+
hasIcon,
|
|
1428
|
+
hasTitleId,
|
|
1429
|
+
hasProps: computed(() => ({
|
|
1430
|
+
onMouseover,
|
|
1431
|
+
onMouseleave,
|
|
1432
|
+
class: hasClass.value,
|
|
1433
|
+
style: hasStyle.value,
|
|
1434
|
+
role: props.role,
|
|
1435
|
+
"aria-labelledby": hasTitleId.value
|
|
1436
|
+
}))
|
|
1437
|
+
};
|
|
1438
|
+
};
|
|
1439
|
+
const _hoisted_1$h = {
|
|
1440
|
+
key: 0,
|
|
1441
|
+
class: "vv-alert__header"
|
|
1442
|
+
};
|
|
1443
|
+
const _hoisted_2$c = ["id"];
|
|
1444
|
+
const _hoisted_3$6 = ["aria-label"];
|
|
1445
|
+
const _hoisted_4$5 = /* @__PURE__ */ createElementVNode("div", { class: "vv-alert__close-mask" }, null, -1);
|
|
1446
|
+
const _hoisted_5$4 = [
|
|
1447
|
+
_hoisted_4$5
|
|
1448
|
+
];
|
|
1449
|
+
const _hoisted_6$4 = {
|
|
1450
|
+
key: 1,
|
|
1451
|
+
class: "vv-alert__content"
|
|
1452
|
+
};
|
|
1453
|
+
const _hoisted_7$4 = {
|
|
1454
|
+
key: 2,
|
|
1455
|
+
class: "vv-alert__footer"
|
|
1456
|
+
};
|
|
1457
|
+
const __default__$j = {
|
|
1458
|
+
name: "VvAlert"
|
|
1459
|
+
};
|
|
1460
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
1461
|
+
...__default__$j,
|
|
1462
|
+
props: VvAlertProps,
|
|
1463
|
+
emits: VvAlertEvents,
|
|
1464
|
+
setup(__props, { expose: __expose, emit }) {
|
|
1465
|
+
const props = __props;
|
|
1466
|
+
const { hasProps, hasTitleId, hasIcon, close } = useVvAlert(props, emit);
|
|
1467
|
+
__expose({ close });
|
|
1345
1468
|
return (_ctx, _cache) => {
|
|
1346
|
-
return openBlock(),
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1469
|
+
return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(hasProps))), [
|
|
1470
|
+
_ctx.$slots.header || _ctx.$slots.title || _ctx.$slots.close || _ctx.$slots["title::before"] || _ctx.$slots["title::after"] || _ctx.title || _ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
1471
|
+
unref(hasIcon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-alert__icon" }), null, 16)) : createCommentVNode("", true),
|
|
1472
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1473
|
+
renderSlot(_ctx.$slots, "title::before"),
|
|
1474
|
+
_ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("strong", {
|
|
1475
|
+
key: 0,
|
|
1476
|
+
id: unref(hasTitleId),
|
|
1477
|
+
class: "vv-alert__title"
|
|
1478
|
+
}, [
|
|
1479
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
1480
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
1481
|
+
])
|
|
1482
|
+
], 8, _hoisted_2$c)) : createCommentVNode("", true),
|
|
1483
|
+
renderSlot(_ctx.$slots, "title::after")
|
|
1484
|
+
]),
|
|
1485
|
+
renderSlot(_ctx.$slots, "close", normalizeProps(guardReactiveProps({ close: unref(close) })), () => [
|
|
1486
|
+
_ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("button", {
|
|
1487
|
+
key: 0,
|
|
1488
|
+
class: "vv-alert__close",
|
|
1489
|
+
type: "button",
|
|
1490
|
+
"aria-label": _ctx.closeLabel,
|
|
1491
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(
|
|
1492
|
+
//@ts-ignore
|
|
1493
|
+
(...args) => unref(close) && unref(close)(...args),
|
|
1494
|
+
["stop"]
|
|
1495
|
+
))
|
|
1496
|
+
}, _hoisted_5$4, 8, _hoisted_3$6)) : createCommentVNode("", true)
|
|
1497
|
+
])
|
|
1498
|
+
])) : createCommentVNode("", true),
|
|
1499
|
+
_ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_6$4, [
|
|
1359
1500
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1360
|
-
createTextVNode(toDisplayString(_ctx.
|
|
1501
|
+
createTextVNode(toDisplayString(_ctx.content), 1)
|
|
1361
1502
|
])
|
|
1362
|
-
]),
|
|
1363
|
-
|
|
1364
|
-
|
|
1503
|
+
])) : createCommentVNode("", true),
|
|
1504
|
+
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", _hoisted_7$4, [
|
|
1505
|
+
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
1506
|
+
createTextVNode(toDisplayString(_ctx.footer), 1)
|
|
1507
|
+
])
|
|
1508
|
+
])) : createCommentVNode("", true)
|
|
1509
|
+
], 16);
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
});
|
|
1513
|
+
const VvBadgeProps = {
|
|
1514
|
+
...ModifiersProps,
|
|
1515
|
+
value: [String, Number]
|
|
1516
|
+
};
|
|
1517
|
+
const __default__$i = {
|
|
1518
|
+
name: "VvBadge"
|
|
1519
|
+
};
|
|
1520
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
1521
|
+
...__default__$i,
|
|
1522
|
+
props: VvBadgeProps,
|
|
1523
|
+
setup(__props) {
|
|
1524
|
+
const props = __props;
|
|
1525
|
+
const { modifiers } = toRefs(props);
|
|
1526
|
+
const bemCssClasses = useModifiers("vv-badge", modifiers);
|
|
1527
|
+
return (_ctx, _cache) => {
|
|
1528
|
+
return openBlock(), createElementBlock("span", {
|
|
1529
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
1530
|
+
role: "status"
|
|
1531
|
+
}, [
|
|
1532
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1533
|
+
createTextVNode(toDisplayString(_ctx.value), 1)
|
|
1534
|
+
])
|
|
1535
|
+
], 2);
|
|
1536
|
+
};
|
|
1537
|
+
}
|
|
1538
|
+
});
|
|
1539
|
+
const VvBreadcrumbProps = {
|
|
1540
|
+
...ModifiersProps,
|
|
1541
|
+
routes: Array
|
|
1542
|
+
};
|
|
1543
|
+
const _hoisted_1$g = { class: "vv-breadcrumb__list" };
|
|
1544
|
+
const _hoisted_2$b = ["content"];
|
|
1545
|
+
const __default__$h = {
|
|
1546
|
+
name: "VvBreadcrumb"
|
|
1547
|
+
};
|
|
1548
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
1549
|
+
...__default__$h,
|
|
1550
|
+
props: VvBreadcrumbProps,
|
|
1551
|
+
setup(__props) {
|
|
1552
|
+
const props = __props;
|
|
1553
|
+
const { modifiers } = toRefs(props);
|
|
1554
|
+
const bemCssClasses = useModifiers("vv-breadcrumb", modifiers);
|
|
1555
|
+
return (_ctx, _cache) => {
|
|
1556
|
+
return openBlock(), createElementBlock("nav", {
|
|
1557
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
1558
|
+
"aria-label": "breadcrumbs"
|
|
1559
|
+
}, [
|
|
1560
|
+
createElementVNode("ol", _hoisted_1$g, [
|
|
1561
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.routes, (route, index) => {
|
|
1562
|
+
var _a, _b, _c, _d;
|
|
1563
|
+
return openBlock(), createElementBlock("li", {
|
|
1564
|
+
key: `${route.label}-${index}`,
|
|
1565
|
+
class: normalizeClass({
|
|
1566
|
+
"vv-breadcrumb__item": index < Number((_a = _ctx.routes) == null ? void 0 : _a.length) - 1,
|
|
1567
|
+
"vv-breadcrumb__item-active": index === Number((_b = _ctx.routes) == null ? void 0 : _b.length) - 1
|
|
1568
|
+
}),
|
|
1569
|
+
itemprop: "itemListElement",
|
|
1570
|
+
itemtype: "https://schema.org/ListItem",
|
|
1571
|
+
itemscope: ""
|
|
1572
|
+
}, [
|
|
1573
|
+
(openBlock(), createBlock(resolveDynamicComponent(route.to ? "router-link" : route.href ? "a" : "span"), mergeProps(route, {
|
|
1574
|
+
class: {
|
|
1575
|
+
"vv-breadcrumb__link": index < Number((_c = _ctx.routes) == null ? void 0 : _c.length) - 1
|
|
1576
|
+
},
|
|
1577
|
+
"aria-current": index === Number((_d = _ctx.routes) == null ? void 0 : _d.length) - 1 ? "page" : void 0,
|
|
1578
|
+
itemprop: "item"
|
|
1579
|
+
}), {
|
|
1580
|
+
default: withCtx(() => [
|
|
1581
|
+
renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
|
|
1582
|
+
createTextVNode(toDisplayString(route.label), 1)
|
|
1583
|
+
])
|
|
1584
|
+
]),
|
|
1585
|
+
_: 2
|
|
1586
|
+
}, 1040, ["class", "aria-current"])),
|
|
1587
|
+
createElementVNode("meta", {
|
|
1588
|
+
itemprop: "position",
|
|
1589
|
+
content: `${index + 1}`
|
|
1590
|
+
}, null, 8, _hoisted_2$b)
|
|
1591
|
+
], 2);
|
|
1592
|
+
}), 128))
|
|
1593
|
+
])
|
|
1594
|
+
], 2);
|
|
1365
1595
|
};
|
|
1366
1596
|
}
|
|
1367
1597
|
});
|
|
@@ -1469,8 +1699,7 @@ function useGroupProps$2(props, emit) {
|
|
|
1469
1699
|
label
|
|
1470
1700
|
};
|
|
1471
1701
|
}
|
|
1472
|
-
const
|
|
1473
|
-
const _hoisted_1$d = {
|
|
1702
|
+
const _hoisted_1$f = {
|
|
1474
1703
|
key: 1,
|
|
1475
1704
|
class: "vv-button__label"
|
|
1476
1705
|
};
|
|
@@ -1481,7 +1710,7 @@ const _hoisted_2$a = {
|
|
|
1481
1710
|
const __default__$g = {
|
|
1482
1711
|
name: "VvButton"
|
|
1483
1712
|
};
|
|
1484
|
-
const _sfc_main$
|
|
1713
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
1485
1714
|
...__default__$g,
|
|
1486
1715
|
props: VvButtonProps,
|
|
1487
1716
|
emits: VvButtonEvents,
|
|
@@ -1560,7 +1789,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
1560
1789
|
}
|
|
1561
1790
|
};
|
|
1562
1791
|
return (_ctx, _cache) => {
|
|
1563
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1792
|
+
return openBlock(), createBlock(_sfc_main$o, mergeProps({
|
|
1564
1793
|
disabled: unref(disabled),
|
|
1565
1794
|
pressed: unref(pressed),
|
|
1566
1795
|
active: _ctx.active,
|
|
@@ -1568,7 +1797,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
1568
1797
|
to: _ctx.to,
|
|
1569
1798
|
href: _ctx.href,
|
|
1570
1799
|
target: _ctx.target,
|
|
1571
|
-
rel: _ctx.rel
|
|
1800
|
+
rel: _ctx.rel,
|
|
1801
|
+
ariaLabel: _ctx.ariaLabel
|
|
1572
1802
|
}, {
|
|
1573
1803
|
id: unref(hasId),
|
|
1574
1804
|
ref_key: "element",
|
|
@@ -1579,15 +1809,15 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
1579
1809
|
default: withCtx(() => [
|
|
1580
1810
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1581
1811
|
_ctx.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
|
|
1582
|
-
_ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$
|
|
1812
|
+
_ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$n, {
|
|
1583
1813
|
key: 0,
|
|
1584
1814
|
class: "vv-button__loading-icon",
|
|
1585
1815
|
name: _ctx.loadingIcon
|
|
1586
1816
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
1587
|
-
_ctx.loadingLabel ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
1817
|
+
_ctx.loadingLabel ? (openBlock(), createElementBlock("span", _hoisted_1$f, toDisplayString(_ctx.loadingLabel), 1)) : createCommentVNode("", true)
|
|
1588
1818
|
]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1589
1819
|
renderSlot(_ctx.$slots, "before"),
|
|
1590
|
-
unref(icon) ? (openBlock(), createBlock(_sfc_main$
|
|
1820
|
+
unref(icon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
|
|
1591
1821
|
key: 0,
|
|
1592
1822
|
class: "vv-button__icon"
|
|
1593
1823
|
}, unref(hasIconProps)), null, 16)) : createCommentVNode("", true),
|
|
@@ -1627,7 +1857,7 @@ const VvButtonGroupEvents = ["update:modelValue"];
|
|
|
1627
1857
|
const __default__$f = {
|
|
1628
1858
|
name: "VvButtonGroup"
|
|
1629
1859
|
};
|
|
1630
|
-
const _sfc_main$
|
|
1860
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
1631
1861
|
...__default__$f,
|
|
1632
1862
|
props: VvButtonGroupProps,
|
|
1633
1863
|
emits: VvButtonGroupEvents,
|
|
@@ -1686,7 +1916,7 @@ const VvCardProps = {
|
|
|
1686
1916
|
...ModifiersProps,
|
|
1687
1917
|
title: String
|
|
1688
1918
|
};
|
|
1689
|
-
const _hoisted_1$
|
|
1919
|
+
const _hoisted_1$e = {
|
|
1690
1920
|
key: 0,
|
|
1691
1921
|
class: "vv-card__header"
|
|
1692
1922
|
};
|
|
@@ -1701,7 +1931,7 @@ const _hoisted_3$5 = {
|
|
|
1701
1931
|
const __default__$e = {
|
|
1702
1932
|
name: "VvCard"
|
|
1703
1933
|
};
|
|
1704
|
-
const _sfc_main$
|
|
1934
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
1705
1935
|
...__default__$e,
|
|
1706
1936
|
props: VvCardProps,
|
|
1707
1937
|
setup(__props) {
|
|
@@ -1712,7 +1942,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
1712
1942
|
return openBlock(), createElementBlock("article", {
|
|
1713
1943
|
class: normalizeClass(unref(bemCssClasses))
|
|
1714
1944
|
}, [
|
|
1715
|
-
_ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$
|
|
1945
|
+
_ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$e, [
|
|
1716
1946
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1717
1947
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
1718
1948
|
])
|
|
@@ -1784,19 +2014,27 @@ function joinLines(items) {
|
|
|
1784
2014
|
}
|
|
1785
2015
|
return items;
|
|
1786
2016
|
}
|
|
1787
|
-
function HintSlotFactory(
|
|
1788
|
-
const
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
2017
|
+
function HintSlotFactory(propsOrRef, slots) {
|
|
2018
|
+
const props = computed(() => {
|
|
2019
|
+
if (isRef(propsOrRef)) {
|
|
2020
|
+
return propsOrRef.value;
|
|
2021
|
+
}
|
|
2022
|
+
return propsOrRef;
|
|
2023
|
+
});
|
|
2024
|
+
const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
|
|
2025
|
+
const validLabel = computed(() => joinLines(props.value.validLabel));
|
|
2026
|
+
const loadingLabel = computed(() => props.value.loadingLabel);
|
|
2027
|
+
const hintLabel = computed(() => props.value.hintLabel);
|
|
1792
2028
|
const hasLoadingLabelOrSlot = computed(
|
|
1793
|
-
() => Boolean(props.loading && (slots.loading || loadingLabel.value))
|
|
2029
|
+
() => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
|
|
1794
2030
|
);
|
|
1795
2031
|
const hasInvalidLabelOrSlot = computed(
|
|
1796
|
-
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
2032
|
+
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
2033
|
+
props.value.invalid && (slots.invalid || invalidLabel.value)
|
|
2034
|
+
)
|
|
1797
2035
|
);
|
|
1798
2036
|
const hasValidLabelOrSlot = computed(
|
|
1799
|
-
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.valid && (slots.valid || validLabel.value))
|
|
2037
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
|
|
1800
2038
|
);
|
|
1801
2039
|
const hasHintLabelOrSlot = computed(
|
|
1802
2040
|
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
|
|
@@ -1805,10 +2043,10 @@ function HintSlotFactory(props, slots) {
|
|
|
1805
2043
|
() => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
|
|
1806
2044
|
);
|
|
1807
2045
|
const hintSlotScope = computed(() => ({
|
|
1808
|
-
modelValue: props.modelValue,
|
|
1809
|
-
valid: props.valid,
|
|
1810
|
-
invalid: props.invalid,
|
|
1811
|
-
loading: props.loading
|
|
2046
|
+
modelValue: props.value.modelValue,
|
|
2047
|
+
valid: props.value.valid,
|
|
2048
|
+
invalid: props.value.invalid,
|
|
2049
|
+
loading: props.value.loading
|
|
1812
2050
|
}));
|
|
1813
2051
|
const HintSlot = defineComponent({
|
|
1814
2052
|
name: "HintSlot",
|
|
@@ -1868,38 +2106,96 @@ function HintSlotFactory(props, slots) {
|
|
|
1868
2106
|
((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
|
|
1869
2107
|
);
|
|
1870
2108
|
}
|
|
1871
|
-
return h(
|
|
1872
|
-
this.tag,
|
|
1873
|
-
{
|
|
1874
|
-
role
|
|
1875
|
-
},
|
|
1876
|
-
((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
|
|
1877
|
-
);
|
|
2109
|
+
return h(
|
|
2110
|
+
this.tag,
|
|
2111
|
+
{
|
|
2112
|
+
role
|
|
2113
|
+
},
|
|
2114
|
+
((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
|
|
2115
|
+
);
|
|
2116
|
+
}
|
|
2117
|
+
return null;
|
|
2118
|
+
}
|
|
2119
|
+
});
|
|
2120
|
+
return {
|
|
2121
|
+
hasInvalidLabelOrSlot,
|
|
2122
|
+
hasHintLabelOrSlot,
|
|
2123
|
+
hasValidLabelOrSlot,
|
|
2124
|
+
hasLoadingLabelOrSlot,
|
|
2125
|
+
hintSlotScope,
|
|
2126
|
+
HintSlot
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
function useDefaults(componentName, propsDefinition, props) {
|
|
2130
|
+
const volver = useVolver();
|
|
2131
|
+
const volverComponentDefaults = computed(() => {
|
|
2132
|
+
var _a;
|
|
2133
|
+
if (!volver || !((_a = volver.defaults.value) == null ? void 0 : _a[componentName])) {
|
|
2134
|
+
return void 0;
|
|
2135
|
+
}
|
|
2136
|
+
return volver.defaults.value[componentName];
|
|
2137
|
+
});
|
|
2138
|
+
return computed(() => {
|
|
2139
|
+
if (volverComponentDefaults.value === void 0) {
|
|
2140
|
+
return props;
|
|
2141
|
+
}
|
|
2142
|
+
const componentDefaults = volverComponentDefaults.value;
|
|
2143
|
+
const simplifiedPropsDefinition = propsDefinition;
|
|
2144
|
+
const simplifiedProps = props;
|
|
2145
|
+
return Object.keys(simplifiedPropsDefinition).reduce((acc, key) => {
|
|
2146
|
+
const propValue = simplifiedProps[key];
|
|
2147
|
+
acc[key] = propValue;
|
|
2148
|
+
if (key in componentDefaults) {
|
|
2149
|
+
if (Array.isArray(simplifiedPropsDefinition[key])) {
|
|
2150
|
+
const typeArray = simplifiedPropsDefinition[key];
|
|
2151
|
+
if (typeArray.length) {
|
|
2152
|
+
const typeFunction = typeArray[0];
|
|
2153
|
+
if (typeFunction === propValue) {
|
|
2154
|
+
acc[key] = componentDefaults[key];
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
if (typeof simplifiedPropsDefinition[key] === "function") {
|
|
2159
|
+
const typeFunction = simplifiedPropsDefinition[key];
|
|
2160
|
+
if (typeFunction() === propValue) {
|
|
2161
|
+
acc[key] = componentDefaults[key];
|
|
2162
|
+
}
|
|
2163
|
+
}
|
|
2164
|
+
if (typeof simplifiedPropsDefinition[key] === "object") {
|
|
2165
|
+
let defaultValue = simplifiedPropsDefinition[key].default;
|
|
2166
|
+
if (typeof defaultValue === "function") {
|
|
2167
|
+
defaultValue = defaultValue();
|
|
2168
|
+
}
|
|
2169
|
+
if (typeof defaultValue === "object") {
|
|
2170
|
+
if (JSON.stringify(defaultValue) === JSON.stringify(propValue)) {
|
|
2171
|
+
acc[key] = componentDefaults[key];
|
|
2172
|
+
}
|
|
2173
|
+
} else if (defaultValue === propValue) {
|
|
2174
|
+
acc[key] = componentDefaults[key];
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
1878
2177
|
}
|
|
1879
|
-
return
|
|
1880
|
-
}
|
|
2178
|
+
return acc;
|
|
2179
|
+
}, {});
|
|
1881
2180
|
});
|
|
1882
|
-
return {
|
|
1883
|
-
hasInvalidLabelOrSlot,
|
|
1884
|
-
hasHintLabelOrSlot,
|
|
1885
|
-
hasValidLabelOrSlot,
|
|
1886
|
-
hasLoadingLabelOrSlot,
|
|
1887
|
-
hintSlotScope,
|
|
1888
|
-
HintSlot
|
|
1889
|
-
};
|
|
1890
2181
|
}
|
|
1891
|
-
const _hoisted_1$
|
|
2182
|
+
const _hoisted_1$d = ["for"];
|
|
1892
2183
|
const _hoisted_2$8 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
|
|
1893
2184
|
const __default__$d = {
|
|
1894
2185
|
name: "VvCheckbox"
|
|
1895
2186
|
};
|
|
1896
|
-
const _sfc_main$
|
|
2187
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
1897
2188
|
...__default__$d,
|
|
1898
2189
|
props: VvCheckboxProps,
|
|
1899
2190
|
emits: VvCheckboxEvents,
|
|
1900
2191
|
setup(__props, { emit }) {
|
|
1901
2192
|
const props = __props;
|
|
1902
2193
|
const slots = useSlots();
|
|
2194
|
+
const propsDefaults = useDefaults(
|
|
2195
|
+
"VvCheckbox",
|
|
2196
|
+
VvCheckboxProps,
|
|
2197
|
+
props
|
|
2198
|
+
);
|
|
1903
2199
|
const {
|
|
1904
2200
|
id,
|
|
1905
2201
|
disabled,
|
|
@@ -2012,7 +2308,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2012
2308
|
hasHintLabelOrSlot,
|
|
2013
2309
|
hasInvalidLabelOrSlot,
|
|
2014
2310
|
hintSlotScope
|
|
2015
|
-
} = HintSlotFactory(
|
|
2311
|
+
} = HintSlotFactory(propsDefaults, slots);
|
|
2016
2312
|
return (_ctx, _cache) => {
|
|
2017
2313
|
return openBlock(), createElementBlock("label", {
|
|
2018
2314
|
class: normalizeClass(unref(bemCssClasses)),
|
|
@@ -2071,7 +2367,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2071
2367
|
key: "3"
|
|
2072
2368
|
} : void 0
|
|
2073
2369
|
]), 1032, ["id"])
|
|
2074
|
-
], 10, _hoisted_1$
|
|
2370
|
+
], 10, _hoisted_1$d);
|
|
2075
2371
|
};
|
|
2076
2372
|
}
|
|
2077
2373
|
});
|
|
@@ -2109,18 +2405,23 @@ function useOptions(props) {
|
|
|
2109
2405
|
getOptionGrouped
|
|
2110
2406
|
};
|
|
2111
2407
|
}
|
|
2112
|
-
const _hoisted_1$
|
|
2408
|
+
const _hoisted_1$c = ["textContent"];
|
|
2113
2409
|
const _hoisted_2$7 = { class: "vv-checkbox-group__wrapper" };
|
|
2114
2410
|
const __default__$c = {
|
|
2115
2411
|
name: "VvCheckboxGroup"
|
|
2116
2412
|
};
|
|
2117
|
-
const _sfc_main$
|
|
2413
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
2118
2414
|
...__default__$c,
|
|
2119
2415
|
props: VvCheckboxGroupProps,
|
|
2120
2416
|
emits: VvCheckboxGroupEvents,
|
|
2121
2417
|
setup(__props, { emit }) {
|
|
2122
2418
|
const props = __props;
|
|
2123
2419
|
const slots = useSlots();
|
|
2420
|
+
const propsDefaults = useDefaults(
|
|
2421
|
+
"VvCheckboxGroup",
|
|
2422
|
+
VvCheckboxGroupProps,
|
|
2423
|
+
props
|
|
2424
|
+
);
|
|
2124
2425
|
const modelValue = useVModel(props, "modelValue", emit);
|
|
2125
2426
|
const { disabled, readonly, vertical, valid, invalid, modifiers } = toRefs(props);
|
|
2126
2427
|
useProvideGroupState({
|
|
@@ -2151,7 +2452,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2151
2452
|
value: getOptionValue(option)
|
|
2152
2453
|
};
|
|
2153
2454
|
};
|
|
2154
|
-
const { HintSlot, hintSlotScope } = HintSlotFactory(
|
|
2455
|
+
const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots);
|
|
2155
2456
|
return (_ctx, _cache) => {
|
|
2156
2457
|
return openBlock(), createElementBlock("fieldset", {
|
|
2157
2458
|
class: normalizeClass(unref(bemCssClasses))
|
|
@@ -2159,10 +2460,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2159
2460
|
_ctx.label ? (openBlock(), createElementBlock("legend", {
|
|
2160
2461
|
key: 0,
|
|
2161
2462
|
textContent: toDisplayString(_ctx.label)
|
|
2162
|
-
}, null, 8, _hoisted_1$
|
|
2463
|
+
}, null, 8, _hoisted_1$c)) : createCommentVNode("", true),
|
|
2163
2464
|
createElementVNode("div", _hoisted_2$7, [
|
|
2164
2465
|
_ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (option, index) => {
|
|
2165
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2466
|
+
return openBlock(), createBlock(_sfc_main$g, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
|
|
2166
2467
|
}), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
2167
2468
|
]),
|
|
2168
2469
|
createVNode(unref(HintSlot), { class: "vv-checkbox-group__hint" }, createSlots({ _: 2 }, [
|
|
@@ -2221,6 +2522,13 @@ const VvComboboxProps = {
|
|
|
2221
2522
|
...UnselectableProps,
|
|
2222
2523
|
...DropdownProps,
|
|
2223
2524
|
...LabelProps,
|
|
2525
|
+
/**
|
|
2526
|
+
* Dropdown show / hide transition name
|
|
2527
|
+
*/
|
|
2528
|
+
transitionName: {
|
|
2529
|
+
type: String,
|
|
2530
|
+
default: "vv-dropdown--mobile-fade-block"
|
|
2531
|
+
},
|
|
2224
2532
|
/**
|
|
2225
2533
|
* modelValue can be a string, number, boolean, object or array of string, number, boolean, object
|
|
2226
2534
|
*/
|
|
@@ -2252,6 +2560,10 @@ const VvComboboxProps = {
|
|
|
2252
2560
|
* Label for deselected option hint
|
|
2253
2561
|
*/
|
|
2254
2562
|
deselectHintLabel: { type: String, default: "Press enter to remove" },
|
|
2563
|
+
/**
|
|
2564
|
+
* Label close button
|
|
2565
|
+
*/
|
|
2566
|
+
closeLabel: { type: String, default: "Close" },
|
|
2255
2567
|
/**
|
|
2256
2568
|
* Select input placeholder
|
|
2257
2569
|
*/
|
|
@@ -2260,6 +2572,13 @@ const VvComboboxProps = {
|
|
|
2260
2572
|
* Use input text to search on options
|
|
2261
2573
|
*/
|
|
2262
2574
|
searchable: Boolean,
|
|
2575
|
+
/**
|
|
2576
|
+
* Search function to filter options
|
|
2577
|
+
*/
|
|
2578
|
+
searchFunction: {
|
|
2579
|
+
type: Function,
|
|
2580
|
+
default: void 0
|
|
2581
|
+
},
|
|
2263
2582
|
/**
|
|
2264
2583
|
* On searchable select is the input search placeholder
|
|
2265
2584
|
*/
|
|
@@ -2333,13 +2652,7 @@ const VvComboboxProps = {
|
|
|
2333
2652
|
const VvDropdownProps = {
|
|
2334
2653
|
...IdProps,
|
|
2335
2654
|
...DropdownProps,
|
|
2336
|
-
|
|
2337
|
-
* Component BEM modifiers
|
|
2338
|
-
*/
|
|
2339
|
-
modifiers: {
|
|
2340
|
-
type: [String, Array],
|
|
2341
|
-
default: "mobile"
|
|
2342
|
-
},
|
|
2655
|
+
...ModifiersProps,
|
|
2343
2656
|
/**
|
|
2344
2657
|
* Show / hide dropdown programmatically
|
|
2345
2658
|
*/
|
|
@@ -2412,12 +2725,12 @@ function useProvideDropdownAction({
|
|
|
2412
2725
|
expanded
|
|
2413
2726
|
});
|
|
2414
2727
|
}
|
|
2415
|
-
const _hoisted_1$
|
|
2728
|
+
const _hoisted_1$b = ["id", "tabindex", "role", "aria-labelledby"];
|
|
2416
2729
|
const __default__$b = {
|
|
2417
2730
|
name: "VvDropdown",
|
|
2418
2731
|
inheritAttrs: false
|
|
2419
2732
|
};
|
|
2420
|
-
const _sfc_main$
|
|
2733
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
2421
2734
|
...__default__$b,
|
|
2422
2735
|
props: VvDropdownProps,
|
|
2423
2736
|
emits: [
|
|
@@ -2534,7 +2847,11 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2534
2847
|
referenceEl,
|
|
2535
2848
|
floatingEl,
|
|
2536
2849
|
{
|
|
2537
|
-
whileElementsMounted:
|
|
2850
|
+
whileElementsMounted: (...args) => {
|
|
2851
|
+
return autoUpdate(...args, {
|
|
2852
|
+
animationFrame: props.strategy === "fixed"
|
|
2853
|
+
});
|
|
2854
|
+
},
|
|
2538
2855
|
placement: computed(() => props.placement),
|
|
2539
2856
|
strategy: computed(() => props.strategy),
|
|
2540
2857
|
middleware
|
|
@@ -2621,7 +2938,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2621
2938
|
onClickOutside(
|
|
2622
2939
|
floatingEl,
|
|
2623
2940
|
() => {
|
|
2624
|
-
if (!props.keepOpen) {
|
|
2941
|
+
if (!props.keepOpen && expanded.value) {
|
|
2625
2942
|
expanded.value = false;
|
|
2626
2943
|
}
|
|
2627
2944
|
},
|
|
@@ -2659,7 +2976,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2659
2976
|
}
|
|
2660
2977
|
return [
|
|
2661
2978
|
...element.querySelectorAll(
|
|
2662
|
-
'a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])'
|
|
2979
|
+
'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
|
|
2663
2980
|
)
|
|
2664
2981
|
].filter(
|
|
2665
2982
|
(el) => !el.hasAttribute("disabled") && !el.getAttribute("aria-hidden")
|
|
@@ -2801,7 +3118,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2801
3118
|
renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
|
|
2802
3119
|
role: unref(itemRole)
|
|
2803
3120
|
})))
|
|
2804
|
-
], 16, _hoisted_1$
|
|
3121
|
+
], 16, _hoisted_1$b),
|
|
2805
3122
|
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
|
|
2806
3123
|
], 6), [
|
|
2807
3124
|
[vShow, unref(expanded)]
|
|
@@ -2816,7 +3133,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2816
3133
|
const __default__$a = {
|
|
2817
3134
|
name: "VvDropdownItem"
|
|
2818
3135
|
};
|
|
2819
|
-
const _sfc_main$
|
|
3136
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
2820
3137
|
...__default__$a,
|
|
2821
3138
|
setup(__props) {
|
|
2822
3139
|
const { role, expanded } = useInjectedDropdownItem();
|
|
@@ -2841,11 +3158,11 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2841
3158
|
};
|
|
2842
3159
|
}
|
|
2843
3160
|
});
|
|
2844
|
-
const _hoisted_1$
|
|
3161
|
+
const _hoisted_1$a = ["title"];
|
|
2845
3162
|
const __default__$9 = {
|
|
2846
3163
|
name: "VvDropdownOption"
|
|
2847
3164
|
};
|
|
2848
|
-
const _sfc_main$
|
|
3165
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
2849
3166
|
...__default__$9,
|
|
2850
3167
|
props: {
|
|
2851
3168
|
...DisabledProps,
|
|
@@ -2883,7 +3200,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
2883
3200
|
}
|
|
2884
3201
|
});
|
|
2885
3202
|
return (_ctx, _cache) => {
|
|
2886
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3203
|
+
return openBlock(), createBlock(_sfc_main$d, {
|
|
2887
3204
|
class: normalizeClass(unref(bemCssClasses)),
|
|
2888
3205
|
tabindex: _ctx.disabled ? -1 : 0,
|
|
2889
3206
|
"aria-selected": _ctx.selected,
|
|
@@ -2898,14 +3215,14 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
2898
3215
|
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
|
|
2899
3216
|
createTextVNode(toDisplayString(unref(hintLabel)), 1)
|
|
2900
3217
|
])
|
|
2901
|
-
], 8, _hoisted_1$
|
|
3218
|
+
], 8, _hoisted_1$a)
|
|
2902
3219
|
]),
|
|
2903
3220
|
_: 3
|
|
2904
3221
|
}, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
|
|
2905
3222
|
};
|
|
2906
3223
|
}
|
|
2907
3224
|
});
|
|
2908
|
-
const _hoisted_1$
|
|
3225
|
+
const _hoisted_1$9 = {
|
|
2909
3226
|
class: "vv-dropdown-optgroup",
|
|
2910
3227
|
role: "presentation",
|
|
2911
3228
|
tabindex: "-1"
|
|
@@ -2913,7 +3230,7 @@ const _hoisted_1$7 = {
|
|
|
2913
3230
|
const __default__$8 = {
|
|
2914
3231
|
name: "VvDropdownOptgroup"
|
|
2915
3232
|
};
|
|
2916
|
-
const _sfc_main$
|
|
3233
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
2917
3234
|
...__default__$8,
|
|
2918
3235
|
props: {
|
|
2919
3236
|
...LabelProps
|
|
@@ -2921,7 +3238,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2921
3238
|
setup(__props) {
|
|
2922
3239
|
const props = __props;
|
|
2923
3240
|
return (_ctx, _cache) => {
|
|
2924
|
-
return openBlock(), createElementBlock("li", _hoisted_1$
|
|
3241
|
+
return openBlock(), createElementBlock("li", _hoisted_1$9, toDisplayString(props.label), 1);
|
|
2925
3242
|
};
|
|
2926
3243
|
}
|
|
2927
3244
|
});
|
|
@@ -3018,13 +3335,13 @@ function useComponentIcon(icon, iconPosition) {
|
|
|
3018
3335
|
hasIconAfter
|
|
3019
3336
|
};
|
|
3020
3337
|
}
|
|
3021
|
-
const _hoisted_1$
|
|
3338
|
+
const _hoisted_1$8 = ["for"];
|
|
3022
3339
|
const _hoisted_2$6 = { class: "vv-select__wrapper" };
|
|
3023
3340
|
const _hoisted_3$4 = {
|
|
3024
3341
|
key: 0,
|
|
3025
3342
|
class: "vv-select__input-before"
|
|
3026
3343
|
};
|
|
3027
|
-
const _hoisted_4$
|
|
3344
|
+
const _hoisted_4$4 = { class: "vv-select__inner" };
|
|
3028
3345
|
const _hoisted_5$3 = ["id"];
|
|
3029
3346
|
const _hoisted_6$3 = ["disabled", "hidden"];
|
|
3030
3347
|
const _hoisted_7$3 = ["disabled", "value"];
|
|
@@ -3037,20 +3354,25 @@ const _hoisted_10 = {
|
|
|
3037
3354
|
const __default__$7 = {
|
|
3038
3355
|
name: "VvSelect"
|
|
3039
3356
|
};
|
|
3040
|
-
const _sfc_main$
|
|
3357
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
3041
3358
|
...__default__$7,
|
|
3042
3359
|
props: VvSelectProps,
|
|
3043
3360
|
emits: VvSelectEmits,
|
|
3044
3361
|
setup(__props, { emit }) {
|
|
3045
3362
|
const props = __props;
|
|
3046
3363
|
const slots = useSlots();
|
|
3364
|
+
const propsDefaults = useDefaults(
|
|
3365
|
+
"VvSelect",
|
|
3366
|
+
VvSelectProps,
|
|
3367
|
+
props
|
|
3368
|
+
);
|
|
3047
3369
|
const select = ref();
|
|
3048
3370
|
const {
|
|
3049
3371
|
HintSlot,
|
|
3050
3372
|
hasHintLabelOrSlot,
|
|
3051
3373
|
hasInvalidLabelOrSlot,
|
|
3052
3374
|
hintSlotScope
|
|
3053
|
-
} = HintSlotFactory(
|
|
3375
|
+
} = HintSlotFactory(propsDefaults, slots);
|
|
3054
3376
|
const {
|
|
3055
3377
|
id,
|
|
3056
3378
|
modifiers,
|
|
@@ -3156,13 +3478,13 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3156
3478
|
_ctx.label ? (openBlock(), createElementBlock("label", {
|
|
3157
3479
|
key: 0,
|
|
3158
3480
|
for: unref(hasId)
|
|
3159
|
-
}, toDisplayString(_ctx.label), 9, _hoisted_1$
|
|
3481
|
+
}, toDisplayString(_ctx.label), 9, _hoisted_1$8)) : createCommentVNode("", true),
|
|
3160
3482
|
createElementVNode("div", _hoisted_2$6, [
|
|
3161
3483
|
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$4, [
|
|
3162
3484
|
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
3163
3485
|
])) : createCommentVNode("", true),
|
|
3164
|
-
createElementVNode("div", _hoisted_4$
|
|
3165
|
-
unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$
|
|
3486
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
3487
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
|
|
3166
3488
|
key: 0,
|
|
3167
3489
|
class: "vv-select__icon"
|
|
3168
3490
|
}, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
|
|
@@ -3202,7 +3524,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3202
3524
|
], 16, _hoisted_5$3), [
|
|
3203
3525
|
[vModelSelect, unref(localModelValue)]
|
|
3204
3526
|
]),
|
|
3205
|
-
unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$
|
|
3527
|
+
unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
|
|
3206
3528
|
key: 1,
|
|
3207
3529
|
class: "vv-select__icon vv-select__icon-after"
|
|
3208
3530
|
}, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
|
|
@@ -3248,63 +3570,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3248
3570
|
};
|
|
3249
3571
|
}
|
|
3250
3572
|
});
|
|
3251
|
-
|
|
3252
|
-
const volver = useVolver();
|
|
3253
|
-
const volverComponentDefaults = computed(() => {
|
|
3254
|
-
var _a;
|
|
3255
|
-
if (!volver || !((_a = volver.defaults.value) == null ? void 0 : _a[componentName])) {
|
|
3256
|
-
return void 0;
|
|
3257
|
-
}
|
|
3258
|
-
return volver.defaults.value[componentName];
|
|
3259
|
-
});
|
|
3260
|
-
return computed(() => {
|
|
3261
|
-
if (volverComponentDefaults.value === void 0) {
|
|
3262
|
-
return props;
|
|
3263
|
-
}
|
|
3264
|
-
const componentDefaults = volverComponentDefaults.value;
|
|
3265
|
-
const simplifiedPropsDefinition = propsDefinition;
|
|
3266
|
-
const simplifiedProps = props;
|
|
3267
|
-
return Object.keys(simplifiedPropsDefinition).reduce((acc, key) => {
|
|
3268
|
-
const propValue = simplifiedProps[key];
|
|
3269
|
-
acc[key] = propValue;
|
|
3270
|
-
if (key in componentDefaults) {
|
|
3271
|
-
if (Array.isArray(simplifiedPropsDefinition[key])) {
|
|
3272
|
-
const typeArray = simplifiedPropsDefinition[key];
|
|
3273
|
-
if (typeArray.length) {
|
|
3274
|
-
const typeFunction = typeArray[0];
|
|
3275
|
-
if (typeFunction === propValue) {
|
|
3276
|
-
acc[key] = componentDefaults[key];
|
|
3277
|
-
}
|
|
3278
|
-
}
|
|
3279
|
-
}
|
|
3280
|
-
if (typeof simplifiedPropsDefinition[key] === "function") {
|
|
3281
|
-
const typeFunction = simplifiedPropsDefinition[key];
|
|
3282
|
-
if (typeFunction() === propValue) {
|
|
3283
|
-
acc[key] = componentDefaults[key];
|
|
3284
|
-
}
|
|
3285
|
-
}
|
|
3286
|
-
if (typeof simplifiedPropsDefinition[key] === "object") {
|
|
3287
|
-
let defaultValue = simplifiedPropsDefinition[key].default;
|
|
3288
|
-
if (typeof defaultValue === "function") {
|
|
3289
|
-
defaultValue = defaultValue();
|
|
3290
|
-
}
|
|
3291
|
-
if (typeof defaultValue === "object") {
|
|
3292
|
-
if (JSON.stringify(defaultValue) === JSON.stringify(propValue)) {
|
|
3293
|
-
acc[key] = componentDefaults[key];
|
|
3294
|
-
}
|
|
3295
|
-
} else if (defaultValue === propValue) {
|
|
3296
|
-
acc[key] = componentDefaults[key];
|
|
3297
|
-
}
|
|
3298
|
-
}
|
|
3299
|
-
}
|
|
3300
|
-
return acc;
|
|
3301
|
-
}, {});
|
|
3302
|
-
});
|
|
3303
|
-
}
|
|
3304
|
-
const _hoisted_1$5 = ["id"];
|
|
3573
|
+
const _hoisted_1$7 = ["id"];
|
|
3305
3574
|
const _hoisted_2$5 = ["id", "for"];
|
|
3306
3575
|
const _hoisted_3$3 = ["id", "aria-controls", "placeholder"];
|
|
3307
|
-
const _hoisted_4$
|
|
3576
|
+
const _hoisted_4$3 = {
|
|
3308
3577
|
key: 0,
|
|
3309
3578
|
class: "vv-select__input-before"
|
|
3310
3579
|
};
|
|
@@ -3322,13 +3591,13 @@ const _hoisted_9 = {
|
|
|
3322
3591
|
const __default__$6 = {
|
|
3323
3592
|
name: "VvCombobox",
|
|
3324
3593
|
components: {
|
|
3325
|
-
VvDropdown: _sfc_main$
|
|
3326
|
-
VvDropdownOption: _sfc_main$
|
|
3327
|
-
VvDropdownOptgroup: _sfc_main$
|
|
3328
|
-
VvButton: _sfc_main$
|
|
3594
|
+
VvDropdown: _sfc_main$e,
|
|
3595
|
+
VvDropdownOption: _sfc_main$c,
|
|
3596
|
+
VvDropdownOptgroup: _sfc_main$b,
|
|
3597
|
+
VvButton: _sfc_main$j
|
|
3329
3598
|
}
|
|
3330
3599
|
};
|
|
3331
|
-
const _sfc_main$
|
|
3600
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
3332
3601
|
...__default__$6,
|
|
3333
3602
|
props: VvComboboxProps,
|
|
3334
3603
|
emits: VvComboboxEvents,
|
|
@@ -3351,7 +3620,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3351
3620
|
hasHintLabelOrSlot,
|
|
3352
3621
|
hasInvalidLabelOrSlot,
|
|
3353
3622
|
hintSlotScope
|
|
3354
|
-
} = HintSlotFactory(
|
|
3623
|
+
} = HintSlotFactory(propsDefaults, slots);
|
|
3355
3624
|
const inputEl = ref(null);
|
|
3356
3625
|
const inputSearchEl = ref(null);
|
|
3357
3626
|
const wrapperEl = ref(null);
|
|
@@ -3465,6 +3734,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3465
3734
|
} = useOptions(props);
|
|
3466
3735
|
const filteredOptions = computed(() => {
|
|
3467
3736
|
var _a;
|
|
3737
|
+
if (propsDefaults.value.searchFunction) {
|
|
3738
|
+
return propsDefaults.value.searchFunction(
|
|
3739
|
+
debouncedSearchText.value,
|
|
3740
|
+
props.options
|
|
3741
|
+
);
|
|
3742
|
+
}
|
|
3468
3743
|
return (_a = props.options) == null ? void 0 : _a.filter((option) => {
|
|
3469
3744
|
return getOptionLabel(option).toLowerCase().includes(debouncedSearchText.value.toLowerCase().trim());
|
|
3470
3745
|
});
|
|
@@ -3569,7 +3844,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3569
3844
|
flip: propsDefaults.value.flip,
|
|
3570
3845
|
autoPlacement: propsDefaults.value.autoPlacement,
|
|
3571
3846
|
arrow: propsDefaults.value.arrow,
|
|
3572
|
-
autofocusFirst: searchable.value ?
|
|
3847
|
+
autofocusFirst: searchable.value ? true : propsDefaults.value.autofocusFirst,
|
|
3573
3848
|
triggerWidth: propsDefaults.value.triggerWidth,
|
|
3574
3849
|
modifiers: propsDefaults.value.dropdownModifiers
|
|
3575
3850
|
}));
|
|
@@ -3608,7 +3883,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3608
3883
|
ref: wrapperEl,
|
|
3609
3884
|
class: "vv-select__wrapper"
|
|
3610
3885
|
}, [
|
|
3611
|
-
createVNode(_sfc_main$
|
|
3886
|
+
createVNode(_sfc_main$e, mergeProps({
|
|
3612
3887
|
ref_key: "dropdownEl",
|
|
3613
3888
|
ref: dropdownEl,
|
|
3614
3889
|
modelValue: unref(expanded),
|
|
@@ -3619,11 +3894,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3619
3894
|
onAfterCollapse
|
|
3620
3895
|
}), createSlots({
|
|
3621
3896
|
default: withCtx(({ aria }) => [
|
|
3622
|
-
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
3897
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
3623
3898
|
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
3624
3899
|
])) : createCommentVNode("", true),
|
|
3625
3900
|
createElementVNode("div", _hoisted_5$2, [
|
|
3626
|
-
unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$
|
|
3901
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
|
|
3627
3902
|
key: 0,
|
|
3628
3903
|
class: "vv-select__icon"
|
|
3629
3904
|
}, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
|
|
@@ -3643,7 +3918,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3643
3918
|
renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
|
|
3644
3919
|
unref(hasValue) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3645
3920
|
!_ctx.badges ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(unref(hasValue)), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
|
|
3646
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3921
|
+
return openBlock(), createBlock(_sfc_main$l, {
|
|
3647
3922
|
key: index,
|
|
3648
3923
|
modifiers: _ctx.badgeModifiers,
|
|
3649
3924
|
class: "vv-select__badge"
|
|
@@ -3655,7 +3930,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3655
3930
|
"aria-label": unref(propsDefaults).deselectActionLabel,
|
|
3656
3931
|
onClick: withModifiers(($event) => onInput(option), ["stop"])
|
|
3657
3932
|
}, [
|
|
3658
|
-
createVNode(_sfc_main$
|
|
3933
|
+
createVNode(_sfc_main$n, { name: "close" })
|
|
3659
3934
|
], 8, _hoisted_8$1)) : createCommentVNode("", true)
|
|
3660
3935
|
]),
|
|
3661
3936
|
_: 2
|
|
@@ -3666,7 +3941,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3666
3941
|
], 64))
|
|
3667
3942
|
])
|
|
3668
3943
|
], 16, _hoisted_6$2),
|
|
3669
|
-
unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$
|
|
3944
|
+
unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
|
|
3670
3945
|
key: 1,
|
|
3671
3946
|
class: "vv-select__icon vv-select__icon-after"
|
|
3672
3947
|
}, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
|
|
@@ -3679,13 +3954,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3679
3954
|
unref(filteredOptions).length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
|
|
3680
3955
|
return openBlock(), createElementBlock(Fragment, { key: index }, [
|
|
3681
3956
|
isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3682
|
-
createVNode(_sfc_main$
|
|
3957
|
+
createVNode(_sfc_main$b, {
|
|
3683
3958
|
label: unref(getOptionLabel)(option)
|
|
3684
3959
|
}, null, 8, ["label"]),
|
|
3685
3960
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
|
|
3686
3961
|
option
|
|
3687
3962
|
), (item, i) => {
|
|
3688
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3963
|
+
return openBlock(), createBlock(_sfc_main$c, mergeProps({
|
|
3689
3964
|
disabled: unref(getOptionDisabled)(item),
|
|
3690
3965
|
selected: getOptionSelected(item),
|
|
3691
3966
|
unselectable: _ctx.unselectable,
|
|
@@ -3710,7 +3985,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3710
3985
|
_: 2
|
|
3711
3986
|
}, 1040, ["onClickPassive"]);
|
|
3712
3987
|
}), 128))
|
|
3713
|
-
], 64)) : (openBlock(), createBlock(_sfc_main$
|
|
3988
|
+
], 64)) : (openBlock(), createBlock(_sfc_main$c, mergeProps({ key: 1 }, {
|
|
3714
3989
|
disabled: unref(getOptionDisabled)(option),
|
|
3715
3990
|
selected: getOptionSelected(option),
|
|
3716
3991
|
unselectable: _ctx.unselectable,
|
|
@@ -3734,7 +4009,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3734
4009
|
_: 2
|
|
3735
4010
|
}, 1040, ["onClickPassive"]))
|
|
3736
4011
|
], 64);
|
|
3737
|
-
}), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$
|
|
4012
|
+
}), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$c, {
|
|
3738
4013
|
key: 1,
|
|
3739
4014
|
modifiers: "inert"
|
|
3740
4015
|
}, {
|
|
@@ -3744,7 +4019,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3744
4019
|
])
|
|
3745
4020
|
]),
|
|
3746
4021
|
_: 3
|
|
3747
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
4022
|
+
})) : (openBlock(), createBlock(_sfc_main$c, {
|
|
3748
4023
|
key: 2,
|
|
3749
4024
|
modifiers: "inert"
|
|
3750
4025
|
}, {
|
|
@@ -3760,12 +4035,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3760
4035
|
renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
|
|
3761
4036
|
var _a;
|
|
3762
4037
|
return [
|
|
3763
|
-
((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$
|
|
4038
|
+
((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$j, {
|
|
3764
4039
|
key: 0,
|
|
3765
|
-
label:
|
|
4040
|
+
label: unref(propsDefaults).closeLabel,
|
|
3766
4041
|
modifiers: "secondary",
|
|
3767
4042
|
onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
|
|
3768
|
-
})) : createCommentVNode("", true)
|
|
4043
|
+
}, null, 8, ["label"])) : createCommentVNode("", true)
|
|
3769
4044
|
];
|
|
3770
4045
|
})
|
|
3771
4046
|
]),
|
|
@@ -3789,7 +4064,6 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3789
4064
|
class: "vv-dropdown__search",
|
|
3790
4065
|
placeholder: unref(propsDefaults).searchPlaceholder
|
|
3791
4066
|
}, null, 8, _hoisted_3$3)), [
|
|
3792
|
-
[vShow, unref(expanded)],
|
|
3793
4067
|
[vModelText, unref(searchText)]
|
|
3794
4068
|
]) : createCommentVNode("", true)
|
|
3795
4069
|
]),
|
|
@@ -3830,7 +4104,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3830
4104
|
key: "3"
|
|
3831
4105
|
} : void 0
|
|
3832
4106
|
]), 1032, ["id"])
|
|
3833
|
-
], 10, _hoisted_1$
|
|
4107
|
+
], 10, _hoisted_1$7)) : (openBlock(), createBlock(_sfc_main$a, mergeProps({ key: 1 }, unref(selectProps), {
|
|
3834
4108
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
|
|
3835
4109
|
}), null, 16));
|
|
3836
4110
|
};
|
|
@@ -3875,35 +4149,36 @@ const VvDialogProps = {
|
|
|
3875
4149
|
*/
|
|
3876
4150
|
keepOpen: { type: Boolean, default: false }
|
|
3877
4151
|
};
|
|
3878
|
-
const _hoisted_1$
|
|
4152
|
+
const _hoisted_1$6 = ["onCancel"];
|
|
4153
|
+
const _hoisted_2$4 = {
|
|
3879
4154
|
key: 0,
|
|
3880
4155
|
class: "vv-dialog__header"
|
|
3881
4156
|
};
|
|
3882
|
-
const
|
|
3883
|
-
const
|
|
4157
|
+
const _hoisted_3$2 = { class: "vv-dialog__content" };
|
|
4158
|
+
const _hoisted_4$2 = {
|
|
3884
4159
|
key: 1,
|
|
3885
4160
|
class: "vv-dialog__footer"
|
|
3886
4161
|
};
|
|
3887
4162
|
const __default__$5 = {
|
|
3888
4163
|
name: "VvDialog"
|
|
3889
4164
|
};
|
|
3890
|
-
const _sfc_main$
|
|
4165
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
3891
4166
|
...__default__$5,
|
|
3892
4167
|
props: VvDialogProps,
|
|
3893
4168
|
emits: VvDialogEvents,
|
|
3894
4169
|
setup(__props, { expose: __expose, emit }) {
|
|
3895
4170
|
const props = __props;
|
|
3896
4171
|
const dialogEl = ref();
|
|
4172
|
+
const modelValue = useVModel(props, "modelValue", emit);
|
|
3897
4173
|
const localModelValue = ref(false);
|
|
3898
|
-
const
|
|
3899
|
-
get()
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
localModelValue.value = value;
|
|
4174
|
+
const isOpened = computed({
|
|
4175
|
+
get: () => modelValue.value ?? localModelValue.value,
|
|
4176
|
+
set: (newValue) => {
|
|
4177
|
+
if (modelValue.value === void 0) {
|
|
4178
|
+
localModelValue.value = newValue;
|
|
4179
|
+
return;
|
|
3905
4180
|
}
|
|
3906
|
-
|
|
4181
|
+
modelValue.value = newValue;
|
|
3907
4182
|
}
|
|
3908
4183
|
});
|
|
3909
4184
|
const modalWrapper = ref(null);
|
|
@@ -3954,36 +4229,36 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3954
4229
|
};
|
|
3955
4230
|
onClickOutside(modalWrapper, () => {
|
|
3956
4231
|
if (!props.keepOpen) {
|
|
3957
|
-
|
|
4232
|
+
close();
|
|
3958
4233
|
}
|
|
3959
4234
|
});
|
|
3960
4235
|
function close() {
|
|
3961
|
-
|
|
4236
|
+
isOpened.value = false;
|
|
3962
4237
|
}
|
|
3963
4238
|
function open() {
|
|
3964
|
-
|
|
4239
|
+
isOpened.value = true;
|
|
3965
4240
|
}
|
|
3966
4241
|
__expose({ close, open });
|
|
3967
|
-
|
|
3968
|
-
if (
|
|
3969
|
-
e.preventDefault();
|
|
4242
|
+
const onCancel = () => {
|
|
4243
|
+
if (!props.keepOpen) {
|
|
3970
4244
|
close();
|
|
3971
4245
|
}
|
|
3972
|
-
}
|
|
4246
|
+
};
|
|
3973
4247
|
return (_ctx, _cache) => {
|
|
3974
4248
|
return openBlock(), createBlock(Transition, mergeProps({ name: unref(transitioName) }, toHandlers(dialogTransitionHandlers)), {
|
|
3975
4249
|
default: withCtx(() => [
|
|
3976
4250
|
withDirectives(createElementVNode("dialog", mergeProps(unref(dialogAttrs), {
|
|
3977
4251
|
ref_key: "dialogEl",
|
|
3978
4252
|
ref: dialogEl,
|
|
3979
|
-
class: unref(dialogClass)
|
|
4253
|
+
class: unref(dialogClass),
|
|
4254
|
+
onCancel: withModifiers(onCancel, ["stop", "prevent"])
|
|
3980
4255
|
}), [
|
|
3981
4256
|
createElementVNode("article", {
|
|
3982
4257
|
ref_key: "modalWrapper",
|
|
3983
4258
|
ref: modalWrapper,
|
|
3984
4259
|
class: "vv-dialog__wrapper"
|
|
3985
4260
|
}, [
|
|
3986
|
-
_ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header",
|
|
4261
|
+
_ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_2$4, [
|
|
3987
4262
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
3988
4263
|
createTextVNode(toDisplayString(_ctx.title) + " ", 1),
|
|
3989
4264
|
createElementVNode("button", {
|
|
@@ -3992,19 +4267,19 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3992
4267
|
class: "vv-dialog__close",
|
|
3993
4268
|
onClickPassive: close
|
|
3994
4269
|
}, [
|
|
3995
|
-
createVNode(_sfc_main$
|
|
4270
|
+
createVNode(_sfc_main$n, { name: "close" })
|
|
3996
4271
|
], 32)
|
|
3997
4272
|
])
|
|
3998
4273
|
])) : createCommentVNode("", true),
|
|
3999
|
-
createElementVNode("div",
|
|
4274
|
+
createElementVNode("div", _hoisted_3$2, [
|
|
4000
4275
|
renderSlot(_ctx.$slots, "default")
|
|
4001
4276
|
]),
|
|
4002
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer",
|
|
4277
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4$2, [
|
|
4003
4278
|
renderSlot(_ctx.$slots, "footer")
|
|
4004
4279
|
])) : createCommentVNode("", true)
|
|
4005
4280
|
], 512)
|
|
4006
|
-
], 16), [
|
|
4007
|
-
[vShow, unref(
|
|
4281
|
+
], 16, _hoisted_1$6), [
|
|
4282
|
+
[vShow, unref(isOpened)]
|
|
4008
4283
|
])
|
|
4009
4284
|
]),
|
|
4010
4285
|
_: 3
|
|
@@ -4204,7 +4479,7 @@ const VvInputTextProps = {
|
|
|
4204
4479
|
};
|
|
4205
4480
|
const VvInputPasswordAction = defineComponent({
|
|
4206
4481
|
components: {
|
|
4207
|
-
VvIcon: _sfc_main$
|
|
4482
|
+
VvIcon: _sfc_main$n
|
|
4208
4483
|
},
|
|
4209
4484
|
props: {
|
|
4210
4485
|
disabled: {
|
|
@@ -4248,7 +4523,7 @@ const VvInputPasswordAction = defineComponent({
|
|
|
4248
4523
|
};
|
|
4249
4524
|
},
|
|
4250
4525
|
render() {
|
|
4251
|
-
const icon = h(_sfc_main$
|
|
4526
|
+
const icon = h(_sfc_main$n, {
|
|
4252
4527
|
name: this.activeIcon,
|
|
4253
4528
|
class: "vv-input-text__icon"
|
|
4254
4529
|
});
|
|
@@ -4267,7 +4542,7 @@ const VvInputPasswordAction = defineComponent({
|
|
|
4267
4542
|
});
|
|
4268
4543
|
const VvInputStepAction = defineComponent({
|
|
4269
4544
|
components: {
|
|
4270
|
-
VvIcon: _sfc_main$
|
|
4545
|
+
VvIcon: _sfc_main$n
|
|
4271
4546
|
},
|
|
4272
4547
|
props: {
|
|
4273
4548
|
disabled: {
|
|
@@ -4312,7 +4587,7 @@ const VvInputStepAction = defineComponent({
|
|
|
4312
4587
|
});
|
|
4313
4588
|
const VvInputClearAction = defineComponent({
|
|
4314
4589
|
components: {
|
|
4315
|
-
VvIcon: _sfc_main$
|
|
4590
|
+
VvIcon: _sfc_main$n
|
|
4316
4591
|
},
|
|
4317
4592
|
props: {
|
|
4318
4593
|
disabled: {
|
|
@@ -4341,7 +4616,7 @@ const VvInputClearAction = defineComponent({
|
|
|
4341
4616
|
};
|
|
4342
4617
|
},
|
|
4343
4618
|
render() {
|
|
4344
|
-
const icon = h(_sfc_main$
|
|
4619
|
+
const icon = h(_sfc_main$n, {
|
|
4345
4620
|
name: this.icon,
|
|
4346
4621
|
class: "vv-input-text__icon"
|
|
4347
4622
|
});
|
|
@@ -4362,7 +4637,7 @@ function VvInputTextActionsFactory(type, parentProps) {
|
|
|
4362
4637
|
return {
|
|
4363
4638
|
name: "VvInputTextActions",
|
|
4364
4639
|
components: {
|
|
4365
|
-
VvIcon: _sfc_main$
|
|
4640
|
+
VvIcon: _sfc_main$n,
|
|
4366
4641
|
VvInputPasswordAction,
|
|
4367
4642
|
VvInputStepAction,
|
|
4368
4643
|
VvInputClearAction
|
|
@@ -4489,7 +4764,7 @@ function useTextCount(text, options) {
|
|
|
4489
4764
|
formatted
|
|
4490
4765
|
};
|
|
4491
4766
|
}
|
|
4492
|
-
const _hoisted_1$
|
|
4767
|
+
const _hoisted_1$5 = ["for"];
|
|
4493
4768
|
const _hoisted_2$3 = { class: "vv-input-text__wrapper" };
|
|
4494
4769
|
const _hoisted_3$1 = {
|
|
4495
4770
|
key: 0,
|
|
@@ -4512,13 +4787,18 @@ const _hoisted_8 = {
|
|
|
4512
4787
|
const __default__$4 = {
|
|
4513
4788
|
name: "VvInputText"
|
|
4514
4789
|
};
|
|
4515
|
-
const _sfc_main$
|
|
4790
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
4516
4791
|
...__default__$4,
|
|
4517
4792
|
props: VvInputTextProps,
|
|
4518
4793
|
emits: VvInputTextEvents,
|
|
4519
4794
|
setup(__props, { expose: __expose, emit }) {
|
|
4520
4795
|
const props = __props;
|
|
4521
4796
|
const slots = useSlots();
|
|
4797
|
+
const propsDefaults = useDefaults(
|
|
4798
|
+
"VvInputText",
|
|
4799
|
+
VvInputTextProps,
|
|
4800
|
+
props
|
|
4801
|
+
);
|
|
4522
4802
|
const inputEl = ref();
|
|
4523
4803
|
const innerEl = ref();
|
|
4524
4804
|
__expose({ $inner: innerEl });
|
|
@@ -4705,7 +4985,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4705
4985
|
hasHintLabelOrSlot,
|
|
4706
4986
|
hasInvalidLabelOrSlot,
|
|
4707
4987
|
hintSlotScope
|
|
4708
|
-
} = HintSlotFactory(
|
|
4988
|
+
} = HintSlotFactory(propsDefaults, slots);
|
|
4709
4989
|
const PasswordInputActions = VvInputTextActionsFactory(
|
|
4710
4990
|
INPUT_TYPES.PASSWORD,
|
|
4711
4991
|
props
|
|
@@ -4764,7 +5044,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4764
5044
|
key: 0,
|
|
4765
5045
|
for: unref(hasId),
|
|
4766
5046
|
class: "vv-input-text__label"
|
|
4767
|
-
}, toDisplayString(unref(label)), 9, _hoisted_1$
|
|
5047
|
+
}, toDisplayString(unref(label)), 9, _hoisted_1$5)) : createCommentVNode("", true),
|
|
4768
5048
|
createElementVNode("div", _hoisted_2$3, [
|
|
4769
5049
|
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
4770
5050
|
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
@@ -4775,7 +5055,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4775
5055
|
class: "vv-input-text__inner",
|
|
4776
5056
|
onClick: withModifiers(onClickInner, ["stop"])
|
|
4777
5057
|
}, [
|
|
4778
|
-
unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$
|
|
5058
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
|
|
4779
5059
|
key: 0,
|
|
4780
5060
|
class: "vv-input-text__icon"
|
|
4781
5061
|
}, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
|
|
@@ -4796,7 +5076,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4796
5076
|
])
|
|
4797
5077
|
])) : createCommentVNode("", true)
|
|
4798
5078
|
], 8, _hoisted_4$1),
|
|
4799
|
-
unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(_sfc_main$
|
|
5079
|
+
unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
|
|
4800
5080
|
key: 1,
|
|
4801
5081
|
class: "vv-input-text__icon vv-input-text__icon-after"
|
|
4802
5082
|
}, unref(hasIconAfter) ? unref(hasIcon) : unref(defaultAfterIcon)), null, 16)) : unref(isPassword) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(PasswordInputActions), {
|
|
@@ -4856,6 +5136,79 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4856
5136
|
};
|
|
4857
5137
|
}
|
|
4858
5138
|
});
|
|
5139
|
+
const VvNavProps = {
|
|
5140
|
+
...ModifiersProps,
|
|
5141
|
+
items: {
|
|
5142
|
+
type: Array,
|
|
5143
|
+
required: true,
|
|
5144
|
+
default: () => []
|
|
5145
|
+
}
|
|
5146
|
+
};
|
|
5147
|
+
const VvNavEvents = ["click"];
|
|
5148
|
+
const _hoisted_1$4 = {
|
|
5149
|
+
class: "vv-nav__menu",
|
|
5150
|
+
role: "menu",
|
|
5151
|
+
"aria-busy": "true"
|
|
5152
|
+
};
|
|
5153
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
5154
|
+
__name: "VvNav",
|
|
5155
|
+
props: VvNavProps,
|
|
5156
|
+
emits: VvNavEvents,
|
|
5157
|
+
setup(__props, { emit }) {
|
|
5158
|
+
const props = __props;
|
|
5159
|
+
const { modifiers, items } = toRefs(props);
|
|
5160
|
+
const activeItem = ref(null);
|
|
5161
|
+
const bemCssClasses = useModifiers("vv-nav", modifiers);
|
|
5162
|
+
const localItems = computed(() => {
|
|
5163
|
+
return items.value.map((item, index) => {
|
|
5164
|
+
return {
|
|
5165
|
+
...item,
|
|
5166
|
+
id: item.id || `nav-item_${index}`
|
|
5167
|
+
};
|
|
5168
|
+
});
|
|
5169
|
+
});
|
|
5170
|
+
function onClick(item) {
|
|
5171
|
+
if (!item.disabled) {
|
|
5172
|
+
emit("click", item);
|
|
5173
|
+
activeItem.value = item.id;
|
|
5174
|
+
}
|
|
5175
|
+
}
|
|
5176
|
+
return (_ctx, _cache) => {
|
|
5177
|
+
return openBlock(), createElementBlock("nav", {
|
|
5178
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
5179
|
+
}, [
|
|
5180
|
+
createElementVNode("ul", _hoisted_1$4, [
|
|
5181
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(localItems), (navItem) => {
|
|
5182
|
+
return openBlock(), createElementBlock("li", {
|
|
5183
|
+
key: navItem.id,
|
|
5184
|
+
class: "vv-nav__item",
|
|
5185
|
+
role: "presentation"
|
|
5186
|
+
}, [
|
|
5187
|
+
createVNode(_sfc_main$o, mergeProps({
|
|
5188
|
+
disabled: navItem.disabled,
|
|
5189
|
+
to: navItem.to,
|
|
5190
|
+
href: navItem.href,
|
|
5191
|
+
tabindex: 0
|
|
5192
|
+
}, {
|
|
5193
|
+
class: [{
|
|
5194
|
+
current: unref(activeItem) == navItem.id,
|
|
5195
|
+
disabled: navItem.disabled
|
|
5196
|
+
}, "vv-nav__item-label"]
|
|
5197
|
+
}, toHandlers(navItem.on), {
|
|
5198
|
+
onClick: ($event) => onClick(navItem)
|
|
5199
|
+
}), {
|
|
5200
|
+
default: withCtx(() => [
|
|
5201
|
+
createTextVNode(toDisplayString(navItem.title), 1)
|
|
5202
|
+
]),
|
|
5203
|
+
_: 2
|
|
5204
|
+
}, 1040, ["class", "onClick"])
|
|
5205
|
+
]);
|
|
5206
|
+
}), 128))
|
|
5207
|
+
])
|
|
5208
|
+
], 2);
|
|
5209
|
+
};
|
|
5210
|
+
}
|
|
5211
|
+
});
|
|
4859
5212
|
const VvProgressProps = {
|
|
4860
5213
|
...ModifiersProps,
|
|
4861
5214
|
/**
|
|
@@ -4889,7 +5242,7 @@ const VvProgressProps = {
|
|
|
4889
5242
|
const __default__$3 = {
|
|
4890
5243
|
name: "VvProgress"
|
|
4891
5244
|
};
|
|
4892
|
-
const _sfc_main$
|
|
5245
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
4893
5246
|
...__default__$3,
|
|
4894
5247
|
props: VvProgressProps,
|
|
4895
5248
|
setup(__props) {
|
|
@@ -4945,18 +5298,23 @@ function useGroupProps(props, emit) {
|
|
|
4945
5298
|
disabled
|
|
4946
5299
|
};
|
|
4947
5300
|
}
|
|
4948
|
-
const _hoisted_1$
|
|
5301
|
+
const _hoisted_1$3 = ["for"];
|
|
4949
5302
|
const _hoisted_2$2 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
|
|
4950
5303
|
const __default__$2 = {
|
|
4951
5304
|
name: "VvRadio"
|
|
4952
5305
|
};
|
|
4953
|
-
const _sfc_main$
|
|
5306
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
4954
5307
|
...__default__$2,
|
|
4955
5308
|
props: VvRadioProps,
|
|
4956
5309
|
emits: VvRadioEvents,
|
|
4957
5310
|
setup(__props, { emit }) {
|
|
4958
5311
|
const props = __props;
|
|
4959
5312
|
const slots = useSlots();
|
|
5313
|
+
const propsDefaults = useDefaults(
|
|
5314
|
+
"VvRadio",
|
|
5315
|
+
VvRadioProps,
|
|
5316
|
+
props
|
|
5317
|
+
);
|
|
4960
5318
|
const { id, disabled, readonly, modelValue, valid, invalid } = useGroupProps(props, emit);
|
|
4961
5319
|
const hasId = useUniqueId(id);
|
|
4962
5320
|
const hasHintId = computed(() => `${hasId.value}-hint`);
|
|
@@ -5007,7 +5365,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5007
5365
|
hasHintLabelOrSlot,
|
|
5008
5366
|
hasInvalidLabelOrSlot,
|
|
5009
5367
|
hintSlotScope
|
|
5010
|
-
} = HintSlotFactory(
|
|
5368
|
+
} = HintSlotFactory(propsDefaults, slots);
|
|
5011
5369
|
return (_ctx, _cache) => {
|
|
5012
5370
|
return openBlock(), createElementBlock("label", {
|
|
5013
5371
|
class: normalizeClass(unref(bemCssClasses)),
|
|
@@ -5066,24 +5424,29 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5066
5424
|
key: "3"
|
|
5067
5425
|
} : void 0
|
|
5068
5426
|
]), 1032, ["id"])
|
|
5069
|
-
], 10, _hoisted_1$
|
|
5427
|
+
], 10, _hoisted_1$3);
|
|
5070
5428
|
};
|
|
5071
5429
|
}
|
|
5072
5430
|
});
|
|
5073
5431
|
const VvRadioGroupProps = CheckboxRadioGroupProps;
|
|
5074
5432
|
const VvRadioGroupEvents = ["update:modelValue", "change"];
|
|
5075
|
-
const _hoisted_1$
|
|
5433
|
+
const _hoisted_1$2 = ["textContent"];
|
|
5076
5434
|
const _hoisted_2$1 = { class: "vv-radio-group__wrapper" };
|
|
5077
5435
|
const __default__$1 = {
|
|
5078
5436
|
name: "VvRadioGroup"
|
|
5079
5437
|
};
|
|
5080
|
-
const _sfc_main$
|
|
5438
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
5081
5439
|
...__default__$1,
|
|
5082
5440
|
props: VvRadioGroupProps,
|
|
5083
5441
|
emits: VvRadioGroupEvents,
|
|
5084
5442
|
setup(__props, { emit }) {
|
|
5085
5443
|
const props = __props;
|
|
5086
5444
|
const slots = useSlots();
|
|
5445
|
+
const propsDefaults = useDefaults(
|
|
5446
|
+
"VvRadioGroup",
|
|
5447
|
+
VvRadioGroupProps,
|
|
5448
|
+
props
|
|
5449
|
+
);
|
|
5087
5450
|
const modelValue = useVModel(props, "modelValue", emit);
|
|
5088
5451
|
const { disabled, readonly, vertical, valid, invalid, modifiers } = toRefs(props);
|
|
5089
5452
|
useProvideGroupState({
|
|
@@ -5114,7 +5477,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5114
5477
|
value: getOptionValue(option)
|
|
5115
5478
|
};
|
|
5116
5479
|
};
|
|
5117
|
-
const { HintSlot, hintSlotScope } = HintSlotFactory(
|
|
5480
|
+
const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots);
|
|
5118
5481
|
return (_ctx, _cache) => {
|
|
5119
5482
|
return openBlock(), createElementBlock("fieldset", {
|
|
5120
5483
|
class: normalizeClass(unref(bemCssClasses))
|
|
@@ -5122,10 +5485,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5122
5485
|
_ctx.label ? (openBlock(), createElementBlock("legend", {
|
|
5123
5486
|
key: 0,
|
|
5124
5487
|
textContent: toDisplayString(_ctx.label)
|
|
5125
|
-
}, null, 8, _hoisted_1$
|
|
5488
|
+
}, null, 8, _hoisted_1$2)) : createCommentVNode("", true),
|
|
5126
5489
|
createElementVNode("div", _hoisted_2$1, [
|
|
5127
5490
|
_ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (option, index) => {
|
|
5128
|
-
return openBlock(), createBlock(_sfc_main$
|
|
5491
|
+
return openBlock(), createBlock(_sfc_main$4, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
|
|
5129
5492
|
}), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
5130
5493
|
]),
|
|
5131
5494
|
createVNode(unref(HintSlot), { class: "vv-radio-group__hint" }, createSlots({ _: 2 }, [
|
|
@@ -5162,6 +5525,61 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5162
5525
|
};
|
|
5163
5526
|
}
|
|
5164
5527
|
});
|
|
5528
|
+
const VvTabProps = {
|
|
5529
|
+
...ModifiersProps,
|
|
5530
|
+
items: {
|
|
5531
|
+
type: Array,
|
|
5532
|
+
required: true,
|
|
5533
|
+
default: () => []
|
|
5534
|
+
}
|
|
5535
|
+
};
|
|
5536
|
+
const VvTabEvents = ["click"];
|
|
5537
|
+
const _hoisted_1$1 = ["id"];
|
|
5538
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
5539
|
+
__name: "VvTab",
|
|
5540
|
+
props: VvTabProps,
|
|
5541
|
+
emits: VvTabEvents,
|
|
5542
|
+
setup(__props, { emit }) {
|
|
5543
|
+
const props = __props;
|
|
5544
|
+
const { modifiers, items } = toRefs(props);
|
|
5545
|
+
const activeTab = ref(null);
|
|
5546
|
+
const bemCssClasses = useModifiers("vv-tab", modifiers);
|
|
5547
|
+
const localItems = computed(() => {
|
|
5548
|
+
return items.value.map((item, index) => {
|
|
5549
|
+
return {
|
|
5550
|
+
...item,
|
|
5551
|
+
id: item.id || `tab-item_${index}`
|
|
5552
|
+
};
|
|
5553
|
+
});
|
|
5554
|
+
});
|
|
5555
|
+
function onClick(item) {
|
|
5556
|
+
if (!item.disabled) {
|
|
5557
|
+
emit("click", item);
|
|
5558
|
+
activeTab.value = item.id;
|
|
5559
|
+
}
|
|
5560
|
+
}
|
|
5561
|
+
return (_ctx, _cache) => {
|
|
5562
|
+
return openBlock(), createElementBlock("div", {
|
|
5563
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
5564
|
+
}, [
|
|
5565
|
+
createVNode(_sfc_main$6, {
|
|
5566
|
+
items: unref(localItems),
|
|
5567
|
+
modifiers: "tabs full",
|
|
5568
|
+
onClick
|
|
5569
|
+
}, null, 8, ["items"]),
|
|
5570
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(localItems), (item) => {
|
|
5571
|
+
return openBlock(), createElementBlock("article", {
|
|
5572
|
+
id: item.id,
|
|
5573
|
+
key: item.id,
|
|
5574
|
+
class: normalizeClass([{ target: unref(activeTab) === item.id }, "vv-tab__panel"])
|
|
5575
|
+
}, [
|
|
5576
|
+
renderSlot(_ctx.$slots, `${item.id}`)
|
|
5577
|
+
], 10, _hoisted_1$1);
|
|
5578
|
+
}), 128))
|
|
5579
|
+
], 2);
|
|
5580
|
+
};
|
|
5581
|
+
}
|
|
5582
|
+
});
|
|
5165
5583
|
const WRAP = {
|
|
5166
5584
|
hard: "hard",
|
|
5167
5585
|
soft: "soft"
|
|
@@ -5223,13 +5641,18 @@ const _hoisted_7 = {
|
|
|
5223
5641
|
const __default__ = {
|
|
5224
5642
|
name: "VvTextarea"
|
|
5225
5643
|
};
|
|
5226
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5644
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
5227
5645
|
...__default__,
|
|
5228
5646
|
props: VvTextareaProps,
|
|
5229
5647
|
emits: VvTextareaEvents,
|
|
5230
5648
|
setup(__props, { emit }) {
|
|
5231
5649
|
const props = __props;
|
|
5232
5650
|
const slots = useSlots();
|
|
5651
|
+
const propsDefaults = useDefaults(
|
|
5652
|
+
"VvTextarea",
|
|
5653
|
+
VvTextareaProps,
|
|
5654
|
+
props
|
|
5655
|
+
);
|
|
5233
5656
|
const textarea = ref();
|
|
5234
5657
|
const {
|
|
5235
5658
|
id,
|
|
@@ -5284,7 +5707,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5284
5707
|
hasHintLabelOrSlot,
|
|
5285
5708
|
hasInvalidLabelOrSlot,
|
|
5286
5709
|
hintSlotScope
|
|
5287
|
-
} = HintSlotFactory(
|
|
5710
|
+
} = HintSlotFactory(propsDefaults, slots);
|
|
5288
5711
|
const bemCssClasses = useModifiers(
|
|
5289
5712
|
"vv-textarea",
|
|
5290
5713
|
modifiers,
|
|
@@ -5348,7 +5771,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5348
5771
|
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
5349
5772
|
])) : createCommentVNode("", true),
|
|
5350
5773
|
createElementVNode("div", _hoisted_4, [
|
|
5351
|
-
unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$
|
|
5774
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
|
|
5352
5775
|
key: 0,
|
|
5353
5776
|
class: "vv-textarea__icon"
|
|
5354
5777
|
}, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
|
|
@@ -5362,7 +5785,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5362
5785
|
}), null, 16, _hoisted_5), [
|
|
5363
5786
|
[vModelText, unref(localModelValue)]
|
|
5364
5787
|
]),
|
|
5365
|
-
unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$
|
|
5788
|
+
unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
|
|
5366
5789
|
key: 1,
|
|
5367
5790
|
class: "vv-textarea__icon vv-textarea__icon-after"
|
|
5368
5791
|
}, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
|
|
@@ -5413,24 +5836,69 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5413
5836
|
};
|
|
5414
5837
|
}
|
|
5415
5838
|
});
|
|
5839
|
+
const VvTooltipProps = {
|
|
5840
|
+
...ModifiersProps,
|
|
5841
|
+
/**
|
|
5842
|
+
* Define the tooltip position
|
|
5843
|
+
* @default Side.bottom
|
|
5844
|
+
*/
|
|
5845
|
+
position: {
|
|
5846
|
+
type: String,
|
|
5847
|
+
default: Side.bottom
|
|
5848
|
+
},
|
|
5849
|
+
value: {
|
|
5850
|
+
type: String
|
|
5851
|
+
}
|
|
5852
|
+
};
|
|
5853
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5854
|
+
__name: "VvTooltip",
|
|
5855
|
+
props: VvTooltipProps,
|
|
5856
|
+
setup(__props) {
|
|
5857
|
+
const props = __props;
|
|
5858
|
+
const { modifiers } = toRefs(props);
|
|
5859
|
+
const bemCssClasses = useModifiers(
|
|
5860
|
+
"vv-tooltip",
|
|
5861
|
+
modifiers,
|
|
5862
|
+
computed(() => ({
|
|
5863
|
+
[props.position]: true
|
|
5864
|
+
}))
|
|
5865
|
+
);
|
|
5866
|
+
return (_ctx, _cache) => {
|
|
5867
|
+
return openBlock(), createElementBlock("span", {
|
|
5868
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
5869
|
+
role: "tooltip",
|
|
5870
|
+
inert: ""
|
|
5871
|
+
}, [
|
|
5872
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
5873
|
+
createTextVNode(toDisplayString(_ctx.value), 1)
|
|
5874
|
+
])
|
|
5875
|
+
], 2);
|
|
5876
|
+
};
|
|
5877
|
+
}
|
|
5878
|
+
});
|
|
5416
5879
|
export {
|
|
5417
|
-
_sfc_main$
|
|
5418
|
-
_sfc_main$
|
|
5419
|
-
_sfc_main$
|
|
5420
|
-
_sfc_main$
|
|
5421
|
-
_sfc_main$
|
|
5422
|
-
_sfc_main$
|
|
5423
|
-
_sfc_main$
|
|
5424
|
-
_sfc_main$
|
|
5425
|
-
_sfc_main$
|
|
5426
|
-
_sfc_main$
|
|
5427
|
-
_sfc_main$
|
|
5428
|
-
_sfc_main$
|
|
5429
|
-
_sfc_main$
|
|
5430
|
-
_sfc_main$
|
|
5431
|
-
_sfc_main$
|
|
5432
|
-
_sfc_main$
|
|
5433
|
-
_sfc_main$
|
|
5434
|
-
_sfc_main$
|
|
5435
|
-
_sfc_main as
|
|
5880
|
+
_sfc_main$q as VvAccordion,
|
|
5881
|
+
_sfc_main$p as VvAccordionGroup,
|
|
5882
|
+
_sfc_main$o as VvAction,
|
|
5883
|
+
_sfc_main$m as VvAlert,
|
|
5884
|
+
_sfc_main$l as VvBadge,
|
|
5885
|
+
_sfc_main$k as VvBreadcrumb,
|
|
5886
|
+
_sfc_main$j as VvButton,
|
|
5887
|
+
_sfc_main$i as VvButtonGroup,
|
|
5888
|
+
_sfc_main$h as VvCard,
|
|
5889
|
+
_sfc_main$g as VvCheckbox,
|
|
5890
|
+
_sfc_main$f as VvCheckboxGroup,
|
|
5891
|
+
_sfc_main$9 as VvCombobox,
|
|
5892
|
+
_sfc_main$8 as VvDialog,
|
|
5893
|
+
_sfc_main$e as VvDropdown,
|
|
5894
|
+
_sfc_main$n as VvIcon,
|
|
5895
|
+
_sfc_main$7 as VvInputText,
|
|
5896
|
+
_sfc_main$6 as VvNav,
|
|
5897
|
+
_sfc_main$5 as VvProgress,
|
|
5898
|
+
_sfc_main$4 as VvRadio,
|
|
5899
|
+
_sfc_main$3 as VvRadioGroup,
|
|
5900
|
+
_sfc_main$a as VvSelect,
|
|
5901
|
+
_sfc_main$2 as VvTab,
|
|
5902
|
+
_sfc_main$1 as VvTextarea,
|
|
5903
|
+
_sfc_main as VvTooltip
|
|
5436
5904
|
};
|