@webitel/ui-sdk 26.8.88 → 26.8.91

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,4 +1,4 @@
1
- import "./components-BSM66otL.js";
1
+ import "./components-x657jfzV.js";
2
2
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as t } from "./enums-B_9ZBu01.js";
4
4
  import { t as n } from "./wt-button-BwPz__rU.js";
@@ -1,4 +1,4 @@
1
- import { C as e, i as t } from "./components-BSM66otL.js";
1
+ import { C as e, i as t } from "./components-x657jfzV.js";
2
2
  import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { s as r } from "./utils-DReAiJBV.js";
4
4
  import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
@@ -1,5 +1,5 @@
1
- import { n as e, r as t } from "./clients-cfVUVngv.js";
2
- import { n } from "./components-BSM66otL.js";
1
+ import { n as e, r as t } from "./clients-CKEEu4i6.js";
2
+ import { n } from "./components-x657jfzV.js";
3
3
  import { t as r } from "./vue-i18n-B88GcHzn.js";
4
4
  import { n as i } from "./useEventBus-B-ZeklLu.js";
5
5
  import { createBlock as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeProps as l, onMounted as u, openBlock as d, ref as f, resolveComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
@@ -1,5 +1,5 @@
1
- import { t as e } from "./clients-cfVUVngv.js";
2
- import { a as t, o as n, r, s as i } from "./components-BSM66otL.js";
1
+ import { t as e } from "./clients-CKEEu4i6.js";
2
+ import { a as t, o as n, r, s as i } from "./components-x657jfzV.js";
3
3
  import { t as a } from "./enums-B_9ZBu01.js";
4
4
  import { t as o } from "./vue-i18n-B88GcHzn.js";
5
5
  import { computed as s, createBlock as c, createCommentVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, unref as _, useModel as v } from "vue";
@@ -1,4 +1,4 @@
1
- import { D as e } from "./components-BSM66otL.js";
1
+ import { D as e } from "./components-x657jfzV.js";
2
2
  import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as n } from "./enums-B_9ZBu01.js";
4
4
  import "./wt-button-BwPz__rU.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.8.88",
3
+ "version": "26.8.91",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -25,7 +25,7 @@ const props = defineProps({
25
25
  const href = computed(
26
26
  () => props.logoHref || import.meta.env.VITE_START_PAGE_URL,
27
27
  );
28
- const logoSrc = props.darkMode ? LogoDark : LogoLight;
28
+ const logoSrc = computed(() => (props.darkMode ? LogoDark : LogoLight));
29
29
 
30
30
  const linkComponent = props.disabled
31
31
  ? 'span'
@@ -1,37 +1,15 @@
1
1
  <script setup>
2
- import { inject, ref } from 'vue';
2
+ import { ref } from 'vue';
3
3
 
4
4
  import WtIcon from '../../../components/wt-icon/wt-icon.vue';
5
5
  import WtSwitcher from '../../../components/wt-switcher/wt-switcher.vue';
6
6
 
7
- const props = defineProps({
8
- namespace: {
9
- type: String,
10
- default: 'appearance',
11
- },
12
- });
13
-
14
7
  const emit = defineEmits([
15
8
  'changedMode',
16
9
  ]);
17
10
 
18
- // vuex's useStore() is just inject('store') under the hood (its default
19
- // injection key) — reading it directly avoids a hard dependency on the
20
- // `vuex` package, which apps that migrated fully to Pinia don't install.
21
- const store = inject('store', null);
22
-
23
11
  const mode = ref('light');
24
12
 
25
- const setThemeToStore = (theme) => {
26
- // @author @stanislav-kozak
27
- // when vuex store is not initialize and we use pinia
28
- if (!store) {
29
- return;
30
- }
31
-
32
- store.dispatch(`${props.namespace}/SET_THEME`, theme);
33
- };
34
-
35
13
  const setMode = (value) => {
36
14
  if (value === 'dark') {
37
15
  mode.value = 'dark';
@@ -43,7 +21,6 @@ const setMode = (value) => {
43
21
  localStorage.setItem('theme', 'light');
44
22
  }
45
23
  emit('changedMode', value);
46
- setThemeToStore(mode.value);
47
24
  };
48
25
 
49
26
  const toggleDarkMode = () => {
@@ -52,7 +29,6 @@ const toggleDarkMode = () => {
52
29
  } else {
53
30
  setMode('light');
54
31
  }
55
- setThemeToStore(mode.value);
56
32
  };
57
33
 
58
34
  const cachedTheme = localStorage.getItem('theme');