@sia.soul/sia-react-ui 0.1.20 → 0.1.21

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.
Files changed (38) hide show
  1. package/dist/Select-4hGJt3RJ.d.cts +142 -0
  2. package/dist/Select-BNSE67xn.d.ts +142 -0
  3. package/dist/chart.d.cts +2498 -0
  4. package/dist/chart.d.ts +2498 -0
  5. package/dist/{chunk-4HB6GC24.js → chunk-3TRRBMXY.js} +37 -8
  6. package/dist/{chunk-3RWL67CK.js → chunk-7RNS52YG.js} +38 -5
  7. package/dist/{chunk-SUMXP2SF.js → chunk-KLI65JVD.js} +12 -4
  8. package/dist/{chunk-I3EF5SF2.js → chunk-RWGSZW32.js} +1 -1
  9. package/dist/{chunk-LO3BUBWU.js → chunk-VN6PIPP7.js} +2 -2
  10. package/dist/{core-CdoVqv0o.d.ts → core-C5OnrCi4.d.cts} +1207 -3
  11. package/dist/{core-CM79w-7A.d.cts → core-DeZknKwc.d.ts} +1207 -3
  12. package/dist/core.cjs +77 -13
  13. package/dist/core.css +18 -1
  14. package/dist/core.d.cts +3 -3
  15. package/dist/core.d.ts +3 -3
  16. package/dist/core.js +3 -3
  17. package/dist/index.cjs +128 -21
  18. package/dist/index.css +18 -1
  19. package/dist/index.d.cts +1696 -7
  20. package/dist/index.d.ts +1696 -7
  21. package/dist/index.js +50 -13
  22. package/dist/markdown-editor.d.cts +41 -1
  23. package/dist/markdown-editor.d.ts +41 -1
  24. package/dist/rich-text-editor.cjs +11 -3
  25. package/dist/rich-text-editor.d.cts +46 -1
  26. package/dist/rich-text-editor.d.ts +46 -1
  27. package/dist/rich-text-editor.js +2 -2
  28. package/dist/{select-date-range-4tEYkA5O.d.cts → select-date-range-CGRb3-W8.d.ts} +116 -2
  29. package/dist/{select-date-range-D-ynrB5k.d.ts → select-date-range-DDmYGDD4.d.cts} +116 -2
  30. package/dist/select-date-range.cjs +36 -7
  31. package/dist/select-date-range.d.cts +3 -3
  32. package/dist/select-date-range.d.ts +3 -3
  33. package/dist/select-date-range.js +3 -3
  34. package/dist/{shared-DAYZvZVu.d.cts → shared-Bx4B28Wh.d.cts} +3 -0
  35. package/dist/{shared-DAYZvZVu.d.ts → shared-Bx4B28Wh.d.ts} +3 -0
  36. package/package.json +1 -1
  37. package/dist/Select-Cz3hzQl_.d.ts +0 -57
  38. package/dist/Select-Da9CLN0X.d.cts +0 -57
package/dist/index.cjs CHANGED
@@ -1484,6 +1484,7 @@ function DropdownRoot({
1484
1484
  open,
1485
1485
  defaultOpen = false,
1486
1486
  disabled = false,
1487
+ showTriggerIcon = true,
1487
1488
  arrow = false,
1488
1489
  autoFocus = false,
1489
1490
  openDelay = 80,
@@ -1644,6 +1645,10 @@ function DropdownRoot({
1644
1645
  className: "sia-dropdown__menu"
1645
1646
  }
1646
1647
  );
1648
+ const triggerNode = showTriggerIcon && (0, import_react7.isValidElement)(children) && children.type === Button && children.props.children !== void 0 && children.props.children !== null ? (0, import_react7.cloneElement)(children, {}, /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "sia-dropdown__trigger-content", children: [
1649
+ children.props.children,
1650
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "chevron-down", size: 14, className: "sia-dropdown__trigger-icon" })
1651
+ ] })) : children;
1647
1652
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1648
1653
  "span",
1649
1654
  {
@@ -1659,7 +1664,7 @@ function DropdownRoot({
1659
1664
  onKeyDown: handleKeyDown,
1660
1665
  ...props,
1661
1666
  children: [
1662
- children,
1667
+ triggerNode,
1663
1668
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1664
1669
  "span",
1665
1670
  {
@@ -1706,7 +1711,7 @@ function DropdownButton({
1706
1711
  }) {
1707
1712
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: `sia-dropdown-button ${className}`.trim(), children: [
1708
1713
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Button, { ...buttonProps, disabled, onClick, children }),
1709
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DropdownRoot, { ...dropdownProps, disabled, trigger, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1714
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DropdownRoot, { ...dropdownProps, disabled, trigger, showTriggerIcon: false, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1710
1715
  Button,
1711
1716
  {
1712
1717
  ...buttonProps,
@@ -1718,7 +1723,10 @@ function DropdownButton({
1718
1723
  ) })
1719
1724
  ] });
1720
1725
  }
1721
- var Dropdown = Object.assign(DropdownRoot, { Button: DropdownButton });
1726
+ var Dropdown = Object.assign(DropdownRoot, {
1727
+ /** 组合主操作按钮与下拉菜单的按钮组件。 */
1728
+ Button: DropdownButton
1729
+ });
1722
1730
 
1723
1731
  // src/components/Pagination.tsx
1724
1732
  var import_react18 = require("react");
@@ -2027,12 +2035,19 @@ function preset(type, defaults = {}) {
2027
2035
  });
2028
2036
  }
2029
2037
  var Modal2 = Object.assign(ModalRoot, {
2038
+ /** 直接打开实例,返回可用于更新或关闭的操作句柄。 */
2030
2039
  open: openModal,
2040
+ /** 显示普通信息提示。 */
2031
2041
  info: preset("info", { title: "\u63D0\u793A" }),
2042
+ /** 显示成功提示。 */
2032
2043
  success: preset("success", { title: "\u64CD\u4F5C\u6210\u529F" }),
2044
+ /** 显示警告提示。 */
2033
2045
  warning: preset("warning", { title: "\u8BF7\u6CE8\u610F" }),
2046
+ /** 显示错误提示。 */
2034
2047
  error: preset("error", { title: "\u64CD\u4F5C\u5931\u8D25" }),
2048
+ /** 打开确认弹框,支持异步确认;返回 false 可阻止关闭。 */
2035
2049
  confirm: preset("confirm", { title: "\u786E\u8BA4\u64CD\u4F5C" }),
2050
+ /** 关闭由此 API 打开的所有弹层。 */
2036
2051
  destroyAll() {
2037
2052
  [...modalHandles].forEach((handle) => handle.destroy());
2038
2053
  }
@@ -2215,7 +2230,10 @@ function CheckboxGroup({
2215
2230
  children
2216
2231
  ] }) }) });
2217
2232
  }
2218
- var Checkbox2 = Object.assign(CheckboxRoot, { Group: CheckboxGroup });
2233
+ var Checkbox2 = Object.assign(CheckboxRoot, {
2234
+ /** 组合多个子项并统一管理布局或选择状态。 */
2235
+ Group: CheckboxGroup
2236
+ });
2219
2237
 
2220
2238
  // src/components/SelectionPanel.tsx
2221
2239
  var import_react13 = require("react");
@@ -2695,6 +2713,8 @@ function SelectionPanel({
2695
2713
  const search = searchValue ?? localSearch;
2696
2714
  const [scrollTop, setScrollTop] = (0, import_react13.useState)(0);
2697
2715
  const [active, setActive] = (0, import_react13.useState)();
2716
+ const [keyboardActive, setKeyboardActive] = (0, import_react13.useState)(false);
2717
+ const [deselectedHover, setDeselectedHover] = (0, import_react13.useState)();
2698
2718
  const listRef = (0, import_react13.useRef)(null);
2699
2719
  const id = (0, import_react13.useId)();
2700
2720
  const selected = (0, import_react13.useMemo)(() => new Set(value), [value]);
@@ -2739,9 +2759,11 @@ function SelectionPanel({
2739
2759
  if (listRef.current) listRef.current.scrollTop = 0;
2740
2760
  setActive(void 0);
2741
2761
  }, [search, selectedOnly, count]);
2742
- function toggle(option) {
2762
+ function toggle(option, keyboard = false) {
2743
2763
  if (disabled || loading || option.disabled || option.optionType === "divider") return;
2744
2764
  setActive(option.value);
2765
+ setKeyboardActive(keyboard);
2766
+ setDeselectedHover(!keyboard && !multiple && allowDeselect && selected.has(option.value) ? option.value : void 0);
2745
2767
  onChange(multiple ? selected.has(option.value) ? value.filter((item) => item !== option.value) : [...value, option.value] : allowDeselect && selected.has(option.value) ? [] : [option.value]);
2746
2768
  }
2747
2769
  function batch(operation) {
@@ -2791,6 +2813,10 @@ function SelectionPanel({
2791
2813
  className: "sia-selection-panel__list",
2792
2814
  style: { maxHeight },
2793
2815
  onScroll: (event) => setScrollTop(event.currentTarget.scrollTop),
2816
+ onPointerDown: () => setKeyboardActive(false),
2817
+ onBlur: (event) => {
2818
+ if (!event.currentTarget.contains(event.relatedTarget)) setKeyboardActive(false);
2819
+ },
2794
2820
  "aria-activedescendant": active !== void 0 ? `${id}-${typeof active}-${active}` : void 0,
2795
2821
  onKeyDown: (event) => {
2796
2822
  if (event.target instanceof HTMLInputElement) return;
@@ -2798,6 +2824,8 @@ function SelectionPanel({
2798
2824
  const index = enabled.findIndex((option) => option.value === active);
2799
2825
  if (["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) {
2800
2826
  event.preventDefault();
2827
+ setKeyboardActive(true);
2828
+ setDeselectedHover(void 0);
2801
2829
  const next = event.key === "Home" ? 0 : event.key === "End" ? enabled.length - 1 : Math.max(0, Math.min(enabled.length - 1, index + (event.key === "ArrowDown" ? 1 : -1)));
2802
2830
  const option = enabled[next];
2803
2831
  setActive(option.value);
@@ -2808,7 +2836,7 @@ function SelectionPanel({
2808
2836
  }
2809
2837
  } else if ((event.key === "Enter" || event.key === " ") && index >= 0) {
2810
2838
  event.preventDefault();
2811
- toggle(enabled[index]);
2839
+ toggle(enabled[index], true);
2812
2840
  }
2813
2841
  },
2814
2842
  children: loading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { role: "status", children: "\u52A0\u8F7D\u4E2D\u2026" }) : !rows.length ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "sia-selection-panel__empty", children: "\u6682\u65E0\u5339\u914D\u9009\u9879" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { height: totalHeight, position: "relative" }, children: renderedRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
@@ -2824,7 +2852,11 @@ function SelectionPanel({
2824
2852
  tabIndex: -1,
2825
2853
  "aria-selected": selected.has(option.value),
2826
2854
  "aria-disabled": disabled || option.disabled || void 0,
2827
- className: `sia-selection-panel__option${active === option.value ? " is-active" : ""}`,
2855
+ className: `sia-selection-panel__option${keyboardActive && active === option.value ? " is-active" : ""}`,
2856
+ "data-deselected-hover": deselectedHover === option.value || void 0,
2857
+ onPointerLeave: () => {
2858
+ if (deselectedHover === option.value) setDeselectedHover(void 0);
2859
+ },
2828
2860
  onClick: (event) => {
2829
2861
  if (!event.target.closest(".sia-checkbox")) toggle(option);
2830
2862
  },
@@ -3276,7 +3308,8 @@ function defaultFilterOption(query, option) {
3276
3308
  var Select = (0, import_react17.forwardRef)(function Select2({
3277
3309
  options,
3278
3310
  mode = "single",
3279
- popupMode = "dropdown",
3311
+ popupMode: popupModeProp,
3312
+ modalThreshold = 15,
3280
3313
  modalConfig,
3281
3314
  value,
3282
3315
  defaultValue,
@@ -3285,7 +3318,7 @@ var Select = (0, import_react17.forwardRef)(function Select2({
3285
3318
  placeholderMode,
3286
3319
  size: sizeProp,
3287
3320
  status = "default",
3288
- allowClear = false,
3321
+ allowClear = true,
3289
3322
  loading = false,
3290
3323
  showSearch = false,
3291
3324
  showValue = false,
@@ -3318,6 +3351,9 @@ var Select = (0, import_react17.forwardRef)(function Select2({
3318
3351
  const searchRef = (0, import_react17.useRef)(null);
3319
3352
  const listRef = (0, import_react17.useRef)(null);
3320
3353
  const [open, setOpen] = (0, import_react17.useState)(false);
3354
+ const automaticMode = popupModeProp ?? (options.length > modalThreshold ? "modal" : "dropdown");
3355
+ const [openedMode, setOpenedMode] = (0, import_react17.useState)(automaticMode);
3356
+ const popupMode = open ? openedMode : automaticMode;
3321
3357
  const [modalValues, setModalValues] = (0, import_react17.useState)([]);
3322
3358
  const [selectedOnly, setSelectedOnly] = (0, import_react17.useState)(false);
3323
3359
  const [query, setQuery] = (0, import_react17.useState)("");
@@ -3389,9 +3425,10 @@ var Select = (0, import_react17.forwardRef)(function Select2({
3389
3425
  }
3390
3426
  function openDropdown() {
3391
3427
  if (disabled || loading) return;
3428
+ setOpenedMode(automaticMode);
3392
3429
  const selectedIndex = filteredOptions.findIndex((option) => selectedValueSet.has(option.value) && !option.disabled);
3393
3430
  setActiveIndex(selectedIndex >= 0 ? selectedIndex : firstEnabledIndex());
3394
- if (popupMode === "modal") {
3431
+ if (automaticMode === "modal") {
3395
3432
  setModalValues([...selectedValues]);
3396
3433
  setSelectedOnly(false);
3397
3434
  }
@@ -3700,6 +3737,7 @@ var DEFAULT_PAGE_SIZE_OPTIONS = [10, 25, 50, 100, 200, 500, 1e3, 2e3, 5e3];
3700
3737
  function Pagination({
3701
3738
  size: sizeProp,
3702
3739
  total = 0,
3740
+ currentPageCount,
3703
3741
  current,
3704
3742
  defaultCurrent = 1,
3705
3743
  pageSize,
@@ -3726,6 +3764,7 @@ function Pagination({
3726
3764
  const loading = refreshing ?? internalRefreshing;
3727
3765
  const sizes = [...new Set([...pageSizeOptions, size].filter((value) => value > 0))].sort((a, b) => a - b);
3728
3766
  const range = safeTotal ? [(safePage - 1) * size + 1, Math.min(safeTotal, safePage * size)] : [0, 0];
3767
+ const pageCount = Math.max(0, currentPageCount ?? (safeTotal ? range[1] - range[0] + 1 : 0));
3729
3768
  if (hideOnSinglePage && totalPages <= 1) return null;
3730
3769
  function change(nextPage, nextSize = size) {
3731
3770
  const nextTotalPages = Math.max(1, Math.ceil(safeTotal / nextSize));
@@ -3749,6 +3788,11 @@ function Pagination({
3749
3788
  }
3750
3789
  }
3751
3790
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: `sia-pagination sia-pagination--${controlSize} ${className}`.trim(), "aria-label": "\u5206\u9875", ...props, children: [
3791
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "sia-pagination__current-count", "aria-live": "polite", children: [
3792
+ "\u5F53\u524D\u9875 ",
3793
+ pageCount,
3794
+ " \u6761"
3795
+ ] }),
3752
3796
  showSizeChanger ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "sia-pagination__size", children: [
3753
3797
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "\u6BCF\u9875\u663E\u793A" }),
3754
3798
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
@@ -4460,11 +4504,17 @@ function openNotification(config) {
4460
4504
  return { key, close: () => closeNotification(key) };
4461
4505
  }
4462
4506
  var notification = {
4507
+ /** 直接打开实例,返回可用于更新或关闭的操作句柄。 */
4463
4508
  open: openNotification,
4509
+ /** 显示普通信息提示。 */
4464
4510
  info: (config) => openNotification({ ...config, type: "info" }),
4511
+ /** 显示成功提示。 */
4465
4512
  success: (config) => openNotification({ ...config, type: "success" }),
4513
+ /** 显示警告提示。 */
4466
4514
  warning: (config) => openNotification({ ...config, type: "warning" }),
4515
+ /** 显示错误提示。 */
4467
4516
  error: (config) => openNotification({ ...config, type: "error" }),
4517
+ /** 关闭指定实例;未指定标识时关闭所有实例。 */
4468
4518
  destroy: (key) => {
4469
4519
  if (key !== void 0) closeNotification(key);
4470
4520
  else {
@@ -4640,7 +4690,10 @@ function SpaceRoot({
4640
4690
  split !== void 0 && index < items.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "sia-space__split", children: split }) : null
4641
4691
  ] }, index)) });
4642
4692
  }
4643
- var Space = Object.assign(SpaceRoot, { Compact: SpaceCompact });
4693
+ var Space = Object.assign(SpaceRoot, {
4694
+ /** 紧凑布局容器,将相邻控件组合为连续的按钮或输入组。 */
4695
+ Compact: SpaceCompact
4696
+ });
4644
4697
  function Divider({
4645
4698
  orientation = "horizontal",
4646
4699
  variant = "solid",
@@ -4913,7 +4966,10 @@ function SplitterRoot({
4913
4966
  )];
4914
4967
  }) });
4915
4968
  }
4916
- var Splitter = Object.assign(SplitterRoot, { Panel: SplitterPanel });
4969
+ var Splitter = Object.assign(SplitterRoot, {
4970
+ /** Splitter 中的可调整大小面板。 */
4971
+ Panel: SplitterPanel
4972
+ });
4917
4973
 
4918
4974
  // src/components/ToolPanel.tsx
4919
4975
  var import_react25 = require("react");
@@ -5463,7 +5519,9 @@ function openDrawer(config) {
5463
5519
  return handle;
5464
5520
  }
5465
5521
  var Drawer2 = Object.assign(DrawerRoot, {
5522
+ /** 直接打开实例,返回可用于更新或关闭的操作句柄。 */
5466
5523
  open: openDrawer,
5524
+ /** 关闭由此 API 打开的所有弹层。 */
5467
5525
  destroyAll() {
5468
5526
  [...drawerHandles].forEach((handle) => handle.destroy());
5469
5527
  }
@@ -5867,9 +5925,13 @@ function FormErrorList({ errors = [] }) {
5867
5925
  return errors.length ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "sia-form-error-list", children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { children: error }, index)) }) : null;
5868
5926
  }
5869
5927
  var Form = Object.assign(FormRoot, {
5928
+ /** 表单字段,负责字段值绑定、校验和标签布局。 */
5870
5929
  Item: FormItem,
5930
+ /** 动态表单列表,提供字段索引以及新增、删除、移动操作。 */
5871
5931
  List: FormList,
5932
+ /** 显示表单错误文本集合。 */
5872
5933
  ErrorList: FormErrorList,
5934
+ /** 创建或复用表单实例,返回单元素元组 [form]。 */
5873
5935
  useForm
5874
5936
  });
5875
5937
 
@@ -5948,7 +6010,12 @@ function RadioGroup({
5948
6010
  children
5949
6011
  ] }) }) });
5950
6012
  }
5951
- var Radio2 = Object.assign(RadioRoot, { Button: RadioButton, Group: RadioGroup });
6013
+ var Radio2 = Object.assign(RadioRoot, {
6014
+ /** 组合主操作按钮与下拉菜单的按钮组件。 */
6015
+ Button: RadioButton,
6016
+ /** 组合多个子项并统一管理布局或选择状态。 */
6017
+ Group: RadioGroup
6018
+ });
5952
6019
 
5953
6020
  // src/components/Slider.tsx
5954
6021
  var import_react29 = require("react");
@@ -7871,7 +7938,12 @@ function UploadDragger({ hint = "\u652F\u6301\u5355\u4E2A\u6216\u6279\u91CF\u4E0
7871
7938
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: hint })
7872
7939
  ] }) });
7873
7940
  }
7874
- var Upload = Object.assign(UploadRoot, { Dragger: UploadDragger, LIST_IGNORE });
7941
+ var Upload = Object.assign(UploadRoot, {
7942
+ /** 支持拖入文件上传的区域组件。 */
7943
+ Dragger: UploadDragger,
7944
+ /** beforeUpload 返回此标记时忽略该文件,不加入上传列表。 */
7945
+ LIST_IGNORE
7946
+ });
7875
7947
 
7876
7948
  // src/components/TextArea.tsx
7877
7949
  var import_react36 = require("react");
@@ -10073,12 +10145,19 @@ function shortcut(type) {
10073
10145
  return (content, duration) => openMessage({ content, duration, type });
10074
10146
  }
10075
10147
  var message = {
10148
+ /** 直接打开实例,返回可用于更新或关闭的操作句柄。 */
10076
10149
  open: openMessage,
10150
+ /** 显示普通信息提示。 */
10077
10151
  info: shortcut("info"),
10152
+ /** 显示成功提示。 */
10078
10153
  success: shortcut("success"),
10154
+ /** 显示警告提示。 */
10079
10155
  warning: shortcut("warning"),
10156
+ /** 显示错误提示。 */
10080
10157
  error: shortcut("error"),
10158
+ /** 显示持续加载提示。 */
10081
10159
  loading: shortcut("loading"),
10160
+ /** 关闭指定实例;未指定标识时关闭所有实例。 */
10082
10161
  destroy(key) {
10083
10162
  if (key !== void 0) {
10084
10163
  closeMessage(key);
@@ -10086,6 +10165,7 @@ var message = {
10086
10165
  }
10087
10166
  [...messageItems].forEach((item) => closeMessage(item.key));
10088
10167
  },
10168
+ /** 配置消息默认持续时间和最大同时显示数量。 */
10089
10169
  config(config) {
10090
10170
  if (config.duration !== void 0) defaultDuration = config.duration;
10091
10171
  if (config.maxCount !== void 0) maxCount = Math.max(1, config.maxCount);
@@ -10819,7 +10899,7 @@ function TableCellContent({ children, ellipsis, title }) {
10819
10899
  layouts.forEach((layout) => layout.removeAttribute("data-table-inline-layout"));
10820
10900
  };
10821
10901
  }, [children, ellipsis, customContent]);
10822
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { ref, className: "sia-table__cell-content", title, "data-custom-content": customContent || void 0, "data-content-overflow": ellipsis && customContent && overflowing || void 0, children });
10902
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { ref, className: "sia-table__cell-content", "data-custom-content": customContent || void 0, "data-content-overflow": ellipsis && customContent && overflowing || void 0, children: title ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tooltip, { title, className: "sia-table__cell-tooltip", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children }) }) : children });
10823
10903
  }
10824
10904
 
10825
10905
  // src/components/Table/Table.tsx
@@ -12088,6 +12168,7 @@ function createPaginationPlugin(options = {}) {
12088
12168
  Pagination,
12089
12169
  {
12090
12170
  className: "sia-table__pagination",
12171
+ currentPageCount: context.rows.length,
12091
12172
  current: page.current,
12092
12173
  pageSize: page.pageSize,
12093
12174
  pageSizeOptions: options.pageSizeOptions ?? DEFAULT_PAGE_SIZE_OPTIONS,
@@ -12856,7 +12937,6 @@ function ColumnSettingPanel({
12856
12937
  "span",
12857
12938
  {
12858
12939
  className: "sia-table-settings__name",
12859
- title: labels.get(item.key) ?? item.key,
12860
12940
  children: labels.get(item.key) ?? item.key
12861
12941
  }
12862
12942
  ),
@@ -13128,7 +13208,6 @@ function ToolbarItems({
13128
13208
  danger: item.danger,
13129
13209
  icon: item.icon,
13130
13210
  disabled,
13131
- title: typeof item.label === "string" ? item.label : void 0,
13132
13211
  onClick: () => void item.onClick?.(context),
13133
13212
  children: item.label
13134
13213
  },
@@ -13400,7 +13479,7 @@ var TableBodyRow = (0, import_react47.memo)(function TableBodyRow2({
13400
13479
  TableCellContent,
13401
13480
  {
13402
13481
  ellipsis: column.ellipsis !== false,
13403
- title: column.showTitle !== false && column.ellipsis !== false && typeof value === "string" ? value : void 0,
13482
+ title: column.showTitle === true && column.ellipsis !== false && typeof value === "string" ? value : void 0,
13404
13483
  children: pluginCellProps.content !== void 0 ? pluginCellProps.content : column.render ? column.render(value, row.record, row.sourceIndex, { row, rowIndex, column }) : value
13405
13484
  }
13406
13485
  )
@@ -13825,7 +13904,7 @@ function TableInner(props, ref) {
13825
13904
  const fixed = normalizeFixed(column.fixed);
13826
13905
  const fixedEdgeClass = fixed === "left" && column.key === leftFixedEdgeKey ? " sia-table__cell--fixed-left-edge" : fixed === "right" && column.key === rightFixedEdgeKey ? " sia-table__cell--fixed-right-edge" : "";
13827
13906
  const autoWidthClass = column.autoWidth ? " sia-table__cell--auto-width" : "";
13828
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("td", { "data-column-key": column.key, className: `sia-table__cell sia-table__cell--${column.align ?? "left"} sia-table__summary-cell${isLabel ? " sia-table__summary-cell--label" : ""}${fixed ? ` sia-table__cell--fixed sia-table__cell--fixed-${fixed}` : ""}${fixedEdgeClass}${autoWidthClass}`, style: getFixedStyle(column), children: isLabel ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "sia-table__summary-label", title: typeof content === "string" ? content : void 0, children: content }) : content }, column.key);
13907
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("td", { "data-column-key": column.key, className: `sia-table__cell sia-table__cell--${column.align ?? "left"} sia-table__summary-cell${isLabel ? " sia-table__summary-cell--label" : ""}${fixed ? ` sia-table__cell--fixed sia-table__cell--fixed-${fixed}` : ""}${fixedEdgeClass}${autoWidthClass}`, style: getFixedStyle(column), children: isLabel ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "sia-table__summary-label", children: content }) : content }, column.key);
13829
13908
  }) }, summary.key);
13830
13909
  }
13831
13910
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
@@ -14051,19 +14130,33 @@ var ThemeSwitch = (0, import_react48.forwardRef)(function ThemeSwitch2({
14051
14130
 
14052
14131
  // src/theme.ts
14053
14132
  var SIA_THEME = {
14133
+ /** 主色。 */
14054
14134
  colorPrimary: "#1677ff",
14135
+ /** 主色的悬停色。 */
14055
14136
  colorPrimaryHover: "#4096ff",
14137
+ /** 主色的按下色。 */
14056
14138
  colorPrimaryActive: "#0958d9",
14139
+ /** 主要文本颜色。 */
14057
14140
  colorText: "#1f1f1f",
14141
+ /** 次要文本颜色。 */
14058
14142
  colorTextSecondary: "#666666",
14143
+ /** 页面背景颜色。 */
14059
14144
  colorBackground: "#f5f7fa",
14145
+ /** 组件表面颜色。 */
14060
14146
  colorSurface: "#ffffff",
14147
+ /** 默认边框颜色。 */
14061
14148
  colorBorder: "#d9d9d9",
14149
+ /** 默认圆角半径,单位为像素。 */
14062
14150
  borderRadius: 6,
14151
+ /** 默认控件高度,单位为像素。 */
14063
14152
  controlHeight: 32,
14153
+ /** 默认布局间距,单位为像素。 */
14064
14154
  spacing: 16,
14155
+ /** 默认字号,单位为像素。 */
14065
14156
  fontSize: 16,
14157
+ /** 小号文字尺寸,单位为像素。 */
14066
14158
  fontSizeSmall: 14,
14159
+ /** 大号文字尺寸,单位为像素。 */
14067
14160
  fontSizeLarge: 18
14068
14161
  };
14069
14162
  function applySiaTheme(mode, target = document.documentElement) {
@@ -14238,7 +14331,16 @@ function Link({ disabled, className = "", onClick, href, target, rel, ...props }
14238
14331
  function TypographyRoot({ className = "", ...props }) {
14239
14332
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { ...props, className: `sia-typography ${className}`.trim() });
14240
14333
  }
14241
- var Typography = Object.assign(TypographyRoot, { Title, Text, Paragraph, Link });
14334
+ var Typography = Object.assign(TypographyRoot, {
14335
+ /** 语义化标题,支持标题级别、复制和编辑。 */
14336
+ Title,
14337
+ /** 行内文本,支持强调、复制、编辑和省略。 */
14338
+ Text,
14339
+ /** 段落文本,支持复制、编辑和省略。 */
14340
+ Paragraph,
14341
+ /** 具有排版样式的链接。 */
14342
+ Link
14343
+ });
14242
14344
 
14243
14345
  // src/components/FloatButton.tsx
14244
14346
  var import_react50 = require("react");
@@ -14369,7 +14471,12 @@ function FloatButtonBackTop({ target, visibilityHeight = 400, behavior = "smooth
14369
14471
  element?.scrollTo({ top: 0, behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : behavior });
14370
14472
  } });
14371
14473
  }
14372
- var FloatButton2 = Object.assign(FloatButtonRoot, { Group: FloatButtonGroup, BackTop: FloatButtonBackTop });
14474
+ var FloatButton2 = Object.assign(FloatButtonRoot, {
14475
+ /** 组合多个子项并统一管理布局或选择状态。 */
14476
+ Group: FloatButtonGroup,
14477
+ /** 滚动超过指定距离后显示的返回顶部按钮。 */
14478
+ BackTop: FloatButtonBackTop
14479
+ });
14373
14480
 
14374
14481
  // src/components/ChartWhirlingLoading.tsx
14375
14482
  var import_react51 = require("react");
package/dist/index.css CHANGED
@@ -7377,6 +7377,14 @@ fieldset:disabled .sia-input-number__floating-placeholder {
7377
7377
  cursor: not-allowed;
7378
7378
  opacity: .55;
7379
7379
  }
7380
+ .sia-dropdown__trigger-content {
7381
+ display: inline-flex;
7382
+ align-items: center;
7383
+ gap: 8px;
7384
+ }
7385
+ .sia-dropdown__trigger-icon {
7386
+ flex: none;
7387
+ }
7380
7388
  .sia-dropdown__context-anchor {
7381
7389
  position: fixed;
7382
7390
  width: 0;
@@ -7514,6 +7522,9 @@ fieldset:disabled .sia-input-number__floating-placeholder {
7514
7522
  gap: 4px;
7515
7523
  white-space: nowrap;
7516
7524
  }
7525
+ .sia-pagination__current-count {
7526
+ white-space: nowrap;
7527
+ }
7517
7528
  .sia-pagination__size-select.sia-select {
7518
7529
  width: 94px;
7519
7530
  }
@@ -8529,6 +8540,12 @@ body > .sia-popup-portal[data-sia-popup-layer] {
8529
8540
  position: relative;
8530
8541
  display: inline-flex;
8531
8542
  }
8543
+ .sia-floating.sia-table__cell-tooltip {
8544
+ display: block;
8545
+ min-width: 0;
8546
+ overflow: hidden;
8547
+ text-overflow: ellipsis;
8548
+ }
8532
8549
  .sia-floating__overlay {
8533
8550
  --sia-floating-color: rgb(24 24 27 / 94%);
8534
8551
  --sia-floating-arrow-border: transparent;
@@ -9579,7 +9596,7 @@ button.sia-treemap__tile:focus-visible,
9579
9596
  min-width: 0;
9580
9597
  font: inherit;
9581
9598
  }
9582
- .sia-selection-panel__option:hover,
9599
+ .sia-selection-panel__option:hover:not([data-deselected-hover=true]),
9583
9600
  .sia-selection-panel__option.is-active {
9584
9601
  background: var(--sia-color-fill-secondary, #f2f5f8);
9585
9602
  }