@vavt/react-ui 1.0.3 → 1.1.0
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/{DatePicker-CoHW85qm.cjs → DatePicker-D3tdU7GY.cjs} +1 -1
- package/dist/{DatePicker-B-F5q_s_.js → DatePicker-D75NqBYX.js} +1 -1
- package/dist/{DateTimePicker-CAkdoY--.cjs → DateTimePicker-CCe5NUkC.cjs} +1 -1
- package/dist/{DateTimePicker-BSBZZ7xV.js → DateTimePicker-CG-yv54X.js} +1 -1
- package/dist/{Drawer-D45miZ27.cjs → Drawer-CeBlbSjY.cjs} +1 -1
- package/dist/{Drawer-C0toQ-fQ.js → Drawer-CgaSQfT_.js} +1 -1
- package/dist/Form-BfXRwX6y.js +353 -0
- package/dist/Form-QpWOfQpR.cjs +1 -0
- package/dist/{MessageBox-B4Qo1vs2.js → MessageBox-DlAv_jQm.js} +1 -1
- package/dist/{MessageBox-CTJfdU29.cjs → MessageBox-nHLRzRJS.cjs} +1 -1
- package/dist/Modal-CAZ8vap0.cjs +1 -0
- package/dist/Modal-DnLKpKvW.js +238 -0
- package/dist/{Table-B9NTkptC.js → Table-BFqTvxt1.js} +10 -10
- package/dist/{Table-Bqjey5fw.cjs → Table-D4csqW47.cjs} +1 -1
- package/dist/Upload-CIOunhpr.cjs +1 -0
- package/dist/{Upload-DZC_bt6G.js → Upload-CVIzg2Px.js} +65 -64
- package/dist/base.css +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/Form.cjs +1 -1
- package/dist/cjs/MessageBox.cjs +1 -1
- package/dist/cjs/Modal.cjs +1 -1
- package/dist/cjs/Table.cjs +1 -1
- package/dist/cjs/Upload.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/Alert.css +1 -1
- package/dist/css/Announcement.css +1 -1
- package/dist/css/Button.css +1 -1
- package/dist/css/Card.css +1 -1
- package/dist/css/Checkbox.css +1 -1
- package/dist/css/Cron.css +1 -1
- package/dist/css/DatePicker.css +1 -1
- package/dist/css/DateTimePicker.css +1 -1
- package/dist/css/Drawer.css +1 -1
- package/dist/css/Dropdown.css +1 -1
- package/dist/css/Empty.css +1 -1
- package/dist/css/Form.css +1 -1
- package/dist/css/Input.css +1 -1
- package/dist/css/MessageBox.css +1 -1
- package/dist/css/Modal.css +1 -1
- package/dist/css/NumberInput.css +1 -1
- package/dist/css/Pagination.css +1 -1
- package/dist/css/Progress.css +1 -1
- package/dist/css/Radio.css +1 -1
- package/dist/css/Scrollbar.css +1 -1
- package/dist/css/Select.css +1 -1
- package/dist/css/Sidebar.css +1 -1
- package/dist/css/Switch.css +1 -1
- package/dist/css/Table.css +1 -1
- package/dist/css/Tabs.css +1 -1
- package/dist/css/Tag.css +1 -1
- package/dist/css/Textarea.css +1 -1
- package/dist/css/TimePicker.css +1 -1
- package/dist/css/Timeline.css +1 -1
- package/dist/css/Tooltip.css +1 -1
- package/dist/css/Upload.css +1 -1
- package/dist/date-picker-BH--Nh7g.js +612 -0
- package/dist/date-picker-pwA2wCag.cjs +1 -0
- package/dist/{dialog-shell-DehX3PNh.js → dialog-shell-CdYlPT9f.js} +12 -12
- package/dist/dialog-shell-CzeGytVj.cjs +1 -0
- package/dist/es/DatePicker.mjs +1 -1
- package/dist/es/DateTimePicker.mjs +1 -1
- package/dist/es/Drawer.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/Table.mjs +1 -1
- package/dist/es/Upload.mjs +1 -1
- package/dist/es/global.mjs +1 -1
- package/dist/es/index.mjs +22 -22
- package/dist/es/register.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/registry-BO2ao8Jc.cjs +1 -0
- package/dist/{registry-q6UdMOyj.js → registry-macDoSyW.js} +34 -34
- package/dist/style/Form.cjs +1 -0
- package/dist/style/Form.mjs +1 -0
- package/dist/style/Modal.cjs +1 -0
- package/dist/style/Modal.mjs +1 -0
- package/dist/types/Col/type.d.cts +5 -5
- package/dist/types/Col/type.d.ts +5 -5
- package/dist/types/Form/type.d.cts +3 -1
- package/dist/types/Form/type.d.ts +3 -1
- package/dist/types/Modal/type.d.cts +3 -3
- package/dist/types/Modal/type.d.ts +3 -3
- package/dist/types/Upload/type.d.cts +4 -0
- package/dist/types/Upload/type.d.ts +4 -0
- package/package.json +1 -1
- package/dist/Form-7un_DeDk.cjs +0 -1
- package/dist/Form-CwgaAZWr.js +0 -323
- package/dist/Modal-i_Do8GsG.cjs +0 -1
- package/dist/Modal-otJ_9ldu.js +0 -210
- package/dist/Upload-bxJz2avf.cjs +0 -1
- package/dist/date-picker-BsiNrLZC.js +0 -592
- package/dist/date-picker-DNN0BiRA.cjs +0 -1
- package/dist/dialog-shell-DT1EoKQG.cjs +0 -1
- package/dist/registry-BGNWNSiC.cjs +0 -1
|
@@ -29,19 +29,19 @@ var u = [], d = /* @__PURE__ */ new Set(), f = 0, p = 0, m = "", h = "", g = "",
|
|
|
29
29
|
e || (e = !0, p = Math.max(0, p - 1), p === 0 && (document.body.style.userSelect = g));
|
|
30
30
|
};
|
|
31
31
|
}, x = ({ active: e, containerRef: o, closeOnPressEscape: s, lockScroll: c, onRequestClose: l }) => {
|
|
32
|
-
let u = a(Symbol("vl-dialog")), f = a(null), p = r(() => v(u.current), []);
|
|
32
|
+
let u = a(Symbol("vl-dialog")), f = a(null), p = a(!1), m = r(() => v(u.current), []);
|
|
33
33
|
return i(() => {
|
|
34
34
|
if (!e) return;
|
|
35
35
|
let r = u.current;
|
|
36
|
-
f.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
37
|
-
let i = _(r), a = c ? y() : () => {},
|
|
36
|
+
p.current = !0, f.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
37
|
+
let i = _(r), a = c ? y() : () => {}, m = () => {
|
|
38
38
|
let e = o.current;
|
|
39
39
|
e && n(e);
|
|
40
|
-
},
|
|
41
|
-
v(r) && (o.current?.contains(document.activeElement) || window.requestAnimationFrame(
|
|
40
|
+
}, h = window.requestAnimationFrame(m), g = () => {
|
|
41
|
+
v(r) && (o.current?.contains(document.activeElement) || window.requestAnimationFrame(m));
|
|
42
42
|
};
|
|
43
|
-
d.add(
|
|
44
|
-
let
|
|
43
|
+
d.add(g);
|
|
44
|
+
let b = (e) => {
|
|
45
45
|
if (!v(r)) return;
|
|
46
46
|
if (e.key === "Escape" && s) {
|
|
47
47
|
e.preventDefault(), l();
|
|
@@ -57,16 +57,16 @@ var u = [], d = /* @__PURE__ */ new Set(), f = 0, p = 0, m = "", h = "", g = "",
|
|
|
57
57
|
}
|
|
58
58
|
let a = i[0], c = i.at(-1) ?? a, u = document.activeElement;
|
|
59
59
|
e.shiftKey && (u === a || !n.contains(u)) ? (e.preventDefault(), c.focus()) : !e.shiftKey && (u === c || !n.contains(u)) && (e.preventDefault(), a.focus());
|
|
60
|
-
},
|
|
60
|
+
}, x = (e) => {
|
|
61
61
|
if (!v(r)) return;
|
|
62
62
|
let t = o.current;
|
|
63
63
|
!t || t.contains(e.target) || n(t);
|
|
64
64
|
};
|
|
65
|
-
return document.addEventListener("keydown",
|
|
66
|
-
window.cancelAnimationFrame(
|
|
65
|
+
return document.addEventListener("keydown", b), document.addEventListener("focusin", x), () => {
|
|
66
|
+
window.cancelAnimationFrame(h), document.removeEventListener("keydown", b), document.removeEventListener("focusin", x), d.delete(g), i(), a(), p.current = !1;
|
|
67
67
|
let e = f.current;
|
|
68
68
|
f.current = null, window.requestAnimationFrame(() => {
|
|
69
|
-
e?.isConnected && e.focus({ preventScroll: !0 });
|
|
69
|
+
!p.current && e?.isConnected && e.focus({ preventScroll: !0 });
|
|
70
70
|
});
|
|
71
71
|
};
|
|
72
72
|
}, [
|
|
@@ -75,7 +75,7 @@ var u = [], d = /* @__PURE__ */ new Set(), f = 0, p = 0, m = "", h = "", g = "",
|
|
|
75
75
|
o,
|
|
76
76
|
c,
|
|
77
77
|
l
|
|
78
|
-
]), { isTopLayer:
|
|
78
|
+
]), { isTopLayer: m };
|
|
79
79
|
}, S = ({ clientReady: t, open: n, mask: r, destroyOnClose: i, maskUnmountOnExit: a = !1, maskTransitionName: u, 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 }) => t ? l(/* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(e, {
|
|
80
80
|
show: n && r,
|
|
81
81
|
name: u,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Transition-X_89ga-e.cjs"),t=require("./focus-D-h8CbGr.cjs");let n=require("react"),r=require("react/jsx-runtime"),i=require("react-dom");var a=[],o=new Set,s=0,c=0,l=``,u=``,d=``,f=e=>(a.push(e),o.forEach(e=>e()),()=>{let t=a.lastIndexOf(e);t>=0&&a.splice(t,1),o.forEach(e=>e())}),p=e=>a.at(-1)===e,m=()=>{if(s===0){l=document.body.style.overflow,u=document.body.style.paddingRight;let e=document.documentElement.clientWidth,t=e>0?Math.max(0,window.innerWidth-e):0;if(t>0){let e=Number.parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${e+t}px`}document.body.style.overflow=`hidden`}s+=1;let e=!1;return()=>{e||(e=!0,s=Math.max(0,s-1),s===0&&(document.body.style.overflow=l,document.body.style.paddingRight=u))}},h=()=>{c===0&&(d=document.body.style.userSelect,document.body.style.userSelect=`none`),c+=1;let e=!1;return()=>{e||(e=!0,c=Math.max(0,c-1),c===0&&(document.body.style.userSelect=d))}},g=({active:e,containerRef:r,closeOnPressEscape:i,lockScroll:a,onRequestClose:s})=>{let c=(0,n.useRef)(Symbol(`vl-dialog`)),l=(0,n.useRef)(null),u=(0,n.useRef)(!1),d=(0,n.useCallback)(()=>p(c.current),[]);return(0,n.useEffect)(()=>{if(!e)return;let n=c.current;u.current=!0,l.current=document.activeElement instanceof HTMLElement?document.activeElement:null;let d=f(n),h=a?m():()=>{},g=()=>{let e=r.current;e&&t.r(e)},_=window.requestAnimationFrame(g),v=()=>{p(n)&&(r.current?.contains(document.activeElement)||window.requestAnimationFrame(g))};o.add(v);let y=e=>{if(!p(n))return;if(e.key===`Escape`&&i){e.preventDefault(),s();return}if(e.key!==`Tab`)return;let a=r.current;if(!a)return;let o=t.a(a);if(!o.length){e.preventDefault(),a.focus({preventScroll:!0});return}let c=o[0],l=o.at(-1)??c,u=document.activeElement;e.shiftKey&&(u===c||!a.contains(u))?(e.preventDefault(),l.focus()):!e.shiftKey&&(u===l||!a.contains(u))&&(e.preventDefault(),c.focus())},b=e=>{if(!p(n))return;let i=r.current;!i||i.contains(e.target)||t.r(i)};return document.addEventListener(`keydown`,y),document.addEventListener(`focusin`,b),()=>{window.cancelAnimationFrame(_),document.removeEventListener(`keydown`,y),document.removeEventListener(`focusin`,b),o.delete(v),d(),h(),u.current=!1;let e=l.current;l.current=null,window.requestAnimationFrame(()=>{!u.current&&e?.isConnected&&e.focus({preventScroll:!0})})}},[e,i,r,a,s]),{isTopLayer:d}},_=({clientReady:t,open:n,mask:a,destroyOnClose:o,maskUnmountOnExit:s=!1,maskTransitionName:c,transitionName:l,maskClassName:u,panelClassName:d,panelStyle:f,maskStyle:p,panelRef:m,role:h,ariaModal:g=!0,ariaLabel:_,ariaLabelledBy:v,ariaDescribedBy:y,onMaskClick:b,onPanelClick:x,onAfterLeave:S,panelProps:C,children:w})=>t?(0,i.createPortal)((0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.t,{show:n&&a,name:c,unmountOnExit:s,children:(0,r.jsx)(`div`,{className:u,style:p,"aria-hidden":`true`,onClick:b})}),(0,r.jsx)(e.t,{show:n,name:l,unmountOnExit:o,onAfterLeave:S,children:(0,r.jsx)(`div`,{ref:m,className:d,style:f,role:h,"aria-modal":g,"aria-label":_,"aria-labelledby":v,"aria-describedby":y,"aria-hidden":!n||void 0,tabIndex:-1,onClick:x,...C,children:w})})]}),document.body):null;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return _}});
|
package/dist/es/DatePicker.mjs
CHANGED
package/dist/es/Drawer.mjs
CHANGED
package/dist/es/Form.mjs
CHANGED
package/dist/es/MessageBox.mjs
CHANGED
package/dist/es/Modal.mjs
CHANGED
package/dist/es/Table.mjs
CHANGED
package/dist/es/Upload.mjs
CHANGED
package/dist/es/global.mjs
CHANGED
package/dist/es/index.mjs
CHANGED
|
@@ -12,31 +12,31 @@ import { n as d } from "../Tabs-VT6nQ63W.js";
|
|
|
12
12
|
import { n as f } from "../NumberInput-C_vLULbX.js";
|
|
13
13
|
import { n as p } from "../Cron-Go4yIqrd.js";
|
|
14
14
|
import { n as m } from "../Dropdown-DljKFnvO.js";
|
|
15
|
-
import { n as h } from "../DatePicker-
|
|
16
|
-
import { n as g } from "../DateTimePicker-
|
|
15
|
+
import { n as h } from "../DatePicker-D75NqBYX.js";
|
|
16
|
+
import { n as g } from "../DateTimePicker-CG-yv54X.js";
|
|
17
17
|
import { n as _ } from "../Divider-BXNZyvHY.js";
|
|
18
|
-
import { n as v } from "../Drawer-
|
|
18
|
+
import { n as v } from "../Drawer-CgaSQfT_.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 "../
|
|
22
|
-
import { n as C } from "../
|
|
23
|
-
import {
|
|
24
|
-
import { n as T } from "../
|
|
25
|
-
import {
|
|
26
|
-
import { n as D } from "../
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { n as N } from "../
|
|
32
|
-
import { n as P } from "../
|
|
33
|
-
import { n as F } from "../
|
|
34
|
-
import { n as I } from "../
|
|
35
|
-
import { n as L } from "../Table-
|
|
20
|
+
import { n as b, t as x } from "../Form-BfXRwX6y.js";
|
|
21
|
+
import { n as S } from "../Tooltip-Buk5F9f_.js";
|
|
22
|
+
import { n as C } from "../Loading-CL0wUgYK.js";
|
|
23
|
+
import { n as w } from "../Scrollbar-BdMGZrYi.js";
|
|
24
|
+
import { n as T } from "../Modal-DnLKpKvW.js";
|
|
25
|
+
import { t as E } from "../MessageBox-DlAv_jQm.js";
|
|
26
|
+
import { n as D } from "../Select-QedbJ4pD.js";
|
|
27
|
+
import { n as O } from "../Pagination-CSI5IzQB.js";
|
|
28
|
+
import { n as k } from "../Progress-D2C6LCml.js";
|
|
29
|
+
import { VlRadio as A, VlRadioGroup as j } from "./Radio.mjs";
|
|
30
|
+
import { VlRow as M } from "./Row.mjs";
|
|
31
|
+
import { n as N } from "../Sidebar-u980T-QB.js";
|
|
32
|
+
import { n as P } from "../Slider-BzlZc0p4.js";
|
|
33
|
+
import { n as F } from "../Space-gnVH7rEt.js";
|
|
34
|
+
import { n as I } from "../Switch-DOO2tiYR.js";
|
|
35
|
+
import { n as L } from "../Table-BFqTvxt1.js";
|
|
36
36
|
import { n as R } from "../Tag-CkfqoSwA.js";
|
|
37
37
|
import { n as z } from "../Textarea-BEd7ToXv.js";
|
|
38
38
|
import { n as B } from "../Timeline-euWvUS4e.js";
|
|
39
39
|
import { n as V } from "../TimePicker-CHZsr_jj.js";
|
|
40
|
-
import { n as H } from "../Upload-
|
|
41
|
-
import { n as U, t as W } from "../registry-
|
|
42
|
-
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,
|
|
40
|
+
import { n as H } from "../Upload-CVIzg2Px.js";
|
|
41
|
+
import { n as U, t as W } from "../registry-macDoSyW.js";
|
|
42
|
+
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, f as VlNumberInput, O as VlPagination, k as VlProgress, A as VlRadio, j as VlRadioGroup, M as VlRow, w as VlScrollbar, D as VlSelect, N as VlSidebar, P as VlSlider, F as VlSpace, I as VlSwitch, L as VlTable, d as VlTabs, R as VlTag, z as VlTextarea, V as VlTimePicker, B as VlTimeline, S as VlTooltip, l as VlTransition, H as VlUpload, W as globalComponents, U as registerGlobalComponents };
|
package/dist/es/register.mjs
CHANGED