@ironsource/shared-ui 1.4.2-test.7 → 1.4.2
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/AddFilterButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/AppTrigger.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/AutocompleteDropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/AutocompleteInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Banner.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Button.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/CalendarMonth.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Checkbox.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Chip.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/DatePicker.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/DatePickerMonth.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/DateRange.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Dialog.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/DollarInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Dropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/FilterDropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/FiltersPanel.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/FloatingToolbar.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Heading.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/IncludeExclude.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Input.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Menu.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/PasswordInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/PercentageInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/README.md +1 -1
- package/RadioButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/RadioGroup.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Search.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Switch.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Table.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Tabs.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Text.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/TextArea.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/TextWithTitleContent.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Toggle.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/components/appIcon/AppIcon.vue.d.ts +1 -1
- package/components/appIcon/AppIcon.vue.js +3 -3
- package/components/appIcon/index.d.ts +1 -1
- package/components/appTrigger/AppTrigger.vue.d.ts +6 -1
- package/components/appTrigger/AppTrigger.vue.js +49 -39
- package/components/appTrigger/index.d.ts +12 -1
- package/components/autocompleteDropdown/AutocompleteDropdown.vue.d.ts +6 -1
- package/components/autocompleteDropdown/AutocompleteDropdown.vue.js +20 -19
- package/components/autocompleteDropdown/AutocompleteInput.vue.d.ts +6 -1
- package/components/autocompleteDropdown/AutocompleteInput.vue.js +19 -13
- package/components/autocompleteDropdown/GroupOption.vue.d.ts +1 -1
- package/components/autocompleteDropdown/GroupOption.vue.js +3 -4
- package/components/autocompleteDropdown/index.d.ts +12 -1
- package/components/banner/Banner.vue.d.ts +10 -1
- package/components/banner/Banner.vue.js +24 -13
- package/components/banner/index.d.ts +10 -1
- package/components/button/Button.vue.d.ts +6 -1
- package/components/button/Button.vue.js +17 -15
- package/components/button/ButtonBase.vue.d.ts +1 -1
- package/components/button/ButtonBase.vue.js +11 -12
- package/components/button/IconButton.vue.d.ts +1 -1
- package/components/button/IconButton.vue.js +5 -5
- package/components/button/ScrollButton.vue.d.ts +1 -1
- package/components/button/ScrollButton.vue.js +8 -9
- package/components/button/index.d.ts +20 -9
- package/components/checkbox/Checkbox.vue.d.ts +6 -1
- package/components/checkbox/Checkbox.vue.js +33 -28
- package/components/checkbox/index.d.ts +12 -1
- package/components/chip/Chip.vue.d.ts +6 -1
- package/components/chip/Chip.vue.js +16 -11
- package/components/chip/index.d.ts +12 -1
- package/components/datePicker/DatePicker.vue.d.ts +6 -1
- package/components/datePicker/DatePicker.vue.js +22 -17
- package/components/datePicker/DatePickerMonth.vue.d.ts +6 -1
- package/components/datePicker/DatePickerMonth.vue.js +9 -7
- package/components/datePicker/index.d.ts +12 -1
- package/components/dateRange/CalendarMonth.vue.d.ts +6 -1
- package/components/dateRange/CalendarMonth.vue.js +58 -41
- package/components/dateRange/DateRange.vue.d.ts +6 -1
- package/components/dateRange/DateRange.vue.js +72 -61
- package/components/dateRange/DateRangePicker.vue.d.ts +6 -1
- package/components/dateRange/index.d.ts +12 -1
- package/components/dialog/Dialog.vue.d.ts +6 -1
- package/components/dialog/Dialog.vue.js +49 -34
- package/components/dialog/index.d.ts +12 -1
- package/components/dropdown/Dropdown.vue.d.ts +6 -1
- package/components/dropdown/Dropdown.vue.js +112 -88
- package/components/dropdown/Label.vue.d.ts +1 -1
- package/components/dropdown/Label.vue.js +3 -4
- package/components/dropdown/Option.vue.d.ts +1 -1
- package/components/dropdown/Option.vue.js +16 -17
- package/components/dropdown/SearchInput.vue.d.ts +1 -1
- package/components/dropdown/SearchInput.vue.js +6 -6
- package/components/dropdown/index.d.ts +409 -1
- package/components/emptyState/EmptyState.vue.d.ts +1 -1
- package/components/emptyState/EmptyState.vue.js +19 -21
- package/components/emptyState/index.d.ts +4 -4
- package/components/filterDropdown/AddFilterButton.vue.d.ts +3 -1
- package/components/filterDropdown/AddFilterButton.vue.js +11 -9
- package/components/filterDropdown/FilterDropdown.vue.d.ts +6 -1
- package/components/filterDropdown/FilterDropdown.vue.js +21 -20
- package/components/filterDropdown/index.d.ts +19 -2
- package/components/filtersPanel/FilterSearchInput.vue.d.ts +1 -1
- package/components/filtersPanel/FilterSearchInput.vue.js +7 -7
- package/components/filtersPanel/FiltersPanel.vue.d.ts +6 -1
- package/components/filtersPanel/FiltersPanel.vue.js +15 -12
- package/components/filtersPanel/index.d.ts +1 -1
- package/components/floatingToolbar/FloatingToolbar.vue.d.ts +1 -1
- package/components/floatingToolbar/FloatingToolbar.vue.js +3 -3
- package/components/floatingToolbar/index.d.ts +1 -1
- package/components/icon/Icon.vue.d.ts +1 -1
- package/components/icon/Icon.vue.js +4 -5
- package/components/icon/icons/index.d.ts +0 -3
- package/components/icon/icons/index.vue.js +0 -3
- package/components/icon/index.d.ts +1 -4
- package/components/icon/storyComponents/Code.vue.d.ts +1 -1
- package/components/icon/storyComponents/IconWrapper.vue.d.ts +1 -1
- package/components/icon/storyComponents/Page.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExclude.vue.d.ts +6 -14
- package/components/includeExclude/IncludeExclude.vue.js +123 -187
- package/components/includeExclude/IncludeExcludeAppHeader.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeAppHeader.vue.js +22 -24
- package/components/includeExclude/IncludeExcludeAppTrigger.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeAppTrigger.vue.js +19 -22
- package/components/includeExclude/IncludeExcludeChipFilter.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeChipFilter.vue.js +40 -42
- package/components/includeExclude/IncludeExcludeOption.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeOption.vue.js +21 -22
- package/components/includeExclude/includeExcludeMocks.d.ts +0 -12
- package/components/includeExclude/index.d.ts +28 -32
- package/components/includeExclude/index.vue.js +0 -3
- package/components/input/DollarInput.vue.d.ts +2 -2
- package/components/input/DollarInput.vue.js +3 -4
- package/components/input/Input.vue.d.ts +11 -1
- package/components/input/Input.vue.js +87 -64
- package/components/input/PasswordInput.vue.d.ts +2 -2
- package/components/input/PasswordInput.vue.js +3 -4
- package/components/input/PercentageInput.vue.d.ts +2 -2
- package/components/input/PercentageInput.vue.js +3 -4
- package/components/input/index.d.ts +36 -2
- package/components/menu/Menu.vue.d.ts +6 -1
- package/components/menu/Menu.vue.js +10 -8
- package/components/menu/index.d.ts +12 -1
- package/components/menuItem/MenuItem.vue.d.ts +1 -1
- package/components/menuItem/MenuItem.vue.js +3 -4
- package/components/menuItem/index.d.ts +1 -1
- package/components/popover/Popover.vue.d.ts +6 -1
- package/components/popover/Popover.vue.js +11 -9
- package/components/popover/index.d.ts +12 -1
- package/components/radioButton/RadioButton.vue.d.ts +6 -1
- package/components/radioButton/RadioButton.vue.js +24 -17
- package/components/radioButton/RadioGroup.vue.d.ts +6 -1
- package/components/radioButton/RadioGroup.vue.js +12 -8
- package/components/radioButton/index.d.ts +24 -2
- package/components/radioButton/useRadio.d.ts +1 -1
- package/components/search/Search.vue.d.ts +6 -1
- package/components/search/Search.vue.js +27 -21
- package/components/search/index.d.ts +12 -1
- package/components/skeleton/Skeleton.vue.d.ts +1 -1
- package/components/skeleton/Skeleton.vue.js +2 -2
- package/components/skeleton/index.d.ts +1 -1
- package/components/snackbar/Snackbar.vue.d.ts +1 -1
- package/components/snackbar/Snackbar.vue.js +26 -26
- package/components/switch/Switch.vue.d.ts +6 -1
- package/components/switch/Switch.vue.js +24 -16
- package/components/switch/index.d.ts +12 -1
- package/components/table/Table.types.d.ts +0 -1
- package/components/table/Table.vue.d.ts +6 -11
- package/components/table/Table.vue.js +80 -79
- package/components/table/TableHeaderSorter.vue.d.ts +1 -1
- package/components/table/TableHeaderSorter.vue.js +4 -4
- package/components/table/index.d.ts +12 -23
- package/components/table-cells/Editable.vue.d.ts +1 -1
- package/components/table-cells/Editable.vue.js +4 -4
- package/components/table-cells/index.d.ts +1 -1
- package/components/tabs/Tabs.vue.d.ts +6 -1
- package/components/tabs/Tabs.vue.js +29 -25
- package/components/tabs/index.d.ts +12 -1
- package/components/textArea/TextArea.vue.d.ts +6 -1
- package/components/textArea/TextArea.vue.js +32 -26
- package/components/textArea/index.d.ts +12 -1
- package/components/toggle/Toggle.vue.d.ts +11 -1
- package/components/toggle/Toggle.vue.js +48 -32
- package/components/toggle/index.d.ts +23 -1
- package/components/tooltip/TextWithTitleContent.vue.d.ts +16 -3
- package/components/tooltip/TextWithTitleContent.vue.js +17 -13
- package/components/tooltip/Tooltip.vue.d.ts +6 -1
- package/components/tooltip/Tooltip.vue.js +18 -15
- package/components/tooltip/index.d.ts +12 -1
- package/components/tooltip/storybookComponents/CustomTooltip.vue.d.ts +1 -1
- package/components/typography/Heading.vue.d.ts +6 -1
- package/components/typography/Heading.vue.js +10 -7
- package/components/typography/Text.vue.d.ts +6 -1
- package/components/typography/Text.vue.js +10 -6
- package/components/typography/index.d.ts +24 -2
- package/consts/regex.d.ts +1 -0
- package/consts/regex.vue.js +3 -0
- package/consts/style.d.ts +1 -0
- package/consts/style.vue.js +3 -0
- package/index.vue.js +3 -4
- package/package.json +4 -5
- package/testids/index.d.ts +146 -0
- package/testids/index.vue.js +170 -0
- package/utils/style.d.ts +1 -0
- package/utils/style.vue.js +5 -0
- package/IncludeExcludeOptionDraggable.vue_vue_type_style_index_0_scoped_true_lang.css +0 -1
- package/components/icon/icons/TableEdit.vue.d.ts +0 -2
- package/components/icon/icons/TableEdit.vue.js +0 -24
- package/components/includeExclude/IncludeExcludeOptionDraggable.vue.d.ts +0 -43
- package/components/includeExclude/IncludeExcludeOptionDraggable.vue.js +0 -123
- package/components/table/Pagination.vue.d.ts +0 -43
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, ref, provide, computed,
|
|
2
|
-
import '
|
|
1
|
+
import { defineComponent, useCssVars, unref, ref, provide, computed, onMounted, openBlock, createElementBlock, createElementVNode, normalizeStyle, renderSlot, createVNode, withCtx, createTextVNode, toDisplayString, createCommentVNode, normalizeClass, Fragment, renderList, createBlock, mergeProps, withDirectives, vShow } from 'vue';
|
|
2
|
+
import { TableTestIdModifiers } from '../../testids/index.vue.js';
|
|
3
|
+
/* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
|
|
3
4
|
import Text from '../typography/Text.vue.js';
|
|
4
|
-
import '../button/
|
|
5
|
-
import '../button/IconButton.vue.js';
|
|
6
|
-
import ScrollButton from '../button/ScrollButton.vue.js';
|
|
5
|
+
/* empty css *//* empty css *//* empty css *//* empty css */import ScrollButton from '../button/ScrollButton.vue.js';
|
|
7
6
|
import Skeleton from '../skeleton/Skeleton.vue.js';
|
|
8
7
|
import EmptyState from '../emptyState/EmptyState.vue.js';
|
|
9
8
|
import TableHeaderSorter from './TableHeaderSorter.vue.js';
|
|
10
9
|
import { useVirtualList, useInfiniteScroll } from '@vueuse/core';
|
|
11
10
|
import { TableContext } from './TableContext.vue.js';
|
|
12
|
-
/* empty css *//* empty css */
|
|
13
|
-
|
|
11
|
+
/* empty css *//* empty css */
|
|
14
12
|
import "../../Table.vue_vue_type_style_index_0_scoped_true_lang.css";
|
|
15
|
-
const _hoisted_1 =
|
|
16
|
-
const _hoisted_2 =
|
|
17
|
-
const _hoisted_3 =
|
|
18
|
-
const _hoisted_4 = ["
|
|
19
|
-
const _hoisted_5 =
|
|
20
|
-
const _hoisted_6 = ["
|
|
21
|
-
const _hoisted_7 =
|
|
22
|
-
const _hoisted_8 =
|
|
23
|
-
const
|
|
13
|
+
const _hoisted_1 = ["data-testid"];
|
|
14
|
+
const _hoisted_2 = ["data-testid"];
|
|
15
|
+
const _hoisted_3 = ["data-testid"];
|
|
16
|
+
const _hoisted_4 = ["data-testid"];
|
|
17
|
+
const _hoisted_5 = ["data-testid"];
|
|
18
|
+
const _hoisted_6 = ["data-testid"];
|
|
19
|
+
const _hoisted_7 = ["data-testid"];
|
|
20
|
+
const _hoisted_8 = ["onClick"];
|
|
21
|
+
const _hoisted_9 = { class: "table-head-container" };
|
|
22
|
+
const _hoisted_10 = ["data-testid"];
|
|
23
|
+
const _hoisted_11 = ["onMouseenter"];
|
|
24
|
+
const _hoisted_12 = { key: 1 };
|
|
25
|
+
const _hoisted_13 = { key: 1 };
|
|
26
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
24
27
|
__name: "Table",
|
|
25
28
|
props: {
|
|
26
|
-
title:
|
|
27
|
-
columns:
|
|
28
|
-
rows:
|
|
29
|
+
title: null,
|
|
30
|
+
columns: null,
|
|
31
|
+
rows: null,
|
|
29
32
|
sections: { default: null },
|
|
30
|
-
sort:
|
|
33
|
+
sort: null,
|
|
31
34
|
isSticky: { type: Boolean, default: true },
|
|
32
|
-
isStickyHeader: { type: Boolean, default: false },
|
|
33
35
|
isLoading: { type: Boolean, default: false },
|
|
34
36
|
emptyStateTitle: { default: "No results found" },
|
|
35
37
|
emptyStateSubtitle: { default: "Try again with different filters" },
|
|
@@ -37,13 +39,13 @@ const _sfc_main = defineComponent({
|
|
|
37
39
|
infiniteScrollThreshold: { default: 100 },
|
|
38
40
|
rowHeight: { type: [Number, Function], default: 48 },
|
|
39
41
|
loadingRowCount: { default: 3 },
|
|
40
|
-
|
|
42
|
+
testId: { default: "" }
|
|
41
43
|
},
|
|
42
44
|
emits: ["update:sort", "saveRow", "loadMore"],
|
|
43
45
|
setup(__props, { emit }) {
|
|
44
46
|
const props = __props;
|
|
45
47
|
useCssVars((_ctx) => ({
|
|
46
|
-
"
|
|
48
|
+
"04775a54": unref(gridColumnTemplate)
|
|
47
49
|
}));
|
|
48
50
|
const savingRows = ref([]);
|
|
49
51
|
provide(TableContext, {
|
|
@@ -81,22 +83,12 @@ const _sfc_main = defineComponent({
|
|
|
81
83
|
});
|
|
82
84
|
const floatingActionRef = ref(null);
|
|
83
85
|
const floatingActionPosition = ref(0);
|
|
84
|
-
const slots = useSlots();
|
|
85
|
-
const hasSearchSlot = computed(() => !!slots.search);
|
|
86
86
|
const onScroll = (event) => {
|
|
87
87
|
containerProps.onScroll();
|
|
88
88
|
floatingActionPosition.value = event.target.scrollLeft + event.target.getBoundingClientRect().width;
|
|
89
89
|
};
|
|
90
90
|
onMounted(() => {
|
|
91
91
|
floatingActionPosition.value = containerProps.ref.value?.getBoundingClientRect().width;
|
|
92
|
-
if (props.defaultScrollPosition) {
|
|
93
|
-
setTimeout(() => {
|
|
94
|
-
containerProps.ref.value.scrollTo({
|
|
95
|
-
top: props.defaultScrollPosition,
|
|
96
|
-
behavior: "smooth"
|
|
97
|
-
});
|
|
98
|
-
}, 1e3);
|
|
99
|
-
}
|
|
100
92
|
});
|
|
101
93
|
const showBackToTopButton = computed(() => {
|
|
102
94
|
const [firstListItem] = list.value;
|
|
@@ -158,44 +150,57 @@ const _sfc_main = defineComponent({
|
|
|
158
150
|
return (_ctx, _cache) => {
|
|
159
151
|
return openBlock(), createElementBlock("div", {
|
|
160
152
|
class: "table-container",
|
|
153
|
+
"data-testid": `${__props.testId}-${unref(TableTestIdModifiers).CONTAINER}`,
|
|
161
154
|
onMouseleave: _cache[0] || (_cache[0] = ($event) => activeRow.value = null)
|
|
162
155
|
}, [
|
|
163
156
|
createElementVNode("table", {
|
|
164
157
|
ref: unref(containerProps).ref,
|
|
165
|
-
style: normalizeStyle(containerStyle
|
|
158
|
+
style: normalizeStyle(unref(containerStyle)),
|
|
159
|
+
"data-testid": `${__props.testId}-${unref(TableTestIdModifiers).TABLE}`,
|
|
166
160
|
onScrollPassive: onScroll
|
|
167
161
|
}, [
|
|
168
|
-
|
|
162
|
+
__props.title || _ctx.$slots["search"] ? (openBlock(), createElementBlock("div", {
|
|
169
163
|
key: 0,
|
|
170
|
-
class:
|
|
164
|
+
class: "table-header",
|
|
165
|
+
"data-testid": `${__props.testId}-${unref(TableTestIdModifiers).HEADER}`
|
|
171
166
|
}, [
|
|
172
|
-
createElementVNode("div",
|
|
167
|
+
createElementVNode("div", {
|
|
168
|
+
class: "table-title",
|
|
169
|
+
"data-testid": `${__props.testId}-${unref(TableTestIdModifiers).TITLE}`
|
|
170
|
+
}, [
|
|
173
171
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
174
172
|
createVNode(unref(Text), {
|
|
175
173
|
size: "md",
|
|
176
174
|
strong: ""
|
|
177
175
|
}, {
|
|
178
176
|
default: withCtx(() => [
|
|
179
|
-
createTextVNode(toDisplayString(
|
|
177
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
180
178
|
]),
|
|
181
179
|
_: 1
|
|
182
180
|
})
|
|
183
181
|
], true)
|
|
184
|
-
]),
|
|
182
|
+
], 8, _hoisted_4),
|
|
185
183
|
createElementVNode("div", {
|
|
186
|
-
class:
|
|
184
|
+
class: "table-header-right",
|
|
185
|
+
"data-testid": `${__props.testId}-${unref(TableTestIdModifiers).HEADER_RIGHT}`
|
|
187
186
|
}, [
|
|
188
187
|
renderSlot(_ctx.$slots, "search", {}, void 0, true)
|
|
189
|
-
],
|
|
190
|
-
createElementVNode("div",
|
|
188
|
+
], 8, _hoisted_5),
|
|
189
|
+
createElementVNode("div", {
|
|
190
|
+
class: "table-header-actions",
|
|
191
|
+
"data-testid": `${__props.testId}-${unref(TableTestIdModifiers).ACTIONS}`
|
|
192
|
+
}, [
|
|
191
193
|
renderSlot(_ctx.$slots, "table-header-actions", {}, void 0, true)
|
|
192
|
-
])
|
|
193
|
-
],
|
|
194
|
+
], 8, _hoisted_6)
|
|
195
|
+
], 8, _hoisted_3)) : createCommentVNode("", true),
|
|
194
196
|
createElementVNode("thead", {
|
|
195
|
-
class: normalizeClass({ sticky:
|
|
197
|
+
class: normalizeClass({ sticky: __props.isSticky })
|
|
196
198
|
}, [
|
|
197
|
-
createElementVNode("div",
|
|
198
|
-
|
|
199
|
+
createElementVNode("div", {
|
|
200
|
+
class: "sections",
|
|
201
|
+
"data-testid": `${__props.testId}-${unref(TableTestIdModifiers).SECTIONS}`
|
|
202
|
+
}, [
|
|
203
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.sections, (section) => {
|
|
199
204
|
return openBlock(), createElementBlock("div", {
|
|
200
205
|
key: section.id,
|
|
201
206
|
class: normalizeClass(["section-container", { sticky: section.isSticky }])
|
|
@@ -215,21 +220,16 @@ const _sfc_main = defineComponent({
|
|
|
215
220
|
], true)
|
|
216
221
|
], 2);
|
|
217
222
|
}), 128))
|
|
218
|
-
]),
|
|
223
|
+
], 8, _hoisted_7),
|
|
219
224
|
createElementVNode("tr", null, [
|
|
220
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
225
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
|
|
221
226
|
return openBlock(), createElementBlock("th", {
|
|
222
227
|
key: column.id,
|
|
223
|
-
class: normalizeClass({
|
|
224
|
-
|
|
225
|
-
bordered: column.isBordered,
|
|
226
|
-
isTextRight: column.isTextRight,
|
|
227
|
-
isSortable: column.isSortable
|
|
228
|
-
}),
|
|
229
|
-
style: normalizeStyle(column.isSticky ? columnsStickyPositions.value[column.id] : null),
|
|
228
|
+
class: normalizeClass({ sticky: column.isSticky, bordered: column.isBordered }),
|
|
229
|
+
style: normalizeStyle(column.isSticky ? unref(columnsStickyPositions)[column.id] : null),
|
|
230
230
|
onClick: ($event) => toggleSortOrder(column)
|
|
231
231
|
}, [
|
|
232
|
-
createElementVNode("div",
|
|
232
|
+
createElementVNode("div", _hoisted_9, [
|
|
233
233
|
renderSlot(_ctx.$slots, `header-${column.id}`, { column }, () => [
|
|
234
234
|
createVNode(unref(Text), {
|
|
235
235
|
size: "sm",
|
|
@@ -242,26 +242,27 @@ const _sfc_main = defineComponent({
|
|
|
242
242
|
_: 2
|
|
243
243
|
}, 1024)
|
|
244
244
|
], true),
|
|
245
|
-
column.id ===
|
|
245
|
+
column.id === __props.sort.sortBy ? (openBlock(), createBlock(TableHeaderSorter, {
|
|
246
246
|
key: 0,
|
|
247
247
|
class: "table-head-sorter",
|
|
248
|
-
"sort-order":
|
|
248
|
+
"sort-order": __props.sort.sortOrder
|
|
249
249
|
}, null, 8, ["sort-order"])) : createCommentVNode("", true)
|
|
250
250
|
])
|
|
251
|
-
], 14,
|
|
251
|
+
], 14, _hoisted_8);
|
|
252
252
|
}), 128))
|
|
253
253
|
])
|
|
254
254
|
], 2),
|
|
255
255
|
createElementVNode("tbody", null, [
|
|
256
256
|
unref(list).length > 0 ? (openBlock(), createElementBlock("div", mergeProps({
|
|
257
257
|
key: 0,
|
|
258
|
-
class: "table-body-wrapper"
|
|
258
|
+
class: "table-body-wrapper",
|
|
259
|
+
"data-testid": `${__props.testId}-${unref(TableTestIdModifiers).BODY_WRAPPER}`
|
|
259
260
|
}, unref(wrapperProps)), [
|
|
260
261
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), (row) => {
|
|
261
262
|
return openBlock(), createElementBlock("tr", {
|
|
262
263
|
key: row.index,
|
|
263
264
|
class: normalizeClass(["table-row", {
|
|
264
|
-
loading:
|
|
265
|
+
loading: __props.isLoading || __props.isLoading && !row.data || savingRows.value.includes(row.index),
|
|
265
266
|
active: activeRow.value === row.index
|
|
266
267
|
}]),
|
|
267
268
|
onMouseenter: ($event) => activeRow.value = row.index
|
|
@@ -277,22 +278,21 @@ const _sfc_main = defineComponent({
|
|
|
277
278
|
], 4), [
|
|
278
279
|
[
|
|
279
280
|
vShow,
|
|
280
|
-
_ctx.$slots["floating-actions"] && activeRow.value === row.index && !
|
|
281
|
+
_ctx.$slots["floating-actions"] && activeRow.value === row.index && !__props.isLoading
|
|
281
282
|
]
|
|
282
283
|
]),
|
|
283
284
|
(openBlock(true), createElementBlock(Fragment, null, renderList(row.data, (cell, cellIndex) => {
|
|
284
285
|
return openBlock(), createElementBlock("td", {
|
|
285
286
|
key: cellIndex,
|
|
286
287
|
class: normalizeClass({
|
|
287
|
-
sticky:
|
|
288
|
-
bordered:
|
|
289
|
-
isTextRight: _ctx.columns[cellIndex].isTextRight
|
|
288
|
+
sticky: __props.columns[cellIndex].isSticky,
|
|
289
|
+
bordered: __props.columns[cellIndex].isBordered
|
|
290
290
|
}),
|
|
291
291
|
style: normalizeStyle(
|
|
292
|
-
|
|
292
|
+
__props.columns[cellIndex].isSticky ? unref(columnsStickyPositions)[__props.columns[cellIndex].id] : null
|
|
293
293
|
)
|
|
294
294
|
}, [
|
|
295
|
-
!
|
|
295
|
+
!__props.isLoading || __props.isLoading && !!cell ? (openBlock(), createElementBlock("div", {
|
|
296
296
|
key: 0,
|
|
297
297
|
class: normalizeClass({
|
|
298
298
|
last: cellIndex === row.data.length - 1,
|
|
@@ -300,7 +300,7 @@ const _sfc_main = defineComponent({
|
|
|
300
300
|
floating: _ctx.$slots["floating-actions"]
|
|
301
301
|
})
|
|
302
302
|
}, [
|
|
303
|
-
renderSlot(_ctx.$slots, `cell-${
|
|
303
|
+
renderSlot(_ctx.$slots, `cell-${__props.columns[cellIndex].id}`, {
|
|
304
304
|
cell,
|
|
305
305
|
isLoading: savingRows.value.includes(row.index),
|
|
306
306
|
cellIndex,
|
|
@@ -319,27 +319,28 @@ const _sfc_main = defineComponent({
|
|
|
319
319
|
], true)
|
|
320
320
|
], 6);
|
|
321
321
|
}), 128))
|
|
322
|
-
], 42,
|
|
322
|
+
], 42, _hoisted_11);
|
|
323
323
|
}), 128))
|
|
324
|
-
], 16)) : (openBlock(), createElementBlock("div",
|
|
324
|
+
], 16, _hoisted_10)) : (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
325
325
|
renderSlot(_ctx.$slots, "empty-state", {}, () => [
|
|
326
326
|
createVNode(unref(EmptyState), {
|
|
327
|
-
title:
|
|
328
|
-
subtitle:
|
|
329
|
-
|
|
327
|
+
title: __props.emptyStateTitle,
|
|
328
|
+
subtitle: __props.emptyStateSubtitle,
|
|
329
|
+
"test-id": `${__props.testId}-${unref(TableTestIdModifiers).EMPTY_STATE}`
|
|
330
|
+
}, null, 8, ["title", "subtitle", "test-id"])
|
|
330
331
|
], true)
|
|
331
332
|
]))
|
|
332
333
|
]),
|
|
333
|
-
unref(list).length > 0 ? (openBlock(), createElementBlock("tfoot",
|
|
334
|
-
],
|
|
334
|
+
unref(list).length > 0 ? (openBlock(), createElementBlock("tfoot", _hoisted_13)) : createCommentVNode("", true)
|
|
335
|
+
], 44, _hoisted_2),
|
|
335
336
|
createVNode(unref(ScrollButton), {
|
|
336
|
-
show: showBackToTopButton
|
|
337
|
+
show: unref(showBackToTopButton),
|
|
337
338
|
onScrolled: scrollToTop
|
|
338
339
|
}, null, 8, ["show"])
|
|
339
|
-
],
|
|
340
|
+
], 40, _hoisted_1);
|
|
340
341
|
};
|
|
341
342
|
}
|
|
342
343
|
});
|
|
343
|
-
var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
344
|
+
var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-392e31d7"]]);
|
|
344
345
|
|
|
345
346
|
export { Table as default };
|
|
@@ -2,7 +2,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
2
2
|
sortOrder: 'asc' | 'desc';
|
|
3
3
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
4
|
sortOrder: 'asc' | 'desc';
|
|
5
|
-
}>>>, {}
|
|
5
|
+
}>>>, {}>;
|
|
6
6
|
export default _default;
|
|
7
7
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
8
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -4,21 +4,21 @@ import SortOrderIcon from './SortOrderIcon.vue.js';
|
|
|
4
4
|
|
|
5
5
|
import "../../TableHeaderSorter.vue_vue_type_style_index_0_scoped_true_lang.css";
|
|
6
6
|
const _hoisted_1 = { class: "table-head-sorter-container" };
|
|
7
|
-
const _sfc_main = defineComponent({
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "TableHeaderSorter",
|
|
9
9
|
props: {
|
|
10
|
-
sortOrder:
|
|
10
|
+
sortOrder: null
|
|
11
11
|
},
|
|
12
12
|
setup(__props) {
|
|
13
13
|
return (_ctx, _cache) => {
|
|
14
14
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
15
15
|
createVNode(SortOrderIcon, {
|
|
16
16
|
name: "sort-order",
|
|
17
|
-
class: normalizeClass({ "table-head-sorter-selected":
|
|
17
|
+
class: normalizeClass({ "table-head-sorter-selected": __props.sortOrder === "asc" })
|
|
18
18
|
}, null, 8, ["class"]),
|
|
19
19
|
createVNode(SortOrderIcon, {
|
|
20
20
|
name: "sort-order",
|
|
21
|
-
class: normalizeClass(["table-head-sorter-desc", { "table-head-sorter-selected":
|
|
21
|
+
class: normalizeClass(["table-head-sorter-desc", { "table-head-sorter-selected": __props.sortOrder === "desc" }])
|
|
22
22
|
}, null, 8, ["class"])
|
|
23
23
|
]);
|
|
24
24
|
};
|
|
@@ -7,6 +7,11 @@ declare const TableTypes: () => (import("vue").InjectionKey<import("./TableConte
|
|
|
7
7
|
type: import("vue").PropType<string>;
|
|
8
8
|
required: true;
|
|
9
9
|
};
|
|
10
|
+
testId: {
|
|
11
|
+
type: import("vue").PropType<string>;
|
|
12
|
+
} & {
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
10
15
|
columns: {
|
|
11
16
|
type: import("vue").PropType<import("./Table.types").Column[]>;
|
|
12
17
|
required: true;
|
|
@@ -21,11 +26,6 @@ declare const TableTypes: () => (import("vue").InjectionKey<import("./TableConte
|
|
|
21
26
|
} & {
|
|
22
27
|
default: boolean;
|
|
23
28
|
};
|
|
24
|
-
isStickyHeader: {
|
|
25
|
-
type: import("vue").PropType<boolean>;
|
|
26
|
-
} & {
|
|
27
|
-
default: boolean;
|
|
28
|
-
};
|
|
29
29
|
sections: {
|
|
30
30
|
type: import("vue").PropType<import("./Table.types").Section[]>;
|
|
31
31
|
} & {
|
|
@@ -61,11 +61,6 @@ declare const TableTypes: () => (import("vue").InjectionKey<import("./TableConte
|
|
|
61
61
|
} & {
|
|
62
62
|
default: number;
|
|
63
63
|
};
|
|
64
|
-
defaultScrollPosition: {
|
|
65
|
-
type: import("vue").PropType<number>;
|
|
66
|
-
} & {
|
|
67
|
-
default: any;
|
|
68
|
-
};
|
|
69
64
|
rows: {
|
|
70
65
|
type: import("vue").PropType<unknown[][]>;
|
|
71
66
|
required: true;
|
|
@@ -90,6 +85,11 @@ declare const TableTypes: () => (import("vue").InjectionKey<import("./TableConte
|
|
|
90
85
|
type: import("vue").PropType<string>;
|
|
91
86
|
required: true;
|
|
92
87
|
};
|
|
88
|
+
testId: {
|
|
89
|
+
type: import("vue").PropType<string>;
|
|
90
|
+
} & {
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
93
93
|
columns: {
|
|
94
94
|
type: import("vue").PropType<import("./Table.types").Column[]>;
|
|
95
95
|
required: true;
|
|
@@ -104,11 +104,6 @@ declare const TableTypes: () => (import("vue").InjectionKey<import("./TableConte
|
|
|
104
104
|
} & {
|
|
105
105
|
default: boolean;
|
|
106
106
|
};
|
|
107
|
-
isStickyHeader: {
|
|
108
|
-
type: import("vue").PropType<boolean>;
|
|
109
|
-
} & {
|
|
110
|
-
default: boolean;
|
|
111
|
-
};
|
|
112
107
|
sections: {
|
|
113
108
|
type: import("vue").PropType<import("./Table.types").Section[]>;
|
|
114
109
|
} & {
|
|
@@ -144,11 +139,6 @@ declare const TableTypes: () => (import("vue").InjectionKey<import("./TableConte
|
|
|
144
139
|
} & {
|
|
145
140
|
default: number;
|
|
146
141
|
};
|
|
147
|
-
defaultScrollPosition: {
|
|
148
|
-
type: import("vue").PropType<number>;
|
|
149
|
-
} & {
|
|
150
|
-
default: any;
|
|
151
|
-
};
|
|
152
142
|
rows: {
|
|
153
143
|
type: import("vue").PropType<unknown[][]>;
|
|
154
144
|
required: true;
|
|
@@ -163,9 +153,9 @@ declare const TableTypes: () => (import("vue").InjectionKey<import("./TableConte
|
|
|
163
153
|
}) => any;
|
|
164
154
|
onLoadMore?: () => any;
|
|
165
155
|
}, {
|
|
156
|
+
testId: string;
|
|
166
157
|
isLoading: boolean;
|
|
167
158
|
isSticky: boolean;
|
|
168
|
-
isStickyHeader: boolean;
|
|
169
159
|
sections: import("./Table.types").Section[];
|
|
170
160
|
emptyStateTitle: string;
|
|
171
161
|
emptyStateSubtitle: string;
|
|
@@ -173,8 +163,7 @@ declare const TableTypes: () => (import("vue").InjectionKey<import("./TableConte
|
|
|
173
163
|
infiniteScrollThreshold: number;
|
|
174
164
|
rowHeight: number | ((index: number) => number);
|
|
175
165
|
loadingRowCount: number;
|
|
176
|
-
|
|
177
|
-
}, {}>)[];
|
|
166
|
+
}>)[];
|
|
178
167
|
export { default as Table } from './Table.vue';
|
|
179
168
|
export { TableContext } from './TableContext';
|
|
180
169
|
export type { Column, Sort } from './Table.types';
|
|
@@ -27,7 +27,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
27
27
|
isLoading: boolean;
|
|
28
28
|
isEditing: boolean;
|
|
29
29
|
validateFunction: (value: unknown) => string | boolean;
|
|
30
|
-
}
|
|
30
|
+
}>;
|
|
31
31
|
export default _default;
|
|
32
32
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
33
33
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -11,15 +11,15 @@ const _hoisted_2 = {
|
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "editable-content"
|
|
13
13
|
};
|
|
14
|
-
const _sfc_main = defineComponent({
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
15
|
__name: "Editable",
|
|
16
16
|
props: {
|
|
17
17
|
cell: { default: "" },
|
|
18
18
|
isEditing: { type: Boolean, default: false },
|
|
19
19
|
validateFunction: { type: Function, default: () => false },
|
|
20
20
|
isLoading: { type: Boolean, default: false },
|
|
21
|
-
rowIndex:
|
|
22
|
-
cellIndex:
|
|
21
|
+
rowIndex: null,
|
|
22
|
+
cellIndex: null
|
|
23
23
|
},
|
|
24
24
|
setup(__props) {
|
|
25
25
|
const props = __props;
|
|
@@ -73,7 +73,7 @@ const _sfc_main = defineComponent({
|
|
|
73
73
|
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
74
74
|
createVNode(Text, { size: "sm" }, {
|
|
75
75
|
default: withCtx(() => [
|
|
76
|
-
createTextVNode(toDisplayString(
|
|
76
|
+
createTextVNode(toDisplayString(__props.cell), 1)
|
|
77
77
|
]),
|
|
78
78
|
_: 1
|
|
79
79
|
})
|
|
@@ -61,7 +61,7 @@ declare const EditableTypes: () => (import("vue").InjectionKey<import("./Editabl
|
|
|
61
61
|
isLoading: boolean;
|
|
62
62
|
isEditing: boolean;
|
|
63
63
|
validateFunction: (value: unknown) => string | boolean;
|
|
64
|
-
}
|
|
64
|
+
}>)[];
|
|
65
65
|
export { default as Editable } from './Editable.vue';
|
|
66
66
|
export { EditableContext, useEditableContext } from './EditableContext';
|
|
67
67
|
export { EditableTypes };
|
|
@@ -8,10 +8,12 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
8
8
|
selectedTab: number | string;
|
|
9
9
|
variant?: 'fix' | 'fill';
|
|
10
10
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
testId?: string;
|
|
11
12
|
}>, {
|
|
12
13
|
tabsList: () => any[];
|
|
13
14
|
variant: string;
|
|
14
15
|
size: string;
|
|
16
|
+
testId: string;
|
|
15
17
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
18
|
"update:selectedTab": (tabId: string | number) => void;
|
|
17
19
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -24,14 +26,17 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
24
26
|
selectedTab: number | string;
|
|
25
27
|
variant?: 'fix' | 'fill';
|
|
26
28
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
29
|
+
testId?: string;
|
|
27
30
|
}>, {
|
|
28
31
|
tabsList: () => any[];
|
|
29
32
|
variant: string;
|
|
30
33
|
size: string;
|
|
34
|
+
testId: string;
|
|
31
35
|
}>>> & {
|
|
32
36
|
"onUpdate:selectedTab"?: (tabId: string | number) => any;
|
|
33
37
|
}, {
|
|
34
38
|
size: 'sm' | 'md' | 'lg' | 'xl';
|
|
39
|
+
testId: string;
|
|
35
40
|
variant: 'fix' | 'fill';
|
|
36
41
|
tabsList: {
|
|
37
42
|
id: number | string;
|
|
@@ -39,7 +44,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
39
44
|
iconName: string;
|
|
40
45
|
disabled?: boolean;
|
|
41
46
|
}[];
|
|
42
|
-
}
|
|
47
|
+
}>;
|
|
43
48
|
export default _default;
|
|
44
49
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
45
50
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, ref, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, renderSlot, createBlock,
|
|
2
|
-
import '
|
|
1
|
+
import { defineComponent, useCssVars, unref, ref, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, renderSlot, createBlock, createCommentVNode, withCtx, createTextVNode, toDisplayString, pushScopeId, popScopeId, createElementVNode } from 'vue';
|
|
2
|
+
import { TabsTestIdModifiers } from '../../testids/index.vue.js';
|
|
3
|
+
/* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
|
|
3
4
|
import Text from '../typography/Text.vue.js';
|
|
4
5
|
import Icon from '../icon/Icon.vue.js';
|
|
5
|
-
/* empty css */
|
|
6
|
-
|
|
6
|
+
/* empty css */
|
|
7
7
|
import "../../Tabs.vue_vue_type_style_index_0_scoped_true_lang.css";
|
|
8
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
9
|
-
const _hoisted_1 = ["
|
|
10
|
-
const _hoisted_2 =
|
|
11
|
-
const _hoisted_3 = {
|
|
8
|
+
const _withScopeId = (n) => (pushScopeId("data-v-c22c2836"), n = n(), popScopeId(), n);
|
|
9
|
+
const _hoisted_1 = ["data-testid"];
|
|
10
|
+
const _hoisted_2 = ["data-testid", "onClick", "onMouseover"];
|
|
11
|
+
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "tabs-border-line" }, null, -1));
|
|
12
|
+
const _hoisted_4 = {
|
|
12
13
|
key: 0,
|
|
13
14
|
class: "tabs-border-line-hover"
|
|
14
15
|
};
|
|
15
|
-
const
|
|
16
|
-
const _sfc_main = defineComponent({
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
17
|
__name: "Tabs",
|
|
18
18
|
props: {
|
|
19
19
|
tabsList: { default: () => [] },
|
|
20
|
-
selectedTab:
|
|
20
|
+
selectedTab: null,
|
|
21
21
|
variant: { default: "fill" },
|
|
22
|
-
size: { default: "sm" }
|
|
22
|
+
size: { default: "sm" },
|
|
23
|
+
testId: { default: "" }
|
|
23
24
|
},
|
|
24
25
|
emits: ["update:selectedTab"],
|
|
25
26
|
setup(__props, { emit }) {
|
|
26
27
|
const props = __props;
|
|
27
28
|
useCssVars((_ctx) => ({
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
29
|
+
"99d50838": unref(selectedTabPosition),
|
|
30
|
+
"1eedbceb": unref(selectedTabWidth),
|
|
31
|
+
"c715bc60": unref(selectedTabCenter),
|
|
32
|
+
"e8e3bca4": unref(hoveredTabCenter)
|
|
32
33
|
}));
|
|
33
34
|
const tabsNewList = ref([]);
|
|
34
35
|
const hoveredTab = ref(null);
|
|
36
|
+
const fixUnderlineLength = 12;
|
|
35
37
|
const skipUnwrap = { tabsNewList };
|
|
36
38
|
const isHovered = computed(
|
|
37
39
|
() => hoveredTab.value && hoveredTab.value !== props.selectedTab
|
|
@@ -77,17 +79,19 @@ const _sfc_main = defineComponent({
|
|
|
77
79
|
};
|
|
78
80
|
return (_ctx, _cache) => {
|
|
79
81
|
return openBlock(), createElementBlock("ul", {
|
|
80
|
-
class: normalizeClass(["tabs-wrap", [
|
|
82
|
+
class: normalizeClass(["tabs-wrap", [__props.size, __props.variant]]),
|
|
83
|
+
"data-testid": `${__props.testId}-${unref(TabsTestIdModifiers).WRAPPER}`
|
|
81
84
|
}, [
|
|
82
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
85
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabsList, (tab) => {
|
|
83
86
|
return openBlock(), createElementBlock("li", {
|
|
84
87
|
ref_for: true,
|
|
85
88
|
ref: skipUnwrap.tabsNewList,
|
|
86
89
|
key: tab.id,
|
|
87
90
|
class: normalizeClass(["tab-item", {
|
|
88
91
|
"disabled-tab": tab.disabled,
|
|
89
|
-
"selected-tab": tab.id ===
|
|
92
|
+
"selected-tab": tab.id === __props.selectedTab
|
|
90
93
|
}]),
|
|
94
|
+
"data-testid": `${__props.testId}-${unref(TabsTestIdModifiers).TAB}-${tab.id}`,
|
|
91
95
|
onClick: ($event) => selectTab(tab),
|
|
92
96
|
onMouseover: ($event) => setHover(tab),
|
|
93
97
|
onMouseleave: clearHover
|
|
@@ -97,7 +101,7 @@ const _sfc_main = defineComponent({
|
|
|
97
101
|
key: 0,
|
|
98
102
|
name: tab.iconName,
|
|
99
103
|
class: normalizeClass(["tab-icon", {
|
|
100
|
-
size:
|
|
104
|
+
size: __props.size,
|
|
101
105
|
"lone-icon": !tab.name
|
|
102
106
|
}])
|
|
103
107
|
}, null, 8, ["name", "class"])) : createCommentVNode("", true),
|
|
@@ -112,14 +116,14 @@ const _sfc_main = defineComponent({
|
|
|
112
116
|
_: 2
|
|
113
117
|
}, 1024)) : createCommentVNode("", true)
|
|
114
118
|
], true)
|
|
115
|
-
], 42,
|
|
119
|
+
], 42, _hoisted_2);
|
|
116
120
|
}), 128)),
|
|
117
|
-
|
|
118
|
-
isHovered
|
|
119
|
-
],
|
|
121
|
+
_hoisted_3,
|
|
122
|
+
unref(isHovered) ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true)
|
|
123
|
+
], 10, _hoisted_1);
|
|
120
124
|
};
|
|
121
125
|
}
|
|
122
126
|
});
|
|
123
|
-
var Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
127
|
+
var Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c22c2836"]]);
|
|
124
128
|
|
|
125
129
|
export { Tabs as default };
|