@sia.soul/sia-react-ui 0.1.139 → 0.1.142

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Popover,
3
3
  Tooltip
4
- } from "./chunk-436QH6XH.js";
4
+ } from "./chunk-PGP4TEPP.js";
5
5
  import {
6
6
  Dropdown
7
7
  } from "./chunk-UVHC6OEX.js";
@@ -255,7 +255,8 @@ function Tabs({
255
255
  onAfterChange,
256
256
  deferContent = false,
257
257
  type = "line",
258
- indicatorMotion = type === "line" || type === "underline" ? "stretch" : "slide",
258
+ indicatorMotion = type === "line" || type === "underline" || type === "rounded" ? "stretch" : "slide",
259
+ indicatorPosition,
259
260
  size = "medium",
260
261
  tabPosition,
261
262
  orientation = "horizontal",
@@ -279,7 +280,9 @@ function Tabs({
279
280
  const enabledItems = useMemo(() => items.filter((item) => !item.disabled), [items]);
280
281
  const resolvedPosition = tabPosition ?? (orientation === "vertical" ? "left" : "top");
281
282
  const resolvedOrientation = resolvedPosition === "left" || resolvedPosition === "right" ? "vertical" : "horizontal";
282
- const sliding = ["capsule", "line", "underline", "tech", "tech-line"].includes(type);
283
+ const defaultIndicatorPosition = { top: "bottom", bottom: "top", left: "right", right: "left" }[resolvedPosition];
284
+ const resolvedIndicatorPosition = indicatorPosition && (resolvedOrientation === "vertical" ? ["left", "right"] : ["top", "bottom"]).includes(indicatorPosition) ? indicatorPosition : defaultIndicatorPosition;
285
+ const sliding = ["capsule", "line", "underline", "rounded", "tech", "tech-line"].includes(type);
283
286
  const listRef = useRef2(null);
284
287
  const indicatorRef = useRef2(null);
285
288
  const indicatorTargetRef = useRef2();
@@ -341,7 +344,11 @@ function Tabs({
341
344
  return;
342
345
  }
343
346
  const listRect = list.getBoundingClientRect();
344
- const rect = active.getBoundingClientRect();
347
+ const tabRect = active.getBoundingClientRect();
348
+ const vertical = resolvedOrientation === "vertical";
349
+ const width = type === "rounded" && !vertical ? Math.min(24, tabRect.width) : tabRect.width;
350
+ const height = type === "rounded" && vertical ? Math.min(16, tabRect.height) : tabRect.height;
351
+ const rect = { left: tabRect.left + (tabRect.width - width) / 2, top: tabRect.top + (tabRect.height - height) / 2, width, height };
345
352
  const x = rect.left - listRect.left - list.clientLeft + list.scrollLeft;
346
353
  const y = rect.top - listRect.top - list.clientTop + list.scrollTop;
347
354
  const previous = indicatorTargetRef.current;
@@ -360,7 +367,6 @@ function Tabs({
360
367
  if (indicatorMotion === "stretch" && previous?.node === indicator && previous.key !== selectedKey && previous.position === resolvedPosition && !window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
361
368
  const fromX = current.left - listRect.left - list.clientLeft + list.scrollLeft;
362
369
  const fromY = current.top - listRect.top - list.clientTop + list.scrollTop;
363
- const vertical = resolvedOrientation === "vertical";
364
370
  const start = vertical ? Math.min(fromY, y) : Math.min(fromX, x);
365
371
  const end = vertical ? Math.max(fromY + current.height, y + rect.height) : Math.max(fromX + current.width, x + rect.width);
366
372
  indicator.animate([
@@ -453,7 +459,7 @@ function Tabs({
453
459
  type === "tech-line" ? /* @__PURE__ */ jsx4("svg", { className: "sia-tabs__title-connector", viewBox: "0 0 32 40", "aria-hidden": "true", children: /* @__PURE__ */ jsx4("path", { d: "M0 39.25 H5 Q8 39.25 10 35.25 L28 3.75 Q29 1.75 32 1.75", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }) : null
454
460
  ] }) : null,
455
461
  /* @__PURE__ */ jsxs4("div", { ref: listRef, style: resolvedOrientation === "horizontal" && overflow.width ? { width: overflow.width } : void 0, className: `sia-tabs__list${sliding ? " sia-tabs__list--sliding" : ""}`, role: "tablist", "aria-orientation": resolvedOrientation, children: [
456
- sliding ? /* @__PURE__ */ jsx4("span", { ref: indicatorRef, className: `sia-tabs__indicator${indicatorMotion === "stretch" ? " sia-tabs__indicator--stretch" : ""}${type === "capsule" ? " sia-tabs__capsule-indicator" : ""}`, "aria-hidden": "true", children: type === "tech-line" ? /* @__PURE__ */ jsx4("span", { className: "sia-tabs__indicator-shape", "aria-hidden": "true" }) : null }, `${type}-${indicatorMotion}`) : null,
462
+ sliding ? /* @__PURE__ */ jsx4("span", { ref: indicatorRef, "data-indicator-position": resolvedIndicatorPosition, className: `sia-tabs__indicator${indicatorMotion === "stretch" ? " sia-tabs__indicator--stretch" : ""}${type === "capsule" ? " sia-tabs__capsule-indicator" : ""}`, "aria-hidden": "true", children: type === "tech-line" ? /* @__PURE__ */ jsx4("span", { className: "sia-tabs__indicator-shape", "aria-hidden": "true" }) : null }, `${type}-${indicatorMotion}`) : null,
457
463
  items.map((item, index) => {
458
464
  const selected = item.key === selectedKey;
459
465
  const canClose = item.closable ?? closable;
@@ -28,9 +28,10 @@ import {
28
28
  import { createContext, forwardRef, useContext, useEffect, useId, useMemo, useRef } from "react";
29
29
  import { jsx, jsxs } from "react/jsx-runtime";
30
30
  var CheckboxGroupContext = createContext(null);
31
- var CheckboxRoot = forwardRef(function Checkbox({ value, size: sizeProp, indeterminate = false, children, disabled, checked, defaultChecked, className = "", onChange, ...props }, forwardedRef) {
31
+ var CheckboxRoot = forwardRef(function Checkbox({ value, size: sizeProp, shape: shapeProp, indeterminate = false, children, disabled, checked, defaultChecked, className = "", onChange, ...props }, forwardedRef) {
32
32
  const size = useControlSize(sizeProp);
33
33
  const group = useContext(CheckboxGroupContext);
34
+ const shape = shapeProp ?? group?.shape ?? "square";
34
35
  const localRef = useRef(null);
35
36
  const fallbackId = useId();
36
37
  const grouped = group !== null && value !== void 0;
@@ -43,7 +44,7 @@ var CheckboxRoot = forwardRef(function Checkbox({ value, size: sizeProp, indeter
43
44
  if (typeof forwardedRef === "function") forwardedRef(node);
44
45
  else if (forwardedRef) forwardedRef.current = node;
45
46
  }
46
- return /* @__PURE__ */ jsxs("label", { className: `sia-checkbox sia-checkbox--${size}${disabled || group?.disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
47
+ return /* @__PURE__ */ jsxs("label", { className: `sia-checkbox sia-checkbox--${size} sia-checkbox--${shape}${disabled || group?.disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
47
48
  /* @__PURE__ */ jsx(
48
49
  "input",
49
50
  {
@@ -69,6 +70,7 @@ var CheckboxRoot = forwardRef(function Checkbox({ value, size: sizeProp, indeter
69
70
  });
70
71
  function CheckboxGroup({
71
72
  size: sizeProp,
73
+ shape = "square",
72
74
  columns,
73
75
  direction = "horizontal",
74
76
  gap,
@@ -89,6 +91,7 @@ function CheckboxGroup({
89
91
  };
90
92
  const [values, setValues] = useControllableState({ value, defaultValue, onChange });
91
93
  const context = useMemo(() => ({
94
+ shape,
92
95
  values,
93
96
  disabled,
94
97
  name,
@@ -96,7 +99,7 @@ function CheckboxGroup({
96
99
  const next = checked ? values.includes(optionValue) ? values : [...values, optionValue] : values.filter((item) => item !== optionValue);
97
100
  setValues(next);
98
101
  }
99
- }), [disabled, name, setValues, values]);
102
+ }), [disabled, name, setValues, values, shape]);
100
103
  return /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ jsxs("div", { className: `sia-checkbox-group${gridColumns ? " sia-checkbox-group--grid" : direction === "vertical" ? " sia-checkbox-group--vertical" : ""} ${className}`.trim(), style: layoutStyle, role: "group", children: [
101
104
  options?.map((option) => {
102
105
  const normalized = typeof option === "object" ? option : { label: String(option), value: option };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FloatingScrollbarProvider,
3
3
  Select
4
- } from "./chunk-436QH6XH.js";
4
+ } from "./chunk-PGP4TEPP.js";
5
5
  import {
6
6
  Icon
7
7
  } from "./chunk-PQBCD54U.js";
@@ -766,7 +766,7 @@ interface TabItem {
766
766
  closable?: boolean;
767
767
  }
768
768
  /** 选项卡的类型标识。 */
769
- type TabsType = "line" | "card" | "pill" | "capsule" | "underline" | "tech" | "tech-line";
769
+ type TabsType = "line" | "card" | "pill" | "capsule" | "underline" | "rounded" | "tech" | "tech-line";
770
770
  /** 选项卡沿水平方向或垂直方向排列。 */
771
771
  type TabsOrientation = "horizontal" | "vertical";
772
772
  /** 选项卡导航相对于内容区的位置。 */
@@ -793,12 +793,14 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
793
793
  /** 是否等选中框动画结束后再切换 items[].children,等待期间保留旧面板。默认 false,立即切换;true 时未访问的目标面板在动画结束后首次挂载,连续切换跳过未显示的中间目标。面板是否保留由 destroyInactiveTabPane 决定,与是否延迟无关。不能延迟父组件已执行的同步计算或 onChange 中的渲染,请将外部重内容更新放到 onAfterChange。 */
794
794
  deferContent?: boolean;
795
795
  /**
796
- * 标签样式:line 线型、card 卡片、pill 胶囊、capsule 圆角胶囊、underline 紧凑下划线、tech 科技型、tech-line 折线科技型。
796
+ * 标签样式:line 线型、card 卡片、pill 胶囊、capsule 圆角胶囊、underline 紧凑下划线、rounded 圆角矩形背景配短指示线、tech 科技型、tech-line 折线科技型。
797
797
  * @defaultValue "line"
798
798
  */
799
799
  type?: TabsType;
800
- /** 选中指示器的切换动效:stretch 朝目标方向先拉长再收拢,slide 同步平移并调整尺寸。line、underline 默认 stretch,其余样式默认 slide;card、pill 无独立指示器,不受此项影响。stretch 时长 300ms,首次定位及系统减少动态效果时不播放;支持四个方向,连续切换从当前显示位置续接。 */
800
+ /** 选中指示器的切换动效:stretch 朝目标方向先拉长再收拢,slide 同步平移并调整尺寸。line、underline、rounded 默认 stretch,其余样式默认 slide;card、pill 无独立指示器,不受此项影响。stretch 时长 300ms,首次定位及系统减少动态效果时不播放;支持四个方向,连续切换从当前显示位置续接。 */
801
801
  indicatorMotion?: "slide" | "stretch";
802
+ /** 指示线位于标签的哪一侧,仅适用于 line、underline、rounded。横向标签可选 top / bottom,纵向标签可选 left / right;未指定或传入与排列方向不符的值时,默认朝向内容区(顶部标签为 bottom、底部为 top、左侧为 right、右侧为 left)。只移动指示线,不改变标签栏位置或分隔线;动态修改立即生效,并保留切换动效。 */
803
+ indicatorPosition?: TabsPosition;
802
804
  /**
803
805
  * 组件尺寸;用于调整控件高度、字号和间距。
804
806
  * @defaultValue "medium"
@@ -841,7 +843,7 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
841
843
  onTabContextMenuClick?: (info: TabsContextMenuClickInfo) => void;
842
844
  }
843
845
  /** 选项卡组件;默认仅挂载首次激活的面板,切走后隐藏并保留,显式设置 destroyInactiveTabPane=true 可在切走后卸载。横向空间不足时,剩余标签收起到末尾的更多菜单,支持悬停或点击展开。设置确定高度或由父级弹性布局分配高度时,内容面板占满导航之外的剩余空间;未限定高度时按内容自然撑开。 */
844
- declare function Tabs({ items, activeKey, defaultActiveKey, onChange, onAfterChange, deferContent, type, indicatorMotion, size, tabPosition, orientation, centered, tabBarTitle, tabBarExtraContent, contentGap, destroyInactiveTabPane, closable, onEdit, tabContextMenu, onTabContextMenuClick, className, ...props }: TabsProps): react.JSX.Element;
846
+ declare function Tabs({ items, activeKey, defaultActiveKey, onChange, onAfterChange, deferContent, type, indicatorMotion, indicatorPosition, size, tabPosition, orientation, centered, tabBarTitle, tabBarExtraContent, contentGap, destroyInactiveTabPane, closable, onEdit, tabContextMenu, onTabContextMenuClick, className, ...props }: TabsProps): react.JSX.Element;
845
847
 
846
848
  /** 打开下拉菜单的触发方式。 */
847
849
  type DropdownTrigger = "click" | "hover" | "contextMenu";
@@ -766,7 +766,7 @@ interface TabItem {
766
766
  closable?: boolean;
767
767
  }
768
768
  /** 选项卡的类型标识。 */
769
- type TabsType = "line" | "card" | "pill" | "capsule" | "underline" | "tech" | "tech-line";
769
+ type TabsType = "line" | "card" | "pill" | "capsule" | "underline" | "rounded" | "tech" | "tech-line";
770
770
  /** 选项卡沿水平方向或垂直方向排列。 */
771
771
  type TabsOrientation = "horizontal" | "vertical";
772
772
  /** 选项卡导航相对于内容区的位置。 */
@@ -793,12 +793,14 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
793
793
  /** 是否等选中框动画结束后再切换 items[].children,等待期间保留旧面板。默认 false,立即切换;true 时未访问的目标面板在动画结束后首次挂载,连续切换跳过未显示的中间目标。面板是否保留由 destroyInactiveTabPane 决定,与是否延迟无关。不能延迟父组件已执行的同步计算或 onChange 中的渲染,请将外部重内容更新放到 onAfterChange。 */
794
794
  deferContent?: boolean;
795
795
  /**
796
- * 标签样式:line 线型、card 卡片、pill 胶囊、capsule 圆角胶囊、underline 紧凑下划线、tech 科技型、tech-line 折线科技型。
796
+ * 标签样式:line 线型、card 卡片、pill 胶囊、capsule 圆角胶囊、underline 紧凑下划线、rounded 圆角矩形背景配短指示线、tech 科技型、tech-line 折线科技型。
797
797
  * @defaultValue "line"
798
798
  */
799
799
  type?: TabsType;
800
- /** 选中指示器的切换动效:stretch 朝目标方向先拉长再收拢,slide 同步平移并调整尺寸。line、underline 默认 stretch,其余样式默认 slide;card、pill 无独立指示器,不受此项影响。stretch 时长 300ms,首次定位及系统减少动态效果时不播放;支持四个方向,连续切换从当前显示位置续接。 */
800
+ /** 选中指示器的切换动效:stretch 朝目标方向先拉长再收拢,slide 同步平移并调整尺寸。line、underline、rounded 默认 stretch,其余样式默认 slide;card、pill 无独立指示器,不受此项影响。stretch 时长 300ms,首次定位及系统减少动态效果时不播放;支持四个方向,连续切换从当前显示位置续接。 */
801
801
  indicatorMotion?: "slide" | "stretch";
802
+ /** 指示线位于标签的哪一侧,仅适用于 line、underline、rounded。横向标签可选 top / bottom,纵向标签可选 left / right;未指定或传入与排列方向不符的值时,默认朝向内容区(顶部标签为 bottom、底部为 top、左侧为 right、右侧为 left)。只移动指示线,不改变标签栏位置或分隔线;动态修改立即生效,并保留切换动效。 */
803
+ indicatorPosition?: TabsPosition;
802
804
  /**
803
805
  * 组件尺寸;用于调整控件高度、字号和间距。
804
806
  * @defaultValue "medium"
@@ -841,7 +843,7 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
841
843
  onTabContextMenuClick?: (info: TabsContextMenuClickInfo) => void;
842
844
  }
843
845
  /** 选项卡组件;默认仅挂载首次激活的面板,切走后隐藏并保留,显式设置 destroyInactiveTabPane=true 可在切走后卸载。横向空间不足时,剩余标签收起到末尾的更多菜单,支持悬停或点击展开。设置确定高度或由父级弹性布局分配高度时,内容面板占满导航之外的剩余空间;未限定高度时按内容自然撑开。 */
844
- declare function Tabs({ items, activeKey, defaultActiveKey, onChange, onAfterChange, deferContent, type, indicatorMotion, size, tabPosition, orientation, centered, tabBarTitle, tabBarExtraContent, contentGap, destroyInactiveTabPane, closable, onEdit, tabContextMenu, onTabContextMenuClick, className, ...props }: TabsProps): react.JSX.Element;
846
+ declare function Tabs({ items, activeKey, defaultActiveKey, onChange, onAfterChange, deferContent, type, indicatorMotion, indicatorPosition, size, tabPosition, orientation, centered, tabBarTitle, tabBarExtraContent, contentGap, destroyInactiveTabPane, closable, onEdit, tabContextMenu, onTabContextMenuClick, className, ...props }: TabsProps): react.JSX.Element;
845
847
 
846
848
  /** 打开下拉菜单的触发方式。 */
847
849
  type DropdownTrigger = "click" | "hover" | "contextMenu";
package/dist/core.cjs CHANGED
@@ -2384,7 +2384,8 @@ function Tabs({
2384
2384
  onAfterChange,
2385
2385
  deferContent = false,
2386
2386
  type = "line",
2387
- indicatorMotion = type === "line" || type === "underline" ? "stretch" : "slide",
2387
+ indicatorMotion = type === "line" || type === "underline" || type === "rounded" ? "stretch" : "slide",
2388
+ indicatorPosition,
2388
2389
  size = "medium",
2389
2390
  tabPosition,
2390
2391
  orientation = "horizontal",
@@ -2408,7 +2409,9 @@ function Tabs({
2408
2409
  const enabledItems = (0, import_react11.useMemo)(() => items.filter((item) => !item.disabled), [items]);
2409
2410
  const resolvedPosition = tabPosition ?? (orientation === "vertical" ? "left" : "top");
2410
2411
  const resolvedOrientation = resolvedPosition === "left" || resolvedPosition === "right" ? "vertical" : "horizontal";
2411
- const sliding = ["capsule", "line", "underline", "tech", "tech-line"].includes(type);
2412
+ const defaultIndicatorPosition = { top: "bottom", bottom: "top", left: "right", right: "left" }[resolvedPosition];
2413
+ const resolvedIndicatorPosition = indicatorPosition && (resolvedOrientation === "vertical" ? ["left", "right"] : ["top", "bottom"]).includes(indicatorPosition) ? indicatorPosition : defaultIndicatorPosition;
2414
+ const sliding = ["capsule", "line", "underline", "rounded", "tech", "tech-line"].includes(type);
2412
2415
  const listRef = (0, import_react11.useRef)(null);
2413
2416
  const indicatorRef = (0, import_react11.useRef)(null);
2414
2417
  const indicatorTargetRef = (0, import_react11.useRef)();
@@ -2470,7 +2473,11 @@ function Tabs({
2470
2473
  return;
2471
2474
  }
2472
2475
  const listRect = list.getBoundingClientRect();
2473
- const rect = active.getBoundingClientRect();
2476
+ const tabRect = active.getBoundingClientRect();
2477
+ const vertical = resolvedOrientation === "vertical";
2478
+ const width = type === "rounded" && !vertical ? Math.min(24, tabRect.width) : tabRect.width;
2479
+ const height = type === "rounded" && vertical ? Math.min(16, tabRect.height) : tabRect.height;
2480
+ const rect = { left: tabRect.left + (tabRect.width - width) / 2, top: tabRect.top + (tabRect.height - height) / 2, width, height };
2474
2481
  const x = rect.left - listRect.left - list.clientLeft + list.scrollLeft;
2475
2482
  const y = rect.top - listRect.top - list.clientTop + list.scrollTop;
2476
2483
  const previous = indicatorTargetRef.current;
@@ -2489,7 +2496,6 @@ function Tabs({
2489
2496
  if (indicatorMotion === "stretch" && previous?.node === indicator && previous.key !== selectedKey && previous.position === resolvedPosition && !window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
2490
2497
  const fromX = current.left - listRect.left - list.clientLeft + list.scrollLeft;
2491
2498
  const fromY = current.top - listRect.top - list.clientTop + list.scrollTop;
2492
- const vertical = resolvedOrientation === "vertical";
2493
2499
  const start = vertical ? Math.min(fromY, y) : Math.min(fromX, x);
2494
2500
  const end = vertical ? Math.max(fromY + current.height, y + rect.height) : Math.max(fromX + current.width, x + rect.width);
2495
2501
  indicator.animate([
@@ -2582,7 +2588,7 @@ function Tabs({
2582
2588
  type === "tech-line" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { className: "sia-tabs__title-connector", viewBox: "0 0 32 40", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M0 39.25 H5 Q8 39.25 10 35.25 L28 3.75 Q29 1.75 32 1.75", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }) : null
2583
2589
  ] }) : null,
2584
2590
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { ref: listRef, style: resolvedOrientation === "horizontal" && overflow.width ? { width: overflow.width } : void 0, className: `sia-tabs__list${sliding ? " sia-tabs__list--sliding" : ""}`, role: "tablist", "aria-orientation": resolvedOrientation, children: [
2585
- sliding ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { ref: indicatorRef, className: `sia-tabs__indicator${indicatorMotion === "stretch" ? " sia-tabs__indicator--stretch" : ""}${type === "capsule" ? " sia-tabs__capsule-indicator" : ""}`, "aria-hidden": "true", children: type === "tech-line" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sia-tabs__indicator-shape", "aria-hidden": "true" }) : null }, `${type}-${indicatorMotion}`) : null,
2591
+ sliding ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { ref: indicatorRef, "data-indicator-position": resolvedIndicatorPosition, className: `sia-tabs__indicator${indicatorMotion === "stretch" ? " sia-tabs__indicator--stretch" : ""}${type === "capsule" ? " sia-tabs__capsule-indicator" : ""}`, "aria-hidden": "true", children: type === "tech-line" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sia-tabs__indicator-shape", "aria-hidden": "true" }) : null }, `${type}-${indicatorMotion}`) : null,
2586
2592
  items.map((item, index) => {
2587
2593
  const selected = item.key === selectedKey;
2588
2594
  const canClose = item.closable ?? closable;
@@ -2694,9 +2700,10 @@ var import_react_dom3 = require("react-dom");
2694
2700
  var import_react13 = require("react");
2695
2701
  var import_jsx_runtime13 = require("react/jsx-runtime");
2696
2702
  var CheckboxGroupContext = (0, import_react13.createContext)(null);
2697
- var CheckboxRoot = (0, import_react13.forwardRef)(function Checkbox({ value, size: sizeProp, indeterminate = false, children, disabled, checked, defaultChecked, className = "", onChange, ...props }, forwardedRef) {
2703
+ var CheckboxRoot = (0, import_react13.forwardRef)(function Checkbox({ value, size: sizeProp, shape: shapeProp, indeterminate = false, children, disabled, checked, defaultChecked, className = "", onChange, ...props }, forwardedRef) {
2698
2704
  const size = useControlSize(sizeProp);
2699
2705
  const group = (0, import_react13.useContext)(CheckboxGroupContext);
2706
+ const shape = shapeProp ?? group?.shape ?? "square";
2700
2707
  const localRef = (0, import_react13.useRef)(null);
2701
2708
  const fallbackId = (0, import_react13.useId)();
2702
2709
  const grouped = group !== null && value !== void 0;
@@ -2709,7 +2716,7 @@ var CheckboxRoot = (0, import_react13.forwardRef)(function Checkbox({ value, siz
2709
2716
  if (typeof forwardedRef === "function") forwardedRef(node);
2710
2717
  else if (forwardedRef) forwardedRef.current = node;
2711
2718
  }
2712
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: `sia-checkbox sia-checkbox--${size}${disabled || group?.disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
2719
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: `sia-checkbox sia-checkbox--${size} sia-checkbox--${shape}${disabled || group?.disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
2713
2720
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2714
2721
  "input",
2715
2722
  {
@@ -2735,6 +2742,7 @@ var CheckboxRoot = (0, import_react13.forwardRef)(function Checkbox({ value, siz
2735
2742
  });
2736
2743
  function CheckboxGroup({
2737
2744
  size: sizeProp,
2745
+ shape = "square",
2738
2746
  columns,
2739
2747
  direction = "horizontal",
2740
2748
  gap,
@@ -2755,6 +2763,7 @@ function CheckboxGroup({
2755
2763
  };
2756
2764
  const [values, setValues] = useControllableState({ value, defaultValue, onChange });
2757
2765
  const context = (0, import_react13.useMemo)(() => ({
2766
+ shape,
2758
2767
  values,
2759
2768
  disabled,
2760
2769
  name,
@@ -2762,7 +2771,7 @@ function CheckboxGroup({
2762
2771
  const next = checked ? values.includes(optionValue) ? values : [...values, optionValue] : values.filter((item) => item !== optionValue);
2763
2772
  setValues(next);
2764
2773
  }
2765
- }), [disabled, name, setValues, values]);
2774
+ }), [disabled, name, setValues, values, shape]);
2766
2775
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `sia-checkbox-group${gridColumns ? " sia-checkbox-group--grid" : direction === "vertical" ? " sia-checkbox-group--vertical" : ""} ${className}`.trim(), style: layoutStyle, role: "group", children: [
2767
2776
  options?.map((option) => {
2768
2777
  const normalized = typeof option === "object" ? option : { label: String(option), value: option };
package/dist/core.css CHANGED
@@ -5059,37 +5059,72 @@ fieldset:disabled .sia-input-number__floating-placeholder {
5059
5059
  .sia-tabs--line > .sia-tabs__header .sia-tabs__tab[aria-selected=true]::after {
5060
5060
  display: none;
5061
5061
  }
5062
- .sia-tabs--line > .sia-tabs__header .sia-tabs__indicator::after {
5062
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator::after {
5063
5063
  position: absolute;
5064
5064
  content: "";
5065
5065
  background: var(--sia-tabs-accent, var(--sia-color-primary));
5066
5066
  }
5067
- .sia-tabs--line.sia-tabs--top > .sia-tabs__header .sia-tabs__indicator::after {
5068
- bottom: -1px;
5069
- left: 0;
5070
- right: 0;
5067
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=bottom]::after {
5068
+ inset: auto 0 -1px 0;
5071
5069
  height: 2px;
5072
5070
  border-radius: 2px 2px 0 0;
5073
5071
  }
5074
- .sia-tabs--line.sia-tabs--bottom > .sia-tabs__header .sia-tabs__indicator::after {
5075
- top: -1px;
5076
- left: 0;
5077
- right: 0;
5072
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=top]::after {
5073
+ inset: -1px 0 auto 0;
5078
5074
  height: 2px;
5079
5075
  border-radius: 0 0 2px 2px;
5080
5076
  }
5081
- .sia-tabs--line.sia-tabs--left > .sia-tabs__header .sia-tabs__indicator::after {
5082
- top: 0;
5083
- bottom: 0;
5084
- right: -1px;
5077
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=right]::after {
5078
+ inset: 0 -1px 0 auto;
5085
5079
  width: 2px;
5086
5080
  }
5087
- .sia-tabs--line.sia-tabs--right > .sia-tabs__header .sia-tabs__indicator::after {
5088
- top: 0;
5089
- bottom: 0;
5090
- left: -1px;
5081
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=left]::after {
5082
+ inset: 0 auto 0 -1px;
5091
5083
  width: 2px;
5092
5084
  }
5085
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__list {
5086
+ gap: 4px;
5087
+ }
5088
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab {
5089
+ border-radius: 8px;
5090
+ color: var(--sia-color-text);
5091
+ transition: background-color 160ms ease;
5092
+ }
5093
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab:hover:not(:disabled) {
5094
+ color: var(--sia-color-text);
5095
+ background: var(--sia-color-control-hover);
5096
+ }
5097
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab[aria-selected=true] {
5098
+ background: var(--sia-color-control-hover);
5099
+ }
5100
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab:focus-visible {
5101
+ outline: 2px solid var(--sia-color-primary);
5102
+ outline-offset: -2px;
5103
+ }
5104
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator {
5105
+ z-index: 1;
5106
+ }
5107
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=left]::after {
5108
+ left: 4px;
5109
+ border-radius: 2px;
5110
+ }
5111
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=right]::after {
5112
+ right: 4px;
5113
+ border-radius: 2px;
5114
+ }
5115
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=top]::after {
5116
+ top: 4px;
5117
+ border-radius: 2px;
5118
+ }
5119
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=bottom]::after {
5120
+ bottom: 4px;
5121
+ border-radius: 2px;
5122
+ }
5123
+ @media (prefers-reduced-motion: reduce) {
5124
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab {
5125
+ transition: none;
5126
+ }
5127
+ }
5093
5128
  .sia-tabs--tech > .sia-tabs__header .sia-tabs__tab[aria-selected=true]::before,
5094
5129
  .sia-tabs--tech > .sia-tabs__header .sia-tabs__tab[aria-selected=true]::after {
5095
5130
  display: none;
@@ -6193,6 +6228,9 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
6193
6228
  border-color 140ms ease,
6194
6229
  box-shadow 140ms ease;
6195
6230
  }
6231
+ .sia-checkbox.sia-checkbox--circle > .sia-checkbox__control {
6232
+ border-radius: 50%;
6233
+ }
6196
6234
  .sia-checkbox__control span {
6197
6235
  width: 8px;
6198
6236
  height: 5px;
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, W as Input, X as InputProps, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, ad as Progress, ae as ProgressProps, af as ProgressStatus, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, av as TabItem, aw as Tabs, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, T as TagStatus, aF as TagVariant, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b6 as UploadProps, ba as UploadRequestOptions, be as message } from './core-CwcgYFnO.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, W as Input, X as InputProps, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, ad as Progress, ae as ProgressProps, af as ProgressStatus, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, av as TabItem, aw as Tabs, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, T as TagStatus, aF as TagVariant, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b6 as UploadProps, ba as UploadRequestOptions, be as message } from './core-DYo5C4Si.cjs';
2
2
  export { b as Button, B as ButtonProps, a as ButtonSize, c as ButtonVariant } from './Button-O_pNB3SQ.cjs';
3
3
  export { e as Modal, d as ModalActionResult, M as ModalOpenConfig, f as ModalProps, g as ModalType, a as OverlayApiHandle, h as Select, S as SelectOption, c as SelectProps, j as SelectValue } from './Select-Y0e9kaxE.cjs';
4
4
  import 'react';
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, W as Input, X as InputProps, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, ad as Progress, ae as ProgressProps, af as ProgressStatus, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, av as TabItem, aw as Tabs, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, T as TagStatus, aF as TagVariant, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b6 as UploadProps, ba as UploadRequestOptions, be as message } from './core-Cmeyc0TI.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, W as Input, X as InputProps, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, ad as Progress, ae as ProgressProps, af as ProgressStatus, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, av as TabItem, aw as Tabs, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, T as TagStatus, aF as TagVariant, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b6 as UploadProps, ba as UploadRequestOptions, be as message } from './core-sWwvVAmP.js';
2
2
  export { b as Button, B as ButtonProps, a as ButtonSize, c as ButtonVariant } from './Button-BiL3Wjsd.js';
3
3
  export { e as Modal, d as ModalActionResult, M as ModalOpenConfig, f as ModalProps, g as ModalType, a as OverlayApiHandle, h as Select, S as SelectOption, c as SelectProps, j as SelectValue } from './Select-DeD4O8FL.js';
4
4
  import 'react';
package/dist/core.js CHANGED
@@ -11,11 +11,11 @@ import {
11
11
  Typography,
12
12
  Upload,
13
13
  message
14
- } from "./chunk-AL46WYJF.js";
14
+ } from "./chunk-3KYG7IU7.js";
15
15
  import "./chunk-RX242MUO.js";
16
16
  import {
17
17
  Select
18
- } from "./chunk-436QH6XH.js";
18
+ } from "./chunk-PGP4TEPP.js";
19
19
  import {
20
20
  Input,
21
21
  Segmented
package/dist/game.css CHANGED
@@ -5068,37 +5068,72 @@ fieldset:disabled .sia-input-number__floating-placeholder {
5068
5068
  .sia-tabs--line > .sia-tabs__header .sia-tabs__tab[aria-selected=true]::after {
5069
5069
  display: none;
5070
5070
  }
5071
- .sia-tabs--line > .sia-tabs__header .sia-tabs__indicator::after {
5071
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator::after {
5072
5072
  position: absolute;
5073
5073
  content: "";
5074
5074
  background: var(--sia-tabs-accent, var(--sia-color-primary));
5075
5075
  }
5076
- .sia-tabs--line.sia-tabs--top > .sia-tabs__header .sia-tabs__indicator::after {
5077
- bottom: -1px;
5078
- left: 0;
5079
- right: 0;
5076
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=bottom]::after {
5077
+ inset: auto 0 -1px 0;
5080
5078
  height: 2px;
5081
5079
  border-radius: 2px 2px 0 0;
5082
5080
  }
5083
- .sia-tabs--line.sia-tabs--bottom > .sia-tabs__header .sia-tabs__indicator::after {
5084
- top: -1px;
5085
- left: 0;
5086
- right: 0;
5081
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=top]::after {
5082
+ inset: -1px 0 auto 0;
5087
5083
  height: 2px;
5088
5084
  border-radius: 0 0 2px 2px;
5089
5085
  }
5090
- .sia-tabs--line.sia-tabs--left > .sia-tabs__header .sia-tabs__indicator::after {
5091
- top: 0;
5092
- bottom: 0;
5093
- right: -1px;
5086
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=right]::after {
5087
+ inset: 0 -1px 0 auto;
5094
5088
  width: 2px;
5095
5089
  }
5096
- .sia-tabs--line.sia-tabs--right > .sia-tabs__header .sia-tabs__indicator::after {
5097
- top: 0;
5098
- bottom: 0;
5099
- left: -1px;
5090
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=left]::after {
5091
+ inset: 0 auto 0 -1px;
5100
5092
  width: 2px;
5101
5093
  }
5094
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__list {
5095
+ gap: 4px;
5096
+ }
5097
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab {
5098
+ border-radius: 8px;
5099
+ color: var(--sia-color-text);
5100
+ transition: background-color 160ms ease;
5101
+ }
5102
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab:hover:not(:disabled) {
5103
+ color: var(--sia-color-text);
5104
+ background: var(--sia-color-control-hover);
5105
+ }
5106
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab[aria-selected=true] {
5107
+ background: var(--sia-color-control-hover);
5108
+ }
5109
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab:focus-visible {
5110
+ outline: 2px solid var(--sia-color-primary);
5111
+ outline-offset: -2px;
5112
+ }
5113
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator {
5114
+ z-index: 1;
5115
+ }
5116
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=left]::after {
5117
+ left: 4px;
5118
+ border-radius: 2px;
5119
+ }
5120
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=right]::after {
5121
+ right: 4px;
5122
+ border-radius: 2px;
5123
+ }
5124
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=top]::after {
5125
+ top: 4px;
5126
+ border-radius: 2px;
5127
+ }
5128
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=bottom]::after {
5129
+ bottom: 4px;
5130
+ border-radius: 2px;
5131
+ }
5132
+ @media (prefers-reduced-motion: reduce) {
5133
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab {
5134
+ transition: none;
5135
+ }
5136
+ }
5102
5137
  .sia-tabs--tech > .sia-tabs__header .sia-tabs__tab[aria-selected=true]::before,
5103
5138
  .sia-tabs--tech > .sia-tabs__header .sia-tabs__tab[aria-selected=true]::after {
5104
5139
  display: none;
package/dist/index.cjs CHANGED
@@ -3698,9 +3698,10 @@ var Input = (0, import_react17.forwardRef)(function Input2({
3698
3698
  var import_react18 = require("react");
3699
3699
  var import_jsx_runtime18 = require("react/jsx-runtime");
3700
3700
  var CheckboxGroupContext = (0, import_react18.createContext)(null);
3701
- var CheckboxRoot = (0, import_react18.forwardRef)(function Checkbox({ value, size: sizeProp, indeterminate = false, children, disabled, checked, defaultChecked, className = "", onChange, ...props }, forwardedRef) {
3701
+ var CheckboxRoot = (0, import_react18.forwardRef)(function Checkbox({ value, size: sizeProp, shape: shapeProp, indeterminate = false, children, disabled, checked, defaultChecked, className = "", onChange, ...props }, forwardedRef) {
3702
3702
  const size = useControlSize(sizeProp);
3703
3703
  const group = (0, import_react18.useContext)(CheckboxGroupContext);
3704
+ const shape = shapeProp ?? group?.shape ?? "square";
3704
3705
  const localRef = (0, import_react18.useRef)(null);
3705
3706
  const fallbackId = (0, import_react18.useId)();
3706
3707
  const grouped = group !== null && value !== void 0;
@@ -3713,7 +3714,7 @@ var CheckboxRoot = (0, import_react18.forwardRef)(function Checkbox({ value, siz
3713
3714
  if (typeof forwardedRef === "function") forwardedRef(node);
3714
3715
  else if (forwardedRef) forwardedRef.current = node;
3715
3716
  }
3716
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: `sia-checkbox sia-checkbox--${size}${disabled || group?.disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
3717
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: `sia-checkbox sia-checkbox--${size} sia-checkbox--${shape}${disabled || group?.disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
3717
3718
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3718
3719
  "input",
3719
3720
  {
@@ -3739,6 +3740,7 @@ var CheckboxRoot = (0, import_react18.forwardRef)(function Checkbox({ value, siz
3739
3740
  });
3740
3741
  function CheckboxGroup({
3741
3742
  size: sizeProp,
3743
+ shape = "square",
3742
3744
  columns,
3743
3745
  direction = "horizontal",
3744
3746
  gap,
@@ -3759,6 +3761,7 @@ function CheckboxGroup({
3759
3761
  };
3760
3762
  const [values, setValues] = useControllableState({ value, defaultValue, onChange });
3761
3763
  const context = (0, import_react18.useMemo)(() => ({
3764
+ shape,
3762
3765
  values,
3763
3766
  disabled,
3764
3767
  name,
@@ -3766,7 +3769,7 @@ function CheckboxGroup({
3766
3769
  const next = checked ? values.includes(optionValue2) ? values : [...values, optionValue2] : values.filter((item) => item !== optionValue2);
3767
3770
  setValues(next);
3768
3771
  }
3769
- }), [disabled, name, setValues, values]);
3772
+ }), [disabled, name, setValues, values, shape]);
3770
3773
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `sia-checkbox-group${gridColumns ? " sia-checkbox-group--grid" : direction === "vertical" ? " sia-checkbox-group--vertical" : ""} ${className}`.trim(), style: layoutStyle, role: "group", children: [
3771
3774
  options?.map((option) => {
3772
3775
  const normalized = typeof option === "object" ? option : { label: String(option), value: option };
@@ -12725,7 +12728,8 @@ function Tabs({
12725
12728
  onAfterChange,
12726
12729
  deferContent = false,
12727
12730
  type = "line",
12728
- indicatorMotion = type === "line" || type === "underline" ? "stretch" : "slide",
12731
+ indicatorMotion = type === "line" || type === "underline" || type === "rounded" ? "stretch" : "slide",
12732
+ indicatorPosition,
12729
12733
  size = "medium",
12730
12734
  tabPosition,
12731
12735
  orientation = "horizontal",
@@ -12749,7 +12753,9 @@ function Tabs({
12749
12753
  const enabledItems = (0, import_react49.useMemo)(() => items.filter((item) => !item.disabled), [items]);
12750
12754
  const resolvedPosition = tabPosition ?? (orientation === "vertical" ? "left" : "top");
12751
12755
  const resolvedOrientation = resolvedPosition === "left" || resolvedPosition === "right" ? "vertical" : "horizontal";
12752
- const sliding = ["capsule", "line", "underline", "tech", "tech-line"].includes(type);
12756
+ const defaultIndicatorPosition = { top: "bottom", bottom: "top", left: "right", right: "left" }[resolvedPosition];
12757
+ const resolvedIndicatorPosition = indicatorPosition && (resolvedOrientation === "vertical" ? ["left", "right"] : ["top", "bottom"]).includes(indicatorPosition) ? indicatorPosition : defaultIndicatorPosition;
12758
+ const sliding = ["capsule", "line", "underline", "rounded", "tech", "tech-line"].includes(type);
12753
12759
  const listRef = (0, import_react49.useRef)(null);
12754
12760
  const indicatorRef = (0, import_react49.useRef)(null);
12755
12761
  const indicatorTargetRef = (0, import_react49.useRef)();
@@ -12811,7 +12817,11 @@ function Tabs({
12811
12817
  return;
12812
12818
  }
12813
12819
  const listRect = list.getBoundingClientRect();
12814
- const rect = active.getBoundingClientRect();
12820
+ const tabRect = active.getBoundingClientRect();
12821
+ const vertical = resolvedOrientation === "vertical";
12822
+ const width = type === "rounded" && !vertical ? Math.min(24, tabRect.width) : tabRect.width;
12823
+ const height = type === "rounded" && vertical ? Math.min(16, tabRect.height) : tabRect.height;
12824
+ const rect = { left: tabRect.left + (tabRect.width - width) / 2, top: tabRect.top + (tabRect.height - height) / 2, width, height };
12815
12825
  const x = rect.left - listRect.left - list.clientLeft + list.scrollLeft;
12816
12826
  const y = rect.top - listRect.top - list.clientTop + list.scrollTop;
12817
12827
  const previous = indicatorTargetRef.current;
@@ -12830,7 +12840,6 @@ function Tabs({
12830
12840
  if (indicatorMotion === "stretch" && previous?.node === indicator && previous.key !== selectedKey && previous.position === resolvedPosition && !window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
12831
12841
  const fromX = current.left - listRect.left - list.clientLeft + list.scrollLeft;
12832
12842
  const fromY = current.top - listRect.top - list.clientTop + list.scrollTop;
12833
- const vertical = resolvedOrientation === "vertical";
12834
12843
  const start = vertical ? Math.min(fromY, y) : Math.min(fromX, x);
12835
12844
  const end = vertical ? Math.max(fromY + current.height, y + rect.height) : Math.max(fromX + current.width, x + rect.width);
12836
12845
  indicator.animate([
@@ -12923,7 +12932,7 @@ function Tabs({
12923
12932
  type === "tech-line" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("svg", { className: "sia-tabs__title-connector", viewBox: "0 0 32 40", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { d: "M0 39.25 H5 Q8 39.25 10 35.25 L28 3.75 Q29 1.75 32 1.75", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }) : null
12924
12933
  ] }) : null,
12925
12934
  /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { ref: listRef, style: resolvedOrientation === "horizontal" && overflow.width ? { width: overflow.width } : void 0, className: `sia-tabs__list${sliding ? " sia-tabs__list--sliding" : ""}`, role: "tablist", "aria-orientation": resolvedOrientation, children: [
12926
- sliding ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { ref: indicatorRef, className: `sia-tabs__indicator${indicatorMotion === "stretch" ? " sia-tabs__indicator--stretch" : ""}${type === "capsule" ? " sia-tabs__capsule-indicator" : ""}`, "aria-hidden": "true", children: type === "tech-line" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "sia-tabs__indicator-shape", "aria-hidden": "true" }) : null }, `${type}-${indicatorMotion}`) : null,
12935
+ sliding ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { ref: indicatorRef, "data-indicator-position": resolvedIndicatorPosition, className: `sia-tabs__indicator${indicatorMotion === "stretch" ? " sia-tabs__indicator--stretch" : ""}${type === "capsule" ? " sia-tabs__capsule-indicator" : ""}`, "aria-hidden": "true", children: type === "tech-line" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "sia-tabs__indicator-shape", "aria-hidden": "true" }) : null }, `${type}-${indicatorMotion}`) : null,
12927
12936
  items.map((item, index) => {
12928
12937
  const selected = item.key === selectedKey;
12929
12938
  const canClose = item.closable ?? closable;
package/dist/index.css CHANGED
@@ -5059,37 +5059,72 @@ fieldset:disabled .sia-input-number__floating-placeholder {
5059
5059
  .sia-tabs--line > .sia-tabs__header .sia-tabs__tab[aria-selected=true]::after {
5060
5060
  display: none;
5061
5061
  }
5062
- .sia-tabs--line > .sia-tabs__header .sia-tabs__indicator::after {
5062
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator::after {
5063
5063
  position: absolute;
5064
5064
  content: "";
5065
5065
  background: var(--sia-tabs-accent, var(--sia-color-primary));
5066
5066
  }
5067
- .sia-tabs--line.sia-tabs--top > .sia-tabs__header .sia-tabs__indicator::after {
5068
- bottom: -1px;
5069
- left: 0;
5070
- right: 0;
5067
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=bottom]::after {
5068
+ inset: auto 0 -1px 0;
5071
5069
  height: 2px;
5072
5070
  border-radius: 2px 2px 0 0;
5073
5071
  }
5074
- .sia-tabs--line.sia-tabs--bottom > .sia-tabs__header .sia-tabs__indicator::after {
5075
- top: -1px;
5076
- left: 0;
5077
- right: 0;
5072
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=top]::after {
5073
+ inset: -1px 0 auto 0;
5078
5074
  height: 2px;
5079
5075
  border-radius: 0 0 2px 2px;
5080
5076
  }
5081
- .sia-tabs--line.sia-tabs--left > .sia-tabs__header .sia-tabs__indicator::after {
5082
- top: 0;
5083
- bottom: 0;
5084
- right: -1px;
5077
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=right]::after {
5078
+ inset: 0 -1px 0 auto;
5085
5079
  width: 2px;
5086
5080
  }
5087
- .sia-tabs--line.sia-tabs--right > .sia-tabs__header .sia-tabs__indicator::after {
5088
- top: 0;
5089
- bottom: 0;
5090
- left: -1px;
5081
+ .sia-tabs:is(.sia-tabs--line, .sia-tabs--rounded) > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=left]::after {
5082
+ inset: 0 auto 0 -1px;
5091
5083
  width: 2px;
5092
5084
  }
5085
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__list {
5086
+ gap: 4px;
5087
+ }
5088
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab {
5089
+ border-radius: 8px;
5090
+ color: var(--sia-color-text);
5091
+ transition: background-color 160ms ease;
5092
+ }
5093
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab:hover:not(:disabled) {
5094
+ color: var(--sia-color-text);
5095
+ background: var(--sia-color-control-hover);
5096
+ }
5097
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab[aria-selected=true] {
5098
+ background: var(--sia-color-control-hover);
5099
+ }
5100
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab:focus-visible {
5101
+ outline: 2px solid var(--sia-color-primary);
5102
+ outline-offset: -2px;
5103
+ }
5104
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator {
5105
+ z-index: 1;
5106
+ }
5107
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=left]::after {
5108
+ left: 4px;
5109
+ border-radius: 2px;
5110
+ }
5111
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=right]::after {
5112
+ right: 4px;
5113
+ border-radius: 2px;
5114
+ }
5115
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=top]::after {
5116
+ top: 4px;
5117
+ border-radius: 2px;
5118
+ }
5119
+ .sia-tabs.sia-tabs--rounded > .sia-tabs__header .sia-tabs__indicator[data-indicator-position=bottom]::after {
5120
+ bottom: 4px;
5121
+ border-radius: 2px;
5122
+ }
5123
+ @media (prefers-reduced-motion: reduce) {
5124
+ .sia-tabs--rounded > .sia-tabs__header .sia-tabs__tab {
5125
+ transition: none;
5126
+ }
5127
+ }
5093
5128
  .sia-tabs--tech > .sia-tabs__header .sia-tabs__tab[aria-selected=true]::before,
5094
5129
  .sia-tabs--tech > .sia-tabs__header .sia-tabs__tab[aria-selected=true]::after {
5095
5130
  display: none;
@@ -6193,6 +6228,9 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
6193
6228
  border-color 140ms ease,
6194
6229
  box-shadow 140ms ease;
6195
6230
  }
6231
+ .sia-checkbox.sia-checkbox--circle > .sia-checkbox__control {
6232
+ border-radius: 50%;
6233
+ }
6196
6234
  .sia-checkbox__control span {
6197
6235
  width: 8px;
6198
6236
  height: 5px;
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
3
- import { T as TagStatus, B as BadgeProps } from './core-CwcgYFnO.cjs';
4
- 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 ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-CwcgYFnO.cjs';
3
+ import { T as TagStatus, B as BadgeProps } from './core-DYo5C4Si.cjs';
4
+ 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 ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-DYo5C4Si.cjs';
5
5
  import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
6
6
  import { B as ButtonProps, a as ButtonSize } from './Button-O_pNB3SQ.cjs';
7
7
  export { b as Button, c as ButtonVariant } from './Button-O_pNB3SQ.cjs';
@@ -972,6 +972,8 @@ type CheckboxValue = string | number;
972
972
  interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "value" | "onChange"> {
973
973
  /** small / medium / large 文字字号为 12 / 13 / 16 像素,同时调整图形和间距;默认继承所在组或 Form,无上下文时为 medium(13px),组件显式 size 优先。 */
974
974
  size?: ControlSize;
975
+ /** 外框形状:square 为圆角方框,circle 为圆形;仅改变外观,仍支持多选和半选。未指定时继承 Checkbox.Group.shape,无分组时默认 square;单项显式设置优先。 */
976
+ shape?: "square" | "circle";
975
977
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
976
978
  value?: CheckboxValue;
977
979
  /**
@@ -995,6 +997,10 @@ interface CheckboxOption {
995
997
  }
996
998
  /** CheckboxGroup的属性配置。 */
997
999
  interface CheckboxGroupProps {
1000
+ /** 组内复选框的默认形状:square 为圆角方框,circle 为圆形;适用于 options 和 Checkbox 子项,子项显式 shape 优先,不改变多选行为。
1001
+ * @defaultValue "square"
1002
+ */
1003
+ shape?: CheckboxProps["shape"];
998
1004
  /** 等宽网格的列数,按选项顺序从左到右逐行排列并占满容器宽度;仅正整数生效,未设置或无效时使用 direction 排列。设置有效列数后优先于 direction;同样适用于直接传入的 Checkbox 子项。 */
999
1005
  columns?: number;
1000
1006
  /** 非网格模式的排列方向:horizontal 横向排列并自动换行,vertical 纵向单列排列;有效 columns 优先。默认 horizontal。 */
@@ -1026,7 +1032,7 @@ interface CheckboxGroupProps {
1026
1032
  /** 值发生变化时调用;参数为新值及类型声明中列出的关联信息。 */
1027
1033
  onChange?: (values: readonly CheckboxValue[]) => void;
1028
1034
  }
1029
- declare function CheckboxGroup({ size: sizeProp, columns, direction, gap, value, defaultValue, options, disabled, name, className, children, onChange, }: CheckboxGroupProps): react.JSX.Element;
1035
+ declare function CheckboxGroup({ size: sizeProp, shape, columns, direction, gap, value, defaultValue, options, disabled, name, className, children, onChange, }: CheckboxGroupProps): react.JSX.Element;
1030
1036
  /** 复选框组件。 */
1031
1037
  declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>> & {
1032
1038
  /** 组合多个子项并统一管理布局或选择状态。 */
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
3
- import { T as TagStatus, B as BadgeProps } from './core-Cmeyc0TI.js';
4
- 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 ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-Cmeyc0TI.js';
3
+ import { T as TagStatus, B as BadgeProps } from './core-sWwvVAmP.js';
4
+ 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 ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-sWwvVAmP.js';
5
5
  import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.js';
6
6
  import { B as ButtonProps, a as ButtonSize } from './Button-BiL3Wjsd.js';
7
7
  export { b as Button, c as ButtonVariant } from './Button-BiL3Wjsd.js';
@@ -972,6 +972,8 @@ type CheckboxValue = string | number;
972
972
  interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "value" | "onChange"> {
973
973
  /** small / medium / large 文字字号为 12 / 13 / 16 像素,同时调整图形和间距;默认继承所在组或 Form,无上下文时为 medium(13px),组件显式 size 优先。 */
974
974
  size?: ControlSize;
975
+ /** 外框形状:square 为圆角方框,circle 为圆形;仅改变外观,仍支持多选和半选。未指定时继承 Checkbox.Group.shape,无分组时默认 square;单项显式设置优先。 */
976
+ shape?: "square" | "circle";
975
977
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
976
978
  value?: CheckboxValue;
977
979
  /**
@@ -995,6 +997,10 @@ interface CheckboxOption {
995
997
  }
996
998
  /** CheckboxGroup的属性配置。 */
997
999
  interface CheckboxGroupProps {
1000
+ /** 组内复选框的默认形状:square 为圆角方框,circle 为圆形;适用于 options 和 Checkbox 子项,子项显式 shape 优先,不改变多选行为。
1001
+ * @defaultValue "square"
1002
+ */
1003
+ shape?: CheckboxProps["shape"];
998
1004
  /** 等宽网格的列数,按选项顺序从左到右逐行排列并占满容器宽度;仅正整数生效,未设置或无效时使用 direction 排列。设置有效列数后优先于 direction;同样适用于直接传入的 Checkbox 子项。 */
999
1005
  columns?: number;
1000
1006
  /** 非网格模式的排列方向:horizontal 横向排列并自动换行,vertical 纵向单列排列;有效 columns 优先。默认 horizontal。 */
@@ -1026,7 +1032,7 @@ interface CheckboxGroupProps {
1026
1032
  /** 值发生变化时调用;参数为新值及类型声明中列出的关联信息。 */
1027
1033
  onChange?: (values: readonly CheckboxValue[]) => void;
1028
1034
  }
1029
- declare function CheckboxGroup({ size: sizeProp, columns, direction, gap, value, defaultValue, options, disabled, name, className, children, onChange, }: CheckboxGroupProps): react.JSX.Element;
1035
+ declare function CheckboxGroup({ size: sizeProp, shape, columns, direction, gap, value, defaultValue, options, disabled, name, className, children, onChange, }: CheckboxGroupProps): react.JSX.Element;
1030
1036
  /** 复选框组件。 */
1031
1037
  declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>> & {
1032
1038
  /** 组合多个子项并统一管理布局或选择状态。 */
package/dist/index.js CHANGED
@@ -82,7 +82,7 @@ import {
82
82
  Watermark,
83
83
  message,
84
84
  notification
85
- } from "./chunk-AL46WYJF.js";
85
+ } from "./chunk-3KYG7IU7.js";
86
86
  import "./chunk-RX242MUO.js";
87
87
  import {
88
88
  MarkdownEditor
@@ -95,7 +95,7 @@ import {
95
95
  DatePicker,
96
96
  SelectDateRange,
97
97
  TimePanel
98
- } from "./chunk-L2S7IPSM.js";
98
+ } from "./chunk-TUGCP3GB.js";
99
99
  import {
100
100
  Checkbox,
101
101
  FloatingScrollbarProvider,
@@ -107,7 +107,7 @@ import {
107
107
  Tooltip,
108
108
  Tree,
109
109
  useScrollbarProximity
110
- } from "./chunk-436QH6XH.js";
110
+ } from "./chunk-PGP4TEPP.js";
111
111
  import {
112
112
  Dropdown,
113
113
  Input,
@@ -3425,9 +3425,10 @@ var Input = (0, import_react13.forwardRef)(function Input2({
3425
3425
  var import_react14 = require("react");
3426
3426
  var import_jsx_runtime13 = require("react/jsx-runtime");
3427
3427
  var CheckboxGroupContext = (0, import_react14.createContext)(null);
3428
- var CheckboxRoot = (0, import_react14.forwardRef)(function Checkbox({ value, size: sizeProp, indeterminate = false, children, disabled, checked, defaultChecked, className = "", onChange, ...props }, forwardedRef) {
3428
+ var CheckboxRoot = (0, import_react14.forwardRef)(function Checkbox({ value, size: sizeProp, shape: shapeProp, indeterminate = false, children, disabled, checked, defaultChecked, className = "", onChange, ...props }, forwardedRef) {
3429
3429
  const size = useControlSize(sizeProp);
3430
3430
  const group = (0, import_react14.useContext)(CheckboxGroupContext);
3431
+ const shape = shapeProp ?? group?.shape ?? "square";
3431
3432
  const localRef = (0, import_react14.useRef)(null);
3432
3433
  const fallbackId = (0, import_react14.useId)();
3433
3434
  const grouped = group !== null && value !== void 0;
@@ -3440,7 +3441,7 @@ var CheckboxRoot = (0, import_react14.forwardRef)(function Checkbox({ value, siz
3440
3441
  if (typeof forwardedRef === "function") forwardedRef(node);
3441
3442
  else if (forwardedRef) forwardedRef.current = node;
3442
3443
  }
3443
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: `sia-checkbox sia-checkbox--${size}${disabled || group?.disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
3444
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: `sia-checkbox sia-checkbox--${size} sia-checkbox--${shape}${disabled || group?.disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
3444
3445
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3445
3446
  "input",
3446
3447
  {
@@ -3466,6 +3467,7 @@ var CheckboxRoot = (0, import_react14.forwardRef)(function Checkbox({ value, siz
3466
3467
  });
3467
3468
  function CheckboxGroup({
3468
3469
  size: sizeProp,
3470
+ shape = "square",
3469
3471
  columns,
3470
3472
  direction = "horizontal",
3471
3473
  gap,
@@ -3486,6 +3488,7 @@ function CheckboxGroup({
3486
3488
  };
3487
3489
  const [values, setValues] = useControllableState({ value, defaultValue, onChange });
3488
3490
  const context = (0, import_react14.useMemo)(() => ({
3491
+ shape,
3489
3492
  values,
3490
3493
  disabled,
3491
3494
  name,
@@ -3493,7 +3496,7 @@ function CheckboxGroup({
3493
3496
  const next = checked ? values.includes(optionValue) ? values : [...values, optionValue] : values.filter((item) => item !== optionValue);
3494
3497
  setValues(next);
3495
3498
  }
3496
- }), [disabled, name, setValues, values]);
3499
+ }), [disabled, name, setValues, values, shape]);
3497
3500
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `sia-checkbox-group${gridColumns ? " sia-checkbox-group--grid" : direction === "vertical" ? " sia-checkbox-group--vertical" : ""} ${className}`.trim(), style: layoutStyle, role: "group", children: [
3498
3501
  options?.map((option) => {
3499
3502
  const normalized = typeof option === "object" ? option : { label: String(option), value: option };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SelectDateRange
3
- } from "./chunk-L2S7IPSM.js";
4
- import "./chunk-436QH6XH.js";
3
+ } from "./chunk-TUGCP3GB.js";
4
+ import "./chunk-PGP4TEPP.js";
5
5
  import "./chunk-UVHC6OEX.js";
6
6
  import "./chunk-SCEHVGKV.js";
7
7
  import "./chunk-PQBCD54U.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sia.soul/sia-react-ui",
3
- "version": "0.1.139",
3
+ "version": "0.1.142",
4
4
  "description": "Sia Design components and tokens for React",
5
5
  "publishConfig": {
6
6
  "access": "public",