doui-react 2.0.6 → 2.0.8

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 (67) hide show
  1. package/es/api/component/global-style.js +1 -1
  2. package/es/color-picker/component/index.d.ts +2 -0
  3. package/es/color-picker/component/index.js +17 -0
  4. package/es/color-picker/index.d.ts +2 -0
  5. package/es/color-picker/index.js +2 -0
  6. package/es/color-picker/type/index.d.ts +7 -0
  7. package/es/color-picker/type/index.js +1 -0
  8. package/es/form/component/form-item-map.d.ts +2 -0
  9. package/es/form/component/form-item-map.js +2 -0
  10. package/es/form/component/utils.d.ts +16 -16
  11. package/es/grid/component/pagination.d.ts +12 -12
  12. package/es/icon/hook/index.d.ts +95 -95
  13. package/es/index.d.ts +2 -1
  14. package/es/index.js +1 -0
  15. package/es/open-modal/component/modal.js +5 -15
  16. package/es/open-modal/style/index.js +1 -1
  17. package/es/open-modal/style/wrap.js +1 -1
  18. package/es/radio/component/abstract-box.d.ts +30 -30
  19. package/es/table/component/display-column.d.ts +2 -0
  20. package/es/table/component/display-column.js +95 -0
  21. package/es/table/component/index.d.ts +2 -0
  22. package/es/table/component/index.js +3 -1
  23. package/es/table/component/table.js +6 -3
  24. package/es/table/component/utils.d.ts +2 -2
  25. package/es/table/component/utils.js +37 -20
  26. package/es/table/style/index.d.ts +1 -0
  27. package/es/table/style/index.js +3 -2
  28. package/es/table/type/display-column.d.ts +9 -0
  29. package/es/table/type/display-column.js +1 -0
  30. package/es/table/type/index.d.ts +6 -0
  31. package/es/table/type/index.js +1 -0
  32. package/es/tabs/component/utils.d.ts +7 -7
  33. package/es/tooltip/component/index.d.ts +13 -14
  34. package/lib/api/component/global-style.js +1 -1
  35. package/lib/color-picker/component/index.d.ts +2 -0
  36. package/lib/color-picker/component/index.js +24 -0
  37. package/lib/color-picker/index.d.ts +2 -0
  38. package/lib/color-picker/index.js +27 -0
  39. package/lib/color-picker/type/index.d.ts +7 -0
  40. package/lib/color-picker/type/index.js +5 -0
  41. package/lib/form/component/form-item-map.d.ts +2 -0
  42. package/lib/form/component/form-item-map.js +2 -0
  43. package/lib/form/component/utils.d.ts +16 -16
  44. package/lib/grid/component/pagination.d.ts +12 -12
  45. package/lib/icon/hook/index.d.ts +95 -95
  46. package/lib/index.d.ts +2 -1
  47. package/lib/index.js +8 -0
  48. package/lib/open-modal/component/modal.js +3 -13
  49. package/lib/open-modal/style/index.js +1 -1
  50. package/lib/open-modal/style/wrap.js +1 -1
  51. package/lib/radio/component/abstract-box.d.ts +30 -30
  52. package/lib/table/component/display-column.d.ts +2 -0
  53. package/lib/table/component/display-column.js +102 -0
  54. package/lib/table/component/index.d.ts +2 -0
  55. package/lib/table/component/index.js +3 -1
  56. package/lib/table/component/table.js +5 -2
  57. package/lib/table/component/utils.d.ts +2 -2
  58. package/lib/table/component/utils.js +38 -20
  59. package/lib/table/style/index.d.ts +1 -0
  60. package/lib/table/style/index.js +3 -2
  61. package/lib/table/type/display-column.d.ts +9 -0
  62. package/lib/table/type/display-column.js +5 -0
  63. package/lib/table/type/index.d.ts +6 -0
  64. package/lib/table/type/index.js +11 -0
  65. package/lib/tabs/component/utils.d.ts +7 -7
  66. package/lib/tooltip/component/index.d.ts +13 -14
  67. package/package.json +1 -1
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.DisplayColumn = DisplayColumn;
8
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
+ var _api = require("../../api");
12
+ var _button = require("../../button");
13
+ var _checkbox = require("../../checkbox");
14
+ var _2 = require("./..");
15
+ var _icons = require("@ant-design/icons");
16
+ var _antd = require("antd");
17
+ var _lodash = _interopRequireDefault(require("lodash"));
18
+ var _react = require("react");
19
+ var _reactUse = require("react-use");
20
+ var _style = _interopRequireDefault(require("../style"));
21
+ var _utils = require("./utils");
22
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
23
+ var _excluded = ["value", "onChange", "storageKey"];
24
+ function useControllableState(_ref) {
25
+ var value = _ref.value,
26
+ onChange = _ref.onChange,
27
+ _ref$storageKey = _ref.storageKey,
28
+ storageKey = _ref$storageKey === void 0 ? 'default' : _ref$storageKey,
29
+ defaultOptions = _ref.defaultOptions;
30
+ var finalStorageKey = "table-display-column-".concat(storageKey);
31
+ var _useLocalStorage = (0, _reactUse.useLocalStorage)(finalStorageKey, defaultOptions),
32
+ _useLocalStorage2 = (0, _slicedToArray2.default)(_useLocalStorage, 2),
33
+ internalValue = _useLocalStorage2[0],
34
+ setInternalValue = _useLocalStorage2[1];
35
+ var _useTableContext = (0, _2.useTableContext)(),
36
+ setContext = _useTableContext.setContext;
37
+ var finalValue = value !== null && value !== void 0 ? value : internalValue;
38
+ (0, _react.useEffect)(function () {
39
+ setContext({
40
+ displayColumnKeys: finalValue
41
+ });
42
+ // eslint-disable-next-line react-hooks/exhaustive-deps
43
+ }, [finalValue]);
44
+ return {
45
+ value: finalValue,
46
+ onChange: onChange !== null && onChange !== void 0 ? onChange : setInternalValue
47
+ };
48
+ }
49
+ function useOptions() {
50
+ var _useTableContext2 = (0, _2.useTableContext)(),
51
+ columns = _useTableContext2.columns;
52
+ var options = _lodash.default.filter(columns, function (column) {
53
+ return column.title && !(0, _utils.isActionsColumn)(column);
54
+ }).map(function (column) {
55
+ return {
56
+ label: column.title,
57
+ value: column.dataIndex
58
+ };
59
+ });
60
+ return {
61
+ options: options,
62
+ defaultOptions: _lodash.default.map(options, 'value')
63
+ };
64
+ }
65
+ function Content(props) {
66
+ var _useOptions = useOptions(),
67
+ options = _useOptions.options,
68
+ defaultOptions = _useOptions.defaultOptions;
69
+ var _useControllableState = useControllableState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
70
+ defaultOptions: defaultOptions
71
+ })),
72
+ value = _useControllableState.value,
73
+ onChange = _useControllableState.onChange;
74
+ return (0, _jsxRuntime.jsx)(_checkbox.Checkbox, {
75
+ value: value,
76
+ onChange: onChange,
77
+ options: options,
78
+ sort: false,
79
+ css: _style.default.displayColumn
80
+ });
81
+ }
82
+ function DisplayColumn(_ref2) {
83
+ var value = _ref2.value,
84
+ onChange = _ref2.onChange,
85
+ storageKey = _ref2.storageKey,
86
+ props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
87
+ return (0, _jsxRuntime.jsx)(_antd.Popover, {
88
+ placement: "bottomRight",
89
+ arrow: false,
90
+ trigger: "click",
91
+ forceRender: true,
92
+ getPopupContainer: _api.getPopupContainer,
93
+ content: (0, _jsxRuntime.jsx)(Content, {
94
+ value: value,
95
+ onChange: onChange,
96
+ storageKey: storageKey
97
+ }),
98
+ children: (0, _jsxRuntime.jsx)(_button.Button, (0, _objectSpread2.default)({
99
+ icon: (0, _jsxRuntime.jsx)(_icons.SettingOutlined, {})
100
+ }, props))
101
+ });
102
+ }
@@ -1,7 +1,9 @@
1
1
  import { ActionButton } from './action-button';
2
+ import { DisplayColumn } from './display-column';
2
3
  import { Table as InternalTable } from './table';
3
4
  type TableType = typeof InternalTable & {
4
5
  ActionButton: typeof ActionButton;
6
+ DisplayColumn: typeof DisplayColumn;
5
7
  };
6
8
  export declare const Table: TableType;
7
9
  export {};
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Table = void 0;
7
7
  var _actionButton = require("./action-button");
8
+ var _displayColumn = require("./display-column");
8
9
  var _table = require("./table");
9
10
  var Table = exports.Table = _table.Table;
10
- Table.ActionButton = _actionButton.ActionButton;
11
+ Table.ActionButton = _actionButton.ActionButton;
12
+ Table.DisplayColumn = _displayColumn.DisplayColumn;
@@ -16,6 +16,7 @@ var _empty = require("../../empty");
16
16
  var _form = require("../../form");
17
17
  var _hooks = require("../../hooks");
18
18
  var _2 = require("./..");
19
+ var _css = require("@emotion/css");
19
20
  var _lodash = _interopRequireDefault(require("lodash"));
20
21
  var _react = require("react");
21
22
  var _reactUse = require("react-use");
@@ -111,6 +112,7 @@ function useInit(_ref2) {
111
112
  },
112
113
  operation: operation,
113
114
  rowKey: rowKey,
115
+ columns: columns,
114
116
  editorValueKey: editorValueKey
115
117
  });
116
118
  function updateSelectedStatus(keys) {
@@ -195,7 +197,8 @@ function useTable(_ref4) {
195
197
  columns: _lodash.default.reject(restProps.columns, {
196
198
  type: 'selection'
197
199
  }),
198
- getSearchColumn: getSearchColumn
200
+ getSearchColumn: getSearchColumn,
201
+ context: params.context
199
202
  });
200
203
  return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
201
204
  onRow: function onRow(record) {
@@ -241,7 +244,7 @@ function Table(props) {
241
244
  }
242
245
  return (0, _jsxRuntime.jsx)("div", {
243
246
  css: _style.default.wrapper(maxHeight),
244
- className: formProps.className,
247
+ className: (0, _css.cx)((0, _api.getClassName)('table-wrapper'), formProps.className),
245
248
  style: formProps.style,
246
249
  children: (0, _jsxRuntime.jsx)(_tableBody.TableBody, (0, _objectSpread2.default)({}, restProps))
247
250
  });
@@ -1,5 +1,4 @@
1
1
  import { FormInstance, FormProps } from "../../form";
2
- import type { ColumnType } from 'antd/es/table';
3
2
  import type { TableRowSelection } from 'antd/es/table/interface';
4
3
  import { Column, DataSource, GetSearchColumn, TableContext, TableProps } from '../type';
5
4
  import { Actions } from './actions';
@@ -20,7 +19,8 @@ export declare const componentMap: {
20
19
  editor: typeof Editor;
21
20
  default: (props: any) => any;
22
21
  };
23
- export declare function generateColumns({ columns, getSearchColumn }: GenerateColumnsProps): ColumnType<any>[];
22
+ export declare function isActionsColumn(column: Column): boolean;
23
+ export declare function generateColumns({ columns, getSearchColumn, context }: GenerateColumnsProps): Column[];
24
24
  interface RowSelectionProps {
25
25
  rowKey: string;
26
26
  columns: Column[];
@@ -9,6 +9,7 @@ exports.generateColumns = generateColumns;
9
9
  exports.getRowSelection = getRowSelection;
10
10
  exports.getTableAndFormProps = getTableAndFormProps;
11
11
  exports.getTableFormInitialValues = getTableFormInitialValues;
12
+ exports.isActionsColumn = isActionsColumn;
12
13
  exports.isUseFormWrapper = isUseFormWrapper;
13
14
  exports.updateDataSourceByFormValues = updateDataSourceByFormValues;
14
15
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
@@ -40,9 +41,22 @@ var componentMap = exports.componentMap = {
40
41
  return props.children;
41
42
  }
42
43
  };
43
- function generateColumns(_ref) {
44
- var columns = _ref.columns,
45
- getSearchColumn = _ref.getSearchColumn;
44
+ function isHiddenColumn(_ref) {
45
+ var context = _ref.context,
46
+ column = _ref.column;
47
+ var displayColumnKeys = _lodash.default.get(context, 'displayColumnKeys');
48
+ if (!displayColumnKeys || isActionsColumn(column)) {
49
+ return;
50
+ }
51
+ return !_lodash.default.includes(displayColumnKeys, column.dataIndex);
52
+ }
53
+ function isActionsColumn(column) {
54
+ return column.type === 'actions';
55
+ }
56
+ function generateColumns(_ref2) {
57
+ var columns = _ref2.columns,
58
+ getSearchColumn = _ref2.getSearchColumn,
59
+ context = _ref2.context;
46
60
  return _lodash.default.map(columns, function (column) {
47
61
  var newColumn = _lodash.default.clone(column);
48
62
  var dataIndex = newColumn.dataIndex,
@@ -68,7 +82,7 @@ function generateColumns(_ref) {
68
82
  if (!_lodash.default.isEmpty(filters)) {
69
83
  _lodash.default.assign(newColumn, (0, _filter.getFilterColumn)(newColumn));
70
84
  }
71
- if (newColumn.type === 'actions') {
85
+ if (isActionsColumn(newColumn)) {
72
86
  var _newColumn$fixed;
73
87
  (_newColumn$fixed = newColumn.fixed) !== null && _newColumn$fixed !== void 0 ? _newColumn$fixed : newColumn.fixed = 'right';
74
88
  }
@@ -97,6 +111,10 @@ function generateColumns(_ref) {
97
111
  };
98
112
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, newColumn), {}, {
99
113
  dataIndex: (0, _utils.transformNameToPath)(dataIndex),
114
+ hidden: isHiddenColumn({
115
+ context: context,
116
+ column: newColumn
117
+ }),
100
118
  align: align,
101
119
  render: render
102
120
  });
@@ -123,10 +141,10 @@ function renderComponent(props) {
123
141
  children: (0, _jsxRuntime.jsx)(Component, (0, _objectSpread2.default)({}, props))
124
142
  }));
125
143
  }
126
- function getColumnWidth(_ref2) {
127
- var width = _ref2.width,
128
- minWidth = _ref2.minWidth,
129
- maxWidth = _ref2.maxWidth;
144
+ function getColumnWidth(_ref3) {
145
+ var width = _ref3.width,
146
+ minWidth = _ref3.minWidth,
147
+ maxWidth = _ref3.maxWidth;
130
148
  var style;
131
149
  if (_lodash.default.isNil(width)) {
132
150
  style = {
@@ -145,10 +163,10 @@ function getColumnWidth(_ref2) {
145
163
  }
146
164
  };
147
165
  }
148
- function getRowSelection(_ref3) {
149
- var rowKey = _ref3.rowKey,
150
- columns = _ref3.columns,
151
- context = _ref3.context;
166
+ function getRowSelection(_ref4) {
167
+ var rowKey = _ref4.rowKey,
168
+ columns = _ref4.columns,
169
+ context = _ref4.context;
152
170
  var column = _lodash.default.find(columns, {
153
171
  type: 'selection'
154
172
  });
@@ -209,10 +227,10 @@ function getTableAndFormProps(props) {
209
227
  tableProps: tableProps
210
228
  };
211
229
  }
212
- function isUseFormWrapper(_ref4) {
213
- var columns = _ref4.columns,
214
- context = _ref4.context,
215
- form = _ref4.form;
230
+ function isUseFormWrapper(_ref5) {
231
+ var columns = _ref5.columns,
232
+ context = _ref5.context,
233
+ form = _ref5.form;
216
234
  // 在 Form 中时,将 context 挂载给 formContext
217
235
  if (form) {
218
236
  _lodash.default.assign(form.getContext(), context);
@@ -222,10 +240,10 @@ function isUseFormWrapper(_ref4) {
222
240
  type: 'editor'
223
241
  });
224
242
  }
225
- function getTableFormInitialValues(_ref5) {
226
- var rowKey = _ref5.rowKey,
227
- columns = _ref5.columns,
228
- dataSource = _ref5.dataSource;
243
+ function getTableFormInitialValues(_ref6) {
244
+ var rowKey = _ref6.rowKey,
245
+ columns = _ref6.columns,
246
+ dataSource = _ref6.dataSource;
229
247
  var dataIndex = _lodash.default.map(columns, function (col) {
230
248
  return col.type === 'editor' && col.dataIndex;
231
249
  });
@@ -5,5 +5,6 @@ declare const style: {
5
5
  ellipsisText: (rows: number) => import("@emotion/react").SerializedStyles;
6
6
  editor: import("@emotion/react").SerializedStyles;
7
7
  divider: import("@emotion/react").SerializedStyles;
8
+ displayColumn: import("@emotion/react").SerializedStyles;
8
9
  };
9
10
  export default style;
@@ -8,7 +8,7 @@ exports.default = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
9
  var _api = require("../../api");
10
10
  var _react = require("@emotion/react");
11
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
11
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
12
12
  var style = {
13
13
  wrapper: function wrapper(maxHeight) {
14
14
  return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n\n .ant-table-wrapper,\n .ant-spin-nested-loading,\n .ant-spin-container,\n .ant-table,\n .ant-table-container {\n width: 100%;\n max-height: 100%;\n display: flex;\n flex-direction: column;\n min-height: 0;\n }\n\n .ant-table-content {\n overflow: auto !important;\n width: calc(100% + 1px); // \u4FEE\u590D\u7A7A\u6570\u636E\u65F6\uFF0C\u51FA\u73B0\u6EDA\u52A8\u6761\u7684 bug\n max-height: ", ";\n }\n\n .ant-table-thead {\n position: sticky;\n top: 0;\n z-index: 10;\n }\n\n .ant-table-pagination.ant-pagination {\n margin-bottom: 0;\n }\n "])), (0, _api.transformValueWithStyleUnit)(maxHeight));
@@ -18,6 +18,7 @@ var style = {
18
18
  return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n -webkit-line-clamp: ", " !important;\n "])), rows);
19
19
  },
20
20
  editor: (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: 0;\n\n .ant-form-item-label {\n display: none !important;\n }\n "]))),
21
- divider: (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n "])))
21
+ divider: (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n "]))),
22
+ displayColumn: (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n & {\n flex-direction: column;\n max-width: 200px;\n }\n\n .do-checkbox-all {\n padding-bottom: 10px;\n border-bottom: 1px solid #f0f0f0;\n }\n\n .ant-checkbox-group {\n flex-direction: column;\n width: 100%;\n }\n\n .do-checkbox,\n .do-box-label {\n width: 100%;\n }\n "])))
22
23
  };
23
24
  var _default = exports.default = style;
@@ -0,0 +1,9 @@
1
+ import { ButtonProps } from "../../button";
2
+ export interface DisplayColumnProps extends Omit<ButtonProps, 'onChange'> {
3
+ /**
4
+ * @description 缓存列时, 需要保证key唯一
5
+ */
6
+ storageKey?: string;
7
+ value?: string[];
8
+ onChange?: (keys: string[]) => void;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -6,6 +6,7 @@ import { TableProps as AntdTableProps } from 'antd';
6
6
  import { ReactNode } from 'react';
7
7
  export * from './action';
8
8
  export * from './column';
9
+ export * from './display-column';
9
10
  export type DataSource = any[];
10
11
  export interface TableContext {
11
12
  /**
@@ -37,8 +38,13 @@ export interface TableContext {
37
38
  * @description 设置表格上下文
38
39
  */
39
40
  setContext(state: any): void;
41
+ /**
42
+ * @description 列配置
43
+ */
44
+ columns: Column[];
40
45
  rowKey: string;
41
46
  editorValueKey: string;
47
+ displayColumnKeys?: string[];
42
48
  [key: string]: any;
43
49
  }
44
50
  export interface RefreshProps {
@@ -24,4 +24,15 @@ Object.keys(_column).forEach(function (key) {
24
24
  return _column[key];
25
25
  }
26
26
  });
27
+ });
28
+ var _displayColumn = require("./display-column");
29
+ Object.keys(_displayColumn).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _displayColumn[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function get() {
35
+ return _displayColumn[key];
36
+ }
37
+ });
27
38
  });
@@ -6,19 +6,19 @@ export declare function getRenderTabBar({ type, items, size, tabBarGutter, tabBa
6
6
  export declare function generateTabItems({ items }: TabsProps): {
7
7
  label: import("@emotion/react/jsx-runtime").JSX.Element;
8
8
  key: string;
9
- className?: string | undefined;
9
+ prefixCls?: string | undefined;
10
10
  disabled?: boolean | undefined;
11
- id?: string | undefined;
11
+ className?: string | undefined;
12
12
  style?: import("react").CSSProperties | undefined;
13
13
  children?: import("react").ReactNode;
14
- prefixCls?: string | undefined;
15
- closable?: boolean | undefined;
16
- closeIcon?: import("react").ReactNode;
17
- active?: boolean | undefined;
18
- icon?: import("react").ReactNode;
19
14
  forceRender?: boolean | undefined;
15
+ id?: string | undefined;
20
16
  destroyInactiveTabPane?: boolean | undefined;
21
17
  animated?: boolean | undefined;
18
+ closable?: boolean | undefined;
19
+ closeIcon?: import("react").ReactNode;
20
+ icon?: import("react").ReactNode;
22
21
  tabKey?: string | undefined;
22
+ active?: boolean | undefined;
23
23
  }[];
24
24
  export {};
@@ -1,13 +1,12 @@
1
1
  /// <reference types="react" />
2
- import { getPopupContainer } from "../../api";
3
2
  import { TooltipProps } from "..";
4
3
  export declare const tooltipOverlayClassName: string;
5
4
  export declare function getTooltipProps(props: TooltipProps): {
6
5
  color?: string | undefined;
7
6
  title?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
8
7
  overlay?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
9
- styles?: Partial<Record<"body" | "root", import("react").CSSProperties>> | undefined;
10
- classNames: Partial<Record<"body" | "root", string>>;
8
+ styles?: Partial<Record<"root" | "body", import("react").CSSProperties>> | undefined;
9
+ classNames: Partial<Record<"root" | "body", string>>;
11
10
  style?: import("react").CSSProperties | undefined;
12
11
  className?: string | undefined;
13
12
  rootClassName?: string | undefined;
@@ -20,7 +19,7 @@ export declare function getTooltipProps(props: TooltipProps): {
20
19
  pointAtCenter?: boolean | undefined;
21
20
  };
22
21
  autoAdjustOverflow?: boolean | import("antd/es/tooltip").AdjustOverflow | undefined;
23
- getPopupContainer: typeof getPopupContainer;
22
+ getPopupContainer: (triggerNode: HTMLElement) => HTMLElement;
24
23
  children?: import("react").ReactNode;
25
24
  destroyTooltipOnHide?: boolean | {
26
25
  keepParent?: boolean | undefined;
@@ -34,22 +33,22 @@ export declare function getTooltipProps(props: TooltipProps): {
34
33
  defaultVisible?: boolean | undefined;
35
34
  onVisibleChange?: ((visible: boolean) => void) | undefined;
36
35
  afterVisibleChange?: ((visible: boolean) => void) | undefined;
37
- align?: import("@rc-component/trigger").AlignType | undefined;
38
- id?: string | undefined;
39
- prefixCls?: string | undefined;
40
36
  zIndex?: number | undefined;
41
37
  animation?: string | undefined;
42
38
  motion?: import("rc-motion").CSSMotionProps | undefined;
43
39
  transitionName?: string | undefined;
44
- mouseEnterDelay?: number | undefined;
45
- mouseLeaveDelay?: number | undefined;
46
- onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
47
- overlayClassName?: string | undefined;
48
- overlayStyle?: import("react").CSSProperties | undefined;
49
- trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
50
- popupVisible?: boolean | undefined;
40
+ prefixCls?: string | undefined;
51
41
  forceRender?: boolean | undefined;
42
+ id?: string | undefined;
43
+ align?: import("@rc-component/trigger").AlignType | undefined;
44
+ onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
52
45
  fresh?: boolean | undefined;
46
+ mouseLeaveDelay?: number | undefined;
47
+ mouseEnterDelay?: number | undefined;
48
+ popupVisible?: boolean | undefined;
49
+ trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
50
+ overlayStyle?: import("react").CSSProperties | undefined;
51
+ overlayClassName?: string | undefined;
53
52
  getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
54
53
  showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
55
54
  arrowContent?: import("react").ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doui-react",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "A React UI library based on Ant Design",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",