@vavt/react-ui 1.2.0 → 1.2.2
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/Notification-CJraaZIi.js +197 -0
- package/dist/Notification-D6m4qHKz.cjs +1 -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/Notification.cjs +1 -0
- 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/Notification.css +1 -0
- package/dist/css/Tag.css +1 -1
- package/dist/es/MessageBox.mjs +1 -1
- package/dist/es/Modal.mjs +1 -1
- package/dist/es/Notification.mjs +3 -0
- package/dist/es/Tag.mjs +1 -1
- package/dist/es/global.mjs +1 -1
- package/dist/es/index.mjs +20 -19
- package/dist/es/register.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/{registry-BLaletUC.js → registry-BUQSQSwB.js} +37 -35
- package/dist/registry-DF1N2ITX.cjs +1 -0
- package/dist/style/Notification.cjs +8 -0
- package/dist/style/Notification.mjs +8 -0
- package/dist/types/Notification/Notification.d.cts +4 -0
- package/dist/types/Notification/Notification.d.ts +4 -0
- package/dist/types/Notification/host.d.cts +9 -0
- package/dist/types/Notification/host.d.ts +9 -0
- package/dist/types/Notification/index.d.cts +5 -0
- package/dist/types/Notification/index.d.ts +5 -0
- package/dist/types/Notification/service.d.cts +5 -0
- package/dist/types/Notification/service.d.ts +5 -0
- package/dist/types/Notification/type.d.cts +55 -0
- package/dist/types/Notification/type.d.ts +55 -0
- 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/dist/types/global.d.cts +2 -0
- package/dist/types/global.d.ts +2 -0
- package/dist/types/index.d.cts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/registry.d.cts +1 -0
- package/dist/types/registry.d.ts +1 -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
- package/dist/registry-hU7S5myb.cjs +0 -1
|
@@ -20,25 +20,26 @@ 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-
|
|
25
|
-
import {
|
|
26
|
-
import { n as T } from "./
|
|
27
|
-
import { n as E } from "./
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { n as A } from "./
|
|
32
|
-
import { n as j } from "./
|
|
33
|
-
import { n as M } from "./
|
|
34
|
-
import { n as N } from "./
|
|
35
|
-
import { n as P } from "./
|
|
36
|
-
import { n as F } from "./
|
|
37
|
-
import { n as I } from "./
|
|
38
|
-
import { n as L } from "./
|
|
39
|
-
import { n as R } from "./
|
|
23
|
+
import { n as S } from "./Modal-Du7aVdWl.js";
|
|
24
|
+
import { t as C } from "./MessageBox-DDP6UWFU.js";
|
|
25
|
+
import { t as w } from "./Notification-CJraaZIi.js";
|
|
26
|
+
import { n as T } from "./Select-BHWa_6Q2.js";
|
|
27
|
+
import { n as E } from "./Pagination-CpbboRbF.js";
|
|
28
|
+
import { n as D } from "./Progress-D2C6LCml.js";
|
|
29
|
+
import { VlRadio as O } from "./es/Radio.mjs";
|
|
30
|
+
import { VlRow as k } from "./es/Row.mjs";
|
|
31
|
+
import { n as A } from "./Sidebar-u980T-QB.js";
|
|
32
|
+
import { n as j } from "./Slider-CKU03SsT.js";
|
|
33
|
+
import { n as M } from "./Space-gnVH7rEt.js";
|
|
34
|
+
import { n as N } from "./Switch-CqTFvp-k.js";
|
|
35
|
+
import { n as P } from "./Table-Cfs3XJgN.js";
|
|
36
|
+
import { n as F } from "./Tag-TeYTDdHt.js";
|
|
37
|
+
import { n as I } from "./Textarea-CA6Vzu7t.js";
|
|
38
|
+
import { n as L } from "./Timeline-euWvUS4e.js";
|
|
39
|
+
import { n as R } from "./TimePicker-CYlcUTTM.js";
|
|
40
|
+
import { n as z } from "./Upload-DZ6VaM7r.js";
|
|
40
41
|
//#region components/registry.ts
|
|
41
|
-
var
|
|
42
|
+
var B = {
|
|
42
43
|
VlAlert: e,
|
|
43
44
|
VlAnchor: t,
|
|
44
45
|
VlAnnouncement: n,
|
|
@@ -58,26 +59,27 @@ var z = {
|
|
|
58
59
|
VlLoading: b,
|
|
59
60
|
VlMessageBox: C,
|
|
60
61
|
VlModal: S,
|
|
62
|
+
VlNotification: w,
|
|
61
63
|
VlNumberInput: u,
|
|
62
|
-
VlPagination:
|
|
63
|
-
VlProgress:
|
|
64
|
-
VlRadio:
|
|
65
|
-
VlRow:
|
|
64
|
+
VlPagination: E,
|
|
65
|
+
VlProgress: D,
|
|
66
|
+
VlRadio: O,
|
|
67
|
+
VlRow: k,
|
|
66
68
|
VlScrollbar: x,
|
|
67
|
-
VlSelect:
|
|
68
|
-
VlSidebar:
|
|
69
|
-
VlSlider:
|
|
70
|
-
VlSpace:
|
|
71
|
-
VlSwitch:
|
|
72
|
-
VlTable:
|
|
69
|
+
VlSelect: T,
|
|
70
|
+
VlSidebar: A,
|
|
71
|
+
VlSlider: j,
|
|
72
|
+
VlSpace: M,
|
|
73
|
+
VlSwitch: N,
|
|
74
|
+
VlTable: P,
|
|
73
75
|
VlTabs: l,
|
|
74
|
-
VlTag:
|
|
75
|
-
VlTextarea:
|
|
76
|
-
VlTimeline:
|
|
77
|
-
VlTimePicker:
|
|
76
|
+
VlTag: F,
|
|
77
|
+
VlTextarea: I,
|
|
78
|
+
VlTimeline: L,
|
|
79
|
+
VlTimePicker: R,
|
|
78
80
|
VlTooltip: y,
|
|
79
81
|
VlTransition: s,
|
|
80
|
-
VlUpload:
|
|
81
|
-
},
|
|
82
|
+
VlUpload: z
|
|
83
|
+
}, V = (e = globalThis) => (Object.assign(e, B), B);
|
|
82
84
|
//#endregion
|
|
83
|
-
export {
|
|
85
|
+
export { V as n, B as t };
|
|
@@ -0,0 +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-DPxZEr2v.cjs"),C=require("./MessageBox-D7Ib1f7K.cjs"),w=require("./Notification-D6m4qHKz.cjs"),T=require("./Select-C6O0tmM_.cjs"),E=require("./Pagination-DatEegaF.cjs"),D=require("./Progress-DTAjlgwZ.cjs"),O=require("./cjs/Radio.cjs"),k=require("./cjs/Row.cjs"),A=require("./Sidebar-BPXVnP7y.cjs"),j=require("./Slider-CU9OS2HB.cjs"),M=require("./Space-DJGRG2rt.cjs"),N=require("./Switch-CpXDMcPW.cjs"),P=require("./Table-BNGO_7Rx.cjs"),F=require("./Tag-4iZGcfrg.cjs"),I=require("./Textarea-CEhAvE10.cjs"),L=require("./Timeline-ROggEQnD.cjs"),R=require("./TimePicker-DoGbwfkU.cjs"),z=require("./Upload-wHEEoe1c.cjs");var B={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,VlNotification:w.t,VlNumberInput:u.n,VlPagination:E.n,VlProgress:D.n,VlRadio:O.VlRadio,VlRow:k.VlRow,VlScrollbar:x.n,VlSelect:T.n,VlSidebar:A.n,VlSlider:j.n,VlSpace:M.n,VlSwitch:N.n,VlTable:P.n,VlTabs:l.n,VlTag:F.n,VlTextarea:I.n,VlTimeline:L.n,VlTimePicker:R.n,VlTooltip:y.n,VlTransition:s.n,VlUpload:z.n},V=(e=globalThis)=>(Object.assign(e,B),B);Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return B}});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NotificationPlacement } from './type.cjs';
|
|
2
|
+
/**
|
|
3
|
+
* 声明式与命令式实例共享同一布局容器,CSS flex 负责不同高度内容的堆叠。
|
|
4
|
+
* 仅在客户端 effect 中申请;引用计数兼容 StrictMode 重挂载,最后一个使用者离开时释放 DOM。
|
|
5
|
+
*/
|
|
6
|
+
export declare const acquireNotificationHost: (placement: NotificationPlacement) => {
|
|
7
|
+
element: HTMLDivElement;
|
|
8
|
+
release: () => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NotificationPlacement } from './type.js';
|
|
2
|
+
/**
|
|
3
|
+
* 声明式与命令式实例共享同一布局容器,CSS flex 负责不同高度内容的堆叠。
|
|
4
|
+
* 仅在客户端 effect 中申请;引用计数兼容 StrictMode 重挂载,最后一个使用者离开时释放 DOM。
|
|
5
|
+
*/
|
|
6
|
+
export declare const acquireNotificationHost: (placement: NotificationPlacement) => {
|
|
7
|
+
element: HTMLDivElement;
|
|
8
|
+
release: () => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NotificationComponent } from './type.cjs';
|
|
2
|
+
/** 通知组件,同时提供 open、四种语义快捷方法和 closeAll。 */
|
|
3
|
+
export declare const VlNotification: NotificationComponent;
|
|
4
|
+
export type { NotificationProps, NotificationOptions, NotificationStatus, NotificationPlacement, NotificationRef, NotificationHandle, NotificationComponent } from './type.cjs';
|
|
5
|
+
export default VlNotification;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NotificationComponent } from './type.js';
|
|
2
|
+
/** 通知组件,同时提供 open、四种语义快捷方法和 closeAll。 */
|
|
3
|
+
export declare const VlNotification: NotificationComponent;
|
|
4
|
+
export type { NotificationProps, NotificationOptions, NotificationStatus, NotificationPlacement, NotificationRef, NotificationHandle, NotificationComponent } from './type.js';
|
|
5
|
+
export default VlNotification;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NotificationHandle, NotificationOptions } from './type.cjs';
|
|
2
|
+
/** 为每次调用创建独立 root,显隐与计时仍交给声明式组件。 */
|
|
3
|
+
export declare const open: (options: NotificationOptions) => NotificationHandle;
|
|
4
|
+
/** 取快照后关闭,onClose 新建的通知属于下一批,不应被本次 closeAll 误关。 */
|
|
5
|
+
export declare const closeAll: () => void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NotificationHandle, NotificationOptions } from './type.js';
|
|
2
|
+
/** 为每次调用创建独立 root,显隐与计时仍交给声明式组件。 */
|
|
3
|
+
export declare const open: (options: NotificationOptions) => NotificationHandle;
|
|
4
|
+
/** 取快照后关闭,onClose 新建的通知属于下一批,不应被本次 closeAll 误关。 */
|
|
5
|
+
export declare const closeAll: () => void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, HTMLAttributes, ReactNode, RefAttributes } from 'react';
|
|
2
|
+
import type { DecorativeIcon } from '../_shared/icon.cjs';
|
|
3
|
+
export type NotificationStatus = 'info' | 'success' | 'warning' | 'error';
|
|
4
|
+
export type NotificationPlacement = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
5
|
+
export type NotificationRef = HTMLDivElement;
|
|
6
|
+
/** 通知通过 Portal 共享四角容器;声明式内容仍保留调用方的 React Context。 */
|
|
7
|
+
export interface NotificationProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'onChange'> {
|
|
8
|
+
/** 受控显示状态,显式传入 undefined 也视为受控。 */
|
|
9
|
+
open?: boolean;
|
|
10
|
+
/** 非受控初始显示状态,默认为 false。 */
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
/** 语义状态及默认图标,默认为 info。 */
|
|
14
|
+
status?: NotificationStatus;
|
|
15
|
+
/** 自定义图标,null 隐藏图标。 */
|
|
16
|
+
icon?: DecorativeIcon | null;
|
|
17
|
+
/** 四角位置,同位置的通知按打开顺序从视口边缘向内排列,默认为 top-right。 */
|
|
18
|
+
placement?: NotificationPlacement;
|
|
19
|
+
/** 自动关闭等待时间(毫秒),默认为 4500;小于等于 0 时保持显示。 */
|
|
20
|
+
duration?: number;
|
|
21
|
+
/** 是否显示关闭按钮,默认为 true。 */
|
|
22
|
+
closable?: boolean;
|
|
23
|
+
/** 悬停时暂停倒计时,默认为 true。 */
|
|
24
|
+
pauseOnHover?: boolean;
|
|
25
|
+
/** 内部元素聚焦时暂停倒计时,默认为 true。 */
|
|
26
|
+
pauseOnFocus?: boolean;
|
|
27
|
+
/** 焦点位于通知内时允许 Escape 关闭,默认为 true;不监听全局键盘。 */
|
|
28
|
+
closeOnPressEscape?: boolean;
|
|
29
|
+
/** 正文下方的操作区。 */
|
|
30
|
+
action?: ReactNode;
|
|
31
|
+
/** 关闭请求;受控模式需要调用方回传 open=false。 */
|
|
32
|
+
onChange?: (open: boolean) => void;
|
|
33
|
+
/** 关闭按钮、倒计时或 Escape 发起关闭时触发,每次显示只触发一次。 */
|
|
34
|
+
onClose?: () => void;
|
|
35
|
+
/** 离场动画结束后触发,直接卸载组件不会触发。 */
|
|
36
|
+
onAfterClose?: () => void;
|
|
37
|
+
}
|
|
38
|
+
export interface NotificationOptions extends Omit<NotificationProps, 'children' | 'content' | 'open' | 'defaultOpen' | 'onChange'> {
|
|
39
|
+
/** 命令式通知正文,对应声明式 children。 */
|
|
40
|
+
content?: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
export interface NotificationHandle {
|
|
43
|
+
/** 关闭当前通知;可重复调用,也可在通知首次渲染前调用。 */
|
|
44
|
+
close: () => void;
|
|
45
|
+
}
|
|
46
|
+
/** 静态方法仅供浏览器事件或客户端组件调用,返回可手动关闭的句柄。 */
|
|
47
|
+
export interface NotificationComponent extends ForwardRefExoticComponent<NotificationProps & RefAttributes<NotificationRef>> {
|
|
48
|
+
open: (options: NotificationOptions) => NotificationHandle;
|
|
49
|
+
info: (options: NotificationOptions) => NotificationHandle;
|
|
50
|
+
success: (options: NotificationOptions) => NotificationHandle;
|
|
51
|
+
warning: (options: NotificationOptions) => NotificationHandle;
|
|
52
|
+
error: (options: NotificationOptions) => NotificationHandle;
|
|
53
|
+
/** 关闭所有命令式通知;声明式实例仍由各自的 open 状态管理。 */
|
|
54
|
+
closeAll: () => void;
|
|
55
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, HTMLAttributes, ReactNode, RefAttributes } from 'react';
|
|
2
|
+
import type { DecorativeIcon } from '../_shared/icon.js';
|
|
3
|
+
export type NotificationStatus = 'info' | 'success' | 'warning' | 'error';
|
|
4
|
+
export type NotificationPlacement = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
5
|
+
export type NotificationRef = HTMLDivElement;
|
|
6
|
+
/** 通知通过 Portal 共享四角容器;声明式内容仍保留调用方的 React Context。 */
|
|
7
|
+
export interface NotificationProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'onChange'> {
|
|
8
|
+
/** 受控显示状态,显式传入 undefined 也视为受控。 */
|
|
9
|
+
open?: boolean;
|
|
10
|
+
/** 非受控初始显示状态,默认为 false。 */
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
/** 语义状态及默认图标,默认为 info。 */
|
|
14
|
+
status?: NotificationStatus;
|
|
15
|
+
/** 自定义图标,null 隐藏图标。 */
|
|
16
|
+
icon?: DecorativeIcon | null;
|
|
17
|
+
/** 四角位置,同位置的通知按打开顺序从视口边缘向内排列,默认为 top-right。 */
|
|
18
|
+
placement?: NotificationPlacement;
|
|
19
|
+
/** 自动关闭等待时间(毫秒),默认为 4500;小于等于 0 时保持显示。 */
|
|
20
|
+
duration?: number;
|
|
21
|
+
/** 是否显示关闭按钮,默认为 true。 */
|
|
22
|
+
closable?: boolean;
|
|
23
|
+
/** 悬停时暂停倒计时,默认为 true。 */
|
|
24
|
+
pauseOnHover?: boolean;
|
|
25
|
+
/** 内部元素聚焦时暂停倒计时,默认为 true。 */
|
|
26
|
+
pauseOnFocus?: boolean;
|
|
27
|
+
/** 焦点位于通知内时允许 Escape 关闭,默认为 true;不监听全局键盘。 */
|
|
28
|
+
closeOnPressEscape?: boolean;
|
|
29
|
+
/** 正文下方的操作区。 */
|
|
30
|
+
action?: ReactNode;
|
|
31
|
+
/** 关闭请求;受控模式需要调用方回传 open=false。 */
|
|
32
|
+
onChange?: (open: boolean) => void;
|
|
33
|
+
/** 关闭按钮、倒计时或 Escape 发起关闭时触发,每次显示只触发一次。 */
|
|
34
|
+
onClose?: () => void;
|
|
35
|
+
/** 离场动画结束后触发,直接卸载组件不会触发。 */
|
|
36
|
+
onAfterClose?: () => void;
|
|
37
|
+
}
|
|
38
|
+
export interface NotificationOptions extends Omit<NotificationProps, 'children' | 'content' | 'open' | 'defaultOpen' | 'onChange'> {
|
|
39
|
+
/** 命令式通知正文,对应声明式 children。 */
|
|
40
|
+
content?: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
export interface NotificationHandle {
|
|
43
|
+
/** 关闭当前通知;可重复调用,也可在通知首次渲染前调用。 */
|
|
44
|
+
close: () => void;
|
|
45
|
+
}
|
|
46
|
+
/** 静态方法仅供浏览器事件或客户端组件调用,返回可手动关闭的句柄。 */
|
|
47
|
+
export interface NotificationComponent extends ForwardRefExoticComponent<NotificationProps & RefAttributes<NotificationRef>> {
|
|
48
|
+
open: (options: NotificationOptions) => NotificationHandle;
|
|
49
|
+
info: (options: NotificationOptions) => NotificationHandle;
|
|
50
|
+
success: (options: NotificationOptions) => NotificationHandle;
|
|
51
|
+
warning: (options: NotificationOptions) => NotificationHandle;
|
|
52
|
+
error: (options: NotificationOptions) => NotificationHandle;
|
|
53
|
+
/** 关闭所有命令式通知;声明式实例仍由各自的 open 状态管理。 */
|
|
54
|
+
closeAll: () => void;
|
|
55
|
+
}
|
|
@@ -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/dist/types/global.d.cts
CHANGED
|
@@ -21,6 +21,7 @@ import type { VlInput as VlInputComponent } from './Input/index.cjs';
|
|
|
21
21
|
import type { VlLoading as VlLoadingComponent } from './Loading/index.cjs';
|
|
22
22
|
import type { VlMessageBox as VlMessageBoxComponent } from './MessageBox/index.cjs';
|
|
23
23
|
import type { VlModal as VlModalComponent } from './Modal/index.cjs';
|
|
24
|
+
import type { VlNotification as VlNotificationComponent } from './Notification/index.cjs';
|
|
24
25
|
import type { VlNumberInput as VlNumberInputComponent } from './NumberInput/index.cjs';
|
|
25
26
|
import type { VlPagination as VlPaginationComponent } from './Pagination/index.cjs';
|
|
26
27
|
import type { VlProgress as VlProgressComponent } from './Progress/index.cjs';
|
|
@@ -67,6 +68,7 @@ declare global {
|
|
|
67
68
|
const VlLoading: typeof VlLoadingComponent;
|
|
68
69
|
const VlMessageBox: typeof VlMessageBoxComponent;
|
|
69
70
|
const VlModal: typeof VlModalComponent;
|
|
71
|
+
const VlNotification: typeof VlNotificationComponent;
|
|
70
72
|
const VlNumberInput: typeof VlNumberInputComponent;
|
|
71
73
|
const VlPagination: typeof VlPaginationComponent;
|
|
72
74
|
const VlProgress: typeof VlProgressComponent;
|
package/dist/types/global.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import type { VlInput as VlInputComponent } from './Input/index.js';
|
|
|
21
21
|
import type { VlLoading as VlLoadingComponent } from './Loading/index.js';
|
|
22
22
|
import type { VlMessageBox as VlMessageBoxComponent } from './MessageBox/index.js';
|
|
23
23
|
import type { VlModal as VlModalComponent } from './Modal/index.js';
|
|
24
|
+
import type { VlNotification as VlNotificationComponent } from './Notification/index.js';
|
|
24
25
|
import type { VlNumberInput as VlNumberInputComponent } from './NumberInput/index.js';
|
|
25
26
|
import type { VlPagination as VlPaginationComponent } from './Pagination/index.js';
|
|
26
27
|
import type { VlProgress as VlProgressComponent } from './Progress/index.js';
|
|
@@ -67,6 +68,7 @@ declare global {
|
|
|
67
68
|
const VlLoading: typeof VlLoadingComponent;
|
|
68
69
|
const VlMessageBox: typeof VlMessageBoxComponent;
|
|
69
70
|
const VlModal: typeof VlModalComponent;
|
|
71
|
+
const VlNotification: typeof VlNotificationComponent;
|
|
70
72
|
const VlNumberInput: typeof VlNumberInputComponent;
|
|
71
73
|
const VlPagination: typeof VlPaginationComponent;
|
|
72
74
|
const VlProgress: typeof VlProgressComponent;
|
package/dist/types/index.d.cts
CHANGED
|
@@ -22,6 +22,7 @@ export * from './Input/index.cjs';
|
|
|
22
22
|
export * from './Loading/index.cjs';
|
|
23
23
|
export * from './MessageBox/index.cjs';
|
|
24
24
|
export * from './Modal/index.cjs';
|
|
25
|
+
export * from './Notification/index.cjs';
|
|
25
26
|
export * from './NumberInput/index.cjs';
|
|
26
27
|
export * from './Pagination/index.cjs';
|
|
27
28
|
export * from './Progress/index.cjs';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from './Input/index.js';
|
|
|
22
22
|
export * from './Loading/index.js';
|
|
23
23
|
export * from './MessageBox/index.js';
|
|
24
24
|
export * from './Modal/index.js';
|
|
25
|
+
export * from './Notification/index.js';
|
|
25
26
|
export * from './NumberInput/index.js';
|
|
26
27
|
export * from './Pagination/index.js';
|
|
27
28
|
export * from './Progress/index.js';
|
|
@@ -30,6 +30,7 @@ export declare const globalComponents: {
|
|
|
30
30
|
readonly VlLoading: import("react").ForwardRefExoticComponent<import("./Loading/index.cjs").LoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
31
|
readonly VlMessageBox: import("./MessageBox/index.cjs").MessageBoxComponent;
|
|
32
32
|
readonly VlModal: import("react").ForwardRefExoticComponent<import("./Modal/index.cjs").ModalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
33
|
+
readonly VlNotification: import("./Notification/index.cjs").NotificationComponent;
|
|
33
34
|
readonly VlNumberInput: import("react").ForwardRefExoticComponent<import("./NumberInput/index.cjs").NumberInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
34
35
|
readonly VlPagination: import("react").ForwardRefExoticComponent<import("./Pagination/index.cjs").PaginationProps & import("react").RefAttributes<HTMLElement>>;
|
|
35
36
|
readonly VlProgress: import("react").ForwardRefExoticComponent<import("./Progress/index.cjs").ProgressProps & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/types/registry.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare const globalComponents: {
|
|
|
30
30
|
readonly VlLoading: import("react").ForwardRefExoticComponent<import("./Loading/index.js").LoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
31
|
readonly VlMessageBox: import("./MessageBox/index.js").MessageBoxComponent;
|
|
32
32
|
readonly VlModal: import("react").ForwardRefExoticComponent<import("./Modal/index.js").ModalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
33
|
+
readonly VlNotification: import("./Notification/index.js").NotificationComponent;
|
|
33
34
|
readonly VlNumberInput: import("react").ForwardRefExoticComponent<import("./NumberInput/index.js").NumberInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
34
35
|
readonly VlPagination: import("react").ForwardRefExoticComponent<import("./Pagination/index.js").PaginationProps & import("react").RefAttributes<HTMLElement>>;
|
|
35
36
|
readonly VlProgress: import("react").ForwardRefExoticComponent<import("./Progress/index.js").ProgressProps & import("react").RefAttributes<HTMLDivElement>>;
|