@chaos_team/chaos-ui 1.0.5 → 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/CHANGELOG.md +72 -0
- package/README.md +11 -15
- package/dist/auth-layout-AqhdIh5N.d.cts +172 -0
- package/dist/auth-layout-AqhdIh5N.d.ts +172 -0
- package/dist/business.cjs +11 -9
- package/dist/business.d.cts +1015 -939
- package/dist/business.d.ts +1015 -939
- package/dist/business.js +11 -9
- package/dist/card-DY3pk0zA.d.cts +150 -0
- package/dist/card-DY3pk0zA.d.ts +150 -0
- package/dist/hooks.cjs +2 -2
- package/dist/hooks.d.cts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +2 -2
- package/dist/index.cjs +8 -1
- package/dist/index.d.cts +2089 -9
- package/dist/index.d.ts +2089 -9
- package/dist/index.js +8 -1
- package/dist/input-B39p_6ia.d.cts +40 -0
- package/dist/input-B39p_6ia.d.ts +40 -0
- package/dist/layout.cjs +12 -0
- package/dist/layout.d.cts +642 -0
- package/dist/layout.d.ts +642 -0
- package/dist/layout.js +12 -0
- package/dist/lib.d.cts +1 -1
- package/dist/lib.d.ts +1 -1
- package/dist/{message-KJli9tvf.d.cts → message-BoUedza5.d.cts} +1 -1
- package/dist/{message-KJli9tvf.d.ts → message-BoUedza5.d.ts} +1 -1
- package/dist/message-provider-Dt4mVwWP.d.cts +23 -0
- package/dist/message-provider-Dt4mVwWP.d.ts +23 -0
- package/dist/mobile-bottom-nav-Bi6_V5Bu.d.cts +18 -0
- package/dist/mobile-bottom-nav-Bi6_V5Bu.d.ts +18 -0
- package/dist/mobile-qrcode-scanner-BHDncd40.d.cts +327 -0
- package/dist/mobile-qrcode-scanner-a_Cz8tF5.d.ts +327 -0
- package/dist/mobile.cjs +6 -0
- package/dist/mobile.d.cts +101 -0
- package/dist/mobile.d.ts +101 -0
- package/dist/mobile.js +6 -0
- package/dist/next.cjs +1 -1
- package/dist/next.d.cts +5 -102
- package/dist/next.d.ts +5 -102
- package/dist/next.js +1 -1
- package/dist/top-bar-BYXz4LtM.d.cts +74 -0
- package/dist/top-bar-BYXz4LtM.d.ts +74 -0
- package/dist/ui/icons.cjs +1 -1
- package/dist/ui/icons.d.cts +1 -1
- package/dist/ui/icons.d.ts +1 -1
- package/dist/ui/icons.js +1 -1
- package/dist/ui-icons.cjs +1 -1
- package/dist/ui-icons.d.cts +24 -1
- package/dist/ui-icons.d.ts +24 -1
- package/dist/ui-icons.js +1 -1
- package/dist/ui.cjs +8 -1
- package/dist/ui.d.cts +7 -5
- package/dist/ui.d.ts +7 -5
- package/dist/ui.js +8 -1
- package/package.json +15 -5
- package/styles.css +11 -11
- package/dist/message-provider-BI-P3CNq.d.cts +0 -11
- package/dist/message-provider-BI-P3CNq.d.ts +0 -11
- package/dist/time-picker-H1AaecnE.d.cts +0 -452
- package/dist/time-picker-H1AaecnE.d.ts +0 -452
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
+
import * as sonner from 'sonner';
|
|
2
3
|
import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
|
|
3
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
5
|
import { VariantProps } from 'class-variance-authority';
|
|
5
6
|
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
6
|
-
import {
|
|
7
|
-
export {
|
|
7
|
+
import { B as Button, I as Input, b as buttonVariants } from './input-B39p_6ia.cjs';
|
|
8
|
+
export { a as ButtonProps, c as InputProps } from './input-B39p_6ia.cjs';
|
|
8
9
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
9
10
|
import { useRender } from '@base-ui/react/use-render';
|
|
10
11
|
import { DayPicker, DayButton, Locale } from 'react-day-picker';
|
|
12
|
+
export { C as Card, a as CardAction, b as CardContent, c as CardDescription, d as CardFooter, e as CardHeader, f as CardSection, g as CardTitle, T as Transfer, h as TransferItem } from './card-DY3pk0zA.cjs';
|
|
11
13
|
import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
|
|
12
14
|
import { Collapsible as Collapsible$1 } from '@base-ui/react/collapsible';
|
|
13
15
|
import { Command as Command$1 } from 'cmdk';
|
|
@@ -34,8 +36,8 @@ import { Switch as Switch$1 } from '@base-ui/react/switch';
|
|
|
34
36
|
import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
|
|
35
37
|
import { Toggle as Toggle$1 } from '@base-ui/react/toggle';
|
|
36
38
|
import { ToggleGroup as ToggleGroup$1 } from '@base-ui/react/toggle-group';
|
|
37
|
-
export { ActivityIcon, AlertCircleIcon, AlertTriangleIcon, ArchiveIcon, ArrowDownIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRight, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, ArrowUpRightIcon, AwardIcon, BadgeDollarSignIcon, BanknoteIcon, BarChart3Icon, BarChartIcon, BarcodeIcon, BellIcon, Bold, BoldIcon, BookOpen, BookmarkCheckIcon, BookmarkIcon, BrainIcon, Building2Icon, BuildingIcon, CalculatorIcon, CalendarDaysIcon, CalendarIcon, CameraIcon, CarIcon, CheckCircle2Icon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, CircleCheckIcon, CircleIcon, ClipboardListIcon, ClockIcon, CodeIcon, CoinsIcon, Columns3Icon, CookieIcon, CopyIcon, CreditCardIcon, DollarSignIcon, DonutIcon, DotIcon, DownloadIcon, Edit3Icon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FactoryIcon, FileEditIcon, FileIcon, FilePlusIcon, FileSpreadsheetIcon, FileTextIcon, FileXIcon, FilterIcon, FlagIcon, FolderIcon, FolderOpenIcon, FunnelIcon, GalleryHorizontalEnd, GanttChartIcon, GlobeIcon, GoalIcon, GridIcon, GripVerticalIcon, Heading1Icon, Heading2Icon, Home, HomeIcon, ImageIcon, Inbox, InboxIcon, InfoIcon, Italic, ItalicIcon, KeyboardIcon, LanguagesIcon, LayersIcon, LayoutDashboardIcon, LayoutGridIcon, LifeBuoyIcon, LineChartIcon, Link2Icon, LinkIcon, ListIcon, ListOrderedIcon, Loader2, Loader2Icon, LockIcon, Mail, MailIcon, MapIcon, MapPinIcon, MapPinnedIcon, MaximizeIcon, MedalIcon, MegaphoneIcon, MenuIcon, MessageSquareIcon, MicIcon, MinimizeIcon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MousePointerClickIcon, OctagonXIcon, PackageCheckIcon, PackageIcon, PanelLeftCloseIcon, PanelLeftIcon, PanelLeftOpenIcon, PanelRightIcon, PaperclipIcon, PauseIcon, PencilIcon, PieChartIcon, PiggyBankIcon, PinIcon, PipetteIcon, PlayIcon, Plus, PlusIcon, PrinterIcon, QrCodeIcon, QuoteIcon, RadioTowerIcon, ReceiptIcon, RedoIcon, RefreshCwIcon, RocketIcon, RotateCcwIcon, SaveIcon, Search, SearchIcon, SearchXIcon, SendIcon, ServerCrashIcon, Settings, SettingsIcon, Share2Icon, ShieldAlertIcon, ShieldCheck, ShieldCheckIcon, ShieldIcon, ShoppingCartIcon, SignatureIcon, SmartphoneIcon, Sparkles, SparklesIcon, SquareIcon, StarIcon, StrikethroughIcon, SunIcon, TableIcon, TagIcon, TargetIcon, TerminalIcon, ThumbsDownIcon, ThumbsUpIcon, Trash2Icon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleAlertIcon, TrophyIcon, TruckIcon, Underline, UndoIcon, UploadIcon, UserIcon, UsersIcon, Volume2Icon, WalletIcon, WandSparklesIcon, WifiOffIcon, WrenchIcon, XCircleIcon, XIcon, ZapIcon, ZoomInIcon, ZoomOutIcon } from './ui-icons.cjs';
|
|
38
|
-
export { M as MessageProvider, a as MessageProviderProps } from './message-provider-
|
|
39
|
+
export { ActivityIcon, AlertCircleIcon, AlertTriangleIcon, ArchiveIcon, ArrowDownIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRight, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, ArrowUpRightIcon, AwardIcon, BadgeDollarSignIcon, BanIcon, BanknoteIcon, BarChart3Icon, BarChartIcon, BarcodeIcon, BellIcon, Bold, BoldIcon, BookOpen, BookmarkCheckIcon, BookmarkIcon, BoxesIcon, BrainIcon, Building2Icon, BuildingIcon, CalculatorIcon, CalendarDaysIcon, CalendarIcon, CameraIcon, CarIcon, CheckCheckIcon, CheckCircle2Icon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, CircleCheckIcon, CircleIcon, ClipboardCheckIcon, ClipboardListIcon, ClockIcon, CodeIcon, CoinsIcon, Columns3Icon, ConstructionIcon, CookieIcon, CopyIcon, CreditCardIcon, CropIcon, CrosshairIcon, DatabaseIcon, DollarSignIcon, DonutIcon, DotIcon, DownloadIcon, Edit3Icon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FactoryIcon, FileEditIcon, FileIcon, FilePlusIcon, FileSpreadsheetIcon, FileTextIcon, FileXIcon, FilterIcon, FlagIcon, FolderIcon, FolderOpenIcon, FolderTreeIcon, FunnelIcon, GalleryHorizontalEnd, GanttChartIcon, GiftIcon, GlobeIcon, GoalIcon, GridIcon, GripVerticalIcon, HardDriveIcon, Heading1Icon, Heading2Icon, Home, HomeIcon, ImageIcon, Inbox, InboxIcon, InfoIcon, Italic, ItalicIcon, KeyboardIcon, LanguagesIcon, LayersIcon, LayoutDashboardIcon, LayoutGridIcon, LifeBuoyIcon, LineChartIcon, Link2Icon, LinkIcon, ListIcon, ListOrderedIcon, Loader2, Loader2Icon, LockIcon, LogInIcon, LogOutIcon, Mail, MailIcon, MapIcon, MapPinIcon, MapPinnedIcon, MaximizeIcon, MedalIcon, MegaphoneIcon, MenuIcon, MessageSquareIcon, MessageSquareWarningIcon, MicIcon, MinimizeIcon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MousePointerClickIcon, OctagonXIcon, PackageCheckIcon, PackageIcon, PanelLeftCloseIcon, PanelLeftIcon, PanelLeftOpenIcon, PanelRightIcon, PaperclipIcon, PauseIcon, PencilIcon, PercentIcon, PieChartIcon, PiggyBankIcon, PinIcon, PinOffIcon, PipetteIcon, PlayIcon, Plus, PlusIcon, PowerIcon, PrinterIcon, QrCodeIcon, QuoteIcon, RadioTowerIcon, ReceiptIcon, RedoIcon, RefreshCcwIcon, RefreshCwIcon, RocketIcon, RotateCcwIcon, RotateCwIcon, Rows3Icon, SaveIcon, ScanLineIcon, Search, SearchIcon, SearchXIcon, SendIcon, ServerCrashIcon, Settings, SettingsIcon, Share2Icon, ShieldAlertIcon, ShieldCheck, ShieldCheckIcon, ShieldIcon, ShoppingCartIcon, SignatureIcon, SmartphoneIcon, Sparkles, SparklesIcon, SquareIcon, StarIcon, StrikethroughIcon, SunIcon, TableIcon, TagIcon, TagsIcon, TargetIcon, TerminalIcon, ThumbsDownIcon, ThumbsUpIcon, Trash2Icon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleAlertIcon, TrophyIcon, TruckIcon, Underline, UndoIcon, UnlockIcon, UploadIcon, UserIcon, UsersIcon, Volume2Icon, WalletIcon, WandSparklesIcon, WifiOffIcon, WrenchIcon, XCircleIcon, XIcon, ZapIcon, ZoomInIcon, ZoomOutIcon } from './ui-icons.cjs';
|
|
40
|
+
export { M as MessageProvider, a as MessageProviderProps, T as Toaster } from './message-provider-Dt4mVwWP.cjs';
|
|
39
41
|
import { LucideIcon } from 'lucide-react';
|
|
40
42
|
export { LucideIcon } from 'lucide-react';
|
|
41
43
|
import '@base-ui/react/button';
|
|
@@ -617,6 +619,63 @@ declare function CalendarDayButton({ className, day, modifiers, locale, ...props
|
|
|
617
619
|
locale?: Partial<Locale>;
|
|
618
620
|
}): React$1.JSX.Element;
|
|
619
621
|
|
|
622
|
+
/**
|
|
623
|
+
* @component Captcha
|
|
624
|
+
* @category ui/data-entry
|
|
625
|
+
* @since 1.1.0
|
|
626
|
+
* @description 图形验证码组件,包含随机生成的验证码画布、输入框和刷新按钮。常用于登录、注册、表单提交等需要人机验证的场景。
|
|
627
|
+
* Visual captcha component with a randomly generated code rendered on canvas,
|
|
628
|
+
* an input field, and a refresh button. Common in login, registration, and
|
|
629
|
+
* form-submission scenarios.
|
|
630
|
+
* @keywords captcha, verification, code, image, canvas, anti-bot, 验证码, 图形验证码, 人机验证
|
|
631
|
+
* @example
|
|
632
|
+
* <Captcha onVerify={(valid) => console.log(valid)} />
|
|
633
|
+
*/
|
|
634
|
+
/**
|
|
635
|
+
* Generate a random captcha code of the given length.
|
|
636
|
+
* Uses uppercase letters and digits, excluding easily confused characters (O/0/I/1/L).
|
|
637
|
+
*/
|
|
638
|
+
declare function generateCode(length: number): string;
|
|
639
|
+
interface CaptchaVisualOptions {
|
|
640
|
+
/** Canvas background color */
|
|
641
|
+
bgColor?: string;
|
|
642
|
+
/** Character font size */
|
|
643
|
+
fontSize?: number;
|
|
644
|
+
/** Character font family */
|
|
645
|
+
fontFamily?: string;
|
|
646
|
+
/** Character text color */
|
|
647
|
+
textColor?: string;
|
|
648
|
+
/** Number of noise lines */
|
|
649
|
+
noiseLines?: number;
|
|
650
|
+
/** Number of noise dots */
|
|
651
|
+
noiseDots?: number;
|
|
652
|
+
}
|
|
653
|
+
interface CaptchaProps {
|
|
654
|
+
/** Code length / 验证码长度,默认 4 */
|
|
655
|
+
length?: number;
|
|
656
|
+
/** Canvas width / 画布宽度 */
|
|
657
|
+
canvasWidth?: number;
|
|
658
|
+
/** Canvas height / 画布高度 */
|
|
659
|
+
canvasHeight?: number;
|
|
660
|
+
/** Visual customization / 视觉自定义选项 */
|
|
661
|
+
visualOptions?: CaptchaVisualOptions;
|
|
662
|
+
/** Called when user submits a verification attempt / 用户提交验证时回调 */
|
|
663
|
+
onVerify?: (valid: boolean) => void;
|
|
664
|
+
/** Called when the captcha code changes (refresh or initial) / 验证码变更时回调 */
|
|
665
|
+
onCodeChange?: (code: string) => void;
|
|
666
|
+
/** Placeholder text for the input / 输入框占位文字 */
|
|
667
|
+
placeholder?: string;
|
|
668
|
+
/** Whether the input is disabled / 是否禁用 */
|
|
669
|
+
disabled?: boolean;
|
|
670
|
+
/** Additional class for the wrapper / 外层容器类名 */
|
|
671
|
+
className?: string;
|
|
672
|
+
/** Input size / 输入框大小 */
|
|
673
|
+
size?: "sm" | "default" | "lg";
|
|
674
|
+
/** Whether to auto-refresh on mount / 是否挂载时自动刷新 */
|
|
675
|
+
autoRefresh?: boolean;
|
|
676
|
+
}
|
|
677
|
+
declare function Captcha({ length, canvasWidth, canvasHeight, visualOptions, onVerify, onCodeChange, placeholder, disabled, className, size, autoRefresh, }: CaptchaProps): React$1.JSX.Element;
|
|
678
|
+
|
|
620
679
|
interface CarouselProps extends React$1.ComponentProps<"div"> {
|
|
621
680
|
defaultIndex?: number;
|
|
622
681
|
loop?: boolean;
|
|
@@ -1766,7 +1825,7 @@ interface FullscreenToggleProps {
|
|
|
1766
1825
|
declare function FullscreenToggle({ targetRef, size, variant, className, }: FullscreenToggleProps): React$1.JSX.Element;
|
|
1767
1826
|
|
|
1768
1827
|
declare const gridLayoutVariants: (props?: ({
|
|
1769
|
-
columns?: 1 | "auto" | 3 | 2 | 4 |
|
|
1828
|
+
columns?: 1 | "auto" | 3 | 2 | 4 | 6 | 5 | 12 | null | undefined;
|
|
1770
1829
|
gap?: "none" | "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
1771
1830
|
align?: "end" | "center" | "stretch" | "start" | null | undefined;
|
|
1772
1831
|
justify?: "end" | "center" | "start" | "between" | null | undefined;
|
|
@@ -2146,6 +2205,96 @@ declare function OTPField({ length, value, onValueChange, mask, className, input
|
|
|
2146
2205
|
*/
|
|
2147
2206
|
declare function OTPFieldSeparator({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
2148
2207
|
|
|
2208
|
+
type DocType = "word" | "excel" | "ppt" | "unknown";
|
|
2209
|
+
interface OfficeDocPreviewProps {
|
|
2210
|
+
/** Document URL (publicly accessible) / 文档公开访问 URL */
|
|
2211
|
+
src: string;
|
|
2212
|
+
/** Document file name (for type detection) / 文件名(用于类型识别) */
|
|
2213
|
+
fileName?: string;
|
|
2214
|
+
/** Explicit document type override / 手动指定文档类型 */
|
|
2215
|
+
docType?: DocType;
|
|
2216
|
+
/** Preview height / 预览高度 */
|
|
2217
|
+
height?: number | string;
|
|
2218
|
+
/** Whether to show toolbar / 是否显示工具栏 */
|
|
2219
|
+
showToolbar?: boolean;
|
|
2220
|
+
/** Whether to allow fullscreen / 是否允许全屏 */
|
|
2221
|
+
allowFullscreen?: boolean;
|
|
2222
|
+
/** Whether to show download button / 是否显示下载按钮 */
|
|
2223
|
+
allowDownload?: boolean;
|
|
2224
|
+
/** Preview engine / 预览引擎 */
|
|
2225
|
+
engine?: "microsoft" | "google";
|
|
2226
|
+
/** Loading placeholder / 加载占位 */
|
|
2227
|
+
loadingText?: string;
|
|
2228
|
+
/** Error text / 错误提示 */
|
|
2229
|
+
errorText?: string;
|
|
2230
|
+
/** Called when preview loads / 预览加载完成 */
|
|
2231
|
+
onLoad?: () => void;
|
|
2232
|
+
/** Called on preview error / 预览错误 */
|
|
2233
|
+
onError?: (error: string) => void;
|
|
2234
|
+
/** Additional class / 额外类名 */
|
|
2235
|
+
className?: string;
|
|
2236
|
+
}
|
|
2237
|
+
declare function detectDocType(fileName?: string, explicitType?: DocType): DocType;
|
|
2238
|
+
declare function OfficeDocPreview({ src, fileName, docType: explicitType, height, showToolbar, allowFullscreen, allowDownload, engine, loadingText, errorText, onLoad, onError, className, }: OfficeDocPreviewProps): React$1.JSX.Element;
|
|
2239
|
+
|
|
2240
|
+
interface OrgTreeNode {
|
|
2241
|
+
/** Unique identifier / 唯一标识 */
|
|
2242
|
+
id: string;
|
|
2243
|
+
/** Display label / 显示名称 */
|
|
2244
|
+
label: string;
|
|
2245
|
+
/** Optional secondary text (e.g. headcount, role) / 辅助文字 */
|
|
2246
|
+
description?: string;
|
|
2247
|
+
/** Optional avatar URL / 头像 */
|
|
2248
|
+
avatar?: string;
|
|
2249
|
+
/** Children nodes / 子节点 */
|
|
2250
|
+
children?: OrgTreeNode[];
|
|
2251
|
+
/** Whether children are being loaded asynchronously / 是否异步加载子节点 */
|
|
2252
|
+
loading?: boolean;
|
|
2253
|
+
/** Whether the node is disabled / 是否禁用 */
|
|
2254
|
+
disabled?: boolean;
|
|
2255
|
+
/** Arbitrary metadata / 额外数据 */
|
|
2256
|
+
meta?: Record<string, unknown>;
|
|
2257
|
+
}
|
|
2258
|
+
interface OrgTreeProps {
|
|
2259
|
+
/** Tree data / 树数据 */
|
|
2260
|
+
data: OrgTreeNode[];
|
|
2261
|
+
/** Selected node IDs (controlled) / 受控选中节点 */
|
|
2262
|
+
selectedKeys?: string[];
|
|
2263
|
+
/** Default selected node IDs (uncontrolled) / 默认选中节点 */
|
|
2264
|
+
defaultSelectedKeys?: string[];
|
|
2265
|
+
/** Default expanded node IDs (uncontrolled) / 默认展开节点 */
|
|
2266
|
+
defaultExpandedKeys?: string[];
|
|
2267
|
+
/** Expanded node IDs (controlled) / 受控展开节点 */
|
|
2268
|
+
expandedKeys?: string[];
|
|
2269
|
+
/** Called when selection changes / 选中变更回调 */
|
|
2270
|
+
onSelect?: (selectedKeys: string[]) => void;
|
|
2271
|
+
/** Called when expansion changes / 展开变更回调 */
|
|
2272
|
+
onExpand?: (expandedKeys: string[]) => void;
|
|
2273
|
+
/** Called when a node is clicked / 节点点击回调 */
|
|
2274
|
+
onNodeClick?: (node: OrgTreeNode) => void;
|
|
2275
|
+
/** Called to load children asynchronously / 异步加载子节点 */
|
|
2276
|
+
onLoadChildren?: (node: OrgTreeNode) => Promise<OrgTreeNode[]>;
|
|
2277
|
+
/** Selection mode / 选择模式 */
|
|
2278
|
+
selectable?: "none" | "single" | "multiple";
|
|
2279
|
+
/** Whether to show checkboxes (multiple selection) / 是否显示复选框 */
|
|
2280
|
+
checkable?: boolean;
|
|
2281
|
+
/** Whether to show a search input / 是否显示搜索框 */
|
|
2282
|
+
searchable?: boolean;
|
|
2283
|
+
/** Search placeholder / 搜索占位文字 */
|
|
2284
|
+
searchPlaceholder?: string;
|
|
2285
|
+
/** Whether to show connecting lines / 是否显示连接线 */
|
|
2286
|
+
showLine?: boolean;
|
|
2287
|
+
/** Whether nodes are draggable / 是否可拖拽 */
|
|
2288
|
+
draggable?: boolean;
|
|
2289
|
+
/** Called when a node is dropped / 拖拽放置回调 */
|
|
2290
|
+
onDrop?: (dragNode: OrgTreeNode, dropNode: OrgTreeNode) => void;
|
|
2291
|
+
/** Additional class / 额外类名 */
|
|
2292
|
+
className?: string;
|
|
2293
|
+
/** Custom render for node label / 自定义节点渲染 */
|
|
2294
|
+
renderNode?: (node: OrgTreeNode, expanded: boolean) => React$1.ReactNode;
|
|
2295
|
+
}
|
|
2296
|
+
declare function OrgTree({ data, selectedKeys: controlledSelected, defaultSelectedKeys, defaultExpandedKeys, expandedKeys: controlledExpanded, onSelect, onExpand, onNodeClick, onLoadChildren, selectable, checkable, searchable, searchPlaceholder, showLine, draggable, onDrop, className, renderNode, }: OrgTreeProps): React$1.JSX.Element;
|
|
2297
|
+
|
|
2149
2298
|
declare const pageContainerVariants: (props?: ({
|
|
2150
2299
|
size?: "none" | "default" | "sm" | "lg" | "full" | null | undefined;
|
|
2151
2300
|
padding?: "none" | "default" | "sm" | "lg" | null | undefined;
|
|
@@ -2903,10 +3052,11 @@ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: se
|
|
|
2903
3052
|
* </Sidebar>
|
|
2904
3053
|
* </SidebarProvider>
|
|
2905
3054
|
*/
|
|
2906
|
-
declare function Sidebar({ side, variant, collapsible, className, children, dir, ...props }: React$1.ComponentProps<"div"> & {
|
|
3055
|
+
declare function Sidebar({ side, variant, collapsible, className, children, dir, style, theme, ...props }: React$1.ComponentProps<"div"> & {
|
|
2907
3056
|
side?: "left" | "right";
|
|
2908
3057
|
variant?: "sidebar" | "floating" | "inset";
|
|
2909
3058
|
collapsible?: "offcanvas" | "icon" | "none";
|
|
3059
|
+
theme?: "light" | "dark";
|
|
2910
3060
|
}): React$1.JSX.Element;
|
|
2911
3061
|
/**
|
|
2912
3062
|
* @component SidebarTrigger
|
|
@@ -3843,7 +3993,7 @@ interface VirtualListProps<T> {
|
|
|
3843
3993
|
*/
|
|
3844
3994
|
declare function VirtualList<T>({ data, renderItem, estimateSize, overscan, height, width, className, onEndReached, endReachedThreshold, loading, loadingComponent, emptyComponent, }: VirtualListProps<T>): string | number | bigint | true | React$1.JSX.Element | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined>;
|
|
3845
3995
|
|
|
3846
|
-
interface ColumnDef<T> {
|
|
3996
|
+
interface ColumnDef$1<T> {
|
|
3847
3997
|
key: string;
|
|
3848
3998
|
header: string;
|
|
3849
3999
|
width?: number | string;
|
|
@@ -3851,7 +4001,7 @@ interface ColumnDef<T> {
|
|
|
3851
4001
|
render?: (row: T) => React$1.ReactNode;
|
|
3852
4002
|
}
|
|
3853
4003
|
interface VirtualTableProps<T> {
|
|
3854
|
-
columns: ColumnDef<T>[];
|
|
4004
|
+
columns: ColumnDef$1<T>[];
|
|
3855
4005
|
data: T[];
|
|
3856
4006
|
estimateRowHeight: number;
|
|
3857
4007
|
overscan?: number;
|
|
@@ -4086,6 +4236,69 @@ interface SpinnerProps extends React$1.ComponentProps<"span"> {
|
|
|
4086
4236
|
}
|
|
4087
4237
|
declare function Spinner({ className, size, variant, color, label, ...props }: SpinnerProps): React$1.JSX.Element;
|
|
4088
4238
|
|
|
4239
|
+
interface ColumnDef {
|
|
4240
|
+
/** Column key / 列标识 */
|
|
4241
|
+
key: string;
|
|
4242
|
+
/** Column header / 列表头 */
|
|
4243
|
+
title: string;
|
|
4244
|
+
/** Column width (px) / 列宽 */
|
|
4245
|
+
width?: number;
|
|
4246
|
+
/** Min column width (px) / 最小列宽 */
|
|
4247
|
+
minWidth?: number;
|
|
4248
|
+
/** Whether the column is editable / 是否可编辑 */
|
|
4249
|
+
editable?: boolean;
|
|
4250
|
+
/** Column type for formatting / 列数据类型 */
|
|
4251
|
+
type?: "text" | "number" | "select";
|
|
4252
|
+
/** Select options (when type="select") / 下拉选项 */
|
|
4253
|
+
options?: {
|
|
4254
|
+
label: string;
|
|
4255
|
+
value: string;
|
|
4256
|
+
}[];
|
|
4257
|
+
/** Data validation / 数据校验 */
|
|
4258
|
+
validator?: (value: string, row: RowData) => string | null;
|
|
4259
|
+
}
|
|
4260
|
+
interface RowData {
|
|
4261
|
+
/** Row unique id / 行唯一标识 */
|
|
4262
|
+
id: string;
|
|
4263
|
+
/** Row data / 行数据 */
|
|
4264
|
+
[key: string]: string | number | undefined;
|
|
4265
|
+
}
|
|
4266
|
+
interface CellCoords {
|
|
4267
|
+
row: number;
|
|
4268
|
+
col: number;
|
|
4269
|
+
}
|
|
4270
|
+
interface SpreadsheetEditorProps {
|
|
4271
|
+
/** Column definitions / 列定义 */
|
|
4272
|
+
columns: ColumnDef[];
|
|
4273
|
+
/** Row data (controlled) / 行数据(受控) */
|
|
4274
|
+
data?: RowData[];
|
|
4275
|
+
/** Default row data (uncontrolled) / 默认行数据 */
|
|
4276
|
+
defaultData?: RowData[];
|
|
4277
|
+
/** Called when data changes / 数据变更回调 */
|
|
4278
|
+
onChange?: (data: RowData[]) => void;
|
|
4279
|
+
/** Called when a cell value changes / 单元格值变更回调 */
|
|
4280
|
+
onCellChange?: (rowId: string, columnKey: string, value: string) => void;
|
|
4281
|
+
/** Whether to show add/delete row controls / 是否显示行操作按钮 */
|
|
4282
|
+
showRowControls?: boolean;
|
|
4283
|
+
/** Whether to show column headers / 是否显示列头 */
|
|
4284
|
+
showHeaders?: boolean;
|
|
4285
|
+
/** Whether to show row numbers / 是否显示行号 */
|
|
4286
|
+
showRowNumbers?: boolean;
|
|
4287
|
+
/** Whether to allow adding rows / 是否允许添加行 */
|
|
4288
|
+
allowAddRow?: boolean;
|
|
4289
|
+
/** Whether to allow deleting rows / 是否允许删除行 */
|
|
4290
|
+
allowDeleteRow?: boolean;
|
|
4291
|
+
/** Max rows / 最大行数 */
|
|
4292
|
+
maxRows?: number;
|
|
4293
|
+
/** Min rows / 最小行数 */
|
|
4294
|
+
minRows?: number;
|
|
4295
|
+
/** Row height (px) / 行高 */
|
|
4296
|
+
rowHeight?: number;
|
|
4297
|
+
/** Additional class / 额外类名 */
|
|
4298
|
+
className?: string;
|
|
4299
|
+
}
|
|
4300
|
+
declare function SpreadsheetEditor({ columns, data: controlledData, defaultData, onChange, onCellChange, showRowControls, showHeaders, showRowNumbers, allowAddRow, allowDeleteRow, maxRows, minRows, rowHeight, className, }: SpreadsheetEditorProps): React$1.JSX.Element;
|
|
4301
|
+
|
|
4089
4302
|
/**
|
|
4090
4303
|
* @component InputSearch
|
|
4091
4304
|
* @category ui/primitives
|
|
@@ -4162,6 +4375,32 @@ interface InputNumberProps extends Omit<React$1.ComponentProps<"input">, "onChan
|
|
|
4162
4375
|
}
|
|
4163
4376
|
declare function InputNumber({ className, value: controlledValue, defaultValue, min, max, step, precision, controls, disabled, readOnly, size, onChange, parser, formatter, nullAsUndefined, ...props }: InputNumberProps): React$1.JSX.Element;
|
|
4164
4377
|
|
|
4378
|
+
/**
|
|
4379
|
+
* @component InputNumberWithUnit
|
|
4380
|
+
* @category ui/data-entry
|
|
4381
|
+
* @since 1.1.0
|
|
4382
|
+
* @description 带单位的数字输入框,基于 InputNumber 扩展。常用于金额、数量、重量等带单位的数值输入场景。
|
|
4383
|
+
* Numeric input with a unit label, built on top of InputNumber. Common in ERP
|
|
4384
|
+
* contexts: amount (元), quantity (件), weight (kg), etc.
|
|
4385
|
+
* @keywords input, number, unit, currency, quantity, weight, prefix, suffix, 单位, 金额, 数量
|
|
4386
|
+
* @example
|
|
4387
|
+
* <InputNumberWithUnit unit="元" min={0} max={99999} value={100} onChange={setValue} />
|
|
4388
|
+
* <InputNumberWithUnit unit="件" unitPosition="suffix" min={0} step={1} />
|
|
4389
|
+
*/
|
|
4390
|
+
interface InputNumberWithUnitProps extends Omit<InputNumberProps, "className" | "controls"> {
|
|
4391
|
+
/** Unit label displayed alongside the input / 单位标签,如 "元"、"件"、"kg" */
|
|
4392
|
+
unit: string;
|
|
4393
|
+
/** Whether the unit appears before (prefix) or after (suffix) the input / 单位位于输入框前方还是后方 */
|
|
4394
|
+
unitPosition?: "prefix" | "suffix";
|
|
4395
|
+
/** Additional class for the wrapper / 外层容器类名 */
|
|
4396
|
+
className?: string;
|
|
4397
|
+
/** Additional class for the unit label / 单位标签类名 */
|
|
4398
|
+
unitClassName?: string;
|
|
4399
|
+
/** Whether to show the controls (up/down buttons). Defaults to false when a unit is present / 是否显示增减按钮,默认关闭 */
|
|
4400
|
+
controls?: boolean;
|
|
4401
|
+
}
|
|
4402
|
+
declare function InputNumberWithUnit({ unit, unitPosition, className, unitClassName, controls, ...rest }: InputNumberWithUnitProps): React$1.JSX.Element;
|
|
4403
|
+
|
|
4165
4404
|
/**
|
|
4166
4405
|
* @component DatePicker
|
|
4167
4406
|
* @category ui/primitives
|
|
@@ -4927,6 +5166,219 @@ interface CountdownProps {
|
|
|
4927
5166
|
}
|
|
4928
5167
|
declare function Countdown({ target, format, onFinish, days, className, }: CountdownProps): React$1.JSX.Element;
|
|
4929
5168
|
|
|
5169
|
+
interface RatingProps extends Omit<React$1.ComponentProps<"div">, "onChange"> {
|
|
5170
|
+
value?: number;
|
|
5171
|
+
defaultValue?: number;
|
|
5172
|
+
onChange?: (value: number) => void;
|
|
5173
|
+
max?: number;
|
|
5174
|
+
size?: "sm" | "default" | "lg";
|
|
5175
|
+
readonly?: boolean;
|
|
5176
|
+
allowHalf?: boolean;
|
|
5177
|
+
className?: string;
|
|
5178
|
+
iconClassName?: string;
|
|
5179
|
+
}
|
|
5180
|
+
/**
|
|
5181
|
+
* @component Rating
|
|
5182
|
+
* @category ui/data-entry
|
|
5183
|
+
* @since 0.2.0
|
|
5184
|
+
* @description Star rating component with half-star and read-only support / 星级评分组件,支持半星和只读模式
|
|
5185
|
+
* @keywords rating, star, score, review, half-star, evaluation
|
|
5186
|
+
* @example
|
|
5187
|
+
* <Rating defaultValue={3.5} max={5} allowHalf onChange={(v) => console.log(v)} />
|
|
5188
|
+
*/
|
|
5189
|
+
declare function Rating({ value, defaultValue, onChange, max, size, readonly, allowHalf, className, iconClassName, ...props }: RatingProps): React$1.JSX.Element;
|
|
5190
|
+
|
|
5191
|
+
interface EmptyStateTexts {
|
|
5192
|
+
title?: string;
|
|
5193
|
+
description?: string;
|
|
5194
|
+
}
|
|
5195
|
+
interface EmptyStateProps {
|
|
5196
|
+
variant?: string;
|
|
5197
|
+
icon?: React$1.ElementType;
|
|
5198
|
+
title?: string;
|
|
5199
|
+
description?: string;
|
|
5200
|
+
action?: React$1.ReactNode;
|
|
5201
|
+
className?: string;
|
|
5202
|
+
centered?: boolean;
|
|
5203
|
+
fullPage?: boolean;
|
|
5204
|
+
/**
|
|
5205
|
+
* Override i18n strings. When provided, useTranslation is skipped.
|
|
5206
|
+
* / 覆盖 i18n 字符串,传入后跳过 useTranslation
|
|
5207
|
+
*/
|
|
5208
|
+
texts?: EmptyStateTexts;
|
|
5209
|
+
}
|
|
5210
|
+
/**
|
|
5211
|
+
* @component EmptyState
|
|
5212
|
+
* @category ui/feedback
|
|
5213
|
+
* @since 0.2.0
|
|
5214
|
+
* @description Placeholder displayed when data is empty, with icon, title, description, and optional action / 数据为空时显示的占位符,含图标、标题、描述和可选操作
|
|
5215
|
+
* @keywords empty, state, placeholder, no-data, feedback, zero-state
|
|
5216
|
+
* @example
|
|
5217
|
+
* <EmptyState variant="search" title="No results" description="Try a different query" />
|
|
5218
|
+
*/
|
|
5219
|
+
declare function EmptyState({ variant, icon: iconProp, title: titleProp, description: descProp, action, className, centered, fullPage, texts: textsProp, }: EmptyStateProps): React$1.JSX.Element;
|
|
5220
|
+
|
|
5221
|
+
interface SegmentedControlOption<T extends string> {
|
|
5222
|
+
value: T;
|
|
5223
|
+
label: string;
|
|
5224
|
+
icon?: React$1.ReactNode;
|
|
5225
|
+
disabled?: boolean;
|
|
5226
|
+
}
|
|
5227
|
+
interface SegmentedControlProps<T extends string> {
|
|
5228
|
+
options: SegmentedControlOption<T>[];
|
|
5229
|
+
value?: T;
|
|
5230
|
+
defaultValue?: T;
|
|
5231
|
+
onChange?: (value: T) => void;
|
|
5232
|
+
size?: "sm" | "default" | "lg";
|
|
5233
|
+
disabled?: boolean;
|
|
5234
|
+
className?: string;
|
|
5235
|
+
orientation?: "horizontal" | "vertical";
|
|
5236
|
+
}
|
|
5237
|
+
/**
|
|
5238
|
+
* @component SegmentedControl
|
|
5239
|
+
* @category ui/data-entry
|
|
5240
|
+
* @since 0.2.0
|
|
5241
|
+
* @description A toggle-based segmented control for selecting one option from a set / 分段控制器,基于切换按钮从一组选项中选择一个
|
|
5242
|
+
* @keywords segmented, control, toggle, switch, tabs, options, select
|
|
5243
|
+
* @example
|
|
5244
|
+
* <SegmentedControl
|
|
5245
|
+
* options={[{ value: "day", label: "Day" }, { value: "week", label: "Week" }]}
|
|
5246
|
+
* defaultValue="day"
|
|
5247
|
+
* onChange={(v) => console.log(v)}
|
|
5248
|
+
* />
|
|
5249
|
+
*/
|
|
5250
|
+
declare function SegmentedControl<T extends string>({ options, value, defaultValue, onChange, size, disabled, className, orientation, }: SegmentedControlProps<T>): React$1.JSX.Element;
|
|
5251
|
+
|
|
5252
|
+
interface TourStep {
|
|
5253
|
+
target: string | (() => HTMLElement | null);
|
|
5254
|
+
title: string;
|
|
5255
|
+
description?: React$1.ReactNode;
|
|
5256
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
5257
|
+
offset?: number;
|
|
5258
|
+
}
|
|
5259
|
+
interface TourProps {
|
|
5260
|
+
steps: TourStep[];
|
|
5261
|
+
open?: boolean;
|
|
5262
|
+
onOpenChange?: (open: boolean) => void;
|
|
5263
|
+
onComplete?: () => void;
|
|
5264
|
+
onSkip?: () => void;
|
|
5265
|
+
storageKey?: string;
|
|
5266
|
+
className?: string;
|
|
5267
|
+
}
|
|
5268
|
+
/**
|
|
5269
|
+
* @component Tour
|
|
5270
|
+
* @category ui/overlay
|
|
5271
|
+
* @since 0.2.0
|
|
5272
|
+
* @description Step-by-step guided product tour overlay with spotlight, navigation, and localStorage persistence / 逐步引导式产品导览覆盖层,带有聚焦高亮、导航和 localStorage 持久化
|
|
5273
|
+
* @keywords tour, onboarding, guide, walkthrough, spotlight, 导览, 引导
|
|
5274
|
+
* @example
|
|
5275
|
+
* <Tour
|
|
5276
|
+
* steps={[
|
|
5277
|
+
* { target: "#dashboard", title: "Dashboard", description: "Your overview" },
|
|
5278
|
+
* ]}
|
|
5279
|
+
* onComplete={() => console.log("tour done")}
|
|
5280
|
+
* />
|
|
5281
|
+
*/
|
|
5282
|
+
declare function Tour({ steps, open, onOpenChange, onComplete, onSkip, storageKey, className, }: TourProps): React$1.JSX.Element | null;
|
|
5283
|
+
|
|
5284
|
+
interface WatermarkProps {
|
|
5285
|
+
text?: string;
|
|
5286
|
+
image?: string;
|
|
5287
|
+
rotate?: number;
|
|
5288
|
+
gap?: [number, number];
|
|
5289
|
+
fontSize?: number;
|
|
5290
|
+
className?: string;
|
|
5291
|
+
fullPage?: boolean;
|
|
5292
|
+
zIndex?: number;
|
|
5293
|
+
opacity?: number;
|
|
5294
|
+
color?: string;
|
|
5295
|
+
}
|
|
5296
|
+
/**
|
|
5297
|
+
* @component Watermark
|
|
5298
|
+
* @category ui/feedback
|
|
5299
|
+
* @since 0.2.0
|
|
5300
|
+
* @description Tiled watermark overlay with text or image, supporting full-page and container modes / 平铺水印覆盖层,支持文本或图片,可全页面或容器内显示
|
|
5301
|
+
* @keywords watermark, overlay, tiled, security, 水印
|
|
5302
|
+
* @example
|
|
5303
|
+
* <Watermark text="Confidential" />
|
|
5304
|
+
* <Watermark image="/logo.png" fullPage={false} />
|
|
5305
|
+
*/
|
|
5306
|
+
declare function Watermark({ text, image, rotate, gap, fontSize, className, fullPage, zIndex, opacity, color, }: WatermarkProps): React$1.JSX.Element;
|
|
5307
|
+
|
|
5308
|
+
interface ComboboxOption {
|
|
5309
|
+
value: string;
|
|
5310
|
+
label: string;
|
|
5311
|
+
description?: string;
|
|
5312
|
+
disabled?: boolean;
|
|
5313
|
+
keywords?: string[];
|
|
5314
|
+
group?: string;
|
|
5315
|
+
}
|
|
5316
|
+
interface ComboboxProps {
|
|
5317
|
+
options: ComboboxOption[];
|
|
5318
|
+
value?: string;
|
|
5319
|
+
onChange?: (value: string | undefined) => void;
|
|
5320
|
+
placeholder?: string;
|
|
5321
|
+
searchPlaceholder?: string;
|
|
5322
|
+
emptyText?: string;
|
|
5323
|
+
disabled?: boolean;
|
|
5324
|
+
className?: string;
|
|
5325
|
+
align?: "start" | "center" | "end";
|
|
5326
|
+
clearable?: boolean;
|
|
5327
|
+
searchable?: boolean;
|
|
5328
|
+
renderOption?: (option: ComboboxOption) => React$1.ReactNode;
|
|
5329
|
+
}
|
|
5330
|
+
/**
|
|
5331
|
+
* @component Combobox
|
|
5332
|
+
* @category ui/data-entry
|
|
5333
|
+
* @since 0.2.0
|
|
5334
|
+
* @description Searchable select dropdown with keyboard navigation and clearable selection / 带搜索、键盘导航和可清除选择的下拉选择框
|
|
5335
|
+
* @keywords combobox, select, search, autocomplete, dropdown
|
|
5336
|
+
* @example
|
|
5337
|
+
* <Combobox
|
|
5338
|
+
* options={[{ value: "react", label: "React" }]}
|
|
5339
|
+
* value={selected}
|
|
5340
|
+
* onChange={setSelected}
|
|
5341
|
+
* />
|
|
5342
|
+
*/
|
|
5343
|
+
declare function Combobox({ options, value, onChange, placeholder, searchPlaceholder, emptyText, disabled, className, align, clearable, searchable, renderOption, }: ComboboxProps): React$1.JSX.Element;
|
|
5344
|
+
|
|
5345
|
+
interface FabProps extends React$1.ComponentProps<typeof Button> {
|
|
5346
|
+
icon?: React$1.ReactNode;
|
|
5347
|
+
label?: string;
|
|
5348
|
+
position?: "bottom-right" | "bottom-left" | "bottom-center";
|
|
5349
|
+
offset?: number;
|
|
5350
|
+
}
|
|
5351
|
+
/**
|
|
5352
|
+
* @component Fab
|
|
5353
|
+
* @category ui/primitives
|
|
5354
|
+
* @since 0.2.0
|
|
5355
|
+
* @description Floating Action Button fixed to the screen edge for primary actions / 固定在屏幕边缘的浮动操作按钮,用于主要操作
|
|
5356
|
+
* @keywords fab, floating, action, button, fixed
|
|
5357
|
+
* @example
|
|
5358
|
+
* <Fab icon={<PlusIcon />} position="bottom-right" />
|
|
5359
|
+
*/
|
|
5360
|
+
declare function Fab({ icon, label, position, offset, className, ...props }: FabProps): React$1.JSX.Element;
|
|
5361
|
+
interface FabSpeedDialAction {
|
|
5362
|
+
icon: React$1.ReactNode;
|
|
5363
|
+
label: string;
|
|
5364
|
+
onClick?: () => void;
|
|
5365
|
+
}
|
|
5366
|
+
interface FabSpeedDialProps {
|
|
5367
|
+
icon: React$1.ReactNode;
|
|
5368
|
+
actions: FabSpeedDialAction[];
|
|
5369
|
+
position?: "bottom-right" | "bottom-left";
|
|
5370
|
+
}
|
|
5371
|
+
/**
|
|
5372
|
+
* @component FabSpeedDial
|
|
5373
|
+
* @category ui/primitives
|
|
5374
|
+
* @since 0.2.0
|
|
5375
|
+
* @description Floating action button that expands into a radial menu of speed-dial actions / 展开为放射状快捷菜单的浮动操作按钮
|
|
5376
|
+
* @keywords fab, speed-dial, radial, menu, floating, actions
|
|
5377
|
+
* @example
|
|
5378
|
+
* <FabSpeedDial icon={<PlusIcon />} actions={[{ icon: <EditIcon />, label: "Edit", onClick: () => {} }]} />
|
|
5379
|
+
*/
|
|
5380
|
+
declare function FabSpeedDial({ icon, actions, position, }: FabSpeedDialProps): React$1.JSX.Element;
|
|
5381
|
+
|
|
4930
5382
|
/**
|
|
4931
5383
|
* @component Anchor
|
|
4932
5384
|
* @category ui/navigation
|
|
@@ -5244,6 +5696,28 @@ interface IconProps extends Omit<React$1.ComponentProps<"span">, "children"> {
|
|
|
5244
5696
|
}
|
|
5245
5697
|
declare function Icon({ icon: IconComponent, size, spin, pulse, className, ...props }: IconProps): React$1.JSX.Element;
|
|
5246
5698
|
|
|
5699
|
+
/**
|
|
5700
|
+
* @component TimePicker
|
|
5701
|
+
* @category ui/data-entry
|
|
5702
|
+
* @since 0.2.0
|
|
5703
|
+
* @description Time selection component with 12h/24h format, configurable minute step, and Popover-based hour/minute dropdowns. / 时间选择器,支持12/24小时制、可配置分钟步长,基于 Popover 的小时/分钟下拉选择。
|
|
5704
|
+
* @keywords time, picker, clock, hour, minute, 12h, 24h
|
|
5705
|
+
* @example
|
|
5706
|
+
* <TimePicker value="09:30" onChange={setTime} step={15} />
|
|
5707
|
+
* <TimePicker value="02:30 PM" format="12h" step={30} />
|
|
5708
|
+
*/
|
|
5709
|
+
interface TimePickerProps {
|
|
5710
|
+
value?: string;
|
|
5711
|
+
onChange?: (value: string) => void;
|
|
5712
|
+
step?: 1 | 5 | 10 | 15 | 30 | 60;
|
|
5713
|
+
format?: "12h" | "24h";
|
|
5714
|
+
disabled?: boolean;
|
|
5715
|
+
placeholder?: string;
|
|
5716
|
+
className?: string;
|
|
5717
|
+
}
|
|
5718
|
+
declare function TimePicker({ value, onChange, step, format, disabled, placeholder, className, }: TimePickerProps): React$1.JSX.Element;
|
|
5719
|
+
declare function formatTimeInput(h: number, m: number, format?: "12h" | "24h"): string;
|
|
5720
|
+
|
|
5247
5721
|
/**
|
|
5248
5722
|
* @component InfiniteScroll
|
|
5249
5723
|
* @category ui/primitives
|
|
@@ -5613,4 +6087,1610 @@ interface KeyboardShortcutDialogProps {
|
|
|
5613
6087
|
*/
|
|
5614
6088
|
declare function KeyboardShortcutDialog({ open, onOpenChange, groups, title, placeholder, className, }: KeyboardShortcutDialogProps): React$1.JSX.Element;
|
|
5615
6089
|
|
|
5616
|
-
|
|
6090
|
+
interface TwoFactorAuthProps {
|
|
6091
|
+
/** Current 2FA status / 当前 2FA 状态 */
|
|
6092
|
+
enabled?: boolean;
|
|
6093
|
+
/** Whether to render as setup wizard / 是否作为设置向导 */
|
|
6094
|
+
setupMode?: boolean;
|
|
6095
|
+
/** Called when user completes 2FA setup / 2FA 设置完成回调 */
|
|
6096
|
+
onSetupComplete?: (backupCodes: string[]) => void;
|
|
6097
|
+
/** Called when user enters 2FA code for verification / 2FA 验证码输入回调 */
|
|
6098
|
+
onVerify?: (code: string) => Promise<boolean>;
|
|
6099
|
+
/** Called when user requests a new QR code / 请求新 QR 码回调 */
|
|
6100
|
+
onGenerateQR?: () => Promise<{
|
|
6101
|
+
secret: string;
|
|
6102
|
+
qrUrl: string;
|
|
6103
|
+
}>;
|
|
6104
|
+
/** Called when user disables 2FA / 禁用 2FA */
|
|
6105
|
+
onDisable?: () => void;
|
|
6106
|
+
/** Generate backup codes (default: 8 codes) / 生成备用码(默认 8 个) */
|
|
6107
|
+
generateBackupCodes?: () => string[];
|
|
6108
|
+
/** Number of backup codes / 备用码数量 */
|
|
6109
|
+
backupCodeCount?: number;
|
|
6110
|
+
/** OTP code length / 验证码长度 */
|
|
6111
|
+
codeLength?: number;
|
|
6112
|
+
/** Additional class / 额外类名 */
|
|
6113
|
+
className?: string;
|
|
6114
|
+
}
|
|
6115
|
+
declare function generateDefaultBackupCodes(count?: number): string[];
|
|
6116
|
+
declare function TwoFactorAuth({ enabled, setupMode, onSetupComplete, onVerify, onGenerateQR, onDisable, generateBackupCodes, backupCodeCount, codeLength, className, }: TwoFactorAuthProps): React$1.JSX.Element | null;
|
|
6117
|
+
|
|
6118
|
+
interface SchedulerEvent {
|
|
6119
|
+
/** Unique event id / 事件唯一标识 */
|
|
6120
|
+
id: string;
|
|
6121
|
+
/** Event title / 事件标题 */
|
|
6122
|
+
title: string;
|
|
6123
|
+
/** Start time (ISO or Date) / 开始时间 */
|
|
6124
|
+
start: Date;
|
|
6125
|
+
/** End time (ISO or Date) / 结束时间 */
|
|
6126
|
+
end: Date;
|
|
6127
|
+
/** Event color / 事件颜色 */
|
|
6128
|
+
color?: string;
|
|
6129
|
+
/** Optional description / 描述 */
|
|
6130
|
+
description?: string;
|
|
6131
|
+
/** Whether all-day event / 全天事件 */
|
|
6132
|
+
allDay?: boolean;
|
|
6133
|
+
/** Arbitrary metadata / 额外数据 */
|
|
6134
|
+
meta?: Record<string, unknown>;
|
|
6135
|
+
}
|
|
6136
|
+
type ViewMode$1 = "day" | "week";
|
|
6137
|
+
interface SchedulerProps {
|
|
6138
|
+
/** Events to display / 事件列表 */
|
|
6139
|
+
events?: SchedulerEvent[];
|
|
6140
|
+
/** Current view date / 当前视图日期 */
|
|
6141
|
+
date?: Date;
|
|
6142
|
+
/** Default view mode / 默认视图模式 */
|
|
6143
|
+
defaultView?: ViewMode$1;
|
|
6144
|
+
/** View mode (controlled) / 受控视图模式 */
|
|
6145
|
+
view?: ViewMode$1;
|
|
6146
|
+
/** Called when view changes / 视图变更回调 */
|
|
6147
|
+
onViewChange?: (view: ViewMode$1) => void;
|
|
6148
|
+
/** Called when date changes / 日期变更回调 */
|
|
6149
|
+
onDateChange?: (date: Date) => void;
|
|
6150
|
+
/** Called when an event is clicked / 事件点击回调 */
|
|
6151
|
+
onEventClick?: (event: SchedulerEvent) => void;
|
|
6152
|
+
/** Called when a time slot is clicked / 时间槽点击回调 */
|
|
6153
|
+
onSlotClick?: (start: Date, end: Date) => void;
|
|
6154
|
+
/** Start hour (0-23) / 开始小时 */
|
|
6155
|
+
startHour?: number;
|
|
6156
|
+
/** End hour (0-23) / 结束小时 */
|
|
6157
|
+
endHour?: number;
|
|
6158
|
+
/** Hour slot height (px) / 每小时高度 */
|
|
6159
|
+
hourHeight?: number;
|
|
6160
|
+
/** Additional class / 额外类名 */
|
|
6161
|
+
className?: string;
|
|
6162
|
+
/** Locale for day names / 星期名称语言 */
|
|
6163
|
+
locale?: "zh" | "en";
|
|
6164
|
+
}
|
|
6165
|
+
declare function Scheduler({ events, date: controlledDate, defaultView, view: controlledView, onViewChange, onDateChange, onEventClick, onSlotClick, startHour, endHour, hourHeight, className, locale, }: SchedulerProps): React$1.JSX.Element;
|
|
6166
|
+
|
|
6167
|
+
interface FileNode {
|
|
6168
|
+
/** Unique id / 唯一标识 */
|
|
6169
|
+
id: string;
|
|
6170
|
+
/** Node name / 名称 */
|
|
6171
|
+
name: string;
|
|
6172
|
+
/** Node type / 类型 */
|
|
6173
|
+
type: "folder" | "file";
|
|
6174
|
+
/** File extension (for files) / 文件扩展名 */
|
|
6175
|
+
extension?: string;
|
|
6176
|
+
/** File size in bytes / 文件大小 */
|
|
6177
|
+
size?: number;
|
|
6178
|
+
/** Last modified ISO string / 最后修改时间 */
|
|
6179
|
+
modifiedAt?: string;
|
|
6180
|
+
/** Children (for folders) / 子节点 */
|
|
6181
|
+
children?: FileNode[];
|
|
6182
|
+
/** Whether node is selectable / 是否可选 */
|
|
6183
|
+
selectable?: boolean;
|
|
6184
|
+
}
|
|
6185
|
+
type ViewMode = "list" | "grid";
|
|
6186
|
+
interface FileManagerProps {
|
|
6187
|
+
/** File tree data / 文件树数据 */
|
|
6188
|
+
data: FileNode[];
|
|
6189
|
+
/** Current selected folder ID / 当前选中文件夹 */
|
|
6190
|
+
currentFolderId?: string;
|
|
6191
|
+
/** Default current folder / 默认当前文件夹 */
|
|
6192
|
+
defaultFolderId?: string;
|
|
6193
|
+
/** View mode / 视图模式 */
|
|
6194
|
+
viewMode?: ViewMode;
|
|
6195
|
+
/** Default view mode / 默认视图模式 */
|
|
6196
|
+
defaultViewMode?: ViewMode;
|
|
6197
|
+
/** Called when current folder changes / 文件夹变更回调 */
|
|
6198
|
+
onFolderChange?: (folderId: string, breadcrumb: FileNode[]) => void;
|
|
6199
|
+
/** Called when a file is clicked/double-clicked / 文件点击回调 */
|
|
6200
|
+
onFileClick?: (file: FileNode) => void;
|
|
6201
|
+
/** Called when a file is double-clicked / 文件双击回调 */
|
|
6202
|
+
onFileDoubleClick?: (file: FileNode) => void;
|
|
6203
|
+
/** Called when delete is requested / 删除回调 */
|
|
6204
|
+
onDelete?: (nodes: FileNode[]) => void;
|
|
6205
|
+
/** Called when upload is triggered / 上传回调 */
|
|
6206
|
+
onUpload?: () => void;
|
|
6207
|
+
/** Called when view mode changes / 视图模式变更 */
|
|
6208
|
+
onViewModeChange?: (mode: ViewMode) => void;
|
|
6209
|
+
/** Show sidebar (folder tree) / 是否显示侧边栏 */
|
|
6210
|
+
showSidebar?: boolean;
|
|
6211
|
+
/** Show toolbar actions / 是否显示工具栏 */
|
|
6212
|
+
showToolbar?: boolean;
|
|
6213
|
+
/** Sidebar width / 侧边栏宽度 */
|
|
6214
|
+
sidebarWidth?: number;
|
|
6215
|
+
/** Additional class / 额外类名 */
|
|
6216
|
+
className?: string;
|
|
6217
|
+
}
|
|
6218
|
+
declare function FileManager({ data, currentFolderId: controlledFolder, defaultFolderId, viewMode: controlledView, defaultViewMode, onFolderChange, onFileClick, onFileDoubleClick, onDelete, onUpload, onViewModeChange, showSidebar, showToolbar, sidebarWidth, className, }: FileManagerProps): React$1.JSX.Element;
|
|
6219
|
+
|
|
6220
|
+
interface SearchResult {
|
|
6221
|
+
id: string;
|
|
6222
|
+
title: string;
|
|
6223
|
+
subtitle?: string;
|
|
6224
|
+
category: "documents" | "users" | "orders" | "products" | "pages" | "custom";
|
|
6225
|
+
categoryLabel?: string;
|
|
6226
|
+
url?: string;
|
|
6227
|
+
icon?: React$1.ReactNode;
|
|
6228
|
+
}
|
|
6229
|
+
interface GlobalSearchProps {
|
|
6230
|
+
/** Search results / 搜索结果 */
|
|
6231
|
+
results?: SearchResult[];
|
|
6232
|
+
/** Called when search query changes / 搜索输入变更 */
|
|
6233
|
+
onSearch?: (query: string) => void;
|
|
6234
|
+
/** Called when a result is selected / 选中结果回调 */
|
|
6235
|
+
onSelect?: (result: SearchResult) => void;
|
|
6236
|
+
/** Called when the search is closed / 关闭回调 */
|
|
6237
|
+
onClose?: () => void;
|
|
6238
|
+
/** Placeholder text / 占位文字 */
|
|
6239
|
+
placeholder?: string;
|
|
6240
|
+
/** Whether to show as a modal overlay / 是否作为模态覆盖层 */
|
|
6241
|
+
modal?: boolean;
|
|
6242
|
+
/** Whether to autofocus the input / 是否自动聚焦 */
|
|
6243
|
+
autoFocus?: boolean;
|
|
6244
|
+
/** Loading state / 加载状态 */
|
|
6245
|
+
loading?: boolean;
|
|
6246
|
+
/** Whether search is open / 是否打开 */
|
|
6247
|
+
open?: boolean;
|
|
6248
|
+
/** Min query length before search / 最小搜索长度 */
|
|
6249
|
+
minQueryLength?: number;
|
|
6250
|
+
/** Debounce delay in ms / 防抖延迟 */
|
|
6251
|
+
debounceMs?: number;
|
|
6252
|
+
/** Additional class / 额外类名 */
|
|
6253
|
+
className?: string;
|
|
6254
|
+
}
|
|
6255
|
+
declare function GlobalSearch({ results, onSearch, onSelect, onClose, placeholder, modal, autoFocus, loading, open: controlledOpen, minQueryLength, debounceMs, className, }: GlobalSearchProps): React$1.JSX.Element | null;
|
|
6256
|
+
|
|
6257
|
+
interface FeedbackSurveyProps {
|
|
6258
|
+
/** Survey title / 调查标题 */
|
|
6259
|
+
title?: string;
|
|
6260
|
+
/** Survey description / 调查描述 */
|
|
6261
|
+
description?: string;
|
|
6262
|
+
/** Feedback type / 反馈类型 */
|
|
6263
|
+
type?: "rating" | "satisfaction" | "nps" | "thumbs" | "custom";
|
|
6264
|
+
/** For rating: max stars / 星级上限 */
|
|
6265
|
+
maxRating?: number;
|
|
6266
|
+
/** For NPS: min/max score */
|
|
6267
|
+
npsRange?: [number, number];
|
|
6268
|
+
/** Whether to show text feedback input / 是否显示文本反馈 */
|
|
6269
|
+
showTextFeedback?: boolean;
|
|
6270
|
+
/** Text feedback placeholder / 文本反馈占位 */
|
|
6271
|
+
feedbackPlaceholder?: string;
|
|
6272
|
+
/** Submit button text / 提交按钮文字 */
|
|
6273
|
+
submitLabel?: string;
|
|
6274
|
+
/** Current value (controlled) / 受控值 */
|
|
6275
|
+
value?: number;
|
|
6276
|
+
/** Default value (uncontrolled) / 默认值 */
|
|
6277
|
+
defaultValue?: number;
|
|
6278
|
+
/** Text feedback value / 文本反馈值 */
|
|
6279
|
+
feedbackText?: string;
|
|
6280
|
+
/** Called when value changes / 值变更回调 */
|
|
6281
|
+
onChange?: (value: number) => void;
|
|
6282
|
+
/** Called when submitted / 提交回调 */
|
|
6283
|
+
onSubmit?: (value: number, feedback: string) => void;
|
|
6284
|
+
/** Additional class / 额外类名 */
|
|
6285
|
+
className?: string;
|
|
6286
|
+
/** Whether the survey is disabled / 是否禁用 */
|
|
6287
|
+
disabled?: boolean;
|
|
6288
|
+
/** Whether the survey has been submitted / 是否已提交 */
|
|
6289
|
+
submitted?: boolean;
|
|
6290
|
+
}
|
|
6291
|
+
declare function FeedbackSurvey({ title, description, type, maxRating, npsRange, showTextFeedback, feedbackPlaceholder, submitLabel, value: controlledValue, defaultValue, feedbackText: controlledFeedback, onChange, onSubmit, className, disabled, submitted: controlledSubmitted, }: FeedbackSurveyProps): React$1.JSX.Element;
|
|
6292
|
+
|
|
6293
|
+
interface WikiArticle {
|
|
6294
|
+
id: string;
|
|
6295
|
+
title: string;
|
|
6296
|
+
content?: string;
|
|
6297
|
+
excerpt?: string;
|
|
6298
|
+
author?: string;
|
|
6299
|
+
updatedAt?: string;
|
|
6300
|
+
category?: string;
|
|
6301
|
+
tags?: string[];
|
|
6302
|
+
}
|
|
6303
|
+
interface WikiCategory {
|
|
6304
|
+
id: string;
|
|
6305
|
+
name: string;
|
|
6306
|
+
icon?: React$1.ReactNode;
|
|
6307
|
+
children?: (WikiCategory | WikiArticle)[];
|
|
6308
|
+
}
|
|
6309
|
+
interface KnowledgeBaseProps {
|
|
6310
|
+
/** Wiki categories & articles / 分类与文章 */
|
|
6311
|
+
data: (WikiCategory | WikiArticle)[];
|
|
6312
|
+
/** Selected article ID (controlled) / 选中文章ID */
|
|
6313
|
+
selectedArticleId?: string;
|
|
6314
|
+
/** Called when an article is selected / 选中文章回调 */
|
|
6315
|
+
onSelectArticle?: (article: WikiArticle) => void;
|
|
6316
|
+
/** Whether to show sidebar / 是否显示侧边栏 */
|
|
6317
|
+
showSidebar?: boolean;
|
|
6318
|
+
/** Whether to show search / 是否显示搜索 */
|
|
6319
|
+
searchable?: boolean;
|
|
6320
|
+
/** Default expanded categories / 默认展开分类 */
|
|
6321
|
+
defaultExpandedCategories?: string[];
|
|
6322
|
+
/** Additional class / 额外类名 */
|
|
6323
|
+
className?: string;
|
|
6324
|
+
}
|
|
6325
|
+
declare function KnowledgeBase({ data, selectedArticleId: controlledArticle, onSelectArticle, showSidebar, searchable, defaultExpandedCategories, className, }: KnowledgeBaseProps): React$1.JSX.Element;
|
|
6326
|
+
|
|
6327
|
+
type TicketStatus = "open" | "in_progress" | "resolved" | "closed";
|
|
6328
|
+
type TicketPriority = "low" | "medium" | "high" | "urgent";
|
|
6329
|
+
interface Ticket {
|
|
6330
|
+
id: string;
|
|
6331
|
+
title: string;
|
|
6332
|
+
description?: string;
|
|
6333
|
+
status: TicketStatus;
|
|
6334
|
+
priority: TicketPriority;
|
|
6335
|
+
assignee?: string;
|
|
6336
|
+
createdAt: string;
|
|
6337
|
+
updatedAt: string;
|
|
6338
|
+
category?: string;
|
|
6339
|
+
replies?: TicketReply[];
|
|
6340
|
+
}
|
|
6341
|
+
interface TicketReply {
|
|
6342
|
+
id: string;
|
|
6343
|
+
author: string;
|
|
6344
|
+
content: string;
|
|
6345
|
+
createdAt: string;
|
|
6346
|
+
isStaff?: boolean;
|
|
6347
|
+
}
|
|
6348
|
+
interface HelpDeskProps {
|
|
6349
|
+
/** Tickets / 工单列表 */
|
|
6350
|
+
tickets: Ticket[];
|
|
6351
|
+
/** Selected ticket ID (controlled) / 选中工单 */
|
|
6352
|
+
selectedTicketId?: string;
|
|
6353
|
+
/** Current user for new replies / 当前用户 */
|
|
6354
|
+
currentUser?: string;
|
|
6355
|
+
/** Called when a ticket is selected / 选中工单回调 */
|
|
6356
|
+
onSelectTicket?: (ticket: Ticket) => void;
|
|
6357
|
+
/** Called when a new reply is sent / 发送回复回调 */
|
|
6358
|
+
onSendReply?: (ticketId: string, content: string) => void;
|
|
6359
|
+
/** Called when creating a new ticket / 创建工单回调 */
|
|
6360
|
+
onCreateTicket?: () => void;
|
|
6361
|
+
/** Called when ticket status changes / 状态变更回调 */
|
|
6362
|
+
onStatusChange?: (ticketId: string, status: TicketStatus) => void;
|
|
6363
|
+
/** Additional class / 额外类名 */
|
|
6364
|
+
className?: string;
|
|
6365
|
+
}
|
|
6366
|
+
declare function HelpDesk({ tickets, selectedTicketId: controlledTicket, currentUser: _currentUser, onSelectTicket, onSendReply, onCreateTicket, onStatusChange, className, }: HelpDeskProps): React$1.JSX.Element;
|
|
6367
|
+
|
|
6368
|
+
declare const passwordInputVariants: (props?: ({
|
|
6369
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6370
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
6371
|
+
interface PasswordInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange">, VariantProps<typeof passwordInputVariants> {
|
|
6372
|
+
/** Controlled value / 受控值 */
|
|
6373
|
+
value?: string;
|
|
6374
|
+
/** Default value / 默认值 */
|
|
6375
|
+
defaultValue?: string;
|
|
6376
|
+
/** Change callback / 变更回调 */
|
|
6377
|
+
onChange?: (value: string) => void;
|
|
6378
|
+
/** Placeholder text / 占位文本 */
|
|
6379
|
+
placeholder?: string;
|
|
6380
|
+
/** Whether input is disabled / 是否禁用 */
|
|
6381
|
+
disabled?: boolean;
|
|
6382
|
+
/** Whether input is read-only / 是否只读 */
|
|
6383
|
+
readOnly?: boolean;
|
|
6384
|
+
/** Whether to show the toggle button / 是否显示切换按钮 (default: true) */
|
|
6385
|
+
showToggle?: boolean;
|
|
6386
|
+
/** Whether to show strength meter / 是否显示强度计 (default: false) */
|
|
6387
|
+
strengthMeter?: boolean;
|
|
6388
|
+
/** Minimum length for strength calc / 强度计算最小长度 (default: 8) */
|
|
6389
|
+
minLength?: number;
|
|
6390
|
+
}
|
|
6391
|
+
/**
|
|
6392
|
+
* @component PasswordInput
|
|
6393
|
+
* @category ui/data-entry
|
|
6394
|
+
* @since 0.2.0
|
|
6395
|
+
* @description Password input with show/hide toggle and optional strength meter / 密码输入框,支持显示/隐藏切换和可选的强度计
|
|
6396
|
+
* @keywords password, input, toggle, strength, security
|
|
6397
|
+
* @example
|
|
6398
|
+
* <PasswordInput placeholder="Enter password" strengthMeter />
|
|
6399
|
+
* <PasswordInput value={pwd} onChange={setPwd} showToggle />
|
|
6400
|
+
*/
|
|
6401
|
+
declare function PasswordInput({ className, value: controlledValue, defaultValue, onChange, placeholder, disabled, readOnly, showToggle, strengthMeter, minLength, size, ...props }: PasswordInputProps): React$1.JSX.Element;
|
|
6402
|
+
/**
|
|
6403
|
+
* @component PasswordStrengthMeter
|
|
6404
|
+
* @category ui/data-entry
|
|
6405
|
+
* @since 0.2.0
|
|
6406
|
+
* @description Password strength meter that computes a score 0-4 based on length, case, numbers, and special chars / 密码强度计,根据长度、大小写、数字和特殊字符计算 0-4 的分数
|
|
6407
|
+
* @keywords password, strength, meter, score, security
|
|
6408
|
+
* @example
|
|
6409
|
+
* <PasswordStrengthMeter value="abc123" />
|
|
6410
|
+
*/
|
|
6411
|
+
declare function PasswordStrengthMeter({ value, minLength, className, }: {
|
|
6412
|
+
value?: string;
|
|
6413
|
+
minLength?: number;
|
|
6414
|
+
className?: string;
|
|
6415
|
+
}): React$1.JSX.Element;
|
|
6416
|
+
|
|
6417
|
+
declare const phoneInputVariants: (props?: ({
|
|
6418
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6419
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
6420
|
+
interface CountryOption {
|
|
6421
|
+
/** ISO country code / ISO 国家码 */
|
|
6422
|
+
code: string;
|
|
6423
|
+
/** Display label / 显示名称 */
|
|
6424
|
+
label: string;
|
|
6425
|
+
/** Dial code, e.g. "+86" / 区号,如 "+86" */
|
|
6426
|
+
dialCode: string;
|
|
6427
|
+
/** Flag emoji / 国旗 emoji */
|
|
6428
|
+
flag: string;
|
|
6429
|
+
}
|
|
6430
|
+
interface PhoneInputProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange" | "value">, VariantProps<typeof phoneInputVariants> {
|
|
6431
|
+
/** Controlled value (phone portion) / 受控值(电话部分) */
|
|
6432
|
+
value?: string;
|
|
6433
|
+
/** Default value / 默认值 */
|
|
6434
|
+
defaultValue?: string;
|
|
6435
|
+
/** Change callback / 变更回调 */
|
|
6436
|
+
onChange?: (data: {
|
|
6437
|
+
countryCode: string;
|
|
6438
|
+
phone: string;
|
|
6439
|
+
full: string;
|
|
6440
|
+
}) => void;
|
|
6441
|
+
/** Country list / 国家列表 */
|
|
6442
|
+
countries?: CountryOption[];
|
|
6443
|
+
/** Default country dial code / 默认区号 (default: "+86") */
|
|
6444
|
+
defaultCountry?: string;
|
|
6445
|
+
/** Placeholder / 占位文本 */
|
|
6446
|
+
placeholder?: string;
|
|
6447
|
+
/** Disabled / 是否禁用 */
|
|
6448
|
+
disabled?: boolean;
|
|
6449
|
+
/** Read-only / 是否只读 */
|
|
6450
|
+
readOnly?: boolean;
|
|
6451
|
+
}
|
|
6452
|
+
/**
|
|
6453
|
+
* @component PhoneInput
|
|
6454
|
+
* @category ui/data-entry
|
|
6455
|
+
* @since 0.2.0
|
|
6456
|
+
* @description International phone number input with country code selector / 带国家区号选择器的国际电话号码输入框
|
|
6457
|
+
* @keywords phone, input, international, country, dial
|
|
6458
|
+
* @example
|
|
6459
|
+
* <PhoneInput defaultCountry="+86" onChange={(d) => console.log(d)} />
|
|
6460
|
+
*/
|
|
6461
|
+
declare function PhoneInput({ className, value: controlledValue, defaultValue, onChange, countries: countriesProp, defaultCountry, placeholder, disabled, readOnly, size, ...props }: PhoneInputProps): React$1.JSX.Element;
|
|
6462
|
+
|
|
6463
|
+
declare const maskedInputVariants: (props?: ({
|
|
6464
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6465
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
6466
|
+
interface MaskedInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "value">, VariantProps<typeof maskedInputVariants> {
|
|
6467
|
+
/** Controlled value (raw, unmasked) / 受控值(原始值,不带掩码) */
|
|
6468
|
+
value?: string;
|
|
6469
|
+
/** Default value / 默认值 */
|
|
6470
|
+
defaultValue?: string;
|
|
6471
|
+
/** Change callback, returns raw value / 变更回调,返回原始值 */
|
|
6472
|
+
onChange?: (value: string) => void;
|
|
6473
|
+
/** Mask pattern: # = digit, A = letter, * = any, other chars are literals / 掩码模式:# = 数字,A = 字母,* = 任意,其他字符为字面量 */
|
|
6474
|
+
mask: string;
|
|
6475
|
+
/** Placeholder / 占位文本 */
|
|
6476
|
+
placeholder?: string;
|
|
6477
|
+
/** Disabled / 是否禁用 */
|
|
6478
|
+
disabled?: boolean;
|
|
6479
|
+
/** Read-only / 是否只读 */
|
|
6480
|
+
readOnly?: boolean;
|
|
6481
|
+
/** Show mask placeholder as guide / 是否显示掩码占位引导 (default: true) */
|
|
6482
|
+
guide?: boolean;
|
|
6483
|
+
/** Keep character positions when deleting / 删除时保留字符位置 (default: false) */
|
|
6484
|
+
keepCharPositions?: boolean;
|
|
6485
|
+
}
|
|
6486
|
+
/**
|
|
6487
|
+
* @component MaskedInput
|
|
6488
|
+
* @category ui/data-entry
|
|
6489
|
+
* @since 0.2.0
|
|
6490
|
+
* @description Format-masked input for ID cards, bank cards, IP addresses, etc. / 格式化掩码输入框,适用于身份证、银行卡、IP 地址等
|
|
6491
|
+
* @keywords mask, input, format, pattern, card
|
|
6492
|
+
* @example
|
|
6493
|
+
* <MaskedInput mask="####-####-####-####" placeholder="Bank card" />
|
|
6494
|
+
* <MaskedInput mask="###.###.###.###" guide={false} />
|
|
6495
|
+
*/
|
|
6496
|
+
declare function MaskedInput({ className, value: controlledValue, defaultValue, onChange, mask, placeholder, disabled, readOnly, guide, keepCharPositions, size, ...props }: MaskedInputProps): React$1.JSX.Element;
|
|
6497
|
+
|
|
6498
|
+
interface DateRangePickerProps {
|
|
6499
|
+
/** Selected range [start, end] / 选中的日期范围 */
|
|
6500
|
+
value?: [Date | null, Date | null];
|
|
6501
|
+
/** Default value / 默认值 */
|
|
6502
|
+
defaultValue?: [Date | null, Date | null];
|
|
6503
|
+
/** Change callback / 变更回调 */
|
|
6504
|
+
onChange?: (value: [Date | null, Date | null]) => void;
|
|
6505
|
+
/** Date format string / 日期格式 (default: "yyyy-MM-dd") */
|
|
6506
|
+
format?: string;
|
|
6507
|
+
/** Placeholder [start, end] / 占位文本 */
|
|
6508
|
+
placeholder?: [string, string];
|
|
6509
|
+
/** Disabled / 是否禁用 */
|
|
6510
|
+
disabled?: boolean;
|
|
6511
|
+
/** Read-only / 是否只读 */
|
|
6512
|
+
readOnly?: boolean;
|
|
6513
|
+
/** Whether to show clear button / 是否显示清除按钮 */
|
|
6514
|
+
allowClear?: boolean;
|
|
6515
|
+
/** Disable dates function / 禁用日期函数 */
|
|
6516
|
+
disabledDate?: (date: Date) => boolean;
|
|
6517
|
+
/** Input size / 输入框大小 */
|
|
6518
|
+
size?: "sm" | "default" | "lg";
|
|
6519
|
+
className?: string;
|
|
6520
|
+
}
|
|
6521
|
+
/**
|
|
6522
|
+
* @component DateRangePicker
|
|
6523
|
+
* @category ui/data-entry
|
|
6524
|
+
* @since 0.2.0
|
|
6525
|
+
* @description Date range picker with start and end date selection / 日期范围选择器,支持开始和结束日期选择
|
|
6526
|
+
* @keywords date, range, picker, calendar, period
|
|
6527
|
+
* @example
|
|
6528
|
+
* <DateRangePicker
|
|
6529
|
+
* value={[new Date(2024, 0, 1), new Date(2024, 11, 31)]}
|
|
6530
|
+
* onChange={([start, end]) => console.log(start, end)}
|
|
6531
|
+
* />
|
|
6532
|
+
*/
|
|
6533
|
+
declare function DateRangePicker({ value: controlledValue, defaultValue, onChange, format, placeholder, disabled, readOnly, allowClear, disabledDate, size, className, }: DateRangePickerProps): React$1.JSX.Element;
|
|
6534
|
+
|
|
6535
|
+
interface MonthPickerProps {
|
|
6536
|
+
/** Selected date (only month/year are used) / 选中的日期(仅使用月份/年份) */
|
|
6537
|
+
value?: Date | null;
|
|
6538
|
+
/** Default value / 默认值 */
|
|
6539
|
+
defaultValue?: Date | null;
|
|
6540
|
+
/** Change callback / 变更回调 */
|
|
6541
|
+
onChange?: (value: Date | null) => void;
|
|
6542
|
+
/** Placeholder text / 占位文本 */
|
|
6543
|
+
placeholder?: string;
|
|
6544
|
+
/** Disabled / 是否禁用 */
|
|
6545
|
+
disabled?: boolean;
|
|
6546
|
+
/** Read-only / 是否只读 */
|
|
6547
|
+
readOnly?: boolean;
|
|
6548
|
+
/** Whether to show clear button / 是否显示清除按钮 */
|
|
6549
|
+
allowClear?: boolean;
|
|
6550
|
+
/** Input size / 输入框大小 */
|
|
6551
|
+
size?: "sm" | "default" | "lg";
|
|
6552
|
+
className?: string;
|
|
6553
|
+
}
|
|
6554
|
+
/**
|
|
6555
|
+
* @component MonthPicker
|
|
6556
|
+
* @category ui/data-entry
|
|
6557
|
+
* @since 0.2.0
|
|
6558
|
+
* @description Month-only picker with year navigation and month grid / 月份选择器,支持年份导航和月份网格
|
|
6559
|
+
* @keywords month, picker, calendar, date
|
|
6560
|
+
* @example
|
|
6561
|
+
* <MonthPicker value={new Date()} onChange={(d) => console.log(d)} />
|
|
6562
|
+
*/
|
|
6563
|
+
declare function MonthPicker({ value: controlledValue, defaultValue, onChange, placeholder, disabled, readOnly, allowClear, size, className, }: MonthPickerProps): React$1.JSX.Element;
|
|
6564
|
+
|
|
6565
|
+
interface YearPickerProps {
|
|
6566
|
+
/** Selected date (only year is used) / 选中的日期(仅使用年份) */
|
|
6567
|
+
value?: Date | null;
|
|
6568
|
+
/** Default value / 默认值 */
|
|
6569
|
+
defaultValue?: Date | null;
|
|
6570
|
+
/** Change callback / 变更回调 */
|
|
6571
|
+
onChange?: (value: Date | null) => void;
|
|
6572
|
+
/** Placeholder text / 占位文本 */
|
|
6573
|
+
placeholder?: string;
|
|
6574
|
+
/** Disabled / 是否禁用 */
|
|
6575
|
+
disabled?: boolean;
|
|
6576
|
+
/** Read-only / 是否只读 */
|
|
6577
|
+
readOnly?: boolean;
|
|
6578
|
+
/** Whether to show clear button / 是否显示清除按钮 */
|
|
6579
|
+
allowClear?: boolean;
|
|
6580
|
+
/** Input size / 输入框大小 */
|
|
6581
|
+
size?: "sm" | "default" | "lg";
|
|
6582
|
+
className?: string;
|
|
6583
|
+
}
|
|
6584
|
+
/**
|
|
6585
|
+
* @component YearPicker
|
|
6586
|
+
* @category ui/data-entry
|
|
6587
|
+
* @since 0.2.0
|
|
6588
|
+
* @description Year-only picker with year grid and decade navigation / 年份选择器,支持年份网格和年代导航
|
|
6589
|
+
* @keywords year, picker, calendar, date, decade
|
|
6590
|
+
* @example
|
|
6591
|
+
* <YearPicker value={new Date()} onChange={(d) => console.log(d)} />
|
|
6592
|
+
*/
|
|
6593
|
+
declare function YearPicker({ value: controlledValue, defaultValue, onChange, placeholder, disabled, readOnly, allowClear, size, className, }: YearPickerProps): React$1.JSX.Element;
|
|
6594
|
+
|
|
6595
|
+
interface QuarterValue {
|
|
6596
|
+
/** Year / 年份 */
|
|
6597
|
+
year: number;
|
|
6598
|
+
/** Quarter 1-4 / 季度 1-4 */
|
|
6599
|
+
quarter: number;
|
|
6600
|
+
}
|
|
6601
|
+
interface QuarterPickerProps {
|
|
6602
|
+
/** Selected {year, quarter} / 选中的 {year, quarter} */
|
|
6603
|
+
value?: QuarterValue | null;
|
|
6604
|
+
/** Default value / 默认值 */
|
|
6605
|
+
defaultValue?: QuarterValue | null;
|
|
6606
|
+
/** Change callback / 变更回调 */
|
|
6607
|
+
onChange?: (value: QuarterValue | null) => void;
|
|
6608
|
+
/** Placeholder text / 占位文本 */
|
|
6609
|
+
placeholder?: string;
|
|
6610
|
+
/** Disabled / 是否禁用 */
|
|
6611
|
+
disabled?: boolean;
|
|
6612
|
+
/** Read-only / 是否只读 */
|
|
6613
|
+
readOnly?: boolean;
|
|
6614
|
+
/** Whether to show clear button / 是否显示清除按钮 */
|
|
6615
|
+
allowClear?: boolean;
|
|
6616
|
+
/** Input size / 输入框大小 */
|
|
6617
|
+
size?: "sm" | "default" | "lg";
|
|
6618
|
+
className?: string;
|
|
6619
|
+
}
|
|
6620
|
+
/**
|
|
6621
|
+
* @component QuarterPicker
|
|
6622
|
+
* @category ui/data-entry
|
|
6623
|
+
* @since 0.2.0
|
|
6624
|
+
* @description Quarter picker with year navigation and Q1-Q4 buttons / 季度选择器,支持年份导航和 Q1-Q4 按钮
|
|
6625
|
+
* @keywords quarter, picker, calendar, date, period
|
|
6626
|
+
* @example
|
|
6627
|
+
* <QuarterPicker
|
|
6628
|
+
* value={{ year: 2024, quarter: 2 }}
|
|
6629
|
+
* onChange={(v) => console.log(v)}
|
|
6630
|
+
* />
|
|
6631
|
+
*/
|
|
6632
|
+
declare function QuarterPicker({ value: controlledValue, defaultValue, onChange, placeholder, disabled, readOnly, allowClear, size, className, }: QuarterPickerProps): React$1.JSX.Element;
|
|
6633
|
+
|
|
6634
|
+
interface RangeSliderProps {
|
|
6635
|
+
/** Selected range [min, max] / 选中的范围 */
|
|
6636
|
+
value?: [number, number];
|
|
6637
|
+
/** Default value / 默认值 */
|
|
6638
|
+
defaultValue?: [number, number];
|
|
6639
|
+
/** Change callback / 变更回调 */
|
|
6640
|
+
onChange?: (value: [number, number]) => void;
|
|
6641
|
+
/** Minimum value / 最小值 (default: 0) */
|
|
6642
|
+
min?: number;
|
|
6643
|
+
/** Maximum value / 最大值 (default: 100) */
|
|
6644
|
+
max?: number;
|
|
6645
|
+
/** Step / 步长 (default: 1) */
|
|
6646
|
+
step?: number;
|
|
6647
|
+
/** Disabled / 是否禁用 */
|
|
6648
|
+
disabled?: boolean;
|
|
6649
|
+
/** Whether to show value labels / 是否显示值标签 (default: false) */
|
|
6650
|
+
showValue?: boolean;
|
|
6651
|
+
/** Format value function / 值格式化函数 */
|
|
6652
|
+
formatValue?: (value: number) => string;
|
|
6653
|
+
className?: string;
|
|
6654
|
+
}
|
|
6655
|
+
/**
|
|
6656
|
+
* @component RangeSlider
|
|
6657
|
+
* @category ui/data-entry
|
|
6658
|
+
* @since 0.2.0
|
|
6659
|
+
* @description Dual-handle range slider with filled track between handles / 双滑块范围滑块,两个手柄之间显示填充轨道
|
|
6660
|
+
* @keywords range, slider, dual, handle, min, max
|
|
6661
|
+
* @example
|
|
6662
|
+
* <RangeSlider value={[20, 80]} onChange={([min, max]) => console.log(min, max)} />
|
|
6663
|
+
* <RangeSlider min={0} max={1000} step={50} showValue />
|
|
6664
|
+
*/
|
|
6665
|
+
declare function RangeSlider({ className, value: controlledValue, defaultValue, onChange, min, max, step, disabled, showValue, formatValue, }: RangeSliderProps): React$1.JSX.Element;
|
|
6666
|
+
|
|
6667
|
+
interface CountdownButtonProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "onClick">, VariantProps<typeof buttonVariants> {
|
|
6668
|
+
/** Countdown duration in seconds / 倒计时时长(秒)(default: 60) */
|
|
6669
|
+
duration?: number;
|
|
6670
|
+
/** Button content (shown when not counting down) / 按钮内容(非倒计时时显示) */
|
|
6671
|
+
children?: React$1.ReactNode;
|
|
6672
|
+
/** Async click handler, countdown starts after it resolves / 异步点击处理,倒计时在其完成后开始 */
|
|
6673
|
+
onClick?: () => void | Promise<void>;
|
|
6674
|
+
/** Whether button is disabled / 是否禁用 */
|
|
6675
|
+
disabled?: boolean;
|
|
6676
|
+
/** Function to format countdown text / 倒计时文本格式化函数 (default: (s) => `${s}s`) */
|
|
6677
|
+
countText?: (seconds: number) => string;
|
|
6678
|
+
/** Whether to start countdown on mount / 是否在挂载时开始倒计时 (default: false) */
|
|
6679
|
+
runOnMount?: boolean;
|
|
6680
|
+
}
|
|
6681
|
+
/**
|
|
6682
|
+
* @component CountdownButton
|
|
6683
|
+
* @category ui/data-entry
|
|
6684
|
+
* @since 0.2.0
|
|
6685
|
+
* @description Button with countdown timer for verification codes / 带倒计时定时器的验证码按钮
|
|
6686
|
+
* @keywords countdown, button, verification, code, timer
|
|
6687
|
+
* @example
|
|
6688
|
+
* <CountdownButton duration={60} onClick={sendCode}>Send Code</CountdownButton>
|
|
6689
|
+
* <CountdownButton duration={120} countText={(s) => `Resend in ${s}s`}>Send</CountdownButton>
|
|
6690
|
+
*/
|
|
6691
|
+
declare function CountdownButton({ className, variant, size, duration, children, onClick, disabled, countText, runOnMount, ...props }: CountdownButtonProps): React$1.JSX.Element;
|
|
6692
|
+
|
|
6693
|
+
declare const amountInputVariants: (props?: ({
|
|
6694
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6695
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
6696
|
+
interface AmountInputProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange" | "value" | "defaultValue">, VariantProps<typeof amountInputVariants> {
|
|
6697
|
+
/** Controlled value / 受控值 */
|
|
6698
|
+
value?: number | null;
|
|
6699
|
+
/** Default value / 默认值 */
|
|
6700
|
+
defaultValue?: number | null;
|
|
6701
|
+
/** Change callback / 变更回调 */
|
|
6702
|
+
onChange?: (value: number | null) => void;
|
|
6703
|
+
/** Currency symbol prefix / 货币符号前缀 (default: "¥") */
|
|
6704
|
+
currency?: string;
|
|
6705
|
+
/** Decimal precision / 小数精度 (default: 2) */
|
|
6706
|
+
precision?: number;
|
|
6707
|
+
/** Minimum value / 最小值 */
|
|
6708
|
+
min?: number;
|
|
6709
|
+
/** Maximum value / 最大值 */
|
|
6710
|
+
max?: number;
|
|
6711
|
+
/** Disabled / 是否禁用 */
|
|
6712
|
+
disabled?: boolean;
|
|
6713
|
+
/** Read-only / 是否只读 */
|
|
6714
|
+
readOnly?: boolean;
|
|
6715
|
+
/** Placeholder / 占位文本 */
|
|
6716
|
+
placeholder?: string;
|
|
6717
|
+
/** Locale for number formatting / 数字格式化语言 (default: "zh-CN") */
|
|
6718
|
+
locale?: string;
|
|
6719
|
+
}
|
|
6720
|
+
/**
|
|
6721
|
+
* @component AmountInput
|
|
6722
|
+
* @category ui/data-entry
|
|
6723
|
+
* @since 0.2.0
|
|
6724
|
+
* @description Currency/amount input with thousand separators / 带千位分隔符的金额输入框
|
|
6725
|
+
* @keywords amount, currency, input, money, number, thousand
|
|
6726
|
+
* @example
|
|
6727
|
+
* <AmountInput value={1234.56} onChange={(v) => console.log(v)} />
|
|
6728
|
+
* <AmountInput currency="$" precision={2} min={0} />
|
|
6729
|
+
*/
|
|
6730
|
+
declare function AmountInput({ className, value: controlledValue, defaultValue, onChange, currency, precision, min, max, disabled, readOnly, placeholder, size, locale, ...props }: AmountInputProps): React$1.JSX.Element;
|
|
6731
|
+
|
|
6732
|
+
interface SortableListProps<T> extends React$1.ComponentProps<"div"> {
|
|
6733
|
+
/** Array of items to render and reorder / 要渲染和排序的项数组 */
|
|
6734
|
+
items: T[];
|
|
6735
|
+
/** Callback fired when items are reordered / 排序时的回调 */
|
|
6736
|
+
onReorder: (oldIndex: number, newIndex: number) => void;
|
|
6737
|
+
/** Render function for each item / 每个项的渲染函数 */
|
|
6738
|
+
renderItem: (item: T, index: number, isDragging: boolean) => React$1.ReactNode;
|
|
6739
|
+
/** Field name to use as the React key / 用作 React key 的字段名 */
|
|
6740
|
+
keyField: string;
|
|
6741
|
+
/** Disable drag-and-drop reordering / 禁用拖拽排序 */
|
|
6742
|
+
disabled?: boolean;
|
|
6743
|
+
/** Layout orientation / 布局方向 */
|
|
6744
|
+
orientation?: "vertical" | "horizontal";
|
|
6745
|
+
/** Class applied to each list item wrapper / 每个列表项容器的类名 */
|
|
6746
|
+
itemClassName?: string;
|
|
6747
|
+
}
|
|
6748
|
+
/**
|
|
6749
|
+
* @component SortableList
|
|
6750
|
+
* @category ui/interaction
|
|
6751
|
+
* @since 0.2.0
|
|
6752
|
+
* @description Generic drag-to-reorder list using native HTML5 drag and drop API with visual feedback / 使用原生 HTML5 拖放 API 的通用拖拽排序列表,带视觉反馈
|
|
6753
|
+
* @keywords sortable, drag, drop, reorder, list, html5
|
|
6754
|
+
* @example
|
|
6755
|
+
* <SortableList
|
|
6756
|
+
* items={items}
|
|
6757
|
+
* keyField="id"
|
|
6758
|
+
* onReorder={(old, next) => move(old, next)}
|
|
6759
|
+
* renderItem={(item) => <div>{item.label}</div>}
|
|
6760
|
+
* />
|
|
6761
|
+
*/
|
|
6762
|
+
declare function SortableList<T>({ items, onReorder, renderItem, keyField, disabled, orientation, className, itemClassName, ...props }: SortableListProps<T>): React$1.JSX.Element;
|
|
6763
|
+
|
|
6764
|
+
interface CopyButtonProps extends React$1.ComponentProps<"button">, VariantProps<typeof buttonVariants> {
|
|
6765
|
+
/** Text content to copy to clipboard / 要复制到剪贴板的文本 */
|
|
6766
|
+
text: string;
|
|
6767
|
+
/** Callback fired after successful copy / 复制成功后的回调 */
|
|
6768
|
+
onCopied?: (text: string) => void;
|
|
6769
|
+
/** Duration in ms to show the checkmark after copy / 复制后显示勾选图标的持续时间(毫秒) */
|
|
6770
|
+
timeout?: number;
|
|
6771
|
+
/** Whether to show the copy/check icon / 是否显示复制/勾选图标 */
|
|
6772
|
+
icon?: boolean;
|
|
6773
|
+
}
|
|
6774
|
+
/**
|
|
6775
|
+
* @component CopyButton
|
|
6776
|
+
* @category ui/actions
|
|
6777
|
+
* @since 0.2.0
|
|
6778
|
+
* @description One-click copy-to-clipboard button with a checkmark feedback indicator / 一键复制到剪贴板的按钮,带勾选反馈指示器
|
|
6779
|
+
* @keywords copy, clipboard, button, paste, copy-to-clipboard
|
|
6780
|
+
* @example
|
|
6781
|
+
* <CopyButton text="Hello world" />
|
|
6782
|
+
* <CopyButton text="Hello" variant="outline" size="sm">Copy me</CopyButton>
|
|
6783
|
+
*/
|
|
6784
|
+
declare function CopyButton({ text, onCopied, timeout, variant, size, icon, className, children, ...props }: CopyButtonProps): React$1.JSX.Element;
|
|
6785
|
+
|
|
6786
|
+
interface EditableColumn<T = Record<string, unknown>> {
|
|
6787
|
+
/** Column key / 列键 */
|
|
6788
|
+
key: string;
|
|
6789
|
+
/** Column title / 列标题 */
|
|
6790
|
+
title: React$1.ReactNode;
|
|
6791
|
+
/** Data field key / 数据字段键 */
|
|
6792
|
+
dataIndex: keyof T & string;
|
|
6793
|
+
/** Cell editor type / 单元格编辑器类型 */
|
|
6794
|
+
type?: "text" | "number" | "select" | "date" | "boolean";
|
|
6795
|
+
/** Options for select type / 下拉选项 */
|
|
6796
|
+
options?: {
|
|
6797
|
+
label: React$1.ReactNode;
|
|
6798
|
+
value: string | number;
|
|
6799
|
+
}[];
|
|
6800
|
+
/** Column width / 列宽 */
|
|
6801
|
+
width?: number | string;
|
|
6802
|
+
/** Required field / 是否必填 */
|
|
6803
|
+
required?: boolean;
|
|
6804
|
+
/** Custom display render / 自定义显示渲染 */
|
|
6805
|
+
render?: (value: unknown, row: T, index: number) => React$1.ReactNode;
|
|
6806
|
+
/** Custom edit render / 自定义编辑渲染 */
|
|
6807
|
+
renderEdit?: (value: unknown, row: T, onChange: (value: unknown) => void) => React$1.ReactNode;
|
|
6808
|
+
}
|
|
6809
|
+
interface EditableTableProps<T = Record<string, unknown>> extends Omit<React$1.ComponentProps<"div">, "onChange"> {
|
|
6810
|
+
/** Column definitions / 列定义 */
|
|
6811
|
+
columns: EditableColumn<T>[];
|
|
6812
|
+
/** Table data / 表格数据 */
|
|
6813
|
+
data?: T[];
|
|
6814
|
+
/** Change handler / 数据变更回调 */
|
|
6815
|
+
onChange?: (newData: T[]) => void;
|
|
6816
|
+
/** Row key field / 行键字段 */
|
|
6817
|
+
rowKey?: keyof T & string;
|
|
6818
|
+
/** Enable cell editing / 启用单元格编辑 */
|
|
6819
|
+
editable?: boolean;
|
|
6820
|
+
/** Enable add row / 启用新增行 */
|
|
6821
|
+
addable?: boolean;
|
|
6822
|
+
/** Enable delete row / 启用删除行 */
|
|
6823
|
+
deletable?: boolean;
|
|
6824
|
+
/** Add row callback / 新增行回调 */
|
|
6825
|
+
onRowAdd?: () => void;
|
|
6826
|
+
/** Delete row callback / 删除行回调 */
|
|
6827
|
+
onRowDelete?: (row: T, index: number) => void;
|
|
6828
|
+
}
|
|
6829
|
+
declare function EditableTable<T extends Record<string, unknown> = Record<string, unknown>>({ className, columns, data, onChange, rowKey, editable, addable, deletable, onRowAdd, onRowDelete, ...props }: EditableTableProps<T>): React$1.JSX.Element;
|
|
6830
|
+
|
|
6831
|
+
interface EditableDescriptionItem {
|
|
6832
|
+
/** Label text / 标签文本 */
|
|
6833
|
+
label: React$1.ReactNode;
|
|
6834
|
+
/** Value / 值 */
|
|
6835
|
+
value: unknown;
|
|
6836
|
+
/** Editor type / 编辑器类型 */
|
|
6837
|
+
type?: "text" | "number" | "select" | "date" | "boolean";
|
|
6838
|
+
/** Options for select type / 下拉选项 */
|
|
6839
|
+
options?: {
|
|
6840
|
+
label: React$1.ReactNode;
|
|
6841
|
+
value: string | number;
|
|
6842
|
+
}[];
|
|
6843
|
+
/** Required field / 是否必填 */
|
|
6844
|
+
required?: boolean;
|
|
6845
|
+
}
|
|
6846
|
+
interface EditableDescriptionsProps extends Omit<React$1.ComponentProps<"div">, "onChange"> {
|
|
6847
|
+
/** Description items / 描述项列表 */
|
|
6848
|
+
items?: EditableDescriptionItem[];
|
|
6849
|
+
/** Number of columns / 列数 */
|
|
6850
|
+
column?: number;
|
|
6851
|
+
/** Layout direction / 布局方向 */
|
|
6852
|
+
layout?: "horizontal" | "vertical";
|
|
6853
|
+
/** Enable editing / 启用编辑 */
|
|
6854
|
+
editable?: boolean;
|
|
6855
|
+
/** Change handler / 变更回调 */
|
|
6856
|
+
onChange?: (newItems: EditableDescriptionItem[]) => void;
|
|
6857
|
+
}
|
|
6858
|
+
declare function EditableDescriptions({ className, items, column, layout, editable, onChange, ...props }: EditableDescriptionsProps): React$1.JSX.Element;
|
|
6859
|
+
|
|
6860
|
+
interface FilterChip {
|
|
6861
|
+
/** Unique identifier / 唯一标识 */
|
|
6862
|
+
id: string;
|
|
6863
|
+
/** Label text / 标签文本 */
|
|
6864
|
+
label: string;
|
|
6865
|
+
/** Value text / 值文本 */
|
|
6866
|
+
value?: React$1.ReactNode;
|
|
6867
|
+
/** Chip color / 颜色 */
|
|
6868
|
+
color?: "default" | "primary" | "success" | "warning" | "error" | "info";
|
|
6869
|
+
}
|
|
6870
|
+
interface FilterChipsProps extends React$1.ComponentProps<"div"> {
|
|
6871
|
+
/** Active filter chips / 活动筛选条件列表 */
|
|
6872
|
+
filters?: FilterChip[];
|
|
6873
|
+
/** Remove a single filter by id / 移除单个筛选条件 */
|
|
6874
|
+
onRemove?: (id: string) => void;
|
|
6875
|
+
/** Clear all filters / 清除全部筛选条件 */
|
|
6876
|
+
onClear?: () => void;
|
|
6877
|
+
/** Max chips to display before collapsing / 最大显示数量 */
|
|
6878
|
+
maxDisplay?: number;
|
|
6879
|
+
}
|
|
6880
|
+
/**
|
|
6881
|
+
* @component FilterChips
|
|
6882
|
+
* @category ui/data-display
|
|
6883
|
+
* @since 0.2.0
|
|
6884
|
+
* @description Active filter condition chips bar, each chip shows label:value with remove button / 活动筛选条件 chips 条,每个 chip 显示 label:value 并带移除按钮
|
|
6885
|
+
* @keywords filter, chips, conditions, active, 筛选, 条件
|
|
6886
|
+
* @example
|
|
6887
|
+
* <FilterChips
|
|
6888
|
+
* filters={[{ id: "1", label: "Status", value: "Active" }]}
|
|
6889
|
+
* onRemove={(id) => console.log(id)}
|
|
6890
|
+
* onClear={() => console.log("clear")}
|
|
6891
|
+
* />
|
|
6892
|
+
*/
|
|
6893
|
+
declare function FilterChips({ className, filters, onRemove, onClear, maxDisplay, ...props }: FilterChipsProps): React$1.JSX.Element | null;
|
|
6894
|
+
|
|
6895
|
+
interface SavedView {
|
|
6896
|
+
/** Unique identifier / 唯一标识 */
|
|
6897
|
+
id: string;
|
|
6898
|
+
/** View name / 视图名称 */
|
|
6899
|
+
name: string;
|
|
6900
|
+
/** Whether this is the default view / 是否为默认视图 */
|
|
6901
|
+
isDefault?: boolean;
|
|
6902
|
+
}
|
|
6903
|
+
interface SavedViewProps extends Omit<React$1.ComponentProps<"div">, "onSelect"> {
|
|
6904
|
+
/** Saved views list / 保存的视图列表 */
|
|
6905
|
+
views?: SavedView[];
|
|
6906
|
+
/** Current selected view id / 当前选中的视图 id */
|
|
6907
|
+
currentViewId?: string;
|
|
6908
|
+
/** Select a view / 选择视图 */
|
|
6909
|
+
onSelect?: (id: string) => void;
|
|
6910
|
+
/** Save current view as new / 保存当前视图 */
|
|
6911
|
+
onSave?: (name: string) => void;
|
|
6912
|
+
/** Delete a view / 删除视图 */
|
|
6913
|
+
onDelete?: (id: string) => void;
|
|
6914
|
+
}
|
|
6915
|
+
declare function SavedViewSwitcher({ className, views, currentViewId, onSelect, onSave, onDelete, ...props }: SavedViewProps): React$1.JSX.Element;
|
|
6916
|
+
|
|
6917
|
+
interface SkeletonTableProps extends React$1.ComponentProps<"div"> {
|
|
6918
|
+
/** Number of columns / 列数 */
|
|
6919
|
+
columns?: number;
|
|
6920
|
+
/** Number of rows / 行数 */
|
|
6921
|
+
rows?: number;
|
|
6922
|
+
/** Show header skeleton / 显示表头骨架 */
|
|
6923
|
+
showHeader?: boolean;
|
|
6924
|
+
/** Show pagination skeleton / 显示分页骨架 */
|
|
6925
|
+
showPagination?: boolean;
|
|
6926
|
+
}
|
|
6927
|
+
/**
|
|
6928
|
+
* @component SkeletonTable
|
|
6929
|
+
* @category ui/feedback
|
|
6930
|
+
* @since 0.2.0
|
|
6931
|
+
* @description Skeleton placeholder for tables, mimics table structure with pulsing bars / 表格骨架占位符,模拟表格结构并带脉冲条
|
|
6932
|
+
* @keywords skeleton, table, loading, placeholder, 骨架屏, 表格
|
|
6933
|
+
* @example
|
|
6934
|
+
* <SkeletonTable columns={4} rows={5} />
|
|
6935
|
+
*/
|
|
6936
|
+
declare function SkeletonTable({ className, columns, rows, showHeader, showPagination, ...props }: SkeletonTableProps): React$1.JSX.Element;
|
|
6937
|
+
|
|
6938
|
+
interface SkeletonFormProps extends React$1.ComponentProps<"div"> {
|
|
6939
|
+
/** Number of fields / 字段数量 */
|
|
6940
|
+
fields?: number;
|
|
6941
|
+
/** Number of columns / 列数 */
|
|
6942
|
+
columns?: number;
|
|
6943
|
+
/** Show submit button skeleton / 显示提交按钮骨架 */
|
|
6944
|
+
showSubmit?: boolean;
|
|
6945
|
+
}
|
|
6946
|
+
/**
|
|
6947
|
+
* @component SkeletonForm
|
|
6948
|
+
* @category ui/feedback
|
|
6949
|
+
* @since 0.2.0
|
|
6950
|
+
* @description Skeleton placeholder for forms, mimics label + input rows with pulsing bars / 表单骨架占位符,模拟标签+输入行并带脉冲条
|
|
6951
|
+
* @keywords skeleton, form, loading, placeholder, 骨架屏, 表单
|
|
6952
|
+
* @example
|
|
6953
|
+
* <SkeletonForm fields={4} columns={2} showSubmit />
|
|
6954
|
+
*/
|
|
6955
|
+
declare function SkeletonForm({ className, fields, columns, showSubmit, ...props }: SkeletonFormProps): React$1.JSX.Element;
|
|
6956
|
+
|
|
6957
|
+
interface CodeDiffViewerProps extends React$1.ComponentProps<"div"> {
|
|
6958
|
+
/** Old text to compare / 旧文本 */
|
|
6959
|
+
oldValue?: string;
|
|
6960
|
+
/** New text to compare / 新文本 */
|
|
6961
|
+
newValue?: string;
|
|
6962
|
+
/** Diff mode: unified or split / 差异模式:统一或分屏 */
|
|
6963
|
+
mode?: "unified" | "split";
|
|
6964
|
+
/** Language label (display only) / 语言标签(仅显示) */
|
|
6965
|
+
language?: string;
|
|
6966
|
+
/** Show line numbers / 显示行号 */
|
|
6967
|
+
showLineNumbers?: boolean;
|
|
6968
|
+
/** Number of context lines around changes / 变更上下文行数 */
|
|
6969
|
+
contextLines?: number;
|
|
6970
|
+
}
|
|
6971
|
+
/**
|
|
6972
|
+
* @component CodeDiffViewer
|
|
6973
|
+
* @category ui/data-display
|
|
6974
|
+
* @since 0.2.0
|
|
6975
|
+
* @description Code/text diff viewer with inline highlighting using LCS algorithm, supports unified and split modes / 代码差异查看器,使用 LCS 算法进行行内高亮,支持统一和分屏模式
|
|
6976
|
+
* @keywords diff, code, viewer, compare, lcs, 差异, 对比
|
|
6977
|
+
* @example
|
|
6978
|
+
* <CodeDiffViewer
|
|
6979
|
+
* oldValue="line1\nline2\nline3"
|
|
6980
|
+
* newValue="line1\nline2-modified\nline3"
|
|
6981
|
+
* mode="unified"
|
|
6982
|
+
* />
|
|
6983
|
+
*/
|
|
6984
|
+
declare function CodeDiffViewer({ className, oldValue, newValue, mode, language, showLineNumbers, contextLines, ...props }: CodeDiffViewerProps): React$1.JSX.Element;
|
|
6985
|
+
|
|
6986
|
+
interface MarkdownViewerProps extends React$1.ComponentProps<"div"> {
|
|
6987
|
+
/** Markdown content string / Markdown 内容字符串 */
|
|
6988
|
+
content?: string;
|
|
6989
|
+
}
|
|
6990
|
+
/**
|
|
6991
|
+
* @component MarkdownViewer
|
|
6992
|
+
* @category ui/data-display
|
|
6993
|
+
* @since 0.2.0
|
|
6994
|
+
* @description Read-only markdown renderer supporting headings, bold, italic, code blocks, lists, links, images, blockquotes, tables, and horizontal rules / 只读 Markdown 渲染器,支持标题、粗体、斜体、代码块、列表、链接、图片、引用、表格和分割线
|
|
6995
|
+
* @keywords markdown, viewer, renderer, read-only, Markdown 渲染
|
|
6996
|
+
* @example
|
|
6997
|
+
* <MarkdownViewer content="# Hello\n\nThis is **bold** and *italic*." />
|
|
6998
|
+
*/
|
|
6999
|
+
declare function MarkdownViewer({ className, content, ...props }: MarkdownViewerProps): React$1.JSX.Element;
|
|
7000
|
+
|
|
7001
|
+
interface RichTextMention {
|
|
7002
|
+
/** Unique identifier / 唯一标识 */
|
|
7003
|
+
id: string;
|
|
7004
|
+
/** Mention display name / 提及显示名称 */
|
|
7005
|
+
name: string;
|
|
7006
|
+
/** Avatar URL / 头像地址 */
|
|
7007
|
+
avatar?: string;
|
|
7008
|
+
}
|
|
7009
|
+
interface RichTextAttachment {
|
|
7010
|
+
/** File name / 文件名 */
|
|
7011
|
+
name: string;
|
|
7012
|
+
/** File URL / 文件地址 */
|
|
7013
|
+
url: string;
|
|
7014
|
+
/** File size in bytes / 文件大小(字节) */
|
|
7015
|
+
size?: number;
|
|
7016
|
+
}
|
|
7017
|
+
interface RichTextDisplayProps extends React$1.ComponentProps<"div"> {
|
|
7018
|
+
/** Rich text content (HTML string or structured JSON) / 富文本内容(HTML 字符串或结构化 JSON) */
|
|
7019
|
+
content?: string;
|
|
7020
|
+
/** Content format / 内容格式 */
|
|
7021
|
+
format?: "html" | "json";
|
|
7022
|
+
/** Mention list / 提及列表 */
|
|
7023
|
+
mentions?: RichTextMention[];
|
|
7024
|
+
/** Attachment list / 附件列表 */
|
|
7025
|
+
attachments?: RichTextAttachment[];
|
|
7026
|
+
}
|
|
7027
|
+
/**
|
|
7028
|
+
* @component RichTextDisplay
|
|
7029
|
+
* @category ui/data-display
|
|
7030
|
+
* @since 0.2.0
|
|
7031
|
+
* @description Read-only rich text display supporting HTML (sanitized) and JSON formats, with mentions and attachments / 只读富文本显示,支持 HTML(已消毒)和 JSON 格式,可显示提及和附件
|
|
7032
|
+
* @keywords rich-text, display, html, json, 富文本, 显示
|
|
7033
|
+
* @example
|
|
7034
|
+
* <RichTextDisplay
|
|
7035
|
+
* format="html"
|
|
7036
|
+
* content="<p>Hello <strong>world</strong></p>"
|
|
7037
|
+
* attachments={[{ name: "file.pdf", url: "/file.pdf", size: 102400 }]}
|
|
7038
|
+
* />
|
|
7039
|
+
*/
|
|
7040
|
+
declare function RichTextDisplay({ className, content, format, mentions, attachments, ...props }: RichTextDisplayProps): React$1.JSX.Element;
|
|
7041
|
+
|
|
7042
|
+
interface LazyImageProps extends Omit<React$1.ComponentProps<"img">, "placeholder"> {
|
|
7043
|
+
/** Image source / 图片地址 */
|
|
7044
|
+
src?: string;
|
|
7045
|
+
/** Alt text / 替代文本 */
|
|
7046
|
+
alt?: string;
|
|
7047
|
+
/** Width in px / 宽度 */
|
|
7048
|
+
width?: number | string;
|
|
7049
|
+
/** Height in px / 高度 */
|
|
7050
|
+
height?: number | string;
|
|
7051
|
+
/** Placeholder color or blur data URL / 占位颜色或模糊图地址 */
|
|
7052
|
+
placeholder?: string;
|
|
7053
|
+
/** Enable blur-up effect / 启用模糊渐显效果 */
|
|
7054
|
+
blur?: boolean;
|
|
7055
|
+
/** Fallback content on error / 加载失败的回退内容 */
|
|
7056
|
+
fallback?: React$1.ReactNode;
|
|
7057
|
+
/** Error callback / 错误回调 */
|
|
7058
|
+
onError?: () => void;
|
|
7059
|
+
}
|
|
7060
|
+
declare function LazyImage({ className, src, alt, width, height, placeholder, blur, fallback, onError, ...props }: LazyImageProps): React$1.JSX.Element;
|
|
7061
|
+
|
|
7062
|
+
/**
|
|
7063
|
+
* @component KeepAlive
|
|
7064
|
+
* @category ui/utilities
|
|
7065
|
+
* @since 0.2.0
|
|
7066
|
+
* @description Page cache component that preserves component state across tab/route switches by keeping children mounted but hidden / 页面缓存组件,通过保持子组件挂载但隐藏来在标签/路由切换时保留状态
|
|
7067
|
+
* @keywords keep-alive, cache, preserve, state, tab, route
|
|
7068
|
+
* @example
|
|
7069
|
+
* <KeepAlive active={isActive} cacheKey="dashboard">
|
|
7070
|
+
* <Dashboard />
|
|
7071
|
+
* </KeepAlive>
|
|
7072
|
+
*/
|
|
7073
|
+
interface KeepAliveProps extends Omit<React$1.ComponentProps<"div">, "children"> {
|
|
7074
|
+
/** Whether the children should be visible / 子组件是否可见 */
|
|
7075
|
+
active?: boolean;
|
|
7076
|
+
/** Unique cache key for identifying the cached content / 用于标识缓存内容的唯一键 */
|
|
7077
|
+
cacheKey?: string;
|
|
7078
|
+
/** Children to cache and optionally show / 需要缓存的子内容 */
|
|
7079
|
+
children?: React$1.ReactNode;
|
|
7080
|
+
}
|
|
7081
|
+
declare function KeepAlive({ active, cacheKey, children, className, ...props }: KeepAliveProps): React$1.JSX.Element;
|
|
7082
|
+
/**
|
|
7083
|
+
* @component useKeepAlive
|
|
7084
|
+
* @category ui/utilities
|
|
7085
|
+
* @since 0.2.0
|
|
7086
|
+
* @description Hook to access the keep-alive cache store, allowing manual cache management / 访问 keep-alive 缓存存储的 Hook,允许手动管理缓存
|
|
7087
|
+
* @keywords keep-alive, hook, cache, clear, remove
|
|
7088
|
+
* @example
|
|
7089
|
+
* const { cache, clear, remove } = useKeepAlive();
|
|
7090
|
+
* remove("dashboard");
|
|
7091
|
+
*/
|
|
7092
|
+
declare function useKeepAlive(): {
|
|
7093
|
+
cache: Map<string, React$1.ReactNode>;
|
|
7094
|
+
clear: () => void;
|
|
7095
|
+
remove: (key: string) => void;
|
|
7096
|
+
};
|
|
7097
|
+
|
|
7098
|
+
/**
|
|
7099
|
+
* @component NotificationBadge
|
|
7100
|
+
* @category ui/feedback
|
|
7101
|
+
* @since 0.2.0
|
|
7102
|
+
* @description Header notification badge with unread count, supporting dot mode and max overflow display / 头部通知徽章,显示未读数量,支持点模式和超出最大值显示
|
|
7103
|
+
* @keywords notification, badge, count, unread, bell
|
|
7104
|
+
* @example
|
|
7105
|
+
* <NotificationBadge count={5} />
|
|
7106
|
+
* <NotificationBadge dot />
|
|
7107
|
+
* <NotificationBadge count={120} max={99} />
|
|
7108
|
+
*/
|
|
7109
|
+
interface NotificationBadgeProps extends React$1.ComponentProps<"div"> {
|
|
7110
|
+
/** Unread count / 未读数量 */
|
|
7111
|
+
count?: number;
|
|
7112
|
+
/** Max display before showing "max+" / 超出此值显示 "max+" */
|
|
7113
|
+
max?: number;
|
|
7114
|
+
/** Show badge when count is 0 / count 为 0 时是否显示 */
|
|
7115
|
+
showZero?: boolean;
|
|
7116
|
+
/** Show as a dot without number / 显示为无数字的小圆点 */
|
|
7117
|
+
dot?: boolean;
|
|
7118
|
+
/** Offset [x, y] relative to the bell icon / 相对于铃铛图标的偏移 [x, y] */
|
|
7119
|
+
offset?: [number, number];
|
|
7120
|
+
}
|
|
7121
|
+
declare function NotificationBadge({ count, max, showZero, dot, offset, className, ...props }: NotificationBadgeProps): React$1.JSX.Element;
|
|
7122
|
+
|
|
7123
|
+
interface NotificationItem {
|
|
7124
|
+
/** Unique id / 唯一标识 */
|
|
7125
|
+
id: string;
|
|
7126
|
+
/** Notification title / 标题 */
|
|
7127
|
+
title: string;
|
|
7128
|
+
/** Description text / 描述内容 */
|
|
7129
|
+
description?: string;
|
|
7130
|
+
/** Timestamp (ms or Date) / 时间戳 */
|
|
7131
|
+
timestamp: number | string | Date;
|
|
7132
|
+
/** Whether the notification has been read / 是否已读 */
|
|
7133
|
+
read?: boolean;
|
|
7134
|
+
/** Notification type / 通知类型 */
|
|
7135
|
+
type?: "info" | "success" | "warning" | "error";
|
|
7136
|
+
}
|
|
7137
|
+
interface NotificationDropdownProps extends Omit<React$1.ComponentProps<"div">, "onError"> {
|
|
7138
|
+
/** Notification list / 通知列表 */
|
|
7139
|
+
notifications?: NotificationItem[];
|
|
7140
|
+
/** Mark a single notification as read / 标记单条为已读 */
|
|
7141
|
+
onRead?: (id: string) => void;
|
|
7142
|
+
/** Mark all as read / 标记全部已读 */
|
|
7143
|
+
onReadAll?: () => void;
|
|
7144
|
+
/** Clear all notifications / 清除全部通知 */
|
|
7145
|
+
onClear?: () => void;
|
|
7146
|
+
/** View all callback / 查看全部回调 */
|
|
7147
|
+
onViewAll?: () => void;
|
|
7148
|
+
/** Unread count (computed if not provided) / 未读数量(不提供则自动计算) */
|
|
7149
|
+
unreadCount?: number;
|
|
7150
|
+
}
|
|
7151
|
+
/**
|
|
7152
|
+
* @component NotificationDropdown
|
|
7153
|
+
* @category ui/feedback
|
|
7154
|
+
* @since 0.2.0
|
|
7155
|
+
* @description Notification dropdown panel for header, showing a list of notifications with type icons, unread indicators, and relative timestamps / 头部通知下拉面板,展示带类型图标、未读指示器和相对时间的通知列表
|
|
7156
|
+
* @keywords notification, dropdown, panel, header, bell, unread
|
|
7157
|
+
* @example
|
|
7158
|
+
* <NotificationDropdown
|
|
7159
|
+
* notifications={[{ id: "1", title: "New message", timestamp: Date.now() }]}
|
|
7160
|
+
* onRead={(id) => console.log(id)}
|
|
7161
|
+
* />
|
|
7162
|
+
*/
|
|
7163
|
+
declare function NotificationDropdown({ className, notifications, onRead, onReadAll, onClear, onViewAll, unreadCount, ...props }: NotificationDropdownProps): React$1.JSX.Element;
|
|
7164
|
+
|
|
7165
|
+
/**
|
|
7166
|
+
* @component GlobalLoading
|
|
7167
|
+
* @category ui/feedback
|
|
7168
|
+
* @since 0.2.0
|
|
7169
|
+
* @description Full-screen or inline loading indicator with spinner and optional text / 全屏或内联加载指示器,带旋转图标和可选文字
|
|
7170
|
+
* @keywords loading, spinner, overlay, fullscreen, loader
|
|
7171
|
+
* @example
|
|
7172
|
+
* <GlobalLoading loading={isLoading} text="Fetching data..." />
|
|
7173
|
+
* <GlobalLoading loading={isLoading} fullscreen={false} />
|
|
7174
|
+
*/
|
|
7175
|
+
interface GlobalLoadingProps extends React$1.ComponentProps<"div"> {
|
|
7176
|
+
/** Whether loading is active / 是否正在加载 */
|
|
7177
|
+
loading?: boolean;
|
|
7178
|
+
/** Loading text / 加载文字 */
|
|
7179
|
+
text?: string;
|
|
7180
|
+
/** Use fullscreen overlay (default: true) / 使用全屏遮罩(默认 true) */
|
|
7181
|
+
fullscreen?: boolean;
|
|
7182
|
+
/** Show spinner icon (default: true) / 显示旋转图标(默认 true) */
|
|
7183
|
+
spinner?: boolean;
|
|
7184
|
+
}
|
|
7185
|
+
declare function GlobalLoading({ loading, text, fullscreen, spinner, className, ...props }: GlobalLoadingProps): React$1.JSX.Element | null;
|
|
7186
|
+
|
|
7187
|
+
/**
|
|
7188
|
+
* @component ErrorBoundaryUI
|
|
7189
|
+
* @category ui/feedback
|
|
7190
|
+
* @since 0.2.0
|
|
7191
|
+
* @description Error boundary at UI level that catches render errors and displays a fallback / UI 级别的错误边界,捕获渲染错误并显示回退内容
|
|
7192
|
+
* @keywords error, boundary, fallback, catch, error-handling
|
|
7193
|
+
* @example
|
|
7194
|
+
* <ErrorBoundaryUI>
|
|
7195
|
+
* <MyComponent />
|
|
7196
|
+
* </ErrorBoundaryUI>
|
|
7197
|
+
*
|
|
7198
|
+
* <ErrorBoundaryUI fallback={(error, reset) => <p>{error.message}</p>}>
|
|
7199
|
+
* <MyComponent />
|
|
7200
|
+
* </ErrorBoundaryUI>
|
|
7201
|
+
*/
|
|
7202
|
+
interface ErrorBoundaryUIProps {
|
|
7203
|
+
children?: React$1.ReactNode;
|
|
7204
|
+
/** Fallback ReactNode or render function receiving (error, reset) / 回退内容或接收 (error, reset) 的渲染函数 */
|
|
7205
|
+
fallback?: React$1.ReactNode | ((error: Error, reset: () => void) => React$1.ReactNode);
|
|
7206
|
+
/** Called when an error is caught / 捕获错误时调用 */
|
|
7207
|
+
onError?: (error: Error, errorInfo: React$1.ErrorInfo) => void;
|
|
7208
|
+
/** Container className / 容器类名 */
|
|
7209
|
+
className?: string;
|
|
7210
|
+
}
|
|
7211
|
+
interface ErrorBoundaryUIState {
|
|
7212
|
+
error: Error | null;
|
|
7213
|
+
}
|
|
7214
|
+
declare class ErrorBoundaryUI extends React$1.Component<ErrorBoundaryUIProps, ErrorBoundaryUIState> {
|
|
7215
|
+
constructor(props: ErrorBoundaryUIProps);
|
|
7216
|
+
componentDidCatch(error: Error, errorInfo: React$1.ErrorInfo): void;
|
|
7217
|
+
static getDerivedStateFromError(error: Error): ErrorBoundaryUIState;
|
|
7218
|
+
reset: () => void;
|
|
7219
|
+
render(): string | number | bigint | boolean | React$1.JSX.Element | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | null | undefined;
|
|
7220
|
+
}
|
|
7221
|
+
|
|
7222
|
+
/**
|
|
7223
|
+
* @component I18nProvider
|
|
7224
|
+
* @category ui/utilities
|
|
7225
|
+
* @since 0.2.0
|
|
7226
|
+
* @description Internationalization provider with simple key-based dot-notation translation lookup / 国际化 Provider,支持基于键的点号路径翻译查找
|
|
7227
|
+
* @keywords i18n, internationalization, locale, translation, provider
|
|
7228
|
+
* @example
|
|
7229
|
+
* <I18nProvider locale="zh-CN" messages={{ "common.save": { "zh-CN": "保存", "en-US": "Save" } }}>
|
|
7230
|
+
* <App />
|
|
7231
|
+
* </I18nProvider>
|
|
7232
|
+
*/
|
|
7233
|
+
interface I18nProviderProps {
|
|
7234
|
+
/** Current locale / 当前语言 */
|
|
7235
|
+
locale?: string;
|
|
7236
|
+
/** Default locale fallback / 默认语言回退 */
|
|
7237
|
+
defaultLocale?: string;
|
|
7238
|
+
/** Message dictionary: key -> locale -> text / 消息字典:键 -> 语言 -> 文本 */
|
|
7239
|
+
messages?: Record<string, Record<string, string>>;
|
|
7240
|
+
children?: React$1.ReactNode;
|
|
7241
|
+
/** Locale change callback / 语言切换回调 */
|
|
7242
|
+
onChange?: (locale: string) => void;
|
|
7243
|
+
}
|
|
7244
|
+
interface I18nContextValue {
|
|
7245
|
+
locale: string;
|
|
7246
|
+
setLocale: (locale: string) => void;
|
|
7247
|
+
messages: Record<string, Record<string, string>>;
|
|
7248
|
+
t: (key: string) => string;
|
|
7249
|
+
}
|
|
7250
|
+
declare function I18nProvider({ locale, defaultLocale, messages, children, onChange, }: I18nProviderProps): React$1.JSX.Element;
|
|
7251
|
+
/**
|
|
7252
|
+
* @component useI18n
|
|
7253
|
+
* @category ui/utilities
|
|
7254
|
+
* @since 0.2.0
|
|
7255
|
+
* @description Hook to access the i18n context (locale, setLocale, t, messages) / 访问 i18n 上下文的 Hook
|
|
7256
|
+
* @keywords i18n, hook, locale, translation
|
|
7257
|
+
* @example
|
|
7258
|
+
* const { t, locale, setLocale } = useI18n();
|
|
7259
|
+
* t("common.save");
|
|
7260
|
+
*/
|
|
7261
|
+
declare function useI18n(): I18nContextValue;
|
|
7262
|
+
|
|
7263
|
+
/**
|
|
7264
|
+
* @component RTLProvider
|
|
7265
|
+
* @category ui/utilities
|
|
7266
|
+
* @since 0.2.0
|
|
7267
|
+
* @description RTL (right-to-left) layout provider that sets the `dir` attribute and provides context for child components to adjust their layout / RTL(从右到左)布局 Provider,设置 `dir` 属性并提供上下文供子组件调整布局
|
|
7268
|
+
* @keywords rtl, ltr, direction, i18n, provider, layout
|
|
7269
|
+
* @example
|
|
7270
|
+
* <RTLProvider dir="rtl">
|
|
7271
|
+
* <MyComponent />
|
|
7272
|
+
* </RTLProvider>
|
|
7273
|
+
*/
|
|
7274
|
+
interface RTLProviderProps {
|
|
7275
|
+
/** Text direction / 文本方向 */
|
|
7276
|
+
dir?: "ltr" | "rtl" | "auto";
|
|
7277
|
+
children?: React$1.ReactNode;
|
|
7278
|
+
className?: string;
|
|
7279
|
+
}
|
|
7280
|
+
interface RTLContextValue {
|
|
7281
|
+
dir: "ltr" | "rtl" | "auto";
|
|
7282
|
+
isRTL: boolean;
|
|
7283
|
+
}
|
|
7284
|
+
declare function RTLProvider({ dir, children, className }: RTLProviderProps): React$1.JSX.Element;
|
|
7285
|
+
/**
|
|
7286
|
+
* @component useRTL
|
|
7287
|
+
* @category ui/utilities
|
|
7288
|
+
* @since 0.2.0
|
|
7289
|
+
* @description Hook to access the RTL context (dir, isRTL) / 访问 RTL 上下文的 Hook
|
|
7290
|
+
* @keywords rtl, hook, direction, ltr
|
|
7291
|
+
* @example
|
|
7292
|
+
* const { isRTL, dir } = useRTL();
|
|
7293
|
+
*/
|
|
7294
|
+
declare function useRTL(): RTLContextValue;
|
|
7295
|
+
|
|
7296
|
+
/**
|
|
7297
|
+
* @component KeyboardShortcutsManager
|
|
7298
|
+
* @category ui/utilities
|
|
7299
|
+
* @since 0.2.0
|
|
7300
|
+
* @description Global keyboard shortcuts registration center that parses key combos and listens on document keydown / 全局键盘快捷键注册中心,解析组合键并监听 document keydown
|
|
7301
|
+
* @keywords keyboard, shortcuts, hotkeys, shortcut, manager
|
|
7302
|
+
* @example
|
|
7303
|
+
* <KeyboardShortcutsManager
|
|
7304
|
+
* shortcuts={[{ id: "save", keys: "cmd+s", handler: () => save() }]}
|
|
7305
|
+
* />
|
|
7306
|
+
*/
|
|
7307
|
+
interface ShortcutDef {
|
|
7308
|
+
/** Unique shortcut id / 唯一标识 */
|
|
7309
|
+
id: string;
|
|
7310
|
+
/** Key combo like "cmd+k", "ctrl+shift+p" / 组合键,如 "cmd+k"、"ctrl+shift+p" */
|
|
7311
|
+
keys: string;
|
|
7312
|
+
/** Human-readable description / 描述 */
|
|
7313
|
+
description?: string;
|
|
7314
|
+
/** Handler invoked when the combo is pressed / 按下时的处理函数 */
|
|
7315
|
+
handler: (event: KeyboardEvent) => void;
|
|
7316
|
+
/** Scope tag for grouping (default: "global") / 作用域标签(默认 "global") */
|
|
7317
|
+
scope?: string;
|
|
7318
|
+
/** Whether to call preventDefault on match (default: true) / 匹配时是否阻止默认行为(默认 true) */
|
|
7319
|
+
preventDefault?: boolean;
|
|
7320
|
+
}
|
|
7321
|
+
interface KeyboardShortcutsManagerProps extends React$1.ComponentProps<"div"> {
|
|
7322
|
+
/** Shortcut definitions / 快捷键定义 */
|
|
7323
|
+
shortcuts?: ShortcutDef[];
|
|
7324
|
+
/** Whether shortcuts are enabled (default: true) / 是否启用(默认 true) */
|
|
7325
|
+
enabled?: boolean;
|
|
7326
|
+
/** Callback when any shortcut triggers / 任一快捷键触发时的回调 */
|
|
7327
|
+
onTrigger?: (shortcutId: string) => void;
|
|
7328
|
+
}
|
|
7329
|
+
declare function KeyboardShortcutsManager({ className, shortcuts, enabled, onTrigger, ...props }: KeyboardShortcutsManagerProps): React$1.JSX.Element;
|
|
7330
|
+
/**
|
|
7331
|
+
* @component useKeyboardShortcuts
|
|
7332
|
+
* @category ui/utilities
|
|
7333
|
+
* @since 0.2.0
|
|
7334
|
+
* @description Hook that registers keyboard shortcuts programmatically / 以编程方式注册键盘快捷键的 Hook
|
|
7335
|
+
* @keywords keyboard, shortcuts, hook, hotkeys
|
|
7336
|
+
* @example
|
|
7337
|
+
* useKeyboardShortcuts([{ id: "save", keys: "cmd+s", handler: () => save() }]);
|
|
7338
|
+
*/
|
|
7339
|
+
declare function useKeyboardShortcuts(shortcuts: ShortcutDef[], enabled?: boolean): void;
|
|
7340
|
+
|
|
7341
|
+
/**
|
|
7342
|
+
* Props for the JSONViewerUI component.
|
|
7343
|
+
*/
|
|
7344
|
+
interface JSONViewerUIProps {
|
|
7345
|
+
/** JSON data to display / 要显示的 JSON 数据 */
|
|
7346
|
+
data: unknown;
|
|
7347
|
+
/** Additional className / 额外类名 */
|
|
7348
|
+
className?: string;
|
|
7349
|
+
/** Default expanded state (default: true) / 默认展开状态 */
|
|
7350
|
+
defaultExpanded?: boolean;
|
|
7351
|
+
/** Force collapse all nodes / 强制折叠所有节点 */
|
|
7352
|
+
collapsed?: boolean;
|
|
7353
|
+
/** Show line numbers (default: false) / 是否显示行号 */
|
|
7354
|
+
showLineNumbers?: boolean;
|
|
7355
|
+
/** Color theme (default: "dark") / 颜色主题 */
|
|
7356
|
+
theme?: "light" | "dark";
|
|
7357
|
+
}
|
|
7358
|
+
/**
|
|
7359
|
+
* @component JSONViewerUI
|
|
7360
|
+
* @category ui/data-display
|
|
7361
|
+
* @since 0.2.0
|
|
7362
|
+
* @description Lightweight JSON tree viewer with collapsible nodes,
|
|
7363
|
+
* syntax highlighting, and optional line numbers. / 轻量级 JSON 树查看器,
|
|
7364
|
+
* 支持折叠节点、语法高亮和可选行号。
|
|
7365
|
+
* @keywords json, viewer, tree, syntax, highlight, collapsible, dark
|
|
7366
|
+
* @example
|
|
7367
|
+
* ```tsx
|
|
7368
|
+
* <JSONViewerUI data={{ name: "John", age: 30, items: [1, 2] }} theme="dark" />
|
|
7369
|
+
* ```
|
|
7370
|
+
*/
|
|
7371
|
+
declare function JSONViewerUI({ data, className, defaultExpanded, collapsed, showLineNumbers, theme, }: JSONViewerUIProps): React$1.JSX.Element;
|
|
7372
|
+
|
|
7373
|
+
/**
|
|
7374
|
+
* A single data point in the heatmap.
|
|
7375
|
+
*/
|
|
7376
|
+
interface HeatmapPoint {
|
|
7377
|
+
/** Date string in YYYY-MM-DD format / YYYY-MM-DD 格式的日期字符串 */
|
|
7378
|
+
date: string;
|
|
7379
|
+
/** Value for the cell / 单元格的值 */
|
|
7380
|
+
value: number;
|
|
7381
|
+
}
|
|
7382
|
+
/**
|
|
7383
|
+
* Props for the Heatmap component.
|
|
7384
|
+
*/
|
|
7385
|
+
interface HeatmapProps {
|
|
7386
|
+
/** Data points for the heatmap / 热力图数据点 */
|
|
7387
|
+
data: HeatmapPoint[];
|
|
7388
|
+
/** Start date (YYYY-MM-DD) / 起始日期 */
|
|
7389
|
+
startDate?: string;
|
|
7390
|
+
/** End date (YYYY-MM-DD) / 结束日期 */
|
|
7391
|
+
endDate?: string;
|
|
7392
|
+
/** Color scale array (default: green scale) / 颜色梯度数组 */
|
|
7393
|
+
colorScale?: string[];
|
|
7394
|
+
/** Additional className / 额外类名 */
|
|
7395
|
+
className?: string;
|
|
7396
|
+
/** Callback when a cell is clicked / 单元格点击回调 */
|
|
7397
|
+
onCellClick?: (point: HeatmapPoint) => void;
|
|
7398
|
+
/** Cell size in pixels (default: 12) / 单元格大小 */
|
|
7399
|
+
cellSize?: number;
|
|
7400
|
+
/** Gap between cells in pixels (default: 2) / 单元格间距 */
|
|
7401
|
+
gap?: number;
|
|
7402
|
+
}
|
|
7403
|
+
/**
|
|
7404
|
+
* @component Heatmap
|
|
7405
|
+
* @category ui/data-visualization
|
|
7406
|
+
* @since 0.2.0
|
|
7407
|
+
* @description Generic GitHub-style calendar heatmap with week columns,
|
|
7408
|
+
* day rows, month labels, and day labels. Color intensity scales with
|
|
7409
|
+
* value thresholds. / 通用 GitHub 风格日历热力图,包含周列、日行、月份标签
|
|
7410
|
+
* 和星期标签,颜色强度根据数值阈值渐变。
|
|
7411
|
+
* @keywords heatmap, calendar, contribution, grid, chart, github
|
|
7412
|
+
* @example
|
|
7413
|
+
* ```tsx
|
|
7414
|
+
* <Heatmap
|
|
7415
|
+
* data={[{ date: "2024-01-01", value: 3 }]}
|
|
7416
|
+
* startDate="2024-01-01"
|
|
7417
|
+
* endDate="2024-03-01"
|
|
7418
|
+
* onCellClick={(p) => console.log(p)}
|
|
7419
|
+
* />
|
|
7420
|
+
* ```
|
|
7421
|
+
*/
|
|
7422
|
+
declare function Heatmap({ data, startDate, endDate, colorScale, className, onCellClick, cellSize, gap, }: HeatmapProps): React$1.JSX.Element;
|
|
7423
|
+
|
|
7424
|
+
/**
|
|
7425
|
+
* An option in the segmented filter.
|
|
7426
|
+
*/
|
|
7427
|
+
interface SegmentFilterOption {
|
|
7428
|
+
/** Option value / 选项值 */
|
|
7429
|
+
value: string;
|
|
7430
|
+
/** Display label / 显示标签 */
|
|
7431
|
+
label: string;
|
|
7432
|
+
/** Optional count badge / 可选的计数徽标 */
|
|
7433
|
+
count?: number;
|
|
7434
|
+
/** Optional icon / 可选的图标 */
|
|
7435
|
+
icon?: React$1.ReactNode;
|
|
7436
|
+
}
|
|
7437
|
+
/**
|
|
7438
|
+
* Props for the SegmentedFilter component.
|
|
7439
|
+
*/
|
|
7440
|
+
interface SegmentedFilterProps {
|
|
7441
|
+
/** Filter options / 过滤选项 */
|
|
7442
|
+
options: SegmentFilterOption[];
|
|
7443
|
+
/** Currently selected value / 当前选中的值 */
|
|
7444
|
+
value?: string;
|
|
7445
|
+
/** Change callback / 变更回调 */
|
|
7446
|
+
onChange?: (value: string) => void;
|
|
7447
|
+
/** Additional className / 额外类名 */
|
|
7448
|
+
className?: string;
|
|
7449
|
+
/** Size variant / 尺寸变体 */
|
|
7450
|
+
size?: "sm" | "default" | "lg";
|
|
7451
|
+
}
|
|
7452
|
+
/**
|
|
7453
|
+
* @component SegmentedFilter
|
|
7454
|
+
* @category ui/data-entry
|
|
7455
|
+
* @since 0.2.0
|
|
7456
|
+
* @description Segmented filter control for BI/dashboard with optional
|
|
7457
|
+
* count badges and filter semantics. Active segment uses primary
|
|
7458
|
+
* background. / 分段过滤控件,用于 BI/仪表盘,支持可选计数徽标和过滤
|
|
7459
|
+
* 语义。激活的分段使用主色背景。
|
|
7460
|
+
* @keywords segmented, filter, control, dashboard, bi, tabs, count, badge
|
|
7461
|
+
* @example
|
|
7462
|
+
* ```tsx
|
|
7463
|
+
* <SegmentedFilter
|
|
7464
|
+
* options={[
|
|
7465
|
+
* { value: "all", label: "全部", count: 100 },
|
|
7466
|
+
* { value: "active", label: "活跃", count: 42 },
|
|
7467
|
+
* ]}
|
|
7468
|
+
* value="all"
|
|
7469
|
+
* onChange={(v) => console.log(v)}
|
|
7470
|
+
* />
|
|
7471
|
+
* ```
|
|
7472
|
+
*/
|
|
7473
|
+
declare function SegmentedFilter({ options, value, onChange, className, size, }: SegmentedFilterProps): React$1.JSX.Element;
|
|
7474
|
+
|
|
7475
|
+
/**
|
|
7476
|
+
* A single stat/metric item.
|
|
7477
|
+
*/
|
|
7478
|
+
interface StatItem {
|
|
7479
|
+
/** Stat title / 指标标题 */
|
|
7480
|
+
title: string;
|
|
7481
|
+
/** Stat value / 指标值 */
|
|
7482
|
+
value: string | number;
|
|
7483
|
+
/** Optional unit / 可选单位 */
|
|
7484
|
+
unit?: string;
|
|
7485
|
+
/** Optional trend value (e.g. "12.5%") / 可选趋势值 */
|
|
7486
|
+
trend?: string;
|
|
7487
|
+
/** Trend direction / 趋势方向 */
|
|
7488
|
+
trendDirection?: "up" | "down";
|
|
7489
|
+
/** Optional icon / 可选图标 */
|
|
7490
|
+
icon?: React$1.ReactNode;
|
|
7491
|
+
}
|
|
7492
|
+
/**
|
|
7493
|
+
* Props for the StatGrid component.
|
|
7494
|
+
*/
|
|
7495
|
+
interface StatGridProps {
|
|
7496
|
+
/** Stat items to display / 统计项列表 */
|
|
7497
|
+
items: StatItem[];
|
|
7498
|
+
/** Number of columns (default: 4) / 列数 */
|
|
7499
|
+
columns?: number;
|
|
7500
|
+
/** Gap between cells (default: 4) / 单元格间距 */
|
|
7501
|
+
gap?: number;
|
|
7502
|
+
/** Additional className / 额外类名 */
|
|
7503
|
+
className?: string;
|
|
7504
|
+
/** Custom render function for each item / 自定义渲染函数 */
|
|
7505
|
+
renderItem?: (item: StatItem, index: number) => React$1.ReactNode;
|
|
7506
|
+
}
|
|
7507
|
+
/**
|
|
7508
|
+
* @component StatGrid
|
|
7509
|
+
* @category ui/data-visualization
|
|
7510
|
+
* @since 0.2.0
|
|
7511
|
+
* @description Responsive metric/stat grid with auto-layout. Each cell
|
|
7512
|
+
* displays a card with title, large value, optional trend indicator
|
|
7513
|
+
* with arrow. Responsive: 1 col mobile, 2 col sm, 3 col md, 4 col lg. /
|
|
7514
|
+
* 响应式指标/统计网格,自动布局。每个单元格显示带标题、大字号值和可选
|
|
7515
|
+
* 趋势指示器的卡片。响应式:手机 1 列,sm 2 列,md 3 列,lg 4 列。
|
|
7516
|
+
* @keywords stat, grid, metric, kpi, dashboard, trend, card, responsive
|
|
7517
|
+
* @example
|
|
7518
|
+
* ```tsx
|
|
7519
|
+
* <StatGrid
|
|
7520
|
+
* items={[
|
|
7521
|
+
* { title: "Revenue", value: "$12,345", trend: "12%", trendDirection: "up" },
|
|
7522
|
+
* { title: "Users", value: 1234, trend: "3%", trendDirection: "down" },
|
|
7523
|
+
* ]}
|
|
7524
|
+
* />
|
|
7525
|
+
* ```
|
|
7526
|
+
*/
|
|
7527
|
+
declare function StatGrid({ items, columns, gap, className, renderItem, }: StatGridProps): React$1.JSX.Element;
|
|
7528
|
+
|
|
7529
|
+
/**
|
|
7530
|
+
* A menu item in the row context menu.
|
|
7531
|
+
*/
|
|
7532
|
+
interface RowMenuItem {
|
|
7533
|
+
/** Unique item key / 唯一项键 */
|
|
7534
|
+
key: string;
|
|
7535
|
+
/** Display label / 显示标签 */
|
|
7536
|
+
label: string;
|
|
7537
|
+
/** Optional icon / 可选图标 */
|
|
7538
|
+
icon?: React$1.ReactNode;
|
|
7539
|
+
/** Danger style (red text) / 危险样式(红色文字) */
|
|
7540
|
+
danger?: boolean;
|
|
7541
|
+
/** Disabled state / 禁用状态 */
|
|
7542
|
+
disabled?: boolean;
|
|
7543
|
+
/** Render as a separator divider / 渲染为分隔线 */
|
|
7544
|
+
separator?: boolean;
|
|
7545
|
+
}
|
|
7546
|
+
/**
|
|
7547
|
+
* Props for the RowContextMenu component.
|
|
7548
|
+
*/
|
|
7549
|
+
interface RowContextMenuProps {
|
|
7550
|
+
/** Menu items / 菜单项 */
|
|
7551
|
+
items: RowMenuItem[];
|
|
7552
|
+
/** Callback when an item is selected / 选中菜单项回调 */
|
|
7553
|
+
onItemSelect?: (item: RowMenuItem) => void;
|
|
7554
|
+
/** Child element to wrap / 包裹的子元素 */
|
|
7555
|
+
children: React$1.ReactNode;
|
|
7556
|
+
/** Additional className / 额外类名 */
|
|
7557
|
+
className?: string;
|
|
7558
|
+
}
|
|
7559
|
+
/**
|
|
7560
|
+
* @component RowContextMenu
|
|
7561
|
+
* @category ui/overlay
|
|
7562
|
+
* @since 0.2.0
|
|
7563
|
+
* @description Table/list row right-click context menu wrapper. Wraps any
|
|
7564
|
+
* element and shows a context menu at cursor position on right-click.
|
|
7565
|
+
* Items support icons, danger style, disabled state, and separators.
|
|
7566
|
+
* Closes on click outside or Escape. / 表格/列表行右键上下文菜单包裹器。
|
|
7567
|
+
* 包裹任意元素,右键时在光标位置显示上下文菜单。菜单项支持图标、危险样式、
|
|
7568
|
+
* 禁用状态和分隔线。点击外部或 Escape 键关闭。
|
|
7569
|
+
* @keywords context-menu, row, right-click, table, list, overlay
|
|
7570
|
+
* @example
|
|
7571
|
+
* ```tsx
|
|
7572
|
+
* <RowContextMenu
|
|
7573
|
+
* items={[
|
|
7574
|
+
* { key: "edit", label: "编辑" },
|
|
7575
|
+
* { key: "delete", label: "删除", danger: true },
|
|
7576
|
+
* ]}
|
|
7577
|
+
* onItemSelect={(item) => console.log(item)}
|
|
7578
|
+
* >
|
|
7579
|
+
* <div>Right-click me</div>
|
|
7580
|
+
* </RowContextMenu>
|
|
7581
|
+
* ```
|
|
7582
|
+
*/
|
|
7583
|
+
declare function RowContextMenu({ items, onItemSelect, children, className, }: RowContextMenuProps): React$1.JSX.Element;
|
|
7584
|
+
|
|
7585
|
+
/**
|
|
7586
|
+
* Props for the ProgressiveImage component.
|
|
7587
|
+
*/
|
|
7588
|
+
interface ProgressiveImageProps {
|
|
7589
|
+
/** Image source URL / 图片源地址 */
|
|
7590
|
+
src: string;
|
|
7591
|
+
/** Alt text / 替代文本 */
|
|
7592
|
+
alt: string;
|
|
7593
|
+
/** Image width / 图片宽度 */
|
|
7594
|
+
width?: number | string;
|
|
7595
|
+
/** Image height / 图片高度 */
|
|
7596
|
+
height?: number | string;
|
|
7597
|
+
/** Additional className / 额外类名 */
|
|
7598
|
+
className?: string;
|
|
7599
|
+
/** Tiny placeholder image (blur-up) / 微型占位图(模糊渐显) */
|
|
7600
|
+
blurDataURL?: string;
|
|
7601
|
+
/** Solid color placeholder (default: bg-muted) / 纯色占位 */
|
|
7602
|
+
placeholderColor?: string;
|
|
7603
|
+
/** Error callback / 错误回调 */
|
|
7604
|
+
onError?: (e: React$1.SyntheticEvent<HTMLImageElement>) => void;
|
|
7605
|
+
}
|
|
7606
|
+
/**
|
|
7607
|
+
* @component ProgressiveImage
|
|
7608
|
+
* @category ui/media
|
|
7609
|
+
* @since 0.2.0
|
|
7610
|
+
* @description Progressive image loading with blur-up technique. Loads a
|
|
7611
|
+
* tiny placeholder (or solid color), then loads the full image and
|
|
7612
|
+
* cross-fades from blurred to sharp using CSS filter transition. /
|
|
7613
|
+
* 渐进式图片加载,使用模糊渐显技术。先加载微型占位图(或纯色),然后加载
|
|
7614
|
+
* 完整图片,通过 CSS filter 过渡从模糊到清晰交叉渐显。
|
|
7615
|
+
* @keywords image, progressive, blur-up, placeholder, lazy, load, fade
|
|
7616
|
+
* @example
|
|
7617
|
+
* ```tsx
|
|
7618
|
+
* <ProgressiveImage
|
|
7619
|
+
* src="/large-photo.jpg"
|
|
7620
|
+
* alt="Nature"
|
|
7621
|
+
* blurDataURL="data:image/jpeg;base64,..."
|
|
7622
|
+
* />
|
|
7623
|
+
* ```
|
|
7624
|
+
*/
|
|
7625
|
+
declare function ProgressiveImage({ src, alt, width, height, className, blurDataURL, placeholderColor, onError, }: ProgressiveImageProps): React$1.JSX.Element;
|
|
7626
|
+
|
|
7627
|
+
/**
|
|
7628
|
+
* A single password policy rule.
|
|
7629
|
+
*/
|
|
7630
|
+
interface PolicyRule {
|
|
7631
|
+
/** Unique rule key / 唯一规则键 */
|
|
7632
|
+
key: string;
|
|
7633
|
+
/** Display label / 显示标签 */
|
|
7634
|
+
label: string;
|
|
7635
|
+
/** Test function for the rule / 规则测试函数 */
|
|
7636
|
+
test: (password: string) => boolean;
|
|
7637
|
+
/** Severity level / 严重级别 */
|
|
7638
|
+
level?: "error" | "warn" | "info";
|
|
7639
|
+
}
|
|
7640
|
+
/**
|
|
7641
|
+
* Props for the PasswordPolicyValidator component.
|
|
7642
|
+
*/
|
|
7643
|
+
interface PasswordPolicyValidatorProps {
|
|
7644
|
+
/** Password string to validate / 要验证的密码字符串 */
|
|
7645
|
+
password: string;
|
|
7646
|
+
/** Custom rules (default: standard rules) / 自定义规则 */
|
|
7647
|
+
rules?: PolicyRule[];
|
|
7648
|
+
/** Additional className / 额外类名 */
|
|
7649
|
+
className?: string;
|
|
7650
|
+
/** Show password strength score (default: true) / 是否显示强度评分 */
|
|
7651
|
+
showScore?: boolean;
|
|
7652
|
+
}
|
|
7653
|
+
/**
|
|
7654
|
+
* @component PasswordPolicyValidator
|
|
7655
|
+
* @category ui/data-entry
|
|
7656
|
+
* @since 0.2.0
|
|
7657
|
+
* @description Password policy checker with real-time feedback. Shows
|
|
7658
|
+
* a checklist with check/x icons for each rule and an optional
|
|
7659
|
+
* strength score bar. Green for pass, red for fail. / 密码策略检查器,
|
|
7660
|
+
* 实时反馈。显示每条规则的勾选/错误清单和可选的强度评分条。通过为绿色,
|
|
7661
|
+
* 失败为红色。
|
|
7662
|
+
* @keywords password, policy, validator, strength, checker, security, rule
|
|
7663
|
+
* @example
|
|
7664
|
+
* ```tsx
|
|
7665
|
+
* <PasswordPolicyValidator
|
|
7666
|
+
* password={pwd}
|
|
7667
|
+
* showScore
|
|
7668
|
+
* />
|
|
7669
|
+
* ```
|
|
7670
|
+
*/
|
|
7671
|
+
declare function PasswordPolicyValidator({ password, rules, className, showScore, }: PasswordPolicyValidatorProps): React$1.JSX.Element;
|
|
7672
|
+
|
|
7673
|
+
/** @deprecated Use KPIPanel */
|
|
7674
|
+
declare const KpiPanel: typeof KPIPanel;
|
|
7675
|
+
/** @deprecated Use KPICard */
|
|
7676
|
+
declare const KpiCard: typeof KPICard;
|
|
7677
|
+
|
|
7678
|
+
/** @deprecated Use OTPField */
|
|
7679
|
+
declare const OtpField: typeof OTPField;
|
|
7680
|
+
|
|
7681
|
+
/** @deprecated Use QrCodeDisplay */
|
|
7682
|
+
declare const QrcodeDisplay: typeof QrCodeDisplay;
|
|
7683
|
+
|
|
7684
|
+
/** @deprecated Use ResizablePanelGroup / ResizablePanel / ResizableHandle */
|
|
7685
|
+
declare const Resizable: typeof ResizablePanelGroup;
|
|
7686
|
+
|
|
7687
|
+
/** @deprecated Use QRCode */
|
|
7688
|
+
declare const Qrcode: typeof QRCode;
|
|
7689
|
+
|
|
7690
|
+
/** @deprecated Use AutoComplete */
|
|
7691
|
+
declare const Autocomplete: typeof AutoComplete;
|
|
7692
|
+
|
|
7693
|
+
/** @deprecated Use Toaster */
|
|
7694
|
+
declare const Sonner: ({ ...props }: sonner.ToasterProps) => React$1.JSX.Element;
|
|
7695
|
+
|
|
7696
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Affix, type AffixProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertVariant, AmountInput, type AmountInputProps, Anchor, type AnchorItem, type AnchorProps, AspectRatio, AudioPlayer, type AudioPlayerProps, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Autocomplete, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, BackTop, type BackTopProps, Badge, BarcodeDisplay, type BarcodeDisplayProps, Blockquote, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BrowseInput, type BrowseInputProps, Button, Calendar, CalendarDayButton, Captcha, type CaptchaProps, type CaptchaVisualOptions, Carousel, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, Cascader, type CascaderOption, type CascaderProps, type CellCoords, ChatInput, type ChatInputProps, ChatMessage, type ChatMessageProps, Checkbox, type CheckboxProps, CodeDiffViewer, type CodeDiffViewerProps, Col, type ColProps, type ColSpan, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, type ColumnConfig, type ColumnDef$1 as ColumnDef, Combobox, type ComboboxOption, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfigContext, type ConfigContextValue, ConfigProvider, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, Countdown, CountdownButton, type CountdownButtonProps, type CountdownFormat, type CountdownProps, type CountryOption, List as DataList, type ListProps as DataListProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type Department, DepartmentBrowse, type DepartmentBrowseProps, type DescriptionItem, Descriptions, DescriptionsItem, type DescriptionsProps, Dialog, DialogBody, type DialogBodyProps, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, DialogPortal, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, Direction, type DirectionProps, type DirectionValue, Divider$1 as Divider, type DividerProps, type DocType, Dot, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type EditableColumn, type EditableDescriptionItem, EditableDescriptions, type EditableDescriptionsProps, EditableTable, type EditableTableProps, EmptyState, ErrorBoundaryUI, type ErrorBoundaryUIProps, Fab, FabSpeedDial, FeedbackSurvey, type FeedbackSurveyProps, FileList, FileManager, type FileManagerProps, type FileNode, FileUpload, type FilterChip, FilterChips, type FilterChipsProps, Flex, type FlexProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormGrid, FormGridItem, type FormGridItemProps, type FormGridProps, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormList, type FormListItem, type FormListProps, FormMessage, type FormMessageProps, FormSection, type FormSectionProps, FullscreenToggle, type FullscreenToggleProps, GlobalLoading, type GlobalLoadingProps, GlobalSearch, type GlobalSearchProps, GridItem, type GridItemProps, GridLayout, type GridLayoutProps, H1, H2, H3, H4, H5, H6, Heatmap, type HeatmapPoint, type HeatmapProps, HelpDesk, type HelpDeskProps, HoverCard, HoverCardContent, HoverCardTrigger, I18nProvider, type I18nProviderProps, Icon, type IconItem, IconPicker, type IconPickerProps, type IconProps, type IconSize, Image, ImageGroup, type ImageProps, ImageViewer, type ImageViewerImage, type ImageViewerProps, InfiniteScroll, type InfiniteScrollProps, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputNumber, type InputNumberProps, InputNumberWithUnit, type InputNumberWithUnitProps, InputSearch, type InputSearchProps, JSONViewerUI, type JSONViewerUIProps, KPICard, type KPIItem, KPIPanel, type KPIPanelProps, Kbd, KbdGroup, KeepAlive, type KeepAliveProps, KeyboardShortcut, KeyboardShortcutDialog, type KeyboardShortcutDialogProps, type KeyboardShortcutProps, KeyboardShortcutsManager, type KeyboardShortcutsManagerProps, KnowledgeBase, type KnowledgeBaseProps, KpiCard, KpiPanel, Label, Large, LazyImage, type LazyImageProps, Lead, List$1 as List, ListFooter, ListHeader, ListItem, type ListItemProps, MarkdownViewer, type MarkdownViewerProps, MaskedInput, type MaskedInputProps, Masonry, type MasonryProps, type MentionOption, Mentions, type MentionsProps, Menu, type MenuClickInfo, Divider as MenuDivider, Item as MenuItem, type MenuItemConfig, ItemGroup as MenuItemGroup, type ItemProps as MenuItemProps, type MenuMode, type MenuProps, type MenuSize, SubMenu as MenuSubMenu, type MenuTheme, Menubar, Message, type MessageProps, type MessageVariant, MobilePullRefresh, type MobilePullRefreshProps, MobileSwipeAction, type MobileSwipeActionProps, ModalProvider, MonthPicker, type MonthPickerProps, Muted, NativeSelect, type NativeSelectGroup, type NativeSelectOption, type NativeSelectProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, Notification, NotificationBadge, type NotificationBadgeProps, NotificationDropdown, type NotificationDropdownProps, type NotificationItem, type NotificationProps, type NotificationType as NotificationVariant, NumberTicker, type NumberTickerProps, OTPField, OTPFieldSeparator, OfficeDocPreview, type OfficeDocPreviewProps, OrgTree, type OrgTreeNode, type OrgTreeProps, OtpField, PageContainer, type PageContainerProps, PageContent, type PageContentProps, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Paragraph, type ParagraphProps, PasswordInput, type PasswordInputProps, PasswordPolicyValidator, type PasswordPolicyValidatorProps, PasswordStrengthMeter, PhoneInput, type PhoneInputProps, PictureCard, PictureWall, type PolicyRule, Popconfirm, type PopconfirmProps, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, ProgressiveImage, type ProgressiveImageProps, QRCode, type QRCodeProps, QrCodeDisplay, type QrCodeDisplayProps, Qrcode, QrcodeDisplay, QuarterPicker, type QuarterPickerProps, type QuarterValue, RTLProvider, type RTLProviderProps, RadioGroup, RadioGroupItem, RangeSlider, type RangeSliderProps, Rating, Resizable, ResizableHandle, ResizablePanel, ResizablePanelGroup, type ResponsiveCol, Result, type ResultProps, type ResultStatus, RichTextDisplay, type RichTextDisplayProps, Row, RowContextMenu, type RowContextMenuProps, type RowData, type RowMenuItem, type RowProps, type SavedView, type SavedViewProps, SavedViewSwitcher, Scheduler, type SchedulerEvent, type SchedulerProps, SchemaForm, type SchemaFormFieldOption, type SchemaFormFieldOverride, type SchemaFormFieldType, type SchemaFormProps, ScrollArea, ScrollBar, type SearchResult, type SegmentFilterOption, SegmentedControl, SegmentedFilter, type SegmentedFilterProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, Separator, SequenceInput, type SequenceInputProps, SequencePreview, type SequencePreviewProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, type ShortcutDef, type ShortcutGroup, type ShortcutItem, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignaturePad, type SignaturePadHandle, type SignaturePadProps, Skeleton, SkeletonForm, type SkeletonFormProps, SkeletonTable, type SkeletonTableProps, Slider, SliderControl, SliderIndicator, SliderThumb, SliderTrack, Small, Sonner, SortableList, type SortableListProps, Space, type SpaceProps, Spin, type SpinProps, Spinner, type SpinnerProps, SplitButton, type SplitButtonProps, SplitPane, type SplitPaneProps, type ColumnDef as SpreadsheetColumnDef, SpreadsheetEditor, type SpreadsheetEditorProps, StatGrid, type StatGridProps, type StatItem, Statistic, type StatisticProps, Step, Stepper, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagColor, TagGroup, type TagProps, TagsInput, Text, type TextProps, Textarea, type TextareaProps, type ThemeConfig, type Ticket, type TicketPriority, type TicketReply, type TicketStatus, TimePicker, Timeline, TimelineConnector, TimelineContent, TimelineDescription, TimelineDot, TimelineItem, TimelineTime, TimelineTitle, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, type TourStep, type TreeNode$1 as TreeNode, TreeSelect, type TreeSelectProps, TreeView, type TreeNode as TreeViewNode, type TreeViewProps, TwoFactorAuth, type TwoFactorAuthProps, Typography, type UploadFile, type User, UserBrowse, type UserBrowseProps, VideoPlayer, type VideoPlayerProps, type ViewMode$1 as ViewMode, VirtualList, type VirtualListProps, VirtualTable, type VirtualTableProps, Watermark, type WikiArticle, type WikiCategory, WithPermission, type WithPermissionProps, YearPicker, type YearPickerProps, alertVariants, badgeVariants, browseInputVariants, buttonVariants, detectDocType, dotVariants, formGridVariants, formSectionVariants, formatTimeInput, generateCode, generateDefaultBackupCodes, gridLayoutVariants, kbdVariants, navigationMenuTriggerStyle, pageContainerVariants, tabsListVariants, timelineDotVariants, toggleVariants, useConfig, useFormField, useI18n, useKeepAlive, useKeyboardShortcuts, useRTL, useSidebar };
|