@ironsource/shared-ui 2.1.11-test.27 → 2.1.11-test.44
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/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_04b9d6b3_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_a1c626cd_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +1 -0
- package/CheckboxV4.vue_vue_type_style_index_0_scoped_af4ae3c3_lang.css +1 -0
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8f96cf5a_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_26488faf_lang.css +1 -0
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_ddfaf207_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_75002075_lang.css +1 -0
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_18728498_lang.css +1 -0
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_383011d3_lang.css +1 -0
- package/FormCard.vue_vue_type_style_index_0_scoped_86feae7b_lang.css +1 -0
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_89fe8aa1_lang.css +1 -0
- package/SortableItem.vue_vue_type_style_index_0_scoped_7cb676f1_lang.css +1 -0
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +1 -0
- package/SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css +1 -0
- package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_a898b632_lang.css +1 -0
- package/Typography.vue_vue_type_style_index_0_scoped_a14013a5_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +11 -3
- package/components/chart/Chart.vue.js +2 -2
- package/components/chart/Chart.vue2.js +108 -96
- package/components/chart/ChartHeader.vue.d.ts +13 -6
- package/components/chart/ChartHeader.vue.js +2 -2
- package/components/chart/ChartHeader.vue2.js +32 -29
- package/components/chart/ChartLegend.vue.d.ts +5 -0
- package/components/chart/ChartLegend.vue.js +3 -3
- package/components/chart/ChartLegend.vue2.js +99 -49
- package/components/chart/ChartTooltip.vue.d.ts +4 -5
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +64 -43
- package/components/chart/index.d.ts +36 -16
- package/components/chart/mockData.d.ts +15 -2
- package/components/chart/types.d.ts +15 -1
- package/components/chart/utils/utils.js +5 -5
- package/components/checkbox/v4/CheckboxV4.vue.js +3 -3
- package/components/checkbox/v4/CheckboxV4.vue2.js +2 -2
- package/components/dialog/v4/DialogV4.vue.d.ts +15 -0
- package/components/dialog/v4/DialogV4.vue.js +3 -3
- package/components/dialog/v4/DialogV4.vue2.js +80 -73
- package/components/dialog/v4/index.d.ts +58 -1
- package/components/dropdown/common/Dropdown.common.js +36 -34
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +15 -0
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +42 -20
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +55 -40
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +20 -0
- package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +136 -97
- package/components/dropdown/v4/DropdownV4.vue.d.ts +2 -0
- package/components/dropdown/v4/DropdownV4.vue.js +2 -2
- package/components/dropdown/v4/DropdownV4.vue2.js +7 -7
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +5 -0
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +165 -158
- package/components/dropdown/v4/index.d.ts +67 -2
- package/components/emptyState/v4/EmptyStateV4.vue.js +3 -3
- package/components/emptyState/v4/EmptyStateV4.vue2.js +1 -1
- package/components/filtersPanel/v4/FiltersPanelV4.vue.js +3 -3
- package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +1 -1
- package/components/forms/FormCard.vue.js +3 -3
- package/components/forms/FormCard.vue2.js +1 -1
- package/components/snackbar/v4/SnackbarV4.vue.d.ts +7 -116
- package/components/snackbar/v4/SnackbarV4.vue.js +5 -5
- package/components/snackbar/v4/SnackbarV4.vue2.js +62 -60
- package/components/sortableList/SortableItem.vue.js +3 -3
- package/components/sortableList/SortableItem.vue2.js +57 -56
- package/components/sortableList/SortableItemLabel.vue.js +3 -3
- package/components/sortableList/SortableItemLabel.vue2.js +20 -23
- package/components/sortableList/SortableList.vue.js +3 -3
- package/components/sortableList/SortableList.vue2.js +82 -76
- package/components/table/common/Table.common.d.ts +1 -1
- package/components/table/common/Table.common.js +78 -70
- package/components/table/common/consts.d.ts +4 -0
- package/components/table/common/consts.js +7 -0
- package/components/table/v4/DataGrid.vue.d.ts +10 -5
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +173 -171
- package/components/table/v4/DataGridMenu.vue.js +5 -5
- package/components/table/v4/DataGridMenu.vue2.js +1 -1
- package/components/table/v4/index.d.ts +39 -20
- package/components/table-cells/common/Editable.common.js +24 -19
- package/components/typography/v4/Typography.vue.js +3 -3
- package/components/typography/v4/Typography.vue2.js +24 -18
- package/index.d.ts +386 -47
- package/index.js +1 -1
- package/package.json +1 -1
- package/style/v4/grid.css +1 -1
- package/style/v4/grid.css.map +1 -1
- package/style/v4/spacings.scss +1 -0
- package/testids/index.d.ts +1 -0
- package/testids/index.js +13 -13
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_f9a13e27_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_8f471697_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_4c37736e_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_c0f71a49_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css +0 -1
- package/CheckboxV4.vue_vue_type_style_index_0_scoped_8e5b619a_lang.css +0 -1
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_039dd922_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_2aee12ad_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_2406226b_lang.css +0 -1
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_a6e4672f_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_09c488cf_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_6466948d_lang.css +0 -1
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_24001caa_lang.css +0 -1
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_111b200a_lang.css +0 -1
- package/FormCard.vue_vue_type_style_index_0_scoped_c7965a69_lang.css +0 -1
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_49c5ccea_lang.css +0 -1
- package/SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css +0 -1
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css +0 -1
- package/SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_bdfb0aef_lang.css +0 -1
- package/Typography.vue_vue_type_style_index_0_scoped_992962bc_lang.css +0 -1
|
@@ -29,11 +29,12 @@ declare const DataGridTypes: () => (({
|
|
|
29
29
|
getRowId: (row: import("../common/Table.types").Row, index: number) => unknown;
|
|
30
30
|
getRowKey: (row: import("../common/Table.types").Row, index: number) => string | number;
|
|
31
31
|
selectedMatcher: (rowId: unknown, selected: unknown) => boolean;
|
|
32
|
-
isSelectionSticky: boolean;
|
|
33
32
|
emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
|
|
34
33
|
zIndexBase: number;
|
|
35
34
|
rowCustomClassKey: string;
|
|
36
35
|
rowDataKey: string;
|
|
36
|
+
isSelectionSticky: boolean;
|
|
37
|
+
isSelectionBordered: boolean;
|
|
37
38
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
38
39
|
sort: {
|
|
39
40
|
type: import("vue").PropType<import("../common/Table.types").Sort>;
|
|
@@ -131,10 +132,6 @@ declare const DataGridTypes: () => (({
|
|
|
131
132
|
type: import("vue").PropType<(rowId: unknown, selected: unknown) => boolean>;
|
|
132
133
|
default: (rowId: any, selectedItem: any) => boolean;
|
|
133
134
|
};
|
|
134
|
-
isSelectionSticky: {
|
|
135
|
-
type: import("vue").PropType<boolean>;
|
|
136
|
-
default: boolean;
|
|
137
|
-
};
|
|
138
135
|
emptyStateVariant: {
|
|
139
136
|
type: import("vue").PropType<"error" | "no-access" | "no-results" | "no-data" | "files" | "settings">;
|
|
140
137
|
default: any;
|
|
@@ -151,6 +148,14 @@ declare const DataGridTypes: () => (({
|
|
|
151
148
|
type: import("vue").PropType<string>;
|
|
152
149
|
default: string;
|
|
153
150
|
};
|
|
151
|
+
isSelectionSticky: {
|
|
152
|
+
type: import("vue").PropType<boolean>;
|
|
153
|
+
default: boolean;
|
|
154
|
+
};
|
|
155
|
+
isSelectionBordered: {
|
|
156
|
+
type: import("vue").PropType<boolean>;
|
|
157
|
+
default: boolean;
|
|
158
|
+
};
|
|
154
159
|
}>> & {
|
|
155
160
|
onSelectAll?: (value: boolean) => any;
|
|
156
161
|
onLoadMore?: () => any;
|
|
@@ -162,7 +167,7 @@ declare const DataGridTypes: () => (({
|
|
|
162
167
|
"onUpdate:selection"?: (selection: unknown[]) => any;
|
|
163
168
|
onSelectRow?: (value: boolean) => any;
|
|
164
169
|
onClickRow?: (rowIndex: number) => any;
|
|
165
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "sort" | "title" | "search" | "testId" | "isLoading" | "searchAutoFocus" | "searchPlaceholder" | "selection" | "showSearch" | "loadingRowCount" | "emptyStateTitle" | "isSticky" | "sections" | "isStickyHeader" | "emptyStateSubtitle" | "isInfiniteScroll" | "infiniteScrollThreshold" | "rowHeight" | "defaultScrollPosition" | "getRowId" | "getRowKey" | "selectedMatcher" | "
|
|
170
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "sort" | "title" | "search" | "testId" | "isLoading" | "searchAutoFocus" | "searchPlaceholder" | "selection" | "showSearch" | "loadingRowCount" | "emptyStateTitle" | "isSticky" | "sections" | "isStickyHeader" | "emptyStateSubtitle" | "isInfiniteScroll" | "infiniteScrollThreshold" | "rowHeight" | "defaultScrollPosition" | "getRowId" | "getRowKey" | "selectedMatcher" | "emptyStateVariant" | "zIndexBase" | "rowCustomClassKey" | "rowDataKey" | "isSelectionSticky" | "isSelectionBordered">;
|
|
166
171
|
$attrs: {
|
|
167
172
|
[x: string]: unknown;
|
|
168
173
|
};
|
|
@@ -273,10 +278,6 @@ declare const DataGridTypes: () => (({
|
|
|
273
278
|
type: import("vue").PropType<(rowId: unknown, selected: unknown) => boolean>;
|
|
274
279
|
default: (rowId: any, selectedItem: any) => boolean;
|
|
275
280
|
};
|
|
276
|
-
isSelectionSticky: {
|
|
277
|
-
type: import("vue").PropType<boolean>;
|
|
278
|
-
default: boolean;
|
|
279
|
-
};
|
|
280
281
|
emptyStateVariant: {
|
|
281
282
|
type: import("vue").PropType<"error" | "no-access" | "no-results" | "no-data" | "files" | "settings">;
|
|
282
283
|
default: any;
|
|
@@ -293,6 +294,14 @@ declare const DataGridTypes: () => (({
|
|
|
293
294
|
type: import("vue").PropType<string>;
|
|
294
295
|
default: string;
|
|
295
296
|
};
|
|
297
|
+
isSelectionSticky: {
|
|
298
|
+
type: import("vue").PropType<boolean>;
|
|
299
|
+
default: boolean;
|
|
300
|
+
};
|
|
301
|
+
isSelectionBordered: {
|
|
302
|
+
type: import("vue").PropType<boolean>;
|
|
303
|
+
default: boolean;
|
|
304
|
+
};
|
|
296
305
|
}>> & {
|
|
297
306
|
onSelectAll?: (value: boolean) => any;
|
|
298
307
|
onLoadMore?: () => any;
|
|
@@ -340,11 +349,12 @@ declare const DataGridTypes: () => (({
|
|
|
340
349
|
getRowId: (row: import("../common/Table.types").Row, index: number) => unknown;
|
|
341
350
|
getRowKey: (row: import("../common/Table.types").Row, index: number) => string | number;
|
|
342
351
|
selectedMatcher: (rowId: unknown, selected: unknown) => boolean;
|
|
343
|
-
isSelectionSticky: boolean;
|
|
344
352
|
emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
|
|
345
353
|
zIndexBase: number;
|
|
346
354
|
rowCustomClassKey: string;
|
|
347
355
|
rowDataKey: string;
|
|
356
|
+
isSelectionSticky: boolean;
|
|
357
|
+
isSelectionBordered: boolean;
|
|
348
358
|
}, {}, string> & {
|
|
349
359
|
beforeCreate?: (() => void) | (() => void)[];
|
|
350
360
|
created?: (() => void) | (() => void)[];
|
|
@@ -462,10 +472,6 @@ declare const DataGridTypes: () => (({
|
|
|
462
472
|
type: import("vue").PropType<(rowId: unknown, selected: unknown) => boolean>;
|
|
463
473
|
default: (rowId: any, selectedItem: any) => boolean;
|
|
464
474
|
};
|
|
465
|
-
isSelectionSticky: {
|
|
466
|
-
type: import("vue").PropType<boolean>;
|
|
467
|
-
default: boolean;
|
|
468
|
-
};
|
|
469
475
|
emptyStateVariant: {
|
|
470
476
|
type: import("vue").PropType<"error" | "no-access" | "no-results" | "no-data" | "files" | "settings">;
|
|
471
477
|
default: any;
|
|
@@ -482,6 +488,14 @@ declare const DataGridTypes: () => (({
|
|
|
482
488
|
type: import("vue").PropType<string>;
|
|
483
489
|
default: string;
|
|
484
490
|
};
|
|
491
|
+
isSelectionSticky: {
|
|
492
|
+
type: import("vue").PropType<boolean>;
|
|
493
|
+
default: boolean;
|
|
494
|
+
};
|
|
495
|
+
isSelectionBordered: {
|
|
496
|
+
type: import("vue").PropType<boolean>;
|
|
497
|
+
default: boolean;
|
|
498
|
+
};
|
|
485
499
|
}>> & {
|
|
486
500
|
onSelectAll?: (value: boolean) => any;
|
|
487
501
|
onLoadMore?: () => any;
|
|
@@ -596,10 +610,6 @@ declare const DataGridTypes: () => (({
|
|
|
596
610
|
type: import("vue").PropType<(rowId: unknown, selected: unknown) => boolean>;
|
|
597
611
|
default: (rowId: any, selectedItem: any) => boolean;
|
|
598
612
|
};
|
|
599
|
-
isSelectionSticky: {
|
|
600
|
-
type: import("vue").PropType<boolean>;
|
|
601
|
-
default: boolean;
|
|
602
|
-
};
|
|
603
613
|
emptyStateVariant: {
|
|
604
614
|
type: import("vue").PropType<"error" | "no-access" | "no-results" | "no-data" | "files" | "settings">;
|
|
605
615
|
default: any;
|
|
@@ -616,6 +626,14 @@ declare const DataGridTypes: () => (({
|
|
|
616
626
|
type: import("vue").PropType<string>;
|
|
617
627
|
default: string;
|
|
618
628
|
};
|
|
629
|
+
isSelectionSticky: {
|
|
630
|
+
type: import("vue").PropType<boolean>;
|
|
631
|
+
default: boolean;
|
|
632
|
+
};
|
|
633
|
+
isSelectionBordered: {
|
|
634
|
+
type: import("vue").PropType<boolean>;
|
|
635
|
+
default: boolean;
|
|
636
|
+
};
|
|
619
637
|
}>> & {
|
|
620
638
|
onSelectAll?: (value: boolean) => any;
|
|
621
639
|
onLoadMore?: () => any;
|
|
@@ -663,11 +681,12 @@ declare const DataGridTypes: () => (({
|
|
|
663
681
|
getRowId: (row: import("../common/Table.types").Row, index: number) => unknown;
|
|
664
682
|
getRowKey: (row: import("../common/Table.types").Row, index: number) => string | number;
|
|
665
683
|
selectedMatcher: (rowId: unknown, selected: unknown) => boolean;
|
|
666
|
-
isSelectionSticky: boolean;
|
|
667
684
|
emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
|
|
668
685
|
zIndexBase: number;
|
|
669
686
|
rowCustomClassKey: string;
|
|
670
687
|
rowDataKey: string;
|
|
688
|
+
isSelectionSticky: boolean;
|
|
689
|
+
isSelectionBordered: boolean;
|
|
671
690
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
672
691
|
$slots: Partial<Record<`section-${string}`, (_: {}) => any>> & Partial<Record<`header-${string}`, (_: {
|
|
673
692
|
column: import("../common/Table.types").Column;
|
|
@@ -1,50 +1,55 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useTableContext as
|
|
3
|
-
import { EditableContext as
|
|
4
|
-
import { onClickOutside as
|
|
5
|
-
const
|
|
6
|
-
const l =
|
|
7
|
-
if (e.cell ===
|
|
1
|
+
import { ref as n, provide as f, watch as d } from "vue";
|
|
2
|
+
import { useTableContext as C } from "../../table/common/TableContext.js";
|
|
3
|
+
import { EditableContext as m } from "./EditableContext.js";
|
|
4
|
+
import { onClickOutside as x } from "@vueuse/core";
|
|
5
|
+
const E = (e) => {
|
|
6
|
+
const l = n(!1), t = n(e.cell), i = n(e.saveOnClickOutside), o = n(null), r = C("Editable"), a = n(null), v = () => {
|
|
7
|
+
if (e.cell === t.value) {
|
|
8
8
|
l.value = !1;
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
|
-
const u = e.validateFunction?.(
|
|
11
|
+
const u = e.validateFunction?.(t.value);
|
|
12
12
|
a.value = u, !u && (r.onClose({
|
|
13
13
|
rowIndex: e.rowIndex,
|
|
14
14
|
cellIndex: e.cellIndex,
|
|
15
|
-
value:
|
|
15
|
+
value: t.value
|
|
16
16
|
}), l.value = !1);
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
f(m, {
|
|
19
19
|
focusable: !0,
|
|
20
|
-
value:
|
|
20
|
+
value: t,
|
|
21
21
|
error: a,
|
|
22
22
|
confirmable: !0,
|
|
23
|
-
saveOnClickOutside:
|
|
23
|
+
saveOnClickOutside: i.value,
|
|
24
24
|
onChange(u) {
|
|
25
|
-
|
|
25
|
+
t.value = u, a.value = e.validateFunction?.(t.value);
|
|
26
26
|
},
|
|
27
27
|
onClose: v
|
|
28
28
|
});
|
|
29
29
|
const c = () => {
|
|
30
30
|
l.value || e.isLoading || (l.value = !l.value);
|
|
31
31
|
}, s = () => {
|
|
32
|
-
|
|
32
|
+
t.value = e.cell, a.value = null;
|
|
33
33
|
};
|
|
34
|
-
return
|
|
34
|
+
return x(o, () => {
|
|
35
35
|
if (l.value) {
|
|
36
|
-
if (
|
|
36
|
+
if (i.value) {
|
|
37
37
|
v();
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
40
|
l.value = !1, s(), r.onClose();
|
|
41
41
|
}
|
|
42
|
-
}),
|
|
42
|
+
}), d(
|
|
43
|
+
() => e.cell,
|
|
44
|
+
() => {
|
|
45
|
+
l.value || (t.value = e.cell);
|
|
46
|
+
}
|
|
47
|
+
), {
|
|
43
48
|
onEdit: c,
|
|
44
|
-
target:
|
|
49
|
+
target: o,
|
|
45
50
|
isEditing: l
|
|
46
51
|
};
|
|
47
52
|
};
|
|
48
53
|
export {
|
|
49
|
-
|
|
54
|
+
E as editableCommon
|
|
50
55
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Typography.vue2.js";
|
|
2
2
|
/* empty css */import p from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../Typography.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../Typography.vue_vue_type_style_index_0_scoped_a14013a5_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ p(o, [["__scopeId", "data-v-a14013a5"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "../../../Typography.
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import "../../../Typography.vue_vue_type_style_index_0_scoped_a14013a5_lang.css"; import { defineComponent as v, ref as f, computed as d, openBlock as o, createBlock as i, unref as a, withCtx as s, resolveDynamicComponent as h, normalizeClass as b, renderSlot as p } from "vue";
|
|
2
|
+
import y from "../../tooltip/v4/TooltipV4.vue.js";
|
|
3
|
+
import { useResizeObserver as T } from "@vueuse/core";
|
|
4
|
+
const L = /* @__PURE__ */ v({
|
|
4
5
|
__name: "Typography",
|
|
5
6
|
props: {
|
|
6
7
|
isTruncated: { type: Boolean },
|
|
@@ -11,7 +12,7 @@ const C = /* @__PURE__ */ m({
|
|
|
11
12
|
variant: { default: "body1" }
|
|
12
13
|
},
|
|
13
14
|
setup(t) {
|
|
14
|
-
const
|
|
15
|
+
const l = t, e = f(null), n = f(!1), m = {
|
|
15
16
|
title: "font-title",
|
|
16
17
|
h1: "font-heading-1",
|
|
17
18
|
h2: "font-heading-2",
|
|
@@ -33,8 +34,8 @@ const C = /* @__PURE__ */ m({
|
|
|
33
34
|
chart1: "font-chart-1",
|
|
34
35
|
chart2: "font-chart-2",
|
|
35
36
|
overline: "font-overline"
|
|
36
|
-
}, r =
|
|
37
|
-
switch (
|
|
37
|
+
}, r = d(() => {
|
|
38
|
+
switch (l.variant) {
|
|
38
39
|
case "title":
|
|
39
40
|
return "h1";
|
|
40
41
|
case "h1":
|
|
@@ -43,43 +44,48 @@ const C = /* @__PURE__ */ m({
|
|
|
43
44
|
case "h4":
|
|
44
45
|
case "h5":
|
|
45
46
|
case "h6":
|
|
46
|
-
return
|
|
47
|
+
return l.variant;
|
|
47
48
|
default:
|
|
48
49
|
return "span";
|
|
49
50
|
}
|
|
50
|
-
}),
|
|
51
|
-
return (
|
|
51
|
+
}), u = d(() => m[l.variant]);
|
|
52
|
+
return T(e, () => {
|
|
53
|
+
if (!e.value)
|
|
54
|
+
return n.value = !1;
|
|
55
|
+
n.value = // Note: These values are rounded which can make edge cases sometimes
|
|
56
|
+
e.value.scrollWidth > e.value.clientWidth;
|
|
57
|
+
}), (c, g) => t.withTooltip && t.isTruncated ? (o(), i(a(y), {
|
|
52
58
|
key: 0,
|
|
53
59
|
placement: t.tooltipPlacement,
|
|
54
|
-
disabled: !
|
|
60
|
+
disabled: !n.value,
|
|
55
61
|
text: t.tooltipText,
|
|
56
62
|
class: "typography-tooltip",
|
|
57
63
|
"test-id": t.tooltipTestId
|
|
58
64
|
}, {
|
|
59
65
|
default: s(() => [
|
|
60
|
-
(o(), i(
|
|
66
|
+
(o(), i(h(a(r)), {
|
|
61
67
|
ref_key: "textElement",
|
|
62
|
-
ref:
|
|
63
|
-
class:
|
|
68
|
+
ref: e,
|
|
69
|
+
class: b(["antialiased", { [a(u)]: !0, truncate: t.isTruncated }])
|
|
64
70
|
}, {
|
|
65
71
|
default: s(() => [
|
|
66
|
-
|
|
72
|
+
p(c.$slots, "default", {}, void 0, !0)
|
|
67
73
|
]),
|
|
68
74
|
_: 3
|
|
69
75
|
}, 8, ["class"]))
|
|
70
76
|
]),
|
|
71
77
|
_: 3
|
|
72
|
-
}, 8, ["placement", "disabled", "text", "test-id"])) : (o(), i(
|
|
78
|
+
}, 8, ["placement", "disabled", "text", "test-id"])) : (o(), i(h(a(r)), {
|
|
73
79
|
key: 1,
|
|
74
|
-
class:
|
|
80
|
+
class: b(["antialiased", { [a(u)]: !0, truncate: t.isTruncated }])
|
|
75
81
|
}, {
|
|
76
82
|
default: s(() => [
|
|
77
|
-
|
|
83
|
+
p(c.$slots, "default", {}, void 0, !0)
|
|
78
84
|
]),
|
|
79
85
|
_: 3
|
|
80
86
|
}, 8, ["class"]));
|
|
81
87
|
}
|
|
82
88
|
});
|
|
83
89
|
export {
|
|
84
|
-
|
|
90
|
+
L as default
|
|
85
91
|
};
|