@canvas-components/react-components 0.3.21 → 0.3.23
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/README.md +292 -292
- package/THIRD_PARTY_NOTICES.md +30 -30
- package/dist/index.cjs +32 -2
- package/dist/index.js +32 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,292 +1,292 @@
|
|
|
1
|
-
# @canvas-components/react-components
|
|
2
|
-
|
|
3
|
-
`@canvas-components/react-components` 提供一组为表格适配层和业务表单场景准备的 React 基础组件,包含输入类组件、弹层、过渡、虚拟列表、分页和图片预览等能力。
|
|
4
|
-
|
|
5
|
-
## 功能作用
|
|
6
|
-
|
|
7
|
-
- 提供统一风格的 React 基础交互组件
|
|
8
|
-
- 为 `@canvas-components/react-list-table` 提供编辑器、弹层和辅助 UI
|
|
9
|
-
- 暴露 `Popup`、`Popconfirm`、`Transition`、`VirtualList` 等可独立复用组件
|
|
10
|
-
|
|
11
|
-
## 安装方法
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
pnpm add @canvas-components/react-components react@^16.8 react-dom@^16.8
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
最低依赖版本:
|
|
18
|
-
|
|
19
|
-
- `react >= 16.8.0`
|
|
20
|
-
- `react-dom >= 16.8.0`
|
|
21
|
-
- `Node.js >= 18.12.0`
|
|
22
|
-
- `pnpm >= 9.0.0`
|
|
23
|
-
|
|
24
|
-
## 使用方法
|
|
25
|
-
|
|
26
|
-
```tsx
|
|
27
|
-
import {
|
|
28
|
-
ReactHomeOutlined,
|
|
29
|
-
ReactIcon,
|
|
30
|
-
ReactPopconfirm,
|
|
31
|
-
ReactPopup,
|
|
32
|
-
ReactTransition,
|
|
33
|
-
} from "@canvas-components/react-components";
|
|
34
|
-
|
|
35
|
-
function Demo() {
|
|
36
|
-
return (
|
|
37
|
-
<>
|
|
38
|
-
<ReactIcon name="HomeOutlined" size={20} aria-label="首页" />
|
|
39
|
-
<ReactHomeOutlined size={20} aria-hidden="true" />
|
|
40
|
-
<ReactPopconfirm
|
|
41
|
-
title="确认删除这条记录?"
|
|
42
|
-
description="删除后不可恢复"
|
|
43
|
-
onConfirm={() => console.log("confirmed")}
|
|
44
|
-
>
|
|
45
|
-
<button type="button">删除</button>
|
|
46
|
-
</ReactPopconfirm>
|
|
47
|
-
</>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### 表单组件
|
|
53
|
-
|
|
54
|
-
组件可作为受控输入使用,也可以放进普通 HTML 表单或 `ReactForm` 中。以下示例组合文本框、可搜索选择器、日期选择器、复选框、按钮和确认气泡:
|
|
55
|
-
|
|
56
|
-
```tsx
|
|
57
|
-
import { useState } from "react";
|
|
58
|
-
import {
|
|
59
|
-
ReactButton,
|
|
60
|
-
ReactCheckbox,
|
|
61
|
-
ReactDatePicker,
|
|
62
|
-
ReactFlex,
|
|
63
|
-
ReactInput,
|
|
64
|
-
ReactPopconfirm,
|
|
65
|
-
ReactSelect,
|
|
66
|
-
} from "@canvas-components/react-components";
|
|
67
|
-
|
|
68
|
-
export function ProfileForm() {
|
|
69
|
-
const [name, setName] = useState("林晨");
|
|
70
|
-
const [team, setTeam] = useState("design");
|
|
71
|
-
const [date, setDate] = useState("2026-10-18");
|
|
72
|
-
const [subscribed, setSubscribed] = useState(true);
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<form onSubmit={(event) => event.preventDefault()}>
|
|
76
|
-
<label>
|
|
77
|
-
姓名
|
|
78
|
-
<ReactInput value={name} onChange={(event) => setName(event.currentTarget.value)} />
|
|
79
|
-
</label>
|
|
80
|
-
<label>
|
|
81
|
-
团队
|
|
82
|
-
<ReactSelect
|
|
83
|
-
value={team}
|
|
84
|
-
showSearch
|
|
85
|
-
options={[
|
|
86
|
-
{ value: "design", label: "设计团队" },
|
|
87
|
-
{ value: "engineering", label: "研发团队" },
|
|
88
|
-
]}
|
|
89
|
-
onChange={setTeam}
|
|
90
|
-
/>
|
|
91
|
-
</label>
|
|
92
|
-
<ReactDatePicker value={date} onChange={setDate} />
|
|
93
|
-
<ReactCheckbox
|
|
94
|
-
checked={subscribed}
|
|
95
|
-
onChange={(event) => setSubscribed(event.currentTarget.checked)}
|
|
96
|
-
>
|
|
97
|
-
接收团队动态
|
|
98
|
-
</ReactCheckbox>
|
|
99
|
-
<ReactFlex gap={8}>
|
|
100
|
-
<ReactButton type="primary" htmlType="submit">保存</ReactButton>
|
|
101
|
-
<ReactPopconfirm title="确认删除?" onConfirm={() => setName("")}>
|
|
102
|
-
<ReactButton danger>删除</ReactButton>
|
|
103
|
-
</ReactPopconfirm>
|
|
104
|
-
</ReactFlex>
|
|
105
|
-
</form>
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
文档站「React Components」目录为每个组件提供了独立示例,包含组件用途、属性说明和可复制的 JSX 用法;图标目录也列出全部具名图标。
|
|
111
|
-
|
|
112
|
-
## 组件列表
|
|
113
|
-
|
|
114
|
-
### 表单与选择
|
|
115
|
-
|
|
116
|
-
- `ReactInput`
|
|
117
|
-
- `ReactInputNumber`
|
|
118
|
-
- `ReactInputRange`
|
|
119
|
-
- `ReactCheckbox`
|
|
120
|
-
- `ReactRadio`
|
|
121
|
-
- `ReactSelect`
|
|
122
|
-
- `ReactAutoComplete`
|
|
123
|
-
- `ReactCascader`
|
|
124
|
-
- `ReactTreeSelect`
|
|
125
|
-
- `ReactColorPicker`
|
|
126
|
-
- `ReactTextArea`
|
|
127
|
-
- `ReactForm`
|
|
128
|
-
|
|
129
|
-
`ReactInputNumber` 和 `ReactInputRange` 默认不使用鼠标滚轮调整数值;需要该行为时传入 `changeOnWheel`,例如 `<ReactInputNumber value={count} onChange={setCount} changeOnWheel />`。
|
|
130
|
-
|
|
131
|
-
### 日期时间
|
|
132
|
-
|
|
133
|
-
- `ReactDatePicker`
|
|
134
|
-
- `ReactDateRangePicker`
|
|
135
|
-
- `ReactDateTimePicker`
|
|
136
|
-
- `ReactDateTimeRangePicker`
|
|
137
|
-
- `ReactTimePicker`
|
|
138
|
-
- `ReactTimeRangePicker`
|
|
139
|
-
- `ReactMonthPicker`
|
|
140
|
-
- `ReactQuarterPicker`
|
|
141
|
-
- `ReactYearPicker`
|
|
142
|
-
|
|
143
|
-
### 弹层与反馈
|
|
144
|
-
|
|
145
|
-
- `ReactPopup`
|
|
146
|
-
- `ReactDropdown`
|
|
147
|
-
- `ReactModal`
|
|
148
|
-
- `ReactDrawer`
|
|
149
|
-
- `ReactPopconfirm`
|
|
150
|
-
- `ReactTooltip`
|
|
151
|
-
- `ReactTransition`
|
|
152
|
-
- `reactMessage`
|
|
153
|
-
|
|
154
|
-
### 展示、布局与交互
|
|
155
|
-
|
|
156
|
-
- `ReactPagination`
|
|
157
|
-
- `ReactVirtualList`
|
|
158
|
-
- `ReactWaterfall`
|
|
159
|
-
- `ReactResizablePanels`
|
|
160
|
-
- `ReactImagePreview`
|
|
161
|
-
- `ReactButton`
|
|
162
|
-
- `ReactIcon` 与 831 个 Ant Design 风格具名 SVG 图标(例如 `ReactHomeOutlined`)
|
|
163
|
-
- `ReactFlex` / `ReactRow` / `ReactCol`
|
|
164
|
-
- `ReactFilterPanel`
|
|
165
|
-
|
|
166
|
-
## 属性说明
|
|
167
|
-
|
|
168
|
-
### `ReactDropdown`
|
|
169
|
-
|
|
170
|
-
```tsx
|
|
171
|
-
<ReactDropdown
|
|
172
|
-
items={[
|
|
173
|
-
{ key: "json", label: "导出 JSON" },
|
|
174
|
-
{ key: "pdf", label: "导出 PDF", description: "实验性功能" },
|
|
175
|
-
]}
|
|
176
|
-
onSelect={(key) => exportFile(key)}
|
|
177
|
-
>
|
|
178
|
-
导出
|
|
179
|
-
</ReactDropdown>
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
`children` 可省略;只传 `icon` 时触发按钮显示居中的图标,建议同时通过 `triggerProps` 提供 `aria-label`。菜单项支持禁用、图标、说明、拖拽事件和指针进入事件。可用 `open`、`defaultOpen`、`onOpenChange` 控制展开状态;支持方向键、Home、End 和 Esc。
|
|
183
|
-
|
|
184
|
-
### `ReactPopupProps`
|
|
185
|
-
|
|
186
|
-
| 属性 | 类型 | 说明 |
|
|
187
|
-
| --- | --- | --- |
|
|
188
|
-
| `open` | `boolean` | 是否显示 |
|
|
189
|
-
| `anchorRef` | `RefObject<HTMLElement \| null>` | 锚点元素引用 |
|
|
190
|
-
| `anchorRect` | `PopupAnchorRect \| null` | 外部传入的锚点矩形 |
|
|
191
|
-
| `placement` | `"bottomLeft" \| "bottomRight" \| "topLeft" \| "topRight" \| "rightTop" \| "rightBottom" \| "leftTop" \| "leftBottom"` | 弹层位置 |
|
|
192
|
-
| `offset` | `number` | 与锚点间距 |
|
|
193
|
-
| `matchAnchorWidth` | `boolean` | 是否跟随锚点宽度 |
|
|
194
|
-
| `minWidth` | `number` | 最小宽度 |
|
|
195
|
-
| `zIndex` | `number` | 层级 |
|
|
196
|
-
| `className` | `string` | 外层类名 |
|
|
197
|
-
| `surfaceClassName` | `string` | 面板类名 |
|
|
198
|
-
| `style` | `CSSProperties` | 外层样式 |
|
|
199
|
-
| `surfaceStyle` | `CSSProperties` | 面板样式 |
|
|
200
|
-
| `onOpenChange` | `(open: boolean) => void` | 打开状态变化回调 |
|
|
201
|
-
| `children` | `ReactNode` | 弹层内容 |
|
|
202
|
-
|
|
203
|
-
### `ReactPopconfirmProps`
|
|
204
|
-
|
|
205
|
-
| 属性 | 类型 | 说明 |
|
|
206
|
-
| --- | --- | --- |
|
|
207
|
-
| `children` | `ReactNode` | 触发器内容 |
|
|
208
|
-
| `title` | `ReactNode` | 标题 |
|
|
209
|
-
| `description` | `ReactNode` | 描述文本 |
|
|
210
|
-
| `open` / `defaultOpen` | `boolean` | 受控 / 非受控打开状态 |
|
|
211
|
-
| `disabled` | `boolean` | 是否禁用 |
|
|
212
|
-
| `placement` | `ReactPopconfirmPlacement` | 弹层位置 |
|
|
213
|
-
| `offset` | `number` | 触发器与弹层间距 |
|
|
214
|
-
| `zIndex` | `number` | 层级 |
|
|
215
|
-
| `icon` | `ReactNode` | 自定义图标,传 `null` 隐藏默认图标 |
|
|
216
|
-
| `okText` / `cancelText` | `ReactNode` | 按钮文案 |
|
|
217
|
-
| `showCancel` | `boolean` | 是否显示取消按钮 |
|
|
218
|
-
| `confirmLoading` | `boolean` | 是否强制确认按钮 loading |
|
|
219
|
-
| `okButtonProps` / `cancelButtonProps` | `ReactPopconfirmButtonProps` | 按钮透传属性 |
|
|
220
|
-
| `onConfirm` | `(event) => void \| Promise<void>` | 点击确认回调,支持异步 |
|
|
221
|
-
| `onCancel` | `(event) => void` | 点击取消回调 |
|
|
222
|
-
| `onOpenChange` | `(open: boolean) => void` | 状态变化回调 |
|
|
223
|
-
| `className` / `style` | `string` / `CSSProperties` | 触发器样式 |
|
|
224
|
-
| `popupClassName` / `popupStyle` | `string` / `CSSProperties` | 弹层面板样式 |
|
|
225
|
-
|
|
226
|
-
### `ReactTransitionProps`
|
|
227
|
-
|
|
228
|
-
| 属性 | 类型 | 说明 |
|
|
229
|
-
| --- | --- | --- |
|
|
230
|
-
| `show` | `boolean` | 是否显示内容 |
|
|
231
|
-
| `name` | `string` | CSS 类名前缀 |
|
|
232
|
-
| `duration` | `number \| { enter?: number; leave?: number }` | 动画时长 |
|
|
233
|
-
| `appear` | `boolean` | 首次显示是否执行进入动画 |
|
|
234
|
-
| `children` | `(state: ReactTransitionState) => ReactNode` | 根据阶段渲染内容 |
|
|
235
|
-
|
|
236
|
-
### `ReactVirtualListProps<Item>`
|
|
237
|
-
|
|
238
|
-
| 属性 | 类型 | 说明 |
|
|
239
|
-
| --- | --- | --- |
|
|
240
|
-
| `items` | `Item[]` | 数据列表 |
|
|
241
|
-
| `height` | `number` | 视口高度 |
|
|
242
|
-
| `itemHeight` | `number` | 固定项高度 |
|
|
243
|
-
| `overscan` | `number` | 预渲染项数 |
|
|
244
|
-
| `renderItem` | `(item, index, meta) => ReactNode` | 渲染函数 |
|
|
245
|
-
| `itemKey` | `(item, index) => string \| number` | 列表 key |
|
|
246
|
-
|
|
247
|
-
## 方法说明
|
|
248
|
-
|
|
249
|
-
### `ReactTransition`
|
|
250
|
-
|
|
251
|
-
| 导出 | 说明 |
|
|
252
|
-
| --- | --- |
|
|
253
|
-
| `ReactTransition` | 无包装过渡组件,离场动画结束后自动卸载 |
|
|
254
|
-
| `useReactTransition` | 获取 Vue 风格过渡阶段和 className |
|
|
255
|
-
|
|
256
|
-
### `ReactVirtualListRef`
|
|
257
|
-
|
|
258
|
-
| 方法 | 说明 |
|
|
259
|
-
| --- | --- |
|
|
260
|
-
| `scrollTo` | 滚动到指定位置 |
|
|
261
|
-
| `scrollToIndex` | 滚动到指定索引 |
|
|
262
|
-
|
|
263
|
-
## 其他导出
|
|
264
|
-
|
|
265
|
-
| 导出 | 说明 |
|
|
266
|
-
| --- | --- |
|
|
267
|
-
| `ReactContentScaleProvider` / `useReactContentScale` | 内容缩放上下文 |
|
|
268
|
-
| `REACT_COMPONENT_PREFIX` | 统一类名前缀 |
|
|
269
|
-
|
|
270
|
-
## 说明
|
|
271
|
-
|
|
272
|
-
这个包的导出面比较大,输入类组件大多保持接近原生表单语义;如果需要精确字段,请优先查看对应组件的 `Props` 类型定义。
|
|
273
|
-
|
|
274
|
-
图标组件使用包内自包含的 SVG 路径数据,不需要安装 Ant Design 或图标数据包。图标名称、尺寸、颜色、旋转和加载动画由 `ReactIconProps` 提供;也可以直接使用 `ReactHomeOutlined` 等具名组件。SVG 路径数据的上游许可和版权信息见随包发布的 `THIRD_PARTY_NOTICES.md`。
|
|
275
|
-
|
|
276
|
-
### 通用折叠面板
|
|
277
|
-
|
|
278
|
-
`ReactCollapsePanel` 使用现有方向图标,支持鼠标及 Enter / 空格展开折叠。折叠时保留内容节点和输入草稿。
|
|
279
|
-
|
|
280
|
-
```tsx
|
|
281
|
-
<ReactCollapsePanel title="位置与尺寸" defaultOpen>
|
|
282
|
-
<ReactInput placeholder="输入名称" />
|
|
283
|
-
</ReactCollapsePanel>
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
通过 `open` 与 `onOpenChange` 控制展开状态;`disabled` 禁止切换,`contentClassName` 可定制内容区样式。默认收起。
|
|
287
|
-
|
|
288
|
-
### 通用拖拽排序
|
|
289
|
-
|
|
290
|
-
`ReactSortableList` 统一提供与 ListTable 工具栏列排序一致的浮动行、实时让位动画、边缘自动滚动和全屏浮层。通过 `items`(包含 `key`、`parentKey`、`label`)、`renderItem(item, handleProps)` 和 `onOrderChange(parentKey, orderedKeys)` 接入;把 `handleProps` 传给使用现有图标的拖拽手柄。`scrollContainerRef` 指向滚动容器,`disabled` 禁止拖拽,`dragThreshold` 默认 4px。Esc、失焦和指针取消会丢弃排序,放下才提交一次顺序。后续拖拽排序统一复用此组件。
|
|
291
|
-
|
|
292
|
-
大量节点可传入 `virtual={{ height: 360, itemHeight: 34, overscan: 6 }}` 启用固定行高虚拟列表;组件使用内部滚动容器自动滚动,拖拽命中按完整列表计算,包含尚未挂载的节点。
|
|
1
|
+
# @canvas-components/react-components
|
|
2
|
+
|
|
3
|
+
`@canvas-components/react-components` 提供一组为表格适配层和业务表单场景准备的 React 基础组件,包含输入类组件、弹层、过渡、虚拟列表、分页和图片预览等能力。
|
|
4
|
+
|
|
5
|
+
## 功能作用
|
|
6
|
+
|
|
7
|
+
- 提供统一风格的 React 基础交互组件
|
|
8
|
+
- 为 `@canvas-components/react-list-table` 提供编辑器、弹层和辅助 UI
|
|
9
|
+
- 暴露 `Popup`、`Popconfirm`、`Transition`、`VirtualList` 等可独立复用组件
|
|
10
|
+
|
|
11
|
+
## 安装方法
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add @canvas-components/react-components react@^16.8 react-dom@^16.8
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
最低依赖版本:
|
|
18
|
+
|
|
19
|
+
- `react >= 16.8.0`
|
|
20
|
+
- `react-dom >= 16.8.0`
|
|
21
|
+
- `Node.js >= 18.12.0`
|
|
22
|
+
- `pnpm >= 9.0.0`
|
|
23
|
+
|
|
24
|
+
## 使用方法
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import {
|
|
28
|
+
ReactHomeOutlined,
|
|
29
|
+
ReactIcon,
|
|
30
|
+
ReactPopconfirm,
|
|
31
|
+
ReactPopup,
|
|
32
|
+
ReactTransition,
|
|
33
|
+
} from "@canvas-components/react-components";
|
|
34
|
+
|
|
35
|
+
function Demo() {
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
<ReactIcon name="HomeOutlined" size={20} aria-label="首页" />
|
|
39
|
+
<ReactHomeOutlined size={20} aria-hidden="true" />
|
|
40
|
+
<ReactPopconfirm
|
|
41
|
+
title="确认删除这条记录?"
|
|
42
|
+
description="删除后不可恢复"
|
|
43
|
+
onConfirm={() => console.log("confirmed")}
|
|
44
|
+
>
|
|
45
|
+
<button type="button">删除</button>
|
|
46
|
+
</ReactPopconfirm>
|
|
47
|
+
</>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 表单组件
|
|
53
|
+
|
|
54
|
+
组件可作为受控输入使用,也可以放进普通 HTML 表单或 `ReactForm` 中。以下示例组合文本框、可搜索选择器、日期选择器、复选框、按钮和确认气泡:
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
import { useState } from "react";
|
|
58
|
+
import {
|
|
59
|
+
ReactButton,
|
|
60
|
+
ReactCheckbox,
|
|
61
|
+
ReactDatePicker,
|
|
62
|
+
ReactFlex,
|
|
63
|
+
ReactInput,
|
|
64
|
+
ReactPopconfirm,
|
|
65
|
+
ReactSelect,
|
|
66
|
+
} from "@canvas-components/react-components";
|
|
67
|
+
|
|
68
|
+
export function ProfileForm() {
|
|
69
|
+
const [name, setName] = useState("林晨");
|
|
70
|
+
const [team, setTeam] = useState("design");
|
|
71
|
+
const [date, setDate] = useState("2026-10-18");
|
|
72
|
+
const [subscribed, setSubscribed] = useState(true);
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<form onSubmit={(event) => event.preventDefault()}>
|
|
76
|
+
<label>
|
|
77
|
+
姓名
|
|
78
|
+
<ReactInput value={name} onChange={(event) => setName(event.currentTarget.value)} />
|
|
79
|
+
</label>
|
|
80
|
+
<label>
|
|
81
|
+
团队
|
|
82
|
+
<ReactSelect
|
|
83
|
+
value={team}
|
|
84
|
+
showSearch
|
|
85
|
+
options={[
|
|
86
|
+
{ value: "design", label: "设计团队" },
|
|
87
|
+
{ value: "engineering", label: "研发团队" },
|
|
88
|
+
]}
|
|
89
|
+
onChange={setTeam}
|
|
90
|
+
/>
|
|
91
|
+
</label>
|
|
92
|
+
<ReactDatePicker value={date} onChange={setDate} />
|
|
93
|
+
<ReactCheckbox
|
|
94
|
+
checked={subscribed}
|
|
95
|
+
onChange={(event) => setSubscribed(event.currentTarget.checked)}
|
|
96
|
+
>
|
|
97
|
+
接收团队动态
|
|
98
|
+
</ReactCheckbox>
|
|
99
|
+
<ReactFlex gap={8}>
|
|
100
|
+
<ReactButton type="primary" htmlType="submit">保存</ReactButton>
|
|
101
|
+
<ReactPopconfirm title="确认删除?" onConfirm={() => setName("")}>
|
|
102
|
+
<ReactButton danger>删除</ReactButton>
|
|
103
|
+
</ReactPopconfirm>
|
|
104
|
+
</ReactFlex>
|
|
105
|
+
</form>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
文档站「React Components」目录为每个组件提供了独立示例,包含组件用途、属性说明和可复制的 JSX 用法;图标目录也列出全部具名图标。
|
|
111
|
+
|
|
112
|
+
## 组件列表
|
|
113
|
+
|
|
114
|
+
### 表单与选择
|
|
115
|
+
|
|
116
|
+
- `ReactInput`
|
|
117
|
+
- `ReactInputNumber`
|
|
118
|
+
- `ReactInputRange`
|
|
119
|
+
- `ReactCheckbox`
|
|
120
|
+
- `ReactRadio`
|
|
121
|
+
- `ReactSelect`
|
|
122
|
+
- `ReactAutoComplete`
|
|
123
|
+
- `ReactCascader`
|
|
124
|
+
- `ReactTreeSelect`
|
|
125
|
+
- `ReactColorPicker`
|
|
126
|
+
- `ReactTextArea`
|
|
127
|
+
- `ReactForm`
|
|
128
|
+
|
|
129
|
+
`ReactInputNumber` 和 `ReactInputRange` 默认不使用鼠标滚轮调整数值;需要该行为时传入 `changeOnWheel`,例如 `<ReactInputNumber value={count} onChange={setCount} changeOnWheel />`。
|
|
130
|
+
|
|
131
|
+
### 日期时间
|
|
132
|
+
|
|
133
|
+
- `ReactDatePicker`
|
|
134
|
+
- `ReactDateRangePicker`
|
|
135
|
+
- `ReactDateTimePicker`
|
|
136
|
+
- `ReactDateTimeRangePicker`
|
|
137
|
+
- `ReactTimePicker`
|
|
138
|
+
- `ReactTimeRangePicker`
|
|
139
|
+
- `ReactMonthPicker`
|
|
140
|
+
- `ReactQuarterPicker`
|
|
141
|
+
- `ReactYearPicker`
|
|
142
|
+
|
|
143
|
+
### 弹层与反馈
|
|
144
|
+
|
|
145
|
+
- `ReactPopup`
|
|
146
|
+
- `ReactDropdown`
|
|
147
|
+
- `ReactModal`
|
|
148
|
+
- `ReactDrawer`
|
|
149
|
+
- `ReactPopconfirm`
|
|
150
|
+
- `ReactTooltip`
|
|
151
|
+
- `ReactTransition`
|
|
152
|
+
- `reactMessage`
|
|
153
|
+
|
|
154
|
+
### 展示、布局与交互
|
|
155
|
+
|
|
156
|
+
- `ReactPagination`
|
|
157
|
+
- `ReactVirtualList`
|
|
158
|
+
- `ReactWaterfall`
|
|
159
|
+
- `ReactResizablePanels`
|
|
160
|
+
- `ReactImagePreview`
|
|
161
|
+
- `ReactButton`
|
|
162
|
+
- `ReactIcon` 与 831 个 Ant Design 风格具名 SVG 图标(例如 `ReactHomeOutlined`)
|
|
163
|
+
- `ReactFlex` / `ReactRow` / `ReactCol`
|
|
164
|
+
- `ReactFilterPanel`
|
|
165
|
+
|
|
166
|
+
## 属性说明
|
|
167
|
+
|
|
168
|
+
### `ReactDropdown`
|
|
169
|
+
|
|
170
|
+
```tsx
|
|
171
|
+
<ReactDropdown
|
|
172
|
+
items={[
|
|
173
|
+
{ key: "json", label: "导出 JSON" },
|
|
174
|
+
{ key: "pdf", label: "导出 PDF", description: "实验性功能" },
|
|
175
|
+
]}
|
|
176
|
+
onSelect={(key) => exportFile(key)}
|
|
177
|
+
>
|
|
178
|
+
导出
|
|
179
|
+
</ReactDropdown>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
`children` 可省略;只传 `icon` 时触发按钮显示居中的图标,建议同时通过 `triggerProps` 提供 `aria-label`。菜单项支持禁用、图标、说明、拖拽事件和指针进入事件。可用 `open`、`defaultOpen`、`onOpenChange` 控制展开状态;支持方向键、Home、End 和 Esc。
|
|
183
|
+
|
|
184
|
+
### `ReactPopupProps`
|
|
185
|
+
|
|
186
|
+
| 属性 | 类型 | 说明 |
|
|
187
|
+
| --- | --- | --- |
|
|
188
|
+
| `open` | `boolean` | 是否显示 |
|
|
189
|
+
| `anchorRef` | `RefObject<HTMLElement \| null>` | 锚点元素引用 |
|
|
190
|
+
| `anchorRect` | `PopupAnchorRect \| null` | 外部传入的锚点矩形 |
|
|
191
|
+
| `placement` | `"bottomLeft" \| "bottomRight" \| "topLeft" \| "topRight" \| "rightTop" \| "rightBottom" \| "leftTop" \| "leftBottom"` | 弹层位置 |
|
|
192
|
+
| `offset` | `number` | 与锚点间距 |
|
|
193
|
+
| `matchAnchorWidth` | `boolean` | 是否跟随锚点宽度 |
|
|
194
|
+
| `minWidth` | `number` | 最小宽度 |
|
|
195
|
+
| `zIndex` | `number` | 层级 |
|
|
196
|
+
| `className` | `string` | 外层类名 |
|
|
197
|
+
| `surfaceClassName` | `string` | 面板类名 |
|
|
198
|
+
| `style` | `CSSProperties` | 外层样式 |
|
|
199
|
+
| `surfaceStyle` | `CSSProperties` | 面板样式 |
|
|
200
|
+
| `onOpenChange` | `(open: boolean) => void` | 打开状态变化回调 |
|
|
201
|
+
| `children` | `ReactNode` | 弹层内容 |
|
|
202
|
+
|
|
203
|
+
### `ReactPopconfirmProps`
|
|
204
|
+
|
|
205
|
+
| 属性 | 类型 | 说明 |
|
|
206
|
+
| --- | --- | --- |
|
|
207
|
+
| `children` | `ReactNode` | 触发器内容 |
|
|
208
|
+
| `title` | `ReactNode` | 标题 |
|
|
209
|
+
| `description` | `ReactNode` | 描述文本 |
|
|
210
|
+
| `open` / `defaultOpen` | `boolean` | 受控 / 非受控打开状态 |
|
|
211
|
+
| `disabled` | `boolean` | 是否禁用 |
|
|
212
|
+
| `placement` | `ReactPopconfirmPlacement` | 弹层位置 |
|
|
213
|
+
| `offset` | `number` | 触发器与弹层间距 |
|
|
214
|
+
| `zIndex` | `number` | 层级 |
|
|
215
|
+
| `icon` | `ReactNode` | 自定义图标,传 `null` 隐藏默认图标 |
|
|
216
|
+
| `okText` / `cancelText` | `ReactNode` | 按钮文案 |
|
|
217
|
+
| `showCancel` | `boolean` | 是否显示取消按钮 |
|
|
218
|
+
| `confirmLoading` | `boolean` | 是否强制确认按钮 loading |
|
|
219
|
+
| `okButtonProps` / `cancelButtonProps` | `ReactPopconfirmButtonProps` | 按钮透传属性 |
|
|
220
|
+
| `onConfirm` | `(event) => void \| Promise<void>` | 点击确认回调,支持异步 |
|
|
221
|
+
| `onCancel` | `(event) => void` | 点击取消回调 |
|
|
222
|
+
| `onOpenChange` | `(open: boolean) => void` | 状态变化回调 |
|
|
223
|
+
| `className` / `style` | `string` / `CSSProperties` | 触发器样式 |
|
|
224
|
+
| `popupClassName` / `popupStyle` | `string` / `CSSProperties` | 弹层面板样式 |
|
|
225
|
+
|
|
226
|
+
### `ReactTransitionProps`
|
|
227
|
+
|
|
228
|
+
| 属性 | 类型 | 说明 |
|
|
229
|
+
| --- | --- | --- |
|
|
230
|
+
| `show` | `boolean` | 是否显示内容 |
|
|
231
|
+
| `name` | `string` | CSS 类名前缀 |
|
|
232
|
+
| `duration` | `number \| { enter?: number; leave?: number }` | 动画时长 |
|
|
233
|
+
| `appear` | `boolean` | 首次显示是否执行进入动画 |
|
|
234
|
+
| `children` | `(state: ReactTransitionState) => ReactNode` | 根据阶段渲染内容 |
|
|
235
|
+
|
|
236
|
+
### `ReactVirtualListProps<Item>`
|
|
237
|
+
|
|
238
|
+
| 属性 | 类型 | 说明 |
|
|
239
|
+
| --- | --- | --- |
|
|
240
|
+
| `items` | `Item[]` | 数据列表 |
|
|
241
|
+
| `height` | `number` | 视口高度 |
|
|
242
|
+
| `itemHeight` | `number` | 固定项高度 |
|
|
243
|
+
| `overscan` | `number` | 预渲染项数 |
|
|
244
|
+
| `renderItem` | `(item, index, meta) => ReactNode` | 渲染函数 |
|
|
245
|
+
| `itemKey` | `(item, index) => string \| number` | 列表 key |
|
|
246
|
+
|
|
247
|
+
## 方法说明
|
|
248
|
+
|
|
249
|
+
### `ReactTransition`
|
|
250
|
+
|
|
251
|
+
| 导出 | 说明 |
|
|
252
|
+
| --- | --- |
|
|
253
|
+
| `ReactTransition` | 无包装过渡组件,离场动画结束后自动卸载 |
|
|
254
|
+
| `useReactTransition` | 获取 Vue 风格过渡阶段和 className |
|
|
255
|
+
|
|
256
|
+
### `ReactVirtualListRef`
|
|
257
|
+
|
|
258
|
+
| 方法 | 说明 |
|
|
259
|
+
| --- | --- |
|
|
260
|
+
| `scrollTo` | 滚动到指定位置 |
|
|
261
|
+
| `scrollToIndex` | 滚动到指定索引 |
|
|
262
|
+
|
|
263
|
+
## 其他导出
|
|
264
|
+
|
|
265
|
+
| 导出 | 说明 |
|
|
266
|
+
| --- | --- |
|
|
267
|
+
| `ReactContentScaleProvider` / `useReactContentScale` | 内容缩放上下文 |
|
|
268
|
+
| `REACT_COMPONENT_PREFIX` | 统一类名前缀 |
|
|
269
|
+
|
|
270
|
+
## 说明
|
|
271
|
+
|
|
272
|
+
这个包的导出面比较大,输入类组件大多保持接近原生表单语义;如果需要精确字段,请优先查看对应组件的 `Props` 类型定义。
|
|
273
|
+
|
|
274
|
+
图标组件使用包内自包含的 SVG 路径数据,不需要安装 Ant Design 或图标数据包。图标名称、尺寸、颜色、旋转和加载动画由 `ReactIconProps` 提供;也可以直接使用 `ReactHomeOutlined` 等具名组件。SVG 路径数据的上游许可和版权信息见随包发布的 `THIRD_PARTY_NOTICES.md`。
|
|
275
|
+
|
|
276
|
+
### 通用折叠面板
|
|
277
|
+
|
|
278
|
+
`ReactCollapsePanel` 使用现有方向图标,支持鼠标及 Enter / 空格展开折叠。折叠时保留内容节点和输入草稿。
|
|
279
|
+
|
|
280
|
+
```tsx
|
|
281
|
+
<ReactCollapsePanel title="位置与尺寸" defaultOpen>
|
|
282
|
+
<ReactInput placeholder="输入名称" />
|
|
283
|
+
</ReactCollapsePanel>
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
通过 `open` 与 `onOpenChange` 控制展开状态;`disabled` 禁止切换,`contentClassName` 可定制内容区样式。默认收起。
|
|
287
|
+
|
|
288
|
+
### 通用拖拽排序
|
|
289
|
+
|
|
290
|
+
`ReactSortableList` 统一提供与 ListTable 工具栏列排序一致的浮动行、实时让位动画、边缘自动滚动和全屏浮层。通过 `items`(包含 `key`、`parentKey`、`label`)、`renderItem(item, handleProps)` 和 `onOrderChange(parentKey, orderedKeys)` 接入;把 `handleProps` 传给使用现有图标的拖拽手柄。`scrollContainerRef` 指向滚动容器,`disabled` 禁止拖拽,`dragThreshold` 默认 4px。Esc、失焦和指针取消会丢弃排序,放下才提交一次顺序。后续拖拽排序统一复用此组件。
|
|
291
|
+
|
|
292
|
+
大量节点可传入 `virtual={{ height: 360, itemHeight: 34, overscan: 6 }}` 启用固定行高虚拟列表;组件使用内部滚动容器自动滚动,拖拽命中按完整列表计算,包含尚未挂载的节点。
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# 第三方版权声明
|
|
2
|
-
|
|
3
|
-
## Ant Design Icons
|
|
4
|
-
|
|
5
|
-
本包通过 `@canvas-components/icons` 使用 Ant Design Icons 项目的 SVG 图标路径数据。许可声明随共享图标包发布。
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
MIT LICENSE
|
|
9
|
-
|
|
10
|
-
Copyright (c) 2018-present Ant UED, https://xtech.antfin.com/
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
13
|
-
a copy of this software and associated documentation files (the
|
|
14
|
-
"Software"), to deal in the Software without restriction, including
|
|
15
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
16
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
17
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
18
|
-
the following conditions:
|
|
19
|
-
|
|
20
|
-
The above copyright notice and this permission notice shall be
|
|
21
|
-
included in all copies or substantial portions of the Software.
|
|
22
|
-
|
|
23
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
24
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
25
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
26
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
27
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
28
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
29
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
30
|
-
```
|
|
1
|
+
# 第三方版权声明
|
|
2
|
+
|
|
3
|
+
## Ant Design Icons
|
|
4
|
+
|
|
5
|
+
本包通过 `@canvas-components/icons` 使用 Ant Design Icons 项目的 SVG 图标路径数据。许可声明随共享图标包发布。
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
MIT LICENSE
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2018-present Ant UED, https://xtech.antfin.com/
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
13
|
+
a copy of this software and associated documentation files (the
|
|
14
|
+
"Software"), to deal in the Software without restriction, including
|
|
15
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
16
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
17
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
18
|
+
the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be
|
|
21
|
+
included in all copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
24
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
25
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
26
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
27
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
28
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
29
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
30
|
+
```
|
package/dist/index.cjs
CHANGED
|
@@ -2583,6 +2583,17 @@ function ReactFilterPanel(props) {
|
|
|
2583
2583
|
const [tab, setTab] = React.useState(resolveTab(request?.value));
|
|
2584
2584
|
const [options, setOptions] = React.useState(request?.options ?? []);
|
|
2585
2585
|
const [loading, setLoading] = React.useState(Boolean(request?.loadOptions));
|
|
2586
|
+
const pendingApplyRef = React.useRef(null);
|
|
2587
|
+
const applyFrameRef = React.useRef(null);
|
|
2588
|
+
const applyTimerRef = React.useRef(null);
|
|
2589
|
+
const cancelPendingApply = () => {
|
|
2590
|
+
if (applyFrameRef.current !== null) cancelAnimationFrame(applyFrameRef.current);
|
|
2591
|
+
if (applyTimerRef.current !== null) clearTimeout(applyTimerRef.current);
|
|
2592
|
+
applyFrameRef.current = null;
|
|
2593
|
+
applyTimerRef.current = null;
|
|
2594
|
+
pendingApplyRef.current = null;
|
|
2595
|
+
};
|
|
2596
|
+
React.useEffect(() => cancelPendingApply, [request]);
|
|
2586
2597
|
const conditionListRef = React.useRef(null);
|
|
2587
2598
|
const [conditionListOverflowing, setConditionListOverflowing] = React.useState(false);
|
|
2588
2599
|
React.useEffect(() => {
|
|
@@ -2657,12 +2668,30 @@ function ReactFilterPanel(props) {
|
|
|
2657
2668
|
keys.forEach((key) => checked ? next.add(key) : next.delete(key));
|
|
2658
2669
|
const value = { ...draft, filterType: "value", selectedKeys: Array.from(next) };
|
|
2659
2670
|
setDraft(value);
|
|
2660
|
-
|
|
2671
|
+
cancelPendingApply();
|
|
2672
|
+
if (applyImmediately && request.filterOptionImmediateApply) {
|
|
2673
|
+
pendingApplyRef.current = () => request.onApply(value);
|
|
2674
|
+
applyFrameRef.current = requestAnimationFrame(() => {
|
|
2675
|
+
applyFrameRef.current = null;
|
|
2676
|
+
applyTimerRef.current = setTimeout(() => {
|
|
2677
|
+
const pending = pendingApplyRef.current;
|
|
2678
|
+
cancelPendingApply();
|
|
2679
|
+
pending?.();
|
|
2680
|
+
}, 0);
|
|
2681
|
+
});
|
|
2682
|
+
}
|
|
2661
2683
|
};
|
|
2662
2684
|
const apply = () => {
|
|
2685
|
+
cancelPendingApply();
|
|
2663
2686
|
request.onApply({ ...draft, filterType: tab });
|
|
2664
2687
|
request.onClose();
|
|
2665
2688
|
};
|
|
2689
|
+
const close = () => {
|
|
2690
|
+
const pending = pendingApplyRef.current;
|
|
2691
|
+
cancelPendingApply();
|
|
2692
|
+
pending?.();
|
|
2693
|
+
request.onClose();
|
|
2694
|
+
};
|
|
2666
2695
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2667
2696
|
ReactPopup,
|
|
2668
2697
|
{
|
|
@@ -2672,7 +2701,7 @@ function ReactFilterPanel(props) {
|
|
|
2672
2701
|
matchAnchorWidth: false,
|
|
2673
2702
|
minWidth: 300,
|
|
2674
2703
|
onOpenChange: (open) => {
|
|
2675
|
-
if (!open)
|
|
2704
|
+
if (!open) close();
|
|
2676
2705
|
},
|
|
2677
2706
|
surfaceStyle: { width: 300, height: 460, padding: 12, overflow: "hidden", boxSizing: "border-box" },
|
|
2678
2707
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { height: "100%", display: "flex", flexDirection: "column", minHeight: 0 }, children: [
|
|
@@ -2809,6 +2838,7 @@ function ReactFilterPanel(props) {
|
|
|
2809
2838
|
) : null,
|
|
2810
2839
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "react-filter-panel-footer-actions", style: footerActionsStyle, children: [
|
|
2811
2840
|
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", style: actionStyle(false), onClick: () => {
|
|
2841
|
+
cancelPendingApply();
|
|
2812
2842
|
request.onReset();
|
|
2813
2843
|
request.onClose();
|
|
2814
2844
|
}, children: request.texts.resetAction }),
|
package/dist/index.js
CHANGED
|
@@ -2562,6 +2562,17 @@ function ReactFilterPanel(props) {
|
|
|
2562
2562
|
const [tab, setTab] = useState(resolveTab(request?.value));
|
|
2563
2563
|
const [options, setOptions] = useState(request?.options ?? []);
|
|
2564
2564
|
const [loading, setLoading] = useState(Boolean(request?.loadOptions));
|
|
2565
|
+
const pendingApplyRef = useRef(null);
|
|
2566
|
+
const applyFrameRef = useRef(null);
|
|
2567
|
+
const applyTimerRef = useRef(null);
|
|
2568
|
+
const cancelPendingApply = () => {
|
|
2569
|
+
if (applyFrameRef.current !== null) cancelAnimationFrame(applyFrameRef.current);
|
|
2570
|
+
if (applyTimerRef.current !== null) clearTimeout(applyTimerRef.current);
|
|
2571
|
+
applyFrameRef.current = null;
|
|
2572
|
+
applyTimerRef.current = null;
|
|
2573
|
+
pendingApplyRef.current = null;
|
|
2574
|
+
};
|
|
2575
|
+
useEffect(() => cancelPendingApply, [request]);
|
|
2565
2576
|
const conditionListRef = useRef(null);
|
|
2566
2577
|
const [conditionListOverflowing, setConditionListOverflowing] = useState(false);
|
|
2567
2578
|
useEffect(() => {
|
|
@@ -2636,12 +2647,30 @@ function ReactFilterPanel(props) {
|
|
|
2636
2647
|
keys.forEach((key) => checked ? next.add(key) : next.delete(key));
|
|
2637
2648
|
const value = { ...draft, filterType: "value", selectedKeys: Array.from(next) };
|
|
2638
2649
|
setDraft(value);
|
|
2639
|
-
|
|
2650
|
+
cancelPendingApply();
|
|
2651
|
+
if (applyImmediately && request.filterOptionImmediateApply) {
|
|
2652
|
+
pendingApplyRef.current = () => request.onApply(value);
|
|
2653
|
+
applyFrameRef.current = requestAnimationFrame(() => {
|
|
2654
|
+
applyFrameRef.current = null;
|
|
2655
|
+
applyTimerRef.current = setTimeout(() => {
|
|
2656
|
+
const pending = pendingApplyRef.current;
|
|
2657
|
+
cancelPendingApply();
|
|
2658
|
+
pending?.();
|
|
2659
|
+
}, 0);
|
|
2660
|
+
});
|
|
2661
|
+
}
|
|
2640
2662
|
};
|
|
2641
2663
|
const apply = () => {
|
|
2664
|
+
cancelPendingApply();
|
|
2642
2665
|
request.onApply({ ...draft, filterType: tab });
|
|
2643
2666
|
request.onClose();
|
|
2644
2667
|
};
|
|
2668
|
+
const close = () => {
|
|
2669
|
+
const pending = pendingApplyRef.current;
|
|
2670
|
+
cancelPendingApply();
|
|
2671
|
+
pending?.();
|
|
2672
|
+
request.onClose();
|
|
2673
|
+
};
|
|
2645
2674
|
return /* @__PURE__ */ jsx(
|
|
2646
2675
|
ReactPopup,
|
|
2647
2676
|
{
|
|
@@ -2651,7 +2680,7 @@ function ReactFilterPanel(props) {
|
|
|
2651
2680
|
matchAnchorWidth: false,
|
|
2652
2681
|
minWidth: 300,
|
|
2653
2682
|
onOpenChange: (open) => {
|
|
2654
|
-
if (!open)
|
|
2683
|
+
if (!open) close();
|
|
2655
2684
|
},
|
|
2656
2685
|
surfaceStyle: { width: 300, height: 460, padding: 12, overflow: "hidden", boxSizing: "border-box" },
|
|
2657
2686
|
children: /* @__PURE__ */ jsxs("div", { style: { height: "100%", display: "flex", flexDirection: "column", minHeight: 0 }, children: [
|
|
@@ -2788,6 +2817,7 @@ function ReactFilterPanel(props) {
|
|
|
2788
2817
|
) : null,
|
|
2789
2818
|
/* @__PURE__ */ jsxs("div", { className: "react-filter-panel-footer-actions", style: footerActionsStyle, children: [
|
|
2790
2819
|
/* @__PURE__ */ jsx("button", { type: "button", style: actionStyle(false), onClick: () => {
|
|
2820
|
+
cancelPendingApply();
|
|
2791
2821
|
request.onReset();
|
|
2792
2822
|
request.onClose();
|
|
2793
2823
|
}, children: request.texts.resetAction }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canvas-components/react-components",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.23",
|
|
4
4
|
"description": "Shared React UI primitives for canvas-components adapters.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"react-dom": ">=16.8.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@canvas-components/icons": "0.1.
|
|
36
|
+
"@canvas-components/icons": "0.1.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsup --config tsup.config.ts"
|