@ironsource/shared-ui 2.2.0-test.2 → 2.2.0-test.22
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/AppHeader.vue_vue_type_style_index_0_scoped_18bc6c0d_lang.css +1 -0
- package/ButtonV4.vue_vue_type_style_index_0_scoped_a59af1ad_lang.css +1 -0
- package/CalendarMonth.vue_vue_type_style_index_0_scoped_a44769fd_lang.css +1 -0
- package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_6eae923a_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_3e022c94_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_3a061c08_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_6de5cddb_lang.css +1 -0
- package/ColumnPicker.vue_vue_type_style_index_0_scoped_d59af062_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_0967498f_lang.css +1 -0
- package/DateRange.vue_vue_type_style_index_0_scoped_25d03907_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_f8826716_lang.css +1 -0
- package/IconV4.vue_vue_type_style_index_0_scoped_6683c5b5_lang.css +1 -0
- package/InlineCopy.vue_vue_type_style_index_0_scoped_9fa1921a_lang.css +1 -0
- package/SectionDropdown.vue_vue_type_style_index_0_scoped_65877e48_lang.css +1 -0
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_35c79635_lang.css +1 -0
- package/SwitchV4.vue_vue_type_style_index_0_scoped_b71a806e_lang.css +1 -0
- package/Tag.vue_vue_type_style_index_0_scoped_78f19cb0_lang.css +1 -0
- package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_a8aebfee_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
- package/components/appHeader/AppHeader.vue.js +3 -3
- package/components/appHeader/AppHeader.vue2.js +43 -44
- package/components/button/v3/Button.vue.d.ts +6 -6
- package/components/button/v3/index.d.ts +14 -14
- package/components/button/v4/ButtonV4.vue.js +3 -3
- package/components/button/v4/ButtonV4.vue2.js +1 -1
- package/components/chart/Chart.vue.d.ts +5 -0
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +10 -8
- package/components/chart/ChartHeader.vue.d.ts +5 -0
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +73 -49
- package/components/chart/ChartPlane.vue.d.ts +5 -0
- package/components/chart/ChartPlane.vue.js +3 -3
- package/components/chart/ChartPlane.vue2.js +33 -31
- package/components/chart/ChartStoryArgs.d.ts +6 -0
- package/components/chart/index.d.ts +20 -1
- package/components/columnConfigurator/SectionDropdown.vue.js +3 -3
- package/components/columnConfigurator/SectionDropdown.vue2.js +6 -7
- package/components/columnPicker/ColumnPicker.vue.d.ts +2 -0
- package/components/columnPicker/ColumnPicker.vue.js +3 -3
- package/components/columnPicker/ColumnPicker.vue2.js +173 -153
- package/components/columnPicker/index.d.ts +7 -1
- package/components/dateRange/common/CalendarMonth.common.js +46 -41
- package/components/dateRange/common/DateRange.common.d.ts +1 -0
- package/components/dateRange/common/DateRange.common.js +39 -38
- package/components/dateRange/common/consts.common.d.ts +5 -0
- package/components/dateRange/common/consts.common.js +9 -0
- package/components/dateRange/v3/CalendarMonth.vue.d.ts +5 -0
- package/components/dateRange/v3/CalendarMonth.vue.js +3 -3
- package/components/dateRange/v3/CalendarMonth.vue2.js +6 -5
- package/components/dateRange/v3/DateRange.vue.d.ts +8 -3
- package/components/dateRange/v3/DateRange.vue.js +2 -2
- package/components/dateRange/v3/DateRange.vue2.js +2 -1
- package/components/dateRange/v3/DateRangePicker.vue.d.ts +3 -3
- package/components/dateRange/v3/index.d.ts +27 -8
- package/components/dateRange/v4/CalendarMonthV4.vue.d.ts +5 -0
- package/components/dateRange/v4/CalendarMonthV4.vue.js +4 -4
- package/components/dateRange/v4/CalendarMonthV4.vue2.js +12 -11
- package/components/dateRange/v4/DateRangePickerV4.vue.d.ts +3 -3
- package/components/dateRange/v4/DateRangeV4.vue.d.ts +8 -3
- package/components/dateRange/v4/DateRangeV4.vue.js +3 -3
- package/components/dateRange/v4/DateRangeV4.vue2.js +104 -101
- package/components/dateRange/v4/index.d.ts +27 -8
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +1 -1
- package/components/emptyState/v3/EmptyState.vue.d.ts +3 -3
- package/components/emptyState/v3/index.d.ts +7 -7
- package/components/icon/v4/IconV4.vue.d.ts +5 -0
- package/components/icon/v4/IconV4.vue.js +2 -2
- package/components/icon/v4/IconV4.vue2.js +27 -26
- package/components/icon/v4/index.d.ts +20 -1
- package/components/includeExclude/index.d.ts +16 -16
- package/components/inlineCopy/InlineCopy.vue.d.ts +15 -0
- package/components/inlineCopy/InlineCopy.vue.js +2 -2
- package/components/inlineCopy/InlineCopy.vue2.js +80 -51
- package/components/inlineCopy/index.d.ts +27 -0
- package/components/snackbar/common/notify.js +25 -25
- package/components/snackbar/common/snackbar.common.js +19 -19
- package/components/snackbar/common/snackbar.types.d.ts +2 -1
- package/components/snackbar/v4/SnackbarV4.vue.d.ts +8 -1
- package/components/snackbar/v4/SnackbarV4.vue.js +2 -2
- package/components/snackbar/v4/SnackbarV4.vue2.js +85 -64
- package/components/switch/v4/SwitchV4.vue.d.ts +5 -0
- package/components/switch/v4/SwitchV4.vue.js +4 -4
- package/components/switch/v4/SwitchV4.vue2.js +14 -13
- package/components/switch/v4/index.d.ts +9 -0
- package/components/table/v4/DataGrid.vue.d.ts +2 -0
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +82 -80
- package/components/table/v4/index.d.ts +7 -1
- package/components/table-cells/v3/Editable.vue.d.ts +1 -1
- package/components/table-cells/v3/index.d.ts +20 -20
- package/components/table-cells/v4/EditableV4.vue.d.ts +1 -1
- package/components/table-cells/v4/index.d.ts +20 -20
- package/components/tag/Tag.vue.d.ts +112 -0
- package/components/tag/Tag.vue.js +7 -0
- package/components/tag/Tag.vue2.js +221 -0
- package/components/tag/index.d.ts +161 -0
- package/components/tag/index.js +6 -0
- package/components/tagsField/index.d.ts +42 -3
- package/components/tagsField/index.js +6 -4
- package/components/tooltip/v4/TooltipV4.vue.d.ts +5 -0
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +76 -36
- package/components/tooltip/v4/index.d.ts +20 -1
- package/design-foundation.stories/colors/ColorsData.d.ts +1 -0
- package/index.d.ts +281 -82
- package/index.js +84 -78
- package/package.json +2 -7
- package/style/v4/colors.scss +1 -1
- package/style/v4/grid.css +1 -1
- package/style/v4/grid.css.map +1 -1
- package/AppHeader.vue_vue_type_style_index_0_scoped_9202b5db_lang.css +0 -1
- package/ButtonV4.vue_vue_type_style_index_0_scoped_afe44a65_lang.css +0 -1
- package/CalendarMonth.vue_vue_type_style_index_0_scoped_acd3440c_lang.css +0 -1
- package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_b0d3ea50_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_060d02be_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_d90c583e_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_3c887f7e_lang.css +0 -1
- package/ColumnPicker.vue_vue_type_style_index_0_scoped_01c4e08f_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_cd41c5ca_lang.css +0 -1
- package/DateRange.vue_vue_type_style_index_0_scoped_70e316e9_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_a849128a_lang.css +0 -1
- package/IconV4.vue_vue_type_style_index_0_scoped_dc433d48_lang.css +0 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css +0 -1
- package/SectionDropdown.vue_vue_type_style_index_0_scoped_cfad60a8_lang.css +0 -1
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_1b650c39_lang.css +0 -1
- package/SwitchV4.vue_vue_type_style_index_0_scoped_0a80c49f_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_8a451e54_lang.css +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../../InlineCopy.
|
|
2
|
-
import
|
|
1
|
+
import "../../InlineCopy.vue_vue_type_style_index_0_scoped_9fa1921a_lang.css"; import { defineComponent as v, ref as g, computed as h, watch as k, resolveComponent as z, openBlock as m, createElementBlock as I, createBlock as B, unref as t, mergeProps as y, withCtx as T, createTextVNode as S, toDisplayString as w, createCommentVNode as V, createVNode as n } from "vue";
|
|
2
|
+
import b from "../icon/v4/IconV4.vue.js";
|
|
3
3
|
import "../icon/v4/IconFlag.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import { useClipboard as
|
|
6
|
-
import { Snackbar as
|
|
7
|
-
import
|
|
8
|
-
import { useTestIdAttrs as
|
|
9
|
-
import { InlineCopyTestIdModifiers as
|
|
10
|
-
const
|
|
4
|
+
import L from "../typography/v4/Typography.vue.js";
|
|
5
|
+
import { useClipboard as N } from "@vueuse/core";
|
|
6
|
+
import { Snackbar as c } from "../snackbar/v4/index.js";
|
|
7
|
+
import P from "../tooltip/v4/TooltipV4.vue.js";
|
|
8
|
+
import { useTestIdAttrs as A } from "../../utils/testIds.js";
|
|
9
|
+
import { InlineCopyTestIdModifiers as s } from "../../testids/index.js";
|
|
10
|
+
const F = /* @__PURE__ */ v({
|
|
11
11
|
__name: "InlineCopy",
|
|
12
12
|
props: {
|
|
13
13
|
text: { default: "" },
|
|
@@ -18,57 +18,86 @@ const X = /* @__PURE__ */ y({
|
|
|
18
18
|
tooltipHeader: { default: "" },
|
|
19
19
|
tooltipText: { default: "Copy to clipboard" },
|
|
20
20
|
tooltipPlacement: { default: "bottom" },
|
|
21
|
-
valueToCopy: { default: "" }
|
|
21
|
+
valueToCopy: { default: "" },
|
|
22
|
+
asyncCopy: { type: Boolean, default: !1 },
|
|
23
|
+
isLoading: { type: Boolean, default: !1 },
|
|
24
|
+
loadingTitle: { default: "" }
|
|
22
25
|
},
|
|
23
26
|
emits: ["copy"],
|
|
24
|
-
setup(
|
|
25
|
-
const o =
|
|
26
|
-
switch (
|
|
27
|
+
setup(o, { emit: r }) {
|
|
28
|
+
const e = o, a = g(null), { copy: d, copied: p } = N({}), C = h(() => {
|
|
29
|
+
switch (e.size) {
|
|
27
30
|
case "medium":
|
|
28
31
|
return "0.875rem";
|
|
29
32
|
case "small":
|
|
30
33
|
default:
|
|
31
34
|
return "0.75rem";
|
|
32
35
|
}
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
|
|
36
|
+
});
|
|
37
|
+
k(
|
|
38
|
+
() => e.isLoading,
|
|
39
|
+
async (l, f) => {
|
|
40
|
+
if (f && !l && a.value) {
|
|
41
|
+
const i = e.valueToCopy || e.text;
|
|
42
|
+
a.value.close(), await d(i), p.value && c({
|
|
43
|
+
title: "Copied successfully",
|
|
44
|
+
type: "success",
|
|
45
|
+
duration: 2e3
|
|
46
|
+
}), a.value = null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
const x = async () => {
|
|
51
|
+
if (e.asyncCopy)
|
|
52
|
+
a.value = c({
|
|
53
|
+
title: e.loadingTitle,
|
|
54
|
+
type: "loading",
|
|
55
|
+
isLoading: !0
|
|
56
|
+
}), r("copy");
|
|
57
|
+
else {
|
|
58
|
+
const l = e.valueToCopy || e.text;
|
|
59
|
+
await d(l), p.value && c({
|
|
60
|
+
title: "Copied successfully",
|
|
61
|
+
type: "success",
|
|
62
|
+
duration: 2e3
|
|
63
|
+
}), r("copy");
|
|
64
|
+
}
|
|
65
|
+
}, u = A(e.testId, s);
|
|
66
|
+
return (l, f) => {
|
|
67
|
+
const i = z("Loader");
|
|
68
|
+
return m(), I("div", {
|
|
69
|
+
class: "inline-copy",
|
|
70
|
+
onClick: x
|
|
71
|
+
}, [
|
|
72
|
+
o.hideTextValue ? V("", !0) : (m(), B(t(L), y({
|
|
73
|
+
key: 0,
|
|
74
|
+
variant: "caption",
|
|
75
|
+
style: { fontSize: t(C) }
|
|
76
|
+
}, t(u)[t(s).TEXT]), {
|
|
77
|
+
default: T(() => [
|
|
78
|
+
S(w(o.text), 1)
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
}, 16, ["style"])),
|
|
82
|
+
n(i, { "stroke-width": 2 }),
|
|
83
|
+
n(t(P), {
|
|
84
|
+
text: o.tooltipText,
|
|
85
|
+
header: o.tooltipHeader,
|
|
86
|
+
placement: o.tooltipPlacement
|
|
87
|
+
}, {
|
|
88
|
+
default: T(() => [
|
|
89
|
+
n(t(b), y({
|
|
90
|
+
class: "icon-copy",
|
|
91
|
+
name: "copy",
|
|
92
|
+
size: o.iconSize || "16px"
|
|
93
|
+
}, t(u)[t(s).COPY_BTN]), null, 16, ["size"])
|
|
94
|
+
]),
|
|
95
|
+
_: 1
|
|
96
|
+
}, 8, ["text", "header", "placement"])
|
|
97
|
+
]);
|
|
98
|
+
};
|
|
70
99
|
}
|
|
71
100
|
});
|
|
72
101
|
export {
|
|
73
|
-
|
|
102
|
+
F as default
|
|
74
103
|
};
|
|
@@ -23,6 +23,10 @@ declare const InlineCopyTypes: () => import("vue").DefineComponent<{
|
|
|
23
23
|
required: true;
|
|
24
24
|
default: string;
|
|
25
25
|
};
|
|
26
|
+
isLoading: {
|
|
27
|
+
type: import("vue").PropType<boolean>;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
26
30
|
hideTextValue: {
|
|
27
31
|
type: import("vue").PropType<boolean>;
|
|
28
32
|
required: true;
|
|
@@ -40,6 +44,14 @@ declare const InlineCopyTypes: () => import("vue").DefineComponent<{
|
|
|
40
44
|
type: import("vue").PropType<string>;
|
|
41
45
|
default: string;
|
|
42
46
|
};
|
|
47
|
+
asyncCopy: {
|
|
48
|
+
type: import("vue").PropType<boolean>;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
loadingTitle: {
|
|
52
|
+
type: import("vue").PropType<string>;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
43
55
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
44
56
|
copy: () => void;
|
|
45
57
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -66,6 +78,10 @@ declare const InlineCopyTypes: () => import("vue").DefineComponent<{
|
|
|
66
78
|
required: true;
|
|
67
79
|
default: string;
|
|
68
80
|
};
|
|
81
|
+
isLoading: {
|
|
82
|
+
type: import("vue").PropType<boolean>;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
69
85
|
hideTextValue: {
|
|
70
86
|
type: import("vue").PropType<boolean>;
|
|
71
87
|
required: true;
|
|
@@ -83,6 +99,14 @@ declare const InlineCopyTypes: () => import("vue").DefineComponent<{
|
|
|
83
99
|
type: import("vue").PropType<string>;
|
|
84
100
|
default: string;
|
|
85
101
|
};
|
|
102
|
+
asyncCopy: {
|
|
103
|
+
type: import("vue").PropType<boolean>;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
106
|
+
loadingTitle: {
|
|
107
|
+
type: import("vue").PropType<string>;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
86
110
|
}>> & {
|
|
87
111
|
onCopy?: () => any;
|
|
88
112
|
}, {
|
|
@@ -91,9 +115,12 @@ declare const InlineCopyTypes: () => import("vue").DefineComponent<{
|
|
|
91
115
|
tooltipText: string;
|
|
92
116
|
tooltipPlacement: "top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
|
|
93
117
|
size: "small" | "medium";
|
|
118
|
+
isLoading: boolean;
|
|
94
119
|
hideTextValue: boolean;
|
|
95
120
|
iconSize: string;
|
|
96
121
|
tooltipHeader: string;
|
|
97
122
|
valueToCopy: string;
|
|
123
|
+
asyncCopy: boolean;
|
|
124
|
+
loadingTitle: string;
|
|
98
125
|
}>[];
|
|
99
126
|
export { InlineCopy, InlineCopyTypes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode as x, createVNode as
|
|
1
|
+
import { isVNode as x, createVNode as b, render as h } from "vue";
|
|
2
2
|
import { snackbarTypes as C } from "./snackbar.types.js";
|
|
3
3
|
const p = {
|
|
4
4
|
"top-left": [],
|
|
@@ -7,38 +7,38 @@ const p = {
|
|
|
7
7
|
"bottom-right": []
|
|
8
8
|
}, g = 16;
|
|
9
9
|
let A = 1;
|
|
10
|
-
const E = 2e3, H = (
|
|
11
|
-
const
|
|
10
|
+
const E = 2e3, H = (v) => {
|
|
11
|
+
const l = function(e = {}, t = null) {
|
|
12
12
|
(typeof e == "string" || x(e)) && (e = { message: e });
|
|
13
13
|
const o = e.position || "top-right";
|
|
14
14
|
let n = e.zIndex || E, s = p[o].reduce(
|
|
15
|
-
(m, { vm:
|
|
15
|
+
(m, { vm: N }) => m + (N.el?.offsetHeight || 0) + g,
|
|
16
16
|
e.offset || 0
|
|
17
17
|
);
|
|
18
18
|
s += g;
|
|
19
|
-
const
|
|
19
|
+
const f = () => n++, d = `notification_${A++}`, u = e.onClose, i = {
|
|
20
20
|
...e,
|
|
21
|
-
zIndex:
|
|
21
|
+
zIndex: f(),
|
|
22
22
|
offset: s,
|
|
23
23
|
id: d,
|
|
24
24
|
onClose: () => {
|
|
25
25
|
y(d, o, u);
|
|
26
26
|
}
|
|
27
|
-
}, c = document.body, a = document.createElement("div"), r =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
x(
|
|
31
|
-
default: () =>
|
|
27
|
+
}, c = document.body, a = document.createElement("div"), r = b(
|
|
28
|
+
v,
|
|
29
|
+
i,
|
|
30
|
+
x(i.message) ? {
|
|
31
|
+
default: () => i.message
|
|
32
32
|
} : null
|
|
33
33
|
);
|
|
34
|
-
return r.appContext = t ??
|
|
35
|
-
|
|
36
|
-
},
|
|
34
|
+
return r.appContext = t ?? l._context, r.props.onDestroy = () => {
|
|
35
|
+
h(null, a);
|
|
36
|
+
}, h(r, a), p[o].push({ vm: r }), c.appendChild(a?.firstElementChild), {
|
|
37
37
|
// instead of calling the onClose function directly, setting this value so that we can have the full lifecycle
|
|
38
38
|
// for out component, so that all closing steps will not be skipped.
|
|
39
39
|
close: () => {
|
|
40
|
-
const m = r.component?.
|
|
41
|
-
m &&
|
|
40
|
+
const m = r.component?.exposed;
|
|
41
|
+
m?.close && m.close();
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
};
|
|
@@ -48,22 +48,22 @@ const E = 2e3, H = (h) => {
|
|
|
48
48
|
);
|
|
49
49
|
if (s === -1)
|
|
50
50
|
return;
|
|
51
|
-
const { vm:
|
|
52
|
-
if (!
|
|
51
|
+
const { vm: f } = n[s];
|
|
52
|
+
if (!f)
|
|
53
53
|
return;
|
|
54
|
-
o?.(
|
|
55
|
-
const d =
|
|
54
|
+
o?.(f);
|
|
55
|
+
const d = f.el?.offsetHeight, u = t.split("-")[0];
|
|
56
56
|
n.splice(s, 1);
|
|
57
|
-
const
|
|
58
|
-
for (let c = s; c <
|
|
57
|
+
const i = n.length;
|
|
58
|
+
for (let c = s; c < i; c++) {
|
|
59
59
|
const { el: a, component: r } = n[c].vm;
|
|
60
60
|
r.props.offset = Number.parseInt(a.style[u], 10) - d - g;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
C.forEach((e) => {
|
|
64
|
-
|
|
64
|
+
l[e] = (t = {}) => ((typeof t == "string" || x(t)) && (t = {
|
|
65
65
|
message: t
|
|
66
|
-
}),
|
|
66
|
+
}), l({
|
|
67
67
|
...t,
|
|
68
68
|
type: e
|
|
69
69
|
}));
|
|
@@ -75,7 +75,7 @@ const E = 2e3, H = (h) => {
|
|
|
75
75
|
o && (o.visible = !1);
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
return
|
|
78
|
+
return l.closeAll = I, l._context = null, l;
|
|
79
79
|
};
|
|
80
80
|
export {
|
|
81
81
|
H as default
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useEventListener as
|
|
1
|
+
import { ref as y, computed as o, onMounted as C } from "vue";
|
|
2
|
+
import { useEventListener as h, useTimeoutFn as p } from "@vueuse/core";
|
|
3
3
|
import k from "../../icon/v3/icons/Close.vue.js";
|
|
4
4
|
import x from "../../icon/v3/icons/Check.vue.js";
|
|
5
5
|
const w = (t) => {
|
|
6
6
|
const r = {
|
|
7
7
|
success: x,
|
|
8
8
|
error: k
|
|
9
|
-
},
|
|
9
|
+
}, e = y(!1);
|
|
10
10
|
let c;
|
|
11
|
-
const a =
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
}), l =
|
|
11
|
+
const a = o(() => {
|
|
12
|
+
const n = t.type;
|
|
13
|
+
return n && r[t.type] ? n : "";
|
|
14
|
+
}), l = o(() => r[t.type] || t.icon || ""), f = o(
|
|
15
15
|
() => t.position.endsWith("right") ? "right" : "left"
|
|
16
|
-
), m =
|
|
16
|
+
), m = o(
|
|
17
17
|
() => t.position.startsWith("top") ? "top" : "bottom"
|
|
18
|
-
),
|
|
18
|
+
), d = o(() => ({
|
|
19
19
|
[m.value]: `${t.offset}px`,
|
|
20
20
|
zIndex: t.zIndex
|
|
21
21
|
}));
|
|
22
22
|
function i() {
|
|
23
|
-
t.duration > 0 && ({ stop: c } =
|
|
24
|
-
|
|
23
|
+
t.duration > 0 && ({ stop: c } = p(() => {
|
|
24
|
+
e.value && s();
|
|
25
25
|
}, t.duration));
|
|
26
26
|
}
|
|
27
27
|
function u() {
|
|
28
28
|
c?.();
|
|
29
29
|
}
|
|
30
30
|
function s() {
|
|
31
|
-
|
|
31
|
+
e.value = !1;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
|
|
33
|
+
function v({ code: n }) {
|
|
34
|
+
n === "Delete" || n === "Backspace" ? u() : n === "Escape" ? e.value && s() : i();
|
|
35
35
|
}
|
|
36
|
-
return
|
|
37
|
-
i(),
|
|
38
|
-
}),
|
|
39
|
-
visible:
|
|
36
|
+
return C(() => {
|
|
37
|
+
t.isLoading || i(), e.value = !0;
|
|
38
|
+
}), h(document, "keydown", v), {
|
|
39
|
+
visible: e,
|
|
40
40
|
horizontalClass: f,
|
|
41
|
-
positionStyle:
|
|
41
|
+
positionStyle: d,
|
|
42
42
|
clearTimer: u,
|
|
43
43
|
startTimer: i,
|
|
44
44
|
iconComponent: l,
|
|
@@ -16,13 +16,14 @@ export interface SnackbarProps {
|
|
|
16
16
|
offset: number;
|
|
17
17
|
onClick: () => void;
|
|
18
18
|
onClose: () => void;
|
|
19
|
-
type: 'success' | 'error' | 'info';
|
|
19
|
+
type: 'success' | 'error' | 'info' | 'loading';
|
|
20
20
|
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
21
21
|
showClose?: boolean;
|
|
22
22
|
title?: string;
|
|
23
23
|
actionButtons: ButtonProps[];
|
|
24
24
|
zIndex?: number;
|
|
25
25
|
testId?: string;
|
|
26
|
+
isLoading?: boolean;
|
|
26
27
|
}
|
|
27
28
|
export type SnackbarOptions = Omit<SnackbarProps, 'id'> & {
|
|
28
29
|
appendTo?: HTMLElement | string;
|
|
@@ -22,6 +22,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
22
22
|
zIndex?: number;
|
|
23
23
|
actionButtons: ButtonProps[];
|
|
24
24
|
testId: string;
|
|
25
|
+
isLoading: boolean;
|
|
25
26
|
}>, {
|
|
26
27
|
type: string;
|
|
27
28
|
zIndex: number;
|
|
@@ -30,7 +31,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
30
31
|
title: string;
|
|
31
32
|
position: string;
|
|
32
33
|
testId: string;
|
|
33
|
-
|
|
34
|
+
isLoading: boolean;
|
|
35
|
+
}>, {
|
|
36
|
+
close: () => void;
|
|
37
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
34
38
|
destroy: (...args: any[]) => void;
|
|
35
39
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
36
40
|
customClass: string;
|
|
@@ -50,6 +54,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
50
54
|
zIndex?: number;
|
|
51
55
|
actionButtons: ButtonProps[];
|
|
52
56
|
testId: string;
|
|
57
|
+
isLoading: boolean;
|
|
53
58
|
}>, {
|
|
54
59
|
type: string;
|
|
55
60
|
zIndex: number;
|
|
@@ -58,6 +63,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
58
63
|
title: string;
|
|
59
64
|
position: string;
|
|
60
65
|
testId: string;
|
|
66
|
+
isLoading: boolean;
|
|
61
67
|
}>>> & {
|
|
62
68
|
onDestroy?: (...args: any[]) => any;
|
|
63
69
|
}, {
|
|
@@ -68,6 +74,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
68
74
|
zIndex: number;
|
|
69
75
|
duration: number;
|
|
70
76
|
showClose: boolean;
|
|
77
|
+
isLoading: boolean;
|
|
71
78
|
}>, {
|
|
72
79
|
default?(_: {}): any;
|
|
73
80
|
actions?(_: {}): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SnackbarV4.vue2.js";
|
|
2
2
|
/* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../SnackbarV4.
|
|
4
|
-
const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../../SnackbarV4.vue_vue_type_style_index_0_scoped_35c79635_lang.css"; //*');
|
|
4
|
+
const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-35c79635"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|