@sia.soul/sia-react-ui 0.1.74 → 0.1.76

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.
@@ -244,8 +244,9 @@ interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "def
244
244
  */
245
245
  loading?: boolean;
246
246
  /**
247
- 是否显示搜索输入框。
248
- * @defaultValue false
247
+ * 是否显示下拉搜索输入框。未设置时,options 总数超过 15 项自动显示;显式值优先。
248
+ * 弹框始终提供搜索,allowInput 仍会显示输入框;此规则独立于 modalThreshold。
249
+ * @defaultValue options.length > 15
249
250
  */
250
251
  showSearch?: boolean;
251
252
  /** 在选项名称下方显示对应的 value。 */
@@ -244,8 +244,9 @@ interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "def
244
244
  */
245
245
  loading?: boolean;
246
246
  /**
247
- 是否显示搜索输入框。
248
- * @defaultValue false
247
+ * 是否显示下拉搜索输入框。未设置时,options 总数超过 15 项自动显示;显式值优先。
248
+ * 弹框始终提供搜索,allowInput 仍会显示输入框;此规则独立于 modalThreshold。
249
+ * @defaultValue options.length > 15
249
250
  */
250
251
  showSearch?: boolean;
251
252
  /** 在选项名称下方显示对应的 value。 */
@@ -5,7 +5,7 @@ import {
5
5
  Popover,
6
6
  Tooltip,
7
7
  useOverlayLifecycle
8
- } from "./chunk-MDCNG2VH.js";
8
+ } from "./chunk-TKCXP6RZ.js";
9
9
  import {
10
10
  Dropdown,
11
11
  Icon
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FloatingScrollbarProvider,
3
3
  Select
4
- } from "./chunk-MDCNG2VH.js";
4
+ } from "./chunk-TKCXP6RZ.js";
5
5
  import {
6
6
  Icon
7
7
  } from "./chunk-YMOOL62S.js";
@@ -1731,7 +1731,7 @@ var Select = forwardRef3(function Select2({
1731
1731
  status = "default",
1732
1732
  allowClear = true,
1733
1733
  loading = false,
1734
- showSearch = false,
1734
+ showSearch: showSearchProp,
1735
1735
  showValue = false,
1736
1736
  allowInput = false,
1737
1737
  inputMaxLength,
@@ -1753,6 +1753,7 @@ var Select = forwardRef3(function Select2({
1753
1753
  onKeyDown,
1754
1754
  ...props
1755
1755
  }, forwardedRef) {
1756
+ const showSearch = showSearchProp ?? options.length > 15;
1756
1757
  const size = useControlSize(sizeProp);
1757
1758
  const fallbackId = useId5();
1758
1759
  const selectId = id ?? fallbackId;
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, HTMLAttributes, CSSProperties, MouseEvent, ReactElement, ImgHTMLAttributes, InputHTMLAttributes, MouseEventHandler, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
3
- import { B as ButtonProps, f as Button } from './Select-BDdA_Oz9.cjs';
3
+ import { B as ButtonProps, f as Button } from './Select-Bv2AmXRD.cjs';
4
4
  import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './shared-Bx4B28Wh.cjs';
5
5
 
6
6
  /** 单个工具栏操作及其下拉菜单。 */
@@ -1874,7 +1874,7 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "prefix
1874
1874
  /** 输入框后缀 */
1875
1875
  suffix?: ReactNode;
1876
1876
  /**
1877
- * 是否允许清空当前选择或输入值;默认启用,显式传入 false 可关闭。
1877
+ * 是否允许清空当前选择或输入值;默认启用,显式传入 false 可关闭。组件或所属 Form / fieldset 禁用时隐藏清空按钮。
1878
1878
  * @defaultValue true
1879
1879
  */
1880
1880
  allowClear?: boolean;
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, HTMLAttributes, CSSProperties, MouseEvent, ReactElement, ImgHTMLAttributes, InputHTMLAttributes, MouseEventHandler, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
3
- import { B as ButtonProps, f as Button } from './Select-kM9X4FXr.js';
3
+ import { B as ButtonProps, f as Button } from './Select-Cc1owuvN.js';
4
4
  import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './shared-Bx4B28Wh.js';
5
5
 
6
6
  /** 单个工具栏操作及其下拉菜单。 */
@@ -1874,7 +1874,7 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "prefix
1874
1874
  /** 输入框后缀 */
1875
1875
  suffix?: ReactNode;
1876
1876
  /**
1877
- * 是否允许清空当前选择或输入值;默认启用,显式传入 false 可关闭。
1877
+ * 是否允许清空当前选择或输入值;默认启用,显式传入 false 可关闭。组件或所属 Form / fieldset 禁用时隐藏清空按钮。
1878
1878
  * @defaultValue true
1879
1879
  */
1880
1880
  allowClear?: boolean;
package/dist/core.cjs CHANGED
@@ -3814,7 +3814,7 @@ var Select = (0, import_react23.forwardRef)(function Select2({
3814
3814
  status = "default",
3815
3815
  allowClear = true,
3816
3816
  loading = false,
3817
- showSearch = false,
3817
+ showSearch: showSearchProp,
3818
3818
  showValue = false,
3819
3819
  allowInput = false,
3820
3820
  inputMaxLength,
@@ -3836,6 +3836,7 @@ var Select = (0, import_react23.forwardRef)(function Select2({
3836
3836
  onKeyDown,
3837
3837
  ...props
3838
3838
  }, forwardedRef) {
3839
+ const showSearch = showSearchProp ?? options.length > 15;
3839
3840
  const size = useControlSize(sizeProp);
3840
3841
  const fallbackId = (0, import_react23.useId)();
3841
3842
  const selectId = id ?? fallbackId;
package/dist/core.css CHANGED
@@ -888,6 +888,10 @@ fieldset:disabled .sia-input-number__floating-placeholder {
888
888
  outline: none;
889
889
  opacity: 1;
890
890
  }
891
+ :is(.sia-input-control__clear, .sia-input-select__clear, .sia-select__clear, .sia-picker__clear, .sia-tree-select__clear, .sia-number-range__clear):disabled,
892
+ .sia-cascader__trigger:disabled .sia-cascader__clear {
893
+ display: none;
894
+ }
891
895
  .sia-input-control__input-wrap {
892
896
  position: relative;
893
897
  align-self: stretch;
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-zYofkjW3.cjs';
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-BDdA_Oz9.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-Bx07vzrr.cjs';
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-CGV6zAlj.js';
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-kM9X4FXr.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-CBLT4Vfl.js';
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,12 +10,12 @@ import {
10
10
  Typography,
11
11
  Upload,
12
12
  message
13
- } from "./chunk-6N3IIFVP.js";
13
+ } from "./chunk-QDZXP2UO.js";
14
14
  import "./chunk-SMCYEPBL.js";
15
15
  import {
16
16
  Modal,
17
17
  Select
18
- } from "./chunk-MDCNG2VH.js";
18
+ } from "./chunk-TKCXP6RZ.js";
19
19
  import {
20
20
  Icon,
21
21
  Input,
package/dist/index.cjs CHANGED
@@ -3810,7 +3810,7 @@ var Select = (0, import_react19.forwardRef)(function Select2({
3810
3810
  status = "default",
3811
3811
  allowClear = true,
3812
3812
  loading = false,
3813
- showSearch = false,
3813
+ showSearch: showSearchProp,
3814
3814
  showValue = false,
3815
3815
  allowInput = false,
3816
3816
  inputMaxLength,
@@ -3832,6 +3832,7 @@ var Select = (0, import_react19.forwardRef)(function Select2({
3832
3832
  onKeyDown,
3833
3833
  ...props
3834
3834
  }, forwardedRef) {
3835
+ const showSearch = showSearchProp ?? options.length > 15;
3835
3836
  const size = useControlSize(sizeProp);
3836
3837
  const fallbackId = (0, import_react19.useId)();
3837
3838
  const selectId = id ?? fallbackId;
@@ -4525,7 +4526,7 @@ function Cascader({
4525
4526
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref: rootRef, className: `sia-cascader sia-cascader--${size}${open ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), ...withTitleTooltip(props), children: [
4526
4527
  /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: `sia-cascader__trigger${floating.className}`, disabled, "aria-haspopup": "listbox", "aria-expanded": open, onClick: toggleOpen, children: [
4527
4528
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sia-cascader__value", children: display ? multiple && Array.isArray(display) ? display.map((label, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sia-cascader__tag", children: label }, pathKey(selectedPaths[index] ?? []))) : display : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sia-cascader__placeholder", children: placeholder }) }),
4528
- allowClear && selectedPaths.length ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sia-cascader__clear", role: "button", "aria-label": "\u6E05\u9664\u9009\u62E9", onClick: (event) => {
4529
+ allowClear && selectedPaths.length && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sia-cascader__clear", role: "button", "aria-label": "\u6E05\u9664\u9009\u62E9", onClick: (event) => {
4529
4530
  event.stopPropagation();
4530
4531
  clearSelection();
4531
4532
  }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null,
@@ -23466,7 +23467,7 @@ var InputSelect = (0, import_react93.forwardRef)(function InputSelect2({
23466
23467
  changeOpen(true);
23467
23468
  },
23468
23469
  suffix: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: "sia-input-select__suffix", children: [
23469
- allowClear && draft && !disabled && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { variant: "text", size: "small", disabled: loading, "aria-label": "\u6E05\u9664\u8F93\u5165\u9009\u62E9", onClick: (event) => {
23470
+ allowClear && draft && !disabled && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { className: "sia-input-select__clear", variant: "text", size: "small", disabled: loading, "aria-label": "\u6E05\u9664\u8F93\u5165\u9009\u62E9", onClick: (event) => {
23470
23471
  event.stopPropagation();
23471
23472
  setDraft("");
23472
23473
  emit(multiple ? [] : void 0);
package/dist/index.css CHANGED
@@ -888,6 +888,10 @@ fieldset:disabled .sia-input-number__floating-placeholder {
888
888
  outline: none;
889
889
  opacity: 1;
890
890
  }
891
+ :is(.sia-input-control__clear, .sia-input-select__clear, .sia-select__clear, .sia-picker__clear, .sia-tree-select__clear, .sia-number-range__clear):disabled,
892
+ .sia-cascader__trigger:disabled .sia-cascader__clear {
893
+ display: none;
894
+ }
891
895
  .sia-input-control__input-wrap {
892
896
  position: relative;
893
897
  align-self: stretch;
package/dist/index.d.cts CHANGED
@@ -1,11 +1,11 @@
1
- import { T as TagStatus, B as BadgeProps } from './core-zYofkjW3.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-zYofkjW3.cjs';
1
+ import { T as TagStatus, B as BadgeProps } from './core-Bx07vzrr.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-Bx07vzrr.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';
6
- import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult, B as ButtonProps, e as ButtonSize } from './Select-BDdA_Oz9.cjs';
7
- export { f as Button, g as ButtonVariant, h as Modal, i as ModalProps, j as ModalType, k as Select, l as SelectMode, m as SelectValue } from './Select-BDdA_Oz9.cjs';
8
- export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-CnRX3-Va.cjs';
6
+ import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult, B as ButtonProps, e as ButtonSize } from './Select-Bv2AmXRD.cjs';
7
+ export { f as Button, g as ButtonVariant, h as Modal, i as ModalProps, j as ModalType, k as Select, l as SelectMode, m as SelectValue } from './Select-Bv2AmXRD.cjs';
8
+ export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-DN4eBuVx.cjs';
9
9
  export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.cjs';
10
10
  export { MarkdownEditor, MarkdownEditorMode, MarkdownEditorProps } from './markdown-editor.cjs';
11
11
  import * as Monaco from 'monaco-editor';
@@ -163,7 +163,7 @@ interface CascaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultVal
163
163
  */
164
164
  showSearch?: boolean;
165
165
  /**
166
- * 是否允许清空当前选择或输入值;默认启用,显式传入 false 可关闭。
166
+ * 是否允许清空当前选择或输入值;默认启用,显式传入 false 可关闭。组件或所属 Form / fieldset 禁用时隐藏清空入口。
167
167
  * @defaultValue true
168
168
  */
169
169
  allowClear?: boolean;
@@ -743,7 +743,7 @@ interface FormProps extends Omit<FormHTMLAttributes<HTMLFormElement>, "onSubmit"
743
743
  /** 占位提示的显示模式;floating 为浮动标签。 */
744
744
  placeholderMode?: InputPlaceholderMode;
745
745
  /**
746
- * 是否禁用交互。
746
+ * 是否通过原生 fieldset 禁用表单内控件交互;禁用时同时隐藏输入、选择和区间控件的清空入口,恢复启用后按各控件的 allowClear 配置显示。
747
747
  * @defaultValue false
748
748
  */
749
749
  disabled?: boolean;
@@ -3028,7 +3028,7 @@ interface InputSelectProps {
3028
3028
  */
3029
3029
  loading?: boolean;
3030
3030
  /**
3031
- 是否允许清空当前选择或输入值。
3031
+ * 是否允许清空当前选择或输入值;组件或所属 Form / fieldset 禁用时隐藏清空按钮。
3032
3032
  * @defaultValue true
3033
3033
  */
3034
3034
  allowClear?: boolean;
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { T as TagStatus, B as BadgeProps } from './core-CGV6zAlj.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-CGV6zAlj.js';
1
+ import { T as TagStatus, B as BadgeProps } from './core-CBLT4Vfl.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-CBLT4Vfl.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';
6
- import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult, B as ButtonProps, e as ButtonSize } from './Select-kM9X4FXr.js';
7
- export { f as Button, g as ButtonVariant, h as Modal, i as ModalProps, j as ModalType, k as Select, l as SelectMode, m as SelectValue } from './Select-kM9X4FXr.js';
8
- export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-CJYcehZg.js';
6
+ import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult, B as ButtonProps, e as ButtonSize } from './Select-Cc1owuvN.js';
7
+ export { f as Button, g as ButtonVariant, h as Modal, i as ModalProps, j as ModalType, k as Select, l as SelectMode, m as SelectValue } from './Select-Cc1owuvN.js';
8
+ export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-YrK9kuKW.js';
9
9
  export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.js';
10
10
  export { MarkdownEditor, MarkdownEditorMode, MarkdownEditorProps } from './markdown-editor.js';
11
11
  import * as Monaco from 'monaco-editor';
@@ -163,7 +163,7 @@ interface CascaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultVal
163
163
  */
164
164
  showSearch?: boolean;
165
165
  /**
166
- * 是否允许清空当前选择或输入值;默认启用,显式传入 false 可关闭。
166
+ * 是否允许清空当前选择或输入值;默认启用,显式传入 false 可关闭。组件或所属 Form / fieldset 禁用时隐藏清空入口。
167
167
  * @defaultValue true
168
168
  */
169
169
  allowClear?: boolean;
@@ -743,7 +743,7 @@ interface FormProps extends Omit<FormHTMLAttributes<HTMLFormElement>, "onSubmit"
743
743
  /** 占位提示的显示模式;floating 为浮动标签。 */
744
744
  placeholderMode?: InputPlaceholderMode;
745
745
  /**
746
- * 是否禁用交互。
746
+ * 是否通过原生 fieldset 禁用表单内控件交互;禁用时同时隐藏输入、选择和区间控件的清空入口,恢复启用后按各控件的 allowClear 配置显示。
747
747
  * @defaultValue false
748
748
  */
749
749
  disabled?: boolean;
@@ -3028,7 +3028,7 @@ interface InputSelectProps {
3028
3028
  */
3029
3029
  loading?: boolean;
3030
3030
  /**
3031
- 是否允许清空当前选择或输入值。
3031
+ * 是否允许清空当前选择或输入值;组件或所属 Form / fieldset 禁用时隐藏清空按钮。
3032
3032
  * @defaultValue true
3033
3033
  */
3034
3034
  allowClear?: boolean;
package/dist/index.js CHANGED
@@ -80,7 +80,7 @@ import {
80
80
  Watermark,
81
81
  message,
82
82
  notification
83
- } from "./chunk-6N3IIFVP.js";
83
+ } from "./chunk-QDZXP2UO.js";
84
84
  import {
85
85
  TextArea
86
86
  } from "./chunk-SMCYEPBL.js";
@@ -95,7 +95,7 @@ import {
95
95
  DatePicker,
96
96
  SelectDateRange,
97
97
  TimePanel
98
- } from "./chunk-PARWSGZC.js";
98
+ } from "./chunk-TG7ZYXA7.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-MDCNG2VH.js";
113
+ } from "./chunk-TKCXP6RZ.js";
114
114
  import {
115
115
  Dropdown,
116
116
  FILLED_ICON_NAMES,
@@ -441,7 +441,7 @@ function Cascader({
441
441
  return /* @__PURE__ */ jsxs3("div", { ref: rootRef, className: `sia-cascader sia-cascader--${size}${open ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), ...withTitleTooltip(props), children: [
442
442
  /* @__PURE__ */ jsxs3("button", { type: "button", className: `sia-cascader__trigger${floating.className}`, disabled, "aria-haspopup": "listbox", "aria-expanded": open, onClick: toggleOpen, children: [
443
443
  /* @__PURE__ */ jsx3("span", { className: "sia-cascader__value", children: display ? multiple && Array.isArray(display) ? display.map((label, index) => /* @__PURE__ */ jsx3("span", { className: "sia-cascader__tag", children: label }, pathKey(selectedPaths[index] ?? []))) : display : /* @__PURE__ */ jsx3("span", { className: "sia-cascader__placeholder", children: placeholder }) }),
444
- allowClear && selectedPaths.length ? /* @__PURE__ */ jsx3("span", { className: "sia-cascader__clear", role: "button", "aria-label": "\u6E05\u9664\u9009\u62E9", onClick: (event) => {
444
+ allowClear && selectedPaths.length && !disabled ? /* @__PURE__ */ jsx3("span", { className: "sia-cascader__clear", role: "button", "aria-label": "\u6E05\u9664\u9009\u62E9", onClick: (event) => {
445
445
  event.stopPropagation();
446
446
  clearSelection();
447
447
  }, children: /* @__PURE__ */ jsx3(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null,
@@ -8496,7 +8496,7 @@ var InputSelect = forwardRef7(function InputSelect2({
8496
8496
  changeOpen(true);
8497
8497
  },
8498
8498
  suffix: /* @__PURE__ */ jsxs23("span", { className: "sia-input-select__suffix", children: [
8499
- allowClear && draft && !disabled && /* @__PURE__ */ jsx25(Button, { variant: "text", size: "small", disabled: loading, "aria-label": "\u6E05\u9664\u8F93\u5165\u9009\u62E9", onClick: (event) => {
8499
+ allowClear && draft && !disabled && /* @__PURE__ */ jsx25(Button, { className: "sia-input-select__clear", variant: "text", size: "small", disabled: loading, "aria-label": "\u6E05\u9664\u8F93\u5165\u9009\u62E9", onClick: (event) => {
8500
8500
  event.stopPropagation();
8501
8501
  setDraft("");
8502
8502
  emit(multiple ? [] : void 0);
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { InputHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties } from 'react';
3
3
  import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
4
- import { S as SelectOption, m as SelectValue } from './Select-BDdA_Oz9.cjs';
4
+ import { S as SelectOption, m as SelectValue } from './Select-Bv2AmXRD.cjs';
5
5
 
6
6
  /** 日期选择附带的时间选择配置。 */
7
7
  type DatePickerShowTime = boolean | {
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { InputHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties } from 'react';
3
3
  import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-Bx4B28Wh.js';
4
- import { S as SelectOption, m as SelectValue } from './Select-kM9X4FXr.js';
4
+ import { S as SelectOption, m as SelectValue } from './Select-Cc1owuvN.js';
5
5
 
6
6
  /** 日期选择附带的时间选择配置。 */
7
7
  type DatePickerShowTime = boolean | {
@@ -3429,7 +3429,7 @@ var Select = (0, import_react16.forwardRef)(function Select2({
3429
3429
  status = "default",
3430
3430
  allowClear = true,
3431
3431
  loading = false,
3432
- showSearch = false,
3432
+ showSearch: showSearchProp,
3433
3433
  showValue = false,
3434
3434
  allowInput = false,
3435
3435
  inputMaxLength,
@@ -3451,6 +3451,7 @@ var Select = (0, import_react16.forwardRef)(function Select2({
3451
3451
  onKeyDown,
3452
3452
  ...props
3453
3453
  }, forwardedRef) {
3454
+ const showSearch = showSearchProp ?? options.length > 15;
3454
3455
  const size = useControlSize(sizeProp);
3455
3456
  const fallbackId = (0, import_react16.useId)();
3456
3457
  const selectId = id ?? fallbackId;
@@ -1,4 +1,4 @@
1
- export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-CnRX3-Va.cjs';
1
+ export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-DN4eBuVx.cjs';
2
2
  import 'react';
3
3
  import './shared-Bx4B28Wh.cjs';
4
- import './Select-BDdA_Oz9.cjs';
4
+ import './Select-Bv2AmXRD.cjs';
@@ -1,4 +1,4 @@
1
- export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-CJYcehZg.js';
1
+ export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-YrK9kuKW.js';
2
2
  import 'react';
3
3
  import './shared-Bx4B28Wh.js';
4
- import './Select-kM9X4FXr.js';
4
+ import './Select-Cc1owuvN.js';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SelectDateRange
3
- } from "./chunk-PARWSGZC.js";
4
- import "./chunk-MDCNG2VH.js";
3
+ } from "./chunk-TG7ZYXA7.js";
4
+ import "./chunk-TKCXP6RZ.js";
5
5
  import "./chunk-YMOOL62S.js";
6
6
  import "./chunk-IKAMZNCK.js";
7
7
  import "./chunk-H7IAG72O.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sia.soul/sia-react-ui",
3
- "version": "0.1.74",
3
+ "version": "0.1.76",
4
4
  "description": "Sia Design components and tokens for React",
5
5
  "publishConfig": {
6
6
  "access": "public",