@sia.soul/sia-react-ui 0.1.39 → 0.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-LRGD2QDA.js → chunk-3Q3S6CDZ.js} +975 -929
- package/dist/{chunk-WR7XTQRU.js → chunk-IPDCEXQO.js} +149 -64
- package/dist/{chunk-GLS4WVIZ.js → chunk-LWVZEUGJ.js} +88 -89
- package/dist/{core-D4opRFkZ.d.cts → core-C2IieVNm.d.cts} +25 -12
- package/dist/{core-VNY_7WRq.d.ts → core-ZmKnvCFV.d.ts} +25 -12
- package/dist/core.cjs +1071 -978
- package/dist/core.css +64 -21
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +2 -2
- package/dist/index.cjs +751 -620
- package/dist/index.css +64 -21
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/{select-date-range-CtA-B8DB.d.cts → select-date-range-2galnCvZ.d.cts} +10 -5
- package/dist/{select-date-range-D9W_mmMq.d.ts → select-date-range-Dtj6XF9I.d.ts} +10 -5
- package/dist/select-date-range.cjs +164 -119
- package/dist/select-date-range.d.cts +1 -1
- package/dist/select-date-range.d.ts +1 -1
- package/dist/select-date-range.js +2 -2
- package/package.json +1 -1
|
@@ -721,7 +721,7 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
|
721
721
|
* @defaultValue false
|
|
722
722
|
*/
|
|
723
723
|
centered?: boolean;
|
|
724
|
-
/**
|
|
724
|
+
/** 标签栏左侧标题,支持文本或 React 节点;科技样式附带装饰线。 */
|
|
725
725
|
tabBarTitle?: ReactNode;
|
|
726
726
|
/** 标签栏与内容面板之间的间距,单位 px,支持 0;未指定时上下布局为 16px,左右布局为 20px。仅影响当前 Tabs,不传递给嵌套实例。 */
|
|
727
727
|
contentGap?: number;
|
|
@@ -744,7 +744,7 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
|
744
744
|
/** 点击选项卡右键菜单时调用。 */
|
|
745
745
|
onTabContextMenuClick?: (info: TabsContextMenuClickInfo) => void;
|
|
746
746
|
}
|
|
747
|
-
/**
|
|
747
|
+
/** 选项卡组件;横向空间不足时,剩余标签收起到末尾的更多菜单,支持悬停或点击展开。 */
|
|
748
748
|
declare function Tabs({ items, activeKey, defaultActiveKey, onChange, onAfterChange, deferContent, type, size, tabPosition, orientation, centered, tabBarTitle, tabBarExtraContent, contentGap, destroyInactiveTabPane, closable, onEdit, tabContextMenu, onTabContextMenuClick, className, ...props }: TabsProps): react.JSX.Element;
|
|
749
749
|
|
|
750
750
|
/** 打开下拉菜单的触发方式。 */
|
|
@@ -852,15 +852,15 @@ declare const Dropdown: typeof DropdownRoot & {
|
|
|
852
852
|
Button: typeof DropdownButton;
|
|
853
853
|
};
|
|
854
854
|
|
|
855
|
-
/**
|
|
856
|
-
type FloatingPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "right";
|
|
855
|
+
/** 气泡十二个方向;start/end 为对应边的起点/终点对齐,同时支持 topLeft、leftTop 等驼峰别名。 */
|
|
856
|
+
type FloatingPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
857
857
|
/** 触发浮层显示的交互方式。 */
|
|
858
858
|
type FloatingTrigger = "hover" | "focus" | "click";
|
|
859
859
|
/** 文字提示的属性配置。 */
|
|
860
860
|
interface TooltipProps {
|
|
861
861
|
/** 标题内容,可传入文本或 React 节点。 */
|
|
862
862
|
title?: ReactNode;
|
|
863
|
-
/**
|
|
863
|
+
/** 触发气泡的元素;定位以实际接收触发事件的 DOM 元素为准,初始打开时使用首个子元素。 */
|
|
864
864
|
children: ReactElement;
|
|
865
865
|
/** 相对于触发元素的弹出方向和对齐位置。 */
|
|
866
866
|
placement?: FloatingPlacement;
|
|
@@ -876,8 +876,13 @@ interface TooltipProps {
|
|
|
876
876
|
mouseEnterDelay?: number;
|
|
877
877
|
/** 鼠标移出后延迟隐藏的时间。 */
|
|
878
878
|
mouseLeaveDelay?: number;
|
|
879
|
-
/**
|
|
880
|
-
arrow?: boolean
|
|
879
|
+
/** 是否显示箭头,默认 true;对象配置可让箭头指向触发元素中心。 */
|
|
880
|
+
arrow?: boolean | {
|
|
881
|
+
/** 是否指向触发元素中心,默认 false;空间受限时箭头限制在气泡边缘内。 */
|
|
882
|
+
pointAtCenter?: boolean;
|
|
883
|
+
};
|
|
884
|
+
/** 是否自动翻转和贴边偏移,默认 true;滚动时始终跟随触发元素,目标完全离开可视区域时隐藏气泡。 */
|
|
885
|
+
autoAdjustOverflow?: boolean;
|
|
881
886
|
/** 显示颜色,可使用 CSS 颜色值。 */
|
|
882
887
|
color?: string;
|
|
883
888
|
/** 附加到组件根节点的 CSS 类名。 */
|
|
@@ -1119,7 +1124,7 @@ declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKey
|
|
|
1119
1124
|
|
|
1120
1125
|
/** 气泡确认的属性配置。 */
|
|
1121
1126
|
interface PopconfirmProps {
|
|
1122
|
-
/**
|
|
1127
|
+
/** 触发确认框的元素;默认在该元素上方居中显示,空间不足时自动避让。 */
|
|
1123
1128
|
children: ReactElement;
|
|
1124
1129
|
/** 标题内容,可传入文本或 React 节点。 */
|
|
1125
1130
|
title: ReactNode;
|
|
@@ -1144,6 +1149,12 @@ interface PopconfirmProps {
|
|
|
1144
1149
|
* @defaultValue "top"
|
|
1145
1150
|
*/
|
|
1146
1151
|
placement?: FloatingPlacement;
|
|
1152
|
+
/** 是否显示箭头,默认 true;设置 { pointAtCenter: true } 时指向触发元素中心。 */
|
|
1153
|
+
arrow?: TooltipProps["arrow"];
|
|
1154
|
+
/** 是否自动翻转和贴边偏移,默认 true;滚动时跟随目标,目标完全离开可视区域时隐藏。 */
|
|
1155
|
+
autoAdjustOverflow?: boolean;
|
|
1156
|
+
/** 是否跳过气泡直接确认,默认 false;为 true 时仅点击触发元素会调用 onConfirm,disabled 优先,异步执行期间忽略重复点击。 */
|
|
1157
|
+
skipConfirm?: boolean;
|
|
1147
1158
|
/**
|
|
1148
1159
|
* 触发显示的交互方式。
|
|
1149
1160
|
* @defaultValue "click"
|
|
@@ -1168,15 +1179,17 @@ interface PopconfirmProps {
|
|
|
1168
1179
|
showCancel?: boolean;
|
|
1169
1180
|
/** 显示在内容旁的图标节点,建议使用 Icon 组件。 */
|
|
1170
1181
|
icon?: ReactNode;
|
|
1171
|
-
/**
|
|
1172
|
-
onConfirm?: (event?: React.MouseEvent) => void | boolean |
|
|
1173
|
-
/**
|
|
1182
|
+
/** 点击确定或跳过确认时调用,参数为点击事件;返回 false 保持打开,其余同步结果关闭。返回 Promise 时显示加载状态,成功且结果不为 false 时关闭;抛错或拒绝时保持打开并调用 onConfirmError。受控模式通过 onOpenChange 请求关闭,需外部更新 open。 */
|
|
1183
|
+
onConfirm?: (event?: React.MouseEvent) => void | boolean | PromiseLike<void | boolean>;
|
|
1184
|
+
/** 确认回调抛错或 Promise 拒绝时调用,参数为原始错误;可用于展示失败提示,默认保持气泡并恢复按钮,不自动展示错误文案。 */
|
|
1185
|
+
onConfirmError?: (error: unknown) => void;
|
|
1186
|
+
/** 点击取消按钮时调用,参数为点击事件;点击外部关闭不会触发此回调。 */
|
|
1174
1187
|
onCancel?: (event?: React.MouseEvent) => void;
|
|
1175
1188
|
/** 打开状态改变时触发,参数为新的打开状态。 */
|
|
1176
1189
|
onOpenChange?: (open: boolean) => void;
|
|
1177
1190
|
}
|
|
1178
1191
|
/** 气泡确认组件。 */
|
|
1179
|
-
declare function Popconfirm({ children, title, description, okText, cancelText, okButtonProps, cancelButtonProps, placement, trigger, open, defaultOpen, disabled, showCancel, icon, onConfirm, onCancel, onOpenChange, }: PopconfirmProps): react.JSX.Element;
|
|
1192
|
+
declare function Popconfirm({ children, title, description, okText, cancelText, okButtonProps, cancelButtonProps, placement, trigger, open, defaultOpen, disabled, showCancel, icon, onConfirm, onConfirmError, onCancel, onOpenChange, arrow, autoAdjustOverflow, skipConfirm, }: PopconfirmProps): react.JSX.Element;
|
|
1180
1193
|
/** 进度的状态类型。 */
|
|
1181
1194
|
type ProgressStatus = "normal" | "active" | "success" | "exception";
|
|
1182
1195
|
/** 进度的属性配置。 */
|
|
@@ -721,7 +721,7 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
|
721
721
|
* @defaultValue false
|
|
722
722
|
*/
|
|
723
723
|
centered?: boolean;
|
|
724
|
-
/**
|
|
724
|
+
/** 标签栏左侧标题,支持文本或 React 节点;科技样式附带装饰线。 */
|
|
725
725
|
tabBarTitle?: ReactNode;
|
|
726
726
|
/** 标签栏与内容面板之间的间距,单位 px,支持 0;未指定时上下布局为 16px,左右布局为 20px。仅影响当前 Tabs,不传递给嵌套实例。 */
|
|
727
727
|
contentGap?: number;
|
|
@@ -744,7 +744,7 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
|
744
744
|
/** 点击选项卡右键菜单时调用。 */
|
|
745
745
|
onTabContextMenuClick?: (info: TabsContextMenuClickInfo) => void;
|
|
746
746
|
}
|
|
747
|
-
/**
|
|
747
|
+
/** 选项卡组件;横向空间不足时,剩余标签收起到末尾的更多菜单,支持悬停或点击展开。 */
|
|
748
748
|
declare function Tabs({ items, activeKey, defaultActiveKey, onChange, onAfterChange, deferContent, type, size, tabPosition, orientation, centered, tabBarTitle, tabBarExtraContent, contentGap, destroyInactiveTabPane, closable, onEdit, tabContextMenu, onTabContextMenuClick, className, ...props }: TabsProps): react.JSX.Element;
|
|
749
749
|
|
|
750
750
|
/** 打开下拉菜单的触发方式。 */
|
|
@@ -852,15 +852,15 @@ declare const Dropdown: typeof DropdownRoot & {
|
|
|
852
852
|
Button: typeof DropdownButton;
|
|
853
853
|
};
|
|
854
854
|
|
|
855
|
-
/**
|
|
856
|
-
type FloatingPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "right";
|
|
855
|
+
/** 气泡十二个方向;start/end 为对应边的起点/终点对齐,同时支持 topLeft、leftTop 等驼峰别名。 */
|
|
856
|
+
type FloatingPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
857
857
|
/** 触发浮层显示的交互方式。 */
|
|
858
858
|
type FloatingTrigger = "hover" | "focus" | "click";
|
|
859
859
|
/** 文字提示的属性配置。 */
|
|
860
860
|
interface TooltipProps {
|
|
861
861
|
/** 标题内容,可传入文本或 React 节点。 */
|
|
862
862
|
title?: ReactNode;
|
|
863
|
-
/**
|
|
863
|
+
/** 触发气泡的元素;定位以实际接收触发事件的 DOM 元素为准,初始打开时使用首个子元素。 */
|
|
864
864
|
children: ReactElement;
|
|
865
865
|
/** 相对于触发元素的弹出方向和对齐位置。 */
|
|
866
866
|
placement?: FloatingPlacement;
|
|
@@ -876,8 +876,13 @@ interface TooltipProps {
|
|
|
876
876
|
mouseEnterDelay?: number;
|
|
877
877
|
/** 鼠标移出后延迟隐藏的时间。 */
|
|
878
878
|
mouseLeaveDelay?: number;
|
|
879
|
-
/**
|
|
880
|
-
arrow?: boolean
|
|
879
|
+
/** 是否显示箭头,默认 true;对象配置可让箭头指向触发元素中心。 */
|
|
880
|
+
arrow?: boolean | {
|
|
881
|
+
/** 是否指向触发元素中心,默认 false;空间受限时箭头限制在气泡边缘内。 */
|
|
882
|
+
pointAtCenter?: boolean;
|
|
883
|
+
};
|
|
884
|
+
/** 是否自动翻转和贴边偏移,默认 true;滚动时始终跟随触发元素,目标完全离开可视区域时隐藏气泡。 */
|
|
885
|
+
autoAdjustOverflow?: boolean;
|
|
881
886
|
/** 显示颜色,可使用 CSS 颜色值。 */
|
|
882
887
|
color?: string;
|
|
883
888
|
/** 附加到组件根节点的 CSS 类名。 */
|
|
@@ -1119,7 +1124,7 @@ declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKey
|
|
|
1119
1124
|
|
|
1120
1125
|
/** 气泡确认的属性配置。 */
|
|
1121
1126
|
interface PopconfirmProps {
|
|
1122
|
-
/**
|
|
1127
|
+
/** 触发确认框的元素;默认在该元素上方居中显示,空间不足时自动避让。 */
|
|
1123
1128
|
children: ReactElement;
|
|
1124
1129
|
/** 标题内容,可传入文本或 React 节点。 */
|
|
1125
1130
|
title: ReactNode;
|
|
@@ -1144,6 +1149,12 @@ interface PopconfirmProps {
|
|
|
1144
1149
|
* @defaultValue "top"
|
|
1145
1150
|
*/
|
|
1146
1151
|
placement?: FloatingPlacement;
|
|
1152
|
+
/** 是否显示箭头,默认 true;设置 { pointAtCenter: true } 时指向触发元素中心。 */
|
|
1153
|
+
arrow?: TooltipProps["arrow"];
|
|
1154
|
+
/** 是否自动翻转和贴边偏移,默认 true;滚动时跟随目标,目标完全离开可视区域时隐藏。 */
|
|
1155
|
+
autoAdjustOverflow?: boolean;
|
|
1156
|
+
/** 是否跳过气泡直接确认,默认 false;为 true 时仅点击触发元素会调用 onConfirm,disabled 优先,异步执行期间忽略重复点击。 */
|
|
1157
|
+
skipConfirm?: boolean;
|
|
1147
1158
|
/**
|
|
1148
1159
|
* 触发显示的交互方式。
|
|
1149
1160
|
* @defaultValue "click"
|
|
@@ -1168,15 +1179,17 @@ interface PopconfirmProps {
|
|
|
1168
1179
|
showCancel?: boolean;
|
|
1169
1180
|
/** 显示在内容旁的图标节点,建议使用 Icon 组件。 */
|
|
1170
1181
|
icon?: ReactNode;
|
|
1171
|
-
/**
|
|
1172
|
-
onConfirm?: (event?: React.MouseEvent) => void | boolean |
|
|
1173
|
-
/**
|
|
1182
|
+
/** 点击确定或跳过确认时调用,参数为点击事件;返回 false 保持打开,其余同步结果关闭。返回 Promise 时显示加载状态,成功且结果不为 false 时关闭;抛错或拒绝时保持打开并调用 onConfirmError。受控模式通过 onOpenChange 请求关闭,需外部更新 open。 */
|
|
1183
|
+
onConfirm?: (event?: React.MouseEvent) => void | boolean | PromiseLike<void | boolean>;
|
|
1184
|
+
/** 确认回调抛错或 Promise 拒绝时调用,参数为原始错误;可用于展示失败提示,默认保持气泡并恢复按钮,不自动展示错误文案。 */
|
|
1185
|
+
onConfirmError?: (error: unknown) => void;
|
|
1186
|
+
/** 点击取消按钮时调用,参数为点击事件;点击外部关闭不会触发此回调。 */
|
|
1174
1187
|
onCancel?: (event?: React.MouseEvent) => void;
|
|
1175
1188
|
/** 打开状态改变时触发,参数为新的打开状态。 */
|
|
1176
1189
|
onOpenChange?: (open: boolean) => void;
|
|
1177
1190
|
}
|
|
1178
1191
|
/** 气泡确认组件。 */
|
|
1179
|
-
declare function Popconfirm({ children, title, description, okText, cancelText, okButtonProps, cancelButtonProps, placement, trigger, open, defaultOpen, disabled, showCancel, icon, onConfirm, onCancel, onOpenChange, }: PopconfirmProps): react.JSX.Element;
|
|
1192
|
+
declare function Popconfirm({ children, title, description, okText, cancelText, okButtonProps, cancelButtonProps, placement, trigger, open, defaultOpen, disabled, showCancel, icon, onConfirm, onConfirmError, onCancel, onOpenChange, arrow, autoAdjustOverflow, skipConfirm, }: PopconfirmProps): react.JSX.Element;
|
|
1180
1193
|
/** 进度的状态类型。 */
|
|
1181
1194
|
type ProgressStatus = "normal" | "active" | "success" | "exception";
|
|
1182
1195
|
/** 进度的属性配置。 */
|