@sia.soul/sia-react-ui 0.1.14 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.css CHANGED
@@ -1788,7 +1788,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
1788
1788
  display: flex;
1789
1789
  flex-direction: column;
1790
1790
  width: max-content;
1791
- min-width: 90px;
1791
+ min-width: min(max(90px, var(--sia-popup-anchor-width, 0px)), calc(100vw - 16px));
1792
1792
  padding: 4px;
1793
1793
  background: var(--sia-color-surface);
1794
1794
  border: 1px solid var(--sia-color-border);
@@ -4729,6 +4729,148 @@ fieldset:disabled .sia-input-number__floating-placeholder {
4729
4729
  transition: none;
4730
4730
  }
4731
4731
  }
4732
+ .sia-query-form {
4733
+ min-width: 0;
4734
+ width: 100%;
4735
+ }
4736
+ .sia-query-form__fields {
4737
+ display: flex;
4738
+ flex-wrap: wrap;
4739
+ align-items: center;
4740
+ gap: 12px;
4741
+ padding-top: 8px;
4742
+ }
4743
+ .sia-query-form__field {
4744
+ flex: 0 1 var(--sia-query-field-width, 220px);
4745
+ width: var(--sia-query-field-width, 220px);
4746
+ min-width: 0;
4747
+ max-width: 100%;
4748
+ }
4749
+ .sia-query-form__field[hidden] {
4750
+ display: none;
4751
+ }
4752
+ .sia-query-form__field > .sia-input-control,
4753
+ .sia-query-form__field > .sia-select,
4754
+ .sia-query-form__field > .sia-picker,
4755
+ .sia-query-form__field > .sia-input-number,
4756
+ .sia-query-form__field > .sia-cascader,
4757
+ .sia-query-form__field > .sia-tree-select,
4758
+ .sia-query-form__field > .sia-select-date-range {
4759
+ width: 100%;
4760
+ }
4761
+ .sia-query-form__field > .sia-space-compact {
4762
+ width: 100%;
4763
+ }
4764
+ .sia-query-form__field > .sia-space-compact > .sia-select {
4765
+ flex: 1;
4766
+ min-width: 0;
4767
+ width: 0;
4768
+ }
4769
+ .sia-query-form__actions {
4770
+ display: flex;
4771
+ align-items: center;
4772
+ flex-wrap: wrap;
4773
+ gap: 6px;
4774
+ }
4775
+ .sia-query-form__quick,
4776
+ .sia-query-form__saved {
4777
+ display: flex;
4778
+ flex-wrap: wrap;
4779
+ align-items: center;
4780
+ gap: 8px;
4781
+ }
4782
+ .sia-query-form__quick {
4783
+ margin-bottom: 8px;
4784
+ }
4785
+ .sia-query-form__saved {
4786
+ margin-top: 10px;
4787
+ }
4788
+ .sia-query-form__saved > .sia-tag {
4789
+ cursor: pointer;
4790
+ }
4791
+ .sia-query-form__saved > .sia-tag.is-active {
4792
+ outline: 1px solid currentColor;
4793
+ }
4794
+ .sia-query-form__saved > .sia-tag:focus-visible {
4795
+ outline: 2px solid var(--sia-color-primary);
4796
+ outline-offset: 2px;
4797
+ }
4798
+ .sia-query-form__saved > .sia-tag--disabled {
4799
+ cursor: not-allowed;
4800
+ }
4801
+ .sia-query-form__error {
4802
+ margin: 8px 0 0;
4803
+ color: var(--sia-color-error);
4804
+ font-size: 13px;
4805
+ }
4806
+ @media (max-width: 600px) {
4807
+ .sia-query-form__field {
4808
+ flex-basis: 100% !important;
4809
+ width: 100% !important;
4810
+ }
4811
+ .sia-query-form__actions {
4812
+ width: 100%;
4813
+ }
4814
+ }
4815
+ .sia-query-form__fields.is-collapsed {
4816
+ flex-wrap: nowrap;
4817
+ overflow-x: auto;
4818
+ padding-bottom: 2px;
4819
+ }
4820
+ .sia-query-form__fields.is-collapsed > .sia-query-form__field {
4821
+ flex: 0 0 auto;
4822
+ }
4823
+ .sia-query-form__fields.is-collapsed > .sia-query-form__actions {
4824
+ flex: 0 0 auto;
4825
+ flex-wrap: nowrap;
4826
+ width: max-content;
4827
+ }
4828
+ @media (max-width: 600px) {
4829
+ .sia-query-form__fields.is-collapsed > .sia-query-form__field {
4830
+ flex-basis: auto !important;
4831
+ width: var(--sia-query-field-width, 220px) !important;
4832
+ }
4833
+ }
4834
+ .sia-query-form__quick > .sia-badge:has(.sia-badge__count) {
4835
+ margin: 5px 12px 2px 0;
4836
+ }
4837
+ .sia-tag--close-on-hover > .sia-tag__close {
4838
+ flex-shrink: 0;
4839
+ width: 0;
4840
+ margin-left: -4px;
4841
+ margin-right: 0;
4842
+ overflow: hidden;
4843
+ opacity: 0;
4844
+ pointer-events: none;
4845
+ transition:
4846
+ width 180ms ease,
4847
+ margin 180ms ease,
4848
+ opacity 180ms ease;
4849
+ }
4850
+ .sia-tag--close-on-hover:not(.sia-tag--disabled):is(:hover, :focus-within) > .sia-tag__close {
4851
+ width: 16px;
4852
+ margin-left: 0;
4853
+ margin-right: -4px;
4854
+ opacity: 1;
4855
+ pointer-events: auto;
4856
+ }
4857
+ @media (hover: none) {
4858
+ .sia-tag--close-on-hover:not(.sia-tag--disabled) > .sia-tag__close {
4859
+ width: 16px;
4860
+ margin-left: 0;
4861
+ margin-right: -4px;
4862
+ opacity: 1;
4863
+ pointer-events: auto;
4864
+ }
4865
+ }
4866
+ @media (prefers-reduced-motion: reduce) {
4867
+ .sia-tag--close-on-hover > .sia-tag__close {
4868
+ transition: none;
4869
+ }
4870
+ }
4871
+ .sia-table-settings__loading {
4872
+ min-height: 160px;
4873
+ }
4732
4874
 
4733
4875
  /* src/components-extra.css */
4734
4876
  .sia-flex {
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
- import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes } from 'react';
3
- import { O as OverlayContainer, a as OverlayApiHandle, B as ButtonProps } from './core-BK8AXc12.cjs';
4
- export { b as Badge, c as BadgeProps, d as BadgeRibbonProps, e as BadgeStatus, f as Breadcrumb, g as BreadcrumbItem, h as BreadcrumbProps, i as Button, j as ButtonSize, k as ButtonVariant, C as Calendar, l as CalendarProps, m as Card, n as CardAccent, o as CardProps, p as Carousel, q as CarouselProps, r as CarouselRef, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, D as Dropdown, w as DropdownButtonProps, x as DropdownMenuProps, y as DropdownOpenSource, z as DropdownPlacement, A as DropdownProps, E as DropdownTrigger, F as FILLED_ICON_NAMES, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, M as FloatingPlacement, N as FloatingTrigger, P as ICON_NAMES, Q as Icon, R as IconName, S as IconProps, T as IconVariant, U as Image, V as ImagePreview, W as ImagePreviewConfig, X as ImagePreviewProps, Y as ImageProps, Z as Input, _ as InputProps, $ as Menu, a0 as MenuClickInfo, a1 as MenuItem, a2 as MenuMode, a3 as MenuProps, a4 as MenuTheme, a5 as MessageConfig, a6 as MessageHandle, a7 as MessageKey, a8 as MessageType, a9 as Modal, aa as ModalActionResult, ab as ModalOpenConfig, ac as ModalProps, ad as ModalType, ae as NotificationConfig, af as NotificationPlacement, ag as NotificationType, ah as Popconfirm, ai as PopconfirmProps, aj as Popover, ak as PopoverProps, al as Progress, am as ProgressProps, an as ProgressStatus, ao as Rate, ap as RateProps, aq as Segmented, ar as SegmentedOption, as as SegmentedProps, at as SegmentedValue, au as Spin, av as SpinProps, aw as StepItem, ax as StepStatus, ay as Steps, az as StepsProps, aA as TabItem, aB as Tabs, aC as TabsContextMenuClickInfo, aD as TabsOrientation, aE as TabsPosition, aF as TabsProps, aG as TabsType, aH as Tag, aI as TagProps, aJ as TagStatus, aK as TagVariant, aL as Timeline, aM as TimelineItem, aN as TimelineProps, aO as Tooltip, aP as TooltipProps, aQ as Tour, aR as TourProps, aS as TourStep, aT as Tree, aU as TreeDropPosition, aV as TreeKey, aW as TreeNode, aX as TreeProps, aY as Typography, aZ as TypographyLinkProps, a_ as TypographyProps, a$ as TypographyTitleProps, b0 as TypographyType, b1 as Upload, b2 as UploadChangeInfo, b3 as UploadDraggerProps, b4 as UploadFile, b5 as UploadFileStatus, b6 as UploadProps, b7 as UploadRequestOptions, b8 as Watermark, b9 as WatermarkFont, ba as WatermarkProps, bb as message, bc as notification } from './core-BK8AXc12.cjs';
2
+ import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
3
+ import { O as OverlayContainer, a as OverlayApiHandle, B as ButtonProps, T as TagStatus, b as ButtonSize, c as BadgeProps } from './core-AeKYVPDZ.cjs';
4
+ export { d as Badge, e as BadgeRibbonProps, f as BadgeStatus, g as Breadcrumb, h as BreadcrumbItem, i as BreadcrumbProps, j as Button, k as ButtonVariant, C as Calendar, l as CalendarProps, m as Card, n as CardAccent, o as CardProps, p as Carousel, q as CarouselProps, r as CarouselRef, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, D as Dropdown, w as DropdownButtonProps, x as DropdownMenuProps, y as DropdownOpenSource, z as DropdownPlacement, A as DropdownProps, E as DropdownTrigger, F as FILLED_ICON_NAMES, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, M as FloatingPlacement, N as FloatingTrigger, P as ICON_NAMES, Q as Icon, R as IconName, S as IconProps, U as IconVariant, V as Image, W as ImagePreview, X as ImagePreviewConfig, Y as ImagePreviewProps, Z as ImageProps, _ as Input, $ as InputProps, a0 as Menu, a1 as MenuClickInfo, a2 as MenuItem, a3 as MenuMode, a4 as MenuProps, a5 as MenuTheme, a6 as MessageConfig, a7 as MessageHandle, a8 as MessageKey, a9 as MessageType, aa as Modal, ab as ModalActionResult, ac as ModalOpenConfig, ad as ModalProps, ae as ModalType, af as NotificationConfig, ag as NotificationPlacement, ah as NotificationType, ai as Popconfirm, aj as PopconfirmProps, ak as Popover, al as PopoverProps, am as Progress, an as ProgressProps, ao as ProgressStatus, ap as Rate, aq as RateProps, ar as Segmented, as as SegmentedOption, at as SegmentedProps, au as SegmentedValue, av as Spin, aw as SpinProps, ax as StepItem, ay as StepStatus, az as Steps, aA as StepsProps, aB as TabItem, aC as Tabs, aD as TabsContextMenuClickInfo, aE as TabsOrientation, aF as TabsPosition, aG as TabsProps, aH as TabsType, aI as Tag, aJ as TagProps, aK as TagVariant, aL as Timeline, aM as TimelineItem, aN as TimelineProps, aO as Tooltip, aP as TooltipProps, aQ as Tour, aR as TourProps, aS as TourStep, aT as Tree, aU as TreeDropPosition, aV as TreeKey, aW as TreeNode, aX as TreeProps, aY as Typography, aZ as TypographyLinkProps, a_ as TypographyProps, a$ as TypographyTitleProps, b0 as TypographyType, b1 as Upload, b2 as UploadChangeInfo, b3 as UploadDraggerProps, b4 as UploadFile, b5 as UploadFileStatus, b6 as UploadProps, b7 as UploadRequestOptions, b8 as Watermark, b9 as WatermarkFont, ba as WatermarkProps, bb as message, bc as notification } from './core-AeKYVPDZ.cjs';
5
5
  import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-DAYZvZVu.cjs';
6
6
  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-shDQ5uJA.cjs';
7
7
  export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.cjs';
@@ -1278,8 +1278,10 @@ declare const ThemeSwitch: react.ForwardRefExoticComponent<ThemeSwitchProps & re
1278
1278
 
1279
1279
  interface FloatingScrollbarProviderProps {
1280
1280
  disabled?: boolean;
1281
+ /** 仅接管指定容器;不传时接管页面中的滚动容器。 */
1282
+ targetRef?: RefObject<HTMLElement | null>;
1281
1283
  }
1282
- declare function FloatingScrollbarProvider({ disabled }: FloatingScrollbarProviderProps): null;
1284
+ declare function FloatingScrollbarProvider({ disabled, targetRef }: FloatingScrollbarProviderProps): null;
1283
1285
 
1284
1286
  type SiaThemeMode = "light" | "dark";
1285
1287
  declare const SIA_THEME: {
@@ -1365,4 +1367,56 @@ interface InputSelectProps {
1365
1367
  }
1366
1368
  declare const InputSelect: react.ForwardRefExoticComponent<InputSelectProps & react.RefAttributes<HTMLInputElement>>;
1367
1369
 
1368
- export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, ButtonProps, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, useForm };
1370
+ interface QueryFormField extends FormItemProps {
1371
+ key: string;
1372
+ /** 字段占用宽度,默认由 fieldWidth 控制;组合字段可指定更大的宽度。 */
1373
+ width?: number | string;
1374
+ }
1375
+ interface QueryFormShortcut<T extends FormValues = FormValues> {
1376
+ key: string;
1377
+ label: ReactNode;
1378
+ values: Partial<T>;
1379
+ disabled?: boolean;
1380
+ status?: TagStatus;
1381
+ /** 顶部快捷查询按钮尺寸,优先于 quickQuerySize。 */
1382
+ size?: ButtonSize;
1383
+ /** 该快捷查询对应的数据总量,由业务接口提供。 */
1384
+ count?: number;
1385
+ badgeProps?: Omit<BadgeProps, "children" | "count">;
1386
+ }
1387
+ interface QueryFormSearchInfo {
1388
+ source: "submit" | "reset" | "quick" | "saved";
1389
+ shortcutKey?: string;
1390
+ }
1391
+ interface QueryFormProps<T extends FormValues = FormValues> extends Omit<FormProps, "onFinish" | "children" | "onError"> {
1392
+ fields?: readonly QueryFormField[];
1393
+ /** 也可直接放入 Form.Item 或 Space.Compact,每个直接子项视为一个查询字段。 */
1394
+ children?: ReactNode;
1395
+ onSearch: (values: T, info: QueryFormSearchInfo) => void | Promise<void>;
1396
+ loading?: boolean;
1397
+ fieldWidth?: number | string;
1398
+ collapsible?: boolean;
1399
+ collapsed?: boolean;
1400
+ defaultCollapsed?: boolean;
1401
+ collapsedCount?: number;
1402
+ onCollapsedChange?: (collapsed: boolean) => void;
1403
+ quickQueries?: readonly QueryFormShortcut<T>[];
1404
+ quickQuerySize?: ButtonSize;
1405
+ savedQueries?: readonly QueryFormShortcut<T>[];
1406
+ shortcutsLoading?: boolean;
1407
+ onSaveQuery?: (query: {
1408
+ name: string;
1409
+ values: T;
1410
+ }) => void | Promise<void>;
1411
+ onRemoveQuery?: (query: QueryFormShortcut<T>) => void | Promise<void>;
1412
+ onError?: (error: unknown, operation: "search" | "save" | "remove") => void;
1413
+ searchText?: ReactNode;
1414
+ resetText?: ReactNode;
1415
+ saveText?: ReactNode;
1416
+ resetSearch?: boolean;
1417
+ actionsExtra?: ReactNode;
1418
+ }
1419
+ /** 可复用的业务查询表单;快捷查询的存储和结果数据由业务方管理。 */
1420
+ declare function QueryForm<T extends FormValues = FormValues>({ fields, children, form: providedForm, onSearch, loading, fieldWidth, collapsible, collapsed: controlledCollapsed, defaultCollapsed, collapsedCount, onCollapsedChange, quickQueries, quickQuerySize, savedQueries, shortcutsLoading, onSaveQuery, onRemoveQuery, onError, searchText, resetText, saveText, resetSearch, actionsExtra, disabled, className, placeholderMode, onValuesChange, onFinishFailed, ...formProps }: QueryFormProps<T>): react.JSX.Element;
1421
+
1422
+ export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, BadgeProps, ButtonProps, ButtonSize, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, QueryForm, type QueryFormField, type QueryFormProps, type QueryFormSearchInfo, type QueryFormShortcut, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TagStatus, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, useForm };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
- import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes } from 'react';
3
- import { O as OverlayContainer, a as OverlayApiHandle, B as ButtonProps } from './core-CJK3_KTQ.js';
4
- export { b as Badge, c as BadgeProps, d as BadgeRibbonProps, e as BadgeStatus, f as Breadcrumb, g as BreadcrumbItem, h as BreadcrumbProps, i as Button, j as ButtonSize, k as ButtonVariant, C as Calendar, l as CalendarProps, m as Card, n as CardAccent, o as CardProps, p as Carousel, q as CarouselProps, r as CarouselRef, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, D as Dropdown, w as DropdownButtonProps, x as DropdownMenuProps, y as DropdownOpenSource, z as DropdownPlacement, A as DropdownProps, E as DropdownTrigger, F as FILLED_ICON_NAMES, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, M as FloatingPlacement, N as FloatingTrigger, P as ICON_NAMES, Q as Icon, R as IconName, S as IconProps, T as IconVariant, U as Image, V as ImagePreview, W as ImagePreviewConfig, X as ImagePreviewProps, Y as ImageProps, Z as Input, _ as InputProps, $ as Menu, a0 as MenuClickInfo, a1 as MenuItem, a2 as MenuMode, a3 as MenuProps, a4 as MenuTheme, a5 as MessageConfig, a6 as MessageHandle, a7 as MessageKey, a8 as MessageType, a9 as Modal, aa as ModalActionResult, ab as ModalOpenConfig, ac as ModalProps, ad as ModalType, ae as NotificationConfig, af as NotificationPlacement, ag as NotificationType, ah as Popconfirm, ai as PopconfirmProps, aj as Popover, ak as PopoverProps, al as Progress, am as ProgressProps, an as ProgressStatus, ao as Rate, ap as RateProps, aq as Segmented, ar as SegmentedOption, as as SegmentedProps, at as SegmentedValue, au as Spin, av as SpinProps, aw as StepItem, ax as StepStatus, ay as Steps, az as StepsProps, aA as TabItem, aB as Tabs, aC as TabsContextMenuClickInfo, aD as TabsOrientation, aE as TabsPosition, aF as TabsProps, aG as TabsType, aH as Tag, aI as TagProps, aJ as TagStatus, aK as TagVariant, aL as Timeline, aM as TimelineItem, aN as TimelineProps, aO as Tooltip, aP as TooltipProps, aQ as Tour, aR as TourProps, aS as TourStep, aT as Tree, aU as TreeDropPosition, aV as TreeKey, aW as TreeNode, aX as TreeProps, aY as Typography, aZ as TypographyLinkProps, a_ as TypographyProps, a$ as TypographyTitleProps, b0 as TypographyType, b1 as Upload, b2 as UploadChangeInfo, b3 as UploadDraggerProps, b4 as UploadFile, b5 as UploadFileStatus, b6 as UploadProps, b7 as UploadRequestOptions, b8 as Watermark, b9 as WatermarkFont, ba as WatermarkProps, bb as message, bc as notification } from './core-CJK3_KTQ.js';
2
+ import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
3
+ import { O as OverlayContainer, a as OverlayApiHandle, B as ButtonProps, T as TagStatus, b as ButtonSize, c as BadgeProps } from './core-DcSXqSRs.js';
4
+ export { d as Badge, e as BadgeRibbonProps, f as BadgeStatus, g as Breadcrumb, h as BreadcrumbItem, i as BreadcrumbProps, j as Button, k as ButtonVariant, C as Calendar, l as CalendarProps, m as Card, n as CardAccent, o as CardProps, p as Carousel, q as CarouselProps, r as CarouselRef, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, D as Dropdown, w as DropdownButtonProps, x as DropdownMenuProps, y as DropdownOpenSource, z as DropdownPlacement, A as DropdownProps, E as DropdownTrigger, F as FILLED_ICON_NAMES, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, M as FloatingPlacement, N as FloatingTrigger, P as ICON_NAMES, Q as Icon, R as IconName, S as IconProps, U as IconVariant, V as Image, W as ImagePreview, X as ImagePreviewConfig, Y as ImagePreviewProps, Z as ImageProps, _ as Input, $ as InputProps, a0 as Menu, a1 as MenuClickInfo, a2 as MenuItem, a3 as MenuMode, a4 as MenuProps, a5 as MenuTheme, a6 as MessageConfig, a7 as MessageHandle, a8 as MessageKey, a9 as MessageType, aa as Modal, ab as ModalActionResult, ac as ModalOpenConfig, ad as ModalProps, ae as ModalType, af as NotificationConfig, ag as NotificationPlacement, ah as NotificationType, ai as Popconfirm, aj as PopconfirmProps, ak as Popover, al as PopoverProps, am as Progress, an as ProgressProps, ao as ProgressStatus, ap as Rate, aq as RateProps, ar as Segmented, as as SegmentedOption, at as SegmentedProps, au as SegmentedValue, av as Spin, aw as SpinProps, ax as StepItem, ay as StepStatus, az as Steps, aA as StepsProps, aB as TabItem, aC as Tabs, aD as TabsContextMenuClickInfo, aE as TabsOrientation, aF as TabsPosition, aG as TabsProps, aH as TabsType, aI as Tag, aJ as TagProps, aK as TagVariant, aL as Timeline, aM as TimelineItem, aN as TimelineProps, aO as Tooltip, aP as TooltipProps, aQ as Tour, aR as TourProps, aS as TourStep, aT as Tree, aU as TreeDropPosition, aV as TreeKey, aW as TreeNode, aX as TreeProps, aY as Typography, aZ as TypographyLinkProps, a_ as TypographyProps, a$ as TypographyTitleProps, b0 as TypographyType, b1 as Upload, b2 as UploadChangeInfo, b3 as UploadDraggerProps, b4 as UploadFile, b5 as UploadFileStatus, b6 as UploadProps, b7 as UploadRequestOptions, b8 as Watermark, b9 as WatermarkFont, ba as WatermarkProps, bb as message, bc as notification } from './core-DcSXqSRs.js';
5
5
  import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-DAYZvZVu.js';
6
6
  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-Bdb-hi9c.js';
7
7
  export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.js';
@@ -1278,8 +1278,10 @@ declare const ThemeSwitch: react.ForwardRefExoticComponent<ThemeSwitchProps & re
1278
1278
 
1279
1279
  interface FloatingScrollbarProviderProps {
1280
1280
  disabled?: boolean;
1281
+ /** 仅接管指定容器;不传时接管页面中的滚动容器。 */
1282
+ targetRef?: RefObject<HTMLElement | null>;
1281
1283
  }
1282
- declare function FloatingScrollbarProvider({ disabled }: FloatingScrollbarProviderProps): null;
1284
+ declare function FloatingScrollbarProvider({ disabled, targetRef }: FloatingScrollbarProviderProps): null;
1283
1285
 
1284
1286
  type SiaThemeMode = "light" | "dark";
1285
1287
  declare const SIA_THEME: {
@@ -1365,4 +1367,56 @@ interface InputSelectProps {
1365
1367
  }
1366
1368
  declare const InputSelect: react.ForwardRefExoticComponent<InputSelectProps & react.RefAttributes<HTMLInputElement>>;
1367
1369
 
1368
- export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, ButtonProps, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, useForm };
1370
+ interface QueryFormField extends FormItemProps {
1371
+ key: string;
1372
+ /** 字段占用宽度,默认由 fieldWidth 控制;组合字段可指定更大的宽度。 */
1373
+ width?: number | string;
1374
+ }
1375
+ interface QueryFormShortcut<T extends FormValues = FormValues> {
1376
+ key: string;
1377
+ label: ReactNode;
1378
+ values: Partial<T>;
1379
+ disabled?: boolean;
1380
+ status?: TagStatus;
1381
+ /** 顶部快捷查询按钮尺寸,优先于 quickQuerySize。 */
1382
+ size?: ButtonSize;
1383
+ /** 该快捷查询对应的数据总量,由业务接口提供。 */
1384
+ count?: number;
1385
+ badgeProps?: Omit<BadgeProps, "children" | "count">;
1386
+ }
1387
+ interface QueryFormSearchInfo {
1388
+ source: "submit" | "reset" | "quick" | "saved";
1389
+ shortcutKey?: string;
1390
+ }
1391
+ interface QueryFormProps<T extends FormValues = FormValues> extends Omit<FormProps, "onFinish" | "children" | "onError"> {
1392
+ fields?: readonly QueryFormField[];
1393
+ /** 也可直接放入 Form.Item 或 Space.Compact,每个直接子项视为一个查询字段。 */
1394
+ children?: ReactNode;
1395
+ onSearch: (values: T, info: QueryFormSearchInfo) => void | Promise<void>;
1396
+ loading?: boolean;
1397
+ fieldWidth?: number | string;
1398
+ collapsible?: boolean;
1399
+ collapsed?: boolean;
1400
+ defaultCollapsed?: boolean;
1401
+ collapsedCount?: number;
1402
+ onCollapsedChange?: (collapsed: boolean) => void;
1403
+ quickQueries?: readonly QueryFormShortcut<T>[];
1404
+ quickQuerySize?: ButtonSize;
1405
+ savedQueries?: readonly QueryFormShortcut<T>[];
1406
+ shortcutsLoading?: boolean;
1407
+ onSaveQuery?: (query: {
1408
+ name: string;
1409
+ values: T;
1410
+ }) => void | Promise<void>;
1411
+ onRemoveQuery?: (query: QueryFormShortcut<T>) => void | Promise<void>;
1412
+ onError?: (error: unknown, operation: "search" | "save" | "remove") => void;
1413
+ searchText?: ReactNode;
1414
+ resetText?: ReactNode;
1415
+ saveText?: ReactNode;
1416
+ resetSearch?: boolean;
1417
+ actionsExtra?: ReactNode;
1418
+ }
1419
+ /** 可复用的业务查询表单;快捷查询的存储和结果数据由业务方管理。 */
1420
+ declare function QueryForm<T extends FormValues = FormValues>({ fields, children, form: providedForm, onSearch, loading, fieldWidth, collapsible, collapsed: controlledCollapsed, defaultCollapsed, collapsedCount, onCollapsedChange, quickQueries, quickQuerySize, savedQueries, shortcutsLoading, onSaveQuery, onRemoveQuery, onError, searchText, resetText, saveText, resetSearch, actionsExtra, disabled, className, placeholderMode, onValuesChange, onFinishFailed, ...formProps }: QueryFormProps<T>): react.JSX.Element;
1421
+
1422
+ export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, BadgeProps, ButtonProps, ButtonSize, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, QueryForm, type QueryFormField, type QueryFormProps, type QueryFormSearchInfo, type QueryFormShortcut, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TagStatus, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, useForm };