@ironsource/shared-ui 2.0.0-test.5 → 2.0.0-test.6

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.
@@ -1,69 +0,0 @@
1
- import { defineComponent as $, ref as d, computed as b, onMounted as k, openBlock as r, createElementBlock as c, normalizeClass as u, unref as l, createElementVNode as z, normalizeStyle as g, Fragment as T, renderList as C, renderSlot as I, createVNode as y, withCtx as S, createTextVNode as E, toDisplayString as N } from "vue";
2
- import { useVModel as R } from "@vueuse/core";
3
- import B from "../../typography/Text.vue.js";
4
- import { SwitchTestIdModifiers as f } from "../../../testids/index.js";
5
- const M = ["data-testid"], P = ["aria-label", "data-testid", "onClick"], D = /* @__PURE__ */ $({
6
- __name: "SwitchV4",
7
- props: {
8
- options: null,
9
- modelValue: null,
10
- size: { default: "lg" },
11
- testId: { default: "" }
12
- },
13
- emits: ["update:modelValue"],
14
- setup(e, { emit: v }) {
15
- const n = e, w = d(null), p = R(n, "modelValue", v), i = d([]), x = { optionsRefs: i }, t = d(), m = b(() => ({
16
- left: i.value[t.value]?.offsetLeft,
17
- width: i.value[t.value]?.offsetWidth
18
- }));
19
- k(() => {
20
- t.value = n.options.findIndex(
21
- (s) => s === n.modelValue
22
- );
23
- });
24
- const V = (s, h) => {
25
- t.value = h, p.value = s;
26
- };
27
- return (s, h) => (r(), c("div", {
28
- class: u(["switch", { "switch--lg": e.size === "lg", "switch--sm": e.size === "sm" }]),
29
- "data-testid": `${e.testId}-${l(f).WRAPPER}`
30
- }, [
31
- z("span", {
32
- ref_key: "box",
33
- ref: w,
34
- class: u(["box", { "box--lg": e.size === "lg", "box--sm": e.size === "sm" }]),
35
- style: g({
36
- transform: `translateX(${l(m)?.left}px)`,
37
- width: l(m)?.width + "px"
38
- })
39
- }, null, 6),
40
- (r(!0), c(T, null, C(e.options, (o, a) => (r(), c("button", {
41
- ref_for: !0,
42
- ref: x.optionsRefs,
43
- key: a,
44
- "aria-label": o,
45
- class: u([{ "option--selected": t.value === a }, "option"]),
46
- "data-testid": `${e.testId}-${l(f).BUTTON}`,
47
- onClick: (L) => V(o, a)
48
- }, [
49
- I(s.$slots, "default", {
50
- option: o,
51
- selected: t.value === a
52
- }, () => [
53
- y(B, {
54
- size: "caption",
55
- "data-testid": `${e.testId}-${l(f).TEXT}`
56
- }, {
57
- default: S(() => [
58
- E(N(o), 1)
59
- ]),
60
- _: 2
61
- }, 1032, ["data-testid"])
62
- ], !0)
63
- ], 10, P))), 128))
64
- ], 10, M));
65
- }
66
- });
67
- export {
68
- D as default
69
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.0.0-test.5",
3
+ "version": "2.0.0-test.6",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -0,0 +1,19 @@
1
+ .light-theme-v4 {
2
+ --spacing-tokenset: 0px;
3
+ --spacing-25: 2px;
4
+ --spacing-50: 4px;
5
+ --spacing-75: 6px;
6
+ --spacing-100: 8px;
7
+ --spacing-125: 10px;
8
+ --spacing-150: 12px;
9
+ --spacing-200: 16px;
10
+ --spacing-250: 20px;
11
+ --spacing-300: 24px;
12
+ --spacing-400: 32px;
13
+ --spacing-500: 40px;
14
+ --spacing-600: 48px;
15
+ --spacing-700: 56px;
16
+ --spacing-800: 64px;
17
+ --spacing-900: 72px;
18
+ --spacing-1000: 80px;
19
+ }