@sia.soul/sia-react-ui 0.1.63 → 0.1.65

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.
@@ -5,7 +5,7 @@ import {
5
5
  Popover,
6
6
  Tooltip,
7
7
  useOverlayLifecycle
8
- } from "./chunk-F4XMRO6G.js";
8
+ } from "./chunk-B42RCR7O.js";
9
9
  import {
10
10
  Dropdown,
11
11
  Icon
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FloatingScrollbarProvider,
3
3
  Select
4
- } from "./chunk-F4XMRO6G.js";
4
+ } from "./chunk-B42RCR7O.js";
5
5
  import {
6
6
  Icon
7
7
  } from "./chunk-IUZ2RSI5.js";
@@ -109,7 +109,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
109
109
  * @defaultValue ""
110
110
  */
111
111
  bodyClassName?: string;
112
- /** 内容区域的内联样式。 */
112
+ /** 内容区域的内联样式,可覆盖默认内边距:上下 6px,左右使用 --sia-spacing;bordered 为 false 时默认内边距为 0。 */
113
113
  bodyStyle?: CSSProperties;
114
114
  }
115
115
  /** 卡片组件。 */
@@ -1019,7 +1019,7 @@ interface TreeNode {
1019
1019
  children?: readonly TreeNode[];
1020
1020
  [key: string]: unknown;
1021
1021
  }
1022
- /** 树的属性配置。 */
1022
+ /** 树的属性配置;通过 style 或 className 设置高度限制及 overflow: auto 后,溢出内容使用不占布局空间的浮动滚动条。 */
1023
1023
  interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "onDrop"> {
1024
1024
  /** 树形节点数据 */
1025
1025
  treeData: readonly TreeNode[];
@@ -1109,6 +1109,21 @@ interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "o
1109
1109
  * @defaultValue 34
1110
1110
  */
1111
1111
  stickyRowHeight?: number;
1112
+ /**
1113
+ * 是否允许组件在可见节点达到阈值且自身形成滚动视口时自动启用虚拟滚动;关闭后始终渲染全部已展开节点。
1114
+ * @defaultValue true
1115
+ */
1116
+ virtual?: boolean;
1117
+ /**
1118
+ * 自动启用虚拟滚动所需的最少可见节点数;小于该数量时保留完整 DOM,避免为小树增加额外计算。
1119
+ * @defaultValue 100
1120
+ */
1121
+ virtualThreshold?: number;
1122
+ /**
1123
+ * 虚拟滚动模式下每一行的固定高度,单位为像素;未传入时使用 stickyRowHeight 的值。
1124
+ * @defaultValue stickyRowHeight
1125
+ */
1126
+ virtualItemHeight?: number;
1112
1127
  /**
1113
1128
  * 是否允许拖拽。
1114
1129
  * @defaultValue false
@@ -1151,8 +1166,8 @@ interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "o
1151
1166
  dropPosition: TreeDropPosition;
1152
1167
  }) => void;
1153
1168
  }
1154
- /** 树组件。 */
1155
- declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKeys, defaultExpandedKeys, defaultExpandAll, checkedKeys, defaultCheckedKeys, loadingKeys, checkable, checkStrictly, multiple, selectable, showLine, showIcon, blockNode, indentSize, switcherWidth, stickyAncestors, stickyRowHeight, draggable, loadData, onSelect, onCheck, onExpand, onDrop, className, ...props }: TreeProps): react.JSX.Element;
1169
+ /** 树形控件,支持选择、勾选与异步加载;自身容器可滚动时默认接入浮动滚动条,无需全局 Provider。 */
1170
+ declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKeys, defaultExpandedKeys, defaultExpandAll, checkedKeys, defaultCheckedKeys, loadingKeys, checkable, checkStrictly, multiple, selectable, showLine, showIcon, blockNode, indentSize, switcherWidth, stickyAncestors, stickyRowHeight, virtual, virtualThreshold, virtualItemHeight, draggable, loadData, onSelect, onCheck, onExpand, onDrop, className, ...props }: TreeProps): react.JSX.Element;
1156
1171
 
1157
1172
  /** 气泡确认的属性配置。 */
1158
1173
  interface PopconfirmProps {
@@ -109,7 +109,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
109
109
  * @defaultValue ""
110
110
  */
111
111
  bodyClassName?: string;
112
- /** 内容区域的内联样式。 */
112
+ /** 内容区域的内联样式,可覆盖默认内边距:上下 6px,左右使用 --sia-spacing;bordered 为 false 时默认内边距为 0。 */
113
113
  bodyStyle?: CSSProperties;
114
114
  }
115
115
  /** 卡片组件。 */
@@ -1019,7 +1019,7 @@ interface TreeNode {
1019
1019
  children?: readonly TreeNode[];
1020
1020
  [key: string]: unknown;
1021
1021
  }
1022
- /** 树的属性配置。 */
1022
+ /** 树的属性配置;通过 style 或 className 设置高度限制及 overflow: auto 后,溢出内容使用不占布局空间的浮动滚动条。 */
1023
1023
  interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "onDrop"> {
1024
1024
  /** 树形节点数据 */
1025
1025
  treeData: readonly TreeNode[];
@@ -1109,6 +1109,21 @@ interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "o
1109
1109
  * @defaultValue 34
1110
1110
  */
1111
1111
  stickyRowHeight?: number;
1112
+ /**
1113
+ * 是否允许组件在可见节点达到阈值且自身形成滚动视口时自动启用虚拟滚动;关闭后始终渲染全部已展开节点。
1114
+ * @defaultValue true
1115
+ */
1116
+ virtual?: boolean;
1117
+ /**
1118
+ * 自动启用虚拟滚动所需的最少可见节点数;小于该数量时保留完整 DOM,避免为小树增加额外计算。
1119
+ * @defaultValue 100
1120
+ */
1121
+ virtualThreshold?: number;
1122
+ /**
1123
+ * 虚拟滚动模式下每一行的固定高度,单位为像素;未传入时使用 stickyRowHeight 的值。
1124
+ * @defaultValue stickyRowHeight
1125
+ */
1126
+ virtualItemHeight?: number;
1112
1127
  /**
1113
1128
  * 是否允许拖拽。
1114
1129
  * @defaultValue false
@@ -1151,8 +1166,8 @@ interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "o
1151
1166
  dropPosition: TreeDropPosition;
1152
1167
  }) => void;
1153
1168
  }
1154
- /** 树组件。 */
1155
- declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKeys, defaultExpandedKeys, defaultExpandAll, checkedKeys, defaultCheckedKeys, loadingKeys, checkable, checkStrictly, multiple, selectable, showLine, showIcon, blockNode, indentSize, switcherWidth, stickyAncestors, stickyRowHeight, draggable, loadData, onSelect, onCheck, onExpand, onDrop, className, ...props }: TreeProps): react.JSX.Element;
1169
+ /** 树形控件,支持选择、勾选与异步加载;自身容器可滚动时默认接入浮动滚动条,无需全局 Provider。 */
1170
+ declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKeys, defaultExpandedKeys, defaultExpandAll, checkedKeys, defaultCheckedKeys, loadingKeys, checkable, checkStrictly, multiple, selectable, showLine, showIcon, blockNode, indentSize, switcherWidth, stickyAncestors, stickyRowHeight, virtual, virtualThreshold, virtualItemHeight, draggable, loadData, onSelect, onCheck, onExpand, onDrop, className, ...props }: TreeProps): react.JSX.Element;
1156
1171
 
1157
1172
  /** 气泡确认的属性配置。 */
1158
1173
  interface PopconfirmProps {