@profitliga/ui 2.0.3 → 2.0.4

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 (115) hide show
  1. package/dist/components/AlertDialog/AlertDialogAction.vue.js +2 -3
  2. package/dist/components/AlertDialog/AlertDialogCancel.vue.js +8 -9
  3. package/dist/components/AlertDialog/AlertDialogTrigger.vue.js +7 -8
  4. package/dist/components/Button/Button.css +1 -1
  5. package/dist/components/Button/Button.vue.js +5 -52
  6. package/dist/components/Button/Button.vue2.js +52 -3
  7. package/dist/components/Calendar/CalendarNext.vue.js +3 -4
  8. package/dist/components/Calendar/CalendarPrev.vue.js +7 -8
  9. package/dist/components/ConfirmDialog/ConfirmDialog.vue2.js +11 -12
  10. package/dist/components/DatePicker/DatePickerNext.vue.js +1 -2
  11. package/dist/components/DatePicker/DatePickerPrev.vue.js +7 -8
  12. package/dist/components/DateRangePicker/DateRangePickerNext.vue.js +6 -7
  13. package/dist/components/DateRangePicker/DateRangePickerPrev.vue.js +7 -8
  14. package/dist/components/RangeCalendar/RangeCalendarNext.vue.js +3 -4
  15. package/dist/components/RangeCalendar/RangeCalendarPrev.vue.js +3 -4
  16. package/dist/components/Schedule/Schedule.vue2.js +38 -39
  17. package/dist/components/index.js +391 -392
  18. package/dist/components/v2/AlertDialog/AlertDialog.css +1 -1
  19. package/dist/components/v2/AlertDialog/AlertDialog.types.d.ts +2 -2
  20. package/dist/components/v2/AlertDialog/AlertDialog.vue.d.ts +2 -2
  21. package/dist/components/v2/AlertDialog/AlertDialog.vue.js +2 -2
  22. package/dist/components/v2/AlertDialog/AlertDialog.vue2.js +29 -29
  23. package/dist/components/v2/Checkbox/Checkbox.css +1 -1
  24. package/dist/components/v2/Checkbox/Checkbox.types.d.ts +11 -0
  25. package/dist/components/v2/Checkbox/Checkbox.vue.d.ts +2 -0
  26. package/dist/components/v2/Checkbox/Checkbox.vue.js +2 -2
  27. package/dist/components/v2/Checkbox/Checkbox.vue2.js +61 -49
  28. package/dist/components/v2/Combobox/Combobox.css +1 -1
  29. package/dist/components/v2/Combobox/Combobox.types.d.ts +14 -2
  30. package/dist/components/v2/Combobox/Combobox.vue.js +1 -1
  31. package/dist/components/v2/Combobox/Combobox.vue2.js +190 -181
  32. package/dist/components/v2/ConfirmDialog/ConfirmDialog.types.d.ts +2 -2
  33. package/dist/components/v2/ConfirmDialog/ConfirmDialog.vue.d.ts +2 -2
  34. package/dist/components/v2/ConfirmDialog/ConfirmDialog.vue.js +6 -6
  35. package/dist/components/v2/DatePicker/DatePicker.css +1 -1
  36. package/dist/components/v2/DatePicker/DatePicker.types.d.ts +2 -2
  37. package/dist/components/v2/DatePicker/DatePicker.vue.d.ts +2 -2
  38. package/dist/components/v2/DatePicker/DatePicker.vue.js +2 -2
  39. package/dist/components/v2/DatePicker/DatePicker.vue2.js +54 -54
  40. package/dist/components/v2/Divider/Divider.types.d.ts +8 -0
  41. package/dist/components/v2/DropdownMenu/DropdownMenu.types.d.ts +2 -2
  42. package/dist/components/v2/DropdownMenu/DropdownMenu.vue.d.ts +2 -2
  43. package/dist/components/v2/DropdownMenu/DropdownMenu.vue2.js +6 -6
  44. package/dist/components/v2/FileUpload/FileUpload.css +1 -1
  45. package/dist/components/v2/FileUpload/FileUpload.vue.js +2 -2
  46. package/dist/components/v2/FileUpload/FileUpload.vue2.js +16 -16
  47. package/dist/components/v2/FormField/FormField.css +1 -0
  48. package/dist/components/v2/FormField/FormField.types.d.ts +48 -0
  49. package/dist/components/v2/FormField/FormField.vue.d.ts +25 -0
  50. package/dist/components/v2/FormField/FormField.vue.js +8 -0
  51. package/dist/components/v2/FormField/FormField.vue2.js +54 -0
  52. package/dist/components/v2/FormField/index.d.ts +3 -0
  53. package/dist/components/v2/Image/Image.css +1 -0
  54. package/dist/components/v2/Image/Image.types.d.ts +26 -0
  55. package/dist/components/v2/Image/Image.vue.d.ts +16 -0
  56. package/dist/components/v2/Image/Image.vue.js +8 -0
  57. package/dist/components/v2/Image/Image.vue2.js +91 -0
  58. package/dist/components/v2/Image/ImageList.css +1 -0
  59. package/dist/components/v2/Image/ImageList.types.d.ts +28 -0
  60. package/dist/components/v2/Image/ImageList.vue.d.ts +15 -0
  61. package/dist/components/v2/Image/ImageList.vue.js +8 -0
  62. package/dist/components/v2/Image/ImageList.vue2.js +38 -0
  63. package/dist/components/v2/Image/index.d.ts +5 -0
  64. package/dist/components/v2/InputNumber/InputNumber.css +1 -1
  65. package/dist/components/v2/InputNumber/InputNumber.vue.js +2 -2
  66. package/dist/components/v2/InputNumber/InputNumber.vue2.js +22 -21
  67. package/dist/components/v2/InputSelect/InputSelect.types.d.ts +2 -2
  68. package/dist/components/v2/InputSelect/InputSelect.vue.d.ts +2 -2
  69. package/dist/components/v2/InputSelect/InputSelect.vue.js +14 -14
  70. package/dist/components/v2/InputSelect/InputSelectChip.css +1 -1
  71. package/dist/components/v2/InputSelect/InputSelectChip.vue.d.ts +3 -3
  72. package/dist/components/v2/InputSelect/InputSelectChip.vue.js +2 -2
  73. package/dist/components/v2/InputSelect/InputSelectChip.vue2.js +17 -17
  74. package/dist/components/v2/Popover/Popover.css +1 -1
  75. package/dist/components/v2/Popover/Popover.types.d.ts +2 -2
  76. package/dist/components/v2/Popover/Popover.vue.d.ts +2 -2
  77. package/dist/components/v2/Popover/Popover.vue.js +2 -2
  78. package/dist/components/v2/Popover/Popover.vue2.js +24 -24
  79. package/dist/components/v2/Radio/Radio.css +1 -1
  80. package/dist/components/v2/Radio/Radio.vue.d.ts +4 -0
  81. package/dist/components/v2/Radio/Radio.vue.js +1 -1
  82. package/dist/components/v2/Radio/Radio.vue2.js +57 -49
  83. package/dist/components/v2/Schedule/Schedule.css +1 -1
  84. package/dist/components/v2/Schedule/Schedule.types.d.ts +2 -2
  85. package/dist/components/v2/Schedule/Schedule.vue.d.ts +2 -2
  86. package/dist/components/v2/Schedule/Schedule.vue.js +3 -3
  87. package/dist/components/v2/Schedule/Schedule.vue2.js +55 -55
  88. package/dist/components/v2/Select/Select.css +1 -1
  89. package/dist/components/v2/Select/Select.types.d.ts +8 -2
  90. package/dist/components/v2/Select/Select.vue.js +3 -3
  91. package/dist/components/v2/Select/Select.vue2.js +102 -92
  92. package/dist/components/v2/Toast/Toast.types.d.ts +2 -2
  93. package/dist/components/v2/Toast/Toaster.css +1 -1
  94. package/dist/components/v2/Toast/Toaster.vue.d.ts +2 -2
  95. package/dist/components/v2/Toast/Toaster.vue.js +1 -1
  96. package/dist/components/v2/Toast/Toaster.vue2.js +17 -17
  97. package/dist/components/v2/Tooltip/Tooltip.css +1 -1
  98. package/dist/components/v2/Tooltip/Tooltip.types.d.ts +2 -2
  99. package/dist/components/v2/Tooltip/Tooltip.vue.d.ts +2 -2
  100. package/dist/components/v2/Tooltip/Tooltip.vue.js +1 -1
  101. package/dist/components/v2/Tooltip/Tooltip.vue2.js +39 -38
  102. package/dist/components/v2/Tooltip/TooltipContent.css +1 -1
  103. package/dist/components/v2/Tooltip/TooltipContent.vue.d.ts +2 -2
  104. package/dist/components/v2/Tooltip/TooltipContent.vue.js +2 -2
  105. package/dist/components/v2/Tooltip/TooltipContent.vue2.js +20 -20
  106. package/dist/components/v2/Tooltip/vTooltip.directive.js +40 -41
  107. package/dist/components/v2/index.d.ts +2 -0
  108. package/dist/components/v2/index.js +82 -76
  109. package/dist/components/v2/shared/isHtmlElement.util.d.ts +15 -0
  110. package/dist/components/v2/shared/isHtmlElement.util.js +10 -0
  111. package/dist/components/v2/shared/useIsMobile.util.d.ts +13 -0
  112. package/dist/components/v2/shared/useIsMobile.util.js +8 -0
  113. package/dist/components/v2/shared/useTriggerAria.util.js +4 -3
  114. package/dist/types/global.types.d.ts +10 -0
  115. package/package.json +3 -1
@@ -1,9 +1,10 @@
1
- import { defineComponent as g, useModel as p, useId as v, useTemplateRef as h, shallowRef as M, watchEffect as m, watch as y, onBeforeUnmount as w, openBlock as k, createElementBlock as x, Fragment as C, createElementVNode as I, mergeProps as D, unref as t, renderSlot as b, createVNode as E, withCtx as O, createTextVNode as P, toDisplayString as T, mergeModels as F } from "vue";
2
- import { breakpoints as L } from "../../../utils/breakpoints.util.js";
3
- import { useTestId as B } from "../shared/useTestId.util.js";
4
- import R from "./TooltipContent.vue.js";
5
- import { createTooltipControl as z } from "./tooltipControl.util.js";
6
- const H = /* @__PURE__ */ g({
1
+ import { defineComponent as g, useModel as p, useId as v, useTemplateRef as h, shallowRef as y, watchEffect as m, watch as M, onBeforeUnmount as w, openBlock as k, createElementBlock as x, Fragment as C, createElementVNode as I, mergeProps as D, unref as t, renderSlot as b, createVNode as E, withCtx as O, createTextVNode as P, toDisplayString as B, mergeModels as F } from "vue";
2
+ import { isHtmlElement as T } from "../shared/isHtmlElement.util.js";
3
+ import { useIsMobile as L } from "../shared/useIsMobile.util.js";
4
+ import { useTestId as R } from "../shared/useTestId.util.js";
5
+ import z from "./TooltipContent.vue.js";
6
+ import { createTooltipControl as $ } from "./tooltipControl.util.js";
7
+ const j = /* @__PURE__ */ g({
7
8
  inheritAttrs: !1,
8
9
  __name: "Tooltip",
9
10
  props: /* @__PURE__ */ F({
@@ -18,7 +19,7 @@ const H = /* @__PURE__ */ g({
18
19
  closeDelay: { default: 100 },
19
20
  disabled: { type: Boolean, default: !1 },
20
21
  zIndex: { default: "auto" },
21
- breakpointMobile: { default: "sm" },
22
+ breakpointMobile: { type: [String, Boolean], default: "sm" },
22
23
  mobileLabel: { default: "Подсказка" },
23
24
  testId: { default: void 0 }
24
25
  }, {
@@ -26,35 +27,35 @@ const H = /* @__PURE__ */ g({
26
27
  openModifiers: {}
27
28
  }),
28
29
  emits: ["update:open"],
29
- setup(l) {
30
- const a = l, s = p(l, "open"), r = `tooltip-content-${v()}`, c = B(() => a.testId), u = h("triggerRef"), f = L.smaller(a.breakpointMobile), e = z({
30
+ setup(n) {
31
+ const a = n, s = p(n, "open"), d = `tooltip-content-${v()}`, c = R(() => a.testId), u = h("triggerRef"), f = L(a.breakpointMobile), e = $({
31
32
  isOpen: () => s.value,
32
- setOpen: (n) => {
33
- s.value = n;
33
+ setOpen: (l) => {
34
+ s.value = l;
34
35
  },
35
36
  openDelay: () => a.openDelay,
36
37
  closeDelay: () => a.closeDelay,
37
38
  disabled: () => a.disabled,
38
39
  isMobile: () => f.value
39
- }), d = M(null);
40
+ }), r = y(null);
40
41
  return m(() => {
41
42
  s.value;
42
- const n = u.value, o = n?.firstElementChild;
43
- d.value = o instanceof HTMLElement ? o : n ?? null;
43
+ const l = u.value, o = l?.firstElementChild;
44
+ r.value = T(o) ? o : l ?? null;
44
45
  }), m(() => {
45
- const n = d.value;
46
- n && (s.value && !f.value ? n.setAttribute("aria-describedby", r) : n.removeAttribute("aria-describedby"));
47
- }), y(
46
+ const l = r.value;
47
+ l && (s.value && !f.value ? l.setAttribute("aria-describedby", d) : l.removeAttribute("aria-describedby"));
48
+ }), M(
48
49
  () => a.disabled,
49
- (n) => {
50
- n && e.close();
50
+ (l) => {
51
+ l && e.close();
51
52
  }
52
- ), w(e.destroy), (n, o) => (k(), x(C, null, [
53
+ ), w(e.destroy), (l, o) => (k(), x(C, null, [
53
54
  I("span", D({
54
55
  ref_key: "triggerRef",
55
56
  ref: u,
56
57
  class: "tooltip-trigger"
57
- }, { ...n.$attrs, ...t(c)("trigger") }, {
58
+ }, { ...l.$attrs, ...t(c)("trigger") }, {
58
59
  onMouseenter: o[0] || (o[0] = //@ts-ignore
59
60
  (...i) => t(e).handleMouseEnter && t(e).handleMouseEnter(...i)),
60
61
  onMouseleave: o[1] || (o[1] = //@ts-ignore
@@ -68,29 +69,29 @@ const H = /* @__PURE__ */ g({
68
69
  onClick: o[5] || (o[5] = //@ts-ignore
69
70
  (...i) => t(e).handleClick && t(e).handleClick(...i))
70
71
  }), [
71
- b(n.$slots, "trigger", {}, void 0, !0)
72
+ b(l.$slots, "trigger", {}, void 0, !0)
72
73
  ], 16),
73
- E(R, {
74
- anchor: d.value,
75
- "content-id": r,
74
+ E(z, {
75
+ anchor: r.value,
76
+ "content-id": d,
76
77
  open: s.value,
77
- side: l.side,
78
- "side-offset": l.sideOffset,
79
- align: l.align,
80
- "align-offset": l.alignOffset,
81
- arrow: l.arrow,
82
- "max-width": l.maxWidth,
83
- "z-index": l.zIndex,
84
- "breakpoint-mobile": l.breakpointMobile,
85
- "mobile-label": l.mobileLabel,
86
- "test-id": l.testId,
78
+ side: n.side,
79
+ "side-offset": n.sideOffset,
80
+ align: n.align,
81
+ "align-offset": n.alignOffset,
82
+ arrow: n.arrow,
83
+ "max-width": n.maxWidth,
84
+ "z-index": n.zIndex,
85
+ "breakpoint-mobile": n.breakpointMobile,
86
+ "mobile-label": n.mobileLabel,
87
+ "test-id": n.testId,
87
88
  onClose: t(e).close,
88
89
  onPointerEnter: t(e).cancelTimers,
89
90
  onPointerLeave: t(e).scheduleClose
90
91
  }, {
91
92
  default: O(() => [
92
- b(n.$slots, "default", {}, () => [
93
- P(T(l.text), 1)
93
+ b(l.$slots, "default", {}, () => [
94
+ P(B(n.text), 1)
94
95
  ], !0)
95
96
  ]),
96
97
  _: 3
@@ -99,5 +100,5 @@ const H = /* @__PURE__ */ g({
99
100
  }
100
101
  });
101
102
  export {
102
- H as default
103
+ j as default
103
104
  };
@@ -1 +1 @@
1
- .tooltip-sheet[data-v-77562610]{color:var(--theme-neutral-text-body);overflow-wrap:break-word;padding:8px 16px 24px;font-size:.875rem;line-height:22px}.tooltip-content[data-v-77562610]{--tooltip-arrow-box:11.314px;--tooltip-arrow-depth:5.657px;z-index:1002;filter:drop-shadow(0 1px 1px #727272eb)drop-shadow(0 4px 8.8px #7272720d)drop-shadow(1px 5px 5px #7272726e);width:max-content;position:fixed}.tooltip-content[data-state=open][data-v-77562610]{animation:fadeIn var(--animation-duration) ease-in-out}.tooltip-content[data-state=closed][data-v-77562610]{animation:fadeOut var(--animation-duration) ease-in-out}.tooltip-content__body[data-v-77562610]{word-break:break-word;color:var(--theme-neutral-0);background-color:var(--theme-neutral-700);border-radius:4px;padding:6px 8px;font-size:.875rem;font-weight:400;line-height:22px;display:block}.tooltip-content__arrow[data-v-77562610]{display:flex;position:absolute;overflow:hidden}.tooltip-content__arrow-box[data-v-77562610]{width:var(--tooltip-arrow-box);height:var(--tooltip-arrow-box);flex:none;justify-content:center;align-items:center;display:flex}.tooltip-content__arrow-beak[data-v-77562610]{background-color:var(--theme-neutral-700);width:8px;height:8px;transform:rotate(45deg)}.tooltip-content--top .tooltip-content__arrow[data-v-77562610]{width:var(--tooltip-arrow-box);height:var(--tooltip-arrow-depth);align-items:flex-end;top:100%}.tooltip-content--top .tooltip-content__arrow-beak[data-v-77562610]{border-bottom-right-radius:2px}.tooltip-content--bottom .tooltip-content__arrow[data-v-77562610]{width:var(--tooltip-arrow-box);height:var(--tooltip-arrow-depth);align-items:flex-start;bottom:100%}.tooltip-content--bottom .tooltip-content__arrow-beak[data-v-77562610]{border-top-left-radius:2px}.tooltip-content--left .tooltip-content__arrow[data-v-77562610]{width:var(--tooltip-arrow-depth);height:var(--tooltip-arrow-box);justify-content:flex-end;left:100%}.tooltip-content--left .tooltip-content__arrow-beak[data-v-77562610]{border-top-right-radius:2px}.tooltip-content--right .tooltip-content__arrow[data-v-77562610]{width:var(--tooltip-arrow-depth);height:var(--tooltip-arrow-box);justify-content:flex-start;right:100%}.tooltip-content--right .tooltip-content__arrow-beak[data-v-77562610]{border-bottom-left-radius:2px}
1
+ .tooltip-sheet[data-v-4699364e]{color:var(--theme-neutral-text-body);overflow-wrap:break-word;padding:8px 16px 24px;font-size:.875rem;line-height:22px}.tooltip-content[data-v-4699364e]{--tooltip-arrow-box:11.314px;--tooltip-arrow-depth:5.657px;z-index:1002;filter:drop-shadow(0 1px 1px #727272eb)drop-shadow(0 4px 8.8px #7272720d)drop-shadow(1px 5px 5px #7272726e);width:max-content;position:fixed}.tooltip-content[data-state=open][data-v-4699364e]{animation:fadeIn var(--animation-duration) ease-in-out}.tooltip-content[data-state=closed][data-v-4699364e]{animation:fadeOut var(--animation-duration) ease-in-out}.tooltip-content__body[data-v-4699364e]{word-break:break-word;color:var(--theme-neutral-0);background-color:var(--theme-neutral-700);border-radius:4px;padding:6px 8px;font-size:.875rem;font-weight:400;line-height:22px;display:block}.tooltip-content__arrow[data-v-4699364e]{display:flex;position:absolute;overflow:hidden}.tooltip-content__arrow-box[data-v-4699364e]{width:var(--tooltip-arrow-box);height:var(--tooltip-arrow-box);flex:none;justify-content:center;align-items:center;display:flex}.tooltip-content__arrow-beak[data-v-4699364e]{background-color:var(--theme-neutral-700);width:8px;height:8px;transform:rotate(45deg)}.tooltip-content--top .tooltip-content__arrow[data-v-4699364e]{width:var(--tooltip-arrow-box);height:var(--tooltip-arrow-depth);align-items:flex-end;top:100%}.tooltip-content--top .tooltip-content__arrow-beak[data-v-4699364e]{border-bottom-right-radius:2px}.tooltip-content--bottom .tooltip-content__arrow[data-v-4699364e]{width:var(--tooltip-arrow-box);height:var(--tooltip-arrow-depth);align-items:flex-start;bottom:100%}.tooltip-content--bottom .tooltip-content__arrow-beak[data-v-4699364e]{border-top-left-radius:2px}.tooltip-content--left .tooltip-content__arrow[data-v-4699364e]{width:var(--tooltip-arrow-depth);height:var(--tooltip-arrow-box);justify-content:flex-end;left:100%}.tooltip-content--left .tooltip-content__arrow-beak[data-v-4699364e]{border-top-right-radius:2px}.tooltip-content--right .tooltip-content__arrow[data-v-4699364e]{width:var(--tooltip-arrow-depth);height:var(--tooltip-arrow-box);justify-content:flex-start;right:100%}.tooltip-content--right .tooltip-content__arrow-beak[data-v-4699364e]{border-bottom-left-radius:2px}
@@ -1,6 +1,6 @@
1
1
  import { TooltipContentProps, TooltipSide, TooltipAlign } from './Tooltip.types';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- import { TBreakpoints } from '../../../types/global.types';
3
+ import { TBreakpointMobile } from '../../../types/global.types';
4
4
  declare function __VLS_template(): {
5
5
  attrs: Partial<{}>;
6
6
  slots: {
@@ -28,7 +28,7 @@ declare const __VLS_component: DefineComponent<TooltipContentProps, {}, {}, {},
28
28
  sideOffset: number;
29
29
  align: TooltipAlign;
30
30
  alignOffset: number;
31
- breakpointMobile: TBreakpoints;
31
+ breakpointMobile: TBreakpointMobile;
32
32
  arrow: boolean;
33
33
  testId: string;
34
34
  maxWidth: number | string;
@@ -2,7 +2,7 @@ import './TooltipContent.css';
2
2
  import o from "./TooltipContent.vue2.js";
3
3
  /* empty css */
4
4
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-77562610"]]);
5
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4699364e"]]);
6
6
  export {
7
- _ as default
7
+ m as default
8
8
  };
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as Z, computed as B, ref as A, reactive as S, watch as tt, onBeforeUnmount as et, unref as d, openBlock as $, createBlock as D, withCtx as _, createElementVNode as u, mergeProps as O, renderSlot as P, createTextVNode as U, toDisplayString as F, createElementBlock as ot, createCommentVNode as G, nextTick as nt } from "vue";
2
- import { breakpoints as it } from "../../../utils/breakpoints.util.js";
3
- import { onClickOutside as st } from "../../../utils/onClickOutside.util.js";
4
- import lt from "../BottomSheet/BottomSheet.vue.js";
5
- import { ANIMATION_DURATION_MS as at } from "../shared/animation.const.js";
6
- import rt from "../shared/Portal.vue.js";
7
- import { useDelayedVisibility as dt } from "../shared/useDelayedVisibility.util.js";
2
+ import { onClickOutside as it } from "../../../utils/onClickOutside.util.js";
3
+ import st from "../BottomSheet/BottomSheet.vue.js";
4
+ import { ANIMATION_DURATION_MS as lt } from "../shared/animation.const.js";
5
+ import at from "../shared/Portal.vue.js";
6
+ import { useDelayedVisibility as rt } from "../shared/useDelayedVisibility.util.js";
7
+ import { useIsMobile as dt } from "../shared/useIsMobile.util.js";
8
8
  import { useTestId as ft } from "../shared/useTestId.util.js";
9
9
  const ct = ["id", "data-state"], C = 11.314, T = 16, p = 8, Ot = /* @__PURE__ */ Z({
10
10
  __name: "TooltipContent",
@@ -20,13 +20,13 @@ const ct = ["id", "data-state"], C = 11.314, T = 16, p = 8, Ot = /* @__PURE__ */
20
20
  arrow: { type: Boolean, default: !0 },
21
21
  maxWidth: { default: 320 },
22
22
  zIndex: { default: "auto" },
23
- breakpointMobile: { default: "sm" },
23
+ breakpointMobile: { type: [String, Boolean], default: "sm" },
24
24
  mobileLabel: { default: "Подсказка" },
25
25
  testId: { default: void 0 }
26
26
  },
27
27
  emits: ["close", "pointerEnter", "pointerLeave"],
28
28
  setup(a, { emit: H }) {
29
- const t = a, m = H, w = ft(() => t.testId), W = it.smaller(t.breakpointMobile), X = B(() => t.open && !W.value), y = A(null);
29
+ const t = a, m = H, w = ft(() => t.testId), W = dt(t.breakpointMobile), X = B(() => t.open && !W.value), y = A(null);
30
30
  function j(o) {
31
31
  o || m("close");
32
32
  }
@@ -34,7 +34,7 @@ const ct = ["id", "data-state"], C = 11.314, T = 16, p = 8, Ot = /* @__PURE__ */
34
34
  top: 0,
35
35
  left: 0,
36
36
  side: t.side
37
- }), v = S({ width: 0, height: 0 }), g = S({ x: 0, y: 0 }), k = A(!1);
37
+ }), v = S({ width: 0, height: 0 }), g = S({ x: 0, y: 0 }), E = A(!1);
38
38
  function q() {
39
39
  const o = t.anchor, i = y.value;
40
40
  if (!o || !i) return;
@@ -55,13 +55,13 @@ const ct = ["id", "data-state"], C = 11.314, T = 16, p = 8, Ot = /* @__PURE__ */
55
55
  p,
56
56
  V - s.height - p
57
57
  )
58
- ), l.top = f, l.left = c, l.side = n, v.width = s.width, v.height = s.height, g.x = e.left + e.width / 2, g.y = e.top + e.height / 2, k.value = !0;
58
+ ), l.top = f, l.left = c, l.side = n, v.width = s.width, v.height = s.height, g.x = e.left + e.width / 2, g.y = e.top + e.height / 2, E.value = !0;
59
59
  }
60
60
  const J = B(() => ({
61
61
  top: `${l.top}px`,
62
62
  left: `${l.left}px`,
63
63
  maxWidth: typeof t.maxWidth == "number" ? `${t.maxWidth}px` : t.maxWidth,
64
- visibility: k.value ? void 0 : "hidden",
64
+ visibility: E.value ? void 0 : "hidden",
65
65
  ...t.zIndex !== "auto" ? { zIndex: t.zIndex } : {}
66
66
  }));
67
67
  function z(o, i) {
@@ -78,29 +78,29 @@ const ct = ["id", "data-state"], C = 11.314, T = 16, p = 8, Ot = /* @__PURE__ */
78
78
  function r() {
79
79
  nt(q);
80
80
  }
81
- function E(o) {
81
+ function k(o) {
82
82
  o.key === "Escape" && m("close");
83
83
  }
84
- const { visible: Q, dataState: Y } = dt(
84
+ const { visible: Q, dataState: Y } = rt(
85
85
  X,
86
- at,
86
+ lt,
87
87
  {
88
88
  onOpen: () => {
89
- k.value = !1, document.addEventListener("keydown", E), window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), r();
89
+ E.value = !1, document.addEventListener("keydown", k), window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), r();
90
90
  },
91
91
  onCloseStart: () => {
92
- document.removeEventListener("keydown", E), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
92
+ document.removeEventListener("keydown", k), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
93
93
  }
94
94
  }
95
95
  );
96
96
  let b, h;
97
97
  return tt(y, (o) => {
98
- b?.(), h?.disconnect(), o ? (b = st(o, () => m("close"), {
98
+ b?.(), h?.disconnect(), o ? (b = it(o, () => m("close"), {
99
99
  ignore: () => [t.anchor]
100
100
  }), h = new ResizeObserver(r), h.observe(o)) : (b = void 0, h = void 0);
101
101
  }), et(() => {
102
- b?.(), h?.disconnect(), document.removeEventListener("keydown", E), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
103
- }), (o, i) => d(W) ? ($(), D(d(lt), {
102
+ b?.(), h?.disconnect(), document.removeEventListener("keydown", k), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
103
+ }), (o, i) => d(W) ? ($(), D(d(st), {
104
104
  key: 0,
105
105
  open: a.open,
106
106
  label: a.mobileLabel,
@@ -115,7 +115,7 @@ const ct = ["id", "data-state"], C = 11.314, T = 16, p = 8, Ot = /* @__PURE__ */
115
115
  ], 16)
116
116
  ]),
117
117
  _: 3
118
- }, 8, ["open", "label", "test-id"])) : d(Q) ? ($(), D(rt, { key: 1 }, {
118
+ }, 8, ["open", "label", "test-id"])) : d(Q) ? ($(), D(at, { key: 1 }, {
119
119
  default: _(() => [
120
120
  u("div", O({
121
121
  id: a.contentId,
@@ -4,29 +4,28 @@ import O from "./TooltipContent.vue.js";
4
4
  import { createTooltipControl as v } from "./tooltipControl.util.js";
5
5
  const L = ["top", "right", "bottom", "left"], h = ["start", "center", "end"], D = 200, M = 100, y = "sm", s = /* @__PURE__ */ new WeakMap();
6
6
  let A = 0;
7
- function a(e) {
8
- const o = e.value, t = typeof o == "string" ? { text: o } : o ?? {}, n = L.find((i) => e.modifiers[i]), r = h.find((i) => e.modifiers[i]);
7
+ function d(o) {
8
+ const e = o.value, t = typeof e == "string" ? { text: e } : e ?? {}, n = L.find((i) => o.modifiers[i]), r = h.find((i) => o.modifiers[i]);
9
9
  return {
10
10
  ...n ? { side: n } : {},
11
11
  ...r ? { align: r } : {},
12
12
  ...t
13
13
  };
14
14
  }
15
- function l(e) {
16
- return !e.disabled && !!e.text;
15
+ function l(o) {
16
+ return !o.disabled && !!o.text;
17
17
  }
18
- function m(e) {
19
- return I.isSmaller(
20
- e.breakpointMobile ?? y
21
- );
18
+ function m(o) {
19
+ const e = o.breakpointMobile ?? y;
20
+ return e === !1 ? !1 : I.isSmaller(e);
22
21
  }
23
- function b(e, o) {
24
- const { options: t } = o;
22
+ function b(o, e) {
23
+ const { options: t } = e;
25
24
  p(
26
25
  E(O, {
27
- anchor: e,
28
- contentId: o.contentId,
29
- open: o.open,
26
+ anchor: o,
27
+ contentId: e.contentId,
28
+ open: e.open,
30
29
  text: t.text,
31
30
  side: t.side,
32
31
  sideOffset: t.sideOffset,
@@ -37,33 +36,33 @@ function b(e, o) {
37
36
  zIndex: t.zIndex,
38
37
  breakpointMobile: t.breakpointMobile,
39
38
  mobileLabel: t.mobileLabel,
40
- onClose: () => o.control.close(),
41
- onPointerEnter: () => o.control.cancelTimers(),
42
- onPointerLeave: () => o.control.scheduleClose()
39
+ onClose: () => e.control.close(),
40
+ onPointerEnter: () => e.control.cancelTimers(),
41
+ onPointerLeave: () => e.control.scheduleClose()
43
42
  }),
44
- o.container
43
+ e.container
45
44
  );
46
45
  }
47
- function x(e, o) {
48
- o.open && !m(o.options) ? e.setAttribute("aria-describedby", o.contentId) : e.removeAttribute("aria-describedby");
46
+ function x(o, e) {
47
+ e.open && !m(e.options) ? o.setAttribute("aria-describedby", e.contentId) : o.removeAttribute("aria-describedby");
49
48
  }
50
- function C(e, o, t) {
51
- o.open !== t && (o.open = t, t && !o.container.isConnected && document.body.appendChild(o.container), x(e, o), b(e, o));
49
+ function C(o, e, t) {
50
+ e.open !== t && (e.open = t, t && !e.container.isConnected && document.body.appendChild(e.container), x(o, e), b(o, e));
52
51
  }
53
- function f(e, o) {
52
+ function f(o, e) {
54
53
  const t = [];
55
- function n(c, d) {
56
- e.addEventListener(c, d), t.push(() => e.removeEventListener(c, d));
54
+ function n(c, a) {
55
+ o.addEventListener(c, a), t.push(() => o.removeEventListener(c, a));
57
56
  }
58
57
  const r = v({
59
58
  isOpen: () => i.open,
60
- setOpen: (c) => C(e, i, c),
59
+ setOpen: (c) => C(o, i, c),
61
60
  openDelay: () => i.options.openDelay ?? D,
62
61
  closeDelay: () => i.options.closeDelay ?? M,
63
62
  disabled: () => !l(i.options),
64
63
  isMobile: () => m(i.options)
65
64
  }), i = {
66
- options: o,
65
+ options: e,
67
66
  open: !1,
68
67
  contentId: `tooltip-directive-${++A}`,
69
68
  container: document.createElement("div"),
@@ -72,31 +71,31 @@ function f(e, o) {
72
71
  };
73
72
  return n("mouseenter", r.handleMouseEnter), n("mouseleave", r.handleMouseLeave), n("focusin", r.handleFocusIn), n("focusout", r.handleFocusOut), n("pointerdown", r.handlePointerDown), n("click", r.handleClick), i;
74
73
  }
75
- function u(e, o) {
76
- o.control.destroy();
77
- for (const t of o.unlisten) t();
78
- p(null, o.container), o.container.remove(), e.removeAttribute("aria-describedby"), s.delete(e);
74
+ function u(o, e) {
75
+ e.control.destroy();
76
+ for (const t of e.unlisten) t();
77
+ p(null, e.container), e.container.remove(), o.removeAttribute("aria-describedby"), s.delete(o);
79
78
  }
80
79
  const F = {
81
- mounted(e, o) {
82
- const t = a(o);
83
- l(t) && s.set(e, f(e, t));
80
+ mounted(o, e) {
81
+ const t = d(e);
82
+ l(t) && s.set(o, f(o, t));
84
83
  },
85
- updated(e, o) {
86
- const t = a(o), n = s.get(e);
84
+ updated(o, e) {
85
+ const t = d(e), n = s.get(o);
87
86
  if (!n) {
88
- l(t) && s.set(e, f(e, t));
87
+ l(t) && s.set(o, f(o, t));
89
88
  return;
90
89
  }
91
90
  if (n.options = t, !l(t)) {
92
- n.control.close(), u(e, n);
91
+ n.control.close(), u(o, n);
93
92
  return;
94
93
  }
95
- n.open && b(e, n);
94
+ n.open && b(o, n);
96
95
  },
97
- beforeUnmount(e) {
98
- const o = s.get(e);
99
- o && u(e, o);
96
+ beforeUnmount(o) {
97
+ const e = s.get(o);
98
+ e && u(o, e);
100
99
  }
101
100
  };
102
101
  export {
@@ -16,6 +16,8 @@ export * from './Drawer';
16
16
  export * from './DropdownMenu';
17
17
  export * from './File';
18
18
  export * from './FileUpload';
19
+ export * from './FormField';
20
+ export * from './Image';
19
21
  export * from './Indicator';
20
22
  export * from './Input';
21
23
  export * from './InputNumber';
@@ -3,16 +3,16 @@ import '../../styles/tokens.css';
3
3
  import { default as t } from "./ConfirmDialog/ConfirmDialog.vue.js";
4
4
  import { default as f } from "./InputPhone/InputPhone.vue.js";
5
5
  import { default as p } from "./InputSelect/InputSelect.vue.js";
6
- import { default as m } from "./Accordion/Accordion.vue.js";
6
+ import { default as d } from "./Accordion/Accordion.vue.js";
7
7
  import { default as u } from "./AlertDialog/AlertDialog.vue.js";
8
8
  import { default as i } from "./Badge/Badge.vue.js";
9
9
  import { default as D } from "./BottomSheet/BottomSheet.vue.js";
10
10
  import { default as S } from "./Breadcrumb/Breadcrumb.vue.js";
11
11
  import { default as A } from "./Button/Button.vue.js";
12
- import { default as c } from "./Calendar/Calendar.vue.js";
12
+ import { default as L } from "./Calendar/Calendar.vue.js";
13
13
  import { default as _ } from "./Checkbox/Checkbox.vue.js";
14
- import { default as P } from "./Combobox/Combobox.vue.js";
15
- import { DEFAULT_DAY_LABELS as I, DEFAULT_DAY_SHORT_LABELS as F, SCHEDULE_DAYS as U } from "./Schedule/Schedule.util.js";
14
+ import { default as I } from "./Combobox/Combobox.vue.js";
15
+ import { DEFAULT_DAY_LABELS as E, DEFAULT_DAY_SHORT_LABELS as F, SCHEDULE_DAYS as U } from "./Schedule/Schedule.util.js";
16
16
  import { default as B } from "./DataTable/DataTable.vue.js";
17
17
  import { default as H } from "./DataTable/DataTableBody.vue.js";
18
18
  import { default as R } from "./DataTable/DataTableFooter.vue.js";
@@ -29,49 +29,52 @@ import { default as ae } from "./File/File.vue.js";
29
29
  import { default as te } from "./File/FilePreviewDialog.vue.js";
30
30
  import { default as fe } from "./FileUpload/FileUpload.vue.js";
31
31
  import { default as pe } from "./FileUpload/FileUploadInline.vue.js";
32
- import { default as me } from "./Indicator/Indicator.vue.js";
33
- import { default as ue } from "./Input/Input.vue.js";
34
- import { default as ie } from "./InputNumber/InputNumber.vue.js";
35
- import { default as De } from "./Message/Message.vue.js";
36
- import { default as Se } from "./OTPCode/OTPCode.vue.js";
37
- import { PHONE_MASK_PLACEHOLDER as Ae, extractPhoneDigits as Le, formatPhone as ce } from "./InputPhone/phoneMask.util.js";
38
- import { default as _e } from "./Pagination/Pagination.vue.js";
39
- import { default as Pe } from "./Pagination/PaginationPageSize.vue.js";
40
- import { default as Ie } from "./Popover/Popover.vue.js";
41
- import { default as Ue } from "./Radio/Radio.vue.js";
42
- import { default as Be } from "./Radio/RadioGroup.vue.js";
43
- import { default as He } from "./Radio/RadioMarker.vue.js";
44
- import { default as Re } from "./Schedule/Schedule.vue.js";
45
- import { default as we } from "./Select/Select.vue.js";
46
- import { default as Ne } from "./Stepper/Stepper.vue.js";
47
- import { default as ye } from "./Stepper/StepperItem.vue.js";
48
- import { default as Ge } from "./Switch/Switch.vue.js";
49
- import { TOAST_DEFAULT_DURATION_MS as je, TOAST_DEFAULT_LIMIT as qe, toast as Je, useToast as Qe } from "./Toast/useToast.js";
50
- import { default as We } from "./Tabs/Tabs.vue.js";
51
- import { default as Ze } from "./Tabs/TabsContent.vue.js";
52
- import { default as ea } from "./Tabs/TabsCounter.vue.js";
53
- import { default as oa } from "./Tabs/TabsList.vue.js";
54
- import { default as ra } from "./Tabs/TabsTrigger.vue.js";
55
- import { default as la } from "./Tag/Tag.vue.js";
56
- import { default as da } from "./Textarea/Textarea.vue.js";
57
- import { default as sa } from "./Toast/Toast.vue.js";
58
- import { default as xa } from "./Toast/Toaster.vue.js";
59
- import { default as Ta } from "./Tooltip/Tooltip.vue.js";
60
- import { confirmState as na, useConfirm as Sa } from "./ConfirmDialog/useConfirm.js";
61
- import { createDataTableColumns as Aa } from "./DataTable/DataTable.columns.js";
62
- import { vTooltip as ca } from "./Tooltip/vTooltip.directive.js";
32
+ import { default as de } from "./FormField/FormField.vue.js";
33
+ import { default as ue } from "./Image/Image.vue.js";
34
+ import { default as ie } from "./Image/ImageList.vue.js";
35
+ import { default as De } from "./Indicator/Indicator.vue.js";
36
+ import { default as Se } from "./Input/Input.vue.js";
37
+ import { default as Ae } from "./InputNumber/InputNumber.vue.js";
38
+ import { default as Le } from "./Message/Message.vue.js";
39
+ import { default as _e } from "./OTPCode/OTPCode.vue.js";
40
+ import { PHONE_MASK_PLACEHOLDER as Ie, extractPhoneDigits as Pe, formatPhone as Ee } from "./InputPhone/phoneMask.util.js";
41
+ import { default as Ue } from "./Pagination/Pagination.vue.js";
42
+ import { default as Be } from "./Pagination/PaginationPageSize.vue.js";
43
+ import { default as He } from "./Popover/Popover.vue.js";
44
+ import { default as Re } from "./Radio/Radio.vue.js";
45
+ import { default as we } from "./Radio/RadioGroup.vue.js";
46
+ import { default as Ne } from "./Radio/RadioMarker.vue.js";
47
+ import { default as ye } from "./Schedule/Schedule.vue.js";
48
+ import { default as Ge } from "./Select/Select.vue.js";
49
+ import { default as je } from "./Stepper/Stepper.vue.js";
50
+ import { default as Je } from "./Stepper/StepperItem.vue.js";
51
+ import { default as Ve } from "./Switch/Switch.vue.js";
52
+ import { TOAST_DEFAULT_DURATION_MS as Xe, TOAST_DEFAULT_LIMIT as Ze, toast as $e, useToast as ea } from "./Toast/useToast.js";
53
+ import { default as oa } from "./Tabs/Tabs.vue.js";
54
+ import { default as ra } from "./Tabs/TabsContent.vue.js";
55
+ import { default as la } from "./Tabs/TabsCounter.vue.js";
56
+ import { default as ma } from "./Tabs/TabsList.vue.js";
57
+ import { default as sa } from "./Tabs/TabsTrigger.vue.js";
58
+ import { default as xa } from "./Tag/Tag.vue.js";
59
+ import { default as Ta } from "./Textarea/Textarea.vue.js";
60
+ import { default as na } from "./Toast/Toast.vue.js";
61
+ import { default as ba } from "./Toast/Toaster.vue.js";
62
+ import { default as ga } from "./Tooltip/Tooltip.vue.js";
63
+ import { confirmState as ca, useConfirm as _a } from "./ConfirmDialog/useConfirm.js";
64
+ import { createDataTableColumns as Ia } from "./DataTable/DataTable.columns.js";
65
+ import { vTooltip as Ea } from "./Tooltip/vTooltip.directive.js";
63
66
  export {
64
- m as Accordion,
67
+ d as Accordion,
65
68
  u as AlertDialog,
66
69
  i as Badge,
67
70
  D as BottomSheet,
68
71
  S as Breadcrumb,
69
72
  A as Button,
70
- c as Calendar,
73
+ L as Calendar,
71
74
  _ as Checkbox,
72
- P as Combobox,
75
+ I as Combobox,
73
76
  t as ConfirmDialog,
74
- I as DEFAULT_DAY_LABELS,
77
+ E as DEFAULT_DAY_LABELS,
75
78
  F as DEFAULT_DAY_SHORT_LABELS,
76
79
  B as DataTable,
77
80
  H as DataTableBody,
@@ -89,44 +92,47 @@ export {
89
92
  te as FilePreviewDialog,
90
93
  fe as FileUpload,
91
94
  pe as FileUploadInline,
92
- me as Indicator,
93
- ue as Input,
94
- ie as InputNumber,
95
+ de as FormField,
96
+ ue as Image,
97
+ ie as ImageList,
98
+ De as Indicator,
99
+ Se as Input,
100
+ Ae as InputNumber,
95
101
  f as InputPhone,
96
102
  p as InputSelect,
97
- De as Message,
98
- Se as OTPCode,
99
- Ae as PHONE_MASK_PLACEHOLDER,
100
- _e as Pagination,
101
- Pe as PaginationPageSize,
102
- Ie as Popover,
103
- Ue as Radio,
104
- Be as RadioGroup,
105
- He as RadioMarker,
103
+ Le as Message,
104
+ _e as OTPCode,
105
+ Ie as PHONE_MASK_PLACEHOLDER,
106
+ Ue as Pagination,
107
+ Be as PaginationPageSize,
108
+ He as Popover,
109
+ Re as Radio,
110
+ we as RadioGroup,
111
+ Ne as RadioMarker,
106
112
  U as SCHEDULE_DAYS,
107
- Re as Schedule,
108
- we as Select,
109
- Ne as Stepper,
110
- ye as StepperItem,
111
- Ge as Switch,
112
- je as TOAST_DEFAULT_DURATION_MS,
113
- qe as TOAST_DEFAULT_LIMIT,
114
- We as Tabs,
115
- Ze as TabsContent,
116
- ea as TabsCounter,
117
- oa as TabsList,
118
- ra as TabsTrigger,
119
- la as Tag,
120
- da as Textarea,
121
- sa as Toast,
122
- xa as Toaster,
123
- Ta as Tooltip,
124
- na as confirmState,
125
- Aa as createDataTableColumns,
126
- Le as extractPhoneDigits,
127
- ce as formatPhone,
128
- Je as toast,
129
- Sa as useConfirm,
130
- Qe as useToast,
131
- ca as vTooltip
113
+ ye as Schedule,
114
+ Ge as Select,
115
+ je as Stepper,
116
+ Je as StepperItem,
117
+ Ve as Switch,
118
+ Xe as TOAST_DEFAULT_DURATION_MS,
119
+ Ze as TOAST_DEFAULT_LIMIT,
120
+ oa as Tabs,
121
+ ra as TabsContent,
122
+ la as TabsCounter,
123
+ ma as TabsList,
124
+ sa as TabsTrigger,
125
+ xa as Tag,
126
+ Ta as Textarea,
127
+ na as Toast,
128
+ ba as Toaster,
129
+ ga as Tooltip,
130
+ ca as confirmState,
131
+ Ia as createDataTableColumns,
132
+ Pe as extractPhoneDigits,
133
+ Ee as formatPhone,
134
+ $e as toast,
135
+ _a as useConfirm,
136
+ ea as useToast,
137
+ Ea as vTooltip
132
138
  };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Проверка «это элемент DOM», пригодная для рендера на сервере.
3
+ *
4
+ * Писать `node instanceof HTMLElement` напрямую нельзя: в Node глобального
5
+ * `HTMLElement` нет, и само обращение к имени роняет рендер с
6
+ * `ReferenceError`. Ловушка не теоретическая — `watchEffect` без коллбэка Vue
7
+ * выполняет один раз и на сервере, поэтому любая такая проверка в эффекте
8
+ * срабатывает при SSR, когда ref шаблона ещё null.
9
+ *
10
+ * `typeof` — единственная конструкция, которой необъявленный идентификатор не
11
+ * страшен, поэтому порядок операндов важен и менять его нельзя.
12
+ */
13
+ export declare function isHtmlElement(node: unknown): node is HTMLElement;
14
+ /** То же самое для `<input>`: на сервере `HTMLInputElement` тоже отсутствует. */
15
+ export declare function isHtmlInputElement(node: unknown): node is HTMLInputElement;