@sia.soul/sia-react-ui 0.1.29 → 0.1.31

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
  FloatingScrollbarProvider,
3
3
  Select
4
- } from "./chunk-DQYNL6VZ.js";
4
+ } from "./chunk-AHBC5UXJ.js";
5
5
  import {
6
6
  Icon
7
7
  } from "./chunk-YF2I6SDB.js";
@@ -60,6 +60,9 @@ var CheckboxRoot = forwardRef(function Checkbox({ value, size: sizeProp, indeter
60
60
  });
61
61
  function CheckboxGroup({
62
62
  size: sizeProp,
63
+ columns,
64
+ direction = "horizontal",
65
+ gap,
63
66
  value,
64
67
  defaultValue = [],
65
68
  options,
@@ -70,6 +73,11 @@ function CheckboxGroup({
70
73
  onChange
71
74
  }) {
72
75
  const size = useControlSize(sizeProp);
76
+ const gridColumns = columns !== void 0 && Number.isInteger(columns) && columns > 0 ? columns : void 0;
77
+ const layoutStyle = {
78
+ gridTemplateColumns: gridColumns ? `repeat(${gridColumns}, minmax(0, 1fr))` : void 0,
79
+ gap: gap === void 0 ? void 0 : typeof gap === "number" ? Math.max(0, gap) : `${Math.max(0, gap[0])}px ${Math.max(0, gap[1])}px`
80
+ };
73
81
  const [values, setValues] = useControllableState({ value, defaultValue, onChange });
74
82
  const context = useMemo(() => ({
75
83
  values,
@@ -80,7 +88,7 @@ function CheckboxGroup({
80
88
  setValues(next);
81
89
  }
82
90
  }), [disabled, name, setValues, values]);
83
- return /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ jsxs("div", { className: `sia-checkbox-group ${className}`.trim(), role: "group", children: [
91
+ 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: [
84
92
  options?.map((option) => {
85
93
  const normalized = typeof option === "object" ? option : { label: String(option), value: option };
86
94
  return /* @__PURE__ */ jsx(CheckboxRoot, { value: normalized.value, disabled: normalized.disabled, children: normalized.label }, normalized.value);
@@ -5,7 +5,7 @@ import {
5
5
  Popover,
6
6
  Tooltip,
7
7
  useOverlayLifecycle
8
- } from "./chunk-DQYNL6VZ.js";
8
+ } from "./chunk-AHBC5UXJ.js";
9
9
  import {
10
10
  Dropdown,
11
11
  Icon
@@ -141,6 +141,8 @@ function Card({
141
141
  // src/components/Tag.tsx
142
142
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
143
143
  function Tag({
144
+ size: sizeProp,
145
+ color,
144
146
  status = "default",
145
147
  compact = false,
146
148
  variant = "soft",
@@ -151,13 +153,17 @@ function Tag({
151
153
  onClose,
152
154
  className = "",
153
155
  children,
156
+ style,
154
157
  ...props
155
158
  }) {
159
+ const size = useControlSize(sizeProp ?? (compact ? "small" : void 0));
160
+ const customColor = color?.trim() ? variant === "outlined" ? { borderColor: color, color, backgroundColor: "transparent" } : variant === "filled" ? { backgroundColor: color, color: "#fff", borderColor: "transparent" } : { color, backgroundColor: `color-mix(in srgb, ${color} 10%, transparent)`, borderColor: `color-mix(in srgb, ${color} 35%, transparent)` } : void 0;
156
161
  return /* @__PURE__ */ jsxs3(
157
162
  "span",
158
163
  {
159
- className: `sia-tag${closable && closeOnHover ? " sia-tag--close-on-hover" : ""} sia-tag--${status} sia-tag--${variant}${compact ? " sia-tag--compact" : ""}${disabled ? " sia-tag--disabled" : ""} ${className}`.trim(),
164
+ className: `sia-tag${closable && closeOnHover ? " sia-tag--close-on-hover" : ""} sia-tag--${status} sia-tag--${variant} sia-tag--${size}${compact && size === "small" ? " sia-tag--compact" : ""}${disabled ? " sia-tag--disabled" : ""} ${className}`.trim(),
160
165
  "aria-disabled": disabled || void 0,
166
+ style: customColor ? { ...customColor, ...style } : style,
161
167
  ...withTitleTooltip(props),
162
168
  children: [
163
169
  icon ? /* @__PURE__ */ jsx3("span", { className: "sia-tag__icon", children: icon }) : null,
@@ -173,7 +179,7 @@ function Tag({
173
179
  event.stopPropagation();
174
180
  onClose?.(event);
175
181
  },
176
- children: /* @__PURE__ */ jsx3(Icon, { name: "close", size: 12 })
182
+ children: /* @__PURE__ */ jsx3(Icon, { name: "close", size: size === "large" ? 14 : 12 })
177
183
  }
178
184
  ) : null
179
185
  ]
@@ -377,22 +377,31 @@ declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttribu
377
377
 
378
378
  /** 标签的状态类型。 */
379
379
  type TagStatus = "default" | "success" | "processing" | "warning" | "error";
380
- /** 标签的视觉样式。 */
380
+ /** 标签的视觉样式:soft 为柔和浅底,outlined 为透明底描边,filled 为实色背景。 */
381
381
  type TagVariant = "soft" | "outlined" | "filled";
382
+ /** 标签尺寸等级:small、medium、large,分别对应最小高度 20、24、32 像素。 */
383
+ type TagSize = ControlSize;
382
384
  /** 标签的属性配置。 */
383
385
  interface TagProps extends HTMLAttributes<HTMLSpanElement> {
384
386
  /**
385
- * 语义状态
387
+ * 标签尺寸,small / medium / large 的最小高度为 20 / 24 / 32 像素,字号为 12 / 12 / 14 像素。显式 size 优先于 compact;未设置时 compact=true 使用 small,否则继承 Form 的尺寸,无 Form 时为 medium。
388
+ * @defaultValue "medium"(未指定且无 Form 上下文、未开启 compact 时)
389
+ */
390
+ size?: TagSize;
391
+ /** 自定义 CSS 颜色,支持十六进制、rgb、颜色名称及 CSS 变量;覆盖 status 的颜色,由 variant 决定浅底、描边或实色效果。未提供非空颜色时沿用状态配色,style 中对应属性优先级最高。 */
392
+ color?: string;
393
+ /**
394
+ * 语义状态配色;提供 color 时由自定义颜色覆盖。
386
395
  * @defaultValue "default"
387
396
  */
388
397
  status?: TagStatus;
389
398
  /**
390
- * 紧凑尺寸
399
+ * 兼容旧版的紧凑尺寸,未显式设置 size 时等同于 size="small",优先于 Form 继承尺寸;新代码建议直接使用 size。
391
400
  * @defaultValue false
392
401
  */
393
402
  compact?: boolean;
394
403
  /**
395
- 组件的视觉样式。
404
+ * 视觉样式:soft 使用浅色背景和彩色文字;outlined 使用透明背景、彩色边框和文字;filled 使用实色背景、白字和透明边框。同样适用于自定义 color;实色浅底可通过 style.color 调整文字。
396
405
  * @defaultValue "soft"
397
406
  */
398
407
  variant?: TagVariant;
@@ -403,7 +412,10 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
403
412
  * @defaultValue false
404
413
  */
405
414
  closable?: boolean;
406
- /** 悬停或键盘聚焦时展开关闭按钮。 */
415
+ /**
416
+ * 配合 closable 使用:默认隐藏关闭按钮且不占宽度,鼠标悬停或内部获得键盘焦点时,标签向右扩展并显示按钮;离开后收回,过渡为 180 毫秒。禁用时不展开,无悬停能力的触屏设备直接显示以便操作,减少动态效果偏好下取消动画。
417
+ * @defaultValue false
418
+ */
407
419
  closeOnHover?: boolean;
408
420
  /**
409
421
  * 禁用关闭操作
@@ -413,8 +425,8 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
413
425
  /** 请求关闭时触发的回调。 */
414
426
  onClose?: (event: MouseEvent<HTMLButtonElement>) => void;
415
427
  }
416
- /** 标签组件。 */
417
- declare function Tag({ status, compact, variant, icon, closable, closeOnHover, disabled, onClose, className, children, ...props }: TagProps): react.JSX.Element;
428
+ /** 标记状态或筛选条件的标签,支持语义配色、自定义边框色或背景色及关闭操作。 */
429
+ declare function Tag({ size: sizeProp, color, status, compact, variant, icon, closable, closeOnHover, disabled, onClose, className, children, style, ...props }: TagProps): react.JSX.Element;
418
430
 
419
431
  /** 菜单的模式类型。 */
420
432
  type MenuMode = "vertical" | "horizontal" | "inline";
@@ -1985,7 +1997,7 @@ interface MessageConfig {
1985
1997
  key?: MessageKey;
1986
1998
  /** 类型标识,用于选择对应的表现形式。 */
1987
1999
  type?: MessageType;
1988
- /** 消息正文,支持文本或 React 节点。 */
2000
+ /** 消息正文,默认字号为 14px;支持文本或 React 节点,自定义节点可自行设置字号。 */
1989
2001
  content: ReactNode;
1990
2002
  /** 自动关闭延迟,单位为秒;0 表示不自动关闭。 */
1991
2003
  duration?: number;
@@ -2224,4 +2236,4 @@ declare const FloatButton: react.ForwardRefExoticComponent<FloatButtonProps & re
2224
2236
  BackTop: typeof FloatButtonBackTop;
2225
2237
  };
2226
2238
 
2227
- export { type MenuTheme 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, type FloatingTrigger as I, ICON_NAMES as J, Icon as K, type IconName as L, type IconProps as M, type IconVariant as N, Image as O, ImagePreview as P, type ImagePreviewConfig as Q, type ImagePreviewProps as R, type ImageProps as S, type TagStatus as T, Input as U, type InputProps as V, Menu as W, type MenuClickInfo as X, type MenuItem as Y, type MenuMode as Z, type MenuProps as _, Badge as a, type UploadItemActions as a$, type MessageConfig as a0, type MessageHandle as a1, type MessageKey as a2, type MessageType as a3, type NotificationConfig as a4, type NotificationPlacement as a5, type NotificationType as a6, Popconfirm as a7, type PopconfirmProps as a8, Popover as a9, Timeline as aA, type TimelineItem as aB, type TimelineProps as aC, Toolbar as aD, type ToolbarItem as aE, type ToolbarProps as aF, Tooltip as aG, type TooltipProps as aH, Tour as aI, type TourProps as aJ, type TourStep as aK, Tree as aL, type TreeDropPosition as aM, type TreeKey as aN, type TreeNode as aO, type TreeProps as aP, Typography as aQ, type TypographyLinkProps as aR, type TypographyProps as aS, type TypographyTitleProps as aT, type TypographyType as aU, Upload as aV, type UploadChangeInfo as aW, type UploadDraggerProps as aX, type UploadFile as aY, type UploadFileStatus as aZ, type UploadHttpRequest as a_, type PopoverProps as aa, Progress as ab, type ProgressProps as ac, type ProgressStatus as ad, Rate as ae, type RateProps as af, Segmented as ag, type SegmentedOption as ah, type SegmentedProps as ai, type SegmentedValue as aj, Spin as ak, type SpinProps as al, type StepItem as am, type StepStatus as an, Steps as ao, type StepsProps as ap, type TabItem as aq, Tabs as ar, type TabsContextMenuClickInfo as as, type TabsOrientation as at, type TabsPosition as au, type TabsProps as av, type TabsType as aw, Tag as ax, type TagProps as ay, type TagVariant as az, type BadgeRibbonProps as b, type UploadProps as b0, type UploadRef as b1, type UploadRejectInfo as b2, type UploadRequestHandle as b3, type UploadRequestOptions as b4, Watermark as b5, type WatermarkFont as b6, type WatermarkProps as b7, message as b8, notification as b9, 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 };
2239
+ export { type MenuTheme 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, type FloatingTrigger as I, ICON_NAMES as J, Icon as K, type IconName as L, type IconProps as M, type IconVariant as N, Image as O, ImagePreview as P, type ImagePreviewConfig as Q, type ImagePreviewProps as R, type ImageProps as S, type TagStatus as T, Input as U, type InputProps as V, Menu as W, type MenuClickInfo as X, type MenuItem as Y, type MenuMode as Z, type MenuProps as _, Badge as a, type UploadHttpRequest as a$, type MessageConfig as a0, type MessageHandle as a1, type MessageKey as a2, type MessageType as a3, type NotificationConfig as a4, type NotificationPlacement as a5, type NotificationType as a6, Popconfirm as a7, type PopconfirmProps as a8, Popover as a9, type TagVariant as aA, Timeline as aB, type TimelineItem as aC, type TimelineProps as aD, Toolbar as aE, type ToolbarItem as aF, type ToolbarProps as aG, Tooltip as aH, type TooltipProps as aI, Tour as aJ, type TourProps as aK, type TourStep as aL, Tree as aM, type TreeDropPosition as aN, type TreeKey as aO, type TreeNode as aP, type TreeProps as aQ, Typography as aR, type TypographyLinkProps as aS, type TypographyProps as aT, type TypographyTitleProps as aU, type TypographyType as aV, Upload as aW, type UploadChangeInfo as aX, type UploadDraggerProps as aY, type UploadFile as aZ, type UploadFileStatus as a_, type PopoverProps as aa, Progress as ab, type ProgressProps as ac, type ProgressStatus as ad, Rate as ae, type RateProps as af, Segmented as ag, type SegmentedOption as ah, type SegmentedProps as ai, type SegmentedValue as aj, Spin as ak, type SpinProps as al, type StepItem as am, type StepStatus as an, Steps as ao, type StepsProps as ap, type TabItem as aq, Tabs as ar, type TabsContextMenuClickInfo as as, type TabsOrientation as at, type TabsPosition as au, type TabsProps as av, type TabsType as aw, Tag as ax, type TagProps as ay, type TagSize as az, type BadgeRibbonProps as b, type UploadItemActions as b0, type UploadProps as b1, type UploadRef as b2, type UploadRejectInfo as b3, type UploadRequestHandle as b4, type UploadRequestOptions as b5, Watermark as b6, type WatermarkFont as b7, type WatermarkProps as b8, message as b9, notification as ba, 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 };
@@ -377,22 +377,31 @@ declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttribu
377
377
 
378
378
  /** 标签的状态类型。 */
379
379
  type TagStatus = "default" | "success" | "processing" | "warning" | "error";
380
- /** 标签的视觉样式。 */
380
+ /** 标签的视觉样式:soft 为柔和浅底,outlined 为透明底描边,filled 为实色背景。 */
381
381
  type TagVariant = "soft" | "outlined" | "filled";
382
+ /** 标签尺寸等级:small、medium、large,分别对应最小高度 20、24、32 像素。 */
383
+ type TagSize = ControlSize;
382
384
  /** 标签的属性配置。 */
383
385
  interface TagProps extends HTMLAttributes<HTMLSpanElement> {
384
386
  /**
385
- * 语义状态
387
+ * 标签尺寸,small / medium / large 的最小高度为 20 / 24 / 32 像素,字号为 12 / 12 / 14 像素。显式 size 优先于 compact;未设置时 compact=true 使用 small,否则继承 Form 的尺寸,无 Form 时为 medium。
388
+ * @defaultValue "medium"(未指定且无 Form 上下文、未开启 compact 时)
389
+ */
390
+ size?: TagSize;
391
+ /** 自定义 CSS 颜色,支持十六进制、rgb、颜色名称及 CSS 变量;覆盖 status 的颜色,由 variant 决定浅底、描边或实色效果。未提供非空颜色时沿用状态配色,style 中对应属性优先级最高。 */
392
+ color?: string;
393
+ /**
394
+ * 语义状态配色;提供 color 时由自定义颜色覆盖。
386
395
  * @defaultValue "default"
387
396
  */
388
397
  status?: TagStatus;
389
398
  /**
390
- * 紧凑尺寸
399
+ * 兼容旧版的紧凑尺寸,未显式设置 size 时等同于 size="small",优先于 Form 继承尺寸;新代码建议直接使用 size。
391
400
  * @defaultValue false
392
401
  */
393
402
  compact?: boolean;
394
403
  /**
395
- 组件的视觉样式。
404
+ * 视觉样式:soft 使用浅色背景和彩色文字;outlined 使用透明背景、彩色边框和文字;filled 使用实色背景、白字和透明边框。同样适用于自定义 color;实色浅底可通过 style.color 调整文字。
396
405
  * @defaultValue "soft"
397
406
  */
398
407
  variant?: TagVariant;
@@ -403,7 +412,10 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
403
412
  * @defaultValue false
404
413
  */
405
414
  closable?: boolean;
406
- /** 悬停或键盘聚焦时展开关闭按钮。 */
415
+ /**
416
+ * 配合 closable 使用:默认隐藏关闭按钮且不占宽度,鼠标悬停或内部获得键盘焦点时,标签向右扩展并显示按钮;离开后收回,过渡为 180 毫秒。禁用时不展开,无悬停能力的触屏设备直接显示以便操作,减少动态效果偏好下取消动画。
417
+ * @defaultValue false
418
+ */
407
419
  closeOnHover?: boolean;
408
420
  /**
409
421
  * 禁用关闭操作
@@ -413,8 +425,8 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
413
425
  /** 请求关闭时触发的回调。 */
414
426
  onClose?: (event: MouseEvent<HTMLButtonElement>) => void;
415
427
  }
416
- /** 标签组件。 */
417
- declare function Tag({ status, compact, variant, icon, closable, closeOnHover, disabled, onClose, className, children, ...props }: TagProps): react.JSX.Element;
428
+ /** 标记状态或筛选条件的标签,支持语义配色、自定义边框色或背景色及关闭操作。 */
429
+ declare function Tag({ size: sizeProp, color, status, compact, variant, icon, closable, closeOnHover, disabled, onClose, className, children, style, ...props }: TagProps): react.JSX.Element;
418
430
 
419
431
  /** 菜单的模式类型。 */
420
432
  type MenuMode = "vertical" | "horizontal" | "inline";
@@ -1985,7 +1997,7 @@ interface MessageConfig {
1985
1997
  key?: MessageKey;
1986
1998
  /** 类型标识,用于选择对应的表现形式。 */
1987
1999
  type?: MessageType;
1988
- /** 消息正文,支持文本或 React 节点。 */
2000
+ /** 消息正文,默认字号为 14px;支持文本或 React 节点,自定义节点可自行设置字号。 */
1989
2001
  content: ReactNode;
1990
2002
  /** 自动关闭延迟,单位为秒;0 表示不自动关闭。 */
1991
2003
  duration?: number;
@@ -2224,4 +2236,4 @@ declare const FloatButton: react.ForwardRefExoticComponent<FloatButtonProps & re
2224
2236
  BackTop: typeof FloatButtonBackTop;
2225
2237
  };
2226
2238
 
2227
- export { type MenuTheme 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, type FloatingTrigger as I, ICON_NAMES as J, Icon as K, type IconName as L, type IconProps as M, type IconVariant as N, Image as O, ImagePreview as P, type ImagePreviewConfig as Q, type ImagePreviewProps as R, type ImageProps as S, type TagStatus as T, Input as U, type InputProps as V, Menu as W, type MenuClickInfo as X, type MenuItem as Y, type MenuMode as Z, type MenuProps as _, Badge as a, type UploadItemActions as a$, type MessageConfig as a0, type MessageHandle as a1, type MessageKey as a2, type MessageType as a3, type NotificationConfig as a4, type NotificationPlacement as a5, type NotificationType as a6, Popconfirm as a7, type PopconfirmProps as a8, Popover as a9, Timeline as aA, type TimelineItem as aB, type TimelineProps as aC, Toolbar as aD, type ToolbarItem as aE, type ToolbarProps as aF, Tooltip as aG, type TooltipProps as aH, Tour as aI, type TourProps as aJ, type TourStep as aK, Tree as aL, type TreeDropPosition as aM, type TreeKey as aN, type TreeNode as aO, type TreeProps as aP, Typography as aQ, type TypographyLinkProps as aR, type TypographyProps as aS, type TypographyTitleProps as aT, type TypographyType as aU, Upload as aV, type UploadChangeInfo as aW, type UploadDraggerProps as aX, type UploadFile as aY, type UploadFileStatus as aZ, type UploadHttpRequest as a_, type PopoverProps as aa, Progress as ab, type ProgressProps as ac, type ProgressStatus as ad, Rate as ae, type RateProps as af, Segmented as ag, type SegmentedOption as ah, type SegmentedProps as ai, type SegmentedValue as aj, Spin as ak, type SpinProps as al, type StepItem as am, type StepStatus as an, Steps as ao, type StepsProps as ap, type TabItem as aq, Tabs as ar, type TabsContextMenuClickInfo as as, type TabsOrientation as at, type TabsPosition as au, type TabsProps as av, type TabsType as aw, Tag as ax, type TagProps as ay, type TagVariant as az, type BadgeRibbonProps as b, type UploadProps as b0, type UploadRef as b1, type UploadRejectInfo as b2, type UploadRequestHandle as b3, type UploadRequestOptions as b4, Watermark as b5, type WatermarkFont as b6, type WatermarkProps as b7, message as b8, notification as b9, 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 };
2239
+ export { type MenuTheme 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, type FloatingTrigger as I, ICON_NAMES as J, Icon as K, type IconName as L, type IconProps as M, type IconVariant as N, Image as O, ImagePreview as P, type ImagePreviewConfig as Q, type ImagePreviewProps as R, type ImageProps as S, type TagStatus as T, Input as U, type InputProps as V, Menu as W, type MenuClickInfo as X, type MenuItem as Y, type MenuMode as Z, type MenuProps as _, Badge as a, type UploadHttpRequest as a$, type MessageConfig as a0, type MessageHandle as a1, type MessageKey as a2, type MessageType as a3, type NotificationConfig as a4, type NotificationPlacement as a5, type NotificationType as a6, Popconfirm as a7, type PopconfirmProps as a8, Popover as a9, type TagVariant as aA, Timeline as aB, type TimelineItem as aC, type TimelineProps as aD, Toolbar as aE, type ToolbarItem as aF, type ToolbarProps as aG, Tooltip as aH, type TooltipProps as aI, Tour as aJ, type TourProps as aK, type TourStep as aL, Tree as aM, type TreeDropPosition as aN, type TreeKey as aO, type TreeNode as aP, type TreeProps as aQ, Typography as aR, type TypographyLinkProps as aS, type TypographyProps as aT, type TypographyTitleProps as aU, type TypographyType as aV, Upload as aW, type UploadChangeInfo as aX, type UploadDraggerProps as aY, type UploadFile as aZ, type UploadFileStatus as a_, type PopoverProps as aa, Progress as ab, type ProgressProps as ac, type ProgressStatus as ad, Rate as ae, type RateProps as af, Segmented as ag, type SegmentedOption as ah, type SegmentedProps as ai, type SegmentedValue as aj, Spin as ak, type SpinProps as al, type StepItem as am, type StepStatus as an, Steps as ao, type StepsProps as ap, type TabItem as aq, Tabs as ar, type TabsContextMenuClickInfo as as, type TabsOrientation as at, type TabsPosition as au, type TabsProps as av, type TabsType as aw, Tag as ax, type TagProps as ay, type TagSize as az, type BadgeRibbonProps as b, type UploadItemActions as b0, type UploadProps as b1, type UploadRef as b2, type UploadRejectInfo as b3, type UploadRequestHandle as b4, type UploadRequestOptions as b5, Watermark as b6, type WatermarkFont as b7, type WatermarkProps as b8, message as b9, notification as ba, 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
@@ -1761,6 +1761,8 @@ function Card({
1761
1761
  // src/components/Tag.tsx
1762
1762
  var import_jsx_runtime10 = require("react/jsx-runtime");
1763
1763
  function Tag({
1764
+ size: sizeProp,
1765
+ color,
1764
1766
  status = "default",
1765
1767
  compact = false,
1766
1768
  variant = "soft",
@@ -1771,13 +1773,17 @@ function Tag({
1771
1773
  onClose,
1772
1774
  className = "",
1773
1775
  children,
1776
+ style,
1774
1777
  ...props
1775
1778
  }) {
1779
+ const size = useControlSize(sizeProp ?? (compact ? "small" : void 0));
1780
+ const customColor = color?.trim() ? variant === "outlined" ? { borderColor: color, color, backgroundColor: "transparent" } : variant === "filled" ? { backgroundColor: color, color: "#fff", borderColor: "transparent" } : { color, backgroundColor: `color-mix(in srgb, ${color} 10%, transparent)`, borderColor: `color-mix(in srgb, ${color} 35%, transparent)` } : void 0;
1776
1781
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1777
1782
  "span",
1778
1783
  {
1779
- className: `sia-tag${closable && closeOnHover ? " sia-tag--close-on-hover" : ""} sia-tag--${status} sia-tag--${variant}${compact ? " sia-tag--compact" : ""}${disabled ? " sia-tag--disabled" : ""} ${className}`.trim(),
1784
+ className: `sia-tag${closable && closeOnHover ? " sia-tag--close-on-hover" : ""} sia-tag--${status} sia-tag--${variant} sia-tag--${size}${compact && size === "small" ? " sia-tag--compact" : ""}${disabled ? " sia-tag--disabled" : ""} ${className}`.trim(),
1780
1785
  "aria-disabled": disabled || void 0,
1786
+ style: customColor ? { ...customColor, ...style } : style,
1781
1787
  ...withTitleTooltip(props),
1782
1788
  children: [
1783
1789
  icon ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sia-tag__icon", children: icon }) : null,
@@ -1793,7 +1799,7 @@ function Tag({
1793
1799
  event.stopPropagation();
1794
1800
  onClose?.(event);
1795
1801
  },
1796
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { name: "close", size: 12 })
1802
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { name: "close", size: size === "large" ? 14 : 12 })
1797
1803
  }
1798
1804
  ) : null
1799
1805
  ]
@@ -2065,6 +2071,9 @@ var CheckboxRoot = (0, import_react11.forwardRef)(function Checkbox({ value, siz
2065
2071
  });
2066
2072
  function CheckboxGroup({
2067
2073
  size: sizeProp,
2074
+ columns,
2075
+ direction = "horizontal",
2076
+ gap,
2068
2077
  value,
2069
2078
  defaultValue = [],
2070
2079
  options,
@@ -2075,6 +2084,11 @@ function CheckboxGroup({
2075
2084
  onChange
2076
2085
  }) {
2077
2086
  const size = useControlSize(sizeProp);
2087
+ const gridColumns = columns !== void 0 && Number.isInteger(columns) && columns > 0 ? columns : void 0;
2088
+ const layoutStyle = {
2089
+ gridTemplateColumns: gridColumns ? `repeat(${gridColumns}, minmax(0, 1fr))` : void 0,
2090
+ gap: gap === void 0 ? void 0 : typeof gap === "number" ? Math.max(0, gap) : `${Math.max(0, gap[0])}px ${Math.max(0, gap[1])}px`
2091
+ };
2078
2092
  const [values, setValues] = useControllableState({ value, defaultValue, onChange });
2079
2093
  const context = (0, import_react11.useMemo)(() => ({
2080
2094
  values,
@@ -2085,7 +2099,7 @@ function CheckboxGroup({
2085
2099
  setValues(next);
2086
2100
  }
2087
2101
  }), [disabled, name, setValues, values]);
2088
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `sia-checkbox-group ${className}`.trim(), role: "group", children: [
2102
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `sia-checkbox-group${gridColumns ? " sia-checkbox-group--grid" : direction === "vertical" ? " sia-checkbox-group--vertical" : ""} ${className}`.trim(), style: layoutStyle, role: "group", children: [
2089
2103
  options?.map((option) => {
2090
2104
  const normalized = typeof option === "object" ? option : { label: String(option), value: option };
2091
2105
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CheckboxRoot, { value: normalized.value, disabled: normalized.disabled, children: normalized.label }, normalized.value);
package/dist/core.css CHANGED
@@ -148,8 +148,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
148
148
  font-size: 12px;
149
149
  }
150
150
  :is(.sia-picker, .sia-time-range).sia-picker--medium {
151
- --sia-control-font-size: 14px;
152
- font-size: 14px;
151
+ --sia-control-font-size: 13px;
152
+ font-size: var(--sia-control-font-size);
153
153
  }
154
154
  :is(.sia-picker, .sia-time-range).sia-picker--large {
155
155
  --sia-control-font-size: 16px;
@@ -162,14 +162,14 @@ fieldset:disabled .sia-input-number__floating-placeholder {
162
162
  --sia-control-font-size: 12px;
163
163
  }
164
164
  :is(.sia-select--medium, .sia-tree-select--medium, .sia-cascader--medium) {
165
- --sia-control-font-size: 14px;
165
+ --sia-control-font-size: 13px;
166
166
  }
167
167
  :is(.sia-select--large, .sia-tree-select--large, .sia-cascader--large) {
168
168
  --sia-control-font-size: 16px;
169
169
  }
170
170
  .sia-tree-select .sia-tree-select__trigger,
171
171
  .sia-cascader .sia-cascader__trigger {
172
- font-size: var(--sia-control-font-size, 14px);
172
+ font-size: var(--sia-control-font-size, 13px);
173
173
  }
174
174
  .sia-segmented.sia-segmented--medium button {
175
175
  font-size: 14px;
@@ -188,7 +188,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
188
188
  .sia-radio--medium {
189
189
  --sia-choice-size: 16px;
190
190
  --sia-choice-dot: 8px;
191
- font-size: 14px;
191
+ font-size: 13px;
192
192
  }
193
193
  .sia-checkbox.sia-checkbox--large,
194
194
  .sia-radio.sia-radio--large {
@@ -238,7 +238,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
238
238
  --sia-switch-width: 44px;
239
239
  --sia-switch-height: 22px;
240
240
  --sia-switch-segmented-height: var(--sia-control-height-medium);
241
- font-size: 14px;
241
+ font-size: 13px;
242
242
  }
243
243
  .sia-switch-wrap.sia-switch-wrap--large {
244
244
  --sia-switch-width: 52px;
@@ -263,6 +263,15 @@ fieldset:disabled .sia-input-number__floating-placeholder {
263
263
  .sia-input-select .sia-input-control--small .sia-button {
264
264
  height: 18px;
265
265
  }
266
+ .sia-textarea-control--small {
267
+ --sia-control-font-size: 12px;
268
+ }
269
+ .sia-textarea-control--medium {
270
+ --sia-control-font-size: 14px;
271
+ }
272
+ .sia-textarea-control--large {
273
+ --sia-control-font-size: 16px;
274
+ }
266
275
  .sia-textarea-control--small .sia-textarea {
267
276
  padding: 4px 7px 22px;
268
277
  font-size: 12px;
@@ -389,7 +398,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
389
398
  --sia-control-height: var(--sia-control-height-medium);
390
399
  --sia-spacing: 16px;
391
400
  --sia-font-size: 16px;
392
- --sia-font-size-small: 14px;
401
+ --sia-font-size-small: 13px;
402
+ --sia-control-font-size: 13px;
393
403
  --sia-font-size-large: 18px;
394
404
  --sia-shadow-popup: 0 4px 12px rgb(0 0 0 / 22%);
395
405
  --sia-scroll-overflow: auto;
@@ -1002,7 +1012,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
1002
1012
  resize: vertical;
1003
1013
  color: inherit;
1004
1014
  font:
1005
- 400 var(--sia-font-size-small)/1.6 system-ui,
1015
+ 400 14px/1.6 system-ui,
1006
1016
  -apple-system,
1007
1017
  "Segoe UI",
1008
1018
  "Microsoft YaHei",
@@ -2393,7 +2403,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
2393
2403
  padding-inline: 16px;
2394
2404
  }
2395
2405
  .sia-message {
2396
- font-size: calc(var(--sia-font-size, 16px) - 1px);
2406
+ font-size: 14px;
2397
2407
  display: flex;
2398
2408
  align-items: center;
2399
2409
  gap: 9px;
@@ -2583,10 +2593,20 @@ fieldset:disabled .sia-input-number__floating-placeholder {
2583
2593
  border: 1px solid var(--sia-color-border);
2584
2594
  border-radius: 5px;
2585
2595
  }
2596
+ .sia-tag--small,
2586
2597
  .sia-tag--compact {
2587
2598
  min-height: 20px;
2588
2599
  padding-inline: 6px;
2589
2600
  }
2601
+ .sia-tag--medium {
2602
+ min-height: 24px;
2603
+ padding-inline: 8px;
2604
+ }
2605
+ .sia-tag--large {
2606
+ min-height: 32px;
2607
+ padding-inline: 10px;
2608
+ font-size: 14px;
2609
+ }
2590
2610
  .sia-tag--success {
2591
2611
  color: #389e0d;
2592
2612
  background: #f6ffed;
@@ -3467,12 +3487,14 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3467
3487
  .sia-table__header-cell,
3468
3488
  .sia-table__cell {
3469
3489
  position: relative;
3470
- height: 38px;
3471
- padding: 8px 12px;
3490
+ height: 36px;
3491
+ padding: 5px 12px;
3472
3492
  border-right: var(--sia-table-column-border-width) solid var(--sia-table-border-color, #EFF2F6);
3473
3493
  border-bottom: var(--sia-table-row-border-width) solid var(--sia-table-border-color, #EFF2F6);
3474
3494
  background: var(--sia-color-surface);
3475
3495
  vertical-align: middle;
3496
+ font-size: 13px;
3497
+ line-height: 1.5;
3476
3498
  }
3477
3499
  .sia-table__cell:last-child {
3478
3500
  border-right: 0;
@@ -3597,7 +3619,13 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3597
3619
  }
3598
3620
  .sia-table__row {
3599
3621
  content-visibility: auto;
3600
- contain-intrinsic-size: auto 38px;
3622
+ contain-intrinsic-size: auto 36px;
3623
+ }
3624
+ .sia-table--small .sia-table__row {
3625
+ contain-intrinsic-size: auto 28px;
3626
+ }
3627
+ .sia-table--large .sia-table__row {
3628
+ contain-intrinsic-size: auto 46px;
3601
3629
  }
3602
3630
  .sia-table__row--striped .sia-table__cell {
3603
3631
  background: color-mix(in srgb, var(--sia-color-background) 55%, var(--sia-color-surface));
@@ -3664,7 +3692,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3664
3692
  .sia-table__cell--merge-sticky > .sia-table__cell-content {
3665
3693
  position: sticky;
3666
3694
  z-index: var(--sia-table-merge-sticky-z-index, 3);
3667
- top: calc(var(--sia-table-header-height, 38px) + var(--sia-table-merge-sticky-inset, 0px));
3695
+ top: calc(var(--sia-table-header-height, 36px) + var(--sia-table-merge-sticky-inset, 0px));
3668
3696
  }
3669
3697
  .sia-table__cell--fixed {
3670
3698
  position: sticky;
@@ -3787,7 +3815,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3787
3815
  .sia-table__empty {
3788
3816
  position: absolute;
3789
3817
  z-index: 7;
3790
- inset: var(--sia-table-header-height, 38px) 0 0;
3818
+ inset: var(--sia-table-header-height, 36px) 0 0;
3791
3819
  display: grid;
3792
3820
  place-items: center;
3793
3821
  min-width: 0;
@@ -3813,8 +3841,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3813
3841
  }
3814
3842
  .sia-table--small .sia-table__header-cell,
3815
3843
  .sia-table--small .sia-table__cell {
3816
- height: 32px;
3817
- padding: 5px 9px;
3844
+ height: 28px;
3845
+ padding: 3px 9px;
3818
3846
  font-size: 12px;
3819
3847
  }
3820
3848
  .sia-table--large .sia-table__header-cell,
@@ -3876,6 +3904,19 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3876
3904
  outline: 2px solid var(--sia-color-primary);
3877
3905
  outline-offset: 1px;
3878
3906
  }
3907
+ .sia-table--medium .sia-table__sort-button {
3908
+ height: 24px;
3909
+ }
3910
+ .sia-table--small .sia-table__sort-button,
3911
+ .sia-table--small .sia-table__filter-button {
3912
+ height: 20px;
3913
+ }
3914
+ .sia-table--medium .sia-table__cell .sia-button--link {
3915
+ height: 24px;
3916
+ }
3917
+ .sia-table--small .sia-table__cell .sia-button--link {
3918
+ height: 20px;
3919
+ }
3879
3920
  .sia-table__filter-header {
3880
3921
  display: flex;
3881
3922
  align-items: center;
@@ -4421,8 +4462,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
4421
4462
  }
4422
4463
  }
4423
4464
  .sia-table__settings-dropdown .sia-menu__item {
4424
- min-height: 34px;
4425
- padding: 4px 12px;
4465
+ min-height: 36px;
4466
+ padding: 5px 12px;
4426
4467
  gap: 10px;
4427
4468
  font-size: 14px;
4428
4469
  line-height: 24px;
@@ -5533,6 +5574,23 @@ fieldset:disabled .sia-input-number__floating-placeholder {
5533
5574
  flex-wrap: wrap;
5534
5575
  gap: 12px 18px;
5535
5576
  }
5577
+ .sia-checkbox-group--vertical {
5578
+ flex-direction: column;
5579
+ align-items: flex-start;
5580
+ flex-wrap: nowrap;
5581
+ }
5582
+ .sia-checkbox-group--grid {
5583
+ display: grid;
5584
+ width: 100%;
5585
+ align-items: start;
5586
+ }
5587
+ .sia-checkbox-group--grid > .sia-checkbox {
5588
+ min-width: 0;
5589
+ }
5590
+ .sia-checkbox-group--grid > .sia-checkbox > .sia-checkbox__label {
5591
+ min-width: 0;
5592
+ overflow-wrap: anywhere;
5593
+ }
5536
5594
  .sia-radio__control {
5537
5595
  display: grid;
5538
5596
  place-items: center;
package/dist/core.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, T as TagStatus, az as TagVariant, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, b0 as UploadProps, b4 as UploadRequestOptions, b8 as message } from './core-C_aAA7OF.cjs';
1
+ export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-DwsFTbqh.cjs';
2
2
  export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-YJbT-MF1.cjs';
3
3
  import 'react';
4
4
  import './shared-Bx4B28Wh.cjs';
package/dist/core.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, T as TagStatus, az as TagVariant, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, b0 as UploadProps, b4 as UploadRequestOptions, b8 as message } from './core-CuszFlw9.js';
1
+ export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-C89ubkwU.js';
2
2
  export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-CCrPqULn.js';
3
3
  import 'react';
4
4
  import './shared-Bx4B28Wh.js';
package/dist/core.js CHANGED
@@ -10,12 +10,12 @@ import {
10
10
  Typography,
11
11
  Upload,
12
12
  message
13
- } from "./chunk-I5KAI6FC.js";
13
+ } from "./chunk-NDJSNM54.js";
14
14
  import "./chunk-YQDHCORW.js";
15
15
  import {
16
16
  Modal,
17
17
  Select
18
- } from "./chunk-DQYNL6VZ.js";
18
+ } from "./chunk-AHBC5UXJ.js";
19
19
  import {
20
20
  Icon,
21
21
  Input,
package/dist/index.cjs CHANGED
@@ -2396,6 +2396,9 @@ var CheckboxRoot = (0, import_react13.forwardRef)(function Checkbox({ value, siz
2396
2396
  });
2397
2397
  function CheckboxGroup({
2398
2398
  size: sizeProp,
2399
+ columns,
2400
+ direction = "horizontal",
2401
+ gap,
2399
2402
  value,
2400
2403
  defaultValue = [],
2401
2404
  options,
@@ -2406,6 +2409,11 @@ function CheckboxGroup({
2406
2409
  onChange
2407
2410
  }) {
2408
2411
  const size = useControlSize(sizeProp);
2412
+ const gridColumns = columns !== void 0 && Number.isInteger(columns) && columns > 0 ? columns : void 0;
2413
+ const layoutStyle = {
2414
+ gridTemplateColumns: gridColumns ? `repeat(${gridColumns}, minmax(0, 1fr))` : void 0,
2415
+ gap: gap === void 0 ? void 0 : typeof gap === "number" ? Math.max(0, gap) : `${Math.max(0, gap[0])}px ${Math.max(0, gap[1])}px`
2416
+ };
2409
2417
  const [values, setValues] = useControllableState({ value, defaultValue, onChange });
2410
2418
  const context = (0, import_react13.useMemo)(() => ({
2411
2419
  values,
@@ -2416,7 +2424,7 @@ function CheckboxGroup({
2416
2424
  setValues(next);
2417
2425
  }
2418
2426
  }), [disabled, name, setValues, values]);
2419
- 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 ${className}`.trim(), role: "group", children: [
2427
+ 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: [
2420
2428
  options?.map((option) => {
2421
2429
  const normalized = typeof option === "object" ? option : { label: String(option), value: option };
2422
2430
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CheckboxRoot, { value: normalized.value, disabled: normalized.disabled, children: normalized.label }, normalized.value);
@@ -10764,6 +10772,8 @@ var message = {
10764
10772
  // src/components/Tag.tsx
10765
10773
  var import_jsx_runtime46 = require("react/jsx-runtime");
10766
10774
  function Tag({
10775
+ size: sizeProp,
10776
+ color,
10767
10777
  status = "default",
10768
10778
  compact = false,
10769
10779
  variant = "soft",
@@ -10774,13 +10784,17 @@ function Tag({
10774
10784
  onClose,
10775
10785
  className = "",
10776
10786
  children,
10787
+ style,
10777
10788
  ...props
10778
10789
  }) {
10790
+ const size = useControlSize(sizeProp ?? (compact ? "small" : void 0));
10791
+ const customColor = color?.trim() ? variant === "outlined" ? { borderColor: color, color, backgroundColor: "transparent" } : variant === "filled" ? { backgroundColor: color, color: "#fff", borderColor: "transparent" } : { color, backgroundColor: `color-mix(in srgb, ${color} 10%, transparent)`, borderColor: `color-mix(in srgb, ${color} 35%, transparent)` } : void 0;
10779
10792
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
10780
10793
  "span",
10781
10794
  {
10782
- className: `sia-tag${closable && closeOnHover ? " sia-tag--close-on-hover" : ""} sia-tag--${status} sia-tag--${variant}${compact ? " sia-tag--compact" : ""}${disabled ? " sia-tag--disabled" : ""} ${className}`.trim(),
10795
+ className: `sia-tag${closable && closeOnHover ? " sia-tag--close-on-hover" : ""} sia-tag--${status} sia-tag--${variant} sia-tag--${size}${compact && size === "small" ? " sia-tag--compact" : ""}${disabled ? " sia-tag--disabled" : ""} ${className}`.trim(),
10783
10796
  "aria-disabled": disabled || void 0,
10797
+ style: customColor ? { ...customColor, ...style } : style,
10784
10798
  ...withTitleTooltip(props),
10785
10799
  children: [
10786
10800
  icon ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "sia-tag__icon", children: icon }) : null,
@@ -10796,7 +10810,7 @@ function Tag({
10796
10810
  event.stopPropagation();
10797
10811
  onClose?.(event);
10798
10812
  },
10799
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { name: "close", size: 12 })
10813
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { name: "close", size: size === "large" ? 14 : 12 })
10800
10814
  }
10801
10815
  ) : null
10802
10816
  ]
@@ -12536,7 +12550,7 @@ function createSortPlugin(options = {}) {
12536
12550
  event.stopPropagation();
12537
12551
  cycle(field, context);
12538
12552
  },
12539
- children: order ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: order === "ascend" ? "arrow-up" : "arrow-down", size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
12553
+ children: order ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: order === "ascend" ? "chevron-up" : "chevron-down", size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
12540
12554
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: "chevron-up", size: 11 }),
12541
12555
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: "chevron-down", size: 11 })
12542
12556
  ] })
@@ -13964,7 +13978,7 @@ var EMPTY_DATA = [];
13964
13978
  var EMPTY_COLUMNS = [];
13965
13979
  var EMPTY_PLUGINS = [];
13966
13980
  var DEFAULT_WIDTH = 160;
13967
- var SIZE_ROW_HEIGHT = { small: 32, medium: 38, large: 46 };
13981
+ var SIZE_ROW_HEIGHT = { small: 28, medium: 36, large: 46 };
13968
13982
  function getHeaderTitleText(content) {
13969
13983
  if (typeof content === "string" || typeof content === "number") return String(content);
13970
13984
  if (Array.isArray(content)) return content.map(getHeaderTitleText).join("");
@@ -14792,8 +14806,8 @@ var SIA_THEME = {
14792
14806
  spacing: 16,
14793
14807
  /** 默认字号,单位为像素。 */
14794
14808
  fontSize: 16,
14795
- /** 小号文字尺寸,单位为像素。 */
14796
- fontSizeSmall: 14,
14809
+ /** 默认小号文字尺寸为 13 像素,对应 --sia-font-size-small;业务可通过 CSS 变量覆盖。 */
14810
+ fontSizeSmall: 13,
14797
14811
  /** 大号文字尺寸,单位为像素。 */
14798
14812
  fontSizeLarge: 18
14799
14813
  };
package/dist/index.css CHANGED
@@ -148,8 +148,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
148
148
  font-size: 12px;
149
149
  }
150
150
  :is(.sia-picker, .sia-time-range).sia-picker--medium {
151
- --sia-control-font-size: 14px;
152
- font-size: 14px;
151
+ --sia-control-font-size: 13px;
152
+ font-size: var(--sia-control-font-size);
153
153
  }
154
154
  :is(.sia-picker, .sia-time-range).sia-picker--large {
155
155
  --sia-control-font-size: 16px;
@@ -162,14 +162,14 @@ fieldset:disabled .sia-input-number__floating-placeholder {
162
162
  --sia-control-font-size: 12px;
163
163
  }
164
164
  :is(.sia-select--medium, .sia-tree-select--medium, .sia-cascader--medium) {
165
- --sia-control-font-size: 14px;
165
+ --sia-control-font-size: 13px;
166
166
  }
167
167
  :is(.sia-select--large, .sia-tree-select--large, .sia-cascader--large) {
168
168
  --sia-control-font-size: 16px;
169
169
  }
170
170
  .sia-tree-select .sia-tree-select__trigger,
171
171
  .sia-cascader .sia-cascader__trigger {
172
- font-size: var(--sia-control-font-size, 14px);
172
+ font-size: var(--sia-control-font-size, 13px);
173
173
  }
174
174
  .sia-segmented.sia-segmented--medium button {
175
175
  font-size: 14px;
@@ -188,7 +188,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
188
188
  .sia-radio--medium {
189
189
  --sia-choice-size: 16px;
190
190
  --sia-choice-dot: 8px;
191
- font-size: 14px;
191
+ font-size: 13px;
192
192
  }
193
193
  .sia-checkbox.sia-checkbox--large,
194
194
  .sia-radio.sia-radio--large {
@@ -238,7 +238,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
238
238
  --sia-switch-width: 44px;
239
239
  --sia-switch-height: 22px;
240
240
  --sia-switch-segmented-height: var(--sia-control-height-medium);
241
- font-size: 14px;
241
+ font-size: 13px;
242
242
  }
243
243
  .sia-switch-wrap.sia-switch-wrap--large {
244
244
  --sia-switch-width: 52px;
@@ -263,6 +263,15 @@ fieldset:disabled .sia-input-number__floating-placeholder {
263
263
  .sia-input-select .sia-input-control--small .sia-button {
264
264
  height: 18px;
265
265
  }
266
+ .sia-textarea-control--small {
267
+ --sia-control-font-size: 12px;
268
+ }
269
+ .sia-textarea-control--medium {
270
+ --sia-control-font-size: 14px;
271
+ }
272
+ .sia-textarea-control--large {
273
+ --sia-control-font-size: 16px;
274
+ }
266
275
  .sia-textarea-control--small .sia-textarea {
267
276
  padding: 4px 7px 22px;
268
277
  font-size: 12px;
@@ -389,7 +398,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
389
398
  --sia-control-height: var(--sia-control-height-medium);
390
399
  --sia-spacing: 16px;
391
400
  --sia-font-size: 16px;
392
- --sia-font-size-small: 14px;
401
+ --sia-font-size-small: 13px;
402
+ --sia-control-font-size: 13px;
393
403
  --sia-font-size-large: 18px;
394
404
  --sia-shadow-popup: 0 4px 12px rgb(0 0 0 / 22%);
395
405
  --sia-scroll-overflow: auto;
@@ -1002,7 +1012,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
1002
1012
  resize: vertical;
1003
1013
  color: inherit;
1004
1014
  font:
1005
- 400 var(--sia-font-size-small)/1.6 system-ui,
1015
+ 400 14px/1.6 system-ui,
1006
1016
  -apple-system,
1007
1017
  "Segoe UI",
1008
1018
  "Microsoft YaHei",
@@ -2393,7 +2403,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
2393
2403
  padding-inline: 16px;
2394
2404
  }
2395
2405
  .sia-message {
2396
- font-size: calc(var(--sia-font-size, 16px) - 1px);
2406
+ font-size: 14px;
2397
2407
  display: flex;
2398
2408
  align-items: center;
2399
2409
  gap: 9px;
@@ -2583,10 +2593,20 @@ fieldset:disabled .sia-input-number__floating-placeholder {
2583
2593
  border: 1px solid var(--sia-color-border);
2584
2594
  border-radius: 5px;
2585
2595
  }
2596
+ .sia-tag--small,
2586
2597
  .sia-tag--compact {
2587
2598
  min-height: 20px;
2588
2599
  padding-inline: 6px;
2589
2600
  }
2601
+ .sia-tag--medium {
2602
+ min-height: 24px;
2603
+ padding-inline: 8px;
2604
+ }
2605
+ .sia-tag--large {
2606
+ min-height: 32px;
2607
+ padding-inline: 10px;
2608
+ font-size: 14px;
2609
+ }
2590
2610
  .sia-tag--success {
2591
2611
  color: #389e0d;
2592
2612
  background: #f6ffed;
@@ -3467,12 +3487,14 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3467
3487
  .sia-table__header-cell,
3468
3488
  .sia-table__cell {
3469
3489
  position: relative;
3470
- height: 38px;
3471
- padding: 8px 12px;
3490
+ height: 36px;
3491
+ padding: 5px 12px;
3472
3492
  border-right: var(--sia-table-column-border-width) solid var(--sia-table-border-color, #EFF2F6);
3473
3493
  border-bottom: var(--sia-table-row-border-width) solid var(--sia-table-border-color, #EFF2F6);
3474
3494
  background: var(--sia-color-surface);
3475
3495
  vertical-align: middle;
3496
+ font-size: 13px;
3497
+ line-height: 1.5;
3476
3498
  }
3477
3499
  .sia-table__cell:last-child {
3478
3500
  border-right: 0;
@@ -3597,7 +3619,13 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3597
3619
  }
3598
3620
  .sia-table__row {
3599
3621
  content-visibility: auto;
3600
- contain-intrinsic-size: auto 38px;
3622
+ contain-intrinsic-size: auto 36px;
3623
+ }
3624
+ .sia-table--small .sia-table__row {
3625
+ contain-intrinsic-size: auto 28px;
3626
+ }
3627
+ .sia-table--large .sia-table__row {
3628
+ contain-intrinsic-size: auto 46px;
3601
3629
  }
3602
3630
  .sia-table__row--striped .sia-table__cell {
3603
3631
  background: color-mix(in srgb, var(--sia-color-background) 55%, var(--sia-color-surface));
@@ -3664,7 +3692,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3664
3692
  .sia-table__cell--merge-sticky > .sia-table__cell-content {
3665
3693
  position: sticky;
3666
3694
  z-index: var(--sia-table-merge-sticky-z-index, 3);
3667
- top: calc(var(--sia-table-header-height, 38px) + var(--sia-table-merge-sticky-inset, 0px));
3695
+ top: calc(var(--sia-table-header-height, 36px) + var(--sia-table-merge-sticky-inset, 0px));
3668
3696
  }
3669
3697
  .sia-table__cell--fixed {
3670
3698
  position: sticky;
@@ -3787,7 +3815,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3787
3815
  .sia-table__empty {
3788
3816
  position: absolute;
3789
3817
  z-index: 7;
3790
- inset: var(--sia-table-header-height, 38px) 0 0;
3818
+ inset: var(--sia-table-header-height, 36px) 0 0;
3791
3819
  display: grid;
3792
3820
  place-items: center;
3793
3821
  min-width: 0;
@@ -3813,8 +3841,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3813
3841
  }
3814
3842
  .sia-table--small .sia-table__header-cell,
3815
3843
  .sia-table--small .sia-table__cell {
3816
- height: 32px;
3817
- padding: 5px 9px;
3844
+ height: 28px;
3845
+ padding: 3px 9px;
3818
3846
  font-size: 12px;
3819
3847
  }
3820
3848
  .sia-table--large .sia-table__header-cell,
@@ -3876,6 +3904,19 @@ fieldset:disabled .sia-input-number__floating-placeholder {
3876
3904
  outline: 2px solid var(--sia-color-primary);
3877
3905
  outline-offset: 1px;
3878
3906
  }
3907
+ .sia-table--medium .sia-table__sort-button {
3908
+ height: 24px;
3909
+ }
3910
+ .sia-table--small .sia-table__sort-button,
3911
+ .sia-table--small .sia-table__filter-button {
3912
+ height: 20px;
3913
+ }
3914
+ .sia-table--medium .sia-table__cell .sia-button--link {
3915
+ height: 24px;
3916
+ }
3917
+ .sia-table--small .sia-table__cell .sia-button--link {
3918
+ height: 20px;
3919
+ }
3879
3920
  .sia-table__filter-header {
3880
3921
  display: flex;
3881
3922
  align-items: center;
@@ -4421,8 +4462,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
4421
4462
  }
4422
4463
  }
4423
4464
  .sia-table__settings-dropdown .sia-menu__item {
4424
- min-height: 34px;
4425
- padding: 4px 12px;
4465
+ min-height: 36px;
4466
+ padding: 5px 12px;
4426
4467
  gap: 10px;
4427
4468
  font-size: 14px;
4428
4469
  line-height: 24px;
@@ -5533,6 +5574,23 @@ fieldset:disabled .sia-input-number__floating-placeholder {
5533
5574
  flex-wrap: wrap;
5534
5575
  gap: 12px 18px;
5535
5576
  }
5577
+ .sia-checkbox-group--vertical {
5578
+ flex-direction: column;
5579
+ align-items: flex-start;
5580
+ flex-wrap: nowrap;
5581
+ }
5582
+ .sia-checkbox-group--grid {
5583
+ display: grid;
5584
+ width: 100%;
5585
+ align-items: start;
5586
+ }
5587
+ .sia-checkbox-group--grid > .sia-checkbox {
5588
+ min-width: 0;
5589
+ }
5590
+ .sia-checkbox-group--grid > .sia-checkbox > .sia-checkbox__label {
5591
+ min-width: 0;
5592
+ overflow-wrap: anywhere;
5593
+ }
5536
5594
  .sia-radio__control {
5537
5595
  display: grid;
5538
5596
  place-items: center;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TagStatus, B as BadgeProps } from './core-C_aAA7OF.cjs';
2
- export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagVariant, aA as Timeline, aB as TimelineItem, aC as TimelineProps, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aG as Tooltip, aH as TooltipProps, aI as Tour, aJ as TourProps, aK as TourStep, aL as Tree, aM as TreeDropPosition, aN as TreeKey, aO as TreeNode, aP as TreeProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, a_ as UploadHttpRequest, a$ as UploadItemActions, b0 as UploadProps, b1 as UploadRef, b2 as UploadRejectInfo, b3 as UploadRequestHandle, b4 as UploadRequestOptions, b5 as Watermark, b6 as WatermarkFont, b7 as WatermarkProps, b8 as message, b9 as notification } from './core-C_aAA7OF.cjs';
1
+ import { T as TagStatus, B as BadgeProps } from './core-DwsFTbqh.cjs';
2
+ export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, aA as TagVariant, aB as Timeline, aC as TimelineItem, aD as TimelineProps, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aH as Tooltip, aI as TooltipProps, aJ as Tour, aK as TourProps, aL as TourStep, aM as Tree, aN as TreeDropPosition, aO as TreeKey, aP as TreeNode, aQ as TreeProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, a$ as UploadHttpRequest, b0 as UploadItemActions, b1 as UploadProps, b2 as UploadRef, b3 as UploadRejectInfo, b4 as UploadRequestHandle, b5 as UploadRequestOptions, b6 as Watermark, b7 as WatermarkFont, b8 as WatermarkProps, b9 as message, ba as notification } from './core-DwsFTbqh.cjs';
3
3
  import * as react from 'react';
4
4
  import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
5
5
  import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
@@ -652,7 +652,7 @@ declare const Drawer: react.ForwardRefExoticComponent<DrawerProps & react.RefAtt
652
652
  type SwitchVariant = "standard" | "segmented";
653
653
  /** 开关的属性配置。 */
654
654
  interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
655
- /** 标准开关高度为 16 / 22 / 28px,分段开关为 22 / 30 / 38px;默认继承 Form */
655
+ /** small / medium / large 标准开关高度为 16 / 22 / 28px,分段开关为 22 / 30 / 38px,文字字号为 12 / 13 / 16px;默认继承 Form,无上下文时为 medium(13px)。 */
656
656
  size?: ControlSize;
657
657
  /** 开关右侧的可见标签 */
658
658
  label?: ReactNode;
@@ -863,7 +863,7 @@ declare const Form: typeof FormRoot & {
863
863
  type CheckboxValue = string | number;
864
864
  /** 复选框的属性配置。 */
865
865
  interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "value" | "onChange"> {
866
- /** 组件尺寸;用于调整控件高度、字号和间距。 */
866
+ /** small / medium / large 文字字号为 12 / 13 / 16 像素,同时调整图形和间距;默认继承所在组或 Form,无上下文时为 medium(13px),组件显式 size 优先。 */
867
867
  size?: ControlSize;
868
868
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
869
869
  value?: CheckboxValue;
@@ -888,7 +888,13 @@ interface CheckboxOption {
888
888
  }
889
889
  /** CheckboxGroup的属性配置。 */
890
890
  interface CheckboxGroupProps {
891
- /** 组件尺寸;用于调整控件高度、字号和间距。 */
891
+ /** 等宽网格的列数,按选项顺序从左到右逐行排列并占满容器宽度;仅正整数生效,未设置或无效时使用 direction 排列。设置有效列数后优先于 direction;同样适用于直接传入的 Checkbox 子项。 */
892
+ columns?: number;
893
+ /** 非网格模式的排列方向:horizontal 横向排列并自动换行,vertical 纵向单列排列;有效 columns 优先。默认 horizontal。 */
894
+ direction?: "horizontal" | "vertical";
895
+ /** 选项间距,单位 px;数字表示统一间距,二元组为 [行间距, 列间距],支持 0,负数按 0 处理。默认 [12, 18],适用于横向、纵向和网格布局。 */
896
+ gap?: number | readonly [number, number];
897
+ /** small / medium / large 文字字号为 12 / 13 / 16 像素,同时调整图形和间距;默认继承所在组或 Form,无上下文时为 medium(13px),组件显式 size 优先。 */
892
898
  size?: ControlSize;
893
899
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
894
900
  value?: readonly CheckboxValue[];
@@ -913,7 +919,7 @@ interface CheckboxGroupProps {
913
919
  /** 值发生变化时调用;参数为新值及类型声明中列出的关联信息。 */
914
920
  onChange?: (values: readonly CheckboxValue[]) => void;
915
921
  }
916
- declare function CheckboxGroup({ size: sizeProp, value, defaultValue, options, disabled, name, className, children, onChange, }: CheckboxGroupProps): react.JSX.Element;
922
+ declare function CheckboxGroup({ size: sizeProp, columns, direction, gap, value, defaultValue, options, disabled, name, className, children, onChange, }: CheckboxGroupProps): react.JSX.Element;
917
923
  /** 复选框组件。 */
918
924
  declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>> & {
919
925
  /** 组合多个子项并统一管理布局或选择状态。 */
@@ -924,7 +930,7 @@ declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.Re
924
930
  type RadioValue = string | number;
925
931
  /** 单选框的属性配置。 */
926
932
  interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "value" | "onChange"> {
927
- /** 组件尺寸;用于调整控件高度、字号和间距。 */
933
+ /** small / medium / large 文字字号为 12 / 13 / 16 像素,同时调整图形和间距;默认继承所在组或 Form,无上下文时为 medium(13px),组件显式 size 优先。 */
928
934
  size?: ControlSize;
929
935
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
930
936
  value: RadioValue;
@@ -944,7 +950,7 @@ interface RadioOption {
944
950
  }
945
951
  /** RadioGroup的属性配置。 */
946
952
  interface RadioGroupProps {
947
- /** 组件尺寸;用于调整控件高度、字号和间距。 */
953
+ /** small / medium / large 文字字号为 12 / 13 / 16 像素,同时调整图形和间距;默认继承所在组或 Form,无上下文时为 medium(13px),组件显式 size 优先。 */
948
954
  size?: ControlSize;
949
955
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
950
956
  value?: RadioValue;
@@ -1365,7 +1371,7 @@ declare function buildFlatTree<T extends Record<string, any>>(items: readonly T[
1365
1371
 
1366
1372
  /** 多行输入的属性配置。 */
1367
1373
  interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
1368
- /** 调整字号和内边距;保留 rows 和内容决定的多行高度。默认继承 Form */
1374
+ /** 调整字号和内边距;small / medium / large 字号为 12 / 14 / 16 像素,保留 rows 和内容决定的多行高度。默认继承 Form,无上下文时为 medium(14px)。 */
1369
1375
  size?: ControlSize;
1370
1376
  /** 字段标签 */
1371
1377
  label?: ReactNode;
@@ -2094,7 +2100,12 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
2094
2100
  height?: number | string;
2095
2101
  /** 表格滚动区域的高度。 */
2096
2102
  tableHeight?: number | string;
2097
- /** 表格密度 */
2103
+ /**
2104
+ * 表格密度;省略时与显式传 medium 相同。small、medium、large 默认行高分别为 28、36、46px。
2105
+ * 单元格使用各尺寸字号和 1.5 倍文字行高,不继承宿主页面的文字行高。
2106
+ * small / medium 数据单元格内的链接按钮高度分别为 20 / 24px,以适配行高;工具栏不受影响,其他自定义内容仍可能撑高单元格。
2107
+ * @defaultValue "medium"
2108
+ */
2098
2109
  size?: TableSize;
2099
2110
  /** 是否显示边框。 */
2100
2111
  bordered?: boolean;
@@ -2110,7 +2121,7 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
2110
2121
  virtual?: boolean;
2111
2122
  /** 启用虚拟滚动的选项数量 */
2112
2123
  virtualThreshold?: number;
2113
- /** 行高度,虚拟滚动用其计算行位置。 */
2124
+ /** 行高度,单位为 px,虚拟滚动用其计算行位置;默认随 size 取 small 28、medium 36、large 46。自定义内容应适配行高,避免撑高后导致虚拟滚动位置偏差。 */
2114
2125
  rowHeight?: number;
2115
2126
  /** 虚拟列表在可视区域前后额外渲染的数量。 */
2116
2127
  overscan?: number;
@@ -2446,7 +2457,7 @@ interface TableSortApi {
2446
2457
  /** 清空当前值或内容。 */
2447
2458
  clear: () => void;
2448
2459
  }
2449
- /** 创建表格列排序插件。将返回值加入 Table 的 plugins 后生效;点击列头按钮依次切换升序、降序和未排序,当前方向以高亮单箭头显示,悬停提示当前状态及下一步操作。 */
2460
+ /** 创建表格列排序插件。将返回值加入 Table 的 plugins 后生效;点击列头按钮依次切换升序、降序和未排序,升序使用高亮 chevron-up,降序使用高亮 chevron-down,悬停提示当前状态及下一步操作。 */
2450
2461
  declare function createSortPlugin<T extends Record<string, unknown>>(options?: TableSortPluginOptions): TablePlugin<T, SortState, TableSortApi>;
2451
2462
  /** 列标识到筛选条件的映射。 */
2452
2463
  type TableFilterValues = Readonly<Record<string, string>>;
@@ -2830,8 +2841,8 @@ declare const SIA_THEME: {
2830
2841
  readonly spacing: 16;
2831
2842
  /** 默认字号,单位为像素。 */
2832
2843
  readonly fontSize: 16;
2833
- /** 小号文字尺寸,单位为像素。 */
2834
- readonly fontSizeSmall: 14;
2844
+ /** 默认小号文字尺寸为 13 像素,对应 --sia-font-size-small;业务可通过 CSS 变量覆盖。 */
2845
+ readonly fontSizeSmall: 13;
2835
2846
  /** 大号文字尺寸,单位为像素。 */
2836
2847
  readonly fontSizeLarge: 18;
2837
2848
  };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TagStatus, B as BadgeProps } from './core-CuszFlw9.js';
2
- export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagVariant, aA as Timeline, aB as TimelineItem, aC as TimelineProps, aD as Toolbar, aE as ToolbarItem, aF as ToolbarProps, aG as Tooltip, aH as TooltipProps, aI as Tour, aJ as TourProps, aK as TourStep, aL as Tree, aM as TreeDropPosition, aN as TreeKey, aO as TreeNode, aP as TreeProps, aQ as Typography, aR as TypographyLinkProps, aS as TypographyProps, aT as TypographyTitleProps, aU as TypographyType, aV as Upload, aW as UploadChangeInfo, aX as UploadDraggerProps, aY as UploadFile, aZ as UploadFileStatus, a_ as UploadHttpRequest, a$ as UploadItemActions, b0 as UploadProps, b1 as UploadRef, b2 as UploadRejectInfo, b3 as UploadRequestHandle, b4 as UploadRequestOptions, b5 as Watermark, b6 as WatermarkFont, b7 as WatermarkProps, b8 as message, b9 as notification } from './core-CuszFlw9.js';
1
+ import { T as TagStatus, B as BadgeProps } from './core-C89ubkwU.js';
2
+ export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, aA as TagVariant, aB as Timeline, aC as TimelineItem, aD as TimelineProps, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aH as Tooltip, aI as TooltipProps, aJ as Tour, aK as TourProps, aL as TourStep, aM as Tree, aN as TreeDropPosition, aO as TreeKey, aP as TreeNode, aQ as TreeProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, a$ as UploadHttpRequest, b0 as UploadItemActions, b1 as UploadProps, b2 as UploadRef, b3 as UploadRejectInfo, b4 as UploadRequestHandle, b5 as UploadRequestOptions, b6 as Watermark, b7 as WatermarkFont, b8 as WatermarkProps, b9 as message, ba as notification } from './core-C89ubkwU.js';
3
3
  import * as react from 'react';
4
4
  import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
5
5
  import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.js';
@@ -652,7 +652,7 @@ declare const Drawer: react.ForwardRefExoticComponent<DrawerProps & react.RefAtt
652
652
  type SwitchVariant = "standard" | "segmented";
653
653
  /** 开关的属性配置。 */
654
654
  interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
655
- /** 标准开关高度为 16 / 22 / 28px,分段开关为 22 / 30 / 38px;默认继承 Form */
655
+ /** small / medium / large 标准开关高度为 16 / 22 / 28px,分段开关为 22 / 30 / 38px,文字字号为 12 / 13 / 16px;默认继承 Form,无上下文时为 medium(13px)。 */
656
656
  size?: ControlSize;
657
657
  /** 开关右侧的可见标签 */
658
658
  label?: ReactNode;
@@ -863,7 +863,7 @@ declare const Form: typeof FormRoot & {
863
863
  type CheckboxValue = string | number;
864
864
  /** 复选框的属性配置。 */
865
865
  interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "value" | "onChange"> {
866
- /** 组件尺寸;用于调整控件高度、字号和间距。 */
866
+ /** small / medium / large 文字字号为 12 / 13 / 16 像素,同时调整图形和间距;默认继承所在组或 Form,无上下文时为 medium(13px),组件显式 size 优先。 */
867
867
  size?: ControlSize;
868
868
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
869
869
  value?: CheckboxValue;
@@ -888,7 +888,13 @@ interface CheckboxOption {
888
888
  }
889
889
  /** CheckboxGroup的属性配置。 */
890
890
  interface CheckboxGroupProps {
891
- /** 组件尺寸;用于调整控件高度、字号和间距。 */
891
+ /** 等宽网格的列数,按选项顺序从左到右逐行排列并占满容器宽度;仅正整数生效,未设置或无效时使用 direction 排列。设置有效列数后优先于 direction;同样适用于直接传入的 Checkbox 子项。 */
892
+ columns?: number;
893
+ /** 非网格模式的排列方向:horizontal 横向排列并自动换行,vertical 纵向单列排列;有效 columns 优先。默认 horizontal。 */
894
+ direction?: "horizontal" | "vertical";
895
+ /** 选项间距,单位 px;数字表示统一间距,二元组为 [行间距, 列间距],支持 0,负数按 0 处理。默认 [12, 18],适用于横向、纵向和网格布局。 */
896
+ gap?: number | readonly [number, number];
897
+ /** small / medium / large 文字字号为 12 / 13 / 16 像素,同时调整图形和间距;默认继承所在组或 Form,无上下文时为 medium(13px),组件显式 size 优先。 */
892
898
  size?: ControlSize;
893
899
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
894
900
  value?: readonly CheckboxValue[];
@@ -913,7 +919,7 @@ interface CheckboxGroupProps {
913
919
  /** 值发生变化时调用;参数为新值及类型声明中列出的关联信息。 */
914
920
  onChange?: (values: readonly CheckboxValue[]) => void;
915
921
  }
916
- declare function CheckboxGroup({ size: sizeProp, value, defaultValue, options, disabled, name, className, children, onChange, }: CheckboxGroupProps): react.JSX.Element;
922
+ declare function CheckboxGroup({ size: sizeProp, columns, direction, gap, value, defaultValue, options, disabled, name, className, children, onChange, }: CheckboxGroupProps): react.JSX.Element;
917
923
  /** 复选框组件。 */
918
924
  declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>> & {
919
925
  /** 组合多个子项并统一管理布局或选择状态。 */
@@ -924,7 +930,7 @@ declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.Re
924
930
  type RadioValue = string | number;
925
931
  /** 单选框的属性配置。 */
926
932
  interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "value" | "onChange"> {
927
- /** 组件尺寸;用于调整控件高度、字号和间距。 */
933
+ /** small / medium / large 文字字号为 12 / 13 / 16 像素,同时调整图形和间距;默认继承所在组或 Form,无上下文时为 medium(13px),组件显式 size 优先。 */
928
934
  size?: ControlSize;
929
935
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
930
936
  value: RadioValue;
@@ -944,7 +950,7 @@ interface RadioOption {
944
950
  }
945
951
  /** RadioGroup的属性配置。 */
946
952
  interface RadioGroupProps {
947
- /** 组件尺寸;用于调整控件高度、字号和间距。 */
953
+ /** small / medium / large 文字字号为 12 / 13 / 16 像素,同时调整图形和间距;默认继承所在组或 Form,无上下文时为 medium(13px),组件显式 size 优先。 */
948
954
  size?: ControlSize;
949
955
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
950
956
  value?: RadioValue;
@@ -1365,7 +1371,7 @@ declare function buildFlatTree<T extends Record<string, any>>(items: readonly T[
1365
1371
 
1366
1372
  /** 多行输入的属性配置。 */
1367
1373
  interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
1368
- /** 调整字号和内边距;保留 rows 和内容决定的多行高度。默认继承 Form */
1374
+ /** 调整字号和内边距;small / medium / large 字号为 12 / 14 / 16 像素,保留 rows 和内容决定的多行高度。默认继承 Form,无上下文时为 medium(14px)。 */
1369
1375
  size?: ControlSize;
1370
1376
  /** 字段标签 */
1371
1377
  label?: ReactNode;
@@ -2094,7 +2100,12 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
2094
2100
  height?: number | string;
2095
2101
  /** 表格滚动区域的高度。 */
2096
2102
  tableHeight?: number | string;
2097
- /** 表格密度 */
2103
+ /**
2104
+ * 表格密度;省略时与显式传 medium 相同。small、medium、large 默认行高分别为 28、36、46px。
2105
+ * 单元格使用各尺寸字号和 1.5 倍文字行高,不继承宿主页面的文字行高。
2106
+ * small / medium 数据单元格内的链接按钮高度分别为 20 / 24px,以适配行高;工具栏不受影响,其他自定义内容仍可能撑高单元格。
2107
+ * @defaultValue "medium"
2108
+ */
2098
2109
  size?: TableSize;
2099
2110
  /** 是否显示边框。 */
2100
2111
  bordered?: boolean;
@@ -2110,7 +2121,7 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
2110
2121
  virtual?: boolean;
2111
2122
  /** 启用虚拟滚动的选项数量 */
2112
2123
  virtualThreshold?: number;
2113
- /** 行高度,虚拟滚动用其计算行位置。 */
2124
+ /** 行高度,单位为 px,虚拟滚动用其计算行位置;默认随 size 取 small 28、medium 36、large 46。自定义内容应适配行高,避免撑高后导致虚拟滚动位置偏差。 */
2114
2125
  rowHeight?: number;
2115
2126
  /** 虚拟列表在可视区域前后额外渲染的数量。 */
2116
2127
  overscan?: number;
@@ -2446,7 +2457,7 @@ interface TableSortApi {
2446
2457
  /** 清空当前值或内容。 */
2447
2458
  clear: () => void;
2448
2459
  }
2449
- /** 创建表格列排序插件。将返回值加入 Table 的 plugins 后生效;点击列头按钮依次切换升序、降序和未排序,当前方向以高亮单箭头显示,悬停提示当前状态及下一步操作。 */
2460
+ /** 创建表格列排序插件。将返回值加入 Table 的 plugins 后生效;点击列头按钮依次切换升序、降序和未排序,升序使用高亮 chevron-up,降序使用高亮 chevron-down,悬停提示当前状态及下一步操作。 */
2450
2461
  declare function createSortPlugin<T extends Record<string, unknown>>(options?: TableSortPluginOptions): TablePlugin<T, SortState, TableSortApi>;
2451
2462
  /** 列标识到筛选条件的映射。 */
2452
2463
  type TableFilterValues = Readonly<Record<string, string>>;
@@ -2830,8 +2841,8 @@ declare const SIA_THEME: {
2830
2841
  readonly spacing: 16;
2831
2842
  /** 默认字号,单位为像素。 */
2832
2843
  readonly fontSize: 16;
2833
- /** 小号文字尺寸,单位为像素。 */
2834
- readonly fontSizeSmall: 14;
2844
+ /** 默认小号文字尺寸为 13 像素,对应 --sia-font-size-small;业务可通过 CSS 变量覆盖。 */
2845
+ readonly fontSizeSmall: 13;
2835
2846
  /** 大号文字尺寸,单位为像素。 */
2836
2847
  readonly fontSizeLarge: 18;
2837
2848
  };
package/dist/index.js CHANGED
@@ -80,7 +80,7 @@ import {
80
80
  Watermark,
81
81
  message,
82
82
  notification
83
- } from "./chunk-I5KAI6FC.js";
83
+ } from "./chunk-NDJSNM54.js";
84
84
  import {
85
85
  TextArea
86
86
  } from "./chunk-YQDHCORW.js";
@@ -95,7 +95,7 @@ import {
95
95
  DatePicker,
96
96
  SelectDateRange,
97
97
  TimePanel
98
- } from "./chunk-T2EKKSCH.js";
98
+ } from "./chunk-33C5ZEQ6.js";
99
99
  import {
100
100
  Checkbox,
101
101
  FloatingScrollbarProvider,
@@ -110,7 +110,7 @@ import {
110
110
  Tree,
111
111
  useOverlayLifecycle,
112
112
  useScrollbarProximity
113
- } from "./chunk-DQYNL6VZ.js";
113
+ } from "./chunk-AHBC5UXJ.js";
114
114
  import {
115
115
  Dropdown,
116
116
  FILLED_ICON_NAMES,
@@ -5729,7 +5729,7 @@ function createSortPlugin(options = {}) {
5729
5729
  event.stopPropagation();
5730
5730
  cycle(field, context);
5731
5731
  },
5732
- children: order ? /* @__PURE__ */ jsx21(Icon, { name: order === "ascend" ? "arrow-up" : "arrow-down", size: 18 }) : /* @__PURE__ */ jsxs20(Fragment7, { children: [
5732
+ children: order ? /* @__PURE__ */ jsx21(Icon, { name: order === "ascend" ? "chevron-up" : "chevron-down", size: 18 }) : /* @__PURE__ */ jsxs20(Fragment7, { children: [
5733
5733
  /* @__PURE__ */ jsx21(Icon, { name: "chevron-up", size: 11 }),
5734
5734
  /* @__PURE__ */ jsx21(Icon, { name: "chevron-down", size: 11 })
5735
5735
  ] })
@@ -7157,7 +7157,7 @@ var EMPTY_DATA = [];
7157
7157
  var EMPTY_COLUMNS = [];
7158
7158
  var EMPTY_PLUGINS = [];
7159
7159
  var DEFAULT_WIDTH = 160;
7160
- var SIZE_ROW_HEIGHT = { small: 32, medium: 38, large: 46 };
7160
+ var SIZE_ROW_HEIGHT = { small: 28, medium: 36, large: 46 };
7161
7161
  function getHeaderTitleText(content) {
7162
7162
  if (typeof content === "string" || typeof content === "number") return String(content);
7163
7163
  if (Array.isArray(content)) return content.map(getHeaderTitleText).join("");
@@ -7985,8 +7985,8 @@ var SIA_THEME = {
7985
7985
  spacing: 16,
7986
7986
  /** 默认字号,单位为像素。 */
7987
7987
  fontSize: 16,
7988
- /** 小号文字尺寸,单位为像素。 */
7989
- fontSizeSmall: 14,
7988
+ /** 默认小号文字尺寸为 13 像素,对应 --sia-font-size-small;业务可通过 CSS 变量覆盖。 */
7989
+ fontSizeSmall: 13,
7990
7990
  /** 大号文字尺寸,单位为像素。 */
7991
7991
  fontSizeLarge: 18
7992
7992
  };
@@ -2815,6 +2815,9 @@ var CheckboxRoot = (0, import_react12.forwardRef)(function Checkbox({ value, siz
2815
2815
  });
2816
2816
  function CheckboxGroup({
2817
2817
  size: sizeProp,
2818
+ columns,
2819
+ direction = "horizontal",
2820
+ gap,
2818
2821
  value,
2819
2822
  defaultValue = [],
2820
2823
  options,
@@ -2825,6 +2828,11 @@ function CheckboxGroup({
2825
2828
  onChange
2826
2829
  }) {
2827
2830
  const size = useControlSize(sizeProp);
2831
+ const gridColumns = columns !== void 0 && Number.isInteger(columns) && columns > 0 ? columns : void 0;
2832
+ const layoutStyle = {
2833
+ gridTemplateColumns: gridColumns ? `repeat(${gridColumns}, minmax(0, 1fr))` : void 0,
2834
+ gap: gap === void 0 ? void 0 : typeof gap === "number" ? Math.max(0, gap) : `${Math.max(0, gap[0])}px ${Math.max(0, gap[1])}px`
2835
+ };
2828
2836
  const [values, setValues] = useControllableState({ value, defaultValue, onChange });
2829
2837
  const context = (0, import_react12.useMemo)(() => ({
2830
2838
  values,
@@ -2835,7 +2843,7 @@ function CheckboxGroup({
2835
2843
  setValues(next);
2836
2844
  }
2837
2845
  }), [disabled, name, setValues, values]);
2838
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: `sia-checkbox-group ${className}`.trim(), role: "group", children: [
2846
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: `sia-checkbox-group${gridColumns ? " sia-checkbox-group--grid" : direction === "vertical" ? " sia-checkbox-group--vertical" : ""} ${className}`.trim(), style: layoutStyle, role: "group", children: [
2839
2847
  options?.map((option) => {
2840
2848
  const normalized = typeof option === "object" ? option : { label: String(option), value: option };
2841
2849
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CheckboxRoot, { value: normalized.value, disabled: normalized.disabled, children: normalized.label }, normalized.value);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SelectDateRange
3
- } from "./chunk-T2EKKSCH.js";
4
- import "./chunk-DQYNL6VZ.js";
3
+ } from "./chunk-33C5ZEQ6.js";
4
+ import "./chunk-AHBC5UXJ.js";
5
5
  import "./chunk-YF2I6SDB.js";
6
6
  import "./chunk-IYNS423D.js";
7
7
  import "./chunk-RAO3JHDL.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sia.soul/sia-react-ui",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "Sia Design components and tokens for React",
5
5
  "publishConfig": {
6
6
  "access": "public",