lingee-ui 0.0.7 → 0.0.9

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.
Files changed (50) hide show
  1. package/dist/button/index.css +1 -1
  2. package/dist/button/index.d.mts +1 -1
  3. package/dist/button/index.d.ts +1 -1
  4. package/dist/{chunk-FQRDHJQZ.mjs → chunk-6M7ESUQX.mjs} +1 -1
  5. package/dist/chunk-C5BDJQIO.js +2 -0
  6. package/dist/chunk-H7GT6UT4.mjs +1 -0
  7. package/dist/chunk-IE7TAOTL.mjs +2 -0
  8. package/dist/{chunk-T5QR25R6.js → chunk-QIMQMSJB.js} +1 -1
  9. package/dist/chunk-WAYZVZQB.js +1 -0
  10. package/dist/{chunk-RM4W5RV7.mjs → chunk-XG3DE76O.mjs} +1 -1
  11. package/dist/{chunk-KT3HSLBA.js → chunk-ZXUYGVWB.js} +1 -1
  12. package/dist/{index-BVXwKHfX.d.mts → index-7pb5YOcq.d.mts} +1 -1
  13. package/dist/{index-BVXwKHfX.d.ts → index-7pb5YOcq.d.ts} +1 -1
  14. package/dist/index.css +1 -1
  15. package/dist/index.d.mts +677 -62
  16. package/dist/index.d.ts +677 -62
  17. package/dist/index.js +2 -2
  18. package/dist/index.mjs +2 -2
  19. package/dist/input/index.css +1 -1
  20. package/dist/input/index.js +1 -1
  21. package/dist/input/index.mjs +1 -1
  22. package/dist/tabs/index.css +1 -1
  23. package/dist/tabs/index.d.mts +1 -1
  24. package/dist/tabs/index.d.ts +1 -1
  25. package/dist/tabs/index.js +1 -1
  26. package/dist/tabs/index.mjs +1 -1
  27. package/dist/textarea/index.css +1 -1
  28. package/dist/toast/index.js +1 -1
  29. package/dist/toast/index.mjs +1 -1
  30. package/dist/tokens.css +1 -1
  31. package/dist/tree/index.css +1 -0
  32. package/dist/tree/index.d.mts +229 -0
  33. package/dist/tree/index.d.ts +229 -0
  34. package/dist/tree/index.js +1 -0
  35. package/dist/tree/index.mjs +1 -0
  36. package/package.json +7 -2
  37. package/skill/AGENTS-SNIPPET.md +21 -19
  38. package/skill/SKILL.md +19 -15
  39. package/skill/VERSION.json +3 -3
  40. package/skill/references/components/dropdown.md +35 -2
  41. package/skill/references/components/ellipsis-tooltip.md +44 -0
  42. package/skill/references/components/empty.md +28 -2
  43. package/skill/references/components/sidebar.md +53 -27
  44. package/skill/references/components/tree.md +118 -0
  45. package/skill/references/components/upload.md +4 -1
  46. package/skill/references/setup.md +2 -1
  47. package/skill/references/tokens.md +16 -16
  48. package/CHANGELOG.md +0 -119
  49. package/dist/chunk-KQ733636.mjs +0 -1
  50. package/dist/chunk-PQVYDWUK.js +0 -1
package/dist/index.d.mts CHANGED
@@ -1,7 +1,10 @@
1
- import { B as ButtonProps } from './index-BVXwKHfX.mjs';
2
- export { a as Button, b as ButtonShape, c as ButtonSize, d as ButtonVariant } from './index-BVXwKHfX.mjs';
1
+ import { B as ButtonProps } from './index-7pb5YOcq.mjs';
2
+ export { a as Button, b as ButtonShape, c as ButtonSize, d as ButtonVariant } from './index-7pb5YOcq.mjs';
3
+ import * as React$1 from 'react';
4
+ import React__default, { ReactNode, CSSProperties, HTMLAttributes, MouseEvent, ComponentType, Key, ReactElement, UIEventHandler, Ref } from 'react';
5
+ import { TooltipProps } from './tooltip/index.mjs';
6
+ export { Tooltip, TooltipPlacement } from './tooltip/index.mjs';
3
7
  export { TabItem, Tabs, TabsProps, TabsSize, TabsVariant } from './tabs/index.mjs';
4
- export { Tooltip, TooltipPlacement, TooltipProps } from './tooltip/index.mjs';
5
8
  import { PopoverContentProps } from './popover/index.mjs';
6
9
  export { Popover, PopoverAnchor, PopoverAnchorProps, PopoverArrow, PopoverArrowProps, PopoverClose, PopoverCloseProps, PopoverContent, PopoverPlacement, PopoverProps, PopoverTrigger, PopoverTriggerProps } from './popover/index.mjs';
7
10
  export { Switch, SwitchProps, SwitchSize } from './switch/index.mjs';
@@ -9,16 +12,64 @@ export { Input, InputProps, InputShape, InputSize } from './input/index.mjs';
9
12
  export { Textarea, TextareaProps } from './textarea/index.mjs';
10
13
  export { ToastConfig, ToastGlobalConfig, ToastType, toast } from './toast/index.mjs';
11
14
  import * as react_jsx_runtime from 'react/jsx-runtime';
12
- import * as React$1 from 'react';
13
- import React__default, { ReactNode, HTMLAttributes, MouseEvent, CSSProperties, ComponentType, Key, ReactElement, UIEventHandler, Ref } from 'react';
14
15
  import { L as LgSize } from './index-B5SLxsZP.mjs';
15
16
  export { a as LgShape, b as LgVariant } from './index-B5SLxsZP.mjs';
16
17
  import { SvgIconProps } from 'lingee-icon';
18
+ export { Tree, TreeAllowDropOptions, TreeCheckInfo, TreeDropInfo, TreeExpandAction, TreeExpandInfo, TreeFieldNames, TreeIndentGuide, TreeNodeData, TreeNodeState, TreeProps, TreeSelectInfo, TreeSize } from './tree/index.mjs';
17
19
  import { FormInstance as FormInstance$1, Rule } from 'rc-field-form/es/interface';
18
20
  export { Rule } from 'rc-field-form/es/interface';
19
21
  import { ClassValue } from 'clsx';
20
22
  import 'class-variance-authority/types';
21
23
 
24
+ interface EllipsisTooltipProps extends Omit<TooltipProps, "children" | "content" | "open" | "onOpenChange" | "container"> {
25
+ /** 提示内容。通常与 children 相同,为空时不弹出 */
26
+ content?: ReactNode;
27
+ children?: ReactNode;
28
+ /**
29
+ * 容器标签。默认 span —— 可安全嵌入 button 等仅接受
30
+ * phrasing content 的元素内
31
+ */
32
+ as?: "span" | "div";
33
+ /**
34
+ * 是否自带单行省略样式,默认 true。
35
+ * 关闭后省略表现由消费方的 className 决定(如多行截断场景)
36
+ */
37
+ ellipsis?: boolean;
38
+ /**
39
+ * 触发阈值(0~1)。文本宽度超过 `容器宽度 × threshold` 时弹出,
40
+ * 默认 1 即真正溢出才弹。调小可在接近溢出时提前提示
41
+ */
42
+ threshold?: number;
43
+ /**
44
+ * 提示内容的最大字符数,超出截断并追加省略号,默认 2000。
45
+ * 超长文本会让提示浮层占据过大空间
46
+ */
47
+ maxLength?: number;
48
+ /**
49
+ * 祖先容器的 className。传入后提示浮层的最大宽度对齐该祖先宽度,
50
+ * 用于让提示不超出所在卡片/胶囊的视觉边界
51
+ */
52
+ anchorClassName?: string;
53
+ /**
54
+ * 浮层挂载容器。接收触发节点并返回容器 ——
55
+ * 用于在 overflow 裁剪的滚动容器内就地挂载
56
+ */
57
+ getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
58
+ className?: string;
59
+ style?: CSSProperties;
60
+ }
61
+
62
+ /**
63
+ * EllipsisTooltip 省略提示
64
+ *
65
+ * 仅在文本真正被截断时才弹出提示 —— 无条件挂 Tooltip 会让未截断的文本
66
+ * 也弹出重复内容,形成干扰。
67
+ *
68
+ * 用受控 open 而非 Tooltip 的 disabled:disabled 时 Radix Root 不渲染,
69
+ * onOpenChange 不触发,就拿不到 hover 这个测量时机。
70
+ */
71
+ declare const EllipsisTooltip: React__default.ForwardRefExoticComponent<EllipsisTooltipProps & React__default.RefAttributes<HTMLElement>>;
72
+
22
73
  /**
23
74
  * 中文语言包(默认语言)
24
75
  * 按组件名为 key 组织翻译文案
@@ -38,6 +89,9 @@ declare const zhCN: {
38
89
  };
39
90
  Dropdown: {
40
91
  clear: string;
92
+ loading: string;
93
+ loadError: string;
94
+ empty: string;
41
95
  };
42
96
  Tabs: {
43
97
  scrollLeft: string;
@@ -88,6 +142,9 @@ declare const zhCN: {
88
142
  Table: {
89
143
  empty: string;
90
144
  };
145
+ Tree: {
146
+ empty: string;
147
+ };
91
148
  Pagination: {
92
149
  total: string;
93
150
  prevPage: string;
@@ -144,6 +201,9 @@ declare const enUS: {
144
201
  };
145
202
  Dropdown: {
146
203
  clear: string;
204
+ loading: string;
205
+ loadError: string;
206
+ empty: string;
147
207
  };
148
208
  Tabs: {
149
209
  scrollLeft: string;
@@ -192,6 +252,9 @@ declare const enUS: {
192
252
  Table: {
193
253
  empty: string;
194
254
  };
255
+ Tree: {
256
+ empty: string;
257
+ };
195
258
  Pagination: {
196
259
  total: string;
197
260
  prevPage: string;
@@ -504,6 +567,23 @@ interface DropdownLabelData {
504
567
  }
505
568
  /** items 快捷模式的数据项类型 */
506
569
  type DropdownItemData = DropdownMenuItemData | DropdownSeparatorData | DropdownLabelData;
570
+ /** 面板三态。与 Empty.Card 的 status 同名同义 */
571
+ type DropdownStatusType = "loading" | "empty" | "error";
572
+ /** 三态文案覆盖。未提供的键回落到 locale 内置文案 */
573
+ interface DropdownStatusText {
574
+ loading?: ReactNode;
575
+ empty?: ReactNode;
576
+ error?: ReactNode;
577
+ }
578
+ interface DropdownStatusProps {
579
+ status: DropdownStatusType;
580
+ /** 覆盖该状态的默认文案 */
581
+ description?: ReactNode;
582
+ /** 重试回调。仅 status="error" 时生效,传入后占位整体可点击 */
583
+ onRetry?: () => void;
584
+ /** 额外类名 */
585
+ className?: string;
586
+ }
507
587
  interface DropdownProps {
508
588
  /** 子元素(Trigger + Content),或仅 Trigger 元素(配合 items 快捷模式) */
509
589
  children: ReactNode;
@@ -526,11 +606,22 @@ interface DropdownProps {
526
606
  contentProps?: Omit<DropdownContentProps, "children">;
527
607
  /** 当前选中的 item key 列表,匹配的项会显示勾选图标 */
528
608
  selectedKeys?: string[];
529
- /** 加载中状态,为 true 时显示 loadingContent 或默认 loading */
609
+ /** 加载中状态,为 true 时面板显示加载占位 */
530
610
  loading?: boolean;
531
- /** 自定义加载中渲染内容 */
611
+ /**
612
+ * 加载失败状态,为 true 时面板显示失败占位。
613
+ * 优先级低于 loading(重试期间应展示加载中而非上一次的失败)
614
+ */
615
+ loadError?: boolean;
616
+ /** 加载失败时的重试回调,传入后失败占位整体可点击 */
617
+ onRetry?: () => void;
618
+ /** 覆盖三态占位的默认文案,未传的键走 locale 内置文案 */
619
+ statusText?: DropdownStatusText;
620
+ /** 自定义加载中渲染内容,覆盖默认占位 */
532
621
  loadingContent?: ReactNode;
533
- /** 自定义空态渲染内容(items 为空数组且非 loading 时显示) */
622
+ /** 自定义失败渲染内容,覆盖默认占位 */
623
+ errorContent?: ReactNode;
624
+ /** 自定义空态渲染内容(items 为空数组且非 loading / loadError 时显示) */
534
625
  emptyContent?: ReactNode;
535
626
  /**
536
627
  * 自定义面板渲染,参数 menu 为默认渲染的菜单项列表
@@ -564,6 +655,13 @@ interface DropdownContentProps extends Pick<PopoverContentProps, "side" | "align
564
655
  footer?: ReactNode;
565
656
  /** 隐藏面板默认描边,默认 false(显示描边) */
566
657
  borderless?: boolean;
658
+ /**
659
+ * 打开面板时是否聚焦第一个菜单项
660
+ * 不传时按输入模态自动判断:键盘(Enter / Space / Tab / 方向键)打开则聚焦首项,
661
+ * 鼠标点击打开则把焦点留在菜单容器上,避免首项呈现 hover 态
662
+ * 仅在需要强制某一行为时显式传值
663
+ */
664
+ autoFocusFirstItem?: boolean;
567
665
  }
568
666
  interface DropdownItemProps {
569
667
  /** 菜单项内容 */
@@ -650,6 +748,11 @@ interface DropdownSubTriggerProps {
650
748
  disabled?: boolean;
651
749
  /** 前置图标 */
652
750
  icon?: ReactNode;
751
+ /**
752
+ * 鼠标进入回调,在组件内部展开子菜单的逻辑之后执行。
753
+ * 用于「展开时才拉取数据」这类懒加载场景
754
+ */
755
+ onMouseEnter?: React__default.MouseEventHandler<HTMLDivElement>;
653
756
  }
654
757
  interface DropdownSubContentProps extends Pick<PopoverContentProps, "side" | "align" | "sideOffset" | "alignOffset" | "className" | "collisionPadding" | "container"> {
655
758
  /** 子菜单面板内容 */
@@ -694,7 +797,7 @@ interface DropdownButtonProps extends Omit<React__default.ButtonHTMLAttributes<H
694
797
 
695
798
  declare const DropdownButton: React__default.ForwardRefExoticComponent<DropdownButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
696
799
 
697
- declare function Dropdown({ children, open, defaultOpen, onOpenChange, modal, disabled, items, contentProps, selectedKeys, loading, loadingContent, emptyContent, dropdownRender, header, footer, }: DropdownProps): react_jsx_runtime.JSX.Element;
800
+ declare function Dropdown({ children, open, defaultOpen, onOpenChange, modal, disabled, items, contentProps, selectedKeys, loading, loadError, onRetry, statusText, loadingContent, errorContent, emptyContent, dropdownRender, header, footer, }: DropdownProps): react_jsx_runtime.JSX.Element;
698
801
  declare namespace Dropdown {
699
802
  var displayName: string;
700
803
  }
@@ -715,6 +818,21 @@ declare function DropdownSeparator({ className }: DropdownSeparatorProps): react
715
818
  declare namespace DropdownSeparator {
716
819
  var displayName: string;
717
820
  }
821
+ /**
822
+ * 面板内的加载 / 空 / 失败占位。
823
+ *
824
+ * 复用 Empty.Card 的默认块级形态(variant="block" + spacing="normal"):
825
+ * 三态共用同一 min-height,面板在「加载中 → 有数据 / 空 / 失败」之间
826
+ * 切换时高度不变。不要压 spacing —— 去掉留白后图标与文字紧贴,
827
+ * 看起来会像行内轻量提示而非块级占位。
828
+ *
829
+ * 文案不内置在 Empty.Card 层,改由此处从 locale 取默认值,
830
+ * 消费方通过 description 覆盖,这样多语言无需每个调用点重复传参。
831
+ */
832
+ declare function DropdownStatus({ status, description, onRetry, className }: DropdownStatusProps): react_jsx_runtime.JSX.Element;
833
+ declare namespace DropdownStatus {
834
+ var displayName: string;
835
+ }
718
836
  declare function DropdownGroup({ children }: DropdownGroupProps): react_jsx_runtime.JSX.Element;
719
837
  declare namespace DropdownGroup {
720
838
  var displayName: string;
@@ -1087,17 +1205,276 @@ interface EmptyProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1087
1205
  /** 自定义内联样式 */
1088
1206
  style?: CSSProperties;
1089
1207
  }
1208
+ /**
1209
+ * 卡片占位状态。
1210
+ * - loading: 加载中,默认旋转的 LoaderCircle
1211
+ * - empty: 加载结束无数据,默认 Inbox
1212
+ * - error: 加载结束失败,默认 ExclamationCircle
1213
+ */
1214
+ type EmptyCardStatus = "loading" | "empty" | "error";
1215
+ /**
1216
+ * 布局形态。
1217
+ * - block: 块级居中,用于区块级占位
1218
+ * - inline: 行内小字,用于「加载更多」这类轻量提示
1219
+ */
1220
+ type EmptyCardVariant = "block" | "inline";
1221
+ /** 上下留白档位 */
1222
+ type EmptyCardSpacing = "none" | "normal" | "loose";
1223
+ interface EmptyCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "onClick"> {
1224
+ status: EmptyCardStatus;
1225
+ /** 描述文案。组件不内置文案,由消费方传入 */
1226
+ description: ReactNode;
1227
+ /** 覆盖默认图标;传 null 则不渲染图标 */
1228
+ icon?: ReactNode | null;
1229
+ variant?: EmptyCardVariant;
1230
+ spacing?: EmptyCardSpacing;
1231
+ /** 重试回调。仅 status="error" 时生效,传入后整体渲染为可点击按钮 */
1232
+ onRetry?: () => void;
1233
+ className?: string;
1234
+ style?: CSSProperties;
1235
+ }
1090
1236
 
1091
1237
  /**
1092
- * Empty 空状态组件
1093
- * 支持 lg / md / sm 三种尺寸,覆盖搜索无结果、加载中、加载失败等场景
1238
+ * Empty.Card — 等高三态占位
1094
1239
  *
1095
- * icon 支持三种传法:
1096
- * 1. lingee-icon 组件(如 Search)→ 自动注入 size + fill 渐变
1097
- * 2. 传 ReactNode → 完全自定义渲染(加载中旋转等行为随图标一起传入自行处理)
1098
- * 3. 不传 → 使用默认图标(带渐变)
1240
+ * 统一「加载中 / 加载结束空 / 加载结束失败」三态:图标 + 文案横向排列,
1241
+ * 同一 spacing 档位下三态 min-height 一致,状态切换时容器高度不变,
1242
+ * 避免列表或卡片区域跳动。
1243
+ *
1244
+ * 收敛为单组件的原因:这类占位在列表与折叠区块内散落出现十余处,
1245
+ * 各处自行拼装会导致图标尺寸、间距、灰度层层漂移。
1246
+ */
1247
+ declare const EmptyCard: React__default.ForwardRefExoticComponent<EmptyCardProps & React__default.RefAttributes<HTMLDivElement>>;
1248
+
1249
+ /**
1250
+ * Empty 复合组件。
1251
+ *
1252
+ * 用 Object.assign 而非对象字面量挂载子组件:
1253
+ * 保留 EmptyRoot 的 forwardRef 类型,使 <Empty ref={...} /> 仍可直接使用。
1099
1254
  */
1100
- declare const Empty: React__default.ForwardRefExoticComponent<EmptyProps & React__default.RefAttributes<HTMLDivElement>>;
1255
+ declare const Empty: React__default.ForwardRefExoticComponent<EmptyProps & React__default.RefAttributes<HTMLDivElement>> & {
1256
+ Card: React__default.ForwardRefExoticComponent<EmptyCardProps & React__default.RefAttributes<HTMLDivElement>>;
1257
+ };
1258
+
1259
+ /** 附件/截图元信息 */
1260
+ interface FeedbackAttachment {
1261
+ name: string;
1262
+ /** 文件大小(字节) */
1263
+ size?: number;
1264
+ /** 访问 URL(图片用于预览,附件用于下载) */
1265
+ url?: string;
1266
+ /** 是否图片:图片走缩略图预览,其余走附件卡片 */
1267
+ isImage?: boolean;
1268
+ /** MIME 或扩展名,用于取附件图标 */
1269
+ fileType?: string;
1270
+ }
1271
+ /** 反馈处理状态 */
1272
+ type FeedbackStatus = "pending" | "replied";
1273
+ /** 历史列表项 */
1274
+ interface FeedbackHistoryItem {
1275
+ id: string;
1276
+ title: string;
1277
+ status: FeedbackStatus;
1278
+ /**
1279
+ * 回复已读态。false = 有未读回复(画红点);true = 已读;
1280
+ * null/undefined = 未回复或后端未上线 —— 三态必须区分,
1281
+ * 否则未回复的工单会全部亮红点
1282
+ */
1283
+ replyRead?: boolean | null;
1284
+ }
1285
+ /** 官方回复 */
1286
+ interface FeedbackReply {
1287
+ replyContent?: string;
1288
+ attachments?: FeedbackAttachment[];
1289
+ }
1290
+ /** 相似问题 */
1291
+ interface FeedbackSimilarItem {
1292
+ id: string;
1293
+ title: string;
1294
+ description?: string;
1295
+ voteCount: number;
1296
+ voted?: boolean;
1297
+ attachments?: FeedbackAttachment[];
1298
+ }
1299
+ /** 历史详情 */
1300
+ interface FeedbackHistoryDetail {
1301
+ id: string;
1302
+ description: string;
1303
+ images?: FeedbackAttachment[];
1304
+ attachments?: FeedbackAttachment[];
1305
+ /** 是否允许读取当前对话信息,为真时展示告知卡片 */
1306
+ allowSessionView?: boolean;
1307
+ reply?: FeedbackReply;
1308
+ /** 详情响应携带的是查看前的旧值,据此高亮「新回复」 */
1309
+ replyRead?: boolean | null;
1310
+ similar?: FeedbackSimilarItem[];
1311
+ }
1312
+ type FeedbackTabKey = "submit" | "history";
1313
+ interface SidebarFeedbackModalProps {
1314
+ open: boolean;
1315
+ /** 关闭请求。遮罩点击已禁用,仅右上角关闭按钮与取消触发 */
1316
+ onClose: () => void;
1317
+ activeTab: FeedbackTabKey;
1318
+ onTabChange: (key: FeedbackTabKey) => void;
1319
+ /** 提交页签文案 */
1320
+ submitTabLabel: ReactNode;
1321
+ /** 历史页签文案 */
1322
+ historyTabLabel: ReactNode;
1323
+ /** 历史页签是否显示未读红点 */
1324
+ historyUnread?: boolean;
1325
+ /** 关闭按钮无障碍标签 */
1326
+ closeLabel?: string;
1327
+ /** 提交面板内容 */
1328
+ submitPanel?: ReactNode;
1329
+ /**
1330
+ * 历史面板内容。
1331
+ * 首次切到历史页签后才挂载,避免无谓请求 —— 由消费方控制传入时机
1332
+ */
1333
+ historyPanel?: ReactNode;
1334
+ className?: string;
1335
+ style?: CSSProperties;
1336
+ }
1337
+ interface SidebarFeedbackSubmitPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1338
+ /** 顶部提示条(会话内打开时的说明),传 null 不渲染 */
1339
+ notice?: ReactNode;
1340
+ /** 表单区内容:由 FeedbackField 组合 */
1341
+ children?: ReactNode;
1342
+ /** 底部按钮区 */
1343
+ footer?: ReactNode;
1344
+ /** 拖拽悬停态,驱动上传区高亮 */
1345
+ dragOver?: boolean;
1346
+ className?: string;
1347
+ style?: CSSProperties;
1348
+ }
1349
+ /** 表单字段容器 */
1350
+ interface SidebarFeedbackFieldProps extends HTMLAttributes<HTMLDivElement> {
1351
+ label?: ReactNode;
1352
+ /** 显示必填星号 */
1353
+ required?: boolean;
1354
+ /** 标签行右侧插槽(如横向翻页箭头) */
1355
+ labelExtra?: ReactNode;
1356
+ /** 字段下方灰色提示 */
1357
+ hint?: ReactNode;
1358
+ children?: ReactNode;
1359
+ className?: string;
1360
+ style?: CSSProperties;
1361
+ }
1362
+ /** 文件墙条目 */
1363
+ interface FeedbackFileWallItem {
1364
+ uid: string;
1365
+ /** 图片走缩略图、附件走图标卡片 */
1366
+ kind: "image" | "attachment";
1367
+ name: string;
1368
+ size?: number;
1369
+ /** 图片预览地址 */
1370
+ url?: string;
1371
+ /** 附件图标地址 */
1372
+ iconUrl?: string;
1373
+ }
1374
+ interface SidebarFeedbackFileWallProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1375
+ items: FeedbackFileWallItem[];
1376
+ /** 移除某项 */
1377
+ onRemove?: (uid: string) => void;
1378
+ /** 点击图片,用于外部预览 */
1379
+ onPreview?: (uid: string) => void;
1380
+ /** 是否显示「截图中」占位卡 */
1381
+ capturing?: boolean;
1382
+ /** 截图中文案 */
1383
+ capturingText?: ReactNode;
1384
+ /** 尾部添加区(通常是 Upload 触发器),达到数量上限时消费方不传 */
1385
+ addSlot?: ReactNode;
1386
+ /** 大小格式化,默认按 B/KB/MB 输出 */
1387
+ formatSize?: (bytes: number) => string;
1388
+ className?: string;
1389
+ style?: CSSProperties;
1390
+ }
1391
+ interface SidebarFeedbackHistoryPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1392
+ /** 左栏顶部工具区(搜索框) */
1393
+ toolbar?: ReactNode;
1394
+ /** 左栏列表内容 */
1395
+ list?: ReactNode;
1396
+ /** 右栏详情内容 */
1397
+ detail?: ReactNode;
1398
+ /** 列表滚动容器 ref,供无限滚动挂载 */
1399
+ listRef?: React.Ref<HTMLDivElement>;
1400
+ className?: string;
1401
+ style?: CSSProperties;
1402
+ }
1403
+ interface SidebarFeedbackHistoryItemProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onSelect"> {
1404
+ item: FeedbackHistoryItem;
1405
+ selected?: boolean;
1406
+ onSelect?: () => void;
1407
+ /** 状态标签文案,由消费方按 status 提供 */
1408
+ statusLabel: ReactNode;
1409
+ /** 时间/关注数等元信息 */
1410
+ meta?: ReactNode;
1411
+ /** 未读红点无障碍标签 */
1412
+ unreadLabel?: string;
1413
+ className?: string;
1414
+ style?: CSSProperties;
1415
+ }
1416
+ interface SidebarFeedbackDetailProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "title"> {
1417
+ /** 标题(固定为「反馈描述」这类静态文案,由消费方传入) */
1418
+ title: ReactNode;
1419
+ /** 标题下方元信息 */
1420
+ meta?: ReactNode;
1421
+ /** 反馈描述正文 */
1422
+ description?: ReactNode;
1423
+ /** 描述下方的附件区,通常是 FeedbackAttachmentRow */
1424
+ attachments?: ReactNode;
1425
+ attachmentsLabel?: ReactNode;
1426
+ /** 「已允许读取对话」告知卡片 */
1427
+ notice?: {
1428
+ title: ReactNode;
1429
+ description: ReactNode;
1430
+ } | null;
1431
+ /** 官方回复区 */
1432
+ reply?: ReactNode;
1433
+ /** 相似问题区 */
1434
+ similar?: ReactNode;
1435
+ className?: string;
1436
+ style?: CSSProperties;
1437
+ }
1438
+ interface SidebarFeedbackAttachmentRowProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1439
+ items: FeedbackAttachment[];
1440
+ /** 点击图片:回传本组图片 URL 列表与命中索引,供预览组左右切换 */
1441
+ onPreviewImage?: (urls: string[], index: number) => void;
1442
+ /** 点击附件(下载) */
1443
+ onDownload?: (item: FeedbackAttachment) => void;
1444
+ /** 取附件图标地址 */
1445
+ resolveIcon?: (item: FeedbackAttachment) => string | undefined;
1446
+ formatSize?: (bytes: number) => string;
1447
+ className?: string;
1448
+ style?: CSSProperties;
1449
+ }
1450
+ interface SidebarFeedbackSimilarItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1451
+ item: FeedbackSimilarItem;
1452
+ /** 展开态。为空时组件自行维护(默认按是否有描述决定) */
1453
+ expanded?: boolean;
1454
+ onExpandedChange?: (next: boolean) => void;
1455
+ /** 赞同点击。已赞同时组件不再触发 */
1456
+ onVote?: () => void;
1457
+ voteLabel: ReactNode;
1458
+ /** 展开区内的附件区 */
1459
+ attachments?: ReactNode;
1460
+ attachmentsLabel?: ReactNode;
1461
+ className?: string;
1462
+ style?: CSSProperties;
1463
+ }
1464
+ interface SidebarAuthImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "onClick" | "onLoad" | "src"> {
1465
+ src?: string;
1466
+ /**
1467
+ * 鉴权 token,拼为 `Authorization: Bearer {token}`。
1468
+ * 由消费方注入 —— 组件库不读取任何运行环境
1469
+ */
1470
+ token?: string;
1471
+ /** 额外请求头,与 token 合并(同名时以此为准) */
1472
+ headers?: Record<string, string>;
1473
+ /** 加载完成,回传 blob URL 供父组件收集用于预览 */
1474
+ onLoaded?: (blobUrl: string) => void;
1475
+ /** 点击图片,回传已加载的 blob URL */
1476
+ onImageClick?: (blobUrl: string) => void;
1477
+ }
1101
1478
 
1102
1479
  interface SidebarRootProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1103
1480
  /** 展开宽度(px),默认 280 */
@@ -1208,12 +1585,20 @@ interface SidebarListItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "tit
1208
1585
  className?: string;
1209
1586
  style?: CSSProperties;
1210
1587
  }
1588
+ /**
1589
+ * 箭头位置。
1590
+ * - title: 紧跟标题之后(文件夹节点用法,标题短时箭头也靠左)
1591
+ * - end: 恒在行尾(定时任务分组用法)
1592
+ */
1593
+ type SidebarCaretPlacement = "title" | "end";
1211
1594
  interface SidebarCollapsibleListItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
1212
1595
  /** 头部左侧图标。需随展开态切换图标时由消费方自行传入对应图标 */
1213
1596
  icon?: ReactNode;
1214
1597
  title: ReactNode;
1215
1598
  expanded?: boolean;
1216
1599
  onToggle?: () => void;
1600
+ /** 箭头位置,默认 title(紧跟标题) */
1601
+ caretPlacement?: SidebarCaretPlacement;
1217
1602
  /** 头部悬停操作区插槽 */
1218
1603
  actions?: ReactNode;
1219
1604
  /** 操作区常显。菜单打开时置 true,避免指针移出后按钮消失 */
@@ -1228,35 +1613,7 @@ interface SidebarCollapsibleListItemProps extends Omit<HTMLAttributes<HTMLDivEle
1228
1613
  className?: string;
1229
1614
  style?: CSSProperties;
1230
1615
  }
1231
- /**
1232
- * 占位状态。
1233
- * - loading: 加载中,默认旋转的 LoaderCircle
1234
- * - empty: 无数据,默认 Inbox
1235
- * - error: 加载失败,默认 ExclamationCircle
1236
- */
1237
- type SidebarSkeletonItemStatus = "loading" | "empty" | "error";
1238
- /**
1239
- * 布局形态。
1240
- * - block: 块级居中,用于区块级占位
1241
- * - inline: 行内小字,用于「加载更多」这类轻量提示
1242
- */
1243
- type SidebarSkeletonItemVariant = "block" | "inline";
1244
- /** 上下留白档位 */
1245
- type SidebarSkeletonItemSpacing = "none" | "normal" | "loose";
1246
- interface SidebarSkeletonItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "onClick"> {
1247
- status: SidebarSkeletonItemStatus;
1248
- /** 提示文案。组件不内置文案,由消费方传入 */
1249
- text: ReactNode;
1250
- /** 覆盖默认图标;传 null 则不渲染图标 */
1251
- icon?: ReactNode | null;
1252
- variant?: SidebarSkeletonItemVariant;
1253
- spacing?: SidebarSkeletonItemSpacing;
1254
- /** 重试回调。仅 status="error" 时生效,传入后整体渲染为可点击按钮 */
1255
- onRetry?: () => void;
1256
- className?: string;
1257
- style?: CSSProperties;
1258
- }
1259
- interface SidebarFooterProps extends HTMLAttributes<HTMLDivElement> {
1616
+ interface SidebarFooterUserProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1260
1617
  /** 头像插槽 */
1261
1618
  avatar?: ReactNode;
1262
1619
  /** 名称,为空时不渲染身份区 */
@@ -1265,10 +1622,93 @@ interface SidebarFooterProps extends HTMLAttributes<HTMLDivElement> {
1265
1622
  nameSuffix?: ReactNode;
1266
1623
  /** 用户菜单展开态,驱动触发区高亮与箭头旋转 */
1267
1624
  menuOpen?: boolean;
1625
+ /**
1626
+ * 是否显示展开箭头。默认 false —— 触发区整体可点,
1627
+ * 箭头属冗余提示。需要显式指示可展开时开启。
1628
+ *
1629
+ * 开启后:常态隐藏,hover 或菜单打开时显现;
1630
+ * 菜单向上弹出,故默认指向上方,展开后转回向下
1631
+ */
1632
+ showCaret?: boolean;
1633
+ /**
1634
+ * 姓名超长时是否 hover 出全称提示,默认 true。
1635
+ * 仅在真正溢出时弹出,未溢出不干扰
1636
+ */
1637
+ nameTooltip?: boolean;
1268
1638
  /** 点击触发区。回传触发元素的 DOMRect,便于消费方自行定位浮层 */
1269
1639
  onTriggerClick?: (rect: DOMRect) => void;
1640
+ className?: string;
1641
+ style?: CSSProperties;
1642
+ }
1643
+ interface SidebarFooterProps extends Omit<HTMLAttributes<HTMLDivElement>, "children">, SidebarFooterUserProps {
1270
1644
  /** 右侧动作区插槽 */
1271
1645
  actions?: ReactNode;
1646
+ /**
1647
+ * 自定义左侧内容,传入时忽略 avatar/name 等。
1648
+ *
1649
+ * 需要外挂用户菜单时用它 —— 把 Sidebar.FooterUser 交给 DropdownTrigger
1650
+ * 单独包裹,避免右侧动作按钮被并入菜单触发区
1651
+ */
1652
+ children?: ReactNode;
1653
+ }
1654
+ interface SidebarFooterMenuStaticRowProps extends HTMLAttributes<HTMLDivElement> {
1655
+ /** 行首图标 */
1656
+ icon?: ReactNode;
1657
+ children?: ReactNode;
1658
+ className?: string;
1659
+ style?: CSSProperties;
1660
+ }
1661
+ interface SidebarFooterBadgeProps extends HTMLAttributes<HTMLSpanElement> {
1662
+ /** 是否显示未读红点 */
1663
+ dot?: boolean;
1664
+ /** 被包裹的按钮 */
1665
+ children?: ReactNode;
1666
+ className?: string;
1667
+ style?: CSSProperties;
1668
+ }
1669
+ /**
1670
+ * 用量色阶。
1671
+ * - normal: 正常
1672
+ * - warning: 已用 85% 以上
1673
+ * - exhausted: 已用满
1674
+ */
1675
+ type SidebarUsageTone = "normal" | "warning" | "exhausted";
1676
+ interface SidebarUsageBarProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1677
+ /** 已用量 */
1678
+ used: number;
1679
+ /** 总量。为 0 或负数时视为无额度,进度为 0 */
1680
+ total: number;
1681
+ /**
1682
+ * 数字格式化。千分位与小数位依赖语言环境,
1683
+ * 组件库不持有 locale,故由消费方注入
1684
+ */
1685
+ formatNumber?: (n: number) => string;
1686
+ /** 总量后缀,如「(60%)」 */
1687
+ percentSuffix?: ReactNode;
1688
+ /** 剩余量前缀,如「剩余 」 */
1689
+ remainingPrefix?: ReactNode;
1690
+ /** 进度条无障碍标签 */
1691
+ ariaLabel?: string;
1692
+ className?: string;
1693
+ style?: CSSProperties;
1694
+ }
1695
+ interface SidebarUsagePanelProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
1696
+ /** 面板标题 */
1697
+ title?: ReactNode;
1698
+ /** 加载态,展示骨架屏 */
1699
+ loading?: boolean;
1700
+ /** 各额度分区 */
1701
+ children?: ReactNode;
1702
+ className?: string;
1703
+ style?: CSSProperties;
1704
+ }
1705
+ interface SidebarUsagePanelSectionProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
1706
+ /** 分区标题 */
1707
+ title: ReactNode;
1708
+ /** 标题行右侧附加信息,如到期日 */
1709
+ extra?: ReactNode;
1710
+ /** 分区内容,通常是一个 UsageBar */
1711
+ children?: ReactNode;
1272
1712
  className?: string;
1273
1713
  style?: CSSProperties;
1274
1714
  }
@@ -1353,27 +1793,165 @@ declare const SidebarListItem: React__default.ForwardRefExoticComponent<SidebarL
1353
1793
  declare const SidebarCollapsibleListItem: React__default.ForwardRefExoticComponent<SidebarCollapsibleListItemProps & React__default.RefAttributes<HTMLDivElement>>;
1354
1794
 
1355
1795
  /**
1356
- * Sidebar.SkeletonItem列表占位项
1796
+ * Sidebar.FooterUser底栏左侧用户区(头像 + 名称 + 后缀徽标 + 展开箭头)
1357
1797
  *
1358
- * 统一「加载中 / 无数据 / 加载失败」三态:图标 + 文案横向排列,
1359
- * 三态间仅图标与文案不同。
1798
+ * 单独成件而非塞进 Footer:用户菜单的 DropdownTrigger 必须只包裹这里,
1799
+ * 若包住整个 Footer,右侧动作按钮也会成为触发器的一部分,
1800
+ * 点「反馈」「产物管理」时会连带弹出用户菜单。
1360
1801
  *
1361
- * 收敛为单组件的原因:这类占位在列表与折叠区块内散落出现十余处,
1362
- * 各处自行拼装会导致图标尺寸、间距、灰度层层漂移。
1802
+ * 用 div + role 而非 button:作为 Dropdown trigger 时嵌套 button 是非法结构。
1363
1803
  */
1364
- declare const SidebarSkeletonItem: React__default.ForwardRefExoticComponent<SidebarSkeletonItemProps & React__default.RefAttributes<HTMLDivElement>>;
1365
-
1804
+ declare const SidebarFooterUser: React__default.ForwardRefExoticComponent<SidebarFooterUserProps & React__default.RefAttributes<HTMLDivElement>>;
1366
1805
  /**
1367
- * Sidebar.Footer — 底部用户信息条
1806
+ * Sidebar.Footer — 底部条容器
1368
1807
  *
1369
- * 只收敛「头像 + 名称 + 后缀徽标 + 展开箭头 + 动作区」骨架,
1370
- * 用户菜单与动作按钮均以插槽传入 —— 各业务的菜单项集合差异极大。
1808
+ * 一行左右结构:左侧 FooterUser 占满剩余宽度,右侧动作区靠右贴边。
1371
1809
  *
1372
- * onTriggerClick 回传 DOMRect:部分消费方的浮层需要手动定位,
1373
- * 只给事件对象不足以定位。
1810
+ * 两种用法:
1811
+ * - 传 avatar/name 等:内部自行渲染 FooterUser(无需外挂菜单时最省事)
1812
+ * - 传 children:完全自定义左侧内容,用于把 FooterUser 单独交给
1813
+ * DropdownTrigger 包裹,使动作按钮不被并入菜单触发区
1374
1814
  */
1375
1815
  declare const SidebarFooter: React__default.ForwardRefExoticComponent<SidebarFooterProps & React__default.RefAttributes<HTMLDivElement>>;
1376
1816
 
1817
+ /**
1818
+ * Sidebar.FooterMenuStaticRow — 底栏菜单中的静态信息行
1819
+ *
1820
+ * 与 DropdownItem 尺寸一致但不可点击,用于「当前租户」这类只读信息 ——
1821
+ * 同一位置在可切换时渲染为二级菜单、不可切换时渲染为此行,
1822
+ * 两种形态必须等高等距,否则菜单会在两种状态间跳动。
1823
+ */
1824
+ declare const SidebarFooterMenuStaticRow: React__default.ForwardRefExoticComponent<SidebarFooterMenuStaticRowProps & React__default.RefAttributes<HTMLDivElement>>;
1825
+
1826
+ /**
1827
+ * Sidebar.FooterBadge — 底栏动作按钮的未读角标
1828
+ *
1829
+ * 包裹按钮而非改按钮自身:角标绝对定位不占位,
1830
+ * 否则会撑开按钮尺寸导致底栏其余元素位移。
1831
+ */
1832
+ declare const SidebarFooterBadge: React__default.ForwardRefExoticComponent<SidebarFooterBadgeProps & React__default.RefAttributes<HTMLSpanElement>>;
1833
+
1834
+ /**
1835
+ * Sidebar.UsageBar — 分段式用量条
1836
+ *
1837
+ * 用离散色块而非连续条:额度类数据的观感需要「格子」的计量意味,
1838
+ * 连续进度条更像任务进度。
1839
+ *
1840
+ * 数字格式化交由消费方通过 formatNumber 注入 —— 千分位与小数位
1841
+ * 依赖当前语言环境,组件库不持有 locale。
1842
+ */
1843
+ declare const SidebarUsageBar: React__default.ForwardRefExoticComponent<SidebarUsageBarProps & React__default.RefAttributes<HTMLDivElement>>;
1844
+
1845
+ /**
1846
+ * Sidebar.UsagePanel — 用量面板
1847
+ *
1848
+ * 用于底栏菜单的二级浮层(如「点数用量」)。只负责骨架与加载骨架屏,
1849
+ * 各额度分区由消费方以 UsagePanel.Section + UsageBar 组合。
1850
+ *
1851
+ * 作为 DropdownSubContent 的内容使用时,需消掉外层浮层自带的
1852
+ * 边框与阴影,避免双层描边(见 README)。
1853
+ */
1854
+ declare const SidebarUsagePanel: React__default.ForwardRefExoticComponent<SidebarUsagePanelProps & React__default.RefAttributes<HTMLDivElement>>;
1855
+ /**
1856
+ * Sidebar.UsagePanelSection — 用量面板中的一个额度分区
1857
+ *
1858
+ * 标题行左侧为分区名、右侧为附加信息(如到期日),下方放 UsageBar。
1859
+ */
1860
+ declare const SidebarUsagePanelSection: React__default.ForwardRefExoticComponent<SidebarUsagePanelSectionProps & React__default.RefAttributes<HTMLDivElement>>;
1861
+
1862
+ /**
1863
+ * Sidebar.FeedbackModal — 问题反馈弹窗骨架
1864
+ *
1865
+ * 只负责「弹窗 + 双页签 + 未读红点 + 关闭」这层外壳,
1866
+ * 两个面板内容由消费方注入 —— 取数、提交、截图能力各端差异极大。
1867
+ *
1868
+ * 历史面板建议首次切换后才传入,避免未打开就发请求。
1869
+ */
1870
+ declare const SidebarFeedbackModal: React__default.ForwardRefExoticComponent<SidebarFeedbackModalProps & React__default.RefAttributes<HTMLDivElement>>;
1871
+
1872
+ /**
1873
+ * Sidebar.FeedbackSubmitPanel — 提交反馈面板
1874
+ *
1875
+ * 内容区滚动、底部按钮固定。拖拽事件由消费方挂在本组件上
1876
+ * (需要访问 dataTransfer 做文件校验,组件库不介入)。
1877
+ */
1878
+ declare const SidebarFeedbackSubmitPanel: React__default.ForwardRefExoticComponent<SidebarFeedbackSubmitPanelProps & React__default.RefAttributes<HTMLDivElement>>;
1879
+ /**
1880
+ * Sidebar.FeedbackField — 表单字段容器
1881
+ *
1882
+ * 统一「标签 + 必填星号 + 右侧插槽 + 控件 + 提示」的间距,
1883
+ * 避免每个字段各写一遍 margin。
1884
+ */
1885
+ declare const SidebarFeedbackField: React__default.ForwardRefExoticComponent<SidebarFeedbackFieldProps & React__default.RefAttributes<HTMLDivElement>>;
1886
+
1887
+ /**
1888
+ * Sidebar.FeedbackFileWall — 横向文件墙
1889
+ *
1890
+ * 图片走缩略图、附件走图标卡片,两者同尺寸同排展示。
1891
+ * 超出宽度时内部横向滚动而非撑破弹窗,翻页箭头由消费方放在
1892
+ * FeedbackField 的 labelExtra 插槽(需要读滚动状态,故不内置)。
1893
+ *
1894
+ * 只负责展示与移除;添加动作以 addSlot 注入(通常是 Upload 触发器),
1895
+ * 因为文件校验与截图能力各端不同。
1896
+ */
1897
+ declare const SidebarFeedbackFileWall: React__default.ForwardRefExoticComponent<SidebarFeedbackFileWallProps & React__default.RefAttributes<HTMLDivElement>>;
1898
+
1899
+ /**
1900
+ * Sidebar.FeedbackHistoryPanel — 历史面板双栏骨架
1901
+ *
1902
+ * 左栏定宽列表、右栏自适应详情,中间竖分割线。
1903
+ * 分页与取数由消费方负责,列表滚动容器通过 listRef 暴露以挂载无限滚动。
1904
+ */
1905
+ declare const SidebarFeedbackHistoryPanel: React__default.ForwardRefExoticComponent<SidebarFeedbackHistoryPanelProps & React__default.RefAttributes<HTMLDivElement>>;
1906
+ /**
1907
+ * Sidebar.FeedbackHistoryItem — 历史列表卡片
1908
+ *
1909
+ * 状态标签与未读红点同行,标题与元信息各占一行。
1910
+ * 未读判定由消费方给出(replyRead 三态需业务语义),此处只按数据渲染。
1911
+ */
1912
+ declare const SidebarFeedbackHistoryItem: React__default.ForwardRefExoticComponent<SidebarFeedbackHistoryItemProps & React__default.RefAttributes<HTMLButtonElement>>;
1913
+
1914
+ /**
1915
+ * Sidebar.FeedbackDetail — 反馈详情
1916
+ *
1917
+ * 描述 / 附件 / 授权告知 / 官方回复 / 相似问题五段,
1918
+ * 后两段由消费方按数据决定是否传入,不传即不渲染分割线。
1919
+ */
1920
+ declare const SidebarFeedbackDetail: React__default.ForwardRefExoticComponent<SidebarFeedbackDetailProps & React__default.RefAttributes<HTMLDivElement>>;
1921
+ /**
1922
+ * Sidebar.FeedbackAttachmentRow — 附件行
1923
+ *
1924
+ * 图片渲染缩略图并聚合为一个预览分组(点任意图可左右切换),
1925
+ * 其余渲染为可下载的图标卡片。
1926
+ */
1927
+ declare const SidebarFeedbackAttachmentRow: React__default.ForwardRefExoticComponent<SidebarFeedbackAttachmentRowProps & React__default.RefAttributes<HTMLDivElement>>;
1928
+ /**
1929
+ * Sidebar.FeedbackSimilarItem — 相似问题卡片
1930
+ *
1931
+ * 可折叠 + 赞同。展开态默认按「是否有描述」初始化 ——
1932
+ * 有内容可看时直接展开,避免用户逐个点开。
1933
+ */
1934
+ declare const SidebarFeedbackSimilarItem: React__default.ForwardRefExoticComponent<SidebarFeedbackSimilarItemProps & React__default.RefAttributes<HTMLDivElement>>;
1935
+
1936
+ /**
1937
+ * Sidebar.AuthImage — 带鉴权的图片
1938
+ *
1939
+ * 用 fetch 携带鉴权头拉取图片再转 blob URL 交给 <img>,
1940
+ * 解决 Electron renderer 中 <img src> 不自动带 token 的问题。
1941
+ *
1942
+ * token 由 props 注入而非组件内读取环境:组件库不持有任何运行环境依赖。
1943
+ * Web 端若靠 cookie 鉴权则无需本组件,直接用 <img> 即可。
1944
+ */
1945
+ declare const SidebarAuthImage: React__default.ForwardRefExoticComponent<SidebarAuthImageProps & React__default.RefAttributes<HTMLImageElement>>;
1946
+
1947
+ /**
1948
+ * 文件大小格式化。
1949
+ *
1950
+ * 与两端既有实现一致:1KB 以下按字节、1MB 以下按 KB,其余按 MB,
1951
+ * 均保留一位小数。
1952
+ */
1953
+ declare function formatFileSize(bytes: number): string;
1954
+
1377
1955
  /**
1378
1956
  * Sidebar 侧边栏
1379
1957
  *
@@ -1387,7 +1965,7 @@ declare const SidebarFooter: React__default.ForwardRefExoticComponent<SidebarFoo
1387
1965
  * <Sidebar.CollapsibleNavItem label="分组" items={items} />
1388
1966
  * <Sidebar.GroupHeader title="置顶" collapsible expanded onToggle={fn} />
1389
1967
  * <Sidebar.ListItem title="会话" indicator="running" menu={<Dropdown />} />
1390
- * <Sidebar.SkeletonItem status="empty" text="暂无内容" />
1968
+ * <Empty.Card status="empty" description="暂无内容" />
1391
1969
  * </ScrollArea>
1392
1970
  * <Sidebar.Footer avatar={avatar} name="用户" actions={actions} />
1393
1971
  * </Sidebar.Root>
@@ -1402,8 +1980,23 @@ declare const Sidebar: {
1402
1980
  GroupHeader: React$1.ForwardRefExoticComponent<SidebarGroupHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
1403
1981
  ListItem: React$1.ForwardRefExoticComponent<SidebarListItemProps & React$1.RefAttributes<HTMLDivElement>>;
1404
1982
  CollapsibleListItem: React$1.ForwardRefExoticComponent<SidebarCollapsibleListItemProps & React$1.RefAttributes<HTMLDivElement>>;
1405
- SkeletonItem: React$1.ForwardRefExoticComponent<SidebarSkeletonItemProps & React$1.RefAttributes<HTMLDivElement>>;
1406
1983
  Footer: React$1.ForwardRefExoticComponent<SidebarFooterProps & React$1.RefAttributes<HTMLDivElement>>;
1984
+ FooterUser: React$1.ForwardRefExoticComponent<SidebarFooterUserProps & React$1.RefAttributes<HTMLDivElement>>;
1985
+ FooterMenuStaticRow: React$1.ForwardRefExoticComponent<SidebarFooterMenuStaticRowProps & React$1.RefAttributes<HTMLDivElement>>;
1986
+ FooterBadge: React$1.ForwardRefExoticComponent<SidebarFooterBadgeProps & React$1.RefAttributes<HTMLSpanElement>>;
1987
+ UsageBar: React$1.ForwardRefExoticComponent<SidebarUsageBarProps & React$1.RefAttributes<HTMLDivElement>>;
1988
+ UsagePanel: React$1.ForwardRefExoticComponent<SidebarUsagePanelProps & React$1.RefAttributes<HTMLDivElement>>;
1989
+ UsagePanelSection: React$1.ForwardRefExoticComponent<SidebarUsagePanelSectionProps & React$1.RefAttributes<HTMLDivElement>>;
1990
+ FeedbackModal: React$1.ForwardRefExoticComponent<SidebarFeedbackModalProps & React$1.RefAttributes<HTMLDivElement>>;
1991
+ FeedbackSubmitPanel: React$1.ForwardRefExoticComponent<SidebarFeedbackSubmitPanelProps & React$1.RefAttributes<HTMLDivElement>>;
1992
+ FeedbackField: React$1.ForwardRefExoticComponent<SidebarFeedbackFieldProps & React$1.RefAttributes<HTMLDivElement>>;
1993
+ FeedbackFileWall: React$1.ForwardRefExoticComponent<SidebarFeedbackFileWallProps & React$1.RefAttributes<HTMLDivElement>>;
1994
+ FeedbackHistoryPanel: React$1.ForwardRefExoticComponent<SidebarFeedbackHistoryPanelProps & React$1.RefAttributes<HTMLDivElement>>;
1995
+ FeedbackHistoryItem: React$1.ForwardRefExoticComponent<SidebarFeedbackHistoryItemProps & React$1.RefAttributes<HTMLButtonElement>>;
1996
+ FeedbackDetail: React$1.ForwardRefExoticComponent<SidebarFeedbackDetailProps & React$1.RefAttributes<HTMLDivElement>>;
1997
+ FeedbackAttachmentRow: React$1.ForwardRefExoticComponent<SidebarFeedbackAttachmentRowProps & React$1.RefAttributes<HTMLDivElement>>;
1998
+ FeedbackSimilarItem: React$1.ForwardRefExoticComponent<SidebarFeedbackSimilarItemProps & React$1.RefAttributes<HTMLDivElement>>;
1999
+ AuthImage: React$1.ForwardRefExoticComponent<SidebarAuthImageProps & React$1.RefAttributes<HTMLImageElement>>;
1407
2000
  };
1408
2001
 
1409
2002
  /** 主轴方向类型 */
@@ -2130,8 +2723,30 @@ interface UploadProps {
2130
2723
  fileList?: UploadFile[];
2131
2724
  /** 非受控默认文件列表 */
2132
2725
  defaultFileList?: UploadFile[];
2133
- /** 自定义上传实现(必传,组件不内置上传逻辑) */
2134
- customRequest: (options: CustomRequestOptions) => CustomRequestReturn | void;
2726
+ /**
2727
+ * 自定义上传实现,组件不内置上传逻辑。传入即「选中后立即上传」。
2728
+ *
2729
+ * 省略则为「仅收集」模式:不发起任何请求,文件入列后直接置为 `done`,
2730
+ * 用于随表单一次性提交的场景 —— 文件先攒在 `fileList` 里,
2731
+ * 由消费方在提交时自行携带。
2732
+ */
2733
+ customRequest?: (options: CustomRequestOptions) => CustomRequestReturn | void;
2734
+ /**
2735
+ * 粘贴上传。开启后监听容器内的 paste 事件,
2736
+ * 取剪贴板中的文件(如截图)走同一套校验与收集流程。
2737
+ *
2738
+ * 默认 false。
2739
+ */
2740
+ pasteable?: boolean;
2741
+ /**
2742
+ * 按 `accept` 校验文件类型,不通过时以 `type` 原因触发 `onReject`。
2743
+ *
2744
+ * 原生 input 的 accept 只约束选择器,拖拽与粘贴可绕过它,
2745
+ * 需要拦住这两条路径时开启。
2746
+ *
2747
+ * 默认 false,保持原有不校验类型的行为不变。
2748
+ */
2749
+ validateAccept?: boolean;
2135
2750
  /** 文件列表变更回调 */
2136
2751
  onChange?: (fileList: UploadFile[]) => void;
2137
2752
  /** 文件校验拒绝回调 */
@@ -2225,4 +2840,4 @@ declare const ScrollBar: React__default.ForwardRefExoticComponent<ScrollBarProps
2225
2840
  */
2226
2841
  declare function cn(...inputs: ClassValue[]): string;
2227
2842
 
2228
- export { Alert, type AlertProps, type AlertType, AvatarWithGroup as Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, ButtonProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, type ColorPickerSize, type CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, type DialogConfirmOptions, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerVariant, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownButton, type DropdownButtonProps, DropdownCheckboxItem, type DropdownCheckboxItemProps, DropdownContent, type DropdownContentProps, DropdownGroup, type DropdownGroupProps, DropdownItem, type DropdownItemData, type DropdownItemProps, DropdownLabel, type DropdownLabelData, type DropdownLabelProps, type DropdownMenuItemData, type DropdownProps, DropdownRadioGroup, type DropdownRadioGroupProps, DropdownRadioItem, type DropdownRadioItemProps, DropdownSeparator, type DropdownSeparatorData, type DropdownSeparatorProps, DropdownSub, DropdownSubContent, type DropdownSubContentProps, type DropdownSubProps, DropdownSubTrigger, type DropdownSubTriggerProps, DropdownTrigger, type DropdownTriggerProps, Empty, type EmptyIconComponent, type EmptyProps, type EmptySize, type FileItemActions, Flex, type FlexGapSize, type FlexOrientation, type FlexProps, Form, type FormInstance, type FormItemProps, type FormLayout, type FormProps, Image, type ImagePreviewGroupProps, type ImageProps, type ImgInfo, LgSize, LingeeProvider, type LingeeProviderProps, type Locale, Pagination, type PaginationProps, type PaginationVariant, PopoverContentProps, type PreviewGroupType, type PreviewType, Progress, type ProgressProps, type ProgressStatus, type ProgressType, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, type RadioSize, RangePicker, type RangePickerProps, type RangePickerSize, type RejectReason, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, Select, type SelectDropdownProps, type SelectMode, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectSize, Sidebar, SidebarCollapsibleListItem, type SidebarCollapsibleListItemProps, SidebarCollapsibleNavItem, type SidebarCollapsibleNavItemChild, type SidebarCollapsibleNavItemProps, SidebarFooter, type SidebarFooterProps, SidebarGroupHeader, type SidebarGroupHeaderProps, SidebarHeader, type SidebarHeaderProps, type SidebarIndicatorType, SidebarListItem, type SidebarListItemProps, SidebarNavItem, type SidebarNavItemProps, SidebarRoot, type SidebarRootProps, SidebarSkeletonItem, type SidebarSkeletonItemProps, type SidebarSkeletonItemSpacing, type SidebarSkeletonItemStatus, type SidebarSkeletonItemVariant, SidebarTabBar, type SidebarTabBarProps, type SidebarTabItem, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, type SliderSize, Spin, type SpinProps, type SpinSize, type StepItem, type StepStatus, Steps, type StepsProps, type StepsSize, type StepsTitlePlacement, Table, type TableColumnType, type TableProps, type TableRowSelection, type TableSize, type TableSorterState, Tag, type TagPresetColor, type TagProps, type TagShape, type TagSize, TimePicker, type TimePickerProps, type TimePickerSize, type TimeValue, type TransformAction, type TransformType, Upload, type UploadFile, type UploadFileStatus, type UploadProps, cn, enUS, useComponentLocale, useLocale, zhCN };
2843
+ export { Alert, type AlertProps, type AlertType, AvatarWithGroup as Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, ButtonProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, type ColorPickerSize, type CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, type DialogConfirmOptions, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerVariant, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownButton, type DropdownButtonProps, DropdownCheckboxItem, type DropdownCheckboxItemProps, DropdownContent, type DropdownContentProps, DropdownGroup, type DropdownGroupProps, DropdownItem, type DropdownItemData, type DropdownItemProps, DropdownLabel, type DropdownLabelData, type DropdownLabelProps, type DropdownMenuItemData, type DropdownProps, DropdownRadioGroup, type DropdownRadioGroupProps, DropdownRadioItem, type DropdownRadioItemProps, DropdownSeparator, type DropdownSeparatorData, type DropdownSeparatorProps, DropdownStatus, type DropdownStatusProps, type DropdownStatusText, type DropdownStatusType, DropdownSub, DropdownSubContent, type DropdownSubContentProps, type DropdownSubProps, DropdownSubTrigger, type DropdownSubTriggerProps, DropdownTrigger, type DropdownTriggerProps, EllipsisTooltip, type EllipsisTooltipProps, Empty, EmptyCard, type EmptyCardProps, type EmptyCardSpacing, type EmptyCardStatus, type EmptyCardVariant, type EmptyIconComponent, type EmptyProps, type EmptySize, type FeedbackAttachment, type FeedbackFileWallItem, type FeedbackHistoryDetail, type FeedbackHistoryItem, type FeedbackReply, type FeedbackSimilarItem, type FeedbackStatus, type FeedbackTabKey, type FileItemActions, Flex, type FlexGapSize, type FlexOrientation, type FlexProps, Form, type FormInstance, type FormItemProps, type FormLayout, type FormProps, Image, type ImagePreviewGroupProps, type ImageProps, type ImgInfo, LgSize, LingeeProvider, type LingeeProviderProps, type Locale, Pagination, type PaginationProps, type PaginationVariant, PopoverContentProps, type PreviewGroupType, type PreviewType, Progress, type ProgressProps, type ProgressStatus, type ProgressType, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, type RadioSize, RangePicker, type RangePickerProps, type RangePickerSize, type RejectReason, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, Select, type SelectDropdownProps, type SelectMode, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectSize, Sidebar, SidebarAuthImage, type SidebarAuthImageProps, type SidebarCaretPlacement, SidebarCollapsibleListItem, type SidebarCollapsibleListItemProps, SidebarCollapsibleNavItem, type SidebarCollapsibleNavItemChild, type SidebarCollapsibleNavItemProps, SidebarFeedbackAttachmentRow, type SidebarFeedbackAttachmentRowProps, SidebarFeedbackDetail, type SidebarFeedbackDetailProps, SidebarFeedbackField, type SidebarFeedbackFieldProps, SidebarFeedbackFileWall, type SidebarFeedbackFileWallProps, SidebarFeedbackHistoryItem, type SidebarFeedbackHistoryItemProps, SidebarFeedbackHistoryPanel, type SidebarFeedbackHistoryPanelProps, SidebarFeedbackModal, type SidebarFeedbackModalProps, SidebarFeedbackSimilarItem, type SidebarFeedbackSimilarItemProps, SidebarFeedbackSubmitPanel, type SidebarFeedbackSubmitPanelProps, SidebarFooter, SidebarFooterBadge, type SidebarFooterBadgeProps, SidebarFooterMenuStaticRow, type SidebarFooterMenuStaticRowProps, type SidebarFooterProps, SidebarFooterUser, type SidebarFooterUserProps, SidebarGroupHeader, type SidebarGroupHeaderProps, SidebarHeader, type SidebarHeaderProps, type SidebarIndicatorType, SidebarListItem, type SidebarListItemProps, SidebarNavItem, type SidebarNavItemProps, SidebarRoot, type SidebarRootProps, SidebarTabBar, type SidebarTabBarProps, type SidebarTabItem, SidebarUsageBar, type SidebarUsageBarProps, SidebarUsagePanel, type SidebarUsagePanelProps, SidebarUsagePanelSection, type SidebarUsagePanelSectionProps, type SidebarUsageTone, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, type SliderSize, Spin, type SpinProps, type SpinSize, type StepItem, type StepStatus, Steps, type StepsProps, type StepsSize, type StepsTitlePlacement, Table, type TableColumnType, type TableProps, type TableRowSelection, type TableSize, type TableSorterState, Tag, type TagPresetColor, type TagProps, type TagShape, type TagSize, TimePicker, type TimePickerProps, type TimePickerSize, type TimeValue, TooltipProps, type TransformAction, type TransformType, Upload, type UploadFile, type UploadFileStatus, type UploadProps, cn, enUS, formatFileSize, useComponentLocale, useLocale, zhCN };