@ironsource/shared-ui 2.2.0-rc.42 → 2.2.0-rc.48
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/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_5a645cc9_lang.css +1 -0
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_b7e65177_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_bb44cdf8_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_f44f2402_lang.css +1 -0
- package/FieldLabel.vue_vue_type_style_index_0_scoped_960ea8b1_lang.css +1 -0
- package/HelpText.vue_vue_type_style_index_0_scoped_b5caf7cd_lang.css +1 -0
- package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_2a5345ef_lang.css +1 -0
- package/InlineCopy.vue_vue_type_style_index_0_scoped_8cb01c9d_lang.css +1 -0
- package/Link.vue_vue_type_style_index_0_scoped_c4345b08_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_d48a9318_lang.css +1 -0
- package/SearchV4.vue_vue_type_style_index_0_scoped_e1a33934_lang.css +1 -0
- package/TabsV4.vue_vue_type_style_index_0_scoped_9747c9da_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_f4275491_lang.css +1 -0
- package/ToggleV4.vue_vue_type_style_index_0_scoped_fbbae882_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_22e25f74_lang.css +1 -0
- package/components/autocomplete/index.d.ts +16 -16
- package/components/columnPicker/ColumnPicker.vue.d.ts +1 -1
- package/components/columnPicker/index.d.ts +20 -20
- package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
- package/components/dateRange/v4/DateRangeV4.vue2.js +28 -27
- package/components/dropdown/common/Dropdown.common.js +351 -274
- package/components/dropdown/v3/Dropdown.vue.d.ts +5 -5
- package/components/dropdown/v3/index.d.ts +77 -77
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +38 -32
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +1 -1
- package/components/dropdown/v4/DropdownV4.vue.d.ts +50 -41
- package/components/dropdown/v4/DropdownV4.vue.js +2 -2
- package/components/dropdown/v4/DropdownV4.vue2.js +237 -216
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +5 -0
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -9
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +12 -12
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +1 -1
- package/components/dropdown/v4/index.d.ts +2377 -2349
- package/components/helpText/HelpText.vue.js +3 -3
- package/components/helpText/HelpText.vue2.js +11 -10
- package/components/includeExclude/IncludeExclude.vue.d.ts +2 -2
- package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +2 -2
- package/components/includeExclude/index.d.ts +54 -54
- package/components/inlineCopy/InlineCopy.vue.d.ts +5 -0
- package/components/inlineCopy/InlineCopy.vue.js +3 -3
- package/components/inlineCopy/InlineCopy.vue2.js +54 -53
- package/components/inlineCopy/index.d.ts +9 -0
- package/components/input/v4/TextField.vue.d.ts +5 -0
- package/components/input/v4/TextField.vue.js +2 -2
- package/components/input/v4/TextField.vue2.js +22 -19
- package/components/input/v4/index.d.ts +20 -1
- package/components/link/Link.vue.js +5 -5
- package/components/link/Link.vue2.js +30 -21
- package/components/search/v4/SearchV4.vue.d.ts +5 -0
- package/components/search/v4/SearchV4.vue.js +5 -5
- package/components/search/v4/SearchV4.vue2.js +23 -18
- package/components/search/v4/index.d.ts +9 -0
- package/components/shared/FieldLabel.vue.js +3 -3
- package/components/shared/FieldLabel.vue2.js +9 -8
- package/components/table/v4/DataGridMenu.vue.d.ts +5 -0
- package/components/table/v4/DataGridMenu.vue.js +5 -5
- package/components/table/v4/DataGridMenu.vue2.js +28 -22
- package/components/table/v4/index.d.ts +9 -0
- package/components/tabs/v4/TabsV4.vue.d.ts +5 -0
- package/components/tabs/v4/TabsV4.vue.js +3 -3
- package/components/tabs/v4/TabsV4.vue2.js +74 -43
- package/components/tabs/v4/index.d.ts +20 -1
- package/components/toggle/v4/ToggleV4.vue.d.ts +5 -0
- package/components/toggle/v4/ToggleV4.vue.js +3 -3
- package/components/toggle/v4/ToggleV4.vue2.js +50 -41
- package/components/toggle/v4/index.d.ts +20 -1
- package/components/tooltip/v4/TooltipV4.vue.d.ts +14 -1
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +85 -63
- package/components/tooltip/v4/index.d.ts +51 -4
- package/index.d.ts +2996 -2678
- package/index.js +1 -1
- package/package.json +5 -1
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_38354f10_lang.css +0 -1
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_ddfaf207_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_f8826716_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_526bf0a1_lang.css +0 -1
- package/FieldLabel.vue_vue_type_style_index_0_scoped_921d4087_lang.css +0 -1
- package/HelpText.vue_vue_type_style_index_0_scoped_641c2356_lang.css +0 -1
- package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_lang.css +0 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_9fa1921a_lang.css +0 -1
- package/Link.vue_vue_type_style_index_0_scoped_fe0e7f6f_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_771e1980_lang.css +0 -1
- package/SearchV4.vue_vue_type_style_index_0_scoped_d6c42f4b_lang.css +0 -1
- package/TabsV4.vue_vue_type_style_index_0_scoped_f9433b11_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_28fab783_lang.css +0 -1
- package/ToggleV4.vue_vue_type_style_index_0_scoped_a4aa32fb_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_a8aebfee_lang.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../../DataGridMenu.
|
|
2
|
-
import
|
|
1
|
+
import "../../../DataGridMenu.vue_vue_type_style_index_0_scoped_b7e65177_lang.css"; import { defineComponent as x, onBeforeUnmount as w, openBlock as b, createBlock as v, unref as n, withCtx as r, createVNode as c, createSlots as I, createTextVNode as M, toDisplayString as g } from "vue";
|
|
2
|
+
import C from "../../dropdown/v4/DropdownV4.vue.js";
|
|
3
3
|
import "../../dropdown/v4/DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "../../dropdown/v4/IconButtonDropdownTrigger.vue.js";
|
|
5
5
|
import "../../dropdown/v4/ChipDropdownTrigger.vue.js";
|
|
@@ -7,47 +7,53 @@ import "../../dropdown/v4/AppDropdownTrigger.vue.js";
|
|
|
7
7
|
import "../../dropdown/v4/ButtonDropdownTrigger.vue.js";
|
|
8
8
|
import "../../dropdown/v4/ButtonFilterDropdownTrigger.vue.js";
|
|
9
9
|
import "../../dropdown/v4/TreeDropdown.vue.js";
|
|
10
|
-
import
|
|
10
|
+
import k from "../../dropdown/v4/OptionV4.vue.js";
|
|
11
11
|
import "../../dropdown/v4/ConditionalDropdown.vue.js";
|
|
12
|
-
import
|
|
12
|
+
import y from "../../icon/v4/IconV4.vue.js";
|
|
13
13
|
import "../../icon/v4/IconFlag.vue.js";
|
|
14
|
-
import { useTableContext as
|
|
15
|
-
const
|
|
14
|
+
import { useTableContext as A } from "../common/TableContext.js";
|
|
15
|
+
const q = /* @__PURE__ */ x({
|
|
16
16
|
__name: "DataGridMenu",
|
|
17
17
|
props: {
|
|
18
18
|
menuItems: { default: () => [] },
|
|
19
19
|
rowIndex: { default: null },
|
|
20
|
-
placement: { default: "left-start" }
|
|
20
|
+
placement: { default: "left-start" },
|
|
21
|
+
ariaLabel: { default: "More options" }
|
|
21
22
|
},
|
|
22
23
|
emits: ["selected"],
|
|
23
24
|
setup(t, { emit: d }) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
25
|
+
const o = t, a = A("DataGridMenu"), i = (m) => m.text, p = () => {
|
|
26
|
+
o.rowIndex && a.setActiveMenuRow(o.rowIndex);
|
|
27
|
+
}, l = () => {
|
|
28
|
+
o.rowIndex && a.setActiveMenuRow(null);
|
|
28
29
|
};
|
|
29
|
-
return
|
|
30
|
+
return w(l), (m, s) => (b(), v(n(C), {
|
|
30
31
|
class: "data-grid-menu",
|
|
31
32
|
options: t.menuItems,
|
|
32
|
-
"display-value":
|
|
33
|
+
"display-value": i,
|
|
34
|
+
"aria-label": t.ariaLabel,
|
|
33
35
|
"predefined-trigger": "icon-button",
|
|
34
36
|
placement: t.placement,
|
|
35
37
|
skidding: -4,
|
|
36
|
-
"onUpdate:selected":
|
|
38
|
+
"onUpdate:selected": s[0] || (s[0] = (e) => d("selected", e)),
|
|
37
39
|
onOpened: p,
|
|
38
|
-
onClosed:
|
|
40
|
+
onClosed: l
|
|
39
41
|
}, {
|
|
40
|
-
default: r(({ option: e }) => [
|
|
41
|
-
c(
|
|
42
|
+
default: r(({ option: e, active: u, selected: f }) => [
|
|
43
|
+
c(n(k), {
|
|
44
|
+
option: e,
|
|
45
|
+
active: u,
|
|
46
|
+
"selected-prop": f
|
|
47
|
+
}, I({
|
|
42
48
|
default: r(() => [
|
|
43
|
-
|
|
49
|
+
M(" " + g(i(e)), 1)
|
|
44
50
|
]),
|
|
45
51
|
_: 2
|
|
46
52
|
}, [
|
|
47
53
|
e.icon ? {
|
|
48
54
|
name: "icon-start",
|
|
49
55
|
fn: r(() => [
|
|
50
|
-
c(
|
|
56
|
+
c(n(y), {
|
|
51
57
|
class: "menu-icon",
|
|
52
58
|
name: e.icon,
|
|
53
59
|
size: "20px"
|
|
@@ -55,12 +61,12 @@ const h = /* @__PURE__ */ u({
|
|
|
55
61
|
]),
|
|
56
62
|
key: "0"
|
|
57
63
|
} : void 0
|
|
58
|
-
]), 1032, ["option"])
|
|
64
|
+
]), 1032, ["option", "active", "selected-prop"])
|
|
59
65
|
]),
|
|
60
66
|
_: 1
|
|
61
|
-
}, 8, ["options", "placement"]));
|
|
67
|
+
}, 8, ["options", "aria-label", "placement"]));
|
|
62
68
|
}
|
|
63
69
|
});
|
|
64
70
|
export {
|
|
65
|
-
|
|
71
|
+
q as default
|
|
66
72
|
};
|
|
@@ -9,6 +9,10 @@ declare const DataGridTypes: () => (import("vue").DefineComponent<{
|
|
|
9
9
|
type: import("vue").PropType<import("floating-vue").Placement>;
|
|
10
10
|
default: string;
|
|
11
11
|
};
|
|
12
|
+
ariaLabel: {
|
|
13
|
+
type: import("vue").PropType<string>;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
12
16
|
rowIndex: {
|
|
13
17
|
type: import("vue").PropType<number>;
|
|
14
18
|
default: any;
|
|
@@ -25,6 +29,10 @@ declare const DataGridTypes: () => (import("vue").DefineComponent<{
|
|
|
25
29
|
type: import("vue").PropType<import("floating-vue").Placement>;
|
|
26
30
|
default: string;
|
|
27
31
|
};
|
|
32
|
+
ariaLabel: {
|
|
33
|
+
type: import("vue").PropType<string>;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
28
36
|
rowIndex: {
|
|
29
37
|
type: import("vue").PropType<number>;
|
|
30
38
|
default: any;
|
|
@@ -38,6 +46,7 @@ declare const DataGridTypes: () => (import("vue").DefineComponent<{
|
|
|
38
46
|
onSelected?: (option: unknown) => any;
|
|
39
47
|
}, {
|
|
40
48
|
placement: import("floating-vue").Placement;
|
|
49
|
+
ariaLabel: string;
|
|
41
50
|
rowIndex: number;
|
|
42
51
|
menuItems: import("../common/Table.types").MenuItem[];
|
|
43
52
|
}> | import("vue").DefineComponent<{
|
|
@@ -4,10 +4,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
4
4
|
selectedTab: string | number;
|
|
5
5
|
variant?: "page" | "card";
|
|
6
6
|
testId?: string;
|
|
7
|
+
ariaLabel?: string;
|
|
7
8
|
}>, {
|
|
8
9
|
tabsList: () => any[];
|
|
9
10
|
variant: string;
|
|
10
11
|
testId: string;
|
|
12
|
+
ariaLabel: any;
|
|
11
13
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
14
|
"update:selectedTab": (tabId: string | number) => void;
|
|
13
15
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -15,15 +17,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
15
17
|
selectedTab: string | number;
|
|
16
18
|
variant?: "page" | "card";
|
|
17
19
|
testId?: string;
|
|
20
|
+
ariaLabel?: string;
|
|
18
21
|
}>, {
|
|
19
22
|
tabsList: () => any[];
|
|
20
23
|
variant: string;
|
|
21
24
|
testId: string;
|
|
25
|
+
ariaLabel: any;
|
|
22
26
|
}>>> & {
|
|
23
27
|
"onUpdate:selectedTab"?: (tabId: string | number) => any;
|
|
24
28
|
}, {
|
|
25
29
|
testId: string;
|
|
26
30
|
variant: "page" | "card";
|
|
31
|
+
ariaLabel: string;
|
|
27
32
|
tabsList: Tab[];
|
|
28
33
|
}>, {
|
|
29
34
|
"tab-icon"?(_: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TabsV4.vue2.js";
|
|
2
2
|
/* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../TabsV4.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../TabsV4.vue_vue_type_style_index_0_scoped_9747c9da_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ _(o, [["__scopeId", "data-v-9747c9da"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,72 +1,103 @@
|
|
|
1
|
-
import "../../../TabsV4.
|
|
2
|
-
import
|
|
3
|
-
import { TabsTestIdModifiers as
|
|
4
|
-
import { tabsCommon as
|
|
5
|
-
import { useTestIdAttrs as
|
|
6
|
-
const
|
|
1
|
+
import "../../../TabsV4.vue_vue_type_style_index_0_scoped_9747c9da_lang.css"; import { defineComponent as B, useCssVars as H, ref as m, computed as I, watch as M, nextTick as x, openBlock as c, createElementBlock as v, mergeProps as N, unref as n, Fragment as _, renderList as D, normalizeClass as K, renderSlot as P, createBlock as W, withCtx as z, createTextVNode as F, toDisplayString as O, createCommentVNode as U, pushScopeId as j, popScopeId as q, createElementVNode as G } from "vue";
|
|
2
|
+
import J from "../../typography/v4/Typography.vue.js";
|
|
3
|
+
import { TabsTestIdModifiers as p } from "../../../testids/index.js";
|
|
4
|
+
import { tabsCommon as Q } from "../common/tabsCommon.js";
|
|
5
|
+
import { useTestIdAttrs as X } from "../../../utils/testIds.js";
|
|
6
|
+
const Y = (r) => (j("data-v-9747c9da"), r = r(), q(), r), Z = ["aria-label"], ee = ["aria-selected", "aria-disabled", "tabindex", "data-testid", "onClick", "onKeydown", "onMouseover"], te = /* @__PURE__ */ Y(() => /* @__PURE__ */ G("div", { class: "tabs-border-line" }, null, -1)), oe = /* @__PURE__ */ B({
|
|
7
7
|
__name: "TabsV4",
|
|
8
8
|
props: {
|
|
9
9
|
tabsList: { default: () => [] },
|
|
10
10
|
selectedTab: null,
|
|
11
11
|
variant: { default: "card" },
|
|
12
|
-
testId: { default: "" }
|
|
12
|
+
testId: { default: "" },
|
|
13
|
+
ariaLabel: { default: void 0 }
|
|
13
14
|
},
|
|
14
15
|
emits: ["update:selectedTab"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
16
|
+
setup(r, { emit: w }) {
|
|
17
|
+
const a = r;
|
|
18
|
+
H((t) => ({
|
|
19
|
+
"47c9cbb1": T.value,
|
|
20
|
+
"9be71148": h.value
|
|
20
21
|
}));
|
|
21
|
-
const { skipUnwrap:
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const { skipUnwrap: g, selectTab: b, setHover: y, clearHover: L, getSelectedTabIndex: k } = Q(a, w), f = m(null), A = X(a.testId, p), l = (t) => t.id === a.selectedTab, C = I(
|
|
23
|
+
() => a.tabsList.some((t) => l(t))
|
|
24
|
+
), E = I(
|
|
25
|
+
() => a.tabsList.findIndex((t) => !t.disabled)
|
|
26
|
+
), S = (t, i) => t.disabled ? -1 : C.value ? l(t) ? 0 : -1 : i === E.value ? 0 : -1, $ = (t) => {
|
|
27
|
+
x(() => {
|
|
28
|
+
f.value?.children?.[t]?.focus();
|
|
29
|
+
});
|
|
30
|
+
}, R = (t, i) => {
|
|
31
|
+
const { key: e } = t;
|
|
32
|
+
if (e === "Enter" || e === " " || e === "Spacebar") {
|
|
33
|
+
t.preventDefault(), a.tabsList[i]?.disabled || b(a.tabsList[i]);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (!["ArrowRight", "ArrowLeft", "Home", "End"].includes(e))
|
|
37
|
+
return;
|
|
38
|
+
t.preventDefault();
|
|
39
|
+
const s = a.tabsList.map((u, V) => u.disabled ? -1 : V).filter((u) => u !== -1);
|
|
40
|
+
if (!s.length)
|
|
41
|
+
return;
|
|
42
|
+
const o = s.indexOf(i);
|
|
43
|
+
let d = i;
|
|
44
|
+
e === "ArrowRight" ? d = s[(o + 1) % s.length] : e === "ArrowLeft" ? d = s[(o - 1 + s.length) % s.length] : e === "Home" ? d = s[0] : e === "End" && (d = s[s.length - 1]), b(a.tabsList[d]), $(d);
|
|
45
|
+
}, h = m(), T = m();
|
|
46
|
+
return M(
|
|
47
|
+
[() => a.variant, () => a.selectedTab, () => a.tabsList],
|
|
24
48
|
async () => {
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
49
|
+
const t = k();
|
|
50
|
+
if (t === -1)
|
|
27
51
|
return;
|
|
28
|
-
await
|
|
29
|
-
const e = Array.from(f.value?.children || []).at(
|
|
30
|
-
|
|
52
|
+
await x();
|
|
53
|
+
const e = Array.from(f.value?.children || []).at(t);
|
|
54
|
+
h.value = e?.clientWidth + "px", T.value = e?.offsetLeft + "px";
|
|
31
55
|
},
|
|
32
56
|
{ immediate: !0 }
|
|
33
|
-
), (
|
|
57
|
+
), (t, i) => (c(), v("ul", N({
|
|
34
58
|
ref_key: "tabsListRef",
|
|
35
59
|
ref: f,
|
|
36
|
-
class: ["tabs-list", [`tabs-list--${
|
|
37
|
-
|
|
38
|
-
|
|
60
|
+
class: ["tabs-list", [`tabs-list--${r.variant}`]],
|
|
61
|
+
role: "tablist",
|
|
62
|
+
"aria-label": r.ariaLabel || void 0
|
|
63
|
+
}, n(A)[n(p).WRAPPER]), [
|
|
64
|
+
(c(!0), v(_, null, D(r.tabsList, (e, s) => (c(), v("li", {
|
|
39
65
|
ref_for: !0,
|
|
40
|
-
ref:
|
|
66
|
+
ref: n(g).tabsNewList,
|
|
41
67
|
key: e.id,
|
|
42
|
-
class:
|
|
68
|
+
class: K(["tab-item", {
|
|
43
69
|
"tab-item--disabled": e.disabled,
|
|
44
|
-
"tab-item--active":
|
|
70
|
+
"tab-item--active": l(e)
|
|
45
71
|
}]),
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
72
|
+
role: "tab",
|
|
73
|
+
"aria-selected": l(e),
|
|
74
|
+
"aria-disabled": e.disabled || void 0,
|
|
75
|
+
tabindex: S(e, s),
|
|
76
|
+
"data-testid": r.testId ? `${r.testId}-${n(p).TAB}-${e.id}` : void 0,
|
|
77
|
+
onClick: (o) => n(b)(e),
|
|
78
|
+
onKeydown: (o) => R(o, s),
|
|
79
|
+
onMouseover: (o) => n(y)(e),
|
|
80
|
+
onMouseleave: i[0] || (i[0] = //@ts-ignore
|
|
81
|
+
(...o) => n(L) && n(L)(...o))
|
|
51
82
|
}, [
|
|
52
|
-
|
|
83
|
+
P(t.$slots, "tab-icon", {
|
|
53
84
|
tab: e,
|
|
54
|
-
active:
|
|
85
|
+
active: l(e)
|
|
55
86
|
}, void 0, !0),
|
|
56
|
-
e.name ? (
|
|
87
|
+
e.name ? (c(), W(n(J), {
|
|
57
88
|
key: 0,
|
|
58
|
-
variant:
|
|
89
|
+
variant: l(e) ? "tabLabel2" : "tabLabel1"
|
|
59
90
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
91
|
+
default: z(() => [
|
|
92
|
+
F(O(e.name), 1)
|
|
62
93
|
]),
|
|
63
94
|
_: 2
|
|
64
|
-
}, 1032, ["variant"])) :
|
|
65
|
-
], 42,
|
|
66
|
-
|
|
67
|
-
], 16));
|
|
95
|
+
}, 1032, ["variant"])) : U("", !0)
|
|
96
|
+
], 42, ee))), 128)),
|
|
97
|
+
te
|
|
98
|
+
], 16, Z));
|
|
68
99
|
}
|
|
69
100
|
});
|
|
70
101
|
export {
|
|
71
|
-
|
|
102
|
+
oe as default
|
|
72
103
|
};
|
|
@@ -5,6 +5,7 @@ declare const TabsTypes: () => ({
|
|
|
5
5
|
$props: Partial<{
|
|
6
6
|
testId: string;
|
|
7
7
|
variant: "page" | "card";
|
|
8
|
+
ariaLabel: string;
|
|
8
9
|
tabsList: import("../common/Tabs.types").Tab[];
|
|
9
10
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
10
11
|
testId: {
|
|
@@ -15,6 +16,10 @@ declare const TabsTypes: () => ({
|
|
|
15
16
|
type: import("vue").PropType<"page" | "card">;
|
|
16
17
|
default: string;
|
|
17
18
|
};
|
|
19
|
+
ariaLabel: {
|
|
20
|
+
type: import("vue").PropType<string>;
|
|
21
|
+
default: any;
|
|
22
|
+
};
|
|
18
23
|
tabsList: {
|
|
19
24
|
type: import("vue").PropType<import("../common/Tabs.types").Tab[]>;
|
|
20
25
|
required: true;
|
|
@@ -26,7 +31,7 @@ declare const TabsTypes: () => ({
|
|
|
26
31
|
};
|
|
27
32
|
}>> & {
|
|
28
33
|
"onUpdate:selectedTab"?: (tabId: string | number) => any;
|
|
29
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "testId" | "variant" | "tabsList">;
|
|
34
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "testId" | "variant" | "ariaLabel" | "tabsList">;
|
|
30
35
|
$attrs: {
|
|
31
36
|
[x: string]: unknown;
|
|
32
37
|
};
|
|
@@ -49,6 +54,10 @@ declare const TabsTypes: () => ({
|
|
|
49
54
|
type: import("vue").PropType<"page" | "card">;
|
|
50
55
|
default: string;
|
|
51
56
|
};
|
|
57
|
+
ariaLabel: {
|
|
58
|
+
type: import("vue").PropType<string>;
|
|
59
|
+
default: any;
|
|
60
|
+
};
|
|
52
61
|
tabsList: {
|
|
53
62
|
type: import("vue").PropType<import("../common/Tabs.types").Tab[]>;
|
|
54
63
|
required: true;
|
|
@@ -65,6 +74,7 @@ declare const TabsTypes: () => ({
|
|
|
65
74
|
}, string, {
|
|
66
75
|
testId: string;
|
|
67
76
|
variant: "page" | "card";
|
|
77
|
+
ariaLabel: string;
|
|
68
78
|
tabsList: import("../common/Tabs.types").Tab[];
|
|
69
79
|
}, {}, string> & {
|
|
70
80
|
beforeCreate?: (() => void) | (() => void)[];
|
|
@@ -95,6 +105,10 @@ declare const TabsTypes: () => ({
|
|
|
95
105
|
type: import("vue").PropType<"page" | "card">;
|
|
96
106
|
default: string;
|
|
97
107
|
};
|
|
108
|
+
ariaLabel: {
|
|
109
|
+
type: import("vue").PropType<string>;
|
|
110
|
+
default: any;
|
|
111
|
+
};
|
|
98
112
|
tabsList: {
|
|
99
113
|
type: import("vue").PropType<import("../common/Tabs.types").Tab[]>;
|
|
100
114
|
required: true;
|
|
@@ -119,6 +133,10 @@ declare const TabsTypes: () => ({
|
|
|
119
133
|
type: import("vue").PropType<"page" | "card">;
|
|
120
134
|
default: string;
|
|
121
135
|
};
|
|
136
|
+
ariaLabel: {
|
|
137
|
+
type: import("vue").PropType<string>;
|
|
138
|
+
default: any;
|
|
139
|
+
};
|
|
122
140
|
tabsList: {
|
|
123
141
|
type: import("vue").PropType<import("../common/Tabs.types").Tab[]>;
|
|
124
142
|
required: true;
|
|
@@ -135,6 +153,7 @@ declare const TabsTypes: () => ({
|
|
|
135
153
|
}, string, {
|
|
136
154
|
testId: string;
|
|
137
155
|
variant: "page" | "card";
|
|
156
|
+
ariaLabel: string;
|
|
138
157
|
tabsList: import("../common/Tabs.types").Tab[];
|
|
139
158
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
140
159
|
$slots: {
|
|
@@ -12,8 +12,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
12
12
|
color?: "primary" | "test";
|
|
13
13
|
size?: "small" | "medium";
|
|
14
14
|
testId?: string;
|
|
15
|
+
ariaLabel?: string;
|
|
15
16
|
}>, {
|
|
16
17
|
text: any;
|
|
18
|
+
ariaLabel: any;
|
|
17
19
|
activeText: any;
|
|
18
20
|
inactiveText: any;
|
|
19
21
|
hoverHelpText: string;
|
|
@@ -41,8 +43,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
41
43
|
color?: "primary" | "test";
|
|
42
44
|
size?: "small" | "medium";
|
|
43
45
|
testId?: string;
|
|
46
|
+
ariaLabel?: string;
|
|
44
47
|
}>, {
|
|
45
48
|
text: any;
|
|
49
|
+
ariaLabel: any;
|
|
46
50
|
activeText: any;
|
|
47
51
|
inactiveText: any;
|
|
48
52
|
hoverHelpText: string;
|
|
@@ -62,6 +66,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
62
66
|
color: "primary" | "test";
|
|
63
67
|
size: "small" | "medium";
|
|
64
68
|
isLoading: boolean;
|
|
69
|
+
ariaLabel: string;
|
|
65
70
|
hoverHelpText: string;
|
|
66
71
|
hoverHelpTextPlacement: "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";
|
|
67
72
|
feedbackText: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ToggleV4.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../ToggleV4.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../ToggleV4.vue_vue_type_style_index_0_scoped_fbbae882_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-fbbae882"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "../../../ToggleV4.
|
|
1
|
+
import "../../../ToggleV4.vue_vue_type_style_index_0_scoped_fbbae882_lang.css"; import { defineComponent as T, computed as h, openBlock as d, createElementBlock as m, normalizeClass as f, createElementVNode as r, mergeProps as c, unref as t, createCommentVNode as a, renderSlot as g, createBlock as u, withCtx as x, createTextVNode as k, toDisplayString as y, createVNode as V } from "vue";
|
|
2
2
|
import E from "../../typography/v4/Typography.vue.js";
|
|
3
|
-
import { ToggleTestIdModifiers as
|
|
4
|
-
import
|
|
5
|
-
import { useTestIdAttrs as
|
|
6
|
-
import
|
|
3
|
+
import { ToggleTestIdModifiers as l } from "../../../testids/index.js";
|
|
4
|
+
import L from "../../shared/FieldHelpText.vue.js";
|
|
5
|
+
import { useTestIdAttrs as B } from "../../../utils/testIds.js";
|
|
6
|
+
import H from "../../icon/v4/IconV4.vue.js";
|
|
7
7
|
import "../../icon/v4/IconFlag.vue.js";
|
|
8
|
-
import
|
|
9
|
-
const
|
|
8
|
+
import I from "../../tooltip/v4/TooltipV4.vue.js";
|
|
9
|
+
const D = ["aria-checked", "aria-label", "disabled"], P = { class: "toggle-head" }, $ = ["disabled", "checked"], X = /* @__PURE__ */ T({
|
|
10
10
|
__name: "ToggleV4",
|
|
11
11
|
props: {
|
|
12
12
|
modelValue: { type: Boolean },
|
|
@@ -21,57 +21,66 @@ const L = { class: "toggle-head" }, P = ["disabled", "checked"], O = /* @__PURE_
|
|
|
21
21
|
isLoading: { type: Boolean, default: !1 },
|
|
22
22
|
color: { default: "primary" },
|
|
23
23
|
size: { default: "small" },
|
|
24
|
-
testId: { default: "" }
|
|
24
|
+
testId: { default: "" },
|
|
25
|
+
ariaLabel: { default: void 0 }
|
|
25
26
|
},
|
|
26
27
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(e, { emit:
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
}, o =
|
|
31
|
-
return (n,
|
|
28
|
+
setup(e, { emit: v }) {
|
|
29
|
+
const s = e, b = () => {
|
|
30
|
+
i.value || v("update:modelValue", !s.modelValue);
|
|
31
|
+
}, o = B(s.testId, l), i = h(() => s.isDisabled || s.isLoading);
|
|
32
|
+
return (n, z) => (d(), m("div", {
|
|
32
33
|
class: f(["toggle", [`toggle--color-${e.color}`, `toggle--size-${e.size}`]])
|
|
33
34
|
}, [
|
|
34
|
-
r("div",
|
|
35
|
-
r("
|
|
35
|
+
r("div", c({ class: "toggle-wrap" }, t(o)[t(l).WRAPPER]), [
|
|
36
|
+
r("button", c({
|
|
37
|
+
type: "button",
|
|
36
38
|
class: ["toggle-body", {
|
|
37
39
|
"toggle-active": e.modelValue,
|
|
38
|
-
"toggle-disabled": t(
|
|
39
|
-
}]
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
"toggle-disabled": t(i)
|
|
41
|
+
}],
|
|
42
|
+
role: "switch",
|
|
43
|
+
"aria-checked": !!e.modelValue,
|
|
44
|
+
"aria-label": e.ariaLabel || e.text || void 0,
|
|
45
|
+
disabled: t(i)
|
|
46
|
+
}, t(o)[t(l).BODY], { onClick: b }), [
|
|
47
|
+
r("div", P, [
|
|
48
|
+
e.isLoading ? (d(), m("span", {
|
|
43
49
|
key: 0,
|
|
44
50
|
class: f(["loader", { "loader-active": e.modelValue }])
|
|
45
|
-
}, null, 2)) :
|
|
51
|
+
}, null, 2)) : a("", !0)
|
|
46
52
|
])
|
|
47
|
-
], 16),
|
|
48
|
-
r("input",
|
|
53
|
+
], 16, D),
|
|
54
|
+
r("input", c({
|
|
49
55
|
type: "checkbox",
|
|
50
56
|
class: "toggle-checkbox",
|
|
51
|
-
|
|
57
|
+
tabindex: "-1",
|
|
58
|
+
"aria-hidden": "true",
|
|
59
|
+
disabled: t(i),
|
|
52
60
|
checked: e.modelValue
|
|
53
|
-
}, t(o)[t(
|
|
54
|
-
n.$slots["icon-left"] ? g(n.$slots, "icon-left", { key: 0 }, void 0, !0) :
|
|
55
|
-
e.text || e.activeText || e.inactiveText ? (
|
|
61
|
+
}, t(o)[t(l).FIELD]), null, 16, $),
|
|
62
|
+
n.$slots["icon-left"] ? g(n.$slots, "icon-left", { key: 0 }, void 0, !0) : a("", !0),
|
|
63
|
+
e.text || e.activeText || e.inactiveText ? (d(), u(t(E), c({
|
|
56
64
|
key: 1,
|
|
57
65
|
variant: "body1",
|
|
58
66
|
"is-truncated": "",
|
|
59
|
-
class: ["toggle-text", { "toggle-disabled-text": t(
|
|
60
|
-
}, t(o)[t(
|
|
61
|
-
default:
|
|
62
|
-
|
|
67
|
+
class: ["toggle-text", { "toggle-disabled-text": t(i) }]
|
|
68
|
+
}, t(o)[t(l).TEXT]), {
|
|
69
|
+
default: x(() => [
|
|
70
|
+
k(y(e.text ?? (e.modelValue ? e.activeText : e.inactiveText)), 1)
|
|
63
71
|
]),
|
|
64
72
|
_: 1
|
|
65
|
-
}, 16, ["class"])) :
|
|
66
|
-
n.$slots["icon-right"] ? g(n.$slots, "icon-right", { key: 2 }, void 0, !0) :
|
|
67
|
-
e.hoverHelpText ? (
|
|
73
|
+
}, 16, ["class"])) : a("", !0),
|
|
74
|
+
n.$slots["icon-right"] ? g(n.$slots, "icon-right", { key: 2 }, void 0, !0) : a("", !0),
|
|
75
|
+
e.hoverHelpText ? (d(), u(t(I), {
|
|
68
76
|
key: 3,
|
|
69
77
|
triggers: ["hover"],
|
|
70
78
|
text: e.hoverHelpText,
|
|
71
|
-
placement: e.hoverHelpTextPlacement
|
|
79
|
+
placement: e.hoverHelpTextPlacement,
|
|
80
|
+
focusable: ""
|
|
72
81
|
}, {
|
|
73
|
-
default:
|
|
74
|
-
V(t(
|
|
82
|
+
default: x(() => [
|
|
83
|
+
V(t(H), {
|
|
75
84
|
class: "info-icon",
|
|
76
85
|
name: "question",
|
|
77
86
|
type: "fill",
|
|
@@ -79,18 +88,18 @@ const L = { class: "toggle-head" }, P = ["disabled", "checked"], O = /* @__PURE_
|
|
|
79
88
|
})
|
|
80
89
|
]),
|
|
81
90
|
_: 1
|
|
82
|
-
}, 8, ["text", "placement"])) :
|
|
91
|
+
}, 8, ["text", "placement"])) : a("", !0)
|
|
83
92
|
], 16),
|
|
84
|
-
e.feedbackText ? (
|
|
93
|
+
e.feedbackText ? (d(), u(L, c({
|
|
85
94
|
key: 0,
|
|
86
95
|
class: "feedback-text",
|
|
87
96
|
text: e.feedbackText,
|
|
88
97
|
variant: e.feedbackVariant,
|
|
89
98
|
"show-icon": !1
|
|
90
|
-
}, t(o)[t(
|
|
99
|
+
}, t(o)[t(l).HELPER_TEXT]), null, 16, ["text", "variant"])) : a("", !0)
|
|
91
100
|
], 2));
|
|
92
101
|
}
|
|
93
102
|
});
|
|
94
103
|
export {
|
|
95
|
-
|
|
104
|
+
X as default
|
|
96
105
|
};
|