@sia.soul/sia-react-ui 0.1.134 → 0.1.136

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.
package/dist/index.cjs CHANGED
@@ -13849,14 +13849,9 @@ function playCellFocusGlow(cell, isVisible, onFinish) {
13849
13849
  const glow = document.createElementNS(namespace, "svg");
13850
13850
  glow.classList.add("sia-table__cell-focus-glow");
13851
13851
  glow.setAttribute("aria-hidden", "true");
13852
- const paths = [12, 6, 2].map((length) => {
13853
- const path = document.createElementNS(namespace, "path");
13854
- path.setAttribute("pathLength", "100");
13855
- path.style.setProperty("--sia-cell-focus-tail", String(length));
13856
- path.setAttribute("stroke-dasharray", `${length} ${100 - length}`);
13857
- glow.appendChild(path);
13858
- return path;
13859
- });
13852
+ const path = document.createElementNS(namespace, "path");
13853
+ path.setAttribute("pathLength", "100");
13854
+ glow.appendChild(path);
13860
13855
  let frame = 0, disposed = false;
13861
13856
  const cleanup2 = () => {
13862
13857
  if (disposed) return;
@@ -13872,7 +13867,7 @@ function playCellFocusGlow(cell, isVisible, onFinish) {
13872
13867
  }
13873
13868
  const rect = cell.getBoundingClientRect();
13874
13869
  Object.assign(glow.style, { left: `${rect.left}px`, top: `${rect.top}px`, width: `${rect.width}px`, height: `${rect.height}px` });
13875
- paths.forEach((path) => path.setAttribute("d", `M 1.5 1.5 H ${rect.width - 1.5} V ${rect.height - 1.5} H 1.5 Z`));
13870
+ path.setAttribute("d", `M 2 2 H ${rect.width - 2} V ${rect.height - 2} H 2 Z`);
13876
13871
  frame = requestAnimationFrame(position);
13877
13872
  };
13878
13873
  position();
package/dist/index.css CHANGED
@@ -11197,24 +11197,18 @@ body > .sia-title-tooltip[data-sia-popup-layer] {
11197
11197
  }
11198
11198
  .sia-table__cell-focus-glow path {
11199
11199
  stroke: #ff303b;
11200
- stroke-width: 3px;
11200
+ stroke-width: 4px;
11201
11201
  stroke-linecap: round;
11202
- opacity: .25;
11203
- filter: drop-shadow(0 0 3px #ff303b);
11204
- animation: sia-table-cell-focus-orbit 900ms linear forwards;
11205
- }
11206
- .sia-table__cell-focus-glow path:nth-child(2) {
11207
- opacity: .6;
11202
+ stroke-dashoffset: 0;
11203
+ filter: drop-shadow(0 0 3px rgb(255 48 59 / 55%));
11204
+ animation: sia-table-cell-focus-grow 900ms linear forwards;
11208
11205
  }
11209
- .sia-table__cell-focus-glow path:nth-child(3) {
11210
- opacity: 1;
11211
- }
11212
- @keyframes sia-table-cell-focus-orbit {
11206
+ @keyframes sia-table-cell-focus-grow {
11213
11207
  from {
11214
- stroke-dashoffset: var(--sia-cell-focus-tail);
11208
+ stroke-dasharray: 0px 100px;
11215
11209
  }
11216
11210
  to {
11217
- stroke-dashoffset: calc(var(--sia-cell-focus-tail) - 100);
11211
+ stroke-dasharray: 100px 0px;
11218
11212
  }
11219
11213
  }
11220
11214
  @keyframes sia-table-cell-focus-fade {
@@ -11233,9 +11227,6 @@ body > .sia-title-tooltip[data-sia-popup-layer] {
11233
11227
  animation: none;
11234
11228
  stroke-dasharray: none;
11235
11229
  }
11236
- .sia-table__cell-focus-glow path:not(:last-child) {
11237
- display: none;
11238
- }
11239
11230
  }
11240
11231
 
11241
11232
  /* src/components/Table/worksheet.css */
package/dist/index.d.cts CHANGED
@@ -2361,9 +2361,9 @@ interface TableRef<T> {
2361
2361
  scrollTo: (options: ScrollToOptions) => void;
2362
2362
  /** 按 rowKey 定位当前筛选、排序、分页及树展开后列表中的行,仅在该行被遮挡时立即纵向滚动,使其避开吸顶表头和合计行;支持虚拟列表,不改变横向位置或焦点。返回是否找到目标且视口可见;目标被筛掉、位于其他页、表格隐藏或未挂载时返回 false,不自动切页。应在数据提交和弹框显示后调用。 */
2363
2363
  scrollToRow: (key: TableKey) => boolean;
2364
- /** 按稳定行键和叶子列键定位单元格,横纵滚动避开吸顶表头、固定列及合计行,选中并聚焦但不进入编辑。等待虚拟行挂载、位置稳定且整格在可视区后返回成功,再由顶层浮层沿边框顺时针播放一圈红色流光渐隐(绕行约 900 毫秒,随后 200 毫秒消失);不拦截操作,减少动态效果时仅红框淡出。隐藏列、其它页、无法完整显示的单元格、不可见表格或被后续定位取代时返回 false,不自动切页或显示隐藏列。应在数据更新及弹框关闭动画完成后调用;再次定位、目标滚出可视区或卸载会清理动效。 */
2364
+ /** 按稳定行键和叶子列键定位单元格,横纵滚动避开吸顶表头、固定列及合计行,选中并聚焦但不进入编辑。等待虚拟行挂载、位置稳定且整格在可视区后返回成功,再由顶层浮层从左上角沿边框顺时针增长红线:尾端固定,约 900 毫秒围满一圈,随后 200 毫秒渐隐消失;不拦截操作,减少动态效果时仅红框淡出。隐藏列、其它页、无法完整显示的单元格、不可见表格或被后续定位取代时返回 false,不自动切页或显示隐藏列。应在数据更新及弹框关闭动画完成后调用;再次定位、目标滚出可视区或卸载会清理动效。 */
2365
2365
  focusCell: (rowKey: TableKey, columnKey: string, options?: {
2366
- /** 是否在目标可见后播放一圈红色边框流光渐隐,默认 true;false 仅滚动、选中和聚焦。 */
2366
+ /** 是否在目标可见后播放尾端固定、沿边框增长一圈的红光渐隐,默认 true;false 仅滚动、选中和聚焦。 */
2367
2367
  highlight?: boolean;
2368
2368
  }) => Promise<boolean>;
2369
2369
  /** 切换加载状态。 */
package/dist/index.d.ts CHANGED
@@ -2361,9 +2361,9 @@ interface TableRef<T> {
2361
2361
  scrollTo: (options: ScrollToOptions) => void;
2362
2362
  /** 按 rowKey 定位当前筛选、排序、分页及树展开后列表中的行,仅在该行被遮挡时立即纵向滚动,使其避开吸顶表头和合计行;支持虚拟列表,不改变横向位置或焦点。返回是否找到目标且视口可见;目标被筛掉、位于其他页、表格隐藏或未挂载时返回 false,不自动切页。应在数据提交和弹框显示后调用。 */
2363
2363
  scrollToRow: (key: TableKey) => boolean;
2364
- /** 按稳定行键和叶子列键定位单元格,横纵滚动避开吸顶表头、固定列及合计行,选中并聚焦但不进入编辑。等待虚拟行挂载、位置稳定且整格在可视区后返回成功,再由顶层浮层沿边框顺时针播放一圈红色流光渐隐(绕行约 900 毫秒,随后 200 毫秒消失);不拦截操作,减少动态效果时仅红框淡出。隐藏列、其它页、无法完整显示的单元格、不可见表格或被后续定位取代时返回 false,不自动切页或显示隐藏列。应在数据更新及弹框关闭动画完成后调用;再次定位、目标滚出可视区或卸载会清理动效。 */
2364
+ /** 按稳定行键和叶子列键定位单元格,横纵滚动避开吸顶表头、固定列及合计行,选中并聚焦但不进入编辑。等待虚拟行挂载、位置稳定且整格在可视区后返回成功,再由顶层浮层从左上角沿边框顺时针增长红线:尾端固定,约 900 毫秒围满一圈,随后 200 毫秒渐隐消失;不拦截操作,减少动态效果时仅红框淡出。隐藏列、其它页、无法完整显示的单元格、不可见表格或被后续定位取代时返回 false,不自动切页或显示隐藏列。应在数据更新及弹框关闭动画完成后调用;再次定位、目标滚出可视区或卸载会清理动效。 */
2365
2365
  focusCell: (rowKey: TableKey, columnKey: string, options?: {
2366
- /** 是否在目标可见后播放一圈红色边框流光渐隐,默认 true;false 仅滚动、选中和聚焦。 */
2366
+ /** 是否在目标可见后播放尾端固定、沿边框增长一圈的红光渐隐,默认 true;false 仅滚动、选中和聚焦。 */
2367
2367
  highlight?: boolean;
2368
2368
  }) => Promise<boolean>;
2369
2369
  /** 切换加载状态。 */
package/dist/index.js CHANGED
@@ -5704,14 +5704,9 @@ function playCellFocusGlow(cell, isVisible, onFinish) {
5704
5704
  const glow = document.createElementNS(namespace, "svg");
5705
5705
  glow.classList.add("sia-table__cell-focus-glow");
5706
5706
  glow.setAttribute("aria-hidden", "true");
5707
- const paths = [12, 6, 2].map((length) => {
5708
- const path = document.createElementNS(namespace, "path");
5709
- path.setAttribute("pathLength", "100");
5710
- path.style.setProperty("--sia-cell-focus-tail", String(length));
5711
- path.setAttribute("stroke-dasharray", `${length} ${100 - length}`);
5712
- glow.appendChild(path);
5713
- return path;
5714
- });
5707
+ const path = document.createElementNS(namespace, "path");
5708
+ path.setAttribute("pathLength", "100");
5709
+ glow.appendChild(path);
5715
5710
  let frame = 0, disposed = false;
5716
5711
  const cleanup = () => {
5717
5712
  if (disposed) return;
@@ -5727,7 +5722,7 @@ function playCellFocusGlow(cell, isVisible, onFinish) {
5727
5722
  }
5728
5723
  const rect = cell.getBoundingClientRect();
5729
5724
  Object.assign(glow.style, { left: `${rect.left}px`, top: `${rect.top}px`, width: `${rect.width}px`, height: `${rect.height}px` });
5730
- paths.forEach((path) => path.setAttribute("d", `M 1.5 1.5 H ${rect.width - 1.5} V ${rect.height - 1.5} H 1.5 Z`));
5725
+ path.setAttribute("d", `M 2 2 H ${rect.width - 2} V ${rect.height - 2} H 2 Z`);
5731
5726
  frame = requestAnimationFrame(position);
5732
5727
  };
5733
5728
  position();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sia.soul/sia-react-ui",
3
- "version": "0.1.134",
3
+ "version": "0.1.136",
4
4
  "description": "Sia Design components and tokens for React",
5
5
  "publishConfig": {
6
6
  "access": "public",