@ironsource/shared-ui 2.2.0-rc.43 → 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.
Files changed (156) hide show
  1. package/Alert.vue_vue_type_style_index_0_scoped_5e66710b_lang.css +1 -0
  2. package/ButtonV4.vue_vue_type_style_index_0_scoped_a59af1ad_lang.css +1 -0
  3. package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_6eae923a_lang.css +1 -0
  4. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_5a645cc9_lang.css +1 -0
  5. package/DataGridMenu.vue_vue_type_style_index_0_scoped_b7e65177_lang.css +1 -0
  6. package/DatePickerV4.vue_vue_type_style_index_0_scoped_39e6c10c_lang.css +1 -0
  7. package/DateRangeV4.vue_vue_type_style_index_0_scoped_bb44cdf8_lang.css +1 -0
  8. package/DropdownV4.vue_vue_type_style_index_0_scoped_f44f2402_lang.css +1 -0
  9. package/DropdownV4.vue_vue_type_style_index_1_lang.css +1 -1
  10. package/FieldLabel.vue_vue_type_style_index_0_scoped_960ea8b1_lang.css +1 -0
  11. package/HelpText.vue_vue_type_style_index_0_scoped_b5caf7cd_lang.css +1 -0
  12. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_2a5345ef_lang.css +1 -0
  13. package/IncludeExclude.vue_vue_type_style_index_0_scoped_cc2adbf5_lang.css +1 -1
  14. package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_bd6145ce_lang.css +1 -1
  15. package/InlineCopy.vue_vue_type_style_index_0_scoped_8cb01c9d_lang.css +1 -0
  16. package/Link.vue_vue_type_style_index_0_scoped_c4345b08_lang.css +1 -0
  17. package/Loader.vue_vue_type_style_index_0_scoped_50d9be64_lang.css +1 -0
  18. package/Menu.vue_vue_type_style_index_0_scoped_eb057818_lang.css +1 -0
  19. package/Menu.vue_vue_type_style_index_1_lang.css +1 -1
  20. package/MultiBar.vue_vue_type_style_index_0_scoped_c4395fb6_lang.css +1 -0
  21. package/OptionV4.vue_vue_type_style_index_0_scoped_d48a9318_lang.css +1 -0
  22. package/PopoverV4.vue_vue_type_style_index_0_scoped_9ae00876_lang.css +1 -0
  23. package/PopoverV4.vue_vue_type_style_index_1_lang.css +1 -1
  24. package/SearchV4.vue_vue_type_style_index_0_scoped_e1a33934_lang.css +1 -0
  25. package/SnackbarV4.vue_vue_type_style_index_0_scoped_35c79635_lang.css +1 -0
  26. package/TabsV4.vue_vue_type_style_index_0_scoped_9747c9da_lang.css +1 -0
  27. package/TextField.vue_vue_type_style_index_0_scoped_f4275491_lang.css +1 -0
  28. package/ThemeWrapper.vue_vue_type_style_index_0_scoped_66bd448a_lang.css +1 -0
  29. package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
  30. package/ToggleV4.vue_vue_type_style_index_0_scoped_fbbae882_lang.css +1 -0
  31. package/TooltipV4.vue_vue_type_style_index_0_scoped_22e25f74_lang.css +1 -0
  32. package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
  33. package/components/ThemeWrapper/ThemeStrore.d.ts +1 -2
  34. package/components/ThemeWrapper/ThemeStrore.js +11 -14
  35. package/components/ThemeWrapper/ThemeWrapper.vue.js +2 -2
  36. package/components/ThemeWrapper/ThemeWrapper.vue2.js +11 -8
  37. package/components/ThemeWrapper/index.d.ts +1 -2
  38. package/components/ThemeWrapper/index.js +2 -4
  39. package/components/alert/Alert.vue.js +4 -4
  40. package/components/alert/Alert.vue2.js +1 -1
  41. package/components/autocomplete/index.d.ts +16 -16
  42. package/components/button/v3/ButtonBase.vue.d.ts +1 -1
  43. package/components/button/v4/ButtonV4.vue.js +3 -3
  44. package/components/button/v4/ButtonV4.vue2.js +1 -1
  45. package/components/columnPicker/ColumnPicker.vue.d.ts +1 -1
  46. package/components/columnPicker/index.d.ts +20 -20
  47. package/components/datePicker/v4/DatePickerV4.vue.js +2 -2
  48. package/components/datePicker/v4/DatePickerV4.vue2.js +1 -1
  49. package/components/dateRange/v4/CalendarMonthV4.vue.js +4 -4
  50. package/components/dateRange/v4/CalendarMonthV4.vue2.js +1 -1
  51. package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
  52. package/components/dateRange/v4/DateRangeV4.vue2.js +28 -27
  53. package/components/dropdown/common/Dropdown.common.js +351 -274
  54. package/components/dropdown/v3/Dropdown.vue.d.ts +6 -6
  55. package/components/dropdown/v3/index.d.ts +88 -88
  56. package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
  57. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +38 -32
  58. package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +1 -1
  59. package/components/dropdown/v4/DropdownV4.vue.d.ts +50 -41
  60. package/components/dropdown/v4/DropdownV4.vue.js +3 -3
  61. package/components/dropdown/v4/DropdownV4.vue2.js +239 -224
  62. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +5 -0
  63. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +3 -3
  64. package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -9
  65. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  66. package/components/dropdown/v4/OptionV4.vue2.js +12 -12
  67. package/components/dropdown/v4/TreeDropdown.vue.d.ts +1 -1
  68. package/components/dropdown/v4/index.d.ts +2377 -2349
  69. package/components/helpText/HelpText.vue.js +3 -3
  70. package/components/helpText/HelpText.vue2.js +11 -10
  71. package/components/includeExclude/IncludeExclude.vue.d.ts +2 -2
  72. package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +2 -2
  73. package/components/includeExclude/index.d.ts +54 -54
  74. package/components/inlineCopy/InlineCopy.vue.d.ts +5 -0
  75. package/components/inlineCopy/InlineCopy.vue.js +3 -3
  76. package/components/inlineCopy/InlineCopy.vue2.js +54 -53
  77. package/components/inlineCopy/index.d.ts +9 -0
  78. package/components/input/v4/TextField.vue.d.ts +5 -0
  79. package/components/input/v4/TextField.vue.js +2 -2
  80. package/components/input/v4/TextField.vue2.js +22 -19
  81. package/components/input/v4/index.d.ts +20 -1
  82. package/components/link/Link.vue.js +5 -5
  83. package/components/link/Link.vue2.js +30 -21
  84. package/components/loader/v4/Loader.vue.js +3 -3
  85. package/components/loader/v4/Loader.vue2.js +1 -1
  86. package/components/menu/Menu.vue.js +3 -3
  87. package/components/menu/Menu.vue2.js +30 -33
  88. package/components/multibar/MultiBar.vue.js +3 -3
  89. package/components/multibar/MultiBar.vue2.js +50 -51
  90. package/components/popover/v4/PopoverV4.vue.js +2 -2
  91. package/components/popover/v4/PopoverV4.vue2.js +21 -22
  92. package/components/search/v4/SearchV4.vue.d.ts +5 -0
  93. package/components/search/v4/SearchV4.vue.js +5 -5
  94. package/components/search/v4/SearchV4.vue2.js +23 -18
  95. package/components/search/v4/index.d.ts +9 -0
  96. package/components/shared/FieldLabel.vue.js +3 -3
  97. package/components/shared/FieldLabel.vue2.js +9 -8
  98. package/components/snackbar/v4/SnackbarV4.vue.js +3 -3
  99. package/components/snackbar/v4/SnackbarV4.vue2.js +1 -1
  100. package/components/table/v4/DataGridMenu.vue.d.ts +5 -0
  101. package/components/table/v4/DataGridMenu.vue.js +5 -5
  102. package/components/table/v4/DataGridMenu.vue2.js +28 -22
  103. package/components/table/v4/index.d.ts +9 -0
  104. package/components/tabs/v4/TabsV4.vue.d.ts +5 -0
  105. package/components/tabs/v4/TabsV4.vue.js +3 -3
  106. package/components/tabs/v4/TabsV4.vue2.js +74 -43
  107. package/components/tabs/v4/index.d.ts +20 -1
  108. package/components/toggle/v4/ToggleV4.vue.d.ts +5 -0
  109. package/components/toggle/v4/ToggleV4.vue.js +3 -3
  110. package/components/toggle/v4/ToggleV4.vue2.js +50 -41
  111. package/components/toggle/v4/index.d.ts +20 -1
  112. package/components/tooltip/v3/Tooltip.vue.d.ts +1 -1
  113. package/components/tooltip/v3/index.d.ts +20 -20
  114. package/components/tooltip/v4/TooltipV4.vue.d.ts +15 -2
  115. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  116. package/components/tooltip/v4/TooltipV4.vue2.js +85 -63
  117. package/components/tooltip/v4/index.d.ts +70 -23
  118. package/design-foundation.stories/colors/ColorsData.d.ts +0 -114
  119. package/design-foundation.stories/colors/ColorsStoryWrapper.vue.d.ts +1 -28
  120. package/index.d.ts +3013 -2696
  121. package/index.js +1 -1
  122. package/package.json +5 -1
  123. package/style/v4/border-radius.scss +2 -2
  124. package/style/v4/colors.scss +0 -105
  125. package/style/v4/elevations.scss +0 -11
  126. package/style/v4/grid.css +1 -17
  127. package/style/v4/grid.css.map +1 -1
  128. package/style/v4/grid.scss +1 -1
  129. package/style/v4/spacings.scss +1 -1
  130. package/style/v4/styleguideV4.scss +0 -1
  131. package/styleguide.scss +2 -2
  132. package/Alert.vue_vue_type_style_index_0_scoped_1036ab1d_lang.css +0 -1
  133. package/ButtonV4.vue_vue_type_style_index_0_scoped_6f05dc63_lang.css +0 -1
  134. package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_73af6757_lang.css +0 -1
  135. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_38354f10_lang.css +0 -1
  136. package/DataGridMenu.vue_vue_type_style_index_0_scoped_ddfaf207_lang.css +0 -1
  137. package/DatePickerV4.vue_vue_type_style_index_0_scoped_bb0041c1_lang.css +0 -1
  138. package/DateRangeV4.vue_vue_type_style_index_0_scoped_5545bc01_lang.css +0 -1
  139. package/DropdownV4.vue_vue_type_style_index_0_scoped_b2d0a4d2_lang.css +0 -1
  140. package/FieldLabel.vue_vue_type_style_index_0_scoped_921d4087_lang.css +0 -1
  141. package/HelpText.vue_vue_type_style_index_0_scoped_641c2356_lang.css +0 -1
  142. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_lang.css +0 -1
  143. package/InlineCopy.vue_vue_type_style_index_0_scoped_9fa1921a_lang.css +0 -1
  144. package/Link.vue_vue_type_style_index_0_scoped_fe0e7f6f_lang.css +0 -1
  145. package/Loader.vue_vue_type_style_index_0_scoped_94c3c850_lang.css +0 -1
  146. package/Menu.vue_vue_type_style_index_0_scoped_545aa70b_lang.css +0 -1
  147. package/MultiBar.vue_vue_type_style_index_0_scoped_7c2477ad_lang.css +0 -1
  148. package/OptionV4.vue_vue_type_style_index_0_scoped_7e70c643_lang.css +0 -1
  149. package/PopoverV4.vue_vue_type_style_index_0_scoped_ea1a3e8c_lang.css +0 -1
  150. package/SearchV4.vue_vue_type_style_index_0_scoped_d6c42f4b_lang.css +0 -1
  151. package/SnackbarV4.vue_vue_type_style_index_0_scoped_f19e742c_lang.css +0 -1
  152. package/TabsV4.vue_vue_type_style_index_0_scoped_f9433b11_lang.css +0 -1
  153. package/TextField.vue_vue_type_style_index_0_scoped_28fab783_lang.css +0 -1
  154. package/ThemeWrapper.vue_vue_type_style_index_0_scoped_8eef6574_lang.css +0 -1
  155. package/ToggleV4.vue_vue_type_style_index_0_scoped_a4aa32fb_lang.css +0 -1
  156. package/TooltipV4.vue_vue_type_style_index_0_scoped_f88fbece_lang.css +0 -1
@@ -1,72 +1,103 @@
1
- import "../../../TabsV4.vue_vue_type_style_index_0_scoped_f9433b11_lang.css"; import { defineComponent as x, useCssVars as y, ref as l, watch as C, nextTick as $, openBlock as o, createElementBlock as c, mergeProps as w, unref as s, Fragment as A, renderList as S, normalizeClass as g, renderSlot as V, createBlock as B, withCtx as M, createTextVNode as N, toDisplayString as R, createCommentVNode as _, pushScopeId as E, popScopeId as P, createElementVNode as W } from "vue";
2
- import H from "../../typography/v4/Typography.vue.js";
3
- import { TabsTestIdModifiers as m } from "../../../testids/index.js";
4
- import { tabsCommon as z } from "../common/tabsCommon.js";
5
- import { useTestIdAttrs as D } from "../../../utils/testIds.js";
6
- const F = (t) => (E("data-v-f9433b11"), t = t(), P(), t), U = ["data-testid", "onClick", "onMouseover"], j = /* @__PURE__ */ F(() => /* @__PURE__ */ W("div", { class: "tabs-border-line" }, null, -1)), Q = /* @__PURE__ */ x({
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(t, { emit: p }) {
16
- const r = t;
17
- y((a) => ({
18
- "167b065e": v.value,
19
- "8cfadb62": b.value
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: T, selectTab: I, setHover: L, clearHover: u, getSelectedTabIndex: k } = z(r, p), f = l(null), h = D(r.testId, m), i = (a) => a.id === r.selectedTab, b = l(), v = l();
22
- return C(
23
- [() => r.variant, () => r.selectedTab, () => r.tabsList],
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 a = k();
26
- if (a === -1)
49
+ const t = k();
50
+ if (t === -1)
27
51
  return;
28
- await $();
29
- const e = Array.from(f.value?.children || []).at(a);
30
- b.value = e?.clientWidth + "px", v.value = e?.offsetLeft + "px";
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
- ), (a, n) => (o(), c("ul", w({
57
+ ), (t, i) => (c(), v("ul", N({
34
58
  ref_key: "tabsListRef",
35
59
  ref: f,
36
- class: ["tabs-list", [`tabs-list--${t.variant}`]]
37
- }, s(h)[s(m).WRAPPER]), [
38
- (o(!0), c(A, null, S(t.tabsList, (e) => (o(), c("li", {
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: s(T).tabsNewList,
66
+ ref: n(g).tabsNewList,
41
67
  key: e.id,
42
- class: g(["tab-item", {
68
+ class: K(["tab-item", {
43
69
  "tab-item--disabled": e.disabled,
44
- "tab-item--active": i(e)
70
+ "tab-item--active": l(e)
45
71
  }]),
46
- "data-testid": t.testId ? `${t.testId}-${s(m).TAB}-${e.id}` : void 0,
47
- onClick: (d) => s(I)(e),
48
- onMouseover: (d) => s(L)(e),
49
- onMouseleave: n[0] || (n[0] = //@ts-ignore
50
- (...d) => s(u) && s(u)(...d))
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
- V(a.$slots, "tab-icon", {
83
+ P(t.$slots, "tab-icon", {
53
84
  tab: e,
54
- active: i(e)
85
+ active: l(e)
55
86
  }, void 0, !0),
56
- e.name ? (o(), B(s(H), {
87
+ e.name ? (c(), W(n(J), {
57
88
  key: 0,
58
- variant: i(e) ? "tabLabel2" : "tabLabel1"
89
+ variant: l(e) ? "tabLabel2" : "tabLabel1"
59
90
  }, {
60
- default: M(() => [
61
- N(R(e.name), 1)
91
+ default: z(() => [
92
+ F(O(e.name), 1)
62
93
  ]),
63
94
  _: 2
64
- }, 1032, ["variant"])) : _("", !0)
65
- ], 42, U))), 128)),
66
- j
67
- ], 16));
95
+ }, 1032, ["variant"])) : U("", !0)
96
+ ], 42, ee))), 128)),
97
+ te
98
+ ], 16, Z));
68
99
  }
69
100
  });
70
101
  export {
71
- Q as default
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.vue_vue_type_style_index_0_scoped_a4aa32fb_lang.css"; //*');
4
- const t = /* @__PURE__ */ e(o, [["__scopeId", "data-v-a4aa32fb"]]);
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
- t as default
6
+ p as default
7
7
  };
@@ -1,12 +1,12 @@
1
- import "../../../ToggleV4.vue_vue_type_style_index_0_scoped_a4aa32fb_lang.css"; import { defineComponent as k, computed as h, openBlock as i, createElementBlock as m, normalizeClass as f, createElementVNode as r, mergeProps as d, unref as t, createCommentVNode as l, renderSlot as g, createBlock as u, withCtx as v, createTextVNode as b, toDisplayString as y, createVNode as V } from "vue";
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 a } from "../../../testids/index.js";
4
- import B from "../../shared/FieldHelpText.vue.js";
5
- import { useTestIdAttrs as H } from "../../../utils/testIds.js";
6
- import I from "../../icon/v4/IconV4.vue.js";
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 D from "../../tooltip/v4/TooltipV4.vue.js";
9
- const L = { class: "toggle-head" }, P = ["disabled", "checked"], O = /* @__PURE__ */ k({
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: x }) {
28
- const c = e, T = () => {
29
- s.value || x("update:modelValue", !c.modelValue);
30
- }, o = H(c.testId, a), s = h(() => c.isDisabled || c.isLoading);
31
- return (n, $) => (i(), m("div", {
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", d({ class: "toggle-wrap" }, t(o)[t(a).WRAPPER]), [
35
- r("div", d({
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(s)
39
- }]
40
- }, t(o)[t(a).BODY], { onClick: T }), [
41
- r("div", L, [
42
- e.isLoading ? (i(), m("span", {
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)) : l("", !0)
51
+ }, null, 2)) : a("", !0)
46
52
  ])
47
- ], 16),
48
- r("input", d({
53
+ ], 16, D),
54
+ r("input", c({
49
55
  type: "checkbox",
50
56
  class: "toggle-checkbox",
51
- disabled: t(s),
57
+ tabindex: "-1",
58
+ "aria-hidden": "true",
59
+ disabled: t(i),
52
60
  checked: e.modelValue
53
- }, t(o)[t(a).FIELD]), null, 16, P),
54
- n.$slots["icon-left"] ? g(n.$slots, "icon-left", { key: 0 }, void 0, !0) : l("", !0),
55
- e.text || e.activeText || e.inactiveText ? (i(), u(t(E), d({
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(s) }]
60
- }, t(o)[t(a).TEXT]), {
61
- default: v(() => [
62
- b(y(e.text ?? (e.modelValue ? e.activeText : e.inactiveText)), 1)
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"])) : l("", !0),
66
- n.$slots["icon-right"] ? g(n.$slots, "icon-right", { key: 2 }, void 0, !0) : l("", !0),
67
- e.hoverHelpText ? (i(), u(t(D), {
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: v(() => [
74
- V(t(I), {
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"])) : l("", !0)
91
+ }, 8, ["text", "placement"])) : a("", !0)
83
92
  ], 16),
84
- e.feedbackText ? (i(), u(B, d({
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(a).HELPER_TEXT]), null, 16, ["text", "variant"])) : l("", !0)
99
+ }, t(o)[t(l).HELPER_TEXT]), null, 16, ["text", "variant"])) : a("", !0)
91
100
  ], 2));
92
101
  }
93
102
  });
94
103
  export {
95
- O as default
104
+ X as default
96
105
  };
@@ -8,6 +8,7 @@ declare const ToggleTypes: () => ({
8
8
  color: "primary" | "test";
9
9
  size: "small" | "medium";
10
10
  isLoading: boolean;
11
+ ariaLabel: string;
11
12
  hoverHelpText: string;
12
13
  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";
13
14
  feedbackText: string;
@@ -40,6 +41,10 @@ declare const ToggleTypes: () => ({
40
41
  type: import("vue").PropType<boolean>;
41
42
  default: boolean;
42
43
  };
44
+ ariaLabel: {
45
+ type: import("vue").PropType<string>;
46
+ default: any;
47
+ };
43
48
  hoverHelpText: {
44
49
  type: import("vue").PropType<string>;
45
50
  default: string;
@@ -70,7 +75,7 @@ declare const ToggleTypes: () => ({
70
75
  };
71
76
  }>> & {
72
77
  "onUpdate:modelValue"?: (value: boolean) => any;
73
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "text" | "testId" | "color" | "size" | "isLoading" | "hoverHelpText" | "hoverHelpTextPlacement" | "feedbackText" | "feedbackVariant" | "isDisabled" | "activeText" | "inactiveText">;
78
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "text" | "testId" | "color" | "size" | "isLoading" | "ariaLabel" | "hoverHelpText" | "hoverHelpTextPlacement" | "feedbackText" | "feedbackVariant" | "isDisabled" | "activeText" | "inactiveText">;
74
79
  $attrs: {
75
80
  [x: string]: unknown;
76
81
  };
@@ -109,6 +114,10 @@ declare const ToggleTypes: () => ({
109
114
  type: import("vue").PropType<boolean>;
110
115
  default: boolean;
111
116
  };
117
+ ariaLabel: {
118
+ type: import("vue").PropType<string>;
119
+ default: any;
120
+ };
112
121
  hoverHelpText: {
113
122
  type: import("vue").PropType<string>;
114
123
  default: string;
@@ -147,6 +156,7 @@ declare const ToggleTypes: () => ({
147
156
  color: "primary" | "test";
148
157
  size: "small" | "medium";
149
158
  isLoading: boolean;
159
+ ariaLabel: string;
150
160
  hoverHelpText: string;
151
161
  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";
152
162
  feedbackText: string;
@@ -199,6 +209,10 @@ declare const ToggleTypes: () => ({
199
209
  type: import("vue").PropType<boolean>;
200
210
  default: boolean;
201
211
  };
212
+ ariaLabel: {
213
+ type: import("vue").PropType<string>;
214
+ default: any;
215
+ };
202
216
  hoverHelpText: {
203
217
  type: import("vue").PropType<string>;
204
218
  default: string;
@@ -258,6 +272,10 @@ declare const ToggleTypes: () => ({
258
272
  type: import("vue").PropType<boolean>;
259
273
  default: boolean;
260
274
  };
275
+ ariaLabel: {
276
+ type: import("vue").PropType<string>;
277
+ default: any;
278
+ };
261
279
  hoverHelpText: {
262
280
  type: import("vue").PropType<string>;
263
281
  default: string;
@@ -296,6 +314,7 @@ declare const ToggleTypes: () => ({
296
314
  color: "primary" | "test";
297
315
  size: "small" | "medium";
298
316
  isLoading: boolean;
317
+ ariaLabel: string;
299
318
  hoverHelpText: string;
300
319
  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";
301
320
  feedbackText: string;
@@ -40,9 +40,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
40
40
  disabled: boolean;
41
41
  testId: string;
42
42
  }>>>, {
43
- theme: string;
44
43
  header: string;
45
44
  text: string;
45
+ theme: string;
46
46
  testId: string;
47
47
  delay: number;
48
48
  triggers: TooltipTriggers[];
@@ -3,9 +3,9 @@ declare const TooltipTypes: () => ({
3
3
  $: import("vue").ComponentInternalInstance;
4
4
  $data: {};
5
5
  $props: Partial<{
6
- theme: string;
7
6
  header: string;
8
7
  text: string;
8
+ theme: string;
9
9
  testId: string;
10
10
  delay: number;
11
11
  triggers: import("../common/Tooltip.types").TooltipTriggers[];
@@ -13,10 +13,6 @@ declare const TooltipTypes: () => ({
13
13
  placement: "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";
14
14
  disabled: boolean;
15
15
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
16
- theme: {
17
- type: import("vue").PropType<string>;
18
- default: string;
19
- };
20
16
  header: {
21
17
  type: import("vue").PropType<string>;
22
18
  default: any;
@@ -25,6 +21,10 @@ declare const TooltipTypes: () => ({
25
21
  type: import("vue").PropType<string>;
26
22
  default: any;
27
23
  };
24
+ theme: {
25
+ type: import("vue").PropType<string>;
26
+ default: string;
27
+ };
28
28
  testId: {
29
29
  type: import("vue").PropType<string>;
30
30
  default: string;
@@ -49,7 +49,7 @@ declare const TooltipTypes: () => ({
49
49
  type: import("vue").PropType<boolean>;
50
50
  default: boolean;
51
51
  };
52
- }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "theme" | "header" | "text" | "testId" | "delay" | "triggers" | "forceShowWithTruncate" | "placement" | "disabled">;
52
+ }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "text" | "theme" | "testId" | "delay" | "triggers" | "forceShowWithTruncate" | "placement" | "disabled">;
53
53
  $attrs: {
54
54
  [x: string]: unknown;
55
55
  };
@@ -64,10 +64,6 @@ declare const TooltipTypes: () => ({
64
64
  $emit: (event: string, ...args: any[]) => void;
65
65
  $el: any;
66
66
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
67
- theme: {
68
- type: import("vue").PropType<string>;
69
- default: string;
70
- };
71
67
  header: {
72
68
  type: import("vue").PropType<string>;
73
69
  default: any;
@@ -76,6 +72,10 @@ declare const TooltipTypes: () => ({
76
72
  type: import("vue").PropType<string>;
77
73
  default: any;
78
74
  };
75
+ theme: {
76
+ type: import("vue").PropType<string>;
77
+ default: string;
78
+ };
79
79
  testId: {
80
80
  type: import("vue").PropType<string>;
81
81
  default: string;
@@ -101,9 +101,9 @@ declare const TooltipTypes: () => ({
101
101
  default: boolean;
102
102
  };
103
103
  }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
104
- theme: string;
105
104
  header: string;
106
105
  text: string;
106
+ theme: string;
107
107
  testId: string;
108
108
  delay: number;
109
109
  triggers: import("../common/Tooltip.types").TooltipTriggers[];
@@ -131,10 +131,6 @@ declare const TooltipTypes: () => ({
131
131
  $nextTick: typeof import("vue").nextTick;
132
132
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
133
133
  } & Readonly<import("vue").ExtractPropTypes<{
134
- theme: {
135
- type: import("vue").PropType<string>;
136
- default: string;
137
- };
138
134
  header: {
139
135
  type: import("vue").PropType<string>;
140
136
  default: any;
@@ -143,6 +139,10 @@ declare const TooltipTypes: () => ({
143
139
  type: import("vue").PropType<string>;
144
140
  default: any;
145
141
  };
142
+ theme: {
143
+ type: import("vue").PropType<string>;
144
+ default: string;
145
+ };
146
146
  testId: {
147
147
  type: import("vue").PropType<string>;
148
148
  default: string;
@@ -172,10 +172,6 @@ declare const TooltipTypes: () => ({
172
172
  __isTeleport?: never;
173
173
  __isSuspense?: never;
174
174
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
175
- theme: {
176
- type: import("vue").PropType<string>;
177
- default: string;
178
- };
179
175
  header: {
180
176
  type: import("vue").PropType<string>;
181
177
  default: any;
@@ -184,6 +180,10 @@ declare const TooltipTypes: () => ({
184
180
  type: import("vue").PropType<string>;
185
181
  default: any;
186
182
  };
183
+ theme: {
184
+ type: import("vue").PropType<string>;
185
+ default: string;
186
+ };
187
187
  testId: {
188
188
  type: import("vue").PropType<string>;
189
189
  default: string;
@@ -209,9 +209,9 @@ declare const TooltipTypes: () => ({
209
209
  default: boolean;
210
210
  };
211
211
  }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
212
- theme: string;
213
212
  header: string;
214
213
  text: string;
214
+ theme: string;
215
215
  testId: string;
216
216
  delay: number;
217
217
  triggers: import("../common/Tooltip.types").TooltipTriggers[];