mhz-ui 1.4.30 → 1.4.31
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/UiCalendar/UiCalendar.js +3 -2
- package/dist/UiChart/UiChart.js +12 -8
- package/dist/UiCheckbox/UiCheckbox.js +3 -1
- package/dist/UiDate/UiDate.css +1 -0
- package/dist/UiDate/UiDate.d.ts +17 -0
- package/dist/UiDate/UiDate.js +198 -0
- package/dist/UiEditor/UiEditor.js +3 -1
- package/dist/UiFlex/UiFlex.css +1 -1
- package/dist/UiFlex/UiFlex.js +2 -44
- package/dist/UiFlex-Bmfq0xaC.js +44 -0
- package/dist/UiModal/UiModal.js +1 -1
- package/dist/UiPagination/UiPagination.js +1 -1
- package/dist/UiSearch/UiSearch.js +6 -6
- package/dist/UiSelect/UiSelect.js +9 -8
- package/dist/UiTable/UiTable.d.ts +4 -1
- package/dist/UiTable/UiTable.js +75 -45
- package/dist/UiTooltip/UiTooltip.css +1 -0
- package/dist/UiTooltip/UiTooltip.d.ts +23 -0
- package/dist/UiTooltip/UiTooltip.js +53 -0
- package/dist/UiUpload/UiUpload.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/locales/index.d.ts +6 -0
- package/dist/{locales-CsU1R1Is.js → locales-CTOQaSjK.js} +50 -2
- package/package.json +15 -15
|
@@ -45,10 +45,11 @@ var _ = ["onClick", "data-choose"], v = ["onClick"], y = /*#__PURE__*/ e(/* @__P
|
|
|
45
45
|
return s;
|
|
46
46
|
});
|
|
47
47
|
function O() {
|
|
48
|
-
|
|
48
|
+
let e = {
|
|
49
49
|
dateFrom: D.value[0],
|
|
50
50
|
dateTo: new Date(D.value.at(-1)?.setHours(23, 59, 59))
|
|
51
|
-
}
|
|
51
|
+
};
|
|
52
|
+
b("update", e);
|
|
52
53
|
}
|
|
53
54
|
function k(e) {
|
|
54
55
|
return y.events.filter((t) => {
|
package/dist/UiChart/UiChart.js
CHANGED
|
@@ -5858,13 +5858,15 @@ var zs = {
|
|
|
5858
5858
|
if (isNaN(p) || p <= 0 || isNaN(m) || m < 0) return;
|
|
5859
5859
|
r.save();
|
|
5860
5860
|
let i = P(n.lineWidth, 1);
|
|
5861
|
-
if (r.fillStyle = P(n.fillStyle, o), r.lineCap = P(n.lineCap, "butt"), r.lineDashOffset = P(n.lineDashOffset, 0), r.lineJoin = P(n.lineJoin, "miter"), r.lineWidth = i, r.strokeStyle = P(n.strokeStyle, o), r.setLineDash(P(n.lineDash, [])), a.usePointStyle)
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5861
|
+
if (r.fillStyle = P(n.fillStyle, o), r.lineCap = P(n.lineCap, "butt"), r.lineDashOffset = P(n.lineDashOffset, 0), r.lineJoin = P(n.lineJoin, "miter"), r.lineWidth = i, r.strokeStyle = P(n.strokeStyle, o), r.setLineDash(P(n.lineDash, [])), a.usePointStyle) {
|
|
5862
|
+
let o = {
|
|
5863
|
+
radius: m * Math.SQRT2 / 2,
|
|
5864
|
+
pointStyle: n.pointStyle,
|
|
5865
|
+
rotation: n.rotation,
|
|
5866
|
+
borderWidth: i
|
|
5867
|
+
}, c = s.xPlus(e, p / 2), l = t + d;
|
|
5868
|
+
pn(r, o, c, l, a.pointStyleWidth && p);
|
|
5869
|
+
} else {
|
|
5868
5870
|
let a = t + Math.max((u - m) / 2, 0), o = s.leftForLtr(e, p), c = An(n.borderRadius);
|
|
5869
5871
|
r.beginPath(), Object.values(c).some((e) => e !== 0) ? Cn(r, {
|
|
5870
5872
|
x: o,
|
|
@@ -5894,7 +5896,9 @@ var zs = {
|
|
|
5894
5896
|
this.legendItems.forEach((o, u) => {
|
|
5895
5897
|
r.strokeStyle = o.fontColor, r.fillStyle = o.fontColor;
|
|
5896
5898
|
let m = r.measureText(o.text).width, h = s.textAlign(o.textAlign ||= a.textAlign), x = p + d + m, S = f.x, C = f.y;
|
|
5897
|
-
|
|
5899
|
+
s.setWidth(this.width), v ? u > 0 && S + x + l > this.right && (C = f.y += b, f.line++, S = f.x = W(i, this.left + l, this.right - n[f.line])) : u > 0 && C + b > this.bottom && (S = f.x = S + t[f.line].width + l, f.line++, C = f.y = W(i, this.top + y + l, this.bottom - t[f.line].height));
|
|
5900
|
+
let w = s.x(S);
|
|
5901
|
+
if (g(w, C, o), S = Ft(h, S + p + d, v ? S + x : this.right, e.rtl), _(s.x(S), C, o), v) f.x += x + l;
|
|
5898
5902
|
else if (typeof o.text != "string") {
|
|
5899
5903
|
let e = c.lineHeight;
|
|
5900
5904
|
f.y += Ks(o, e) + l;
|
|
@@ -44,7 +44,9 @@ var d = ["data-disabled", "data-switcher"], f = [
|
|
|
44
44
|
setup(e, { emit: i }) {
|
|
45
45
|
let m = e, h = i, g = s();
|
|
46
46
|
function _() {
|
|
47
|
-
|
|
47
|
+
if (!g.value) return;
|
|
48
|
+
let e = g.value.checked ? m.initialValue || !0 : !1;
|
|
49
|
+
h("update:modelValue", e);
|
|
48
50
|
}
|
|
49
51
|
return (e, i) => (o(), n("label", {
|
|
50
52
|
onClick: i[1] ||= u(() => {}, ["stop"]),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._inputBlock_1sbfv_1{border-radius:16px;width:100%;display:flex;position:relative}._input_1sbfv_1{background-color:var(--color-transparent);border:1px solid var(--color-gray);border-radius:16px;outline:none;width:100%;height:40px;padding:0 44px 0 16px;font-size:1rem}._input_1sbfv_1:hover{border-color:var(--color-gray-dark-extra)}._input_1sbfv_1:focus{border-color:var(--color-primary)}._input_1sbfv_1:disabled{color:var(--color-gray-dark-extra);background-color:var(--color-gray-light-extra);border-color:var(--color-transparent)}._input_1sbfv_1::placeholder{color:var(--color-gray-dark-extra)}._icon_1sbfv_33{width:20px;height:20px;color:var(--color-gray-dark-extra);cursor:pointer;fill:currentColor;position:absolute;top:50%;right:12px;transform:translateY(-50%)}._inputBlock_1sbfv_1:has(._input_1sbfv_1:focus) ._icon_1sbfv_33{color:var(--color-primary)}._calendar_1sbfv_49{z-index:10;background-color:var(--color-white);border:1px solid var(--color-gray);border-radius:16px;width:100%;min-width:280px;padding:16px;position:absolute;top:calc(100% + 4px);left:0}._calendarHeader_1sbfv_62{justify-content:space-between;align-items:center;gap:8px;display:flex}._calendarSelects_1sbfv_69{gap:8px;display:flex}._calendarSelect_1sbfv_69{background-color:var(--color-transparent);border:1px solid var(--color-gray);border-radius:8px;height:32px;padding:0 8px;font-size:.875rem}._calendarButton_1sbfv_83{width:32px;height:32px;color:var(--color-gray-dark);cursor:pointer;background-color:var(--color-transparent);border:1px solid var(--color-gray);border-radius:8px;justify-content:center;align-items:center;font-size:1.25rem;display:flex}._calendarButton_1sbfv_83:hover{color:var(--color-primary);border-color:var(--color-primary)}._calendarGrid_1sbfv_101{grid-template-columns:repeat(7,1fr);gap:4px;display:grid}._dayName_1sbfv_107{color:var(--color-gray-dark-extra);text-align:center;padding:4px 0;font-size:.875rem}._day_1sbfv_107{cursor:pointer;border-radius:8px;justify-content:center;align-items:center;height:32px;font-size:.875rem;display:flex}._day_1sbfv_107:hover:not(._daySelected_1sbfv_123){background-color:var(--color-gray-light-extra)}._dayOther_1sbfv_127{color:var(--color-gray-dark-extra)}._daySelected_1sbfv_123{color:var(--color-white);background-color:var(--color-primary)}.dark ._input_1sbfv_1,.dark ._calendar_1sbfv_49{background-color:var(--color-gray-dark);border-color:var(--color-gray-dark-extra)}dialog{overflow:visible}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TLocale } from '../locales/types';
|
|
2
|
+
interface IProps {
|
|
3
|
+
modelValue?: string | null;
|
|
4
|
+
isDisabled?: boolean;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
lang?: TLocale;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<IProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: string) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<IProps> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
placeholder: string;
|
|
14
|
+
modelValue: string | null;
|
|
15
|
+
lang: TLocale;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import "./UiDate.css";
|
|
2
|
+
import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
+
import { t } from "../UiFlex-Bmfq0xaC.js";
|
|
4
|
+
import { t as n } from "../locales-CTOQaSjK.js";
|
|
5
|
+
import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, mergeProps as u, normalizeClass as d, onBeforeUnmount as f, onMounted as ee, openBlock as p, ref as m, renderList as h, toDisplayString as g, unref as _, watch as v, withCtx as y } from "vue";
|
|
6
|
+
//#region src/components/UiDate/UiDate.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var b = [
|
|
8
|
+
"value",
|
|
9
|
+
"disabled",
|
|
10
|
+
"placeholder",
|
|
11
|
+
"lang"
|
|
12
|
+
], x = ["value"], S = ["value"], C = ["value"], w = ["value"], T = [
|
|
13
|
+
"data-current-month",
|
|
14
|
+
"data-selected",
|
|
15
|
+
"onClick"
|
|
16
|
+
], E = /*#__PURE__*/ e(/* @__PURE__ */ l({
|
|
17
|
+
inheritAttrs: !1,
|
|
18
|
+
__name: "UiDate",
|
|
19
|
+
props: {
|
|
20
|
+
modelValue: { default: "" },
|
|
21
|
+
isDisabled: { type: Boolean },
|
|
22
|
+
placeholder: { default: "" },
|
|
23
|
+
lang: { default: "ru" }
|
|
24
|
+
},
|
|
25
|
+
emits: ["update:modelValue"],
|
|
26
|
+
setup(e, { emit: l, attrs: E }) {
|
|
27
|
+
let D = e, O = l, k = m(null), A = m(""), j = m(!1), M = m(/* @__PURE__ */ new Date()), N = {
|
|
28
|
+
ru: /^(\d{2})\.(\d{2})\.(\d{4})$/,
|
|
29
|
+
en: /^(\d{2})\/(\d{2})\/(\d{4})$/
|
|
30
|
+
}, P = (/* @__PURE__ */ new Date()).getFullYear(), F = Array.from({ length: 101 }, (e, t) => P - 50 + t), I = i(() => D.placeholder || n[D.lang].datePlaceholder), L = i(() => A.value ? A.value : X(D.modelValue)), R = i(() => D.modelValue && /^\d{4}-\d{2}-\d{2}$/.test(D.modelValue) ? D.modelValue : ""), z = i(() => {
|
|
31
|
+
let e = M.value.getFullYear(), t = M.value.getMonth(), n = new Date(e, t, 1).getDay(), r = n === 0 ? 6 : n - 1, i = [];
|
|
32
|
+
for (let n = 0; n < 42; n += 1) {
|
|
33
|
+
let a = new Date(e, t, 1 - r + n);
|
|
34
|
+
i.push({
|
|
35
|
+
date: a,
|
|
36
|
+
isCurrentMonth: a.getMonth() === t,
|
|
37
|
+
isSelected: $(a) === R.value
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return i;
|
|
41
|
+
});
|
|
42
|
+
v(() => D.modelValue, (e) => {
|
|
43
|
+
Y(e);
|
|
44
|
+
}, { immediate: !0 }), ee(() => {
|
|
45
|
+
document.addEventListener("click", J);
|
|
46
|
+
}), f(() => {
|
|
47
|
+
document.removeEventListener("click", J);
|
|
48
|
+
});
|
|
49
|
+
function B(e) {
|
|
50
|
+
let t = e.target.value;
|
|
51
|
+
A.value = t;
|
|
52
|
+
let n = Q(t, D.lang);
|
|
53
|
+
n !== void 0 && O("update:modelValue", n);
|
|
54
|
+
}
|
|
55
|
+
function V() {
|
|
56
|
+
let e = Q(A.value, D.lang);
|
|
57
|
+
e !== void 0 && O("update:modelValue", e), A.value = "";
|
|
58
|
+
}
|
|
59
|
+
function H() {
|
|
60
|
+
D.isDisabled || (j.value = !j.value);
|
|
61
|
+
}
|
|
62
|
+
function U(e) {
|
|
63
|
+
let t = Number(e.target.value);
|
|
64
|
+
M.value = new Date(M.value.getFullYear(), t, 1);
|
|
65
|
+
}
|
|
66
|
+
function W(e) {
|
|
67
|
+
let t = Number(e.target.value);
|
|
68
|
+
M.value = new Date(t, M.value.getMonth(), 1);
|
|
69
|
+
}
|
|
70
|
+
function G() {
|
|
71
|
+
M.value = new Date(M.value.getFullYear(), M.value.getMonth() - 1, 1);
|
|
72
|
+
}
|
|
73
|
+
function K() {
|
|
74
|
+
M.value = new Date(M.value.getFullYear(), M.value.getMonth() + 1, 1);
|
|
75
|
+
}
|
|
76
|
+
function q(e) {
|
|
77
|
+
let t = $(e);
|
|
78
|
+
O("update:modelValue", t), A.value = "", j.value = !1;
|
|
79
|
+
}
|
|
80
|
+
function J(e) {
|
|
81
|
+
k.value?.contains(e.target) || (j.value = !1);
|
|
82
|
+
}
|
|
83
|
+
function Y(e) {
|
|
84
|
+
if (!e) {
|
|
85
|
+
M.value = /* @__PURE__ */ new Date();
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
let [t, n, r] = e.split("-").map(Number);
|
|
89
|
+
t && n && r && (M.value = new Date(t, n - 1, r));
|
|
90
|
+
}
|
|
91
|
+
function X(e) {
|
|
92
|
+
return e ? Z(e, D.lang) : "";
|
|
93
|
+
}
|
|
94
|
+
function Z(e, t) {
|
|
95
|
+
let [n, r, i] = e.split("-");
|
|
96
|
+
return !n || !r || !i ? e : t === "en" ? `${r}/${i}/${n}` : `${i}.${r}.${n}`;
|
|
97
|
+
}
|
|
98
|
+
function Q(e, t) {
|
|
99
|
+
let n = N[t].exec(e);
|
|
100
|
+
if (!n) return;
|
|
101
|
+
let [, r, i, a] = n, o = t === "en", s = Number(o ? i : r), c = Number(o ? r : i), l = Number(a), u = new Date(l, c - 1, s);
|
|
102
|
+
if (!(u.getFullYear() !== l || u.getMonth() !== c - 1 || u.getDate() !== s)) return `${l}-${String(c).padStart(2, "0")}-${String(s).padStart(2, "0")}`;
|
|
103
|
+
}
|
|
104
|
+
function $(e) {
|
|
105
|
+
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
106
|
+
}
|
|
107
|
+
return (e, i) => (p(), o("div", {
|
|
108
|
+
ref_key: "inputBlockRef",
|
|
109
|
+
ref: k,
|
|
110
|
+
class: d(e.$style.inputBlock)
|
|
111
|
+
}, [
|
|
112
|
+
s("input", u({
|
|
113
|
+
value: L.value,
|
|
114
|
+
type: "text",
|
|
115
|
+
inputmode: "numeric",
|
|
116
|
+
disabled: D.isDisabled,
|
|
117
|
+
class: e.$style.input,
|
|
118
|
+
placeholder: I.value,
|
|
119
|
+
maxlength: "10",
|
|
120
|
+
lang: D.lang
|
|
121
|
+
}, E, {
|
|
122
|
+
onInput: B,
|
|
123
|
+
onBlur: V
|
|
124
|
+
}), null, 16, b),
|
|
125
|
+
(p(), o("svg", {
|
|
126
|
+
class: d(e.$style.icon),
|
|
127
|
+
viewBox: "0 0 24 24",
|
|
128
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
129
|
+
onClick: H
|
|
130
|
+
}, [...i[0] ||= [s("path", { d: "M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14\n c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM9 14H7v-2h2v2\n zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2\n zm4 0h-2v-2h2v2z" }, null, -1)]], 2)),
|
|
131
|
+
j.value ? (p(), o("div", {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: d(e.$style.calendar)
|
|
134
|
+
}, [c(t, {
|
|
135
|
+
column: "",
|
|
136
|
+
gap: "12"
|
|
137
|
+
}, {
|
|
138
|
+
default: y(() => [s("div", { class: d(e.$style.calendarHeader) }, [
|
|
139
|
+
s("button", {
|
|
140
|
+
type: "button",
|
|
141
|
+
class: d(e.$style.calendarButton),
|
|
142
|
+
onClick: G
|
|
143
|
+
}, "<", 2),
|
|
144
|
+
s("div", { class: d(e.$style.calendarSelects) }, [s("select", {
|
|
145
|
+
class: d(e.$style.calendarSelect),
|
|
146
|
+
value: M.value.getMonth(),
|
|
147
|
+
onChange: U
|
|
148
|
+
}, [(p(!0), o(r, null, h(_(n)[D.lang].months, (e, t) => (p(), o("option", {
|
|
149
|
+
key: e,
|
|
150
|
+
value: t
|
|
151
|
+
}, g(e), 9, S))), 128))], 42, x), s("select", {
|
|
152
|
+
class: d(e.$style.calendarSelect),
|
|
153
|
+
value: M.value.getFullYear(),
|
|
154
|
+
onChange: W
|
|
155
|
+
}, [(p(!0), o(r, null, h(_(F), (e) => (p(), o("option", {
|
|
156
|
+
key: e,
|
|
157
|
+
value: e
|
|
158
|
+
}, g(e), 9, w))), 128))], 42, C)], 2),
|
|
159
|
+
s("button", {
|
|
160
|
+
type: "button",
|
|
161
|
+
class: d(e.$style.calendarButton),
|
|
162
|
+
onClick: K
|
|
163
|
+
}, ">", 2)
|
|
164
|
+
], 2), s("div", { class: d(e.$style.calendarGrid) }, [(p(!0), o(r, null, h(_(n)[D.lang].daysShort, (t) => (p(), o("div", {
|
|
165
|
+
key: t,
|
|
166
|
+
class: d(e.$style.dayName)
|
|
167
|
+
}, g(t), 3))), 128)), (p(!0), o(r, null, h(z.value, (t) => (p(), o("div", {
|
|
168
|
+
key: t.date.toISOString(),
|
|
169
|
+
class: d([
|
|
170
|
+
e.$style.day,
|
|
171
|
+
!t.isCurrentMonth && e.$style.dayOther,
|
|
172
|
+
t.isSelected && e.$style.daySelected
|
|
173
|
+
]),
|
|
174
|
+
"data-current-month": t.isCurrentMonth,
|
|
175
|
+
"data-selected": t.isSelected,
|
|
176
|
+
onClick: (e) => q(t.date)
|
|
177
|
+
}, g(t.date.getDate()), 11, T))), 128))], 2)]),
|
|
178
|
+
_: 1
|
|
179
|
+
})], 2)) : a("", !0)
|
|
180
|
+
], 2));
|
|
181
|
+
}
|
|
182
|
+
}), [["__cssModules", { $style: {
|
|
183
|
+
inputBlock: "_inputBlock_1sbfv_1",
|
|
184
|
+
input: "_input_1sbfv_1",
|
|
185
|
+
icon: "_icon_1sbfv_33",
|
|
186
|
+
calendar: "_calendar_1sbfv_49",
|
|
187
|
+
calendarHeader: "_calendarHeader_1sbfv_62",
|
|
188
|
+
calendarSelects: "_calendarSelects_1sbfv_69",
|
|
189
|
+
calendarSelect: "_calendarSelect_1sbfv_69",
|
|
190
|
+
calendarButton: "_calendarButton_1sbfv_83",
|
|
191
|
+
calendarGrid: "_calendarGrid_1sbfv_101",
|
|
192
|
+
dayName: "_dayName_1sbfv_107",
|
|
193
|
+
day: "_day_1sbfv_107",
|
|
194
|
+
daySelected: "_daySelected_1sbfv_123",
|
|
195
|
+
dayOther: "_dayOther_1sbfv_127"
|
|
196
|
+
} }]]);
|
|
197
|
+
//#endregion
|
|
198
|
+
export { E as default };
|
|
@@ -101,7 +101,9 @@ var p = ["onClick"], m = ["value"], h = /*#__PURE__*/ e(/* @__PURE__ */ i({
|
|
|
101
101
|
})) : (_.value && (y.value = _.value.innerHTML), v.value = !0);
|
|
102
102
|
}
|
|
103
103
|
function P(e) {
|
|
104
|
-
|
|
104
|
+
if (!v.value) return;
|
|
105
|
+
let t = e.target;
|
|
106
|
+
y.value = t.value, g("update:modelValue", y.value);
|
|
105
107
|
}
|
|
106
108
|
function F() {
|
|
107
109
|
if (!_.value) return;
|
package/dist/UiFlex/UiFlex.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._flex_qq3eu_1{flex-direction:var(--
|
|
1
|
+
._flex_qq3eu_1{flex-direction:var(--v02deb91f);flex-wrap:var(--e63f98ea);gap:var(--v123f8122);align-items:var(--v73a77efc);justify-content:var(--v79654b0a);display:flex}.dark ._flex_qq3eu_1{color:var(--color-white)}
|
package/dist/UiFlex/UiFlex.js
CHANGED
|
@@ -1,44 +1,2 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
import { computed as t, createBlock as n, defineComponent as r, normalizeClass as i, openBlock as a, renderSlot as o, resolveDynamicComponent as s, useCssVars as c, withCtx as l } from "vue";
|
|
4
|
-
var u = /*#__PURE__*/ e(/* @__PURE__ */ r({
|
|
5
|
-
__name: "UiFlex",
|
|
6
|
-
props: {
|
|
7
|
-
tag: { default: "div" },
|
|
8
|
-
column: { type: Boolean },
|
|
9
|
-
align: { default: "normal" },
|
|
10
|
-
justify: { default: "normal" },
|
|
11
|
-
wrap: { type: Boolean },
|
|
12
|
-
gap: { default: "8" }
|
|
13
|
-
},
|
|
14
|
-
setup(e) {
|
|
15
|
-
c((e) => ({
|
|
16
|
-
bd0c91ae: u.value,
|
|
17
|
-
v45af6241: p.value,
|
|
18
|
-
v78b561f9: m.value,
|
|
19
|
-
v0f8a4d32: d.value,
|
|
20
|
-
a3abe380: f.value
|
|
21
|
-
}));
|
|
22
|
-
let r = e, u = t(() => r.column ? "column" : "row"), d = t(() => r.align), f = t(() => r.justify), p = t(() => r.wrap ? "wrap" : "nowrap"), m = t(() => r.gap ? `${r.gap}px` : "0");
|
|
23
|
-
return (e, t) => (a(), n(s(r.tag), {
|
|
24
|
-
class: i(e.$style.flex),
|
|
25
|
-
"data-column": r.column,
|
|
26
|
-
"data-align": r.align,
|
|
27
|
-
"data-justify": r.justify,
|
|
28
|
-
"data-wrap": r.wrap,
|
|
29
|
-
"data-gap": r.gap
|
|
30
|
-
}, {
|
|
31
|
-
default: l(() => [o(e.$slots, "default")]),
|
|
32
|
-
_: 3
|
|
33
|
-
}, 8, [
|
|
34
|
-
"class",
|
|
35
|
-
"data-column",
|
|
36
|
-
"data-align",
|
|
37
|
-
"data-justify",
|
|
38
|
-
"data-wrap",
|
|
39
|
-
"data-gap"
|
|
40
|
-
]));
|
|
41
|
-
}
|
|
42
|
-
}), [["__cssModules", { $style: { flex: "_flex_qq3eu_1" } }]]);
|
|
43
|
-
//#endregion
|
|
44
|
-
export { u as default };
|
|
1
|
+
import { t as e } from "../UiFlex-Bmfq0xaC.js";
|
|
2
|
+
export { e as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import "./UiFlex/UiFlex.css";
|
|
2
|
+
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
+
import { computed as t, createBlock as n, defineComponent as r, normalizeClass as i, openBlock as a, renderSlot as o, resolveDynamicComponent as s, useCssVars as c, withCtx as l } from "vue";
|
|
4
|
+
var u = /*#__PURE__*/ e(/* @__PURE__ */ r({
|
|
5
|
+
__name: "UiFlex",
|
|
6
|
+
props: {
|
|
7
|
+
tag: { default: "div" },
|
|
8
|
+
column: { type: Boolean },
|
|
9
|
+
align: { default: "normal" },
|
|
10
|
+
justify: { default: "normal" },
|
|
11
|
+
wrap: { type: Boolean },
|
|
12
|
+
gap: { default: "8" }
|
|
13
|
+
},
|
|
14
|
+
setup(e) {
|
|
15
|
+
c((e) => ({
|
|
16
|
+
v02deb91f: u.value,
|
|
17
|
+
e63f98ea: p.value,
|
|
18
|
+
v123f8122: m.value,
|
|
19
|
+
v73a77efc: d.value,
|
|
20
|
+
v79654b0a: f.value
|
|
21
|
+
}));
|
|
22
|
+
let r = e, u = t(() => r.column ? "column" : "row"), d = t(() => r.align), f = t(() => r.justify), p = t(() => r.wrap ? "wrap" : "nowrap"), m = t(() => r.gap ? `${r.gap}px` : "0");
|
|
23
|
+
return (e, t) => (a(), n(s(r.tag), {
|
|
24
|
+
class: i(e.$style.flex),
|
|
25
|
+
"data-column": r.column,
|
|
26
|
+
"data-align": r.align,
|
|
27
|
+
"data-justify": r.justify,
|
|
28
|
+
"data-wrap": r.wrap,
|
|
29
|
+
"data-gap": r.gap
|
|
30
|
+
}, {
|
|
31
|
+
default: l(() => [o(e.$slots, "default")]),
|
|
32
|
+
_: 3
|
|
33
|
+
}, 8, [
|
|
34
|
+
"class",
|
|
35
|
+
"data-column",
|
|
36
|
+
"data-align",
|
|
37
|
+
"data-justify",
|
|
38
|
+
"data-wrap",
|
|
39
|
+
"data-gap"
|
|
40
|
+
]));
|
|
41
|
+
}
|
|
42
|
+
}), [["__cssModules", { $style: { flex: "_flex_qq3eu_1" } }]]);
|
|
43
|
+
//#endregion
|
|
44
|
+
export { u as t };
|
package/dist/UiModal/UiModal.js
CHANGED
|
@@ -2,7 +2,7 @@ import "./UiModal.css";
|
|
|
2
2
|
import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { t } from "../UiButton-D0BOZNZF.js";
|
|
4
4
|
import { t as n } from "../UiClose-CPrzLd_K.js";
|
|
5
|
-
import { t as r } from "../locales-
|
|
5
|
+
import { t as r } from "../locales-CTOQaSjK.js";
|
|
6
6
|
import { Teleport as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeProps as p, nextTick as m, normalizeClass as h, onMounted as g, openBlock as _, renderSlot as v, shallowRef as y, toDisplayString as b, unref as x, useCssVars as S, watch as C, withCtx as w, withModifiers as T } from "vue";
|
|
7
7
|
//#region src/components/UiModal/UiModal.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var E = ["data-scrollable"], D = /*#__PURE__*/ e(/* @__PURE__ */ f({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./UiPagination.css";
|
|
2
2
|
import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
-
import { t } from "../locales-
|
|
3
|
+
import { t } from "../locales-CTOQaSjK.js";
|
|
4
4
|
import { createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, toDisplayString as s, unref as c } from "vue";
|
|
5
5
|
//#region src/components/UiPagination/UiPagination.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var l = ["disabled"], u = ["disabled"], d = ["disabled"], f = ["disabled"], p = /*#__PURE__*/ e(/* @__PURE__ */ i({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./UiSearch.css";
|
|
2
2
|
import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
-
import { t } from "../
|
|
4
|
-
import { t as n } from "../
|
|
3
|
+
import { t } from "../locales-CTOQaSjK.js";
|
|
4
|
+
import { t as n } from "../UiInput-BCdtBzNw.js";
|
|
5
5
|
import { t as r } from "../dist-D_-3w5cA.js";
|
|
6
6
|
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, normalizeClass as p, openBlock as m, renderList as h, resolveDynamicComponent as g, shallowRef as _, toDisplayString as v, unref as y, withCtx as b, withKeys as x } from "vue";
|
|
7
7
|
import { RouterLink as S } from "vue-router";
|
|
@@ -88,7 +88,7 @@ var O = { render: D }, k = /*#__PURE__*/ e(/* @__PURE__ */ f({
|
|
|
88
88
|
class: p(r.$style.container),
|
|
89
89
|
ref_key: "containerElement",
|
|
90
90
|
ref: N
|
|
91
|
-
}, [d(
|
|
91
|
+
}, [d(n, {
|
|
92
92
|
modelValue: C.modelValue,
|
|
93
93
|
"onUpdate:modelValue": a[0] ||= async (e) => await y(D)(e.toString()),
|
|
94
94
|
onClick: k,
|
|
@@ -99,9 +99,9 @@ var O = { render: D }, k = /*#__PURE__*/ e(/* @__PURE__ */ f({
|
|
|
99
99
|
key: 0,
|
|
100
100
|
class: p(r.$style.results)
|
|
101
101
|
}, [
|
|
102
|
-
C.modelValue.length < 3 ? (m(), c(i, { key: 0 }, [u(v(y(
|
|
103
|
-
C.modelValue.length > 2 && !C.isSuccess ? (m(), c(i, { key: 1 }, [u(v(y(
|
|
104
|
-
C.modelValue.length > 2 && !M.value && C.isSuccess ? (m(), c(i, { key: 2 }, [u(v(y(
|
|
102
|
+
C.modelValue.length < 3 ? (m(), c(i, { key: 0 }, [u(v(y(t)[C.lang].enterMoreSymbols), 1)], 64)) : s("", !0),
|
|
103
|
+
C.modelValue.length > 2 && !C.isSuccess ? (m(), c(i, { key: 1 }, [u(v(y(t)[C.lang].loading), 1)], 64)) : s("", !0),
|
|
104
|
+
C.modelValue.length > 2 && !M.value && C.isSuccess ? (m(), c(i, { key: 2 }, [u(v(y(t)[C.lang].noResults), 1)], 64)) : s("", !0),
|
|
105
105
|
C.modelValue.length > 2 && M.value && C.isSuccess ? (m(!0), c(i, { key: 3 }, h(C.searchScheme, (t) => (m(), c("div", {
|
|
106
106
|
key: t.type,
|
|
107
107
|
class: p(r.$style.resultsInner)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./UiSelect.css";
|
|
2
2
|
import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
-
import { t } from "../
|
|
4
|
-
import { t as n } from "../
|
|
3
|
+
import { t } from "../locales-CTOQaSjK.js";
|
|
4
|
+
import { t as n } from "../UiInput-BCdtBzNw.js";
|
|
5
5
|
import { t as r } from "../dist-D_-3w5cA.js";
|
|
6
6
|
import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, ref as p, renderList as m, shallowRef as h, toDisplayString as g, unref as _, withKeys as v, withModifiers as y } from "vue";
|
|
7
7
|
//#region src/components/UiSelect/icons/closed.svg?component
|
|
@@ -89,7 +89,8 @@ var T = { render: w }, E = { key: 0 }, D = [
|
|
|
89
89
|
}, 100));
|
|
90
90
|
}
|
|
91
91
|
function q(e) {
|
|
92
|
-
|
|
92
|
+
let t = P.value ? e : e._id || e.title;
|
|
93
|
+
x("update:modelValue", t), G();
|
|
93
94
|
}
|
|
94
95
|
function J() {
|
|
95
96
|
!j.value || !M.value || j.value.getBoundingClientRect().y - M.value.getBoundingClientRect().y - M.value.scrollHeight + j.value.getBoundingClientRect().height > -100 && x("reachedBottom");
|
|
@@ -99,12 +100,12 @@ var T = { render: w }, E = { key: 0 }, D = [
|
|
|
99
100
|
ref_key: "containerElement",
|
|
100
101
|
ref: A
|
|
101
102
|
}, [c("div", { class: d(e.$style.input) }, [
|
|
102
|
-
l(
|
|
103
|
+
l(n, {
|
|
103
104
|
modelValue: L.value,
|
|
104
105
|
disabled: b.isDisabled,
|
|
105
106
|
onToggle: U,
|
|
106
107
|
mode: "select",
|
|
107
|
-
placeholder: _(
|
|
108
|
+
placeholder: _(t)[b.lang].choose,
|
|
108
109
|
appendIcon: w.value ? _(T) : _(S)
|
|
109
110
|
}, null, 8, [
|
|
110
111
|
"modelValue",
|
|
@@ -112,11 +113,11 @@ var T = { render: w }, E = { key: 0 }, D = [
|
|
|
112
113
|
"placeholder",
|
|
113
114
|
"appendIcon"
|
|
114
115
|
]),
|
|
115
|
-
b.isFilter && w.value ? (f(), s("div", E, [l(
|
|
116
|
+
b.isFilter && w.value ? (f(), s("div", E, [l(n, {
|
|
116
117
|
modelValue: C.value,
|
|
117
118
|
"onUpdate:modelValue": r[0] ||= (e) => C.value = e,
|
|
118
119
|
disabled: b.isDisabled,
|
|
119
|
-
placeholder: _(
|
|
120
|
+
placeholder: _(t)[b.lang].filter,
|
|
120
121
|
isFocus: ""
|
|
121
122
|
}, null, 8, [
|
|
122
123
|
"modelValue",
|
|
@@ -160,7 +161,7 @@ var T = { render: w }, E = { key: 0 }, D = [
|
|
|
160
161
|
onClick: G,
|
|
161
162
|
class: d(e.$style.option),
|
|
162
163
|
tabindex: "0"
|
|
163
|
-
}, g(_(
|
|
164
|
+
}, g(_(t)[b.lang].noResults), 3))], 2)) : o("", !0)], 2));
|
|
164
165
|
}
|
|
165
166
|
}), [["__cssModules", { $style: {
|
|
166
167
|
container: "_container_1m448_1",
|
|
@@ -12,10 +12,13 @@ interface IProps {
|
|
|
12
12
|
modelValue?: IModelValue;
|
|
13
13
|
isLoading?: boolean;
|
|
14
14
|
lang?: TLocale;
|
|
15
|
+
isDisableScrollWrapper?: boolean;
|
|
15
16
|
}
|
|
16
|
-
declare var __VLS_1: {};
|
|
17
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
17
18
|
type __VLS_Slots = {} & {
|
|
18
19
|
default?: (props: typeof __VLS_1) => any;
|
|
20
|
+
} & {
|
|
21
|
+
default?: (props: typeof __VLS_3) => any;
|
|
19
22
|
};
|
|
20
23
|
declare const __VLS_component: import('vue').DefineComponent<IProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
24
|
reset: (value: string) => any;
|
package/dist/UiTable/UiTable.js
CHANGED
|
@@ -1,69 +1,99 @@
|
|
|
1
1
|
import "./UiTable.css";
|
|
2
2
|
import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
-
import { t } from "../locales-
|
|
4
|
-
import { Fragment as n,
|
|
3
|
+
import { t } from "../locales-CTOQaSjK.js";
|
|
4
|
+
import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, normalizeClass as c, onBeforeUnmount as l, onMounted as u, openBlock as d, renderList as f, renderSlot as p, shallowRef as m, toDisplayString as h, unref as g } from "vue";
|
|
5
5
|
//#region src/components/UiTable/UiTable.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var _ = ["data-loading"], v = ["onClick", "data-current"], y = ["data-current", "data-loading"], b = ["data-current", "data-loading"], x = ["data-loading"], S = ["onClick", "data-current"], C = ["data-current", "data-loading"], w = ["data-current", "data-loading"], T = /*#__PURE__*/ e(/* @__PURE__ */ s({
|
|
7
7
|
__name: "UiTable",
|
|
8
8
|
props: {
|
|
9
9
|
headers: {},
|
|
10
10
|
modelValue: { default: void 0 },
|
|
11
11
|
isLoading: { type: Boolean },
|
|
12
|
-
lang: { default: "ru" }
|
|
12
|
+
lang: { default: "ru" },
|
|
13
|
+
isDisableScrollWrapper: { type: Boolean }
|
|
13
14
|
},
|
|
14
15
|
emits: ["update:modelValue", "reset"],
|
|
15
|
-
setup(e, { emit:
|
|
16
|
-
let
|
|
17
|
-
function
|
|
18
|
-
if (!
|
|
19
|
-
let e = Number(getComputedStyle(
|
|
20
|
-
|
|
16
|
+
setup(e, { emit: s }) {
|
|
17
|
+
let T = e, E = s, D = m(), O = m(), k = m(0), A = r(() => !T.isDisableScrollWrapper && k.value > 0);
|
|
18
|
+
function j() {
|
|
19
|
+
if (!D.value || !O.value) return;
|
|
20
|
+
let e = Number(getComputedStyle(D.value).width.slice(0, -2)), t = Number(getComputedStyle(O.value).width.slice(0, -2));
|
|
21
|
+
k.value = t - e - 2;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
23
|
+
function M(e) {
|
|
24
|
+
T.modelValue?.value === e ? E("update:modelValue", {
|
|
24
25
|
value: e,
|
|
25
|
-
isAsc: !
|
|
26
|
-
}) :
|
|
26
|
+
isAsc: !T.modelValue?.isAsc
|
|
27
|
+
}) : E("reset", e);
|
|
27
28
|
}
|
|
28
|
-
return
|
|
29
|
-
requestAnimationFrame(
|
|
30
|
-
}),
|
|
31
|
-
window.removeEventListener("resize",
|
|
32
|
-
}), (e,
|
|
33
|
-
|
|
29
|
+
return u(() => {
|
|
30
|
+
requestAnimationFrame(j), window.addEventListener("resize", j, { capture: !0 });
|
|
31
|
+
}), l(() => {
|
|
32
|
+
window.removeEventListener("resize", j, { capture: !0 });
|
|
33
|
+
}), (e, r) => T.isDisableScrollWrapper ? (d(), a("table", {
|
|
34
|
+
key: 1,
|
|
35
|
+
class: c(e.$style.table),
|
|
36
|
+
cellpadding: "8",
|
|
37
|
+
cellspacing: "0",
|
|
38
|
+
border: 0,
|
|
39
|
+
ref_key: "table",
|
|
40
|
+
ref: O
|
|
41
|
+
}, [o("thead", null, [o("tr", null, [(d(!0), a(n, null, f(T.headers, (t) => (d(), a("th", {
|
|
42
|
+
key: `${t.value}${t.title}`,
|
|
43
|
+
class: c(e.$style.th)
|
|
44
|
+
}, [o("label", {
|
|
45
|
+
class: c(e.$style.label),
|
|
46
|
+
"data-loading": T.isLoading
|
|
47
|
+
}, [o("span", null, h(t.title), 1), t.value ? (d(), a("button", {
|
|
48
|
+
key: 0,
|
|
49
|
+
onClick: (e) => M(t.value),
|
|
50
|
+
class: c(e.$style.sort),
|
|
51
|
+
type: "button",
|
|
52
|
+
"data-current": T.modelValue?.value === t.value
|
|
53
|
+
}, [o("span", {
|
|
54
|
+
class: c(e.$style.arrow),
|
|
55
|
+
"data-current": T.modelValue?.isAsc && T.modelValue?.value === t.value,
|
|
56
|
+
"data-loading": T.isLoading
|
|
57
|
+
}, " ↑ ", 10, C), o("span", {
|
|
58
|
+
class: c(e.$style.arrow),
|
|
59
|
+
"data-current": !T.modelValue?.isAsc && T.modelValue?.value === t.value,
|
|
60
|
+
"data-loading": T.isLoading
|
|
61
|
+
}, " ↓ ", 10, w)], 10, S)) : i("", !0)], 10, x)], 2))), 128))])]), o("tbody", null, [p(e.$slots, "default")])], 2)) : (d(), a("div", {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: c(e.$style.tableBlock),
|
|
34
64
|
ref_key: "tableBlock",
|
|
35
|
-
ref:
|
|
36
|
-
}, [
|
|
65
|
+
ref: D
|
|
66
|
+
}, [A.value ? (d(), a("div", {
|
|
37
67
|
key: 0,
|
|
38
|
-
class:
|
|
39
|
-
},
|
|
40
|
-
class:
|
|
68
|
+
class: c(e.$style.scrollMessage)
|
|
69
|
+
}, h(g(t)[T.lang].tableIsScrollable), 3)) : i("", !0), o("table", {
|
|
70
|
+
class: c(e.$style.table),
|
|
41
71
|
cellpadding: "8",
|
|
42
72
|
cellspacing: "0",
|
|
43
73
|
border: 0,
|
|
44
74
|
ref_key: "table",
|
|
45
|
-
ref:
|
|
46
|
-
}, [
|
|
75
|
+
ref: O
|
|
76
|
+
}, [o("thead", null, [o("tr", null, [(d(!0), a(n, null, f(T.headers, (t) => (d(), a("th", {
|
|
47
77
|
key: `${t.value}${t.title}`,
|
|
48
|
-
class:
|
|
49
|
-
}, [
|
|
50
|
-
class:
|
|
51
|
-
"data-loading":
|
|
52
|
-
}, [
|
|
78
|
+
class: c(e.$style.th)
|
|
79
|
+
}, [o("label", {
|
|
80
|
+
class: c(e.$style.label),
|
|
81
|
+
"data-loading": T.isLoading
|
|
82
|
+
}, [o("span", null, h(t.title), 1), t.value ? (d(), a("button", {
|
|
53
83
|
key: 0,
|
|
54
|
-
onClick: (e) =>
|
|
55
|
-
class:
|
|
84
|
+
onClick: (e) => M(t.value),
|
|
85
|
+
class: c(e.$style.sort),
|
|
56
86
|
type: "button",
|
|
57
|
-
"data-current":
|
|
58
|
-
}, [
|
|
59
|
-
class:
|
|
60
|
-
"data-current":
|
|
61
|
-
"data-loading":
|
|
62
|
-
}, " ↑ ", 10,
|
|
63
|
-
class:
|
|
64
|
-
"data-current": !
|
|
65
|
-
"data-loading":
|
|
66
|
-
}, " ↓ ", 10,
|
|
87
|
+
"data-current": T.modelValue?.value === t.value
|
|
88
|
+
}, [o("span", {
|
|
89
|
+
class: c(e.$style.arrow),
|
|
90
|
+
"data-current": T.modelValue?.isAsc && T.modelValue?.value === t.value,
|
|
91
|
+
"data-loading": T.isLoading
|
|
92
|
+
}, " ↑ ", 10, y), o("span", {
|
|
93
|
+
class: c(e.$style.arrow),
|
|
94
|
+
"data-current": !T.modelValue?.isAsc && T.modelValue?.value === t.value,
|
|
95
|
+
"data-loading": T.isLoading
|
|
96
|
+
}, " ↓ ", 10, b)], 10, v)) : i("", !0)], 10, _)], 2))), 128))])]), o("tbody", null, [p(e.$slots, "default")])], 2)], 2));
|
|
67
97
|
}
|
|
68
98
|
}), [["__cssModules", { $style: {
|
|
69
99
|
tableBlock: "_tableBlock_nw50b_1",
|
|
@@ -75,4 +105,4 @@ var g = ["data-loading"], _ = ["onClick", "data-current"], v = ["data-current",
|
|
|
75
105
|
arrow: "_arrow_nw50b_63"
|
|
76
106
|
} }]]);
|
|
77
107
|
//#endregion
|
|
78
|
-
export {
|
|
108
|
+
export { T as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tooltip_1uj5p_1{z-index:100;min-width:120px;max-width:336px;color:var(--color-gray-dark-extra);background-color:var(--color-white);border:1px solid var(--color-gray);box-shadow:0 2px 8px var(--color-gray-transparent);border-radius:8px;padding:8px 12px;font-size:.75rem;position:fixed}.dark ._tooltip_1uj5p_1{color:var(--color-white);background-color:var(--color-black);border-color:var(--color-gray-dark)}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface IProps {
|
|
2
|
+
modelValue: boolean;
|
|
3
|
+
target: HTMLElement | null;
|
|
4
|
+
position?: 'top' | 'bottom';
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_5: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_5) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<IProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: boolean) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<IProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
position: "top" | "bottom";
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import "./UiTooltip.css";
|
|
2
|
+
import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
+
import { Teleport as t, createBlock as n, createCommentVNode as r, createElementVNode as i, defineComponent as a, nextTick as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderSlot as p, watch as m } from "vue";
|
|
4
|
+
var h = /*#__PURE__*/ e(/* @__PURE__ */ a({
|
|
5
|
+
__name: "UiTooltip",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: { type: Boolean },
|
|
8
|
+
target: {},
|
|
9
|
+
position: { default: "bottom" }
|
|
10
|
+
},
|
|
11
|
+
emits: ["update:modelValue"],
|
|
12
|
+
setup(e, { emit: a }) {
|
|
13
|
+
let h = e, g = a, _ = f(null), v = f({
|
|
14
|
+
top: "0",
|
|
15
|
+
left: "0"
|
|
16
|
+
});
|
|
17
|
+
m(() => [h.modelValue, h.target], () => {
|
|
18
|
+
h.modelValue && h.target && o(b);
|
|
19
|
+
}), u(() => {
|
|
20
|
+
window.addEventListener("resize", x), window.addEventListener("scroll", S, { capture: !0 });
|
|
21
|
+
}), l(() => {
|
|
22
|
+
window.removeEventListener("resize", x), window.removeEventListener("scroll", S, { capture: !0 });
|
|
23
|
+
});
|
|
24
|
+
function y() {
|
|
25
|
+
g("update:modelValue", !1);
|
|
26
|
+
}
|
|
27
|
+
function b() {
|
|
28
|
+
if (!_.value || !h.target) return;
|
|
29
|
+
let e = h.target.getBoundingClientRect(), t = _.value.offsetWidth, n = _.value.offsetHeight, r = h.position === "top" ? e.top - n - 8 : e.bottom + 8, i = e.left + e.width / 2 - t / 2;
|
|
30
|
+
i = Math.max(8, Math.min(i, window.innerWidth - t - 8)), v.value = {
|
|
31
|
+
top: `${r}px`,
|
|
32
|
+
left: `${i}px`
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function x() {
|
|
36
|
+
y();
|
|
37
|
+
}
|
|
38
|
+
function S() {
|
|
39
|
+
y();
|
|
40
|
+
}
|
|
41
|
+
return (e, a) => h.modelValue && h.target ? (d(), n(t, {
|
|
42
|
+
key: 0,
|
|
43
|
+
to: "body"
|
|
44
|
+
}, [i("div", {
|
|
45
|
+
ref_key: "tooltipRef",
|
|
46
|
+
ref: _,
|
|
47
|
+
class: s(e.$style.tooltip),
|
|
48
|
+
style: c(v.value)
|
|
49
|
+
}, [p(e.$slots, "default")], 6)])) : r("", !0);
|
|
50
|
+
}
|
|
51
|
+
}), [["__cssModules", { $style: { tooltip: "_tooltip_1uj5p_1" } }]]);
|
|
52
|
+
//#endregion
|
|
53
|
+
export { h as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./UiUpload.css";
|
|
2
2
|
import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { t } from "../UiButton-D0BOZNZF.js";
|
|
4
|
-
import { t as n } from "../locales-
|
|
4
|
+
import { t as n } from "../locales-CTOQaSjK.js";
|
|
5
5
|
import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createStaticVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, normalizeClass as f, openBlock as p, renderList as m, shallowRef as h, toDisplayString as g, unref as _, vShow as v, withCtx as y, withDirectives as b } from "vue";
|
|
6
6
|
//#region src/components/UiUpload/icons/upload.svg?component
|
|
7
7
|
var x = {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as UiCalendar } from './UiCalendar/UiCalendar';
|
|
|
5
5
|
export { default as UiChart } from './UiChart/UiChart';
|
|
6
6
|
export { default as UiCheckbox } from './UiCheckbox/UiCheckbox';
|
|
7
7
|
export { default as UiChip } from './UiChip/UiChip';
|
|
8
|
+
export { default as UiDate } from './UiDate/UiDate';
|
|
8
9
|
export { default as UiClose } from './UiClose/UiClose';
|
|
9
10
|
export { default as UiEditor } from './UiEditor/UiEditor';
|
|
10
11
|
export { default as UiField } from './UiField/UiField';
|
|
@@ -20,6 +21,7 @@ export { default as UiSlider } from './UiSlider/UiSlider';
|
|
|
20
21
|
export { default as UiTable } from './UiTable/UiTable';
|
|
21
22
|
export { default as UiTabs } from './UiTabs/UiTabs';
|
|
22
23
|
export { default as UiTextarea } from './UiTextarea/UiTextarea';
|
|
24
|
+
export { default as UiTooltip } from './UiTooltip/UiTooltip';
|
|
23
25
|
export { default as UiUpload } from './UiUpload/UiUpload';
|
|
24
26
|
export { default as toast } from './toast/toast';
|
|
25
27
|
export { uiStubs } from './stubs/stubs';
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { default as UiCalendar } from './UiCalendar/UiCalendar.js';
|
|
|
5
5
|
export { default as UiChart } from './UiChart/UiChart.js';
|
|
6
6
|
export { default as UiCheckbox } from './UiCheckbox/UiCheckbox.js';
|
|
7
7
|
export { default as UiChip } from './UiChip/UiChip.js';
|
|
8
|
+
export { default as UiDate } from './UiDate/UiDate.js';
|
|
8
9
|
export { default as UiClose } from './UiClose/UiClose.js';
|
|
9
10
|
export { default as UiEditor } from './UiEditor/UiEditor.js';
|
|
10
11
|
export { default as UiField } from './UiField/UiField.js';
|
|
@@ -20,6 +21,7 @@ export { default as UiSlider } from './UiSlider/UiSlider.js';
|
|
|
20
21
|
export { default as UiTable } from './UiTable/UiTable.js';
|
|
21
22
|
export { default as UiTabs } from './UiTabs/UiTabs.js';
|
|
22
23
|
export { default as UiTextarea } from './UiTextarea/UiTextarea.js';
|
|
24
|
+
export { default as UiTooltip } from './UiTooltip/UiTooltip.js';
|
|
23
25
|
export { default as UiUpload } from './UiUpload/UiUpload.js';
|
|
24
26
|
export { default as toast } from './toast/toast.js';
|
|
25
27
|
export { uiStubs } from './stubs/stubs.js';
|
package/dist/locales/index.d.ts
CHANGED
|
@@ -13,6 +13,9 @@ export declare const MESSAGES: {
|
|
|
13
13
|
readonly upload: "Upload";
|
|
14
14
|
readonly sizeUpTo: "Size up to";
|
|
15
15
|
readonly tableIsScrollable: "Table is scrollable →";
|
|
16
|
+
readonly datePlaceholder: "mm/dd/yyyy";
|
|
17
|
+
readonly months: readonly ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
18
|
+
readonly daysShort: readonly ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
16
19
|
};
|
|
17
20
|
readonly ru: {
|
|
18
21
|
readonly cancel: "Отмена";
|
|
@@ -28,5 +31,8 @@ export declare const MESSAGES: {
|
|
|
28
31
|
readonly upload: "Загрузить";
|
|
29
32
|
readonly sizeUpTo: "Размер до";
|
|
30
33
|
readonly tableIsScrollable: "Таблицу можно скроллить →";
|
|
34
|
+
readonly datePlaceholder: "дд.мм.гггг";
|
|
35
|
+
readonly months: readonly ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"];
|
|
36
|
+
readonly daysShort: readonly ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"];
|
|
31
37
|
};
|
|
32
38
|
};
|
|
@@ -13,7 +13,31 @@ var e = {
|
|
|
13
13
|
remove: "Remove",
|
|
14
14
|
upload: "Upload",
|
|
15
15
|
sizeUpTo: "Size up to",
|
|
16
|
-
tableIsScrollable: "Table is scrollable →"
|
|
16
|
+
tableIsScrollable: "Table is scrollable →",
|
|
17
|
+
datePlaceholder: "mm/dd/yyyy",
|
|
18
|
+
months: [
|
|
19
|
+
"January",
|
|
20
|
+
"February",
|
|
21
|
+
"March",
|
|
22
|
+
"April",
|
|
23
|
+
"May",
|
|
24
|
+
"June",
|
|
25
|
+
"July",
|
|
26
|
+
"August",
|
|
27
|
+
"September",
|
|
28
|
+
"October",
|
|
29
|
+
"November",
|
|
30
|
+
"December"
|
|
31
|
+
],
|
|
32
|
+
daysShort: [
|
|
33
|
+
"Mon",
|
|
34
|
+
"Tue",
|
|
35
|
+
"Wed",
|
|
36
|
+
"Thu",
|
|
37
|
+
"Fri",
|
|
38
|
+
"Sat",
|
|
39
|
+
"Sun"
|
|
40
|
+
]
|
|
17
41
|
},
|
|
18
42
|
ru: {
|
|
19
43
|
cancel: "Отмена",
|
|
@@ -28,7 +52,31 @@ var e = {
|
|
|
28
52
|
remove: "Убрать",
|
|
29
53
|
upload: "Загрузить",
|
|
30
54
|
sizeUpTo: "Размер до",
|
|
31
|
-
tableIsScrollable: "Таблицу можно скроллить →"
|
|
55
|
+
tableIsScrollable: "Таблицу можно скроллить →",
|
|
56
|
+
datePlaceholder: "дд.мм.гггг",
|
|
57
|
+
months: [
|
|
58
|
+
"Январь",
|
|
59
|
+
"Февраль",
|
|
60
|
+
"Март",
|
|
61
|
+
"Апрель",
|
|
62
|
+
"Май",
|
|
63
|
+
"Июнь",
|
|
64
|
+
"Июль",
|
|
65
|
+
"Август",
|
|
66
|
+
"Сентябрь",
|
|
67
|
+
"Октябрь",
|
|
68
|
+
"Ноябрь",
|
|
69
|
+
"Декабрь"
|
|
70
|
+
],
|
|
71
|
+
daysShort: [
|
|
72
|
+
"Пн",
|
|
73
|
+
"Вт",
|
|
74
|
+
"Ср",
|
|
75
|
+
"Чт",
|
|
76
|
+
"Пт",
|
|
77
|
+
"Сб",
|
|
78
|
+
"Вс"
|
|
79
|
+
]
|
|
32
80
|
}
|
|
33
81
|
};
|
|
34
82
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mhz-ui",
|
|
3
3
|
"description": "Mhz ui kit",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.31",
|
|
5
5
|
"author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"chart.js": "4.5.1",
|
|
31
31
|
"mhz-helpers": "*",
|
|
32
32
|
"perfect-debounce": "2.1.0",
|
|
33
|
-
"vue": "3.6.0-beta.
|
|
33
|
+
"vue": "3.6.0-beta.17",
|
|
34
34
|
"vue-chartjs": "5.3.3",
|
|
35
35
|
"vue-router": "5.1.0"
|
|
36
36
|
},
|
|
@@ -40,44 +40,44 @@
|
|
|
40
40
|
"@storybook/addon-themes": "10.4.6",
|
|
41
41
|
"@storybook/vue3": "10.4.6",
|
|
42
42
|
"@storybook/vue3-vite": "10.4.6",
|
|
43
|
-
"@types/node": "26.
|
|
43
|
+
"@types/node": "26.1.0",
|
|
44
44
|
"@vitejs/plugin-vue": "6.0.7",
|
|
45
45
|
"@vitest/coverage-v8": "4.1.9",
|
|
46
46
|
"@vue/test-utils": "2.4.11",
|
|
47
|
-
"eslint": "10.
|
|
47
|
+
"eslint": "10.6.0",
|
|
48
48
|
"eslint-config-prettier": "10.1.8",
|
|
49
49
|
"eslint-import-resolver-typescript": "4.4.5",
|
|
50
|
-
"eslint-plugin-import-x": "4.
|
|
50
|
+
"eslint-plugin-import-x": "4.17.1",
|
|
51
51
|
"eslint-plugin-prettier": "5.5.6",
|
|
52
52
|
"eslint-plugin-sonarjs": "4.1.0",
|
|
53
|
-
"eslint-plugin-unicorn": "
|
|
53
|
+
"eslint-plugin-unicorn": "69.0.0",
|
|
54
54
|
"eslint-plugin-vue": "10.9.2",
|
|
55
|
-
"globals": "17.
|
|
55
|
+
"globals": "17.7.0",
|
|
56
56
|
"happy-dom": "20.10.6",
|
|
57
57
|
"postcss-html": "1.8.1",
|
|
58
58
|
"postcss-scss": "4.0.9",
|
|
59
|
-
"prettier": "3.
|
|
59
|
+
"prettier": "3.9.4",
|
|
60
60
|
"sass-embedded": "1.100.0",
|
|
61
61
|
"storybook": "10.4.6",
|
|
62
|
-
"stylelint": "17.
|
|
62
|
+
"stylelint": "17.14.0",
|
|
63
63
|
"stylelint-config-recess-order": "7.7.0",
|
|
64
64
|
"stylelint-config-recommended-scss": "17.0.1",
|
|
65
65
|
"stylelint-config-recommended-vue": "1.6.1",
|
|
66
66
|
"stylelint-order": "8.1.1",
|
|
67
67
|
"stylelint-prettier": "5.0.3",
|
|
68
68
|
"typescript": "6.0.3",
|
|
69
|
-
"typescript-eslint": "8.
|
|
70
|
-
"vite": "8.
|
|
71
|
-
"vite-plugin-dts": "5.0.
|
|
69
|
+
"typescript-eslint": "8.62.1",
|
|
70
|
+
"vite": "8.1.3",
|
|
71
|
+
"vite-plugin-dts": "5.0.3",
|
|
72
72
|
"vite-plugin-static-copy": "4.1.1",
|
|
73
73
|
"vite-svg-loader": "5.1.1",
|
|
74
74
|
"vitest": "4.1.9",
|
|
75
75
|
"vue-eslint-parser": "10.4.1",
|
|
76
|
-
"vue-linters-config": "0.5.
|
|
77
|
-
"vue-tsc": "3.3.
|
|
76
|
+
"vue-linters-config": "0.5.9",
|
|
77
|
+
"vue-tsc": "3.3.6"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"vue": "3.6.0-beta.
|
|
80
|
+
"vue": "3.6.0-beta.17",
|
|
81
81
|
"vue-router": "5.1.0"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|