@sia.soul/sia-react-ui 0.1.54 → 0.1.56

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.
@@ -5,7 +5,7 @@ import {
5
5
  Popover,
6
6
  Tooltip,
7
7
  useOverlayLifecycle
8
- } from "./chunk-PJT676UK.js";
8
+ } from "./chunk-F4XMRO6G.js";
9
9
  import {
10
10
  Dropdown,
11
11
  Icon
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FloatingScrollbarProvider,
3
3
  Select
4
- } from "./chunk-PJT676UK.js";
4
+ } from "./chunk-F4XMRO6G.js";
5
5
  import {
6
6
  Icon
7
7
  } from "./chunk-IUZ2RSI5.js";
@@ -253,6 +253,11 @@ function Floating({
253
253
  const triggers = Array.isArray(trigger) ? trigger : [trigger];
254
254
  const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
255
255
  const [position, setPosition] = useState();
256
+ const [portalContainer, setPortalContainer] = useState(null);
257
+ useLayoutEffect(() => {
258
+ if (!visible) return;
259
+ setPortalContainer(rootRef.current?.closest(".sia-modal-root, .sia-drawer-root") ?? document.body);
260
+ });
256
261
  const setVisibleRef = useRef2(setVisible);
257
262
  setVisibleRef.current = setVisible;
258
263
  const closeSelfRef = useRef2();
@@ -315,6 +320,8 @@ function Floating({
315
320
  update();
316
321
  window.addEventListener("resize", update);
317
322
  window.addEventListener("scroll", update, true);
323
+ window.addEventListener("animationend", update, true);
324
+ window.addEventListener("transitionend", update, true);
318
325
  const observer = new ResizeObserver(update);
319
326
  if (rootRef.current) observer.observe(rootRef.current);
320
327
  const anchor = getAnchor();
@@ -323,9 +330,11 @@ function Floating({
323
330
  return () => {
324
331
  window.removeEventListener("resize", update);
325
332
  window.removeEventListener("scroll", update, true);
333
+ window.removeEventListener("animationend", update, true);
334
+ window.removeEventListener("transitionend", update, true);
326
335
  observer.disconnect();
327
336
  };
328
- }, [children, content, placement, visible, autoAdjustOverflow, typeof arrow === "object" && arrow.pointAtCenter]);
337
+ }, [children, content, placement, visible, portalContainer, autoAdjustOverflow, typeof arrow === "object" && arrow.pointAtCenter]);
329
338
  useEffect2(() => () => {
330
339
  clearTimers();
331
340
  if (activeTooltipClose === closeSelfRef.current) activeTooltipClose = void 0;
@@ -380,7 +389,7 @@ function Floating({
380
389
  ]
381
390
  }
382
391
  ),
383
- document.body
392
+ portalContainer ?? document.body
384
393
  ) : null;
385
394
  return /* @__PURE__ */ jsxs2(Fragment, { children: [
386
395
  /* @__PURE__ */ jsx2("span", { ref: rootRef, className: `sia-floating ${className}`.trim(), children: child }),
@@ -877,7 +877,7 @@ declare const Dropdown: typeof DropdownRoot & {
877
877
  type FloatingPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
878
878
  /** 触发浮层显示的交互方式。 */
879
879
  type FloatingTrigger = "hover" | "focus" | "click";
880
- /** 文字提示的属性配置。 */
880
+ /** 文字提示的属性配置;弹框或抽屉内的提示遵循所属容器的层级,不覆盖后续打开的子弹层。 */
881
881
  interface TooltipProps {
882
882
  /** 标题内容,可传入文本或 React 节点。 */
883
883
  title?: ReactNode;
@@ -877,7 +877,7 @@ declare const Dropdown: typeof DropdownRoot & {
877
877
  type FloatingPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
878
878
  /** 触发浮层显示的交互方式。 */
879
879
  type FloatingTrigger = "hover" | "focus" | "click";
880
- /** 文字提示的属性配置。 */
880
+ /** 文字提示的属性配置;弹框或抽屉内的提示遵循所属容器的层级,不覆盖后续打开的子弹层。 */
881
881
  interface TooltipProps {
882
882
  /** 标题内容,可传入文本或 React 节点。 */
883
883
  title?: ReactNode;
package/dist/core.cjs CHANGED
@@ -2355,6 +2355,11 @@ function Floating({
2355
2355
  const triggers = Array.isArray(trigger) ? trigger : [trigger];
2356
2356
  const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
2357
2357
  const [position, setPosition] = (0, import_react13.useState)();
2358
+ const [portalContainer, setPortalContainer] = (0, import_react13.useState)(null);
2359
+ (0, import_react13.useLayoutEffect)(() => {
2360
+ if (!visible) return;
2361
+ setPortalContainer(rootRef.current?.closest(".sia-modal-root, .sia-drawer-root") ?? document.body);
2362
+ });
2358
2363
  const setVisibleRef = (0, import_react13.useRef)(setVisible);
2359
2364
  setVisibleRef.current = setVisible;
2360
2365
  const closeSelfRef = (0, import_react13.useRef)();
@@ -2417,6 +2422,8 @@ function Floating({
2417
2422
  update();
2418
2423
  window.addEventListener("resize", update);
2419
2424
  window.addEventListener("scroll", update, true);
2425
+ window.addEventListener("animationend", update, true);
2426
+ window.addEventListener("transitionend", update, true);
2420
2427
  const observer = new ResizeObserver(update);
2421
2428
  if (rootRef.current) observer.observe(rootRef.current);
2422
2429
  const anchor = getAnchor();
@@ -2425,9 +2432,11 @@ function Floating({
2425
2432
  return () => {
2426
2433
  window.removeEventListener("resize", update);
2427
2434
  window.removeEventListener("scroll", update, true);
2435
+ window.removeEventListener("animationend", update, true);
2436
+ window.removeEventListener("transitionend", update, true);
2428
2437
  observer.disconnect();
2429
2438
  };
2430
- }, [children, content, placement, visible, autoAdjustOverflow, typeof arrow === "object" && arrow.pointAtCenter]);
2439
+ }, [children, content, placement, visible, portalContainer, autoAdjustOverflow, typeof arrow === "object" && arrow.pointAtCenter]);
2431
2440
  (0, import_react13.useEffect)(() => () => {
2432
2441
  clearTimers();
2433
2442
  if (activeTooltipClose === closeSelfRef.current) activeTooltipClose = void 0;
@@ -2482,7 +2491,7 @@ function Floating({
2482
2491
  ]
2483
2492
  }
2484
2493
  ),
2485
- document.body
2494
+ portalContainer ?? document.body
2486
2495
  ) : null;
2487
2496
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
2488
2497
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { ref: rootRef, className: `sia-floating ${className}`.trim(), children: child }),
package/dist/core.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-DtGYdU61.cjs';
1
+ export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-1iaQY0Is.cjs';
2
2
  export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-YJbT-MF1.cjs';
3
3
  import 'react';
4
4
  import './shared-Bx4B28Wh.cjs';
package/dist/core.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-DXJ4b0lT.js';
1
+ export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-DoFob1fF.js';
2
2
  export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-CCrPqULn.js';
3
3
  import 'react';
4
4
  import './shared-Bx4B28Wh.js';
package/dist/core.js CHANGED
@@ -10,12 +10,12 @@ import {
10
10
  Typography,
11
11
  Upload,
12
12
  message
13
- } from "./chunk-MFR2FYQA.js";
13
+ } from "./chunk-5OGT4AAS.js";
14
14
  import "./chunk-SMCYEPBL.js";
15
15
  import {
16
16
  Modal,
17
17
  Select
18
- } from "./chunk-PJT676UK.js";
18
+ } from "./chunk-F4XMRO6G.js";
19
19
  import {
20
20
  Icon,
21
21
  Input,
package/dist/index.cjs CHANGED
@@ -2639,6 +2639,11 @@ function Floating({
2639
2639
  const triggers = Array.isArray(trigger) ? trigger : [trigger];
2640
2640
  const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
2641
2641
  const [position, setPosition] = (0, import_react14.useState)();
2642
+ const [portalContainer, setPortalContainer] = (0, import_react14.useState)(null);
2643
+ (0, import_react14.useLayoutEffect)(() => {
2644
+ if (!visible) return;
2645
+ setPortalContainer(rootRef.current?.closest(".sia-modal-root, .sia-drawer-root") ?? document.body);
2646
+ });
2642
2647
  const setVisibleRef = (0, import_react14.useRef)(setVisible);
2643
2648
  setVisibleRef.current = setVisible;
2644
2649
  const closeSelfRef = (0, import_react14.useRef)();
@@ -2701,6 +2706,8 @@ function Floating({
2701
2706
  update();
2702
2707
  window.addEventListener("resize", update);
2703
2708
  window.addEventListener("scroll", update, true);
2709
+ window.addEventListener("animationend", update, true);
2710
+ window.addEventListener("transitionend", update, true);
2704
2711
  const observer = new ResizeObserver(update);
2705
2712
  if (rootRef.current) observer.observe(rootRef.current);
2706
2713
  const anchor = getAnchor();
@@ -2709,9 +2716,11 @@ function Floating({
2709
2716
  return () => {
2710
2717
  window.removeEventListener("resize", update);
2711
2718
  window.removeEventListener("scroll", update, true);
2719
+ window.removeEventListener("animationend", update, true);
2720
+ window.removeEventListener("transitionend", update, true);
2712
2721
  observer.disconnect();
2713
2722
  };
2714
- }, [children, content, placement, visible, autoAdjustOverflow, typeof arrow === "object" && arrow.pointAtCenter]);
2723
+ }, [children, content, placement, visible, portalContainer, autoAdjustOverflow, typeof arrow === "object" && arrow.pointAtCenter]);
2715
2724
  (0, import_react14.useEffect)(() => () => {
2716
2725
  clearTimers();
2717
2726
  if (activeTooltipClose === closeSelfRef.current) activeTooltipClose = void 0;
@@ -2766,7 +2775,7 @@ function Floating({
2766
2775
  ]
2767
2776
  }
2768
2777
  ),
2769
- document.body
2778
+ portalContainer ?? document.body
2770
2779
  ) : null;
2771
2780
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
2772
2781
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { ref: rootRef, className: `sia-floating ${className}`.trim(), children: child }),
@@ -13073,7 +13082,7 @@ function createSelectionPlugin(options = {}) {
13073
13082
  ellipsis: false,
13074
13083
  meta: { plugin: "selection" },
13075
13084
  renderHeader: () => {
13076
- if (mode !== "multiple") return null;
13085
+ if (mode !== "multiple" || options.showSelectAll === false) return null;
13077
13086
  const enabledRows = context.rows.filter(
13078
13087
  (row) => !options.getCheckboxDisabled?.(row.record)
13079
13088
  );
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TagStatus, B as BadgeProps } from './core-DtGYdU61.cjs';
2
- export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, aA as TagVariant, aB as Timeline, aC as TimelineItem, aD as TimelineProps, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aH as Tooltip, aI as TooltipProps, aJ as Tour, aK as TourProps, aL as TourStep, aM as Tree, aN as TreeDropPosition, aO as TreeKey, aP as TreeNode, aQ as TreeProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, a$ as UploadHttpRequest, b0 as UploadItemActions, b1 as UploadProps, b2 as UploadRef, b3 as UploadRejectInfo, b4 as UploadRequestHandle, b5 as UploadRequestOptions, b6 as Watermark, b7 as WatermarkFont, b8 as WatermarkProps, b9 as message, ba as notification } from './core-DtGYdU61.cjs';
1
+ import { T as TagStatus, B as BadgeProps } from './core-1iaQY0Is.cjs';
2
+ export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, aA as TagVariant, aB as Timeline, aC as TimelineItem, aD as TimelineProps, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aH as Tooltip, aI as TooltipProps, aJ as Tour, aK as TourProps, aL as TourStep, aM as Tree, aN as TreeDropPosition, aO as TreeKey, aP as TreeNode, aQ as TreeProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, a$ as UploadHttpRequest, b0 as UploadItemActions, b1 as UploadProps, b2 as UploadRef, b3 as UploadRejectInfo, b4 as UploadRequestHandle, b5 as UploadRequestOptions, b6 as Watermark, b7 as WatermarkFont, b8 as WatermarkProps, b9 as message, ba as notification } from './core-1iaQY0Is.cjs';
3
3
  import * as react from 'react';
4
4
  import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
5
5
  import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
@@ -2402,6 +2402,8 @@ declare function createRowSpanPlugin<T extends Record<string, unknown>>(options?
2402
2402
  type TableSelectionMode = "single" | "multiple" | "row";
2403
2403
  /** TableSelection的插件配置。 */
2404
2404
  interface TableSelectionPluginOptions<T> {
2405
+ /** 是否显示多选模式的表头全选框,默认 true;false 仅隐藏全选入口,不影响行勾选、已选状态及选择 API。 */
2406
+ showSelectAll?: boolean;
2405
2407
  /** 展示或交互模式;可选值见类型定义。 */
2406
2408
  mode?: TableSelectionMode;
2407
2409
  /** 当前选中项目的标识集合;传入后由外部控制。 */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TagStatus, B as BadgeProps } from './core-DXJ4b0lT.js';
2
- export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, aA as TagVariant, aB as Timeline, aC as TimelineItem, aD as TimelineProps, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aH as Tooltip, aI as TooltipProps, aJ as Tour, aK as TourProps, aL as TourStep, aM as Tree, aN as TreeDropPosition, aO as TreeKey, aP as TreeNode, aQ as TreeProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, a$ as UploadHttpRequest, b0 as UploadItemActions, b1 as UploadProps, b2 as UploadRef, b3 as UploadRejectInfo, b4 as UploadRequestHandle, b5 as UploadRequestOptions, b6 as Watermark, b7 as WatermarkFont, b8 as WatermarkProps, b9 as message, ba as notification } from './core-DXJ4b0lT.js';
1
+ import { T as TagStatus, B as BadgeProps } from './core-DoFob1fF.js';
2
+ export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, aA as TagVariant, aB as Timeline, aC as TimelineItem, aD as TimelineProps, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aH as Tooltip, aI as TooltipProps, aJ as Tour, aK as TourProps, aL as TourStep, aM as Tree, aN as TreeDropPosition, aO as TreeKey, aP as TreeNode, aQ as TreeProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, a$ as UploadHttpRequest, b0 as UploadItemActions, b1 as UploadProps, b2 as UploadRef, b3 as UploadRejectInfo, b4 as UploadRequestHandle, b5 as UploadRequestOptions, b6 as Watermark, b7 as WatermarkFont, b8 as WatermarkProps, b9 as message, ba as notification } from './core-DoFob1fF.js';
3
3
  import * as react from 'react';
4
4
  import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
5
5
  import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.js';
@@ -2402,6 +2402,8 @@ declare function createRowSpanPlugin<T extends Record<string, unknown>>(options?
2402
2402
  type TableSelectionMode = "single" | "multiple" | "row";
2403
2403
  /** TableSelection的插件配置。 */
2404
2404
  interface TableSelectionPluginOptions<T> {
2405
+ /** 是否显示多选模式的表头全选框,默认 true;false 仅隐藏全选入口,不影响行勾选、已选状态及选择 API。 */
2406
+ showSelectAll?: boolean;
2405
2407
  /** 展示或交互模式;可选值见类型定义。 */
2406
2408
  mode?: TableSelectionMode;
2407
2409
  /** 当前选中项目的标识集合;传入后由外部控制。 */
package/dist/index.js CHANGED
@@ -80,7 +80,7 @@ import {
80
80
  Watermark,
81
81
  message,
82
82
  notification
83
- } from "./chunk-MFR2FYQA.js";
83
+ } from "./chunk-5OGT4AAS.js";
84
84
  import {
85
85
  TextArea
86
86
  } from "./chunk-SMCYEPBL.js";
@@ -95,7 +95,7 @@ import {
95
95
  DatePicker,
96
96
  SelectDateRange,
97
97
  TimePanel
98
- } from "./chunk-ZX2YNHQJ.js";
98
+ } from "./chunk-7CAQPLKC.js";
99
99
  import {
100
100
  Checkbox,
101
101
  FloatingScrollbarProvider,
@@ -110,7 +110,7 @@ import {
110
110
  Tree,
111
111
  useOverlayLifecycle,
112
112
  useScrollbarProximity
113
- } from "./chunk-PJT676UK.js";
113
+ } from "./chunk-F4XMRO6G.js";
114
114
  import {
115
115
  Dropdown,
116
116
  FILLED_ICON_NAMES,
@@ -5820,7 +5820,7 @@ function createSelectionPlugin(options = {}) {
5820
5820
  ellipsis: false,
5821
5821
  meta: { plugin: "selection" },
5822
5822
  renderHeader: () => {
5823
- if (mode !== "multiple") return null;
5823
+ if (mode !== "multiple" || options.showSelectAll === false) return null;
5824
5824
  const enabledRows = context.rows.filter(
5825
5825
  (row) => !options.getCheckboxDisabled?.(row.record)
5826
5826
  );
@@ -3010,6 +3010,11 @@ function Floating({
3010
3010
  const triggers = Array.isArray(trigger) ? trigger : [trigger];
3011
3011
  const [visible, setVisible] = useControllableState({ value: open, defaultValue: defaultOpen, onChange: onOpenChange });
3012
3012
  const [position, setPosition] = (0, import_react13.useState)();
3013
+ const [portalContainer, setPortalContainer] = (0, import_react13.useState)(null);
3014
+ (0, import_react13.useLayoutEffect)(() => {
3015
+ if (!visible) return;
3016
+ setPortalContainer(rootRef.current?.closest(".sia-modal-root, .sia-drawer-root") ?? document.body);
3017
+ });
3013
3018
  const setVisibleRef = (0, import_react13.useRef)(setVisible);
3014
3019
  setVisibleRef.current = setVisible;
3015
3020
  const closeSelfRef = (0, import_react13.useRef)();
@@ -3072,6 +3077,8 @@ function Floating({
3072
3077
  update();
3073
3078
  window.addEventListener("resize", update);
3074
3079
  window.addEventListener("scroll", update, true);
3080
+ window.addEventListener("animationend", update, true);
3081
+ window.addEventListener("transitionend", update, true);
3075
3082
  const observer = new ResizeObserver(update);
3076
3083
  if (rootRef.current) observer.observe(rootRef.current);
3077
3084
  const anchor = getAnchor();
@@ -3080,9 +3087,11 @@ function Floating({
3080
3087
  return () => {
3081
3088
  window.removeEventListener("resize", update);
3082
3089
  window.removeEventListener("scroll", update, true);
3090
+ window.removeEventListener("animationend", update, true);
3091
+ window.removeEventListener("transitionend", update, true);
3083
3092
  observer.disconnect();
3084
3093
  };
3085
- }, [children, content, placement, visible, autoAdjustOverflow, typeof arrow === "object" && arrow.pointAtCenter]);
3094
+ }, [children, content, placement, visible, portalContainer, autoAdjustOverflow, typeof arrow === "object" && arrow.pointAtCenter]);
3086
3095
  (0, import_react13.useEffect)(() => () => {
3087
3096
  clearTimers();
3088
3097
  if (activeTooltipClose === closeSelfRef.current) activeTooltipClose = void 0;
@@ -3137,7 +3146,7 @@ function Floating({
3137
3146
  ]
3138
3147
  }
3139
3148
  ),
3140
- document.body
3149
+ portalContainer ?? document.body
3141
3150
  ) : null;
3142
3151
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
3143
3152
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { ref: rootRef, className: `sia-floating ${className}`.trim(), children: child }),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SelectDateRange
3
- } from "./chunk-ZX2YNHQJ.js";
4
- import "./chunk-PJT676UK.js";
3
+ } from "./chunk-7CAQPLKC.js";
4
+ import "./chunk-F4XMRO6G.js";
5
5
  import "./chunk-IUZ2RSI5.js";
6
6
  import "./chunk-IKAMZNCK.js";
7
7
  import "./chunk-H7IAG72O.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sia.soul/sia-react-ui",
3
- "version": "0.1.54",
3
+ "version": "0.1.56",
4
4
  "description": "Sia Design components and tokens for React",
5
5
  "publishConfig": {
6
6
  "access": "public",