@apexhub/apex-ui-react 0.0.0-stage → 1.2.0
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/LICENSE +21 -0
- package/README.md +37 -2
- package/dist/en_US.d.ts +191 -0
- package/dist/index.cjs +40692 -0
- package/dist/index.d.ts +6869 -0
- package/dist/index.mjs +40676 -0
- package/dist/llm/alert.tokens.txt +44 -0
- package/dist/llm/alert.txt +167 -0
- package/dist/llm/apex-provider.txt +368 -0
- package/dist/llm/auto-complete.tokens.txt +77 -0
- package/dist/llm/auto-complete.txt +373 -0
- package/dist/llm/avatar.tokens.txt +38 -0
- package/dist/llm/avatar.txt +199 -0
- package/dist/llm/breadcrumb.tokens.txt +193 -0
- package/dist/llm/breadcrumb.txt +251 -0
- package/dist/llm/button.tokens.txt +470 -0
- package/dist/llm/button.txt +262 -0
- package/dist/llm/card.tokens.txt +27 -0
- package/dist/llm/card.txt +95 -0
- package/dist/llm/cascader.tokens.txt +253 -0
- package/dist/llm/cascader.txt +898 -0
- package/dist/llm/checkbox.tokens.txt +28 -0
- package/dist/llm/checkbox.txt +332 -0
- package/dist/llm/collapse.tokens.txt +84 -0
- package/dist/llm/collapse.txt +330 -0
- package/dist/llm/date-picker.tokens.txt +171 -0
- package/dist/llm/date-picker.txt +424 -0
- package/dist/llm/divider.tokens.txt +22 -0
- package/dist/llm/divider.txt +161 -0
- package/dist/llm/drawer.tokens.txt +71 -0
- package/dist/llm/drawer.txt +369 -0
- package/dist/llm/dropdown.tokens.txt +59 -0
- package/dist/llm/dropdown.txt +420 -0
- package/dist/llm/form.tokens.txt +26 -0
- package/dist/llm/form.txt +341 -0
- package/dist/llm/grid.txt +419 -0
- package/dist/llm/image.tokens.txt +28 -0
- package/dist/llm/image.txt +428 -0
- package/dist/llm/input-number.tokens.txt +159 -0
- package/dist/llm/input-number.txt +486 -0
- package/dist/llm/input.tokens.txt +136 -0
- package/dist/llm/input.txt +422 -0
- package/dist/llm/layout.tokens.txt +29 -0
- package/dist/llm/layout.txt +298 -0
- package/dist/llm/menu.tokens.txt +87 -0
- package/dist/llm/menu.txt +680 -0
- package/dist/llm/message.tokens.txt +25 -0
- package/dist/llm/message.txt +301 -0
- package/dist/llm/modal.tokens.txt +96 -0
- package/dist/llm/modal.txt +584 -0
- package/dist/llm/notification.tokens.txt +79 -0
- package/dist/llm/notification.txt +383 -0
- package/dist/llm/pagination.tokens.txt +33 -0
- package/dist/llm/pagination.txt +208 -0
- package/dist/llm/popover.tokens.txt +28 -0
- package/dist/llm/popover.txt +233 -0
- package/dist/llm/progress.tokens.txt +83 -0
- package/dist/llm/progress.txt +279 -0
- package/dist/llm/radio.tokens.txt +21 -0
- package/dist/llm/radio.txt +348 -0
- package/dist/llm/rate.tokens.txt +20 -0
- package/dist/llm/rate.txt +241 -0
- package/dist/llm/select.tokens.txt +160 -0
- package/dist/llm/select.txt +830 -0
- package/dist/llm/skeleton.tokens.txt +15 -0
- package/dist/llm/skeleton.txt +275 -0
- package/dist/llm/spin.tokens.txt +21 -0
- package/dist/llm/spin.txt +294 -0
- package/dist/llm/steps.tokens.txt +30 -0
- package/dist/llm/steps.txt +300 -0
- package/dist/llm/switch.tokens.txt +38 -0
- package/dist/llm/switch.txt +216 -0
- package/dist/llm/table.tokens.txt +94 -0
- package/dist/llm/table.txt +1046 -0
- package/dist/llm/tabs.tokens.txt +78 -0
- package/dist/llm/tabs.txt +306 -0
- package/dist/llm/tag.tokens.txt +76 -0
- package/dist/llm/tag.txt +305 -0
- package/dist/llm/tooltip.tokens.txt +22 -0
- package/dist/llm/tooltip.txt +304 -0
- package/dist/llm/tree-select.tokens.txt +174 -0
- package/dist/llm/tree-select.txt +762 -0
- package/dist/llm/tree.tokens.txt +36 -0
- package/dist/llm/tree.txt +505 -0
- package/dist/llm/typography.tokens.txt +60 -0
- package/dist/llm/typography.txt +413 -0
- package/dist/llm/upload.tokens.txt +201 -0
- package/dist/llm/upload.txt +706 -0
- package/dist/llms-full.txt +16689 -0
- package/dist/llms-theme.txt +32 -0
- package/dist/llms.txt +59 -0
- package/dist/locale/en_US.cjs +160 -0
- package/dist/locale/en_US.d.ts +4 -0
- package/dist/locale/en_US.mjs +161 -0
- package/dist/locale/zh_CN.cjs +160 -0
- package/dist/locale/zh_CN.d.ts +4 -0
- package/dist/locale/zh_CN.mjs +161 -0
- package/dist/style.css +19619 -0
- package/dist/zh_CN.d.ts +191 -0
- package/llms-full.txt +16689 -0
- package/llms-theme.txt +32 -0
- package/llms.txt +59 -0
- package/package.json +118 -3
- package/src/alert/llm.txt +167 -0
- package/src/alert/tokens.txt +44 -0
- package/src/apex-provider/llm.txt +368 -0
- package/src/auto-complete/llm.txt +373 -0
- package/src/auto-complete/tokens.txt +77 -0
- package/src/avatar/llm.txt +199 -0
- package/src/avatar/tokens.txt +38 -0
- package/src/breadcrumb/llm.txt +251 -0
- package/src/breadcrumb/tokens.txt +193 -0
- package/src/button/llm.txt +262 -0
- package/src/button/tokens.txt +470 -0
- package/src/card/llm.txt +95 -0
- package/src/card/tokens.txt +27 -0
- package/src/cascader/llm.txt +898 -0
- package/src/cascader/tokens.txt +253 -0
- package/src/checkbox/llm.txt +332 -0
- package/src/checkbox/tokens.txt +28 -0
- package/src/collapse/llm.txt +330 -0
- package/src/collapse/tokens.txt +84 -0
- package/src/date-picker/llm.txt +424 -0
- package/src/date-picker/tokens.txt +171 -0
- package/src/divider/llm.txt +161 -0
- package/src/divider/tokens.txt +22 -0
- package/src/drawer/llm.txt +369 -0
- package/src/drawer/tokens.txt +71 -0
- package/src/dropdown/llm.txt +420 -0
- package/src/dropdown/tokens.txt +59 -0
- package/src/form/llm.txt +341 -0
- package/src/form/tokens.txt +26 -0
- package/src/grid/llm.txt +419 -0
- package/src/image/llm.txt +428 -0
- package/src/image/tokens.txt +28 -0
- package/src/input/llm.txt +422 -0
- package/src/input/tokens.txt +136 -0
- package/src/input-number/llm.txt +486 -0
- package/src/input-number/tokens.txt +159 -0
- package/src/layout/llm.txt +298 -0
- package/src/layout/tokens.txt +29 -0
- package/src/menu/llm.txt +680 -0
- package/src/menu/tokens.txt +87 -0
- package/src/message/llm.txt +301 -0
- package/src/message/tokens.txt +25 -0
- package/src/modal/llm.txt +584 -0
- package/src/modal/tokens.txt +96 -0
- package/src/notification/llm.txt +383 -0
- package/src/notification/tokens.txt +79 -0
- package/src/pagination/llm.txt +208 -0
- package/src/pagination/tokens.txt +33 -0
- package/src/popover/llm.txt +233 -0
- package/src/popover/tokens.txt +28 -0
- package/src/progress/llm.txt +279 -0
- package/src/progress/tokens.txt +83 -0
- package/src/radio/llm.txt +348 -0
- package/src/radio/tokens.txt +21 -0
- package/src/rate/llm.txt +241 -0
- package/src/rate/tokens.txt +20 -0
- package/src/select/llm.txt +830 -0
- package/src/select/tokens.txt +160 -0
- package/src/skeleton/llm.txt +275 -0
- package/src/skeleton/tokens.txt +15 -0
- package/src/spin/llm.txt +294 -0
- package/src/spin/tokens.txt +21 -0
- package/src/steps/llm.txt +300 -0
- package/src/steps/tokens.txt +30 -0
- package/src/switch/llm.txt +216 -0
- package/src/switch/tokens.txt +38 -0
- package/src/table/llm.txt +1046 -0
- package/src/table/tokens.txt +94 -0
- package/src/tabs/llm.txt +306 -0
- package/src/tabs/tokens.txt +78 -0
- package/src/tag/llm.txt +305 -0
- package/src/tag/tokens.txt +76 -0
- package/src/tooltip/llm.txt +304 -0
- package/src/tooltip/tokens.txt +22 -0
- package/src/tree/llm.txt +505 -0
- package/src/tree/tokens.txt +36 -0
- package/src/tree-select/llm.txt +762 -0
- package/src/tree-select/tokens.txt +174 -0
- package/src/typography/llm.txt +413 -0
- package/src/typography/tokens.txt +60 -0
- package/src/upload/llm.txt +706 -0
- package/src/upload/tokens.txt +201 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
# Notification
|
|
2
|
+
|
|
3
|
+
> Notification:操作完成后的全局反馈,需要用户注意到但不必立即处理时。
|
|
4
|
+
|
|
5
|
+
包:`@apexhub/apex-ui-react`;版本:`1.2.0`(当前源码快照,发布状态以安装包版本为准)。
|
|
6
|
+
|
|
7
|
+
公开导出:`notification`。
|
|
8
|
+
|
|
9
|
+
以下 API 属于 Apex UI;不要据 antd 的同名组件推断额外属性或默认值。默认值列的空缺表示未声明,不代表 `false`。
|
|
10
|
+
|
|
11
|
+
## 快速开始
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Button, notification } from '@apexhub/apex-ui-react'
|
|
15
|
+
|
|
16
|
+
import { useEffect } from 'react'
|
|
17
|
+
|
|
18
|
+
import '@apexhub/apex-ui-react/style.css'
|
|
19
|
+
|
|
20
|
+
export default () => {
|
|
21
|
+
useEffect(() => () => notification.destroy(), [])
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Button
|
|
25
|
+
type="primary"
|
|
26
|
+
onClick={() =>
|
|
27
|
+
notification.open({
|
|
28
|
+
title: '通知标题',
|
|
29
|
+
description: '这是一条普通通知的正文内容。',
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
>
|
|
33
|
+
打开通知
|
|
34
|
+
</Button>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 何时使用
|
|
40
|
+
|
|
41
|
+
- 操作完成后的全局反馈,需要用户注意到但不必立即处理时。
|
|
42
|
+
- 正文较长、需要标题 + 描述结构的提醒,比 Message 更适合承载多行内容时。
|
|
43
|
+
- 若只需一行轻量提示、自动消失即可,请使用 Message;若需阻断操作并等待确认,请使用 Modal。
|
|
44
|
+
|
|
45
|
+
## API
|
|
46
|
+
|
|
47
|
+
仅使用类型定义支持的属性;原生属性、ref 目标和事件签名因组件而异。关联类型用于解释字段结构;只有「导出类型」中的名称可从包根导入。
|
|
48
|
+
|
|
49
|
+
### 使用入口
|
|
50
|
+
|
|
51
|
+
通过 `notification` 使用,配置与方法见下方关联类型。
|
|
52
|
+
|
|
53
|
+
### NotificationType
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
type NotificationType = 'info' | 'success' | 'error' | 'warning'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### NotificationPlacement
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
type NotificationPlacement = | 'top'
|
|
63
|
+
| 'topLeft'
|
|
64
|
+
| 'topRight'
|
|
65
|
+
| 'bottom'
|
|
66
|
+
| 'bottomLeft'
|
|
67
|
+
| 'bottomRight'
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### NotificationOnClose
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
type NotificationOnClose = () => void
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### NotificationHandle
|
|
77
|
+
|
|
78
|
+
Notification 调用返回句柄。
|
|
79
|
+
|
|
80
|
+
| 属性 | 说明 | 类型 | 必填 | 默认值 |
|
|
81
|
+
| --- | --- | --- | --- | --- |
|
|
82
|
+
| id | 当前通知的内部标识,仅用于调试与测试断言。 | `string` | 是 | — |
|
|
83
|
+
| close | 关闭当前通知;重复调用无副作用。 | `() => void` | 是 | — |
|
|
84
|
+
|
|
85
|
+
### NotificationOpenConfig
|
|
86
|
+
|
|
87
|
+
Notification.open 配置。
|
|
88
|
+
|
|
89
|
+
| 属性 | 说明 | 类型 | 必填 | 默认值 |
|
|
90
|
+
| --- | --- | --- | --- | --- |
|
|
91
|
+
| title | 通知标题。 | `React.ReactNode` | 是 | `undefined` |
|
|
92
|
+
| description | 通知正文内容。 | `React.ReactNode` | 否 | `undefined` |
|
|
93
|
+
| duration | 自动关闭延时,单位秒;传 `0` 时不自动关闭。 | `number` | 否 | `4.5` |
|
|
94
|
+
| placement | 通知弹出位置。<br>- `top`:顶部居中<br>- `topLeft`:左上角<br>- `topRight`:右上角<br>- `bottom`:底部居中<br>- `bottomLeft`:左下角<br>- `bottomRight`:右下角 | `"top" \| "topLeft" \| "topRight" \| "bottom" \| "bottomLeft" \| "bottomRight"` | 否 | `'topRight'` |
|
|
95
|
+
| closable | 是否显示右上角关闭按钮。 | `boolean` | 否 | `true` |
|
|
96
|
+
| closeIcon | 自定义关闭图标;传 `false` / `null` 时隐藏关闭按钮。 | `React.ReactNode` | 否 | `undefined` |
|
|
97
|
+
| icon | 自定义语义图标;未传时快捷方法按类型渲染默认语义图标。 | `React.ReactNode` | 否 | `undefined` |
|
|
98
|
+
| onClose | 当前通知关闭后触发。 | `NotificationOnClose` | 否 | `undefined` |
|
|
99
|
+
| onClick | 点击当前通知时触发。 | `React.ComponentProps<'div'>['onClick']` | 否 | `undefined` |
|
|
100
|
+
| className | 当前通知根节点类名,作用于 `data-slot="notification"`。 | `React.ComponentProps<'div'>['className']` | 否 | `undefined` |
|
|
101
|
+
| style | 当前通知根节点样式;禁止硬编码色值,优先使用 CSS Token。 | `React.ComponentProps<'div'>['style']` | 否 | `undefined` |
|
|
102
|
+
|
|
103
|
+
### NotificationApi
|
|
104
|
+
|
|
105
|
+
Notification 命令式 API。
|
|
106
|
+
|
|
107
|
+
| 属性 | 说明 | 类型 | 必填 | 默认值 |
|
|
108
|
+
| --- | --- | --- | --- | --- |
|
|
109
|
+
| open | 打开一条普通通知。 | `(config: NotificationOpenConfig) => NotificationHandle` | 是 | — |
|
|
110
|
+
| success | 打开成功通知。 | `(config: NotificationOpenConfig) => NotificationHandle` | 是 | — |
|
|
111
|
+
| error | 打开错误通知。 | `(config: NotificationOpenConfig) => NotificationHandle` | 是 | — |
|
|
112
|
+
| info | 打开普通信息通知。 | `(config: NotificationOpenConfig) => NotificationHandle` | 是 | — |
|
|
113
|
+
| warning | 打开警告通知。 | `(config: NotificationOpenConfig) => NotificationHandle` | 是 | — |
|
|
114
|
+
| destroy | 关闭所有通知。 | `() => void` | 是 | — |
|
|
115
|
+
|
|
116
|
+
### 导出类型
|
|
117
|
+
|
|
118
|
+
另可从 `@apexhub/apex-ui-react` 导入:`NotificationApi`、`NotificationHandle`、`NotificationOpenConfig`、`NotificationPlacement`、`NotificationType`(与上文子类型配合使用)。
|
|
119
|
+
|
|
120
|
+
## 代码演示
|
|
121
|
+
|
|
122
|
+
### 语义类型
|
|
123
|
+
|
|
124
|
+
`notification.success` / `error` / `info` / `warning` 按类型展示对应语义图标与样式。
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
import { Button, notification } from '@apexhub/apex-ui-react'
|
|
128
|
+
|
|
129
|
+
import { useEffect } from 'react'
|
|
130
|
+
|
|
131
|
+
const rowStyle = { display: 'flex', gap: 8, flexWrap: 'wrap' as const }
|
|
132
|
+
|
|
133
|
+
export default () => {
|
|
134
|
+
useEffect(() => () => notification.destroy(), [])
|
|
135
|
+
|
|
136
|
+
return (
|
|
137
|
+
<div style={rowStyle}>
|
|
138
|
+
<Button onClick={() => notification.success({ title: '成功', description: '操作已完成' })}>
|
|
139
|
+
success
|
|
140
|
+
</Button>
|
|
141
|
+
<Button onClick={() => notification.error({ title: '错误', description: '请稍后重试' })}>
|
|
142
|
+
error
|
|
143
|
+
</Button>
|
|
144
|
+
<Button onClick={() => notification.warning({ title: '警告', description: '请注意' })}>
|
|
145
|
+
warning
|
|
146
|
+
</Button>
|
|
147
|
+
<Button onClick={() => notification.info({ title: '信息', description: '普通提示' })}>
|
|
148
|
+
info
|
|
149
|
+
</Button>
|
|
150
|
+
</div>
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### 弹出位置
|
|
156
|
+
|
|
157
|
+
通过 `placement` 指定通知出现位置,支持六个角落与上下居中。
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
import type { NotificationPlacement } from '@apexhub/apex-ui-react'
|
|
161
|
+
|
|
162
|
+
import { Button, notification } from '@apexhub/apex-ui-react'
|
|
163
|
+
|
|
164
|
+
import { useEffect } from 'react'
|
|
165
|
+
|
|
166
|
+
const gridStyle = {
|
|
167
|
+
display: 'grid',
|
|
168
|
+
gridTemplateColumns: 'repeat(3, 7.5rem)',
|
|
169
|
+
gap: 8,
|
|
170
|
+
} as const
|
|
171
|
+
|
|
172
|
+
const rows: NotificationPlacement[][] = [
|
|
173
|
+
['topLeft', 'top', 'topRight'],
|
|
174
|
+
['bottomLeft', 'bottom', 'bottomRight'],
|
|
175
|
+
]
|
|
176
|
+
|
|
177
|
+
export default () => {
|
|
178
|
+
useEffect(() => () => notification.destroy(), [])
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 8, alignItems: 'center' }}>
|
|
182
|
+
{rows.map((row) => (
|
|
183
|
+
<div key={row.join('-')} style={gridStyle}>
|
|
184
|
+
{row.map((placement) => (
|
|
185
|
+
<Button
|
|
186
|
+
key={placement}
|
|
187
|
+
style={{ width: '100%' }}
|
|
188
|
+
onClick={() =>
|
|
189
|
+
notification.open({
|
|
190
|
+
title: placement,
|
|
191
|
+
description: '位置演示',
|
|
192
|
+
placement,
|
|
193
|
+
duration: 0,
|
|
194
|
+
})
|
|
195
|
+
}
|
|
196
|
+
>
|
|
197
|
+
{placement}
|
|
198
|
+
</Button>
|
|
199
|
+
))}
|
|
200
|
+
</div>
|
|
201
|
+
))}
|
|
202
|
+
</div>
|
|
203
|
+
)
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### 自动关闭与常驻
|
|
208
|
+
|
|
209
|
+
`duration` 控制自动关闭秒数;设为 `0` 时不自动关闭,须手动关闭或调用 `destroy`。
|
|
210
|
+
|
|
211
|
+
```tsx
|
|
212
|
+
import { Button, notification } from '@apexhub/apex-ui-react'
|
|
213
|
+
|
|
214
|
+
import { useEffect } from 'react'
|
|
215
|
+
|
|
216
|
+
const rowStyle = { display: 'flex', gap: 8, flexWrap: 'wrap' as const }
|
|
217
|
+
|
|
218
|
+
export default () => {
|
|
219
|
+
useEffect(() => () => notification.destroy(), [])
|
|
220
|
+
|
|
221
|
+
return (
|
|
222
|
+
<div style={rowStyle}>
|
|
223
|
+
<Button
|
|
224
|
+
onClick={() =>
|
|
225
|
+
notification.info({
|
|
226
|
+
title: '0.5s 后关闭',
|
|
227
|
+
description: '短时通知',
|
|
228
|
+
duration: 0.5,
|
|
229
|
+
})
|
|
230
|
+
}
|
|
231
|
+
>
|
|
232
|
+
短时
|
|
233
|
+
</Button>
|
|
234
|
+
<Button
|
|
235
|
+
onClick={() =>
|
|
236
|
+
notification.info({
|
|
237
|
+
title: '常驻通知',
|
|
238
|
+
description: 'duration=0',
|
|
239
|
+
duration: 0,
|
|
240
|
+
})
|
|
241
|
+
}
|
|
242
|
+
>
|
|
243
|
+
常驻
|
|
244
|
+
</Button>
|
|
245
|
+
</div>
|
|
246
|
+
)
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### 可关闭
|
|
251
|
+
|
|
252
|
+
默认展示右上角关闭按钮;`closable` 设为 `false` 可隐藏。
|
|
253
|
+
|
|
254
|
+
```tsx
|
|
255
|
+
import { Button, notification } from '@apexhub/apex-ui-react'
|
|
256
|
+
|
|
257
|
+
import { useEffect } from 'react'
|
|
258
|
+
|
|
259
|
+
const rowStyle = { display: 'flex', gap: 8, flexWrap: 'wrap' as const }
|
|
260
|
+
|
|
261
|
+
export default () => {
|
|
262
|
+
useEffect(() => () => notification.destroy(), [])
|
|
263
|
+
|
|
264
|
+
return (
|
|
265
|
+
<div style={rowStyle}>
|
|
266
|
+
<Button
|
|
267
|
+
type="primary"
|
|
268
|
+
onClick={() =>
|
|
269
|
+
notification.info({
|
|
270
|
+
title: '可手动关闭',
|
|
271
|
+
description: '默认显示关闭按钮',
|
|
272
|
+
duration: 0,
|
|
273
|
+
})
|
|
274
|
+
}
|
|
275
|
+
>
|
|
276
|
+
带关闭
|
|
277
|
+
</Button>
|
|
278
|
+
<Button
|
|
279
|
+
onClick={() =>
|
|
280
|
+
notification.info({
|
|
281
|
+
title: '不可关闭',
|
|
282
|
+
description: 'closable=false',
|
|
283
|
+
duration: 0,
|
|
284
|
+
closable: false,
|
|
285
|
+
})
|
|
286
|
+
}
|
|
287
|
+
>
|
|
288
|
+
无关闭
|
|
289
|
+
</Button>
|
|
290
|
+
</div>
|
|
291
|
+
)
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### 句柄关闭
|
|
296
|
+
|
|
297
|
+
`notification.open()` 返回的 `NotificationHandle` 提供 `close()` 方法,可在外部主动关闭单条通知。
|
|
298
|
+
|
|
299
|
+
```tsx
|
|
300
|
+
import { Button, notification } from '@apexhub/apex-ui-react'
|
|
301
|
+
|
|
302
|
+
import { useEffect, useRef } from 'react'
|
|
303
|
+
|
|
304
|
+
const rowStyle = { display: 'flex', gap: 8, flexWrap: 'wrap' as const }
|
|
305
|
+
|
|
306
|
+
export default () => {
|
|
307
|
+
const closeRef = useRef<(() => void) | undefined>(undefined)
|
|
308
|
+
|
|
309
|
+
useEffect(() => () => notification.destroy(), [])
|
|
310
|
+
|
|
311
|
+
return (
|
|
312
|
+
<div style={rowStyle}>
|
|
313
|
+
<Button
|
|
314
|
+
type="primary"
|
|
315
|
+
onClick={() => {
|
|
316
|
+
closeRef.current = notification.warning({
|
|
317
|
+
title: '处理中',
|
|
318
|
+
description: '点击完成关闭',
|
|
319
|
+
duration: 0,
|
|
320
|
+
}).close
|
|
321
|
+
}}
|
|
322
|
+
>
|
|
323
|
+
开始
|
|
324
|
+
</Button>
|
|
325
|
+
<Button onClick={() => closeRef.current?.()}>完成</Button>
|
|
326
|
+
</div>
|
|
327
|
+
)
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### 销毁全部
|
|
332
|
+
|
|
333
|
+
`notification.destroy()` 关闭当前所有通知。
|
|
334
|
+
|
|
335
|
+
```tsx
|
|
336
|
+
import { Button, notification } from '@apexhub/apex-ui-react'
|
|
337
|
+
|
|
338
|
+
import { useEffect } from 'react'
|
|
339
|
+
|
|
340
|
+
const rowStyle = { display: 'flex', gap: 8, flexWrap: 'wrap' as const }
|
|
341
|
+
|
|
342
|
+
export default () => {
|
|
343
|
+
useEffect(() => () => notification.destroy(), [])
|
|
344
|
+
|
|
345
|
+
return (
|
|
346
|
+
<div style={rowStyle}>
|
|
347
|
+
<Button
|
|
348
|
+
type="primary"
|
|
349
|
+
onClick={() => {
|
|
350
|
+
notification.info({ title: 'A', duration: 0 })
|
|
351
|
+
notification.success({ title: 'B', duration: 0 })
|
|
352
|
+
notification.warning({ title: 'C', duration: 0 })
|
|
353
|
+
}}
|
|
354
|
+
>
|
|
355
|
+
弹出 3 条
|
|
356
|
+
</Button>
|
|
357
|
+
<Button onClick={() => notification.destroy()}>全部销毁</Button>
|
|
358
|
+
</div>
|
|
359
|
+
)
|
|
360
|
+
}
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
## DOM 结构
|
|
364
|
+
|
|
365
|
+
源码声明的静态 `data-slot`:`notification-item`、`notification`、`notification-header`、`notification-icon`、`notification-title`、`notification-close`、`notification-description`、`notification-viewport`。具体节点随模式和状态出现,不表示固定嵌套顺序。
|
|
366
|
+
|
|
367
|
+
## 样式定制
|
|
368
|
+
|
|
369
|
+
优先使用本组件公开的尺寸、类型和状态属性。换肤与变量覆盖方式见 [主题指南](../llms-theme.txt)。
|
|
370
|
+
|
|
371
|
+
需要定制具体样式时再读取 [Token 明细](./notification.tokens.txt),其中包含用途、定义值及适用作用域。常规组件使用无需加载该文件。
|
|
372
|
+
|
|
373
|
+
## FAQ
|
|
374
|
+
|
|
375
|
+
### 为什么 Notification 读不到 React 上下文?
|
|
376
|
+
|
|
377
|
+
v1 采用静态 singleton root 挂载,不经过组件树,因此无法读取 ApexProvider 等上下文。需要上下文时请等待后续 `useNotification` 能力,或改用声明式组件方案。
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
### `duration={0}` 时如何关闭?
|
|
382
|
+
|
|
383
|
+
可点击关闭按钮、调用返回句柄的 `close()`,或执行 `notification.destroy()` 关闭全部。
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Pagination Token 明细
|
|
2
|
+
|
|
3
|
+
包:`@apexhub/apex-ui-react`;版本:`1.2.0`(当前源码快照)。
|
|
4
|
+
|
|
5
|
+
按需读取:[组件用法](./pagination.txt) · [主题与覆盖规则](../llms-theme.txt)。
|
|
6
|
+
|
|
7
|
+
以下组件变量在设计 Token 源中已定义,并被组件或其共享样式使用;不包含仅在实现中声明的临时变量。用途来自实际 CSS 属性,不是对外新增的 Props。
|
|
8
|
+
|
|
9
|
+
定义值依赖所列尺寸、变体、状态和媒体作用域;Alias 引用还会随 light/dark 主题改变。它们不是统一默认值或最终计算值。作用域用于解释定义位置,不代表内部选择器是稳定的定制 API。
|
|
10
|
+
|
|
11
|
+
| Token | 用途(CSS 属性) | 定义值 | 定义作用域 |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `--pagination-button-fill-active` | `background-color`、`outline` | `var(--apex-fill-neutral-quaternary)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
14
|
+
| `--pagination-button-fill-default` | `background-color` | `var(--apex-fill-neutral-secondary)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
15
|
+
| `--pagination-button-fill-disabled` | `background-color` | `var(--apex-fill-neutral-secondary)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
16
|
+
| `--pagination-button-fill-hover` | `background-color` | `var(--apex-fill-neutral-tertiary)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
17
|
+
| `--pagination-button-icon-active` | `color` | `var(--apex-icon-neutral-primary)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
18
|
+
| `--pagination-button-icon-default` | `color` | `var(--apex-icon-neutral-secondary)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
19
|
+
| `--pagination-button-icon-disabled` | `color` | `var(--apex-icon-neutral-disabled)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
20
|
+
| `--pagination-button-icon-hover` | `color` | `var(--apex-icon-neutral-primary)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
21
|
+
| `--pagination-button-icon-icon` | `height`、`width` | `var(--apex-icon-16)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
22
|
+
| `--pagination-button-radius-radius` | `border-radius` | `var(--apex-radius-8)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
23
|
+
| `--pagination-button-spacing-height` | `height` | `var(--apex-size-28)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
24
|
+
| `--pagination-button-spacing-height` | `height` | `var(--pagination-height)` | `.apex-pagination.apex-default-pagination` |
|
|
25
|
+
| `--pagination-button-spacing-padding-x` | `padding` | `var(--apex-spacing-8)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
26
|
+
| `--pagination-button-spacing-width` | `min-width` | `var(--apex-size-28)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
27
|
+
| `--pagination-button-text-active` | `color` | `var(--apex-text-neutral-primary)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
28
|
+
| `--pagination-button-text-hover` | `color` | `var(--apex-text-neutral-primary)` | `.apex-pagination-button.apex-default-pagination-button` |
|
|
29
|
+
| `--pagination-fill-default` | `background-color` | `var(--apex-fill-neutral-secondary)` | `.apex-pagination.apex-default-pagination` |
|
|
30
|
+
| `--pagination-radius-radius` | `border-radius` | `var(--apex-radius-8)` | `.apex-pagination.apex-default-pagination` |
|
|
31
|
+
| `--pagination-spacing-gap` | `gap` | `var(--apex-spacing-4)` | `.apex-pagination.apex-default-pagination` |
|
|
32
|
+
| `--pagination-spacing-padding-x` | `padding` | `var(--apex-spacing-4)` | `.apex-pagination.apex-default-pagination` |
|
|
33
|
+
| `--pagination-spacing-padding-y` | `height`、`padding` | `var(--apex-spacing-4)` | `.apex-pagination.apex-default-pagination` |
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Pagination
|
|
2
|
+
|
|
3
|
+
> Pagination:数据量较大、需要分批次浏览列表或表格时。
|
|
4
|
+
|
|
5
|
+
包:`@apexhub/apex-ui-react`;版本:`1.2.0`(当前源码快照,发布状态以安装包版本为准)。
|
|
6
|
+
|
|
7
|
+
公开导出:`Pagination`。
|
|
8
|
+
|
|
9
|
+
以下 API 属于 Apex UI;不要据 antd 的同名组件推断额外属性或默认值。默认值列的空缺表示未声明,不代表 `false`。
|
|
10
|
+
|
|
11
|
+
## 快速开始
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Pagination } from '@apexhub/apex-ui-react'
|
|
15
|
+
|
|
16
|
+
import '@apexhub/apex-ui-react/style.css'
|
|
17
|
+
|
|
18
|
+
export default () => <Pagination total={85} defaultCurrent={1} />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 何时使用
|
|
22
|
+
|
|
23
|
+
- 数据量较大、需要分批次浏览列表或表格时。
|
|
24
|
+
- 需要让用户切换每页条数或快速跳转到指定页时。
|
|
25
|
+
- 纯滚动加载场景不必使用 Pagination;仅一页时可配合 `hideOnSinglePage` 隐藏分页器。
|
|
26
|
+
|
|
27
|
+
## API
|
|
28
|
+
|
|
29
|
+
仅使用类型定义支持的属性;原生属性、ref 目标和事件签名因组件而异。关联类型用于解释字段结构;只有「导出类型」中的名称可从包根导入。
|
|
30
|
+
|
|
31
|
+
### Pagination
|
|
32
|
+
|
|
33
|
+
| 属性 | 说明 | 类型 | 必填 | 默认值 |
|
|
34
|
+
| --- | --- | --- | --- | --- |
|
|
35
|
+
| current | 受控当前页(从 1 开始) | `number` | 否 | — |
|
|
36
|
+
| defaultCurrent | 非受控初始页 | `number` | 否 | `1` |
|
|
37
|
+
| total | 总条数 | `number` | 否 | `0` |
|
|
38
|
+
| pageSize | 受控每页条数 | `PageSize` | 否 | — |
|
|
39
|
+
| defaultPageSize | 非受控初始 pageSize | `PageSize` | 否 | `10` |
|
|
40
|
+
| onChange | 页码或 pageSize 变更回调 | `(page: number, pageSize: PageSize) => void` | 否 | — |
|
|
41
|
+
| onShowSizeChange | pageSize 变更专用回调。<br>在切换每页条数时触发,参数为变更后的当前页与新的 pageSize。 | `(current: number, size: PageSize) => void` | 否 | — |
|
|
42
|
+
| pageSizeOptions | pageSize 切换器的可选档位。 | `number[]` | 否 | `[10, 20, 50, 100]` |
|
|
43
|
+
| disabled | 整体禁用 | `boolean` | 否 | `false` |
|
|
44
|
+
| showSizeChanger | 显示 pageSize 切换器。<br>未传 → total > 50 时自动 true;显式 false → 永远关;显式 true → 永远开 | `boolean` | 否 | — |
|
|
45
|
+
| showQuickJumper | 显示快速跳转输入 | `boolean` | 否 | `false` |
|
|
46
|
+
| showTotal | 自定义总数显示函数;不传则不渲染总数区域 | `ShowTotalFn` | 否 | — |
|
|
47
|
+
| hideOnSinglePage | 总页数 ≤ 1 时不渲染整个组件 | `boolean` | 否 | `false` |
|
|
48
|
+
| itemRender | 自定义每项渲染。<br>所有可点项(prev/next/jump-prev/jump-next/page)都调用此函数。<br>业务方应用 React.cloneElement(originalElement, ...) 保留 a11y props。 | `ItemRender` | 否 | — |
|
|
49
|
+
| responsive | 开启容器宽度自适应(ResizeObserver 四档)。 | `boolean` | 否 | `false` |
|
|
50
|
+
| className | — | `string` | 否 | — |
|
|
51
|
+
| style | — | `React.CSSProperties` | 否 | — |
|
|
52
|
+
| ref | ref 指向根 <nav> 元素 | `React.Ref<HTMLElement>` | 否 | — |
|
|
53
|
+
|
|
54
|
+
### PageSize
|
|
55
|
+
|
|
56
|
+
每页条数。开放为任意正整数,配合 `pageSizeOptions` 自定义可选档位。
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
type PageSize = number
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### ShowTotalFn
|
|
63
|
+
|
|
64
|
+
showTotal prop 的函数签名
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
type ShowTotalFn = (total: number, range: [number, number]) => ReactNode
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### ItemRender
|
|
71
|
+
|
|
72
|
+
itemRender prop 的函数签名
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
type ItemRender = (page: number, type: PageItemType, originalElement: ReactNode) => ReactNode
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### PageItemType
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
type PageItemType = 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next'
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 导出类型
|
|
85
|
+
|
|
86
|
+
另可从 `@apexhub/apex-ui-react` 导入:`ItemRender`、`PageItem`、`PageSize`、`PaginationProps`、`ShowTotalFn`(与上文子类型配合使用)。
|
|
87
|
+
|
|
88
|
+
## 代码演示
|
|
89
|
+
|
|
90
|
+
### 每页条数切换
|
|
91
|
+
|
|
92
|
+
数据量较大时(默认 `total > 50`)会自动显示条数切换器,也可通过 `showSizeChanger` 强制开启或关闭。无论是否展示条数切换器或快速跳转,分页器外部高度都保持 36px;内部页码按钮与条数切换 / 快速跳转里的 Select、Input(`size="medium"` = 28px)同高,切换配置时不会引起布局跳动。
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
import { Pagination } from '@apexhub/apex-ui-react'
|
|
96
|
+
|
|
97
|
+
export default () => (
|
|
98
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
|
99
|
+
<Pagination total={100} />
|
|
100
|
+
<Pagination total={200} showSizeChanger />
|
|
101
|
+
<Pagination total={10} showSizeChanger />
|
|
102
|
+
<Pagination total={200} showSizeChanger={false} />
|
|
103
|
+
</div>
|
|
104
|
+
)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 受控用法
|
|
108
|
+
|
|
109
|
+
通过 `current` 与 `pageSize` 受控管理当前页和每页条数。
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
import type { PageSize } from '@apexhub/apex-ui-react'
|
|
113
|
+
|
|
114
|
+
import { Pagination } from '@apexhub/apex-ui-react'
|
|
115
|
+
|
|
116
|
+
import { useState } from 'react'
|
|
117
|
+
|
|
118
|
+
export default () => {
|
|
119
|
+
const [current, setCurrent] = useState(2)
|
|
120
|
+
const [pageSize, setPageSize] = useState<PageSize>(10)
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<Pagination
|
|
124
|
+
total={500}
|
|
125
|
+
current={current}
|
|
126
|
+
pageSize={pageSize}
|
|
127
|
+
showSizeChanger
|
|
128
|
+
onChange={(page, size) => {
|
|
129
|
+
setCurrent(page)
|
|
130
|
+
setPageSize(size)
|
|
131
|
+
}}
|
|
132
|
+
/>
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 快速跳转
|
|
138
|
+
|
|
139
|
+
`showQuickJumper` 展示跳转输入框,输入页码后按 Enter 跳转。
|
|
140
|
+
|
|
141
|
+
```tsx
|
|
142
|
+
import { Pagination } from '@apexhub/apex-ui-react'
|
|
143
|
+
|
|
144
|
+
import { useState } from 'react'
|
|
145
|
+
|
|
146
|
+
export default () => {
|
|
147
|
+
const [current, setCurrent] = useState(1)
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<Pagination
|
|
151
|
+
total={500}
|
|
152
|
+
current={current}
|
|
153
|
+
showQuickJumper
|
|
154
|
+
onChange={(page) => setCurrent(page)}
|
|
155
|
+
/>
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### 显示总数
|
|
161
|
+
|
|
162
|
+
`showTotal` 自定义总数展示文案,接收 `(total, range) => 自定义节点`。
|
|
163
|
+
|
|
164
|
+
```tsx
|
|
165
|
+
import { Pagination } from '@apexhub/apex-ui-react'
|
|
166
|
+
|
|
167
|
+
export default () => <Pagination total={128} showTotal={(total) => `共 ${total} 条`} />
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### 禁用
|
|
171
|
+
|
|
172
|
+
`disabled` 禁用整个分页器,所有交互不可点击。
|
|
173
|
+
|
|
174
|
+
```tsx
|
|
175
|
+
import { Pagination } from '@apexhub/apex-ui-react'
|
|
176
|
+
|
|
177
|
+
export default () => <Pagination total={50} disabled />
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## DOM 结构
|
|
181
|
+
|
|
182
|
+
源码声明的静态 `data-slot`:`pagination-button`、`pagination-size-changer`、`pagination`、`pagination-list`、`pagination-item-prev`、`pagination-item`、`pagination-item-jump-prev`、`pagination-item-jump-next`、`pagination-item-next`、`pagination-jumper`、`pagination-total`。具体节点随模式和状态出现,不表示固定嵌套顺序。
|
|
183
|
+
|
|
184
|
+
## 样式定制
|
|
185
|
+
|
|
186
|
+
优先使用本组件公开的尺寸、类型和状态属性。换肤与变量覆盖方式见 [主题指南](../llms-theme.txt)。
|
|
187
|
+
|
|
188
|
+
需要定制具体样式时再读取 [Token 明细](./pagination.tokens.txt),其中包含用途、定义值及适用作用域。常规组件使用无需加载该文件。
|
|
189
|
+
|
|
190
|
+
## FAQ
|
|
191
|
+
|
|
192
|
+
### `showSizeChanger` 不传时什么时候会出现?
|
|
193
|
+
|
|
194
|
+
未传时当 `total > 50` 自动显示条数切换器;显式传 `true` 永远显示,传 `false` 永远隐藏。
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### `itemRender` 自定义时需要注意什么?
|
|
198
|
+
|
|
199
|
+
建议用 `React.cloneElement(originalElement, ...)` 包裹默认元素,保留 `aria-current` 等无障碍属性,而非完全重写节点。
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
### `responsive` 如何工作?
|
|
203
|
+
|
|
204
|
+
开启后组件通过 ResizeObserver 监听容器宽度,按阈值自动隐藏部分控件(如窄屏隐藏 `showTotal`、更窄时隐藏条数切换器等)。默认 `false`,须显式传入 `responsive`。
|
|
205
|
+
|
|
206
|
+
### `pageSizeOptions` 可以自定义吗?
|
|
207
|
+
|
|
208
|
+
可以。通过 `pageSizeOptions` 传入 `number[]` 自定义条数切换器档位,默认 `[10, 20, 50, 100]`。`pageSize` / `defaultPageSize` 为任意正整数,可与自定义档位配合使用。
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Popover Token 明细
|
|
2
|
+
|
|
3
|
+
包:`@apexhub/apex-ui-react`;版本:`1.2.0`(当前源码快照)。
|
|
4
|
+
|
|
5
|
+
按需读取:[组件用法](./popover.txt) · [主题与覆盖规则](../llms-theme.txt)。
|
|
6
|
+
|
|
7
|
+
以下组件变量在设计 Token 源中已定义,并被组件或其共享样式使用;不包含仅在实现中声明的临时变量。用途来自实际 CSS 属性,不是对外新增的 Props。
|
|
8
|
+
|
|
9
|
+
定义值依赖所列尺寸、变体、状态和媒体作用域;Alias 引用还会随 light/dark 主题改变。它们不是统一默认值或最终计算值。作用域用于解释定义位置,不代表内部选择器是稳定的定制 API。
|
|
10
|
+
|
|
11
|
+
| Token | 用途(CSS 属性) | 定义值 | 定义作用域 |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `--popover-fill-default` | `background-color`、`fill` | `var(--apex-fill-neutral-tertiary)` | `.apex-popover.apex-default-popover` |
|
|
14
|
+
| `--popover-fill-default` | `background-color`、`fill` | `var(--apex-fill-neutral-tertiary)` | `.apex-popover.apex-error-popover` |
|
|
15
|
+
| `--popover-radius-radius` | `border-radius` | `var(--apex-radius-8)` | `.apex-popover.apex-default-popover` |
|
|
16
|
+
| `--popover-spacing-gap` | `gap` | `var(--apex-spacing-8)` | `.apex-popover.apex-default-popover` |
|
|
17
|
+
| `--popover-spacing-height-max` | `max-height` | `var(--apex-size-560)` | `.apex-popover.apex-default-popover` |
|
|
18
|
+
| `--popover-spacing-height-min` | `min-height` | `var(--apex-size-64)` | `.apex-popover.apex-default-popover` |
|
|
19
|
+
| `--popover-spacing-padding-x` | `padding` | `var(--apex-spacing-12)` | `.apex-popover.apex-default-popover` |
|
|
20
|
+
| `--popover-spacing-padding-y` | `padding` | `var(--apex-spacing-12)` | `.apex-popover.apex-default-popover` |
|
|
21
|
+
| `--popover-spacing-width-min` | `min-width` | `var(--apex-size-240)` | `.apex-popover.apex-default-popover` |
|
|
22
|
+
| `--popover-stroke-default` | `border`、`stroke` | `var(--apex-stroke-neutral-quinary)` | `.apex-popover.apex-default-popover` |
|
|
23
|
+
| `--popover-stroke-default` | `border`、`stroke` | `var(--apex-stroke-error-primary)` | `.apex-popover.apex-error-popover` |
|
|
24
|
+
| `--popover-stroke-stroke` | `border`、`margin-bottom`、`margin-top`、`stroke-width` | `var(--apex-border-08)` | `.apex-popover.apex-default-popover` |
|
|
25
|
+
| `--popover-text-body` | `color` | `var(--apex-text-neutral-secondary)` | `.apex-popover.apex-default-popover` |
|
|
26
|
+
| `--popover-text-body` | `color` | `var(--apex-text-neutral-secondary)` | `.apex-popover.apex-error-popover` |
|
|
27
|
+
| `--popover-text-title` | `color` | `var(--apex-text-neutral-primary)` | `.apex-popover.apex-default-popover` |
|
|
28
|
+
| `--popover-text-title` | `color` | `var(--apex-text-neutral-primary)` | `.apex-popover.apex-error-popover` |
|