@sia.soul/sia-react-ui 0.1.28 → 0.1.29

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/index.css CHANGED
@@ -3517,8 +3517,21 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3517
3517
  gap: 5px;
3518
3518
  }
3519
3519
  .sia-table__header-label-content {
3520
+ display: block;
3520
3521
  min-width: 0;
3521
3522
  flex: 1;
3523
+ overflow: hidden;
3524
+ white-space: nowrap;
3525
+ text-overflow: ellipsis;
3526
+ }
3527
+ .sia-table__sortable-header > span:first-child,
3528
+ .sia-table__filter-header > span:first-child,
3529
+ .sia-table__resizable-header > span:first-child {
3530
+ flex: 1;
3531
+ min-width: 0;
3532
+ overflow: hidden;
3533
+ white-space: nowrap;
3534
+ text-overflow: ellipsis;
3522
3535
  }
3523
3536
  .sia-table__header-description {
3524
3537
  display: inline-grid;
@@ -3828,24 +3841,40 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3828
3841
  display: flex;
3829
3842
  align-items: center;
3830
3843
  justify-content: space-between;
3844
+ min-width: 0;
3831
3845
  gap: 6px;
3832
3846
  }
3833
3847
  .sia-table__sort-button {
3834
3848
  display: grid;
3835
3849
  align-content: center;
3836
- width: 20px;
3850
+ justify-items: center;
3851
+ flex: 0 0 26px;
3852
+ width: 26px;
3837
3853
  height: 28px;
3838
3854
  padding: 0;
3839
3855
  color: var(--sia-color-text-secondary);
3840
3856
  cursor: pointer;
3841
3857
  background: transparent;
3842
3858
  border: 0;
3859
+ border-radius: var(--sia-radius);
3843
3860
  }
3844
- .sia-table__sort-button .sia-icon {
3861
+ .sia-table__sort-button[data-sort-order=none] .sia-icon {
3845
3862
  margin-block: -2px;
3846
3863
  }
3847
- .sia-table__sort-button .is-active {
3864
+ .sia-table__sort-button:not([data-sort-order=none]) {
3848
3865
  color: var(--sia-color-primary-text);
3866
+ background: color-mix(in srgb, var(--sia-color-primary) 14%, var(--sia-color-surface));
3867
+ }
3868
+ .sia-table__sort-button:not([data-sort-order=none]) .sia-icon {
3869
+ stroke-width: 2.5;
3870
+ }
3871
+ .sia-table__sort-button:hover {
3872
+ color: var(--sia-color-primary-text);
3873
+ background: color-mix(in srgb, var(--sia-color-primary) 20%, var(--sia-color-surface));
3874
+ }
3875
+ .sia-table__sort-button:focus-visible {
3876
+ outline: 2px solid var(--sia-color-primary);
3877
+ outline-offset: 1px;
3849
3878
  }
3850
3879
  .sia-table__filter-header {
3851
3880
  display: flex;
@@ -6979,6 +7008,205 @@ fieldset:disabled .sia-input-number__floating-placeholder {
6979
7008
  .sia-upload-dragger__content strong {
6980
7009
  color: var(--sia-color-text);
6981
7010
  }
7011
+ .sia-upload {
7012
+ min-width: 0;
7013
+ outline-offset: 4px;
7014
+ }
7015
+ .sia-upload__list:empty {
7016
+ display: none;
7017
+ }
7018
+ .sia-upload__item {
7019
+ position: relative;
7020
+ min-width: 0;
7021
+ }
7022
+ .sia-upload__choose {
7023
+ gap: 8px;
7024
+ }
7025
+ .sia-upload__choose > span {
7026
+ display: inline-flex;
7027
+ align-items: center;
7028
+ gap: 8px;
7029
+ }
7030
+ .sia-upload__name a {
7031
+ color: var(--sia-color-primary-text);
7032
+ text-decoration: none;
7033
+ }
7034
+ .sia-upload__item--error .sia-upload__name a {
7035
+ color: inherit;
7036
+ }
7037
+ .sia-upload__uploading {
7038
+ display: grid;
7039
+ grid-column: 2 / -1;
7040
+ gap: 5px;
7041
+ font-size: 12px;
7042
+ color: var(--sia-color-text-secondary);
7043
+ }
7044
+ .sia-upload__progress {
7045
+ display: block;
7046
+ grid-column: auto;
7047
+ width: 100%;
7048
+ }
7049
+ .sia-upload__error {
7050
+ grid-column: 2 / -1;
7051
+ font-size: 12px;
7052
+ }
7053
+ .sia-upload__item > .sia-upload__remove {
7054
+ grid-column: 3;
7055
+ grid-row: 1;
7056
+ width: 28px;
7057
+ height: 28px;
7058
+ }
7059
+ .sia-upload__item--error {
7060
+ border-color: var(--sia-color-error);
7061
+ }
7062
+ .sia-upload__item--error > .sia-upload__remove {
7063
+ color: var(--sia-color-error);
7064
+ }
7065
+ .sia-upload__thumbnail.sia-button {
7066
+ display: grid;
7067
+ place-items: center;
7068
+ width: 60px;
7069
+ height: 60px;
7070
+ padding: 0;
7071
+ color: inherit;
7072
+ background: var(--sia-color-control-hover);
7073
+ border-radius: 5px;
7074
+ }
7075
+ .sia-upload__thumbnail img {
7076
+ display: block;
7077
+ width: 100%;
7078
+ height: 100%;
7079
+ object-fit: cover;
7080
+ }
7081
+ .sia-upload__thumbnail > span {
7082
+ display: grid;
7083
+ place-items: center;
7084
+ width: 100%;
7085
+ height: 100%;
7086
+ }
7087
+ .sia-upload--picture .sia-upload__item {
7088
+ min-height: 84px;
7089
+ padding: 10px;
7090
+ border: 1px solid var(--sia-color-border);
7091
+ border-radius: 8px;
7092
+ }
7093
+ .sia-upload--picture .sia-upload__item--error {
7094
+ border-color: var(--sia-color-error);
7095
+ }
7096
+ .sia-upload--picture .sia-upload__thumbnail {
7097
+ grid-row: 1 / 3;
7098
+ }
7099
+ .sia-upload--picture .sia-upload__uploading,
7100
+ .sia-upload--picture .sia-upload__error {
7101
+ grid-row: 2;
7102
+ }
7103
+ .sia-upload--picture-card .sia-upload__list {
7104
+ display: flex;
7105
+ flex-wrap: wrap;
7106
+ gap: 10px;
7107
+ }
7108
+ .sia-upload--picture-card .sia-upload__item,
7109
+ .sia-upload--picture-card .sia-upload__choose {
7110
+ box-sizing: border-box;
7111
+ width: 112px;
7112
+ height: 112px;
7113
+ border: 1px solid var(--sia-color-border);
7114
+ border-radius: 9px;
7115
+ }
7116
+ .sia-upload--picture-card .sia-upload__item {
7117
+ display: flex;
7118
+ flex-direction: column;
7119
+ justify-content: center;
7120
+ padding: 8px;
7121
+ gap: 4px;
7122
+ overflow: hidden;
7123
+ }
7124
+ .sia-upload--picture-card .sia-upload__choose {
7125
+ display: flex;
7126
+ flex-direction: column;
7127
+ gap: 10px;
7128
+ padding: 8px;
7129
+ border-style: dashed;
7130
+ color: var(--sia-color-text);
7131
+ background: var(--sia-color-control-hover);
7132
+ }
7133
+ .sia-upload--picture-card .sia-upload__choose > span {
7134
+ flex-direction: column;
7135
+ gap: 10px;
7136
+ }
7137
+ .sia-upload--picture-card .sia-upload__thumbnail {
7138
+ width: 100%;
7139
+ height: 70px;
7140
+ min-height: 0;
7141
+ flex: 1 1 auto;
7142
+ }
7143
+ .sia-upload--picture-card .sia-upload__name {
7144
+ display: block;
7145
+ width: 100%;
7146
+ text-align: center;
7147
+ font-size: 12px;
7148
+ flex: 0 0 auto;
7149
+ }
7150
+ .sia-upload--picture-card .sia-upload__remove {
7151
+ position: absolute;
7152
+ right: 3px;
7153
+ top: 3px;
7154
+ background: var(--sia-color-surface);
7155
+ border-radius: 50%;
7156
+ opacity: 0;
7157
+ z-index: 1;
7158
+ }
7159
+ .sia-upload--picture-card .sia-upload__item:hover .sia-upload__remove,
7160
+ .sia-upload--picture-card .sia-upload__item:focus-within .sia-upload__remove {
7161
+ opacity: 1;
7162
+ }
7163
+ .sia-upload--picture-card .sia-upload__item--error {
7164
+ border-color: var(--sia-color-error);
7165
+ }
7166
+ .sia-upload--picture-card .sia-upload__uploading {
7167
+ position: absolute;
7168
+ inset: 0;
7169
+ display: flex;
7170
+ flex-direction: column;
7171
+ justify-content: center;
7172
+ gap: 12px;
7173
+ padding: 12px;
7174
+ text-align: center;
7175
+ background: var(--sia-color-surface);
7176
+ pointer-events: none;
7177
+ }
7178
+ .sia-upload--picture-card .sia-upload__error {
7179
+ font-size: 11px;
7180
+ }
7181
+ .sia-upload-dragger .sia-upload__choose {
7182
+ width: 100%;
7183
+ height: auto;
7184
+ padding: 0;
7185
+ white-space: normal;
7186
+ border: 0;
7187
+ }
7188
+ .sia-upload-dragger .sia-upload__choose > span {
7189
+ display: block;
7190
+ width: 100%;
7191
+ }
7192
+ .sia-upload-dragger__content {
7193
+ box-sizing: border-box;
7194
+ }
7195
+ .sia-upload-dragger__content > .sia-icon {
7196
+ color: var(--sia-color-primary);
7197
+ }
7198
+ .sia-upload.is-dragging .sia-upload__choose {
7199
+ outline: 2px solid var(--sia-color-primary);
7200
+ outline-offset: 2px;
7201
+ }
7202
+ .sia-upload.is-disabled .sia-upload-dragger__content {
7203
+ cursor: not-allowed;
7204
+ }
7205
+ @media (hover: none) {
7206
+ .sia-upload--picture-card .sia-upload__remove {
7207
+ opacity: 1;
7208
+ }
7209
+ }
6982
7210
  .sia-form > fieldset {
6983
7211
  display: contents;
6984
7212
  min-width: 0;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TagStatus, B as BadgeProps } from './core-CTe-Sfl1.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 UploadProps, a$ as UploadRequestOptions, b0 as Watermark, b1 as WatermarkFont, b2 as WatermarkProps, b3 as message, b4 as notification } from './core-CTe-Sfl1.cjs';
1
+ import { T as TagStatus, B as BadgeProps } from './core-C_aAA7OF.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-C_aAA7OF.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';
@@ -1875,7 +1875,7 @@ interface TableColumn<T = Record<string, unknown>> {
1875
1875
  code?: string;
1876
1876
  /** 名称或字段标识。 */
1877
1877
  name?: string;
1878
- /** 标题内容,可传入文本或 React 节点。 */
1878
+ /** 列头内容,可传入文本或 React 节点;默认单行显示,超宽省略,并通过框架 title 提示展示完整文本。节点无法提取文本时使用 name 或 key。 */
1879
1879
  title?: ReactNode;
1880
1880
  /** 补充说明内容。 */
1881
1881
  description?: ReactNode;
@@ -1897,11 +1897,11 @@ interface TableColumn<T = Record<string, unknown>> {
1897
1897
  fixed?: TableFixed | boolean;
1898
1898
  /** 是否隐藏此项。 */
1899
1899
  hidden?: boolean;
1900
- /** 默认单行显示并省略溢出内容(含 Space 标签组);设为 false 允许多行。 */
1900
+ /** 数据单元格默认单行显示并省略溢出内容(含 Space 标签组);设为 false 允许多行,不影响列头始终单行省略。 */
1901
1901
  ellipsis?: boolean;
1902
- /** 是否使用 Sia Tooltip 显示完整文本;默认 false,不生成浏览器原生 title */
1902
+ /** 数据单元格是否使用 Sia Tooltip 显示完整文本;默认 false,不生成浏览器原生 title。列头始终提供完整标题提示,不受此属性影响。 */
1903
1903
  showTitle?: boolean;
1904
- /** 是否允许该列排序。 */
1904
+ /** 是否允许该列排序;配合排序插件显示按钮,依次切换升序、降序、未排序,当前排序方向以高亮单箭头显示。 */
1905
1905
  sortable?: boolean;
1906
1906
  /** 是否允许该列筛选。 */
1907
1907
  filterable?: boolean;
@@ -1921,7 +1921,7 @@ interface TableColumn<T = Record<string, unknown>> {
1921
1921
  children?: readonly TableColumn<T>[];
1922
1922
  /** 自定义数据单元格内容,接收该列的值、行数据和单元格上下文。 */
1923
1923
  render?: (value: unknown, record: T, index: number, info: TableCellRenderInfo<T>) => ReactNode;
1924
- /** 自定义列头内容。 */
1924
+ /** 自定义列头内容,接收当前列及插件上下文;外层保持单行省略,悬停提示从 title 提取文本,无法提取时回退到 name 或 key。 */
1925
1925
  renderHeader?: (column: TableColumn<T>, context: TablePluginContext<T, any>) => ReactNode;
1926
1926
  /** 数据单元格的 CSS 类名,也可按单元格计算。 */
1927
1927
  cellClassName?: string | ((record: T, index: number) => string);
@@ -2446,7 +2446,7 @@ interface TableSortApi {
2446
2446
  /** 清空当前值或内容。 */
2447
2447
  clear: () => void;
2448
2448
  }
2449
- /** 创建表格列排序插件。将返回值加入 Table 的 plugins 后生效。 */
2449
+ /** 创建表格列排序插件。将返回值加入 Table 的 plugins 后生效;点击列头按钮依次切换升序、降序和未排序,当前方向以高亮单箭头显示,悬停提示当前状态及下一步操作。 */
2450
2450
  declare function createSortPlugin<T extends Record<string, unknown>>(options?: TableSortPluginOptions): TablePlugin<T, SortState, TableSortApi>;
2451
2451
  /** 列标识到筛选条件的映射。 */
2452
2452
  type TableFilterValues = Readonly<Record<string, string>>;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TagStatus, B as BadgeProps } from './core-DlvCqFU7.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 UploadProps, a$ as UploadRequestOptions, b0 as Watermark, b1 as WatermarkFont, b2 as WatermarkProps, b3 as message, b4 as notification } from './core-DlvCqFU7.js';
1
+ import { T as TagStatus, B as BadgeProps } from './core-CuszFlw9.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-CuszFlw9.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';
@@ -1875,7 +1875,7 @@ interface TableColumn<T = Record<string, unknown>> {
1875
1875
  code?: string;
1876
1876
  /** 名称或字段标识。 */
1877
1877
  name?: string;
1878
- /** 标题内容,可传入文本或 React 节点。 */
1878
+ /** 列头内容,可传入文本或 React 节点;默认单行显示,超宽省略,并通过框架 title 提示展示完整文本。节点无法提取文本时使用 name 或 key。 */
1879
1879
  title?: ReactNode;
1880
1880
  /** 补充说明内容。 */
1881
1881
  description?: ReactNode;
@@ -1897,11 +1897,11 @@ interface TableColumn<T = Record<string, unknown>> {
1897
1897
  fixed?: TableFixed | boolean;
1898
1898
  /** 是否隐藏此项。 */
1899
1899
  hidden?: boolean;
1900
- /** 默认单行显示并省略溢出内容(含 Space 标签组);设为 false 允许多行。 */
1900
+ /** 数据单元格默认单行显示并省略溢出内容(含 Space 标签组);设为 false 允许多行,不影响列头始终单行省略。 */
1901
1901
  ellipsis?: boolean;
1902
- /** 是否使用 Sia Tooltip 显示完整文本;默认 false,不生成浏览器原生 title */
1902
+ /** 数据单元格是否使用 Sia Tooltip 显示完整文本;默认 false,不生成浏览器原生 title。列头始终提供完整标题提示,不受此属性影响。 */
1903
1903
  showTitle?: boolean;
1904
- /** 是否允许该列排序。 */
1904
+ /** 是否允许该列排序;配合排序插件显示按钮,依次切换升序、降序、未排序,当前排序方向以高亮单箭头显示。 */
1905
1905
  sortable?: boolean;
1906
1906
  /** 是否允许该列筛选。 */
1907
1907
  filterable?: boolean;
@@ -1921,7 +1921,7 @@ interface TableColumn<T = Record<string, unknown>> {
1921
1921
  children?: readonly TableColumn<T>[];
1922
1922
  /** 自定义数据单元格内容,接收该列的值、行数据和单元格上下文。 */
1923
1923
  render?: (value: unknown, record: T, index: number, info: TableCellRenderInfo<T>) => ReactNode;
1924
- /** 自定义列头内容。 */
1924
+ /** 自定义列头内容,接收当前列及插件上下文;外层保持单行省略,悬停提示从 title 提取文本,无法提取时回退到 name 或 key。 */
1925
1925
  renderHeader?: (column: TableColumn<T>, context: TablePluginContext<T, any>) => ReactNode;
1926
1926
  /** 数据单元格的 CSS 类名,也可按单元格计算。 */
1927
1927
  cellClassName?: string | ((record: T, index: number) => string);
@@ -2446,7 +2446,7 @@ interface TableSortApi {
2446
2446
  /** 清空当前值或内容。 */
2447
2447
  clear: () => void;
2448
2448
  }
2449
- /** 创建表格列排序插件。将返回值加入 Table 的 plugins 后生效。 */
2449
+ /** 创建表格列排序插件。将返回值加入 Table 的 plugins 后生效;点击列头按钮依次切换升序、降序和未排序,当前方向以高亮单箭头显示,悬停提示当前状态及下一步操作。 */
2450
2450
  declare function createSortPlugin<T extends Record<string, unknown>>(options?: TableSortPluginOptions): TablePlugin<T, SortState, TableSortApi>;
2451
2451
  /** 列标识到筛选条件的映射。 */
2452
2452
  type TableFilterValues = Readonly<Record<string, string>>;
package/dist/index.js CHANGED
@@ -80,7 +80,7 @@ import {
80
80
  Watermark,
81
81
  message,
82
82
  notification
83
- } from "./chunk-NEYUBLLB.js";
83
+ } from "./chunk-I5KAI6FC.js";
84
84
  import {
85
85
  TextArea
86
86
  } from "./chunk-YQDHCORW.js";
@@ -4686,7 +4686,7 @@ function TableCellContent({ children, ellipsis, title }) {
4686
4686
  }
4687
4687
 
4688
4688
  // src/components/Table/Table.tsx
4689
- import { Fragment as Fragment8, forwardRef as forwardRef5, memo, useCallback as useCallback2, useEffect as useEffect12, useImperativeHandle, useMemo as useMemo9, useRef as useRef15, useState as useState18 } from "react";
4689
+ import { Fragment as Fragment8, forwardRef as forwardRef5, isValidElement as isValidElement4, memo, useCallback as useCallback2, useEffect as useEffect12, useImperativeHandle, useMemo as useMemo9, useRef as useRef15, useState as useState18 } from "react";
4690
4690
 
4691
4691
  // src/components/Table/plugins.tsx
4692
4692
  import { isValidElement as isValidElement3, useEffect as useEffect11, useRef as useRef14, useState as useState17 } from "react";
@@ -5713,36 +5713,26 @@ function createSortPlugin(options = {}) {
5713
5713
  ...column,
5714
5714
  renderHeader: (currentColumn, coreContext) => {
5715
5715
  const info = current(context);
5716
+ const order = info?.field === field ? info.order : null;
5717
+ const sortHint = `${getColumnLabel(currentColumn)}\uFF1A${order === "ascend" ? "\u5F53\u524D\u5347\u5E8F\uFF0C\u70B9\u51FB\u5207\u6362\u4E3A\u964D\u5E8F" : order === "descend" ? "\u5F53\u524D\u964D\u5E8F\uFF0C\u70B9\u51FB\u53D6\u6D88\u6392\u5E8F" : "\u672A\u6392\u5E8F\uFF0C\u70B9\u51FB\u6309\u5347\u5E8F\u6392\u5E8F"}`;
5716
5718
  return /* @__PURE__ */ jsxs20("span", { className: "sia-table__sortable-header", children: [
5717
5719
  /* @__PURE__ */ jsx21("span", { children: previousHeader ? previousHeader(currentColumn, coreContext) : currentColumn.title ?? currentColumn.name ?? currentColumn.key }),
5718
- /* @__PURE__ */ jsxs20(
5720
+ /* @__PURE__ */ jsx21(
5719
5721
  "button",
5720
5722
  {
5721
5723
  type: "button",
5722
5724
  className: "sia-table__sort-button",
5723
- "aria-label": `\u5207\u6362${getColumnLabel(currentColumn)}\u6392\u5E8F`,
5725
+ "data-sort-order": order ?? "none",
5726
+ "aria-label": sortHint,
5727
+ ...withTitleTooltip({ title: sortHint }),
5724
5728
  onClick: (event) => {
5725
5729
  event.stopPropagation();
5726
5730
  cycle(field, context);
5727
5731
  },
5728
- children: [
5729
- /* @__PURE__ */ jsx21(
5730
- Icon,
5731
- {
5732
- name: "chevron-up",
5733
- size: 11,
5734
- className: info?.field === field && info.order === "ascend" ? "is-active" : ""
5735
- }
5736
- ),
5737
- /* @__PURE__ */ jsx21(
5738
- Icon,
5739
- {
5740
- name: "chevron-down",
5741
- size: 11,
5742
- className: info?.field === field && info.order === "descend" ? "is-active" : ""
5743
- }
5744
- )
5745
- ]
5732
+ children: order ? /* @__PURE__ */ jsx21(Icon, { name: order === "ascend" ? "arrow-up" : "arrow-down", size: 18 }) : /* @__PURE__ */ jsxs20(Fragment7, { children: [
5733
+ /* @__PURE__ */ jsx21(Icon, { name: "chevron-up", size: 11 }),
5734
+ /* @__PURE__ */ jsx21(Icon, { name: "chevron-down", size: 11 })
5735
+ ] })
5746
5736
  }
5747
5737
  )
5748
5738
  ] });
@@ -7168,6 +7158,12 @@ var EMPTY_COLUMNS = [];
7168
7158
  var EMPTY_PLUGINS = [];
7169
7159
  var DEFAULT_WIDTH = 160;
7170
7160
  var SIZE_ROW_HEIGHT = { small: 32, medium: 38, large: 46 };
7161
+ function getHeaderTitleText(content) {
7162
+ if (typeof content === "string" || typeof content === "number") return String(content);
7163
+ if (Array.isArray(content)) return content.map(getHeaderTitleText).join("");
7164
+ if (isValidElement4(content)) return getHeaderTitleText(content.props.children);
7165
+ return "";
7166
+ }
7171
7167
  function getColumnDepth(columns) {
7172
7168
  let depth = 1;
7173
7169
  for (const column of columns) {
@@ -7689,10 +7685,10 @@ function TableInner(props, ref) {
7689
7685
  return fixed === "left" ? { left: leftOffsets.get(column.key) } : fixed === "right" ? { right: rightOffsets.get(column.key) } : void 0;
7690
7686
  }
7691
7687
  function renderHeaderContent(column, content) {
7692
- if (column.description === void 0 || column.description === null) return content;
7688
+ const title = getHeaderTitleText(column.title ?? column.name) || column.name || column.key;
7693
7689
  return /* @__PURE__ */ jsxs21("span", { className: "sia-table__header-label", children: [
7694
- /* @__PURE__ */ jsx22("span", { className: "sia-table__header-label-content", children: content }),
7695
- /* @__PURE__ */ jsx22(Tooltip, { title: column.description, placement: "top", trigger: ["hover", "focus"], children: /* @__PURE__ */ jsx22("button", { type: "button", className: "sia-table__header-description", "aria-label": `${column.name ?? column.key}\u5217\u8BF4\u660E`, onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ jsx22(Icon, { name: "info", size: 14 }) }) })
7690
+ /* @__PURE__ */ jsx22("span", { className: "sia-table__header-label-content", ...withTitleTooltip({ title }), children: content }),
7691
+ column.description != null && /* @__PURE__ */ jsx22(Tooltip, { title: column.description, placement: "top", trigger: ["hover", "focus"], children: /* @__PURE__ */ jsx22("button", { type: "button", className: "sia-table__header-description", "aria-label": `${column.name ?? column.key}\u5217\u8BF4\u660E`, onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ jsx22(Icon, { name: "info", size: 14 }) }) })
7696
7692
  ] });
7697
7693
  }
7698
7694
  function getPluginCellProps(row, column) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sia.soul/sia-react-ui",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "Sia Design components and tokens for React",
5
5
  "publishConfig": {
6
6
  "access": "public",