@dv.net/ui-kit 7.2.16 → 7.2.17

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 { createElementBlock as s, openBlock as o, createElementVNode as n, defineComponent as j, mergeModels as S, useModel as F, ref as b, computed as N, onMounted as A, createCommentVNode as y, createBlock as p, normalizeClass as z, renderSlot as q, Fragment as u, createVNode as d, createTextVNode as B, toDisplayString as g, capitalize as G, unref as r, withCtx as C, renderList as k, nextTick as J } from "vue";
1
+ import { createElementBlock as s, openBlock as l, createElementVNode as n, defineComponent as j, mergeModels as S, useModel as F, ref as b, computed as N, onMounted as A, createCommentVNode as y, createBlock as c, normalizeClass as z, renderSlot as q, Fragment as d, createVNode as m, createTextVNode as B, toDisplayString as g, capitalize as G, unref as r, withCtx as C, renderList as k, nextTick as J } from "vue";
2
2
  import { _ as U } from "./UiFlagIcon.vue_vue_type_script_setup_true_lang-BEuyocgZ.js";
3
3
  /* empty css */
4
4
  import { _ as w } from "./UiLanguageButton.vue_vue_type_script_setup_true_lang-DiW2yYu5.js";
@@ -40,7 +40,7 @@ const X = {
40
40
  viewBox: "0 0 20 20"
41
41
  };
42
42
  function Y(v, f) {
43
- return o(), s("svg", X, [...f[0] || (f[0] = [
43
+ return l(), s("svg", X, [...f[0] || (f[0] = [
44
44
  n("path", {
45
45
  stroke: "#717173",
46
46
  "stroke-linecap": "round",
@@ -75,86 +75,88 @@ const E = { render: Y }, Z = { class: "ui-languages" }, x = ["disabled"], ee = {
75
75
  }),
76
76
  emits: /* @__PURE__ */ S(["change"], ["update:modelValue", "update:is-show"]),
77
77
  setup(v, { emit: f }) {
78
- const I = f, H = v, t = F(v, "modelValue"), m = F(v, "is-show"), { isMobile: R } = Q(), i = b(""), V = b(), $ = b([]), h = N(() => [
78
+ const I = f, $ = v, t = F(v, "modelValue"), u = F(v, "is-show"), { isMobile: R } = Q(), i = b(""), V = b(), H = b([]), h = N(() => [
79
79
  { id: 2, name: "English", isoCode: "en", nativeName: "English" },
80
- ...$.value,
80
+ ...H.value,
81
81
  t.value
82
- ].filter((e, l, a) => l === a.findIndex((T) => T.isoCode === e.isoCode))), M = N(() => H.locales.toSorted((e, l) => e.name.localeCompare(l.name))), c = N(() => i.value ? M.value.filter(
82
+ ].filter((e, o, a) => o === a.findIndex((T) => T.isoCode === e.isoCode))), M = N(() => $.locales.toSorted((e, o) => e.name.localeCompare(o.name))), p = N(() => i.value ? M.value.filter(
83
83
  (e) => e.name.toLocaleLowerCase().includes(i.value.toLocaleLowerCase()) || e.nativeName?.toLocaleLowerCase().includes(i.value.toLocaleLowerCase())
84
84
  ) : M.value);
85
85
  function _(e) {
86
- t.value = e, m.value = !1, i.value = "", I("change", e);
86
+ t.value = e, u.value = !1, i.value = "", I("change", e);
87
87
  }
88
88
  function P() {
89
- m.value = !0, J(() => {
89
+ u.value = !0, J(() => {
90
90
  V.value?.focus();
91
91
  });
92
92
  }
93
93
  return A(() => {
94
- const e = navigator.languages.slice(0, 2).map((l) => l.split("-")[0]);
95
- $.value = H.locales.filter(({ isoCode: l }) => e.includes(l));
96
- }), (e, l) => (o(), s("div", Z, [
97
- e.isHidden ? y("", !0) : (o(), s("button", {
94
+ const e = navigator.languages.slice(0, 2).map((o) => o.split("-")[0]);
95
+ H.value = $.locales.filter(({ isoCode: o }) => e.includes(o));
96
+ }), (e, o) => (l(), s("div", Z, [
97
+ e.isHidden ? y("", !0) : (l(), s("button", {
98
98
  key: 0,
99
99
  disabled: e.disabled,
100
100
  class: z([{ "for-header": e.forHeader }, "ui-languages--trigger"]),
101
101
  onClick: P
102
102
  }, [
103
103
  q(e.$slots, "trigger", { locale: t.value }, () => [
104
- e.forHeader ? (o(), s(u, { key: 0 }, [
105
- d(U, {
104
+ e.forHeader ? (l(), s(d, { key: 0 }, [
105
+ m(U, {
106
106
  isoCode: t.value?.isoCode ?? "",
107
107
  "is-small": ""
108
108
  }, null, 8, ["isoCode"]),
109
109
  B(" " + g(G(t.value?.isoCode ?? "")), 1)
110
- ], 64)) : (o(), s(u, { key: 1 }, [
111
- d(U, {
110
+ ], 64)) : (l(), s(d, { key: 1 }, [
111
+ m(U, {
112
112
  isoCode: t.value?.isoCode ?? ""
113
113
  }, null, 8, ["isoCode"]),
114
114
  B(" " + g(t.value?.name) + " ", 1),
115
- t.value?.nativeName ? (o(), s(u, { key: 0 }, [
115
+ t.value?.nativeName ? (l(), s(d, { key: 0 }, [
116
116
  B("(" + g(t.value?.nativeName) + ")", 1)
117
117
  ], 64)) : y("", !0)
118
118
  ], 64))
119
119
  ])
120
120
  ], 10, x)),
121
- r(R) ? (o(), p(r(O), {
121
+ r(R) ? (l(), c(r(O), {
122
122
  key: 2,
123
123
  class: "ui-languages--drawer",
124
124
  direction: "btt",
125
- modelValue: m.value,
126
- "onUpdate:modelValue": l[4] || (l[4] = (a) => m.value = a)
125
+ modelValue: u.value,
126
+ "onUpdate:modelValue": o[5] || (o[5] = (a) => u.value = a)
127
127
  }, {
128
128
  default: C(() => [
129
129
  n("div", te, [
130
130
  n("div", re, [
131
131
  n("p", null, g(r(L).uiLanguages.translations.changeLanguage), 1),
132
- d(r(K), {
132
+ m(r(K), {
133
+ style: { cursor: "pointer" },
133
134
  name: "close",
134
135
  type: "400",
135
- size: "lg"
136
+ size: "lg",
137
+ onClick: o[3] || (o[3] = (a) => u.value = !1)
136
138
  })
137
139
  ]),
138
140
  n("div", ie, [
139
- d(r(D), {
141
+ m(r(D), {
140
142
  ref_key: "inputRef",
141
143
  ref: V,
142
144
  autofocus: "",
143
145
  size: "sm",
144
146
  modelValue: i.value,
145
- "onUpdate:modelValue": l[3] || (l[3] = (a) => i.value = a),
147
+ "onUpdate:modelValue": o[4] || (o[4] = (a) => i.value = a),
146
148
  clearable: "",
147
149
  placeholder: r(L).uiLanguages.translations.searchInputPlaceholder
148
150
  }, {
149
151
  prepend: C(() => [
150
- d(r(E))
152
+ m(r(E))
151
153
  ]),
152
154
  _: 1
153
155
  }, 8, ["modelValue", "placeholder"])
154
156
  ]),
155
157
  n("div", ne, [
156
- h.value?.length && c.value.length >= e.minNumbersLocalesDisplayFavorites ? (o(), s("div", ue, [
157
- (o(!0), s(u, null, k(h.value, (a) => (o(), p(w, {
158
+ h.value?.length && p.value.length >= e.minNumbersLocalesDisplayFavorites ? (l(), s("div", ue, [
159
+ (l(!0), s(d, null, k(h.value, (a) => (l(), c(w, {
158
160
  key: a.id,
159
161
  locale: a,
160
162
  onChange: _,
@@ -162,7 +164,7 @@ const E = { render: Y }, Z = { class: "ui-languages" }, x = ["disabled"], ee = {
162
164
  "for-header": e.forHeader
163
165
  }, null, 8, ["locale", "selected", "for-header"]))), 128))
164
166
  ])) : y("", !0),
165
- (o(!0), s(u, null, k(c.value, (a) => (o(), p(w, {
167
+ (l(!0), s(d, null, k(p.value, (a) => (l(), c(w, {
166
168
  key: a.id,
167
169
  locale: a,
168
170
  onChange: _,
@@ -173,37 +175,37 @@ const E = { render: Y }, Z = { class: "ui-languages" }, x = ["disabled"], ee = {
173
175
  ])
174
176
  ]),
175
177
  _: 1
176
- }, 8, ["modelValue"])) : (o(), p(r(W), {
178
+ }, 8, ["modelValue"])) : (l(), c(r(W), {
177
179
  key: 1,
178
- onClose: l[1] || (l[1] = (a) => i.value = ""),
179
- modelValue: m.value,
180
- "onUpdate:modelValue": l[2] || (l[2] = (a) => m.value = a),
180
+ onClose: o[1] || (o[1] = (a) => i.value = ""),
181
+ modelValue: u.value,
182
+ "onUpdate:modelValue": o[2] || (o[2] = (a) => u.value = a),
181
183
  isShowBtnClose: !1,
182
184
  popperClass: "transparent-bg"
183
185
  }, {
184
186
  default: C(() => [
185
187
  n("div", ee, [
186
188
  n("div", ae, [
187
- d(r(D), {
189
+ m(r(D), {
188
190
  ref_key: "inputRef",
189
191
  ref: V,
190
192
  autofocus: "",
191
193
  size: "sm",
192
194
  modelValue: i.value,
193
- "onUpdate:modelValue": l[0] || (l[0] = (a) => i.value = a),
195
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => i.value = a),
194
196
  placeholder: r(L).uiLanguages.translations.searchInputPlaceholder
195
197
  }, {
196
198
  prepend: C(() => [
197
- d(r(E))
199
+ m(r(E))
198
200
  ]),
199
201
  _: 1
200
202
  }, 8, ["modelValue", "placeholder"])
201
203
  ]),
202
204
  n("div", {
203
- class: z(["ui-languages--modal__items", { "is-empty": !c.value.length }])
205
+ class: z(["ui-languages--modal__items", { "is-empty": !p.value.length }])
204
206
  }, [
205
- h.value?.length && c.value.length >= e.minNumbersLocalesDisplayFavorites ? (o(), s("div", oe, [
206
- (o(!0), s(u, null, k(h.value, (a) => (o(), p(w, {
207
+ h.value?.length && p.value.length >= e.minNumbersLocalesDisplayFavorites ? (l(), s("div", oe, [
208
+ (l(!0), s(d, null, k(h.value, (a) => (l(), c(w, {
207
209
  key: a.id,
208
210
  locale: a,
209
211
  onChange: _,
@@ -211,15 +213,15 @@ const E = { render: Y }, Z = { class: "ui-languages" }, x = ["disabled"], ee = {
211
213
  "for-header": e.forHeader
212
214
  }, null, 8, ["locale", "selected", "for-header"]))), 128))
213
215
  ])) : y("", !0),
214
- c.value.length ? (o(), s("div", le, [
215
- (o(!0), s(u, null, k(c.value, (a) => (o(), p(w, {
216
+ p.value.length ? (l(), s("div", le, [
217
+ (l(!0), s(d, null, k(p.value, (a) => (l(), c(w, {
216
218
  key: a.id,
217
219
  locale: a,
218
220
  onChange: _,
219
221
  selected: t.value,
220
222
  "for-header": e.forHeader
221
223
  }, null, 8, ["locale", "selected", "for-header"]))), 128))
222
- ])) : (o(), s("div", se, g(r(L).uiLanguages.translations.modalSearchNotFound), 1))
224
+ ])) : (l(), s("div", se, g(r(L).uiLanguages.translations.modalSearchNotFound), 1))
223
225
  ], 2)
224
226
  ])
225
227
  ]),
@@ -1,4 +1,4 @@
1
- import { _ as m } from "../../chunks/UiLanguages.vue_vue_type_script_setup_true_lang-QqSP4uO3.js";
1
+ import { _ as m } from "../../chunks/UiLanguages.vue_vue_type_script_setup_true_lang-DU6Q9NU9.js";
2
2
  import "../../chunks/style-CD0jFgS4.js";
3
3
  export {
4
4
  m as default
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ import { _ as ro } from "./chunks/UiIcon.vue_vue_type_script_setup_true_lang-CP1
27
27
  /* empty css */
28
28
  import { _ as ao } from "./chunks/UiIconButton.vue_vue_type_script_setup_true_lang-yQR_GeIn.js";
29
29
  import { _ as io } from "./chunks/UiInput.vue_vue_type_script_setup_true_lang-DHWi8SLq.js";
30
- import { _ as mo } from "./chunks/UiLanguages.vue_vue_type_script_setup_true_lang-QqSP4uO3.js";
30
+ import { _ as mo } from "./chunks/UiLanguages.vue_vue_type_script_setup_true_lang-DU6Q9NU9.js";
31
31
  import { _ as so } from "./chunks/UiLayout.vue_vue_type_script_setup_true_lang-CELUDfDH.js";
32
32
  /* empty css */
33
33
  import { default as Uo } from "./components/UiLayoutAuth/UiLayoutAuth.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dv.net/ui-kit",
3
3
  "private": false,
4
- "version": "7.2.16",
4
+ "version": "7.2.17",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "module": "dist/index.js",