@sia.soul/sia-react-ui 0.1.2 → 0.1.4

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 (44) hide show
  1. package/dist/{Select-CJJ5LQap.d.ts → Select-GiTHMScg.d.cts} +4 -5
  2. package/dist/{Select-CJJ5LQap.d.cts → Select-rtDktLYY.d.ts} +4 -5
  3. package/dist/chart.cjs +731 -707
  4. package/dist/chart.css +1 -1
  5. package/dist/chart.js +3 -2
  6. package/dist/{chunk-6VXOLMKZ.js → chunk-5ZTWY3PG.js} +18 -1
  7. package/dist/{chunk-YCVXUMGP.js → chunk-EJ23MVR6.js} +5 -20
  8. package/dist/chunk-EJDPRAU2.js +36 -0
  9. package/dist/{chunk-DZ45HRVP.js → chunk-IHTODT53.js} +8 -5
  10. package/dist/{chunk-QEDWRVDA.js → chunk-MJUTLEEE.js} +20 -8
  11. package/dist/{chunk-OMA75YLM.js → chunk-PX6BOFTW.js} +10 -3
  12. package/dist/{chunk-JKZGAZMB.js → chunk-R7BVDN3Q.js} +91 -43
  13. package/dist/{chunk-ZPYGBMBH.js → chunk-S2JAJCLN.js} +6 -4
  14. package/dist/{chunk-NZAT2RUM.js → chunk-WHARTF2I.js} +10 -1
  15. package/dist/{chunk-I342FGQY.js → chunk-Z3T6RDQP.js} +1 -1
  16. package/dist/{core-DFYheaoJ.d.ts → core-CBtbeAms.d.cts} +2 -1
  17. package/dist/{core-De2pRX5w.d.cts → core-D8BSMfHD.d.ts} +2 -1
  18. package/dist/core.cjs +277 -212
  19. package/dist/core.css +238 -38
  20. package/dist/core.d.cts +3 -2
  21. package/dist/core.d.ts +3 -2
  22. package/dist/core.js +6 -5
  23. package/dist/index.cjs +2538 -2416
  24. package/dist/index.css +239 -39
  25. package/dist/index.d.cts +18 -9
  26. package/dist/index.d.ts +18 -9
  27. package/dist/index.js +230 -193
  28. package/dist/markdown-editor.cjs +52 -20
  29. package/dist/markdown-editor.d.cts +3 -1
  30. package/dist/markdown-editor.d.ts +3 -1
  31. package/dist/markdown-editor.js +2 -1
  32. package/dist/rich-text-editor.cjs +884 -864
  33. package/dist/rich-text-editor.d.cts +3 -1
  34. package/dist/rich-text-editor.d.ts +3 -1
  35. package/dist/rich-text-editor.js +4 -3
  36. package/dist/{select-date-range-DOyG1DGp.d.ts → select-date-range-CQ1vmze_.d.ts} +7 -4
  37. package/dist/{select-date-range-UyYrHex6.d.cts → select-date-range-DRmGaEzP.d.cts} +7 -4
  38. package/dist/select-date-range.cjs +972 -903
  39. package/dist/select-date-range.d.cts +3 -2
  40. package/dist/select-date-range.d.ts +3 -2
  41. package/dist/select-date-range.js +4 -3
  42. package/dist/shared-DAYZvZVu.d.cts +5 -0
  43. package/dist/shared-DAYZvZVu.d.ts +5 -0
  44. package/package.json +129 -129
package/dist/index.js CHANGED
@@ -56,7 +56,7 @@ import {
56
56
  smoothSvgPath,
57
57
  svgArcPath,
58
58
  transferCompositeValue
59
- } from "./chunk-I342FGQY.js";
59
+ } from "./chunk-Z3T6RDQP.js";
60
60
  import {
61
61
  Badge,
62
62
  Breadcrumb,
@@ -87,24 +87,24 @@ import {
87
87
  message,
88
88
  notification,
89
89
  useOverlayLifecycle
90
- } from "./chunk-ZPYGBMBH.js";
90
+ } from "./chunk-S2JAJCLN.js";
91
91
  import {
92
92
  TextArea
93
- } from "./chunk-NZAT2RUM.js";
93
+ } from "./chunk-WHARTF2I.js";
94
94
  import {
95
95
  MarkdownEditor
96
- } from "./chunk-6VXOLMKZ.js";
96
+ } from "./chunk-5ZTWY3PG.js";
97
97
  import {
98
98
  RichTextContent,
99
99
  RichTextEditor
100
- } from "./chunk-OMA75YLM.js";
100
+ } from "./chunk-PX6BOFTW.js";
101
101
  import {
102
102
  Dropdown,
103
103
  Input,
104
104
  Menu,
105
105
  Segmented,
106
106
  Steps
107
- } from "./chunk-DZ45HRVP.js";
107
+ } from "./chunk-IHTODT53.js";
108
108
  import {
109
109
  Button
110
110
  } from "./chunk-MBS2HXLZ.js";
@@ -112,17 +112,23 @@ import {
112
112
  DatePicker,
113
113
  SelectDateRange,
114
114
  TimePanel
115
- } from "./chunk-QEDWRVDA.js";
115
+ } from "./chunk-MJUTLEEE.js";
116
116
  import {
117
+ OverflowTags,
117
118
  Select
118
- } from "./chunk-JKZGAZMB.js";
119
+ } from "./chunk-R7BVDN3Q.js";
119
120
  import {
120
121
  FILLED_ICON_NAMES,
121
122
  ICON_NAMES,
122
123
  Icon,
123
- PopupPortal,
124
- useControllableState
125
- } from "./chunk-YCVXUMGP.js";
124
+ PopupPortal
125
+ } from "./chunk-EJ23MVR6.js";
126
+ import {
127
+ PlaceholderModeContext,
128
+ useControllableState,
129
+ useFloatingPlaceholder,
130
+ usePlaceholderMode
131
+ } from "./chunk-EJDPRAU2.js";
126
132
 
127
133
  // src/components/Alert.tsx
128
134
  import { useState } from "react";
@@ -316,6 +322,7 @@ function Cascader({
316
322
  changeOnSelect = false,
317
323
  expandTrigger = "click",
318
324
  placeholder = "\u8BF7\u9009\u62E9",
325
+ placeholderMode,
319
326
  disabled = false,
320
327
  fieldNames,
321
328
  displayRender,
@@ -335,7 +342,7 @@ function Cascader({
335
342
  const [active, setActive] = useState3([]);
336
343
  const [search, setSearch] = useState3("");
337
344
  const [loadingKey, setLoadingKey] = useState3("");
338
- const selectedPaths = multiple ? current ?? [] : current?.length && !Array.isArray(current[0]) ? [current] : [];
345
+ const selectedPaths = multiple ? Array.isArray(current) ? current : [] : current?.length && !Array.isArray(current[0]) ? [current] : [];
339
346
  const selectedKeys = new Set(selectedPaths.map(pathKey));
340
347
  const selectedPathSignature = selectedPaths.map(pathKey).join("");
341
348
  const searchPaths = useMemo(() => search ? leafPaths(options, fields).filter((path) => path.some((option) => String(optionLabel(option, fields)).toLowerCase().includes(search.toLowerCase()))) : [], [fields, options, search]);
@@ -411,13 +418,15 @@ function Cascader({
411
418
  const children = optionChildren(option, fields);
412
419
  if (children?.length) columns.push(children);
413
420
  });
421
+ const floating = useFloatingPlaceholder({ mode: placeholderMode, placeholder, filled: selectedPaths.length > 0, active: open });
414
422
  return /* @__PURE__ */ jsxs3("div", { ref: rootRef, className: `sia-cascader${open ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), ...props, children: [
415
- /* @__PURE__ */ jsxs3("button", { type: "button", className: "sia-cascader__trigger", disabled, "aria-haspopup": "listbox", "aria-expanded": open, onClick: toggleOpen, children: [
423
+ /* @__PURE__ */ jsxs3("button", { type: "button", className: `sia-cascader__trigger${floating.className}`, disabled, "aria-haspopup": "listbox", "aria-expanded": open, onClick: toggleOpen, children: [
416
424
  /* @__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 }) }),
417
425
  allowClear && selectedPaths.length ? /* @__PURE__ */ jsx3("span", { className: "sia-cascader__clear", role: "button", "aria-label": "\u6E05\u9664\u9009\u62E9", onClick: (event) => {
418
426
  event.stopPropagation();
419
427
  clearSelection();
420
428
  }, children: /* @__PURE__ */ jsx3(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null,
429
+ floating.label,
421
430
  /* @__PURE__ */ jsx3(Icon, { name: open ? "chevron-up" : "chevron-down", size: 14 })
422
431
  ] }),
423
432
  /* @__PURE__ */ jsxs3(PopupPortal, { ref: popupRef, anchorRef: rootRef, open, className: "sia-cascader__popup", children: [
@@ -1530,6 +1539,7 @@ function FormRoot({
1530
1539
  form,
1531
1540
  initialValues,
1532
1541
  layout = "horizontal",
1542
+ placeholderMode,
1533
1543
  disabled = false,
1534
1544
  requiredMark = true,
1535
1545
  className = "",
@@ -1539,11 +1549,12 @@ function FormRoot({
1539
1549
  children,
1540
1550
  ...props
1541
1551
  }) {
1552
+ const resolvedPlaceholderMode = usePlaceholderMode(placeholderMode);
1542
1553
  const [internalForm] = useForm(form);
1543
1554
  const instance = internalForm;
1544
1555
  instance.configure(initialValues, { onFinish, onFinishFailed, onValuesChange });
1545
1556
  const context = useMemo4(() => instance, [instance]);
1546
- return /* @__PURE__ */ jsx9(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsx9(
1557
+ return /* @__PURE__ */ jsx9(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsx9(PlaceholderModeContext.Provider, { value: resolvedPlaceholderMode, children: /* @__PURE__ */ jsx9(
1547
1558
  "form",
1548
1559
  {
1549
1560
  ...props,
@@ -1555,7 +1566,7 @@ function FormRoot({
1555
1566
  },
1556
1567
  children: /* @__PURE__ */ jsx9("fieldset", { disabled, children })
1557
1568
  }
1558
- ) });
1569
+ ) }) });
1559
1570
  }
1560
1571
  function defaultEventValue(valuePropName, args) {
1561
1572
  const first = args[0];
@@ -2229,6 +2240,7 @@ function TimePicker({
2229
2240
  onChange,
2230
2241
  onOpenChange,
2231
2242
  placeholder = "\u8BF7\u9009\u62E9\u65F6\u95F4",
2243
+ placeholderMode,
2232
2244
  min,
2233
2245
  max,
2234
2246
  step,
@@ -2283,7 +2295,8 @@ function TimePicker({
2283
2295
  changeOpen(false);
2284
2296
  inputRef.current?.focus();
2285
2297
  }
2286
- return /* @__PURE__ */ jsxs13("span", { ref: rootRef, style, className: `sia-picker sia-time-picker sia-picker--${size} sia-picker--${status}${disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
2298
+ const floating = useFloatingPlaceholder({ mode: placeholderMode, placeholder, filled: Boolean(display), active: open });
2299
+ return /* @__PURE__ */ jsxs13("span", { ref: rootRef, style, className: `sia-picker sia-time-picker${floating.className} sia-picker--${size} sia-picker--${status}${disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
2287
2300
  /* @__PURE__ */ jsx13(
2288
2301
  "input",
2289
2302
  {
@@ -2320,6 +2333,7 @@ function TimePicker({
2320
2333
  }
2321
2334
  }
2322
2335
  ),
2336
+ floating.label,
2323
2337
  allowClear && currentValue && !disabled && !readOnly ? /* @__PURE__ */ jsx13("button", { type: "button", className: "sia-picker__clear", "aria-label": "\u6E05\u9664\u65F6\u95F4", onMouseDown: (event) => event.preventDefault(), onClick: () => {
2324
2338
  setValue2("");
2325
2339
  changeOpen(false);
@@ -2358,7 +2372,7 @@ function TimePicker({
2358
2372
  ] });
2359
2373
  }
2360
2374
  function TimeRangePicker({ value, defaultValue = ["", ""], placeholder = ["\u5F00\u59CB\u65F6\u95F4", "\u7ED3\u675F\u65F6\u95F4"], separator = "\u2192", onChange, className = "", style, ...props }) {
2361
- const [currentValue, setValue2] = useControllableState({ value, defaultValue, onChange });
2375
+ const [currentValue, setValue2] = useControllableState({ value: value === void 0 ? void 0 : Array.isArray(value) ? value : ["", ""], defaultValue, onChange });
2362
2376
  function update(index, next) {
2363
2377
  const pair = [currentValue[0], currentValue[1]];
2364
2378
  pair[index] = next;
@@ -2406,6 +2420,7 @@ function TreeSelect({
2406
2420
  allowClear = false,
2407
2421
  treeDefaultExpandAll = false,
2408
2422
  placeholder = "\u8BF7\u9009\u62E9",
2423
+ placeholderMode,
2409
2424
  searchPlaceholder = "\u641C\u7D22\u8282\u70B9",
2410
2425
  maxTagCount = 3,
2411
2426
  disabled = false,
@@ -2469,7 +2484,7 @@ function TreeSelect({
2469
2484
  collect(treeData);
2470
2485
  return new Set(values);
2471
2486
  });
2472
- const selectedValues = Array.isArray(currentValue) ? [...currentValue] : currentValue === void 0 ? [] : [currentValue];
2487
+ const selectedValues = Array.isArray(currentValue) ? [...currentValue] : currentValue === void 0 || currentValue === "" && !nodeIndex.has("") ? [] : [currentValue];
2473
2488
  const expandedSet = treeExpandedKeys ? new Set(treeExpandedKeys) : expanded;
2474
2489
  const selectedNodes = resolveNodes(selectedValues);
2475
2490
  const visibleNodes = flattenTree(treeData, expandedSet, search, filterTreeNode);
@@ -2584,6 +2599,7 @@ function TreeSelect({
2584
2599
  changeOpen(false);
2585
2600
  }
2586
2601
  }
2602
+ const floating = useFloatingPlaceholder({ mode: placeholderMode, placeholder, filled: selectedNodes.length > 0, active: open });
2587
2603
  return /* @__PURE__ */ jsxs14(
2588
2604
  "div",
2589
2605
  {
@@ -2603,7 +2619,7 @@ function TreeSelect({
2603
2619
  "button",
2604
2620
  {
2605
2621
  type: "button",
2606
- className: "sia-tree-select__trigger",
2622
+ className: `sia-tree-select__trigger${floating.className}`,
2607
2623
  disabled,
2608
2624
  "aria-haspopup": "tree",
2609
2625
  "aria-expanded": open,
@@ -2617,13 +2633,8 @@ function TreeSelect({
2617
2633
  if (event.key === "Escape") changeOpen(false);
2618
2634
  },
2619
2635
  children: [
2620
- /* @__PURE__ */ jsx14("span", { className: "sia-tree-select__value", children: selectedNodes.length ? displayRender ? displayRender(selectedNodes) : multi ? /* @__PURE__ */ jsxs14(Fragment4, { children: [
2621
- selectedNodes.slice(0, maxTagCount).map((node) => /* @__PURE__ */ jsx14("span", { className: "sia-tree-select__tag", children: node.title }, node.value)),
2622
- selectedNodes.length > maxTagCount ? /* @__PURE__ */ jsxs14("span", { className: "sia-tree-select__tag", children: [
2623
- "+",
2624
- selectedNodes.length - maxTagCount
2625
- ] }) : null
2626
- ] }) : selectedNodes[0]?.title : /* @__PURE__ */ jsx14("span", { className: "sia-tree-select__placeholder", children: placeholder }) }),
2636
+ /* @__PURE__ */ jsx14("span", { className: "sia-tree-select__value", children: selectedNodes.length ? displayRender ? displayRender(selectedNodes) : multi ? /* @__PURE__ */ jsx14(OverflowTags, { tagClassName: "sia-tree-select__tag", maxCount: maxTagCount, items: selectedNodes.map((node) => ({ key: node.value, label: node.title })) }) : selectedNodes[0]?.title : /* @__PURE__ */ jsx14("span", { className: "sia-tree-select__placeholder", children: placeholder }) }),
2637
+ floating.label,
2627
2638
  /* @__PURE__ */ jsx14(Icon, { name: open ? "chevron-up" : "chevron-down", size: 14 })
2628
2639
  ]
2629
2640
  }
@@ -3842,7 +3853,7 @@ var InputNumber = forwardRef4(function InputNumber2({
3842
3853
  prefix,
3843
3854
  suffix,
3844
3855
  controls = true,
3845
- placeholderMode = "default",
3856
+ placeholderMode,
3846
3857
  placeholder,
3847
3858
  disabled,
3848
3859
  readOnly,
@@ -3911,7 +3922,7 @@ var InputNumber = forwardRef4(function InputNumber2({
3911
3922
  }
3912
3923
  const increaseDisabled = disabled || readOnly || max !== void 0 && currentValue !== null && currentValue >= max;
3913
3924
  const decreaseDisabled = disabled || readOnly || min !== void 0 && currentValue !== null && currentValue <= min;
3914
- const floatingPlaceholder = placeholderMode === "floating" && Boolean(placeholder);
3925
+ const floatingPlaceholder = usePlaceholderMode(placeholderMode) === "floating" && Boolean(placeholder);
3915
3926
  const input = /* @__PURE__ */ jsx17(
3916
3927
  "input",
3917
3928
  {
@@ -4387,11 +4398,31 @@ function Treemap({
4387
4398
  );
4388
4399
  }
4389
4400
 
4401
+ // src/components/Table/TableCellContent.tsx
4402
+ import { useLayoutEffect, useRef as useRef12, useState as useState15 } from "react";
4403
+ import { jsx as jsx19 } from "react/jsx-runtime";
4404
+ function TableCellContent({ children, ellipsis, title }) {
4405
+ const ref = useRef12(null);
4406
+ const [overflowing, setOverflowing] = useState15(false);
4407
+ const customContent = typeof children !== "string" && typeof children !== "number" && children != null;
4408
+ useLayoutEffect(() => {
4409
+ const element = ref.current;
4410
+ if (!element || !ellipsis || !customContent) return;
4411
+ const update = () => setOverflowing(element.scrollWidth > element.clientWidth + 1);
4412
+ update();
4413
+ const observer = new ResizeObserver(update);
4414
+ observer.observe(element);
4415
+ for (const child of element.children) observer.observe(child);
4416
+ return () => observer.disconnect();
4417
+ }, [children, ellipsis, customContent]);
4418
+ return /* @__PURE__ */ jsx19("div", { ref, className: "sia-table__cell-content", title, "data-content-overflow": ellipsis && customContent && overflowing || void 0, children });
4419
+ }
4420
+
4390
4421
  // src/components/Table/Table.tsx
4391
- import { Fragment as Fragment7, forwardRef as forwardRef5, memo, useCallback as useCallback2, useEffect as useEffect12, useImperativeHandle, useMemo as useMemo9, useRef as useRef13, useState as useState16 } from "react";
4422
+ import { Fragment as Fragment7, forwardRef as forwardRef5, memo, useCallback as useCallback2, useEffect as useEffect12, useImperativeHandle, useMemo as useMemo9, useRef as useRef14, useState as useState17 } from "react";
4392
4423
 
4393
4424
  // src/components/Table/plugins.tsx
4394
- import { isValidElement as isValidElement3, useEffect as useEffect11, useRef as useRef12, useState as useState15 } from "react";
4425
+ import { isValidElement as isValidElement3, useEffect as useEffect11, useRef as useRef13, useState as useState16 } from "react";
4395
4426
 
4396
4427
  // src/components/Table/utils.ts
4397
4428
  var AUTO_WIDTH_COLUMN_KEYS = /* @__PURE__ */ new Set(["action", "actions", "operation", "operations"]);
@@ -4444,9 +4475,9 @@ function toTablePageParams(current, pageSize) {
4444
4475
  }
4445
4476
 
4446
4477
  // src/components/Table/plugins.tsx
4447
- import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
4478
+ import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
4448
4479
  function TableCheckbox({ checked, indeterminate, disabled, label, onChange }) {
4449
- return /* @__PURE__ */ jsx19(Checkbox, { className: "sia-table__checkbox", "aria-label": label, checked, indeterminate, disabled, onClick: (event) => event.stopPropagation(), onChange });
4480
+ return /* @__PURE__ */ jsx20(Checkbox, { className: "sia-table__checkbox", "aria-label": label, checked, indeterminate, disabled, onClick: (event) => event.stopPropagation(), onChange });
4450
4481
  }
4451
4482
  function flattenRecords(data, childrenColumnName) {
4452
4483
  const result = [];
@@ -4898,7 +4929,7 @@ function TableSelectedItemsPanel({
4898
4929
  onRemove,
4899
4930
  onClear
4900
4931
  }) {
4901
- const [showAll, setShowAll] = useState15(false);
4932
+ const [showAll, setShowAll] = useState16(false);
4902
4933
  const visibleEntries = showAll ? entries : entries.slice(0, maxCount);
4903
4934
  const hiddenCount = Math.max(0, entries.length - visibleEntries.length);
4904
4935
  const baseColumnMap = new Map(flattenTableColumns(baseColumns).map((column) => [column.key, column]));
@@ -4906,33 +4937,33 @@ function TableSelectedItemsPanel({
4906
4937
  /* @__PURE__ */ jsxs19("div", { className: "sia-table-selection-panel__header", children: [
4907
4938
  /* @__PURE__ */ jsxs19("strong", { children: [
4908
4939
  "\u5DF2\u9009 ",
4909
- /* @__PURE__ */ jsx19("span", { children: entries.length }),
4940
+ /* @__PURE__ */ jsx20("span", { children: entries.length }),
4910
4941
  " \u9879"
4911
4942
  ] }),
4912
- /* @__PURE__ */ jsx19(Button, { size: "small", variant: "link", disabled: entries.length === 0, onClick: onClear, children: "\u6E05\u7A7A" })
4943
+ /* @__PURE__ */ jsx20(Button, { size: "small", variant: "link", disabled: entries.length === 0, onClick: onClear, children: "\u6E05\u7A7A" })
4913
4944
  ] }),
4914
- /* @__PURE__ */ jsx19("div", { className: "sia-table-selection-panel__body", children: /* @__PURE__ */ jsxs19("table", { children: [
4915
- /* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsxs19("tr", { children: [
4916
- columns.map((column) => /* @__PURE__ */ jsx19("th", { children: getColumnLabel(column) }, column.key)),
4917
- /* @__PURE__ */ jsx19("th", { "aria-label": "\u64CD\u4F5C" })
4945
+ /* @__PURE__ */ jsx20("div", { className: "sia-table-selection-panel__body", children: /* @__PURE__ */ jsxs19("table", { children: [
4946
+ /* @__PURE__ */ jsx20("thead", { children: /* @__PURE__ */ jsxs19("tr", { children: [
4947
+ columns.map((column) => /* @__PURE__ */ jsx20("th", { children: getColumnLabel(column) }, column.key)),
4948
+ /* @__PURE__ */ jsx20("th", { "aria-label": "\u64CD\u4F5C" })
4918
4949
  ] }) }),
4919
- /* @__PURE__ */ jsx19("tbody", { children: visibleEntries.map((entry, selectedIndex) => /* @__PURE__ */ jsxs19("tr", { children: [
4950
+ /* @__PURE__ */ jsx20("tbody", { children: visibleEntries.map((entry, selectedIndex) => /* @__PURE__ */ jsxs19("tr", { children: [
4920
4951
  columns.map((column) => {
4921
- if (column.meta?.plugin === "index") return /* @__PURE__ */ jsx19("td", { children: entry.sourceIndex + 1 }, column.key);
4952
+ if (column.meta?.plugin === "index") return /* @__PURE__ */ jsx20("td", { children: entry.sourceIndex + 1 }, column.key);
4922
4953
  const baseColumn = baseColumnMap.get(column.key) ?? column;
4923
4954
  const value = getTableValue(entry.record, baseColumn.dataIndex, baseColumn.code ?? baseColumn.key);
4924
4955
  const row = { key: entry.key, record: entry.record, sourceIndex: entry.sourceIndex, depth: 0, meta: {} };
4925
4956
  const content = baseColumn.render?.(value, entry.record, entry.sourceIndex, { row, rowIndex: entry.sourceIndex, column: baseColumn }) ?? value;
4926
- return /* @__PURE__ */ jsx19("td", { children: content }, column.key);
4957
+ return /* @__PURE__ */ jsx20("td", { children: content }, column.key);
4927
4958
  }),
4928
- /* @__PURE__ */ jsx19("td", { children: /* @__PURE__ */ jsx19(Button, { size: "small", variant: "link", onClick: () => onRemove(entry.key), children: "\u53D6\u6D88" }) })
4959
+ /* @__PURE__ */ jsx20("td", { children: /* @__PURE__ */ jsx20(Button, { size: "small", variant: "link", onClick: () => onRemove(entry.key), children: "\u53D6\u6D88" }) })
4929
4960
  ] }, entry.key)) })
4930
4961
  ] }) }),
4931
4962
  hiddenCount > 0 ? /* @__PURE__ */ jsxs19("div", { className: "sia-table-selection-panel__more", children: [
4932
4963
  "\u8FD8\u6709 ",
4933
4964
  hiddenCount,
4934
4965
  " \u9879\u672A\u5C55\u793A",
4935
- /* @__PURE__ */ jsx19(Button, { size: "small", variant: "link", onClick: () => setShowAll(true), children: "\u5C55\u793A\u5168\u90E8" })
4966
+ /* @__PURE__ */ jsx20(Button, { size: "small", variant: "link", onClick: () => setShowAll(true), children: "\u5C55\u793A\u5168\u90E8" })
4936
4967
  ] }) : null
4937
4968
  ] });
4938
4969
  }
@@ -5010,12 +5041,12 @@ function createSelectionPlugin(options = {}) {
5010
5041
  const keys = selected(context);
5011
5042
  const allChecked = enabledRows.length > 0 && enabledRows.every((row) => keys.includes(row.key));
5012
5043
  const someChecked = enabledRows.some((row) => keys.includes(row.key));
5013
- return /* @__PURE__ */ jsx19(TableCheckbox, { label: "\u9009\u62E9\u5F53\u524D\u9875\u5168\u90E8\u884C", checked: allChecked, indeterminate: !allChecked && someChecked, onChange: (checked) => {
5044
+ return /* @__PURE__ */ jsx20(TableCheckbox, { label: "\u9009\u62E9\u5F53\u524D\u9875\u5168\u90E8\u884C", checked: allChecked, indeterminate: !allChecked && someChecked, onChange: (checked) => {
5014
5045
  const pageKeys = enabledRows.map((row) => row.key);
5015
5046
  setKeys(checked ? [.../* @__PURE__ */ new Set([...keys, ...pageKeys])] : keys.filter((key) => !pageKeys.includes(key)), context);
5016
5047
  } });
5017
5048
  },
5018
- render: (_value, record, _index, info) => mode === "single" ? /* @__PURE__ */ jsx19(Radio2, { className: "sia-table__checkbox", value: String(info.row.key), "aria-label": `\u9009\u62E9\u7B2C ${info.rowIndex + 1} \u884C`, checked: selected(context).includes(info.row.key), disabled: options.getCheckboxDisabled?.(record), onClick: (event) => event.stopPropagation(), onChange: () => toggle(info.row.key, record, context) }) : /* @__PURE__ */ jsx19(TableCheckbox, { label: `\u9009\u62E9\u7B2C ${info.rowIndex + 1} \u884C`, checked: selected(context).includes(info.row.key), disabled: options.getCheckboxDisabled?.(record), onChange: (checked) => toggle(info.row.key, record, context, checked) })
5049
+ render: (_value, record, _index, info) => mode === "single" ? /* @__PURE__ */ jsx20(Radio2, { className: "sia-table__checkbox", value: String(info.row.key), "aria-label": `\u9009\u62E9\u7B2C ${info.rowIndex + 1} \u884C`, checked: selected(context).includes(info.row.key), disabled: options.getCheckboxDisabled?.(record), onClick: (event) => event.stopPropagation(), onChange: () => toggle(info.row.key, record, context) }) : /* @__PURE__ */ jsx20(TableCheckbox, { label: `\u9009\u62E9\u7B2C ${info.rowIndex + 1} \u884C`, checked: selected(context).includes(info.row.key), disabled: options.getCheckboxDisabled?.(record), onChange: (checked) => toggle(info.row.key, record, context, checked) })
5019
5050
  };
5020
5051
  return [selectionColumn, ...columns];
5021
5052
  },
@@ -5043,7 +5074,7 @@ function createSelectionPlugin(options = {}) {
5043
5074
  const entries = entriesForKeys(keys, context);
5044
5075
  const columns = flattenTableColumns(context.columns).filter((column) => !column.hidden && column.meta?.plugin !== "selection").slice(0, Math.max(1, options.selectionPanelColumnCount ?? 4));
5045
5076
  return /* @__PURE__ */ jsxs19("span", { className: "sia-table__selection-footer", children: [
5046
- /* @__PURE__ */ jsx19(
5077
+ /* @__PURE__ */ jsx20(
5047
5078
  Popover,
5048
5079
  {
5049
5080
  placement: "top-start",
@@ -5051,7 +5082,7 @@ function createSelectionPlugin(options = {}) {
5051
5082
  open: context.state.panelOpen && entries.length > 0,
5052
5083
  onOpenChange: (panelOpen) => context.setState((state) => ({ ...state, panelOpen })),
5053
5084
  overlayClassName: "sia-table-selection-popover",
5054
- content: /* @__PURE__ */ jsx19(TableSelectedItemsPanel, { entries, columns, baseColumns: context.baseColumns, maxCount: Math.max(1, options.selectionPanelMaxCount ?? 100), onRemove: (key) => {
5085
+ content: /* @__PURE__ */ jsx20(TableSelectedItemsPanel, { entries, columns, baseColumns: context.baseColumns, maxCount: Math.max(1, options.selectionPanelMaxCount ?? 100), onRemove: (key) => {
5055
5086
  setKeys(keys.filter((item) => item !== key), context);
5056
5087
  }, onClear: () => setKeys([], context) }),
5057
5088
  children: /* @__PURE__ */ jsxs19(Button, { className: "sia-table__selected-trigger", size: "small", variant: "link", disabled: entries.length === 0, children: [
@@ -5061,7 +5092,7 @@ function createSelectionPlugin(options = {}) {
5061
5092
  ] })
5062
5093
  }
5063
5094
  ),
5064
- mode === "multiple" && options.showPreserveSelectedRowKeys !== false ? /* @__PURE__ */ jsx19(Checkbox, { checked: preserving(context), onChange: (checked) => setPreserving(checked, context), children: "\u8DE8\u9875\u4FDD\u7559\u52FE\u9009" }) : null
5095
+ mode === "multiple" && options.showPreserveSelectedRowKeys !== false ? /* @__PURE__ */ jsx20(Checkbox, { checked: preserving(context), onChange: (checked) => setPreserving(checked, context), children: "\u8DE8\u9875\u4FDD\u7559\u52FE\u9009" }) : null
5065
5096
  ] });
5066
5097
  },
5067
5098
  getApi(context) {
@@ -5106,13 +5137,13 @@ function createSortPlugin(options = {}) {
5106
5137
  return { ...column, renderHeader: (currentColumn, coreContext) => {
5107
5138
  const info = current(context);
5108
5139
  return /* @__PURE__ */ jsxs19("span", { className: "sia-table__sortable-header", children: [
5109
- /* @__PURE__ */ jsx19("span", { children: previousHeader ? previousHeader(currentColumn, coreContext) : currentColumn.title ?? currentColumn.name ?? currentColumn.key }),
5140
+ /* @__PURE__ */ jsx20("span", { children: previousHeader ? previousHeader(currentColumn, coreContext) : currentColumn.title ?? currentColumn.name ?? currentColumn.key }),
5110
5141
  /* @__PURE__ */ jsxs19("button", { type: "button", className: "sia-table__sort-button", "aria-label": `\u5207\u6362${getColumnLabel(currentColumn)}\u6392\u5E8F`, onClick: (event) => {
5111
5142
  event.stopPropagation();
5112
5143
  cycle(field, context);
5113
5144
  }, children: [
5114
- /* @__PURE__ */ jsx19(Icon, { name: "chevron-up", size: 11, className: info?.field === field && info.order === "ascend" ? "is-active" : "" }),
5115
- /* @__PURE__ */ jsx19(Icon, { name: "chevron-down", size: 11, className: info?.field === field && info.order === "descend" ? "is-active" : "" })
5145
+ /* @__PURE__ */ jsx20(Icon, { name: "chevron-up", size: 11, className: info?.field === field && info.order === "ascend" ? "is-active" : "" }),
5146
+ /* @__PURE__ */ jsx20(Icon, { name: "chevron-down", size: 11, className: info?.field === field && info.order === "descend" ? "is-active" : "" })
5116
5147
  ] })
5117
5148
  ] });
5118
5149
  } };
@@ -5138,8 +5169,8 @@ function TableFilterControl({
5138
5169
  placeholder,
5139
5170
  onApply
5140
5171
  }) {
5141
- const [open, setOpen] = useState15(false);
5142
- const [draft, setDraft] = useState15(value);
5172
+ const [open, setOpen] = useState16(false);
5173
+ const [draft, setDraft] = useState16(value);
5143
5174
  const label = getColumnLabel(column);
5144
5175
  useEffect11(() => {
5145
5176
  if (open) setDraft(value);
@@ -5149,8 +5180,8 @@ function TableFilterControl({
5149
5180
  setOpen(false);
5150
5181
  };
5151
5182
  return /* @__PURE__ */ jsxs19("span", { className: "sia-table__filter-header", children: [
5152
- /* @__PURE__ */ jsx19("span", { children: column.title ?? column.name ?? column.key }),
5153
- /* @__PURE__ */ jsx19(
5183
+ /* @__PURE__ */ jsx20("span", { children: column.title ?? column.name ?? column.key }),
5184
+ /* @__PURE__ */ jsx20(
5154
5185
  Popover,
5155
5186
  {
5156
5187
  open,
@@ -5158,7 +5189,7 @@ function TableFilterControl({
5158
5189
  placement: "bottom-end",
5159
5190
  overlayClassName: "sia-table-filter-popover",
5160
5191
  content: /* @__PURE__ */ jsxs19("div", { className: "sia-table-filter-panel", children: [
5161
- /* @__PURE__ */ jsx19(
5192
+ /* @__PURE__ */ jsx20(
5162
5193
  Input,
5163
5194
  {
5164
5195
  size: "small",
@@ -5173,14 +5204,14 @@ function TableFilterControl({
5173
5204
  }
5174
5205
  ),
5175
5206
  /* @__PURE__ */ jsxs19("div", { className: "sia-table-filter-panel__actions", children: [
5176
- /* @__PURE__ */ jsx19(Button, { size: "small", disabled: !value && !draft, onClick: () => {
5207
+ /* @__PURE__ */ jsx20(Button, { size: "small", disabled: !value && !draft, onClick: () => {
5177
5208
  setDraft("");
5178
5209
  apply("");
5179
5210
  }, children: "\u6E05\u9664" }),
5180
- /* @__PURE__ */ jsx19(Button, { size: "small", variant: "primary", onClick: () => apply(draft), children: "\u5E94\u7528" })
5211
+ /* @__PURE__ */ jsx20(Button, { size: "small", variant: "primary", onClick: () => apply(draft), children: "\u5E94\u7528" })
5181
5212
  ] })
5182
5213
  ] }),
5183
- children: /* @__PURE__ */ jsx19(
5214
+ children: /* @__PURE__ */ jsx20(
5184
5215
  "button",
5185
5216
  {
5186
5217
  type: "button",
@@ -5188,7 +5219,7 @@ function TableFilterControl({
5188
5219
  "aria-label": `\u7B5B\u9009${label}`,
5189
5220
  "aria-pressed": Boolean(value),
5190
5221
  onClick: (event) => event.stopPropagation(),
5191
- children: /* @__PURE__ */ jsx19(Icon, { name: "search", size: 13 })
5222
+ children: /* @__PURE__ */ jsx20(Icon, { name: "search", size: 13 })
5192
5223
  }
5193
5224
  )
5194
5225
  }
@@ -5229,7 +5260,7 @@ function createFilterPlugin(options = {}) {
5229
5260
  return { ...column, renderHeader: (currentColumn, coreContext) => {
5230
5261
  const renderedColumn = { ...currentColumn, title: previousHeader ? previousHeader(currentColumn, coreContext) : currentColumn.title };
5231
5262
  const placeholder = typeof options.placeholder === "function" ? options.placeholder(currentColumn) : options.placeholder ?? `\u8F93\u5165${getColumnLabel(currentColumn)}\u7B5B\u9009`;
5232
- return /* @__PURE__ */ jsx19(TableFilterControl, { column: renderedColumn, value: current(context)[column.key] ?? "", placeholder, onApply: (value) => update({ ...current(context), [column.key]: value }, context) });
5263
+ return /* @__PURE__ */ jsx20(TableFilterControl, { column: renderedColumn, value: current(context)[column.key] ?? "", placeholder, onApply: (value) => update({ ...current(context), [column.key]: value }, context) });
5233
5264
  } };
5234
5265
  });
5235
5266
  },
@@ -5282,7 +5313,7 @@ function createPaginationPlugin(options = {}) {
5282
5313
  const page = currentPage(context);
5283
5314
  const filteredCount = context.getPluginApi("filter")?.getFilteredRows().length;
5284
5315
  const totalRecords = options.totalCount ?? filteredCount ?? context.sourceData.length;
5285
- return /* @__PURE__ */ jsx19(
5316
+ return /* @__PURE__ */ jsx20(
5286
5317
  Pagination,
5287
5318
  {
5288
5319
  className: "sia-table__pagination",
@@ -5371,10 +5402,10 @@ function createTreePlugin(options = {}) {
5371
5402
  wrapped = true;
5372
5403
  const previousRender = column.render;
5373
5404
  return { ...column, render: (value, record, index, info) => /* @__PURE__ */ jsxs19("span", { className: "sia-table__tree-cell", style: { paddingLeft: info.row.depth * 18 }, children: [
5374
- info.row.meta.treeHasChildren ? /* @__PURE__ */ jsx19("button", { type: "button", className: "sia-table__tree-toggle", "aria-label": current(context).includes(info.row.key) ? "\u6536\u8D77\u5B50\u8282\u70B9" : "\u5C55\u5F00\u5B50\u8282\u70B9", "aria-expanded": current(context).includes(info.row.key), onClick: (event) => {
5405
+ info.row.meta.treeHasChildren ? /* @__PURE__ */ jsx20("button", { type: "button", className: "sia-table__tree-toggle", "aria-label": current(context).includes(info.row.key) ? "\u6536\u8D77\u5B50\u8282\u70B9" : "\u5C55\u5F00\u5B50\u8282\u70B9", "aria-expanded": current(context).includes(info.row.key), onClick: (event) => {
5375
5406
  event.stopPropagation();
5376
5407
  toggle(info.row.key, context);
5377
- }, children: /* @__PURE__ */ jsx19(Icon, { name: current(context).includes(info.row.key) ? "chevron-down" : "chevron-right", size: 13 }) }) : /* @__PURE__ */ jsx19("span", { className: "sia-table__tree-placeholder" }),
5408
+ }, children: /* @__PURE__ */ jsx20(Icon, { name: current(context).includes(info.row.key) ? "chevron-down" : "chevron-right", size: 13 }) }) : /* @__PURE__ */ jsx20("span", { className: "sia-table__tree-placeholder" }),
5378
5409
  previousRender ? previousRender(value, record, index, info) : value
5379
5410
  ] }) };
5380
5411
  });
@@ -5406,13 +5437,13 @@ function EditableTableCell({
5406
5437
  trigger
5407
5438
  }) {
5408
5439
  const config = typeof editable === "object" ? editable : { type: "input" };
5409
- const [editValue, setEditValue] = useState15(value);
5410
- const [saving, setSaving] = useState15(false);
5411
- const inputRef = useRef12(null);
5412
- const editorRef = useRef12(null);
5413
- const editValueRef = useRef12(value);
5414
- const savingRef = useRef12(false);
5415
- const saveRef = useRef12(async () => {
5440
+ const [editValue, setEditValue] = useState16(value);
5441
+ const [saving, setSaving] = useState16(false);
5442
+ const inputRef = useRef13(null);
5443
+ const editorRef = useRef13(null);
5444
+ const editValueRef = useRef13(value);
5445
+ const savingRef = useRef13(false);
5446
+ const saveRef = useRef13(async () => {
5416
5447
  });
5417
5448
  useEffect11(() => {
5418
5449
  if (!active) return;
@@ -5456,14 +5487,14 @@ function EditableTableCell({
5456
5487
  return () => document.removeEventListener("pointerdown", handleOutsidePointerDown, true);
5457
5488
  }, [active, config.type]);
5458
5489
  if (!active) return /* @__PURE__ */ jsxs19("div", { className: "sia-table__editable-display", onClick: trigger === "click" ? onStart : void 0, onDoubleClick: trigger === "doubleClick" ? onStart : void 0, children: [
5459
- /* @__PURE__ */ jsx19("span", { children: content }),
5460
- /* @__PURE__ */ jsx19(Icon, { name: "edit", size: 13 })
5490
+ /* @__PURE__ */ jsx20("span", { children: content }),
5491
+ /* @__PURE__ */ jsx20(Icon, { name: "edit", size: 13 })
5461
5492
  ] });
5462
5493
  let editor;
5463
5494
  if (config.type === "custom" && config.editRender) {
5464
5495
  editor = config.editRender(record, (next) => void save(next), onCancel);
5465
5496
  } else if (config.type === "inputNumber") {
5466
- editor = /* @__PURE__ */ jsx19(InputNumber, { ref: inputRef, size: "small", value: typeof editValue === "number" ? editValue : null, onChange: updateEditValue, disabled: saving, onBlur: () => void save(), onKeyDown: (event) => {
5497
+ editor = /* @__PURE__ */ jsx20(InputNumber, { ref: inputRef, size: "small", value: typeof editValue === "number" ? editValue : null, onChange: updateEditValue, disabled: saving, onBlur: () => void save(), onKeyDown: (event) => {
5467
5498
  if (event.key === "Enter") {
5468
5499
  const rawValue = event.currentTarget.value.trim();
5469
5500
  const nextValue = rawValue === "" ? null : Number(rawValue);
@@ -5472,17 +5503,17 @@ function EditableTableCell({
5472
5503
  if (event.key === "Escape") onCancel();
5473
5504
  } });
5474
5505
  } else if (config.type === "select") {
5475
- editor = /* @__PURE__ */ jsx19(Select, { size: "small", value: editValue, options: config.options ?? [], disabled: saving, onChange: (next) => {
5506
+ editor = /* @__PURE__ */ jsx20(Select, { size: "small", value: editValue, options: config.options ?? [], disabled: saving, onChange: (next) => {
5476
5507
  updateEditValue(next);
5477
5508
  void save(next);
5478
5509
  } });
5479
5510
  } else {
5480
- editor = /* @__PURE__ */ jsx19(Input, { ref: inputRef, size: "small", value: String(editValue ?? ""), disabled: saving, suffix: saving ? /* @__PURE__ */ jsx19(Icon, { name: "loader", size: 13, spin: true }) : null, onChange: (event) => updateEditValue(event.target.value), onBlur: () => void save(), onKeyDown: (event) => {
5511
+ editor = /* @__PURE__ */ jsx20(Input, { ref: inputRef, size: "small", value: String(editValue ?? ""), disabled: saving, suffix: saving ? /* @__PURE__ */ jsx20(Icon, { name: "loader", size: 13, spin: true }) : null, onChange: (event) => updateEditValue(event.target.value), onBlur: () => void save(), onKeyDown: (event) => {
5481
5512
  if (event.key === "Enter") void save();
5482
5513
  if (event.key === "Escape") onCancel();
5483
5514
  } });
5484
5515
  }
5485
- return /* @__PURE__ */ jsx19("div", { ref: editorRef, className: "sia-table__editor", children: editor });
5516
+ return /* @__PURE__ */ jsx20("div", { ref: editorRef, className: "sia-table__editor", children: editor });
5486
5517
  }
5487
5518
  function createEditablePlugin(options = {}) {
5488
5519
  const trigger = options.trigger ?? "click";
@@ -5500,7 +5531,7 @@ function createEditablePlugin(options = {}) {
5500
5531
  const active = canEdit && context.state.editing?.rowKey === info.row.key && context.state.editing.columnKey === column.key;
5501
5532
  const content = previousRender ? previousRender(value, record, index, info) : value;
5502
5533
  if (!canEdit) return content;
5503
- return /* @__PURE__ */ jsx19(EditableTableCell, { active, editable: column.editable, value, record, content, trigger, onStart: () => context.setState({ editing: { rowKey: info.row.key, columnKey: column.key } }), onCancel: () => context.setState((state) => state.editing?.rowKey === info.row.key && state.editing.columnKey === column.key ? { editing: null } : state), onSave: async (nextValue) => await options.onCellChange?.(column.key, record, nextValue) !== false });
5534
+ return /* @__PURE__ */ jsx20(EditableTableCell, { active, editable: column.editable, value, record, content, trigger, onStart: () => context.setState({ editing: { rowKey: info.row.key, columnKey: column.key } }), onCancel: () => context.setState((state) => state.editing?.rowKey === info.row.key && state.editing.columnKey === column.key ? { editing: null } : state), onSave: async (nextValue) => await options.onCellChange?.(column.key, record, nextValue) !== false });
5504
5535
  } };
5505
5536
  });
5506
5537
  },
@@ -5528,8 +5559,8 @@ function createResizePlugin(options = {}) {
5528
5559
  const width = configuredWidth ?? (autoWidth ? void 0 : 160);
5529
5560
  const previousHeader = column.renderHeader;
5530
5561
  return { ...column, autoWidth, width, renderHeader: (currentColumn, coreContext) => /* @__PURE__ */ jsxs19("span", { className: "sia-table__resizable-header", children: [
5531
- /* @__PURE__ */ jsx19("span", { children: previousHeader ? previousHeader(currentColumn, coreContext) : currentColumn.title ?? currentColumn.name ?? currentColumn.key }),
5532
- /* @__PURE__ */ jsx19("span", { className: "sia-table__resize-handle", role: "separator", "aria-label": `\u8C03\u6574${getColumnLabel(currentColumn)}\u5217\u5BBD`, onMouseDown: (event) => {
5562
+ /* @__PURE__ */ jsx20("span", { children: previousHeader ? previousHeader(currentColumn, coreContext) : currentColumn.title ?? currentColumn.name ?? currentColumn.key }),
5563
+ /* @__PURE__ */ jsx20("span", { className: "sia-table__resize-handle", role: "separator", "aria-label": `\u8C03\u6574${getColumnLabel(currentColumn)}\u5217\u5BBD`, onMouseDown: (event) => {
5533
5564
  if (event.button !== 0) return;
5534
5565
  event.preventDefault();
5535
5566
  event.stopPropagation();
@@ -5604,8 +5635,8 @@ function applyColumnSettingsToTree(columns, items) {
5604
5635
  return walk(columns).map((entry) => entry.column);
5605
5636
  }
5606
5637
  function ColumnSettingPanel({ open, items, columns, onClose, onApply }) {
5607
- const [draft, setDraft] = useState15(items);
5608
- const dragIndex = useRef12(null);
5638
+ const [draft, setDraft] = useState16(items);
5639
+ const dragIndex = useRef13(null);
5609
5640
  useEffect11(() => {
5610
5641
  if (open) setDraft(items);
5611
5642
  }, [items, open]);
@@ -5625,11 +5656,11 @@ function ColumnSettingPanel({ open, items, columns, onClose, onApply }) {
5625
5656
  return /* @__PURE__ */ jsxs19(Drawer2, { open, title: "\u5217\u8BBE\u7F6E", size: 440, onOpenChange: (next) => {
5626
5657
  if (!next) onClose();
5627
5658
  }, footer: /* @__PURE__ */ jsxs19(Fragment6, { children: [
5628
- /* @__PURE__ */ jsx19(Button, { onClick: onClose, children: "\u53D6\u6D88" }),
5629
- /* @__PURE__ */ jsx19(Button, { variant: "primary", onClick: () => onApply(draft), children: "\u5E94\u7528" })
5659
+ /* @__PURE__ */ jsx20(Button, { onClick: onClose, children: "\u53D6\u6D88" }),
5660
+ /* @__PURE__ */ jsx20(Button, { variant: "primary", onClick: () => onApply(draft), children: "\u5E94\u7528" })
5630
5661
  ] }), children: [
5631
5662
  /* @__PURE__ */ jsxs19("label", { className: "sia-table-settings__all", children: [
5632
- /* @__PURE__ */ jsx19(TableCheckbox, { label: "\u5168\u9009\u5217", checked: visibleCount === draft.length && draft.length > 0, indeterminate: visibleCount > 0 && visibleCount < draft.length, onChange: (checked) => setDraft((previous) => previous.map((item) => ({ ...item, visible: checked }))) }),
5663
+ /* @__PURE__ */ jsx20(TableCheckbox, { label: "\u5168\u9009\u5217", checked: visibleCount === draft.length && draft.length > 0, indeterminate: visibleCount > 0 && visibleCount < draft.length, onChange: (checked) => setDraft((previous) => previous.map((item) => ({ ...item, visible: checked }))) }),
5633
5664
  /* @__PURE__ */ jsxs19("span", { children: [
5634
5665
  "\u5168\u9009\uFF08",
5635
5666
  visibleCount,
@@ -5638,7 +5669,7 @@ function ColumnSettingPanel({ open, items, columns, onClose, onApply }) {
5638
5669
  "\uFF09"
5639
5670
  ] })
5640
5671
  ] }),
5641
- /* @__PURE__ */ jsx19("div", { className: "sia-table-settings__list", children: draft.map((item, index) => /* @__PURE__ */ jsxs19("div", { className: "sia-table-settings__item", draggable: true, onDragStart: () => {
5672
+ /* @__PURE__ */ jsx20("div", { className: "sia-table-settings__list", children: draft.map((item, index) => /* @__PURE__ */ jsxs19("div", { className: "sia-table-settings__item", draggable: true, onDragStart: () => {
5642
5673
  dragIndex.current = index;
5643
5674
  }, onDragOver: (event) => event.preventDefault(), onDrop: () => {
5644
5675
  if (dragIndex.current == null || dragIndex.current === index) return;
@@ -5648,14 +5679,14 @@ function ColumnSettingPanel({ open, items, columns, onClose, onApply }) {
5648
5679
  setDraft(next.map((entry, order) => ({ ...entry, order })));
5649
5680
  dragIndex.current = null;
5650
5681
  }, children: [
5651
- /* @__PURE__ */ jsx19(Icon, { name: "menu", size: 15 }),
5652
- /* @__PURE__ */ jsx19(TableCheckbox, { label: `\u663E\u793A${labels.get(item.key) ?? item.key}\u5217`, checked: item.visible, onChange: (checked) => setDraft((previous) => previous.map((entry) => entry.key === item.key ? { ...entry, visible: checked } : entry)) }),
5653
- /* @__PURE__ */ jsx19("span", { className: "sia-table-settings__name", title: labels.get(item.key) ?? item.key, children: labels.get(item.key) ?? item.key }),
5682
+ /* @__PURE__ */ jsx20(Icon, { name: "menu", size: 15 }),
5683
+ /* @__PURE__ */ jsx20(TableCheckbox, { label: `\u663E\u793A${labels.get(item.key) ?? item.key}\u5217`, checked: item.visible, onChange: (checked) => setDraft((previous) => previous.map((entry) => entry.key === item.key ? { ...entry, visible: checked } : entry)) }),
5684
+ /* @__PURE__ */ jsx20("span", { className: "sia-table-settings__name", title: labels.get(item.key) ?? item.key, children: labels.get(item.key) ?? item.key }),
5654
5685
  /* @__PURE__ */ jsxs19("div", { className: "sia-table-settings__actions", children: [
5655
- /* @__PURE__ */ jsx19(Button, { size: "small", variant: "text", icon: /* @__PURE__ */ jsx19(Icon, { name: "arrow-up", size: 13 }), "aria-label": "\u4E0A\u79FB", disabled: index === 0, onClick: () => move(index, -1) }),
5656
- /* @__PURE__ */ jsx19(Button, { size: "small", variant: "text", icon: /* @__PURE__ */ jsx19(Icon, { name: "arrow-down", size: 13 }), "aria-label": "\u4E0B\u79FB", disabled: index === draft.length - 1, onClick: () => move(index, 1) }),
5657
- /* @__PURE__ */ jsx19(Button, { size: "small", variant: item.fixed === "left" ? "primary" : "text", "aria-label": "\u5DE6\u56FA\u5B9A", onClick: () => setFixed(item.key, item.fixed === "left" ? void 0 : "left"), children: "\u5DE6" }),
5658
- /* @__PURE__ */ jsx19(Button, { size: "small", variant: item.fixed === "right" ? "primary" : "text", "aria-label": "\u53F3\u56FA\u5B9A", onClick: () => setFixed(item.key, item.fixed === "right" ? void 0 : "right"), children: "\u53F3" })
5686
+ /* @__PURE__ */ jsx20(Button, { size: "small", variant: "text", icon: /* @__PURE__ */ jsx20(Icon, { name: "arrow-up", size: 13 }), "aria-label": "\u4E0A\u79FB", disabled: index === 0, onClick: () => move(index, -1) }),
5687
+ /* @__PURE__ */ jsx20(Button, { size: "small", variant: "text", icon: /* @__PURE__ */ jsx20(Icon, { name: "arrow-down", size: 13 }), "aria-label": "\u4E0B\u79FB", disabled: index === draft.length - 1, onClick: () => move(index, 1) }),
5688
+ /* @__PURE__ */ jsx20(Button, { size: "small", variant: item.fixed === "left" ? "primary" : "text", "aria-label": "\u5DE6\u56FA\u5B9A", onClick: () => setFixed(item.key, item.fixed === "left" ? void 0 : "left"), children: "\u5DE6" }),
5689
+ /* @__PURE__ */ jsx20(Button, { size: "small", variant: item.fixed === "right" ? "primary" : "text", "aria-label": "\u53F3\u56FA\u5B9A", onClick: () => setFixed(item.key, item.fixed === "right" ? void 0 : "right"), children: "\u53F3" })
5659
5690
  ] })
5660
5691
  ] }, item.key)) })
5661
5692
  ] });
@@ -5701,8 +5732,8 @@ function createColumnSettingPlugin(options = {}) {
5701
5732
  void save({ columns: currentItems(context), pageSize, version: 1 });
5702
5733
  }
5703
5734
  },
5704
- renderToolbarEnd: options.showButton === false ? void 0 : (context) => /* @__PURE__ */ jsx19(Button, { size: "small", variant: "text", className: "sia-table__toolbar-icon", icon: /* @__PURE__ */ jsx19(Icon, { name: "settings", size: 16 }), "aria-label": "\u6253\u5F00\u5217\u8BBE\u7F6E", title: "\u5217\u8BBE\u7F6E", onClick: () => context.setState((state) => ({ ...state, open: true })) }),
5705
- renderOverlay: (context) => /* @__PURE__ */ jsx19(ColumnSettingPanel, { open: context.state.open, items: currentItems(context), columns: context.baseColumns, onClose: () => context.setState((state) => ({ ...state, open: false })), onApply: (items) => apply(items, context) }),
5735
+ renderToolbarEnd: options.showButton === false ? void 0 : (context) => /* @__PURE__ */ jsx20(Button, { size: "small", variant: "text", className: "sia-table__toolbar-icon", icon: /* @__PURE__ */ jsx20(Icon, { name: "settings", size: 16 }), "aria-label": "\u6253\u5F00\u5217\u8BBE\u7F6E", title: "\u5217\u8BBE\u7F6E", onClick: () => context.setState((state) => ({ ...state, open: true })) }),
5736
+ renderOverlay: (context) => /* @__PURE__ */ jsx20(ColumnSettingPanel, { open: context.state.open, items: currentItems(context), columns: context.baseColumns, onClose: () => context.setState((state) => ({ ...state, open: false })), onApply: (items) => apply(items, context) }),
5706
5737
  getApi: (context) => ({ open: () => context.setState((state) => ({ ...state, open: true })), close: () => context.setState((state) => ({ ...state, open: false })), getSettings: () => currentItems(context), apply: (items) => apply(items, context) })
5707
5738
  };
5708
5739
  }
@@ -5725,10 +5756,10 @@ function createLocalStorageTableSettingsAdapter(prefix = "sia-table") {
5725
5756
  };
5726
5757
  }
5727
5758
  function ToolbarItems({ items, context }) {
5728
- return /* @__PURE__ */ jsx19(Fragment6, { children: items.map((item) => {
5759
+ return /* @__PURE__ */ jsx20(Fragment6, { children: items.map((item) => {
5729
5760
  if (item.hidden === true || typeof item.hidden === "function" && item.hidden(context)) return null;
5730
5761
  const disabled = item.disabled === true || typeof item.disabled === "function" && item.disabled(context);
5731
- return /* @__PURE__ */ jsx19(Button, { size: "small", danger: item.danger, icon: item.icon, disabled, title: typeof item.label === "string" ? item.label : void 0, onClick: () => void item.onClick?.(context), children: item.label }, item.key);
5762
+ return /* @__PURE__ */ jsx20(Button, { size: "small", danger: item.danger, icon: item.icon, disabled, title: typeof item.label === "string" ? item.label : void 0, onClick: () => void item.onClick?.(context), children: item.label }, item.key);
5732
5763
  }) });
5733
5764
  }
5734
5765
  function createToolbarPlugin(options) {
@@ -5739,14 +5770,14 @@ function createToolbarPlugin(options) {
5739
5770
  order: 5,
5740
5771
  renderToolbarStart: (context) => /* @__PURE__ */ jsxs19(Fragment6, { children: [
5741
5772
  options.start,
5742
- /* @__PURE__ */ jsx19(ToolbarItems, { items: items("start"), context })
5773
+ /* @__PURE__ */ jsx20(ToolbarItems, { items: items("start"), context })
5743
5774
  ] }),
5744
5775
  renderToolbarEnd: (context) => /* @__PURE__ */ jsxs19(Fragment6, { children: [
5745
5776
  options.end,
5746
- /* @__PURE__ */ jsx19(ToolbarItems, { items: items("end"), context }),
5777
+ /* @__PURE__ */ jsx20(ToolbarItems, { items: items("end"), context }),
5747
5778
  items("end", true).length > 0 ? /* @__PURE__ */ jsxs19("details", { className: "sia-table__toolbar-menu", children: [
5748
- /* @__PURE__ */ jsx19("summary", { "aria-label": "\u66F4\u591A\u8868\u683C\u64CD\u4F5C", children: /* @__PURE__ */ jsx19(Icon, { name: "more-horizontal", size: 16 }) }),
5749
- /* @__PURE__ */ jsx19("div", { children: /* @__PURE__ */ jsx19(ToolbarItems, { items: items("end", true), context }) })
5779
+ /* @__PURE__ */ jsx20("summary", { "aria-label": "\u66F4\u591A\u8868\u683C\u64CD\u4F5C", children: /* @__PURE__ */ jsx20(Icon, { name: "more-horizontal", size: 16 }) }),
5780
+ /* @__PURE__ */ jsx20("div", { children: /* @__PURE__ */ jsx20(ToolbarItems, { items: items("end", true), context }) })
5750
5781
  ] }) : null
5751
5782
  ] })
5752
5783
  };
@@ -5816,11 +5847,11 @@ function createExportPlugin(options = {}) {
5816
5847
  return {
5817
5848
  id: "export",
5818
5849
  order: 95,
5819
- renderToolbarEnd: options.showButton === false ? void 0 : (context) => /* @__PURE__ */ jsx19(
5850
+ renderToolbarEnd: options.showButton === false ? void 0 : (context) => /* @__PURE__ */ jsx20(
5820
5851
  Button,
5821
5852
  {
5822
5853
  size: "small",
5823
- icon: /* @__PURE__ */ jsx19(Icon, { name: "download", size: 14 }),
5854
+ icon: /* @__PURE__ */ jsx20(Icon, { name: "download", size: 14 }),
5824
5855
  disabled: getRows(context).length === 0,
5825
5856
  onClick: () => void download(context),
5826
5857
  children: options.buttonLabel ?? "\u5BFC\u51FA"
@@ -5835,7 +5866,7 @@ function createExportPlugin(options = {}) {
5835
5866
  }
5836
5867
 
5837
5868
  // src/components/Table/Table.tsx
5838
- import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
5869
+ import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
5839
5870
  var EMPTY_DATA = [];
5840
5871
  var EMPTY_COLUMNS = [];
5841
5872
  var EMPTY_PLUGINS = [];
@@ -5927,7 +5958,7 @@ var TableBodyRow = memo(function TableBodyRow2({
5927
5958
  onCellPointerDown,
5928
5959
  onCellPointerMove
5929
5960
  }) {
5930
- return /* @__PURE__ */ jsx20(
5961
+ return /* @__PURE__ */ jsx21(
5931
5962
  "tr",
5932
5963
  {
5933
5964
  className: `sia-table__row${striped && rowIndex % 2 === 1 ? " sia-table__row--striped" : ""} ${className}`.trim(),
@@ -5945,7 +5976,7 @@ var TableBodyRow = memo(function TableBodyRow2({
5945
5976
  const fixedStyle = fixed === "left" ? { left: leftOffsets.get(column.key) } : fixed === "right" ? { right: rightOffsets.get(column.key) } : void 0;
5946
5977
  const fixedEdgeClass = fixed === "left" && column.key === leftFixedEdgeKey ? " sia-table__cell--fixed-left-edge" : fixed === "right" && column.key === rightFixedEdgeKey ? " sia-table__cell--fixed-right-edge" : "";
5947
5978
  const autoWidthClass = column.autoWidth ? " sia-table__cell--auto-width" : "";
5948
- return /* @__PURE__ */ jsx20(
5979
+ return /* @__PURE__ */ jsx21(
5949
5980
  "td",
5950
5981
  {
5951
5982
  "data-column-key": column.key,
@@ -5959,10 +5990,10 @@ var TableBodyRow = memo(function TableBodyRow2({
5959
5990
  onContextMenu: (event) => onCellContextMenu(column, event),
5960
5991
  onPointerDown: (event) => onCellPointerDown(column, event),
5961
5992
  onPointerMove: (event) => onCellPointerMove(column, event),
5962
- children: /* @__PURE__ */ jsx20(
5963
- "div",
5993
+ children: /* @__PURE__ */ jsx21(
5994
+ TableCellContent,
5964
5995
  {
5965
- className: "sia-table__cell-content",
5996
+ ellipsis: column.ellipsis !== false,
5966
5997
  title: column.showTitle !== false && column.ellipsis !== false && typeof value === "string" ? value : void 0,
5967
5998
  children: pluginCellProps.content !== void 0 ? pluginCellProps.content : column.render ? column.render(value, row.record, row.sourceIndex, { row, rowIndex, column }) : value
5968
5999
  }
@@ -6002,30 +6033,33 @@ function TableInner(props, ref) {
6002
6033
  style,
6003
6034
  ...htmlProps
6004
6035
  } = props;
6005
- const rootRef = useRef13(null);
6006
- const scrollRef = useRef13(null);
6007
- const tableRef = useRef13(null);
6008
- const scrollbarDragRef = useRef13(null);
6009
- const [internalLoading, setInternalLoading] = useState16(false);
6010
- const [scrollTop, setScrollTop] = useState16(0);
6011
- const [viewportHeight, setViewportHeight] = useState16(420);
6012
- const [viewportWidth, setViewportWidth] = useState16(0);
6013
- const [autoColumnWidths, setAutoColumnWidths] = useState16({});
6036
+ const rootRef = useRef14(null);
6037
+ const scrollRef = useRef14(null);
6038
+ const tableRef = useRef14(null);
6039
+ const scrollbarDragRef = useRef14(null);
6040
+ const [internalLoading, setInternalLoading] = useState17(false);
6041
+ const [scrollTop, setScrollTop] = useState17(0);
6042
+ const [viewportHeight, setViewportHeight] = useState17(420);
6043
+ const [viewportWidth, setViewportWidth] = useState17(0);
6044
+ const [autoColumnWidths, setAutoColumnWidths] = useState17({});
6014
6045
  const getRowKey = useCallback2((record, index) => typeof rowKey === "function" ? rowKey(record, index) : record[String(rowKey)] ?? index, [rowKey]);
6015
6046
  const builtInResizePlugin = useMemo9(() => createResizePlugin(), []);
6047
+ const builtInHighlightPlugin = useMemo9(() => createHighlightPlugin(), []);
6016
6048
  const activePlugins = useMemo9(() => {
6017
6049
  const plugins = providedPlugins.filter((plugin) => resizable || plugin.id !== "resize");
6018
- return resizable && !plugins.some((plugin) => plugin.id === "resize") ? [...plugins, builtInResizePlugin] : plugins;
6019
- }, [builtInResizePlugin, providedPlugins, resizable]);
6050
+ if (!plugins.some((plugin) => plugin.id === "highlight")) plugins.push(builtInHighlightPlugin);
6051
+ if (resizable && !plugins.some((plugin) => plugin.id === "resize")) plugins.push(builtInResizePlugin);
6052
+ return plugins;
6053
+ }, [builtInHighlightPlugin, builtInResizePlugin, providedPlugins, resizable]);
6020
6054
  const sortedPlugins = useMemo9(() => [...activePlugins].sort((a, b) => (a.order ?? 100) - (b.order ?? 100)), [activePlugins]);
6021
- const pluginsByIdRef = useRef13(/* @__PURE__ */ new Map());
6055
+ const pluginsByIdRef = useRef14(/* @__PURE__ */ new Map());
6022
6056
  pluginsByIdRef.current = new Map(sortedPlugins.map((plugin) => [plugin.id, plugin]));
6023
- const [pluginStates, setPluginStates] = useState16(() => Object.fromEntries(
6057
+ const [pluginStates, setPluginStates] = useState17(() => Object.fromEntries(
6024
6058
  sortedPlugins.map((plugin) => [plugin.id, resolveInitialState(plugin)])
6025
6059
  ));
6026
- const pluginApisRef = useRef13({});
6027
- const contextsRef = useRef13(/* @__PURE__ */ new Map());
6028
- const mountedPluginsRef = useRef13(/* @__PURE__ */ new Map());
6060
+ const pluginApisRef = useRef14({});
6061
+ const contextsRef = useRef14(/* @__PURE__ */ new Map());
6062
+ const mountedPluginsRef = useRef14(/* @__PURE__ */ new Map());
6029
6063
  const pipeline = { columns: baseColumns, rows: createTableRows(dataSource, getRowKey) };
6030
6064
  const nextApis = {};
6031
6065
  const contexts = /* @__PURE__ */ new Map();
@@ -6221,20 +6255,20 @@ function TableInner(props, ref) {
6221
6255
  const bottomSpacer = shouldVirtualize ? Math.max(0, (pipeline.rows.length - endIndex) * rowHeight) : 0;
6222
6256
  const toolbarStart = sortedPlugins.map((plugin) => {
6223
6257
  const content = plugin.renderToolbarStart?.(getContext(plugin));
6224
- return content ? /* @__PURE__ */ jsx20(Fragment7, { children: content }, `toolbar-start-${plugin.id}`) : null;
6258
+ return content ? /* @__PURE__ */ jsx21(Fragment7, { children: content }, `toolbar-start-${plugin.id}`) : null;
6225
6259
  }).filter(Boolean);
6226
6260
  const toolbarEnd = sortedPlugins.map((plugin) => {
6227
6261
  const content = plugin.renderToolbarEnd?.(getContext(plugin));
6228
- return content ? /* @__PURE__ */ jsx20(Fragment7, { children: content }, `toolbar-end-${plugin.id}`) : null;
6262
+ return content ? /* @__PURE__ */ jsx21(Fragment7, { children: content }, `toolbar-end-${plugin.id}`) : null;
6229
6263
  }).filter(Boolean);
6230
6264
  const summaries = sortedPlugins.flatMap((plugin) => plugin.renderSummary?.(getContext(plugin)) ?? []);
6231
6265
  const footers = sortedPlugins.map((plugin) => {
6232
6266
  const content = plugin.renderFooter?.(getContext(plugin));
6233
- return content ? /* @__PURE__ */ jsx20(Fragment7, { children: content }, `footer-${plugin.id}`) : null;
6267
+ return content ? /* @__PURE__ */ jsx21(Fragment7, { children: content }, `footer-${plugin.id}`) : null;
6234
6268
  }).filter(Boolean);
6235
6269
  const overlays = sortedPlugins.map((plugin) => {
6236
6270
  const content = plugin.renderOverlay?.(getContext(plugin));
6237
- return content ? /* @__PURE__ */ jsx20(Fragment7, { children: content }, `overlay-${plugin.id}`) : null;
6271
+ return content ? /* @__PURE__ */ jsx21(Fragment7, { children: content }, `overlay-${plugin.id}`) : null;
6238
6272
  }).filter(Boolean);
6239
6273
  const hasToolbar = toolbarStart.length > 0 || toolbarEnd.length > 0;
6240
6274
  const effectiveHeight = height ?? tableHeight ?? (shouldVirtualize ? 420 : void 0);
@@ -6321,8 +6355,8 @@ function TableInner(props, ref) {
6321
6355
  function renderHeaderContent(column, content) {
6322
6356
  if (column.description === void 0 || column.description === null) return content;
6323
6357
  return /* @__PURE__ */ jsxs20("span", { className: "sia-table__header-label", children: [
6324
- /* @__PURE__ */ jsx20("span", { className: "sia-table__header-label-content", children: content }),
6325
- /* @__PURE__ */ jsx20(Tooltip, { title: column.description, placement: "top", trigger: ["hover", "focus"], children: /* @__PURE__ */ jsx20("button", { type: "button", className: "sia-table__header-description", "aria-label": `${column.name ?? column.key}\u5217\u8BF4\u660E`, onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ jsx20(Icon, { name: "info", size: 14 }) }) })
6358
+ /* @__PURE__ */ jsx21("span", { className: "sia-table__header-label-content", children: content }),
6359
+ /* @__PURE__ */ jsx21(Tooltip, { title: column.description, placement: "top", trigger: ["hover", "focus"], children: /* @__PURE__ */ jsx21("button", { type: "button", className: "sia-table__header-description", "aria-label": `${column.name ?? column.key}\u5217\u8BF4\u660E`, onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ jsx21(Icon, { name: "info", size: 14 }) }) })
6326
6360
  ] });
6327
6361
  }
6328
6362
  function getPluginCellProps(row, column) {
@@ -6352,13 +6386,13 @@ function TableInner(props, ref) {
6352
6386
  }
6353
6387
  function renderSummaryRow(summary) {
6354
6388
  let labelRendered = false;
6355
- return /* @__PURE__ */ jsx20("tr", { className: `sia-table__summary-row ${summary.className ?? ""}`.trim(), children: leafColumns.map((column) => {
6389
+ return /* @__PURE__ */ jsx21("tr", { className: `sia-table__summary-row ${summary.className ?? ""}`.trim(), children: leafColumns.map((column) => {
6356
6390
  const value = summary.values[column.key];
6357
6391
  const content = value !== void 0 ? value : !labelRendered && summary.label !== void 0 ? (labelRendered = true, summary.label) : null;
6358
6392
  const fixed = normalizeFixed(column.fixed);
6359
6393
  const fixedEdgeClass = fixed === "left" && column.key === leftFixedEdgeKey ? " sia-table__cell--fixed-left-edge" : fixed === "right" && column.key === rightFixedEdgeKey ? " sia-table__cell--fixed-right-edge" : "";
6360
6394
  const autoWidthClass = column.autoWidth ? " sia-table__cell--auto-width" : "";
6361
- return /* @__PURE__ */ jsx20("td", { "data-column-key": column.key, className: `sia-table__cell sia-table__summary-cell${fixed ? ` sia-table__cell--fixed sia-table__cell--fixed-${fixed}` : ""}${fixedEdgeClass}${autoWidthClass}`, style: getFixedStyle(column), children: content }, column.key);
6395
+ return /* @__PURE__ */ jsx21("td", { "data-column-key": column.key, className: `sia-table__cell sia-table__summary-cell${fixed ? ` sia-table__cell--fixed sia-table__cell--fixed-${fixed}` : ""}${fixedEdgeClass}${autoWidthClass}`, style: getFixedStyle(column), children: content }, column.key);
6362
6396
  }) }, summary.key);
6363
6397
  }
6364
6398
  return /* @__PURE__ */ jsxs20(
@@ -6374,21 +6408,22 @@ function TableInner(props, ref) {
6374
6408
  ...htmlProps,
6375
6409
  children: [
6376
6410
  hasToolbar ? /* @__PURE__ */ jsxs20("div", { className: "sia-table__toolbar", children: [
6377
- /* @__PURE__ */ jsx20("div", { children: toolbarStart }),
6378
- /* @__PURE__ */ jsx20("div", { children: toolbarEnd })
6411
+ /* @__PURE__ */ jsx21("div", { children: toolbarStart }),
6412
+ /* @__PURE__ */ jsx21("div", { children: toolbarEnd })
6379
6413
  ] }) : null,
6380
6414
  /* @__PURE__ */ jsxs20("div", { className: "sia-table__viewport-wrap", children: [
6381
- /* @__PURE__ */ jsx20("div", { className: "sia-table__viewport", ref: scrollRef, onScroll: handleScroll, children: /* @__PURE__ */ jsxs20("table", { ref: tableRef, className: "sia-table__element", style: { width: Math.max(totalWidth, 1), ...manualColumnLayout ? { minWidth: 0 } : {}, ...tableStyle }, children: [
6382
- /* @__PURE__ */ jsx20("colgroup", { children: leafColumns.map((column) => /* @__PURE__ */ jsx20("col", { "data-column-key": column.key, style: { width: columnWidths.get(column.key) ?? DEFAULT_WIDTH } }, column.key)) }),
6383
- /* @__PURE__ */ jsx20("thead", { className: stickyHeader ? "sia-table__head sia-table__head--sticky" : "sia-table__head", children: headerRows.map((headerRow, depth) => /* @__PURE__ */ jsx20("tr", { children: headerRow.map((cell) => {
6415
+ /* @__PURE__ */ jsx21("div", { className: "sia-table__viewport", ref: scrollRef, onScroll: handleScroll, children: /* @__PURE__ */ jsxs20("table", { ref: tableRef, className: "sia-table__element", style: { width: Math.max(totalWidth, 1), ...manualColumnLayout ? { minWidth: 0 } : {}, ...tableStyle }, children: [
6416
+ /* @__PURE__ */ jsx21("colgroup", { children: leafColumns.map((column) => /* @__PURE__ */ jsx21("col", { "data-column-key": column.key, style: { width: columnWidths.get(column.key) ?? DEFAULT_WIDTH } }, column.key)) }),
6417
+ /* @__PURE__ */ jsx21("thead", { className: stickyHeader ? "sia-table__head sia-table__head--sticky" : "sia-table__head", children: headerRows.map((headerRow, depth) => /* @__PURE__ */ jsx21("tr", { children: headerRow.map((cell) => {
6384
6418
  const fixed = cell.leaf ? normalizeFixed(cell.column.fixed) : void 0;
6385
6419
  const pluginHeaderProps = getPluginHeaderCellProps(cell.column);
6386
6420
  const fixedEdgeClass = fixed === "left" && cell.column.key === leftFixedEdgeKey ? " sia-table__cell--fixed-left-edge" : fixed === "right" && cell.column.key === rightFixedEdgeKey ? " sia-table__cell--fixed-right-edge" : "";
6387
6421
  const autoWidthClass = cell.column.autoWidth ? " sia-table__cell--auto-width" : "";
6388
- return /* @__PURE__ */ jsx20(
6422
+ return /* @__PURE__ */ jsx21(
6389
6423
  "th",
6390
6424
  {
6391
6425
  "data-column-key": cell.column.key,
6426
+ "data-last-leaf-column": cell.leaf && cell.column.key === leafColumns[leafColumns.length - 1]?.key || void 0,
6392
6427
  colSpan: cell.colSpan,
6393
6428
  rowSpan: cell.rowSpan,
6394
6429
  className: `sia-table__header-cell sia-table__cell--${cell.column.align ?? "left"}${fixed ? ` sia-table__cell--fixed sia-table__cell--fixed-${fixed}` : ""}${fixedEdgeClass}${autoWidthClass} ${cell.column.headerClassName ?? ""} ${pluginHeaderProps.className ?? ""}`.trim(),
@@ -6406,12 +6441,12 @@ function TableInner(props, ref) {
6406
6441
  );
6407
6442
  }) }, depth)) }),
6408
6443
  /* @__PURE__ */ jsxs20("tbody", { children: [
6409
- topSpacer > 0 ? /* @__PURE__ */ jsx20("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx20("td", { colSpan: leafColumns.length, style: { height: topSpacer, padding: 0, border: 0 } }) }) : null,
6444
+ topSpacer > 0 ? /* @__PURE__ */ jsx21("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx21("td", { colSpan: leafColumns.length, style: { height: topSpacer, padding: 0, border: 0 } }) }) : null,
6410
6445
  renderedRows.map((row, offset) => {
6411
6446
  const rowIndex = startIndex + offset;
6412
6447
  const pluginClasses = sortedPlugins.map((plugin) => plugin.getRowClassName?.(row, getContext(plugin))).filter(Boolean).join(" ");
6413
6448
  const customClass = typeof rowClassName === "function" ? rowClassName(row.record, row.sourceIndex) : rowClassName ?? "";
6414
- return /* @__PURE__ */ jsx20(
6449
+ return /* @__PURE__ */ jsx21(
6415
6450
  TableBodyRow,
6416
6451
  {
6417
6452
  row,
@@ -6458,12 +6493,12 @@ function TableInner(props, ref) {
6458
6493
  row.key
6459
6494
  );
6460
6495
  }),
6461
- bottomSpacer > 0 ? /* @__PURE__ */ jsx20("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx20("td", { colSpan: leafColumns.length, style: { height: bottomSpacer, padding: 0, border: 0 } }) }) : null
6496
+ bottomSpacer > 0 ? /* @__PURE__ */ jsx21("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx21("td", { colSpan: leafColumns.length, style: { height: bottomSpacer, padding: 0, border: 0 } }) }) : null
6462
6497
  ] }),
6463
- summaries.length > 0 ? /* @__PURE__ */ jsx20("tfoot", { className: "sia-table__summary", children: summaries.map(renderSummaryRow) }) : null
6498
+ summaries.length > 0 ? /* @__PURE__ */ jsx21("tfoot", { className: "sia-table__summary", children: summaries.map(renderSummaryRow) }) : null
6464
6499
  ] }) }),
6465
- pipeline.rows.length === 0 ? /* @__PURE__ */ jsx20("div", { className: "sia-table__empty", role: "status", children: emptyText }) : null,
6466
- /* @__PURE__ */ jsx20("div", { className: "sia-table__scrollbar sia-table__scrollbar--horizontal", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(
6500
+ pipeline.rows.length === 0 ? /* @__PURE__ */ jsx21("div", { className: "sia-table__empty", role: "status", children: emptyText }) : null,
6501
+ /* @__PURE__ */ jsx21("div", { className: "sia-scrollbar-track sia-table__scrollbar sia-table__scrollbar--horizontal", "aria-hidden": "true", children: /* @__PURE__ */ jsx21(
6467
6502
  "div",
6468
6503
  {
6469
6504
  className: "sia-table__scrollbar-thumb",
@@ -6473,7 +6508,7 @@ function TableInner(props, ref) {
6473
6508
  onPointerCancel: handleScrollbarPointerEnd
6474
6509
  }
6475
6510
  ) }),
6476
- /* @__PURE__ */ jsx20("div", { className: "sia-table__scrollbar sia-table__scrollbar--vertical", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(
6511
+ /* @__PURE__ */ jsx21("div", { className: "sia-scrollbar-track sia-table__scrollbar sia-table__scrollbar--vertical", "aria-hidden": "true", children: /* @__PURE__ */ jsx21(
6477
6512
  "div",
6478
6513
  {
6479
6514
  className: "sia-table__scrollbar-thumb",
@@ -6484,10 +6519,10 @@ function TableInner(props, ref) {
6484
6519
  }
6485
6520
  ) })
6486
6521
  ] }),
6487
- footers.length > 0 ? /* @__PURE__ */ jsx20("div", { className: "sia-table__footer", children: footers }) : null,
6522
+ footers.length > 0 ? /* @__PURE__ */ jsx21("div", { className: "sia-table__footer", children: footers }) : null,
6488
6523
  loading || internalLoading ? /* @__PURE__ */ jsxs20("div", { className: "sia-table__loading", role: "status", children: [
6489
- /* @__PURE__ */ jsx20(Icon, { name: "loader", size: 22, spin: true }),
6490
- /* @__PURE__ */ jsx20("span", { children: "\u52A0\u8F7D\u4E2D" })
6524
+ /* @__PURE__ */ jsx21(Icon, { name: "loader", size: 22, spin: true }),
6525
+ /* @__PURE__ */ jsx21("span", { children: "\u52A0\u8F7D\u4E2D" })
6491
6526
  ] }) : null,
6492
6527
  overlays
6493
6528
  ]
@@ -6498,7 +6533,7 @@ var Table = forwardRef5(TableInner);
6498
6533
 
6499
6534
  // src/components/ThemeSwitch.tsx
6500
6535
  import { forwardRef as forwardRef6 } from "react";
6501
- import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
6536
+ import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
6502
6537
  var ThemeSwitch = forwardRef6(function ThemeSwitch2({
6503
6538
  checked,
6504
6539
  onCheckedChange,
@@ -6524,12 +6559,12 @@ var ThemeSwitch = forwardRef6(function ThemeSwitch2({
6524
6559
  onClick: handleClick,
6525
6560
  ...props,
6526
6561
  children: [
6527
- /* @__PURE__ */ jsx21("span", { className: "sia-theme-switch__selection", "aria-hidden": "true" }),
6528
- /* @__PURE__ */ jsx21("span", { className: `sia-theme-switch__icon${checked ? "" : " is-active"}`, "aria-hidden": "true", children: /* @__PURE__ */ jsxs21("svg", { viewBox: "0 0 24 24", children: [
6529
- /* @__PURE__ */ jsx21("circle", { cx: "12", cy: "12", r: "3.5" }),
6530
- /* @__PURE__ */ jsx21("path", { d: "M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M18.7 5.3l-1.4 1.4M6.7 17.3l-1.4 1.4" })
6562
+ /* @__PURE__ */ jsx22("span", { className: "sia-theme-switch__selection", "aria-hidden": "true" }),
6563
+ /* @__PURE__ */ jsx22("span", { className: `sia-theme-switch__icon${checked ? "" : " is-active"}`, "aria-hidden": "true", children: /* @__PURE__ */ jsxs21("svg", { viewBox: "0 0 24 24", children: [
6564
+ /* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "3.5" }),
6565
+ /* @__PURE__ */ jsx22("path", { d: "M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M18.7 5.3l-1.4 1.4M6.7 17.3l-1.4 1.4" })
6531
6566
  ] }) }),
6532
- /* @__PURE__ */ jsx21("span", { className: `sia-theme-switch__icon${checked ? " is-active" : ""}`, "aria-hidden": "true", children: /* @__PURE__ */ jsx21("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx21("path", { d: "M20 15.2A8 8 0 0 1 8.8 4 8.5 8.5 0 1 0 20 15.2Z" }) }) })
6567
+ /* @__PURE__ */ jsx22("span", { className: `sia-theme-switch__icon${checked ? " is-active" : ""}`, "aria-hidden": "true", children: /* @__PURE__ */ jsx22("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx22("path", { d: "M20 15.2A8 8 0 0 1 8.8 4 8.5 8.5 0 1 0 20 15.2Z" }) }) })
6533
6568
  ]
6534
6569
  }
6535
6570
  );
@@ -6591,7 +6626,7 @@ function visibleRect(target) {
6591
6626
  function createTrack(axis) {
6592
6627
  const track = document.createElement("div");
6593
6628
  const thumb = document.createElement("div");
6594
- track.className = `sia-floating-scrollbar sia-floating-scrollbar--${axis}`;
6629
+ track.className = `sia-scrollbar-track sia-floating-scrollbar sia-floating-scrollbar--${axis}`;
6595
6630
  thumb.className = "sia-floating-scrollbar__thumb";
6596
6631
  track.dataset.axis = axis;
6597
6632
  track.setAttribute("aria-hidden", "true");
@@ -6868,8 +6903,8 @@ function applySiaTheme(mode, target = document.documentElement) {
6868
6903
  }
6869
6904
 
6870
6905
  // src/components/SelectionPanel.tsx
6871
- import { useEffect as useEffect14, useId as useId7, useMemo as useMemo10, useRef as useRef14, useState as useState17 } from "react";
6872
- import { jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
6906
+ import { useEffect as useEffect14, useId as useId7, useMemo as useMemo10, useRef as useRef15, useState as useState18 } from "react";
6907
+ import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
6873
6908
  function SelectionPanel({
6874
6909
  options,
6875
6910
  value,
@@ -6887,11 +6922,11 @@ function SelectionPanel({
6887
6922
  maxHeight = 250,
6888
6923
  autoFocusSearch = false
6889
6924
  }) {
6890
- const [localSearch, setLocalSearch] = useState17("");
6925
+ const [localSearch, setLocalSearch] = useState18("");
6891
6926
  const search = searchValue ?? localSearch;
6892
- const [scrollTop, setScrollTop] = useState17(0);
6893
- const [active, setActive] = useState17();
6894
- const listRef = useRef14(null);
6927
+ const [scrollTop, setScrollTop] = useState18(0);
6928
+ const [active, setActive] = useState18();
6929
+ const listRef = useRef15(null);
6895
6930
  const id = useId7();
6896
6931
  const selected = useMemo10(() => new Set(value), [value]);
6897
6932
  const count = Math.max(1, Math.floor(columns));
@@ -6951,7 +6986,7 @@ function SelectionPanel({
6951
6986
  onChange([...retained, ...add]);
6952
6987
  }
6953
6988
  return /* @__PURE__ */ jsxs22("div", { className: "sia-selection-panel", children: [
6954
- showSearch && /* @__PURE__ */ jsx22(
6989
+ showSearch && /* @__PURE__ */ jsx23(
6955
6990
  Input,
6956
6991
  {
6957
6992
  "aria-label": "\u641C\u7D22\u9009\u9879",
@@ -6966,16 +7001,16 @@ function SelectionPanel({
6966
7001
  }
6967
7002
  ),
6968
7003
  multiple && /* @__PURE__ */ jsxs22("div", { className: "sia-selection-panel__actions", children: [
6969
- /* @__PURE__ */ jsx22(Button, { variant: "link", size: "small", disabled: disabled || loading || !enabled.length, onClick: () => batch("all"), children: "\u5168\u9009" }),
6970
- /* @__PURE__ */ jsx22(Button, { variant: "link", size: "small", disabled: disabled || loading || !enabled.length, onClick: () => batch("invert"), children: "\u53CD\u9009" }),
6971
- /* @__PURE__ */ jsx22(Button, { variant: "link", size: "small", disabled: disabled || loading || !value.length, onClick: () => batch("clear"), children: "\u6E05\u7A7A" }),
7004
+ /* @__PURE__ */ jsx23(Button, { variant: "link", size: "small", disabled: disabled || loading || !enabled.length, onClick: () => batch("all"), children: "\u5168\u9009" }),
7005
+ /* @__PURE__ */ jsx23(Button, { variant: "link", size: "small", disabled: disabled || loading || !enabled.length, onClick: () => batch("invert"), children: "\u53CD\u9009" }),
7006
+ /* @__PURE__ */ jsx23(Button, { variant: "link", size: "small", disabled: disabled || loading || !value.length, onClick: () => batch("clear"), children: "\u6E05\u7A7A" }),
6972
7007
  /* @__PURE__ */ jsxs22("span", { children: [
6973
7008
  "\u5DF2\u9009 ",
6974
7009
  value.length,
6975
7010
  " \u9879"
6976
7011
  ] })
6977
7012
  ] }),
6978
- /* @__PURE__ */ jsx22(
7013
+ /* @__PURE__ */ jsx23(
6979
7014
  "div",
6980
7015
  {
6981
7016
  ref: listRef,
@@ -7005,12 +7040,12 @@ function SelectionPanel({
7005
7040
  toggle(enabled[index]);
7006
7041
  }
7007
7042
  },
7008
- children: loading ? /* @__PURE__ */ jsx22("div", { role: "status", children: "\u52A0\u8F7D\u4E2D\u2026" }) : !rows.length ? /* @__PURE__ */ jsx22("div", { className: "sia-selection-panel__empty", children: "\u6682\u65E0\u5339\u914D\u9009\u9879" }) : /* @__PURE__ */ jsx22("div", { style: { height: totalHeight, position: "relative" }, children: renderedRows.map((row) => /* @__PURE__ */ jsx22(
7043
+ children: loading ? /* @__PURE__ */ jsx23("div", { role: "status", children: "\u52A0\u8F7D\u4E2D\u2026" }) : !rows.length ? /* @__PURE__ */ jsx23("div", { className: "sia-selection-panel__empty", children: "\u6682\u65E0\u5339\u914D\u9009\u9879" }) : /* @__PURE__ */ jsx23("div", { style: { height: totalHeight, position: "relative" }, children: renderedRows.map((row) => /* @__PURE__ */ jsx23(
7009
7044
  "div",
7010
7045
  {
7011
7046
  className: row.title !== void 0 ? "sia-selection-panel__group" : "sia-selection-panel__row",
7012
7047
  style: { position: "absolute", top: row.top, height: row.height, width: "100%", gridTemplateColumns: `repeat(${count}, minmax(0, 1fr))` },
7013
- children: row.title ?? row.items?.map((option, index) => option.optionType === "divider" ? /* @__PURE__ */ jsx22("div", { role: "separator", className: "sia-selection-panel__divider" }, `divider-${index}`) : /* @__PURE__ */ jsx22(Tooltip, { title: option.disabled ? option.disabledTip : void 0, placement: "right", children: /* @__PURE__ */ jsxs22(
7048
+ children: row.title ?? row.items?.map((option, index) => option.optionType === "divider" ? /* @__PURE__ */ jsx23("div", { role: "separator", className: "sia-selection-panel__divider" }, `divider-${index}`) : /* @__PURE__ */ jsx23(Tooltip, { title: option.disabled ? option.disabledTip : void 0, placement: "right", children: /* @__PURE__ */ jsxs22(
7014
7049
  "button",
7015
7050
  {
7016
7051
  type: "button",
@@ -7022,10 +7057,10 @@ function SelectionPanel({
7022
7057
  className: `sia-selection-panel__option${active === option.value ? " is-active" : ""}`,
7023
7058
  onClick: () => toggle(option),
7024
7059
  children: [
7025
- multiple && /* @__PURE__ */ jsx22("span", { "aria-hidden": "true", className: "sia-selection-panel__check", children: selected.has(option.value) ? "\u2713" : "" }),
7060
+ multiple && /* @__PURE__ */ jsx23("span", { "aria-hidden": "true", className: "sia-selection-panel__check", children: selected.has(option.value) ? "\u2713" : "" }),
7026
7061
  /* @__PURE__ */ jsxs22("span", { className: "sia-selection-panel__text", children: [
7027
7062
  showValue || displayField === "label" ? option.label : String(option.value),
7028
- showValue && /* @__PURE__ */ jsx22("small", { children: String(option.value) })
7063
+ showValue && /* @__PURE__ */ jsx23("small", { children: String(option.value) })
7029
7064
  ] })
7030
7065
  ]
7031
7066
  }
@@ -7039,8 +7074,8 @@ function SelectionPanel({
7039
7074
  }
7040
7075
 
7041
7076
  // src/components/InputSelect.tsx
7042
- import { forwardRef as forwardRef7, useEffect as useEffect15, useRef as useRef15, useState as useState18 } from "react";
7043
- import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
7077
+ import { forwardRef as forwardRef7, useEffect as useEffect15, useRef as useRef16, useState as useState19 } from "react";
7078
+ import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
7044
7079
  var InputSelect = forwardRef7(function InputSelect2({
7045
7080
  options,
7046
7081
  value,
@@ -7050,6 +7085,7 @@ var InputSelect = forwardRef7(function InputSelect2({
7050
7085
  displayField = "label",
7051
7086
  showValue = false,
7052
7087
  placeholder = "\u8BF7\u9009\u62E9",
7088
+ placeholderMode,
7053
7089
  size = "medium",
7054
7090
  status,
7055
7091
  disabled = false,
@@ -7065,22 +7101,22 @@ var InputSelect = forwardRef7(function InputSelect2({
7065
7101
  onOpenChange,
7066
7102
  ...inputProps
7067
7103
  }, forwardedRef) {
7068
- const [internal, setInternal] = useState18(defaultValue);
7104
+ const [internal, setInternal] = useState19(defaultValue);
7069
7105
  const current = value !== void 0 ? value : internal;
7070
7106
  const values = current == null ? [] : Array.isArray(current) ? current : [current];
7071
7107
  const text = values.map((item) => displayField === "label" ? String(options.find((option) => option.optionType !== "divider" && option.value === item)?.label ?? item) : String(item)).join(",");
7072
- const [draft, setDraft] = useState18(text);
7108
+ const [draft, setDraft] = useState19(text);
7073
7109
  useEffect15(() => {
7074
7110
  setDraft(text);
7075
7111
  }, [text, current]);
7076
- const [open, setOpen] = useState18(false);
7077
- const [search, setSearch] = useState18("");
7078
- const [modalOpen, setModalOpen] = useState18(false);
7079
- const [modalValues, setModalValues] = useState18([]);
7080
- const [selectedOnly, setSelectedOnly] = useState18(false);
7081
- const rootRef = useRef15(null);
7082
- const popupRef = useRef15(null);
7083
- const inputRef = useRef15(null);
7112
+ const [open, setOpen] = useState19(false);
7113
+ const [search, setSearch] = useState19("");
7114
+ const [modalOpen, setModalOpen] = useState19(false);
7115
+ const [modalValues, setModalValues] = useState19([]);
7116
+ const [selectedOnly, setSelectedOnly] = useState19(false);
7117
+ const rootRef = useRef16(null);
7118
+ const popupRef = useRef16(null);
7119
+ const inputRef = useRef16(null);
7084
7120
  const config = typeof enableModal === "object" ? enableModal : {};
7085
7121
  function changeOpen(next) {
7086
7122
  if (next && (disabled || loading)) return;
@@ -7121,14 +7157,14 @@ var InputSelect = forwardRef7(function InputSelect2({
7121
7157
  setSelectedOnly(false);
7122
7158
  setModalOpen(true);
7123
7159
  }
7124
- return /* @__PURE__ */ jsxs23("div", { ref: rootRef, style, className: `sia-input-select ${className}`, onKeyDown: (event) => {
7160
+ return /* @__PURE__ */ jsxs23("div", { ref: rootRef, style, className: `sia-input-select${open || modalOpen ? " is-open" : ""} ${className}`, onKeyDown: (event) => {
7125
7161
  if (event.key === "Escape" && open) {
7126
7162
  event.stopPropagation();
7127
7163
  changeOpen(false);
7128
7164
  inputRef.current?.focus();
7129
7165
  }
7130
7166
  }, children: [
7131
- /* @__PURE__ */ jsx23(
7167
+ /* @__PURE__ */ jsx24(
7132
7168
  Input,
7133
7169
  {
7134
7170
  ...inputProps,
@@ -7146,6 +7182,7 @@ var InputSelect = forwardRef7(function InputSelect2({
7146
7182
  disabled,
7147
7183
  readOnly: displayField === "label" || loading,
7148
7184
  placeholder,
7185
+ placeholderMode,
7149
7186
  value: draft,
7150
7187
  maxLength: inputMaxLength && inputMaxLength > 0 ? inputMaxLength : void 0,
7151
7188
  showCount: !!inputMaxLength && inputMaxLength > 0,
@@ -7165,25 +7202,25 @@ var InputSelect = forwardRef7(function InputSelect2({
7165
7202
  changeOpen(true);
7166
7203
  },
7167
7204
  suffix: /* @__PURE__ */ jsxs23("span", { className: "sia-input-select__suffix", children: [
7168
- allowClear && draft && !disabled && /* @__PURE__ */ jsx23(Button, { variant: "text", size: "small", disabled: loading, "aria-label": "\u6E05\u9664\u8F93\u5165\u9009\u62E9", onClick: (event) => {
7205
+ allowClear && draft && !disabled && /* @__PURE__ */ jsx24(Button, { variant: "text", size: "small", disabled: loading, "aria-label": "\u6E05\u9664\u8F93\u5165\u9009\u62E9", onClick: (event) => {
7169
7206
  event.stopPropagation();
7170
7207
  setDraft("");
7171
7208
  emit(multiple ? [] : void 0);
7172
7209
  inputRef.current?.focus();
7173
7210
  }, children: "\xD7" }),
7174
7211
  suffix,
7175
- enableModal && /* @__PURE__ */ jsx23(Button, { variant: "text", size: "small", disabled: disabled || loading, "aria-label": "\u6253\u5F00\u9009\u62E9\u5F39\u7A97", onClick: (event) => {
7212
+ enableModal && /* @__PURE__ */ jsx24(Button, { variant: "text", size: "small", disabled: disabled || loading, "aria-label": "\u6253\u5F00\u9009\u62E9\u5F39\u7A97", onClick: (event) => {
7176
7213
  event.stopPropagation();
7177
7214
  openModal();
7178
7215
  }, children: "\u2026" }),
7179
- /* @__PURE__ */ jsx23(Button, { variant: "text", size: "small", disabled: disabled || loading, "aria-label": "\u5C55\u5F00\u9009\u9879", onClick: (event) => {
7216
+ /* @__PURE__ */ jsx24(Button, { variant: "text", size: "small", disabled: disabled || loading, "aria-label": "\u5C55\u5F00\u9009\u9879", onClick: (event) => {
7180
7217
  event.stopPropagation();
7181
7218
  changeOpen(!open);
7182
- }, children: /* @__PURE__ */ jsx23(Icon, { name: loading ? "refresh" : open ? "chevron-up" : "chevron-down", size: 13 }) })
7219
+ }, children: /* @__PURE__ */ jsx24(Icon, { name: loading ? "refresh" : open ? "chevron-up" : "chevron-down", size: 13 }) })
7183
7220
  ] })
7184
7221
  }
7185
7222
  ),
7186
- /* @__PURE__ */ jsx23(PopupPortal, { ref: popupRef, anchorRef: rootRef, open: open && !disabled && !loading, className: "sia-input-select__popup", children: /* @__PURE__ */ jsx23(
7223
+ /* @__PURE__ */ jsx24(PopupPortal, { ref: popupRef, anchorRef: rootRef, open: open && !disabled && !loading, className: "sia-input-select__popup", children: /* @__PURE__ */ jsx24(
7187
7224
  SelectionPanel,
7188
7225
  {
7189
7226
  options,
@@ -7212,14 +7249,14 @@ var InputSelect = forwardRef7(function InputSelect2({
7212
7249
  },
7213
7250
  children: [
7214
7251
  /* @__PURE__ */ jsxs23("div", { className: "sia-selection-panel__actions", role: "tablist", "aria-label": "\u9009\u9879\u8303\u56F4", children: [
7215
- /* @__PURE__ */ jsx23(Button, { role: "tab", "aria-selected": !selectedOnly, variant: !selectedOnly ? "primary" : "text", onClick: () => setSelectedOnly(false), children: "\u5168\u90E8" }),
7252
+ /* @__PURE__ */ jsx24(Button, { role: "tab", "aria-selected": !selectedOnly, variant: !selectedOnly ? "primary" : "text", onClick: () => setSelectedOnly(false), children: "\u5168\u90E8" }),
7216
7253
  /* @__PURE__ */ jsxs23(Button, { role: "tab", "aria-selected": selectedOnly, variant: selectedOnly ? "primary" : "text", onClick: () => setSelectedOnly(true), children: [
7217
7254
  "\u5DF2\u9009\u9879(",
7218
7255
  modalValues.length,
7219
7256
  ")"
7220
7257
  ] })
7221
7258
  ] }),
7222
- modalOpen && /* @__PURE__ */ jsx23(
7259
+ modalOpen && /* @__PURE__ */ jsx24(
7223
7260
  SelectionPanel,
7224
7261
  {
7225
7262
  options,