@vavt/react-ui 1.2.2 → 1.2.3
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/{Cron-DIB4GG4y.js → Cron-C3yEuafY.js} +3 -3
- package/dist/{Cron-MhbYMEeJ.cjs → Cron-DyBHGiUj.cjs} +1 -1
- package/dist/{DatePicker-Bj709smn.cjs → DatePicker-3DRaRPjg.cjs} +1 -1
- package/dist/{DatePicker--13tW0cw.js → DatePicker-IFns1yBl.js} +1 -1
- package/dist/{DateTimePicker-ZSScsk-j.cjs → DateTimePicker-Bml1FgyN.cjs} +1 -1
- package/dist/{DateTimePicker-Blqs2Bcv.js → DateTimePicker-DnXBZTg0.js} +1 -1
- package/dist/{Drawer-yM_r1M0H.js → Drawer-B4vSd2iq.js} +5 -4
- package/dist/Drawer-NyC3NpBR.cjs +1 -0
- package/dist/{Dropdown-mYCY-LcF.js → Dropdown-CI_C-qdP.js} +3 -3
- package/dist/{Dropdown-PHqXNiAZ.cjs → Dropdown-DPY4QNdT.cjs} +1 -1
- package/dist/{Form-BkyDHPEI.cjs → Form-BMXJJ8bX.cjs} +1 -1
- package/dist/{Form-D_Uv-8HG.js → Form-BvCSJ23z.js} +1 -1
- package/dist/MessageBox-70-7jPWP.cjs +1 -0
- package/dist/MessageBox-BeEgyiwR.js +166 -0
- package/dist/Modal-BYKseLTT.cjs +1 -0
- package/dist/{Modal-Du7aVdWl.js → Modal-DWKzYEN8.js} +7 -6
- package/dist/{Pagination-DatEegaF.cjs → Pagination-Bi6z9CZE.cjs} +1 -1
- package/dist/{Pagination-CpbboRbF.js → Pagination-CXJBTKHs.js} +1 -1
- package/dist/{Select-BHWa_6Q2.js → Select-DaIhlOMK.js} +3 -3
- package/dist/{Select-C6O0tmM_.cjs → Select-YUrncvbr.cjs} +1 -1
- package/dist/{Table-Cfs3XJgN.js → Table-8KkwnZom.js} +1 -1
- package/dist/{Table-BNGO_7Rx.cjs → Table-DVb-ByCJ.cjs} +1 -1
- package/dist/{TimePicker-DoGbwfkU.cjs → TimePicker-CZAlhs_F.cjs} +1 -1
- package/dist/{TimePicker-CYlcUTTM.js → TimePicker-TtKzEbBJ.js} +3 -3
- package/dist/{Tooltip-BKPreZML.js → Tooltip-BtUDTfMB.js} +3 -3
- package/dist/{Tooltip-DDjGLjoV.cjs → Tooltip-C4CuAEie.cjs} +1 -1
- package/dist/cjs/Cron.cjs +1 -1
- package/dist/cjs/DatePicker.cjs +1 -1
- package/dist/cjs/DateTimePicker.cjs +1 -1
- package/dist/cjs/Drawer.cjs +1 -1
- package/dist/cjs/Dropdown.cjs +1 -1
- package/dist/cjs/Form.cjs +1 -1
- package/dist/cjs/MessageBox.cjs +1 -1
- package/dist/cjs/Modal.cjs +1 -1
- package/dist/cjs/Pagination.cjs +1 -1
- package/dist/cjs/Select.cjs +1 -1
- package/dist/cjs/Table.cjs +1 -1
- package/dist/cjs/TimePicker.cjs +1 -1
- package/dist/cjs/Tooltip.cjs +1 -1
- package/dist/cjs/global.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/register.cjs +1 -1
- package/dist/css/Modal.css +1 -1
- package/dist/{date-picker-Be_1wA3S.cjs → date-picker-Yq0xV3y8.cjs} +1 -1
- package/dist/{date-picker-CHP0eBuL.js → date-picker-tq5q60JP.js} +4 -4
- package/dist/dialog-shell-B7mE8A1p.cjs +1 -0
- package/dist/dialog-shell-FS5nSlBm.js +118 -0
- package/dist/es/Cron.mjs +1 -1
- package/dist/es/DatePicker.mjs +1 -1
- package/dist/es/DateTimePicker.mjs +1 -1
- package/dist/es/Drawer.mjs +1 -1
- package/dist/es/Dropdown.mjs +1 -1
- package/dist/es/Form.mjs +1 -1
- package/dist/es/MessageBox.mjs +1 -1
- package/dist/es/Modal.mjs +1 -1
- package/dist/es/Pagination.mjs +1 -1
- package/dist/es/Select.mjs +1 -1
- package/dist/es/Table.mjs +1 -1
- package/dist/es/TimePicker.mjs +1 -1
- package/dist/es/Tooltip.mjs +1 -1
- package/dist/es/global.mjs +1 -1
- package/dist/es/index.mjs +14 -14
- package/dist/es/register.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/{layer-DDm97-sb.js → layer-C1yCY0MO.js} +1 -1
- package/dist/{layer-BgiUZy_t.cjs → layer-DL1xVbJT.cjs} +1 -1
- package/dist/{registry-BUQSQSwB.js → registry-BmoI_ib1.js} +13 -13
- package/dist/{registry-DF1N2ITX.cjs → registry-DtJjJt6v.cjs} +1 -1
- package/dist/types/_shared/dialog.d.cts +5 -1
- package/dist/types/_shared/dialog.d.ts +5 -1
- package/package.json +1 -1
- package/dist/Drawer-DcbgMkub.cjs +0 -1
- package/dist/MessageBox-D7Ib1f7K.cjs +0 -1
- package/dist/MessageBox-DDP6UWFU.js +0 -141
- package/dist/Modal-DPxZEr2v.cjs +0 -1
- package/dist/dialog-shell-CdYlPT9f.js +0 -111
- package/dist/dialog-shell-CzeGytVj.cjs +0 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { t as e } from "./effect-nifYL_rH.js";
|
|
2
|
+
import { t } from "./Transition-DiO4GsP3.js";
|
|
3
|
+
import { a as n, r } from "./focus-BDDJyKk3.js";
|
|
4
|
+
import { useCallback as i, useEffect as a, useRef as o } from "react";
|
|
5
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal as u } from "react-dom";
|
|
7
|
+
//#region components/_shared/dialog.ts
|
|
8
|
+
var d = [], f = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Map(), m = 0, h = 0, g = "", _ = "", v = "", y = (e) => (d.push(e), f.forEach((e) => e()), () => {
|
|
9
|
+
let t = d.lastIndexOf(e);
|
|
10
|
+
t >= 0 && d.splice(t, 1), f.forEach((e) => e());
|
|
11
|
+
}), b = (e) => d.at(-1) === e, x = () => [...p.values()], S = () => {
|
|
12
|
+
if (m === 0) {
|
|
13
|
+
g = document.body.style.overflow, _ = document.body.style.paddingRight;
|
|
14
|
+
let e = document.documentElement.clientWidth, t = e > 0 ? Math.max(0, window.innerWidth - e) : 0;
|
|
15
|
+
if (t > 0) {
|
|
16
|
+
let e = Number.parseFloat(window.getComputedStyle(document.body).paddingRight) || 0;
|
|
17
|
+
document.body.style.paddingRight = `${e + t}px`;
|
|
18
|
+
}
|
|
19
|
+
document.body.style.overflow = "hidden";
|
|
20
|
+
}
|
|
21
|
+
m += 1;
|
|
22
|
+
let e = !1;
|
|
23
|
+
return () => {
|
|
24
|
+
e || (e = !0, m = Math.max(0, m - 1), m === 0 && (document.body.style.overflow = g, document.body.style.paddingRight = _));
|
|
25
|
+
};
|
|
26
|
+
}, C = () => {
|
|
27
|
+
h === 0 && (v = document.body.style.userSelect, document.body.style.userSelect = "none"), h += 1;
|
|
28
|
+
let e = !1;
|
|
29
|
+
return () => {
|
|
30
|
+
e || (e = !0, h = Math.max(0, h - 1), h === 0 && (document.body.style.userSelect = v));
|
|
31
|
+
};
|
|
32
|
+
}, w = ({ active: t, layer: s, containerRef: c, closeOnPressEscape: l, lockScroll: u, onRequestClose: d }) => {
|
|
33
|
+
let m = o(Symbol("vl-dialog")), h = o(null), g = o(!1), _ = i(() => b(m.current), []);
|
|
34
|
+
return e(() => {
|
|
35
|
+
if (!t) return;
|
|
36
|
+
let e = m.current;
|
|
37
|
+
return p.set(e, s), () => {
|
|
38
|
+
p.delete(e);
|
|
39
|
+
};
|
|
40
|
+
}, [t, s]), a(() => {
|
|
41
|
+
if (!t) return;
|
|
42
|
+
let e = m.current;
|
|
43
|
+
g.current = !0, h.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
44
|
+
let i = y(e), a = u ? S() : () => {}, o = () => {
|
|
45
|
+
let e = c.current;
|
|
46
|
+
e && r(e);
|
|
47
|
+
}, s = window.requestAnimationFrame(o), p = () => {
|
|
48
|
+
b(e) && (c.current?.contains(document.activeElement) || window.requestAnimationFrame(o));
|
|
49
|
+
};
|
|
50
|
+
f.add(p);
|
|
51
|
+
let _ = (t) => {
|
|
52
|
+
if (!b(e)) return;
|
|
53
|
+
if (t.key === "Escape" && l) {
|
|
54
|
+
t.preventDefault(), d();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (t.key !== "Tab") return;
|
|
58
|
+
let r = c.current;
|
|
59
|
+
if (!r) return;
|
|
60
|
+
let i = n(r);
|
|
61
|
+
if (!i.length) {
|
|
62
|
+
t.preventDefault(), r.focus({ preventScroll: !0 });
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
let a = i[0], o = i.at(-1) ?? a, s = document.activeElement;
|
|
66
|
+
t.shiftKey && (s === a || !r.contains(s)) ? (t.preventDefault(), o.focus()) : !t.shiftKey && (s === o || !r.contains(s)) && (t.preventDefault(), a.focus());
|
|
67
|
+
}, v = (t) => {
|
|
68
|
+
if (!b(e)) return;
|
|
69
|
+
let n = c.current;
|
|
70
|
+
!n || n.contains(t.target) || r(n);
|
|
71
|
+
};
|
|
72
|
+
return document.addEventListener("keydown", _), document.addEventListener("focusin", v), () => {
|
|
73
|
+
window.cancelAnimationFrame(s), document.removeEventListener("keydown", _), document.removeEventListener("focusin", v), f.delete(p), i(), a(), g.current = !1;
|
|
74
|
+
let e = h.current;
|
|
75
|
+
h.current = null, window.requestAnimationFrame(() => {
|
|
76
|
+
!g.current && e?.isConnected && e.focus({ preventScroll: !0 });
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
}, [
|
|
80
|
+
t,
|
|
81
|
+
l,
|
|
82
|
+
c,
|
|
83
|
+
u,
|
|
84
|
+
d
|
|
85
|
+
]), { isTopLayer: _ };
|
|
86
|
+
}, T = ({ clientReady: e, open: n, mask: r, destroyOnClose: i, maskUnmountOnExit: a = !1, maskTransitionName: o, transitionName: d, maskClassName: f, panelClassName: p, panelStyle: m, maskStyle: h, panelRef: g, role: _, ariaModal: v = !0, ariaLabel: y, ariaLabelledBy: b, ariaDescribedBy: x, onMaskClick: S, onPanelClick: C, onAfterLeave: w, panelProps: T, children: E }) => e ? u(/* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(t, {
|
|
87
|
+
show: n && r,
|
|
88
|
+
name: o,
|
|
89
|
+
unmountOnExit: a,
|
|
90
|
+
children: /* @__PURE__ */ c("div", {
|
|
91
|
+
className: f,
|
|
92
|
+
style: h,
|
|
93
|
+
"aria-hidden": "true",
|
|
94
|
+
onClick: S
|
|
95
|
+
})
|
|
96
|
+
}), /* @__PURE__ */ c(t, {
|
|
97
|
+
show: n,
|
|
98
|
+
name: d,
|
|
99
|
+
unmountOnExit: i,
|
|
100
|
+
onAfterLeave: w,
|
|
101
|
+
children: /* @__PURE__ */ c("div", {
|
|
102
|
+
ref: g,
|
|
103
|
+
className: p,
|
|
104
|
+
style: m,
|
|
105
|
+
role: _,
|
|
106
|
+
"aria-modal": v,
|
|
107
|
+
"aria-label": y,
|
|
108
|
+
"aria-labelledby": b,
|
|
109
|
+
"aria-describedby": x,
|
|
110
|
+
"aria-hidden": !n || void 0,
|
|
111
|
+
tabIndex: -1,
|
|
112
|
+
onClick: C,
|
|
113
|
+
...T,
|
|
114
|
+
children: E
|
|
115
|
+
})
|
|
116
|
+
})] }), document.body) : null;
|
|
117
|
+
//#endregion
|
|
118
|
+
export { w as i, C as n, x as r, T as t };
|
package/dist/es/Cron.mjs
CHANGED
package/dist/es/DatePicker.mjs
CHANGED
package/dist/es/Drawer.mjs
CHANGED
package/dist/es/Dropdown.mjs
CHANGED
package/dist/es/Form.mjs
CHANGED
package/dist/es/MessageBox.mjs
CHANGED
package/dist/es/Modal.mjs
CHANGED
package/dist/es/Pagination.mjs
CHANGED
package/dist/es/Select.mjs
CHANGED
package/dist/es/Table.mjs
CHANGED
package/dist/es/TimePicker.mjs
CHANGED
package/dist/es/Tooltip.mjs
CHANGED
package/dist/es/global.mjs
CHANGED
package/dist/es/index.mjs
CHANGED
|
@@ -10,22 +10,22 @@ import { n as l } from "../Transition-DiO4GsP3.js";
|
|
|
10
10
|
import { n as u } from "../Input-BRy5Xuwy.js";
|
|
11
11
|
import { n as d } from "../Tabs-HWLkyrQR.js";
|
|
12
12
|
import { n as f } from "../NumberInput-CB-nKZgs.js";
|
|
13
|
-
import { n as p } from "../Cron-
|
|
14
|
-
import { n as m } from "../Dropdown-
|
|
15
|
-
import { n as h } from "../DatePicker
|
|
16
|
-
import { n as g } from "../DateTimePicker-
|
|
13
|
+
import { n as p } from "../Cron-C3yEuafY.js";
|
|
14
|
+
import { n as m } from "../Dropdown-CI_C-qdP.js";
|
|
15
|
+
import { n as h } from "../DatePicker-IFns1yBl.js";
|
|
16
|
+
import { n as g } from "../DateTimePicker-DnXBZTg0.js";
|
|
17
17
|
import { n as _ } from "../Divider-BXNZyvHY.js";
|
|
18
|
-
import { n as v } from "../Drawer-
|
|
18
|
+
import { n as v } from "../Drawer-B4vSd2iq.js";
|
|
19
19
|
import { n as y } from "../Empty-MmxZitR8.js";
|
|
20
|
-
import { n as b, t as x } from "../Form-
|
|
21
|
-
import { n as S } from "../Tooltip-
|
|
20
|
+
import { n as b, t as x } from "../Form-BvCSJ23z.js";
|
|
21
|
+
import { n as S } from "../Tooltip-BtUDTfMB.js";
|
|
22
22
|
import { n as C } from "../Loading-CL0wUgYK.js";
|
|
23
23
|
import { n as w } from "../Scrollbar-BdMGZrYi.js";
|
|
24
|
-
import { n as T } from "../Modal-
|
|
25
|
-
import { t as E } from "../MessageBox-
|
|
24
|
+
import { n as T } from "../Modal-DWKzYEN8.js";
|
|
25
|
+
import { t as E } from "../MessageBox-BeEgyiwR.js";
|
|
26
26
|
import { t as D } from "../Notification-CJraaZIi.js";
|
|
27
|
-
import { n as O } from "../Select-
|
|
28
|
-
import { n as k } from "../Pagination-
|
|
27
|
+
import { n as O } from "../Select-DaIhlOMK.js";
|
|
28
|
+
import { n as k } from "../Pagination-CXJBTKHs.js";
|
|
29
29
|
import { n as A } from "../Progress-D2C6LCml.js";
|
|
30
30
|
import { VlRadio as j, VlRadioGroup as M } from "./Radio.mjs";
|
|
31
31
|
import { VlRow as N } from "./Row.mjs";
|
|
@@ -33,11 +33,11 @@ import { n as P } from "../Sidebar-u980T-QB.js";
|
|
|
33
33
|
import { n as F } from "../Slider-CKU03SsT.js";
|
|
34
34
|
import { n as I } from "../Space-gnVH7rEt.js";
|
|
35
35
|
import { n as L } from "../Switch-CqTFvp-k.js";
|
|
36
|
-
import { n as R } from "../Table-
|
|
36
|
+
import { n as R } from "../Table-8KkwnZom.js";
|
|
37
37
|
import { n as z } from "../Tag-TeYTDdHt.js";
|
|
38
38
|
import { n as B } from "../Textarea-CA6Vzu7t.js";
|
|
39
39
|
import { n as V } from "../Timeline-euWvUS4e.js";
|
|
40
|
-
import { n as H } from "../TimePicker-
|
|
40
|
+
import { n as H } from "../TimePicker-TtKzEbBJ.js";
|
|
41
41
|
import { n as U } from "../Upload-DZ6VaM7r.js";
|
|
42
|
-
import { n as W, t as G } from "../registry-
|
|
42
|
+
import { n as W, t as G } from "../registry-BmoI_ib1.js";
|
|
43
43
|
export { e as VlAlert, t as VlAnchor, n as VlAnnouncement, r as VlButton, i as VlButtonGroup, a as VlCard, o as VlCheckbox, s as VlCheckboxGroup, c as VlCol, p as VlCron, h as VlDatePicker, g as VlDateTimePicker, _ as VlDivider, v as VlDrawer, m as VlDropdown, y as VlEmpty, x as VlForm, b as VlFormItem, u as VlInput, C as VlLoading, E as VlMessageBox, T as VlModal, D as VlNotification, f as VlNumberInput, k as VlPagination, A as VlProgress, j as VlRadio, M as VlRadioGroup, N as VlRow, w as VlScrollbar, O as VlSelect, P as VlSidebar, F as VlSlider, I as VlSpace, L as VlSwitch, R as VlTable, d as VlTabs, z as VlTag, B as VlTextarea, H as VlTimePicker, V as VlTimeline, S as VlTooltip, l as VlTransition, U as VlUpload, G as globalComponents, W as registerGlobalComponents };
|
package/dist/es/register.mjs
CHANGED