@qq1948037137/adminsmart-ui 0.1.26 → 0.1.28

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.d.cts CHANGED
@@ -13,8 +13,12 @@ type ThemeMode = 'light' | 'dark';
13
13
  interface ThemeModeButtonProps extends ButtonProps {
14
14
  /** 宿主当前生效的主题;按钮本身不读取或保存浏览器偏好。 */
15
15
  mode: ThemeMode;
16
- /** 用户点击后请求的下一主题;宿主负责更新受控状态与持久化。 */
16
+ /** 请求下一主题;宿主负责更新受控状态与持久化,异步回调应在主题提交后完成。 */
17
17
  onModeChange?: (mode: ThemeMode) => void;
18
+ /** 默认使用原生快照圆形过渡;none 立即切换,不影响宿主的主题算法。 */
19
+ transition?: 'reveal' | 'none';
20
+ /** 圆形过渡毫秒数;默认 500,非正数直接切换,非有限值沿用默认值。 */
21
+ transitionDuration?: number;
18
22
  /** 原生 Tooltip 属性,可覆盖默认提示、触发方式和浮层配置。 */
19
23
  tooltipProps?: Omit<TooltipProps, 'children'>;
20
24
  }
@@ -23,6 +27,8 @@ interface ThemeModeButtonProps extends ButtonProps {
23
27
  *
24
28
  * @param props.mode 当前外观,用于选择下一主题、图标和按下状态。
25
29
  * @param props.onModeChange 点击未被原生 onClick 取消时通知宿主切换主题。
30
+ * @param props.transition 默认 reveal;none 及减少动态效果偏好均立即通知宿主。
31
+ * @param props.transitionDuration 圆形快照动画时长,非正数关闭动画。
26
32
  * @param props.tooltipProps 可覆盖默认 Tooltip 的完整原生浮层属性。
27
33
  * @param props.onClick 原生点击回调,优先执行;preventDefault 可取消主题请求。
28
34
  * @param props 其余 Ant Button 属性原样透传,显式属性覆盖图标、大小和 aria 默认值。
@@ -282,6 +288,41 @@ interface SearchPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, 'childre
282
288
  */
283
289
  declare const SearchPanel: react.ForwardRefExoticComponent<SearchPanelProps & react.RefAttributes<HTMLDivElement>>;
284
290
 
291
+ interface TableControlColumn {
292
+ /** 宿主表格的稳定列标识,在同一表格中必须唯一。 */
293
+ key: string;
294
+ /** 列选择面板中供用户识别的列标题。 */
295
+ label: ReactNode;
296
+ /** 为真时保留宿主原有显隐值,不允许用户切换。 */
297
+ disabled?: boolean;
298
+ }
299
+ interface TableControlsProps {
300
+ /** 筛选区当前可见。由宿主将该状态传给同页的 SearchPanel。 */
301
+ searchVisible?: boolean;
302
+ /** 请求宿主改变筛选区可见状态。省略时保持搜索按钮位置且禁用。 */
303
+ onSearchVisibleChange?: (visible: boolean) => void;
304
+ /** 重新加载当前页。省略时保持刷新按钮位置且禁用。 */
305
+ onRefresh?: () => void;
306
+ /** 当前正在重新加载。为真时刷新按钮显示进度并阻止重复操作。 */
307
+ refreshing?: boolean;
308
+ /** 可显示在列选择面板中的业务列。省略时列选择不可用。 */
309
+ columns?: readonly TableControlColumn[];
310
+ /** 当前可见的列标识。省略时将提供的所有列视为可见。 */
311
+ visibleColumns?: readonly string[];
312
+ /** 以 columns 原有顺序返回新的可见列标识,由宿主应用及按需持久化。 */
313
+ onVisibleColumnsChange?: (keys: string[]) => void;
314
+ /** 宿主用于定位工具组的可选类名。 */
315
+ className?: string;
316
+ /** 宿主可选的工具组样式覆写。 */
317
+ style?: CSSProperties;
318
+ }
319
+ /**
320
+ * 为列表右侧提供顺序固定的筛选显隐、刷新和显示列控件。
321
+ * @param props 搜索、刷新和列显隐由宿主管理,控件只管理面板的打开与键盘焦点。
322
+ * @returns 可放入 SearchPanel.trailingTools 的一组紧凑工具。
323
+ */
324
+ declare function TableControls({ searchVisible, onSearchVisibleChange, onRefresh, refreshing, columns, visibleColumns, onVisibleColumnsChange, className, style, }: TableControlsProps): react_jsx_runtime.JSX.Element;
325
+
285
326
  interface DataTableProps<RecordType extends object> extends TableProps<RecordType> {
286
327
  /** 设置表格整体容器的固定高度;省略时按屏幕剩余高度计算。 */
287
328
  containerHeight?: CSSProperties['height'];
@@ -502,4 +543,4 @@ declare function mapSchemaField(field: SchemaField): SchemaFieldMapping;
502
543
  /** 从字段默认值生成表单初值;调用方的 initialValues 可在渲染层覆盖。 */
503
544
  declare function schemaInitialValues(schema: SchemaFormSchema): SchemaFormValues;
504
545
 
505
- export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, TableEmpty, type TableEmptyProps, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };
546
+ export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, type TableControlColumn, TableControls, type TableControlsProps, TableEmpty, type TableEmptyProps, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };
package/dist/index.d.ts CHANGED
@@ -13,8 +13,12 @@ type ThemeMode = 'light' | 'dark';
13
13
  interface ThemeModeButtonProps extends ButtonProps {
14
14
  /** 宿主当前生效的主题;按钮本身不读取或保存浏览器偏好。 */
15
15
  mode: ThemeMode;
16
- /** 用户点击后请求的下一主题;宿主负责更新受控状态与持久化。 */
16
+ /** 请求下一主题;宿主负责更新受控状态与持久化,异步回调应在主题提交后完成。 */
17
17
  onModeChange?: (mode: ThemeMode) => void;
18
+ /** 默认使用原生快照圆形过渡;none 立即切换,不影响宿主的主题算法。 */
19
+ transition?: 'reveal' | 'none';
20
+ /** 圆形过渡毫秒数;默认 500,非正数直接切换,非有限值沿用默认值。 */
21
+ transitionDuration?: number;
18
22
  /** 原生 Tooltip 属性,可覆盖默认提示、触发方式和浮层配置。 */
19
23
  tooltipProps?: Omit<TooltipProps, 'children'>;
20
24
  }
@@ -23,6 +27,8 @@ interface ThemeModeButtonProps extends ButtonProps {
23
27
  *
24
28
  * @param props.mode 当前外观,用于选择下一主题、图标和按下状态。
25
29
  * @param props.onModeChange 点击未被原生 onClick 取消时通知宿主切换主题。
30
+ * @param props.transition 默认 reveal;none 及减少动态效果偏好均立即通知宿主。
31
+ * @param props.transitionDuration 圆形快照动画时长,非正数关闭动画。
26
32
  * @param props.tooltipProps 可覆盖默认 Tooltip 的完整原生浮层属性。
27
33
  * @param props.onClick 原生点击回调,优先执行;preventDefault 可取消主题请求。
28
34
  * @param props 其余 Ant Button 属性原样透传,显式属性覆盖图标、大小和 aria 默认值。
@@ -282,6 +288,41 @@ interface SearchPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, 'childre
282
288
  */
283
289
  declare const SearchPanel: react.ForwardRefExoticComponent<SearchPanelProps & react.RefAttributes<HTMLDivElement>>;
284
290
 
291
+ interface TableControlColumn {
292
+ /** 宿主表格的稳定列标识,在同一表格中必须唯一。 */
293
+ key: string;
294
+ /** 列选择面板中供用户识别的列标题。 */
295
+ label: ReactNode;
296
+ /** 为真时保留宿主原有显隐值,不允许用户切换。 */
297
+ disabled?: boolean;
298
+ }
299
+ interface TableControlsProps {
300
+ /** 筛选区当前可见。由宿主将该状态传给同页的 SearchPanel。 */
301
+ searchVisible?: boolean;
302
+ /** 请求宿主改变筛选区可见状态。省略时保持搜索按钮位置且禁用。 */
303
+ onSearchVisibleChange?: (visible: boolean) => void;
304
+ /** 重新加载当前页。省略时保持刷新按钮位置且禁用。 */
305
+ onRefresh?: () => void;
306
+ /** 当前正在重新加载。为真时刷新按钮显示进度并阻止重复操作。 */
307
+ refreshing?: boolean;
308
+ /** 可显示在列选择面板中的业务列。省略时列选择不可用。 */
309
+ columns?: readonly TableControlColumn[];
310
+ /** 当前可见的列标识。省略时将提供的所有列视为可见。 */
311
+ visibleColumns?: readonly string[];
312
+ /** 以 columns 原有顺序返回新的可见列标识,由宿主应用及按需持久化。 */
313
+ onVisibleColumnsChange?: (keys: string[]) => void;
314
+ /** 宿主用于定位工具组的可选类名。 */
315
+ className?: string;
316
+ /** 宿主可选的工具组样式覆写。 */
317
+ style?: CSSProperties;
318
+ }
319
+ /**
320
+ * 为列表右侧提供顺序固定的筛选显隐、刷新和显示列控件。
321
+ * @param props 搜索、刷新和列显隐由宿主管理,控件只管理面板的打开与键盘焦点。
322
+ * @returns 可放入 SearchPanel.trailingTools 的一组紧凑工具。
323
+ */
324
+ declare function TableControls({ searchVisible, onSearchVisibleChange, onRefresh, refreshing, columns, visibleColumns, onVisibleColumnsChange, className, style, }: TableControlsProps): react_jsx_runtime.JSX.Element;
325
+
285
326
  interface DataTableProps<RecordType extends object> extends TableProps<RecordType> {
286
327
  /** 设置表格整体容器的固定高度;省略时按屏幕剩余高度计算。 */
287
328
  containerHeight?: CSSProperties['height'];
@@ -502,4 +543,4 @@ declare function mapSchemaField(field: SchemaField): SchemaFieldMapping;
502
543
  /** 从字段默认值生成表单初值;调用方的 initialValues 可在渲染层覆盖。 */
503
544
  declare function schemaInitialValues(schema: SchemaFormSchema): SchemaFormValues;
504
545
 
505
- export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, TableEmpty, type TableEmptyProps, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };
546
+ export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, type TableControlColumn, TableControls, type TableControlsProps, TableEmpty, type TableEmptyProps, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };