@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,10 +1,10 @@
|
|
|
1
1
|
import { i as e, n as t } from "./recipes-BlM9aKyt.js";
|
|
2
|
-
import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, createTextVNode as o, defineComponent as s, normalizeClass as c, onBeforeUnmount as l,
|
|
3
|
-
import { DataKeyResolver as
|
|
4
|
-
import { useFilter as
|
|
5
|
-
import { Highlight as
|
|
2
|
+
import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, createTextVNode as o, defineComponent as s, normalizeClass as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderList as p, shallowRef as m, toDisplayString as h, unref as g, watch as _ } from "vue";
|
|
3
|
+
import { DataKeyResolver as v, checkListValues as y, createDataList as b, dataListAnnouncement as x, filterListOptions as S, groupListOptions as C, highlight as w, highlightChunks as T, indexListOptions as E, listOptionsForValues as D, listValues as O, toListOptions as k } from "@wirecore/wirelayer-recipes";
|
|
4
|
+
import { useFilter as A } from "@ark-ui/vue/locale";
|
|
5
|
+
import { Highlight as j } from "@ark-ui/vue/highlight";
|
|
6
6
|
//#region src/utils/data-source.ts
|
|
7
|
-
var
|
|
7
|
+
var M = {
|
|
8
8
|
status: "idle",
|
|
9
9
|
items: [],
|
|
10
10
|
loadingMore: !1,
|
|
@@ -12,8 +12,8 @@ var A = {
|
|
|
12
12
|
search: "",
|
|
13
13
|
tooShort: !1
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
let n = e(), i =
|
|
15
|
+
function N(t) {
|
|
16
|
+
let n = e(), i = m(M), a = m([]), o, s, c = () => ({
|
|
17
17
|
pageSize: t.pageSize?.(),
|
|
18
18
|
minSearchLength: t.minSearchLength?.(),
|
|
19
19
|
debounce: t.debounce?.(),
|
|
@@ -21,16 +21,16 @@ function j(t) {
|
|
|
21
21
|
});
|
|
22
22
|
function u() {
|
|
23
23
|
let e = t.source();
|
|
24
|
-
if (e) return o ??=
|
|
24
|
+
if (e) return o ??= b({
|
|
25
25
|
source: e,
|
|
26
26
|
...c(),
|
|
27
27
|
onChange: (e) => i.value = e
|
|
28
|
-
}), s ??= new
|
|
28
|
+
}), s ??= new v({
|
|
29
29
|
source: e,
|
|
30
30
|
onChange: (e) => a.value = e
|
|
31
31
|
}), o;
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return _(() => [
|
|
34
34
|
t.source(),
|
|
35
35
|
t.pageSize?.(),
|
|
36
36
|
t.minSearchLength?.(),
|
|
@@ -55,15 +55,15 @@ function j(t) {
|
|
|
55
55
|
resolveKeys: (e) => {
|
|
56
56
|
u() && e.length && s.resolve(e).catch(() => void 0);
|
|
57
57
|
},
|
|
58
|
-
announcement: r(() => t.source() ?
|
|
58
|
+
announcement: r(() => t.source() ? x(i.value, n.value.translations, n.value.locale, t.minSearchLength?.() ?? 0) : "")
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
let n = e(), i =
|
|
61
|
+
function P(t) {
|
|
62
|
+
let n = e(), i = N({
|
|
63
63
|
source: t.source,
|
|
64
64
|
pageSize: t.pageSize,
|
|
65
65
|
minSearchLength: t.minSearchLength
|
|
66
|
-
}), a = r(() => i.active.value ? i.state.value.items : t.items()), o = r(() =>
|
|
66
|
+
}), a = r(() => i.active.value ? i.state.value.items : t.items()), o = r(() => k(i.resolved.value, t.accessors()));
|
|
67
67
|
return {
|
|
68
68
|
...i,
|
|
69
69
|
items: a,
|
|
@@ -84,11 +84,11 @@ function M(t) {
|
|
|
84
84
|
}
|
|
85
85
|
//#endregion
|
|
86
86
|
//#region src/utils/list.ts
|
|
87
|
-
function
|
|
88
|
-
let i =
|
|
87
|
+
function F(e, t, n = () => "") {
|
|
88
|
+
let i = A({
|
|
89
89
|
sensitivity: "base",
|
|
90
90
|
usage: "sort"
|
|
91
|
-
}), a = r(() =>
|
|
91
|
+
}), a = r(() => k(e(), t())), o = r(() => S(a.value, n(), i.value.contains)), s = r(() => C(o.value));
|
|
92
92
|
return {
|
|
93
93
|
options: a,
|
|
94
94
|
visible: o,
|
|
@@ -96,27 +96,30 @@ function N(e, t, n = () => "") {
|
|
|
96
96
|
ordered: r(() => s.value.flatMap((e) => e.options))
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
let t =
|
|
101
|
-
|
|
99
|
+
function I(e) {
|
|
100
|
+
let t = f(e.defaultValue ?? (e.multiple ? [] : null)), n = f([]), i = r(() => e.model() === void 0 ? t.value : e.model()), a = r(() => D(e.multiple ? i.value ?? [] : O(i.value, e.items.value), E(e.items.value, n.value), e.accessors())), o = r(() => a.value.map((e) => e.key)), s = e.check;
|
|
101
|
+
s && u(() => _([a, s.ready], ([e, t]) => {
|
|
102
|
+
t && y(s.component, e);
|
|
103
|
+
}, { immediate: !0 }));
|
|
104
|
+
function c(r) {
|
|
102
105
|
n.value = r;
|
|
103
106
|
let i = r.map((e) => e.value), a = e.multiple ? i : i[0] ?? null;
|
|
104
107
|
t.value = a, e.emit(a);
|
|
105
108
|
}
|
|
106
|
-
function
|
|
107
|
-
let r =
|
|
108
|
-
|
|
109
|
+
function l(t, n = []) {
|
|
110
|
+
let r = E(e.items.value, n, a.value);
|
|
111
|
+
c(t.map((e) => r.get(e)).filter((e) => e !== void 0));
|
|
109
112
|
}
|
|
110
113
|
return {
|
|
111
114
|
selected: a,
|
|
112
115
|
keys: o,
|
|
113
|
-
commit:
|
|
114
|
-
commitKeys:
|
|
116
|
+
commit: c,
|
|
117
|
+
commitKeys: l
|
|
115
118
|
};
|
|
116
119
|
}
|
|
117
120
|
//#endregion
|
|
118
121
|
//#region src/components/Highlight/Highlight.vue
|
|
119
|
-
var
|
|
122
|
+
var L = /* @__PURE__ */ s({
|
|
120
123
|
__name: "Highlight",
|
|
121
124
|
props: {
|
|
122
125
|
text: {},
|
|
@@ -135,22 +138,22 @@ var F = /* @__PURE__ */ s({
|
|
|
135
138
|
classes: {}
|
|
136
139
|
},
|
|
137
140
|
setup(e) {
|
|
138
|
-
let s = e, l = t("highlight",
|
|
141
|
+
let s = e, l = t("highlight", w, () => s.classes), u = r(() => s.wholeWord || s.ignoreAccents || !!s.colors?.length), f = r(() => u.value ? T(s.text, s.query, {
|
|
139
142
|
ignoreCase: s.ignoreCase,
|
|
140
143
|
matchAll: s.matchAll,
|
|
141
144
|
wholeWord: s.wholeWord,
|
|
142
145
|
ignoreAccents: s.ignoreAccents
|
|
143
146
|
}) : []);
|
|
144
|
-
return (t, r) =>
|
|
147
|
+
return (t, r) => u.value ? (d(!0), a(n, { key: 1 }, p(f.value, (t, r) => (d(), a(n, { key: r }, [t.match ? (d(), a("mark", {
|
|
145
148
|
key: 0,
|
|
146
|
-
class: c(
|
|
147
|
-
},
|
|
149
|
+
class: c(g(l)({ color: e.colors?.[t.term ?? 0] }))
|
|
150
|
+
}, h(t.text), 3)) : (d(), a(n, { key: 1 }, [o(h(t.text), 1)], 64))], 64))), 128)) : (d(), i(g(j), {
|
|
148
151
|
key: 0,
|
|
149
152
|
text: e.text,
|
|
150
153
|
query: e.query,
|
|
151
154
|
"ignore-case": e.ignoreCase,
|
|
152
155
|
"match-all": e.matchAll,
|
|
153
|
-
class: c(
|
|
156
|
+
class: c(g(l)())
|
|
154
157
|
}, null, 8, [
|
|
155
158
|
"text",
|
|
156
159
|
"query",
|
|
@@ -161,4 +164,4 @@ var F = /* @__PURE__ */ s({
|
|
|
161
164
|
}
|
|
162
165
|
});
|
|
163
166
|
//#endregion
|
|
164
|
-
export {
|
|
167
|
+
export { P as a, N as i, F as n, I as r, L as t };
|
|
@@ -2,15 +2,15 @@ import { a as e, n as t } from "./recipes-BlM9aKyt.js";
|
|
|
2
2
|
import { t as n } from "./attrs-KNjeRUCf.js";
|
|
3
3
|
import { r, t as i } from "./InputStatus-D7kBGlew.js";
|
|
4
4
|
import { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createVNode as l, defineComponent as u, mergeModels as d, mergeProps as f, normalizeClass as p, normalizeStyle as m, openBlock as h, ref as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, useAttrs as b, useId as x, useModel as S, useTemplateRef as C } from "vue";
|
|
5
|
-
import { CircleAlert as w } from "@lucide/vue";
|
|
6
|
-
import { buttonColorKey as
|
|
7
|
-
import { Field as
|
|
5
|
+
import { CircleAlert as w, LoaderCircle as T } from "@lucide/vue";
|
|
6
|
+
import { buttonColorKey as E, formatCount as D, iconButton as O, input as k, setTextControlValue as A, spinner as j } from "@wirecore/wirelayer-recipes";
|
|
7
|
+
import { Field as M, useFieldContext as N } from "@ark-ui/vue/field";
|
|
8
8
|
//#region src/components/IconButton/IconButton.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var P = [
|
|
10
10
|
"type",
|
|
11
11
|
"disabled",
|
|
12
12
|
"aria-label"
|
|
13
|
-
],
|
|
13
|
+
], F = /* @__PURE__ */ u({
|
|
14
14
|
inheritAttrs: !1,
|
|
15
15
|
__name: "IconButton",
|
|
16
16
|
props: {
|
|
@@ -22,6 +22,7 @@ var M = [
|
|
|
22
22
|
size: {},
|
|
23
23
|
shape: {},
|
|
24
24
|
disabled: { type: Boolean },
|
|
25
|
+
loading: { type: Boolean },
|
|
25
26
|
type: { default: "button" },
|
|
26
27
|
badge: { type: [Number, Boolean] },
|
|
27
28
|
badgeLabel: {
|
|
@@ -31,33 +32,45 @@ var M = [
|
|
|
31
32
|
classes: {}
|
|
32
33
|
},
|
|
33
34
|
setup(e) {
|
|
34
|
-
let n = e, r = t("iconButton",
|
|
35
|
+
let n = e, r = t("iconButton", O, () => n.classes), i = t("spinner", j), l = b(), u = a(() => r({
|
|
35
36
|
variant: n.variant,
|
|
36
|
-
color:
|
|
37
|
+
color: E(n.color),
|
|
37
38
|
size: n.size,
|
|
38
39
|
shape: n.shape
|
|
39
|
-
})),
|
|
40
|
+
})), d = a(() => typeof n.badge == "number" && n.badge > 0 ? n.badge : 0), m = a(() => d.value ? `${n.label}, ${n.badgeLabel(D(d.value))}` : n.badge === !0 ? `${n.label}, ${n.badgeLabel(null)}` : n.label), g = a(() => n.loading ? {
|
|
41
|
+
"aria-disabled": !0,
|
|
42
|
+
"aria-busy": !0
|
|
43
|
+
} : {});
|
|
44
|
+
function x(e) {
|
|
45
|
+
n.loading ? e.preventDefault() : [l.onClick].flat().forEach((t) => t?.(e));
|
|
46
|
+
}
|
|
40
47
|
return (t, n) => (h(), c("button", f({
|
|
41
|
-
...y(
|
|
42
|
-
class:
|
|
48
|
+
...y(l),
|
|
49
|
+
class: u.value.base({ class: p(y(l).class) }),
|
|
50
|
+
onClick: x,
|
|
51
|
+
...g.value
|
|
43
52
|
}, {
|
|
44
53
|
type: e.type,
|
|
45
54
|
disabled: e.disabled,
|
|
46
|
-
"aria-label":
|
|
47
|
-
}), [(h(), o(
|
|
48
|
-
class: l.value.icon(),
|
|
49
|
-
"aria-hidden": "true"
|
|
50
|
-
}), null, 16, ["class"])), u.value ? (h(), c("span", {
|
|
55
|
+
"aria-label": m.value
|
|
56
|
+
}), [e.loading ? (h(), o(y(T), {
|
|
51
57
|
key: 0,
|
|
52
|
-
class: p(
|
|
58
|
+
class: p(y(i)().icon({ class: u.value.icon() })),
|
|
59
|
+
"aria-hidden": "true"
|
|
60
|
+
}, null, 8, ["class"])) : (h(), o(_(e.icon), f({ key: 1 }, e.iconProps, {
|
|
61
|
+
class: u.value.icon(),
|
|
62
|
+
"aria-hidden": "true"
|
|
63
|
+
}), null, 16, ["class"])), d.value ? (h(), c("span", {
|
|
64
|
+
key: 2,
|
|
65
|
+
class: p(u.value.badge()),
|
|
53
66
|
"aria-hidden": "true"
|
|
54
|
-
}, v(y(
|
|
55
|
-
key:
|
|
56
|
-
class: p(
|
|
67
|
+
}, v(y(D)(d.value)), 3)) : e.badge === !0 ? (h(), c("span", {
|
|
68
|
+
key: 3,
|
|
69
|
+
class: p(u.value.dot()),
|
|
57
70
|
"aria-hidden": "true"
|
|
58
|
-
}, null, 2)) : s("", !0)], 16,
|
|
71
|
+
}, null, 2)) : s("", !0)], 16, P));
|
|
59
72
|
}
|
|
60
|
-
}),
|
|
73
|
+
}), I = ["data-invalid", "data-disabled"], L = ["id"], R = ["id"], z = /* @__PURE__ */ u({
|
|
61
74
|
inheritAttrs: !1,
|
|
62
75
|
__name: "Input",
|
|
63
76
|
props: /*@__PURE__*/ d({
|
|
@@ -78,40 +91,40 @@ var M = [
|
|
|
78
91
|
}),
|
|
79
92
|
emits: ["update:modelValue"],
|
|
80
93
|
setup(u) {
|
|
81
|
-
let d = u, T = t("input",
|
|
94
|
+
let d = u, T = t("input", k, () => d.classes), E = e(), D = S(u, "modelValue"), O = b(), j = N(), P = r(), F = a(() => d.invalid || !!j?.value.invalid), z = a(() => !F.value && (d.success || P.value.success)), B = a(() => d.disabled || !!j?.value.disabled), V = a(() => !!O.readonly || O.readonly === "" || !!j?.value.readOnly), H = a(() => T({
|
|
82
95
|
size: d.size,
|
|
83
|
-
invalid:
|
|
96
|
+
invalid: F.value,
|
|
84
97
|
success: z.value,
|
|
85
98
|
disabled: B.value,
|
|
86
99
|
hasIcon: !!d.leadingIcon,
|
|
87
|
-
hasStatusIcon:
|
|
88
|
-
})), U = a(() => n(
|
|
89
|
-
|
|
100
|
+
hasStatusIcon: F.value || z.value || d.loading || d.clearable
|
|
101
|
+
})), U = a(() => n(O)), W = g(String(O.defaultValue ?? "")), G = a(() => d.clearable && !!(D.value ?? W.value) && !B.value && !V.value), K = x(), q = x(), J = a(() => [
|
|
102
|
+
j?.value.ariaDescribedby,
|
|
90
103
|
d.prefix && K,
|
|
91
104
|
d.suffix && q,
|
|
92
105
|
U.value.rest["aria-describedby"]
|
|
93
106
|
].filter(Boolean).join(" ") || void 0), Y = C("control");
|
|
94
107
|
function X() {
|
|
95
108
|
let e = Y.value?.$el;
|
|
96
|
-
e && (
|
|
109
|
+
e && (A(e), e.focus());
|
|
97
110
|
}
|
|
98
111
|
return (e, t) => (h(), c("div", {
|
|
99
112
|
class: p(H.value.base({ class: U.value.className })),
|
|
100
113
|
style: m(U.value.style),
|
|
101
|
-
"data-invalid":
|
|
114
|
+
"data-invalid": F.value || void 0,
|
|
102
115
|
"data-disabled": B.value || void 0
|
|
103
116
|
}, [
|
|
104
117
|
u.prefix ? (h(), c("span", {
|
|
105
118
|
key: 0,
|
|
106
119
|
id: y(K),
|
|
107
120
|
class: p(H.value.prefix())
|
|
108
|
-
}, v(u.prefix), 11,
|
|
121
|
+
}, v(u.prefix), 11, L)) : s("", !0),
|
|
109
122
|
u.leadingIcon ? (h(), o(_(u.leadingIcon), {
|
|
110
123
|
key: 1,
|
|
111
124
|
class: p(H.value.icon()),
|
|
112
125
|
"aria-hidden": "true"
|
|
113
126
|
}, null, 8, ["class"])) : s("", !0),
|
|
114
|
-
l(y(
|
|
127
|
+
l(y(M).Input, f({
|
|
115
128
|
ref_key: "control",
|
|
116
129
|
ref: Y,
|
|
117
130
|
modelValue: D.value,
|
|
@@ -119,7 +132,7 @@ var M = [
|
|
|
119
132
|
}, U.value.rest, {
|
|
120
133
|
class: H.value.control(),
|
|
121
134
|
disabled: B.value || void 0,
|
|
122
|
-
"aria-invalid":
|
|
135
|
+
"aria-invalid": F.value || void 0,
|
|
123
136
|
"aria-describedby": J.value,
|
|
124
137
|
"aria-busy": u.loading || void 0,
|
|
125
138
|
onInput: t[1] ||= (e) => W.value = e.target.value
|
|
@@ -151,7 +164,7 @@ var M = [
|
|
|
151
164
|
"success",
|
|
152
165
|
"classes"
|
|
153
166
|
])) : s("", !0),
|
|
154
|
-
|
|
167
|
+
F.value ? (h(), o(y(w), {
|
|
155
168
|
key: 3,
|
|
156
169
|
class: p(H.value.statusIcon()),
|
|
157
170
|
"aria-hidden": "true"
|
|
@@ -160,9 +173,9 @@ var M = [
|
|
|
160
173
|
key: 4,
|
|
161
174
|
id: y(q),
|
|
162
175
|
class: p(H.value.suffix())
|
|
163
|
-
}, v(u.suffix), 11,
|
|
164
|
-
], 14,
|
|
176
|
+
}, v(u.suffix), 11, R)) : s("", !0)
|
|
177
|
+
], 14, I));
|
|
165
178
|
}
|
|
166
179
|
});
|
|
167
180
|
//#endregion
|
|
168
|
-
export {
|
|
181
|
+
export { F as n, z as t };
|