@agrotools1/at-components 0.6.93 → 0.6.95
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/DataTable/DataTable.d.ts +3 -1
- package/dist/DataTable/DataTable.vue.js +2 -2
- package/dist/DataTable/DataTable.vue2.js +46 -40
- package/dist/DataTable/index.d.ts +3 -1
- package/dist/Input/Input.core.d.ts +4 -1
- package/dist/Input/Input.core.vue.js +8 -7
- package/dist/Input/Input.core.vue2.js +88 -73
- package/dist/Input/Input.core.vue3.js +2 -2
- package/dist/Input/index.d.ts +4 -1
- package/dist/Select/Select.core.d.ts +26 -0
- package/dist/Select/Select.core.vue.js +48 -34
- package/dist/Select/Select.core.vue2.js +53 -25
- package/dist/Select/Select.core.vue3.js +4 -0
- package/dist/Select/Single/Select.single.d.ts +11 -0
- package/dist/Select/Single/Select.single.vue.js +22 -21
- package/dist/Select/Single/Select.single.vue2.js +26 -21
- package/dist/Select/index.d.ts +11 -0
- package/dist/Tooltip/Tooltip.d.ts +12 -0
- package/dist/Tooltip/Tooltip.vue.js +20 -17
- package/dist/Tooltip/Tooltip.vue2.js +44 -39
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -246,7 +246,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
246
246
|
}> & {} & {
|
|
247
247
|
setPage(page: number): void;
|
|
248
248
|
} & import('vue').ComponentCustomProperties & {}) | undefined>;
|
|
249
|
-
}, unknown, {}, {
|
|
249
|
+
}, unknown, {}, {
|
|
250
|
+
setPage(page: number): void;
|
|
251
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
250
252
|
"update:selected-items": (items: Array<any>) => boolean;
|
|
251
253
|
"update:table-data": (data: TableData) => boolean;
|
|
252
254
|
"update:table-cell": (data: {
|
|
@@ -2,7 +2,7 @@ import C from "./DataTable.vue2.js";
|
|
|
2
2
|
import { resolveComponent as p, openBlock as t, createElementBlock as o, Fragment as r, createElementVNode as l, mergeProps as S, createBlock as c, createCommentVNode as u, renderSlot as P, withDirectives as A, renderList as d, normalizeClass as g, withKeys as $, toDisplayString as f, resolveDynamicComponent as w, vShow as D, createVNode as I, pushScopeId as T, popScopeId as E } from "vue";
|
|
3
3
|
import "./DataTable.vue3.js";
|
|
4
4
|
import K from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const b = (e) => (T("data-v-
|
|
5
|
+
const b = (e) => (T("data-v-476fccbd"), e = e(), E(), e), z = ["data-align-columns"], L = { role: "rowgroup" }, B = {
|
|
6
6
|
role: "row",
|
|
7
7
|
class: "thead-row"
|
|
8
8
|
}, F = {
|
|
@@ -110,7 +110,7 @@ function Q(e, X, Y, Z, x, ee) {
|
|
|
110
110
|
])) : u("", !0)
|
|
111
111
|
], 64);
|
|
112
112
|
}
|
|
113
|
-
const ae = /* @__PURE__ */ K(C, [["render", Q], ["__scopeId", "data-v-
|
|
113
|
+
const ae = /* @__PURE__ */ K(C, [["render", Q], ["__scopeId", "data-v-476fccbd"]]);
|
|
114
114
|
export {
|
|
115
115
|
ae as default
|
|
116
116
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as k, ref as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { AtTipograph as
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as k, ref as d, reactive as K, provide as p, readonly as j, inject as E, watch as x, onMounted as O, watchEffect as w, h as P, computed as R } from "vue";
|
|
2
|
+
import B from "../Checkbox/Checkbox.vue.js";
|
|
3
|
+
import L from "../Paginator/Paginator.vue.js";
|
|
4
|
+
import { AtTipograph as q } from "../Tipograph/index.js";
|
|
5
|
+
import F from "./Column/Column.vue.js";
|
|
6
6
|
const J = k({
|
|
7
7
|
name: "AtDataTable",
|
|
8
8
|
components: {
|
|
9
|
-
AtText:
|
|
10
|
-
AtColumn:
|
|
11
|
-
AtPaginator:
|
|
9
|
+
AtText: q.Title,
|
|
10
|
+
AtColumn: F,
|
|
11
|
+
AtPaginator: L
|
|
12
12
|
},
|
|
13
13
|
inheritAttrs: !1,
|
|
14
14
|
props: {
|
|
@@ -68,18 +68,18 @@ const J = k({
|
|
|
68
68
|
"update:table-data": (e) => Array.isArray(e),
|
|
69
69
|
"update:table-cell": (e) => typeof e == "object"
|
|
70
70
|
},
|
|
71
|
-
setup(e,
|
|
72
|
-
const
|
|
71
|
+
setup(e, r) {
|
|
72
|
+
const i = d(e.value), h = d([...i.value]), f = d([]), A = d(), m = d(
|
|
73
73
|
null
|
|
74
|
-
),
|
|
75
|
-
|
|
74
|
+
), c = K([]), y = (t) => {
|
|
75
|
+
c.includes(t) || c.push(t);
|
|
76
76
|
};
|
|
77
77
|
p("columns", {
|
|
78
|
-
columns: j(
|
|
78
|
+
columns: j(c),
|
|
79
79
|
updateColumn: y
|
|
80
|
-
}), p("alignColumns", e.alignColumns), p("tableData",
|
|
81
|
-
const
|
|
82
|
-
columns:
|
|
80
|
+
}), p("alignColumns", e.alignColumns), p("tableData", i);
|
|
81
|
+
const g = E("columns", {
|
|
82
|
+
columns: c,
|
|
83
83
|
updateColumn: y
|
|
84
84
|
}), C = (t) => Object.entries(t), s = (t) => {
|
|
85
85
|
try {
|
|
@@ -100,20 +100,20 @@ const J = k({
|
|
|
100
100
|
const l = s(o);
|
|
101
101
|
return [...f.value].includes(l);
|
|
102
102
|
});
|
|
103
|
-
if (
|
|
104
|
-
const { element: o, item: l } =
|
|
105
|
-
(
|
|
103
|
+
if (m.value) {
|
|
104
|
+
const { element: o, item: l } = m.value, n = a.find(
|
|
105
|
+
(u) => s(u) === s(l)
|
|
106
106
|
);
|
|
107
107
|
o.setAttribute("aria-selected", JSON.stringify(!!n));
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
r.emit("update:selected-items", Array.from(a));
|
|
110
110
|
}, D = (t, a) => {
|
|
111
|
-
var
|
|
112
|
-
const o = t.target, { value: l } = o, n = (
|
|
113
|
-
n && (n[a] = l,
|
|
114
|
-
const I = s(
|
|
115
|
-
return I === T ? n :
|
|
116
|
-
}),
|
|
111
|
+
var u;
|
|
112
|
+
const o = t.target, { value: l } = o, n = (u = m.value) == null ? void 0 : u.item;
|
|
113
|
+
n && (n[a] = l, i.value = i.value.map((b) => {
|
|
114
|
+
const I = s(b), T = s(n);
|
|
115
|
+
return I === T ? n : b;
|
|
116
|
+
}), r.emit("update:table-data", i.value), r.emit("update:table-cell", {
|
|
117
117
|
field: a,
|
|
118
118
|
value: l
|
|
119
119
|
}));
|
|
@@ -125,38 +125,44 @@ const J = k({
|
|
|
125
125
|
}
|
|
126
126
|
), O(() => {
|
|
127
127
|
e.withDefaultSelectedItems && v([...e.withDefaultSelectedItems]);
|
|
128
|
-
}),
|
|
129
|
-
e.withSelection ?
|
|
130
|
-
selection: () => B
|
|
128
|
+
}), w(() => {
|
|
129
|
+
e.withSelection ? i.value = [...e.value].map((t) => ({
|
|
130
|
+
selection: () => P(B, {
|
|
131
131
|
modelValue: f.value,
|
|
132
132
|
"onUpdate:modelValue": (a) => v(a),
|
|
133
133
|
val: s(t)
|
|
134
134
|
}),
|
|
135
135
|
...t
|
|
136
|
-
})) :
|
|
137
|
-
}),
|
|
138
|
-
const t = [...
|
|
136
|
+
})) : i.value = [...e.value];
|
|
137
|
+
}), w(() => {
|
|
138
|
+
const t = [...c], a = [...i.value].map((o) => {
|
|
139
139
|
const l = {}, n = Object.keys({ ...o });
|
|
140
|
-
for (const
|
|
141
|
-
n.includes(
|
|
140
|
+
for (const u of t)
|
|
141
|
+
n.includes(u) && (l[u] = o[u]);
|
|
142
142
|
return l;
|
|
143
143
|
});
|
|
144
144
|
h.value = a;
|
|
145
145
|
}), {
|
|
146
|
-
reactiveIsLoading:
|
|
147
|
-
tableData:
|
|
146
|
+
reactiveIsLoading: R(() => e.isLoading),
|
|
147
|
+
tableData: i,
|
|
148
148
|
activeTableData: h,
|
|
149
|
-
columns:
|
|
150
|
-
updateColumn:
|
|
149
|
+
columns: g.columns,
|
|
150
|
+
updateColumn: g.updateColumn,
|
|
151
151
|
internalUpdateColumn: y,
|
|
152
|
-
internalColumns:
|
|
153
|
-
lastHoveredTr:
|
|
152
|
+
internalColumns: c,
|
|
153
|
+
lastHoveredTr: m,
|
|
154
154
|
getEntries: C,
|
|
155
155
|
extractKey: s,
|
|
156
156
|
updateOnKeyDown: D,
|
|
157
157
|
handleTrClick: S,
|
|
158
158
|
paginatorRef: A
|
|
159
159
|
};
|
|
160
|
+
},
|
|
161
|
+
methods: {
|
|
162
|
+
setPage(e) {
|
|
163
|
+
var r;
|
|
164
|
+
(r = this.paginatorRef) == null || r.setPage(e);
|
|
165
|
+
}
|
|
160
166
|
}
|
|
161
167
|
});
|
|
162
168
|
export {
|
|
@@ -244,7 +244,9 @@ export declare const AtDataTable: {
|
|
|
244
244
|
}> & {} & {
|
|
245
245
|
setPage(page: number): void;
|
|
246
246
|
} & import('vue').ComponentCustomProperties & {}) | undefined>;
|
|
247
|
-
}, unknown, {}, {
|
|
247
|
+
}, unknown, {}, {
|
|
248
|
+
setPage(page: number): void;
|
|
249
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
248
250
|
"update:selected-items": (items: any[]) => boolean;
|
|
249
251
|
"update:table-data": (data: {
|
|
250
252
|
[key: string]: unknown;
|
|
@@ -6259,7 +6259,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
6259
6259
|
}[];
|
|
6260
6260
|
}>;
|
|
6261
6261
|
resizeSelectedItems: () => Promise<void>;
|
|
6262
|
-
|
|
6262
|
+
inputClass: import('vue').ComputedRef<"" | "AT-ITEMS_input">;
|
|
6263
|
+
checkOverflow: () => Promise<void>;
|
|
6264
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("input" | "update:modelValue" | "mouseover" | "clickOutside" | "clearInput" | "overflow")[], "input" | "update:modelValue" | "mouseover" | "clickOutside" | "clearInput" | "overflow", import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
6263
6265
|
modelValue: {
|
|
6264
6266
|
type: StringConstructor;
|
|
6265
6267
|
required: false;
|
|
@@ -6355,6 +6357,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
6355
6357
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
6356
6358
|
onClickOutside?: ((...args: any[]) => any) | undefined;
|
|
6357
6359
|
onClearInput?: ((...args: any[]) => any) | undefined;
|
|
6360
|
+
onOverflow?: ((...args: any[]) => any) | undefined;
|
|
6358
6361
|
}, {
|
|
6359
6362
|
type: string;
|
|
6360
6363
|
required: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import I from "./Input.core.vue2.js";
|
|
2
|
-
import { resolveComponent as
|
|
2
|
+
import { resolveComponent as C, openBlock as n, createElementBlock as l, createElementVNode as i, createTextVNode as a, toDisplayString as t, createCommentVNode as r, Fragment as k, renderList as v, mergeProps as T, normalizeClass as m, createBlock as d, resolveDynamicComponent as y } from "vue";
|
|
3
3
|
import "./Input.core.vue3.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import f from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const $ = ["data-mode", "disabled"], A = ["for"], N = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "AT-INPUT_required"
|
|
8
8
|
}, b = ["title"], F = { class: "AT-INPUT_item_slot" }, O = ["onClick"], P = {
|
|
@@ -13,7 +13,7 @@ const f = ["data-mode", "disabled"], A = ["for"], N = {
|
|
|
13
13
|
class: "AT-INPUT_error-message"
|
|
14
14
|
}, U = ["src"];
|
|
15
15
|
function B(e, s, M, S, z, E) {
|
|
16
|
-
const u =
|
|
16
|
+
const u = C("AtCircleXMarkSolidIcon");
|
|
17
17
|
return n(), l("div", null, [
|
|
18
18
|
i("div", {
|
|
19
19
|
ref: "wrapperEl",
|
|
@@ -36,7 +36,7 @@ function B(e, s, M, S, z, E) {
|
|
|
36
36
|
class: "AT-INPUT_items",
|
|
37
37
|
onClick: s[1] || (s[1] = (...o) => e.handleOnFocus && e.handleOnFocus(...o))
|
|
38
38
|
}, [
|
|
39
|
-
(n(!0), l(
|
|
39
|
+
(n(!0), l(k, null, v(e.selectedItemsController.itemsToRender, (o) => (n(), l("span", {
|
|
40
40
|
key: o.value,
|
|
41
41
|
ref_for: !0,
|
|
42
42
|
ref: "selectedItemsEl",
|
|
@@ -58,6 +58,7 @@ function B(e, s, M, S, z, E) {
|
|
|
58
58
|
id: e.id,
|
|
59
59
|
ref: "inputEl",
|
|
60
60
|
style: { cursor: e.cursor },
|
|
61
|
+
class: e.inputClass,
|
|
61
62
|
disabled: e.$props.disabled || void 0,
|
|
62
63
|
readonly: e.$props.readonly || void 0,
|
|
63
64
|
type: e.type,
|
|
@@ -94,7 +95,7 @@ function B(e, s, M, S, z, E) {
|
|
|
94
95
|
color: e.iconColor
|
|
95
96
|
}, null, 8, ["size", "color"]))
|
|
96
97
|
], 2)) : r("", !0)
|
|
97
|
-
], 40,
|
|
98
|
+
], 40, $),
|
|
98
99
|
e.error.value ? (n(), l("span", h, [
|
|
99
100
|
i("img", {
|
|
100
101
|
src: e.icons.error,
|
|
@@ -104,7 +105,7 @@ function B(e, s, M, S, z, E) {
|
|
|
104
105
|
])) : r("", !0)
|
|
105
106
|
]);
|
|
106
107
|
}
|
|
107
|
-
const X = /* @__PURE__ */
|
|
108
|
+
const X = /* @__PURE__ */ f(I, [["render", B], ["__scopeId", "data-v-5ed72fcb"]]);
|
|
108
109
|
export {
|
|
109
110
|
X as default
|
|
110
111
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { AtCircleXMarkSolidIcon as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as P, ref as u, computed as i, onMounted as X, onBeforeUnmount as H, watchEffect as G, watch as B, nextTick as b } from "vue";
|
|
2
|
+
import { AtCircleXMarkSolidIcon as J } from "../node_modules/.pnpm/@agrotools1_at-icons@0.2.11/node_modules/@agrotools1/at-icons/dist/AtCircleXMarkSolidIcon/index.js";
|
|
3
|
+
import K from "../Icons/icons.js";
|
|
4
|
+
import Q from "./imgs/error.svg.js";
|
|
5
|
+
const ee = P({
|
|
6
6
|
name: "AtCoreInput",
|
|
7
7
|
components: {
|
|
8
|
-
AtCircleXMarkSolidIcon:
|
|
8
|
+
AtCircleXMarkSolidIcon: J
|
|
9
9
|
},
|
|
10
10
|
props: {
|
|
11
11
|
modelValue: {
|
|
@@ -99,125 +99,140 @@ const Z = z({
|
|
|
99
99
|
"input",
|
|
100
100
|
"clickOutside",
|
|
101
101
|
"clearInput",
|
|
102
|
-
"mouseover"
|
|
102
|
+
"mouseover",
|
|
103
|
+
"overflow"
|
|
103
104
|
],
|
|
104
|
-
setup(e, { emit:
|
|
105
|
-
const
|
|
106
|
-
() => e.useClearButton && a.value && e.modelValue && !
|
|
107
|
-
),
|
|
108
|
-
() => e.useSideClearButton && !e.useClearButton && e.modelValue && !
|
|
109
|
-
),
|
|
105
|
+
setup(e, { emit: s }) {
|
|
106
|
+
const q = { ...K }, E = u(null), f = u(null), v = u(null), S = u(null), F = i(() => e.error), a = u(!1), d = u(""), c = u(!1), L = u(!1), k = i(
|
|
107
|
+
() => e.useClearButton && a.value && e.modelValue && !c.value
|
|
108
|
+
), T = i(
|
|
109
|
+
() => e.useSideClearButton && !e.useClearButton && e.modelValue && !c.value
|
|
110
|
+
), h = u({
|
|
110
111
|
supportedItems: e.selectedItems.length,
|
|
111
112
|
isCounterActive: !1,
|
|
112
113
|
itemsToRender: e.selectedItems
|
|
113
|
-
}),
|
|
114
|
+
}), _ = Math.random().toString(36).substring(2), o = u(!1), W = () => {
|
|
114
115
|
o.value = !0;
|
|
115
|
-
},
|
|
116
|
+
}, x = () => {
|
|
116
117
|
o.value = !1;
|
|
117
118
|
}, g = () => {
|
|
118
119
|
a.value = !0;
|
|
119
|
-
},
|
|
120
|
-
e.forceFocus || (e.forceEventClearButton ? a.value = !0 :
|
|
120
|
+
}, m = () => {
|
|
121
|
+
e.forceFocus || (e.forceEventClearButton ? a.value = !0 : A(() => {
|
|
121
122
|
a.value = !1;
|
|
122
123
|
}, 100)());
|
|
123
|
-
},
|
|
124
|
-
var
|
|
125
|
-
|
|
126
|
-
const t = (
|
|
124
|
+
}, I = async () => {
|
|
125
|
+
var M;
|
|
126
|
+
h.value.itemsToRender = e.selectedItems, await b();
|
|
127
|
+
const t = (M = v.value) == null ? void 0 : M.clientWidth;
|
|
127
128
|
if (t === void 0)
|
|
128
129
|
return;
|
|
129
130
|
let l = 50, n = 0;
|
|
130
|
-
const r =
|
|
131
|
+
const r = S.value;
|
|
131
132
|
if (r)
|
|
132
|
-
for (let
|
|
133
|
-
l += r[
|
|
134
|
-
let
|
|
135
|
-
l >= t ?
|
|
133
|
+
for (let y = 0; y < r.length; y++)
|
|
134
|
+
l += r[y].clientWidth + 10, l <= t && (n = y + 1);
|
|
135
|
+
let w;
|
|
136
|
+
l >= t ? w = {
|
|
136
137
|
isCounterActive: l > (t || 0),
|
|
137
138
|
supportedItems: n,
|
|
138
139
|
itemsToRender: e.selectedItems.slice(0, n)
|
|
139
|
-
} :
|
|
140
|
+
} : w = {
|
|
140
141
|
isCounterActive: l > (t || 0),
|
|
141
142
|
supportedItems: e.selectedItems.length,
|
|
142
143
|
itemsToRender: e.selectedItems
|
|
143
|
-
},
|
|
144
|
-
},
|
|
144
|
+
}, h.value = w;
|
|
145
|
+
}, O = (t) => {
|
|
145
146
|
var l, n;
|
|
146
|
-
!((l =
|
|
147
|
+
!((l = E.value) != null && l.contains(t.target)) && !((n = f.value) != null && n.contains(t.target)) && !k.value && !c.value && (m(), a.value = !1, s("clickOutside"));
|
|
148
|
+
}, C = async () => {
|
|
149
|
+
if (await b(), f.value) {
|
|
150
|
+
const t = f.value.scrollWidth > f.value.clientWidth;
|
|
151
|
+
L.value = t, s("overflow", t);
|
|
152
|
+
}
|
|
147
153
|
};
|
|
148
|
-
|
|
154
|
+
X(() => {
|
|
149
155
|
var t;
|
|
150
|
-
(e.modelValue !== void 0 && ((t = e.modelValue) != null && t.length) || e.forceFocus) && g(), document.addEventListener("click",
|
|
151
|
-
}),
|
|
152
|
-
document.removeEventListener("click",
|
|
156
|
+
(e.modelValue !== void 0 && ((t = e.modelValue) != null && t.length) || e.forceFocus) && g(), document.addEventListener("click", O), window.addEventListener("resize", I);
|
|
157
|
+
}), H(() => {
|
|
158
|
+
document.removeEventListener("click", O), window.removeEventListener("resize", I);
|
|
153
159
|
});
|
|
154
|
-
const
|
|
160
|
+
const R = (t) => {
|
|
155
161
|
e.preventInputEvent && t.preventDefault();
|
|
156
162
|
const l = t.target.value;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
163
|
+
s("input", t), e.debounce > 0 ? A(() => V(l), e.debounce)() : V(l), b(() => {
|
|
164
|
+
C();
|
|
165
|
+
});
|
|
166
|
+
}, V = (t) => {
|
|
167
|
+
s("update:modelValue", t), e.modelValue === void 0 && (d.value = t);
|
|
160
168
|
};
|
|
161
|
-
function
|
|
169
|
+
function A(t, l) {
|
|
162
170
|
let n;
|
|
163
171
|
return function() {
|
|
164
172
|
clearTimeout(n), n = setTimeout(t, l);
|
|
165
173
|
};
|
|
166
174
|
}
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
e.forceEventClearButton ||
|
|
175
|
+
const j = () => {
|
|
176
|
+
c.value = !0, a.value = !1, s("clearInput"), setTimeout(() => {
|
|
177
|
+
e.forceEventClearButton || V(""), c.value = !1;
|
|
170
178
|
}, 100);
|
|
171
179
|
};
|
|
172
|
-
|
|
180
|
+
G(() => {
|
|
173
181
|
var t, l;
|
|
174
|
-
e.separator && ((e.modelValue !== void 0 ? e.modelValue.split(e.separator).filter((r) => r.length > 1) :
|
|
175
|
-
}),
|
|
182
|
+
e.separator && ((e.modelValue !== void 0 ? e.modelValue.split(e.separator).filter((r) => r.length > 1) : d.value.split(e.separator).filter((r) => r.length > 1)).length ? (t = v.value) == null || t.classList.remove("AT-INPUT_items_empty") : ((l = v.value) == null || l.classList.add("AT-INPUT_items_empty"), m(), a.value = !1)), e.forceFocus ? g() : (m(), a.value = !1);
|
|
183
|
+
}), B(
|
|
176
184
|
() => e.selectedItems,
|
|
177
185
|
async () => {
|
|
178
|
-
await
|
|
186
|
+
await I();
|
|
179
187
|
},
|
|
180
188
|
{ deep: !0 }
|
|
181
|
-
),
|
|
189
|
+
), B(
|
|
182
190
|
() => o.value,
|
|
183
191
|
() => {
|
|
184
|
-
|
|
192
|
+
s("mouseover", o.value);
|
|
193
|
+
}
|
|
194
|
+
), B(
|
|
195
|
+
() => e.modelValue,
|
|
196
|
+
() => {
|
|
197
|
+
C();
|
|
185
198
|
}
|
|
186
199
|
);
|
|
187
|
-
const
|
|
200
|
+
const z = i(() => {
|
|
188
201
|
var t;
|
|
189
|
-
return e.disabled ? "var(--at-medium-grey)" : e.selectedItems.length > 0 ? "var(--at-black)" : a.value ? "var(--at-primary-color-2)" : e.error.value ? "var(--at-error)" : o.value || (t = e.icon) != null && t.color || e.modelValue !== void 0 && e.modelValue.length > 0 ||
|
|
190
|
-
}),
|
|
202
|
+
return e.disabled ? "var(--at-medium-grey)" : e.selectedItems.length > 0 ? "var(--at-black)" : a.value ? "var(--at-primary-color-2)" : e.error.value ? "var(--at-error)" : o.value || (t = e.icon) != null && t.color || e.modelValue !== void 0 && e.modelValue.length > 0 || d.value.length > 0 ? "var(--at-black)" : "var(--at-dark-grey)";
|
|
203
|
+
}), N = i(() => e.disabled ? "disabled" : e.selectedItems.length > 0 ? "filled" : a.value ? "focused" : e.error.value ? "error" : o.value ? "hover" : e.modelValue !== void 0 && e.modelValue.length > 0 || d.value.length > 0 ? "filled" : "default"), U = i(() => e.modelValue !== void 0 ? e.modelValue : d.value ? d.value : null), D = i(() => T.value === !0 ? "AT-ITEMS_input" : "");
|
|
191
204
|
return {
|
|
192
|
-
wrapperEl:
|
|
193
|
-
inputEl:
|
|
194
|
-
inputError:
|
|
195
|
-
inputId: e.id ??
|
|
205
|
+
wrapperEl: E,
|
|
206
|
+
inputEl: f,
|
|
207
|
+
inputError: F,
|
|
208
|
+
inputId: e.id ?? _,
|
|
196
209
|
handleOnFocus: g,
|
|
197
|
-
handleOnFocusOut:
|
|
210
|
+
handleOnFocusOut: m,
|
|
198
211
|
icons: {
|
|
199
|
-
error:
|
|
200
|
-
...
|
|
212
|
+
error: Q,
|
|
213
|
+
...q
|
|
201
214
|
},
|
|
202
|
-
clickedClear:
|
|
203
|
-
showClearButton:
|
|
204
|
-
showSideClearButton:
|
|
205
|
-
clearInput:
|
|
206
|
-
containerItemsEl:
|
|
207
|
-
onInput:
|
|
208
|
-
iconColor:
|
|
215
|
+
clickedClear: c,
|
|
216
|
+
showClearButton: k,
|
|
217
|
+
showSideClearButton: T,
|
|
218
|
+
clearInput: j,
|
|
219
|
+
containerItemsEl: v,
|
|
220
|
+
onInput: R,
|
|
221
|
+
iconColor: z,
|
|
209
222
|
isFocused: a,
|
|
210
|
-
handleMouseOver:
|
|
211
|
-
handleMouseLeave:
|
|
223
|
+
handleMouseOver: W,
|
|
224
|
+
handleMouseLeave: x,
|
|
212
225
|
isHovered: o,
|
|
213
|
-
inputComputedValue:
|
|
214
|
-
currentMode:
|
|
215
|
-
selectedItemsEl:
|
|
216
|
-
selectedItemsController:
|
|
217
|
-
resizeSelectedItems:
|
|
226
|
+
inputComputedValue: U,
|
|
227
|
+
currentMode: N,
|
|
228
|
+
selectedItemsEl: S,
|
|
229
|
+
selectedItemsController: h,
|
|
230
|
+
resizeSelectedItems: I,
|
|
231
|
+
inputClass: D,
|
|
232
|
+
checkOverflow: C
|
|
218
233
|
};
|
|
219
234
|
}
|
|
220
235
|
});
|
|
221
236
|
export {
|
|
222
|
-
|
|
237
|
+
ee as default
|
|
223
238
|
};
|
package/dist/Input/index.d.ts
CHANGED
|
@@ -6246,7 +6246,9 @@ export declare const AtInput: {
|
|
|
6246
6246
|
}[];
|
|
6247
6247
|
}>;
|
|
6248
6248
|
resizeSelectedItems: () => Promise<void>;
|
|
6249
|
-
|
|
6249
|
+
inputClass: import('vue').ComputedRef<"" | "AT-ITEMS_input">;
|
|
6250
|
+
checkOverflow: () => Promise<void>;
|
|
6251
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("input" | "update:modelValue" | "mouseover" | "clickOutside" | "clearInput" | "overflow")[], "input" | "update:modelValue" | "mouseover" | "clickOutside" | "clearInput" | "overflow", import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
6250
6252
|
modelValue: {
|
|
6251
6253
|
type: StringConstructor;
|
|
6252
6254
|
required: false;
|
|
@@ -6348,6 +6350,7 @@ export declare const AtInput: {
|
|
|
6348
6350
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
6349
6351
|
onClickOutside?: ((...args: any[]) => any) | undefined;
|
|
6350
6352
|
onClearInput?: ((...args: any[]) => any) | undefined;
|
|
6353
|
+
onOverflow?: ((...args: any[]) => any) | undefined;
|
|
6351
6354
|
}, {
|
|
6352
6355
|
type: string;
|
|
6353
6356
|
required: boolean;
|
|
@@ -63,6 +63,17 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
63
63
|
required: false;
|
|
64
64
|
default: boolean;
|
|
65
65
|
};
|
|
66
|
+
showTooltipOnOverflow: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
required: false;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
tooltipPosition: {
|
|
72
|
+
required: false;
|
|
73
|
+
type: () => "bottom-left" | "bottom-center" | "bottom-right" | "top-left" | "top-center" | "top-right" | "left-bottom" | "left-center" | "right-bottom" | "right-center" | undefined;
|
|
74
|
+
default: string;
|
|
75
|
+
validator: (value: string) => boolean;
|
|
76
|
+
};
|
|
66
77
|
}, {
|
|
67
78
|
id: string;
|
|
68
79
|
handleValue: () => string;
|
|
@@ -78,6 +89,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
78
89
|
type: import('vue').ComputedRef<"button" | undefined>;
|
|
79
90
|
inputClass: string;
|
|
80
91
|
isTypable: boolean;
|
|
92
|
+
isOverflowing: import('vue').Ref<boolean>;
|
|
93
|
+
handleOverflow: (value: boolean) => void;
|
|
81
94
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("clearInput" | "update:model-value")[], "clearInput" | "update:model-value", import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
82
95
|
value: {
|
|
83
96
|
type: PropType<string | SelectItemProps>;
|
|
@@ -130,6 +143,17 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
130
143
|
required: false;
|
|
131
144
|
default: boolean;
|
|
132
145
|
};
|
|
146
|
+
showTooltipOnOverflow: {
|
|
147
|
+
type: BooleanConstructor;
|
|
148
|
+
required: false;
|
|
149
|
+
default: boolean;
|
|
150
|
+
};
|
|
151
|
+
tooltipPosition: {
|
|
152
|
+
required: false;
|
|
153
|
+
type: () => "bottom-left" | "bottom-center" | "bottom-right" | "top-left" | "top-center" | "top-right" | "left-bottom" | "left-center" | "right-bottom" | "right-center" | undefined;
|
|
154
|
+
default: string;
|
|
155
|
+
validator: (value: string) => boolean;
|
|
156
|
+
};
|
|
133
157
|
}>> & {
|
|
134
158
|
onClearInput?: ((...args: any[]) => any) | undefined;
|
|
135
159
|
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -143,5 +167,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
143
167
|
isMultiple: boolean;
|
|
144
168
|
customClass: string;
|
|
145
169
|
isTypable: boolean;
|
|
170
|
+
showTooltipOnOverflow: boolean;
|
|
171
|
+
tooltipPosition: "bottom-left" | "bottom-center" | "bottom-right" | "top-left" | "top-center" | "top-right" | "left-bottom" | "left-center" | "right-bottom" | "right-center" | undefined;
|
|
146
172
|
}, {}>;
|
|
147
173
|
export default _default;
|