@indielayer/ui 1.16.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/docs/assets/css/tailwind.css +6 -0
- package/docs/components/common/CodePreview.vue +14 -9
- package/docs/components/common/DocsFeatures.vue +41 -0
- package/docs/components/common/DocsHero.vue +216 -0
- package/docs/components/common/DocumentPage.vue +99 -112
- package/docs/components/common/ExampleBlocks.vue +157 -0
- package/docs/components/menu/DocsMenu.vue +3 -0
- package/docs/components/toolbar/Toolbar.vue +11 -2
- package/docs/components/toolbar/ToolbarColorToggle.vue +4 -4
- package/docs/components/toolbar/ToolbarSearch.vue +59 -62
- package/docs/composables/useDocMeta.ts +47 -0
- package/docs/icons.ts +28 -0
- package/docs/layouts/default.vue +1 -3
- package/docs/layouts/simple.vue +3 -1
- package/docs/main.ts +5 -0
- package/docs/pages/colors.vue +56 -47
- package/docs/pages/component/infiniteLoader/composable.vue +168 -0
- package/docs/pages/component/infiniteLoader/index.vue +36 -0
- package/docs/pages/component/infiniteLoader/usage.vue +161 -0
- package/docs/pages/component/select/size.vue +1 -1
- package/docs/pages/component/select/usage.vue +14 -7
- package/docs/pages/component/virtualGrid/index.vue +29 -0
- package/docs/pages/component/virtualGrid/usage.vue +20 -0
- package/docs/pages/component/virtualList/dynamicHeight.vue +75 -0
- package/docs/pages/component/virtualList/index.vue +36 -0
- package/docs/pages/component/virtualList/usage.vue +17 -0
- package/docs/pages/error.vue +5 -3
- package/docs/pages/icons.vue +64 -54
- package/docs/pages/index.vue +93 -82
- package/docs/pages/typography.vue +38 -28
- package/docs/router/index.ts +31 -3
- package/docs/search/components.json +1 -1
- package/docs/search/index.json +1 -0
- package/lib/components/container/theme/Container.base.theme.js +1 -1
- package/lib/components/divider/theme/Divider.base.theme.js +1 -1
- package/lib/components/input/Input.vue.js +23 -24
- package/lib/components/select/Select.vue.d.ts +16 -27
- package/lib/components/select/Select.vue.js +452 -345
- package/lib/components/table/Table.vue.js +1 -1
- package/lib/composables/useVirtualList.d.ts +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +88 -76
- package/lib/index.umd.js +4 -4
- package/lib/install.js +15 -7
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual/components/infiniteLoader/InfiniteLoader.test.d.ts +1 -0
- package/lib/virtual/components/infiniteLoader/InfiniteLoader.vue.d.ts +49 -0
- package/lib/virtual/components/infiniteLoader/InfiniteLoader.vue.js +21 -0
- package/lib/virtual/components/infiniteLoader/InfiniteLoader.vue2.js +4 -0
- package/lib/virtual/components/virtualGrid/VirtualGrid.vue.d.ts +185 -0
- package/lib/virtual/components/virtualGrid/VirtualGrid.vue.js +241 -0
- package/lib/virtual/components/virtualGrid/VirtualGrid.vue2.js +4 -0
- package/lib/virtual/components/virtualGrid/types.d.ts +138 -0
- package/lib/virtual/components/virtualList/VirtualList.test.d.ts +1 -0
- package/lib/virtual/components/virtualList/VirtualList.vue.d.ts +135 -0
- package/lib/virtual/components/virtualList/VirtualList.vue.js +159 -0
- package/lib/virtual/components/virtualList/VirtualList.vue2.js +4 -0
- package/lib/virtual/components/virtualList/isDynamicRowHeight.d.ts +2 -0
- package/lib/virtual/components/virtualList/isDynamicRowHeight.js +6 -0
- package/lib/virtual/components/virtualList/types.d.ts +115 -0
- package/lib/virtual/components/virtualList/useDynamicRowHeight.d.ts +7 -0
- package/lib/virtual/components/virtualList/useDynamicRowHeight.js +68 -0
- package/lib/virtual/components/virtualList/useDynamicRowHeight.test.d.ts +1 -0
- package/lib/virtual/composables/infinite-loader/scanForUnloadedIndices.d.ts +8 -0
- package/lib/virtual/composables/infinite-loader/scanForUnloadedIndices.js +41 -0
- package/lib/virtual/composables/infinite-loader/scanForUnloadedIndices.test.d.ts +1 -0
- package/lib/virtual/composables/infinite-loader/types.d.ts +30 -0
- package/lib/virtual/composables/infinite-loader/useInfiniteLoader.d.ts +6 -0
- package/lib/virtual/composables/infinite-loader/useInfiniteLoader.js +42 -0
- package/lib/virtual/composables/infinite-loader/useInfiniteLoader.test.d.ts +1 -0
- package/lib/virtual/core/createCachedBounds.d.ts +6 -0
- package/lib/virtual/core/createCachedBounds.js +55 -0
- package/lib/virtual/core/getEstimatedSize.d.ts +6 -0
- package/lib/virtual/core/getEstimatedSize.js +22 -0
- package/lib/virtual/core/getOffsetForIndex.d.ts +11 -0
- package/lib/virtual/core/getOffsetForIndex.js +40 -0
- package/lib/virtual/core/getStartStopIndices.d.ts +13 -0
- package/lib/virtual/core/getStartStopIndices.js +31 -0
- package/lib/virtual/core/getStartStopIndices.test.d.ts +1 -0
- package/lib/virtual/core/types.d.ts +11 -0
- package/lib/virtual/core/useCachedBounds.d.ts +7 -0
- package/lib/virtual/core/useCachedBounds.js +18 -0
- package/lib/virtual/core/useIsRtl.d.ts +2 -0
- package/lib/virtual/core/useIsRtl.js +15 -0
- package/lib/virtual/core/useItemSize.d.ts +5 -0
- package/lib/virtual/core/useItemSize.js +27 -0
- package/lib/virtual/core/useVirtualizer.d.ts +33 -0
- package/lib/virtual/core/useVirtualizer.js +171 -0
- package/lib/virtual/index.d.ts +9 -0
- package/lib/virtual/test-utils/mockResizeObserver.d.ts +15 -0
- package/lib/virtual/types.d.ts +2 -0
- package/lib/virtual/utils/adjustScrollOffsetForRtl.d.ts +7 -0
- package/lib/virtual/utils/adjustScrollOffsetForRtl.js +24 -0
- package/lib/virtual/utils/areArraysEqual.d.ts +1 -0
- package/lib/virtual/utils/assert.d.ts +1 -0
- package/lib/virtual/utils/assert.js +7 -0
- package/lib/virtual/utils/getRTLOffsetType.d.ts +2 -0
- package/lib/virtual/utils/getRTLOffsetType.js +13 -0
- package/lib/virtual/utils/getScrollbarSize.d.ts +2 -0
- package/lib/virtual/utils/getScrollbarSize.js +11 -0
- package/lib/virtual/utils/isRtl.d.ts +1 -0
- package/lib/virtual/utils/isRtl.js +12 -0
- package/lib/virtual/utils/parseNumericStyleValue.d.ts +2 -0
- package/lib/virtual/utils/parseNumericStyleValue.js +15 -0
- package/lib/virtual/utils/shallowCompare.d.ts +1 -0
- package/lib/virtual/utils/shallowCompare.js +14 -0
- package/package.json +8 -3
- package/src/components/container/theme/Container.base.theme.ts +1 -1
- package/src/components/divider/theme/Divider.base.theme.ts +1 -1
- package/src/components/input/Input.vue +1 -2
- package/src/components/select/Select.vue +97 -20
- package/src/components/table/Table.vue +1 -1
- package/src/composables/useVirtualList.ts +1 -1
- package/src/index.ts +1 -0
- package/src/install.ts +9 -3
- package/src/version.ts +1 -1
- package/src/virtual/README.md +285 -0
- package/src/virtual/components/infiniteLoader/InfiniteLoader.test.ts +96 -0
- package/src/virtual/components/infiniteLoader/InfiniteLoader.vue +18 -0
- package/src/virtual/components/virtualGrid/VirtualGrid.vue +322 -0
- package/src/virtual/components/virtualGrid/types.ts +160 -0
- package/src/virtual/components/virtualList/VirtualList.test.ts +164 -0
- package/src/virtual/components/virtualList/VirtualList.vue +227 -0
- package/src/virtual/components/virtualList/isDynamicRowHeight.ts +13 -0
- package/src/virtual/components/virtualList/types.ts +127 -0
- package/src/virtual/components/virtualList/useDynamicRowHeight.test.ts +197 -0
- package/src/virtual/components/virtualList/useDynamicRowHeight.ts +149 -0
- package/src/virtual/composables/infinite-loader/scanForUnloadedIndices.test.ts +141 -0
- package/src/virtual/composables/infinite-loader/scanForUnloadedIndices.ts +82 -0
- package/src/virtual/composables/infinite-loader/types.ts +36 -0
- package/src/virtual/composables/infinite-loader/useInfiniteLoader.test.ts +236 -0
- package/src/virtual/composables/infinite-loader/useInfiniteLoader.ts +88 -0
- package/src/virtual/core/createCachedBounds.ts +72 -0
- package/src/virtual/core/getEstimatedSize.ts +29 -0
- package/src/virtual/core/getOffsetForIndex.ts +90 -0
- package/src/virtual/core/getStartStopIndices.test.ts +45 -0
- package/src/virtual/core/getStartStopIndices.ts +71 -0
- package/src/virtual/core/types.ts +17 -0
- package/src/virtual/core/useCachedBounds.ts +21 -0
- package/src/virtual/core/useIsRtl.ts +25 -0
- package/src/virtual/core/useItemSize.ts +34 -0
- package/src/virtual/core/useVirtualizer.ts +294 -0
- package/src/virtual/index.ts +25 -0
- package/src/virtual/test-utils/mockResizeObserver.ts +162 -0
- package/src/virtual/types.ts +3 -0
- package/src/virtual/utils/adjustScrollOffsetForRtl.ts +37 -0
- package/src/virtual/utils/areArraysEqual.ts +13 -0
- package/src/virtual/utils/assert.ts +10 -0
- package/src/virtual/utils/getRTLOffsetType.ts +51 -0
- package/src/virtual/utils/getScrollbarSize.ts +24 -0
- package/src/virtual/utils/isRtl.ts +13 -0
- package/src/virtual/utils/parseNumericStyleValue.ts +21 -0
- package/src/virtual/utils/shallowCompare.ts +29 -0
- package/volar.d.ts +3 -0
|
@@ -1,37 +1,64 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useEventListener as
|
|
3
|
-
import { useColors as
|
|
4
|
-
import { useCommon as
|
|
5
|
-
import { useInputtable as
|
|
6
|
-
import { useInteractive as
|
|
7
|
-
import { useTheme as
|
|
8
|
-
import { useVirtualList as
|
|
9
|
-
import { checkIcon as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
1
|
+
import { defineComponent as He, mergeModels as ve, computed as O, ref as x, useModel as We, watch as D, nextTick as Z, unref as u, onUnmounted as qe, openBlock as o, createBlock as B, mergeProps as j, toHandlers as me, withCtx as C, createElementVNode as I, createElementBlock as n, normalizeClass as S, Fragment as b, createTextVNode as k, toDisplayString as d, createVNode as M, renderSlot as h, createCommentVNode as y, renderList as X, createSlots as Ue, normalizeStyle as je, withModifiers as Xe, withDirectives as Ke, vModelSelect as Ge } from "vue";
|
|
2
|
+
import { useEventListener as Je, useResizeObserver as Qe } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
|
|
3
|
+
import { useColors as Ye } from "../../composables/useColors.js";
|
|
4
|
+
import { useCommon as ge } from "../../composables/useCommon.js";
|
|
5
|
+
import { useInputtable as ee } from "../../composables/useInputtable.js";
|
|
6
|
+
import { useInteractive as xe } from "../../composables/useInteractive.js";
|
|
7
|
+
import { useTheme as Ze } from "../../composables/useTheme.js";
|
|
8
|
+
import { useVirtualList as el } from "../../composables/useVirtualList.js";
|
|
9
|
+
import { checkIcon as ll, closeIcon as tl, selectIcon as sl } from "../../common/icons.js";
|
|
10
|
+
import il from "../label/Label.vue.js";
|
|
11
|
+
import ye from "../tag/Tag.vue.js";
|
|
12
|
+
import he from "../icon/Icon.vue.js";
|
|
13
|
+
import al from "../menu/MenuItem.vue.js";
|
|
14
|
+
import ol from "../spinner/Spinner.vue.js";
|
|
15
|
+
import be from "../popover/Popover.vue.js";
|
|
16
16
|
import "../popover/Popover.vue2.js";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { useThrottleFn as
|
|
21
|
-
const
|
|
17
|
+
import ke from "../popover/PopoverContainer.vue.js";
|
|
18
|
+
import rl from "../inputFooter/InputFooter.vue.js";
|
|
19
|
+
import nl from "../input/Input.vue.js";
|
|
20
|
+
import { useThrottleFn as ul } from "../../node_modules/.pnpm/@vueuse_shared@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/shared/index.js";
|
|
21
|
+
const fl = { class: "relative" }, dl = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "text-secondary-400 dark:text-secondary-500"
|
|
24
|
-
},
|
|
24
|
+
}, cl = { key: 1 }, pl = {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "flex items-center"
|
|
27
|
+
}, vl = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "mr-2 shrink-0"
|
|
30
|
+
}, ml = { class: "flex-1 truncate" }, yl = {
|
|
31
|
+
key: 1,
|
|
32
|
+
class: "ml-1 shrink-0"
|
|
33
|
+
}, hl = {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: "flex items-center"
|
|
36
|
+
}, bl = {
|
|
37
|
+
key: 0,
|
|
38
|
+
class: "mr-2 shrink-0"
|
|
39
|
+
}, kl = { class: "flex-1 truncate" }, gl = {
|
|
40
|
+
key: 1,
|
|
41
|
+
class: "ml-1 shrink-0"
|
|
42
|
+
}, xl = {
|
|
25
43
|
key: 0,
|
|
26
44
|
class: "text-secondary-400 dark:text-secondary-500"
|
|
27
|
-
},
|
|
45
|
+
}, Cl = { key: 1 }, wl = {
|
|
28
46
|
key: 0,
|
|
29
47
|
class: "p-2 text-center text-secondary-400"
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
48
|
+
}, $l = {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "flex items-center"
|
|
51
|
+
}, Ol = {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: "mr-2 shrink-0"
|
|
54
|
+
}, Sl = { class: "flex-1 truncate" }, Al = {
|
|
55
|
+
key: 1,
|
|
56
|
+
class: "ml-1 shrink-0"
|
|
57
|
+
}, Ll = ["id", "name", "disabled", "multiple", "readonly"], Rl = ["value", "disabled"], Il = {
|
|
58
|
+
...Ye.props("secondary"),
|
|
59
|
+
...ge.props(),
|
|
60
|
+
...xe.props(),
|
|
61
|
+
...ee.props(),
|
|
35
62
|
placeholder: String,
|
|
36
63
|
options: Array,
|
|
37
64
|
multiple: Boolean,
|
|
@@ -45,6 +72,9 @@ const sl = { class: "relative" }, rl = {
|
|
|
45
72
|
type: String,
|
|
46
73
|
default: "Filter by..."
|
|
47
74
|
},
|
|
75
|
+
filterablePrefix: Boolean,
|
|
76
|
+
filterableSuffix: Boolean,
|
|
77
|
+
hideSelectedOptionSlots: Boolean,
|
|
48
78
|
virtualList: Boolean,
|
|
49
79
|
virtualListOffsetTop: Number,
|
|
50
80
|
virtualListOffsetBottom: Number,
|
|
@@ -54,321 +84,333 @@ const sl = { class: "relative" }, rl = {
|
|
|
54
84
|
},
|
|
55
85
|
virtualListOverscan: {
|
|
56
86
|
type: Number,
|
|
57
|
-
default:
|
|
87
|
+
default: 10
|
|
58
88
|
},
|
|
59
89
|
placement: String
|
|
60
|
-
},
|
|
90
|
+
}, Vl = {
|
|
61
91
|
name: "XSelect",
|
|
62
92
|
validators: {
|
|
63
|
-
...
|
|
93
|
+
...ge.validators()
|
|
64
94
|
}
|
|
65
|
-
},
|
|
66
|
-
...
|
|
67
|
-
props: /* @__PURE__ */
|
|
95
|
+
}, Yl = /* @__PURE__ */ He({
|
|
96
|
+
...Vl,
|
|
97
|
+
props: /* @__PURE__ */ ve(Il, {
|
|
68
98
|
filter: { default: "" },
|
|
69
99
|
filterModifiers: {}
|
|
70
100
|
}),
|
|
71
|
-
emits: /* @__PURE__ */
|
|
72
|
-
setup(
|
|
73
|
-
const
|
|
101
|
+
emits: /* @__PURE__ */ ve([...ee.emits(), "close", "open"], ["update:filter"]),
|
|
102
|
+
setup(le, { expose: Ce, emit: we }) {
|
|
103
|
+
const a = le, T = we, m = O(() => a.multiple || a.multipleCheckbox), K = x(null), G = x(null), E = x(null), A = x(null), J = x(null), p = x(), _ = We(le, "filter"), H = x(null), R = O(() => a.disabled || a.loading || a.readonly), $e = O(() => !a.loading && !a.readonly && !a.disabled && a.clearable && !Q(i.value)), i = O({
|
|
74
104
|
get() {
|
|
75
|
-
return
|
|
105
|
+
return m.value ? a.modelValue ? Array.isArray(a.modelValue) ? a.modelValue : [a.modelValue] : [] : a.modelValue;
|
|
76
106
|
},
|
|
77
107
|
set(e) {
|
|
78
|
-
|
|
108
|
+
T("update:modelValue", e);
|
|
109
|
+
}
|
|
110
|
+
}), Oe = O(() => a.options ? new Map(a.options.map((e) => [e.value, e])) : /* @__PURE__ */ new Map()), Se = O(() => a.options ? new Map(a.options.map((e) => [
|
|
111
|
+
e,
|
|
112
|
+
{
|
|
113
|
+
label: e.label.toLowerCase(),
|
|
114
|
+
prefix: a.filterablePrefix && e.prefix ? e.prefix.toLowerCase() : void 0,
|
|
115
|
+
suffix: a.filterableSuffix && e.suffix ? e.suffix.toLowerCase() : void 0
|
|
79
116
|
}
|
|
80
|
-
|
|
81
|
-
|
|
117
|
+
])) : /* @__PURE__ */ new Map());
|
|
118
|
+
function Ae(e, s) {
|
|
119
|
+
var r, t;
|
|
120
|
+
const l = Se.value.get(e);
|
|
121
|
+
return l ? l.label.includes(s) || ((r = l.prefix) == null ? void 0 : r.includes(s)) || ((t = l.suffix) == null ? void 0 : t.includes(s)) : !1;
|
|
122
|
+
}
|
|
123
|
+
const w = O(() => {
|
|
124
|
+
if (!a.options || a.options.length === 0)
|
|
82
125
|
return [];
|
|
83
|
-
const e =
|
|
84
|
-
|
|
85
|
-
),
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
return !t || ((d = r.get(u)) == null ? void 0 : d.includes(e));
|
|
89
|
-
}).map((u) => {
|
|
90
|
-
const d = p.value ? l.has(u.value) : u.value === a;
|
|
126
|
+
const e = _.value.toLowerCase(), s = _.value !== "", l = new Set(
|
|
127
|
+
m.value && Array.isArray(i.value) ? i.value : []
|
|
128
|
+
), r = m.value ? null : i.value;
|
|
129
|
+
return a.options.filter((t) => !s || Ae(t, e)).map((t) => {
|
|
130
|
+
const c = m.value ? l.has(t.value) : t.value === r;
|
|
91
131
|
return {
|
|
92
|
-
value:
|
|
93
|
-
label:
|
|
94
|
-
active:
|
|
95
|
-
prefix:
|
|
96
|
-
suffix:
|
|
97
|
-
disabled:
|
|
98
|
-
iconRight: !
|
|
99
|
-
keepOpenOnClick:
|
|
100
|
-
onClick: () =>
|
|
132
|
+
value: t.value,
|
|
133
|
+
label: t.label,
|
|
134
|
+
active: c,
|
|
135
|
+
prefix: t.prefix,
|
|
136
|
+
suffix: t.suffix,
|
|
137
|
+
disabled: t.disabled,
|
|
138
|
+
iconRight: !a.multipleCheckbox && c ? ll : void 0,
|
|
139
|
+
keepOpenOnClick: t.keepOpenOnClick,
|
|
140
|
+
onClick: () => ae(t.value)
|
|
101
141
|
};
|
|
102
142
|
});
|
|
103
|
-
}),
|
|
104
|
-
|
|
143
|
+
}), te = O(() => w.value.filter((e) => !e.disabled)), { list: se, scrollTo: Le, containerProps: Re, wrapperProps: Ie } = el(
|
|
144
|
+
w,
|
|
105
145
|
{
|
|
106
|
-
disabled: !
|
|
107
|
-
itemHeight:
|
|
108
|
-
topOffset:
|
|
109
|
-
bottomOffset:
|
|
110
|
-
overscan:
|
|
146
|
+
disabled: !a.virtualList,
|
|
147
|
+
itemHeight: a.virtualListItemHeight,
|
|
148
|
+
topOffset: a.virtualListOffsetTop || 0,
|
|
149
|
+
bottomOffset: a.virtualListOffsetBottom || 0,
|
|
150
|
+
overscan: a.virtualListOverscan
|
|
111
151
|
}
|
|
112
|
-
),
|
|
152
|
+
), z = O(() => {
|
|
113
153
|
var e;
|
|
114
|
-
return (e =
|
|
154
|
+
return (e = A.value) == null ? void 0 : e.isOpen;
|
|
115
155
|
});
|
|
116
|
-
D(
|
|
117
|
-
e && (
|
|
118
|
-
}), D(
|
|
119
|
-
e ? (
|
|
156
|
+
D(_, (e) => {
|
|
157
|
+
e && (p.value = void 0, W(-1));
|
|
158
|
+
}), D(z, (e) => {
|
|
159
|
+
e ? (Ve(), (m.value || typeof p.value > "u") && W(-1), setTimeout(() => {
|
|
120
160
|
requestAnimationFrame(() => {
|
|
121
|
-
var
|
|
122
|
-
|
|
161
|
+
var s;
|
|
162
|
+
ie(p.value || 0), a.filterable && ((s = H.value) == null || s.focus());
|
|
123
163
|
});
|
|
124
|
-
}, 50)) : (
|
|
164
|
+
}, 50), T("open")) : (a.filterable && (_.value = ""), T("close"));
|
|
125
165
|
});
|
|
126
|
-
function
|
|
127
|
-
if (
|
|
128
|
-
if (Array.isArray(
|
|
129
|
-
const e =
|
|
130
|
-
e !== -1 && (
|
|
166
|
+
function Ve() {
|
|
167
|
+
if (m.value) {
|
|
168
|
+
if (Array.isArray(i.value) && i.value.length > 0) {
|
|
169
|
+
const e = w.value.findIndex((s) => s.value === i.value[0]);
|
|
170
|
+
e !== -1 && (p.value = e);
|
|
131
171
|
}
|
|
132
172
|
} else {
|
|
133
|
-
const e =
|
|
134
|
-
e !== -1 && (
|
|
173
|
+
const e = w.value.findIndex((s) => s.value === i.value);
|
|
174
|
+
e !== -1 && (p.value = e);
|
|
135
175
|
}
|
|
136
176
|
}
|
|
137
|
-
function
|
|
138
|
-
var
|
|
139
|
-
|
|
177
|
+
function ie(e) {
|
|
178
|
+
var s;
|
|
179
|
+
a.virtualList ? Le(e) : E.value && ((s = E.value[e]) == null || s.$el.scrollIntoView({ block: "nearest", inline: "nearest" }));
|
|
140
180
|
}
|
|
141
|
-
D(
|
|
142
|
-
typeof e < "u" &&
|
|
181
|
+
D(p, (e) => {
|
|
182
|
+
typeof e < "u" && E.value && ie(e);
|
|
143
183
|
});
|
|
144
|
-
function
|
|
145
|
-
if (!
|
|
146
|
-
|
|
184
|
+
function W(e, s = "down") {
|
|
185
|
+
if (!te.value || te.value.length === 0) {
|
|
186
|
+
p.value = void 0;
|
|
147
187
|
return;
|
|
148
188
|
}
|
|
149
|
-
typeof e > "u" && (e =
|
|
150
|
-
const l =
|
|
151
|
-
let
|
|
152
|
-
if (
|
|
153
|
-
let
|
|
154
|
-
for (
|
|
155
|
-
if (++
|
|
156
|
-
|
|
189
|
+
typeof e > "u" && (e = s === "down" ? -1 : 1);
|
|
190
|
+
const l = w.value.length;
|
|
191
|
+
let r = 0;
|
|
192
|
+
if (s === "down") {
|
|
193
|
+
let t = e + 1;
|
|
194
|
+
for (t > l - 1 && (t = 0); w.value[t].disabled; )
|
|
195
|
+
if (++t > l - 1 && (t = 0), ++r >= l) {
|
|
196
|
+
p.value = void 0;
|
|
157
197
|
return;
|
|
158
198
|
}
|
|
159
|
-
|
|
199
|
+
p.value = t;
|
|
160
200
|
} else {
|
|
161
|
-
let
|
|
162
|
-
for (
|
|
163
|
-
if (--
|
|
164
|
-
|
|
201
|
+
let t = e - 1;
|
|
202
|
+
for (t < 0 && (t = l - 1); w.value[t].disabled; )
|
|
203
|
+
if (--t < 0 && (t = l - 1), ++r >= l) {
|
|
204
|
+
p.value = void 0;
|
|
165
205
|
return;
|
|
166
206
|
}
|
|
167
|
-
|
|
207
|
+
p.value = t;
|
|
168
208
|
}
|
|
169
209
|
}
|
|
170
|
-
function
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
t.onClick();
|
|
210
|
+
function ae(e) {
|
|
211
|
+
const s = f(e);
|
|
212
|
+
if (!(!s || s.disabled))
|
|
213
|
+
if (s.onClick)
|
|
214
|
+
s.onClick();
|
|
176
215
|
else {
|
|
177
|
-
if (
|
|
178
|
-
if (Array.isArray(
|
|
179
|
-
const
|
|
180
|
-
|
|
216
|
+
if (m.value) {
|
|
217
|
+
if (Array.isArray(i.value)) {
|
|
218
|
+
const l = i.value.indexOf(e);
|
|
219
|
+
l !== -1 ? i.value.splice(l, 1) : i.value.push(e);
|
|
181
220
|
} else
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
var
|
|
185
|
-
(
|
|
221
|
+
i.value = [e];
|
|
222
|
+
T("update:modelValue", i.value), a.filterable && setTimeout(() => {
|
|
223
|
+
var l;
|
|
224
|
+
(l = H.value) == null || l.focus();
|
|
186
225
|
});
|
|
187
226
|
} else
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
var
|
|
191
|
-
|
|
227
|
+
i.value = e;
|
|
228
|
+
a.native || Z(() => {
|
|
229
|
+
var l;
|
|
230
|
+
fe(), (l = G.value) == null || l.$el.focus();
|
|
192
231
|
});
|
|
193
232
|
}
|
|
194
233
|
}
|
|
195
|
-
function
|
|
234
|
+
function Q(e) {
|
|
196
235
|
return !!(typeof e > "u" || e === null || e === "" || Array.isArray(e) && e.length === 0 || !Array.isArray(e) && typeof e == "object" && Object.keys(e).length === 0);
|
|
197
236
|
}
|
|
198
|
-
function oe(e,
|
|
199
|
-
if (e.stopPropagation(),
|
|
237
|
+
function oe(e, s) {
|
|
238
|
+
if (e.stopPropagation(), R.value || !Array.isArray(i.value))
|
|
200
239
|
return;
|
|
201
|
-
const l =
|
|
202
|
-
l !== -1 && (
|
|
240
|
+
const l = i.value.indexOf(s);
|
|
241
|
+
l !== -1 && (i.value.splice(l, 1), T("update:modelValue", i.value));
|
|
242
|
+
}
|
|
243
|
+
function f(e) {
|
|
244
|
+
if (!Array.isArray(e))
|
|
245
|
+
return Oe.value.get(e);
|
|
203
246
|
}
|
|
204
|
-
function
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
return t ? t.label : "";
|
|
247
|
+
function L(e) {
|
|
248
|
+
const s = f(e);
|
|
249
|
+
return s ? s.label : "";
|
|
208
250
|
}
|
|
209
|
-
const { focus:
|
|
210
|
-
errorInternal:
|
|
211
|
-
hideFooterInternal:
|
|
212
|
-
inputListeners:
|
|
213
|
-
reset:
|
|
214
|
-
validate:
|
|
215
|
-
setError:
|
|
216
|
-
isFocused:
|
|
217
|
-
isInsideForm:
|
|
218
|
-
} =
|
|
219
|
-
const { focus: e, blur:
|
|
251
|
+
const { focus: re, blur: Be } = xe(K), {
|
|
252
|
+
errorInternal: ne,
|
|
253
|
+
hideFooterInternal: Te,
|
|
254
|
+
inputListeners: ue,
|
|
255
|
+
reset: Y,
|
|
256
|
+
validate: fe,
|
|
257
|
+
setError: _e,
|
|
258
|
+
isFocused: ze,
|
|
259
|
+
isInsideForm: Me
|
|
260
|
+
} = ee(a, { focus: re, emit: T, withListeners: !0 }), Ne = O(() => {
|
|
261
|
+
const { focus: e, blur: s } = u(ue);
|
|
220
262
|
return {
|
|
221
263
|
focus: e,
|
|
222
|
-
blur:
|
|
264
|
+
blur: s
|
|
223
265
|
};
|
|
224
266
|
});
|
|
225
|
-
let
|
|
226
|
-
D([
|
|
227
|
-
e ||
|
|
267
|
+
let V = null;
|
|
268
|
+
D([ze, z], ([e, s]) => {
|
|
269
|
+
e || s ? V || (V = Je(document, "keydown", Pe)) : V && (V(), V = null);
|
|
228
270
|
}, {
|
|
229
271
|
immediate: !0
|
|
230
|
-
}),
|
|
231
|
-
|
|
272
|
+
}), qe(() => {
|
|
273
|
+
V && V();
|
|
232
274
|
});
|
|
233
|
-
function
|
|
234
|
-
var
|
|
235
|
-
if (
|
|
275
|
+
function Pe(e) {
|
|
276
|
+
var s, l, r, t, c;
|
|
277
|
+
if (w.value.length !== 0)
|
|
236
278
|
if (e.code === "ArrowDown") {
|
|
237
|
-
if (e.preventDefault(), !
|
|
238
|
-
(
|
|
279
|
+
if (e.preventDefault(), !z.value) {
|
|
280
|
+
(s = A.value) == null || s.show();
|
|
239
281
|
return;
|
|
240
282
|
}
|
|
241
|
-
|
|
283
|
+
W(p.value, "down");
|
|
242
284
|
} else if (e.code === "ArrowUp") {
|
|
243
|
-
if (e.preventDefault(), !
|
|
244
|
-
(l =
|
|
285
|
+
if (e.preventDefault(), !z.value) {
|
|
286
|
+
(l = A.value) == null || l.show();
|
|
245
287
|
return;
|
|
246
288
|
}
|
|
247
|
-
|
|
289
|
+
W(p.value, "up");
|
|
248
290
|
} else if (e.code === "Enter" || e.code === "Space") {
|
|
249
|
-
if (e.code === "Space" &&
|
|
291
|
+
if (e.code === "Space" && a.filterable)
|
|
250
292
|
return;
|
|
251
|
-
if (e.preventDefault(), e.stopPropagation(), !
|
|
252
|
-
(
|
|
293
|
+
if (e.preventDefault(), e.stopPropagation(), !z.value) {
|
|
294
|
+
(r = A.value) == null || r.show();
|
|
253
295
|
return;
|
|
254
296
|
}
|
|
255
|
-
if (typeof
|
|
256
|
-
const
|
|
257
|
-
|
|
297
|
+
if (typeof p.value < "u" && w.value[p.value]) {
|
|
298
|
+
const v = w.value[p.value];
|
|
299
|
+
ae(v.value), !v.keepOpenOnClick && (!m.value || a.multipleCheckbox) && ((t = A.value) == null || t.hide());
|
|
258
300
|
}
|
|
259
301
|
} else
|
|
260
|
-
e.code === "Tab" &&
|
|
261
|
-
var
|
|
262
|
-
(
|
|
302
|
+
e.code === "Tab" && z.value && (e.preventDefault(), (c = A.value) == null || c.hide(), a.native || Z(() => {
|
|
303
|
+
var v;
|
|
304
|
+
(v = G.value) == null || v.$el.focus();
|
|
263
305
|
}));
|
|
264
306
|
}
|
|
265
|
-
const N =
|
|
266
|
-
|
|
267
|
-
const e =
|
|
268
|
-
e <
|
|
307
|
+
const N = x(null), de = x(null), q = x(!1), U = x(0), ce = ul(() => {
|
|
308
|
+
m.value && a.truncate && Z(() => {
|
|
309
|
+
const e = Fe();
|
|
310
|
+
e < i.value.length ? (q.value = !0, U.value = i.value.length - e) : (q.value = !1, U.value = 0);
|
|
269
311
|
});
|
|
270
312
|
}, 100, !0);
|
|
271
|
-
|
|
272
|
-
|
|
313
|
+
Qe(N, () => {
|
|
314
|
+
ce();
|
|
273
315
|
});
|
|
274
|
-
function
|
|
316
|
+
function Fe() {
|
|
275
317
|
if (!N.value)
|
|
276
318
|
return 0;
|
|
277
|
-
const e = N.value.querySelectorAll(".x-tag"),
|
|
278
|
-
let l = 0,
|
|
279
|
-
const
|
|
280
|
-
for (let
|
|
281
|
-
const
|
|
282
|
-
|
|
319
|
+
const e = N.value.querySelectorAll(".x-tag"), s = Array.from(e);
|
|
320
|
+
let l = 0, r = 1;
|
|
321
|
+
const t = N.value.offsetWidth - 30;
|
|
322
|
+
for (let c = 0; c < s.length; c++) {
|
|
323
|
+
const v = s[c];
|
|
324
|
+
v.style.display = "flex", l += v.offsetWidth, c > 0 && (l < t ? r++ : v.style.display = "none");
|
|
283
325
|
}
|
|
284
|
-
return
|
|
326
|
+
return r;
|
|
285
327
|
}
|
|
286
|
-
D(
|
|
287
|
-
|
|
328
|
+
D(i, (e) => {
|
|
329
|
+
ce();
|
|
288
330
|
}, { immediate: !0, deep: !0 });
|
|
289
|
-
const { styles:
|
|
290
|
-
return
|
|
331
|
+
const { styles: De, classes: g, className: Ee } = Ze("Select", {}, a, { errorInternal: ne });
|
|
332
|
+
return Ce({ focus: re, blur: Be, reset: Y, validate: fe, setError: _e, filterRef: H }), (e, s) => (o(), B(il, j({
|
|
291
333
|
ref_key: "labelRef",
|
|
292
|
-
ref:
|
|
334
|
+
ref: G,
|
|
293
335
|
tabindex: "0",
|
|
294
336
|
class: ["group", [
|
|
295
|
-
|
|
296
|
-
|
|
337
|
+
u(Ee),
|
|
338
|
+
u(g).wrapper
|
|
297
339
|
]],
|
|
298
|
-
style:
|
|
299
|
-
disabled:
|
|
340
|
+
style: u(De),
|
|
341
|
+
disabled: R.value,
|
|
300
342
|
required: e.required,
|
|
301
|
-
"is-inside-form":
|
|
343
|
+
"is-inside-form": u(Me),
|
|
302
344
|
label: e.label,
|
|
303
345
|
tooltip: e.tooltip
|
|
304
|
-
},
|
|
305
|
-
default:
|
|
306
|
-
|
|
307
|
-
e.native && !
|
|
346
|
+
}, me(Ne.value)), {
|
|
347
|
+
default: C(() => [
|
|
348
|
+
I("div", fl, [
|
|
349
|
+
e.native && !m.value ? (o(), n("div", {
|
|
308
350
|
key: 0,
|
|
309
|
-
class:
|
|
310
|
-
onClick:
|
|
311
|
-
var
|
|
312
|
-
return (
|
|
351
|
+
class: S(u(g).box),
|
|
352
|
+
onClick: s[0] || (s[0] = (l) => {
|
|
353
|
+
var r;
|
|
354
|
+
return (r = K.value) == null ? void 0 : r.click();
|
|
313
355
|
})
|
|
314
356
|
}, [
|
|
315
|
-
|
|
316
|
-
e.placeholder ? (
|
|
317
|
-
], 64)) : (
|
|
318
|
-
|
|
357
|
+
Q(i.value) ? (o(), n(b, { key: 1 }, [
|
|
358
|
+
e.placeholder ? (o(), n("div", dl, d(e.placeholder), 1)) : (o(), n("div", cl, " "))
|
|
359
|
+
], 64)) : (o(), n(b, { key: 0 }, [
|
|
360
|
+
k(d(L(i.value)), 1)
|
|
319
361
|
], 64))
|
|
320
|
-
], 2)) : (
|
|
321
|
-
|
|
362
|
+
], 2)) : (o(), n(b, { key: 1 }, [
|
|
363
|
+
M(be, {
|
|
322
364
|
ref_key: "popoverRef",
|
|
323
|
-
ref:
|
|
324
|
-
disabled:
|
|
365
|
+
ref: A,
|
|
366
|
+
disabled: R.value,
|
|
325
367
|
placement: e.placement
|
|
326
368
|
}, {
|
|
327
|
-
content:
|
|
328
|
-
|
|
329
|
-
class:
|
|
369
|
+
content: C(() => [
|
|
370
|
+
M(ke, {
|
|
371
|
+
class: S(u(g).content)
|
|
330
372
|
}, {
|
|
331
|
-
default:
|
|
332
|
-
|
|
333
|
-
e.filterable ? (
|
|
373
|
+
default: C(() => [
|
|
374
|
+
h(e.$slots, "content-header", {}, () => [
|
|
375
|
+
e.filterable ? (o(), n("div", {
|
|
334
376
|
key: 0,
|
|
335
|
-
class:
|
|
377
|
+
class: S(u(g).search)
|
|
336
378
|
}, [
|
|
337
|
-
|
|
379
|
+
M(nl, {
|
|
338
380
|
ref_key: "filterRef",
|
|
339
|
-
ref:
|
|
340
|
-
modelValue:
|
|
341
|
-
"onUpdate:modelValue":
|
|
381
|
+
ref: H,
|
|
382
|
+
modelValue: _.value,
|
|
383
|
+
"onUpdate:modelValue": s[2] || (s[2] = (l) => _.value = l),
|
|
342
384
|
placeholder: e.filterPlaceholder,
|
|
343
385
|
"skip-form-registry": "",
|
|
344
386
|
"data-1p-ignore": "",
|
|
345
387
|
size: "sm"
|
|
346
388
|
}, null, 8, ["modelValue", "placeholder"])
|
|
347
|
-
], 2)) :
|
|
389
|
+
], 2)) : y("", !0)
|
|
348
390
|
]),
|
|
349
|
-
|
|
350
|
-
class:
|
|
391
|
+
I("div", j(u(Re), {
|
|
392
|
+
class: u(g).contentBody
|
|
351
393
|
}), [
|
|
352
|
-
|
|
353
|
-
(
|
|
394
|
+
I("div", j(u(Ie), { class: "space-y-0.5" }), [
|
|
395
|
+
(o(!0), n(b, null, X(u(se), (l) => (o(), B(al, {
|
|
354
396
|
key: l.index,
|
|
355
397
|
ref_for: !0,
|
|
356
398
|
ref_key: "itemsRef",
|
|
357
|
-
ref:
|
|
399
|
+
ref: E,
|
|
358
400
|
item: l.data,
|
|
359
401
|
size: e.size,
|
|
360
402
|
disabled: l.data.disabled,
|
|
361
|
-
selected: l.index ===
|
|
403
|
+
selected: l.index === p.value,
|
|
362
404
|
checkbox: e.multipleCheckbox && !l.data.keepOpenOnClick,
|
|
363
405
|
color: e.color,
|
|
364
406
|
filled: "",
|
|
365
407
|
onClick: () => {
|
|
366
|
-
var
|
|
367
|
-
return !l.data.keepOpenOnClick && (!
|
|
408
|
+
var r;
|
|
409
|
+
return !l.data.keepOpenOnClick && (!m.value || e.multipleCheckbox) && ((r = A.value) == null ? void 0 : r.hide());
|
|
368
410
|
}
|
|
369
|
-
},
|
|
370
|
-
default:
|
|
371
|
-
|
|
411
|
+
}, Ue({
|
|
412
|
+
default: C(() => [
|
|
413
|
+
h(e.$slots, "label", {
|
|
372
414
|
item: l.data
|
|
373
415
|
})
|
|
374
416
|
]),
|
|
@@ -376,102 +418,148 @@ const sl = { class: "relative" }, rl = {
|
|
|
376
418
|
}, [
|
|
377
419
|
e.$slots.prefix || l.data.prefix ? {
|
|
378
420
|
name: "prefix",
|
|
379
|
-
fn:
|
|
380
|
-
|
|
421
|
+
fn: C(() => [
|
|
422
|
+
h(e.$slots, "prefix", {
|
|
381
423
|
item: l.data
|
|
382
424
|
}, () => [
|
|
383
|
-
|
|
425
|
+
k(d(l.data.prefix), 1)
|
|
384
426
|
])
|
|
385
427
|
]),
|
|
386
428
|
key: "0"
|
|
387
429
|
} : void 0,
|
|
388
430
|
e.$slots.suffix || l.data.suffix ? {
|
|
389
431
|
name: "suffix",
|
|
390
|
-
fn:
|
|
391
|
-
|
|
432
|
+
fn: C(() => [
|
|
433
|
+
h(e.$slots, "suffix", {
|
|
392
434
|
item: l.data
|
|
393
435
|
}, () => [
|
|
394
|
-
|
|
436
|
+
k(d(l.data.suffix), 1)
|
|
395
437
|
])
|
|
396
438
|
]),
|
|
397
439
|
key: "1"
|
|
398
440
|
} : void 0
|
|
399
441
|
]), 1032, ["item", "size", "disabled", "selected", "checkbox", "color", "onClick"]))), 128))
|
|
400
442
|
], 16),
|
|
401
|
-
|
|
443
|
+
u(se).length === 0 ? (o(), n("div", wl, " No options ")) : y("", !0)
|
|
402
444
|
], 16),
|
|
403
|
-
|
|
445
|
+
h(e.$slots, "content-footer")
|
|
404
446
|
]),
|
|
405
447
|
_: 3
|
|
406
448
|
}, 8, ["class"])
|
|
407
449
|
]),
|
|
408
|
-
default:
|
|
409
|
-
|
|
410
|
-
popover:
|
|
411
|
-
selected:
|
|
412
|
-
disabled:
|
|
413
|
-
label:
|
|
414
|
-
}, () =>
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
key: 0,
|
|
420
|
-
ref_key: "tagsRef",
|
|
421
|
-
ref: N,
|
|
422
|
-
class: k(["flex gap-1 relative", {
|
|
423
|
-
"flex-wrap": !e.truncate,
|
|
424
|
-
"overflow-hidden": e.truncate
|
|
425
|
-
}])
|
|
450
|
+
default: C(() => [
|
|
451
|
+
h(e.$slots, "input", {
|
|
452
|
+
popover: A.value,
|
|
453
|
+
selected: i.value,
|
|
454
|
+
disabled: R.value,
|
|
455
|
+
label: L(i.value)
|
|
456
|
+
}, () => {
|
|
457
|
+
var l, r;
|
|
458
|
+
return [
|
|
459
|
+
I("div", {
|
|
460
|
+
class: S([u(g).box])
|
|
426
461
|
}, [
|
|
427
|
-
(
|
|
428
|
-
var r, u, d, M;
|
|
429
|
-
return s(), x(pe, {
|
|
430
|
-
key: l,
|
|
431
|
-
size: "xs",
|
|
432
|
-
removable: "",
|
|
433
|
-
outlined: !(A.value || (u = (r = e.options) == null ? void 0 : r.find((v) => v.value === l)) != null && u.disabled),
|
|
434
|
-
disabled: A.value || ((M = (d = e.options) == null ? void 0 : d.find((v) => v.value === l)) == null ? void 0 : M.disabled),
|
|
435
|
-
style: We({ "max-width": a === 0 && G.value ? `calc(100% - ${G.value.offsetWidth + 6 + "px"})` : void 0 }),
|
|
436
|
-
onRemove: (v) => {
|
|
437
|
-
oe(v, l);
|
|
438
|
-
}
|
|
439
|
-
}, {
|
|
440
|
-
prefix: m(() => {
|
|
441
|
-
var v;
|
|
442
|
-
return [
|
|
443
|
-
$(e.$slots, "tag-prefix", {
|
|
444
|
-
item: (v = e.options) == null ? void 0 : v.find((Y) => Y.value === l)
|
|
445
|
-
})
|
|
446
|
-
];
|
|
447
|
-
}),
|
|
448
|
-
default: m(() => [
|
|
449
|
-
S(" " + g(T(l)), 1)
|
|
450
|
-
]),
|
|
451
|
-
_: 2
|
|
452
|
-
}, 1032, ["outlined", "disabled", "style", "onRemove"]);
|
|
453
|
-
}), 128)),
|
|
454
|
-
W.value ? (s(), f("div", {
|
|
462
|
+
m.value && Array.isArray(i.value) && i.value.length > 0 ? (o(), n("div", {
|
|
455
463
|
key: 0,
|
|
456
|
-
ref_key: "
|
|
457
|
-
ref:
|
|
458
|
-
class:
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
464
|
+
ref_key: "tagsRef",
|
|
465
|
+
ref: N,
|
|
466
|
+
class: S(["flex gap-1 relative", {
|
|
467
|
+
"flex-wrap": !e.truncate,
|
|
468
|
+
"overflow-hidden": e.truncate
|
|
469
|
+
}])
|
|
470
|
+
}, [
|
|
471
|
+
(o(!0), n(b, null, X(i.value, (t, c) => {
|
|
472
|
+
var v, P;
|
|
473
|
+
return o(), B(ye, {
|
|
474
|
+
key: t,
|
|
475
|
+
size: "xs",
|
|
476
|
+
removable: "",
|
|
477
|
+
outlined: !(R.value || (v = f(t)) != null && v.disabled),
|
|
478
|
+
disabled: R.value || ((P = f(t)) == null ? void 0 : P.disabled),
|
|
479
|
+
style: je({ "max-width": c === 0 && J.value ? `calc(100% - ${J.value.offsetWidth + 6 + "px"})` : void 0 }),
|
|
480
|
+
onRemove: ($) => {
|
|
481
|
+
oe($, t);
|
|
482
|
+
}
|
|
483
|
+
}, {
|
|
484
|
+
default: C(() => {
|
|
485
|
+
var $, pe;
|
|
486
|
+
return [
|
|
487
|
+
e.hideSelectedOptionSlots ? (o(), n(b, { key: 1 }, [
|
|
488
|
+
k(d(L(t)), 1)
|
|
489
|
+
], 64)) : (o(), n("div", pl, [
|
|
490
|
+
e.$slots.prefix || ($ = f(t)) != null && $.prefix ? (o(), n("span", vl, [
|
|
491
|
+
h(e.$slots, "prefix", {
|
|
492
|
+
item: f(t)
|
|
493
|
+
}, () => {
|
|
494
|
+
var F;
|
|
495
|
+
return [
|
|
496
|
+
k(d((F = f(t)) == null ? void 0 : F.prefix), 1)
|
|
497
|
+
];
|
|
498
|
+
})
|
|
499
|
+
])) : y("", !0),
|
|
500
|
+
I("span", ml, d(L(t)), 1),
|
|
501
|
+
e.$slots.suffix || (pe = f(t)) != null && pe.suffix ? (o(), n("span", yl, [
|
|
502
|
+
h(e.$slots, "suffix", {
|
|
503
|
+
item: f(t)
|
|
504
|
+
}, () => {
|
|
505
|
+
var F;
|
|
506
|
+
return [
|
|
507
|
+
k(d((F = f(t)) == null ? void 0 : F.suffix), 1)
|
|
508
|
+
];
|
|
509
|
+
})
|
|
510
|
+
])) : y("", !0)
|
|
511
|
+
]))
|
|
512
|
+
];
|
|
513
|
+
}),
|
|
514
|
+
_: 2
|
|
515
|
+
}, 1032, ["outlined", "disabled", "style", "onRemove"]);
|
|
516
|
+
}), 128)),
|
|
517
|
+
q.value ? (o(), n("div", {
|
|
518
|
+
key: 0,
|
|
519
|
+
ref_key: "hiddenTagsCounterRef",
|
|
520
|
+
ref: J,
|
|
521
|
+
class: S(u(g).truncateCounter),
|
|
522
|
+
onClick: s[1] || (s[1] = Xe((t) => {
|
|
523
|
+
var c;
|
|
524
|
+
return (c = de.value) == null ? void 0 : c.toggle();
|
|
525
|
+
}, ["stop"]))
|
|
526
|
+
}, "+" + d(U.value), 3)) : y("", !0)
|
|
527
|
+
], 2)) : !m.value && !Q(i.value) && L(i.value) !== "" ? (o(), n(b, { key: 1 }, [
|
|
528
|
+
e.hideSelectedOptionSlots ? (o(), n(b, { key: 1 }, [
|
|
529
|
+
k(d(L(i.value)), 1)
|
|
530
|
+
], 64)) : (o(), n("div", hl, [
|
|
531
|
+
e.$slots.prefix || (l = f(i.value)) != null && l.prefix ? (o(), n("span", bl, [
|
|
532
|
+
h(e.$slots, "prefix", {
|
|
533
|
+
item: f(i.value)
|
|
534
|
+
}, () => {
|
|
535
|
+
var t;
|
|
536
|
+
return [
|
|
537
|
+
k(d((t = f(i.value)) == null ? void 0 : t.prefix), 1)
|
|
538
|
+
];
|
|
539
|
+
})
|
|
540
|
+
])) : y("", !0),
|
|
541
|
+
I("span", kl, d(L(i.value)), 1),
|
|
542
|
+
e.$slots.suffix || (r = f(i.value)) != null && r.suffix ? (o(), n("span", gl, [
|
|
543
|
+
h(e.$slots, "suffix", {
|
|
544
|
+
item: f(i.value)
|
|
545
|
+
}, () => {
|
|
546
|
+
var t;
|
|
547
|
+
return [
|
|
548
|
+
k(d((t = f(i.value)) == null ? void 0 : t.suffix), 1)
|
|
549
|
+
];
|
|
550
|
+
})
|
|
551
|
+
])) : y("", !0)
|
|
552
|
+
]))
|
|
553
|
+
], 64)) : (o(), n(b, { key: 2 }, [
|
|
554
|
+
e.placeholder ? (o(), n("div", xl, d(e.placeholder), 1)) : (o(), n("div", Cl, " "))
|
|
555
|
+
], 64))
|
|
556
|
+
], 2)
|
|
557
|
+
];
|
|
558
|
+
})
|
|
471
559
|
]),
|
|
472
560
|
_: 3
|
|
473
561
|
}, 8, ["disabled", "placement"]),
|
|
474
|
-
|
|
562
|
+
m.value && e.truncate && q.value ? (o(), B(be, {
|
|
475
563
|
key: 0,
|
|
476
564
|
ref_key: "multipleHiddenRef",
|
|
477
565
|
ref: de,
|
|
@@ -480,34 +568,53 @@ const sl = { class: "relative" }, rl = {
|
|
|
480
568
|
class: "inline-block !absolute right-0",
|
|
481
569
|
placement: "auto-start"
|
|
482
570
|
}, {
|
|
483
|
-
content:
|
|
484
|
-
|
|
485
|
-
default:
|
|
571
|
+
content: C(() => [
|
|
572
|
+
M(ke, { class: "p-2 flex gap-2 flex-wrap" }, {
|
|
573
|
+
default: C(() => {
|
|
486
574
|
var l;
|
|
487
575
|
return [
|
|
488
|
-
(
|
|
489
|
-
var
|
|
490
|
-
return
|
|
491
|
-
key:
|
|
576
|
+
(o(!0), n(b, null, X((l = i.value) == null ? void 0 : l.slice(i.value.length - U.value), (r) => {
|
|
577
|
+
var t, c;
|
|
578
|
+
return o(), B(ye, {
|
|
579
|
+
key: r,
|
|
492
580
|
size: "xs",
|
|
493
581
|
removable: "",
|
|
494
|
-
outlined: !(
|
|
495
|
-
disabled:
|
|
582
|
+
outlined: !(R.value || (t = f(r)) != null && t.disabled),
|
|
583
|
+
disabled: R.value || ((c = f(r)) == null ? void 0 : c.disabled),
|
|
496
584
|
onRemove: (v) => {
|
|
497
|
-
oe(v,
|
|
585
|
+
oe(v, r);
|
|
498
586
|
}
|
|
499
587
|
}, {
|
|
500
|
-
|
|
501
|
-
var v;
|
|
588
|
+
default: C(() => {
|
|
589
|
+
var v, P;
|
|
502
590
|
return [
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
591
|
+
e.hideSelectedOptionSlots ? (o(), n(b, { key: 1 }, [
|
|
592
|
+
k(d(L(r)), 1)
|
|
593
|
+
], 64)) : (o(), n("div", $l, [
|
|
594
|
+
e.$slots.prefix || (v = f(r)) != null && v.prefix ? (o(), n("span", Ol, [
|
|
595
|
+
h(e.$slots, "prefix", {
|
|
596
|
+
item: f(r)
|
|
597
|
+
}, () => {
|
|
598
|
+
var $;
|
|
599
|
+
return [
|
|
600
|
+
k(d(($ = f(r)) == null ? void 0 : $.prefix), 1)
|
|
601
|
+
];
|
|
602
|
+
})
|
|
603
|
+
])) : y("", !0),
|
|
604
|
+
I("span", Sl, d(L(r)), 1),
|
|
605
|
+
e.$slots.suffix || (P = f(r)) != null && P.suffix ? (o(), n("span", Al, [
|
|
606
|
+
h(e.$slots, "suffix", {
|
|
607
|
+
item: f(r)
|
|
608
|
+
}, () => {
|
|
609
|
+
var $;
|
|
610
|
+
return [
|
|
611
|
+
k(d(($ = f(r)) == null ? void 0 : $.suffix), 1)
|
|
612
|
+
];
|
|
613
|
+
})
|
|
614
|
+
])) : y("", !0)
|
|
615
|
+
]))
|
|
506
616
|
];
|
|
507
617
|
}),
|
|
508
|
-
default: m(() => [
|
|
509
|
-
S(" " + g(T(a)), 1)
|
|
510
|
-
]),
|
|
511
618
|
_: 2
|
|
512
619
|
}, 1032, ["outlined", "disabled", "onRemove"]);
|
|
513
620
|
}), 128))
|
|
@@ -517,59 +624,59 @@ const sl = { class: "relative" }, rl = {
|
|
|
517
624
|
})
|
|
518
625
|
]),
|
|
519
626
|
_: 3
|
|
520
|
-
}, 512)) :
|
|
627
|
+
}, 512)) : y("", !0)
|
|
521
628
|
], 64)),
|
|
522
|
-
|
|
629
|
+
Ke(I("select", j({
|
|
523
630
|
id: e.id,
|
|
524
631
|
ref_key: "elRef",
|
|
525
|
-
ref:
|
|
526
|
-
"onUpdate:modelValue":
|
|
632
|
+
ref: K,
|
|
633
|
+
"onUpdate:modelValue": s[3] || (s[3] = (l) => i.value = l),
|
|
527
634
|
tabindex: "-1",
|
|
528
|
-
class: e.native && !
|
|
635
|
+
class: e.native && !m.value ? "absolute inset-0 w-full h-full cursor-pointer opacity-0" : "hidden",
|
|
529
636
|
name: e.name,
|
|
530
637
|
disabled: e.disabled || e.loading,
|
|
531
|
-
multiple:
|
|
638
|
+
multiple: m.value,
|
|
532
639
|
readonly: e.readonly
|
|
533
|
-
},
|
|
534
|
-
e.native ? (
|
|
535
|
-
key:
|
|
640
|
+
}, me(u(ue), !0)), [
|
|
641
|
+
e.native ? (o(!0), n(b, { key: 0 }, X(e.options, (l, r) => (o(), n("option", {
|
|
642
|
+
key: r,
|
|
536
643
|
value: l.value,
|
|
537
644
|
disabled: l.disabled
|
|
538
|
-
},
|
|
539
|
-
], 16,
|
|
540
|
-
[
|
|
645
|
+
}, d(l.label), 9, Rl))), 128)) : y("", !0)
|
|
646
|
+
], 16, Ll), [
|
|
647
|
+
[Ge, i.value]
|
|
541
648
|
]),
|
|
542
|
-
|
|
649
|
+
$e.value ? (o(), n("button", {
|
|
543
650
|
key: 2,
|
|
544
651
|
type: "button",
|
|
545
652
|
"aria-label": "Clean value",
|
|
546
|
-
class:
|
|
547
|
-
onClick:
|
|
548
|
-
(...l) =>
|
|
653
|
+
class: S(u(g).clearButton),
|
|
654
|
+
onClick: s[4] || (s[4] = //@ts-ignore
|
|
655
|
+
(...l) => u(Y) && u(Y)(...l))
|
|
549
656
|
}, [
|
|
550
|
-
|
|
551
|
-
icon:
|
|
552
|
-
class:
|
|
657
|
+
M(he, {
|
|
658
|
+
icon: u(tl),
|
|
659
|
+
class: S([u(g).icon, "cursor-pointer"])
|
|
553
660
|
}, null, 8, ["icon", "class"])
|
|
554
|
-
], 2)) :
|
|
555
|
-
e.$slots.input ?
|
|
661
|
+
], 2)) : y("", !0),
|
|
662
|
+
e.$slots.input ? y("", !0) : (o(), n("div", {
|
|
556
663
|
key: 3,
|
|
557
|
-
class:
|
|
664
|
+
class: S(u(g).iconWrapper)
|
|
558
665
|
}, [
|
|
559
|
-
e.loading ? (
|
|
666
|
+
e.loading ? (o(), B(ol, {
|
|
560
667
|
key: 0,
|
|
561
668
|
size: e.size
|
|
562
|
-
}, null, 8, ["size"])) :
|
|
563
|
-
|
|
564
|
-
icon:
|
|
565
|
-
class:
|
|
669
|
+
}, null, 8, ["size"])) : h(e.$slots, "icon", { key: 1 }, () => [
|
|
670
|
+
M(he, {
|
|
671
|
+
icon: u(sl),
|
|
672
|
+
class: S(u(g).icon)
|
|
566
673
|
}, null, 8, ["icon", "class"])
|
|
567
674
|
])
|
|
568
675
|
], 2))
|
|
569
676
|
]),
|
|
570
|
-
|
|
677
|
+
u(Te) ? y("", !0) : (o(), B(rl, {
|
|
571
678
|
key: 0,
|
|
572
|
-
error:
|
|
679
|
+
error: u(ne),
|
|
573
680
|
helper: e.helper
|
|
574
681
|
}, null, 8, ["error", "helper"]))
|
|
575
682
|
]),
|
|
@@ -578,5 +685,5 @@ const sl = { class: "relative" }, rl = {
|
|
|
578
685
|
}
|
|
579
686
|
});
|
|
580
687
|
export {
|
|
581
|
-
|
|
688
|
+
Yl as default
|
|
582
689
|
};
|