@sia.soul/sia-react-ui 0.1.29 → 0.1.30
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-I5KAI6FC.js → chunk-KT7DIBXX.js} +4 -0
- package/dist/{core-C_aAA7OF.d.cts → core-B687rqFa.d.cts} +11 -6
- package/dist/{core-CuszFlw9.d.ts → core-BwuvPHYM.d.ts} +11 -6
- package/dist/core.cjs +4 -0
- package/dist/core.css +30 -9
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.css +30 -9
- package/dist/index.d.cts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -141,6 +141,7 @@ function Card({
|
|
|
141
141
|
// src/components/Tag.tsx
|
|
142
142
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
143
143
|
function Tag({
|
|
144
|
+
color,
|
|
144
145
|
status = "default",
|
|
145
146
|
compact = false,
|
|
146
147
|
variant = "soft",
|
|
@@ -151,13 +152,16 @@ function Tag({
|
|
|
151
152
|
onClose,
|
|
152
153
|
className = "",
|
|
153
154
|
children,
|
|
155
|
+
style,
|
|
154
156
|
...props
|
|
155
157
|
}) {
|
|
158
|
+
const customColor = color?.trim() ? variant === "outlined" ? { borderColor: color, color, backgroundColor: "transparent" } : variant === "filled" ? { backgroundColor: color, color: "#fff", borderColor: "transparent" } : { color, backgroundColor: `color-mix(in srgb, ${color} 10%, transparent)`, borderColor: `color-mix(in srgb, ${color} 35%, transparent)` } : void 0;
|
|
156
159
|
return /* @__PURE__ */ jsxs3(
|
|
157
160
|
"span",
|
|
158
161
|
{
|
|
159
162
|
className: `sia-tag${closable && closeOnHover ? " sia-tag--close-on-hover" : ""} sia-tag--${status} sia-tag--${variant}${compact ? " sia-tag--compact" : ""}${disabled ? " sia-tag--disabled" : ""} ${className}`.trim(),
|
|
160
163
|
"aria-disabled": disabled || void 0,
|
|
164
|
+
style: customColor ? { ...customColor, ...style } : style,
|
|
161
165
|
...withTitleTooltip(props),
|
|
162
166
|
children: [
|
|
163
167
|
icon ? /* @__PURE__ */ jsx3("span", { className: "sia-tag__icon", children: icon }) : null,
|
|
@@ -377,12 +377,14 @@ declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttribu
|
|
|
377
377
|
|
|
378
378
|
/** 标签的状态类型。 */
|
|
379
379
|
type TagStatus = "default" | "success" | "processing" | "warning" | "error";
|
|
380
|
-
/**
|
|
380
|
+
/** 标签的视觉样式:soft 为柔和浅底,outlined 为透明底描边,filled 为实色背景。 */
|
|
381
381
|
type TagVariant = "soft" | "outlined" | "filled";
|
|
382
382
|
/** 标签的属性配置。 */
|
|
383
383
|
interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
384
|
+
/** 自定义 CSS 颜色,支持十六进制、rgb、颜色名称及 CSS 变量;覆盖 status 的颜色,由 variant 决定浅底、描边或实色效果。未提供非空颜色时沿用状态配色,style 中对应属性优先级最高。 */
|
|
385
|
+
color?: string;
|
|
384
386
|
/**
|
|
385
|
-
*
|
|
387
|
+
* 语义状态配色;提供 color 时由自定义颜色覆盖。
|
|
386
388
|
* @defaultValue "default"
|
|
387
389
|
*/
|
|
388
390
|
status?: TagStatus;
|
|
@@ -392,7 +394,7 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
392
394
|
*/
|
|
393
395
|
compact?: boolean;
|
|
394
396
|
/**
|
|
395
|
-
|
|
397
|
+
* 视觉样式:soft 使用浅色背景和彩色文字;outlined 使用透明背景、彩色边框和文字;filled 使用实色背景、白字和透明边框。同样适用于自定义 color;实色浅底可通过 style.color 调整文字。
|
|
396
398
|
* @defaultValue "soft"
|
|
397
399
|
*/
|
|
398
400
|
variant?: TagVariant;
|
|
@@ -403,7 +405,10 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
403
405
|
* @defaultValue false
|
|
404
406
|
*/
|
|
405
407
|
closable?: boolean;
|
|
406
|
-
/**
|
|
408
|
+
/**
|
|
409
|
+
* 配合 closable 使用:默认隐藏关闭按钮且不占宽度,鼠标悬停或内部获得键盘焦点时,标签向右扩展并显示按钮;离开后收回,过渡为 180 毫秒。禁用时不展开,无悬停能力的触屏设备直接显示以便操作,减少动态效果偏好下取消动画。
|
|
410
|
+
* @defaultValue false
|
|
411
|
+
*/
|
|
407
412
|
closeOnHover?: boolean;
|
|
408
413
|
/**
|
|
409
414
|
* 禁用关闭操作
|
|
@@ -413,8 +418,8 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
413
418
|
/** 请求关闭时触发的回调。 */
|
|
414
419
|
onClose?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
415
420
|
}
|
|
416
|
-
/**
|
|
417
|
-
declare function Tag({ status, compact, variant, icon, closable, closeOnHover, disabled, onClose, className, children, ...props }: TagProps): react.JSX.Element;
|
|
421
|
+
/** 标记状态或筛选条件的标签,支持语义配色、自定义边框色或背景色及关闭操作。 */
|
|
422
|
+
declare function Tag({ color, status, compact, variant, icon, closable, closeOnHover, disabled, onClose, className, children, style, ...props }: TagProps): react.JSX.Element;
|
|
418
423
|
|
|
419
424
|
/** 菜单的模式类型。 */
|
|
420
425
|
type MenuMode = "vertical" | "horizontal" | "inline";
|
|
@@ -377,12 +377,14 @@ declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttribu
|
|
|
377
377
|
|
|
378
378
|
/** 标签的状态类型。 */
|
|
379
379
|
type TagStatus = "default" | "success" | "processing" | "warning" | "error";
|
|
380
|
-
/**
|
|
380
|
+
/** 标签的视觉样式:soft 为柔和浅底,outlined 为透明底描边,filled 为实色背景。 */
|
|
381
381
|
type TagVariant = "soft" | "outlined" | "filled";
|
|
382
382
|
/** 标签的属性配置。 */
|
|
383
383
|
interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
384
|
+
/** 自定义 CSS 颜色,支持十六进制、rgb、颜色名称及 CSS 变量;覆盖 status 的颜色,由 variant 决定浅底、描边或实色效果。未提供非空颜色时沿用状态配色,style 中对应属性优先级最高。 */
|
|
385
|
+
color?: string;
|
|
384
386
|
/**
|
|
385
|
-
*
|
|
387
|
+
* 语义状态配色;提供 color 时由自定义颜色覆盖。
|
|
386
388
|
* @defaultValue "default"
|
|
387
389
|
*/
|
|
388
390
|
status?: TagStatus;
|
|
@@ -392,7 +394,7 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
392
394
|
*/
|
|
393
395
|
compact?: boolean;
|
|
394
396
|
/**
|
|
395
|
-
|
|
397
|
+
* 视觉样式:soft 使用浅色背景和彩色文字;outlined 使用透明背景、彩色边框和文字;filled 使用实色背景、白字和透明边框。同样适用于自定义 color;实色浅底可通过 style.color 调整文字。
|
|
396
398
|
* @defaultValue "soft"
|
|
397
399
|
*/
|
|
398
400
|
variant?: TagVariant;
|
|
@@ -403,7 +405,10 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
403
405
|
* @defaultValue false
|
|
404
406
|
*/
|
|
405
407
|
closable?: boolean;
|
|
406
|
-
/**
|
|
408
|
+
/**
|
|
409
|
+
* 配合 closable 使用:默认隐藏关闭按钮且不占宽度,鼠标悬停或内部获得键盘焦点时,标签向右扩展并显示按钮;离开后收回,过渡为 180 毫秒。禁用时不展开,无悬停能力的触屏设备直接显示以便操作,减少动态效果偏好下取消动画。
|
|
410
|
+
* @defaultValue false
|
|
411
|
+
*/
|
|
407
412
|
closeOnHover?: boolean;
|
|
408
413
|
/**
|
|
409
414
|
* 禁用关闭操作
|
|
@@ -413,8 +418,8 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
413
418
|
/** 请求关闭时触发的回调。 */
|
|
414
419
|
onClose?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
415
420
|
}
|
|
416
|
-
/**
|
|
417
|
-
declare function Tag({ status, compact, variant, icon, closable, closeOnHover, disabled, onClose, className, children, ...props }: TagProps): react.JSX.Element;
|
|
421
|
+
/** 标记状态或筛选条件的标签,支持语义配色、自定义边框色或背景色及关闭操作。 */
|
|
422
|
+
declare function Tag({ color, status, compact, variant, icon, closable, closeOnHover, disabled, onClose, className, children, style, ...props }: TagProps): react.JSX.Element;
|
|
418
423
|
|
|
419
424
|
/** 菜单的模式类型。 */
|
|
420
425
|
type MenuMode = "vertical" | "horizontal" | "inline";
|
package/dist/core.cjs
CHANGED
|
@@ -1761,6 +1761,7 @@ function Card({
|
|
|
1761
1761
|
// src/components/Tag.tsx
|
|
1762
1762
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1763
1763
|
function Tag({
|
|
1764
|
+
color,
|
|
1764
1765
|
status = "default",
|
|
1765
1766
|
compact = false,
|
|
1766
1767
|
variant = "soft",
|
|
@@ -1771,13 +1772,16 @@ function Tag({
|
|
|
1771
1772
|
onClose,
|
|
1772
1773
|
className = "",
|
|
1773
1774
|
children,
|
|
1775
|
+
style,
|
|
1774
1776
|
...props
|
|
1775
1777
|
}) {
|
|
1778
|
+
const customColor = color?.trim() ? variant === "outlined" ? { borderColor: color, color, backgroundColor: "transparent" } : variant === "filled" ? { backgroundColor: color, color: "#fff", borderColor: "transparent" } : { color, backgroundColor: `color-mix(in srgb, ${color} 10%, transparent)`, borderColor: `color-mix(in srgb, ${color} 35%, transparent)` } : void 0;
|
|
1776
1779
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1777
1780
|
"span",
|
|
1778
1781
|
{
|
|
1779
1782
|
className: `sia-tag${closable && closeOnHover ? " sia-tag--close-on-hover" : ""} sia-tag--${status} sia-tag--${variant}${compact ? " sia-tag--compact" : ""}${disabled ? " sia-tag--disabled" : ""} ${className}`.trim(),
|
|
1780
1783
|
"aria-disabled": disabled || void 0,
|
|
1784
|
+
style: customColor ? { ...customColor, ...style } : style,
|
|
1781
1785
|
...withTitleTooltip(props),
|
|
1782
1786
|
children: [
|
|
1783
1787
|
icon ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sia-tag__icon", children: icon }) : null,
|
package/dist/core.css
CHANGED
|
@@ -3467,12 +3467,14 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3467
3467
|
.sia-table__header-cell,
|
|
3468
3468
|
.sia-table__cell {
|
|
3469
3469
|
position: relative;
|
|
3470
|
-
height:
|
|
3471
|
-
padding:
|
|
3470
|
+
height: 36px;
|
|
3471
|
+
padding: 5px 12px;
|
|
3472
3472
|
border-right: var(--sia-table-column-border-width) solid var(--sia-table-border-color, #EFF2F6);
|
|
3473
3473
|
border-bottom: var(--sia-table-row-border-width) solid var(--sia-table-border-color, #EFF2F6);
|
|
3474
3474
|
background: var(--sia-color-surface);
|
|
3475
3475
|
vertical-align: middle;
|
|
3476
|
+
font-size: 13px;
|
|
3477
|
+
line-height: 1.5;
|
|
3476
3478
|
}
|
|
3477
3479
|
.sia-table__cell:last-child {
|
|
3478
3480
|
border-right: 0;
|
|
@@ -3597,7 +3599,13 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3597
3599
|
}
|
|
3598
3600
|
.sia-table__row {
|
|
3599
3601
|
content-visibility: auto;
|
|
3600
|
-
contain-intrinsic-size: auto
|
|
3602
|
+
contain-intrinsic-size: auto 36px;
|
|
3603
|
+
}
|
|
3604
|
+
.sia-table--small .sia-table__row {
|
|
3605
|
+
contain-intrinsic-size: auto 28px;
|
|
3606
|
+
}
|
|
3607
|
+
.sia-table--large .sia-table__row {
|
|
3608
|
+
contain-intrinsic-size: auto 46px;
|
|
3601
3609
|
}
|
|
3602
3610
|
.sia-table__row--striped .sia-table__cell {
|
|
3603
3611
|
background: color-mix(in srgb, var(--sia-color-background) 55%, var(--sia-color-surface));
|
|
@@ -3664,7 +3672,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3664
3672
|
.sia-table__cell--merge-sticky > .sia-table__cell-content {
|
|
3665
3673
|
position: sticky;
|
|
3666
3674
|
z-index: var(--sia-table-merge-sticky-z-index, 3);
|
|
3667
|
-
top: calc(var(--sia-table-header-height,
|
|
3675
|
+
top: calc(var(--sia-table-header-height, 36px) + var(--sia-table-merge-sticky-inset, 0px));
|
|
3668
3676
|
}
|
|
3669
3677
|
.sia-table__cell--fixed {
|
|
3670
3678
|
position: sticky;
|
|
@@ -3787,7 +3795,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3787
3795
|
.sia-table__empty {
|
|
3788
3796
|
position: absolute;
|
|
3789
3797
|
z-index: 7;
|
|
3790
|
-
inset: var(--sia-table-header-height,
|
|
3798
|
+
inset: var(--sia-table-header-height, 36px) 0 0;
|
|
3791
3799
|
display: grid;
|
|
3792
3800
|
place-items: center;
|
|
3793
3801
|
min-width: 0;
|
|
@@ -3813,8 +3821,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3813
3821
|
}
|
|
3814
3822
|
.sia-table--small .sia-table__header-cell,
|
|
3815
3823
|
.sia-table--small .sia-table__cell {
|
|
3816
|
-
height:
|
|
3817
|
-
padding:
|
|
3824
|
+
height: 28px;
|
|
3825
|
+
padding: 3px 9px;
|
|
3818
3826
|
font-size: 12px;
|
|
3819
3827
|
}
|
|
3820
3828
|
.sia-table--large .sia-table__header-cell,
|
|
@@ -3876,6 +3884,19 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3876
3884
|
outline: 2px solid var(--sia-color-primary);
|
|
3877
3885
|
outline-offset: 1px;
|
|
3878
3886
|
}
|
|
3887
|
+
.sia-table--medium .sia-table__sort-button {
|
|
3888
|
+
height: 24px;
|
|
3889
|
+
}
|
|
3890
|
+
.sia-table--small .sia-table__sort-button,
|
|
3891
|
+
.sia-table--small .sia-table__filter-button {
|
|
3892
|
+
height: 20px;
|
|
3893
|
+
}
|
|
3894
|
+
.sia-table--medium .sia-table__cell .sia-button--link {
|
|
3895
|
+
height: 24px;
|
|
3896
|
+
}
|
|
3897
|
+
.sia-table--small .sia-table__cell .sia-button--link {
|
|
3898
|
+
height: 20px;
|
|
3899
|
+
}
|
|
3879
3900
|
.sia-table__filter-header {
|
|
3880
3901
|
display: flex;
|
|
3881
3902
|
align-items: center;
|
|
@@ -4421,8 +4442,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
4421
4442
|
}
|
|
4422
4443
|
}
|
|
4423
4444
|
.sia-table__settings-dropdown .sia-menu__item {
|
|
4424
|
-
min-height:
|
|
4425
|
-
padding:
|
|
4445
|
+
min-height: 36px;
|
|
4446
|
+
padding: 5px 12px;
|
|
4426
4447
|
gap: 10px;
|
|
4427
4448
|
font-size: 14px;
|
|
4428
4449
|
line-height: 24px;
|
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, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, T as TagStatus, az as TagVariant, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, b0 as UploadProps, b4 as UploadRequestOptions, b8 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, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, T as TagStatus, az as TagVariant, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, b0 as UploadProps, b4 as UploadRequestOptions, b8 as message } from './core-B687rqFa.cjs';
|
|
2
2
|
export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-YJbT-MF1.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-Bx4B28Wh.cjs';
|
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, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, T as TagStatus, az as TagVariant, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, b0 as UploadProps, b4 as UploadRequestOptions, b8 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, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, T as TagStatus, az as TagVariant, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, b0 as UploadProps, b4 as UploadRequestOptions, b8 as message } from './core-BwuvPHYM.js';
|
|
2
2
|
export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-CCrPqULn.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-Bx4B28Wh.js';
|
package/dist/core.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -10764,6 +10764,7 @@ var message = {
|
|
|
10764
10764
|
// src/components/Tag.tsx
|
|
10765
10765
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
10766
10766
|
function Tag({
|
|
10767
|
+
color,
|
|
10767
10768
|
status = "default",
|
|
10768
10769
|
compact = false,
|
|
10769
10770
|
variant = "soft",
|
|
@@ -10774,13 +10775,16 @@ function Tag({
|
|
|
10774
10775
|
onClose,
|
|
10775
10776
|
className = "",
|
|
10776
10777
|
children,
|
|
10778
|
+
style,
|
|
10777
10779
|
...props
|
|
10778
10780
|
}) {
|
|
10781
|
+
const customColor = color?.trim() ? variant === "outlined" ? { borderColor: color, color, backgroundColor: "transparent" } : variant === "filled" ? { backgroundColor: color, color: "#fff", borderColor: "transparent" } : { color, backgroundColor: `color-mix(in srgb, ${color} 10%, transparent)`, borderColor: `color-mix(in srgb, ${color} 35%, transparent)` } : void 0;
|
|
10779
10782
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
10780
10783
|
"span",
|
|
10781
10784
|
{
|
|
10782
10785
|
className: `sia-tag${closable && closeOnHover ? " sia-tag--close-on-hover" : ""} sia-tag--${status} sia-tag--${variant}${compact ? " sia-tag--compact" : ""}${disabled ? " sia-tag--disabled" : ""} ${className}`.trim(),
|
|
10783
10786
|
"aria-disabled": disabled || void 0,
|
|
10787
|
+
style: customColor ? { ...customColor, ...style } : style,
|
|
10784
10788
|
...withTitleTooltip(props),
|
|
10785
10789
|
children: [
|
|
10786
10790
|
icon ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "sia-tag__icon", children: icon }) : null,
|
|
@@ -13964,7 +13968,7 @@ var EMPTY_DATA = [];
|
|
|
13964
13968
|
var EMPTY_COLUMNS = [];
|
|
13965
13969
|
var EMPTY_PLUGINS = [];
|
|
13966
13970
|
var DEFAULT_WIDTH = 160;
|
|
13967
|
-
var SIZE_ROW_HEIGHT = { small:
|
|
13971
|
+
var SIZE_ROW_HEIGHT = { small: 28, medium: 36, large: 46 };
|
|
13968
13972
|
function getHeaderTitleText(content) {
|
|
13969
13973
|
if (typeof content === "string" || typeof content === "number") return String(content);
|
|
13970
13974
|
if (Array.isArray(content)) return content.map(getHeaderTitleText).join("");
|
package/dist/index.css
CHANGED
|
@@ -3467,12 +3467,14 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3467
3467
|
.sia-table__header-cell,
|
|
3468
3468
|
.sia-table__cell {
|
|
3469
3469
|
position: relative;
|
|
3470
|
-
height:
|
|
3471
|
-
padding:
|
|
3470
|
+
height: 36px;
|
|
3471
|
+
padding: 5px 12px;
|
|
3472
3472
|
border-right: var(--sia-table-column-border-width) solid var(--sia-table-border-color, #EFF2F6);
|
|
3473
3473
|
border-bottom: var(--sia-table-row-border-width) solid var(--sia-table-border-color, #EFF2F6);
|
|
3474
3474
|
background: var(--sia-color-surface);
|
|
3475
3475
|
vertical-align: middle;
|
|
3476
|
+
font-size: 13px;
|
|
3477
|
+
line-height: 1.5;
|
|
3476
3478
|
}
|
|
3477
3479
|
.sia-table__cell:last-child {
|
|
3478
3480
|
border-right: 0;
|
|
@@ -3597,7 +3599,13 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3597
3599
|
}
|
|
3598
3600
|
.sia-table__row {
|
|
3599
3601
|
content-visibility: auto;
|
|
3600
|
-
contain-intrinsic-size: auto
|
|
3602
|
+
contain-intrinsic-size: auto 36px;
|
|
3603
|
+
}
|
|
3604
|
+
.sia-table--small .sia-table__row {
|
|
3605
|
+
contain-intrinsic-size: auto 28px;
|
|
3606
|
+
}
|
|
3607
|
+
.sia-table--large .sia-table__row {
|
|
3608
|
+
contain-intrinsic-size: auto 46px;
|
|
3601
3609
|
}
|
|
3602
3610
|
.sia-table__row--striped .sia-table__cell {
|
|
3603
3611
|
background: color-mix(in srgb, var(--sia-color-background) 55%, var(--sia-color-surface));
|
|
@@ -3664,7 +3672,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3664
3672
|
.sia-table__cell--merge-sticky > .sia-table__cell-content {
|
|
3665
3673
|
position: sticky;
|
|
3666
3674
|
z-index: var(--sia-table-merge-sticky-z-index, 3);
|
|
3667
|
-
top: calc(var(--sia-table-header-height,
|
|
3675
|
+
top: calc(var(--sia-table-header-height, 36px) + var(--sia-table-merge-sticky-inset, 0px));
|
|
3668
3676
|
}
|
|
3669
3677
|
.sia-table__cell--fixed {
|
|
3670
3678
|
position: sticky;
|
|
@@ -3787,7 +3795,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3787
3795
|
.sia-table__empty {
|
|
3788
3796
|
position: absolute;
|
|
3789
3797
|
z-index: 7;
|
|
3790
|
-
inset: var(--sia-table-header-height,
|
|
3798
|
+
inset: var(--sia-table-header-height, 36px) 0 0;
|
|
3791
3799
|
display: grid;
|
|
3792
3800
|
place-items: center;
|
|
3793
3801
|
min-width: 0;
|
|
@@ -3813,8 +3821,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3813
3821
|
}
|
|
3814
3822
|
.sia-table--small .sia-table__header-cell,
|
|
3815
3823
|
.sia-table--small .sia-table__cell {
|
|
3816
|
-
height:
|
|
3817
|
-
padding:
|
|
3824
|
+
height: 28px;
|
|
3825
|
+
padding: 3px 9px;
|
|
3818
3826
|
font-size: 12px;
|
|
3819
3827
|
}
|
|
3820
3828
|
.sia-table--large .sia-table__header-cell,
|
|
@@ -3876,6 +3884,19 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
3876
3884
|
outline: 2px solid var(--sia-color-primary);
|
|
3877
3885
|
outline-offset: 1px;
|
|
3878
3886
|
}
|
|
3887
|
+
.sia-table--medium .sia-table__sort-button {
|
|
3888
|
+
height: 24px;
|
|
3889
|
+
}
|
|
3890
|
+
.sia-table--small .sia-table__sort-button,
|
|
3891
|
+
.sia-table--small .sia-table__filter-button {
|
|
3892
|
+
height: 20px;
|
|
3893
|
+
}
|
|
3894
|
+
.sia-table--medium .sia-table__cell .sia-button--link {
|
|
3895
|
+
height: 24px;
|
|
3896
|
+
}
|
|
3897
|
+
.sia-table--small .sia-table__cell .sia-button--link {
|
|
3898
|
+
height: 20px;
|
|
3899
|
+
}
|
|
3879
3900
|
.sia-table__filter-header {
|
|
3880
3901
|
display: flex;
|
|
3881
3902
|
align-items: center;
|
|
@@ -4421,8 +4442,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
4421
4442
|
}
|
|
4422
4443
|
}
|
|
4423
4444
|
.sia-table__settings-dropdown .sia-menu__item {
|
|
4424
|
-
min-height:
|
|
4425
|
-
padding:
|
|
4445
|
+
min-height: 36px;
|
|
4446
|
+
padding: 5px 12px;
|
|
4426
4447
|
gap: 10px;
|
|
4427
4448
|
font-size: 14px;
|
|
4428
4449
|
line-height: 24px;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
2
|
-
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 ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagVariant, aA as Timeline, aB as TimelineItem, aC as TimelineProps, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aG as Tooltip, aH as TooltipProps, aI as Tour, aJ as TourProps, aK as TourStep, aL as Tree, aM as TreeDropPosition, aN as TreeKey, aO as TreeNode, aP as TreeProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, a_ as UploadHttpRequest, a$ as UploadItemActions, b0 as UploadProps, b1 as UploadRef, b2 as UploadRejectInfo, b3 as UploadRequestHandle, b4 as UploadRequestOptions, b5 as Watermark, b6 as WatermarkFont, b7 as WatermarkProps, b8 as message, b9 as notification } from './core-
|
|
1
|
+
import { T as TagStatus, B as BadgeProps } from './core-B687rqFa.cjs';
|
|
2
|
+
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 ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagVariant, aA as Timeline, aB as TimelineItem, aC as TimelineProps, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aG as Tooltip, aH as TooltipProps, aI as Tour, aJ as TourProps, aK as TourStep, aL as Tree, aM as TreeDropPosition, aN as TreeKey, aO as TreeNode, aP as TreeProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, a_ as UploadHttpRequest, a$ as UploadItemActions, b0 as UploadProps, b1 as UploadRef, b2 as UploadRejectInfo, b3 as UploadRequestHandle, b4 as UploadRequestOptions, b5 as Watermark, b6 as WatermarkFont, b7 as WatermarkProps, b8 as message, b9 as notification } from './core-B687rqFa.cjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
|
|
@@ -2094,7 +2094,12 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
2094
2094
|
height?: number | string;
|
|
2095
2095
|
/** 表格滚动区域的高度。 */
|
|
2096
2096
|
tableHeight?: number | string;
|
|
2097
|
-
/**
|
|
2097
|
+
/**
|
|
2098
|
+
* 表格密度;省略时与显式传 medium 相同。small、medium、large 默认行高分别为 28、36、46px。
|
|
2099
|
+
* 单元格使用各尺寸字号和 1.5 倍文字行高,不继承宿主页面的文字行高。
|
|
2100
|
+
* small / medium 数据单元格内的链接按钮高度分别为 20 / 24px,以适配行高;工具栏不受影响,其他自定义内容仍可能撑高单元格。
|
|
2101
|
+
* @defaultValue "medium"
|
|
2102
|
+
*/
|
|
2098
2103
|
size?: TableSize;
|
|
2099
2104
|
/** 是否显示边框。 */
|
|
2100
2105
|
bordered?: boolean;
|
|
@@ -2110,7 +2115,7 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
2110
2115
|
virtual?: boolean;
|
|
2111
2116
|
/** 启用虚拟滚动的选项数量 */
|
|
2112
2117
|
virtualThreshold?: number;
|
|
2113
|
-
/**
|
|
2118
|
+
/** 行高度,单位为 px,虚拟滚动用其计算行位置;默认随 size 取 small 28、medium 36、large 46。自定义内容应适配行高,避免撑高后导致虚拟滚动位置偏差。 */
|
|
2114
2119
|
rowHeight?: number;
|
|
2115
2120
|
/** 虚拟列表在可视区域前后额外渲染的数量。 */
|
|
2116
2121
|
overscan?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
2
|
-
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 ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagVariant, aA as Timeline, aB as TimelineItem, aC as TimelineProps, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aG as Tooltip, aH as TooltipProps, aI as Tour, aJ as TourProps, aK as TourStep, aL as Tree, aM as TreeDropPosition, aN as TreeKey, aO as TreeNode, aP as TreeProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, a_ as UploadHttpRequest, a$ as UploadItemActions, b0 as UploadProps, b1 as UploadRef, b2 as UploadRejectInfo, b3 as UploadRequestHandle, b4 as UploadRequestOptions, b5 as Watermark, b6 as WatermarkFont, b7 as WatermarkProps, b8 as message, b9 as notification } from './core-
|
|
1
|
+
import { T as TagStatus, B as BadgeProps } from './core-BwuvPHYM.js';
|
|
2
|
+
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 ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagVariant, aA as Timeline, aB as TimelineItem, aC as TimelineProps, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aG as Tooltip, aH as TooltipProps, aI as Tour, aJ as TourProps, aK as TourStep, aL as Tree, aM as TreeDropPosition, aN as TreeKey, aO as TreeNode, aP as TreeProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, a_ as UploadHttpRequest, a$ as UploadItemActions, b0 as UploadProps, b1 as UploadRef, b2 as UploadRejectInfo, b3 as UploadRequestHandle, b4 as UploadRequestOptions, b5 as Watermark, b6 as WatermarkFont, b7 as WatermarkProps, b8 as message, b9 as notification } from './core-BwuvPHYM.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.js';
|
|
@@ -2094,7 +2094,12 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
2094
2094
|
height?: number | string;
|
|
2095
2095
|
/** 表格滚动区域的高度。 */
|
|
2096
2096
|
tableHeight?: number | string;
|
|
2097
|
-
/**
|
|
2097
|
+
/**
|
|
2098
|
+
* 表格密度;省略时与显式传 medium 相同。small、medium、large 默认行高分别为 28、36、46px。
|
|
2099
|
+
* 单元格使用各尺寸字号和 1.5 倍文字行高,不继承宿主页面的文字行高。
|
|
2100
|
+
* small / medium 数据单元格内的链接按钮高度分别为 20 / 24px,以适配行高;工具栏不受影响,其他自定义内容仍可能撑高单元格。
|
|
2101
|
+
* @defaultValue "medium"
|
|
2102
|
+
*/
|
|
2098
2103
|
size?: TableSize;
|
|
2099
2104
|
/** 是否显示边框。 */
|
|
2100
2105
|
bordered?: boolean;
|
|
@@ -2110,7 +2115,7 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
2110
2115
|
virtual?: boolean;
|
|
2111
2116
|
/** 启用虚拟滚动的选项数量 */
|
|
2112
2117
|
virtualThreshold?: number;
|
|
2113
|
-
/**
|
|
2118
|
+
/** 行高度,单位为 px,虚拟滚动用其计算行位置;默认随 size 取 small 28、medium 36、large 46。自定义内容应适配行高,避免撑高后导致虚拟滚动位置偏差。 */
|
|
2114
2119
|
rowHeight?: number;
|
|
2115
2120
|
/** 虚拟列表在可视区域前后额外渲染的数量。 */
|
|
2116
2121
|
overscan?: number;
|
package/dist/index.js
CHANGED
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
Watermark,
|
|
81
81
|
message,
|
|
82
82
|
notification
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-KT7DIBXX.js";
|
|
84
84
|
import {
|
|
85
85
|
TextArea
|
|
86
86
|
} from "./chunk-YQDHCORW.js";
|
|
@@ -7157,7 +7157,7 @@ var EMPTY_DATA = [];
|
|
|
7157
7157
|
var EMPTY_COLUMNS = [];
|
|
7158
7158
|
var EMPTY_PLUGINS = [];
|
|
7159
7159
|
var DEFAULT_WIDTH = 160;
|
|
7160
|
-
var SIZE_ROW_HEIGHT = { small:
|
|
7160
|
+
var SIZE_ROW_HEIGHT = { small: 28, medium: 36, large: 46 };
|
|
7161
7161
|
function getHeaderTitleText(content) {
|
|
7162
7162
|
if (typeof content === "string" || typeof content === "number") return String(content);
|
|
7163
7163
|
if (Array.isArray(content)) return content.map(getHeaderTitleText).join("");
|