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

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.
@@ -92,6 +92,7 @@ function Toolbar({ items, onAction, disabled = false, size = "small", variant =
92
92
  import { useState as useState2 } from "react";
93
93
  import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
94
94
  function Card({
95
+ bordered = true,
95
96
  title,
96
97
  description,
97
98
  extra,
@@ -143,7 +144,7 @@ function Card({
143
144
  return /* @__PURE__ */ jsxs2(
144
145
  "section",
145
146
  {
146
- className: `sia-card${isCollapsed ? " sia-card--collapsed" : ""}${selectable ? " sia-card--selectable" : ""}${selectable && isSelected ? " sia-card--selected" : ""}${hoverActions ? " sia-card--hover-actions" : ""} ${className}`.trim(),
147
+ className: `sia-card${!bordered ? " sia-card--borderless" : ""}${isCollapsed ? " sia-card--collapsed" : ""}${selectable ? " sia-card--selectable" : ""}${selectable && isSelected ? " sia-card--selected" : ""}${hoverActions ? " sia-card--hover-actions" : ""} ${className}`.trim(),
147
148
  style: mergedStyle,
148
149
  role: selectable ? "checkbox" : void 0,
149
150
  "aria-checked": selectable ? isSelected : void 0,
@@ -1418,7 +1419,7 @@ function UploadItem({ file, files, props, actions }) {
1418
1419
  }
1419
1420
  useEffect4(() => setFailed(false), [source]);
1420
1421
  const node = /* @__PURE__ */ jsxs8("div", { className: `sia-upload__item sia-upload__item--${file.status ?? "ready"}`, children: [
1421
- props.listType !== "text" ? /* @__PURE__ */ jsx8(Button, { variant: "text", className: "sia-upload__thumbnail", "aria-label": `\u9884\u89C8\u7F29\u7565\u56FE ${file.name}`, onClick: actions.preview, disabled: !canPreview, children: source && !failed ? /* @__PURE__ */ jsx8("img", { src: source, alt: file.name, onError: () => setFailed(true) }) : /* @__PURE__ */ jsx8(Icon, { name: file.type?.startsWith("image/") ? "image" : "file", size: 28 }) }) : /* @__PURE__ */ jsx8(Icon, { name: file.status === "done" ? "circle-check" : "file", size: 16 }),
1422
+ props.listType !== "text" ? /* @__PURE__ */ jsx8(Button, { variant: "text", className: "sia-upload__thumbnail", "aria-label": `\u9884\u89C8\u7F29\u7565\u56FE ${file.name}`, onClick: actions.preview, disabled: !canPreview, children: source && !failed ? /* @__PURE__ */ jsx8("img", { src: source, alt: file.name, onError: () => setFailed(true) }) : /* @__PURE__ */ jsx8(Icon, { name: file.type?.startsWith("image/") ? "image" : "file", size: 28 }) }) : /* @__PURE__ */ jsx8("span", { className: "sia-upload__file-icon", children: /* @__PURE__ */ jsx8(Icon, { name: file.status === "done" ? "circle-check" : "file", size: 24 }) }),
1422
1423
  /* @__PURE__ */ jsx8("span", { className: "sia-upload__name", ...withTitleTooltip({ title: file.relativePath || file.name }), children: file.url ? /* @__PURE__ */ jsx8("a", { href: file.url, target: "_blank", rel: "noreferrer", children: file.name }) : file.name }),
1423
1424
  /* @__PURE__ */ jsxs8("span", { className: "sia-upload__actions", children: [
1424
1425
  /* @__PURE__ */ jsx8(Button, { variant: "text", title: "\u9884\u89C8", "aria-label": `\u9884\u89C8 ${file.name}`, disabled: !canPreview, onClick: actions.preview, children: /* @__PURE__ */ jsx8(Icon, { name: "eye", size: 14 }) }),
@@ -1433,7 +1434,8 @@ function UploadItem({ file, files, props, actions }) {
1433
1434
  ] }),
1434
1435
  /* @__PURE__ */ jsx8("span", { className: "sia-upload__progress", role: "progressbar", "aria-label": `${file.name} \u4E0A\u4F20\u8FDB\u5EA6`, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": file.percent ?? 0, children: /* @__PURE__ */ jsx8("span", { style: { width: `${file.percent ?? 0}%` } }) })
1435
1436
  ] }),
1436
- file.status === "error" && /* @__PURE__ */ jsx8("span", { className: "sia-upload__error", children: "\u4E0A\u4F20\u5931\u8D25" })
1437
+ file.status === "error" && /* @__PURE__ */ jsx8("span", { className: "sia-upload__error", children: "\u4E0A\u4F20\u5931\u8D25" }),
1438
+ props.listType === "text" && (file.status === void 0 || file.status === "ready" || file.status === "done") && /* @__PURE__ */ jsx8("span", { className: "sia-upload__status", children: file.status === "done" ? "\u4E0A\u4F20\u5B8C\u6210" : "\u5DF2\u9009\u62E9" })
1437
1439
  ] });
1438
1440
  return /* @__PURE__ */ jsx8(Fragment4, { children: props.itemRender ? props.itemRender(node, file, files, actions) : node });
1439
1441
  }
@@ -1712,6 +1714,10 @@ var UploadRoot = forwardRef(function UploadRoot2({
1712
1714
  }
1713
1715
  ),
1714
1716
  listType !== "picture-card" && trigger,
1717
+ showUploadList && listType === "text" && files.length > 0 && /* @__PURE__ */ jsxs8("div", { className: "sia-upload__list-heading", role: "status", children: [
1718
+ "\u5DF2\u9009\u6587\u4EF6 ",
1719
+ /* @__PURE__ */ jsx8("span", { className: "sia-upload__count", children: files.length })
1720
+ ] }),
1715
1721
  /* @__PURE__ */ jsxs8("div", { className: "sia-upload__list", children: [
1716
1722
  showUploadList && files.map((file) => /* @__PURE__ */ jsx8(UploadItem, { file, files, props: { listType, disabled, itemRender, onPreview, downloadRequest, accept }, actions: {
1717
1723
  upload: () => start(file),
@@ -1750,7 +1756,7 @@ var UploadDragger = forwardRef(function UploadDragger2({ hint = "\u652F\u6301\u5
1750
1756
  ] }) });
1751
1757
  });
1752
1758
  var Upload = Object.assign(UploadRoot, {
1753
- /** 可点击、键盘操作和拖拽的上传区域,ref 支持手动上传、取消及移除。 */
1759
+ /** 可点击、键盘操作和拖拽的上传区域,ref 支持手动上传、取消及移除;默认内容在文字或图片列表非空且可见时收紧高度,清空后恢复。 */
1754
1760
  Dragger: UploadDragger,
1755
1761
  /** beforeUpload 返回时移除该文件,不进行上传。 */
1756
1762
  LIST_IGNORE
@@ -46,6 +46,12 @@ declare function Toolbar({ items, onAction, disabled, size, variant, overflowLab
46
46
  type CardAccent = "primary" | "success" | "warning" | "error";
47
47
  /** 卡片的属性配置。 */
48
48
  interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
49
+ /**
50
+ * 是否显示外边框并保留默认内部留白。false 移除外边框、选中描边、标题区左右留白及说明、正文、悬浮操作区的内边距;保留背景、圆角、内部分割线和键盘焦点提示。
51
+ * 无边框时仍可通过 bodyStyle.padding 自定义正文内边距。
52
+ * @defaultValue true
53
+ */
54
+ bordered?: boolean;
49
55
  /** 标题内容,可传入文本或 React 节点。 */
50
56
  title?: ReactNode;
51
57
  /** 补充说明内容。 */
@@ -60,7 +66,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
60
66
  /** 受控选中状态,需在 onSelectedChange 中更新。 */
61
67
  selected?: boolean;
62
68
  /**
63
- * 是否显示选中卡片右上角的三角勾选标记。仅在 selectable 且已选中时生效;false 保留选中边框和键盘交互。
69
+ * 是否显示选中卡片右上角的三角勾选标记。仅在 selectable 且已选中时生效;false 保留键盘交互,选中边框仅在 bordered 为 true 时显示。
64
70
  * @defaultValue true
65
71
  */
66
72
  showSelectedIndicator?: boolean;
@@ -107,7 +113,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
107
113
  bodyStyle?: CSSProperties;
108
114
  }
109
115
  /** 卡片组件。 */
110
- declare function Card({ title, description, extra, selectable, selected, showSelectedIndicator, defaultSelected, disabled, onSelectedChange, hoverActions, accent, accentColor, collapsible, collapsed, defaultCollapsed, onCollapsedChange, bodyHeight, bodyClassName, bodyStyle, className, style, children, onClick, onKeyDown, ...props }: CardProps): react.JSX.Element;
116
+ declare function Card({ bordered, title, description, extra, selectable, selected, showSelectedIndicator, defaultSelected, disabled, onSelectedChange, hoverActions, accent, accentColor, collapsible, collapsed, defaultCollapsed, onCollapsedChange, bodyHeight, bodyClassName, bodyStyle, className, style, children, onClick, onKeyDown, ...props }: CardProps): react.JSX.Element;
111
117
 
112
118
  declare const iconPaths: {
113
119
  "notepad-file": react.JSX.Element;
@@ -1999,7 +2005,7 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
1999
2005
  fileList?: readonly UploadFile[];
2000
2006
  /** 非受控初始列表,后续修改不重置列表。 @defaultValue [] */
2001
2007
  defaultFileList?: readonly UploadFile[];
2002
- /** 文件列表样式:text 为文字列表,picture 为带缩略图的图片列表,picture-card 为照片墙。 @defaultValue "text" */
2008
+ /** 文件列表样式:text 为带文件数量标题、图标和状态的文字卡片列表,picture 为带缩略图的图片列表,picture-card 为照片墙。 @defaultValue "text" */
2003
2009
  listType?: "text" | "picture" | "picture-card";
2004
2010
  /** 照片墙卡片尺寸,仅 listType="picture-card" 生效;数字设置正方形,对象分别设置宽高,单位 px。默认 112×112,各边最小 48,无效数值使用默认值;宽或高小于 88px 时隐藏文件名。 */
2005
2011
  cardSize?: number | {
@@ -2008,7 +2014,7 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
2008
2014
  /** 卡片高度,默认 112px,最小 48px。 */
2009
2015
  height?: number;
2010
2016
  };
2011
- /** 是否显示列表;隐藏时仍执行数量限制和变更通知。 @defaultValue true */
2017
+ /** 是否显示内置列表及文字列表的数量标题;隐藏时仍执行数量限制和变更通知。 @defaultValue true */
2012
2018
  showUploadList?: boolean;
2013
2019
  /** 启动前校验,可异步;false 保留 ready,Upload.LIST_IGNORE 移除,File 转换本次上传内容;拒绝或抛错进入 error。手动上传时在调用 upload 后执行。 */
2014
2020
  beforeUpload?: (file: File, fileList: readonly File[]) => boolean | File | symbol | Promise<boolean | File | symbol>;
@@ -2041,9 +2047,9 @@ interface UploadDraggerProps extends UploadProps {
2041
2047
  hint?: ReactNode;
2042
2048
  }
2043
2049
 
2044
- /** 上传组件,支持图片列表、照片墙、目录、粘贴与完全受控请求;未配置请求时仅选择文件。 */
2050
+ /** 上传组件,默认以带数量标题和状态的文字卡片展示已选文件;支持图片列表、照片墙、目录、粘贴与完全受控请求,未配置请求时仅选择文件。 */
2045
2051
  declare const Upload: react.ForwardRefExoticComponent<UploadProps & react.RefAttributes<UploadRef>> & {
2046
- /** 可点击、键盘操作和拖拽的上传区域,ref 支持手动上传、取消及移除。 */
2052
+ /** 可点击、键盘操作和拖拽的上传区域,ref 支持手动上传、取消及移除;默认内容在文字或图片列表非空且可见时收紧高度,清空后恢复。 */
2047
2053
  Dragger: react.ForwardRefExoticComponent<UploadDraggerProps & react.RefAttributes<UploadRef>>;
2048
2054
  /** beforeUpload 返回时移除该文件,不进行上传。 */
2049
2055
  LIST_IGNORE: symbol;
@@ -46,6 +46,12 @@ declare function Toolbar({ items, onAction, disabled, size, variant, overflowLab
46
46
  type CardAccent = "primary" | "success" | "warning" | "error";
47
47
  /** 卡片的属性配置。 */
48
48
  interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
49
+ /**
50
+ * 是否显示外边框并保留默认内部留白。false 移除外边框、选中描边、标题区左右留白及说明、正文、悬浮操作区的内边距;保留背景、圆角、内部分割线和键盘焦点提示。
51
+ * 无边框时仍可通过 bodyStyle.padding 自定义正文内边距。
52
+ * @defaultValue true
53
+ */
54
+ bordered?: boolean;
49
55
  /** 标题内容,可传入文本或 React 节点。 */
50
56
  title?: ReactNode;
51
57
  /** 补充说明内容。 */
@@ -60,7 +66,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
60
66
  /** 受控选中状态,需在 onSelectedChange 中更新。 */
61
67
  selected?: boolean;
62
68
  /**
63
- * 是否显示选中卡片右上角的三角勾选标记。仅在 selectable 且已选中时生效;false 保留选中边框和键盘交互。
69
+ * 是否显示选中卡片右上角的三角勾选标记。仅在 selectable 且已选中时生效;false 保留键盘交互,选中边框仅在 bordered 为 true 时显示。
64
70
  * @defaultValue true
65
71
  */
66
72
  showSelectedIndicator?: boolean;
@@ -107,7 +113,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
107
113
  bodyStyle?: CSSProperties;
108
114
  }
109
115
  /** 卡片组件。 */
110
- declare function Card({ title, description, extra, selectable, selected, showSelectedIndicator, defaultSelected, disabled, onSelectedChange, hoverActions, accent, accentColor, collapsible, collapsed, defaultCollapsed, onCollapsedChange, bodyHeight, bodyClassName, bodyStyle, className, style, children, onClick, onKeyDown, ...props }: CardProps): react.JSX.Element;
116
+ declare function Card({ bordered, title, description, extra, selectable, selected, showSelectedIndicator, defaultSelected, disabled, onSelectedChange, hoverActions, accent, accentColor, collapsible, collapsed, defaultCollapsed, onCollapsedChange, bodyHeight, bodyClassName, bodyStyle, className, style, children, onClick, onKeyDown, ...props }: CardProps): react.JSX.Element;
111
117
 
112
118
  declare const iconPaths: {
113
119
  "notepad-file": react.JSX.Element;
@@ -1999,7 +2005,7 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
1999
2005
  fileList?: readonly UploadFile[];
2000
2006
  /** 非受控初始列表,后续修改不重置列表。 @defaultValue [] */
2001
2007
  defaultFileList?: readonly UploadFile[];
2002
- /** 文件列表样式:text 为文字列表,picture 为带缩略图的图片列表,picture-card 为照片墙。 @defaultValue "text" */
2008
+ /** 文件列表样式:text 为带文件数量标题、图标和状态的文字卡片列表,picture 为带缩略图的图片列表,picture-card 为照片墙。 @defaultValue "text" */
2003
2009
  listType?: "text" | "picture" | "picture-card";
2004
2010
  /** 照片墙卡片尺寸,仅 listType="picture-card" 生效;数字设置正方形,对象分别设置宽高,单位 px。默认 112×112,各边最小 48,无效数值使用默认值;宽或高小于 88px 时隐藏文件名。 */
2005
2011
  cardSize?: number | {
@@ -2008,7 +2014,7 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
2008
2014
  /** 卡片高度,默认 112px,最小 48px。 */
2009
2015
  height?: number;
2010
2016
  };
2011
- /** 是否显示列表;隐藏时仍执行数量限制和变更通知。 @defaultValue true */
2017
+ /** 是否显示内置列表及文字列表的数量标题;隐藏时仍执行数量限制和变更通知。 @defaultValue true */
2012
2018
  showUploadList?: boolean;
2013
2019
  /** 启动前校验,可异步;false 保留 ready,Upload.LIST_IGNORE 移除,File 转换本次上传内容;拒绝或抛错进入 error。手动上传时在调用 upload 后执行。 */
2014
2020
  beforeUpload?: (file: File, fileList: readonly File[]) => boolean | File | symbol | Promise<boolean | File | symbol>;
@@ -2041,9 +2047,9 @@ interface UploadDraggerProps extends UploadProps {
2041
2047
  hint?: ReactNode;
2042
2048
  }
2043
2049
 
2044
- /** 上传组件,支持图片列表、照片墙、目录、粘贴与完全受控请求;未配置请求时仅选择文件。 */
2050
+ /** 上传组件,默认以带数量标题和状态的文字卡片展示已选文件;支持图片列表、照片墙、目录、粘贴与完全受控请求,未配置请求时仅选择文件。 */
2045
2051
  declare const Upload: react.ForwardRefExoticComponent<UploadProps & react.RefAttributes<UploadRef>> & {
2046
- /** 可点击、键盘操作和拖拽的上传区域,ref 支持手动上传、取消及移除。 */
2052
+ /** 可点击、键盘操作和拖拽的上传区域,ref 支持手动上传、取消及移除;默认内容在文字或图片列表非空且可见时收紧高度,清空后恢复。 */
2047
2053
  Dragger: react.ForwardRefExoticComponent<UploadDraggerProps & react.RefAttributes<UploadRef>>;
2048
2054
  /** beforeUpload 返回时移除该文件,不进行上传。 */
2049
2055
  LIST_IGNORE: symbol;
package/dist/core.cjs CHANGED
@@ -1757,6 +1757,7 @@ function Toolbar({ items, onAction, disabled = false, size = "small", variant =
1757
1757
  var import_react9 = require("react");
1758
1758
  var import_jsx_runtime9 = require("react/jsx-runtime");
1759
1759
  function Card({
1760
+ bordered = true,
1760
1761
  title,
1761
1762
  description,
1762
1763
  extra,
@@ -1808,7 +1809,7 @@ function Card({
1808
1809
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1809
1810
  "section",
1810
1811
  {
1811
- className: `sia-card${isCollapsed ? " sia-card--collapsed" : ""}${selectable ? " sia-card--selectable" : ""}${selectable && isSelected ? " sia-card--selected" : ""}${hoverActions ? " sia-card--hover-actions" : ""} ${className}`.trim(),
1812
+ className: `sia-card${!bordered ? " sia-card--borderless" : ""}${isCollapsed ? " sia-card--collapsed" : ""}${selectable ? " sia-card--selectable" : ""}${selectable && isSelected ? " sia-card--selected" : ""}${hoverActions ? " sia-card--hover-actions" : ""} ${className}`.trim(),
1812
1813
  style: mergedStyle,
1813
1814
  role: selectable ? "checkbox" : void 0,
1814
1815
  "aria-checked": selectable ? isSelected : void 0,
@@ -4528,7 +4529,7 @@ function UploadItem({ file, files, props, actions }) {
4528
4529
  }
4529
4530
  (0, import_react24.useEffect)(() => setFailed(false), [source]);
4530
4531
  const node = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: `sia-upload__item sia-upload__item--${file.status ?? "ready"}`, children: [
4531
- props.listType !== "text" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { variant: "text", className: "sia-upload__thumbnail", "aria-label": `\u9884\u89C8\u7F29\u7565\u56FE ${file.name}`, onClick: actions.preview, disabled: !canPreview, children: source && !failed ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: source, alt: file.name, onError: () => setFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: file.type?.startsWith("image/") ? "image" : "file", size: 28 }) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: file.status === "done" ? "circle-check" : "file", size: 16 }),
4532
+ props.listType !== "text" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { variant: "text", className: "sia-upload__thumbnail", "aria-label": `\u9884\u89C8\u7F29\u7565\u56FE ${file.name}`, onClick: actions.preview, disabled: !canPreview, children: source && !failed ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: source, alt: file.name, onError: () => setFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: file.type?.startsWith("image/") ? "image" : "file", size: 28 }) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sia-upload__file-icon", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: file.status === "done" ? "circle-check" : "file", size: 24 }) }),
4532
4533
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sia-upload__name", ...withTitleTooltip({ title: file.relativePath || file.name }), children: file.url ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: file.url, target: "_blank", rel: "noreferrer", children: file.name }) : file.name }),
4533
4534
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "sia-upload__actions", children: [
4534
4535
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { variant: "text", title: "\u9884\u89C8", "aria-label": `\u9884\u89C8 ${file.name}`, disabled: !canPreview, onClick: actions.preview, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "eye", size: 14 }) }),
@@ -4543,7 +4544,8 @@ function UploadItem({ file, files, props, actions }) {
4543
4544
  ] }),
4544
4545
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sia-upload__progress", role: "progressbar", "aria-label": `${file.name} \u4E0A\u4F20\u8FDB\u5EA6`, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": file.percent ?? 0, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { width: `${file.percent ?? 0}%` } }) })
4545
4546
  ] }),
4546
- file.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sia-upload__error", children: "\u4E0A\u4F20\u5931\u8D25" })
4547
+ file.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sia-upload__error", children: "\u4E0A\u4F20\u5931\u8D25" }),
4548
+ props.listType === "text" && (file.status === void 0 || file.status === "ready" || file.status === "done") && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sia-upload__status", children: file.status === "done" ? "\u4E0A\u4F20\u5B8C\u6210" : "\u5DF2\u9009\u62E9" })
4547
4549
  ] });
4548
4550
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: props.itemRender ? props.itemRender(node, file, files, actions) : node });
4549
4551
  }
@@ -4822,6 +4824,10 @@ var UploadRoot = (0, import_react24.forwardRef)(function UploadRoot2({
4822
4824
  }
4823
4825
  ),
4824
4826
  listType !== "picture-card" && trigger,
4827
+ showUploadList && listType === "text" && files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "sia-upload__list-heading", role: "status", children: [
4828
+ "\u5DF2\u9009\u6587\u4EF6 ",
4829
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sia-upload__count", children: files.length })
4830
+ ] }),
4825
4831
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "sia-upload__list", children: [
4826
4832
  showUploadList && files.map((file) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(UploadItem, { file, files, props: { listType, disabled, itemRender, onPreview, downloadRequest, accept }, actions: {
4827
4833
  upload: () => start(file),
@@ -4860,7 +4866,7 @@ var UploadDragger = (0, import_react24.forwardRef)(function UploadDragger2({ hin
4860
4866
  ] }) });
4861
4867
  });
4862
4868
  var Upload = Object.assign(UploadRoot, {
4863
- /** 可点击、键盘操作和拖拽的上传区域,ref 支持手动上传、取消及移除。 */
4869
+ /** 可点击、键盘操作和拖拽的上传区域,ref 支持手动上传、取消及移除;默认内容在文字或图片列表非空且可见时收紧高度,清空后恢复。 */
4864
4870
  Dragger: UploadDragger,
4865
4871
  /** beforeUpload 返回时移除该文件,不进行上传。 */
4866
4872
  LIST_IGNORE
package/dist/core.css CHANGED
@@ -2593,6 +2593,18 @@ fieldset:disabled .sia-input-number__floating-placeholder {
2593
2593
  border-color: var(--sia-color-primary);
2594
2594
  box-shadow: inset 0 0 0 1px var(--sia-color-primary);
2595
2595
  }
2596
+ .sia-card.sia-card--borderless {
2597
+ border: 0;
2598
+ box-shadow: none;
2599
+ }
2600
+ .sia-card--borderless > .sia-card__header {
2601
+ margin-inline: 0;
2602
+ }
2603
+ .sia-card--borderless > .sia-card__description,
2604
+ .sia-card--borderless > .sia-card__body,
2605
+ .sia-card--borderless > .sia-card__hover-actions {
2606
+ padding: 0;
2607
+ }
2596
2608
  .sia-card--selectable:focus-visible {
2597
2609
  outline: 2px solid var(--sia-color-primary);
2598
2610
  outline-offset: 2px;
@@ -5009,7 +5021,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
5009
5021
  display: flex;
5010
5022
  flex-wrap: wrap;
5011
5023
  align-items: center;
5012
- gap: var(--sia-query-field-gap, 6px);
5024
+ gap: var(--sia-query-field-gap, 8px);
5013
5025
  padding-top: 8px;
5014
5026
  }
5015
5027
  .sia-query-form__field {
@@ -5020,10 +5032,10 @@ fieldset:disabled .sia-input-number__floating-placeholder {
5020
5032
  max-width: 100%;
5021
5033
  }
5022
5034
  .sia-query-form__field:has(.sia-picker-range-control, .sia-time-range, .sia-select-date-range, .sia-space-compact:not(.sia-space-compact--vertical) > :nth-child(2)) {
5023
- --sia-query-item-width: calc(var(--sia-query-field-width, 220px) + var(--sia-query-field-width, 220px) + var(--sia-query-field-gap, 6px));
5035
+ --sia-query-item-width: calc(var(--sia-query-field-width, 220px) + var(--sia-query-field-width, 220px) + var(--sia-query-field-gap, 8px));
5024
5036
  }
5025
5037
  .sia-query-form .sia-query-form__fields > .sia-query-form__field:has(.sia-select-date-range) {
5026
- --sia-query-item-width: calc(var(--sia-query-field-width, 220px) * 3 + var(--sia-query-field-gap, 6px) * 2);
5038
+ --sia-query-item-width: calc(var(--sia-query-field-width, 220px) * 3 + var(--sia-query-field-gap, 8px) * 2);
5027
5039
  }
5028
5040
  .sia-query-form__field :is(.sia-picker-range-control, .sia-time-range, .sia-select-date-range, .sia-space-compact:not(.sia-space-compact--vertical)) {
5029
5041
  width: 100%;
@@ -6642,7 +6654,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
6642
6654
  box-sizing: border-box;
6643
6655
  display: inline-flex;
6644
6656
  align-items: stretch;
6645
- width: min(calc(var(--sia-query-field-width, 220px) * 3 + var(--sia-query-field-gap, 6px) * 2), 100%);
6657
+ width: min(calc(var(--sia-query-field-width, 220px) * 3 + var(--sia-query-field-gap, 8px) * 2), 100%);
6646
6658
  min-width: 0;
6647
6659
  vertical-align: middle;
6648
6660
  }
@@ -7336,6 +7348,91 @@ fieldset:disabled .sia-input-number__floating-placeholder {
7336
7348
  .sia-upload__item--error .sia-upload__remove {
7337
7349
  color: var(--sia-color-error);
7338
7350
  }
7351
+ .sia-upload__list-heading {
7352
+ display: flex;
7353
+ align-items: center;
7354
+ gap: 8px;
7355
+ margin-top: 4px;
7356
+ font-size: 14px;
7357
+ font-weight: 600;
7358
+ }
7359
+ .sia-upload__count {
7360
+ display: inline-grid;
7361
+ place-items: center;
7362
+ min-width: 24px;
7363
+ height: 24px;
7364
+ padding: 0 6px;
7365
+ box-sizing: border-box;
7366
+ color: var(--sia-color-primary-text);
7367
+ background: var(--sia-color-control-hover);
7368
+ border-radius: 12px;
7369
+ font-size: 12px;
7370
+ }
7371
+ .sia-upload--text .sia-upload__list {
7372
+ gap: 8px;
7373
+ }
7374
+ .sia-upload--text .sia-upload__item {
7375
+ box-sizing: border-box;
7376
+ min-height: 72px;
7377
+ padding: 12px;
7378
+ column-gap: 12px;
7379
+ row-gap: 4px;
7380
+ border: 1px solid var(--sia-color-border);
7381
+ border-radius: 8px;
7382
+ background: var(--sia-color-control-hover);
7383
+ }
7384
+ .sia-upload--text .sia-upload__name {
7385
+ font-size: 14px;
7386
+ font-weight: 500;
7387
+ }
7388
+ .sia-upload__file-icon {
7389
+ display: grid;
7390
+ place-items: center;
7391
+ grid-column: 1;
7392
+ grid-row: 1 / 3;
7393
+ width: 40px;
7394
+ height: 40px;
7395
+ color: var(--sia-color-primary-text);
7396
+ background: var(--sia-color-surface);
7397
+ border-radius: 8px;
7398
+ }
7399
+ .sia-upload__status {
7400
+ grid-column: 2;
7401
+ font-size: 12px;
7402
+ color: var(--sia-color-text-secondary);
7403
+ }
7404
+ .sia-upload--text .sia-upload__actions {
7405
+ grid-row: 1 / 3;
7406
+ gap: 4px;
7407
+ }
7408
+ .sia-upload--text .sia-upload__actions > .sia-button {
7409
+ width: 30px;
7410
+ height: 30px;
7411
+ }
7412
+ .sia-upload--text .sia-upload__uploading,
7413
+ .sia-upload--text .sia-upload__error {
7414
+ grid-column: 2;
7415
+ }
7416
+ .sia-upload--text .sia-upload__item--done .sia-upload__file-icon,
7417
+ .sia-upload--text .sia-upload__item--done .sia-upload__status {
7418
+ color: var(--sia-color-success);
7419
+ }
7420
+ .sia-upload--text .sia-upload__item--error {
7421
+ border-color: var(--sia-color-error);
7422
+ }
7423
+ .sia-upload--text .sia-upload__item--error .sia-upload__file-icon {
7424
+ color: var(--sia-color-error);
7425
+ }
7426
+ @media (max-width: 480px) {
7427
+ .sia-upload--text .sia-upload__item {
7428
+ grid-template-columns: auto minmax(0, 1fr);
7429
+ }
7430
+ .sia-upload--text .sia-upload__actions {
7431
+ grid-column: 2;
7432
+ grid-row: 3;
7433
+ justify-self: end;
7434
+ }
7435
+ }
7339
7436
  .sia-upload__thumbnail.sia-button {
7340
7437
  display: grid;
7341
7438
  place-items: center;
@@ -7502,6 +7599,16 @@ fieldset:disabled .sia-input-number__floating-placeholder {
7502
7599
  .sia-upload-dragger__content > .sia-icon {
7503
7600
  color: var(--sia-color-primary);
7504
7601
  }
7602
+ .sia-upload-dragger:not(.sia-upload--picture-card):has(.sia-upload__list:not(:empty)) .sia-upload-dragger__content {
7603
+ min-height: 104px;
7604
+ padding: 16px;
7605
+ gap: 6px;
7606
+ }
7607
+ .sia-upload-dragger:not(.sia-upload--picture-card):has(.sia-upload__list:not(:empty)) .sia-upload-dragger__content > .sia-icon {
7608
+ width: 24px;
7609
+ height: 24px;
7610
+ font-size: 24px;
7611
+ }
7505
7612
  .sia-upload.is-dragging .sia-upload__choose {
7506
7613
  outline: 2px solid var(--sia-color-primary);
7507
7614
  outline-offset: 2px;
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, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-MTKdBVk3.cjs';
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, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-C4ayGoM8.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, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-BrQetGru.js';
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, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-BemUqBUF.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
@@ -10,7 +10,7 @@ import {
10
10
  Typography,
11
11
  Upload,
12
12
  message
13
- } from "./chunk-QJH7H3CB.js";
13
+ } from "./chunk-NV4QPQSP.js";
14
14
  import "./chunk-SMCYEPBL.js";
15
15
  import {
16
16
  Modal,