@sia.soul/sia-react-ui 0.1.84 → 0.1.85

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.
@@ -2,7 +2,7 @@ import {
2
2
  Dropdown,
3
3
  Icon,
4
4
  Input
5
- } from "./chunk-VNVDG4AC.js";
5
+ } from "./chunk-U2WPN6TD.js";
6
6
  import {
7
7
  Button
8
8
  } from "./chunk-SJFT5OSX.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Popover,
3
3
  Tooltip
4
- } from "./chunk-W3EKQOPR.js";
4
+ } from "./chunk-RR7HW5HO.js";
5
5
  import {
6
6
  Dropdown,
7
7
  Icon,
8
8
  useOverlayLifecycle
9
- } from "./chunk-VNVDG4AC.js";
9
+ } from "./chunk-U2WPN6TD.js";
10
10
  import {
11
11
  Button,
12
12
  TextArea
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  FloatingScrollbarProvider,
3
3
  Select
4
- } from "./chunk-W3EKQOPR.js";
4
+ } from "./chunk-RR7HW5HO.js";
5
5
  import {
6
6
  Icon
7
- } from "./chunk-VNVDG4AC.js";
7
+ } from "./chunk-U2WPN6TD.js";
8
8
  import {
9
9
  PopupPortal,
10
10
  useControlSize,
@@ -3,7 +3,7 @@ import {
3
3
  Icon,
4
4
  Input,
5
5
  Modal
6
- } from "./chunk-VNVDG4AC.js";
6
+ } from "./chunk-U2WPN6TD.js";
7
7
  import {
8
8
  Button
9
9
  } from "./chunk-SJFT5OSX.js";
@@ -1051,7 +1051,7 @@ function Steps({ items, current = 0, initial = 0, direction = "horizontal", type
1051
1051
  ] }, index);
1052
1052
  }) });
1053
1053
  }
1054
- function Segmented({ options, value, defaultValue, variant = "default", size: sizeProp, block = false, vertical = false, disabled = false, onChange, className = "", onKeyDown, ...props }) {
1054
+ function Segmented({ options, value, defaultValue, variant = "default", shape = "capsule", size: sizeProp, block = false, vertical = false, disabled = false, onChange, className = "", onKeyDown, ...props }) {
1055
1055
  const size = useControlSize(sizeProp);
1056
1056
  const normalized = useMemo(() => options.map((option) => typeof option === "object" ? option : { label: option, value: option }), [options]);
1057
1057
  const [current, setCurrent] = useControllableState({ value, defaultValue: defaultValue ?? normalized[0]?.value, onChange: (next) => next !== void 0 && onChange?.(next) });
@@ -1064,7 +1064,7 @@ function Segmented({ options, value, defaultValue, variant = "default", size: si
1064
1064
  const next = event.key === "ArrowRight" || event.key === "ArrowDown" ? enabled[(index + 1) % enabled.length] : enabled[(index - 1 + enabled.length) % enabled.length];
1065
1065
  if (next) setCurrent(next.value);
1066
1066
  }
1067
- return /* @__PURE__ */ jsx3("div", { className: `sia-segmented sia-segmented--${size}${variant === "zigzag" && !vertical && normalized.length === 2 ? " sia-segmented--zigzag" : ""}${block ? " sia-segmented--block" : ""}${vertical ? " sia-segmented--vertical" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), role: "radiogroup", onKeyDown: keyboard, ...withTitleTooltip(props), children: normalized.map((option) => /* @__PURE__ */ createElement("button", { type: "button", role: "radio", "aria-checked": option.value === current, ...withTitleTooltip({ title: option.title }), className: option.value === current ? "is-selected" : "", disabled: disabled || option.disabled, key: option.value, onClick: () => setCurrent(option.value) }, option.icon, /* @__PURE__ */ jsx3("span", { children: option.label ?? option.value }))) });
1067
+ return /* @__PURE__ */ jsx3("div", { className: `sia-segmented sia-segmented--${size}${variant === "zigzag" && !vertical && normalized.length === 2 ? ` sia-segmented--zigzag sia-segmented--shape-${shape}` : ""}${block ? " sia-segmented--block" : ""}${vertical ? " sia-segmented--vertical" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), role: "radiogroup", onKeyDown: keyboard, ...withTitleTooltip(props), children: normalized.map((option) => /* @__PURE__ */ createElement("button", { type: "button", role: "radio", "aria-checked": option.value === current, ...withTitleTooltip({ title: option.title }), className: option.value === current ? "is-selected" : "", disabled: disabled || option.disabled, key: option.value, onClick: () => setCurrent(option.value) }, option.icon, /* @__PURE__ */ jsx3("span", { children: option.label ?? option.value }))) });
1068
1068
  }
1069
1069
 
1070
1070
  // src/components/Dropdown.tsx
@@ -662,11 +662,17 @@ type SegmentedOption = SegmentedValue | {
662
662
  /** 分段选择的属性配置。 */
663
663
  interface SegmentedProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
664
664
  /**
665
- * default 为圆角分段样式;slash 为横向闪电折线分隔样式,选中项使用主题色高亮。
665
+ * default 为圆角分段样式;zigzag 为横向闪电折线分隔样式,选中项主题色高亮并平滑放大至 1.04 倍(200ms)。
666
666
  * 仅支持两个横向选项;vertical=true 或选项数量不为 2 时回退为 default 样式。
667
667
  * @defaultValue "default"
668
668
  */
669
669
  variant?: "default" | "zigzag";
670
+ /**
671
+ * zigzag 变体的外形:capsule 胶囊、rectangle 直角矩形、rounded 主题圆角矩形。
672
+ * default 变体不受此属性影响。
673
+ * @defaultValue "capsule"
674
+ */
675
+ shape?: "capsule" | "rectangle" | "rounded";
670
676
  /** 可供用户选择的候选项列表。 */
671
677
  options: readonly SegmentedOption[];
672
678
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
@@ -694,7 +700,7 @@ interface SegmentedProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultVa
694
700
  onChange?: (value: SegmentedValue) => void;
695
701
  }
696
702
  /** 分段选择组件。 */
697
- declare function Segmented({ options, value, defaultValue, variant, size: sizeProp, block, vertical, disabled, onChange, className, onKeyDown, ...props }: SegmentedProps): react.JSX.Element;
703
+ declare function Segmented({ options, value, defaultValue, variant, shape, size: sizeProp, block, vertical, disabled, onChange, className, onKeyDown, ...props }: SegmentedProps): react.JSX.Element;
698
704
 
699
705
  /** Tab的项目定义。 */
700
706
  interface TabItem {
@@ -662,11 +662,17 @@ type SegmentedOption = SegmentedValue | {
662
662
  /** 分段选择的属性配置。 */
663
663
  interface SegmentedProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
664
664
  /**
665
- * default 为圆角分段样式;slash 为横向闪电折线分隔样式,选中项使用主题色高亮。
665
+ * default 为圆角分段样式;zigzag 为横向闪电折线分隔样式,选中项主题色高亮并平滑放大至 1.04 倍(200ms)。
666
666
  * 仅支持两个横向选项;vertical=true 或选项数量不为 2 时回退为 default 样式。
667
667
  * @defaultValue "default"
668
668
  */
669
669
  variant?: "default" | "zigzag";
670
+ /**
671
+ * zigzag 变体的外形:capsule 胶囊、rectangle 直角矩形、rounded 主题圆角矩形。
672
+ * default 变体不受此属性影响。
673
+ * @defaultValue "capsule"
674
+ */
675
+ shape?: "capsule" | "rectangle" | "rounded";
670
676
  /** 可供用户选择的候选项列表。 */
671
677
  options: readonly SegmentedOption[];
672
678
  /** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
@@ -694,7 +700,7 @@ interface SegmentedProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultVa
694
700
  onChange?: (value: SegmentedValue) => void;
695
701
  }
696
702
  /** 分段选择组件。 */
697
- declare function Segmented({ options, value, defaultValue, variant, size: sizeProp, block, vertical, disabled, onChange, className, onKeyDown, ...props }: SegmentedProps): react.JSX.Element;
703
+ declare function Segmented({ options, value, defaultValue, variant, shape, size: sizeProp, block, vertical, disabled, onChange, className, onKeyDown, ...props }: SegmentedProps): react.JSX.Element;
698
704
 
699
705
  /** Tab的项目定义。 */
700
706
  interface TabItem {
package/dist/core.cjs CHANGED
@@ -1408,7 +1408,7 @@ function Menu({
1408
1408
  }
1409
1409
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { ref: rootRef, className: `sia-menu sia-menu--${mode} sia-menu--${theme}${inlineCollapsed ? " sia-menu--collapsed" : ""} ${className}`.trim(), role: "menu", ...withTitleTooltip(rest), "data-sia-menu-owner": menuId, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MenuLevel, { items, level: 0, parents: [], props: { menuId, mode, theme, multiple, selectable, inlineCollapsed, inlineIndent, triggerSubMenuAction, selected, open, select, toggle } }) });
1410
1410
  }
1411
- function Segmented({ options, value, defaultValue, variant = "default", size: sizeProp, block = false, vertical = false, disabled = false, onChange, className = "", onKeyDown, ...props }) {
1411
+ function Segmented({ options, value, defaultValue, variant = "default", shape = "capsule", size: sizeProp, block = false, vertical = false, disabled = false, onChange, className = "", onKeyDown, ...props }) {
1412
1412
  const size = useControlSize(sizeProp);
1413
1413
  const normalized = (0, import_react5.useMemo)(() => options.map((option) => typeof option === "object" ? option : { label: option, value: option }), [options]);
1414
1414
  const [current, setCurrent] = useControllableState({ value, defaultValue: defaultValue ?? normalized[0]?.value, onChange: (next) => next !== void 0 && onChange?.(next) });
@@ -1421,7 +1421,7 @@ function Segmented({ options, value, defaultValue, variant = "default", size: si
1421
1421
  const next = event.key === "ArrowRight" || event.key === "ArrowDown" ? enabled[(index + 1) % enabled.length] : enabled[(index - 1 + enabled.length) % enabled.length];
1422
1422
  if (next) setCurrent(next.value);
1423
1423
  }
1424
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: `sia-segmented sia-segmented--${size}${variant === "zigzag" && !vertical && normalized.length === 2 ? " sia-segmented--zigzag" : ""}${block ? " sia-segmented--block" : ""}${vertical ? " sia-segmented--vertical" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), role: "radiogroup", onKeyDown: keyboard, ...withTitleTooltip(props), children: normalized.map((option) => /* @__PURE__ */ (0, import_react6.createElement)("button", { type: "button", role: "radio", "aria-checked": option.value === current, ...withTitleTooltip({ title: option.title }), className: option.value === current ? "is-selected" : "", disabled: disabled || option.disabled, key: option.value, onClick: () => setCurrent(option.value) }, option.icon, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: option.label ?? option.value }))) });
1424
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: `sia-segmented sia-segmented--${size}${variant === "zigzag" && !vertical && normalized.length === 2 ? ` sia-segmented--zigzag sia-segmented--shape-${shape}` : ""}${block ? " sia-segmented--block" : ""}${vertical ? " sia-segmented--vertical" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), role: "radiogroup", onKeyDown: keyboard, ...withTitleTooltip(props), children: normalized.map((option) => /* @__PURE__ */ (0, import_react6.createElement)("button", { type: "button", role: "radio", "aria-checked": option.value === current, ...withTitleTooltip({ title: option.title }), className: option.value === current ? "is-selected" : "", disabled: disabled || option.disabled, key: option.value, onClick: () => setCurrent(option.value) }, option.icon, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: option.label ?? option.value }))) });
1425
1425
  }
1426
1426
 
1427
1427
  // src/components/Dropdown.tsx
package/dist/core.css CHANGED
@@ -10605,7 +10605,7 @@ button.sia-treemap__tile:focus-visible,
10605
10605
  .sia-segmented.sia-segmented--zigzag {
10606
10606
  gap: 0;
10607
10607
  padding: 0;
10608
- overflow: hidden;
10608
+ overflow: visible;
10609
10609
  background: var(--sia-color-surface);
10610
10610
  border: 1px solid var(--sia-color-border);
10611
10611
  border-radius: 999px;
@@ -10656,6 +10656,37 @@ button.sia-treemap__tile:focus-visible,
10656
10656
  outline: 2px solid var(--sia-color-primary);
10657
10657
  outline-offset: -2px;
10658
10658
  }
10659
+ .sia-segmented--zigzag.sia-segmented--shape-rectangle {
10660
+ border-radius: 0;
10661
+ }
10662
+ .sia-segmented--zigzag.sia-segmented--shape-rounded {
10663
+ border-radius: var(--sia-radius);
10664
+ }
10665
+ .sia-segmented--zigzag button {
10666
+ transform: scale(1);
10667
+ transition: transform 200ms cubic-bezier(.2, .8, .2, 1), color 200ms ease;
10668
+ }
10669
+ .sia-segmented--zigzag button.is-selected {
10670
+ transform: scale(1.04);
10671
+ }
10672
+ .sia-segmented--zigzag button:first-child {
10673
+ border-top-left-radius: inherit;
10674
+ border-bottom-left-radius: inherit;
10675
+ }
10676
+ .sia-segmented--zigzag button:last-child {
10677
+ border-top-right-radius: inherit;
10678
+ border-bottom-right-radius: inherit;
10679
+ }
10680
+ .sia-segmented--zigzag button::before {
10681
+ border-radius: inherit;
10682
+ transition: background 200ms ease;
10683
+ }
10684
+ @media (prefers-reduced-motion: reduce) {
10685
+ .sia-segmented--zigzag button,
10686
+ .sia-segmented--zigzag button::before {
10687
+ transition: none;
10688
+ }
10689
+ }
10659
10690
 
10660
10691
  /* src/title-tooltip.css */
10661
10692
  body > .sia-title-tooltip[data-sia-popup-layer] {
package/dist/core.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-BT21wlHN.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-dDD5SM5_.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-Bv2AmXRD.cjs';
3
3
  import 'react';
4
4
  import './shared-Bx4B28Wh.cjs';
package/dist/core.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-OI4ySo2K.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-FiLyf4kX.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-Cc1owuvN.js';
3
3
  import 'react';
4
4
  import './shared-Bx4B28Wh.js';
package/dist/core.js CHANGED
@@ -10,16 +10,16 @@ import {
10
10
  Typography,
11
11
  Upload,
12
12
  message
13
- } from "./chunk-2ETLCXNS.js";
13
+ } from "./chunk-D752QGE6.js";
14
14
  import {
15
15
  Select
16
- } from "./chunk-W3EKQOPR.js";
16
+ } from "./chunk-RR7HW5HO.js";
17
17
  import {
18
18
  Icon,
19
19
  Input,
20
20
  Modal,
21
21
  Segmented
22
- } from "./chunk-VNVDG4AC.js";
22
+ } from "./chunk-U2WPN6TD.js";
23
23
  import {
24
24
  Button
25
25
  } from "./chunk-SJFT5OSX.js";
package/dist/index.cjs CHANGED
@@ -1578,7 +1578,7 @@ function Steps({ items, current = 0, initial: initial3 = 0, direction = "horizon
1578
1578
  ] }, index);
1579
1579
  }) });
1580
1580
  }
1581
- function Segmented({ options, value, defaultValue, variant = "default", size: sizeProp, block = false, vertical = false, disabled = false, onChange, className = "", onKeyDown, ...props }) {
1581
+ function Segmented({ options, value, defaultValue, variant = "default", shape = "capsule", size: sizeProp, block = false, vertical = false, disabled = false, onChange, className = "", onKeyDown, ...props }) {
1582
1582
  const size = useControlSize(sizeProp);
1583
1583
  const normalized = (0, import_react5.useMemo)(() => options.map((option) => typeof option === "object" ? option : { label: option, value: option }), [options]);
1584
1584
  const [current, setCurrent] = useControllableState({ value, defaultValue: defaultValue ?? normalized[0]?.value, onChange: (next) => next !== void 0 && onChange?.(next) });
@@ -1591,7 +1591,7 @@ function Segmented({ options, value, defaultValue, variant = "default", size: si
1591
1591
  const next = event.key === "ArrowRight" || event.key === "ArrowDown" ? enabled[(index + 1) % enabled.length] : enabled[(index - 1 + enabled.length) % enabled.length];
1592
1592
  if (next) setCurrent(next.value);
1593
1593
  }
1594
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: `sia-segmented sia-segmented--${size}${variant === "zigzag" && !vertical && normalized.length === 2 ? " sia-segmented--zigzag" : ""}${block ? " sia-segmented--block" : ""}${vertical ? " sia-segmented--vertical" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), role: "radiogroup", onKeyDown: keyboard, ...withTitleTooltip(props), children: normalized.map((option) => /* @__PURE__ */ (0, import_react6.createElement)("button", { type: "button", role: "radio", "aria-checked": option.value === current, ...withTitleTooltip({ title: option.title }), className: option.value === current ? "is-selected" : "", disabled: disabled || option.disabled, key: option.value, onClick: () => setCurrent(option.value) }, option.icon, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: option.label ?? option.value }))) });
1594
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: `sia-segmented sia-segmented--${size}${variant === "zigzag" && !vertical && normalized.length === 2 ? ` sia-segmented--zigzag sia-segmented--shape-${shape}` : ""}${block ? " sia-segmented--block" : ""}${vertical ? " sia-segmented--vertical" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), role: "radiogroup", onKeyDown: keyboard, ...withTitleTooltip(props), children: normalized.map((option) => /* @__PURE__ */ (0, import_react6.createElement)("button", { type: "button", role: "radio", "aria-checked": option.value === current, ...withTitleTooltip({ title: option.title }), className: option.value === current ? "is-selected" : "", disabled: disabled || option.disabled, key: option.value, onClick: () => setCurrent(option.value) }, option.icon, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: option.label ?? option.value }))) });
1595
1595
  }
1596
1596
 
1597
1597
  // src/components/Dropdown.tsx
package/dist/index.css CHANGED
@@ -10605,7 +10605,7 @@ button.sia-treemap__tile:focus-visible,
10605
10605
  .sia-segmented.sia-segmented--zigzag {
10606
10606
  gap: 0;
10607
10607
  padding: 0;
10608
- overflow: hidden;
10608
+ overflow: visible;
10609
10609
  background: var(--sia-color-surface);
10610
10610
  border: 1px solid var(--sia-color-border);
10611
10611
  border-radius: 999px;
@@ -10656,6 +10656,37 @@ button.sia-treemap__tile:focus-visible,
10656
10656
  outline: 2px solid var(--sia-color-primary);
10657
10657
  outline-offset: -2px;
10658
10658
  }
10659
+ .sia-segmented--zigzag.sia-segmented--shape-rectangle {
10660
+ border-radius: 0;
10661
+ }
10662
+ .sia-segmented--zigzag.sia-segmented--shape-rounded {
10663
+ border-radius: var(--sia-radius);
10664
+ }
10665
+ .sia-segmented--zigzag button {
10666
+ transform: scale(1);
10667
+ transition: transform 200ms cubic-bezier(.2, .8, .2, 1), color 200ms ease;
10668
+ }
10669
+ .sia-segmented--zigzag button.is-selected {
10670
+ transform: scale(1.04);
10671
+ }
10672
+ .sia-segmented--zigzag button:first-child {
10673
+ border-top-left-radius: inherit;
10674
+ border-bottom-left-radius: inherit;
10675
+ }
10676
+ .sia-segmented--zigzag button:last-child {
10677
+ border-top-right-radius: inherit;
10678
+ border-bottom-right-radius: inherit;
10679
+ }
10680
+ .sia-segmented--zigzag button::before {
10681
+ border-radius: inherit;
10682
+ transition: background 200ms ease;
10683
+ }
10684
+ @media (prefers-reduced-motion: reduce) {
10685
+ .sia-segmented--zigzag button,
10686
+ .sia-segmented--zigzag button::before {
10687
+ transition: none;
10688
+ }
10689
+ }
10659
10690
 
10660
10691
  /* src/title-tooltip.css */
10661
10692
  body > .sia-title-tooltip[data-sia-popup-layer] {
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TagStatus, B as BadgeProps } from './core-BT21wlHN.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-BT21wlHN.cjs';
1
+ import { T as TagStatus, B as BadgeProps } from './core-dDD5SM5_.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-dDD5SM5_.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';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TagStatus, B as BadgeProps } from './core-OI4ySo2K.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-OI4ySo2K.js';
1
+ import { T as TagStatus, B as BadgeProps } from './core-FiLyf4kX.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-FiLyf4kX.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';
package/dist/index.js CHANGED
@@ -80,19 +80,19 @@ import {
80
80
  Watermark,
81
81
  message,
82
82
  notification
83
- } from "./chunk-2ETLCXNS.js";
83
+ } from "./chunk-D752QGE6.js";
84
84
  import {
85
85
  MarkdownEditor
86
86
  } from "./chunk-TUXNOSCT.js";
87
87
  import {
88
88
  RichTextContent,
89
89
  RichTextEditor
90
- } from "./chunk-N4P3QKCY.js";
90
+ } from "./chunk-CKX3AKMT.js";
91
91
  import {
92
92
  DatePicker,
93
93
  SelectDateRange,
94
94
  TimePanel
95
- } from "./chunk-36FXHK4W.js";
95
+ } from "./chunk-QZG6XT65.js";
96
96
  import {
97
97
  Checkbox,
98
98
  FloatingScrollbarProvider,
@@ -104,7 +104,7 @@ import {
104
104
  Tooltip,
105
105
  Tree,
106
106
  useScrollbarProximity
107
- } from "./chunk-W3EKQOPR.js";
107
+ } from "./chunk-RR7HW5HO.js";
108
108
  import {
109
109
  Dropdown,
110
110
  FILLED_ICON_NAMES,
@@ -117,7 +117,7 @@ import {
117
117
  Segmented,
118
118
  Steps,
119
119
  useOverlayLifecycle
120
- } from "./chunk-VNVDG4AC.js";
120
+ } from "./chunk-U2WPN6TD.js";
121
121
  import {
122
122
  Button,
123
123
  TextArea
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  RichTextContent,
3
3
  RichTextEditor
4
- } from "./chunk-N4P3QKCY.js";
5
- import "./chunk-VNVDG4AC.js";
4
+ } from "./chunk-CKX3AKMT.js";
5
+ import "./chunk-U2WPN6TD.js";
6
6
  import "./chunk-SJFT5OSX.js";
7
7
  import "./chunk-PUZWLIIJ.js";
8
8
  export {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  SelectDateRange
3
- } from "./chunk-36FXHK4W.js";
4
- import "./chunk-W3EKQOPR.js";
5
- import "./chunk-VNVDG4AC.js";
3
+ } from "./chunk-QZG6XT65.js";
4
+ import "./chunk-RR7HW5HO.js";
5
+ import "./chunk-U2WPN6TD.js";
6
6
  import "./chunk-SJFT5OSX.js";
7
7
  import "./chunk-PUZWLIIJ.js";
8
8
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sia.soul/sia-react-ui",
3
- "version": "0.1.84",
3
+ "version": "0.1.85",
4
4
  "description": "Sia Design components and tokens for React",
5
5
  "publishConfig": {
6
6
  "access": "public",