@dskripchenko/ui 1.6.0 → 1.6.1
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.
- package/dist/components/Stat/UidStat.vue.d.ts +3 -0
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +12 -9
- package/dist/locales/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -874,6 +874,7 @@ var it = ["for"], at = {
|
|
|
874
874
|
]]) }, [e.dot ? s("", !0) : A(t.$slots, "default", { key: 0 })], 2));
|
|
875
875
|
}
|
|
876
876
|
}), nn = {
|
|
877
|
+
code: "ru-RU",
|
|
877
878
|
common: {
|
|
878
879
|
clear: "Очистить",
|
|
879
880
|
close: "Закрыть",
|
|
@@ -6255,14 +6256,15 @@ var Cc = {
|
|
|
6255
6256
|
variant: { default: "card" },
|
|
6256
6257
|
icon: {},
|
|
6257
6258
|
loading: { type: Boolean },
|
|
6258
|
-
footer: {}
|
|
6259
|
+
footer: {},
|
|
6260
|
+
locale: { default: void 0 }
|
|
6259
6261
|
},
|
|
6260
6262
|
setup(t) {
|
|
6261
|
-
let n = t, r = a(() => n.value === void 0 ? "" : n.formatter ? n.formatter(n.value) : typeof n.value == "number" ? n.value.toLocaleString(
|
|
6263
|
+
let n = t, r = $(), i = a(() => n.locale ?? r.value.code ?? "ru-RU"), d = a(() => n.value === void 0 ? "" : n.formatter ? n.formatter(n.value) : typeof n.value == "number" ? n.value.toLocaleString(i.value, {
|
|
6262
6264
|
minimumFractionDigits: n.precision,
|
|
6263
6265
|
maximumFractionDigits: n.precision
|
|
6264
|
-
}) : String(n.value)),
|
|
6265
|
-
return (n,
|
|
6266
|
+
}) : String(n.value)), f = a(() => n.trend === void 0 ? null : n.trend > 0 ? "up" : n.trend < 0 ? "down" : "flat"), p = a(() => f.value === "up" ? ne : f.value === "down" ? te : null), m = a(() => n.trend === void 0 ? "" : `${Math.abs(n.trend).toLocaleString(i.value, { maximumFractionDigits: 2 })}${n.trendSuffix}`);
|
|
6267
|
+
return (n, r) => (T(), c("div", { class: y(["uid-stat", [
|
|
6266
6268
|
`uid-stat--${t.tone}`,
|
|
6267
6269
|
t.variant === "ghost" && "uid-stat--ghost",
|
|
6268
6270
|
t.loading && "uid-stat--loading"
|
|
@@ -6274,16 +6276,16 @@ var Cc = {
|
|
|
6274
6276
|
t.title ? (T(), c("p", Qc, P(t.title), 1)) : s("", !0),
|
|
6275
6277
|
l("div", $c, [l("span", el, [A(n.$slots, "value", {}, () => [
|
|
6276
6278
|
t.prefix ? (T(), c("span", tl, P(t.prefix), 1)) : s("", !0),
|
|
6277
|
-
l("span", null, P(
|
|
6279
|
+
l("span", null, P(d.value), 1),
|
|
6278
6280
|
t.suffix ? (T(), c("span", nl, P(t.suffix), 1)) : s("", !0)
|
|
6279
6281
|
])]), t.trend !== void 0 || n.$slots.trend ? (T(), c("span", {
|
|
6280
6282
|
key: 0,
|
|
6281
|
-
class: y(["uid-stat__trend",
|
|
6282
|
-
}, [A(n.$slots, "trend", {}, () => [
|
|
6283
|
+
class: y(["uid-stat__trend", f.value && `uid-stat__trend--${f.value}`])
|
|
6284
|
+
}, [A(n.$slots, "trend", {}, () => [p.value ? (T(), o(e, {
|
|
6283
6285
|
key: 0,
|
|
6284
|
-
icon:
|
|
6286
|
+
icon: p.value,
|
|
6285
6287
|
size: 12
|
|
6286
|
-
}, null, 8, ["icon"])) : s("", !0), l("span", null, P(
|
|
6288
|
+
}, null, 8, ["icon"])) : s("", !0), l("span", null, P(m.value), 1)])], 2)) : s("", !0)]),
|
|
6287
6289
|
t.footer || n.$slots.footer ? (T(), c("p", rl, [A(n.$slots, "footer", {}, () => [u(P(t.footer), 1)])])) : s("", !0)
|
|
6288
6290
|
])], 2));
|
|
6289
6291
|
}
|
|
@@ -9089,6 +9091,7 @@ var wp = { class: "uid-layout-sidebar__sidebar" }, Tp = { class: "uid-layout-sid
|
|
|
9089
9091
|
return on(a(() => t.locale)), (e, t) => A(e.$slots, "default");
|
|
9090
9092
|
}
|
|
9091
9093
|
}), Hp = {
|
|
9094
|
+
code: "en-US",
|
|
9092
9095
|
common: {
|
|
9093
9096
|
clear: "Clear",
|
|
9094
9097
|
close: "Close",
|
package/dist/locales/types.d.ts
CHANGED