@ironsource/shared-ui 2.2.0-test.2 → 2.2.0-test.20

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.
Files changed (129) hide show
  1. package/AppHeader.vue_vue_type_style_index_0_scoped_18bc6c0d_lang.css +1 -0
  2. package/ButtonV4.vue_vue_type_style_index_0_scoped_a59af1ad_lang.css +1 -0
  3. package/CalendarMonth.vue_vue_type_style_index_0_scoped_a44769fd_lang.css +1 -0
  4. package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_6eae923a_lang.css +1 -0
  5. package/Chart.vue_vue_type_style_index_0_scoped_3ed9f4bc_lang.css +1 -0
  6. package/ChartHeader.vue_vue_type_style_index_0_scoped_3a061c08_lang.css +1 -0
  7. package/ChartPlane.vue_vue_type_style_index_0_scoped_6de5cddb_lang.css +1 -0
  8. package/ColumnPicker.vue_vue_type_style_index_0_scoped_d59af062_lang.css +1 -0
  9. package/DataGrid.vue_vue_type_style_index_0_scoped_0967498f_lang.css +1 -0
  10. package/DateRange.vue_vue_type_style_index_0_scoped_25d03907_lang.css +1 -0
  11. package/DateRangeV4.vue_vue_type_style_index_0_scoped_f8826716_lang.css +1 -0
  12. package/IconV4.vue_vue_type_style_index_0_scoped_6683c5b5_lang.css +1 -0
  13. package/InlineCopy.vue_vue_type_style_index_0_scoped_9fa1921a_lang.css +1 -0
  14. package/SectionDropdown.vue_vue_type_style_index_0_scoped_65877e48_lang.css +1 -0
  15. package/SnackbarV4.vue_vue_type_style_index_0_scoped_35c79635_lang.css +1 -0
  16. package/SwitchV4.vue_vue_type_style_index_0_scoped_b71a806e_lang.css +1 -0
  17. package/Tag.vue_vue_type_style_index_0_scoped_78f19cb0_lang.css +1 -0
  18. package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
  19. package/TooltipV4.vue_vue_type_style_index_0_scoped_a8aebfee_lang.css +1 -0
  20. package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
  21. package/components/appHeader/AppHeader.vue.js +3 -3
  22. package/components/appHeader/AppHeader.vue2.js +43 -44
  23. package/components/button/v3/Button.vue.d.ts +6 -6
  24. package/components/button/v3/index.d.ts +14 -14
  25. package/components/button/v4/ButtonV4.vue.js +3 -3
  26. package/components/button/v4/ButtonV4.vue2.js +1 -1
  27. package/components/chart/Chart.vue.d.ts +5 -0
  28. package/components/chart/Chart.vue.js +3 -3
  29. package/components/chart/Chart.vue2.js +14 -12
  30. package/components/chart/ChartHeader.vue.d.ts +5 -0
  31. package/components/chart/ChartHeader.vue.js +3 -3
  32. package/components/chart/ChartHeader.vue2.js +73 -49
  33. package/components/chart/ChartPlane.vue.d.ts +5 -0
  34. package/components/chart/ChartPlane.vue.js +3 -3
  35. package/components/chart/ChartPlane.vue2.js +33 -31
  36. package/components/chart/ChartStoryArgs.d.ts +6 -0
  37. package/components/chart/index.d.ts +20 -1
  38. package/components/columnConfigurator/SectionDropdown.vue.js +3 -3
  39. package/components/columnConfigurator/SectionDropdown.vue2.js +6 -7
  40. package/components/columnPicker/ColumnPicker.vue.d.ts +2 -0
  41. package/components/columnPicker/ColumnPicker.vue.js +3 -3
  42. package/components/columnPicker/ColumnPicker.vue2.js +173 -153
  43. package/components/columnPicker/index.d.ts +7 -1
  44. package/components/dateRange/common/CalendarMonth.common.js +46 -41
  45. package/components/dateRange/common/DateRange.common.d.ts +1 -0
  46. package/components/dateRange/common/DateRange.common.js +39 -38
  47. package/components/dateRange/common/consts.common.d.ts +5 -0
  48. package/components/dateRange/common/consts.common.js +9 -0
  49. package/components/dateRange/v3/CalendarMonth.vue.d.ts +5 -0
  50. package/components/dateRange/v3/CalendarMonth.vue.js +3 -3
  51. package/components/dateRange/v3/CalendarMonth.vue2.js +6 -5
  52. package/components/dateRange/v3/DateRange.vue.d.ts +8 -3
  53. package/components/dateRange/v3/DateRange.vue.js +2 -2
  54. package/components/dateRange/v3/DateRange.vue2.js +2 -1
  55. package/components/dateRange/v3/DateRangePicker.vue.d.ts +3 -3
  56. package/components/dateRange/v3/index.d.ts +27 -8
  57. package/components/dateRange/v4/CalendarMonthV4.vue.d.ts +5 -0
  58. package/components/dateRange/v4/CalendarMonthV4.vue.js +4 -4
  59. package/components/dateRange/v4/CalendarMonthV4.vue2.js +12 -11
  60. package/components/dateRange/v4/DateRangePickerV4.vue.d.ts +3 -3
  61. package/components/dateRange/v4/DateRangeV4.vue.d.ts +8 -3
  62. package/components/dateRange/v4/DateRangeV4.vue.js +3 -3
  63. package/components/dateRange/v4/DateRangeV4.vue2.js +104 -101
  64. package/components/dateRange/v4/index.d.ts +27 -8
  65. package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +1 -1
  66. package/components/emptyState/v3/EmptyState.vue.d.ts +3 -3
  67. package/components/emptyState/v3/index.d.ts +7 -7
  68. package/components/icon/v4/IconV4.vue.d.ts +5 -0
  69. package/components/icon/v4/IconV4.vue.js +2 -2
  70. package/components/icon/v4/IconV4.vue2.js +27 -26
  71. package/components/icon/v4/index.d.ts +20 -1
  72. package/components/includeExclude/index.d.ts +16 -16
  73. package/components/inlineCopy/InlineCopy.vue.d.ts +15 -0
  74. package/components/inlineCopy/InlineCopy.vue.js +2 -2
  75. package/components/inlineCopy/InlineCopy.vue2.js +80 -51
  76. package/components/inlineCopy/index.d.ts +27 -0
  77. package/components/snackbar/common/notify.js +25 -25
  78. package/components/snackbar/common/snackbar.common.js +19 -19
  79. package/components/snackbar/common/snackbar.types.d.ts +2 -1
  80. package/components/snackbar/v4/SnackbarV4.vue.d.ts +8 -1
  81. package/components/snackbar/v4/SnackbarV4.vue.js +2 -2
  82. package/components/snackbar/v4/SnackbarV4.vue2.js +85 -64
  83. package/components/switch/v4/SwitchV4.vue.d.ts +5 -0
  84. package/components/switch/v4/SwitchV4.vue.js +4 -4
  85. package/components/switch/v4/SwitchV4.vue2.js +14 -13
  86. package/components/switch/v4/index.d.ts +9 -0
  87. package/components/table/v4/DataGrid.vue.d.ts +2 -0
  88. package/components/table/v4/DataGrid.vue.js +4 -4
  89. package/components/table/v4/DataGrid.vue2.js +82 -80
  90. package/components/table/v4/index.d.ts +7 -1
  91. package/components/table-cells/v3/Editable.vue.d.ts +1 -1
  92. package/components/table-cells/v3/index.d.ts +20 -20
  93. package/components/table-cells/v4/EditableV4.vue.d.ts +1 -1
  94. package/components/table-cells/v4/index.d.ts +20 -20
  95. package/components/tag/Tag.vue.d.ts +112 -0
  96. package/components/tag/Tag.vue.js +7 -0
  97. package/components/tag/Tag.vue2.js +221 -0
  98. package/components/tag/index.d.ts +161 -0
  99. package/components/tag/index.js +6 -0
  100. package/components/tagsField/index.d.ts +42 -3
  101. package/components/tagsField/index.js +6 -4
  102. package/components/tooltip/v4/TooltipV4.vue.d.ts +5 -0
  103. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  104. package/components/tooltip/v4/TooltipV4.vue2.js +76 -36
  105. package/components/tooltip/v4/index.d.ts +20 -1
  106. package/design-foundation.stories/colors/ColorsData.d.ts +1 -0
  107. package/index.d.ts +281 -82
  108. package/index.js +84 -78
  109. package/package.json +2 -7
  110. package/style/v4/colors.scss +1 -1
  111. package/style/v4/grid.css +1 -1
  112. package/style/v4/grid.css.map +1 -1
  113. package/AppHeader.vue_vue_type_style_index_0_scoped_9202b5db_lang.css +0 -1
  114. package/ButtonV4.vue_vue_type_style_index_0_scoped_afe44a65_lang.css +0 -1
  115. package/CalendarMonth.vue_vue_type_style_index_0_scoped_acd3440c_lang.css +0 -1
  116. package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_b0d3ea50_lang.css +0 -1
  117. package/Chart.vue_vue_type_style_index_0_scoped_060d02be_lang.css +0 -1
  118. package/ChartHeader.vue_vue_type_style_index_0_scoped_d90c583e_lang.css +0 -1
  119. package/ChartPlane.vue_vue_type_style_index_0_scoped_3c887f7e_lang.css +0 -1
  120. package/ColumnPicker.vue_vue_type_style_index_0_scoped_01c4e08f_lang.css +0 -1
  121. package/DataGrid.vue_vue_type_style_index_0_scoped_cd41c5ca_lang.css +0 -1
  122. package/DateRange.vue_vue_type_style_index_0_scoped_70e316e9_lang.css +0 -1
  123. package/DateRangeV4.vue_vue_type_style_index_0_scoped_a849128a_lang.css +0 -1
  124. package/IconV4.vue_vue_type_style_index_0_scoped_dc433d48_lang.css +0 -1
  125. package/InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css +0 -1
  126. package/SectionDropdown.vue_vue_type_style_index_0_scoped_cfad60a8_lang.css +0 -1
  127. package/SnackbarV4.vue_vue_type_style_index_0_scoped_1b650c39_lang.css +0 -1
  128. package/SwitchV4.vue_vue_type_style_index_0_scoped_0a80c49f_lang.css +0 -1
  129. package/TooltipV4.vue_vue_type_style_index_0_scoped_8a451e54_lang.css +0 -1
@@ -1,13 +1,13 @@
1
- import "../../InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css"; import { defineComponent as y, computed as x, openBlock as c, createElementBlock as T, createBlock as C, unref as e, mergeProps as n, withCtx as r, createTextVNode as h, toDisplayString as z, createCommentVNode as I, createVNode as s } from "vue";
2
- import k from "../icon/v4/IconV4.vue.js";
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 S from "../typography/v4/Typography.vue.js";
5
- import { useClipboard as V } from "@vueuse/core";
6
- import { Snackbar as v } from "../snackbar/v4/index.js";
7
- import B from "../tooltip/v4/TooltipV4.vue.js";
8
- import { useTestIdAttrs as b } from "../../utils/testIds.js";
9
- import { InlineCopyTestIdModifiers as a } from "../../testids/index.js";
10
- const X = /* @__PURE__ */ y({
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(t, { emit: p }) {
25
- const o = t, { copy: d, copied: m } = V({}), u = x(() => {
26
- switch (o.size) {
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
- }), f = async () => {
34
- const i = o.valueToCopy || o.text;
35
- await d(i), m.value && v({
36
- title: "Copied successfully",
37
- type: "success",
38
- duration: 2e3
39
- }), p("copy");
40
- }, l = b(o.testId, a);
41
- return (i, N) => (c(), T("div", {
42
- class: "inline-copy",
43
- onClick: f
44
- }, [
45
- t.hideTextValue ? I("", !0) : (c(), C(e(S), n({
46
- key: 0,
47
- variant: "caption",
48
- style: { fontSize: e(u) }
49
- }, e(l)[e(a).TEXT]), {
50
- default: r(() => [
51
- h(z(t.text), 1)
52
- ]),
53
- _: 1
54
- }, 16, ["style"])),
55
- s(e(B), {
56
- text: t.tooltipText,
57
- header: t.tooltipHeader,
58
- placement: t.tooltipPlacement
59
- }, {
60
- default: r(() => [
61
- s(e(k), n({
62
- class: "icon-copy",
63
- name: "copy",
64
- size: t.iconSize || "16px"
65
- }, e(l)[e(a).COPY_BTN]), null, 16, ["size"])
66
- ]),
67
- _: 1
68
- }, 8, ["text", "header", "placement"])
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
- X as default
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 N, render as v } from "vue";
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 = (h) => {
11
- const i = function(e = {}, t = null) {
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: b }) => m + (b.el?.offsetHeight || 0) + g,
15
+ (m, { vm: N }) => m + (N.el?.offsetHeight || 0) + g,
16
16
  e.offset || 0
17
17
  );
18
18
  s += g;
19
- const l = () => n++, d = `notification_${A++}`, u = e.onClose, f = {
19
+ const f = () => n++, d = `notification_${A++}`, u = e.onClose, i = {
20
20
  ...e,
21
- zIndex: l(),
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 = N(
28
- h,
29
- f,
30
- x(f.message) ? {
31
- default: () => f.message
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 ?? i._context, r.props.onDestroy = () => {
35
- v(null, a);
36
- }, v(r, a), p[o].push({ vm: r }), c.appendChild(a?.firstElementChild), {
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?.proxy;
41
- m && (m.visible = !1);
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: l } = n[s];
52
- if (!l)
51
+ const { vm: f } = n[s];
52
+ if (!f)
53
53
  return;
54
- o?.(l);
55
- const d = l.el?.offsetHeight, u = t.split("-")[0];
54
+ o?.(f);
55
+ const d = f.el?.offsetHeight, u = t.split("-")[0];
56
56
  n.splice(s, 1);
57
- const f = n.length;
58
- for (let c = s; c < f; 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
- i[e] = (t = {}) => ((typeof t == "string" || x(t)) && (t = {
64
+ l[e] = (t = {}) => ((typeof t == "string" || x(t)) && (t = {
65
65
  message: t
66
- }), i({
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 i.closeAll = I, i._context = null, i;
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 v, computed as n, onMounted as p } from "vue";
2
- import { useEventListener as C, useTimeoutFn as h } from "@vueuse/core";
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
- }, o = v(!1);
9
+ }, e = y(!1);
10
10
  let c;
11
- const a = n(() => {
12
- const e = t.type;
13
- return e && r[t.type] ? e : "";
14
- }), l = n(() => r[t.type] || t.icon || ""), f = n(
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 = n(
16
+ ), m = o(
17
17
  () => t.position.startsWith("top") ? "top" : "bottom"
18
- ), y = n(() => ({
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 } = h(() => {
24
- o.value && s();
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
- o.value = !1;
31
+ e.value = !1;
32
32
  }
33
- function d({ code: e }) {
34
- e === "Delete" || e === "Backspace" ? u() : e === "Escape" ? o.value && s() : i();
33
+ function v({ code: n }) {
34
+ n === "Delete" || n === "Backspace" ? u() : n === "Escape" ? e.value && s() : i();
35
35
  }
36
- return p(() => {
37
- i(), o.value = !0;
38
- }), C(document, "keydown", d), {
39
- visible: o,
36
+ return C(() => {
37
+ t.isLoading || i(), e.value = !0;
38
+ }), h(document, "keydown", v), {
39
+ visible: e,
40
40
  horizontalClass: f,
41
- positionStyle: y,
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
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
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.vue_vue_type_style_index_0_scoped_1b650c39_lang.css"; //*');
4
- const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-1b650c39"]]);
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
  };