@sia.soul/sia-react-ui 0.1.23 → 0.1.25

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 (42) hide show
  1. package/dist/{Select-BoVx-D0D.d.ts → Select-O_yY51vc.d.ts} +4 -2
  2. package/dist/{Select-BO3VyE2n.d.cts → Select-W_xpkpOW.d.cts} +4 -2
  3. package/dist/chart.cjs +1401 -1160
  4. package/dist/chart.css +21 -0
  5. package/dist/chart.js +4 -4
  6. package/dist/{chunk-KLI65JVD.js → chunk-27ZYAKII.js} +68 -186
  7. package/dist/{chunk-TZGUBGA4.js → chunk-IYNS423D.js} +4 -3
  8. package/dist/{chunk-GM47DAAN.js → chunk-IYO2JSGQ.js} +8 -7
  9. package/dist/{chunk-QJ4OQNQ4.js → chunk-PXHBIRQW.js} +4 -3
  10. package/dist/{chunk-VX2JECOU.js → chunk-QCBKT5FV.js} +20 -16
  11. package/dist/chunk-RAO3JHDL.js +284 -0
  12. package/dist/{chunk-RWGSZW32.js → chunk-RWODH2LW.js} +7 -6
  13. package/dist/{chunk-OKP4DIQH.js → chunk-TZROBD65.js} +29 -26
  14. package/dist/{chunk-NPB33IXJ.js → chunk-W52CNNWW.js} +349 -278
  15. package/dist/{chunk-YT6E3X2K.js → chunk-YQDHCORW.js} +4 -3
  16. package/dist/{core-Cqgl6Z7h.d.ts → core-BOzLwiXG.d.ts} +44 -5
  17. package/dist/{core-DF0pknX6.d.cts → core-tbb9ZiBY.d.cts} +44 -5
  18. package/dist/core.cjs +1637 -1443
  19. package/dist/core.css +53 -0
  20. package/dist/core.d.cts +2 -2
  21. package/dist/core.d.ts +2 -2
  22. package/dist/core.js +8 -6
  23. package/dist/index.cjs +3797 -3583
  24. package/dist/index.css +53 -0
  25. package/dist/index.d.cts +36 -17
  26. package/dist/index.d.ts +36 -17
  27. package/dist/index.js +104 -83
  28. package/dist/markdown-editor.cjs +269 -28
  29. package/dist/markdown-editor.css +20 -0
  30. package/dist/markdown-editor.js +2 -2
  31. package/dist/rich-text-editor.cjs +1156 -1031
  32. package/dist/rich-text-editor.css +20 -0
  33. package/dist/rich-text-editor.js +4 -4
  34. package/dist/{select-date-range-a6nzK7Wu.d.ts → select-date-range-BjqFUeU6.d.ts} +1 -1
  35. package/dist/{select-date-range-IOe6MMqu.d.cts → select-date-range-C9w8z3G8.d.cts} +1 -1
  36. package/dist/select-date-range.cjs +1188 -1059
  37. package/dist/select-date-range.css +20 -0
  38. package/dist/select-date-range.d.cts +2 -2
  39. package/dist/select-date-range.d.ts +2 -2
  40. package/dist/select-date-range.js +5 -5
  41. package/package.json +2 -2
  42. package/dist/chunk-3VJ4CZDQ.js +0 -43
package/dist/index.js CHANGED
@@ -56,7 +56,7 @@ import {
56
56
  smoothSvgPath,
57
57
  svgArcPath,
58
58
  transferCompositeValue
59
- } from "./chunk-OKP4DIQH.js";
59
+ } from "./chunk-TZROBD65.js";
60
60
  import {
61
61
  Badge,
62
62
  Breadcrumb,
@@ -73,28 +73,29 @@ import {
73
73
  Spin,
74
74
  Tabs,
75
75
  Tag,
76
+ Toolbar,
76
77
  Tour,
77
78
  Typography,
78
79
  Upload,
79
80
  Watermark,
80
81
  message,
81
82
  notification
82
- } from "./chunk-NPB33IXJ.js";
83
+ } from "./chunk-W52CNNWW.js";
83
84
  import {
84
85
  TextArea
85
- } from "./chunk-YT6E3X2K.js";
86
+ } from "./chunk-YQDHCORW.js";
86
87
  import {
87
88
  MarkdownEditor
88
- } from "./chunk-QJ4OQNQ4.js";
89
+ } from "./chunk-PXHBIRQW.js";
89
90
  import {
90
91
  RichTextContent,
91
92
  RichTextEditor
92
- } from "./chunk-RWGSZW32.js";
93
+ } from "./chunk-RWODH2LW.js";
93
94
  import {
94
95
  DatePicker,
95
96
  SelectDateRange,
96
97
  TimePanel
97
- } from "./chunk-GM47DAAN.js";
98
+ } from "./chunk-IYO2JSGQ.js";
98
99
  import {
99
100
  Checkbox,
100
101
  FloatingScrollbarProvider,
@@ -109,7 +110,7 @@ import {
109
110
  Tree,
110
111
  useOverlayLifecycle,
111
112
  useScrollbarProximity
112
- } from "./chunk-VX2JECOU.js";
113
+ } from "./chunk-QCBKT5FV.js";
113
114
  import {
114
115
  Dropdown,
115
116
  FILLED_ICON_NAMES,
@@ -117,21 +118,22 @@ import {
117
118
  Icon,
118
119
  Input,
119
120
  Menu,
120
- PopupPortal,
121
121
  Segmented,
122
122
  Steps
123
- } from "./chunk-KLI65JVD.js";
123
+ } from "./chunk-27ZYAKII.js";
124
124
  import {
125
125
  Button
126
- } from "./chunk-TZGUBGA4.js";
126
+ } from "./chunk-IYNS423D.js";
127
127
  import {
128
128
  ControlSizeContext,
129
129
  PlaceholderModeContext,
130
+ PopupPortal,
130
131
  useControlSize,
131
132
  useControllableState,
132
133
  useFloatingPlaceholder,
133
- usePlaceholderMode
134
- } from "./chunk-3VJ4CZDQ.js";
134
+ usePlaceholderMode,
135
+ withTitleTooltip
136
+ } from "./chunk-RAO3JHDL.js";
135
137
 
136
138
  // src/components/Alert.tsx
137
139
  import { useState } from "react";
@@ -161,7 +163,7 @@ function Alert({
161
163
  const [visible, setVisible] = useState(true);
162
164
  const resolvedStatus = status ?? type ?? (banner ? "warning" : "info");
163
165
  if (!visible) return null;
164
- return /* @__PURE__ */ jsxs("div", { className: `sia-alert sia-alert--${resolvedStatus}${banner ? " sia-alert--banner" : ""}${description ? " sia-alert--with-description" : ""} ${className}`.trim(), role: "alert", ...props, children: [
166
+ return /* @__PURE__ */ jsxs("div", { className: `sia-alert sia-alert--${resolvedStatus}${banner ? " sia-alert--banner" : ""}${description ? " sia-alert--with-description" : ""} ${className}`.trim(), role: "alert", ...withTitleTooltip(props), children: [
165
167
  showIcon || banner ? /* @__PURE__ */ jsx("span", { className: "sia-alert__icon", "aria-hidden": "true", children: alertIcons[resolvedStatus] }) : null,
166
168
  /* @__PURE__ */ jsxs("div", { className: "sia-alert__content", children: [
167
169
  /* @__PURE__ */ jsx("strong", { children: message2 ?? title }),
@@ -233,7 +235,7 @@ function Pagination({
233
235
  if (refreshing === void 0) setInternalRefreshing(false);
234
236
  }
235
237
  }
236
- return /* @__PURE__ */ jsxs2("nav", { className: `sia-pagination sia-pagination--${controlSize} ${className}`.trim(), "aria-label": "\u5206\u9875", ...props, children: [
238
+ return /* @__PURE__ */ jsxs2("nav", { className: `sia-pagination sia-pagination--${controlSize} ${className}`.trim(), "aria-label": "\u5206\u9875", ...withTitleTooltip(props), children: [
237
239
  /* @__PURE__ */ jsxs2("span", { className: "sia-pagination__current-count", "aria-live": "polite", children: [
238
240
  "\u5F53\u524D\u9875 ",
239
241
  pageCount,
@@ -433,7 +435,7 @@ function Cascader({
433
435
  if (children?.length) columns.push(children);
434
436
  });
435
437
  const floating = useFloatingPlaceholder({ mode: placeholderMode, placeholder, filled: selectedPaths.length > 0, active: open });
436
- return /* @__PURE__ */ jsxs3("div", { ref: rootRef, className: `sia-cascader sia-cascader--${size}${open ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), ...props, children: [
438
+ return /* @__PURE__ */ jsxs3("div", { ref: rootRef, className: `sia-cascader sia-cascader--${size}${open ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), ...withTitleTooltip(props), children: [
437
439
  /* @__PURE__ */ jsxs3("button", { type: "button", className: `sia-cascader__trigger${floating.className}`, disabled, "aria-haspopup": "listbox", "aria-expanded": open, onClick: toggleOpen, children: [
438
440
  /* @__PURE__ */ jsx3("span", { className: "sia-cascader__value", children: display ? multiple && Array.isArray(display) ? display.map((label, index) => /* @__PURE__ */ jsx3("span", { className: "sia-cascader__tag", children: label }, pathKey(selectedPaths[index] ?? []))) : display : /* @__PURE__ */ jsx3("span", { className: "sia-cascader__placeholder", children: placeholder }) }),
439
441
  allowClear && selectedPaths.length ? /* @__PURE__ */ jsx3("span", { className: "sia-cascader__clear", role: "button", "aria-label": "\u6E05\u9664\u9009\u62E9", onClick: (event) => {
@@ -538,10 +540,10 @@ function Flex({
538
540
  flex,
539
541
  ...style
540
542
  };
541
- return /* @__PURE__ */ jsx4(Component, { className: `sia-flex${isVertical ? " sia-flex--vertical" : ""} ${className}`.trim(), style: mergedStyle, ...props });
543
+ return /* @__PURE__ */ jsx4(Component, { className: `sia-flex${isVertical ? " sia-flex--vertical" : ""} ${className}`.trim(), style: mergedStyle, ...withTitleTooltip(props) });
542
544
  }
543
545
  function SpaceCompact({ direction = "horizontal", block = false, className = "", ...props }) {
544
- return /* @__PURE__ */ jsx4("div", { className: `sia-space-compact sia-space-compact--${direction}${block ? " sia-space-compact--block" : ""} ${className}`.trim(), ...props });
546
+ return /* @__PURE__ */ jsx4("div", { className: `sia-space-compact sia-space-compact--${direction}${block ? " sia-space-compact--block" : ""} ${className}`.trim(), ...withTitleTooltip(props) });
545
547
  }
546
548
  function SpaceRoot({
547
549
  direction = "horizontal",
@@ -563,7 +565,7 @@ function SpaceRoot({
563
565
  alignItems: resolveAlign(align),
564
566
  ...style
565
567
  };
566
- return /* @__PURE__ */ jsx4("div", { className: `sia-space sia-space--${direction} ${className}`.trim(), style: mergedStyle, ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs4("span", { className: "sia-space__item", children: [
568
+ return /* @__PURE__ */ jsx4("div", { className: `sia-space sia-space--${direction} ${className}`.trim(), style: mergedStyle, ...withTitleTooltip(props), children: items.map((item, index) => /* @__PURE__ */ jsxs4("span", { className: "sia-space__item", children: [
567
569
  item,
568
570
  split !== void 0 && index < items.length - 1 ? /* @__PURE__ */ jsx4("span", { className: "sia-space__split", children: split }) : null
569
571
  ] }, index)) });
@@ -587,7 +589,7 @@ function Divider({
587
589
  className: `sia-divider sia-divider--${orientation} sia-divider--${variant} sia-divider--text-${textAlign}${children ? " sia-divider--with-text" : ""}${plain ? " sia-divider--plain" : ""} ${className}`.trim(),
588
590
  role: "separator",
589
591
  "aria-orientation": orientation,
590
- ...props,
592
+ ...withTitleTooltip(props),
591
593
  children: children ? /* @__PURE__ */ jsx4("span", { className: "sia-divider__text", children }) : null
592
594
  }
593
595
  );
@@ -608,7 +610,7 @@ function Row({ gutter = 0, align, justify, wrap = true, className = "", style, .
608
610
  flexWrap: wrap ? "wrap" : "nowrap",
609
611
  ...style
610
612
  };
611
- return /* @__PURE__ */ jsx4("div", { className: `sia-row ${className}`.trim(), style: mergedStyle, ...props });
613
+ return /* @__PURE__ */ jsx4("div", { className: `sia-row ${className}`.trim(), style: mergedStyle, ...withTitleTooltip(props) });
612
614
  }
613
615
  function setColVariables(style, prefix, value) {
614
616
  if (value === void 0) return;
@@ -648,7 +650,7 @@ function Col({
648
650
  setColVariables(mergedStyle, "lg-", lg);
649
651
  setColVariables(mergedStyle, "xl-", xl);
650
652
  setColVariables(mergedStyle, "xxl-", xxl);
651
- return /* @__PURE__ */ jsx4("div", { className: `sia-col ${className}`.trim(), style: mergedStyle, ...props });
653
+ return /* @__PURE__ */ jsx4("div", { className: `sia-col ${className}`.trim(), style: mergedStyle, ...withTitleTooltip(props) });
652
654
  }
653
655
 
654
656
  // src/components/Splitter.tsx
@@ -667,7 +669,7 @@ function SplitterPanel({
667
669
  className = "",
668
670
  ...props
669
671
  }) {
670
- return /* @__PURE__ */ jsx5("div", { className: `sia-splitter__panel ${className}`.trim(), ...props });
672
+ return /* @__PURE__ */ jsx5("div", { className: `sia-splitter__panel ${className}`.trim(), ...withTitleTooltip(props) });
671
673
  }
672
674
  function normalizeExpandedSizes(panels) {
673
675
  const specified = panels.map((panel) => panel.props.defaultSize);
@@ -783,7 +785,7 @@ function SplitterRoot({
783
785
  onResize?.(next);
784
786
  onResizeEnd?.(next);
785
787
  }
786
- return /* @__PURE__ */ jsx5("div", { ref: rootRef, className: `sia-splitter sia-splitter--${orientation} ${className}`.trim(), ...props, children: panels.flatMap((panel, index) => {
788
+ return /* @__PURE__ */ jsx5("div", { ref: rootRef, className: `sia-splitter sia-splitter--${orientation} ${className}`.trim(), ...withTitleTooltip(props), children: panels.flatMap((panel, index) => {
787
789
  const panelCollapsed = Boolean(panel.props.collapsible) && (sizes[index] ?? 0) <= collapsedSize(panel) + 0.01;
788
790
  const collapsedContent = panel.props.collapsedContent;
789
791
  const expandFromCollapsedContent = () => {
@@ -979,7 +981,7 @@ function ToolPanel({
979
981
  "aria-expanded": expanded,
980
982
  "aria-controls": `${panelId}-content-${index}`,
981
983
  "aria-label": `${expanded ? "\u6536\u8D77" : "\u5C55\u5F00"}${label}\u9762\u677F`,
982
- title: typeof item.title === "string" ? item.title : void 0,
984
+ ...withTitleTooltip({ title: typeof item.title === "string" ? item.title : void 0 }),
983
985
  disabled: item.disabled,
984
986
  onClick: () => activatePanel(item),
985
987
  children: [
@@ -1029,7 +1031,7 @@ function ToolPanel({
1029
1031
  className: `sia-tool-panel sia-tool-panel--${placement}${isOpen ? " is-open" : ""} ${className}`.trim(),
1030
1032
  style: panelStyle,
1031
1033
  "data-placement": placement,
1032
- ...props,
1034
+ ...withTitleTooltip(props),
1033
1035
  children: placement === "left" ? /* @__PURE__ */ jsxs6(Fragment2, { children: [
1034
1036
  rail,
1035
1037
  content,
@@ -1078,7 +1080,7 @@ function WindowFrame({
1078
1080
  {
1079
1081
  className: `sia-window-frame ${className}`.trim(),
1080
1082
  "data-sia-window-mode": "custom",
1081
- ...props,
1083
+ ...withTitleTooltip(props),
1082
1084
  children: [
1083
1085
  titleBar,
1084
1086
  children
@@ -1108,7 +1110,7 @@ function WindowControls({
1108
1110
  className: `sia-window-controls ${className}`.trim(),
1109
1111
  "data-sia-window-no-drag": "",
1110
1112
  "aria-label": "\u7A97\u53E3\u63A7\u5236",
1111
- ...props,
1113
+ ...withTitleTooltip(props),
1112
1114
  children: [
1113
1115
  showMinimize ? /* @__PURE__ */ jsx7(
1114
1116
  "button",
@@ -1116,7 +1118,7 @@ function WindowControls({
1116
1118
  type: "button",
1117
1119
  className: "sia-window-control",
1118
1120
  "aria-label": mergedLabels.minimize,
1119
- title: mergedLabels.minimize,
1121
+ ...withTitleTooltip({ title: mergedLabels.minimize }),
1120
1122
  disabled: isDisabled("minimize"),
1121
1123
  onClick: () => runAction("minimize"),
1122
1124
  children: /* @__PURE__ */ jsx7(Icon, { name: "minus", size: 14 })
@@ -1128,7 +1130,7 @@ function WindowControls({
1128
1130
  type: "button",
1129
1131
  className: "sia-window-control",
1130
1132
  "aria-label": maximized ? mergedLabels.restore : mergedLabels.maximize,
1131
- title: maximized ? mergedLabels.restore : mergedLabels.maximize,
1133
+ ...withTitleTooltip({ title: maximized ? mergedLabels.restore : mergedLabels.maximize }),
1132
1134
  disabled: isDisabled("toggle-maximize"),
1133
1135
  onClick: () => runAction("toggle-maximize"),
1134
1136
  children: /* @__PURE__ */ jsx7(Icon, { name: maximized ? "fullscreen-exit" : "fullscreen", size: 13 })
@@ -1140,7 +1142,7 @@ function WindowControls({
1140
1142
  type: "button",
1141
1143
  className: "sia-window-control sia-window-control--close",
1142
1144
  "aria-label": mergedLabels.close,
1143
- title: mergedLabels.close,
1145
+ ...withTitleTooltip({ title: mergedLabels.close }),
1144
1146
  disabled: isDisabled("close"),
1145
1147
  onClick: () => runAction("close"),
1146
1148
  children: /* @__PURE__ */ jsx7(Icon, { name: "close", size: 14 })
@@ -1189,7 +1191,7 @@ function WindowTitleBar({
1189
1191
  className: `sia-window-titlebar ${className}`.trim(),
1190
1192
  "data-actions-align": actionsAlign,
1191
1193
  onMouseDown: handleMouseDown,
1192
- ...props,
1194
+ ...withTitleTooltip(props),
1193
1195
  children: [
1194
1196
  leading ? /* @__PURE__ */ jsx7("div", { className: "sia-window-titlebar__leading", children: leading }) : null,
1195
1197
  actionsAlign === "left" ? renderedActions : null,
@@ -1324,7 +1326,7 @@ var DrawerRoot = forwardRef(function Drawer({
1324
1326
  "aria-modal": "true",
1325
1327
  "aria-labelledby": title ? titleId : void 0,
1326
1328
  tabIndex: -1,
1327
- ...props,
1329
+ ...withTitleTooltip(props),
1328
1330
  children: [
1329
1331
  /* @__PURE__ */ jsxs8("div", { className: "sia-drawer__header", children: [
1330
1332
  /* @__PURE__ */ jsxs8("div", { className: "sia-drawer__heading", children: [
@@ -1428,7 +1430,7 @@ var Switch = forwardRef2(function Switch2({
1428
1430
  onChange?.(event);
1429
1431
  };
1430
1432
  return /* @__PURE__ */ jsxs9("label", { className: `sia-switch-wrap sia-switch-wrap--${size} ${className}`.trim(), children: [
1431
- /* @__PURE__ */ jsx9("input", { ref, type: "checkbox", role: "switch", className: "sia-switch-input", onChange: handleChange, ...props }),
1433
+ /* @__PURE__ */ jsx9("input", { ref, type: "checkbox", role: "switch", className: "sia-switch-input", onChange: handleChange, ...withTitleTooltip(props) }),
1432
1434
  /* @__PURE__ */ jsxs9(
1433
1435
  "span",
1434
1436
  {
@@ -1656,7 +1658,7 @@ function FormRoot({
1656
1658
  return /* @__PURE__ */ jsx9(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsx9(PlaceholderModeContext.Provider, { value: resolvedPlaceholderMode, children: /* @__PURE__ */ jsx9(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx9(
1657
1659
  "form",
1658
1660
  {
1659
- ...props,
1661
+ ...withTitleTooltip(props),
1660
1662
  className: `sia-form sia-form--${layout} sia-form--${size}${disabled ? " is-disabled" : ""} ${className}`.trim(),
1661
1663
  "data-required-mark": requiredMark,
1662
1664
  onSubmit: (event) => {
@@ -1827,7 +1829,7 @@ var RadioRoot = forwardRef3(function Radio({ value, size: sizeProp, children, di
1827
1829
  /* @__PURE__ */ jsx10(
1828
1830
  "input",
1829
1831
  {
1830
- ...props,
1832
+ ...withTitleTooltip(props),
1831
1833
  ref,
1832
1834
  id: props.id ?? fallbackId,
1833
1835
  className: "sia-radio__input",
@@ -1947,7 +1949,7 @@ function Slider({
1947
1949
  {
1948
1950
  className: `sia-slider${range ? " sia-slider--range" : ""}${vertical ? " sia-slider--vertical" : ""}${reverse ? " sia-slider--reverse" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(),
1949
1951
  style,
1950
- ...props,
1952
+ ...withTitleTooltip(props),
1951
1953
  children: [
1952
1954
  /* @__PURE__ */ jsx11("div", { className: "sia-slider__rail", children: /* @__PURE__ */ jsx11("span", { className: "sia-slider__track" }) }),
1953
1955
  values.map((item, index) => /* @__PURE__ */ jsxs11("div", { className: "sia-slider__thumb-wrap", children: [
@@ -2205,7 +2207,7 @@ function ColorPicker({
2205
2207
  const triggerBackground = color || "transparent";
2206
2208
  const triggerText = color || "\u65E0\u8272";
2207
2209
  const opaqueColor = rgbaToHex({ ...rgba, a: 100 }, false);
2208
- return /* @__PURE__ */ jsxs12("div", { ref: rootRef, className: `sia-color-picker sia-color-picker--${size}${disabled ? " is-disabled" : ""} ${className}`.trim(), ...props, children: [
2210
+ return /* @__PURE__ */ jsxs12("div", { ref: rootRef, className: `sia-color-picker sia-color-picker--${size}${disabled ? " is-disabled" : ""} ${className}`.trim(), ...withTitleTooltip(props), children: [
2209
2211
  /* @__PURE__ */ jsxs12(
2210
2212
  "button",
2211
2213
  {
@@ -2225,7 +2227,7 @@ function ColorPicker({
2225
2227
  /* @__PURE__ */ jsxs12(PopupPortal, { ref: popupRef, anchorRef: rootRef, open, className: "sia-color-picker__popup", role: "dialog", "aria-label": "\u989C\u8272\u9009\u62E9\u5668", children: [
2226
2228
  /* @__PURE__ */ jsxs12("div", { className: "sia-color-picker__mode-row", children: [
2227
2229
  modes.length > 1 ? /* @__PURE__ */ jsx12("div", { className: "sia-color-picker__modes", role: "tablist", "aria-label": "\u989C\u8272\u6A21\u5F0F", children: modes.map((item) => /* @__PURE__ */ jsx12("button", { type: "button", role: "tab", "aria-selected": currentMode === item, className: currentMode === item ? "is-active" : "", onClick: () => switchMode(item), children: item === "solid" ? "\u5355\u8272" : "\u6E10\u53D8\u8272" }, item)) }) : /* @__PURE__ */ jsx12("strong", { children: currentMode === "solid" ? "\u5355\u8272" : "\u6E10\u53D8\u8272" }),
2228
- allowClear ? /* @__PURE__ */ jsx12("button", { type: "button", className: `sia-color-picker__none${color ? "" : " is-active"}`, "aria-label": "\u9009\u62E9\u65E0\u8272", title: "\u65E0\u8272", onClick: selectNoColor, children: /* @__PURE__ */ jsx12("span", {}) }) : null
2230
+ allowClear ? /* @__PURE__ */ jsx12("button", { type: "button", className: `sia-color-picker__none${color ? "" : " is-active"}`, "aria-label": "\u9009\u62E9\u65E0\u8272", ...withTitleTooltip({ title: "\u65E0\u8272" }), onClick: selectNoColor, children: /* @__PURE__ */ jsx12("span", {}) }) : null
2229
2231
  ] }),
2230
2232
  currentMode === "gradient" ? /* @__PURE__ */ jsxs12("div", { className: "sia-color-picker__gradient-editor", children: [
2231
2233
  /* @__PURE__ */ jsx12("div", { className: "sia-color-picker__gradient-preview", style: { background: gradientValue }, onPointerDown: addGradientStop, children: gradientStops.map((stop) => /* @__PURE__ */ jsx12(
@@ -2414,7 +2416,7 @@ function TimePicker({
2414
2416
  /* @__PURE__ */ jsx13(
2415
2417
  "input",
2416
2418
  {
2417
- ...props,
2419
+ ...withTitleTooltip(props),
2418
2420
  ref: inputRef,
2419
2421
  id: props.id ?? id,
2420
2422
  type: "text",
@@ -2721,7 +2723,7 @@ function TreeSelect({
2721
2723
  {
2722
2724
  ref: rootRef,
2723
2725
  className: `sia-tree-select sia-tree-select--${size} sia-tree-select--${status}${open ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(),
2724
- ...props,
2726
+ ...withTitleTooltip(props),
2725
2727
  onKeyDown: (event) => {
2726
2728
  props.onKeyDown?.(event);
2727
2729
  if (event.key === "Escape") {
@@ -3942,7 +3944,7 @@ function Markdown({ content, emptyText = "\u6682\u65E0 Markdown \u5185\u5BB9", r
3942
3944
  return /* @__PURE__ */ jsx16("div", { className: `sia-markdown sia-markdown--empty ${className}`.trim(), children: emptyText });
3943
3945
  }
3944
3946
  return /* @__PURE__ */ jsxs16(Fragment5, { children: [
3945
- /* @__PURE__ */ jsx16("article", { ...props, ref: rootRef, className: `sia-markdown ${className}`.trim(), onClick: handleClick, onKeyDown: handleKeyDown, dangerouslySetInnerHTML: { __html: html } }),
3947
+ /* @__PURE__ */ jsx16("article", { ...withTitleTooltip(props), ref: rootRef, className: `sia-markdown ${className}`.trim(), onClick: handleClick, onKeyDown: handleKeyDown, dangerouslySetInnerHTML: { __html: html } }),
3946
3948
  /* @__PURE__ */ jsx16(ImagePreview, { open: Boolean(previewImage), src: previewImage?.src, alt: previewImage?.alt, onOpenChange: (open) => {
3947
3949
  if (!open) setPreviewImage(null);
3948
3950
  } })
@@ -4043,7 +4045,7 @@ var InputNumber = forwardRef4(function InputNumber2({
4043
4045
  const input = /* @__PURE__ */ jsx17(
4044
4046
  "input",
4045
4047
  {
4046
- ...props,
4048
+ ...withTitleTooltip(props),
4047
4049
  ref: setRef,
4048
4050
  id: inputId,
4049
4051
  type: "text",
@@ -4207,6 +4209,7 @@ function openSelectModal(config) {
4207
4209
  // src/components/Treemap.tsx
4208
4210
  import { useEffect as useEffect10, useMemo as useMemo8, useRef as useRef12, useState as useState15 } from "react";
4209
4211
  import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
4212
+ import { createElement } from "react";
4210
4213
  function positiveValue(value) {
4211
4214
  return Number.isFinite(value) && value > 0 ? value : 1;
4212
4215
  }
@@ -4554,7 +4557,7 @@ function Treemap({
4554
4557
  return /* @__PURE__ */ jsxs19(
4555
4558
  "div",
4556
4559
  {
4557
- ...props,
4560
+ ...withTitleTooltip(props),
4558
4561
  ref: containerRef,
4559
4562
  className: `sia-treemap ${className}`.trim(),
4560
4563
  style,
@@ -4579,46 +4582,46 @@ function Treemap({
4579
4582
  const hasChildren = Boolean(node.hasChildren || node.children?.length);
4580
4583
  const title = `${node.label} \xB7 ${String(valueFormatter(node.value, node))}`;
4581
4584
  if (expanded) {
4582
- return /* @__PURE__ */ jsx19(
4585
+ return /* @__PURE__ */ createElement(
4583
4586
  "div",
4584
4587
  {
4585
4588
  className: `sia-treemap__tile sia-treemap__tile--directory is-expanded${effectiveFocusedNode?.key === node.key ? " is-focused" : ""}${active ? " is-active" : ""}`,
4586
4589
  style: tileStyle,
4587
4590
  role: "treeitem",
4588
4591
  "aria-expanded": "true",
4589
- title,
4592
+ ...withTitleTooltip({ title }),
4590
4593
  "data-treemap-key": node.key,
4591
- children: /* @__PURE__ */ jsxs19("div", { className: "sia-treemap__header", children: [
4592
- /* @__PURE__ */ jsxs19(
4593
- "button",
4594
- {
4595
- type: "button",
4596
- className: "sia-treemap__header-main",
4597
- disabled: node.disabled,
4598
- onClick: (event) => handleNodeClick(node, event),
4599
- children: [
4600
- /* @__PURE__ */ jsx19("span", { className: "sia-treemap__label", children: node.label }),
4601
- showValue ? /* @__PURE__ */ jsx19("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
4602
- ]
4603
- }
4604
- ),
4605
- /* @__PURE__ */ jsx19(
4606
- "button",
4607
- {
4608
- type: "button",
4609
- className: "sia-treemap__focus",
4610
- "aria-label": effectiveFocusedNode?.key === node.key ? `\u8FD8\u539F ${node.label}` : `\u805A\u7126\u5C55\u5F00 ${node.label}`,
4611
- title: effectiveFocusedNode?.key === node.key ? "\u8FD8\u539F\u539F\u6709\u89C6\u56FE" : "\u5C55\u5F00\u5230\u6574\u4E2A\u533A\u57DF",
4612
- onClick: () => updateFocusedKey(effectiveFocusedNode?.key === node.key ? null : node.key),
4613
- children: /* @__PURE__ */ jsx19(Icon, { name: effectiveFocusedNode?.key === node.key ? "fullscreen-exit" : "fullscreen", size: 14 })
4614
- }
4615
- )
4616
- ] })
4594
+ key: node.key
4617
4595
  },
4618
- node.key
4596
+ /* @__PURE__ */ jsxs19("div", { className: "sia-treemap__header", children: [
4597
+ /* @__PURE__ */ jsxs19(
4598
+ "button",
4599
+ {
4600
+ type: "button",
4601
+ className: "sia-treemap__header-main",
4602
+ disabled: node.disabled,
4603
+ onClick: (event) => handleNodeClick(node, event),
4604
+ children: [
4605
+ /* @__PURE__ */ jsx19("span", { className: "sia-treemap__label", children: node.label }),
4606
+ showValue ? /* @__PURE__ */ jsx19("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
4607
+ ]
4608
+ }
4609
+ ),
4610
+ /* @__PURE__ */ jsx19(
4611
+ "button",
4612
+ {
4613
+ type: "button",
4614
+ className: "sia-treemap__focus",
4615
+ "aria-label": effectiveFocusedNode?.key === node.key ? `\u8FD8\u539F ${node.label}` : `\u805A\u7126\u5C55\u5F00 ${node.label}`,
4616
+ ...withTitleTooltip({ title: effectiveFocusedNode?.key === node.key ? "\u8FD8\u539F\u539F\u6709\u89C6\u56FE" : "\u5C55\u5F00\u5230\u6574\u4E2A\u533A\u57DF" }),
4617
+ onClick: () => updateFocusedKey(effectiveFocusedNode?.key === node.key ? null : node.key),
4618
+ children: /* @__PURE__ */ jsx19(Icon, { name: effectiveFocusedNode?.key === node.key ? "fullscreen-exit" : "fullscreen", size: 14 })
4619
+ }
4620
+ )
4621
+ ] })
4619
4622
  );
4620
4623
  }
4621
- return /* @__PURE__ */ jsx19(
4624
+ return /* @__PURE__ */ createElement(
4622
4625
  "button",
4623
4626
  {
4624
4627
  type: "button",
@@ -4627,15 +4630,15 @@ function Treemap({
4627
4630
  role: "treeitem",
4628
4631
  "aria-expanded": node.kind === "directory" && hasChildren ? "false" : void 0,
4629
4632
  disabled: node.disabled,
4630
- title,
4633
+ ...withTitleTooltip({ title }),
4631
4634
  "data-treemap-key": node.key,
4632
4635
  onClick: (event) => handleNodeClick(node, event),
4633
- children: showLabel ? /* @__PURE__ */ jsxs19("span", { className: "sia-treemap__content", children: [
4634
- /* @__PURE__ */ jsx19("span", { className: "sia-treemap__label", children: node.label }),
4635
- showValue ? /* @__PURE__ */ jsx19("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
4636
- ] }) : null
4636
+ key: node.key
4637
4637
  },
4638
- node.key
4638
+ showLabel ? /* @__PURE__ */ jsxs19("span", { className: "sia-treemap__content", children: [
4639
+ /* @__PURE__ */ jsx19("span", { className: "sia-treemap__label", children: node.label }),
4640
+ showValue ? /* @__PURE__ */ jsx19("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
4641
+ ] }) : null
4639
4642
  );
4640
4643
  })
4641
4644
  ]
@@ -5238,6 +5241,16 @@ function createCellSelectionPlugin(options = {}) {
5238
5241
  event.clipboardData?.setData("text/plain", text);
5239
5242
  options.onCopy?.(text, selectedCells(context));
5240
5243
  };
5244
+ const clearOnOutsidePointerDown = (event) => {
5245
+ const context = latestContext;
5246
+ if (event.button !== 0 || !context?.state.range || !activeRoot) return;
5247
+ const target = event.target instanceof Element ? event.target : null;
5248
+ const cell = target?.closest("td[data-column-key], th[data-column-key]");
5249
+ if (cell?.closest(".sia-table") === activeRoot) return;
5250
+ stopDragging();
5251
+ setSelection(context, null);
5252
+ };
5253
+ document.addEventListener("pointerdown", clearOnOutsidePointerDown, true);
5241
5254
  window.addEventListener("pointerup", stopDragging);
5242
5255
  window.addEventListener("pointercancel", stopDragging);
5243
5256
  window.addEventListener("blur", stopDragging);
@@ -5246,6 +5259,7 @@ function createCellSelectionPlugin(options = {}) {
5246
5259
  document.addEventListener("copy", handleCopy);
5247
5260
  return () => {
5248
5261
  stopDragging();
5262
+ document.removeEventListener("pointerdown", clearOnOutsidePointerDown, true);
5249
5263
  window.removeEventListener("pointerup", stopDragging);
5250
5264
  window.removeEventListener("pointercancel", stopDragging);
5251
5265
  window.removeEventListener("blur", stopDragging);
@@ -7326,6 +7340,8 @@ function TableInner(props, ref) {
7326
7340
  overscan = 6,
7327
7341
  stickyHeader = true,
7328
7342
  resizable = true,
7343
+ cellSelection = true,
7344
+ showIndex = true,
7329
7345
  onRowClick,
7330
7346
  onRowDoubleClick,
7331
7347
  onCellContextMenu,
@@ -7348,12 +7364,16 @@ function TableInner(props, ref) {
7348
7364
  const getRowKey = useCallback2((record, index) => typeof rowKey === "function" ? rowKey(record, index) : record[String(rowKey)] ?? index, [rowKey]);
7349
7365
  const builtInResizePlugin = useMemo9(() => createResizePlugin(), []);
7350
7366
  const builtInHighlightPlugin = useMemo9(() => createHighlightPlugin(), []);
7367
+ const builtInCellSelectionPlugin = useMemo9(() => createCellSelectionPlugin(), []);
7368
+ const builtInIndexPlugin = useMemo9(() => createIndexPlugin(), []);
7351
7369
  const activePlugins = useMemo9(() => {
7352
- const plugins = providedPlugins.filter((plugin) => resizable || plugin.id !== "resize");
7370
+ const plugins = providedPlugins.filter((plugin) => (resizable || plugin.id !== "resize") && (cellSelection || plugin.id !== "cellSelection") && (showIndex || plugin.id !== "index"));
7353
7371
  if (!plugins.some((plugin) => plugin.id === "highlight")) plugins.push(builtInHighlightPlugin);
7354
7372
  if (resizable && !plugins.some((plugin) => plugin.id === "resize")) plugins.push(builtInResizePlugin);
7373
+ if (cellSelection && !plugins.some((plugin) => plugin.id === "cellSelection")) plugins.push(builtInCellSelectionPlugin);
7374
+ if (showIndex && !plugins.some((plugin) => plugin.id === "index")) plugins.push(builtInIndexPlugin);
7355
7375
  return plugins;
7356
- }, [builtInHighlightPlugin, builtInResizePlugin, providedPlugins, resizable]);
7376
+ }, [builtInHighlightPlugin, builtInResizePlugin, builtInCellSelectionPlugin, builtInIndexPlugin, providedPlugins, resizable, cellSelection, showIndex]);
7357
7377
  const sortedPlugins = useMemo9(() => [...activePlugins].sort((a, b) => (a.order ?? 100) - (b.order ?? 100)), [activePlugins]);
7358
7378
  const pluginsByIdRef = useRef15(/* @__PURE__ */ new Map());
7359
7379
  pluginsByIdRef.current = new Map(sortedPlugins.map((plugin) => [plugin.id, plugin]));
@@ -7731,7 +7751,7 @@ function TableInner(props, ref) {
7731
7751
  "data-has-fixed-right": right > 0,
7732
7752
  "data-scrolled-left": "false",
7733
7753
  "data-scrolled-right": "true",
7734
- ...htmlProps,
7754
+ ...withTitleTooltip(htmlProps),
7735
7755
  onPointerDownCapture: (event) => {
7736
7756
  htmlProps.onPointerDownCapture?.(event);
7737
7757
  if (event.defaultPrevented || loading || internalLoading) return;
@@ -7929,7 +7949,7 @@ var ThemeSwitch = forwardRef6(function ThemeSwitch2({
7929
7949
  "aria-label": checked ? darkLabel : lightLabel,
7930
7950
  className: `sia-theme-switch${checked ? " sia-theme-switch--dark" : ""} ${className}`.trim(),
7931
7951
  onClick: handleClick,
7932
- ...props,
7952
+ ...withTitleTooltip(props),
7933
7953
  children: [
7934
7954
  /* @__PURE__ */ jsx23("span", { className: "sia-theme-switch__selection", "aria-hidden": "true" }),
7935
7955
  /* @__PURE__ */ jsx23("span", { className: `sia-theme-switch__icon${checked ? "" : " is-active"}`, "aria-hidden": "true", children: /* @__PURE__ */ jsxs22("svg", { viewBox: "0 0 24 24", children: [
@@ -8570,6 +8590,7 @@ export {
8570
8590
  TimePicker,
8571
8591
  Timeline,
8572
8592
  ToolPanel,
8593
+ Toolbar,
8573
8594
  Tooltip,
8574
8595
  Tour,
8575
8596
  Tree,