@vavt/react-ui 1.2.0 → 1.2.1
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/{MessageBox-BSMYQenX.cjs → MessageBox-D7Ib1f7K.cjs} +1 -1
- package/dist/{MessageBox-DipOfKXI.js → MessageBox-DDP6UWFU.js} +1 -1
- package/dist/{Modal-BOI8r4y1.cjs → Modal-DPxZEr2v.cjs} +1 -1
- package/dist/Modal-Du7aVdWl.js +239 -0
- package/dist/Tag-4iZGcfrg.cjs +1 -0
- package/dist/Tag-TeYTDdHt.js +51 -0
- package/dist/cjs/MessageBox.cjs +1 -1
- package/dist/cjs/Modal.cjs +1 -1
- package/dist/cjs/Tag.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/MessageBox.css +1 -1
- package/dist/css/Modal.css +1 -1
- package/dist/css/Tag.css +1 -1
- package/dist/es/MessageBox.mjs +1 -1
- package/dist/es/Modal.mjs +1 -1
- package/dist/es/Tag.mjs +1 -1
- package/dist/es/global.mjs +1 -1
- package/dist/es/index.mjs +4 -4
- package/dist/es/register.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/{registry-hU7S5myb.cjs → registry-BqfLh5B_.cjs} +1 -1
- package/dist/{registry-BLaletUC.js → registry-C8ZL-n-l.js} +3 -3
- package/dist/types/Tag/index.d.cts +1 -1
- package/dist/types/Tag/index.d.ts +1 -1
- package/dist/types/Tag/type.d.cts +5 -0
- package/dist/types/Tag/type.d.ts +5 -0
- package/package.json +1 -1
- package/dist/Modal-De9igZ5e.js +0 -238
- package/dist/Tag-Cf9M_HT6.cjs +0 -1
- package/dist/Tag-CkfqoSwA.js +0 -42
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./Alert-tPSJmCXK.cjs"),t=require("./Anchor-CmuV1Ump.cjs"),n=require("./Announcement-D0hZE2sM.cjs"),r=require("./Button-qURrKHQ0.cjs"),i=require("./Card-BkZhLXQ5.cjs"),a=require("./Checkbox-CzNGP2tH.cjs"),o=require("./Col-qcq7T83y.cjs"),s=require("./Transition-X_89ga-e.cjs"),c=require("./Input-C9ESmbJ7.cjs"),l=require("./Tabs-BZ0Zc0bL.cjs"),u=require("./NumberInput-Dp1vTDkW.cjs"),d=require("./Cron-MhbYMEeJ.cjs"),f=require("./Dropdown-PHqXNiAZ.cjs"),p=require("./DatePicker-Bj709smn.cjs"),m=require("./DateTimePicker-ZSScsk-j.cjs"),h=require("./Divider-BnmUNmy2.cjs"),g=require("./Drawer-DcbgMkub.cjs"),_=require("./Empty-Dny96c3p.cjs"),v=require("./Form-BkyDHPEI.cjs"),y=require("./Tooltip-DDjGLjoV.cjs"),b=require("./Loading-C2pY-4fA.cjs"),x=require("./Scrollbar-CEQT6Ao_.cjs"),S=require("./Modal-
|
|
1
|
+
const e=require("./Alert-tPSJmCXK.cjs"),t=require("./Anchor-CmuV1Ump.cjs"),n=require("./Announcement-D0hZE2sM.cjs"),r=require("./Button-qURrKHQ0.cjs"),i=require("./Card-BkZhLXQ5.cjs"),a=require("./Checkbox-CzNGP2tH.cjs"),o=require("./Col-qcq7T83y.cjs"),s=require("./Transition-X_89ga-e.cjs"),c=require("./Input-C9ESmbJ7.cjs"),l=require("./Tabs-BZ0Zc0bL.cjs"),u=require("./NumberInput-Dp1vTDkW.cjs"),d=require("./Cron-MhbYMEeJ.cjs"),f=require("./Dropdown-PHqXNiAZ.cjs"),p=require("./DatePicker-Bj709smn.cjs"),m=require("./DateTimePicker-ZSScsk-j.cjs"),h=require("./Divider-BnmUNmy2.cjs"),g=require("./Drawer-DcbgMkub.cjs"),_=require("./Empty-Dny96c3p.cjs"),v=require("./Form-BkyDHPEI.cjs"),y=require("./Tooltip-DDjGLjoV.cjs"),b=require("./Loading-C2pY-4fA.cjs"),x=require("./Scrollbar-CEQT6Ao_.cjs"),S=require("./Modal-DPxZEr2v.cjs"),C=require("./MessageBox-D7Ib1f7K.cjs"),w=require("./Select-C6O0tmM_.cjs"),T=require("./Pagination-DatEegaF.cjs"),E=require("./Progress-DTAjlgwZ.cjs"),D=require("./cjs/Radio.cjs"),O=require("./cjs/Row.cjs"),k=require("./Sidebar-BPXVnP7y.cjs"),A=require("./Slider-CU9OS2HB.cjs"),j=require("./Space-DJGRG2rt.cjs"),M=require("./Switch-CpXDMcPW.cjs"),N=require("./Table-BNGO_7Rx.cjs"),P=require("./Tag-4iZGcfrg.cjs"),F=require("./Textarea-CEhAvE10.cjs"),I=require("./Timeline-ROggEQnD.cjs"),L=require("./TimePicker-DoGbwfkU.cjs"),R=require("./Upload-wHEEoe1c.cjs");var z={VlAlert:e.n,VlAnchor:t.n,VlAnnouncement:n.n,VlButton:r.n,VlCard:i.n,VlCheckbox:a.n,VlCol:o.n,VlCron:d.n,VlDatePicker:p.n,VlDateTimePicker:m.n,VlDivider:h.n,VlDrawer:g.n,VlDropdown:f.n,VlEmpty:_.n,VlForm:v.t,VlInput:c.n,VlLoading:b.n,VlMessageBox:C.t,VlModal:S.n,VlNumberInput:u.n,VlPagination:T.n,VlProgress:E.n,VlRadio:D.VlRadio,VlRow:O.VlRow,VlScrollbar:x.n,VlSelect:w.n,VlSidebar:k.n,VlSlider:A.n,VlSpace:j.n,VlSwitch:M.n,VlTable:N.n,VlTabs:l.n,VlTag:P.n,VlTextarea:F.n,VlTimeline:I.n,VlTimePicker:L.n,VlTooltip:y.n,VlTransition:s.n,VlUpload:R.n},B=(e=globalThis)=>(Object.assign(e,z),z);Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return z}});
|
|
@@ -20,8 +20,8 @@ import { t as v } from "./Form-D_Uv-8HG.js";
|
|
|
20
20
|
import { n as y } from "./Tooltip-BKPreZML.js";
|
|
21
21
|
import { n as b } from "./Loading-CL0wUgYK.js";
|
|
22
22
|
import { n as x } from "./Scrollbar-BdMGZrYi.js";
|
|
23
|
-
import { n as S } from "./Modal-
|
|
24
|
-
import { t as C } from "./MessageBox-
|
|
23
|
+
import { n as S } from "./Modal-Du7aVdWl.js";
|
|
24
|
+
import { t as C } from "./MessageBox-DDP6UWFU.js";
|
|
25
25
|
import { n as w } from "./Select-BHWa_6Q2.js";
|
|
26
26
|
import { n as T } from "./Pagination-CpbboRbF.js";
|
|
27
27
|
import { n as E } from "./Progress-D2C6LCml.js";
|
|
@@ -32,7 +32,7 @@ import { n as A } from "./Slider-CKU03SsT.js";
|
|
|
32
32
|
import { n as j } from "./Space-gnVH7rEt.js";
|
|
33
33
|
import { n as M } from "./Switch-CqTFvp-k.js";
|
|
34
34
|
import { n as N } from "./Table-Cfs3XJgN.js";
|
|
35
|
-
import { n as P } from "./Tag-
|
|
35
|
+
import { n as P } from "./Tag-TeYTDdHt.js";
|
|
36
36
|
import { n as F } from "./Textarea-CA6Vzu7t.js";
|
|
37
37
|
import { n as I } from "./Timeline-euWvUS4e.js";
|
|
38
38
|
import { n as L } from "./TimePicker-CYlcUTTM.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Tag from './Tag.cjs';
|
|
2
2
|
/** Tag 标签组件 */
|
|
3
3
|
export declare const VlTag: import("react").ForwardRefExoticComponent<import("./type.cjs").TagProps & import("react").RefAttributes<HTMLElement>>;
|
|
4
|
-
export type { TagProps, TagStatus, TagSize, TagRef } from './type.cjs';
|
|
4
|
+
export type { TagProps, TagStatus, TagSize, TagRef, TagIcon } from './type.cjs';
|
|
5
5
|
export default Tag;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Tag from './Tag.js';
|
|
2
2
|
/** Tag 标签组件 */
|
|
3
3
|
export declare const VlTag: import("react").ForwardRefExoticComponent<import("./type.js").TagProps & import("react").RefAttributes<HTMLElement>>;
|
|
4
|
-
export type { TagProps, TagStatus, TagSize, TagRef } from './type.js';
|
|
4
|
+
export type { TagProps, TagStatus, TagSize, TagRef, TagIcon } from './type.js';
|
|
5
5
|
export default Tag;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { ElementType, HTMLAttributes, MouseEvent } from 'react';
|
|
2
|
+
import type { DecorativeIcon } from '../_shared/icon.cjs';
|
|
2
3
|
/** 标签语义状态:默认/中性 (default) | 主题色 (primary) | 成功 (success) | 警告 (warning) | 错误 (error) | 信息 (info) */
|
|
3
4
|
export type TagStatus = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
4
5
|
/** 标签尺寸:小 (sm) | 中等 (md) | 大 (lg) */
|
|
5
6
|
export type TagSize = 'sm' | 'md' | 'lg';
|
|
6
7
|
/** Tag 根 DOM 元素类型 */
|
|
7
8
|
export type TagRef = HTMLElement;
|
|
9
|
+
/** Tag 图标组件或节点类型 */
|
|
10
|
+
export type TagIcon = DecorativeIcon;
|
|
8
11
|
/**
|
|
9
12
|
* Tag 组件属性接口
|
|
10
13
|
*/
|
|
@@ -13,6 +16,8 @@ export interface TagProps extends HTMLAttributes<HTMLElement> {
|
|
|
13
16
|
status?: TagStatus;
|
|
14
17
|
/** 标签尺寸大小,默认为 `md` */
|
|
15
18
|
size?: TagSize;
|
|
19
|
+
/** 标签前置图标 */
|
|
20
|
+
icon?: TagIcon;
|
|
16
21
|
/** 是否支持关闭/移除,开启后展示关闭图标,默认为 false */
|
|
17
22
|
closable?: boolean;
|
|
18
23
|
/** 是否处于禁用状态,禁用后阻止关闭交互,默认为 false */
|
package/dist/types/Tag/type.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { ElementType, HTMLAttributes, MouseEvent } from 'react';
|
|
2
|
+
import type { DecorativeIcon } from '../_shared/icon.js';
|
|
2
3
|
/** 标签语义状态:默认/中性 (default) | 主题色 (primary) | 成功 (success) | 警告 (warning) | 错误 (error) | 信息 (info) */
|
|
3
4
|
export type TagStatus = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
4
5
|
/** 标签尺寸:小 (sm) | 中等 (md) | 大 (lg) */
|
|
5
6
|
export type TagSize = 'sm' | 'md' | 'lg';
|
|
6
7
|
/** Tag 根 DOM 元素类型 */
|
|
7
8
|
export type TagRef = HTMLElement;
|
|
9
|
+
/** Tag 图标组件或节点类型 */
|
|
10
|
+
export type TagIcon = DecorativeIcon;
|
|
8
11
|
/**
|
|
9
12
|
* Tag 组件属性接口
|
|
10
13
|
*/
|
|
@@ -13,6 +16,8 @@ export interface TagProps extends HTMLAttributes<HTMLElement> {
|
|
|
13
16
|
status?: TagStatus;
|
|
14
17
|
/** 标签尺寸大小,默认为 `md` */
|
|
15
18
|
size?: TagSize;
|
|
19
|
+
/** 标签前置图标 */
|
|
20
|
+
icon?: TagIcon;
|
|
16
21
|
/** 是否支持关闭/移除,开启后展示关闭图标,默认为 false */
|
|
17
22
|
closable?: boolean;
|
|
18
23
|
/** 是否处于禁用状态,禁用后阻止关闭交互,默认为 false */
|
package/package.json
CHANGED
package/dist/Modal-De9igZ5e.js
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./effect-nifYL_rH.js";
|
|
2
|
-
import { n as t, t as n } from "./state-BSDh-Ob2.js";
|
|
3
|
-
import { t as r } from "./client-pj_wzx28.js";
|
|
4
|
-
import { n as i } from "./refs-D5IYOBaf.js";
|
|
5
|
-
import { t as a } from "./content-Dllrr-7G.js";
|
|
6
|
-
import { n as o, t as s } from "./number-BN2jHM6Z.js";
|
|
7
|
-
import { t as ee } from "./id-CHixuHb7.js";
|
|
8
|
-
import { n as te, r as ne, t as re } from "./layer-DDm97-sb.js";
|
|
9
|
-
import { n as ie, r as ae, t as oe } from "./dialog-shell-CdYlPT9f.js";
|
|
10
|
-
import { t as se } from "./Scrollbar-BdMGZrYi.js";
|
|
11
|
-
import { X as ce } from "lucide-react";
|
|
12
|
-
import { forwardRef as c, useCallback as l, useEffect as u, useMemo as le, useRef as d, useState as ue } from "react";
|
|
13
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
14
|
-
//#region components/Modal/Modal.tsx
|
|
15
|
-
var de = .25, fe = 0, pe = (e) => {
|
|
16
|
-
if (typeof e == "number") return Number.isFinite(e) ? e : 0;
|
|
17
|
-
if (typeof e == "string") {
|
|
18
|
-
let t = e.trim();
|
|
19
|
-
if (t.endsWith("vh")) {
|
|
20
|
-
let e = parseFloat(t);
|
|
21
|
-
return Number.isFinite(e) ? window.innerHeight * e / 100 : 0;
|
|
22
|
-
}
|
|
23
|
-
if (t.endsWith("px")) {
|
|
24
|
-
let e = parseFloat(t);
|
|
25
|
-
return Number.isFinite(e) ? e : 0;
|
|
26
|
-
}
|
|
27
|
-
let n = parseFloat(t);
|
|
28
|
-
return Number.isFinite(n) ? n : 0;
|
|
29
|
-
}
|
|
30
|
-
return 0;
|
|
31
|
-
}, m = c((c, m) => {
|
|
32
|
-
let { open: h, defaultOpen: me = !1, title: g, width: he = 520, offsetY: _ = fe, center: v = !1, mask: ge = !0, closeOnClickOverlay: _e = !0, closeOnPressEscape: ve = !0, showClose: y = !0, lockScroll: ye = !0, destroyOnClose: b = !1, draggable: x = !0, fullscreen: S = !1, zIndex: be, header: C, footer: w, className: xe, style: T, children: Se, onClick: Ce, onChange: we, onOpen: E, onClose: D, onAfterClose: Te, "aria-label": Ee, "aria-labelledby": De, "aria-describedby": Oe, ...ke } = c, O = r(), Ae = typeof T?.zIndex == "number" ? T.zIndex : void 0, k = ne({
|
|
33
|
-
defaultZIndex: te.modal,
|
|
34
|
-
zIndex: be ?? Ae,
|
|
35
|
-
withMask: !0
|
|
36
|
-
}), A = d(null), je = le(() => i(A, m), [m]), Me = n(c, "open"), [j, M] = t({
|
|
37
|
-
value: !!h,
|
|
38
|
-
defaultValue: me,
|
|
39
|
-
controlled: Me,
|
|
40
|
-
onChange: we
|
|
41
|
-
}), [Ne, N] = ue(!1), P = d({
|
|
42
|
-
x: 0,
|
|
43
|
-
y: 0
|
|
44
|
-
}), F = d(!1), I = d(!1), L = d({
|
|
45
|
-
x: 0,
|
|
46
|
-
y: 0
|
|
47
|
-
}), R = d(null), z = d(!1), B = d(null), V = d(null), H = ee("vl-modal-title"), U = l(() => M(!1), [M]), { isTopLayer: W } = ae({
|
|
48
|
-
active: O && j,
|
|
49
|
-
containerRef: A,
|
|
50
|
-
closeOnPressEscape: ve,
|
|
51
|
-
lockScroll: ye,
|
|
52
|
-
onRequestClose: U
|
|
53
|
-
}), G = l((e) => {
|
|
54
|
-
A.current && (A.current.style.visibility = e ? "visible" : "hidden");
|
|
55
|
-
}, []), K = l((e, t) => {
|
|
56
|
-
P.current = {
|
|
57
|
-
x: e,
|
|
58
|
-
y: t
|
|
59
|
-
}, A.current && (A.current.style.left = `${e}px`, A.current.style.top = `${t}px`);
|
|
60
|
-
}, []), q = l((e, t) => {
|
|
61
|
-
let n = e.getBoundingClientRect();
|
|
62
|
-
return {
|
|
63
|
-
rect: n,
|
|
64
|
-
maxX: Math.max(t, window.innerWidth - n.width - t),
|
|
65
|
-
maxY: Math.max(t, window.innerHeight - n.height - t)
|
|
66
|
-
};
|
|
67
|
-
}, []), J = l(() => {
|
|
68
|
-
let e = A.current;
|
|
69
|
-
if (!e || typeof window > "u") return;
|
|
70
|
-
if (S) {
|
|
71
|
-
K(0, 0), F.current = !1;
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
let { rect: t, maxX: n, maxY: r } = q(e, 12), i = (v ? (window.innerHeight - t.height) / 2 : window.innerHeight * de) + pe(_);
|
|
75
|
-
K(Math.round(s((window.innerWidth - t.width) / 2, 12, n)), Math.round(s(i, 12, r)));
|
|
76
|
-
}, [
|
|
77
|
-
v,
|
|
78
|
-
S,
|
|
79
|
-
q,
|
|
80
|
-
_,
|
|
81
|
-
K
|
|
82
|
-
]), Y = l(() => {
|
|
83
|
-
let e = A.current;
|
|
84
|
-
if (!e) return;
|
|
85
|
-
let { maxX: t, maxY: n } = q(e, 12);
|
|
86
|
-
K(Math.round(s(P.current.x, 12, t)), Math.round(s(P.current.y, 12, n)));
|
|
87
|
-
}, [q, K]), X = l((e, t) => {
|
|
88
|
-
let n = A.current;
|
|
89
|
-
if (!n || S) return;
|
|
90
|
-
let { maxX: r, maxY: i } = q(n, 12), a = s(e - L.current.x, 12, r), o = s(t - L.current.y, 12, i);
|
|
91
|
-
K(Math.round(a), Math.round(o)), F.current = !0;
|
|
92
|
-
}, [
|
|
93
|
-
S,
|
|
94
|
-
q,
|
|
95
|
-
K
|
|
96
|
-
]), Pe = d(X);
|
|
97
|
-
e(() => {
|
|
98
|
-
Pe.current = X;
|
|
99
|
-
}, [X]);
|
|
100
|
-
let Fe = l((e) => {
|
|
101
|
-
I.current && Pe.current(e.clientX, e.clientY);
|
|
102
|
-
}, []), Z = l(() => {
|
|
103
|
-
V.current?.abort(), V.current = null, R.current?.(), R.current = null;
|
|
104
|
-
}, []), Q = l(() => {
|
|
105
|
-
I.current && (I.current = !1, N(!1), Z());
|
|
106
|
-
}, [Z]), Ie = (e) => {
|
|
107
|
-
if (!x || S || !j || !W() || e.button !== 0 || e.target.closest(".vl-modal__close")) return;
|
|
108
|
-
let t = A.current;
|
|
109
|
-
if (!t) return;
|
|
110
|
-
e.preventDefault();
|
|
111
|
-
let n = t.getBoundingClientRect();
|
|
112
|
-
L.current = {
|
|
113
|
-
x: e.clientX - n.left,
|
|
114
|
-
y: e.clientY - n.top
|
|
115
|
-
}, I.current = !0, N(!0), R.current = ie(), V.current = new AbortController();
|
|
116
|
-
let { signal: r } = V.current;
|
|
117
|
-
window.addEventListener("pointermove", Fe, { signal: r }), window.addEventListener("pointerup", Q, {
|
|
118
|
-
once: !0,
|
|
119
|
-
signal: r
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
u(() => {
|
|
123
|
-
let e = z.current;
|
|
124
|
-
j && !e ? E?.() : !j && e && D?.(), z.current = j;
|
|
125
|
-
}, [
|
|
126
|
-
j,
|
|
127
|
-
E,
|
|
128
|
-
D
|
|
129
|
-
]), e(() => {
|
|
130
|
-
!j || !O || (G(!1), S ? K(0, 0) : !b && F.current ? Y() : J(), G(!0));
|
|
131
|
-
}, [
|
|
132
|
-
j,
|
|
133
|
-
O,
|
|
134
|
-
S,
|
|
135
|
-
b,
|
|
136
|
-
J,
|
|
137
|
-
Y,
|
|
138
|
-
K,
|
|
139
|
-
G
|
|
140
|
-
]), u(() => {
|
|
141
|
-
j || Q();
|
|
142
|
-
}, [j, Q]), u(() => {
|
|
143
|
-
if (!j) return;
|
|
144
|
-
let e = () => {
|
|
145
|
-
I.current || (B.current !== null && window.clearTimeout(B.current), B.current = window.setTimeout(() => {
|
|
146
|
-
B.current = null, F.current ? Y() : J();
|
|
147
|
-
}, 100));
|
|
148
|
-
};
|
|
149
|
-
return window.addEventListener("resize", e, { passive: !0 }), () => {
|
|
150
|
-
window.removeEventListener("resize", e), B.current !== null && (window.clearTimeout(B.current), B.current = null);
|
|
151
|
-
};
|
|
152
|
-
}, [
|
|
153
|
-
j,
|
|
154
|
-
J,
|
|
155
|
-
Y
|
|
156
|
-
]), u(() => () => {
|
|
157
|
-
Z(), B.current !== null && (window.clearTimeout(B.current), B.current = null);
|
|
158
|
-
}, [Z]);
|
|
159
|
-
let Le = () => {
|
|
160
|
-
_e && W() && U();
|
|
161
|
-
}, Re = (e) => {
|
|
162
|
-
e.stopPropagation(), Ce?.(e);
|
|
163
|
-
}, ze = [
|
|
164
|
-
"vl-modal",
|
|
165
|
-
Ne ? "is-dragging" : "",
|
|
166
|
-
v ? "is-center" : "",
|
|
167
|
-
S ? "is-fullscreen" : "",
|
|
168
|
-
xe || ""
|
|
169
|
-
].filter(Boolean).join(" "), Be = ["vl-modal__header", x && !S ? "is-draggable" : ""].filter(Boolean).join(" "), $ = { ...T };
|
|
170
|
-
k.zIndex !== void 0 && ($.zIndex = k.zIndex), S ? ($.width = "100vw", $.height = "100vh") : $.width = o(he) ?? "520px";
|
|
171
|
-
let Ve = C ?? (g ? /* @__PURE__ */ f("div", {
|
|
172
|
-
id: H,
|
|
173
|
-
className: "vl-modal__title",
|
|
174
|
-
children: g
|
|
175
|
-
}) : null), He = De ?? (!C && g ? H : void 0), Ue = Ee ?? (He ? void 0 : typeof g == "string" ? g : "对话框");
|
|
176
|
-
return /* @__PURE__ */ f(re, {
|
|
177
|
-
layer: k.layer,
|
|
178
|
-
children: /* @__PURE__ */ p(oe, {
|
|
179
|
-
clientReady: O,
|
|
180
|
-
open: j,
|
|
181
|
-
mask: ge,
|
|
182
|
-
destroyOnClose: b,
|
|
183
|
-
maskTransitionName: "vl-modal-mask",
|
|
184
|
-
transitionName: "vl-modal",
|
|
185
|
-
maskClassName: "vl-modal__mask",
|
|
186
|
-
panelClassName: ze,
|
|
187
|
-
panelStyle: $,
|
|
188
|
-
maskStyle: k.maskZIndex === void 0 ? void 0 : { zIndex: k.maskZIndex },
|
|
189
|
-
panelRef: je,
|
|
190
|
-
role: "dialog",
|
|
191
|
-
ariaLabel: Ue,
|
|
192
|
-
ariaLabelledBy: He,
|
|
193
|
-
ariaDescribedBy: Oe,
|
|
194
|
-
onMaskClick: Le,
|
|
195
|
-
onPanelClick: Re,
|
|
196
|
-
onAfterLeave: () => {
|
|
197
|
-
Q(), b && (F.current = !1), Te?.();
|
|
198
|
-
},
|
|
199
|
-
panelProps: ke,
|
|
200
|
-
children: [
|
|
201
|
-
a(Ve) || y ? /* @__PURE__ */ f("div", {
|
|
202
|
-
className: Be,
|
|
203
|
-
onPointerDown: Ie,
|
|
204
|
-
children: /* @__PURE__ */ p("div", {
|
|
205
|
-
className: "vl-modal__headerInner",
|
|
206
|
-
children: [/* @__PURE__ */ f("div", {
|
|
207
|
-
className: "vl-modal__headerMain",
|
|
208
|
-
children: Ve
|
|
209
|
-
}), y ? /* @__PURE__ */ f("button", {
|
|
210
|
-
type: "button",
|
|
211
|
-
className: "vl-modal__close",
|
|
212
|
-
"aria-label": "关闭对话框",
|
|
213
|
-
onClick: U,
|
|
214
|
-
children: /* @__PURE__ */ f(ce, {
|
|
215
|
-
size: 20,
|
|
216
|
-
"aria-hidden": "true"
|
|
217
|
-
})
|
|
218
|
-
}) : null]
|
|
219
|
-
})
|
|
220
|
-
}) : null,
|
|
221
|
-
/* @__PURE__ */ f(se, {
|
|
222
|
-
className: "vl-modal__body",
|
|
223
|
-
children: Se
|
|
224
|
-
}),
|
|
225
|
-
a(w) ? /* @__PURE__ */ f("div", {
|
|
226
|
-
className: "vl-modal__footer",
|
|
227
|
-
children: w
|
|
228
|
-
}) : null
|
|
229
|
-
]
|
|
230
|
-
})
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
m.displayName = "VlModal";
|
|
234
|
-
//#endregion
|
|
235
|
-
//#region components/Modal/index.ts
|
|
236
|
-
var h = m, me = m;
|
|
237
|
-
//#endregion
|
|
238
|
-
export { h as n, me as t };
|
package/dist/Tag-Cf9M_HT6.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e=require("lucide-react"),t=require("react"),n=require("react/jsx-runtime");var r=(0,t.forwardRef)((t,r)=>{let{status:i,size:a=`md`,closable:o=!1,disabled:s=!1,tag:c=`span`,className:l,children:u,onClose:d,...f}=t,p=[`vl-tag`,i?`is-${i}`:``,a?`size-${a}`:``,s?`is-disabled`:``,l||``].filter(Boolean).join(` `),m=e=>{s||d?.(e)};return(0,n.jsxs)(c,{ref:r,className:p,...f,children:[(0,n.jsx)(`span`,{className:`vl-tag__content`,children:u}),o?(0,n.jsx)(`button`,{type:`button`,className:`vl-tag__close`,disabled:s,"aria-label":typeof u==`string`?`移除 ${u}`:`移除标签`,onClick:e=>{e.stopPropagation(),m(e)},children:(0,n.jsx)(e.X,{size:14,"aria-hidden":`true`})}):null]})});r.displayName=`VlTag`;var i=r,a=r;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});
|
package/dist/Tag-CkfqoSwA.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { X as e } from "lucide-react";
|
|
2
|
-
import { forwardRef as t } from "react";
|
|
3
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
//#region components/Tag/Tag.tsx
|
|
5
|
-
var i = t((t, i) => {
|
|
6
|
-
let { status: a, size: o = "md", closable: s = !1, disabled: c = !1, tag: l = "span", className: u, children: d, onClose: f, ...p } = t, m = [
|
|
7
|
-
"vl-tag",
|
|
8
|
-
a ? `is-${a}` : "",
|
|
9
|
-
o ? `size-${o}` : "",
|
|
10
|
-
c ? "is-disabled" : "",
|
|
11
|
-
u || ""
|
|
12
|
-
].filter(Boolean).join(" "), h = (e) => {
|
|
13
|
-
c || f?.(e);
|
|
14
|
-
};
|
|
15
|
-
return /* @__PURE__ */ r(l, {
|
|
16
|
-
ref: i,
|
|
17
|
-
className: m,
|
|
18
|
-
...p,
|
|
19
|
-
children: [/* @__PURE__ */ n("span", {
|
|
20
|
-
className: "vl-tag__content",
|
|
21
|
-
children: d
|
|
22
|
-
}), s ? /* @__PURE__ */ n("button", {
|
|
23
|
-
type: "button",
|
|
24
|
-
className: "vl-tag__close",
|
|
25
|
-
disabled: c,
|
|
26
|
-
"aria-label": typeof d == "string" ? `移除 ${d}` : "移除标签",
|
|
27
|
-
onClick: (e) => {
|
|
28
|
-
e.stopPropagation(), h(e);
|
|
29
|
-
},
|
|
30
|
-
children: /* @__PURE__ */ n(e, {
|
|
31
|
-
size: 14,
|
|
32
|
-
"aria-hidden": "true"
|
|
33
|
-
})
|
|
34
|
-
}) : null]
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
i.displayName = "VlTag";
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region components/Tag/index.ts
|
|
40
|
-
var a = i, o = i;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { a as n, o as t };
|