@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.
- package/dist/components/AlertDialog/AlertDialogAction.vue.js +2 -3
- package/dist/components/AlertDialog/AlertDialogCancel.vue.js +8 -9
- package/dist/components/AlertDialog/AlertDialogTrigger.vue.js +7 -8
- package/dist/components/Button/Button.css +1 -1
- package/dist/components/Button/Button.vue.js +5 -52
- package/dist/components/Button/Button.vue2.js +52 -3
- package/dist/components/Calendar/CalendarNext.vue.js +3 -4
- package/dist/components/Calendar/CalendarPrev.vue.js +7 -8
- package/dist/components/ConfirmDialog/ConfirmDialog.vue2.js +11 -12
- package/dist/components/DatePicker/DatePickerNext.vue.js +1 -2
- package/dist/components/DatePicker/DatePickerPrev.vue.js +7 -8
- package/dist/components/DateRangePicker/DateRangePickerNext.vue.js +6 -7
- package/dist/components/DateRangePicker/DateRangePickerPrev.vue.js +7 -8
- package/dist/components/RangeCalendar/RangeCalendarNext.vue.js +3 -4
- package/dist/components/RangeCalendar/RangeCalendarPrev.vue.js +3 -4
- package/dist/components/Schedule/Schedule.vue2.js +38 -39
- package/dist/components/index.js +391 -392
- package/dist/components/v2/AlertDialog/AlertDialog.css +1 -1
- package/dist/components/v2/AlertDialog/AlertDialog.types.d.ts +2 -2
- package/dist/components/v2/AlertDialog/AlertDialog.vue.d.ts +2 -2
- package/dist/components/v2/AlertDialog/AlertDialog.vue.js +2 -2
- package/dist/components/v2/AlertDialog/AlertDialog.vue2.js +29 -29
- package/dist/components/v2/Checkbox/Checkbox.css +1 -1
- package/dist/components/v2/Checkbox/Checkbox.types.d.ts +11 -0
- package/dist/components/v2/Checkbox/Checkbox.vue.d.ts +2 -0
- package/dist/components/v2/Checkbox/Checkbox.vue.js +2 -2
- package/dist/components/v2/Checkbox/Checkbox.vue2.js +61 -49
- package/dist/components/v2/Combobox/Combobox.css +1 -1
- package/dist/components/v2/Combobox/Combobox.types.d.ts +14 -2
- package/dist/components/v2/Combobox/Combobox.vue.js +1 -1
- package/dist/components/v2/Combobox/Combobox.vue2.js +190 -181
- package/dist/components/v2/ConfirmDialog/ConfirmDialog.types.d.ts +2 -2
- package/dist/components/v2/ConfirmDialog/ConfirmDialog.vue.d.ts +2 -2
- package/dist/components/v2/ConfirmDialog/ConfirmDialog.vue.js +6 -6
- package/dist/components/v2/DatePicker/DatePicker.css +1 -1
- package/dist/components/v2/DatePicker/DatePicker.types.d.ts +2 -2
- package/dist/components/v2/DatePicker/DatePicker.vue.d.ts +2 -2
- package/dist/components/v2/DatePicker/DatePicker.vue.js +2 -2
- package/dist/components/v2/DatePicker/DatePicker.vue2.js +54 -54
- package/dist/components/v2/Divider/Divider.types.d.ts +8 -0
- package/dist/components/v2/DropdownMenu/DropdownMenu.types.d.ts +2 -2
- package/dist/components/v2/DropdownMenu/DropdownMenu.vue.d.ts +2 -2
- package/dist/components/v2/DropdownMenu/DropdownMenu.vue2.js +6 -6
- package/dist/components/v2/FileUpload/FileUpload.css +1 -1
- package/dist/components/v2/FileUpload/FileUpload.vue.js +2 -2
- package/dist/components/v2/FileUpload/FileUpload.vue2.js +16 -16
- package/dist/components/v2/FormField/FormField.css +1 -0
- package/dist/components/v2/FormField/FormField.types.d.ts +48 -0
- package/dist/components/v2/FormField/FormField.vue.d.ts +25 -0
- package/dist/components/v2/FormField/FormField.vue.js +8 -0
- package/dist/components/v2/FormField/FormField.vue2.js +54 -0
- package/dist/components/v2/FormField/index.d.ts +3 -0
- package/dist/components/v2/Image/Image.css +1 -0
- package/dist/components/v2/Image/Image.types.d.ts +26 -0
- package/dist/components/v2/Image/Image.vue.d.ts +16 -0
- package/dist/components/v2/Image/Image.vue.js +8 -0
- package/dist/components/v2/Image/Image.vue2.js +91 -0
- package/dist/components/v2/Image/ImageList.css +1 -0
- package/dist/components/v2/Image/ImageList.types.d.ts +28 -0
- package/dist/components/v2/Image/ImageList.vue.d.ts +15 -0
- package/dist/components/v2/Image/ImageList.vue.js +8 -0
- package/dist/components/v2/Image/ImageList.vue2.js +38 -0
- package/dist/components/v2/Image/index.d.ts +5 -0
- package/dist/components/v2/InputNumber/InputNumber.css +1 -1
- package/dist/components/v2/InputNumber/InputNumber.vue.js +2 -2
- package/dist/components/v2/InputNumber/InputNumber.vue2.js +22 -21
- package/dist/components/v2/InputSelect/InputSelect.types.d.ts +2 -2
- package/dist/components/v2/InputSelect/InputSelect.vue.d.ts +2 -2
- package/dist/components/v2/InputSelect/InputSelect.vue.js +14 -14
- package/dist/components/v2/InputSelect/InputSelectChip.css +1 -1
- package/dist/components/v2/InputSelect/InputSelectChip.vue.d.ts +3 -3
- package/dist/components/v2/InputSelect/InputSelectChip.vue.js +2 -2
- package/dist/components/v2/InputSelect/InputSelectChip.vue2.js +17 -17
- package/dist/components/v2/Popover/Popover.css +1 -1
- package/dist/components/v2/Popover/Popover.types.d.ts +2 -2
- package/dist/components/v2/Popover/Popover.vue.d.ts +2 -2
- package/dist/components/v2/Popover/Popover.vue.js +2 -2
- package/dist/components/v2/Popover/Popover.vue2.js +24 -24
- package/dist/components/v2/Radio/Radio.css +1 -1
- package/dist/components/v2/Radio/Radio.vue.d.ts +4 -0
- package/dist/components/v2/Radio/Radio.vue.js +1 -1
- package/dist/components/v2/Radio/Radio.vue2.js +57 -49
- package/dist/components/v2/Schedule/Schedule.css +1 -1
- package/dist/components/v2/Schedule/Schedule.types.d.ts +2 -2
- package/dist/components/v2/Schedule/Schedule.vue.d.ts +2 -2
- package/dist/components/v2/Schedule/Schedule.vue.js +3 -3
- package/dist/components/v2/Schedule/Schedule.vue2.js +55 -55
- package/dist/components/v2/Select/Select.css +1 -1
- package/dist/components/v2/Select/Select.types.d.ts +8 -2
- package/dist/components/v2/Select/Select.vue.js +3 -3
- package/dist/components/v2/Select/Select.vue2.js +102 -92
- package/dist/components/v2/Toast/Toast.types.d.ts +2 -2
- package/dist/components/v2/Toast/Toaster.css +1 -1
- package/dist/components/v2/Toast/Toaster.vue.d.ts +2 -2
- package/dist/components/v2/Toast/Toaster.vue.js +1 -1
- package/dist/components/v2/Toast/Toaster.vue2.js +17 -17
- package/dist/components/v2/Tooltip/Tooltip.css +1 -1
- package/dist/components/v2/Tooltip/Tooltip.types.d.ts +2 -2
- package/dist/components/v2/Tooltip/Tooltip.vue.d.ts +2 -2
- package/dist/components/v2/Tooltip/Tooltip.vue.js +1 -1
- package/dist/components/v2/Tooltip/Tooltip.vue2.js +39 -38
- package/dist/components/v2/Tooltip/TooltipContent.css +1 -1
- package/dist/components/v2/Tooltip/TooltipContent.vue.d.ts +2 -2
- package/dist/components/v2/Tooltip/TooltipContent.vue.js +2 -2
- package/dist/components/v2/Tooltip/TooltipContent.vue2.js +20 -20
- package/dist/components/v2/Tooltip/vTooltip.directive.js +40 -41
- package/dist/components/v2/index.d.ts +2 -0
- package/dist/components/v2/index.js +82 -76
- package/dist/components/v2/shared/isHtmlElement.util.d.ts +15 -0
- package/dist/components/v2/shared/isHtmlElement.util.js +10 -0
- package/dist/components/v2/shared/useIsMobile.util.d.ts +13 -0
- package/dist/components/v2/shared/useIsMobile.util.js +8 -0
- package/dist/components/v2/shared/useTriggerAria.util.js +4 -3
- package/dist/types/global.types.d.ts +10 -0
- 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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import R from "
|
|
5
|
-
import
|
|
6
|
-
|
|
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(
|
|
30
|
-
const a =
|
|
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: (
|
|
33
|
-
s.value =
|
|
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
|
-
}),
|
|
40
|
+
}), r = y(null);
|
|
40
41
|
return m(() => {
|
|
41
42
|
s.value;
|
|
42
|
-
const
|
|
43
|
-
|
|
43
|
+
const l = u.value, o = l?.firstElementChild;
|
|
44
|
+
r.value = T(o) ? o : l ?? null;
|
|
44
45
|
}), m(() => {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
}),
|
|
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
|
-
(
|
|
50
|
-
|
|
50
|
+
(l) => {
|
|
51
|
+
l && e.close();
|
|
51
52
|
}
|
|
52
|
-
), w(e.destroy), (
|
|
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
|
-
}, { ...
|
|
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(
|
|
72
|
+
b(l.$slots, "trigger", {}, void 0, !0)
|
|
72
73
|
], 16),
|
|
73
|
-
E(
|
|
74
|
-
anchor:
|
|
75
|
-
"content-id":
|
|
74
|
+
E(z, {
|
|
75
|
+
anchor: r.value,
|
|
76
|
+
"content-id": d,
|
|
76
77
|
open: s.value,
|
|
77
|
-
side:
|
|
78
|
-
"side-offset":
|
|
79
|
-
align:
|
|
80
|
-
"align-offset":
|
|
81
|
-
arrow:
|
|
82
|
-
"max-width":
|
|
83
|
-
"z-index":
|
|
84
|
-
"breakpoint-mobile":
|
|
85
|
-
"mobile-label":
|
|
86
|
-
"test-id":
|
|
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(
|
|
93
|
-
P(
|
|
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
|
-
|
|
103
|
+
j as default
|
|
103
104
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tooltip-sheet[data-v-
|
|
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 {
|
|
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:
|
|
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
|
|
5
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4699364e"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
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 {
|
|
3
|
-
import
|
|
4
|
-
import lt from "../
|
|
5
|
-
import
|
|
6
|
-
import rt from "../shared/
|
|
7
|
-
import {
|
|
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 =
|
|
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 }),
|
|
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,
|
|
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:
|
|
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
|
|
81
|
+
function k(o) {
|
|
82
82
|
o.key === "Escape" && m("close");
|
|
83
83
|
}
|
|
84
|
-
const { visible: Q, dataState: Y } =
|
|
84
|
+
const { visible: Q, dataState: Y } = rt(
|
|
85
85
|
X,
|
|
86
|
-
|
|
86
|
+
lt,
|
|
87
87
|
{
|
|
88
88
|
onOpen: () => {
|
|
89
|
-
|
|
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",
|
|
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 =
|
|
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",
|
|
103
|
-
}), (o, i) => d(W) ? ($(), D(d(
|
|
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(
|
|
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
|
|
8
|
-
const
|
|
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(
|
|
16
|
-
return !
|
|
15
|
+
function l(o) {
|
|
16
|
+
return !o.disabled && !!o.text;
|
|
17
17
|
}
|
|
18
|
-
function m(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
18
|
+
function m(o) {
|
|
19
|
+
const e = o.breakpointMobile ?? y;
|
|
20
|
+
return e === !1 ? !1 : I.isSmaller(e);
|
|
22
21
|
}
|
|
23
|
-
function b(
|
|
24
|
-
const { options: t } =
|
|
22
|
+
function b(o, e) {
|
|
23
|
+
const { options: t } = e;
|
|
25
24
|
p(
|
|
26
25
|
E(O, {
|
|
27
|
-
anchor:
|
|
28
|
-
contentId:
|
|
29
|
-
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: () =>
|
|
41
|
-
onPointerEnter: () =>
|
|
42
|
-
onPointerLeave: () =>
|
|
39
|
+
onClose: () => e.control.close(),
|
|
40
|
+
onPointerEnter: () => e.control.cancelTimers(),
|
|
41
|
+
onPointerLeave: () => e.control.scheduleClose()
|
|
43
42
|
}),
|
|
44
|
-
|
|
43
|
+
e.container
|
|
45
44
|
);
|
|
46
45
|
}
|
|
47
|
-
function x(
|
|
48
|
-
|
|
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(
|
|
51
|
-
|
|
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(
|
|
52
|
+
function f(o, e) {
|
|
54
53
|
const t = [];
|
|
55
|
-
function n(c,
|
|
56
|
-
|
|
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(
|
|
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:
|
|
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(
|
|
76
|
-
|
|
77
|
-
for (const t of
|
|
78
|
-
p(null,
|
|
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(
|
|
82
|
-
const t =
|
|
83
|
-
l(t) && s.set(
|
|
80
|
+
mounted(o, e) {
|
|
81
|
+
const t = d(e);
|
|
82
|
+
l(t) && s.set(o, f(o, t));
|
|
84
83
|
},
|
|
85
|
-
updated(
|
|
86
|
-
const t =
|
|
84
|
+
updated(o, e) {
|
|
85
|
+
const t = d(e), n = s.get(o);
|
|
87
86
|
if (!n) {
|
|
88
|
-
l(t) && s.set(
|
|
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(
|
|
91
|
+
n.control.close(), u(o, n);
|
|
93
92
|
return;
|
|
94
93
|
}
|
|
95
|
-
n.open && b(
|
|
94
|
+
n.open && b(o, n);
|
|
96
95
|
},
|
|
97
|
-
beforeUnmount(
|
|
98
|
-
const
|
|
99
|
-
|
|
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
|
|
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
|
|
12
|
+
import { default as L } from "./Calendar/Calendar.vue.js";
|
|
13
13
|
import { default as _ } from "./Checkbox/Checkbox.vue.js";
|
|
14
|
-
import { default as
|
|
15
|
-
import { DEFAULT_DAY_LABELS as
|
|
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
|
|
33
|
-
import { default as ue } from "./
|
|
34
|
-
import { default as ie } from "./
|
|
35
|
-
import { default as De } from "./
|
|
36
|
-
import { default as Se } from "./
|
|
37
|
-
import {
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import {
|
|
41
|
-
import { default as Ue } from "./
|
|
42
|
-
import { default as Be } from "./
|
|
43
|
-
import { default as He } from "./
|
|
44
|
-
import { default as Re } from "./
|
|
45
|
-
import { default as we } from "./
|
|
46
|
-
import { default as Ne } from "./
|
|
47
|
-
import { default as ye } from "./
|
|
48
|
-
import { default as Ge } from "./
|
|
49
|
-
import {
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import {
|
|
53
|
-
import { default as oa } from "./Tabs/
|
|
54
|
-
import { default as ra } from "./Tabs/
|
|
55
|
-
import { default as la } from "./
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as sa } from "./
|
|
58
|
-
import { default as xa } from "./
|
|
59
|
-
import { default as Ta } from "./
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
73
|
+
L as Calendar,
|
|
71
74
|
_ as Checkbox,
|
|
72
|
-
|
|
75
|
+
I as Combobox,
|
|
73
76
|
t as ConfirmDialog,
|
|
74
|
-
|
|
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
|
-
|
|
93
|
-
ue as
|
|
94
|
-
ie as
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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;
|