@next-bricks/presentational 1.21.9 → 1.21.10

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.
Files changed (60) hide show
  1. package/dist/bricks.json +9 -9
  2. package/dist/chunks/5045.b0f85f6b.js.map +1 -1
  3. package/dist/chunks/code-wrapper.40655769.js.map +1 -1
  4. package/dist/chunks/eo-card-item.fbff6f7e.js.map +1 -1
  5. package/dist/chunks/eo-carousel-text.d8e8c2c9.js.map +1 -1
  6. package/dist/chunks/eo-code-block.7efe5647.js.map +1 -1
  7. package/dist/chunks/eo-code-display.ffd79558.js.map +1 -1
  8. package/dist/chunks/eo-current-time.7cbef918.js.map +1 -1
  9. package/dist/chunks/eo-descriptions.b8320ca9.js.map +1 -1
  10. package/dist/chunks/eo-humanize-time.2397ce6e.js.map +1 -1
  11. package/dist/chunks/eo-info-card-item.0d15cb28.js.map +1 -1
  12. package/dist/chunks/eo-loading-step.834e0aa3.js.map +1 -1
  13. package/dist/chunks/eo-pagination.16fd816a.js.map +1 -1
  14. package/dist/chunks/eo-statistics-card.410b5416.js.map +1 -1
  15. package/dist/examples.json +15 -15
  16. package/dist/{index.db5144bf.js → index.3d30863f.js} +2 -2
  17. package/dist/{index.db5144bf.js.map → index.3d30863f.js.map} +1 -1
  18. package/dist/manifest.json +108 -98
  19. package/dist/types.json +110 -110
  20. package/dist-types/card-item/index.d.ts +8 -4
  21. package/dist-types/carousel-text/index.d.ts +1 -1
  22. package/dist-types/code-block/index.d.ts +12 -3
  23. package/dist-types/code-display/index.d.ts +0 -1
  24. package/dist-types/code-wrapper/index.d.ts +7 -2
  25. package/dist-types/current-time/index.d.ts +1 -1
  26. package/dist-types/descriptions/index.d.ts +2 -1
  27. package/dist-types/humanize-time/index.d.ts +8 -8
  28. package/dist-types/info-card-item/index.d.ts +8 -7
  29. package/dist-types/loading-step/index.d.ts +8 -8
  30. package/dist-types/pagination/index.d.ts +7 -0
  31. package/dist-types/statistics-card/index.d.ts +2 -2
  32. package/docs/eo-alert.md +65 -1
  33. package/docs/eo-alert.react.md +127 -0
  34. package/docs/eo-card-item.md +179 -210
  35. package/docs/eo-card-item.react.md +578 -0
  36. package/docs/eo-carousel-text.md +49 -2
  37. package/docs/eo-carousel-text.react.md +62 -0
  38. package/docs/eo-code-block.md +135 -4
  39. package/docs/eo-code-block.react.md +146 -0
  40. package/docs/eo-code-display.md +97 -1
  41. package/docs/eo-code-display.react.md +116 -0
  42. package/docs/eo-code-wrapper.md +108 -0
  43. package/docs/eo-code-wrapper.react.md +100 -0
  44. package/docs/eo-current-time.md +40 -1
  45. package/docs/eo-current-time.react.md +53 -0
  46. package/docs/eo-descriptions.md +74 -4
  47. package/docs/eo-descriptions.react.md +329 -0
  48. package/docs/eo-divider.md +105 -17
  49. package/docs/eo-divider.react.md +129 -0
  50. package/docs/eo-humanize-time.md +89 -42
  51. package/docs/eo-humanize-time.react.md +109 -0
  52. package/docs/eo-info-card-item.md +129 -183
  53. package/docs/eo-info-card-item.react.md +188 -0
  54. package/docs/eo-loading-step.md +96 -1
  55. package/docs/eo-loading-step.react.md +102 -0
  56. package/docs/eo-pagination.md +74 -1
  57. package/docs/eo-pagination.react.md +93 -0
  58. package/docs/eo-statistics-card.md +175 -456
  59. package/docs/eo-statistics-card.react.md +376 -0
  60. package/package.json +2 -2
package/dist/types.json CHANGED
@@ -1795,116 +1795,6 @@
1795
1795
  "events": [],
1796
1796
  "methods": []
1797
1797
  },
1798
- "eo-alert": {
1799
- "properties": [
1800
- {
1801
- "name": "type",
1802
- "annotation": {
1803
- "type": "reference",
1804
- "typeName": {
1805
- "type": "identifier",
1806
- "name": "AlertType"
1807
- }
1808
- }
1809
- },
1810
- {
1811
- "name": "hasTitle",
1812
- "annotation": {
1813
- "type": "keyword",
1814
- "value": "boolean"
1815
- }
1816
- },
1817
- {
1818
- "name": "showIcon",
1819
- "annotation": {
1820
- "type": "keyword",
1821
- "value": "boolean"
1822
- }
1823
- },
1824
- {
1825
- "name": "closable",
1826
- "annotation": {
1827
- "type": "keyword",
1828
- "value": "boolean"
1829
- }
1830
- },
1831
- {
1832
- "name": "localStorageKey",
1833
- "annotation": {
1834
- "type": "keyword",
1835
- "value": "string"
1836
- }
1837
- },
1838
- {
1839
- "name": "disableUrlNamespace",
1840
- "annotation": {
1841
- "type": "keyword",
1842
- "value": "boolean"
1843
- }
1844
- },
1845
- {
1846
- "name": "textContent",
1847
- "annotation": {
1848
- "type": "keyword",
1849
- "value": "string"
1850
- }
1851
- }
1852
- ],
1853
- "events": [],
1854
- "methods": [],
1855
- "types": [
1856
- {
1857
- "type": "enum",
1858
- "name": "AlertType",
1859
- "members": [
1860
- {
1861
- "type": "enumMember",
1862
- "id": {
1863
- "type": "jsLiteral",
1864
- "value": "SUCCESS"
1865
- },
1866
- "initializer": {
1867
- "type": "jsLiteral",
1868
- "value": "success"
1869
- }
1870
- },
1871
- {
1872
- "type": "enumMember",
1873
- "id": {
1874
- "type": "jsLiteral",
1875
- "value": "INFO"
1876
- },
1877
- "initializer": {
1878
- "type": "jsLiteral",
1879
- "value": "info"
1880
- }
1881
- },
1882
- {
1883
- "type": "enumMember",
1884
- "id": {
1885
- "type": "jsLiteral",
1886
- "value": "WARNING"
1887
- },
1888
- "initializer": {
1889
- "type": "jsLiteral",
1890
- "value": "warning"
1891
- }
1892
- },
1893
- {
1894
- "type": "enumMember",
1895
- "id": {
1896
- "type": "jsLiteral",
1897
- "value": "ERROR"
1898
- },
1899
- "initializer": {
1900
- "type": "jsLiteral",
1901
- "value": "error"
1902
- }
1903
- }
1904
- ]
1905
- }
1906
- ]
1907
- },
1908
1798
  "eo-code-display": {
1909
1799
  "properties": [
1910
1800
  {
@@ -2160,6 +2050,116 @@
2160
2050
  }
2161
2051
  ]
2162
2052
  },
2053
+ "eo-alert": {
2054
+ "properties": [
2055
+ {
2056
+ "name": "type",
2057
+ "annotation": {
2058
+ "type": "reference",
2059
+ "typeName": {
2060
+ "type": "identifier",
2061
+ "name": "AlertType"
2062
+ }
2063
+ }
2064
+ },
2065
+ {
2066
+ "name": "hasTitle",
2067
+ "annotation": {
2068
+ "type": "keyword",
2069
+ "value": "boolean"
2070
+ }
2071
+ },
2072
+ {
2073
+ "name": "showIcon",
2074
+ "annotation": {
2075
+ "type": "keyword",
2076
+ "value": "boolean"
2077
+ }
2078
+ },
2079
+ {
2080
+ "name": "closable",
2081
+ "annotation": {
2082
+ "type": "keyword",
2083
+ "value": "boolean"
2084
+ }
2085
+ },
2086
+ {
2087
+ "name": "localStorageKey",
2088
+ "annotation": {
2089
+ "type": "keyword",
2090
+ "value": "string"
2091
+ }
2092
+ },
2093
+ {
2094
+ "name": "disableUrlNamespace",
2095
+ "annotation": {
2096
+ "type": "keyword",
2097
+ "value": "boolean"
2098
+ }
2099
+ },
2100
+ {
2101
+ "name": "textContent",
2102
+ "annotation": {
2103
+ "type": "keyword",
2104
+ "value": "string"
2105
+ }
2106
+ }
2107
+ ],
2108
+ "events": [],
2109
+ "methods": [],
2110
+ "types": [
2111
+ {
2112
+ "type": "enum",
2113
+ "name": "AlertType",
2114
+ "members": [
2115
+ {
2116
+ "type": "enumMember",
2117
+ "id": {
2118
+ "type": "jsLiteral",
2119
+ "value": "SUCCESS"
2120
+ },
2121
+ "initializer": {
2122
+ "type": "jsLiteral",
2123
+ "value": "success"
2124
+ }
2125
+ },
2126
+ {
2127
+ "type": "enumMember",
2128
+ "id": {
2129
+ "type": "jsLiteral",
2130
+ "value": "INFO"
2131
+ },
2132
+ "initializer": {
2133
+ "type": "jsLiteral",
2134
+ "value": "info"
2135
+ }
2136
+ },
2137
+ {
2138
+ "type": "enumMember",
2139
+ "id": {
2140
+ "type": "jsLiteral",
2141
+ "value": "WARNING"
2142
+ },
2143
+ "initializer": {
2144
+ "type": "jsLiteral",
2145
+ "value": "warning"
2146
+ }
2147
+ },
2148
+ {
2149
+ "type": "enumMember",
2150
+ "id": {
2151
+ "type": "jsLiteral",
2152
+ "value": "ERROR"
2153
+ },
2154
+ "initializer": {
2155
+ "type": "jsLiteral",
2156
+ "value": "error"
2157
+ }
2158
+ }
2159
+ ]
2160
+ }
2161
+ ]
2162
+ },
2163
2163
  "eo-humanize-time": {
2164
2164
  "properties": [
2165
2165
  {
@@ -76,6 +76,7 @@ export interface EoCardItemEventsMapping {
76
76
  /**
77
77
  * 信息类卡片 —— 通用卡片
78
78
  * @slot - 内容区域,通常放置卡片自定义内容
79
+ * @slot title-suffix - 标题后缀区域,通常放置状态标签等内容
79
80
  * @slot expanded-area-1 - 扩展区域 1,通常放置标签信息
80
81
  * @slot expanded-area-2 - 扩展区域 2,通常放置操作和其他属性信息(图标/头像/小字描述/统计信息)
81
82
  * @category card-info
@@ -83,7 +84,7 @@ export interface EoCardItemEventsMapping {
83
84
  export declare class EoCardItem extends ReactNextElement implements EoCardItemProps {
84
85
  #private;
85
86
  /**
86
- * 是否有顶部小标题
87
+ * 是否有顶部小标题区域,开启后会显示 `auxiliaryText` 辅助文字
87
88
  */
88
89
  accessor hasHeader: boolean | undefined;
89
90
  /**
@@ -99,7 +100,7 @@ export declare class EoCardItem extends ReactNextElement implements EoCardItemPr
99
100
  */
100
101
  accessor auxiliaryText: string | undefined;
101
102
  /**
102
- * 图标
103
+ * 图标或图片,支持图标头像(IconAvatar)和图片头像(ImgAvatar)两种形式
103
104
  */
104
105
  accessor avatar: IconAvatar | ImgAvatar | undefined;
105
106
  /**
@@ -119,7 +120,7 @@ export declare class EoCardItem extends ReactNextElement implements EoCardItemPr
119
120
  */
120
121
  accessor actions: ActionType[] | undefined;
121
122
  /**
122
- * 展示操作按钮组
123
+ * 操作按钮组的展示时机,`always` 始终展示,`hover` 悬停时展示
123
124
  */
124
125
  accessor showActions: "always" | "hover";
125
126
  /**
@@ -147,13 +148,16 @@ export declare class EoCardItem extends ReactNextElement implements EoCardItemPr
147
148
  */
148
149
  accessor coverImageSize: React.CSSProperties["backgroundSize"] | undefined;
149
150
  /**
150
- * 图标是否放置在卡片封面
151
+ * 头像的放置位置,设为 `cover` 时头像显示在封面区域,否则显示在内容区域
151
152
  */
152
153
  accessor avatarPosition: "content" | "cover";
153
154
  /**
154
155
  * 图标位置,在 avatarPosition 不为 cover 时有效
155
156
  */
156
157
  accessor avatarPlacement: "left" | "title-left";
158
+ /**
159
+ * 徽标配置,可设置文本、图标、背景色和字体颜色
160
+ */
157
161
  accessor tagConfig: TagConfig | undefined;
158
162
  /**
159
163
  * 卡片边框颜色
@@ -2,7 +2,7 @@ import React, { CSSProperties } from "react";
2
2
  import { ReactNextElement } from "@next-core/react-element";
3
3
  import "@next-core/theme";
4
4
  /**
5
- * 构件 `eo-carousel-text`
5
+ * 文字跑马灯构件,文本内容从右向左循环滚动展示,支持自定义速度、字体大小和字体颜色。
6
6
  */
7
7
  export declare class EoCarouselText extends ReactNextElement {
8
8
  /**
@@ -11,7 +11,7 @@ export interface CodeBlockProps {
11
11
  showCopyButton?: boolean;
12
12
  }
13
13
  /**
14
- * 构件 `eo-code-block`
14
+ * 代码块展示构件,基于 Shiki 进行语法高亮,支持多种编程语言、亮色/暗色主题自动切换及复制功能。
15
15
  *
16
16
  * @part pre - 包裹代码内容的 `<pre>` 元素
17
17
  * @part copy - 复制按钮
@@ -19,12 +19,21 @@ export interface CodeBlockProps {
19
19
  * @part wrapper - code-wrapper 构件
20
20
  */
21
21
  export declare class CodeBlock extends ReactNextElement implements CodeBlockProps {
22
+ /**
23
+ * 代码语言,用于语法高亮,例如 `javascript`、`python`、`yaml` 等
24
+ */
22
25
  accessor language: string | undefined;
26
+ /**
27
+ * 代码内容字符串
28
+ */
23
29
  accessor source: string | undefined;
24
- /** @default "auto" */
30
+ /**
31
+ * 代码高亮主题。`auto` 跟随系统主题自动切换亮色/暗色
32
+ * @default "auto"
33
+ */
25
34
  accessor theme: "auto" | "light-plus" | "dark-plus" | undefined;
26
35
  /**
27
- * 主题变体
36
+ * 主题变体,影响代码块的整体样式风格
28
37
  */
29
38
  accessor themeVariant: "default" | "elevo" | undefined;
30
39
  /**
@@ -47,7 +47,6 @@ export declare class CodeDisplay extends ReactNextElement implements CodeDisplay
47
47
  accessor showExportButton: boolean | undefined;
48
48
  /**
49
49
  * 导出的文件名
50
- * @default download.txt
51
50
  */
52
51
  accessor exportFileName: string | undefined;
53
52
  render(): React.JSX.Element;
@@ -10,7 +10,9 @@ export interface CodeWrapperProps {
10
10
  themeVariant?: "default" | "elevo";
11
11
  }
12
12
  /**
13
- * 构件 `presentational.code-wrapper`
13
+ * 代码内容包裹容器,提供统一的代码展示结构并支持一键复制功能。
14
+ *
15
+ * @description 代码内容包裹容器,提供统一的代码展示结构并支持一键复制功能。
14
16
  *
15
17
  * @internal
16
18
  *
@@ -18,6 +20,9 @@ export interface CodeWrapperProps {
18
20
  * @part copy - 复制按钮
19
21
  */
20
22
  export declare class CodeWrapper extends ReactNextElement implements CodeWrapperProps {
23
+ /**
24
+ * 传递给 `<pre>` 元素的额外属性,例如 `className`、`style` 等
25
+ */
21
26
  accessor preProps: React.PropsWithChildren<JSX.IntrinsicElements["pre"]> | undefined;
22
27
  /**
23
28
  * 是否展示复制按钮
@@ -25,7 +30,7 @@ export declare class CodeWrapper extends ReactNextElement implements CodeWrapper
25
30
  */
26
31
  accessor showCopyButton: boolean | undefined;
27
32
  /**
28
- * 主题变体
33
+ * 主题变体,影响复制按钮等内部元素的样式风格。`elevo` 为 Elevo 风格
29
34
  */
30
35
  accessor themeVariant: "default" | "elevo" | undefined;
31
36
  render(): React.JSX.Element;
@@ -7,7 +7,7 @@ export interface CurrentTimeProps {
7
7
  icon?: GeneralIconProps;
8
8
  }
9
9
  /**
10
- * 构件 `eo-current-time`
10
+ * 实时当前时间展示构件,每秒自动刷新,支持自定义时间格式和前置图标。
11
11
  */
12
12
  export declare class EoCurrentTime extends ReactNextElement {
13
13
  /**
@@ -45,6 +45,7 @@ declare class Descriptions extends ReactNextElement {
45
45
  accessor showCard: boolean | undefined;
46
46
  /**
47
47
  * 列数
48
+ * @default 3
48
49
  */
49
50
  accessor column: number | undefined;
50
51
  /**
@@ -62,7 +63,7 @@ declare class Descriptions extends ReactNextElement {
62
63
  */
63
64
  accessor bordered: boolean | undefined;
64
65
  /**
65
- * 隐藏的描述列表项
66
+ * 需要隐藏的分组名称,匹配 list 项的 group 字段,支持字符串或字符串数组
66
67
  */
67
68
  accessor hideGroups: string | string[] | undefined;
68
69
  /**
@@ -22,16 +22,16 @@ export interface EoHumanizeTimeProps {
22
22
  */
23
23
  export declare class EoHumanizeTime extends ReactNextElement {
24
24
  /**
25
- * 时间截,或字符串,当为字符串时,应提供时间格式 `inputFormat`
25
+ * 时间戳(秒或毫秒,由 `isMillisecond` 决定),或时间字符串(字符串类型时应提供 `inputFormat`)
26
26
  * @required
27
27
  */
28
28
  accessor value: number | string;
29
29
  /**
30
- * 字符串的时间格式,如 "YYYY-MM-DD", [时间格式参照表](https://day.js.org/docs/en/parse/string-format)
30
+ * 字符串类型 `value` 的解析格式,如 "YYYY-MM-DD"[时间格式参照表](https://momentjs.com/docs/#/parsing/string-format/)
31
31
  */
32
32
  accessor inputFormat: string;
33
33
  /**
34
- * 展示时间格式,如 "YYYY-MM-DD",当设置该属性时,属性 `formatter` 无效 [时间格式参照表](https://day.js.org/docs/en/display/format)
34
+ * 自定义输出格式,如 "YYYY-MM-DD HH:mm:ss",设置后 `formatter` 属性无效,[时间格式参照表](https://momentjs.com/docs/#/displaying/format/)
35
35
  */
36
36
  accessor outputFormat: string;
37
37
  /**
@@ -44,23 +44,23 @@ export declare class EoHumanizeTime extends ReactNextElement {
44
44
  */
45
45
  accessor isCostTime: boolean;
46
46
  /**
47
- * 格式类型
47
+ * 格式类型,可选值:`"full"`(完整时间)、`"default"`(自动相对/完整)、`"relative"`(相对时间,支持过去和未来)、`"past"`(仅过去相对时间)、`"future"`(仅未来相对时间)、`"accurate"`(精确耗时)、`"auto"`
48
48
  *
49
- * @default "default"
49
+ * @default "auto"
50
50
  */
51
51
  accessor formatter: HumanizeTimeFormat;
52
52
  /**
53
- * value 值的单位是否为毫秒(此处属性 id 写错,实际表达意义为 isMillisecond
53
+ * 已废弃:`value` 值的单位是否为毫秒(属性名拼写有误,请改用 `isMillisecond`)
54
54
  *
55
55
  * @deprecated 请使用 `isMillisecond`
56
56
  */
57
57
  accessor isMicrosecond: boolean;
58
58
  /**
59
- * value 值的单位是否为毫秒
59
+ * `value` 值的单位是否为毫秒,默认将 `value` 视为秒级时间戳
60
60
  */
61
61
  accessor isMillisecond: boolean;
62
62
  /**
63
- * 跳转链接,默认为空
63
+ * 将时间显示为可点击链接
64
64
  */
65
65
  accessor link: LinkInfo;
66
66
  connectedCallback(): void;
@@ -5,32 +5,33 @@ import "@next-core/theme";
5
5
  import type { LinkProps } from "@next-bricks/basic/link";
6
6
  import type { GeneralIconProps } from "@next-bricks/icons/general-icon";
7
7
  /**
8
- * 信息卡片
8
+ * 信息类卡片 —— 横向布局信息卡片
9
+ * @description 展示带图标、标题、描述和详细列表的横向布局信息卡片,支持链接跳转、插槽图标、标题后缀及操作区。
9
10
  * @author dophijing
10
11
  * @category card-info
11
12
  */
12
13
  export declare class EoInfoCardItem extends ReactNextElement implements EoInfoCardItemProps {
13
14
  #private;
14
15
  /**
15
- * title
16
+ * 卡片标题
16
17
  */
17
18
  accessor cardTitle: string;
18
19
  /**
19
- * description
20
+ * 卡片描述信息
20
21
  */
21
- accessor description: string;
22
+ accessor description: string | undefined;
22
23
  /**
23
24
  * 链接地址
24
25
  */
25
26
  accessor url: string | undefined;
26
27
  /**
27
- * 图标
28
+ * 图标配置,支持设置图标、颜色、尺寸、形状和背景色
28
29
  */
29
30
  accessor cardIcon: IconAvatar | undefined;
30
31
  /**
31
- * 详细列表
32
+ * 详细列表,每项可设置标题、描述文字或自定义构件
32
33
  */
33
- accessor detailList: InfoCardDetail[];
34
+ accessor detailList: InfoCardDetail[] | undefined;
34
35
  /**
35
36
  * 链接跳转目标
36
37
  */
@@ -14,36 +14,36 @@ export interface EoLoadingStepEventsMapping {
14
14
  onClose: "close";
15
15
  }
16
16
  /**
17
- * 加载步骤框
17
+ * @description 加载步骤框。以全屏遮罩的形式展示多步骤加载进度,适用于系统初始化、批量操作等需要阻塞用户交互的场景。
18
18
  */
19
19
  export declare class EoLoadingStep extends ReactNextElement implements EoLoadingStepProps {
20
20
  #private;
21
21
  /**
22
- * 是否可见
22
+ * @description 是否可见。为 `true` 时展示全屏遮罩并锁定页面滚动,为 `false` 时隐藏遮罩并恢复滚动。
23
23
  */
24
24
  accessor visible: boolean | undefined;
25
25
  /**
26
- * 宽度
26
+ * @description 容器宽度,支持任意 CSS 宽度值(如 `"400px"`、`"50%"`)。不设置时使用默认宽度。
27
27
  */
28
28
  accessor width: string | undefined;
29
29
  /**
30
- * 步骤标题
30
+ * @description 步骤区域的标题文字,显示在步骤列表上方。
31
31
  */
32
32
  accessor stepTitle: string | undefined;
33
33
  /**
34
- * 步骤列表
34
+ * @description 步骤列表,每项包含 `title`(显示名称)和 `key`(唯一标识)。步骤按数组顺序渲染。
35
35
  */
36
36
  accessor stepList: StepItem[] | undefined;
37
37
  /**
38
- * 当前步骤
38
+ * @description 当前正在执行的步骤 `key`。key 对应的步骤显示为加载中(loading),之前的步骤显示为已完成(finished),之后的步骤显示为待执行(pending)。
39
39
  */
40
40
  accessor curStep: string | undefined;
41
41
  /**
42
- * 打开
42
+ * @description 打开加载步骤框。将 `visible` 设为 `true` 并触发 `open` 事件。
43
43
  */
44
44
  open(): void;
45
45
  /**
46
- * 关闭
46
+ * @description 关闭加载步骤框。将 `visible` 设为 `false` 并触发 `close` 事件。
47
47
  */
48
48
  close(): void;
49
49
  disconnectedCallback(): void;
@@ -36,6 +36,7 @@ export interface EoPaginationEventsMapping {
36
36
  export declare class EoPagination extends ReactNextElement implements EoPaginationProps {
37
37
  #private;
38
38
  /**
39
+ * 分页模式:`page` 为页码模式,`token` 为令牌(游标)模式
39
40
  * @default "page"
40
41
  */
41
42
  accessor type: "page" | "token" | undefined;
@@ -60,7 +61,13 @@ export declare class EoPagination extends ReactNextElement implements EoPaginati
60
61
  * @default true
61
62
  */
62
63
  accessor showSizeChanger: boolean | undefined;
64
+ /**
65
+ * 令牌模式下的下一页令牌(nextToken),有值时"下一页"按钮可点击
66
+ */
63
67
  accessor nextToken: string | undefined;
68
+ /**
69
+ * 令牌模式下的上一页令牌(previousToken),有值时"上一页"按钮可点击
70
+ */
64
71
  accessor previousToken: string | undefined;
65
72
  render(): React.JSX.Element;
66
73
  }
@@ -21,7 +21,7 @@ export interface EoStatisticsCardProps {
21
21
  * 统计卡片
22
22
  *
23
23
  * @slot titlePrefix - 标题前缀,放置辅助信息
24
- * @slot titleSuffix - 标题前缀,放置辅助信息
24
+ * @slot titleSuffix - 标题后缀,放置辅助信息
25
25
  * @slot description - 描述信息,通常是对于统计值的描述
26
26
  * @slot basicContent - 卡片右侧内容区,适合放置迷你图表,常用于小卡片
27
27
  * @slot extraContent - 卡片下方内容区,适合放置图表,用于展示更多信息的场景
@@ -42,7 +42,7 @@ export declare class EoStatisticsCard extends ReactNextElement {
42
42
  */
43
43
  accessor unit: string | undefined;
44
44
  /**
45
- * 图标
45
+ * 图标,支持 GeneralIconProps 的所有字段,额外支持 `color`(图标颜色)和 `bgColor`(背景色)
46
46
  */
47
47
  accessor icon: EoStatisticsCardProps["icon"] | undefined;
48
48
  /**
package/docs/eo-alert.md CHANGED
@@ -1,9 +1,39 @@
1
- 告警提示
1
+ ---
2
+ tagName: eo-alert
3
+ displayName: WrappedEoAlert
4
+ description: 告警提示
5
+ category: display-component
6
+ source: "@next-bricks/presentational"
7
+ ---
8
+
9
+ # eo-alert
10
+
11
+ > 告警提示
12
+
13
+ ## Props
14
+
15
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
16
+ | ------------------- | --------------------------------------------- | ---- | ------ | --------------------------------------------------------------------------------------------------------------- |
17
+ | type | `"success" \| "info" \| "warning" \| "error"` | 是 | - | 警告类型 |
18
+ | hasTitle | `boolean` | 否 | - | 是否显示标题。开启后,可以使用 `title` 插槽 |
19
+ | showIcon | `boolean` | 否 | - | 是否显示提示图标 |
20
+ | closable | `boolean` | 否 | - | 是否显示关闭按钮 |
21
+ | localStorageKey | `string` | 否 | - | 以该值和页面 url 作为命名空间,决定是否显示该警告提示。关闭后将记录到 localStorage,下次访问同一 url 时不再显示 |
22
+ | disableUrlNamespace | `boolean` | 否 | - | 仅以 `localStorageKey` 作为命名空间(不拼接页面 url),关闭后在所有页面均不再显示 |
23
+
24
+ ## Slots
25
+
26
+ | 名称 | 说明 |
27
+ | -------- | ---------------------------- |
28
+ | (默认) | 内容区 |
29
+ | title | 标题,需配合 `hasTitle` 使用 |
2
30
 
3
31
  ## Examples
4
32
 
5
33
  ### Basic
6
34
 
35
+ 展示四种警告类型(`info`、`success`、`warning`、`error`),并启用关闭按钮。
36
+
7
37
  ```yaml preview
8
38
  brick: div
9
39
  properties:
@@ -42,6 +72,8 @@ slots:
42
72
 
43
73
  ### HasTitle
44
74
 
75
+ 通过 `hasTitle` 启用标题区域,并使用 `title` 插槽放置标题内容。
76
+
45
77
  ```yaml preview
46
78
  brick: div
47
79
  properties:
@@ -110,3 +142,35 @@ slots:
110
142
  properties:
111
143
  textContent: 出错了
112
144
  ```
145
+
146
+ ### LocalStorageKey
147
+
148
+ 通过 `localStorageKey` 和 `disableUrlNamespace` 控制关闭后的持久化范围:`disableUrlNamespace` 为 `true` 时,关闭后在所有页面均不再显示;否则仅在当前 url 下不再显示。
149
+
150
+ ```yaml preview
151
+ brick: div
152
+ properties:
153
+ style:
154
+ display: flex
155
+ flex-direction: column
156
+ gap: 10px
157
+ slots:
158
+ "":
159
+ type: bricks
160
+ bricks:
161
+ - brick: eo-alert
162
+ properties:
163
+ textContent: 关闭后仅在当前页面不再显示(localStorageKey + url 命名空间)。
164
+ type: info
165
+ closable: true
166
+ showIcon: true
167
+ localStorageKey: demo-alert-url
168
+ - brick: eo-alert
169
+ properties:
170
+ textContent: 关闭后在所有页面均不再显示(仅 localStorageKey 命名空间)。
171
+ type: warning
172
+ closable: true
173
+ showIcon: true
174
+ localStorageKey: demo-alert-global
175
+ disableUrlNamespace: true
176
+ ```