@wirecore/wirelayer-vue 0.6.0 → 0.7.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-D9f77jtl.js → Checkbox-D175nhKK.js} +26 -22
- package/dist/ContextMenu-BEOEyUa6.js +2235 -0
- package/dist/{Highlight-Cg8DvCfq.js → Highlight-uwptdaUw.js} +35 -32
- package/dist/{Input-BhnYMKjE.js → Input-Cn5q0yVE.js} +48 -35
- package/dist/{Select-DAuYpE1c.js → Select-Bd2Vpr7G.js} +173 -164
- package/dist/Slider-Cpv7Vj3B.js +143 -0
- package/dist/{Tree-DWxqSrO6.js → Tree-fd9LXqgZ.js} +183 -180
- package/dist/chart.js +1 -1
- package/dist/components/AngleSlider/AngleSlider.vue.d.ts +2 -0
- package/dist/components/AngleSlider/AngleSlider.vue.d.ts.map +1 -1
- package/dist/components/Autocomplete/Autocomplete.vue.d.ts +2 -0
- package/dist/components/Autocomplete/Autocomplete.vue.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.vue.d.ts +2 -0
- package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
- package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts +2 -0
- package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.vue.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/ColorInput/ColorInput.vue.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.vue.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.vue.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.vue.d.ts +2 -0
- package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
- package/dist/components/Confirm/ConfirmDialog.vue.d.ts +5 -0
- package/dist/components/Confirm/ConfirmDialog.vue.d.ts.map +1 -1
- package/dist/components/Confirm/confirm.d.ts +7 -0
- package/dist/components/Confirm/confirm.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.vue.d.ts +2 -0
- package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePickerBase.vue.d.ts +2 -0
- package/dist/components/DatePicker/DatePickerBase.vue.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts.map +1 -1
- package/dist/components/Dialog/DialogContent.vue.d.ts +2 -0
- package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
- package/dist/components/Drawer/DrawerContent.vue.d.ts +2 -0
- package/dist/components/Drawer/DrawerContent.vue.d.ts.map +1 -1
- package/dist/components/DurationInput/DurationInput.vue.d.ts +2 -0
- package/dist/components/DurationInput/DurationInput.vue.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.vue.d.ts +2 -0
- package/dist/components/IconButton/IconButton.vue.d.ts.map +1 -1
- package/dist/components/Knob/Knob.vue.d.ts +2 -0
- package/dist/components/Knob/Knob.vue.d.ts.map +1 -1
- package/dist/components/Listbox/Listbox.vue.d.ts +2 -0
- package/dist/components/Listbox/Listbox.vue.d.ts.map +1 -1
- package/dist/components/MonthPicker/MonthPicker.vue.d.ts +2 -0
- package/dist/components/MonthPicker/MonthPicker.vue.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.vue.d.ts +2 -0
- package/dist/components/NumberInput/NumberInput.vue.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.vue.d.ts +2 -0
- package/dist/components/PasswordInput/PasswordInput.vue.d.ts.map +1 -1
- package/dist/components/PinInput/PinInput.vue.d.ts +2 -0
- package/dist/components/PinInput/PinInput.vue.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
- package/dist/components/Rating/Rating.vue.d.ts +2 -0
- package/dist/components/Rating/Rating.vue.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/components/Select/Select.vue.d.ts +2 -0
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/SelectionCard/CheckboxCard.vue.d.ts +2 -0
- package/dist/components/SelectionCard/CheckboxCard.vue.d.ts.map +1 -1
- package/dist/components/Slider/Slider.vue.d.ts +2 -0
- package/dist/components/Slider/Slider.vue.d.ts.map +1 -1
- package/dist/components/Switch/Switch.vue.d.ts +2 -0
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
- package/dist/components/TagsInput/TagsInput.vue.d.ts +2 -0
- package/dist/components/TagsInput/TagsInput.vue.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.vue.d.ts +2 -0
- package/dist/components/TimePicker/TimePicker.vue.d.ts.map +1 -1
- package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts +2 -0
- package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.vue.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -1
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts +2 -0
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
- package/dist/components/YearPicker/YearPicker.vue.d.ts +2 -0
- package/dist/components/YearPicker/YearPicker.vue.d.ts.map +1 -1
- package/dist/data-table/DataTable.vue.d.ts +9 -1
- package/dist/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/data-table.js +1007 -994
- package/dist/editor.js +1 -1
- package/dist/form/FormField.vue.d.ts +3 -0
- package/dist/form/FormField.vue.d.ts.map +1 -1
- package/dist/form.js +7 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5674 -5521
- package/dist/label-for-eQvYjsM5.js +8 -0
- package/dist/pdf.js +2 -2
- package/dist/sources/ActionBar.css +1 -0
- package/dist/sources/AppShell.css +1 -0
- package/dist/sources/ChatPrompt.css +1 -0
- package/dist/sources/Gallery.css +1 -0
- package/dist/sources/IconButton.css +1 -0
- package/dist/sources/Image.css +1 -0
- package/dist/sources/ImageCropper.css +1 -0
- package/dist/sources/InlineEdit.css +1 -0
- package/dist/sources/Marquee.css +1 -0
- package/dist/sources/MegaMenu.css +1 -0
- package/dist/sources/Menubar.css +1 -0
- package/dist/sources/OrderList.css +1 -0
- package/dist/sources/PickList.css +1 -0
- package/dist/sources/ScrollTop.css +1 -0
- package/dist/{useTree-H8XsFHMk.js → useTree-UhG1TMeM.js} +1 -1
- package/dist/utils/label-for.d.ts +3 -0
- package/dist/utils/label-for.d.ts.map +1 -0
- package/dist/utils/list.d.ts +5 -0
- package/dist/utils/list.d.ts.map +1 -1
- package/dist/virtual/VirtualSelect.vue.d.ts +2 -0
- package/dist/virtual/VirtualSelect.vue.d.ts.map +1 -1
- package/dist/virtual.js +207 -197
- package/fonts.css +2 -0
- package/llms-full.txt +188 -3
- package/llms.txt +4 -1
- package/package.json +7 -3
- package/theme.css +14 -0
- package/dist/ContextMenu-C5JKyNlX.js +0 -2209
- package/dist/Slider-CyoZc5A8.js +0 -135
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { a as e, n as t } from "./recipes-BlM9aKyt.js";
|
|
2
2
|
import { t as n } from "./attrs-KNjeRUCf.js";
|
|
3
|
-
import { a as r, n as i, r as a } from "./Highlight-
|
|
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
|
|
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 te, onMounted as x, openBlock as S, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as E, toDisplayString as D, unref as O, useAttrs as k, 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
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { controlIds as ae, select as oe, spinner as P } from "@wirecore/wirelayer-recipes";
|
|
7
|
+
import { useFieldContext as se } from "@ark-ui/vue/field";
|
|
8
|
+
import { createListCollection as ce } from "@ark-ui/vue/collection";
|
|
8
9
|
import { Select as F } from "@ark-ui/vue/select";
|
|
9
10
|
//#region src/components/Spinner/Spinner.vue?vue&type=script&setup=true&lang.ts
|
|
10
11
|
var I = [
|
|
11
12
|
"aria-label",
|
|
12
13
|
"aria-valuenow",
|
|
13
14
|
"aria-valuetext"
|
|
14
|
-
],
|
|
15
|
+
], L = ["stroke-dasharray"], R = /* @__PURE__ */ g({
|
|
15
16
|
inheritAttrs: !1,
|
|
16
17
|
__name: "Spinner",
|
|
17
18
|
props: {
|
|
@@ -21,24 +22,24 @@ var I = [
|
|
|
21
22
|
classes: {}
|
|
22
23
|
},
|
|
23
24
|
setup(n) {
|
|
24
|
-
let r = e(), i = n, a = t("spinner", P, () => i.classes), o =
|
|
25
|
-
return (e, t) => n.value === void 0 ? (
|
|
26
|
-
...
|
|
27
|
-
class: s.value.base({ class: y(
|
|
28
|
-
}, { role: "status" }), [h(
|
|
25
|
+
let r = e(), i = n, a = t("spinner", P, () => i.classes), o = k(), 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 ? (S(), d("span", v({ key: 1 }, {
|
|
27
|
+
...O(o),
|
|
28
|
+
class: s.value.base({ class: y(O(o).class) })
|
|
29
|
+
}, { role: "status" }), [h(O(N), {
|
|
29
30
|
class: y(s.value.icon()),
|
|
30
31
|
"aria-hidden": "true"
|
|
31
|
-
}, null, 8, ["class"]), f("span", { class: y(s.value.label()) },
|
|
32
|
-
...
|
|
33
|
-
class: s.value.base({ class: y(
|
|
32
|
+
}, null, 8, ["class"]), f("span", { class: y(s.value.label()) }, D(n.label ?? O(r).common.loading), 3)], 16)) : (S(), d("span", v({ key: 0 }, {
|
|
33
|
+
...O(o),
|
|
34
|
+
class: s.value.base({ class: y(O(o).class) })
|
|
34
35
|
}, {
|
|
35
36
|
role: "progressbar",
|
|
36
|
-
"aria-label": n.label ??
|
|
37
|
+
"aria-label": n.label ?? O(r).common.loading,
|
|
37
38
|
"aria-valuemin": "0",
|
|
38
39
|
"aria-valuemax": "100",
|
|
39
40
|
"aria-valuenow": l.value,
|
|
40
41
|
"aria-valuetext": `${Math.round(l.value)} %`
|
|
41
|
-
}), [(
|
|
42
|
+
}), [(S(), d("svg", {
|
|
42
43
|
class: y(s.value.ring()),
|
|
43
44
|
viewBox: "0 0 24 24",
|
|
44
45
|
"aria-hidden": "true"
|
|
@@ -56,9 +57,9 @@ var I = [
|
|
|
56
57
|
"stroke-width": "3",
|
|
57
58
|
"stroke-linecap": "round",
|
|
58
59
|
"stroke-dasharray": `${l.value / 100 * u} ${u}`
|
|
59
|
-
}, null, 10,
|
|
60
|
+
}, null, 10, L)], 2))], 16, I));
|
|
60
61
|
}
|
|
61
|
-
}),
|
|
62
|
+
}), z = ["data-state"], B = /* @__PURE__ */ g({
|
|
62
63
|
__name: "ListOption",
|
|
63
64
|
props: {
|
|
64
65
|
parts: {},
|
|
@@ -69,51 +70,51 @@ var I = [
|
|
|
69
70
|
draggable: { type: Boolean }
|
|
70
71
|
},
|
|
71
72
|
setup(e) {
|
|
72
|
-
return (t, n) => (
|
|
73
|
+
return (t, n) => (S(), l(E(e.parts.Item), {
|
|
73
74
|
item: e.option,
|
|
74
75
|
class: y(e.classes.item),
|
|
75
76
|
"data-description": e.option.description ? "" : void 0,
|
|
76
77
|
draggable: e.draggable && !e.option.disabled ? "true" : void 0
|
|
77
78
|
}, {
|
|
78
79
|
default: j(() => [
|
|
79
|
-
e.checkbox ? (
|
|
80
|
+
e.checkbox ? (S(), l(E(e.parts.ItemContext), { key: 0 }, {
|
|
80
81
|
default: j((t) => [f("span", {
|
|
81
82
|
class: y(e.classes.check),
|
|
82
83
|
"data-state": t.selected ? "checked" : "unchecked",
|
|
83
84
|
"aria-hidden": "true"
|
|
84
|
-
}, [t.selected ? (
|
|
85
|
+
}, [t.selected ? (S(), l(O(M), {
|
|
85
86
|
key: 0,
|
|
86
87
|
class: y(e.classes.checkIcon)
|
|
87
|
-
}, null, 8, ["class"])) : u("", !0)], 10,
|
|
88
|
+
}, null, 8, ["class"])) : u("", !0)], 10, z)]),
|
|
88
89
|
_: 1
|
|
89
90
|
})) : u("", !0),
|
|
90
|
-
t.$slots.item ? (
|
|
91
|
-
default: j((n) => [
|
|
91
|
+
t.$slots.item ? (S(), l(E(e.parts.ItemContext), { key: 1 }, {
|
|
92
|
+
default: j((n) => [T(t.$slots, "item", {
|
|
92
93
|
item: e.option.item,
|
|
93
94
|
selected: n.selected,
|
|
94
95
|
highlighted: n.highlighted,
|
|
95
96
|
disabled: n.disabled
|
|
96
97
|
})]),
|
|
97
98
|
_: 3
|
|
98
|
-
})) : (
|
|
99
|
+
})) : (S(), d(o, { key: 2 }, [e.option.icon ? (S(), l(E(e.option.icon), {
|
|
99
100
|
key: 0,
|
|
100
101
|
class: y(e.classes.icon),
|
|
101
102
|
"aria-hidden": "true"
|
|
102
|
-
}, null, 8, ["class"])) : u("", !0), e.option.description ? (
|
|
103
|
+
}, null, 8, ["class"])) : u("", !0), e.option.description ? (S(), d("span", {
|
|
103
104
|
key: 1,
|
|
104
105
|
class: y(e.classes.itemBody)
|
|
105
|
-
}, [(
|
|
106
|
-
default: j(() => [m(
|
|
106
|
+
}, [(S(), l(E(e.parts.ItemText), { class: y(e.classes.itemText) }, {
|
|
107
|
+
default: j(() => [m(D(e.option.label), 1)]),
|
|
107
108
|
_: 1
|
|
108
|
-
}, 8, ["class"])), f("span", { class: y(e.classes.itemDescription) },
|
|
109
|
+
}, 8, ["class"])), f("span", { class: y(e.classes.itemDescription) }, D(e.option.description), 3)], 2)) : (S(), l(E(e.parts.ItemText), {
|
|
109
110
|
key: 2,
|
|
110
111
|
class: y(e.classes.itemText)
|
|
111
112
|
}, {
|
|
112
|
-
default: j(() => [m(
|
|
113
|
+
default: j(() => [m(D(e.option.label), 1)]),
|
|
113
114
|
_: 1
|
|
114
115
|
}, 8, ["class"]))], 64)),
|
|
115
|
-
!e.checkbox && !e.noIndicator ? (
|
|
116
|
-
default: j(() => [h(
|
|
116
|
+
!e.checkbox && !e.noIndicator ? (S(), l(E(e.parts.ItemIndicator), { key: 3 }, {
|
|
117
|
+
default: j(() => [h(O(M), {
|
|
117
118
|
class: y(e.classes.itemIndicator),
|
|
118
119
|
"aria-hidden": "true"
|
|
119
120
|
}, null, 8, ["class"])]),
|
|
@@ -128,7 +129,7 @@ var I = [
|
|
|
128
129
|
"draggable"
|
|
129
130
|
]));
|
|
130
131
|
}
|
|
131
|
-
}),
|
|
132
|
+
}), V = /* @__PURE__ */ g({
|
|
132
133
|
__name: "LoadMore",
|
|
133
134
|
props: {
|
|
134
135
|
active: { type: Boolean },
|
|
@@ -136,19 +137,19 @@ var I = [
|
|
|
136
137
|
},
|
|
137
138
|
emits: ["load"],
|
|
138
139
|
setup(e, { emit: t }) {
|
|
139
|
-
let n = e, r = t, i =
|
|
140
|
+
let n = e, r = t, i = C(null), a;
|
|
140
141
|
function o() {
|
|
141
142
|
a?.disconnect(), n.active && i.value && typeof IntersectionObserver < "u" && (a = new IntersectionObserver((e) => {
|
|
142
143
|
e.some((e) => e.isIntersecting) && r("load");
|
|
143
144
|
}), a.observe(i.value));
|
|
144
145
|
}
|
|
145
|
-
return
|
|
146
|
+
return x(o), A(() => [n.active, n.count], o), te(() => a?.disconnect()), (e, t) => (S(), d("div", {
|
|
146
147
|
ref_key: "element",
|
|
147
148
|
ref: i,
|
|
148
149
|
"aria-hidden": "true"
|
|
149
150
|
}, null, 512));
|
|
150
151
|
}
|
|
151
|
-
}),
|
|
152
|
+
}), H = /* @__PURE__ */ g({
|
|
152
153
|
__name: "ListOptions",
|
|
153
154
|
props: {
|
|
154
155
|
parts: {},
|
|
@@ -165,8 +166,8 @@ var I = [
|
|
|
165
166
|
emits: ["loadMore"],
|
|
166
167
|
setup(e, { emit: t }) {
|
|
167
168
|
let n = t;
|
|
168
|
-
return (t, r) => (
|
|
169
|
-
(
|
|
169
|
+
return (t, r) => (S(), d(o, null, [
|
|
170
|
+
(S(!0), d(o, null, w(e.groups, (n, r) => (S(), d(o, { key: n.label ?? `#${r}` }, [n.label === void 0 ? (S(!0), d(o, { key: 1 }, w(n.options, (n) => (S(), l(B, {
|
|
170
171
|
key: n.key,
|
|
171
172
|
parts: e.parts,
|
|
172
173
|
option: n,
|
|
@@ -176,7 +177,7 @@ var I = [
|
|
|
176
177
|
draggable: e.draggable
|
|
177
178
|
}, p({ _: 2 }, [t.$slots.item ? {
|
|
178
179
|
name: "item",
|
|
179
|
-
fn: j((e) => [
|
|
180
|
+
fn: j((e) => [T(t.$slots, "item", v({ ref_for: !0 }, e))]),
|
|
180
181
|
key: "0"
|
|
181
182
|
} : void 0]), 1032, [
|
|
182
183
|
"parts",
|
|
@@ -185,14 +186,14 @@ var I = [
|
|
|
185
186
|
"checkbox",
|
|
186
187
|
"no-indicator",
|
|
187
188
|
"draggable"
|
|
188
|
-
]))), 128)) : (
|
|
189
|
+
]))), 128)) : (S(), l(E(e.parts.ItemGroup), {
|
|
189
190
|
key: 0,
|
|
190
191
|
class: y(e.classes.group)
|
|
191
192
|
}, {
|
|
192
|
-
default: j(() => [(
|
|
193
|
-
default: j(() => [m(
|
|
193
|
+
default: j(() => [(S(), l(E(e.parts.ItemGroupLabel), { class: y(e.classes.groupLabel) }, {
|
|
194
|
+
default: j(() => [m(D(n.label), 1)]),
|
|
194
195
|
_: 2
|
|
195
|
-
}, 1032, ["class"])), (
|
|
196
|
+
}, 1032, ["class"])), (S(!0), d(o, null, w(n.options, (n) => (S(), l(B, {
|
|
196
197
|
key: n.key,
|
|
197
198
|
parts: e.parts,
|
|
198
199
|
option: n,
|
|
@@ -202,7 +203,7 @@ var I = [
|
|
|
202
203
|
draggable: e.draggable
|
|
203
204
|
}, p({ _: 2 }, [t.$slots.item ? {
|
|
204
205
|
name: "item",
|
|
205
|
-
fn: j((e) => [
|
|
206
|
+
fn: j((e) => [T(t.$slots, "item", v({ ref_for: !0 }, e))]),
|
|
206
207
|
key: "0"
|
|
207
208
|
} : void 0]), 1032, [
|
|
208
209
|
"parts",
|
|
@@ -214,20 +215,20 @@ var I = [
|
|
|
214
215
|
]))), 128))]),
|
|
215
216
|
_: 2
|
|
216
217
|
}, 1032, ["class"]))], 64))), 128)),
|
|
217
|
-
e.emptyText !== void 0 && !e.loading && !e.groups.length ? (
|
|
218
|
+
e.emptyText !== void 0 && !e.loading && !e.groups.length ? (S(), d("div", {
|
|
218
219
|
key: 0,
|
|
219
220
|
role: "option",
|
|
220
221
|
"aria-disabled": "true",
|
|
221
222
|
class: y(e.classes.empty)
|
|
222
|
-
},
|
|
223
|
-
e.loading ? (
|
|
223
|
+
}, D(e.emptyText), 3)) : u("", !0),
|
|
224
|
+
e.loading ? (S(), d("div", {
|
|
224
225
|
key: 1,
|
|
225
226
|
class: y(e.classes.loading)
|
|
226
|
-
}, [h(
|
|
227
|
+
}, [h(O(N), {
|
|
227
228
|
class: y(e.classes.loadingIcon),
|
|
228
229
|
"aria-hidden": "true"
|
|
229
|
-
}, null, 8, ["class"]), m(" " +
|
|
230
|
-
e.hasMore ? (
|
|
230
|
+
}, null, 8, ["class"]), m(" " + D(e.loadingText), 1)], 2)) : u("", !0),
|
|
231
|
+
e.hasMore ? (S(), l(V, {
|
|
231
232
|
key: 2,
|
|
232
233
|
class: y(e.classes.sentinel),
|
|
233
234
|
active: !e.loading,
|
|
@@ -240,14 +241,14 @@ var I = [
|
|
|
240
241
|
])) : u("", !0)
|
|
241
242
|
], 64));
|
|
242
243
|
}
|
|
243
|
-
}),
|
|
244
|
+
}), le = ["aria-label", "onClick"], ue = [
|
|
244
245
|
"aria-controls",
|
|
245
246
|
"aria-activedescendant",
|
|
246
247
|
"aria-label",
|
|
247
248
|
"placeholder",
|
|
248
249
|
"value",
|
|
249
250
|
"onInput"
|
|
250
|
-
],
|
|
251
|
+
], U = /* @__PURE__ */ g({
|
|
251
252
|
inheritAttrs: !1,
|
|
252
253
|
__name: "Select",
|
|
253
254
|
props: {
|
|
@@ -286,6 +287,7 @@ var I = [
|
|
|
286
287
|
minSearchLength: {},
|
|
287
288
|
pageSize: {},
|
|
288
289
|
standalone: { type: Boolean },
|
|
290
|
+
id: {},
|
|
289
291
|
classes: {}
|
|
290
292
|
},
|
|
291
293
|
emits: [
|
|
@@ -293,145 +295,152 @@ var I = [
|
|
|
293
295
|
"filterChange",
|
|
294
296
|
"loadMore"
|
|
295
297
|
],
|
|
296
|
-
setup(g, { emit:
|
|
297
|
-
let
|
|
298
|
+
setup(g, { emit: te }) {
|
|
299
|
+
let w = e(), M = g, P = t("select", oe, () => M.classes), I = te, L = k(), R = c(() => n(L)), z = c(() => P({
|
|
298
300
|
size: M.size,
|
|
299
301
|
clearable: M.clearable
|
|
300
|
-
})),
|
|
302
|
+
})), B = w.select, V = c(() => ({
|
|
301
303
|
itemValue: M.itemValue,
|
|
302
304
|
itemLabel: M.itemLabel,
|
|
303
305
|
itemDisabled: M.itemDisabled,
|
|
304
306
|
itemGroup: M.itemGroup,
|
|
305
307
|
itemKeywords: M.itemKeywords,
|
|
306
308
|
valueKey: M.valueKey
|
|
307
|
-
})),
|
|
309
|
+
})), U = C(""), W = r({
|
|
308
310
|
items: () => M.items,
|
|
309
311
|
source: () => M.dataSource,
|
|
310
|
-
accessors: () =>
|
|
312
|
+
accessors: () => V.value,
|
|
311
313
|
pageSize: () => M.pageSize,
|
|
312
314
|
minSearchLength: () => M.minSearchLength
|
|
313
|
-
}), { options:
|
|
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: J, keys: Y, commit: X, commitKeys: fe } = a({
|
|
314
316
|
multiple: !1,
|
|
315
317
|
model: () => M.modelValue,
|
|
316
318
|
defaultValue: M.defaultValue,
|
|
317
|
-
accessors: () =>
|
|
318
|
-
items:
|
|
319
|
-
emit: (e) => I("update:modelValue", e)
|
|
319
|
+
accessors: () => V.value,
|
|
320
|
+
items: q,
|
|
321
|
+
emit: (e) => I("update:modelValue", e),
|
|
322
|
+
check: {
|
|
323
|
+
component: "Select",
|
|
324
|
+
ready: () => !M.dataSource && !M.loading && M.items.length > 0
|
|
325
|
+
}
|
|
320
326
|
});
|
|
321
|
-
|
|
322
|
-
let
|
|
323
|
-
function
|
|
324
|
-
M.dataSource ?
|
|
327
|
+
x(() => W.resolve(Y.value, q.value)), A(Y, (e) => W.resolve(e, q.value));
|
|
328
|
+
let Z = c(() => M.loading || W.loading.value), Q = c(() => M.hasMore || W.hasMore.value);
|
|
329
|
+
function pe() {
|
|
330
|
+
M.dataSource ? W.loadMore() : I("loadMore");
|
|
325
331
|
}
|
|
326
|
-
let
|
|
327
|
-
items:
|
|
332
|
+
let $ = c(() => J.value[0]), me = c(() => ce({
|
|
333
|
+
items: K.value,
|
|
328
334
|
itemToString: (e) => e.label,
|
|
329
335
|
itemToValue: (e) => e.key,
|
|
330
336
|
isItemDisabled: (e) => e.disabled
|
|
331
|
-
})),
|
|
332
|
-
item:
|
|
333
|
-
itemText:
|
|
334
|
-
icon:
|
|
335
|
-
itemIndicator:
|
|
336
|
-
itemBody:
|
|
337
|
-
itemDescription:
|
|
338
|
-
group:
|
|
339
|
-
groupLabel:
|
|
340
|
-
loading:
|
|
341
|
-
loadingIcon:
|
|
342
|
-
sentinel:
|
|
343
|
-
empty:
|
|
337
|
+
})), he = ne(), ge = c(() => M.emptyText ?? W.emptyText.value ?? (U.value ? w.common.noResults : w.common.empty)), _e = c(() => ({
|
|
338
|
+
item: z.value.item(),
|
|
339
|
+
itemText: z.value.itemText(),
|
|
340
|
+
icon: z.value.icon(),
|
|
341
|
+
itemIndicator: z.value.itemIndicator(),
|
|
342
|
+
itemBody: z.value.itemBody(),
|
|
343
|
+
itemDescription: z.value.itemDescription(),
|
|
344
|
+
group: z.value.group(),
|
|
345
|
+
groupLabel: z.value.groupLabel(),
|
|
346
|
+
loading: z.value.loading(),
|
|
347
|
+
loadingIcon: z.value.loadingIcon(),
|
|
348
|
+
sentinel: z.value.sentinel(),
|
|
349
|
+
empty: z.value.empty()
|
|
344
350
|
}));
|
|
345
|
-
function
|
|
346
|
-
|
|
351
|
+
function ve(e) {
|
|
352
|
+
X([]), e.focus();
|
|
347
353
|
}
|
|
348
|
-
function
|
|
349
|
-
M.clearable &&
|
|
354
|
+
function ye(e) {
|
|
355
|
+
M.clearable && J.value.length && (e.key === "Backspace" || e.key === "Delete") && (e.preventDefault(), X([]));
|
|
350
356
|
}
|
|
351
|
-
function
|
|
352
|
-
|
|
353
|
-
let t =
|
|
357
|
+
function be(e, t) {
|
|
358
|
+
U.value = t.target.value, I("filterChange", U.value), M.dataSource && W.search(U.value), !(M.manualFilter || M.dataSource) && ee(() => {
|
|
359
|
+
let t = K.value.find((e) => !e.disabled);
|
|
354
360
|
t && e.setHighlightValue(t.key);
|
|
355
361
|
});
|
|
356
362
|
}
|
|
357
|
-
function
|
|
363
|
+
function xe(e) {
|
|
358
364
|
(e.key === " " || e.key === "Home" || e.key === "End") && e.stopPropagation();
|
|
359
365
|
}
|
|
360
|
-
function
|
|
361
|
-
e &&
|
|
366
|
+
function Se(e) {
|
|
367
|
+
e && W.open(), !e && U.value && (U.value = "", I("filterChange", ""), M.dataSource && W.search(""));
|
|
362
368
|
}
|
|
363
|
-
let
|
|
369
|
+
let Ce = (e) => e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0, we = {
|
|
364
370
|
sameWidth: !0,
|
|
365
371
|
gutter: 4
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
+
}, Te = se(), Ee = c(() => ae(M.id, "trigger", {
|
|
373
|
+
label: Te?.value.ids.label,
|
|
374
|
+
hiddenSelect: Te?.value.ids.control
|
|
375
|
+
}, M.standalone));
|
|
376
|
+
return (e, t) => (S(), l(O(F).Root, v({
|
|
377
|
+
class: z.value.base({ class: R.value.className }),
|
|
378
|
+
style: R.value.style,
|
|
379
|
+
collection: me.value,
|
|
380
|
+
"model-value": O(Y),
|
|
372
381
|
disabled: g.disabled,
|
|
373
382
|
invalid: g.invalid,
|
|
374
383
|
required: g.required,
|
|
375
384
|
name: g.name,
|
|
376
|
-
positioning:
|
|
385
|
+
positioning: we,
|
|
377
386
|
composite: !g.filter
|
|
378
|
-
},
|
|
387
|
+
}, Ee.value, {
|
|
379
388
|
"lazy-mount": "",
|
|
380
389
|
"unmount-on-exit": "",
|
|
381
|
-
onValueChange: t[0] ||= (e) =>
|
|
382
|
-
onOpenChange: t[1] ||= (e) =>
|
|
390
|
+
onValueChange: t[0] ||= (e) => O(fe)(e.value, e.items),
|
|
391
|
+
onOpenChange: t[1] ||= (e) => Se(e.open)
|
|
383
392
|
}), {
|
|
384
393
|
default: j(() => [
|
|
385
|
-
h(
|
|
386
|
-
default: j(() => [h(
|
|
387
|
-
class:
|
|
394
|
+
h(O(F).Control, b(_(g.clearable ? { class: z.value.control() } : {})), {
|
|
395
|
+
default: j(() => [h(O(F).Trigger, v(R.value.rest, {
|
|
396
|
+
class: z.value.trigger(),
|
|
388
397
|
"aria-busy": g.loading || void 0,
|
|
389
|
-
onKeydown:
|
|
398
|
+
onKeydown: ye
|
|
390
399
|
}), {
|
|
391
|
-
default: j(() => [f("span", { class: y(
|
|
400
|
+
default: j(() => [f("span", { class: y(z.value.value()) }, [e.$slots.value && $.value ? T(e.$slots, "value", { item: $.value.item }, void 0, void 0, 0) : (S(), d(o, { key: 1 }, [$.value?.icon ? (S(), l(E($.value.icon), {
|
|
392
401
|
key: 0,
|
|
393
|
-
class: y(
|
|
402
|
+
class: y(z.value.icon()),
|
|
394
403
|
"aria-hidden": "true"
|
|
395
|
-
}, null, 8, ["class"])) : u("", !0), h(
|
|
404
|
+
}, null, 8, ["class"])) : u("", !0), h(O(F).ValueText, { placeholder: g.placeholder ?? O(w).common.placeholder }, p({ _: 2 }, [$.value ? {
|
|
396
405
|
name: "default",
|
|
397
|
-
fn: j(() => [m(
|
|
406
|
+
fn: j(() => [m(D($.value.label), 1)]),
|
|
398
407
|
key: "0"
|
|
399
|
-
} : void 0]), 1032, ["placeholder"])], 64))], 2), h(
|
|
400
|
-
default: j(() => [g.loading ? (
|
|
408
|
+
} : void 0]), 1032, ["placeholder"])], 64))], 2), h(O(F).Indicator, { class: y(z.value.indicator()) }, {
|
|
409
|
+
default: j(() => [g.loading ? (S(), l(O(N), {
|
|
401
410
|
key: 0,
|
|
402
|
-
class: y(
|
|
411
|
+
class: y(z.value.spinner()),
|
|
403
412
|
"aria-hidden": "true"
|
|
404
|
-
}, null, 8, ["class"])) : (
|
|
413
|
+
}, null, 8, ["class"])) : (S(), l(O(re), {
|
|
405
414
|
key: 1,
|
|
406
|
-
class: y(
|
|
415
|
+
class: y(z.value.indicatorIcon()),
|
|
407
416
|
"aria-hidden": "true"
|
|
408
417
|
}, null, 8, ["class"]))]),
|
|
409
418
|
_: 1
|
|
410
419
|
}, 8, ["class"])]),
|
|
411
420
|
_: 3
|
|
412
|
-
}, 16, ["class", "aria-busy"]), g.clearable ? (
|
|
413
|
-
default: j((e) => [
|
|
421
|
+
}, 16, ["class", "aria-busy"]), g.clearable ? (S(), l(O(F).Context, { key: 0 }, {
|
|
422
|
+
default: j((e) => [$.value && !e.disabled ? (S(), d("button", {
|
|
414
423
|
key: 0,
|
|
415
424
|
type: "button",
|
|
416
425
|
tabindex: "-1",
|
|
417
|
-
class: y(
|
|
418
|
-
"aria-label":
|
|
419
|
-
onClick: (t) =>
|
|
420
|
-
}, [h(
|
|
421
|
-
class: y(
|
|
426
|
+
class: y(z.value.clear()),
|
|
427
|
+
"aria-label": O(B).clear,
|
|
428
|
+
onClick: (t) => ve(e)
|
|
429
|
+
}, [h(O(ie), {
|
|
430
|
+
class: y(z.value.clearIcon()),
|
|
422
431
|
"aria-hidden": "true"
|
|
423
|
-
}, null, 8, ["class"])], 10,
|
|
432
|
+
}, null, 8, ["class"])], 10, le)) : u("", !0)]),
|
|
424
433
|
_: 1
|
|
425
434
|
})) : u("", !0)]),
|
|
426
435
|
_: 3
|
|
427
436
|
}, 16),
|
|
428
|
-
(
|
|
429
|
-
default: j(() => [h(
|
|
430
|
-
class: y(
|
|
431
|
-
"aria-busy":
|
|
432
|
-
"aria-label": g.filter ?
|
|
437
|
+
(S(), l(s, { to: "body" }, [h(O(F).Positioner, null, {
|
|
438
|
+
default: j(() => [h(O(F).Content, {
|
|
439
|
+
class: y(z.value.content()),
|
|
440
|
+
"aria-busy": Z.value || void 0,
|
|
441
|
+
"aria-label": g.filter ? R.value.rest["aria-label"] : void 0
|
|
433
442
|
}, {
|
|
434
|
-
default: j(() => [g.filter ? (
|
|
443
|
+
default: j(() => [g.filter ? (S(), d(o, { key: 0 }, [f("div", { class: y(z.value.header()) }, [h(O(F).Context, null, {
|
|
435
444
|
default: j((e) => [f("input", {
|
|
436
445
|
type: "text",
|
|
437
446
|
role: "combobox",
|
|
@@ -439,32 +448,32 @@ var I = [
|
|
|
439
448
|
"aria-autocomplete": "list",
|
|
440
449
|
"aria-expanded": "true",
|
|
441
450
|
"data-autofocus": "",
|
|
442
|
-
"aria-controls":
|
|
443
|
-
"aria-activedescendant":
|
|
444
|
-
"aria-label":
|
|
445
|
-
placeholder:
|
|
446
|
-
value:
|
|
447
|
-
class: y(
|
|
448
|
-
onInput: (t) =>
|
|
449
|
-
onKeydown:
|
|
450
|
-
}, null, 42,
|
|
451
|
+
"aria-controls": O(he),
|
|
452
|
+
"aria-activedescendant": Ce(e),
|
|
453
|
+
"aria-label": O(B).filter,
|
|
454
|
+
placeholder: O(w).combobox.search,
|
|
455
|
+
value: U.value,
|
|
456
|
+
class: y(z.value.search()),
|
|
457
|
+
onInput: (t) => be(e, t),
|
|
458
|
+
onKeydown: xe
|
|
459
|
+
}, null, 42, ue)]),
|
|
451
460
|
_: 1
|
|
452
|
-
})], 2), h(
|
|
453
|
-
id:
|
|
454
|
-
class: y(
|
|
461
|
+
})], 2), h(O(F).List, {
|
|
462
|
+
id: O(he),
|
|
463
|
+
class: y(z.value.list())
|
|
455
464
|
}, {
|
|
456
|
-
default: j(() => [h(
|
|
457
|
-
parts:
|
|
458
|
-
groups:
|
|
459
|
-
classes:
|
|
460
|
-
loading:
|
|
461
|
-
"loading-text": g.loadingText ??
|
|
462
|
-
"has-more":
|
|
463
|
-
"empty-text":
|
|
464
|
-
onLoadMore:
|
|
465
|
+
default: j(() => [h(H, {
|
|
466
|
+
parts: O(F),
|
|
467
|
+
groups: O(G),
|
|
468
|
+
classes: _e.value,
|
|
469
|
+
loading: Z.value,
|
|
470
|
+
"loading-text": g.loadingText ?? O(w).common.loading,
|
|
471
|
+
"has-more": Q.value,
|
|
472
|
+
"empty-text": ge.value,
|
|
473
|
+
onLoadMore: pe
|
|
465
474
|
}, p({ _: 2 }, [e.$slots.item ? {
|
|
466
475
|
name: "item",
|
|
467
|
-
fn: j((t) => [
|
|
476
|
+
fn: j((t) => [T(e.$slots, "item", b(_(t)))]),
|
|
468
477
|
key: "0"
|
|
469
478
|
} : void 0]), 1032, [
|
|
470
479
|
"parts",
|
|
@@ -476,19 +485,19 @@ var I = [
|
|
|
476
485
|
"empty-text"
|
|
477
486
|
])]),
|
|
478
487
|
_: 3
|
|
479
|
-
}, 8, ["id", "class"])], 64)) : (
|
|
488
|
+
}, 8, ["id", "class"])], 64)) : (S(), l(H, {
|
|
480
489
|
key: 1,
|
|
481
|
-
parts:
|
|
482
|
-
groups:
|
|
483
|
-
classes:
|
|
484
|
-
loading:
|
|
485
|
-
"loading-text": g.loadingText ??
|
|
486
|
-
"has-more":
|
|
487
|
-
"empty-text":
|
|
488
|
-
onLoadMore:
|
|
490
|
+
parts: O(F),
|
|
491
|
+
groups: O(G),
|
|
492
|
+
classes: _e.value,
|
|
493
|
+
loading: Z.value,
|
|
494
|
+
"loading-text": g.loadingText ?? O(w).common.loading,
|
|
495
|
+
"has-more": Q.value,
|
|
496
|
+
"empty-text": ge.value,
|
|
497
|
+
onLoadMore: pe
|
|
489
498
|
}, p({ _: 2 }, [e.$slots.item ? {
|
|
490
499
|
name: "item",
|
|
491
|
-
fn: j((t) => [
|
|
500
|
+
fn: j((t) => [T(e.$slots, "item", b(_(t)))]),
|
|
492
501
|
key: "0"
|
|
493
502
|
} : void 0]), 1032, [
|
|
494
503
|
"parts",
|
|
@@ -507,12 +516,12 @@ var I = [
|
|
|
507
516
|
])]),
|
|
508
517
|
_: 3
|
|
509
518
|
})])),
|
|
510
|
-
h(
|
|
511
|
-
g.dataSource ? (
|
|
519
|
+
h(O(F).HiddenSelect),
|
|
520
|
+
g.dataSource ? (S(), d("span", {
|
|
512
521
|
key: 0,
|
|
513
522
|
role: "status",
|
|
514
|
-
class: y(
|
|
515
|
-
}, O(
|
|
523
|
+
class: y(z.value.status())
|
|
524
|
+
}, D(O(W).announcement.value), 3)) : u("", !0)
|
|
516
525
|
]),
|
|
517
526
|
_: 3
|
|
518
527
|
}, 16, [
|
|
@@ -529,4 +538,4 @@ var I = [
|
|
|
529
538
|
}
|
|
530
539
|
});
|
|
531
540
|
//#endregion
|
|
532
|
-
export {
|
|
541
|
+
export { R as i, H as n, V as r, U as t };
|