@ironsource/shared-ui 2.2.0-test.2 → 2.2.0-test.4
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_4c813f30_lang.css +1 -0
- package/ButtonV4.vue_vue_type_style_index_0_scoped_a59af1ad_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_22477735_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_9a603520_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_6de5cddb_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_3673e156_lang.css +1 -0
- package/InlineCopy.vue_vue_type_style_index_0_scoped_9fa1921a_lang.css +1 -0
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_35c79635_lang.css +1 -0
- package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
- package/components/appHeader/AppHeader.vue.js +2 -2
- package/components/appHeader/AppHeader.vue2.js +1 -1
- 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/button/v4/IconButtonV4.vue2.js +1 -46
- package/components/button/v4/ToggleButtonGroupAB.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/chip/v4/ChipV4.vue2.js +1 -1
- package/components/emptyState/v3/EmptyState.vue.d.ts +3 -3
- package/components/emptyState/v3/index.d.ts +7 -7
- 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/popover/v3/Popover.vue2.js +1 -38
- package/components/radioButton/v3/RadioButton.vue2.js +1 -82
- package/components/radioButton/v3/RadioGroup.vue2.js +1 -29
- package/components/radioButton/v4/RadioButtonV4.vue2.js +1 -80
- package/components/radioButton/v4/RadioGroupV4.vue2.js +1 -29
- 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/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +59 -59
- 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/EditableV4.vue2.js +1 -57
- package/components/table-cells/v4/index.d.ts +20 -20
- package/design-foundation.stories/colors/ColorsData.d.ts +1 -0
- package/index.d.ts +94 -40
- package/index.js +1 -1
- package/package.json +1 -1
- 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/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/DataGrid.vue_vue_type_style_index_0_scoped_cd41c5ca_lang.css +0 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css +0 -1
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_1b650c39_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,38 +1 @@
|
|
|
1
|
-
import "../../../Popover.vue_vue_type_style_index_0_scoped_c607b770_lang.css"; import "../../../Popover.vue_vue_type_style_index_1_lang.css";
|
|
2
|
-
import { Dropdown as s } from "floating-vue";
|
|
3
|
-
const f = /* @__PURE__ */ n({
|
|
4
|
-
__name: "Popover",
|
|
5
|
-
props: {
|
|
6
|
-
open: { type: Boolean },
|
|
7
|
-
autoHide: { type: Boolean, default: !1 },
|
|
8
|
-
trigger: { default: "click" },
|
|
9
|
-
disabled: { type: Boolean, default: !1 },
|
|
10
|
-
placement: { default: "bottom-start" },
|
|
11
|
-
distance: { default: 0 },
|
|
12
|
-
skidding: { default: 0 },
|
|
13
|
-
testId: { default: "" }
|
|
14
|
-
},
|
|
15
|
-
setup(e) {
|
|
16
|
-
return (t, u) => (i(), r(l(s), {
|
|
17
|
-
theme: "custom-popover",
|
|
18
|
-
placement: e.placement,
|
|
19
|
-
shown: !!e.open,
|
|
20
|
-
triggers: e.trigger === "managed" ? [] : [e.trigger],
|
|
21
|
-
"auto-hide": e.autoHide,
|
|
22
|
-
distance: e.distance,
|
|
23
|
-
skidding: e.skidding,
|
|
24
|
-
"data-testid": e.testId
|
|
25
|
-
}, {
|
|
26
|
-
popper: a(({ hide: o }) => [
|
|
27
|
-
d(t.$slots, "content", { hide: o }, void 0, !0)
|
|
28
|
-
]),
|
|
29
|
-
default: a(() => [
|
|
30
|
-
d(t.$slots, "trigger", {}, void 0, !0)
|
|
31
|
-
]),
|
|
32
|
-
_: 3
|
|
33
|
-
}, 8, ["placement", "shown", "triggers", "auto-hide", "distance", "skidding", "data-testid"]));
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
export {
|
|
37
|
-
f as default
|
|
38
|
-
};
|
|
1
|
+
import "../../../Popover.vue_vue_type_style_index_0_scoped_c607b770_lang.css"; import "../../../Popover.vue_vue_type_style_index_1_lang.css";
|
|
@@ -1,82 +1 @@
|
|
|
1
|
-
import "../../../RadioButton.vue_vue_type_style_index_0_scoped_dac25b9f_lang.css";
|
|
2
|
-
import p from "../../typography/Text.vue.js";
|
|
3
|
-
import { useRadio as D } from "../common/useRadio.js";
|
|
4
|
-
import { RadioTestIdModifiers as r } from "../../../testids/index.js";
|
|
5
|
-
import { useTestIdAttrs as L } from "../../../utils/testIds.js";
|
|
6
|
-
const $ = { class: "wrapper" }, F = ["value", "name", "disabled"], U = /* @__PURE__ */ E({
|
|
7
|
-
__name: "RadioButton",
|
|
8
|
-
props: {
|
|
9
|
-
label: { default: "" },
|
|
10
|
-
name: { default: "" },
|
|
11
|
-
helperText: { default: "" },
|
|
12
|
-
errorText: { default: "" },
|
|
13
|
-
modelValue: { default: void 0 },
|
|
14
|
-
testId: { default: "" },
|
|
15
|
-
disabledButton: { type: Boolean, default: !1 }
|
|
16
|
-
},
|
|
17
|
-
emits: ["update:modelValue", "change"],
|
|
18
|
-
setup(t, { emit: B }) {
|
|
19
|
-
const d = t, { radioRef: V, focus: x, disabled: h, modelValue: a, radioGroup: k } = D(
|
|
20
|
-
d,
|
|
21
|
-
B
|
|
22
|
-
), s = L(d.testId, r), b = I(
|
|
23
|
-
() => h.value || d.disabledButton
|
|
24
|
-
);
|
|
25
|
-
return (y, l) => (u(), C("label", {
|
|
26
|
-
class: T(["radio-button", { "radio-button--disabled": e(b) }])
|
|
27
|
-
}, [
|
|
28
|
-
o("span", $, [
|
|
29
|
-
N(o("input", i({
|
|
30
|
-
ref_key: "radioRef",
|
|
31
|
-
ref: V,
|
|
32
|
-
"onUpdate:modelValue": l[0] || (l[0] = (n) => g(a) ? a.value = n : null),
|
|
33
|
-
value: t.label,
|
|
34
|
-
name: t.name || e(k)?.name,
|
|
35
|
-
type: "radio",
|
|
36
|
-
disabled: e(b)
|
|
37
|
-
}, e(s)[e(r).FIELD], {
|
|
38
|
-
onFocus: l[1] || (l[1] = (n) => x.value = !0),
|
|
39
|
-
onBlur: l[2] || (l[2] = (n) => x.value = !1)
|
|
40
|
-
}), null, 16, F), [
|
|
41
|
-
[w, e(a)]
|
|
42
|
-
]),
|
|
43
|
-
o("span", {
|
|
44
|
-
class: T([{ "circle--selected": e(a) === t.label }, "circle"])
|
|
45
|
-
}, null, 2)
|
|
46
|
-
]),
|
|
47
|
-
o("span", i({ class: "label" }, e(s)[e(r).LABEL]), [
|
|
48
|
-
z(y.$slots, "default", {}, () => [
|
|
49
|
-
A(p, { "is-truncated": "" }, {
|
|
50
|
-
default: m(() => [
|
|
51
|
-
f(c(t.label), 1)
|
|
52
|
-
]),
|
|
53
|
-
_: 1
|
|
54
|
-
})
|
|
55
|
-
], !0),
|
|
56
|
-
!t.errorText && t.helperText ? (u(), v(p, {
|
|
57
|
-
key: 0,
|
|
58
|
-
class: "helper-text--text helper-text",
|
|
59
|
-
size: "caption"
|
|
60
|
-
}, {
|
|
61
|
-
default: m(() => [
|
|
62
|
-
f(c(t.helperText), 1)
|
|
63
|
-
]),
|
|
64
|
-
_: 1
|
|
65
|
-
})) : R("", !0),
|
|
66
|
-
t.errorText ? (u(), v(p, i({
|
|
67
|
-
key: 1,
|
|
68
|
-
size: "caption",
|
|
69
|
-
class: "helper-text--error helper-text"
|
|
70
|
-
}, e(s)[e(r).ERROR_TEXT]), {
|
|
71
|
-
default: m(() => [
|
|
72
|
-
f(c(t.errorText), 1)
|
|
73
|
-
]),
|
|
74
|
-
_: 1
|
|
75
|
-
}, 16)) : R("", !0)
|
|
76
|
-
], 16)
|
|
77
|
-
], 2));
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
export {
|
|
81
|
-
U as default
|
|
82
|
-
};
|
|
1
|
+
import "../../../RadioButton.vue_vue_type_style_index_0_scoped_dac25b9f_lang.css";
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
import "../../../RadioGroup.vue_vue_type_style_index_0_scoped_3071ef24_lang.css";
|
|
2
|
-
import { RadioTestIdModifiers as t } from "../../../testids/index.js";
|
|
3
|
-
import { radioGroupCommon as m } from "../common/radioGroup.common.js";
|
|
4
|
-
import { useTestIdAttrs as c } from "../../../utils/testIds.js";
|
|
5
|
-
const _ = /* @__PURE__ */ u({
|
|
6
|
-
__name: "RadioGroup",
|
|
7
|
-
props: {
|
|
8
|
-
name: { default: "" },
|
|
9
|
-
disabled: { type: Boolean, default: !1 },
|
|
10
|
-
modelValue: null,
|
|
11
|
-
row: { type: Boolean, default: !1 },
|
|
12
|
-
testId: { default: "" }
|
|
13
|
-
},
|
|
14
|
-
emits: ["update:modelValue", "change"],
|
|
15
|
-
setup(e, { emit: a }) {
|
|
16
|
-
const o = e, d = c(o.testId, t), { radioGroupRef: s } = m(o, a);
|
|
17
|
-
return (l, g) => (n(), p("div", f({
|
|
18
|
-
ref_key: "radioGroupRef",
|
|
19
|
-
ref: s,
|
|
20
|
-
class: [{ "radio-group--row": e.row }, "radio-group"],
|
|
21
|
-
role: "radiogroup"
|
|
22
|
-
}, r(d)[r(t).GROUP]), [
|
|
23
|
-
i(l.$slots, "default", {}, void 0, !0)
|
|
24
|
-
], 16));
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
export {
|
|
28
|
-
_ as default
|
|
29
|
-
};
|
|
1
|
+
import "../../../RadioGroup.vue_vue_type_style_index_0_scoped_3071ef24_lang.css";
|
|
@@ -1,80 +1 @@
|
|
|
1
|
-
import "../../../RadioButtonV4.vue_vue_type_style_index_0_scoped_4f3c7037_lang.css";
|
|
2
|
-
import I from "../../typography/v4/Typography.vue.js";
|
|
3
|
-
import { radioGroupKey as G } from "../common/useRadio.js";
|
|
4
|
-
import { RadioTestIdModifiers as r } from "../../../testids/index.js";
|
|
5
|
-
import { useTestIdAttrs as S } from "../../../utils/testIds.js";
|
|
6
|
-
const M = { class: "wrapper-with-description" }, P = { class: "wrapper" }, j = ["value", "name", "disabled"], _ = /* @__PURE__ */ R({
|
|
7
|
-
__name: "RadioButtonV4",
|
|
8
|
-
props: {
|
|
9
|
-
value: null,
|
|
10
|
-
label: { default: "" },
|
|
11
|
-
name: { default: "" },
|
|
12
|
-
modelValue: { default: void 0 },
|
|
13
|
-
testId: { default: "" },
|
|
14
|
-
labelDescription: { default: "" }
|
|
15
|
-
},
|
|
16
|
-
emits: ["update:modelValue", "change"],
|
|
17
|
-
setup(t, { emit: D }) {
|
|
18
|
-
const o = t, n = S(o.testId, r), u = g(), a = k(G, void 0), p = c(() => !!a), d = c(() => a?.disabled), s = c({
|
|
19
|
-
get() {
|
|
20
|
-
return p.value ? a?.modelValue : o.modelValue;
|
|
21
|
-
},
|
|
22
|
-
set(i) {
|
|
23
|
-
p.value ? a?.changeEvent(i) : D("update:modelValue", i), u.value && (u.value.checked = o.modelValue === o.value);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return (i, f) => (b(), B("label", {
|
|
27
|
-
class: v(["radio-button", { "radio-button--disabled": e(d) }])
|
|
28
|
-
}, [
|
|
29
|
-
l("span", M, [
|
|
30
|
-
l("span", P, [
|
|
31
|
-
w(l("input", m({
|
|
32
|
-
ref_key: "radioRef",
|
|
33
|
-
ref: u,
|
|
34
|
-
"onUpdate:modelValue": f[0] || (f[0] = (E) => C(s) ? s.value = E : null),
|
|
35
|
-
value: t.value,
|
|
36
|
-
name: t.name || e(a)?.name,
|
|
37
|
-
type: "radio",
|
|
38
|
-
disabled: e(d)
|
|
39
|
-
}, e(n)[e(r).FIELD]), null, 16, j), [
|
|
40
|
-
[L, e(s)]
|
|
41
|
-
]),
|
|
42
|
-
l("span", {
|
|
43
|
-
class: v(["circle", {
|
|
44
|
-
"circle--selected": e(s) === t.value,
|
|
45
|
-
"circle--disabled": e(d)
|
|
46
|
-
}])
|
|
47
|
-
}, null, 2)
|
|
48
|
-
]),
|
|
49
|
-
l("span", m({
|
|
50
|
-
class: ["label", { "label--disabled": e(d) }]
|
|
51
|
-
}, e(n)[e(r).LABEL]), [
|
|
52
|
-
N(i.$slots, "default", {}, () => [
|
|
53
|
-
T(e(I), {
|
|
54
|
-
variant: "body2",
|
|
55
|
-
"is-truncated": ""
|
|
56
|
-
}, {
|
|
57
|
-
default: V(() => [
|
|
58
|
-
h(y(t.label), 1)
|
|
59
|
-
]),
|
|
60
|
-
_: 1
|
|
61
|
-
})
|
|
62
|
-
], !0)
|
|
63
|
-
], 16)
|
|
64
|
-
]),
|
|
65
|
-
t.labelDescription ? (b(), A(e(I), m({
|
|
66
|
-
key: 0,
|
|
67
|
-
variant: "body2",
|
|
68
|
-
class: "label-description"
|
|
69
|
-
}, e(n)[e(r).LABEL_DESCRIPTION]), {
|
|
70
|
-
default: V(() => [
|
|
71
|
-
h(y(t.labelDescription), 1)
|
|
72
|
-
]),
|
|
73
|
-
_: 1
|
|
74
|
-
}, 16)) : x("", !0)
|
|
75
|
-
], 2));
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
export {
|
|
79
|
-
_ as default
|
|
80
|
-
};
|
|
1
|
+
import "../../../RadioButtonV4.vue_vue_type_style_index_0_scoped_4f3c7037_lang.css";
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
import "../../../RadioGroupV4.vue_vue_type_style_index_0_scoped_f8e8cbab_lang.css";
|
|
2
|
-
import { RadioTestIdModifiers as t } from "../../../testids/index.js";
|
|
3
|
-
import { radioGroupCommon as m } from "../common/radioGroup.common.js";
|
|
4
|
-
import { useTestIdAttrs as c } from "../../../utils/testIds.js";
|
|
5
|
-
const _ = /* @__PURE__ */ u({
|
|
6
|
-
__name: "RadioGroupV4",
|
|
7
|
-
props: {
|
|
8
|
-
name: { default: "" },
|
|
9
|
-
disabled: { type: Boolean, default: !1 },
|
|
10
|
-
modelValue: null,
|
|
11
|
-
row: { type: Boolean, default: !1 },
|
|
12
|
-
testId: { default: "" }
|
|
13
|
-
},
|
|
14
|
-
emits: ["update:modelValue", "change"],
|
|
15
|
-
setup(e, { emit: a }) {
|
|
16
|
-
const o = e, d = c(o.testId, t), { radioGroupRef: s } = m(o, a);
|
|
17
|
-
return (l, g) => (n(), p("div", f({
|
|
18
|
-
ref_key: "radioGroupRef",
|
|
19
|
-
ref: s,
|
|
20
|
-
class: [{ "radio-group--row": e.row }, "radio-group"],
|
|
21
|
-
role: "radiogroup"
|
|
22
|
-
}, r(d)[r(t).GROUP]), [
|
|
23
|
-
i(l.$slots, "default", {}, void 0, !0)
|
|
24
|
-
], 16));
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
export {
|
|
28
|
-
_ as default
|
|
29
|
-
};
|
|
1
|
+
import "../../../RadioGroupV4.vue_vue_type_style_index_0_scoped_f8e8cbab_lang.css";
|
|
@@ -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;
|