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
@@ -3,7 +3,7 @@ import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, renderList as u, resolveDynamicComponent as d, toDisplayString as f, withCtx as p } from "vue";
4
4
  import { RouterLink as m } from "vue-router";
5
5
  //#region src/components/UiBreadcrumbs/constants/index.ts
6
- var h = "default", g = "Breadcrumb", _ = ["aria-label"], v = { itemprop: "name" }, y = ["data-color"], b = ["content"], x = /* @__PURE__ */ e(/* @__PURE__ */ s({
6
+ var h = "default", g = "Breadcrumb", _ = ["aria-label"], v = { itemprop: "name" }, y = ["data-color"], b = ["content"], x = /*#__PURE__*/ e(/* @__PURE__ */ s({
7
7
  __name: "UiBreadcrumbs",
8
8
  props: {
9
9
  links: {},
@@ -1,2 +1,2 @@
1
- import { t as e } from "../UiButton-DCQiGgkB.js";
1
+ import { t as e } from "../UiButton-D0BOZNZF.js";
2
2
  export { e as default };
@@ -12,7 +12,7 @@ var l = "primary", u = "button", d = "Button", f = [
12
12
  "type",
13
13
  "aria-label",
14
14
  "aria-disabled"
15
- ], p = /* @__PURE__ */ e(/* @__PURE__ */ i({
15
+ ], p = /*#__PURE__*/ e(/* @__PURE__ */ i({
16
16
  __name: "UiButton",
17
17
  props: {
18
18
  layout: { default: l },
@@ -6,7 +6,7 @@ var u = ["data-tall"], d = [
6
6
  "onClick",
7
7
  "data-current",
8
8
  "data-fill"
9
- ], f = ["value"], p = /* @__PURE__ */ e(/* @__PURE__ */ a({
9
+ ], f = ["value"], p = /*#__PURE__*/ e(/* @__PURE__ */ a({
10
10
  __name: "UiButtongroup",
11
11
  props: {
12
12
  modelValue: {},
@@ -2,7 +2,7 @@ import "./UiCalendar.css";
2
2
  import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { Fragment as t, Transition as n, computed as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, normalizeStyle as l, onBeforeMount as u, openBlock as d, renderList as f, shallowRef as p, toDisplayString as m, withCtx as h, withModifiers as g } from "vue";
4
4
  //#region src/components/UiCalendar/UiCalendar.vue?vue&type=script&setup=true&lang.ts
5
- var _ = ["onClick", "data-choose"], v = ["onClick"], y = /* @__PURE__ */ e(/* @__PURE__ */ s({
5
+ var _ = ["onClick", "data-choose"], v = ["onClick"], y = /*#__PURE__*/ e(/* @__PURE__ */ s({
6
6
  __name: "UiCalendar",
7
7
  props: {
8
8
  isDisablePastDates: { type: Boolean },
@@ -45,10 +45,11 @@ var _ = ["onClick", "data-choose"], v = ["onClick"], y = /* @__PURE__ */ e(/* @_
45
45
  return s;
46
46
  });
47
47
  function O() {
48
- b("update", {
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) => {
@@ -1018,7 +1018,7 @@ function an(e, t) {
1018
1018
  function on(e, t, n) {
1019
1019
  return typeof t == "string" ? We(an(e, t), n) : We(an(e, ""), t);
1020
1020
  }
1021
- var G = /* @__PURE__ */ new class {
1021
+ var G = /* #__PURE__ */ new class {
1022
1022
  constructor(e, t) {
1023
1023
  this.animation = void 0, this.backgroundColor = "rgba(0,0,0,0.1)", this.borderColor = "rgba(0,0,0,0.1)", this.color = "#666", this.datasets = {}, this.devicePixelRatio = (e) => e.chart.platform.getDevicePixelRatio(), this.elements = {}, this.events = [
1024
1024
  "mousemove",
@@ -1846,7 +1846,7 @@ function Jr(e, t) {
1846
1846
  bottom: n.bottom === !1 ? e.height : r.bottom + (n.bottom === !0 ? 0 : n.bottom)
1847
1847
  };
1848
1848
  }
1849
- var Yr = /* @__PURE__ */ new class {
1849
+ var Yr = /* #__PURE__ */ new class {
1850
1850
  constructor() {
1851
1851
  this._request = null, this._charts = /* @__PURE__ */ new Map(), this._running = !1, this._lastDate = void 0;
1852
1852
  }
@@ -4406,7 +4406,7 @@ function co(e, t) {
4406
4406
  function lo(e) {
4407
4407
  return "id" in e && "defaults" in e;
4408
4408
  }
4409
- var Y = /* @__PURE__ */ new class {
4409
+ var Y = /* #__PURE__ */ new class {
4410
4410
  constructor() {
4411
4411
  this.controllers = new oo(xi, "datasets", !0), this.elements = new oo(za, "elements"), this.plugins = new oo(Object, "plugins"), this.scales = new oo(ao, "scales"), this._typedRegistries = [
4412
4412
  this.controllers,
@@ -5720,7 +5720,7 @@ var Ds = class extends za {
5720
5720
  "rgb(75, 192, 192)",
5721
5721
  "rgb(153, 102, 255)",
5722
5722
  "rgb(201, 203, 207)"
5723
- ], ks = /* @__PURE__ */ Os.map((e) => e.replace("rgb(", "rgba(").replace(")", ", 0.5)"));
5723
+ ], ks = /* #__PURE__ */ Os.map((e) => e.replace("rgb(", "rgba(").replace(")", ", 0.5)"));
5724
5724
  function As(e) {
5725
5725
  return Os[e % Os.length];
5726
5726
  }
@@ -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) pn(r, {
5862
- radius: m * Math.SQRT2 / 2,
5863
- pointStyle: n.pointStyle,
5864
- rotation: n.rotation,
5865
- borderWidth: i
5866
- }, s.xPlus(e, p / 2), t + d, a.pointStyleWidth && p);
5867
- else {
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
- if (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)), g(s.x(S), 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;
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;
@@ -7187,7 +7191,7 @@ var qc = {
7187
7191
  common: !0,
7188
7192
  size: 3154e7
7189
7193
  }
7190
- }, $ = /* @__PURE__ */ Object.keys(qc);
7194
+ }, $ = /* #__PURE__ */ Object.keys(qc);
7191
7195
  function Jc(e, t) {
7192
7196
  return e - t;
7193
7197
  }
@@ -7555,7 +7559,7 @@ function hl(e, t) {
7555
7559
  }
7556
7560
  });
7557
7561
  }
7558
- var gl = /* @__PURE__ */ hl("bar", Li), _l = /* @__PURE__ */ hl("line", Bi), vl = /* @__PURE__ */ hl("pie", Hi), yl = /* @__PURE__ */ e(/* @__PURE__ */ a({
7562
+ var gl = /* #__PURE__ */ hl("bar", Li), _l = /* #__PURE__ */ hl("line", Bi), vl = /* #__PURE__ */ hl("pie", Hi), yl = /*#__PURE__*/ e(/* @__PURE__ */ a({
7559
7563
  __name: "UiChart",
7560
7564
  props: {
7561
7565
  labels: {},
@@ -10,7 +10,7 @@ var d = ["data-disabled", "data-switcher"], f = [
10
10
  "data-switcher",
11
11
  "data-disabled",
12
12
  "data-error"
13
- ], m = /* @__PURE__ */ e(/* @__PURE__ */ i({
13
+ ], m = /*#__PURE__*/ e(/* @__PURE__ */ i({
14
14
  __name: "UiCheckbox",
15
15
  props: {
16
16
  initialValue: {
@@ -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
- g.value && h("update:modelValue", g.value.checked ? m.initialValue || !0 : !1);
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"]),
@@ -1,6 +1,6 @@
1
1
  import "./UiChip.css";
2
2
  import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
3
- import { t } from "../UiClose-24LsZd6X.js";
3
+ import { t } from "../UiClose-CPrzLd_K.js";
4
4
  import { createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, renderSlot as u, unref as d } from "vue";
5
5
  //#region src/components/UiChip/icons/edit.svg
6
6
  var f = {
@@ -13,7 +13,7 @@ var f = {
13
13
  function p(e, t) {
14
14
  return l(), i("svg", f, [...t[0] ||= [a("path", { d: "M23 4a1 1 0 0 1-1 1h-3a1 1 0 0 1 0-2h3a1 1 0 0 1 1 1M2 3h8.184a3 3 0 1 1 0 2H2a1 1 0 0 1 0-2m10 1a1 1 0 1 0 1-1 1 1 0 0 0-1 1M1 12a1 1 0 0 1 1-1h4.184a3 3 0 1 1 0 2H2a1 1 0 0 1-1-1m7 0a1 1 0 1 0 1-1 1 1 0 0 0-1 1m14-1h-7a1 1 0 0 0 0 2h7a1 1 0 0 0 0-2m0 8h-5a1 1 0 0 0 0 2h5a1 1 0 0 0 0-2M1 20a1 1 0 0 1 1-1h6.184a3 3 0 1 1 0 2H2a1 1 0 0 1-1-1m9 0a1 1 0 1 0 1-1 1 1 0 0 0-1 1" }, null, -1)]]);
15
15
  }
16
- var m = { render: p }, h = "default", g = ["data-type"], _ = /* @__PURE__ */ e(/* @__PURE__ */ s({
16
+ var m = { render: p }, h = "default", g = ["data-type"], _ = /*#__PURE__*/ e(/* @__PURE__ */ s({
17
17
  __name: "UiChip",
18
18
  props: {
19
19
  type: { default: h },
@@ -1,2 +1,2 @@
1
- import { t as e } from "../UiClose-24LsZd6X.js";
1
+ import { t as e } from "../UiClose-CPrzLd_K.js";
2
2
  export { e as default };
@@ -2,7 +2,7 @@ import "./UiClose/UiClose.css";
2
2
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, openBlock as a } from "vue";
4
4
  //#region src/components/UiClose/UiClose.vue?vue&type=script&setup=true&lang.ts
5
- var o = ["data-small", "data-delete"], s = /* @__PURE__ */ e(/* @__PURE__ */ r({
5
+ var o = ["data-small", "data-delete"], s = /*#__PURE__*/ e(/* @__PURE__ */ r({
6
6
  __name: "UiClose",
7
7
  props: {
8
8
  isSmall: { type: Boolean },
@@ -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 };
@@ -2,12 +2,12 @@ import "./UiEditor.css";
2
2
  import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { Fragment as t, createElementBlock as n, createElementVNode as r, defineComponent as i, nextTick as a, normalizeClass as o, onBeforeUnmount as s, openBlock as c, ref as l, renderList as u, toDisplayString as d, watch as f } from "vue";
4
4
  //#region src/components/UiEditor/UiEditor.vue?vue&type=script&setup=true&lang.ts
5
- var p = ["onClick"], m = ["value"], h = /* @__PURE__ */ e(/* @__PURE__ */ i({
5
+ var p = ["onClick"], m = ["value"], h = /*#__PURE__*/ e(/* @__PURE__ */ i({
6
6
  __name: "UiEditor",
7
7
  props: { modelValue: {} },
8
8
  emits: ["update:modelValue"],
9
9
  setup(e, { emit: i }) {
10
- let h = e, g = i, _ = l(), v = l(!1), y = l(""), b = !1, x = null, S = [
10
+ let h = e, g = i, _ = l(), v = l(!1), y = l(""), b = l(!1), x = l(null), S = [
11
11
  {
12
12
  _id: 1,
13
13
  name: "b",
@@ -38,7 +38,7 @@ var p = ["onClick"], m = ["value"], h = /* @__PURE__ */ e(/* @__PURE__ */ i({
38
38
  let e = globalThis.window?.getSelection();
39
39
  if (!e || e.rangeCount === 0) return;
40
40
  let t = e.getRangeAt(0);
41
- x = {
41
+ x.value = {
42
42
  startNode: t.startContainer,
43
43
  startOffset: t.startOffset,
44
44
  endNode: t.endContainer,
@@ -46,9 +46,9 @@ var p = ["onClick"], m = ["value"], h = /* @__PURE__ */ e(/* @__PURE__ */ i({
46
46
  };
47
47
  }
48
48
  function w() {
49
- if (!x || !_.value) return;
50
- let { startNode: e, startOffset: t, endNode: n, endOffset: r } = x;
51
- if (x = null, !e || !n) return;
49
+ if (!x.value || !_.value) return;
50
+ let { startNode: e, startOffset: t, endNode: n, endOffset: r } = x.value;
51
+ if (x.value = null, !e || !n) return;
52
52
  let i = document.createRange();
53
53
  i.setStart(e, t), i.setEnd(n, r);
54
54
  let a = globalThis.window?.getSelection();
@@ -62,19 +62,16 @@ var p = ["onClick"], m = ["value"], h = /* @__PURE__ */ e(/* @__PURE__ */ i({
62
62
  if (!t || t.rangeCount === 0) return;
63
63
  let n = t.getRangeAt(0);
64
64
  if (!_.value?.contains(n.commonAncestorContainer)) return;
65
- let r = n.toString();
65
+ let r = n.toString(), i;
66
66
  if (r) {
67
- let i = document.createElement(e);
68
- i.textContent = r, n.deleteContents(), n.insertNode(i);
69
- let a = document.createRange();
70
- a.setStartAfter(i), a.collapse(!0), t.removeAllRanges(), t.addRange(a);
67
+ let t = document.createElement(e);
68
+ t.textContent = r, n.deleteContents(), n.insertNode(t), i = document.createRange(), i.setStartAfter(t);
71
69
  } else {
72
70
  n.collapse(!0);
73
- let r = document.createElement(e);
74
- n.insertNode(r);
75
- let i = document.createRange();
76
- i.setStart(r, 0), i.collapse(!0), t.removeAllRanges(), t.addRange(i);
71
+ let t = document.createElement(e);
72
+ n.insertNode(t), i = document.createRange(), i.setStart(t, 0);
77
73
  }
74
+ i.collapse(!0), t.removeAllRanges(), t.addRange(i);
78
75
  }
79
76
  function D() {
80
77
  E("b"), T(), g("update:modelValue", _.value?.innerHTML);
@@ -86,8 +83,8 @@ var p = ["onClick"], m = ["value"], h = /* @__PURE__ */ e(/* @__PURE__ */ i({
86
83
  E(e === 2 ? "h2" : "h3"), T(), g("update:modelValue", _.value?.innerHTML);
87
84
  }
88
85
  function A() {
89
- if (b) {
90
- b = !1;
86
+ if (b.value) {
87
+ b.value = !1;
91
88
  return;
92
89
  }
93
90
  g("update:modelValue", _.value?.innerHTML);
@@ -104,28 +101,31 @@ var p = ["onClick"], m = ["value"], h = /* @__PURE__ */ e(/* @__PURE__ */ i({
104
101
  })) : (_.value && (y.value = _.value.innerHTML), v.value = !0);
105
102
  }
106
103
  function P(e) {
107
- v.value && (y.value = e.target.value, g("update:modelValue", y.value));
104
+ if (!v.value) return;
105
+ let t = e.target;
106
+ y.value = t.value, g("update:modelValue", y.value);
108
107
  }
109
108
  function F() {
110
109
  if (!_.value) return;
111
110
  let e = _.value, t = [...e.childNodes], n = !1;
112
- for (let e of t) if (e.nodeType === Node.TEXT_NODE && e.textContent?.trim()) {
111
+ for (let e of t) {
112
+ if (e.nodeType !== Node.TEXT_NODE || !e.textContent?.trim()) continue;
113
113
  let t = document.createElement("div");
114
114
  t.append(e.cloneNode(!0)), e.replaceWith(t), n = !0;
115
115
  }
116
- (t.length === 0 || t.every((e) => e.nodeType === Node.TEXT_NODE && !e.textContent?.trim())) && (e.innerHTML = "<div><br></div>", n = !0), n && a(() => {
116
+ t.every((e) => e.nodeType === Node.TEXT_NODE && !e.textContent?.trim()) && (e.innerHTML = "<div><br></div>", n = !0), n && a(() => {
117
117
  w(), e.focus();
118
118
  });
119
119
  }
120
120
  return f(() => h.modelValue, (e) => {
121
121
  if (!_.value || _.value.innerHTML === e) return;
122
- b = !0;
122
+ b.value = !0;
123
123
  let t = document.activeElement === _.value;
124
124
  t && C(), _.value.innerHTML = e || "<div></div>", a(() => {
125
125
  t && w(), t && _.value && _.value.focus();
126
126
  });
127
127
  }), s(() => {
128
- x = null;
128
+ x.value = null;
129
129
  }), (e, i) => (c(), n("div", { class: o(e.$style.container) }, [r("div", { class: o(e.$style.actions) }, [(c(), n(t, null, u(S, (t) => r("button", {
130
130
  key: t._id,
131
131
  onClick: (e) => t.method(),
@@ -1,7 +1,7 @@
1
1
  import "./UiField.css";
2
2
  import { t as e } from "../_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s, toDisplayString as c } from "vue";
4
- var l = /* @__PURE__ */ e(/* @__PURE__ */ i({
4
+ var l = /*#__PURE__*/ e(/* @__PURE__ */ i({
5
5
  __name: "UiField",
6
6
  props: {
7
7
  label: {},
@@ -1 +1 @@
1
- ._flex_qq3eu_1{flex-direction:var(--bd0c91ae);flex-wrap:var(--v45af6241);gap:var(--v78b561f9);align-items:var(--v0f8a4d32);justify-content:var(--a3abe380);display:flex}.dark ._flex_qq3eu_1{color:var(--color-white)}
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)}
@@ -1,44 +1,2 @@
1
- import "./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
- 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 };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../UiInput-DfxP3_4K.js";
1
+ import { t as e } from "../UiInput-BCdtBzNw.js";
2
2
  export { e as default };
@@ -60,7 +60,7 @@ var C = { render: S }, w = ["data-mode", "tabindex"], T = [
60
60
  "data-center",
61
61
  "data-append-icon",
62
62
  "tabindex"
63
- ], E = /* @__PURE__ */ e(/* @__PURE__ */ o({
63
+ ], E = /*#__PURE__*/ e(/* @__PURE__ */ o({
64
64
  __name: "UiInput",
65
65
  props: {
66
66
  modelValue: {