@sia.soul/sia-react-ui 0.1.121 → 0.1.122
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-UW2W7RYZ.js → chunk-B6MU2BBG.js} +4 -3
- package/dist/{chunk-XDG736H7.js → chunk-B7UK645K.js} +1 -1
- package/dist/{chunk-ODJNSVNB.js → chunk-JZK5OCZB.js} +1 -1
- package/dist/{chunk-IRMKZYGV.js → chunk-XQB5K7V4.js} +4 -3
- package/dist/{chunk-RZR3EZRL.js → chunk-ZPRDG3RS.js} +1 -1
- package/dist/{core-DUjadxCD.d.ts → core-ChdEzTaQ.d.ts} +6 -2
- package/dist/{core-C2V9aLTP.d.cts → core-DDpzWdxm.d.cts} +6 -2
- package/dist/core.cjs +2 -1
- package/dist/core.css +44 -0
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +3 -3
- package/dist/game.css +3 -0
- package/dist/index.cjs +15 -7
- package/dist/index.css +44 -0
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +14 -8
- package/dist/rich-text-editor.js +2 -2
- package/dist/select-date-range.js +3 -3
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Popover,
|
|
3
3
|
Tooltip
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-B7UK645K.js";
|
|
5
5
|
import {
|
|
6
6
|
Dropdown
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XQB5K7V4.js";
|
|
8
8
|
import {
|
|
9
9
|
TextArea
|
|
10
10
|
} from "./chunk-SCEHVGKV.js";
|
|
@@ -1524,6 +1524,7 @@ function UploadItem({ file, files, props, actions }) {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
var UploadRoot = forwardRef(function UploadRoot2({
|
|
1526
1526
|
accept,
|
|
1527
|
+
acceptMode = "validate",
|
|
1527
1528
|
multiple = false,
|
|
1528
1529
|
directory = false,
|
|
1529
1530
|
recursive = true,
|
|
@@ -1711,7 +1712,7 @@ var UploadRoot = forwardRef(function UploadRoot2({
|
|
|
1711
1712
|
const selected = multiple || directory ? filtered : filtered.slice(0, 1);
|
|
1712
1713
|
const added = [];
|
|
1713
1714
|
for (const { file, path } of selected) {
|
|
1714
|
-
if (!acceptsUploadFile(file, accept)) {
|
|
1715
|
+
if (acceptMode === "validate" && !acceptsUploadFile(file, accept)) {
|
|
1715
1716
|
onReject?.({ file, reason: "accept" });
|
|
1716
1717
|
continue;
|
|
1717
1718
|
}
|
|
@@ -247,8 +247,8 @@ function Menu({
|
|
|
247
247
|
const gridStyle = mode === "grid" ? { "--sia-menu-grid-columns": gridColumns === "auto" ? "repeat(auto-fill, minmax(88px, 1fr))" : `repeat(${Number.isFinite(gridColumns) ? Math.max(1, Math.floor(Number(gridColumns))) : 2}, minmax(0, 1fr))` } : {};
|
|
248
248
|
return /* @__PURE__ */ jsx("ul", { ref: rootRef, className: `sia-menu sia-menu--${mode} sia-menu--${theme}${inlineCollapsed ? " sia-menu--collapsed" : ""} ${className}`.trim(), role: "menu", ...withTitleTooltip(rest), style: { ...gridStyle, ...style }, "data-sia-menu-owner": menuId, children: /* @__PURE__ */ jsx(MenuLevel, { items, level: 0, parents: [], props: { interactionCursor, menuId, mode, theme, multiple, selectable, inlineCollapsed, inlineIndent, triggerSubMenuAction, selected, open, select, toggle } }) });
|
|
249
249
|
}
|
|
250
|
-
function Steps({ items, current = 0, initial = 0, direction = "horizontal", type = "default", size = "default", status = "process", progressDot = false, onChange, className = "", ...props }) {
|
|
251
|
-
return /* @__PURE__ */ jsx("div", { className: `sia-steps sia-steps--${direction} sia-steps--${type} sia-steps--${size} ${className}`.trim(), ...withTitleTooltip(props), children: items.map((item, rawIndex) => {
|
|
250
|
+
function Steps({ items, current = 0, initial = 0, direction = "horizontal", labelPlacement = "vertical", type = "default", size = "default", status = "process", progressDot = false, onChange, className = "", ...props }) {
|
|
251
|
+
return /* @__PURE__ */ jsx("div", { className: `sia-steps sia-steps--${direction} sia-steps--${type} sia-steps--${size} sia-steps--label-${labelPlacement} ${className}`.trim(), ...withTitleTooltip(props), children: items.map((item, rawIndex) => {
|
|
252
252
|
const index = rawIndex + initial;
|
|
253
253
|
const itemStatus = item.status ?? (index < current ? "finish" : index === current ? status : "wait");
|
|
254
254
|
const dot = /* @__PURE__ */ jsx("span", { className: "sia-steps__dot" });
|
|
@@ -264,7 +264,8 @@ function Steps({ items, current = 0, initial = 0, direction = "horizontal", type
|
|
|
264
264
|
item.subTitle ? /* @__PURE__ */ jsx("small", { children: item.subTitle }) : null
|
|
265
265
|
] }),
|
|
266
266
|
item.description ? /* @__PURE__ */ jsx("span", { className: "sia-steps__description", children: item.description }) : null
|
|
267
|
-
] })
|
|
267
|
+
] }),
|
|
268
|
+
direction === "horizontal" && labelPlacement === "horizontal" ? /* @__PURE__ */ jsx("span", { className: "sia-steps__tail sia-steps__inline-tail" }) : null
|
|
268
269
|
] }, index);
|
|
269
270
|
}) });
|
|
270
271
|
}
|
|
@@ -636,6 +636,8 @@ type StepItem = {
|
|
|
636
636
|
};
|
|
637
637
|
/** 步骤条的属性配置。 */
|
|
638
638
|
interface StepsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
639
|
+
/** 横向步骤条的标题位置:vertical 在图标下方,horizontal 在图标右侧;纵向和窄屏堆叠时保持原布局。默认 vertical。 */
|
|
640
|
+
labelPlacement?: "horizontal" | "vertical";
|
|
639
641
|
/** 按展示顺序排列的项目配置。 */
|
|
640
642
|
items: readonly StepItem[];
|
|
641
643
|
/**
|
|
@@ -689,7 +691,7 @@ interface StepsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
|
689
691
|
onChange?: (current: number) => void;
|
|
690
692
|
}
|
|
691
693
|
/** 步骤条组件。 */
|
|
692
|
-
declare function Steps({ items, current, initial, direction, type, size, status, progressDot, onChange, className, ...props }: StepsProps): react.JSX.Element;
|
|
694
|
+
declare function Steps({ items, current, initial, direction, labelPlacement, type, size, status, progressDot, onChange, className, ...props }: StepsProps): react.JSX.Element;
|
|
693
695
|
/** 分段选择的值类型。 */
|
|
694
696
|
type SegmentedValue = string | number;
|
|
695
697
|
/** 分段选择的候选项定义。 */
|
|
@@ -2098,8 +2100,10 @@ interface UploadRef {
|
|
|
2098
2100
|
}
|
|
2099
2101
|
/** 文件上传属性;未配置 request/customRequest 时仅选择文件,不模拟上传成功。 */
|
|
2100
2102
|
interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
|
|
2101
|
-
/** 扩展名或 MIME
|
|
2103
|
+
/** 扩展名或 MIME 类型,逗号分隔;默认对点击、拖拽和粘贴均校验,acceptMode="hint" 时仅作为系统文件选择器提示。 */
|
|
2102
2104
|
accept?: string;
|
|
2105
|
+
/** 文件类型校验方式:validate 在进入队列前按 accept 拒绝不匹配文件;hint 仅保留文件选择器过滤提示,全部所选文件继续交给 beforeUpload,便于业务生成完整失败明细。默认 validate;hint 模式须由业务校验类型,不改变 maxCount、禁用或目录规则。 */
|
|
2106
|
+
acceptMode?: "validate" | "hint";
|
|
2103
2107
|
/** 每批是否允许多个文件;false 仅取首个,directory 模式不受此限制。 @defaultValue false */
|
|
2104
2108
|
multiple?: boolean;
|
|
2105
2109
|
/** 选择或拖入文件夹,文件路径保存在 relativePath;不会上传空目录。 @defaultValue false */
|
|
@@ -636,6 +636,8 @@ type StepItem = {
|
|
|
636
636
|
};
|
|
637
637
|
/** 步骤条的属性配置。 */
|
|
638
638
|
interface StepsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
639
|
+
/** 横向步骤条的标题位置:vertical 在图标下方,horizontal 在图标右侧;纵向和窄屏堆叠时保持原布局。默认 vertical。 */
|
|
640
|
+
labelPlacement?: "horizontal" | "vertical";
|
|
639
641
|
/** 按展示顺序排列的项目配置。 */
|
|
640
642
|
items: readonly StepItem[];
|
|
641
643
|
/**
|
|
@@ -689,7 +691,7 @@ interface StepsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
|
689
691
|
onChange?: (current: number) => void;
|
|
690
692
|
}
|
|
691
693
|
/** 步骤条组件。 */
|
|
692
|
-
declare function Steps({ items, current, initial, direction, type, size, status, progressDot, onChange, className, ...props }: StepsProps): react.JSX.Element;
|
|
694
|
+
declare function Steps({ items, current, initial, direction, labelPlacement, type, size, status, progressDot, onChange, className, ...props }: StepsProps): react.JSX.Element;
|
|
693
695
|
/** 分段选择的值类型。 */
|
|
694
696
|
type SegmentedValue = string | number;
|
|
695
697
|
/** 分段选择的候选项定义。 */
|
|
@@ -2098,8 +2100,10 @@ interface UploadRef {
|
|
|
2098
2100
|
}
|
|
2099
2101
|
/** 文件上传属性;未配置 request/customRequest 时仅选择文件,不模拟上传成功。 */
|
|
2100
2102
|
interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
|
|
2101
|
-
/** 扩展名或 MIME
|
|
2103
|
+
/** 扩展名或 MIME 类型,逗号分隔;默认对点击、拖拽和粘贴均校验,acceptMode="hint" 时仅作为系统文件选择器提示。 */
|
|
2102
2104
|
accept?: string;
|
|
2105
|
+
/** 文件类型校验方式:validate 在进入队列前按 accept 拒绝不匹配文件;hint 仅保留文件选择器过滤提示,全部所选文件继续交给 beforeUpload,便于业务生成完整失败明细。默认 validate;hint 模式须由业务校验类型,不改变 maxCount、禁用或目录规则。 */
|
|
2106
|
+
acceptMode?: "validate" | "hint";
|
|
2103
2107
|
/** 每批是否允许多个文件;false 仅取首个,directory 模式不受此限制。 @defaultValue false */
|
|
2104
2108
|
multiple?: boolean;
|
|
2105
2109
|
/** 选择或拖入文件夹,文件路径保存在 relativePath;不会上传空目录。 @defaultValue false */
|
package/dist/core.cjs
CHANGED
|
@@ -5224,6 +5224,7 @@ function UploadItem({ file, files, props, actions }) {
|
|
|
5224
5224
|
}
|
|
5225
5225
|
var UploadRoot = (0, import_react26.forwardRef)(function UploadRoot2({
|
|
5226
5226
|
accept,
|
|
5227
|
+
acceptMode = "validate",
|
|
5227
5228
|
multiple = false,
|
|
5228
5229
|
directory = false,
|
|
5229
5230
|
recursive = true,
|
|
@@ -5411,7 +5412,7 @@ var UploadRoot = (0, import_react26.forwardRef)(function UploadRoot2({
|
|
|
5411
5412
|
const selected = multiple || directory ? filtered : filtered.slice(0, 1);
|
|
5412
5413
|
const added = [];
|
|
5413
5414
|
for (const { file, path } of selected) {
|
|
5414
|
-
if (!acceptsUploadFile(file, accept)) {
|
|
5415
|
+
if (acceptMode === "validate" && !acceptsUploadFile(file, accept)) {
|
|
5415
5416
|
onReject?.({ file, reason: "accept" });
|
|
5416
5417
|
continue;
|
|
5417
5418
|
}
|
package/dist/core.css
CHANGED
|
@@ -3861,6 +3861,9 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3861
3861
|
.sia-table__row--striped .sia-table__cell {
|
|
3862
3862
|
background: color-mix(in srgb, var(--sia-color-background) 55%, var(--sia-color-surface));
|
|
3863
3863
|
}
|
|
3864
|
+
.sia-table__row--info .sia-table__cell {
|
|
3865
|
+
background: color-mix(in srgb, var(--sia-color-primary) 10%, var(--sia-color-surface));
|
|
3866
|
+
}
|
|
3864
3867
|
.sia-table__row--success .sia-table__cell {
|
|
3865
3868
|
background: color-mix(in srgb, var(--sia-color-success) 10%, var(--sia-color-surface));
|
|
3866
3869
|
}
|
|
@@ -8870,6 +8873,47 @@ button.sia-pagination__total:disabled {
|
|
|
8870
8873
|
margin: 4px 0 0 12px;
|
|
8871
8874
|
padding: 0;
|
|
8872
8875
|
}
|
|
8876
|
+
.sia-steps__inline-tail {
|
|
8877
|
+
display: none;
|
|
8878
|
+
}
|
|
8879
|
+
@media (min-width: 721px) {
|
|
8880
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__item {
|
|
8881
|
+
flex-direction: row;
|
|
8882
|
+
align-items: flex-start;
|
|
8883
|
+
}
|
|
8884
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__item:last-child {
|
|
8885
|
+
flex: 0 0 auto;
|
|
8886
|
+
}
|
|
8887
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__head {
|
|
8888
|
+
width: auto;
|
|
8889
|
+
}
|
|
8890
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__head .sia-steps__tail {
|
|
8891
|
+
display: none;
|
|
8892
|
+
}
|
|
8893
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__content {
|
|
8894
|
+
width: auto;
|
|
8895
|
+
flex: 0 1 auto;
|
|
8896
|
+
margin: 0 0 0 10px;
|
|
8897
|
+
padding: 0;
|
|
8898
|
+
}
|
|
8899
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__title {
|
|
8900
|
+
line-height: 32px;
|
|
8901
|
+
}
|
|
8902
|
+
.sia-steps--horizontal.sia-steps--label-horizontal.sia-steps--small .sia-steps__title {
|
|
8903
|
+
line-height: 26px;
|
|
8904
|
+
}
|
|
8905
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__inline-tail {
|
|
8906
|
+
display: block;
|
|
8907
|
+
min-width: 12px;
|
|
8908
|
+
margin-block-start: 16px;
|
|
8909
|
+
}
|
|
8910
|
+
.sia-steps--horizontal.sia-steps--label-horizontal.sia-steps--small .sia-steps__inline-tail {
|
|
8911
|
+
margin-block-start: 13px;
|
|
8912
|
+
}
|
|
8913
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__item:last-child .sia-steps__inline-tail {
|
|
8914
|
+
display: none;
|
|
8915
|
+
}
|
|
8916
|
+
}
|
|
8873
8917
|
.sia-segmented {
|
|
8874
8918
|
display: inline-flex;
|
|
8875
8919
|
align-items: stretch;
|
package/dist/core.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, W as Input, X as InputProps, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, ad as Progress, ae as ProgressProps, af as ProgressStatus, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, av as TabItem, aw as Tabs, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, T as TagStatus, aF as TagVariant, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b6 as UploadProps, ba as UploadRequestOptions, be as message } from './core-
|
|
1
|
+
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, W as Input, X as InputProps, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, ad as Progress, ae as ProgressProps, af as ProgressStatus, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, av as TabItem, aw as Tabs, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, T as TagStatus, aF as TagVariant, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b6 as UploadProps, ba as UploadRequestOptions, be as message } from './core-DDpzWdxm.cjs';
|
|
2
2
|
export { b as Button, B as ButtonProps, a as ButtonSize, c as ButtonVariant } from './Button-O_pNB3SQ.cjs';
|
|
3
3
|
export { e as Modal, d as ModalActionResult, M as ModalOpenConfig, f as ModalProps, g as ModalType, a as OverlayApiHandle, h as Select, S as SelectOption, c as SelectProps, j as SelectValue } from './Select-B9hlqeO5.cjs';
|
|
4
4
|
import 'react';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, W as Input, X as InputProps, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, ad as Progress, ae as ProgressProps, af as ProgressStatus, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, av as TabItem, aw as Tabs, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, T as TagStatus, aF as TagVariant, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b6 as UploadProps, ba as UploadRequestOptions, be as message } from './core-
|
|
1
|
+
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, W as Input, X as InputProps, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, ad as Progress, ae as ProgressProps, af as ProgressStatus, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, av as TabItem, aw as Tabs, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, T as TagStatus, aF as TagVariant, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b6 as UploadProps, ba as UploadRequestOptions, be as message } from './core-ChdEzTaQ.js';
|
|
2
2
|
export { b as Button, B as ButtonProps, a as ButtonSize, c as ButtonVariant } from './Button-BiL3Wjsd.js';
|
|
3
3
|
export { e as Modal, d as ModalActionResult, M as ModalOpenConfig, f as ModalProps, g as ModalType, a as OverlayApiHandle, h as Select, S as SelectOption, c as SelectProps, j as SelectValue } from './Select-DgZW5a7j.js';
|
|
4
4
|
import 'react';
|
package/dist/core.js
CHANGED
|
@@ -11,15 +11,15 @@ import {
|
|
|
11
11
|
Typography,
|
|
12
12
|
Upload,
|
|
13
13
|
message
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-B6MU2BBG.js";
|
|
15
15
|
import "./chunk-RX242MUO.js";
|
|
16
16
|
import {
|
|
17
17
|
Select
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-B7UK645K.js";
|
|
19
19
|
import {
|
|
20
20
|
Input,
|
|
21
21
|
Segmented
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XQB5K7V4.js";
|
|
23
23
|
import "./chunk-SCEHVGKV.js";
|
|
24
24
|
import {
|
|
25
25
|
Icon,
|
package/dist/game.css
CHANGED
|
@@ -3870,6 +3870,9 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3870
3870
|
.sia-table__row--striped .sia-table__cell {
|
|
3871
3871
|
background: color-mix(in srgb, var(--sia-color-background) 55%, var(--sia-color-surface));
|
|
3872
3872
|
}
|
|
3873
|
+
.sia-table__row--info .sia-table__cell {
|
|
3874
|
+
background: color-mix(in srgb, var(--sia-color-primary) 10%, var(--sia-color-surface));
|
|
3875
|
+
}
|
|
3873
3876
|
.sia-table__row--success .sia-table__cell {
|
|
3874
3877
|
background: color-mix(in srgb, var(--sia-color-success) 10%, var(--sia-color-surface));
|
|
3875
3878
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -2708,8 +2708,8 @@ function Menu({
|
|
|
2708
2708
|
const gridStyle = mode === "grid" ? { "--sia-menu-grid-columns": gridColumns === "auto" ? "repeat(auto-fill, minmax(88px, 1fr))" : `repeat(${Number.isFinite(gridColumns) ? Math.max(1, Math.floor(Number(gridColumns))) : 2}, minmax(0, 1fr))` } : {};
|
|
2709
2709
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("ul", { ref: rootRef, className: `sia-menu sia-menu--${mode} sia-menu--${theme}${inlineCollapsed ? " sia-menu--collapsed" : ""} ${className}`.trim(), role: "menu", ...withTitleTooltip(rest), style: { ...gridStyle, ...style }, "data-sia-menu-owner": menuId, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MenuLevel, { items, level: 0, parents: [], props: { interactionCursor, menuId, mode, theme, multiple, selectable, inlineCollapsed, inlineIndent, triggerSubMenuAction, selected, open, select, toggle } }) });
|
|
2710
2710
|
}
|
|
2711
|
-
function Steps({ items, current = 0, initial: initial3 = 0, direction = "horizontal", type = "default", size = "default", status = "process", progressDot = false, onChange, className = "", ...props }) {
|
|
2712
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: `sia-steps sia-steps--${direction} sia-steps--${type} sia-steps--${size} ${className}`.trim(), ...withTitleTooltip(props), children: items.map((item, rawIndex) => {
|
|
2711
|
+
function Steps({ items, current = 0, initial: initial3 = 0, direction = "horizontal", labelPlacement = "vertical", type = "default", size = "default", status = "process", progressDot = false, onChange, className = "", ...props }) {
|
|
2712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: `sia-steps sia-steps--${direction} sia-steps--${type} sia-steps--${size} sia-steps--label-${labelPlacement} ${className}`.trim(), ...withTitleTooltip(props), children: items.map((item, rawIndex) => {
|
|
2713
2713
|
const index = rawIndex + initial3;
|
|
2714
2714
|
const itemStatus = item.status ?? (index < current ? "finish" : index === current ? status : "wait");
|
|
2715
2715
|
const dot = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sia-steps__dot" });
|
|
@@ -2725,7 +2725,8 @@ function Steps({ items, current = 0, initial: initial3 = 0, direction = "horizon
|
|
|
2725
2725
|
item.subTitle ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("small", { children: item.subTitle }) : null
|
|
2726
2726
|
] }),
|
|
2727
2727
|
item.description ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sia-steps__description", children: item.description }) : null
|
|
2728
|
-
] })
|
|
2728
|
+
] }),
|
|
2729
|
+
direction === "horizontal" && labelPlacement === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sia-steps__tail sia-steps__inline-tail" }) : null
|
|
2729
2730
|
] }, index);
|
|
2730
2731
|
}) });
|
|
2731
2732
|
}
|
|
@@ -9921,6 +9922,7 @@ function UploadItem({ file, files, props, actions }) {
|
|
|
9921
9922
|
}
|
|
9922
9923
|
var UploadRoot = (0, import_react42.forwardRef)(function UploadRoot2({
|
|
9923
9924
|
accept,
|
|
9925
|
+
acceptMode = "validate",
|
|
9924
9926
|
multiple = false,
|
|
9925
9927
|
directory = false,
|
|
9926
9928
|
recursive = true,
|
|
@@ -10108,7 +10110,7 @@ var UploadRoot = (0, import_react42.forwardRef)(function UploadRoot2({
|
|
|
10108
10110
|
const selected = multiple || directory ? filtered : filtered.slice(0, 1);
|
|
10109
10111
|
const added = [];
|
|
10110
10112
|
for (const { file, path } of selected) {
|
|
10111
|
-
if (!acceptsUploadFile(file, accept)) {
|
|
10113
|
+
if (acceptMode === "validate" && !acceptsUploadFile(file, accept)) {
|
|
10112
10114
|
onReject?.({ file, reason: "accept" });
|
|
10113
10115
|
continue;
|
|
10114
10116
|
}
|
|
@@ -16404,6 +16406,7 @@ function TableInner(props, ref) {
|
|
|
16404
16406
|
loading = false,
|
|
16405
16407
|
emptyText = "\u6682\u65E0\u6570\u636E",
|
|
16406
16408
|
height,
|
|
16409
|
+
maxBodyHeight,
|
|
16407
16410
|
tableHeight,
|
|
16408
16411
|
fillRemaining,
|
|
16409
16412
|
size = "medium",
|
|
@@ -16674,7 +16677,8 @@ function TableInner(props, ref) {
|
|
|
16674
16677
|
const rightFixedEdgeKey = leafColumns.find((column) => normalizeFixed(column.fixed) === "right")?.key;
|
|
16675
16678
|
const canvas = renderMode === "canvas" && !sortedPlugins.some((plugin) => plugin.disableVirtual);
|
|
16676
16679
|
const shouldVirtualize = canvas || pipeline.rows.length > 100 || (virtual ?? pipeline.rows.length >= virtualThreshold) && !sortedPlugins.some((plugin) => plugin.disableVirtual);
|
|
16677
|
-
const
|
|
16680
|
+
const firstVisibleIndex = Math.min(Math.floor(scrollTop / rowHeight), Math.max(0, pipeline.rows.length - Math.ceil(viewportHeight / rowHeight)));
|
|
16681
|
+
const startIndex = shouldVirtualize ? Math.max(0, firstVisibleIndex - overscan) : 0;
|
|
16678
16682
|
const visibleCount = shouldVirtualize ? Math.ceil(viewportHeight / rowHeight) + overscan * 2 : pipeline.rows.length;
|
|
16679
16683
|
const endIndex = shouldVirtualize ? Math.min(pipeline.rows.length, startIndex + visibleCount) : pipeline.rows.length;
|
|
16680
16684
|
const renderedRows = pipeline.rows.slice(startIndex, endIndex);
|
|
@@ -16723,7 +16727,10 @@ function TableInner(props, ref) {
|
|
|
16723
16727
|
return content ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react57.Fragment, { children: content }, `overlay-${plugin.id}`) : null;
|
|
16724
16728
|
}).filter(Boolean);
|
|
16725
16729
|
const hasToolbar = toolbarStart.length > 0 || toolbarEnd.length > 0;
|
|
16726
|
-
const effectiveHeight = height ?? tableHeight ?? remainingHeight ?? (shouldVirtualize ? 420 : void 0);
|
|
16730
|
+
const effectiveHeight = height ?? tableHeight ?? remainingHeight ?? (shouldVirtualize && maxBodyHeight == null ? 420 : void 0);
|
|
16731
|
+
const viewportStyle = maxBodyHeight == null ? void 0 : {
|
|
16732
|
+
maxHeight: `calc(${typeof maxBodyHeight === "number" ? `${maxBodyHeight}px` : maxBodyHeight} + var(--sia-table-header-height))`
|
|
16733
|
+
};
|
|
16727
16734
|
const rootStyle = {
|
|
16728
16735
|
...style,
|
|
16729
16736
|
height: effectiveHeight,
|
|
@@ -16926,7 +16933,7 @@ function TableInner(props, ref) {
|
|
|
16926
16933
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { children: toolbarStart }),
|
|
16927
16934
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { children: toolbarEnd })
|
|
16928
16935
|
] }) : null,
|
|
16929
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "sia-table__viewport-wrap", children: [
|
|
16936
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "sia-table__viewport-wrap", style: viewportStyle, children: [
|
|
16930
16937
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "sia-table__viewport", ref: scrollRef, onScroll: handleScroll, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("table", { ref: tableRef, className: "sia-table__element", style: { width: Math.max(totalWidth, 1), ...manualColumnLayout ? { minWidth: 0 } : {}, ...tableStyle }, children: [
|
|
16931
16938
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("colgroup", { children: leafColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("col", { "data-column-key": column.key, style: { width: columnWidths.get(column.key) ?? DEFAULT_WIDTH } }, column.key)) }),
|
|
16932
16939
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("thead", { className: stickyHeader ? "sia-table__head sia-table__head--sticky" : "sia-table__head", children: headerRows.map((headerRow, depth) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tr", { children: headerRow.map((cell) => {
|
|
@@ -16956,6 +16963,7 @@ function TableInner(props, ref) {
|
|
|
16956
16963
|
);
|
|
16957
16964
|
}) }, depth)) }),
|
|
16958
16965
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("tbody", { children: [
|
|
16966
|
+
maxBodyHeight != null && pipeline.rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tr", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("td", { colSpan: leafColumns.length, style: { height: 120, padding: 0, border: 0 } }) }) : null,
|
|
16959
16967
|
pipeline.rows.length === 0 && summaries.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tr", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("td", { colSpan: leafColumns.length, style: { height: Math.max(0, viewportHeight - (headerRows.length + summaries.length) * rowHeight), padding: 0, border: 0 } }) }) : null,
|
|
16960
16968
|
topSpacer > 0 ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tr", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("td", { colSpan: leafColumns.length, style: { height: topSpacer, padding: 0, border: 0 } }) }) : null,
|
|
16961
16969
|
renderedRows.map((row, offset) => {
|
package/dist/index.css
CHANGED
|
@@ -3861,6 +3861,9 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3861
3861
|
.sia-table__row--striped .sia-table__cell {
|
|
3862
3862
|
background: color-mix(in srgb, var(--sia-color-background) 55%, var(--sia-color-surface));
|
|
3863
3863
|
}
|
|
3864
|
+
.sia-table__row--info .sia-table__cell {
|
|
3865
|
+
background: color-mix(in srgb, var(--sia-color-primary) 10%, var(--sia-color-surface));
|
|
3866
|
+
}
|
|
3864
3867
|
.sia-table__row--success .sia-table__cell {
|
|
3865
3868
|
background: color-mix(in srgb, var(--sia-color-success) 10%, var(--sia-color-surface));
|
|
3866
3869
|
}
|
|
@@ -8870,6 +8873,47 @@ button.sia-pagination__total:disabled {
|
|
|
8870
8873
|
margin: 4px 0 0 12px;
|
|
8871
8874
|
padding: 0;
|
|
8872
8875
|
}
|
|
8876
|
+
.sia-steps__inline-tail {
|
|
8877
|
+
display: none;
|
|
8878
|
+
}
|
|
8879
|
+
@media (min-width: 721px) {
|
|
8880
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__item {
|
|
8881
|
+
flex-direction: row;
|
|
8882
|
+
align-items: flex-start;
|
|
8883
|
+
}
|
|
8884
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__item:last-child {
|
|
8885
|
+
flex: 0 0 auto;
|
|
8886
|
+
}
|
|
8887
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__head {
|
|
8888
|
+
width: auto;
|
|
8889
|
+
}
|
|
8890
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__head .sia-steps__tail {
|
|
8891
|
+
display: none;
|
|
8892
|
+
}
|
|
8893
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__content {
|
|
8894
|
+
width: auto;
|
|
8895
|
+
flex: 0 1 auto;
|
|
8896
|
+
margin: 0 0 0 10px;
|
|
8897
|
+
padding: 0;
|
|
8898
|
+
}
|
|
8899
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__title {
|
|
8900
|
+
line-height: 32px;
|
|
8901
|
+
}
|
|
8902
|
+
.sia-steps--horizontal.sia-steps--label-horizontal.sia-steps--small .sia-steps__title {
|
|
8903
|
+
line-height: 26px;
|
|
8904
|
+
}
|
|
8905
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__inline-tail {
|
|
8906
|
+
display: block;
|
|
8907
|
+
min-width: 12px;
|
|
8908
|
+
margin-block-start: 16px;
|
|
8909
|
+
}
|
|
8910
|
+
.sia-steps--horizontal.sia-steps--label-horizontal.sia-steps--small .sia-steps__inline-tail {
|
|
8911
|
+
margin-block-start: 13px;
|
|
8912
|
+
}
|
|
8913
|
+
.sia-steps--horizontal.sia-steps--label-horizontal .sia-steps__item:last-child .sia-steps__inline-tail {
|
|
8914
|
+
display: none;
|
|
8915
|
+
}
|
|
8916
|
+
}
|
|
8873
8917
|
.sia-segmented {
|
|
8874
8918
|
display: inline-flex;
|
|
8875
8919
|
align-items: stretch;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
|
|
3
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
4
|
-
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-
|
|
3
|
+
import { T as TagStatus, B as BadgeProps } from './core-DDpzWdxm.cjs';
|
|
4
|
+
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-DDpzWdxm.cjs';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
|
|
6
6
|
import { B as ButtonProps, a as ButtonSize } from './Button-O_pNB3SQ.cjs';
|
|
7
7
|
export { b as Button, c as ButtonVariant } from './Button-O_pNB3SQ.cjs';
|
|
@@ -2268,6 +2268,8 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
2268
2268
|
emptyText?: ReactNode;
|
|
2269
2269
|
/** 高度;数值按像素处理,字符串可使用 CSS 尺寸。 */
|
|
2270
2270
|
height?: number | string;
|
|
2271
|
+
/** 数据内容区的最大高度(不含表头、工具栏和分页);数值为 px,字符串为 CSS 长度。少量行按自然高度展示,超出后内部滚动;不设置则不额外限制。与 height 同时使用时两者共同约束。 */
|
|
2272
|
+
maxBodyHeight?: number | string;
|
|
2271
2273
|
/**
|
|
2272
2274
|
* 自动填充从表格顶部到可视区域底部的剩余高度,包含工具栏和分页;true 使用当前窗口视口。
|
|
2273
2275
|
* 查询区尺寸、祖先布局、窗口尺寸及隐藏页签显示后自动重测。height / tableHeight 显式设置时优先。
|
|
@@ -2331,11 +2333,11 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
2331
2333
|
/** 单元格右键事件,可用于业务上下文菜单 */
|
|
2332
2334
|
onCellContextMenu?: (record: T, column: TableColumn<T>, index: number, event: MouseEvent<HTMLTableCellElement>) => void;
|
|
2333
2335
|
/**
|
|
2334
|
-
*
|
|
2336
|
+
* 行的语义状态,info 使用主题蓝色表示进行中或提示,success / warning / error 分别使用成功、警告、错误背景色;默认不设置。
|
|
2335
2337
|
* 可传固定状态或计算函数,函数参数为当前记录和原始数据索引,返回 undefined 时沿用普通行背景。
|
|
2336
2338
|
* 状态背景覆盖斑马纹,悬停和勾选反馈优先;普通列、固定列及 Canvas 模式行为一致。
|
|
2337
2339
|
*/
|
|
2338
|
-
rowStatus?: "success" | "warning" | "error" | ((record: T, index: number) => "success" | "warning" | "error" | undefined);
|
|
2340
|
+
rowStatus?: "info" | "success" | "warning" | "error" | ((record: T, index: number) => "info" | "success" | "warning" | "error" | undefined);
|
|
2339
2341
|
/** 行的 CSS 类名或计算函数。 */
|
|
2340
2342
|
rowClassName?: string | ((record: T, index: number) => string);
|
|
2341
2343
|
/** 表格元素的内联样式。 */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
|
|
3
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
4
|
-
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-
|
|
3
|
+
import { T as TagStatus, B as BadgeProps } from './core-ChdEzTaQ.js';
|
|
4
|
+
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-ChdEzTaQ.js';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.js';
|
|
6
6
|
import { B as ButtonProps, a as ButtonSize } from './Button-BiL3Wjsd.js';
|
|
7
7
|
export { b as Button, c as ButtonVariant } from './Button-BiL3Wjsd.js';
|
|
@@ -2268,6 +2268,8 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
2268
2268
|
emptyText?: ReactNode;
|
|
2269
2269
|
/** 高度;数值按像素处理,字符串可使用 CSS 尺寸。 */
|
|
2270
2270
|
height?: number | string;
|
|
2271
|
+
/** 数据内容区的最大高度(不含表头、工具栏和分页);数值为 px,字符串为 CSS 长度。少量行按自然高度展示,超出后内部滚动;不设置则不额外限制。与 height 同时使用时两者共同约束。 */
|
|
2272
|
+
maxBodyHeight?: number | string;
|
|
2271
2273
|
/**
|
|
2272
2274
|
* 自动填充从表格顶部到可视区域底部的剩余高度,包含工具栏和分页;true 使用当前窗口视口。
|
|
2273
2275
|
* 查询区尺寸、祖先布局、窗口尺寸及隐藏页签显示后自动重测。height / tableHeight 显式设置时优先。
|
|
@@ -2331,11 +2333,11 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
2331
2333
|
/** 单元格右键事件,可用于业务上下文菜单 */
|
|
2332
2334
|
onCellContextMenu?: (record: T, column: TableColumn<T>, index: number, event: MouseEvent<HTMLTableCellElement>) => void;
|
|
2333
2335
|
/**
|
|
2334
|
-
*
|
|
2336
|
+
* 行的语义状态,info 使用主题蓝色表示进行中或提示,success / warning / error 分别使用成功、警告、错误背景色;默认不设置。
|
|
2335
2337
|
* 可传固定状态或计算函数,函数参数为当前记录和原始数据索引,返回 undefined 时沿用普通行背景。
|
|
2336
2338
|
* 状态背景覆盖斑马纹,悬停和勾选反馈优先;普通列、固定列及 Canvas 模式行为一致。
|
|
2337
2339
|
*/
|
|
2338
|
-
rowStatus?: "success" | "warning" | "error" | ((record: T, index: number) => "success" | "warning" | "error" | undefined);
|
|
2340
|
+
rowStatus?: "info" | "success" | "warning" | "error" | ((record: T, index: number) => "info" | "success" | "warning" | "error" | undefined);
|
|
2339
2341
|
/** 行的 CSS 类名或计算函数。 */
|
|
2340
2342
|
rowClassName?: string | ((record: T, index: number) => string);
|
|
2341
2343
|
/** 表格元素的内联样式。 */
|
package/dist/index.js
CHANGED
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
Watermark,
|
|
83
83
|
message,
|
|
84
84
|
notification
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-B6MU2BBG.js";
|
|
86
86
|
import "./chunk-RX242MUO.js";
|
|
87
87
|
import {
|
|
88
88
|
MarkdownEditor
|
|
@@ -90,12 +90,12 @@ import {
|
|
|
90
90
|
import {
|
|
91
91
|
RichTextContent,
|
|
92
92
|
RichTextEditor
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-JZK5OCZB.js";
|
|
94
94
|
import {
|
|
95
95
|
DatePicker,
|
|
96
96
|
SelectDateRange,
|
|
97
97
|
TimePanel
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-ZPRDG3RS.js";
|
|
99
99
|
import {
|
|
100
100
|
Checkbox,
|
|
101
101
|
FloatingScrollbarProvider,
|
|
@@ -107,14 +107,14 @@ import {
|
|
|
107
107
|
Tooltip,
|
|
108
108
|
Tree,
|
|
109
109
|
useScrollbarProximity
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-B7UK645K.js";
|
|
111
111
|
import {
|
|
112
112
|
Dropdown,
|
|
113
113
|
Input,
|
|
114
114
|
Menu,
|
|
115
115
|
Segmented,
|
|
116
116
|
Steps
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-XQB5K7V4.js";
|
|
118
118
|
import {
|
|
119
119
|
TextArea
|
|
120
120
|
} from "./chunk-SCEHVGKV.js";
|
|
@@ -8343,6 +8343,7 @@ function TableInner(props, ref) {
|
|
|
8343
8343
|
loading = false,
|
|
8344
8344
|
emptyText = "\u6682\u65E0\u6570\u636E",
|
|
8345
8345
|
height,
|
|
8346
|
+
maxBodyHeight,
|
|
8346
8347
|
tableHeight,
|
|
8347
8348
|
fillRemaining,
|
|
8348
8349
|
size = "medium",
|
|
@@ -8613,7 +8614,8 @@ function TableInner(props, ref) {
|
|
|
8613
8614
|
const rightFixedEdgeKey = leafColumns.find((column) => normalizeFixed(column.fixed) === "right")?.key;
|
|
8614
8615
|
const canvas = renderMode === "canvas" && !sortedPlugins.some((plugin) => plugin.disableVirtual);
|
|
8615
8616
|
const shouldVirtualize = canvas || pipeline.rows.length > 100 || (virtual ?? pipeline.rows.length >= virtualThreshold) && !sortedPlugins.some((plugin) => plugin.disableVirtual);
|
|
8616
|
-
const
|
|
8617
|
+
const firstVisibleIndex = Math.min(Math.floor(scrollTop / rowHeight), Math.max(0, pipeline.rows.length - Math.ceil(viewportHeight / rowHeight)));
|
|
8618
|
+
const startIndex = shouldVirtualize ? Math.max(0, firstVisibleIndex - overscan) : 0;
|
|
8617
8619
|
const visibleCount = shouldVirtualize ? Math.ceil(viewportHeight / rowHeight) + overscan * 2 : pipeline.rows.length;
|
|
8618
8620
|
const endIndex = shouldVirtualize ? Math.min(pipeline.rows.length, startIndex + visibleCount) : pipeline.rows.length;
|
|
8619
8621
|
const renderedRows = pipeline.rows.slice(startIndex, endIndex);
|
|
@@ -8662,7 +8664,10 @@ function TableInner(props, ref) {
|
|
|
8662
8664
|
return content ? /* @__PURE__ */ jsx25(Fragment8, { children: content }, `overlay-${plugin.id}`) : null;
|
|
8663
8665
|
}).filter(Boolean);
|
|
8664
8666
|
const hasToolbar = toolbarStart.length > 0 || toolbarEnd.length > 0;
|
|
8665
|
-
const effectiveHeight = height ?? tableHeight ?? remainingHeight ?? (shouldVirtualize ? 420 : void 0);
|
|
8667
|
+
const effectiveHeight = height ?? tableHeight ?? remainingHeight ?? (shouldVirtualize && maxBodyHeight == null ? 420 : void 0);
|
|
8668
|
+
const viewportStyle = maxBodyHeight == null ? void 0 : {
|
|
8669
|
+
maxHeight: `calc(${typeof maxBodyHeight === "number" ? `${maxBodyHeight}px` : maxBodyHeight} + var(--sia-table-header-height))`
|
|
8670
|
+
};
|
|
8666
8671
|
const rootStyle = {
|
|
8667
8672
|
...style,
|
|
8668
8673
|
height: effectiveHeight,
|
|
@@ -8865,7 +8870,7 @@ function TableInner(props, ref) {
|
|
|
8865
8870
|
/* @__PURE__ */ jsx25("div", { children: toolbarStart }),
|
|
8866
8871
|
/* @__PURE__ */ jsx25("div", { children: toolbarEnd })
|
|
8867
8872
|
] }) : null,
|
|
8868
|
-
/* @__PURE__ */ jsxs23("div", { className: "sia-table__viewport-wrap", children: [
|
|
8873
|
+
/* @__PURE__ */ jsxs23("div", { className: "sia-table__viewport-wrap", style: viewportStyle, children: [
|
|
8869
8874
|
/* @__PURE__ */ jsx25("div", { className: "sia-table__viewport", ref: scrollRef, onScroll: handleScroll, children: /* @__PURE__ */ jsxs23("table", { ref: tableRef, className: "sia-table__element", style: { width: Math.max(totalWidth, 1), ...manualColumnLayout ? { minWidth: 0 } : {}, ...tableStyle }, children: [
|
|
8870
8875
|
/* @__PURE__ */ jsx25("colgroup", { children: leafColumns.map((column) => /* @__PURE__ */ jsx25("col", { "data-column-key": column.key, style: { width: columnWidths.get(column.key) ?? DEFAULT_WIDTH } }, column.key)) }),
|
|
8871
8876
|
/* @__PURE__ */ jsx25("thead", { className: stickyHeader ? "sia-table__head sia-table__head--sticky" : "sia-table__head", children: headerRows.map((headerRow, depth) => /* @__PURE__ */ jsx25("tr", { children: headerRow.map((cell) => {
|
|
@@ -8895,6 +8900,7 @@ function TableInner(props, ref) {
|
|
|
8895
8900
|
);
|
|
8896
8901
|
}) }, depth)) }),
|
|
8897
8902
|
/* @__PURE__ */ jsxs23("tbody", { children: [
|
|
8903
|
+
maxBodyHeight != null && pipeline.rows.length === 0 ? /* @__PURE__ */ jsx25("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx25("td", { colSpan: leafColumns.length, style: { height: 120, padding: 0, border: 0 } }) }) : null,
|
|
8898
8904
|
pipeline.rows.length === 0 && summaries.length > 0 ? /* @__PURE__ */ jsx25("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx25("td", { colSpan: leafColumns.length, style: { height: Math.max(0, viewportHeight - (headerRows.length + summaries.length) * rowHeight), padding: 0, border: 0 } }) }) : null,
|
|
8899
8905
|
topSpacer > 0 ? /* @__PURE__ */ jsx25("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx25("td", { colSpan: leafColumns.length, style: { height: topSpacer, padding: 0, border: 0 } }) }) : null,
|
|
8900
8906
|
renderedRows.map((row, offset) => {
|
package/dist/rich-text-editor.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RichTextContent,
|
|
3
3
|
RichTextEditor
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-JZK5OCZB.js";
|
|
5
|
+
import "./chunk-XQB5K7V4.js";
|
|
6
6
|
import "./chunk-SCEHVGKV.js";
|
|
7
7
|
import "./chunk-ZD45Z2NI.js";
|
|
8
8
|
import "./chunk-CZ2ITBRW.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SelectDateRange
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ZPRDG3RS.js";
|
|
4
|
+
import "./chunk-B7UK645K.js";
|
|
5
|
+
import "./chunk-XQB5K7V4.js";
|
|
6
6
|
import "./chunk-SCEHVGKV.js";
|
|
7
7
|
import "./chunk-ZD45Z2NI.js";
|
|
8
8
|
import "./chunk-CZ2ITBRW.js";
|