@wirecore/wirelayer-vue 0.7.0 → 0.9.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/dist/{Checkbox-D175nhKK.js → Checkbox-DS2qfQK1.js} +2 -8
- package/dist/ContextMenu-CBE9YnDW.js +2321 -0
- package/dist/{Field-B1EsNF84.js → Field-Cqe2BG_x.js} +1 -1
- package/dist/Input-C5dyvZfJ.js +183 -0
- package/dist/{InputStatus-D7kBGlew.js → InputStatus-Cgarj-yu.js} +16 -3
- package/dist/{Select-Bd2Vpr7G.js → Select-q8FUIWLi.js} +141 -124
- package/dist/Tree-B-0NXpUq.js +839 -0
- package/dist/components/Alert/Alert.vue.d.ts +5 -3
- package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.vue.d.ts +2 -0
- package/dist/components/Avatar/Avatar.vue.d.ts.map +1 -1
- package/dist/components/Card/Card.vue.d.ts +2 -0
- package/dist/components/Card/Card.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.vue.d.ts +26 -23
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/Code/Code.vue.d.ts +21 -0
- package/dist/components/Code/Code.vue.d.ts.map +1 -0
- package/dist/components/Combobox/Combobox.vue.d.ts +9 -1
- package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.vue.d.ts +1 -1
- package/dist/components/ContextMenu/ContextMenu.vue.d.ts +18 -2
- package/dist/components/ContextMenu/ContextMenu.vue.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.vue.d.ts +1 -1
- package/dist/components/Dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/components/Dialog/DialogContent.vue.d.ts +12 -1
- package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
- package/dist/components/Dialog/context.d.ts +3 -1
- package/dist/components/Dialog/context.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.vue.d.ts +1 -1
- package/dist/components/Fieldset/Fieldset.vue.d.ts +1 -1
- package/dist/components/FilterPanel/FilterPanel.vue.d.ts +1 -1
- package/dist/components/HoverCard/HoverCard.vue.d.ts +1 -1
- package/dist/components/Input/Input.vue.d.ts +3 -1
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/MaskInput/MaskInput.vue.d.ts +2 -1
- package/dist/components/MaskInput/MaskInput.vue.d.ts.map +1 -1
- package/dist/components/Menu/Menu.vue.d.ts +9 -1
- package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
- package/dist/components/Menu/state.d.ts +22 -0
- package/dist/components/Menu/state.d.ts.map +1 -1
- package/dist/components/NativeSelect/NativeSelect.vue.d.ts +31 -19
- package/dist/components/NativeSelect/NativeSelect.vue.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.vue.d.ts +27 -20
- package/dist/components/NumberInput/NumberInput.vue.d.ts.map +1 -1
- package/dist/components/Panel/Panel.vue.d.ts +1 -1
- package/dist/components/PasswordInput/PasswordInput.vue.d.ts +9 -3
- package/dist/components/PasswordInput/PasswordInput.vue.d.ts.map +1 -1
- package/dist/components/Popover/Popover.vue.d.ts +1 -1
- package/dist/components/Progress/Progress.vue.d.ts +14 -0
- package/dist/components/Progress/Progress.vue.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.vue.d.ts +32 -26
- package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts +2 -1
- package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts.map +1 -1
- package/dist/components/RadioGroup/context.d.ts +4 -0
- package/dist/components/RadioGroup/context.d.ts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +31 -22
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/components/Select/Select.vue.d.ts +21 -7
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.vue.d.ts +2 -0
- package/dist/components/Stepper/Stepper.vue.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.vue.d.ts +6 -3
- package/dist/components/Tabs/Tabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/TabsTrigger.vue.d.ts +6 -0
- package/dist/components/Tabs/TabsTrigger.vue.d.ts.map +1 -1
- package/dist/components/Tabs/context.d.ts +4 -0
- package/dist/components/Tabs/context.d.ts.map +1 -0
- package/dist/components/Textarea/Textarea.vue.d.ts +3 -1
- package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
- package/dist/components/Wizard/Wizard.vue.d.ts +10 -2
- package/dist/components/Wizard/Wizard.vue.d.ts.map +1 -1
- package/dist/composables/index.d.ts +1 -1
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/composables/media.d.ts +8 -1
- package/dist/composables/media.d.ts.map +1 -1
- package/dist/data-table.js +4 -4
- package/dist/editor.js +1 -1
- package/dist/form.js +2 -2
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2751 -2649
- package/dist/pdf.js +3 -3
- package/dist/sources/Code.css +2 -0
- package/dist/utils/text-field.d.ts +16 -0
- package/dist/utils/text-field.d.ts.map +1 -0
- package/llms-full.txt +117 -27
- package/llms.txt +6 -4
- package/package.json +3 -3
- package/dist/ContextMenu-BEOEyUa6.js +0 -2235
- package/dist/Input-Cn5q0yVE.js +0 -181
- package/dist/Tree-fd9LXqgZ.js +0 -792
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e, n as t } from "./recipes-BlM9aKyt.js";
|
|
2
2
|
import { t as n } from "./attrs-KNjeRUCf.js";
|
|
3
3
|
import { a as r, n as i, r as a } from "./Highlight-uwptdaUw.js";
|
|
4
|
-
import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createTextVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeProps as v, nextTick as ee, normalizeClass as y, normalizeProps as b, onBeforeUnmount as
|
|
4
|
+
import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createTextVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeProps as v, nextTick as ee, normalizeClass as y, normalizeProps as b, onBeforeUnmount as x, onMounted as S, openBlock as C, ref as w, renderList as T, renderSlot as E, resolveDynamicComponent as D, toDisplayString as O, unref as k, useAttrs as te, useId as ne, watch as A, withCtx as j } from "vue";
|
|
5
5
|
import { Check as M, ChevronDown as re, LoaderCircle as N, X as ie } from "@lucide/vue";
|
|
6
6
|
import { controlIds as ae, select as oe, spinner as P } from "@wirecore/wirelayer-recipes";
|
|
7
7
|
import { useFieldContext as se } from "@ark-ui/vue/field";
|
|
@@ -22,24 +22,24 @@ var I = [
|
|
|
22
22
|
classes: {}
|
|
23
23
|
},
|
|
24
24
|
setup(n) {
|
|
25
|
-
let r = e(), i = n, a = t("spinner", P, () => i.classes), o =
|
|
26
|
-
return (e, t) => n.value === void 0 ? (
|
|
27
|
-
...
|
|
28
|
-
class: s.value.base({ class: y(
|
|
29
|
-
}, { role: "status" }), [h(
|
|
25
|
+
let r = e(), i = n, a = t("spinner", P, () => i.classes), o = te(), s = c(() => a({ size: i.size })), l = c(() => Math.min(100, Math.max(0, i.value ?? 0))), u = 2 * Math.PI * 9;
|
|
26
|
+
return (e, t) => n.value === void 0 ? (C(), d("span", v({ key: 1 }, {
|
|
27
|
+
...k(o),
|
|
28
|
+
class: s.value.base({ class: y(k(o).class) })
|
|
29
|
+
}, { role: "status" }), [h(k(N), {
|
|
30
30
|
class: y(s.value.icon()),
|
|
31
31
|
"aria-hidden": "true"
|
|
32
|
-
}, null, 8, ["class"]), f("span", { class: y(s.value.label()) },
|
|
33
|
-
...
|
|
34
|
-
class: s.value.base({ class: y(
|
|
32
|
+
}, null, 8, ["class"]), f("span", { class: y(s.value.label()) }, O(n.label ?? k(r).common.loading), 3)], 16)) : (C(), d("span", v({ key: 0 }, {
|
|
33
|
+
...k(o),
|
|
34
|
+
class: s.value.base({ class: y(k(o).class) })
|
|
35
35
|
}, {
|
|
36
36
|
role: "progressbar",
|
|
37
|
-
"aria-label": n.label ??
|
|
37
|
+
"aria-label": n.label ?? k(r).common.loading,
|
|
38
38
|
"aria-valuemin": "0",
|
|
39
39
|
"aria-valuemax": "100",
|
|
40
40
|
"aria-valuenow": l.value,
|
|
41
41
|
"aria-valuetext": `${Math.round(l.value)} %`
|
|
42
|
-
}), [(
|
|
42
|
+
}), [(C(), d("svg", {
|
|
43
43
|
class: y(s.value.ring()),
|
|
44
44
|
viewBox: "0 0 24 24",
|
|
45
45
|
"aria-hidden": "true"
|
|
@@ -70,51 +70,51 @@ var I = [
|
|
|
70
70
|
draggable: { type: Boolean }
|
|
71
71
|
},
|
|
72
72
|
setup(e) {
|
|
73
|
-
return (t, n) => (
|
|
73
|
+
return (t, n) => (C(), l(D(e.parts.Item), {
|
|
74
74
|
item: e.option,
|
|
75
75
|
class: y(e.classes.item),
|
|
76
76
|
"data-description": e.option.description ? "" : void 0,
|
|
77
77
|
draggable: e.draggable && !e.option.disabled ? "true" : void 0
|
|
78
78
|
}, {
|
|
79
79
|
default: j(() => [
|
|
80
|
-
e.checkbox ? (
|
|
80
|
+
e.checkbox ? (C(), l(D(e.parts.ItemContext), { key: 0 }, {
|
|
81
81
|
default: j((t) => [f("span", {
|
|
82
82
|
class: y(e.classes.check),
|
|
83
83
|
"data-state": t.selected ? "checked" : "unchecked",
|
|
84
84
|
"aria-hidden": "true"
|
|
85
|
-
}, [t.selected ? (
|
|
85
|
+
}, [t.selected ? (C(), l(k(M), {
|
|
86
86
|
key: 0,
|
|
87
87
|
class: y(e.classes.checkIcon)
|
|
88
88
|
}, null, 8, ["class"])) : u("", !0)], 10, z)]),
|
|
89
89
|
_: 1
|
|
90
90
|
})) : u("", !0),
|
|
91
|
-
t.$slots.item ? (
|
|
92
|
-
default: j((n) => [
|
|
91
|
+
t.$slots.item ? (C(), l(D(e.parts.ItemContext), { key: 1 }, {
|
|
92
|
+
default: j((n) => [E(t.$slots, "item", {
|
|
93
93
|
item: e.option.item,
|
|
94
94
|
selected: n.selected,
|
|
95
95
|
highlighted: n.highlighted,
|
|
96
96
|
disabled: n.disabled
|
|
97
97
|
})]),
|
|
98
98
|
_: 3
|
|
99
|
-
})) : (
|
|
99
|
+
})) : (C(), d(o, { key: 2 }, [e.option.icon ? (C(), l(D(e.option.icon), {
|
|
100
100
|
key: 0,
|
|
101
101
|
class: y(e.classes.icon),
|
|
102
102
|
"aria-hidden": "true"
|
|
103
|
-
}, null, 8, ["class"])) : u("", !0), e.option.description ? (
|
|
103
|
+
}, null, 8, ["class"])) : u("", !0), e.option.description ? (C(), d("span", {
|
|
104
104
|
key: 1,
|
|
105
105
|
class: y(e.classes.itemBody)
|
|
106
|
-
}, [(
|
|
107
|
-
default: j(() => [m(
|
|
106
|
+
}, [(C(), l(D(e.parts.ItemText), { class: y(e.classes.itemText) }, {
|
|
107
|
+
default: j(() => [m(O(e.option.label), 1)]),
|
|
108
108
|
_: 1
|
|
109
|
-
}, 8, ["class"])), f("span", { class: y(e.classes.itemDescription) },
|
|
109
|
+
}, 8, ["class"])), f("span", { class: y(e.classes.itemDescription) }, O(e.option.description), 3)], 2)) : (C(), l(D(e.parts.ItemText), {
|
|
110
110
|
key: 2,
|
|
111
111
|
class: y(e.classes.itemText)
|
|
112
112
|
}, {
|
|
113
|
-
default: j(() => [m(
|
|
113
|
+
default: j(() => [m(O(e.option.label), 1)]),
|
|
114
114
|
_: 1
|
|
115
115
|
}, 8, ["class"]))], 64)),
|
|
116
|
-
!e.checkbox && !e.noIndicator ? (
|
|
117
|
-
default: j(() => [h(
|
|
116
|
+
!e.checkbox && !e.noIndicator ? (C(), l(D(e.parts.ItemIndicator), { key: 3 }, {
|
|
117
|
+
default: j(() => [h(k(M), {
|
|
118
118
|
class: y(e.classes.itemIndicator),
|
|
119
119
|
"aria-hidden": "true"
|
|
120
120
|
}, null, 8, ["class"])]),
|
|
@@ -137,13 +137,13 @@ var I = [
|
|
|
137
137
|
},
|
|
138
138
|
emits: ["load"],
|
|
139
139
|
setup(e, { emit: t }) {
|
|
140
|
-
let n = e, r = t, i =
|
|
140
|
+
let n = e, r = t, i = w(null), a;
|
|
141
141
|
function o() {
|
|
142
142
|
a?.disconnect(), n.active && i.value && typeof IntersectionObserver < "u" && (a = new IntersectionObserver((e) => {
|
|
143
143
|
e.some((e) => e.isIntersecting) && r("load");
|
|
144
144
|
}), a.observe(i.value));
|
|
145
145
|
}
|
|
146
|
-
return
|
|
146
|
+
return S(o), A(() => [n.active, n.count], o), x(() => a?.disconnect()), (e, t) => (C(), d("div", {
|
|
147
147
|
ref_key: "element",
|
|
148
148
|
ref: i,
|
|
149
149
|
"aria-hidden": "true"
|
|
@@ -166,8 +166,8 @@ var I = [
|
|
|
166
166
|
emits: ["loadMore"],
|
|
167
167
|
setup(e, { emit: t }) {
|
|
168
168
|
let n = t;
|
|
169
|
-
return (t, r) => (
|
|
170
|
-
(
|
|
169
|
+
return (t, r) => (C(), d(o, null, [
|
|
170
|
+
(C(!0), d(o, null, T(e.groups, (n, r) => (C(), d(o, { key: n.label ?? `#${r}` }, [n.label === void 0 ? (C(!0), d(o, { key: 1 }, T(n.options, (n) => (C(), l(B, {
|
|
171
171
|
key: n.key,
|
|
172
172
|
parts: e.parts,
|
|
173
173
|
option: n,
|
|
@@ -177,7 +177,7 @@ var I = [
|
|
|
177
177
|
draggable: e.draggable
|
|
178
178
|
}, p({ _: 2 }, [t.$slots.item ? {
|
|
179
179
|
name: "item",
|
|
180
|
-
fn: j((e) => [
|
|
180
|
+
fn: j((e) => [E(t.$slots, "item", v({ ref_for: !0 }, e))]),
|
|
181
181
|
key: "0"
|
|
182
182
|
} : void 0]), 1032, [
|
|
183
183
|
"parts",
|
|
@@ -186,14 +186,14 @@ var I = [
|
|
|
186
186
|
"checkbox",
|
|
187
187
|
"no-indicator",
|
|
188
188
|
"draggable"
|
|
189
|
-
]))), 128)) : (
|
|
189
|
+
]))), 128)) : (C(), l(D(e.parts.ItemGroup), {
|
|
190
190
|
key: 0,
|
|
191
191
|
class: y(e.classes.group)
|
|
192
192
|
}, {
|
|
193
|
-
default: j(() => [(
|
|
194
|
-
default: j(() => [m(
|
|
193
|
+
default: j(() => [(C(), l(D(e.parts.ItemGroupLabel), { class: y(e.classes.groupLabel) }, {
|
|
194
|
+
default: j(() => [m(O(n.label), 1)]),
|
|
195
195
|
_: 2
|
|
196
|
-
}, 1032, ["class"])), (
|
|
196
|
+
}, 1032, ["class"])), (C(!0), d(o, null, T(n.options, (n) => (C(), l(B, {
|
|
197
197
|
key: n.key,
|
|
198
198
|
parts: e.parts,
|
|
199
199
|
option: n,
|
|
@@ -203,7 +203,7 @@ var I = [
|
|
|
203
203
|
draggable: e.draggable
|
|
204
204
|
}, p({ _: 2 }, [t.$slots.item ? {
|
|
205
205
|
name: "item",
|
|
206
|
-
fn: j((e) => [
|
|
206
|
+
fn: j((e) => [E(t.$slots, "item", v({ ref_for: !0 }, e))]),
|
|
207
207
|
key: "0"
|
|
208
208
|
} : void 0]), 1032, [
|
|
209
209
|
"parts",
|
|
@@ -215,20 +215,20 @@ var I = [
|
|
|
215
215
|
]))), 128))]),
|
|
216
216
|
_: 2
|
|
217
217
|
}, 1032, ["class"]))], 64))), 128)),
|
|
218
|
-
e.emptyText !== void 0 && !e.loading && !e.groups.length ? (
|
|
218
|
+
e.emptyText !== void 0 && !e.loading && !e.groups.length ? (C(), d("div", {
|
|
219
219
|
key: 0,
|
|
220
220
|
role: "option",
|
|
221
221
|
"aria-disabled": "true",
|
|
222
222
|
class: y(e.classes.empty)
|
|
223
|
-
},
|
|
224
|
-
e.loading ? (
|
|
223
|
+
}, O(e.emptyText), 3)) : u("", !0),
|
|
224
|
+
e.loading ? (C(), d("div", {
|
|
225
225
|
key: 1,
|
|
226
226
|
class: y(e.classes.loading)
|
|
227
|
-
}, [h(
|
|
227
|
+
}, [h(k(N), {
|
|
228
228
|
class: y(e.classes.loadingIcon),
|
|
229
229
|
"aria-hidden": "true"
|
|
230
|
-
}, null, 8, ["class"]), m(" " +
|
|
231
|
-
e.hasMore ? (
|
|
230
|
+
}, null, 8, ["class"]), m(" " + O(e.loadingText), 1)], 2)) : u("", !0),
|
|
231
|
+
e.hasMore ? (C(), l(V, {
|
|
232
232
|
key: 2,
|
|
233
233
|
class: y(e.classes.sentinel),
|
|
234
234
|
active: !e.loading,
|
|
@@ -255,6 +255,7 @@ var I = [
|
|
|
255
255
|
items: {},
|
|
256
256
|
modelValue: { default: void 0 },
|
|
257
257
|
defaultValue: { default: void 0 },
|
|
258
|
+
emptyValue: { default: void 0 },
|
|
258
259
|
placeholder: {},
|
|
259
260
|
disabled: {
|
|
260
261
|
type: Boolean,
|
|
@@ -287,54 +288,60 @@ var I = [
|
|
|
287
288
|
minSearchLength: {},
|
|
288
289
|
pageSize: {},
|
|
289
290
|
standalone: { type: Boolean },
|
|
291
|
+
open: {
|
|
292
|
+
type: Boolean,
|
|
293
|
+
default: void 0
|
|
294
|
+
},
|
|
295
|
+
stopKeyPropagation: { type: Boolean },
|
|
290
296
|
id: {},
|
|
291
297
|
classes: {}
|
|
292
298
|
},
|
|
293
299
|
emits: [
|
|
294
300
|
"update:modelValue",
|
|
295
301
|
"filterChange",
|
|
296
|
-
"loadMore"
|
|
302
|
+
"loadMore",
|
|
303
|
+
"update:open"
|
|
297
304
|
],
|
|
298
|
-
setup(g, { emit:
|
|
299
|
-
let
|
|
305
|
+
setup(g, { emit: x }) {
|
|
306
|
+
let T = e(), M = g, P = t("select", oe, () => M.classes), I = x, L = te(), R = c(() => n(L)), z = c(() => P({
|
|
300
307
|
size: M.size,
|
|
301
308
|
clearable: M.clearable
|
|
302
|
-
})), B =
|
|
309
|
+
})), B = T.select, V = c(() => ({
|
|
303
310
|
itemValue: M.itemValue,
|
|
304
311
|
itemLabel: M.itemLabel,
|
|
305
312
|
itemDisabled: M.itemDisabled,
|
|
306
313
|
itemGroup: M.itemGroup,
|
|
307
314
|
itemKeywords: M.itemKeywords,
|
|
308
315
|
valueKey: M.valueKey
|
|
309
|
-
})), U =
|
|
316
|
+
})), U = w(""), W = r({
|
|
310
317
|
items: () => M.items,
|
|
311
318
|
source: () => M.dataSource,
|
|
312
319
|
accessors: () => V.value,
|
|
313
320
|
pageSize: () => M.pageSize,
|
|
314
321
|
minSearchLength: () => M.minSearchLength
|
|
315
|
-
}), { options: de, groups: G, ordered: K } = i(() => W.items.value, () => V.value, () => M.filter && !M.manualFilter && !M.dataSource ? U.value : ""), q = c(() => [...de.value, ...W.resolvedOptions.value]), { selected:
|
|
322
|
+
}), { options: de, groups: G, ordered: K } = i(() => W.items.value, () => V.value, () => M.filter && !M.manualFilter && !M.dataSource ? U.value : ""), q = c(() => [...de.value, ...W.resolvedOptions.value]), J = (e) => M.emptyValue !== void 0 && e === M.emptyValue ? null : e, { selected: Y, keys: X, commit: Z, commitKeys: fe } = a({
|
|
316
323
|
multiple: !1,
|
|
317
|
-
model: () => M.modelValue,
|
|
318
|
-
defaultValue: M.defaultValue,
|
|
324
|
+
model: () => J(M.modelValue),
|
|
325
|
+
defaultValue: J(M.defaultValue),
|
|
319
326
|
accessors: () => V.value,
|
|
320
327
|
items: q,
|
|
321
|
-
emit: (e) => I("update:modelValue", e),
|
|
328
|
+
emit: (e) => I("update:modelValue", e === null ? M.emptyValue ?? null : e),
|
|
322
329
|
check: {
|
|
323
330
|
component: "Select",
|
|
324
331
|
ready: () => !M.dataSource && !M.loading && M.items.length > 0
|
|
325
332
|
}
|
|
326
333
|
});
|
|
327
|
-
|
|
328
|
-
let
|
|
329
|
-
function
|
|
334
|
+
S(() => W.resolve(X.value, q.value)), A(X, (e) => W.resolve(e, q.value));
|
|
335
|
+
let Q = c(() => M.loading || W.loading.value), pe = c(() => M.hasMore || W.hasMore.value);
|
|
336
|
+
function me() {
|
|
330
337
|
M.dataSource ? W.loadMore() : I("loadMore");
|
|
331
338
|
}
|
|
332
|
-
let $ = c(() =>
|
|
339
|
+
let $ = c(() => Y.value[0]), he = c(() => ce({
|
|
333
340
|
items: K.value,
|
|
334
341
|
itemToString: (e) => e.label,
|
|
335
342
|
itemToValue: (e) => e.key,
|
|
336
343
|
isItemDisabled: (e) => e.disabled
|
|
337
|
-
})),
|
|
344
|
+
})), ge = ne(), _e = c(() => M.emptyText ?? W.emptyText.value ?? (U.value ? T.common.noResults : T.common.empty)), ve = c(() => ({
|
|
338
345
|
item: z.value.item(),
|
|
339
346
|
itemText: z.value.itemText(),
|
|
340
347
|
icon: z.value.icon(),
|
|
@@ -348,69 +355,77 @@ var I = [
|
|
|
348
355
|
sentinel: z.value.sentinel(),
|
|
349
356
|
empty: z.value.empty()
|
|
350
357
|
}));
|
|
351
|
-
function ve(e) {
|
|
352
|
-
X([]), e.focus();
|
|
353
|
-
}
|
|
354
358
|
function ye(e) {
|
|
355
|
-
|
|
359
|
+
Z([]), e.focus();
|
|
356
360
|
}
|
|
357
|
-
function be(e
|
|
361
|
+
function be(e) {
|
|
362
|
+
M.stopKeyPropagation && e.key === "Enter" && e.stopPropagation(), M.clearable && Y.value.length && (e.key === "Backspace" || e.key === "Delete") && (e.preventDefault(), Z([]));
|
|
363
|
+
}
|
|
364
|
+
function xe(e, t) {
|
|
358
365
|
U.value = t.target.value, I("filterChange", U.value), M.dataSource && W.search(U.value), !(M.manualFilter || M.dataSource) && ee(() => {
|
|
359
366
|
let t = K.value.find((e) => !e.disabled);
|
|
360
367
|
t && e.setHighlightValue(t.key);
|
|
361
368
|
});
|
|
362
369
|
}
|
|
363
|
-
function
|
|
370
|
+
function Se(e) {
|
|
364
371
|
(e.key === " " || e.key === "Home" || e.key === "End") && e.stopPropagation();
|
|
365
372
|
}
|
|
366
|
-
function
|
|
367
|
-
|
|
373
|
+
function Ce(e) {
|
|
374
|
+
M.stopKeyPropagation && [
|
|
375
|
+
"Enter",
|
|
376
|
+
"Escape",
|
|
377
|
+
"Tab"
|
|
378
|
+
].includes(e.key) && e.stopPropagation();
|
|
379
|
+
}
|
|
380
|
+
function we(e) {
|
|
381
|
+
I("update:open", e), e && W.open(), !e && U.value && (U.value = "", I("filterChange", ""), M.dataSource && W.search(""));
|
|
368
382
|
}
|
|
369
|
-
let
|
|
383
|
+
let Te = (e) => e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0, Ee = {
|
|
370
384
|
sameWidth: !0,
|
|
371
385
|
gutter: 4
|
|
372
|
-
},
|
|
373
|
-
label:
|
|
374
|
-
hiddenSelect:
|
|
386
|
+
}, De = se(), Oe = c(() => ae(M.id, "trigger", {
|
|
387
|
+
label: De?.value.ids.label,
|
|
388
|
+
hiddenSelect: De?.value.ids.control
|
|
375
389
|
}, M.standalone));
|
|
376
|
-
return (e, t) => (
|
|
390
|
+
return (e, t) => (C(), l(k(F).Root, v({
|
|
377
391
|
class: z.value.base({ class: R.value.className }),
|
|
378
392
|
style: R.value.style,
|
|
379
|
-
collection:
|
|
380
|
-
"model-value":
|
|
393
|
+
collection: he.value,
|
|
394
|
+
"model-value": k(X),
|
|
381
395
|
disabled: g.disabled,
|
|
382
396
|
invalid: g.invalid,
|
|
383
397
|
required: g.required,
|
|
384
398
|
name: g.name,
|
|
385
|
-
positioning:
|
|
386
|
-
composite: !g.filter
|
|
387
|
-
|
|
399
|
+
positioning: Ee,
|
|
400
|
+
composite: !g.filter,
|
|
401
|
+
open: g.open
|
|
402
|
+
}, Oe.value, {
|
|
388
403
|
"lazy-mount": "",
|
|
389
404
|
"unmount-on-exit": "",
|
|
390
|
-
onValueChange: t[0] ||= (e) =>
|
|
391
|
-
onOpenChange: t[1] ||= (e) =>
|
|
405
|
+
onValueChange: t[0] ||= (e) => k(fe)(e.value, e.items),
|
|
406
|
+
onOpenChange: t[1] ||= (e) => we(e.open)
|
|
392
407
|
}), {
|
|
393
408
|
default: j(() => [
|
|
394
|
-
h(
|
|
395
|
-
default: j(() => [h(
|
|
409
|
+
h(k(F).Control, b(_(g.clearable ? { class: z.value.control() } : {})), {
|
|
410
|
+
default: j(() => [h(k(F).Trigger, v(R.value.rest, {
|
|
396
411
|
class: z.value.trigger(),
|
|
397
412
|
"aria-busy": g.loading || void 0,
|
|
398
|
-
onKeydown:
|
|
413
|
+
onKeydown: be
|
|
399
414
|
}), {
|
|
400
|
-
default: j(() => [f("span", { class: y(z.value.value()) }, [e.$slots.value && $.value ?
|
|
415
|
+
default: j(() => [f("span", { class: y(z.value.value()) }, [e.$slots.value && $.value ? E(e.$slots, "value", { item: $.value.item }, void 0, void 0, 0) : (C(), d(o, { key: 1 }, [$.value?.icon ? (C(), l(D($.value.icon), {
|
|
401
416
|
key: 0,
|
|
402
417
|
class: y(z.value.icon()),
|
|
403
418
|
"aria-hidden": "true"
|
|
404
|
-
}, null, 8, ["class"])) : u("", !0), h(
|
|
419
|
+
}, null, 8, ["class"])) : u("", !0), h(k(F).ValueText, { placeholder: g.placeholder ?? k(T).common.placeholder }, p({ _: 2 }, [$.value ? {
|
|
405
420
|
name: "default",
|
|
406
|
-
fn: j(() => [m(
|
|
421
|
+
fn: j(() => [m(O($.value.label), 1)]),
|
|
407
422
|
key: "0"
|
|
408
|
-
} : void 0]), 1032, ["placeholder"])], 64))], 2), h(
|
|
409
|
-
default: j(() => [g.loading ? (
|
|
423
|
+
} : void 0]), 1032, ["placeholder"])], 64))], 2), h(k(F).Indicator, { class: y(z.value.indicator()) }, {
|
|
424
|
+
default: j(() => [g.loading ? (C(), l(k(N), {
|
|
410
425
|
key: 0,
|
|
411
426
|
class: y(z.value.spinner()),
|
|
412
427
|
"aria-hidden": "true"
|
|
413
|
-
}, null, 8, ["class"])) : (
|
|
428
|
+
}, null, 8, ["class"])) : (C(), l(k(re), {
|
|
414
429
|
key: 1,
|
|
415
430
|
class: y(z.value.indicatorIcon()),
|
|
416
431
|
"aria-hidden": "true"
|
|
@@ -418,15 +433,15 @@ var I = [
|
|
|
418
433
|
_: 1
|
|
419
434
|
}, 8, ["class"])]),
|
|
420
435
|
_: 3
|
|
421
|
-
}, 16, ["class", "aria-busy"]), g.clearable ? (
|
|
422
|
-
default: j((e) => [$.value && !e.disabled ? (
|
|
436
|
+
}, 16, ["class", "aria-busy"]), g.clearable ? (C(), l(k(F).Context, { key: 0 }, {
|
|
437
|
+
default: j((e) => [$.value && !e.disabled ? (C(), d("button", {
|
|
423
438
|
key: 0,
|
|
424
439
|
type: "button",
|
|
425
440
|
tabindex: "-1",
|
|
426
441
|
class: y(z.value.clear()),
|
|
427
|
-
"aria-label":
|
|
428
|
-
onClick: (t) =>
|
|
429
|
-
}, [h(
|
|
442
|
+
"aria-label": k(B).clear,
|
|
443
|
+
onClick: (t) => ye(e)
|
|
444
|
+
}, [h(k(ie), {
|
|
430
445
|
class: y(z.value.clearIcon()),
|
|
431
446
|
"aria-hidden": "true"
|
|
432
447
|
}, null, 8, ["class"])], 10, le)) : u("", !0)]),
|
|
@@ -434,13 +449,14 @@ var I = [
|
|
|
434
449
|
})) : u("", !0)]),
|
|
435
450
|
_: 3
|
|
436
451
|
}, 16),
|
|
437
|
-
(
|
|
438
|
-
default: j(() => [h(
|
|
452
|
+
(C(), l(s, { to: "body" }, [h(k(F).Positioner, null, {
|
|
453
|
+
default: j(() => [h(k(F).Content, {
|
|
439
454
|
class: y(z.value.content()),
|
|
440
|
-
"aria-busy":
|
|
441
|
-
"aria-label": g.filter ? R.value.rest["aria-label"] : void 0
|
|
455
|
+
"aria-busy": Q.value || void 0,
|
|
456
|
+
"aria-label": g.filter ? R.value.rest["aria-label"] : void 0,
|
|
457
|
+
onKeydown: Ce
|
|
442
458
|
}, {
|
|
443
|
-
default: j(() => [g.filter ? (
|
|
459
|
+
default: j(() => [g.filter ? (C(), d(o, { key: 0 }, [f("div", { class: y(z.value.header()) }, [h(k(F).Context, null, {
|
|
444
460
|
default: j((e) => [f("input", {
|
|
445
461
|
type: "text",
|
|
446
462
|
role: "combobox",
|
|
@@ -448,32 +464,32 @@ var I = [
|
|
|
448
464
|
"aria-autocomplete": "list",
|
|
449
465
|
"aria-expanded": "true",
|
|
450
466
|
"data-autofocus": "",
|
|
451
|
-
"aria-controls":
|
|
452
|
-
"aria-activedescendant":
|
|
453
|
-
"aria-label":
|
|
454
|
-
placeholder:
|
|
467
|
+
"aria-controls": k(ge),
|
|
468
|
+
"aria-activedescendant": Te(e),
|
|
469
|
+
"aria-label": k(B).filter,
|
|
470
|
+
placeholder: k(T).combobox.search,
|
|
455
471
|
value: U.value,
|
|
456
472
|
class: y(z.value.search()),
|
|
457
|
-
onInput: (t) =>
|
|
458
|
-
onKeydown:
|
|
473
|
+
onInput: (t) => xe(e, t),
|
|
474
|
+
onKeydown: Se
|
|
459
475
|
}, null, 42, ue)]),
|
|
460
476
|
_: 1
|
|
461
|
-
})], 2), h(
|
|
462
|
-
id:
|
|
477
|
+
})], 2), h(k(F).List, {
|
|
478
|
+
id: k(ge),
|
|
463
479
|
class: y(z.value.list())
|
|
464
480
|
}, {
|
|
465
481
|
default: j(() => [h(H, {
|
|
466
|
-
parts:
|
|
467
|
-
groups:
|
|
468
|
-
classes:
|
|
469
|
-
loading:
|
|
470
|
-
"loading-text": g.loadingText ??
|
|
471
|
-
"has-more":
|
|
472
|
-
"empty-text":
|
|
473
|
-
onLoadMore:
|
|
482
|
+
parts: k(F),
|
|
483
|
+
groups: k(G),
|
|
484
|
+
classes: ve.value,
|
|
485
|
+
loading: Q.value,
|
|
486
|
+
"loading-text": g.loadingText ?? k(T).common.loading,
|
|
487
|
+
"has-more": pe.value,
|
|
488
|
+
"empty-text": _e.value,
|
|
489
|
+
onLoadMore: me
|
|
474
490
|
}, p({ _: 2 }, [e.$slots.item ? {
|
|
475
491
|
name: "item",
|
|
476
|
-
fn: j((t) => [
|
|
492
|
+
fn: j((t) => [E(e.$slots, "item", b(_(t)))]),
|
|
477
493
|
key: "0"
|
|
478
494
|
} : void 0]), 1032, [
|
|
479
495
|
"parts",
|
|
@@ -485,19 +501,19 @@ var I = [
|
|
|
485
501
|
"empty-text"
|
|
486
502
|
])]),
|
|
487
503
|
_: 3
|
|
488
|
-
}, 8, ["id", "class"])], 64)) : (
|
|
504
|
+
}, 8, ["id", "class"])], 64)) : (C(), l(H, {
|
|
489
505
|
key: 1,
|
|
490
|
-
parts:
|
|
491
|
-
groups:
|
|
492
|
-
classes:
|
|
493
|
-
loading:
|
|
494
|
-
"loading-text": g.loadingText ??
|
|
495
|
-
"has-more":
|
|
496
|
-
"empty-text":
|
|
497
|
-
onLoadMore:
|
|
506
|
+
parts: k(F),
|
|
507
|
+
groups: k(G),
|
|
508
|
+
classes: ve.value,
|
|
509
|
+
loading: Q.value,
|
|
510
|
+
"loading-text": g.loadingText ?? k(T).common.loading,
|
|
511
|
+
"has-more": pe.value,
|
|
512
|
+
"empty-text": _e.value,
|
|
513
|
+
onLoadMore: me
|
|
498
514
|
}, p({ _: 2 }, [e.$slots.item ? {
|
|
499
515
|
name: "item",
|
|
500
|
-
fn: j((t) => [
|
|
516
|
+
fn: j((t) => [E(e.$slots, "item", b(_(t)))]),
|
|
501
517
|
key: "0"
|
|
502
518
|
} : void 0]), 1032, [
|
|
503
519
|
"parts",
|
|
@@ -516,12 +532,12 @@ var I = [
|
|
|
516
532
|
])]),
|
|
517
533
|
_: 3
|
|
518
534
|
})])),
|
|
519
|
-
h(
|
|
520
|
-
g.dataSource ? (
|
|
535
|
+
h(k(F).HiddenSelect),
|
|
536
|
+
g.dataSource ? (C(), d("span", {
|
|
521
537
|
key: 0,
|
|
522
538
|
role: "status",
|
|
523
539
|
class: y(z.value.status())
|
|
524
|
-
},
|
|
540
|
+
}, O(k(W).announcement.value), 3)) : u("", !0)
|
|
525
541
|
]),
|
|
526
542
|
_: 3
|
|
527
543
|
}, 16, [
|
|
@@ -533,7 +549,8 @@ var I = [
|
|
|
533
549
|
"invalid",
|
|
534
550
|
"required",
|
|
535
551
|
"name",
|
|
536
|
-
"composite"
|
|
552
|
+
"composite",
|
|
553
|
+
"open"
|
|
537
554
|
]));
|
|
538
555
|
}
|
|
539
556
|
});
|