mhz-ui 1.4.29 → 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.
Files changed (41) hide show
  1. package/dist/UiBreadcrumbs/UiBreadcrumbs.js +1 -1
  2. package/dist/UiButton/UiButton.js +1 -1
  3. package/dist/{UiButton-DCQiGgkB.js → UiButton-D0BOZNZF.js} +1 -1
  4. package/dist/UiButtongroup/UiButtongroup.js +1 -1
  5. package/dist/UiCalendar/UiCalendar.js +4 -3
  6. package/dist/UiChart/UiChart.js +18 -14
  7. package/dist/UiCheckbox/UiCheckbox.js +4 -2
  8. package/dist/UiChip/UiChip.js +2 -2
  9. package/dist/UiClose/UiClose.js +1 -1
  10. package/dist/{UiClose-24LsZd6X.js → UiClose-CPrzLd_K.js} +1 -1
  11. package/dist/UiDate/UiDate.css +1 -0
  12. package/dist/UiDate/UiDate.d.ts +17 -0
  13. package/dist/UiDate/UiDate.js +198 -0
  14. package/dist/UiEditor/UiEditor.js +22 -22
  15. package/dist/UiField/UiField.js +1 -1
  16. package/dist/UiFlex/UiFlex.css +1 -1
  17. package/dist/UiFlex/UiFlex.js +2 -44
  18. package/dist/UiFlex-Bmfq0xaC.js +44 -0
  19. package/dist/UiInput/UiInput.js +1 -1
  20. package/dist/{UiInput-DfxP3_4K.js → UiInput-BCdtBzNw.js} +1 -1
  21. package/dist/UiModal/UiModal.js +4 -4
  22. package/dist/UiPagination/UiPagination.js +2 -2
  23. package/dist/UiRange/UiRange.js +1 -1
  24. package/dist/UiSearch/UiSearch.js +7 -7
  25. package/dist/UiSelect/UiSelect.js +10 -9
  26. package/dist/UiSlider/UiSlider.js +1 -1
  27. package/dist/UiSpoiler/UiSpoiler.js +1 -1
  28. package/dist/UiTable/UiTable.d.ts +4 -1
  29. package/dist/UiTable/UiTable.js +75 -46
  30. package/dist/UiTabs/UiTabs.js +1 -1
  31. package/dist/UiTextarea/UiTextarea.js +1 -1
  32. package/dist/UiTooltip/UiTooltip.css +1 -0
  33. package/dist/UiTooltip/UiTooltip.d.ts +23 -0
  34. package/dist/UiTooltip/UiTooltip.js +53 -0
  35. package/dist/UiUpload/UiUpload.js +3 -3
  36. package/dist/index.d.ts +2 -0
  37. package/dist/index.js +2 -0
  38. package/dist/locales/index.d.ts +6 -0
  39. package/dist/{locales-CsU1R1Is.js → locales-CTOQaSjK.js} +50 -2
  40. package/dist/src/test.d.ts +10 -0
  41. package/package.json +29 -29
@@ -1,11 +1,11 @@
1
1
  import "./UiModal.css";
2
2
  import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
3
- import { t } from "../UiButton-DCQiGgkB.js";
4
- import { t as n } from "../UiClose-24LsZd6X.js";
5
- import { t as r } from "../locales-CsU1R1Is.js";
3
+ import { t } from "../UiButton-D0BOZNZF.js";
4
+ import { t as n } from "../UiClose-CPrzLd_K.js";
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
- var E = ["data-scrollable"], D = /* @__PURE__ */ e(/* @__PURE__ */ f({
8
+ var E = ["data-scrollable"], D = /*#__PURE__*/ e(/* @__PURE__ */ f({
9
9
  inheritAttrs: !1,
10
10
  __name: "UiModal",
11
11
  props: {
@@ -1,9 +1,9 @@
1
1
  import "./UiPagination.css";
2
2
  import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
3
- import { t } from "../locales-CsU1R1Is.js";
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
- var l = ["disabled"], u = ["disabled"], d = ["disabled"], f = ["disabled"], p = /* @__PURE__ */ e(/* @__PURE__ */ i({
6
+ var l = ["disabled"], u = ["disabled"], d = ["disabled"], f = ["disabled"], p = /*#__PURE__*/ e(/* @__PURE__ */ i({
7
7
  __name: "UiPagination",
8
8
  props: {
9
9
  page: {},
@@ -10,7 +10,7 @@ var d = [
10
10
  "min",
11
11
  "max",
12
12
  "value"
13
- ], p = /* @__PURE__ */ e(/* @__PURE__ */ i({
13
+ ], p = /*#__PURE__*/ e(/* @__PURE__ */ i({
14
14
  __name: "UiRange",
15
15
  props: {
16
16
  modelValue: {},
@@ -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 "../UiInput-DfxP3_4K.js";
4
- import { t as n } from "../locales-CsU1R1Is.js";
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";
@@ -56,7 +56,7 @@ function D(e, t) {
56
56
  d: "M13.5 15.338a.5.5 0 1 0 .737-.676zm.737-.676-1.398-1.523-.737.676 1.399 1.523zM13.5 7.628c0 3.394-2.695 6.129-6 6.129v1c3.875 0 7-3.201 7-7.129zm-6 6.129c-3.305 0-6-2.735-6-6.129h-1c0 3.928 3.125 7.129 7 7.129zm-6-6.129c0-3.393 2.695-6.128 6-6.128v-1C3.625.5.5 3.7.5 7.628zm6-6.128c3.305 0 6 2.735 6 6.128h1C14.5 3.701 11.375.5 7.5.5z"
57
57
  }, null, -1)]]);
58
58
  }
59
- var O = { render: D }, k = /* @__PURE__ */ e(/* @__PURE__ */ f({
59
+ var O = { render: D }, k = /*#__PURE__*/ e(/* @__PURE__ */ f({
60
60
  __name: "UiSearch",
61
61
  props: {
62
62
  modelValue: {},
@@ -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(t, {
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(n)[C.lang].enterMoreSymbols), 1)], 64)) : s("", !0),
103
- C.modelValue.length > 2 && !C.isSuccess ? (m(), c(i, { key: 1 }, [u(v(y(n)[C.lang].loading), 1)], 64)) : s("", !0),
104
- C.modelValue.length > 2 && !M.value && C.isSuccess ? (m(), c(i, { key: 2 }, [u(v(y(n)[C.lang].noResults), 1)], 64)) : s("", !0),
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 "../UiInput-DfxP3_4K.js";
4
- import { t as n } from "../locales-CsU1R1Is.js";
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
@@ -38,7 +38,7 @@ var T = { render: w }, E = { key: 0 }, D = [
38
38
  "onKeydown",
39
39
  "onMouseenter",
40
40
  "data-current"
41
- ], O = 240, k = /* @__PURE__ */ e(/* @__PURE__ */ u({
41
+ ], O = 240, k = /*#__PURE__*/ e(/* @__PURE__ */ u({
42
42
  __name: "UiSelect",
43
43
  props: {
44
44
  modelValue: { default: void 0 },
@@ -89,7 +89,8 @@ var T = { render: w }, E = { key: 0 }, D = [
89
89
  }, 100));
90
90
  }
91
91
  function q(e) {
92
- x("update:modelValue", P.value ? e : e._id || e.title), G();
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(t, {
103
+ l(n, {
103
104
  modelValue: L.value,
104
105
  disabled: b.isDisabled,
105
106
  onToggle: U,
106
107
  mode: "select",
107
- placeholder: _(n)[b.lang].choose,
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(t, {
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: _(n)[b.lang].filter,
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(_(n)[b.lang].noResults), 3))], 2)) : o("", !0)], 2));
164
+ }, g(_(t)[b.lang].noResults), 3))], 2)) : o("", !0)], 2));
164
165
  }
165
166
  }), [["__cssModules", { $style: {
166
167
  container: "_container_1m448_1",
@@ -6,7 +6,7 @@ var l = ["onClick", "data-active"], u = ["src", "alt"], d = [
6
6
  "src",
7
7
  "alt",
8
8
  "data-slide"
9
- ], f = /* @__PURE__ */ e(/* @__PURE__ */ i({
9
+ ], f = /*#__PURE__*/ e(/* @__PURE__ */ i({
10
10
  __name: "UiSlider",
11
11
  props: {
12
12
  thumbs: {},
@@ -16,7 +16,7 @@ function d(e, r) {
16
16
  d: "m1 5 7.17 6L15 5"
17
17
  }, null, -1)]]);
18
18
  }
19
- var f = { render: d }, p = ["data-expanded"], m = ["data-expanded"], h = /* @__PURE__ */ e(/* @__PURE__ */ i({
19
+ var f = { render: d }, p = ["data-expanded"], m = ["data-expanded"], h = /*#__PURE__*/ e(/* @__PURE__ */ i({
20
20
  __name: "UiSpoiler",
21
21
  props: {
22
22
  modelValue: { type: Boolean },
@@ -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;
@@ -1,70 +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-CsU1R1Is.js";
4
- import { Fragment as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeClass as s, onBeforeUnmount as c, onMounted as l, openBlock as u, renderList as d, renderSlot as f, shallowRef as p, toDisplayString as m, unref as h } from "vue";
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 g = ["data-loading"], _ = ["onClick", "data-current"], v = ["data-current", "data-loading"], y = ["data-current", "data-loading"], b = /* @__PURE__ */ e(/* @__PURE__ */ o({
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: o }) {
16
- let b = e, x = o, S = p(), C = p(), w = p(!1);
17
- function T() {
18
- if (S.value && C.value) {
19
- let e = Number(getComputedStyle(S.value).width.slice(0, -2));
20
- w.value = Number(getComputedStyle(C.value).width.slice(0, -2)) - 2 > e;
21
- }
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;
22
22
  }
23
- function E(e) {
24
- b.modelValue?.value === e ? x("update:modelValue", {
23
+ function M(e) {
24
+ T.modelValue?.value === e ? E("update:modelValue", {
25
25
  value: e,
26
- isAsc: !b.modelValue?.isAsc
27
- }) : x("reset", e);
26
+ isAsc: !T.modelValue?.isAsc
27
+ }) : E("reset", e);
28
28
  }
29
- return l(() => {
30
- T(), window.addEventListener("resize", T, !0);
31
- }), c(() => {
32
- window.removeEventListener("resize", T, !0);
33
- }), (e, o) => (u(), i("div", {
34
- class: s(e.$style.tableBlock),
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),
35
64
  ref_key: "tableBlock",
36
- ref: S
37
- }, [w.value ? (u(), i("div", {
65
+ ref: D
66
+ }, [A.value ? (d(), a("div", {
38
67
  key: 0,
39
- class: s(e.$style.scrollMessage)
40
- }, m(h(t)[b.lang].tableIsScrollable), 3)) : r("", !0), a("table", {
41
- class: s(e.$style.table),
68
+ class: c(e.$style.scrollMessage)
69
+ }, h(g(t)[T.lang].tableIsScrollable), 3)) : i("", !0), o("table", {
70
+ class: c(e.$style.table),
42
71
  cellpadding: "8",
43
72
  cellspacing: "0",
44
73
  border: 0,
45
74
  ref_key: "table",
46
- ref: C
47
- }, [a("thead", null, [a("tr", null, [(u(!0), i(n, null, d(b.headers, (t) => (u(), i("th", {
75
+ ref: O
76
+ }, [o("thead", null, [o("tr", null, [(d(!0), a(n, null, f(T.headers, (t) => (d(), a("th", {
48
77
  key: `${t.value}${t.title}`,
49
- class: s(e.$style.th)
50
- }, [a("label", {
51
- class: s(e.$style.label),
52
- "data-loading": b.isLoading
53
- }, [a("span", null, m(t.title), 1), t.value ? (u(), i("button", {
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", {
54
83
  key: 0,
55
- onClick: (e) => E(t.value),
56
- class: s(e.$style.sort),
84
+ onClick: (e) => M(t.value),
85
+ class: c(e.$style.sort),
57
86
  type: "button",
58
- "data-current": b.modelValue?.value === t.value
59
- }, [a("span", {
60
- class: s(e.$style.arrow),
61
- "data-current": b.modelValue?.isAsc && b.modelValue?.value === t.value,
62
- "data-loading": b.isLoading
63
- }, " ↑ ", 10, v), a("span", {
64
- class: s(e.$style.arrow),
65
- "data-current": !b.modelValue?.isAsc && b.modelValue?.value === t.value,
66
- "data-loading": b.isLoading
67
- }, " ↓ ", 10, y)], 10, _)) : r("", !0)], 10, g)], 2))), 128))])]), a("tbody", null, [f(e.$slots, "default")])], 2)], 2));
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));
68
97
  }
69
98
  }), [["__cssModules", { $style: {
70
99
  tableBlock: "_tableBlock_nw50b_1",
@@ -76,4 +105,4 @@ var g = ["data-loading"], _ = ["onClick", "data-current"], v = ["data-current",
76
105
  arrow: "_arrow_nw50b_63"
77
106
  } }]]);
78
107
  //#endregion
79
- export { b as default };
108
+ export { T as default };
@@ -2,7 +2,7 @@ import "./UiTabs.css";
2
2
  import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { Fragment as t, createElementBlock as n, defineComponent as r, normalizeClass as i, openBlock as a, renderList as o, toDisplayString as s } from "vue";
4
4
  //#region src/components/UiTabs/UiTabs.vue?vue&type=script&setup=true&lang.ts
5
- var c = ["onClick", "data-active"], l = /* @__PURE__ */ e(/* @__PURE__ */ r({
5
+ var c = ["onClick", "data-active"], l = /*#__PURE__*/ e(/* @__PURE__ */ r({
6
6
  __name: "UiTabs",
7
7
  props: {
8
8
  tabs: {},
@@ -2,7 +2,7 @@ import "./UiTextarea.css";
2
2
  import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { createElementBlock as t, defineComponent as n, normalizeClass as r, openBlock as i } from "vue";
4
4
  //#region src/components/UiTextarea/UiTextarea.vue?vue&type=script&setup=true&lang.ts
5
- var a = ["value", "disabled"], o = /* @__PURE__ */ e(/* @__PURE__ */ n({
5
+ var a = ["value", "disabled"], o = /*#__PURE__*/ e(/* @__PURE__ */ n({
6
6
  __name: "UiTextarea",
7
7
  props: {
8
8
  modelValue: {},
@@ -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
- import { t } from "../UiButton-DCQiGgkB.js";
4
- import { t as n } from "../locales-CsU1R1Is.js";
3
+ import { t } from "../UiButton-D0BOZNZF.js";
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 = {
@@ -17,7 +17,7 @@ var C = { render: S }, w = 10 * 1024 * 1024;
17
17
  new File([""], "file1.png"), new File([""], "file2.png");
18
18
  //#endregion
19
19
  //#region src/components/UiUpload/UiUpload.vue?vue&type=script&setup=true&lang.ts
20
- var T = ["data-error"], E = ["accept", "multiple"], D = ["data-label"], O = /* @__PURE__ */ e(/* @__PURE__ */ d({
20
+ var T = ["data-error"], E = ["accept", "multiple"], D = ["data-label"], O = /*#__PURE__*/ e(/* @__PURE__ */ d({
21
21
  __name: "UiUpload",
22
22
  props: {
23
23
  label: { default: void 0 },
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';
@@ -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
@@ -0,0 +1,10 @@
1
+ import { Component, ComponentPublicInstance } from 'vue';
2
+ import { VueWrapper } from '@vue/test-utils';
3
+ type TFilteredProps<T> = {
4
+ [K in keyof T as K extends `$${infer _U}` ? never : K extends `on${infer _V}` ? never : K]: T[K];
5
+ };
6
+ type TComponentProps<T> = Partial<TFilteredProps<ComponentPublicInstance<T>['$props']>>;
7
+ export declare function wrapperFactory<T>(component: Component<T>, props?: TComponentProps<T>, slots?: {
8
+ default: string;
9
+ }): VueWrapper<ComponentPublicInstance<T>>;
10
+ export {};