@sia.soul/sia-react-ui 0.1.145 → 0.1.147

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 (46) hide show
  1. package/dist/{Button-C8W8ZHWV.d.ts → Button-B59TIes7.d.ts} +1 -1
  2. package/dist/{Button-CxKBjLda.d.cts → Button-xLR4Yt57.d.cts} +1 -1
  3. package/dist/{Select-bKLket9n.d.cts → Select-DKfT3fJR.d.cts} +1 -1
  4. package/dist/{Select-CTSd8zum.d.ts → Select-Wolx4zNc.d.ts} +1 -1
  5. package/dist/chart.cjs +2 -23
  6. package/dist/chart.js +5 -5
  7. package/dist/{chunk-ORSQAJ22.js → chunk-4PYHSNRA.js} +5 -5
  8. package/dist/{chunk-F52O2MOV.js → chunk-6SSZVJO4.js} +3 -3
  9. package/dist/{chunk-WCYVBO2N.js → chunk-EZTF5TA2.js} +4 -4
  10. package/dist/{chunk-LKLPCYEP.js → chunk-NRLIOMXY.js} +2 -2
  11. package/dist/{chunk-7SEGBB6V.js → chunk-PU2V3VB5.js} +1 -24
  12. package/dist/{chunk-566S64IP.js → chunk-QLS2IXU4.js} +4 -4
  13. package/dist/{chunk-4OHS7RXE.js → chunk-SRWUDTCS.js} +2 -0
  14. package/dist/{chunk-MD4CGSOR.js → chunk-TH7BNDV4.js} +6 -6
  15. package/dist/{chunk-4TYHSAR3.js → chunk-W4HDN7MD.js} +5 -5
  16. package/dist/{chunk-PD3K5U5Y.js → chunk-XXFYFLZA.js} +2 -2
  17. package/dist/{chunk-JRXYM5YH.js → chunk-YHVFLSZW.js} +2 -2
  18. package/dist/{chunk-ETQJ2DQ2.js → chunk-YO5OJQEH.js} +1 -1
  19. package/dist/{core-CvfsQGuT.d.ts → core-BJa8K9R8.d.ts} +5 -5
  20. package/dist/{core-COaZfusa.d.cts → core-DC4cb_KT.d.cts} +5 -5
  21. package/dist/core.cjs +2 -23
  22. package/dist/core.css +74 -1
  23. package/dist/core.d.cts +3 -3
  24. package/dist/core.d.ts +3 -3
  25. package/dist/core.js +8 -8
  26. package/dist/game.cjs +2 -23
  27. package/dist/game.css +74 -1
  28. package/dist/game.d.cts +1 -1
  29. package/dist/game.d.ts +1 -1
  30. package/dist/game.js +3 -3
  31. package/dist/index.cjs +1403 -1316
  32. package/dist/index.css +84 -1
  33. package/dist/index.d.cts +55 -9
  34. package/dist/index.d.ts +55 -9
  35. package/dist/index.js +167 -61
  36. package/dist/markdown-editor.cjs +2 -0
  37. package/dist/markdown-editor.js +3 -3
  38. package/dist/rich-text-editor.cjs +2 -23
  39. package/dist/rich-text-editor.js +7 -7
  40. package/dist/{select-date-range-Dad0IdD4.d.cts → select-date-range-C5bNGxaY.d.cts} +1 -1
  41. package/dist/{select-date-range-C8cacfmb.d.ts → select-date-range-DfhpX7vv.d.ts} +1 -1
  42. package/dist/select-date-range.cjs +2 -23
  43. package/dist/select-date-range.d.cts +3 -3
  44. package/dist/select-date-range.d.ts +3 -3
  45. package/dist/select-date-range.js +8 -8
  46. package/package.json +1 -1
@@ -38,7 +38,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
38
38
  */
39
39
  iconPosition?: "start" | "end";
40
40
  }
41
- /** 按钮组件;有效点击默认播放 320ms 的缩小、弹起和回稳动效,鼠标、触摸及键盘激活共用此反馈。连续点击从当前缩放继续,onClick 和表单默认行为不等待动画;禁用、加载中或系统减少动态效果时不启动动效。 */
41
+ /** 按钮组件;鼠标、触摸和键盘激活立即执行 onClick 与表单默认行为,主按钮显示点击波纹。禁用或加载中禁止点击。 */
42
42
  declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
43
43
 
44
44
  export { type ButtonProps as B, type ButtonSize as a, Button as b, type ButtonVariant as c };
@@ -38,7 +38,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
38
38
  */
39
39
  iconPosition?: "start" | "end";
40
40
  }
41
- /** 按钮组件;有效点击默认播放 320ms 的缩小、弹起和回稳动效,鼠标、触摸及键盘激活共用此反馈。连续点击从当前缩放继续,onClick 和表单默认行为不等待动画;禁用、加载中或系统减少动态效果时不启动动效。 */
41
+ /** 按钮组件;鼠标、触摸和键盘激活立即执行 onClick 与表单默认行为,主按钮显示点击波纹。禁用或加载中禁止点击。 */
42
42
  declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
43
43
 
44
44
  export { type ButtonProps as B, type ButtonSize as a, Button as b, type ButtonVariant as c };
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { HTMLAttributes, ReactNode, ButtonHTMLAttributes } from 'react';
3
3
  import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
4
- import { B as ButtonProps } from './Button-CxKBjLda.cjs';
4
+ import { B as ButtonProps } from './Button-xLR4Yt57.cjs';
5
5
 
6
6
  /** 弹层挂载节点或返回挂载节点的函数。 */
7
7
  type OverlayContainer = HTMLElement | (() => HTMLElement);
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { HTMLAttributes, ReactNode, ButtonHTMLAttributes } from 'react';
3
3
  import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-Bx4B28Wh.js';
4
- import { B as ButtonProps } from './Button-C8W8ZHWV.js';
4
+ import { B as ButtonProps } from './Button-B59TIes7.js';
5
5
 
6
6
  /** 弹层挂载节点或返回挂载节点的函数。 */
7
7
  type OverlayContainer = HTMLElement | (() => HTMLElement);
package/dist/chart.cjs CHANGED
@@ -545,6 +545,7 @@ function startFloatingScrollbars(targetRef) {
545
545
  const onResize = () => scheduleScan();
546
546
  window.addEventListener("resize", onResize);
547
547
  window.addEventListener("scroll", scheduleUpdateAll, true);
548
+ window.addEventListener("sia-overlay-motion-end", scheduleUpdateAll);
548
549
  scheduleScan();
549
550
  return () => {
550
551
  releaseProximity();
@@ -552,6 +553,7 @@ function startFloatingScrollbars(targetRef) {
552
553
  resizeObserver.disconnect();
553
554
  window.removeEventListener("resize", onResize);
554
555
  window.removeEventListener("scroll", scheduleUpdateAll, true);
556
+ window.removeEventListener("sia-overlay-motion-end", scheduleUpdateAll);
555
557
  if (scanFrame) window.cancelAnimationFrame(scanFrame);
556
558
  if (updateFrame) window.cancelAnimationFrame(updateFrame);
557
559
  entries.forEach((entry) => entry.cleanup());
@@ -4932,32 +4934,10 @@ var Button = (0, import_react33.forwardRef)(function Button2({
4932
4934
  }, forwardedRef) {
4933
4935
  const size = useControlSize(sizeProp);
4934
4936
  const localRef = (0, import_react33.useRef)(null);
4935
- const bounceRef = (0, import_react33.useRef)(null);
4936
4937
  const waveTimerRef = (0, import_react33.useRef)();
4937
4938
  (0, import_react33.useEffect)(() => () => {
4938
- bounceRef.current?.cancel();
4939
4939
  window.clearTimeout(waveTimerRef.current);
4940
4940
  }, []);
4941
- function playBounce(button) {
4942
- if (!button.animate || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
4943
- const current = getComputedStyle(button).scale;
4944
- bounceRef.current?.cancel();
4945
- const base = getComputedStyle(button).scale;
4946
- const [x = 1, y = x] = base === "none" ? [] : base.split(/\s+/).map(Number);
4947
- const scaled = (factor) => `${x * factor} ${y * factor}`;
4948
- const animation = button.animate([
4949
- { scale: current === "none" ? "1" : current, offset: 0 },
4950
- // 宽按钮保持等比缩放,以更明显的过冲表现弹性但不改变布局占位。
4951
- { scale: scaled(0.9), offset: 0.2 },
4952
- { scale: scaled(1.09), offset: 0.52 },
4953
- { scale: scaled(0.96), offset: 0.78 },
4954
- { scale: scaled(1), offset: 1 }
4955
- ], { duration: 320, easing: "cubic-bezier(.3, 0, .25, 1)" });
4956
- bounceRef.current = animation;
4957
- animation.onfinish = () => {
4958
- if (bounceRef.current === animation) bounceRef.current = null;
4959
- };
4960
- }
4961
4941
  function setRef(node) {
4962
4942
  localRef.current = node;
4963
4943
  if (typeof forwardedRef === "function") forwardedRef(node);
@@ -4966,7 +4946,6 @@ var Button = (0, import_react33.forwardRef)(function Button2({
4966
4946
  function handleClick(event) {
4967
4947
  const button = localRef.current;
4968
4948
  if (disabled || loading) return;
4969
- if (button) playBounce(button);
4970
4949
  if (button && variant === "primary") {
4971
4950
  const rect = button.getBoundingClientRect();
4972
4951
  button.style.setProperty("--sia-wave-x", `${event.detail === 0 ? button.offsetWidth / 2 : (event.clientX - rect.left) * button.offsetWidth / rect.width}px`);
package/dist/chart.js CHANGED
@@ -56,11 +56,11 @@ import {
56
56
  smoothSvgPath,
57
57
  svgArcPath,
58
58
  transferCompositeValue
59
- } from "./chunk-F52O2MOV.js";
60
- import "./chunk-LKLPCYEP.js";
61
- import "./chunk-7SEGBB6V.js";
62
- import "./chunk-ETQJ2DQ2.js";
63
- import "./chunk-4OHS7RXE.js";
59
+ } from "./chunk-6SSZVJO4.js";
60
+ import "./chunk-NRLIOMXY.js";
61
+ import "./chunk-PU2V3VB5.js";
62
+ import "./chunk-YO5OJQEH.js";
63
+ import "./chunk-SRWUDTCS.js";
64
64
  export {
65
65
  BarChart,
66
66
  CHART_VIEWBOX_HEIGHT,
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  Dropdown,
3
3
  Input
4
- } from "./chunk-WCYVBO2N.js";
4
+ } from "./chunk-EZTF5TA2.js";
5
5
  import {
6
6
  Icon,
7
7
  Modal,
8
8
  isAnchorBehindOverlay,
9
9
  subscribeOverlayLayers
10
- } from "./chunk-JRXYM5YH.js";
10
+ } from "./chunk-YHVFLSZW.js";
11
11
  import {
12
12
  Button
13
- } from "./chunk-7SEGBB6V.js";
13
+ } from "./chunk-PU2V3VB5.js";
14
14
  import {
15
15
  useFloatingPlaceholder
16
- } from "./chunk-ETQJ2DQ2.js";
16
+ } from "./chunk-YO5OJQEH.js";
17
17
  import {
18
18
  ControlSizeContext,
19
19
  FloatingScrollbarProvider,
@@ -22,7 +22,7 @@ import {
22
22
  useControllableState,
23
23
  useOverlayMotion,
24
24
  withTitleTooltip
25
- } from "./chunk-4OHS7RXE.js";
25
+ } from "./chunk-SRWUDTCS.js";
26
26
 
27
27
  // src/components/usePressFeedback.ts
28
28
  import { useEffect, useRef } from "react";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  TextArea
3
- } from "./chunk-LKLPCYEP.js";
3
+ } from "./chunk-NRLIOMXY.js";
4
4
  import {
5
5
  Button
6
- } from "./chunk-7SEGBB6V.js";
6
+ } from "./chunk-PU2V3VB5.js";
7
7
  import {
8
8
  initializeDefaultScrollbars,
9
9
  withTitleTooltip
10
- } from "./chunk-4OHS7RXE.js";
10
+ } from "./chunk-SRWUDTCS.js";
11
11
 
12
12
  // src/components/ChartWhirlingLoading.tsx
13
13
  import { useEffect, useState } from "react";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  TextArea
3
- } from "./chunk-LKLPCYEP.js";
3
+ } from "./chunk-NRLIOMXY.js";
4
4
  import {
5
5
  Icon,
6
6
  Modal
7
- } from "./chunk-JRXYM5YH.js";
7
+ } from "./chunk-YHVFLSZW.js";
8
8
  import {
9
9
  Button
10
- } from "./chunk-7SEGBB6V.js";
10
+ } from "./chunk-PU2V3VB5.js";
11
11
  import {
12
12
  PopupPortal,
13
13
  hasFloatingScrollbarInteraction,
@@ -16,7 +16,7 @@ import {
16
16
  useControllableState,
17
17
  usePlaceholderMode,
18
18
  withTitleTooltip
19
- } from "./chunk-4OHS7RXE.js";
19
+ } from "./chunk-SRWUDTCS.js";
20
20
 
21
21
  // src/components/Navigation.tsx
22
22
  import { useEffect, useId, useLayoutEffect as useLayoutEffect3, useMemo, useRef as useRef3, useState } from "react";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  useFloatingPlaceholder
3
- } from "./chunk-ETQJ2DQ2.js";
3
+ } from "./chunk-YO5OJQEH.js";
4
4
  import {
5
5
  useControlSize,
6
6
  withTitleTooltip
7
- } from "./chunk-4OHS7RXE.js";
7
+ } from "./chunk-SRWUDTCS.js";
8
8
 
9
9
  // src/components/TextArea.tsx
10
10
  import { forwardRef, useId, useState } from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useControlSize,
3
3
  withTitleTooltip
4
- } from "./chunk-4OHS7RXE.js";
4
+ } from "./chunk-SRWUDTCS.js";
5
5
 
6
6
  // src/components/Button.tsx
7
7
  import { forwardRef, useEffect, useRef } from "react";
@@ -23,32 +23,10 @@ var Button = forwardRef(function Button2({
23
23
  }, forwardedRef) {
24
24
  const size = useControlSize(sizeProp);
25
25
  const localRef = useRef(null);
26
- const bounceRef = useRef(null);
27
26
  const waveTimerRef = useRef();
28
27
  useEffect(() => () => {
29
- bounceRef.current?.cancel();
30
28
  window.clearTimeout(waveTimerRef.current);
31
29
  }, []);
32
- function playBounce(button) {
33
- if (!button.animate || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
34
- const current = getComputedStyle(button).scale;
35
- bounceRef.current?.cancel();
36
- const base = getComputedStyle(button).scale;
37
- const [x = 1, y = x] = base === "none" ? [] : base.split(/\s+/).map(Number);
38
- const scaled = (factor) => `${x * factor} ${y * factor}`;
39
- const animation = button.animate([
40
- { scale: current === "none" ? "1" : current, offset: 0 },
41
- // 宽按钮保持等比缩放,以更明显的过冲表现弹性但不改变布局占位。
42
- { scale: scaled(0.9), offset: 0.2 },
43
- { scale: scaled(1.09), offset: 0.52 },
44
- { scale: scaled(0.96), offset: 0.78 },
45
- { scale: scaled(1), offset: 1 }
46
- ], { duration: 320, easing: "cubic-bezier(.3, 0, .25, 1)" });
47
- bounceRef.current = animation;
48
- animation.onfinish = () => {
49
- if (bounceRef.current === animation) bounceRef.current = null;
50
- };
51
- }
52
30
  function setRef(node) {
53
31
  localRef.current = node;
54
32
  if (typeof forwardedRef === "function") forwardedRef(node);
@@ -57,7 +35,6 @@ var Button = forwardRef(function Button2({
57
35
  function handleClick(event) {
58
36
  const button = localRef.current;
59
37
  if (disabled || loading) return;
60
- if (button) playBounce(button);
61
38
  if (button && variant === "primary") {
62
39
  const rect = button.getBoundingClientRect();
63
40
  button.style.setProperty("--sia-wave-x", `${event.detail === 0 ? button.offsetWidth / 2 : (event.clientX - rect.left) * button.offsetWidth / rect.width}px`);
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  Select
3
- } from "./chunk-ORSQAJ22.js";
3
+ } from "./chunk-4PYHSNRA.js";
4
4
  import {
5
5
  Icon
6
- } from "./chunk-JRXYM5YH.js";
6
+ } from "./chunk-YHVFLSZW.js";
7
7
  import {
8
8
  useFloatingPlaceholder
9
- } from "./chunk-ETQJ2DQ2.js";
9
+ } from "./chunk-YO5OJQEH.js";
10
10
  import {
11
11
  FloatingScrollbarProvider,
12
12
  PopupPortal,
13
13
  useControlSize,
14
14
  useControllableState,
15
15
  withTitleTooltip
16
- } from "./chunk-4OHS7RXE.js";
16
+ } from "./chunk-SRWUDTCS.js";
17
17
 
18
18
  // src/components/DatePicker.tsx
19
19
  import { useEffect, useId, useLayoutEffect as useLayoutEffect2, useMemo, useRef as useRef2, useState } from "react";
@@ -487,6 +487,7 @@ function startFloatingScrollbars(targetRef) {
487
487
  const onResize = () => scheduleScan();
488
488
  window.addEventListener("resize", onResize);
489
489
  window.addEventListener("scroll", scheduleUpdateAll, true);
490
+ window.addEventListener("sia-overlay-motion-end", scheduleUpdateAll);
490
491
  scheduleScan();
491
492
  return () => {
492
493
  releaseProximity();
@@ -494,6 +495,7 @@ function startFloatingScrollbars(targetRef) {
494
495
  resizeObserver.disconnect();
495
496
  window.removeEventListener("resize", onResize);
496
497
  window.removeEventListener("scroll", scheduleUpdateAll, true);
498
+ window.removeEventListener("sia-overlay-motion-end", scheduleUpdateAll);
497
499
  if (scanFrame) window.cancelAnimationFrame(scanFrame);
498
500
  if (updateFrame) window.cancelAnimationFrame(updateFrame);
499
501
  entries.forEach((entry) => entry.cleanup());
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  Popover,
3
3
  Tooltip
4
- } from "./chunk-ORSQAJ22.js";
4
+ } from "./chunk-4PYHSNRA.js";
5
5
  import {
6
6
  Dropdown
7
- } from "./chunk-WCYVBO2N.js";
7
+ } from "./chunk-EZTF5TA2.js";
8
8
  import {
9
9
  TextArea
10
- } from "./chunk-LKLPCYEP.js";
10
+ } from "./chunk-NRLIOMXY.js";
11
11
  import {
12
12
  Icon,
13
13
  useOverlayLifecycle
14
- } from "./chunk-JRXYM5YH.js";
14
+ } from "./chunk-YHVFLSZW.js";
15
15
  import {
16
16
  Button
17
- } from "./chunk-7SEGBB6V.js";
17
+ } from "./chunk-PU2V3VB5.js";
18
18
  import {
19
19
  useControlSize,
20
20
  useControllableState,
21
21
  useOverlayMotion,
22
22
  withTitleTooltip
23
- } from "./chunk-4OHS7RXE.js";
23
+ } from "./chunk-SRWUDTCS.js";
24
24
 
25
25
  // src/components/Toolbar.tsx
26
26
  import { useLayoutEffect, useRef, useState } from "react";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  Dropdown,
3
3
  Input
4
- } from "./chunk-WCYVBO2N.js";
4
+ } from "./chunk-EZTF5TA2.js";
5
5
  import {
6
6
  Icon
7
- } from "./chunk-JRXYM5YH.js";
7
+ } from "./chunk-YHVFLSZW.js";
8
8
  import {
9
9
  Button
10
- } from "./chunk-7SEGBB6V.js";
10
+ } from "./chunk-PU2V3VB5.js";
11
11
  import {
12
12
  useFloatingPlaceholder
13
- } from "./chunk-ETQJ2DQ2.js";
13
+ } from "./chunk-YO5OJQEH.js";
14
14
  import {
15
15
  withTitleTooltip
16
- } from "./chunk-4OHS7RXE.js";
16
+ } from "./chunk-SRWUDTCS.js";
17
17
 
18
18
  // src/components/RichTextEditor.tsx
19
19
  import { useEffect, useMemo, useRef, useState } from "react";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  useFloatingPlaceholder
3
- } from "./chunk-ETQJ2DQ2.js";
3
+ } from "./chunk-YO5OJQEH.js";
4
4
  import {
5
5
  withTitleTooltip
6
- } from "./chunk-4OHS7RXE.js";
6
+ } from "./chunk-SRWUDTCS.js";
7
7
 
8
8
  // src/components/MarkdownEditor.tsx
9
9
  import { useEffect, useRef, useState } from "react";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Button
3
- } from "./chunk-7SEGBB6V.js";
3
+ } from "./chunk-PU2V3VB5.js";
4
4
  import {
5
5
  useOverlayMotion,
6
6
  withTitleTooltip
7
- } from "./chunk-4OHS7RXE.js";
7
+ } from "./chunk-SRWUDTCS.js";
8
8
 
9
9
  // src/components/Icon.tsx
10
10
  import { forwardRef } from "react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  usePlaceholderMode
3
- } from "./chunk-4OHS7RXE.js";
3
+ } from "./chunk-SRWUDTCS.js";
4
4
 
5
5
  // src/components/FloatingPlaceholder.tsx
6
6
  import { jsx } from "react/jsx-runtime";
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, HTMLAttributes, CSSProperties, MouseEvent, ReactElement, ImgHTMLAttributes, InputHTMLAttributes, MouseEventHandler, AnchorHTMLAttributes, ButtonHTMLAttributes, RefObject } from 'react';
3
- import { B as ButtonProps, b as Button } from './Button-C8W8ZHWV.js';
3
+ import { B as ButtonProps, b as Button } from './Button-B59TIes7.js';
4
4
  import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './shared-Bx4B28Wh.js';
5
- import './Select-CTSd8zum.js';
5
+ import './Select-Wolx4zNc.js';
6
6
 
7
7
  /** 单个工具栏操作及其下拉菜单。 */
8
8
  interface ToolbarItem {
@@ -74,7 +74,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
74
74
  /** 主体之外的补充内容或操作区。 */
75
75
  extra?: ReactNode;
76
76
  /**
77
- * 点击卡片非交互区域切换选中,支持 Enter 和空格键;选中时显示主题色浅背景及右上角三角勾选标记。
77
+ * 点击卡片非交互区域切换选中,支持 Enter 和空格键;悬停时底色加深,鼠标按下时进一步加深并缩小至 98%,内部独立控件不触发整卡按压。选中时显示主题色浅背景及右上角三角勾选标记;禁用时不显示交互反馈,减少动态效果时仅保留颜色反馈。
78
78
  * @defaultValue false
79
79
  */
80
80
  selectable?: boolean;
@@ -99,7 +99,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
99
99
  disabled?: boolean;
100
100
  /** 用户切换选中时通知新的布尔状态;禁用时不触发。 */
101
101
  onSelectedChange?: (selected: boolean) => void;
102
- /** 点击卡片非交互区域或聚焦卡片后按 Enter/空格时执行;提供后使用按钮语义和框架交互样式。disabled 为 true 或 selectable 为 true 时不触发,内部按钮、链接及表单控件保持独立操作。 */
102
+ /** 点击卡片非交互区域或聚焦卡片后按 Enter/空格时执行;提供后使用按钮语义,悬停混入主题色,鼠标按下加深并缩小至 98%,键盘聚焦显示轮廓。减少动态效果时保留颜色反馈并取消缩放和过渡。disabled 为 true 或 selectable 为 true 时不触发,内部按钮、链接及表单控件保持独立操作。 */
103
103
  onAction?: () => void;
104
104
  /** 鼠标移入或键盘聚焦卡片时从底部滑入的操作区;触屏设备始终显示。 */
105
105
  hoverActions?: ReactNode;
@@ -2470,7 +2470,7 @@ interface FloatingScrollbarProviderProps {
2470
2470
  /** 仅接管指定容器;不传时接管页面中的滚动容器。 */
2471
2471
  targetRef?: RefObject<HTMLElement | null>;
2472
2472
  }
2473
- /** 为页面或指定容器接入不占布局空间的浮动滚动条,悬停、滚动和拖动时显示,离开后自动隐藏;默认入口自动启用,显式全局 Provider 可暂停接管。原生标记只跳过容器自身,内部滚动容器仍独立接管;Table 视口保留其专用轨道。 */
2473
+ /** 为页面或指定容器接入不占布局空间的浮动滚动条,悬停、滚动和拖动时显示,离开后自动隐藏;框架弹层动画结束后自动校准位置,无需滚动触发。默认入口自动启用,显式全局 Provider 可暂停接管。原生标记只跳过容器自身,内部滚动容器仍独立接管;Table 视口保留其专用轨道。 */
2474
2474
  declare function FloatingScrollbarProvider({ disabled, targetRef }: FloatingScrollbarProviderProps): null;
2475
2475
 
2476
2476
  export { type MenuClickInfo as $, type FloatButtonGroupProps as A, type BadgeProps as B, Calendar as C, Dropdown as D, type FloatButtonProps as E, FILLED_ICON_NAMES as F, type FloatButtonShape as G, type FloatingPlacement as H, FloatingScrollbarProvider as I, type FloatingScrollbarProviderProps as J, type FloatingTrigger as K, ICON_NAMES as L, Icon as M, type IconName as N, type IconProps as O, type IconVariant as P, Image as Q, ImagePreview as R, type ImagePreviewConfig as S, type TagStatus as T, ImagePreviewGroup as U, type ImagePreviewGroupProps as V, type ImagePreviewProps as W, type ImageProps as X, Input as Y, type InputProps as Z, Menu as _, Badge as a, type TypographyLinkProps as a$, type MenuItem as a0, type MenuMode as a1, type MenuProps as a2, type MenuTheme as a3, type MessageConfig as a4, type MessageHandle as a5, type MessageKey as a6, type MessageType as a7, type NotificationConfig as a8, type NotificationPlacement as a9, Tabs as aA, type TabsContextMenuClickInfo as aB, type TabsOrientation as aC, type TabsPosition as aD, type TabsProps as aE, type TabsType as aF, Tag as aG, type TagProps as aH, type TagSize as aI, type TagVariant as aJ, Timeline as aK, type TimelineItem as aL, type TimelineProps as aM, Toolbar as aN, type ToolbarItem as aO, type ToolbarProps as aP, Tooltip as aQ, type TooltipProps as aR, Tour as aS, type TourProps as aT, type TourStep as aU, Tree as aV, type TreeDropPosition as aW, type TreeKey as aX, type TreeNode as aY, type TreeProps as aZ, Typography as a_, type NotificationType as aa, Popconfirm as ab, type PopconfirmProps as ac, Popover as ad, type PopoverProps as ae, Progress as af, type ProgressProps as ag, type ProgressStatus as ah, Rate as ai, type RateProps as aj, Result as ak, type ResultProps as al, type ResultStatus as am, Segmented as an, type SegmentedOption as ao, type SegmentedProps as ap, type SegmentedValue as aq, Skeleton as ar, type SkeletonProps as as, Spin as at, type SpinProps as au, type StepItem as av, type StepStatus as aw, Steps as ax, type StepsProps as ay, type TabItem as az, type BadgeRibbonProps as b, type TypographyProps as b0, type TypographyTitleProps as b1, type TypographyType as b2, Upload as b3, type UploadChangeInfo as b4, type UploadDraggerProps as b5, type UploadFile as b6, type UploadFileStatus as b7, type UploadHttpRequest as b8, type UploadItemActions as b9, type UploadProps as ba, type UploadRef as bb, type UploadRejectInfo as bc, type UploadRequestHandle as bd, type UploadRequestOptions as be, Watermark as bf, type WatermarkFont as bg, type WatermarkProps as bh, message as bi, notification as bj, type BadgeStatus as c, Breadcrumb as d, type BreadcrumbItem as e, type BreadcrumbProps as f, type CalendarProps as g, Card as h, type CardAccent as i, type CardProps as j, Carousel as k, type CarouselProps as l, type CarouselRef as m, Collapse as n, type CollapseItem as o, type CollapseKey as p, type CollapseProps as q, type DropdownButtonProps as r, type DropdownMenuProps as s, type DropdownOpenSource as t, type DropdownPlacement as u, type DropdownProps as v, type DropdownTrigger as w, type FilledIconName as x, FloatButton as y, type FloatButtonBackTopProps as z };
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, HTMLAttributes, CSSProperties, MouseEvent, ReactElement, ImgHTMLAttributes, InputHTMLAttributes, MouseEventHandler, AnchorHTMLAttributes, ButtonHTMLAttributes, RefObject } from 'react';
3
- import { B as ButtonProps, b as Button } from './Button-CxKBjLda.cjs';
3
+ import { B as ButtonProps, b as Button } from './Button-xLR4Yt57.cjs';
4
4
  import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './shared-Bx4B28Wh.cjs';
5
- import './Select-bKLket9n.cjs';
5
+ import './Select-DKfT3fJR.cjs';
6
6
 
7
7
  /** 单个工具栏操作及其下拉菜单。 */
8
8
  interface ToolbarItem {
@@ -74,7 +74,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
74
74
  /** 主体之外的补充内容或操作区。 */
75
75
  extra?: ReactNode;
76
76
  /**
77
- * 点击卡片非交互区域切换选中,支持 Enter 和空格键;选中时显示主题色浅背景及右上角三角勾选标记。
77
+ * 点击卡片非交互区域切换选中,支持 Enter 和空格键;悬停时底色加深,鼠标按下时进一步加深并缩小至 98%,内部独立控件不触发整卡按压。选中时显示主题色浅背景及右上角三角勾选标记;禁用时不显示交互反馈,减少动态效果时仅保留颜色反馈。
78
78
  * @defaultValue false
79
79
  */
80
80
  selectable?: boolean;
@@ -99,7 +99,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
99
99
  disabled?: boolean;
100
100
  /** 用户切换选中时通知新的布尔状态;禁用时不触发。 */
101
101
  onSelectedChange?: (selected: boolean) => void;
102
- /** 点击卡片非交互区域或聚焦卡片后按 Enter/空格时执行;提供后使用按钮语义和框架交互样式。disabled 为 true 或 selectable 为 true 时不触发,内部按钮、链接及表单控件保持独立操作。 */
102
+ /** 点击卡片非交互区域或聚焦卡片后按 Enter/空格时执行;提供后使用按钮语义,悬停混入主题色,鼠标按下加深并缩小至 98%,键盘聚焦显示轮廓。减少动态效果时保留颜色反馈并取消缩放和过渡。disabled 为 true 或 selectable 为 true 时不触发,内部按钮、链接及表单控件保持独立操作。 */
103
103
  onAction?: () => void;
104
104
  /** 鼠标移入或键盘聚焦卡片时从底部滑入的操作区;触屏设备始终显示。 */
105
105
  hoverActions?: ReactNode;
@@ -2470,7 +2470,7 @@ interface FloatingScrollbarProviderProps {
2470
2470
  /** 仅接管指定容器;不传时接管页面中的滚动容器。 */
2471
2471
  targetRef?: RefObject<HTMLElement | null>;
2472
2472
  }
2473
- /** 为页面或指定容器接入不占布局空间的浮动滚动条,悬停、滚动和拖动时显示,离开后自动隐藏;默认入口自动启用,显式全局 Provider 可暂停接管。原生标记只跳过容器自身,内部滚动容器仍独立接管;Table 视口保留其专用轨道。 */
2473
+ /** 为页面或指定容器接入不占布局空间的浮动滚动条,悬停、滚动和拖动时显示,离开后自动隐藏;框架弹层动画结束后自动校准位置,无需滚动触发。默认入口自动启用,显式全局 Provider 可暂停接管。原生标记只跳过容器自身,内部滚动容器仍独立接管;Table 视口保留其专用轨道。 */
2474
2474
  declare function FloatingScrollbarProvider({ disabled, targetRef }: FloatingScrollbarProviderProps): null;
2475
2475
 
2476
2476
  export { type MenuClickInfo as $, type FloatButtonGroupProps as A, type BadgeProps as B, Calendar as C, Dropdown as D, type FloatButtonProps as E, FILLED_ICON_NAMES as F, type FloatButtonShape as G, type FloatingPlacement as H, FloatingScrollbarProvider as I, type FloatingScrollbarProviderProps as J, type FloatingTrigger as K, ICON_NAMES as L, Icon as M, type IconName as N, type IconProps as O, type IconVariant as P, Image as Q, ImagePreview as R, type ImagePreviewConfig as S, type TagStatus as T, ImagePreviewGroup as U, type ImagePreviewGroupProps as V, type ImagePreviewProps as W, type ImageProps as X, Input as Y, type InputProps as Z, Menu as _, Badge as a, type TypographyLinkProps as a$, type MenuItem as a0, type MenuMode as a1, type MenuProps as a2, type MenuTheme as a3, type MessageConfig as a4, type MessageHandle as a5, type MessageKey as a6, type MessageType as a7, type NotificationConfig as a8, type NotificationPlacement as a9, Tabs as aA, type TabsContextMenuClickInfo as aB, type TabsOrientation as aC, type TabsPosition as aD, type TabsProps as aE, type TabsType as aF, Tag as aG, type TagProps as aH, type TagSize as aI, type TagVariant as aJ, Timeline as aK, type TimelineItem as aL, type TimelineProps as aM, Toolbar as aN, type ToolbarItem as aO, type ToolbarProps as aP, Tooltip as aQ, type TooltipProps as aR, Tour as aS, type TourProps as aT, type TourStep as aU, Tree as aV, type TreeDropPosition as aW, type TreeKey as aX, type TreeNode as aY, type TreeProps as aZ, Typography as a_, type NotificationType as aa, Popconfirm as ab, type PopconfirmProps as ac, Popover as ad, type PopoverProps as ae, Progress as af, type ProgressProps as ag, type ProgressStatus as ah, Rate as ai, type RateProps as aj, Result as ak, type ResultProps as al, type ResultStatus as am, Segmented as an, type SegmentedOption as ao, type SegmentedProps as ap, type SegmentedValue as aq, Skeleton as ar, type SkeletonProps as as, Spin as at, type SpinProps as au, type StepItem as av, type StepStatus as aw, Steps as ax, type StepsProps as ay, type TabItem as az, type BadgeRibbonProps as b, type TypographyProps as b0, type TypographyTitleProps as b1, type TypographyType as b2, Upload as b3, type UploadChangeInfo as b4, type UploadDraggerProps as b5, type UploadFile as b6, type UploadFileStatus as b7, type UploadHttpRequest as b8, type UploadItemActions as b9, type UploadProps as ba, type UploadRef as bb, type UploadRejectInfo as bc, type UploadRequestHandle as bd, type UploadRequestOptions as be, Watermark as bf, type WatermarkFont as bg, type WatermarkProps as bh, message as bi, notification as bj, type BadgeStatus as c, Breadcrumb as d, type BreadcrumbItem as e, type BreadcrumbProps as f, type CalendarProps as g, Card as h, type CardAccent as i, type CardProps as j, Carousel as k, type CarouselProps as l, type CarouselRef as m, Collapse as n, type CollapseItem as o, type CollapseKey as p, type CollapseProps as q, type DropdownButtonProps as r, type DropdownMenuProps as s, type DropdownOpenSource as t, type DropdownPlacement as u, type DropdownProps as v, type DropdownTrigger as w, type FilledIconName as x, FloatButton as y, type FloatButtonBackTopProps as z };
package/dist/core.cjs CHANGED
@@ -529,6 +529,7 @@ function startFloatingScrollbars(targetRef) {
529
529
  const onResize = () => scheduleScan();
530
530
  window.addEventListener("resize", onResize);
531
531
  window.addEventListener("scroll", scheduleUpdateAll, true);
532
+ window.addEventListener("sia-overlay-motion-end", scheduleUpdateAll);
532
533
  scheduleScan();
533
534
  return () => {
534
535
  releaseProximity();
@@ -536,6 +537,7 @@ function startFloatingScrollbars(targetRef) {
536
537
  resizeObserver.disconnect();
537
538
  window.removeEventListener("resize", onResize);
538
539
  window.removeEventListener("scroll", scheduleUpdateAll, true);
540
+ window.removeEventListener("sia-overlay-motion-end", scheduleUpdateAll);
539
541
  if (scanFrame) window.cancelAnimationFrame(scanFrame);
540
542
  if (updateFrame) window.cancelAnimationFrame(updateFrame);
541
543
  entries.forEach((entry) => entry.cleanup());
@@ -1056,32 +1058,10 @@ var Button = (0, import_react6.forwardRef)(function Button2({
1056
1058
  }, forwardedRef) {
1057
1059
  const size = useControlSize(sizeProp);
1058
1060
  const localRef = (0, import_react6.useRef)(null);
1059
- const bounceRef = (0, import_react6.useRef)(null);
1060
1061
  const waveTimerRef = (0, import_react6.useRef)();
1061
1062
  (0, import_react6.useEffect)(() => () => {
1062
- bounceRef.current?.cancel();
1063
1063
  window.clearTimeout(waveTimerRef.current);
1064
1064
  }, []);
1065
- function playBounce(button) {
1066
- if (!button.animate || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
1067
- const current = getComputedStyle(button).scale;
1068
- bounceRef.current?.cancel();
1069
- const base = getComputedStyle(button).scale;
1070
- const [x = 1, y = x] = base === "none" ? [] : base.split(/\s+/).map(Number);
1071
- const scaled = (factor) => `${x * factor} ${y * factor}`;
1072
- const animation = button.animate([
1073
- { scale: current === "none" ? "1" : current, offset: 0 },
1074
- // 宽按钮保持等比缩放,以更明显的过冲表现弹性但不改变布局占位。
1075
- { scale: scaled(0.9), offset: 0.2 },
1076
- { scale: scaled(1.09), offset: 0.52 },
1077
- { scale: scaled(0.96), offset: 0.78 },
1078
- { scale: scaled(1), offset: 1 }
1079
- ], { duration: 320, easing: "cubic-bezier(.3, 0, .25, 1)" });
1080
- bounceRef.current = animation;
1081
- animation.onfinish = () => {
1082
- if (bounceRef.current === animation) bounceRef.current = null;
1083
- };
1084
- }
1085
1065
  function setRef(node) {
1086
1066
  localRef.current = node;
1087
1067
  if (typeof forwardedRef === "function") forwardedRef(node);
@@ -1090,7 +1070,6 @@ var Button = (0, import_react6.forwardRef)(function Button2({
1090
1070
  function handleClick(event) {
1091
1071
  const button = localRef.current;
1092
1072
  if (disabled || loading) return;
1093
- if (button) playBounce(button);
1094
1073
  if (button && variant === "primary") {
1095
1074
  const rect = button.getBoundingClientRect();
1096
1075
  button.style.setProperty("--sia-wave-x", `${event.detail === 0 ? button.offsetWidth / 2 : (event.clientX - rect.left) * button.offsetWidth / rect.width}px`);
package/dist/core.css CHANGED
@@ -2553,7 +2553,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
2553
2553
  .sia-card {
2554
2554
  --sia-card-accent: var(--sia-color-primary);
2555
2555
  color: var(--sia-color-text);
2556
- background: var(--sia-color-surface);
2556
+ background: var(--sia-card-background, var(--sia-color-surface));
2557
2557
  border: 1px solid color-mix(in srgb, var(--sia-color-border) 75%, var(--sia-color-surface));
2558
2558
  border-radius: var(--sia-radius);
2559
2559
  }
@@ -2637,6 +2637,29 @@ fieldset:disabled .sia-input-number__floating-placeholder {
2637
2637
  .sia-card--actionable {
2638
2638
  cursor: pointer;
2639
2639
  }
2640
+ .sia-card--actionable:not([aria-disabled=true]) {
2641
+ transition:
2642
+ background-color 140ms ease,
2643
+ border-color 140ms ease,
2644
+ transform 100ms ease;
2645
+ }
2646
+ .sia-card--actionable:not([aria-disabled=true]):hover {
2647
+ background: color-mix(in srgb, var(--sia-color-primary) 8%, var(--sia-card-background, var(--sia-color-surface)));
2648
+ border-color: color-mix(in srgb, var(--sia-color-primary) 35%, var(--sia-color-border));
2649
+ }
2650
+ .sia-card--actionable:not([aria-disabled=true]):active:not(:has(button:active, a:active, input:active, select:active, textarea:active, [contenteditable=true]:active)) {
2651
+ background: color-mix(in srgb, var(--sia-color-primary) 16%, var(--sia-card-background, var(--sia-color-surface)));
2652
+ border-color: var(--sia-color-primary);
2653
+ transform: scale(.98);
2654
+ }
2655
+ @media (prefers-reduced-motion: reduce) {
2656
+ .sia-card--actionable:not([aria-disabled=true]) {
2657
+ transition: none;
2658
+ }
2659
+ .sia-card--actionable:not([aria-disabled=true]):active {
2660
+ transform: none;
2661
+ }
2662
+ }
2640
2663
  .sia-card--selectable[data-sia-interaction-cursor=default],
2641
2664
  .sia-card--actionable[data-sia-interaction-cursor=default] {
2642
2665
  cursor: default;
@@ -2693,6 +2716,33 @@ fieldset:disabled .sia-input-number__floating-placeholder {
2693
2716
  border-color: var(--sia-color-primary);
2694
2717
  box-shadow: inset 0 0 0 1px var(--sia-color-primary);
2695
2718
  }
2719
+ .sia-card--selectable:not([aria-disabled=true]) {
2720
+ transition:
2721
+ background-color 140ms ease,
2722
+ border-color 140ms ease,
2723
+ transform 100ms ease;
2724
+ }
2725
+ .sia-card--selectable:not([aria-disabled=true]):hover {
2726
+ background: color-mix(in srgb, var(--sia-color-primary) 8%, var(--sia-card-background, var(--sia-color-surface)));
2727
+ border-color: color-mix(in srgb, var(--sia-color-primary) 35%, var(--sia-color-border));
2728
+ }
2729
+ .sia-card--selectable.sia-card--selected:not([aria-disabled=true]):hover {
2730
+ background: color-mix(in srgb, var(--sia-color-primary) 16%, var(--sia-color-surface));
2731
+ border-color: var(--sia-color-primary);
2732
+ }
2733
+ .sia-card--selectable:not([aria-disabled=true]):active:not(:has(button:active, a:active, input:active, select:active, textarea:active, [contenteditable=true]:active)) {
2734
+ background: color-mix(in srgb, var(--sia-color-primary) 24%, var(--sia-card-background, var(--sia-color-surface)));
2735
+ border-color: var(--sia-color-primary);
2736
+ transform: scale(.98);
2737
+ }
2738
+ @media (prefers-reduced-motion: reduce) {
2739
+ .sia-card--selectable:not([aria-disabled=true]) {
2740
+ transition: none;
2741
+ }
2742
+ .sia-card--selectable:not([aria-disabled=true]):active:not(:has(button:active, a:active, input:active, select:active, textarea:active, [contenteditable=true]:active)) {
2743
+ transform: none;
2744
+ }
2745
+ }
2696
2746
  .sia-card.sia-card--borderless {
2697
2747
  border: 0;
2698
2748
  box-shadow: none;
@@ -5634,6 +5684,29 @@ fieldset:disabled .sia-input-number__floating-placeholder {
5634
5684
  .sia-query-form__fields {
5635
5685
  position: relative;
5636
5686
  }
5687
+ .sia-virtual-grid {
5688
+ position: relative;
5689
+ flex: 1;
5690
+ height: 100%;
5691
+ min-width: 0;
5692
+ min-height: 0;
5693
+ overflow: auto;
5694
+ overscroll-behavior: contain;
5695
+ overflow-anchor: none;
5696
+ }
5697
+ .sia-virtual-grid__spacer {
5698
+ position: relative;
5699
+ width: 100%;
5700
+ }
5701
+ .sia-virtual-grid__row {
5702
+ position: absolute;
5703
+ inset-inline: 0;
5704
+ display: grid;
5705
+ }
5706
+ .sia-virtual-grid__item {
5707
+ min-width: 0;
5708
+ height: 100%;
5709
+ }
5637
5710
 
5638
5711
  /* src/overlay-borders.css */
5639
5712
  .sia-select__dropdown.sia-select__dropdown,