@volverjs/ui-vue 0.0.9-beta.9 → 0.0.9
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/auto-imports.d.ts +2 -2
- package/dist/components/VvAccordion/VvAccordion.es.js +8 -7
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +8 -7
- package/dist/components/VvAction/VvAction.es.js +8 -7
- package/dist/components/VvAlert/VvAlert.es.js +8 -7
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +8 -7
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +6 -6
- package/dist/components/VvAlertGroup/index.d.ts +2 -2
- package/dist/components/VvAvatar/VvAvatar.es.js +8 -7
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +8 -7
- package/dist/components/VvBadge/VvBadge.es.js +8 -7
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +8 -7
- package/dist/components/VvButton/VvButton.es.js +8 -7
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +8 -7
- package/dist/components/VvCard/VvCard.es.js +8 -7
- package/dist/components/VvCheckbox/VvCheckbox.es.js +8 -7
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +8 -7
- package/dist/components/VvCombobox/VvCombobox.es.js +145 -116
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +306 -90
- package/dist/components/VvCombobox/index.d.ts +108 -31
- package/dist/components/VvDialog/VvDialog.es.js +16 -11
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +19 -16
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +299 -91
- package/dist/components/VvDropdown/index.d.ts +99 -30
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +8 -7
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +8 -7
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +8 -7
- package/dist/components/VvInputText/VvInputText.es.js +193 -103
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +19 -37
- package/dist/components/VvInputText/index.d.ts +15 -33
- package/dist/components/VvNav/VvNav.es.js +8 -7
- package/dist/components/VvProgress/VvProgress.es.js +8 -7
- package/dist/components/VvRadio/VvRadio.es.js +8 -7
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +8 -7
- package/dist/components/VvSelect/VvSelect.es.js +8 -7
- package/dist/components/VvSelect/VvSelect.vue.d.ts +1 -1
- package/dist/components/VvTab/VvTab.es.js +8 -7
- package/dist/components/VvTextarea/VvTextarea.es.js +16 -12
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.es.js +8 -7
- package/dist/components/index.es.js +346 -221
- package/dist/components/index.umd.js +1 -1
- package/dist/constants.d.ts +4 -0
- package/dist/directives/index.es.js +8 -7
- package/dist/directives/v-tooltip.es.js +8 -7
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +100 -31
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +2 -2
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +18 -18
- package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/stories/InputText/InputText.settings.d.ts +31 -9
- package/dist/stories/InputText/InputText.stories.d.ts +0 -1
- package/dist/stories/InputText/InputTextMask.stories.d.ts +12 -0
- package/package.json +60 -59
- 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/VvCombobox/VvCombobox.vue +40 -19
- package/src/components/VvCombobox/index.ts +13 -0
- package/src/components/VvDialog/VvDialog.vue +6 -2
- package/src/components/VvDropdown/VvDropdown.vue +18 -16
- package/src/components/VvInputText/VvInputText.vue +170 -55
- package/src/components/VvInputText/index.ts +32 -34
- package/src/components/VvTextarea/VvTextarea.vue +8 -5
- package/src/constants.ts +5 -0
- package/src/props/index.ts +7 -11
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Combobox/Combobox.test.ts +1 -1
- package/src/stories/InputText/InputText.settings.ts +36 -15
- package/src/stories/InputText/InputText.stories.ts +4 -12
- package/src/stories/InputText/InputText.test.ts +31 -15
- package/src/stories/InputText/InputTextMask.stories.ts +122 -0
|
@@ -2,9 +2,14 @@ import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, creat
|
|
|
2
2
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
3
3
|
import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
|
|
4
4
|
import { nanoid } from "nanoid";
|
|
5
|
-
import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced } from "@vueuse/core";
|
|
5
|
+
import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
|
|
6
6
|
import mitt from "mitt";
|
|
7
7
|
import { get } from "ts-dot-prop";
|
|
8
|
+
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
9
|
+
Strategy2["absolute"] = "absolute";
|
|
10
|
+
Strategy2["fixed"] = "fixed";
|
|
11
|
+
return Strategy2;
|
|
12
|
+
})(Strategy || {});
|
|
8
13
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
9
14
|
Side2["left"] = "left";
|
|
10
15
|
Side2["right"] = "right";
|
|
@@ -249,19 +254,15 @@ const DropdownProps = {
|
|
|
249
254
|
placement: {
|
|
250
255
|
type: String,
|
|
251
256
|
default: Side.bottom,
|
|
252
|
-
validator: (value) =>
|
|
253
|
-
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
254
|
-
}
|
|
257
|
+
validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
|
|
255
258
|
},
|
|
256
259
|
/**
|
|
257
260
|
* Dropdown strategy
|
|
258
261
|
*/
|
|
259
262
|
strategy: {
|
|
260
263
|
type: String,
|
|
261
|
-
default:
|
|
262
|
-
validator: (value) =>
|
|
263
|
-
return ["fixed", "absolute"].includes(value);
|
|
264
|
-
}
|
|
264
|
+
default: void 0,
|
|
265
|
+
validator: (value) => Object.values(Strategy).includes(value)
|
|
265
266
|
},
|
|
266
267
|
/**
|
|
267
268
|
* Dropdown show / hide transition name
|
|
@@ -455,6 +456,13 @@ const VvComboboxProps = {
|
|
|
455
456
|
* Use input text to search on options
|
|
456
457
|
*/
|
|
457
458
|
searchable: Boolean,
|
|
459
|
+
/**
|
|
460
|
+
* Search function to filter options
|
|
461
|
+
*/
|
|
462
|
+
searchFunction: {
|
|
463
|
+
type: Function,
|
|
464
|
+
default: void 0
|
|
465
|
+
},
|
|
458
466
|
/**
|
|
459
467
|
* On searchable select is the input search placeholder
|
|
460
468
|
*/
|
|
@@ -884,7 +892,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
884
892
|
}
|
|
885
893
|
} else if (props.flip) {
|
|
886
894
|
if (typeof props.flip === "boolean") {
|
|
887
|
-
toReturn.push(flip());
|
|
895
|
+
toReturn.push(flip({ fallbackStrategy: "initialPlacement" }));
|
|
888
896
|
} else {
|
|
889
897
|
toReturn.push(flip(props.flip));
|
|
890
898
|
}
|
|
@@ -936,13 +944,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
936
944
|
}
|
|
937
945
|
return toReturn;
|
|
938
946
|
});
|
|
939
|
-
const { x, y,
|
|
947
|
+
const { x, y, middlewareData, placement, strategy } = useFloating(
|
|
940
948
|
referenceEl,
|
|
941
949
|
floatingEl,
|
|
942
950
|
{
|
|
943
951
|
whileElementsMounted: (...args) => {
|
|
944
952
|
return autoUpdate(...args, {
|
|
945
|
-
animationFrame: props.strategy ===
|
|
953
|
+
animationFrame: props.strategy === Strategy.fixed
|
|
946
954
|
});
|
|
947
955
|
},
|
|
948
956
|
placement: computed(() => props.placement),
|
|
@@ -951,16 +959,18 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
951
959
|
}
|
|
952
960
|
);
|
|
953
961
|
const dropdownPlacement = computed(() => {
|
|
962
|
+
var _a;
|
|
954
963
|
if (hasCustomPosition.value) {
|
|
955
964
|
return void 0;
|
|
956
965
|
}
|
|
966
|
+
const width = props.triggerWidth && referenceEl.value ? `${(_a = referenceEl.value) == null ? void 0 : _a.offsetWidth}px` : void 0;
|
|
957
967
|
return {
|
|
958
968
|
position: strategy.value,
|
|
959
969
|
top: `${y.value ?? 0}px`,
|
|
960
970
|
left: `${x.value ?? 0}px`,
|
|
961
|
-
maxWidth: maxWidth.value,
|
|
971
|
+
maxWidth: width ? void 0 : maxWidth.value,
|
|
962
972
|
maxHeight: maxHeight.value,
|
|
963
|
-
width
|
|
973
|
+
width
|
|
964
974
|
};
|
|
965
975
|
});
|
|
966
976
|
const side = computed(
|
|
@@ -972,10 +982,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
972
982
|
return void 0;
|
|
973
983
|
}
|
|
974
984
|
const staticSide = {
|
|
975
|
-
top:
|
|
976
|
-
right:
|
|
977
|
-
bottom:
|
|
978
|
-
left:
|
|
985
|
+
[Side.top]: Side.bottom,
|
|
986
|
+
[Side.right]: Side.left,
|
|
987
|
+
[Side.bottom]: Side.top,
|
|
988
|
+
[Side.left]: Side.right
|
|
979
989
|
}[side.value];
|
|
980
990
|
return {
|
|
981
991
|
left: ((_a = middlewareData.value.arrow) == null ? void 0 : _a.x) !== void 0 ? `${(_b = middlewareData.value.arrow) == null ? void 0 : _b.x}px` : void 0,
|
|
@@ -2467,7 +2477,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2467
2477
|
const searchText = ref("");
|
|
2468
2478
|
const debouncedSearchText = refDebounced(
|
|
2469
2479
|
searchText,
|
|
2470
|
-
Number(props.debounceSearch)
|
|
2480
|
+
computed(() => Number(props.debounceSearch))
|
|
2471
2481
|
);
|
|
2472
2482
|
watch(
|
|
2473
2483
|
debouncedSearchText,
|
|
@@ -2490,7 +2500,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2490
2500
|
expanded.value = false;
|
|
2491
2501
|
};
|
|
2492
2502
|
const onAfterExpand = () => {
|
|
2493
|
-
if (
|
|
2503
|
+
if (propsDefaults.value.searchable) {
|
|
2494
2504
|
if (inputSearchEl.value) {
|
|
2495
2505
|
inputSearchEl.value.focus({
|
|
2496
2506
|
preventScroll: true
|
|
@@ -2499,7 +2509,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2499
2509
|
}
|
|
2500
2510
|
};
|
|
2501
2511
|
const onAfterCollapse = () => {
|
|
2502
|
-
if (
|
|
2512
|
+
if (propsDefaults.value.searchable) {
|
|
2503
2513
|
searchText.value = "";
|
|
2504
2514
|
}
|
|
2505
2515
|
};
|
|
@@ -2513,14 +2523,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2513
2523
|
loading,
|
|
2514
2524
|
valid,
|
|
2515
2525
|
invalid,
|
|
2516
|
-
floating
|
|
2517
|
-
searchable
|
|
2526
|
+
floating
|
|
2518
2527
|
} = toRefs(props);
|
|
2519
2528
|
const hasId = useUniqueId(id);
|
|
2520
2529
|
const hasHintId = computed(() => `${hasId.value}-hint`);
|
|
2521
2530
|
const hasDropdownId = computed(() => `${hasId.value}-dropdown`);
|
|
2522
2531
|
const hasSearchId = computed(() => `${hasId.value}-search`);
|
|
2523
2532
|
const hasLabelId = computed(() => `${hasId.value}-label`);
|
|
2533
|
+
const localLoading = ref(false);
|
|
2534
|
+
const isLoading = computed(() => localLoading.value || loading.value);
|
|
2524
2535
|
const dropdownEl = ref();
|
|
2525
2536
|
const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
|
|
2526
2537
|
icon,
|
|
@@ -2535,7 +2546,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2535
2546
|
modifiers,
|
|
2536
2547
|
computed(() => ({
|
|
2537
2548
|
disabled: disabled.value,
|
|
2538
|
-
loading:
|
|
2549
|
+
loading: isLoading.value,
|
|
2539
2550
|
readonly: readonly.value,
|
|
2540
2551
|
"icon-before": Boolean(hasIconBefore.value),
|
|
2541
2552
|
"icon-after": Boolean(hasIconAfter.value),
|
|
@@ -2553,8 +2564,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2553
2564
|
getOptionDisabled,
|
|
2554
2565
|
getOptionGrouped
|
|
2555
2566
|
} = useOptions(props);
|
|
2556
|
-
const filteredOptions =
|
|
2567
|
+
const filteredOptions = computedAsync(async () => {
|
|
2557
2568
|
var _a;
|
|
2569
|
+
if (propsDefaults.value.searchFunction) {
|
|
2570
|
+
localLoading.value = true;
|
|
2571
|
+
const toReturn = await Promise.resolve(
|
|
2572
|
+
propsDefaults.value.searchFunction(
|
|
2573
|
+
debouncedSearchText.value,
|
|
2574
|
+
props.options
|
|
2575
|
+
)
|
|
2576
|
+
);
|
|
2577
|
+
localLoading.value = false;
|
|
2578
|
+
return toReturn;
|
|
2579
|
+
}
|
|
2558
2580
|
return (_a = props.options) == null ? void 0 : _a.filter((option) => {
|
|
2559
2581
|
return getOptionLabel(option).toLowerCase().includes(debouncedSearchText.value.toLowerCase().trim());
|
|
2560
2582
|
});
|
|
@@ -2572,12 +2594,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2572
2594
|
} else if (props.modelValue) {
|
|
2573
2595
|
selectedValues = [props.modelValue];
|
|
2574
2596
|
}
|
|
2575
|
-
const options = props.options.reduce(
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2597
|
+
const options = props.options.reduce(
|
|
2598
|
+
(acc, value) => {
|
|
2599
|
+
if (isGroup(value)) {
|
|
2600
|
+
return [...acc, ...getOptionGrouped(value)];
|
|
2601
|
+
}
|
|
2602
|
+
return [...acc, value];
|
|
2603
|
+
},
|
|
2604
|
+
[]
|
|
2605
|
+
);
|
|
2581
2606
|
return options.filter((option) => {
|
|
2582
2607
|
if (isGroup(option)) {
|
|
2583
2608
|
return getOptionGrouped(option).some(
|
|
@@ -2631,7 +2656,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2631
2656
|
invalid: invalid.value,
|
|
2632
2657
|
invalidLabel: propsDefaults.value.invalidLabel,
|
|
2633
2658
|
hintLabel: propsDefaults.value.hintLabel,
|
|
2634
|
-
loading:
|
|
2659
|
+
loading: isLoading.value,
|
|
2635
2660
|
loadingLabel: propsDefaults.value.loadingLabel,
|
|
2636
2661
|
disabled: disabled.value,
|
|
2637
2662
|
readonly: readonly.value,
|
|
@@ -2659,7 +2684,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2659
2684
|
flip: propsDefaults.value.flip,
|
|
2660
2685
|
autoPlacement: propsDefaults.value.autoPlacement,
|
|
2661
2686
|
arrow: propsDefaults.value.arrow,
|
|
2662
|
-
autofocusFirst:
|
|
2687
|
+
autofocusFirst: propsDefaults.value.searchable ? true : propsDefaults.value.autofocusFirst,
|
|
2663
2688
|
triggerWidth: propsDefaults.value.triggerWidth,
|
|
2664
2689
|
modifiers: propsDefaults.value.dropdownModifiers
|
|
2665
2690
|
}));
|
|
@@ -2691,7 +2716,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2691
2716
|
_ctx.label ? (openBlock(), createElementBlock("label", {
|
|
2692
2717
|
key: 0,
|
|
2693
2718
|
id: unref(hasLabelId),
|
|
2694
|
-
for: unref(searchable
|
|
2719
|
+
for: unref(propsDefaults).searchable ? unref(hasSearchId) : void 0
|
|
2695
2720
|
}, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("", true),
|
|
2696
2721
|
createElementVNode("div", {
|
|
2697
2722
|
ref_key: "wrapperEl",
|
|
@@ -2743,6 +2768,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2743
2768
|
_ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
|
|
2744
2769
|
key: 0,
|
|
2745
2770
|
"aria-label": unref(propsDefaults).deselectActionLabel,
|
|
2771
|
+
type: "button",
|
|
2746
2772
|
onClick: withModifiers(($event) => onInput(option), ["stop"])
|
|
2747
2773
|
}, [
|
|
2748
2774
|
createVNode(_sfc_main$9, { name: "close" })
|
|
@@ -2765,87 +2791,90 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2765
2791
|
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
2766
2792
|
])) : createCommentVNode("", true)
|
|
2767
2793
|
]),
|
|
2768
|
-
items: withCtx(() =>
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2794
|
+
items: withCtx(() => {
|
|
2795
|
+
var _a;
|
|
2796
|
+
return [
|
|
2797
|
+
!unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
|
|
2798
|
+
return openBlock(), createElementBlock(Fragment, { key: index }, [
|
|
2799
|
+
isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2800
|
+
createVNode(_sfc_main$5, {
|
|
2801
|
+
label: unref(getOptionLabel)(option)
|
|
2802
|
+
}, null, 8, ["label"]),
|
|
2803
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
|
|
2804
|
+
option
|
|
2805
|
+
), (item, i) => {
|
|
2806
|
+
return openBlock(), createBlock(_sfc_main$6, mergeProps({
|
|
2807
|
+
disabled: unref(getOptionDisabled)(item),
|
|
2808
|
+
selected: getOptionSelected(item),
|
|
2809
|
+
unselectable: _ctx.unselectable,
|
|
2810
|
+
deselectHintLabel: unref(propsDefaults).deselectHintLabel,
|
|
2811
|
+
selectHintLabel: unref(propsDefaults).selectHintLabel,
|
|
2812
|
+
selectedHintLabel: unref(propsDefaults).selectedHintLabel
|
|
2813
|
+
}, {
|
|
2814
|
+
key: i,
|
|
2815
|
+
class: "vv-dropdown-option",
|
|
2816
|
+
onClickPassive: ($event) => onInput(item)
|
|
2817
|
+
}), {
|
|
2818
|
+
default: withCtx(() => [
|
|
2819
|
+
renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
|
|
2820
|
+
option,
|
|
2821
|
+
selectedOptions: unref(selectedOptions),
|
|
2822
|
+
selected: getOptionSelected(item),
|
|
2823
|
+
disabled: unref(getOptionDisabled)(item)
|
|
2824
|
+
})), () => [
|
|
2825
|
+
createTextVNode(toDisplayString(unref(getOptionLabel)(item)), 1)
|
|
2826
|
+
])
|
|
2827
|
+
]),
|
|
2828
|
+
_: 2
|
|
2829
|
+
}, 1040, ["onClickPassive"]);
|
|
2830
|
+
}), 128))
|
|
2831
|
+
], 64)) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
|
|
2832
|
+
disabled: unref(getOptionDisabled)(option),
|
|
2833
|
+
selected: getOptionSelected(option),
|
|
2834
|
+
unselectable: _ctx.unselectable,
|
|
2835
|
+
deselectHintLabel: unref(propsDefaults).deselectHintLabel,
|
|
2836
|
+
selectHintLabel: unref(propsDefaults).selectHintLabel,
|
|
2837
|
+
selectedHintLabel: unref(propsDefaults).selectedHintLabel
|
|
2838
|
+
}, {
|
|
2839
|
+
class: "vv-dropdown-option",
|
|
2840
|
+
onClickPassive: ($event) => onInput(option)
|
|
2841
|
+
}), {
|
|
2842
|
+
default: withCtx(() => [
|
|
2843
|
+
renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
|
|
2844
|
+
option,
|
|
2845
|
+
selectedOptions: unref(selectedOptions),
|
|
2846
|
+
selected: getOptionSelected(option),
|
|
2847
|
+
disabled: unref(getOptionDisabled)(option)
|
|
2848
|
+
})), () => [
|
|
2849
|
+
createTextVNode(toDisplayString(unref(getOptionLabel)(option)), 1)
|
|
2850
|
+
])
|
|
2851
|
+
]),
|
|
2852
|
+
_: 2
|
|
2853
|
+
}, 1040, ["onClickPassive"]))
|
|
2854
|
+
], 64);
|
|
2855
|
+
}), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
|
|
2856
|
+
key: 1,
|
|
2857
|
+
modifiers: "inert"
|
|
2858
|
+
}, {
|
|
2859
|
+
default: withCtx(() => [
|
|
2860
|
+
renderSlot(_ctx.$slots, "no-options", {}, () => [
|
|
2861
|
+
createTextVNode(toDisplayString(unref(propsDefaults).noOptionsLabel), 1)
|
|
2862
|
+
])
|
|
2863
|
+
]),
|
|
2864
|
+
_: 3
|
|
2865
|
+
})) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
|
|
2866
|
+
key: 2,
|
|
2867
|
+
modifiers: "inert"
|
|
2868
|
+
}, {
|
|
2869
|
+
default: withCtx(() => [
|
|
2870
|
+
renderSlot(_ctx.$slots, "no-results", {}, () => [
|
|
2871
|
+
createTextVNode(toDisplayString(unref(propsDefaults).noResultsLabel), 1)
|
|
2872
|
+
])
|
|
2873
|
+
]),
|
|
2874
|
+
_: 3
|
|
2875
|
+
})) : createCommentVNode("", true)
|
|
2876
|
+
];
|
|
2877
|
+
}),
|
|
2849
2878
|
after: withCtx(() => [
|
|
2850
2879
|
renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
|
|
2851
2880
|
var _a;
|
|
@@ -2861,11 +2890,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2861
2890
|
]),
|
|
2862
2891
|
_: 2
|
|
2863
2892
|
}, [
|
|
2864
|
-
unref(searchable
|
|
2893
|
+
unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
|
|
2865
2894
|
name: "before",
|
|
2866
2895
|
fn: withCtx(() => [
|
|
2867
2896
|
renderSlot(_ctx.$slots, "dropdown::before"),
|
|
2868
|
-
unref(searchable) ? withDirectives((openBlock(), createElementBlock("input", {
|
|
2897
|
+
unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
|
|
2869
2898
|
key: 0,
|
|
2870
2899
|
id: unref(hasSearchId),
|
|
2871
2900
|
ref_key: "inputSearchEl",
|