@cloudtower/eagle 0.32.52 → 0.32.53

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.
@@ -10,6 +10,11 @@ export type SearchInputProps = Omit<InputProps, "onChange"> & {
10
10
  * 搜索结果的总数
11
11
  */
12
12
  total?: number;
13
+ /**
14
+ * 当前选中的结果索引,可用于外部控制当前位置
15
+ * 如果不提供,组件将内部管理此状态
16
+ */
17
+ current?: number;
13
18
  /**
14
19
  * 搜索下一个结果时的回调函数
15
20
  */
@@ -3,10 +3,24 @@ import type { StoryObj } from "@storybook/react";
3
3
  /**
4
4
  * * tower legacy 组件, 带 debounce 的搜索框
5
5
  * * MR: http://gitlab.smartx.com/frontend/tower/-/merge_requests/930
6
+ *
7
+ * * SearchInput 搜索输入框组件
8
+ * * 带有防抖功能的搜索输入框
9
+ * * 支持结果导航功能(上一个/下一个)
10
+ * * 可以内部管理状态,也支持完全受控模式
11
+ * * 支持自定义图标和样式
12
+ *
6
13
  */
7
14
  declare const meta: {
8
- component: import("../../../src/core/SearchInput").SearchInputComponentType;
15
+ component: import("../../../src/core").SearchInputComponentType;
9
16
  title: "Core/SearchInput | 搜索框";
17
+ parameters: {
18
+ docs: {
19
+ description: {
20
+ component: string;
21
+ };
22
+ };
23
+ };
10
24
  args: {
11
25
  debounceWait: number;
12
26
  onSearchPrev: undefined;
@@ -16,5 +30,18 @@ declare const meta: {
16
30
  };
17
31
  export default meta;
18
32
  type Story = StoryObj<typeof SearchInput>;
33
+ /**
34
+ * 基本使用示例
35
+ * 展示最简单的搜索框用法,仅处理输入变化
36
+ */
19
37
  export declare const Basic: Story;
38
+ /**
39
+ * 带搜索结果导航的示例
40
+ * 展示如何使用结果导航功能,显示当前位置和总数
41
+ */
20
42
  export declare const withTotal: Story;
43
+ /**
44
+ * 外部控制当前索引的示例
45
+ * 展示如何使用 current prop 控制搜索项目的当前索引
46
+ */
47
+ export declare const ExternallyControlled: Story;