@ironsource/shared-ui 2.1.7-rc.12 → 2.1.7-rc.14
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/SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css +1 -0
- package/TabsV4.vue_vue_type_style_index_0_scoped_f9433b11_lang.css +1 -0
- package/components/sortableList/SortableList.vue.d.ts +8 -0
- package/components/sortableList/SortableList.vue.js +3 -3
- package/components/sortableList/SortableList.vue2.js +70 -66
- package/components/sortableList/index.d.ts +28 -1
- package/components/tabs/v4/TabsV4.vue.js +4 -4
- package/components/tabs/v4/TabsV4.vue2.js +37 -40
- package/index.d.ts +56 -2
- package/package.json +1 -1
- package/SortableList.vue_vue_type_style_index_0_scoped_402063dc_lang.css +0 -1
- package/TabsV4.vue_vue_type_style_index_0_scoped_bab40cfe_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.list-search[data-v-e9cd63b8]{margin-bottom:var(--spacing-100)}.sortable-list[data-v-e9cd63b8],.locked-list[data-v-e9cd63b8]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:var(--spacing-75);color:var(--text-primary)}.locked-list[data-v-e9cd63b8]{margin-top:var(--spacing-75)}.force-grabbing-cursor *[data-v-e9cd63b8]{cursor:move!important;cursor:-webkit-grabbing!important;cursor:-moz-grabbing!important;cursor:grabbing!important}.empty-state-title[data-v-e9cd63b8]{color:var(--text-disabled);padding:0 8px;width:100%}.loader-bars[data-v-e9cd63b8]{display:flex;flex-direction:column;gap:6px}.loader-bars .loader-bar[data-v-e9cd63b8]{height:40px;width:100%}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.tabs-list[data-v-f9433b11]{position:relative;padding:0;margin:0}.tabs-list--page[data-v-f9433b11]{border-bottom:1px solid var(--common-divider);box-sizing:border-box}.tabs-list--page .tab-item[data-v-f9433b11]{padding:0;margin-right:var(--spacing-200);min-height:calc(var(--spacing-600) - 1px)}.tabs-list--page .tabs-border-line[data-v-f9433b11]{margin-top:-1px}.tabs-border-line[data-v-f9433b11]{left:var(--167b065e);width:var(--8cfadb62);border-bottom:2px solid var(--primary-main);transition:left .2s ease-in-out,width .2s;position:absolute;margin-top:-2px}.tab-item[data-v-f9433b11]{display:inline-flex;flex-direction:row;justify-content:center;align-items:center;color:var(--action-active);gap:var(--spacing-100);vertical-align:middle;padding:0 var(--spacing-300);min-height:var(--spacing-600)}.tab-item[data-v-f9433b11]:hover{cursor:pointer;color:var(--text-primary)}.tab-item--active[data-v-f9433b11]{color:var(--text-primary)}.tab-item--disabled[data-v-f9433b11]{color:var(--action-disabled);cursor:not-allowed;pointer-events:none}
|
|
@@ -28,6 +28,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
28
28
|
emptyStateTitle: string;
|
|
29
29
|
testId: string;
|
|
30
30
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
sortableItemDragged: (event: {
|
|
32
|
+
id: string;
|
|
33
|
+
newIndex: number;
|
|
34
|
+
}) => void;
|
|
31
35
|
"update:items": (items: SortableListItem[]) => void;
|
|
32
36
|
"update:openId": (id: string | number) => void;
|
|
33
37
|
"update:selectedId": (id: string | number) => void;
|
|
@@ -63,6 +67,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
63
67
|
emptyStateTitle: string;
|
|
64
68
|
testId: string;
|
|
65
69
|
}>>> & {
|
|
70
|
+
onSortableItemDragged?: (event: {
|
|
71
|
+
id: string;
|
|
72
|
+
newIndex: number;
|
|
73
|
+
}) => any;
|
|
66
74
|
"onUpdate:items"?: (items: SortableListItem[]) => any;
|
|
67
75
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
68
76
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SortableList.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../SortableList.
|
|
4
|
-
const c = /* @__PURE__ */
|
|
2
|
+
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css"; //*');
|
|
4
|
+
const c = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e9cd63b8"]]);
|
|
5
5
|
export {
|
|
6
6
|
c as default
|
|
7
7
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "../../SortableList.
|
|
1
|
+
import "../../SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css"; import { defineComponent as F, computed as f, ref as P, openBlock as s, createElementBlock as i, mergeProps as T, unref as l, createBlock as g, isRef as N, createCommentVNode as y, withCtx as m, Fragment as V, renderList as D, renderSlot as S, createElementVNode as G, createVNode as $, createTextVNode as U, toDisplayString as M } from "vue";
|
|
2
2
|
import { VueDraggable as K } from "vue-draggable-plus";
|
|
3
|
-
import
|
|
3
|
+
import w from "./SortableItem.vue.js";
|
|
4
4
|
import Q from "../search/v4/SearchV4.vue.js";
|
|
5
5
|
import j from "../typography/v4/Typography.vue.js";
|
|
6
6
|
import z from "../skeleton/v4/SkeletonV4.vue.js";
|
|
7
7
|
import { useVModel as J } from "@vueuse/core";
|
|
8
|
-
import { matchString as
|
|
8
|
+
import { matchString as x } from "../../utils/search.js";
|
|
9
9
|
import { useTestIdAttrs as W } from "../../utils/testIds.js";
|
|
10
10
|
import { SortableListTestIdModifiers as I } from "../../testids/index.js";
|
|
11
|
-
import { DRAG_CURSOR_CSS_CLASS as
|
|
11
|
+
import { DRAG_CURSOR_CSS_CLASS as q } from "./consts.js";
|
|
12
12
|
const X = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "sortable-list-container"
|
|
15
15
|
}, Y = { class: "loader-bars" }, Z = {
|
|
16
16
|
key: 3,
|
|
17
17
|
class: "empty-state-title"
|
|
18
|
-
},
|
|
18
|
+
}, ue = /* @__PURE__ */ F({
|
|
19
19
|
__name: "SortableList",
|
|
20
20
|
props: {
|
|
21
21
|
items: { default: () => [] },
|
|
@@ -32,115 +32,119 @@ const X = {
|
|
|
32
32
|
emptyStateTitle: { default: "No results" },
|
|
33
33
|
testId: { default: "" }
|
|
34
34
|
},
|
|
35
|
-
emits: ["update:items", "update:openId", "update:selectedId", "update:selectedChildId", "update:search", "clearSearch"],
|
|
35
|
+
emits: ["sortableItemDragged", "update:items", "update:openId", "update:selectedId", "update:selectedChildId", "update:search", "clearSearch"],
|
|
36
36
|
setup(d, { emit: o }) {
|
|
37
|
-
const
|
|
38
|
-
const a =
|
|
39
|
-
return
|
|
40
|
-
a.some((
|
|
41
|
-
}) :
|
|
37
|
+
const n = d, u = J(n, "search", o), v = f(() => !!u.value?.trim()), C = f(() => v.value ? n.items.filter((t) => {
|
|
38
|
+
const a = t.children || [], e = u.value;
|
|
39
|
+
return n.searchHandler ? n.searchHandler(t, e) : x(t.displayText, e) || // match parent item
|
|
40
|
+
a.some((r) => x(r.displayText, e));
|
|
41
|
+
}) : n.items), h = f({
|
|
42
42
|
get() {
|
|
43
|
-
return C.value.filter((
|
|
43
|
+
return C.value.filter((t) => !t.isLocked);
|
|
44
44
|
},
|
|
45
|
-
set(
|
|
46
|
-
o("update:items", [...
|
|
45
|
+
set(t) {
|
|
46
|
+
o("update:items", [...t, ...b.value]);
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
49
|
-
() => C.value.filter((
|
|
50
|
-
),
|
|
51
|
-
|
|
52
|
-
}, O = (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
48
|
+
}), b = f(
|
|
49
|
+
() => C.value.filter((t) => t.isLocked)
|
|
50
|
+
), k = P(!1), H = (t) => {
|
|
51
|
+
k.value = !0, setTimeout(() => t.target.classList.add(q), 50);
|
|
52
|
+
}, O = (t) => {
|
|
53
|
+
const { target: a, item: e, newIndex: r } = t;
|
|
54
|
+
k.value = !1, a.classList.remove(q);
|
|
55
|
+
const c = e.attributes["data-id"]?.value;
|
|
56
|
+
o("sortableItemDragged", { id: c, newIndex: r });
|
|
57
|
+
}, R = (t) => (v.value || t.id === n.openId) && !k.value, A = (t, a) => {
|
|
58
|
+
a ? o("update:openId", t.id) : o("update:openId", null);
|
|
59
|
+
}, p = (t) => t.id === n.selectedId, B = (t) => {
|
|
60
|
+
o("update:selectedId", t.id), o("update:selectedChildId", null);
|
|
61
|
+
}, E = (t, a) => {
|
|
62
|
+
o("update:selectedChildId", t.id), o("update:selectedId", a.id), o("update:openId", a.id);
|
|
63
|
+
}, L = W(n.testId, I);
|
|
64
|
+
return (t, a) => (s(), i("div", T({ class: "sortable-list-and-search-container" }, l(L)[l(I).CONTAINER]), [
|
|
65
|
+
d.showSearch ? (s(), g(l(Q), {
|
|
63
66
|
key: 0,
|
|
64
|
-
modelValue:
|
|
65
|
-
"onUpdate:modelValue": a[0] || (a[0] = (e) => N(
|
|
67
|
+
modelValue: l(u),
|
|
68
|
+
"onUpdate:modelValue": a[0] || (a[0] = (e) => N(u) ? u.value = e : null),
|
|
66
69
|
class: "list-search",
|
|
67
70
|
placeholder: d.searchPlaceholder,
|
|
68
71
|
"test-id": d.testId,
|
|
69
72
|
onOnClear: a[1] || (a[1] = (e) => o("clearSearch"))
|
|
70
73
|
}, null, 8, ["modelValue", "placeholder", "test-id"])) : y("", !0),
|
|
71
|
-
d.isLoading ? S(
|
|
74
|
+
d.isLoading ? S(t.$slots, "loader", { key: 2 }, () => [
|
|
72
75
|
G("div", Y, [
|
|
73
|
-
(s(!0),
|
|
74
|
-
$(
|
|
76
|
+
(s(!0), i(V, null, D(d.loadingRowCount, (e) => (s(), i("div", { key: e }, [
|
|
77
|
+
$(l(z), {
|
|
75
78
|
round: "",
|
|
76
79
|
class: "loader-bar"
|
|
77
80
|
})
|
|
78
81
|
]))), 128))
|
|
79
82
|
])
|
|
80
|
-
], !0) : (s(),
|
|
81
|
-
|
|
83
|
+
], !0) : (s(), i("div", X, [
|
|
84
|
+
l(h).length ? (s(), g(l(K), T({
|
|
82
85
|
key: 0,
|
|
83
|
-
modelValue:
|
|
84
|
-
"onUpdate:modelValue": a[2] || (a[2] = (e) => N(
|
|
86
|
+
modelValue: l(h),
|
|
87
|
+
"onUpdate:modelValue": a[2] || (a[2] = (e) => N(h) ? h.value = e : null),
|
|
85
88
|
class: "sortable-list",
|
|
86
89
|
filter: ".expand-icon",
|
|
87
90
|
animation: 150,
|
|
88
91
|
handle: ".draggable-handle",
|
|
89
|
-
disabled:
|
|
90
|
-
},
|
|
92
|
+
disabled: l(v)
|
|
93
|
+
}, l(L)[l(I).DRAGGABLE_LIST], {
|
|
91
94
|
onStart: H,
|
|
92
95
|
onEnd: O
|
|
93
96
|
}), {
|
|
94
97
|
default: m(() => [
|
|
95
|
-
(s(!0),
|
|
98
|
+
(s(!0), i(V, null, D(l(h), (e, r) => (s(), g(w, {
|
|
96
99
|
key: e.id,
|
|
100
|
+
"data-id": e.id,
|
|
97
101
|
item: e,
|
|
98
|
-
index:
|
|
99
|
-
"is-open":
|
|
100
|
-
"is-selected":
|
|
101
|
-
"selected-child-id":
|
|
102
|
+
index: r,
|
|
103
|
+
"is-open": R(e),
|
|
104
|
+
"is-selected": p(e),
|
|
105
|
+
"selected-child-id": p(e) ? d.selectedChildId : null,
|
|
102
106
|
"display-value": d.displayValue,
|
|
103
|
-
"search-query":
|
|
107
|
+
"search-query": l(u),
|
|
104
108
|
"search-handler": d.searchHandler,
|
|
105
|
-
onToggle: (
|
|
106
|
-
onSelect: (
|
|
107
|
-
onSelectChild: (
|
|
109
|
+
onToggle: (c) => A(e, c),
|
|
110
|
+
onSelect: (c) => B(e),
|
|
111
|
+
onSelectChild: (c) => E(c, e)
|
|
108
112
|
}, {
|
|
109
113
|
menu: m(() => [
|
|
110
|
-
S(
|
|
114
|
+
S(t.$slots, "menu", { item: e }, void 0, !0)
|
|
111
115
|
]),
|
|
112
116
|
_: 2
|
|
113
|
-
}, 1032, ["item", "index", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "search-handler", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
117
|
+
}, 1032, ["data-id", "item", "index", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "search-handler", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
114
118
|
]),
|
|
115
119
|
_: 3
|
|
116
120
|
}, 16, ["modelValue", "disabled"])) : y("", !0),
|
|
117
|
-
|
|
121
|
+
l(b).length ? (s(), i("div", T({
|
|
118
122
|
key: 1,
|
|
119
123
|
class: "locked-list"
|
|
120
|
-
},
|
|
121
|
-
(s(!0),
|
|
124
|
+
}, l(L)[l(I).LOCKED_LIST]), [
|
|
125
|
+
(s(!0), i(V, null, D(l(b), (e) => (s(), g(w, {
|
|
122
126
|
key: e.id,
|
|
123
127
|
item: e,
|
|
124
|
-
"is-open":
|
|
125
|
-
"is-selected":
|
|
126
|
-
"selected-child-id":
|
|
128
|
+
"is-open": R(e),
|
|
129
|
+
"is-selected": p(e),
|
|
130
|
+
"selected-child-id": p(e) ? d.selectedChildId : null,
|
|
127
131
|
"display-value": d.displayValue,
|
|
128
|
-
"search-query":
|
|
132
|
+
"search-query": l(u),
|
|
129
133
|
"on-search": d.searchHandler,
|
|
130
|
-
onToggle: (
|
|
131
|
-
onSelect: (
|
|
132
|
-
onSelectChild: (
|
|
134
|
+
onToggle: (r) => A(e, r),
|
|
135
|
+
onSelect: (r) => B(e),
|
|
136
|
+
onSelectChild: (r) => E(r, e)
|
|
133
137
|
}, {
|
|
134
138
|
menu: m(() => [
|
|
135
|
-
S(
|
|
139
|
+
S(t.$slots, "menu", { item: e }, void 0, !0)
|
|
136
140
|
]),
|
|
137
141
|
_: 2
|
|
138
142
|
}, 1032, ["item", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "on-search", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
139
143
|
], 16)) : y("", !0)
|
|
140
144
|
])),
|
|
141
|
-
!
|
|
142
|
-
S(
|
|
143
|
-
$(
|
|
145
|
+
!l(C).length && !d.isLoading ? (s(), i("div", Z, [
|
|
146
|
+
S(t.$slots, "empty-state", {}, () => [
|
|
147
|
+
$(l(j), { variant: "body2" }, {
|
|
144
148
|
default: m(() => [
|
|
145
149
|
U(M(d.emptyStateTitle), 1)
|
|
146
150
|
]),
|
|
@@ -152,5 +156,5 @@ const X = {
|
|
|
152
156
|
}
|
|
153
157
|
});
|
|
154
158
|
export {
|
|
155
|
-
|
|
159
|
+
ue as default
|
|
156
160
|
};
|
|
@@ -73,6 +73,10 @@ declare const SortableListTypes: () => ({
|
|
|
73
73
|
default: string;
|
|
74
74
|
};
|
|
75
75
|
}>> & {
|
|
76
|
+
onSortableItemDragged?: (event: {
|
|
77
|
+
id: string;
|
|
78
|
+
newIndex: number;
|
|
79
|
+
}) => any;
|
|
76
80
|
"onUpdate:items"?: (items: import("./SortableList.types").SortableListItem[]) => any;
|
|
77
81
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
78
82
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -91,7 +95,10 @@ declare const SortableListTypes: () => ({
|
|
|
91
95
|
}>;
|
|
92
96
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
93
97
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
94
|
-
$emit: ((event: "
|
|
98
|
+
$emit: ((event: "sortableItemDragged", event: {
|
|
99
|
+
id: string;
|
|
100
|
+
newIndex: number;
|
|
101
|
+
}) => void) & ((event: "update:items", items: import("./SortableList.types").SortableListItem[]) => void) & ((event: "update:openId", id: string | number) => void) & ((event: "update:selectedId", id: string | number) => void) & ((event: "update:selectedChildId", id: string | number) => void) & ((event: "update:search", query: string) => void) & ((event: "clearSearch") => void);
|
|
95
102
|
$el: any;
|
|
96
103
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
97
104
|
search: {
|
|
@@ -149,6 +156,10 @@ declare const SortableListTypes: () => ({
|
|
|
149
156
|
default: string;
|
|
150
157
|
};
|
|
151
158
|
}>> & {
|
|
159
|
+
onSortableItemDragged?: (event: {
|
|
160
|
+
id: string;
|
|
161
|
+
newIndex: number;
|
|
162
|
+
}) => any;
|
|
152
163
|
"onUpdate:items"?: (items: import("./SortableList.types").SortableListItem[]) => any;
|
|
153
164
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
154
165
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -156,6 +167,10 @@ declare const SortableListTypes: () => ({
|
|
|
156
167
|
"onUpdate:search"?: (query: string) => any;
|
|
157
168
|
onClearSearch?: () => any;
|
|
158
169
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
170
|
+
sortableItemDragged: (event: {
|
|
171
|
+
id: string;
|
|
172
|
+
newIndex: number;
|
|
173
|
+
}) => void;
|
|
159
174
|
"update:items": (items: import("./SortableList.types").SortableListItem[]) => void;
|
|
160
175
|
"update:openId": (id: string | number) => void;
|
|
161
176
|
"update:selectedId": (id: string | number) => void;
|
|
@@ -252,6 +267,10 @@ declare const SortableListTypes: () => ({
|
|
|
252
267
|
default: string;
|
|
253
268
|
};
|
|
254
269
|
}>> & {
|
|
270
|
+
onSortableItemDragged?: (event: {
|
|
271
|
+
id: string;
|
|
272
|
+
newIndex: number;
|
|
273
|
+
}) => any;
|
|
255
274
|
"onUpdate:items"?: (items: import("./SortableList.types").SortableListItem[]) => any;
|
|
256
275
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
257
276
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -318,6 +337,10 @@ declare const SortableListTypes: () => ({
|
|
|
318
337
|
default: string;
|
|
319
338
|
};
|
|
320
339
|
}>> & {
|
|
340
|
+
onSortableItemDragged?: (event: {
|
|
341
|
+
id: string;
|
|
342
|
+
newIndex: number;
|
|
343
|
+
}) => any;
|
|
321
344
|
"onUpdate:items"?: (items: import("./SortableList.types").SortableListItem[]) => any;
|
|
322
345
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
323
346
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -325,6 +348,10 @@ declare const SortableListTypes: () => ({
|
|
|
325
348
|
"onUpdate:search"?: (query: string) => any;
|
|
326
349
|
onClearSearch?: () => any;
|
|
327
350
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
351
|
+
sortableItemDragged: (event: {
|
|
352
|
+
id: string;
|
|
353
|
+
newIndex: number;
|
|
354
|
+
}) => void;
|
|
328
355
|
"update:items": (items: import("./SortableList.types").SortableListItem[]) => void;
|
|
329
356
|
"update:openId": (id: string | number) => void;
|
|
330
357
|
"update:selectedId": (id: string | number) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TabsV4.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../TabsV4.
|
|
4
|
-
const
|
|
2
|
+
/* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../TabsV4.vue_vue_type_style_index_0_scoped_f9433b11_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ _(o, [["__scopeId", "data-v-f9433b11"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../../../TabsV4.
|
|
2
|
-
import
|
|
3
|
-
import { TabsTestIdModifiers as
|
|
1
|
+
import "../../../TabsV4.vue_vue_type_style_index_0_scoped_f9433b11_lang.css"; import { defineComponent as x, useCssVars as y, ref as l, watch as C, nextTick as $, openBlock as o, createElementBlock as c, mergeProps as w, unref as s, Fragment as A, renderList as S, normalizeClass as g, renderSlot as V, createBlock as B, withCtx as M, createTextVNode as N, toDisplayString as R, createCommentVNode as _, pushScopeId as E, popScopeId as P, createElementVNode as W } from "vue";
|
|
2
|
+
import H from "../../typography/v4/Typography.vue.js";
|
|
3
|
+
import { TabsTestIdModifiers as m } from "../../../testids/index.js";
|
|
4
4
|
import { tabsCommon as z } from "../common/tabsCommon.js";
|
|
5
5
|
import { useTestIdAttrs as D } from "../../../utils/testIds.js";
|
|
6
|
-
const F = (t) => (
|
|
6
|
+
const F = (t) => (E("data-v-f9433b11"), t = t(), P(), t), U = ["data-testid", "onClick", "onMouseover"], j = /* @__PURE__ */ F(() => /* @__PURE__ */ W("div", { class: "tabs-border-line" }, null, -1)), Q = /* @__PURE__ */ x({
|
|
7
7
|
__name: "TabsV4",
|
|
8
8
|
props: {
|
|
9
9
|
tabsList: { default: () => [] },
|
|
@@ -12,59 +12,56 @@ const F = (t) => (W("data-v-bab40cfe"), t = t(), _(), t), U = ["data-testid", "o
|
|
|
12
12
|
testId: { default: "" }
|
|
13
13
|
},
|
|
14
14
|
emits: ["update:selectedTab"],
|
|
15
|
-
setup(t, { emit:
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
15
|
+
setup(t, { emit: p }) {
|
|
16
|
+
const r = t;
|
|
17
|
+
y((a) => ({
|
|
18
|
+
"167b065e": v.value,
|
|
19
|
+
"8cfadb62": b.value
|
|
20
20
|
}));
|
|
21
|
-
const {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
setHover: I,
|
|
25
|
-
clearHover: u,
|
|
26
|
-
tabsNewList: L,
|
|
27
|
-
getSelectedTabIndex: k
|
|
28
|
-
} = z(a, f), x = D(a.testId, c), d = (o) => o.id === a.selectedTab, m = v(), b = v();
|
|
29
|
-
return w(
|
|
30
|
-
[() => a.variant, () => a.selectedTab, () => a.tabsList],
|
|
21
|
+
const { skipUnwrap: T, selectTab: I, setHover: L, clearHover: u, getSelectedTabIndex: k } = z(r, p), f = l(null), h = D(r.testId, m), i = (a) => a.id === r.selectedTab, b = l(), v = l();
|
|
22
|
+
return C(
|
|
23
|
+
[() => r.variant, () => r.selectedTab, () => r.tabsList],
|
|
31
24
|
async () => {
|
|
32
|
-
const
|
|
25
|
+
const a = k();
|
|
26
|
+
if (a === -1)
|
|
27
|
+
return;
|
|
33
28
|
await $();
|
|
34
|
-
const
|
|
35
|
-
|
|
29
|
+
const e = Array.from(f.value?.children || []).at(a);
|
|
30
|
+
b.value = e?.clientWidth + "px", v.value = e?.offsetLeft + "px";
|
|
36
31
|
},
|
|
37
32
|
{ immediate: !0 }
|
|
38
|
-
), (
|
|
33
|
+
), (a, n) => (o(), c("ul", w({
|
|
34
|
+
ref_key: "tabsListRef",
|
|
35
|
+
ref: f,
|
|
39
36
|
class: ["tabs-list", [`tabs-list--${t.variant}`]]
|
|
40
|
-
}, s(
|
|
41
|
-
(
|
|
37
|
+
}, s(h)[s(m).WRAPPER]), [
|
|
38
|
+
(o(!0), c(A, null, S(t.tabsList, (e) => (o(), c("li", {
|
|
42
39
|
ref_for: !0,
|
|
43
|
-
ref: s(
|
|
40
|
+
ref: s(T).tabsNewList,
|
|
44
41
|
key: e.id,
|
|
45
|
-
class:
|
|
42
|
+
class: g(["tab-item", {
|
|
46
43
|
"tab-item--disabled": e.disabled,
|
|
47
|
-
"tab-item--active":
|
|
44
|
+
"tab-item--active": i(e)
|
|
48
45
|
}]),
|
|
49
|
-
"data-testid": t.testId ? `${t.testId}-${s(
|
|
50
|
-
onClick: (
|
|
51
|
-
onMouseover: (
|
|
52
|
-
onMouseleave:
|
|
53
|
-
(...
|
|
46
|
+
"data-testid": t.testId ? `${t.testId}-${s(m).TAB}-${e.id}` : void 0,
|
|
47
|
+
onClick: (d) => s(I)(e),
|
|
48
|
+
onMouseover: (d) => s(L)(e),
|
|
49
|
+
onMouseleave: n[0] || (n[0] = //@ts-ignore
|
|
50
|
+
(...d) => s(u) && s(u)(...d))
|
|
54
51
|
}, [
|
|
55
|
-
|
|
52
|
+
V(a.$slots, "tab-icon", {
|
|
56
53
|
tab: e,
|
|
57
|
-
active:
|
|
54
|
+
active: i(e)
|
|
58
55
|
}, void 0, !0),
|
|
59
|
-
e.name ? (
|
|
56
|
+
e.name ? (o(), B(s(H), {
|
|
60
57
|
key: 0,
|
|
61
|
-
variant:
|
|
58
|
+
variant: i(e) ? "tabLabel2" : "tabLabel1"
|
|
62
59
|
}, {
|
|
63
|
-
default:
|
|
64
|
-
|
|
60
|
+
default: M(() => [
|
|
61
|
+
N(R(e.name), 1)
|
|
65
62
|
]),
|
|
66
63
|
_: 2
|
|
67
|
-
}, 1032, ["variant"])) :
|
|
64
|
+
}, 1032, ["variant"])) : _("", !0)
|
|
68
65
|
], 42, U))), 128)),
|
|
69
66
|
j
|
|
70
67
|
], 16));
|
package/index.d.ts
CHANGED
|
@@ -1684,6 +1684,10 @@ declare const _default: {
|
|
|
1684
1684
|
default: string;
|
|
1685
1685
|
};
|
|
1686
1686
|
}>> & {
|
|
1687
|
+
onSortableItemDragged?: (event: {
|
|
1688
|
+
id: string;
|
|
1689
|
+
newIndex: number;
|
|
1690
|
+
}) => any;
|
|
1687
1691
|
"onUpdate:items"?: (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => any;
|
|
1688
1692
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
1689
1693
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -1702,7 +1706,10 @@ declare const _default: {
|
|
|
1702
1706
|
}>;
|
|
1703
1707
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
1704
1708
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
1705
|
-
$emit: ((event: "
|
|
1709
|
+
$emit: ((event: "sortableItemDragged", event: {
|
|
1710
|
+
id: string;
|
|
1711
|
+
newIndex: number;
|
|
1712
|
+
}) => void) & ((event: "update:items", items: import("./components/sortableList/SortableList.types").SortableListItem[]) => void) & ((event: "update:openId", id: string | number) => void) & ((event: "update:selectedId", id: string | number) => void) & ((event: "update:selectedChildId", id: string | number) => void) & ((event: "update:search", query: string) => void) & ((event: "clearSearch") => void);
|
|
1706
1713
|
$el: any;
|
|
1707
1714
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
1708
1715
|
search: {
|
|
@@ -1760,6 +1767,10 @@ declare const _default: {
|
|
|
1760
1767
|
default: string;
|
|
1761
1768
|
};
|
|
1762
1769
|
}>> & {
|
|
1770
|
+
onSortableItemDragged?: (event: {
|
|
1771
|
+
id: string;
|
|
1772
|
+
newIndex: number;
|
|
1773
|
+
}) => any;
|
|
1763
1774
|
"onUpdate:items"?: (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => any;
|
|
1764
1775
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
1765
1776
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -1767,6 +1778,10 @@ declare const _default: {
|
|
|
1767
1778
|
"onUpdate:search"?: (query: string) => any;
|
|
1768
1779
|
onClearSearch?: () => any;
|
|
1769
1780
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1781
|
+
sortableItemDragged: (event: {
|
|
1782
|
+
id: string;
|
|
1783
|
+
newIndex: number;
|
|
1784
|
+
}) => void;
|
|
1770
1785
|
"update:items": (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => void;
|
|
1771
1786
|
"update:openId": (id: string | number) => void;
|
|
1772
1787
|
"update:selectedId": (id: string | number) => void;
|
|
@@ -1863,6 +1878,10 @@ declare const _default: {
|
|
|
1863
1878
|
default: string;
|
|
1864
1879
|
};
|
|
1865
1880
|
}>> & {
|
|
1881
|
+
onSortableItemDragged?: (event: {
|
|
1882
|
+
id: string;
|
|
1883
|
+
newIndex: number;
|
|
1884
|
+
}) => any;
|
|
1866
1885
|
"onUpdate:items"?: (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => any;
|
|
1867
1886
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
1868
1887
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -1929,6 +1948,10 @@ declare const _default: {
|
|
|
1929
1948
|
default: string;
|
|
1930
1949
|
};
|
|
1931
1950
|
}>> & {
|
|
1951
|
+
onSortableItemDragged?: (event: {
|
|
1952
|
+
id: string;
|
|
1953
|
+
newIndex: number;
|
|
1954
|
+
}) => any;
|
|
1932
1955
|
"onUpdate:items"?: (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => any;
|
|
1933
1956
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
1934
1957
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -1936,6 +1959,10 @@ declare const _default: {
|
|
|
1936
1959
|
"onUpdate:search"?: (query: string) => any;
|
|
1937
1960
|
onClearSearch?: () => any;
|
|
1938
1961
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1962
|
+
sortableItemDragged: (event: {
|
|
1963
|
+
id: string;
|
|
1964
|
+
newIndex: number;
|
|
1965
|
+
}) => void;
|
|
1939
1966
|
"update:items": (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => void;
|
|
1940
1967
|
"update:openId": (id: string | number) => void;
|
|
1941
1968
|
"update:selectedId": (id: string | number) => void;
|
|
@@ -2039,6 +2066,10 @@ declare const _default: {
|
|
|
2039
2066
|
default: string;
|
|
2040
2067
|
};
|
|
2041
2068
|
}>> & {
|
|
2069
|
+
onSortableItemDragged?: (event: {
|
|
2070
|
+
id: string;
|
|
2071
|
+
newIndex: number;
|
|
2072
|
+
}) => any;
|
|
2042
2073
|
"onUpdate:items"?: (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => any;
|
|
2043
2074
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
2044
2075
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -2057,7 +2088,10 @@ declare const _default: {
|
|
|
2057
2088
|
}>;
|
|
2058
2089
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
2059
2090
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
2060
|
-
$emit: ((event: "
|
|
2091
|
+
$emit: ((event: "sortableItemDragged", event: {
|
|
2092
|
+
id: string;
|
|
2093
|
+
newIndex: number;
|
|
2094
|
+
}) => void) & ((event: "update:items", items: import("./components/sortableList/SortableList.types").SortableListItem[]) => void) & ((event: "update:openId", id: string | number) => void) & ((event: "update:selectedId", id: string | number) => void) & ((event: "update:selectedChildId", id: string | number) => void) & ((event: "update:search", query: string) => void) & ((event: "clearSearch") => void);
|
|
2061
2095
|
$el: any;
|
|
2062
2096
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
2063
2097
|
search: {
|
|
@@ -2115,6 +2149,10 @@ declare const _default: {
|
|
|
2115
2149
|
default: string;
|
|
2116
2150
|
};
|
|
2117
2151
|
}>> & {
|
|
2152
|
+
onSortableItemDragged?: (event: {
|
|
2153
|
+
id: string;
|
|
2154
|
+
newIndex: number;
|
|
2155
|
+
}) => any;
|
|
2118
2156
|
"onUpdate:items"?: (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => any;
|
|
2119
2157
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
2120
2158
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -2122,6 +2160,10 @@ declare const _default: {
|
|
|
2122
2160
|
"onUpdate:search"?: (query: string) => any;
|
|
2123
2161
|
onClearSearch?: () => any;
|
|
2124
2162
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2163
|
+
sortableItemDragged: (event: {
|
|
2164
|
+
id: string;
|
|
2165
|
+
newIndex: number;
|
|
2166
|
+
}) => void;
|
|
2125
2167
|
"update:items": (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => void;
|
|
2126
2168
|
"update:openId": (id: string | number) => void;
|
|
2127
2169
|
"update:selectedId": (id: string | number) => void;
|
|
@@ -2218,6 +2260,10 @@ declare const _default: {
|
|
|
2218
2260
|
default: string;
|
|
2219
2261
|
};
|
|
2220
2262
|
}>> & {
|
|
2263
|
+
onSortableItemDragged?: (event: {
|
|
2264
|
+
id: string;
|
|
2265
|
+
newIndex: number;
|
|
2266
|
+
}) => any;
|
|
2221
2267
|
"onUpdate:items"?: (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => any;
|
|
2222
2268
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
2223
2269
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -2284,6 +2330,10 @@ declare const _default: {
|
|
|
2284
2330
|
default: string;
|
|
2285
2331
|
};
|
|
2286
2332
|
}>> & {
|
|
2333
|
+
onSortableItemDragged?: (event: {
|
|
2334
|
+
id: string;
|
|
2335
|
+
newIndex: number;
|
|
2336
|
+
}) => any;
|
|
2287
2337
|
"onUpdate:items"?: (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => any;
|
|
2288
2338
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
2289
2339
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -2291,6 +2341,10 @@ declare const _default: {
|
|
|
2291
2341
|
"onUpdate:search"?: (query: string) => any;
|
|
2292
2342
|
onClearSearch?: () => any;
|
|
2293
2343
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2344
|
+
sortableItemDragged: (event: {
|
|
2345
|
+
id: string;
|
|
2346
|
+
newIndex: number;
|
|
2347
|
+
}) => void;
|
|
2294
2348
|
"update:items": (items: import("./components/sortableList/SortableList.types").SortableListItem[]) => void;
|
|
2295
2349
|
"update:openId": (id: string | number) => void;
|
|
2296
2350
|
"update:selectedId": (id: string | number) => void;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.list-search[data-v-402063dc]{margin-bottom:var(--spacing-100)}.sortable-list[data-v-402063dc],.locked-list[data-v-402063dc]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:var(--spacing-75);color:var(--text-primary)}.locked-list[data-v-402063dc]{margin-top:var(--spacing-75)}.force-grabbing-cursor *[data-v-402063dc]{cursor:move!important;cursor:-webkit-grabbing!important;cursor:-moz-grabbing!important;cursor:grabbing!important}.empty-state-title[data-v-402063dc]{color:var(--text-disabled);padding:0 8px;width:100%}.loader-bars[data-v-402063dc]{display:flex;flex-direction:column;gap:6px}.loader-bars .loader-bar[data-v-402063dc]{height:40px;width:100%}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tabs-list[data-v-bab40cfe]{position:relative;padding:0;margin:0}.tabs-list--page[data-v-bab40cfe]{border-bottom:1px solid var(--common-divider);box-sizing:border-box}.tabs-list--page .tab-item[data-v-bab40cfe]{padding:0;margin-right:var(--spacing-200);min-height:calc(var(--spacing-600) - 1px)}.tabs-list--page .tabs-border-line[data-v-bab40cfe]{margin-top:-1px}.tabs-border-line[data-v-bab40cfe]{left:var(--57c21ae0);width:var(--bdc3e3e6);border-bottom:2px solid var(--primary-main);transition:left .2s ease-in-out,width .2s;position:absolute;margin-top:-2px}.tab-item[data-v-bab40cfe]{display:inline-flex;flex-direction:row;justify-content:center;align-items:center;color:var(--action-active);gap:var(--spacing-100);vertical-align:middle;padding:0 var(--spacing-300);min-height:var(--spacing-600)}.tab-item[data-v-bab40cfe]:hover{cursor:pointer;color:var(--text-primary)}.tab-item--active[data-v-bab40cfe]{color:var(--text-primary)}.tab-item--disabled[data-v-bab40cfe]{color:var(--action-disabled);cursor:not-allowed;pointer-events:none}
|