@ironsource/shared-ui 2.1.7-rc.12 → 2.1.7-rc.13

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.
@@ -0,0 +1 @@
1
+ .tabs-list[data-v-f9433b11]{position:relative;padding:0;margin:0}.tabs-list--page[data-v-f9433b11]{border-bottom:1px solid var(--common-divider);box-sizing:border-box}.tabs-list--page .tab-item[data-v-f9433b11]{padding:0;margin-right:var(--spacing-200);min-height:calc(var(--spacing-600) - 1px)}.tabs-list--page .tabs-border-line[data-v-f9433b11]{margin-top:-1px}.tabs-border-line[data-v-f9433b11]{left:var(--167b065e);width:var(--8cfadb62);border-bottom:2px solid var(--primary-main);transition:left .2s ease-in-out,width .2s;position:absolute;margin-top:-2px}.tab-item[data-v-f9433b11]{display:inline-flex;flex-direction:row;justify-content:center;align-items:center;color:var(--action-active);gap:var(--spacing-100);vertical-align:middle;padding:0 var(--spacing-300);min-height:var(--spacing-600)}.tab-item[data-v-f9433b11]:hover{cursor:pointer;color:var(--text-primary)}.tab-item--active[data-v-f9433b11]{color:var(--text-primary)}.tab-item--disabled[data-v-f9433b11]{color:var(--action-disabled);cursor:not-allowed;pointer-events:none}
@@ -1,7 +1,7 @@
1
1
  import o from "./TabsV4.vue2.js";
2
- /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../TabsV4.vue_vue_type_style_index_0_scoped_bab40cfe_lang.css"; //*');
4
- const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-bab40cfe"]]);
2
+ /* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../TabsV4.vue_vue_type_style_index_0_scoped_f9433b11_lang.css"; //*');
4
+ const p = /* @__PURE__ */ _(o, [["__scopeId", "data-v-f9433b11"]]);
5
5
  export {
6
- a as default
6
+ p as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import "../../../TabsV4.vue_vue_type_style_index_0_scoped_bab40cfe_lang.css"; import { defineComponent as h, useCssVars as C, ref as v, watch as w, nextTick as $, openBlock as r, createElementBlock as l, mergeProps as y, unref as s, Fragment as S, renderList as g, normalizeClass as A, renderSlot as N, createBlock as V, withCtx as B, createTextVNode as M, toDisplayString as E, createCommentVNode as P, pushScopeId as W, popScopeId as _, createElementVNode as H } from "vue";
2
- import R from "../../typography/v4/Typography.vue.js";
3
- import { TabsTestIdModifiers as c } from "../../../testids/index.js";
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
4
  import { tabsCommon as z } from "../common/tabsCommon.js";
5
5
  import { useTestIdAttrs as D } from "../../../utils/testIds.js";
6
- const F = (t) => (W("data-v-bab40cfe"), t = t(), _(), t), U = ["data-testid", "onClick", "onMouseover"], j = /* @__PURE__ */ F(() => /* @__PURE__ */ H("div", { class: "tabs-border-line" }, null, -1)), Q = /* @__PURE__ */ h({
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({
7
7
  __name: "TabsV4",
8
8
  props: {
9
9
  tabsList: { default: () => [] },
@@ -12,59 +12,56 @@ const F = (t) => (W("data-v-bab40cfe"), t = t(), _(), t), U = ["data-testid", "o
12
12
  testId: { default: "" }
13
13
  },
14
14
  emits: ["update:selectedTab"],
15
- setup(t, { emit: f }) {
16
- const a = t;
17
- C((o) => ({
18
- "57c21ae0": b.value,
19
- bdc3e3e6: m.value
15
+ setup(t, { emit: p }) {
16
+ const r = t;
17
+ y((a) => ({
18
+ "167b065e": v.value,
19
+ "8cfadb62": b.value
20
20
  }));
21
- const {
22
- skipUnwrap: p,
23
- selectTab: T,
24
- setHover: I,
25
- clearHover: u,
26
- tabsNewList: L,
27
- getSelectedTabIndex: k
28
- } = z(a, f), x = D(a.testId, c), d = (o) => o.id === a.selectedTab, m = v(), b = v();
29
- return w(
30
- [() => a.variant, () => a.selectedTab, () => a.tabsList],
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],
31
24
  async () => {
32
- const o = k();
25
+ const a = k();
26
+ if (a === -1)
27
+ return;
33
28
  await $();
34
- const i = L.value[o];
35
- m.value = i?.clientWidth + "px", b.value = i?.offsetLeft + "px";
29
+ const e = Array.from(f.value?.children || []).at(a);
30
+ b.value = e?.clientWidth + "px", v.value = e?.offsetLeft + "px";
36
31
  },
37
32
  { immediate: !0 }
38
- ), (o, i) => (r(), l("ul", y({
33
+ ), (a, n) => (o(), c("ul", w({
34
+ ref_key: "tabsListRef",
35
+ ref: f,
39
36
  class: ["tabs-list", [`tabs-list--${t.variant}`]]
40
- }, s(x)[s(c).WRAPPER]), [
41
- (r(!0), l(S, null, g(t.tabsList, (e) => (r(), l("li", {
37
+ }, s(h)[s(m).WRAPPER]), [
38
+ (o(!0), c(A, null, S(t.tabsList, (e) => (o(), c("li", {
42
39
  ref_for: !0,
43
- ref: s(p).tabsNewList,
40
+ ref: s(T).tabsNewList,
44
41
  key: e.id,
45
- class: A(["tab-item", {
42
+ class: g(["tab-item", {
46
43
  "tab-item--disabled": e.disabled,
47
- "tab-item--active": d(e)
44
+ "tab-item--active": i(e)
48
45
  }]),
49
- "data-testid": t.testId ? `${t.testId}-${s(c).TAB}-${e.id}` : void 0,
50
- onClick: (n) => s(T)(e),
51
- onMouseover: (n) => s(I)(e),
52
- onMouseleave: i[0] || (i[0] = //@ts-ignore
53
- (...n) => s(u) && s(u)(...n))
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))
54
51
  }, [
55
- N(o.$slots, "tab-icon", {
52
+ V(a.$slots, "tab-icon", {
56
53
  tab: e,
57
- active: d(e)
54
+ active: i(e)
58
55
  }, void 0, !0),
59
- e.name ? (r(), V(s(R), {
56
+ e.name ? (o(), B(s(H), {
60
57
  key: 0,
61
- variant: d(e) ? "tabLabel2" : "tabLabel1"
58
+ variant: i(e) ? "tabLabel2" : "tabLabel1"
62
59
  }, {
63
- default: B(() => [
64
- M(E(e.name), 1)
60
+ default: M(() => [
61
+ N(R(e.name), 1)
65
62
  ]),
66
63
  _: 2
67
- }, 1032, ["variant"])) : P("", !0)
64
+ }, 1032, ["variant"])) : _("", !0)
68
65
  ], 42, U))), 128)),
69
66
  j
70
67
  ], 16));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.1.7-rc.12",
3
+ "version": "2.1.7-rc.13",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- .tabs-list[data-v-bab40cfe]{position:relative;padding:0;margin:0}.tabs-list--page[data-v-bab40cfe]{border-bottom:1px solid var(--common-divider);box-sizing:border-box}.tabs-list--page .tab-item[data-v-bab40cfe]{padding:0;margin-right:var(--spacing-200);min-height:calc(var(--spacing-600) - 1px)}.tabs-list--page .tabs-border-line[data-v-bab40cfe]{margin-top:-1px}.tabs-border-line[data-v-bab40cfe]{left:var(--57c21ae0);width:var(--bdc3e3e6);border-bottom:2px solid var(--primary-main);transition:left .2s ease-in-out,width .2s;position:absolute;margin-top:-2px}.tab-item[data-v-bab40cfe]{display:inline-flex;flex-direction:row;justify-content:center;align-items:center;color:var(--action-active);gap:var(--spacing-100);vertical-align:middle;padding:0 var(--spacing-300);min-height:var(--spacing-600)}.tab-item[data-v-bab40cfe]:hover{cursor:pointer;color:var(--text-primary)}.tab-item--active[data-v-bab40cfe]{color:var(--text-primary)}.tab-item--disabled[data-v-bab40cfe]{color:var(--action-disabled);cursor:not-allowed;pointer-events:none}