@sia.soul/sia-react-ui 0.1.166 → 0.1.168

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-Dxevc0f6.d.cts → Select-BXL6JVj0.d.cts} +3 -1
  2. package/dist/{Select-tsENCXQI.d.ts → Select-xBynHOUn.d.ts} +3 -1
  3. package/dist/chart.cjs +4553 -4513
  4. package/dist/chart.d.cts +1850 -1843
  5. package/dist/chart.d.ts +1850 -1843
  6. package/dist/chart.js +1 -1
  7. package/dist/chunk-2FZI7TP6.js +0 -0
  8. package/dist/{chunk-T2F6X3LA.js → chunk-55MXRT55.js} +26 -22
  9. package/dist/{chunk-2EC653G5.js → chunk-5KTQXNGL.js} +2 -2
  10. package/dist/{chunk-NHGCGOF2.js → chunk-A7TLMWMM.js} +4754 -4714
  11. package/dist/{chunk-DKQ5UCN6.js → chunk-DQR7EPRA.js} +519 -220
  12. package/dist/{chunk-G5EJJFUI.js → chunk-FSO46WEJ.js} +14 -6
  13. package/dist/{chunk-SX4LLT3H.js → chunk-V4YT4LT5.js} +36 -29
  14. package/dist/{chunk-23FQ5ARA.js → chunk-XS7AVCHO.js} +27 -17
  15. package/dist/{core-Dy8NWJ1b.d.ts → core-BlCSI1Tm.d.ts} +7 -10
  16. package/dist/{core-Cnt8r6pj.d.cts → core-D_D7pOTq.d.cts} +7 -10
  17. package/dist/core.cjs +117 -88
  18. package/dist/core.css +3145 -5342
  19. package/dist/core.d.cts +2 -2
  20. package/dist/core.d.ts +2 -2
  21. package/dist/core.js +4 -4
  22. package/dist/game.cjs +14 -6
  23. package/dist/game.css +1658 -3131
  24. package/dist/game.js +1 -1
  25. package/dist/index.cjs +6684 -6237
  26. package/dist/index.css +8717 -8536
  27. package/dist/index.d.cts +137 -116
  28. package/dist/index.d.ts +137 -116
  29. package/dist/index.js +908 -828
  30. package/dist/markdown-editor.css +461 -0
  31. package/dist/markdown-editor.js +2 -1
  32. package/dist/rich-text-editor.cjs +38 -20
  33. package/dist/rich-text-editor.css +461 -0
  34. package/dist/rich-text-editor.js +4 -3
  35. package/dist/{select-date-range-E1N5-oXv.d.ts → select-date-range-C-29x2BA.d.ts} +7 -10
  36. package/dist/{select-date-range-BnlISSPV.d.cts → select-date-range-CewOaLtk.d.cts} +7 -10
  37. package/dist/select-date-range.cjs +563 -249
  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 +4 -4
  41. package/package.json +5 -1
  42. /package/dist/{chunk-V4I32DPL.js → chunk-GKWSCL5Q.js} +0 -0
package/dist/core.cjs CHANGED
@@ -2864,7 +2864,7 @@ var placementMap = {
2864
2864
  topLeft: "top-start",
2865
2865
  topRight: "top-end"
2866
2866
  };
2867
- function DropdownInternal({
2867
+ var DropdownInternal = (0, import_react13.forwardRef)(function DropdownInternal2({
2868
2868
  popupAnchorRef,
2869
2869
  menu,
2870
2870
  children,
@@ -2889,8 +2889,13 @@ function DropdownInternal({
2889
2889
  onContextMenu,
2890
2890
  onKeyDown,
2891
2891
  ...props
2892
- }) {
2892
+ }, forwardedRef) {
2893
2893
  const rootRef = (0, import_react13.useRef)(null);
2894
+ function setRootRef(node) {
2895
+ rootRef.current = node;
2896
+ if (typeof forwardedRef === "function") forwardedRef(node);
2897
+ else if (forwardedRef) forwardedRef.current = node;
2898
+ }
2894
2899
  const contextAnchorRef = (0, import_react13.useRef)(null);
2895
2900
  const popupRef = (0, import_react13.useRef)(null);
2896
2901
  const menuListRef = (0, import_react13.useRef)(null);
@@ -3042,7 +3047,7 @@ function DropdownInternal({
3042
3047
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
3043
3048
  "span",
3044
3049
  {
3045
- ref: rootRef,
3050
+ ref: setRootRef,
3046
3051
  className: `sia-dropdown${visible ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(),
3047
3052
  "aria-expanded": visible,
3048
3053
  "aria-haspopup": "menu",
@@ -3098,11 +3103,11 @@ function DropdownInternal({
3098
3103
  ]
3099
3104
  }
3100
3105
  );
3101
- }
3102
- function DropdownRoot(props) {
3103
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownInternal, { ...props });
3104
- }
3105
- function DropdownButton({
3106
+ });
3107
+ var DropdownRoot = (0, import_react13.forwardRef)(function Dropdown(props, forwardedRef) {
3108
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownInternal, { ref: forwardedRef, ...props });
3109
+ });
3110
+ var DropdownButton = (0, import_react13.forwardRef)(function DropdownButton2({
3106
3111
  children,
3107
3112
  className = "",
3108
3113
  buttonProps,
@@ -3112,9 +3117,14 @@ function DropdownButton({
3112
3117
  dropdownDisabled,
3113
3118
  trigger = ["click"],
3114
3119
  ...dropdownProps
3115
- }) {
3120
+ }, forwardedRef) {
3116
3121
  const groupRef = (0, import_react13.useRef)(null);
3117
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { ref: groupRef, className: `sia-dropdown-button ${className}`.trim(), children: [
3122
+ function setGroupRef(node) {
3123
+ groupRef.current = node;
3124
+ if (typeof forwardedRef === "function") forwardedRef(node);
3125
+ else if (forwardedRef) forwardedRef.current = node;
3126
+ }
3127
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { ref: setGroupRef, className: `sia-dropdown-button ${className}`.trim(), children: [
3118
3128
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button, { ...buttonProps, disabled: disabled || buttonDisabled, onClick, children }),
3119
3129
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownInternal, { ...dropdownProps, popupAnchorRef: groupRef, disabled: disabled || dropdownDisabled, trigger, showTriggerIcon: false, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3120
3130
  Button,
@@ -3127,8 +3137,8 @@ function DropdownButton({
3127
3137
  }
3128
3138
  ) })
3129
3139
  ] });
3130
- }
3131
- var Dropdown = Object.assign(DropdownRoot, {
3140
+ });
3141
+ var Dropdown2 = Object.assign(DropdownRoot, {
3132
3142
  /** 组合主操作按钮与下拉菜单的按钮组件。 */
3133
3143
  Button: DropdownButton
3134
3144
  });
@@ -3195,9 +3205,9 @@ function Toolbar({ items, onAction, disabled = false, size = "small", variant =
3195
3205
  visibleItems.map((item, index) => {
3196
3206
  const buttonProps = { size, variant, icon: item.icon, disabled: blocked(item), loading: item.loading, danger: item.danger };
3197
3207
  const menu = { items: menuItems(item.children ?? []), onClick: ({ key }) => invoke(key) };
3198
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "data-sia-toolbar-item": true, className: `sia-toolbar__item${index >= visibleCount ? " sia-toolbar__item--hidden" : ""}`, "aria-hidden": index >= visibleCount || void 0, children: item.children?.length ? item.split ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Dropdown.Button, { trigger: ["hover"], menu, disabled: blocked(item), buttonProps, onClick: () => invoke(item.key), children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Dropdown, { trigger: ["hover"], menu, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { ...buttonProps, children: item.label }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { ...buttonProps, onClick: () => invoke(item.key), children: item.label }) }, item.key);
3208
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "data-sia-toolbar-item": true, className: `sia-toolbar__item${index >= visibleCount ? " sia-toolbar__item--hidden" : ""}`, "aria-hidden": index >= visibleCount || void 0, children: item.children?.length ? item.split ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Dropdown2.Button, { trigger: ["hover"], menu, disabled: blocked(item), buttonProps, onClick: () => invoke(item.key), children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Dropdown2, { trigger: ["hover"], menu, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { ...buttonProps, children: item.label }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { ...buttonProps, onClick: () => invoke(item.key), children: item.label }) }, item.key);
3199
3209
  }),
3200
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "data-sia-toolbar-more": true, className: `sia-toolbar__item${overflow.length ? "" : " sia-toolbar__item--hidden"}`, "aria-hidden": !overflow.length || void 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Dropdown, { trigger: ["hover"], menu: { items: menuItems(overflow), onClick: ({ key }) => invoke(key) }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { size, variant, disabled, "aria-label": overflowLabel, title: overflowLabel, icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: "more-horizontal", size: 16 }) }) }) })
3210
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "data-sia-toolbar-more": true, className: `sia-toolbar__item${overflow.length ? "" : " sia-toolbar__item--hidden"}`, "aria-hidden": !overflow.length || void 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Dropdown2, { trigger: ["hover"], menu: { items: menuItems(overflow), onClick: ({ key }) => invoke(key) }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { size, variant, disabled, "aria-label": overflowLabel, title: overflowLabel, icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: "more-horizontal", size: 16 }) }) }) })
3201
3211
  ] });
3202
3212
  }
3203
3213
 
@@ -3213,7 +3223,7 @@ function Skeleton({ rows = 6, columns = 2, rowHeight = 30, gap = 16, className =
3213
3223
  // src/components/Card.tsx
3214
3224
  var import_react15 = require("react");
3215
3225
  var import_jsx_runtime13 = require("react/jsx-runtime");
3216
- function Card({
3226
+ var Card = (0, import_react15.forwardRef)(function Card2({
3217
3227
  bordered = true,
3218
3228
  title,
3219
3229
  description,
@@ -3243,7 +3253,7 @@ function Card({
3243
3253
  onClick,
3244
3254
  onKeyDown,
3245
3255
  ...props
3246
- }) {
3256
+ }, forwardedRef) {
3247
3257
  const [internalCollapsed, setInternalCollapsed] = (0, import_react15.useState)(defaultCollapsed);
3248
3258
  const [internalSelected, setInternalSelected] = (0, import_react15.useState)(defaultSelected);
3249
3259
  const isSelected = selected ?? internalSelected;
@@ -3270,6 +3280,7 @@ function Card({
3270
3280
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3271
3281
  "section",
3272
3282
  {
3283
+ ref: forwardedRef,
3273
3284
  className: `sia-card${fill ? " sia-card--fill" : ""}${fill && bodyHeight !== void 0 ? " sia-card--body-height" : ""}${!bordered ? " sia-card--borderless" : ""}${isCollapsed ? " sia-card--collapsed" : ""}${selectable ? " sia-card--selectable" : ""}${actionable ? " sia-card--actionable" : ""}${selectable && isSelected ? " sia-card--selected" : ""}${hoverActions ? " sia-card--hover-actions" : ""} ${className}`.trim(),
3274
3285
  style: mergedStyle,
3275
3286
  "data-sia-interaction-cursor": interactionCursor,
@@ -3312,7 +3323,7 @@ function Card({
3312
3323
  ]
3313
3324
  }
3314
3325
  );
3315
- }
3326
+ });
3316
3327
 
3317
3328
  // src/components/Tag.tsx
3318
3329
  var import_react16 = require("react");
@@ -3377,7 +3388,7 @@ function Tag({
3377
3388
  var import_react17 = require("react");
3378
3389
  var import_jsx_runtime15 = require("react/jsx-runtime");
3379
3390
  var import_react18 = require("react");
3380
- function Tabs({
3391
+ var Tabs = (0, import_react17.forwardRef)(function Tabs2({
3381
3392
  items,
3382
3393
  activeKey,
3383
3394
  defaultActiveKey,
@@ -3401,7 +3412,7 @@ function Tabs({
3401
3412
  onTabContextMenuClick,
3402
3413
  className = "",
3403
3414
  ...props
3404
- }) {
3415
+ }, forwardedRef) {
3405
3416
  const firstEnabledKey = items.find((item) => !item.disabled)?.key ?? "";
3406
3417
  const [internalActiveKey, setInternalActiveKey] = (0, import_react17.useState)(defaultActiveKey ?? firstEnabledKey);
3407
3418
  const currentKey = activeKey ?? internalActiveKey;
@@ -3580,6 +3591,7 @@ function Tabs({
3580
3591
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3581
3592
  "div",
3582
3593
  {
3594
+ ref: forwardedRef,
3583
3595
  className: `sia-tabs sia-tabs--${type}${type === "underline" ? " sia-tabs--line" : ""} sia-tabs--${size} sia-tabs--${resolvedOrientation} sia-tabs--${resolvedPosition}${centered ? " sia-tabs--centered" : ""} ${className}`.trim(),
3584
3596
  ...withTitleTooltip(props),
3585
3597
  children: [
@@ -3627,7 +3639,7 @@ function Tabs({
3627
3639
  ) : null);
3628
3640
  if (!contextMenuItems?.length) return tabNode;
3629
3641
  return /* @__PURE__ */ (0, import_react18.createElement)(
3630
- Dropdown,
3642
+ Dropdown2,
3631
3643
  {
3632
3644
  ...entryProps,
3633
3645
  key: item.key,
@@ -3645,7 +3657,7 @@ function Tabs({
3645
3657
  );
3646
3658
  }),
3647
3659
  resolvedOrientation === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3648
- Dropdown,
3660
+ Dropdown2,
3649
3661
  {
3650
3662
  className: "sia-tabs__more",
3651
3663
  "data-tab-hidden": !hiddenItems.length,
@@ -3686,7 +3698,7 @@ function Tabs({
3686
3698
  ]
3687
3699
  }
3688
3700
  );
3689
- }
3701
+ });
3690
3702
 
3691
3703
  // src/components/Feedback.tsx
3692
3704
  var import_react23 = require("react");
@@ -3891,19 +3903,27 @@ function useOverlayLifecycle(open, panelRef, onRequestClose, keyboard = true, au
3891
3903
  closeRef.current();
3892
3904
  return;
3893
3905
  }
3894
- if (event.key !== "Tab" || !panelRef.current) return;
3895
- const focusable = focusableElements(panelRef.current);
3906
+ const panel = panelRef.current;
3907
+ if (event.key !== "Tab" || !panel) return;
3908
+ const focusable = focusableElements(panel);
3896
3909
  if (focusable.length === 0) {
3897
3910
  event.preventDefault();
3898
- panelRef.current.focus();
3911
+ panel.focus();
3899
3912
  return;
3900
3913
  }
3901
3914
  const first = focusable[0];
3902
3915
  const last = focusable.at(-1);
3903
- if (event.shiftKey && document.activeElement === first) {
3916
+ const active = document.activeElement;
3917
+ const insidePanel = active instanceof Node && panel.contains(active);
3918
+ if (!insidePanel || active === panel) {
3919
+ event.preventDefault();
3920
+ (event.shiftKey ? last : first).focus();
3921
+ return;
3922
+ }
3923
+ if (event.shiftKey && active === first) {
3904
3924
  event.preventDefault();
3905
3925
  last.focus();
3906
- } else if (!event.shiftKey && document.activeElement === last) {
3926
+ } else if (!event.shiftKey && active === last) {
3907
3927
  event.preventDefault();
3908
3928
  first.focus();
3909
3929
  }
@@ -3918,7 +3938,7 @@ function useOverlayLifecycle(open, panelRef, onRequestClose, keyboard = true, au
3918
3938
  unlockBody();
3919
3939
  previouslyFocused?.focus({ preventScroll: true });
3920
3940
  };
3921
- }, [keyboard, open, panelRef, autoFocusInput]);
3941
+ }, [keyboard, open, panelRef]);
3922
3942
  (0, import_react21.useEffect)(() => {
3923
3943
  if (!open) return;
3924
3944
  const timer = window.setTimeout(() => {
@@ -5762,6 +5782,27 @@ var Select = (0, import_react31.forwardRef)(function Select2({
5762
5782
  open,
5763
5783
  title: modalConfig?.title ?? placeholder,
5764
5784
  width: modalConfig?.width ?? 900,
5785
+ titleExtra: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
5786
+ modalConfig?.titleExtra != null && modalConfig.titleExtra !== false ? modalConfig.titleExtra : null,
5787
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
5788
+ Input,
5789
+ {
5790
+ className: "sia-select-modal__search",
5791
+ "aria-label": searchPlaceholder,
5792
+ placeholder: searchPlaceholder,
5793
+ placeholderMode: "default",
5794
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: "search", size: 14 }),
5795
+ value: query,
5796
+ allowClear: true,
5797
+ disabled: modalSubmitting || disabled,
5798
+ onChange: (event) => {
5799
+ setQuery(event.target.value);
5800
+ onSearch?.(event.target.value);
5801
+ }
5802
+ },
5803
+ "sia-select-modal-search"
5804
+ )
5805
+ ] }),
5765
5806
  confirmLoading: modalSubmitting,
5766
5807
  onOpenChange: (next) => {
5767
5808
  if (!next) closeDropdown();
@@ -5776,43 +5817,27 @@ var Select = (0, import_react31.forwardRef)(function Select2({
5776
5817
  ] }),
5777
5818
  children: open ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
5778
5819
  modalConfig?.headerExtra != null && modalConfig.headerExtra !== false ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "sia-select-modal__header-extra", children: modalConfig.headerExtra }) : null,
5779
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "sia-select-modal__heading", children: [
5780
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { role: "tablist", "aria-label": "\u9009\u9879\u8303\u56F4", children: [
5781
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { role: "tab", "aria-selected": !selectedOnly, variant: "link", onClick: () => setSelectedOnly(false), children: "\u5168\u90E8" }),
5782
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Button, { role: "tab", "aria-selected": selectedOnly, variant: "link", onClick: () => setSelectedOnly(true), children: [
5783
- "\u5DF2\u9009\u9879(",
5784
- modalValues.length,
5785
- ")"
5786
- ] })
5787
- ] }),
5788
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
5789
- Input,
5790
- {
5791
- "aria-label": searchPlaceholder,
5792
- placeholder: searchPlaceholder,
5793
- prefix: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: "search", size: 14 }),
5794
- value: query,
5795
- allowClear: true,
5796
- onChange: (event) => {
5797
- setQuery(event.target.value);
5798
- onSearch?.(event.target.value);
5799
- }
5800
- }
5801
- )
5802
- ] }),
5820
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "sia-select-modal__heading", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { role: "tablist", "aria-label": "\u9009\u9879\u8303\u56F4", children: [
5821
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { role: "tab", "aria-selected": !selectedOnly, variant: "link", onClick: () => setSelectedOnly(false), children: "\u5168\u90E8" }),
5822
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Button, { role: "tab", "aria-selected": selectedOnly, variant: "link", onClick: () => setSelectedOnly(true), children: [
5823
+ "\u5DF2\u9009\u9879(",
5824
+ modalValues.length,
5825
+ ")"
5826
+ ] })
5827
+ ] }) }),
5803
5828
  multiple && showSelectAll ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "sia-select-modal__actions", children: [
5804
5829
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
5805
5830
  Checkbox2,
5806
5831
  {
5807
5832
  checked: modalEnabled.length > 0 && modalEnabled.every((option) => modalValues.includes(option.value)),
5808
5833
  indeterminate: modalEnabled.some((option) => modalValues.includes(option.value)) && !modalEnabled.every((option) => modalValues.includes(option.value)),
5809
- disabled: !modalEnabled.length,
5834
+ disabled: modalSubmitting || disabled || loading || !modalEnabled.length,
5810
5835
  onChange: (checked) => modalBatch(checked ? "all" : "remove"),
5811
5836
  children: "\u5168\u9009"
5812
5837
  }
5813
5838
  ),
5814
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { variant: "link", size: "small", disabled: !modalEnabled.length, onClick: () => modalBatch("invert"), children: "\u53CD\u9009" }),
5815
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { variant: "link", size: "small", danger: true, disabled: !modalValues.length, onClick: () => setModalValues([]), children: "\u6E05\u7A7A" })
5839
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { variant: "link", size: "small", disabled: modalSubmitting || disabled || loading || !modalEnabled.length, onClick: () => modalBatch("invert"), children: "\u53CD\u9009" }),
5840
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { variant: "link", size: "small", danger: true, disabled: modalSubmitting || disabled || loading || !modalValues.length, onClick: () => setModalValues([]), children: "\u6E05\u7A7A" })
5816
5841
  ] }) : null,
5817
5842
  allowInput && canSubmitInput ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Button, { variant: "link", onClick: () => {
5818
5843
  setModalValues(multiple ? [.../* @__PURE__ */ new Set([...modalValues, inputValue])] : [inputValue]);
@@ -5831,6 +5856,8 @@ var Select = (0, import_react31.forwardRef)(function Select2({
5831
5856
  multiple,
5832
5857
  groupCheckable: modalConfig?.groupCheckable,
5833
5858
  allowDeselect: allowClear,
5859
+ disabled: modalSubmitting || disabled,
5860
+ loading,
5834
5861
  selectedOnly,
5835
5862
  showValue,
5836
5863
  showSearch: false,
@@ -6482,9 +6509,10 @@ var Upload = Object.assign(UploadRoot, {
6482
6509
  });
6483
6510
 
6484
6511
  // src/components/Breadcrumb.tsx
6512
+ var import_react34 = require("react");
6485
6513
  var import_jsx_runtime30 = require("react/jsx-runtime");
6486
- function Breadcrumb({ items, separator = "/", itemRender, className = "", ...props }) {
6487
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("nav", { "aria-label": "\u9762\u5305\u5C51\u5BFC\u822A", ...withTitleTooltip(props), className: `sia-breadcrumb ${className}`.trim(), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ol", { className: "sia-breadcrumb__list", children: items.map((item, index) => {
6514
+ var Breadcrumb = (0, import_react34.forwardRef)(function Breadcrumb2({ items, separator = "/", itemRender, className = "", ...props }, forwardedRef) {
6515
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("nav", { ref: forwardedRef, "aria-label": "\u9762\u5305\u5C51\u5BFC\u822A", ...withTitleTooltip(props), className: `sia-breadcrumb ${className}`.trim(), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ol", { className: "sia-breadcrumb__list", children: items.map((item, index) => {
6488
6516
  const current = index === items.length - 1;
6489
6517
  const content = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
6490
6518
  item.icon ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "sia-breadcrumb__icon", "aria-hidden": "true", children: item.icon }) : null,
@@ -6495,15 +6523,15 @@ function Breadcrumb({ items, separator = "/", itemRender, className = "", ...pro
6495
6523
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("li", { className: `sia-breadcrumb__item${current ? " is-current" : ""}${item.disabled ? " is-disabled" : ""}`, children: [
6496
6524
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "sia-breadcrumb__entry", "aria-current": current ? "page" : void 0, children: [
6497
6525
  label,
6498
- item.menu?.items.length ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dropdown, { menu: item.menu, trigger: ["click"], disabled: item.disabled, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { className: "sia-breadcrumb__menu-trigger", variant: "text", size: "small", disabled: item.disabled, "aria-label": `\u5C55\u5F00${typeof item.title === "string" ? item.title : "\u5C42\u7EA7"}\u83DC\u5355`, icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "chevron-down", size: 12 }) }) }) : null
6526
+ item.menu?.items.length ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dropdown2, { menu: item.menu, trigger: ["click"], disabled: item.disabled, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { className: "sia-breadcrumb__menu-trigger", variant: "text", size: "small", disabled: item.disabled, "aria-label": `\u5C55\u5F00${typeof item.title === "string" ? item.title : "\u5C42\u7EA7"}\u83DC\u5355`, icon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "chevron-down", size: 12 }) }) }) : null
6499
6527
  ] }),
6500
6528
  !current ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "sia-breadcrumb__separator", "aria-hidden": "true", children: item.separator === void 0 ? separator : item.separator }) : null
6501
6529
  ] }, item.key ?? index);
6502
6530
  }) }) });
6503
- }
6531
+ });
6504
6532
 
6505
6533
  // src/components/Typography.tsx
6506
- var import_react34 = require("react");
6534
+ var import_react35 = require("react");
6507
6535
  var import_jsx_runtime31 = require("react/jsx-runtime");
6508
6536
  function TypographyContent({
6509
6537
  as: Tag2 = "span",
@@ -6523,26 +6551,26 @@ function TypographyContent({
6523
6551
  className = "",
6524
6552
  ...props
6525
6553
  }) {
6526
- const contentRef = (0, import_react34.useRef)(null);
6527
- const editRef = (0, import_react34.useRef)(null);
6528
- const timer = (0, import_react34.useRef)();
6529
- const [localText, setLocalText] = (0, import_react34.useState)();
6530
- const [draft, setDraft] = (0, import_react34.useState)("");
6531
- const [editing, setEditing] = (0, import_react34.useState)(false);
6532
- const [copied, setCopied] = (0, import_react34.useState)(false);
6533
- const [copyError, setCopyError] = (0, import_react34.useState)(false);
6534
- const [expanded, setExpanded] = (0, import_react34.useState)(false);
6535
- const [overflow, setOverflow] = (0, import_react34.useState)(false);
6554
+ const contentRef = (0, import_react35.useRef)(null);
6555
+ const editRef = (0, import_react35.useRef)(null);
6556
+ const timer = (0, import_react35.useRef)();
6557
+ const [localText, setLocalText] = (0, import_react35.useState)();
6558
+ const [draft, setDraft] = (0, import_react35.useState)("");
6559
+ const [editing, setEditing] = (0, import_react35.useState)(false);
6560
+ const [copied, setCopied] = (0, import_react35.useState)(false);
6561
+ const [copyError, setCopyError] = (0, import_react35.useState)(false);
6562
+ const [expanded, setExpanded] = (0, import_react35.useState)(false);
6563
+ const [overflow, setOverflow] = (0, import_react35.useState)(false);
6536
6564
  const editConfig = typeof editable === "object" ? editable : void 0;
6537
6565
  const content = editConfig?.text ?? localText ?? children;
6538
6566
  const requestedRows = typeof ellipsis === "object" ? ellipsis.rows ?? 1 : 1;
6539
6567
  const rows = Number.isFinite(requestedRows) ? Math.max(1, Math.floor(requestedRows)) : 1;
6540
6568
  const expandable = typeof ellipsis === "object" && ellipsis.expandable;
6541
- (0, import_react34.useEffect)(() => {
6569
+ (0, import_react35.useEffect)(() => {
6542
6570
  setLocalText(void 0);
6543
6571
  }, [children]);
6544
- (0, import_react34.useEffect)(() => () => clearTimeout(timer.current), []);
6545
- (0, import_react34.useLayoutEffect)(() => {
6572
+ (0, import_react35.useEffect)(() => () => clearTimeout(timer.current), []);
6573
+ (0, import_react35.useLayoutEffect)(() => {
6546
6574
  const element = contentRef.current;
6547
6575
  if (!element || !ellipsis || !expandable || editing || expanded) return;
6548
6576
  const measure = () => setOverflow(element.scrollHeight > element.clientHeight + 1 || element.scrollWidth > element.clientWidth + 1);
@@ -6660,10 +6688,10 @@ var Typography = Object.assign(TypographyRoot, {
6660
6688
  });
6661
6689
 
6662
6690
  // src/components/FloatButton.tsx
6663
- var import_react35 = require("react");
6691
+ var import_react36 = require("react");
6664
6692
  var import_jsx_runtime32 = require("react/jsx-runtime");
6665
- var GroupShape = (0, import_react35.createContext)(void 0);
6666
- var FloatButtonRoot = (0, import_react35.forwardRef)(function FloatButton({
6693
+ var GroupShape = (0, import_react36.createContext)(void 0);
6694
+ var FloatButtonRoot = (0, import_react36.forwardRef)(function FloatButton({
6667
6695
  icon,
6668
6696
  description,
6669
6697
  tooltip,
@@ -6676,7 +6704,7 @@ var FloatButtonRoot = (0, import_react35.forwardRef)(function FloatButton({
6676
6704
  children,
6677
6705
  ...props
6678
6706
  }, ref) {
6679
- const groupShape = (0, import_react35.useContext)(GroupShape);
6707
+ const groupShape = (0, import_react36.useContext)(GroupShape);
6680
6708
  const label = props["aria-label"] ?? (typeof tooltip === "string" ? tooltip : typeof description === "string" ? description : "\u60AC\u6D6E\u64CD\u4F5C");
6681
6709
  const button = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6682
6710
  "button",
@@ -6714,12 +6742,12 @@ function FloatButtonGroup({
6714
6742
  ...props
6715
6743
  }) {
6716
6744
  const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
6717
- const rootRef = (0, import_react35.useRef)(null);
6718
- const triggerRef = (0, import_react35.useRef)(null);
6719
- const listRef = (0, import_react35.useRef)(null);
6745
+ const rootRef = (0, import_react36.useRef)(null);
6746
+ const triggerRef = (0, import_react36.useRef)(null);
6747
+ const listRef = (0, import_react36.useRef)(null);
6720
6748
  const motion = useOverlayMotion(!trigger || visible, listRef, "popup", placement, true, void 0, !!trigger);
6721
- const id = (0, import_react35.useId)();
6722
- (0, import_react35.useEffect)(() => {
6749
+ const id = (0, import_react36.useId)();
6750
+ (0, import_react36.useEffect)(() => {
6723
6751
  if (!trigger || !visible) return;
6724
6752
  const close = (event) => {
6725
6753
  if (!rootRef.current?.contains(event.target)) setVisible(false);
@@ -6773,10 +6801,10 @@ function FloatButtonGroup({
6773
6801
  ) });
6774
6802
  }
6775
6803
  function FloatButtonBackTop({ target, visibilityHeight = 400, behavior = "smooth", onClick, icon, tooltip = "\u8FD4\u56DE\u9876\u90E8", ...props }) {
6776
- const [visible, setVisible] = (0, import_react35.useState)(false);
6777
- const buttonRef = (0, import_react35.useRef)(null);
6804
+ const [visible, setVisible] = (0, import_react36.useState)(false);
6805
+ const buttonRef = (0, import_react36.useRef)(null);
6778
6806
  const motion = useOverlayMotion(visible, buttonRef, "fade");
6779
- (0, import_react35.useEffect)(() => {
6807
+ (0, import_react36.useEffect)(() => {
6780
6808
  const element = target ? target() : window;
6781
6809
  if (!element) return;
6782
6810
  const update = () => setVisible((element === window ? window.scrollY : element.scrollTop) >= visibilityHeight);
@@ -6800,6 +6828,7 @@ var FloatButton2 = Object.assign(FloatButtonRoot, {
6800
6828
  });
6801
6829
 
6802
6830
  // src/components/Result.tsx
6831
+ var import_react37 = require("react");
6803
6832
  var import_jsx_runtime33 = require("react/jsx-runtime");
6804
6833
  var icons = {
6805
6834
  success: "circle-check",
@@ -6807,17 +6836,17 @@ var icons = {
6807
6836
  info: "info",
6808
6837
  warning: "warning"
6809
6838
  };
6810
- function Result({ status = "info", title, subTitle, icon, extra, children, className = "", ...props }) {
6839
+ var Result = (0, import_react37.forwardRef)(function Result2({ status = "info", title, subTitle, icon, extra, children, className = "", ...props }, forwardedRef) {
6811
6840
  const resultIcon = icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: icons[status], size: 72, variant: "filled" }) : icon;
6812
6841
  const present = (value) => value !== void 0 && value !== null && value !== false;
6813
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...props, className: `sia-result sia-result--${status} ${className}`.trim(), children: [
6842
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ref: forwardedRef, ...props, className: `sia-result sia-result--${status} ${className}`.trim(), children: [
6814
6843
  present(resultIcon) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "sia-result__icon", "aria-hidden": "true", children: resultIcon }),
6815
6844
  present(title) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "sia-result__title", children: title }),
6816
6845
  present(subTitle) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "sia-result__subtitle", children: subTitle }),
6817
6846
  present(children) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "sia-result__content", children }),
6818
6847
  present(extra) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "sia-result__extra", children: extra })
6819
6848
  ] });
6820
- }
6849
+ });
6821
6850
 
6822
6851
  // src/core.ts
6823
6852
  initializeDefaultScrollbars();