@dtjoy/dt-design 1.0.6 → 1.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.
- package/esm/_util/easings.d.ts +1 -0
- package/esm/_util/easings.js +9 -0
- package/esm/_util/extendsObject.d.ts +4 -0
- package/esm/_util/extendsObject.js +17 -0
- package/esm/_util/gapSize.d.ts +3 -3
- package/esm/_util/getScroll.d.ts +3 -0
- package/esm/_util/getScroll.js +32 -0
- package/esm/_util/hooks/index.d.ts +4 -1
- package/esm/_util/hooks/index.js +4 -1
- package/esm/_util/hooks/useForceUpdate.d.ts +2 -0
- package/esm/_util/hooks/useForceUpdate.js +6 -0
- package/esm/_util/hooks/useOrientation.d.ts +2 -2
- package/esm/_util/hooks/useProxyImperativeHandle.d.ts +4 -0
- package/esm/_util/hooks/useProxyImperativeHandle.js +31 -0
- package/esm/_util/hooks/useSyncState.d.ts +3 -0
- package/esm/_util/hooks/useSyncState.js +20 -0
- package/esm/_util/index.d.ts +3 -3
- package/esm/_util/isNonNullable.d.ts +2 -2
- package/esm/_util/scrollTo.d.ts +10 -0
- package/esm/_util/scrollTo.js +38 -0
- package/esm/_util/type.d.ts +52 -52
- package/esm/_util/warning.d.ts +31 -31
- package/esm/_util/warning.js +5 -5
- package/esm/blockHeader/index.d.ts +50 -48
- package/esm/blockHeader/index.js +13 -15
- package/esm/blockHeader/style/index.d.ts +2 -2
- package/esm/blockHeader/style/index.less +143 -143
- package/esm/button/index.d.ts +10 -10
- package/esm/button/index.js +2 -2
- package/esm/button/style/index.d.ts +2 -2
- package/esm/collapsible/index.d.ts +102 -97
- package/esm/collapsible/index.js +53 -55
- package/esm/collapsible/style/index.d.ts +1 -1
- package/esm/collapsibleActionItems/index.d.ts +24 -24
- package/esm/collapsibleActionItems/index.js +2 -2
- package/esm/collapsibleActionItems/style/index.d.ts +2 -2
- package/esm/flex/index.d.ts +7 -7
- package/esm/flex/index.js +1 -1
- package/esm/flex/interface.d.ts +16 -16
- package/esm/flex/style/index.d.ts +2 -2
- package/esm/flex/style/index.less +76 -76
- package/esm/flex/utils.d.ts +7 -7
- package/esm/flex/utils.js +1 -1
- package/esm/formList/index.d.ts +78 -77
- package/esm/formList/index.js +13 -11
- package/esm/formList/style/index.d.ts +2 -2
- package/esm/formList/style/index.less +45 -45
- package/esm/index.d.ts +17 -14
- package/esm/index.js +3 -1
- package/esm/overflowList/index.d.ts +40 -39
- package/esm/overflowList/index.js +4 -3
- package/esm/overflowList/style/index.d.ts +2 -2
- package/esm/resize/index.d.ts +9 -8
- package/esm/resize/index.js +1 -1
- package/esm/resizeObserver/index.d.ts +45 -45
- package/esm/resizeObserver/index.js +3 -2
- package/esm/splitter/Panel.d.ts +7 -7
- package/esm/splitter/Panel.js +3 -3
- package/esm/splitter/SplitBar.d.ts +24 -24
- package/esm/splitter/SplitBar.js +8 -7
- package/esm/splitter/Splitter.d.ts +5 -5
- package/esm/splitter/Splitter.js +5 -4
- package/esm/splitter/hooks/sizeUtil.d.ts +3 -3
- package/esm/splitter/hooks/useItems.d.ts +14 -14
- package/esm/splitter/hooks/useItems.js +2 -2
- package/esm/splitter/hooks/useResizable.d.ts +10 -10
- package/esm/splitter/hooks/useResize.d.ts +6 -6
- package/esm/splitter/hooks/useResize.js +5 -5
- package/esm/splitter/hooks/useSizes.d.ts +4 -4
- package/esm/splitter/index.d.ts +8 -8
- package/esm/splitter/interface.d.ts +69 -69
- package/esm/splitter/style/index.d.ts +2 -2
- package/esm/statusTag/index.d.ts +29 -28
- package/esm/statusTag/index.js +8 -8
- package/esm/statusTag/style/index.d.ts +2 -2
- package/esm/style/index.d.ts +1 -1
- package/esm/style/index.less +1 -1
- package/esm/style/themes/index.less +2 -2
- package/esm/style/themes/variable.less +4 -0
- package/esm/table/InternalTable.d.ts +32 -0
- package/esm/table/InternalTable.js +429 -0
- package/esm/table/RcTable/VirtualTable.d.ts +2 -0
- package/esm/table/RcTable/VirtualTable.js +9 -0
- package/esm/table/RcTable/index.d.ts +2 -0
- package/esm/table/RcTable/index.js +9 -0
- package/esm/table/Table.d.ts +17 -0
- package/esm/table/Table.js +28 -0
- package/esm/table/TableMeasureRowContext.d.ts +3 -0
- package/esm/table/TableMeasureRowContext.js +3 -0
- package/esm/table/hooks/useContainerWidth.d.ts +1 -0
- package/esm/table/hooks/useContainerWidth.js +14 -0
- package/esm/table/index.d.ts +7 -0
- package/esm/table/index.js +2 -0
- package/esm/table/interface.d.ts +196 -0
- package/esm/table/interface.js +4 -0
- package/esm/table/style/bordered.less +141 -0
- package/esm/table/style/fixed.less +88 -0
- package/esm/table/style/index.d.ts +2 -0
- package/esm/table/style/index.js +2 -0
- package/esm/table/style/index.less +150 -0
- package/esm/table/style/selection.less +90 -0
- package/esm/table/style/sticky.less +55 -0
- package/esm/table/style/virtual.less +65 -0
- package/esm/table/util.d.ts +14 -0
- package/esm/table/util.js +33 -0
- package/lib/_util/easings.d.ts +1 -0
- package/lib/_util/easings.js +15 -0
- package/lib/_util/extendsObject.d.ts +4 -0
- package/lib/_util/extendsObject.js +20 -0
- package/lib/_util/gapSize.d.ts +3 -3
- package/lib/_util/getScroll.d.ts +3 -0
- package/lib/_util/getScroll.js +39 -0
- package/lib/_util/hooks/index.d.ts +4 -1
- package/lib/_util/hooks/index.js +33 -0
- package/lib/_util/hooks/useForceUpdate.d.ts +2 -0
- package/lib/_util/hooks/useForceUpdate.js +12 -0
- package/lib/_util/hooks/useOrientation.d.ts +2 -2
- package/lib/_util/hooks/useProxyImperativeHandle.d.ts +4 -0
- package/lib/_util/hooks/useProxyImperativeHandle.js +40 -0
- package/lib/_util/hooks/useSyncState.d.ts +3 -0
- package/lib/_util/hooks/useSyncState.js +19 -0
- package/lib/_util/index.d.ts +3 -3
- package/lib/_util/isNonNullable.d.ts +2 -2
- package/lib/_util/scrollTo.d.ts +10 -0
- package/lib/_util/scrollTo.js +44 -0
- package/lib/_util/type.d.ts +52 -52
- package/lib/_util/warning.d.ts +31 -31
- package/lib/_util/warning.js +7 -8
- package/lib/blockHeader/index.d.ts +50 -48
- package/lib/blockHeader/index.js +13 -12
- package/lib/blockHeader/style/index.d.ts +2 -2
- package/lib/blockHeader/style/index.less +143 -143
- package/lib/button/index.d.ts +10 -10
- package/lib/button/index.js +2 -2
- package/lib/button/style/index.d.ts +2 -2
- package/lib/collapsible/index.d.ts +102 -97
- package/lib/collapsible/index.js +49 -49
- package/lib/collapsible/style/index.d.ts +1 -1
- package/lib/collapsibleActionItems/index.d.ts +24 -24
- package/lib/collapsibleActionItems/index.js +2 -2
- package/lib/collapsibleActionItems/style/index.d.ts +2 -2
- package/lib/flex/index.d.ts +7 -7
- package/lib/flex/index.js +2 -2
- package/lib/flex/interface.d.ts +16 -16
- package/lib/flex/style/index.d.ts +2 -2
- package/lib/flex/style/index.less +76 -76
- package/lib/flex/utils.d.ts +7 -7
- package/lib/flex/utils.js +2 -2
- package/lib/formList/index.d.ts +78 -77
- package/lib/formList/index.js +10 -10
- package/lib/formList/style/index.d.ts +2 -2
- package/lib/formList/style/index.less +45 -45
- package/lib/index.d.ts +17 -14
- package/lib/index.js +21 -2
- package/lib/overflowList/index.d.ts +40 -39
- package/lib/overflowList/index.js +4 -3
- package/lib/overflowList/style/index.d.ts +2 -2
- package/lib/resize/index.d.ts +9 -8
- package/lib/resize/index.js +1 -1
- package/lib/resizeObserver/index.d.ts +45 -45
- package/lib/resizeObserver/index.js +3 -2
- package/lib/splitter/Panel.d.ts +7 -7
- package/lib/splitter/Panel.js +3 -3
- package/lib/splitter/SplitBar.d.ts +24 -24
- package/lib/splitter/SplitBar.js +8 -7
- package/lib/splitter/Splitter.d.ts +5 -5
- package/lib/splitter/Splitter.js +5 -4
- package/lib/splitter/hooks/sizeUtil.d.ts +3 -3
- package/lib/splitter/hooks/useItems.d.ts +14 -14
- package/lib/splitter/hooks/useItems.js +2 -2
- package/lib/splitter/hooks/useResizable.d.ts +10 -10
- package/lib/splitter/hooks/useResize.d.ts +6 -6
- package/lib/splitter/hooks/useResize.js +5 -5
- package/lib/splitter/hooks/useSizes.d.ts +4 -4
- package/lib/splitter/index.d.ts +8 -8
- package/lib/splitter/interface.d.ts +69 -69
- package/lib/splitter/style/index.d.ts +2 -2
- package/lib/statusTag/index.d.ts +29 -28
- package/lib/statusTag/index.js +8 -8
- package/lib/statusTag/style/index.d.ts +2 -2
- package/lib/style/index.d.ts +1 -1
- package/lib/style/index.less +1 -1
- package/lib/style/themes/index.less +2 -2
- package/lib/style/themes/variable.less +4 -0
- package/lib/table/InternalTable.d.ts +32 -0
- package/lib/table/InternalTable.js +395 -0
- package/lib/table/RcTable/VirtualTable.d.ts +2 -0
- package/lib/table/RcTable/VirtualTable.js +17 -0
- package/lib/table/RcTable/index.d.ts +2 -0
- package/lib/table/RcTable/index.js +17 -0
- package/lib/table/Table.d.ts +17 -0
- package/lib/table/Table.js +37 -0
- package/lib/table/TableMeasureRowContext.d.ts +3 -0
- package/lib/{_util/zindexContext.js → table/TableMeasureRowContext.js} +2 -5
- package/lib/table/hooks/useContainerWidth.d.ts +1 -0
- package/lib/table/hooks/useContainerWidth.js +20 -0
- package/lib/table/index.d.ts +7 -0
- package/lib/table/index.js +9 -0
- package/lib/table/interface.d.ts +196 -0
- package/lib/table/interface.js +8 -0
- package/lib/table/style/bordered.less +141 -0
- package/lib/table/style/fixed.less +88 -0
- package/lib/table/style/index.d.ts +2 -0
- package/lib/table/style/index.js +4 -0
- package/lib/table/style/index.less +150 -0
- package/lib/table/style/selection.less +90 -0
- package/lib/table/style/sticky.less +55 -0
- package/lib/table/style/virtual.less +65 -0
- package/lib/table/util.d.ts +14 -0
- package/lib/table/util.js +44 -0
- package/package.json +82 -66
- package/esm/_util/convertToTooltipProps.d.ts +0 -4
- package/esm/_util/convertToTooltipProps.js +0 -15
- package/esm/_util/hooks/useZIndex.d.ts +0 -8
- package/esm/_util/hooks/useZIndex.js +0 -51
- package/esm/_util/zindexContext.d.ts +0 -3
- package/esm/_util/zindexContext.js +0 -6
- package/lib/_util/convertToTooltipProps.d.ts +0 -4
- package/lib/_util/convertToTooltipProps.js +0 -21
- package/lib/_util/hooks/useZIndex.d.ts +0 -8
- package/lib/_util/hooks/useZIndex.js +0 -59
- package/lib/_util/zindexContext.d.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function easeInOutCubic(t: number, b: number, c: number, d: number): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function mergeProps() {
|
|
2
|
+
var ret = {};
|
|
3
|
+
for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4
|
+
items[_key] = arguments[_key];
|
|
5
|
+
}
|
|
6
|
+
items.forEach(function (item) {
|
|
7
|
+
if (item) {
|
|
8
|
+
Object.keys(item).forEach(function (key) {
|
|
9
|
+
if (item[key] !== undefined) {
|
|
10
|
+
ret[key] = item[key];
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return ret;
|
|
16
|
+
}
|
|
17
|
+
export default mergeProps;
|
package/esm/_util/gapSize.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
2
|
-
export declare function isPresetSize(size?: SizeType | string | number): size is SizeType;
|
|
3
|
-
export declare function isValidGapNumber(size?: SizeType | string | number): size is number;
|
|
1
|
+
import type { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
2
|
+
export declare function isPresetSize(size?: SizeType | string | number): size is SizeType;
|
|
3
|
+
export declare function isValidGapNumber(size?: SizeType | string | number): size is number;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import isNonNullable from "./isNonNullable";
|
|
2
|
+
export function isWindow(obj) {
|
|
3
|
+
return isNonNullable(obj) && obj === obj.window;
|
|
4
|
+
}
|
|
5
|
+
var getScroll = function getScroll(target) {
|
|
6
|
+
if (typeof window === 'undefined') {
|
|
7
|
+
/* istanbul ignore next */
|
|
8
|
+
return 0;
|
|
9
|
+
}
|
|
10
|
+
var result = 0;
|
|
11
|
+
if (isWindow(target)) {
|
|
12
|
+
result = target.pageYOffset;
|
|
13
|
+
} else if (target instanceof Document) {
|
|
14
|
+
result = target.documentElement.scrollTop;
|
|
15
|
+
} else if (target instanceof HTMLElement) {
|
|
16
|
+
result = target.scrollTop;
|
|
17
|
+
} else if (target) {
|
|
18
|
+
// According to the type inference, the `target` is `never` type.
|
|
19
|
+
// Since we configured the loose mode type checking, and supports mocking the target with such shape below::
|
|
20
|
+
// `{ documentElement: { scrollLeft: 200, scrollTop: 400 } }`,
|
|
21
|
+
// the program may falls into this branch.
|
|
22
|
+
// Check the corresponding tests for details. Don't sure what is the real scenario this happens.
|
|
23
|
+
/* biome-ignore lint/complexity/useLiteralKeys: target is a never type */ /* eslint-disable-next-line dot-notation */
|
|
24
|
+
result = target['scrollTop'];
|
|
25
|
+
}
|
|
26
|
+
if (target && !isWindow(target) && typeof result !== 'number') {
|
|
27
|
+
var _documentElement, _target$ownerDocument;
|
|
28
|
+
result = (_documentElement = ((_target$ownerDocument = target.ownerDocument) !== null && _target$ownerDocument !== void 0 ? _target$ownerDocument : target).documentElement) === null || _documentElement === void 0 ? void 0 : _documentElement.scrollTop;
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
export default getScroll;
|
package/esm/_util/hooks/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const useOrientation: (orientation?: Orientation, vertical?: boolean, legacyDirection?: Orientation) => [Orientation, boolean];
|
|
1
|
+
export type Orientation = 'horizontal' | 'vertical';
|
|
2
|
+
export declare const useOrientation: (orientation?: Orientation, vertical?: boolean, legacyDirection?: Orientation) => [Orientation, boolean];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useImperativeHandle } from 'react';
|
|
2
|
+
var fillProxy = function fillProxy(element, handler) {
|
|
3
|
+
element._dtProxy = element._dtProxy || {};
|
|
4
|
+
Object.keys(handler).forEach(function (key) {
|
|
5
|
+
if (!(key in element._dtProxy)) {
|
|
6
|
+
var ori = element[key];
|
|
7
|
+
element._dtProxy[key] = ori;
|
|
8
|
+
element[key] = handler[key];
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
return element;
|
|
12
|
+
};
|
|
13
|
+
export var useProxyImperativeHandle = function useProxyImperativeHandle(ref, init) {
|
|
14
|
+
return useImperativeHandle(ref, function () {
|
|
15
|
+
var refObj = init();
|
|
16
|
+
var nativeElement = refObj.nativeElement;
|
|
17
|
+
if (typeof Proxy !== 'undefined') {
|
|
18
|
+
return new Proxy(nativeElement, {
|
|
19
|
+
get: function get(obj, prop) {
|
|
20
|
+
if (refObj[prop]) {
|
|
21
|
+
return refObj[prop];
|
|
22
|
+
}
|
|
23
|
+
return Reflect.get(obj, prop);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Fallback of IE
|
|
29
|
+
return fillProxy(nativeElement, refObj);
|
|
30
|
+
});
|
|
31
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { useForceUpdate } from "./useForceUpdate";
|
|
9
|
+
export var useSyncState = function useSyncState(initialValue) {
|
|
10
|
+
var ref = React.useRef(initialValue);
|
|
11
|
+
var _useForceUpdate = useForceUpdate(),
|
|
12
|
+
_useForceUpdate2 = _slicedToArray(_useForceUpdate, 2),
|
|
13
|
+
forceUpdate = _useForceUpdate2[1];
|
|
14
|
+
return [function () {
|
|
15
|
+
return ref.current;
|
|
16
|
+
}, function (newValue) {
|
|
17
|
+
ref.current = newValue;
|
|
18
|
+
forceUpdate();
|
|
19
|
+
}];
|
|
20
|
+
};
|
package/esm/_util/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TooltipProps } from 'antd';
|
|
2
|
-
export
|
|
3
|
-
export declare function toTooltipProps(tooltip: LabelTooltipType): TooltipProps | null;
|
|
1
|
+
import type { TooltipProps } from 'antd';
|
|
2
|
+
export type LabelTooltipType = TooltipProps | TooltipProps['title'];
|
|
3
|
+
export declare function toTooltipProps(tooltip: LabelTooltipType): TooltipProps | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const isNonNullable: <T>(val: T) => val is NonNullable<T>;
|
|
2
|
-
export default isNonNullable;
|
|
1
|
+
declare const isNonNullable: <T>(val: T) => val is NonNullable<T>;
|
|
2
|
+
export default isNonNullable;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface ScrollToOptions {
|
|
2
|
+
/** Scroll container, default as window */
|
|
3
|
+
getContainer?: () => HTMLElement | Window | Document;
|
|
4
|
+
/** Scroll end callback */
|
|
5
|
+
callback?: () => void;
|
|
6
|
+
/** Animation duration, default as 450 */
|
|
7
|
+
duration?: number;
|
|
8
|
+
}
|
|
9
|
+
export default function scrollTo(y: number, options?: ScrollToOptions): () => void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import raf from '@rc-component/util/lib/raf';
|
|
2
|
+
import { easeInOutCubic } from "./easings";
|
|
3
|
+
import getScroll, { isWindow } from "./getScroll";
|
|
4
|
+
export default function scrollTo(y) {
|
|
5
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6
|
+
var _options$getContainer = options.getContainer,
|
|
7
|
+
getContainer = _options$getContainer === void 0 ? function () {
|
|
8
|
+
return window;
|
|
9
|
+
} : _options$getContainer,
|
|
10
|
+
callback = options.callback,
|
|
11
|
+
_options$duration = options.duration,
|
|
12
|
+
duration = _options$duration === void 0 ? 450 : _options$duration;
|
|
13
|
+
var container = getContainer();
|
|
14
|
+
var scrollTop = getScroll(container);
|
|
15
|
+
var startTime = Date.now();
|
|
16
|
+
var rafId;
|
|
17
|
+
var frameFunc = function frameFunc() {
|
|
18
|
+
var timestamp = Date.now();
|
|
19
|
+
var time = timestamp - startTime;
|
|
20
|
+
var nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);
|
|
21
|
+
if (isWindow(container)) {
|
|
22
|
+
container.scrollTo(window.pageXOffset, nextScrollTop);
|
|
23
|
+
} else if (container instanceof Document || container.constructor.name === 'HTMLDocument') {
|
|
24
|
+
container.documentElement.scrollTop = nextScrollTop;
|
|
25
|
+
} else {
|
|
26
|
+
container.scrollTop = nextScrollTop;
|
|
27
|
+
}
|
|
28
|
+
if (time < duration) {
|
|
29
|
+
rafId = raf(frameFunc);
|
|
30
|
+
} else if (typeof callback === 'function') {
|
|
31
|
+
callback();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
rafId = raf(frameFunc);
|
|
35
|
+
return function () {
|
|
36
|
+
raf.cancel(rafId);
|
|
37
|
+
};
|
|
38
|
+
}
|
package/esm/_util/type.d.ts
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
export
|
|
3
|
-
/** https://github.com/Microsoft/TypeScript/issues/29729 */
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
/**
|
|
8
|
-
* Get component props
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* import { Checkbox } from '@dtjoy/dt-design'
|
|
12
|
-
* import type { GetProps } from '@dtjoy/dt-design';
|
|
13
|
-
*
|
|
14
|
-
* type CheckboxGroupProps = GetProps<typeof Checkbox.Group>
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export
|
|
18
|
-
/**
|
|
19
|
-
* Get component props by component name
|
|
20
|
-
* @example
|
|
21
|
-
* ```ts
|
|
22
|
-
* import { Select } from '@dtjoy/dt-design';
|
|
23
|
-
* import type { GetProp, SelectProps } from '@dtjoy/dt-design';
|
|
24
|
-
*
|
|
25
|
-
* type SelectOption1 = GetProp<SelectProps, 'options'>[number];
|
|
26
|
-
* // or
|
|
27
|
-
* type SelectOption2 = GetProp<typeof Select, 'options'>[number];
|
|
28
|
-
*
|
|
29
|
-
* const onChange: GetProp<typeof Select, 'onChange'> = (value, option) => {
|
|
30
|
-
* // Do something
|
|
31
|
-
* };
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export
|
|
35
|
-
|
|
36
|
-
ref?: React.Ref<any> | string;
|
|
37
|
-
}> = (props: Props) => React.ReactNode;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Get component ref
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* import { Input } from '@dtjoy/dt-design';
|
|
44
|
-
* import type { GetRef } from '@dtjoy/dt-design';
|
|
45
|
-
*
|
|
46
|
-
* type InputRef = GetRef<typeof Input>;
|
|
47
|
-
* ```
|
|
48
|
-
*/
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export {};
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
3
|
+
/** https://github.com/Microsoft/TypeScript/issues/29729 */
|
|
4
|
+
export type LiteralUnion<T, U extends Primitive = string> = T | (U & Record<never, never>);
|
|
5
|
+
export type AnyObject = Record<PropertyKey, any>;
|
|
6
|
+
export type CustomComponent<P = AnyObject> = React.ComponentType<P> | string;
|
|
7
|
+
/**
|
|
8
|
+
* Get component props
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { Checkbox } from '@dtjoy/dt-design'
|
|
12
|
+
* import type { GetProps } from '@dtjoy/dt-design';
|
|
13
|
+
*
|
|
14
|
+
* type CheckboxGroupProps = GetProps<typeof Checkbox.Group>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export type GetProps<T extends React.ComponentType<any> | object> = T extends React.ComponentType<infer P> ? P : T extends object ? T : never;
|
|
18
|
+
/**
|
|
19
|
+
* Get component props by component name
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { Select } from '@dtjoy/dt-design';
|
|
23
|
+
* import type { GetProp, SelectProps } from '@dtjoy/dt-design';
|
|
24
|
+
*
|
|
25
|
+
* type SelectOption1 = GetProp<SelectProps, 'options'>[number];
|
|
26
|
+
* // or
|
|
27
|
+
* type SelectOption2 = GetProp<typeof Select, 'options'>[number];
|
|
28
|
+
*
|
|
29
|
+
* const onChange: GetProp<typeof Select, 'onChange'> = (value, option) => {
|
|
30
|
+
* // Do something
|
|
31
|
+
* };
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export type GetProp<T extends React.ComponentType<any> | object, PropName extends keyof GetProps<T>> = NonNullable<GetProps<T>[PropName]>;
|
|
35
|
+
type ReactRefComponent<Props extends {
|
|
36
|
+
ref?: React.Ref<any> | string;
|
|
37
|
+
}> = (props: Props) => React.ReactNode;
|
|
38
|
+
type ExtractRefAttributesRef<T> = T extends React.RefAttributes<infer P> ? P : never;
|
|
39
|
+
/**
|
|
40
|
+
* Get component ref
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* import { Input } from '@dtjoy/dt-design';
|
|
44
|
+
* import type { GetRef } from '@dtjoy/dt-design';
|
|
45
|
+
*
|
|
46
|
+
* type InputRef = GetRef<typeof Input>;
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export type GetRef<T extends ReactRefComponent<any> | React.Component<any>> = T extends React.Component<any> ? T : T extends React.ComponentType<infer P> ? ExtractRefAttributesRef<P> : never;
|
|
50
|
+
export type GetContextProps<T> = T extends React.Context<infer P> ? P : never;
|
|
51
|
+
export type GetContextProp<T extends React.Context<any>, PropName extends keyof GetContextProps<T>> = NonNullable<GetContextProps<T>[PropName]>;
|
|
52
|
+
export {};
|
package/esm/_util/warning.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare function noop(): void;
|
|
3
|
-
export declare function resetWarned(): void;
|
|
4
|
-
|
|
5
|
-
declare const warning: Warning;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* - deprecated: Some API will be removed in future but still support now.
|
|
9
|
-
* - usage: Some API usage is not correct.
|
|
10
|
-
* - breaking: Breaking change like API is removed.
|
|
11
|
-
*/
|
|
12
|
-
type: 'deprecated' | 'usage' | 'breaking', message?: string) => void;
|
|
13
|
-
|
|
14
|
-
deprecated: (valid: boolean, oldProp: string, newProp: string, message?: string) => void;
|
|
15
|
-
};
|
|
16
|
-
export interface WarningContextProps {
|
|
17
|
-
/**
|
|
18
|
-
* @descCN 设置警告等级,设置 `false` 时会将废弃相关信息聚合为单条信息。
|
|
19
|
-
* @descEN Set the warning level. When set to `false`, discard related information will be aggregated into a single message.
|
|
20
|
-
* @since 5.10.0
|
|
21
|
-
*/
|
|
22
|
-
strict?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare const WarningContext: React.Context<WarningContextProps>;
|
|
25
|
-
/**
|
|
26
|
-
* This is a hook but we not named as `useWarning`
|
|
27
|
-
* since this is only used in development.
|
|
28
|
-
* We should always wrap this in `if (process.env.NODE_ENV !== 'production')` condition
|
|
29
|
-
*/
|
|
30
|
-
export declare const devUseWarning: (component: string) => TypeWarning;
|
|
31
|
-
export default warning;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function noop(): void;
|
|
3
|
+
export declare function resetWarned(): void;
|
|
4
|
+
type Warning = (valid: boolean, component: string, message?: string) => void;
|
|
5
|
+
declare const warning: Warning;
|
|
6
|
+
type BaseTypeWarning = (valid: boolean,
|
|
7
|
+
/**
|
|
8
|
+
* - deprecated: Some API will be removed in future but still support now.
|
|
9
|
+
* - usage: Some API usage is not correct.
|
|
10
|
+
* - breaking: Breaking change like API is removed.
|
|
11
|
+
*/
|
|
12
|
+
type: 'deprecated' | 'usage' | 'breaking', message?: string) => void;
|
|
13
|
+
type TypeWarning = BaseTypeWarning & {
|
|
14
|
+
deprecated: (valid: boolean, oldProp: string, newProp: string, message?: string) => void;
|
|
15
|
+
};
|
|
16
|
+
export interface WarningContextProps {
|
|
17
|
+
/**
|
|
18
|
+
* @descCN 设置警告等级,设置 `false` 时会将废弃相关信息聚合为单条信息。
|
|
19
|
+
* @descEN Set the warning level. When set to `false`, discard related information will be aggregated into a single message.
|
|
20
|
+
* @since 5.10.0
|
|
21
|
+
*/
|
|
22
|
+
strict?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const WarningContext: React.Context<WarningContextProps>;
|
|
25
|
+
/**
|
|
26
|
+
* This is a hook but we not named as `useWarning`
|
|
27
|
+
* since this is only used in development.
|
|
28
|
+
* We should always wrap this in `if (process.env.NODE_ENV !== 'production')` condition
|
|
29
|
+
*/
|
|
30
|
+
export declare const devUseWarning: (component: string) => TypeWarning;
|
|
31
|
+
export default warning;
|
package/esm/_util/warning.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import rcWarning from 'rc-util
|
|
2
|
+
import { warning as rcWarning } from '@rc-component/util';
|
|
3
3
|
export function noop() {}
|
|
4
4
|
var rcResetWarned = rcWarning.resetWarned;
|
|
5
5
|
var deprecatedWarnList = null;
|
|
@@ -21,10 +21,10 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
21
21
|
var warning = _warning;
|
|
22
22
|
export var WarningContext = /*#__PURE__*/React.createContext({});
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* This is a hook but we not named as `useWarning`
|
|
26
|
-
* since this is only used in development.
|
|
27
|
-
* We should always wrap this in `if (process.env.NODE_ENV !== 'production')` condition
|
|
24
|
+
/**
|
|
25
|
+
* This is a hook but we not named as `useWarning`
|
|
26
|
+
* since this is only used in development.
|
|
27
|
+
* We should always wrap this in `if (process.env.NODE_ENV !== 'production')` condition
|
|
28
28
|
*/
|
|
29
29
|
export var devUseWarning = process.env.NODE_ENV !== 'production' ? function (component) {
|
|
30
30
|
var _React$useContext = React.useContext(WarningContext),
|
|
@@ -1,48 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '
|
|
3
|
-
import
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
export interface IBlockHeaderProps
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
/** 展示内容(children)
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './style';
|
|
4
|
+
import type { SizeType } from 'antd/lib/config-provider/SizeContext';
|
|
5
|
+
import type { LabelTooltipType } from '../_util';
|
|
6
|
+
export interface IBlockHeaderProps {
|
|
7
|
+
/** id */
|
|
8
|
+
id?: string;
|
|
9
|
+
/** 标题 */
|
|
10
|
+
title: ReactNode;
|
|
11
|
+
/** 标题前的图标,默认是一个色块 */
|
|
12
|
+
addonBefore?: ReactNode;
|
|
13
|
+
/** 标题后的提示说明文字 */
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
/** 默认展示为问号的tooltip */
|
|
16
|
+
tooltip?: LabelTooltipType;
|
|
17
|
+
/** 后缀自定义内容块 */
|
|
18
|
+
addonAfter?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* 小标题 font-size: 12px; line-height: 32px
|
|
21
|
+
* 中标题 font-size: 14px; line-height: 40px
|
|
22
|
+
* 大标题 font-size: 16px; line-height: 40px
|
|
23
|
+
* 默认 中标题
|
|
24
|
+
*/
|
|
25
|
+
size?: SizeType;
|
|
26
|
+
/** 自定义 Bottom 值 */
|
|
27
|
+
spaceBottom?: number;
|
|
28
|
+
/** 标题一行的样式类名 */
|
|
29
|
+
className?: string;
|
|
30
|
+
/** 标题的样式类名 */
|
|
31
|
+
style?: React.CSSProperties;
|
|
32
|
+
/** 展示内容(children)的样式类名 */
|
|
33
|
+
contentClassName?: string;
|
|
34
|
+
/** 展示内容(children)的样式 */
|
|
35
|
+
contentStyle?: React.CSSProperties;
|
|
36
|
+
/** 是否显示背景, 默认 true */
|
|
37
|
+
background?: boolean;
|
|
38
|
+
/** 当前展开状态 */
|
|
39
|
+
expand?: boolean;
|
|
40
|
+
/** 是否默认展开内容, 默认为 undefined */
|
|
41
|
+
defaultExpand?: boolean;
|
|
42
|
+
/** 展开/收起的内容 */
|
|
43
|
+
children?: ReactNode;
|
|
44
|
+
/** 展开/收起时的回调 */
|
|
45
|
+
onExpand?: (expand: boolean) => void;
|
|
46
|
+
/** 标题的样式 */
|
|
47
|
+
titleStyle?: React.CSSProperties;
|
|
48
|
+
}
|
|
49
|
+
declare const BlockHeader: React.FC<IBlockHeaderProps>;
|
|
50
|
+
export default BlockHeader;
|
package/esm/blockHeader/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["title", "description", "tooltip", "size", "spaceBottom", "className", "contentClassName", "style", "contentStyle", "background", "defaultExpand", "addonAfter", "expand", "children", "addonBefore", "onExpand", "titleStyle"];
|
|
3
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -12,13 +11,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
12
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
12
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
14
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
14
|
import React, { useState } from 'react';
|
|
18
15
|
import { QuestionCircleOutlined, UpOutlined } from '@ant-design/icons';
|
|
19
16
|
import { Tooltip } from 'antd';
|
|
20
17
|
import { globalConfig } from 'antd/es/config-provider';
|
|
21
|
-
import
|
|
18
|
+
import clsx from 'clsx';
|
|
22
19
|
import "./style";
|
|
23
20
|
import { toTooltipProps } from "../_util";
|
|
24
21
|
import Collapsible from "../collapsible";
|
|
@@ -28,7 +25,8 @@ function isControlled(props) {
|
|
|
28
25
|
var prefixCls = globalConfig().getPrefixCls('block-header');
|
|
29
26
|
var preTitleRowCls = "".concat(prefixCls, "__title");
|
|
30
27
|
var BlockHeader = function BlockHeader(props) {
|
|
31
|
-
var
|
|
28
|
+
var id = props.id,
|
|
29
|
+
title = props.title,
|
|
32
30
|
_props$description = props.description,
|
|
33
31
|
description = _props$description === void 0 ? '' : _props$description,
|
|
34
32
|
tooltip = props.tooltip,
|
|
@@ -56,8 +54,7 @@ var BlockHeader = function BlockHeader(props) {
|
|
|
56
54
|
className: "addon-before--default"
|
|
57
55
|
}) : _props$addonBefore,
|
|
58
56
|
onExpand = props.onExpand,
|
|
59
|
-
titleStyle = props.titleStyle
|
|
60
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
57
|
+
titleStyle = props.titleStyle;
|
|
61
58
|
var _useState = useState(defaultExpand),
|
|
62
59
|
_useState2 = _slicedToArray(_useState, 2),
|
|
63
60
|
internalExpand = _useState2[0],
|
|
@@ -67,7 +64,7 @@ var BlockHeader = function BlockHeader(props) {
|
|
|
67
64
|
// 只有在有了 children 并且设置了 expand/defaultExpand 的时候才能够展开收起
|
|
68
65
|
var showCollapse = (typeof expand === 'boolean' || typeof defaultExpand === 'boolean') && children;
|
|
69
66
|
var tooltipProps = toTooltipProps(tooltip);
|
|
70
|
-
var bottomStyle;
|
|
67
|
+
var bottomStyle = {};
|
|
71
68
|
if (spaceBottom) bottomStyle = showCollapse && !currentExpand ? {
|
|
72
69
|
marginBottom: 0
|
|
73
70
|
} : {
|
|
@@ -79,10 +76,11 @@ var BlockHeader = function BlockHeader(props) {
|
|
|
79
76
|
onExpand === null || onExpand === void 0 || onExpand(expand);
|
|
80
77
|
};
|
|
81
78
|
return /*#__PURE__*/React.createElement("div", {
|
|
82
|
-
|
|
79
|
+
id: id,
|
|
80
|
+
className: clsx("".concat(prefixCls), className),
|
|
83
81
|
style: _objectSpread(_objectSpread({}, bottomStyle), style)
|
|
84
82
|
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className:
|
|
83
|
+
className: clsx(preTitleRowCls, "".concat(preTitleRowCls, "--").concat(size), _defineProperty(_defineProperty({}, "".concat(preTitleRowCls, "--background"), background), "".concat(preTitleRowCls, "--pointer"), showCollapse)),
|
|
86
84
|
style: titleStyle,
|
|
87
85
|
onClick: function onClick() {
|
|
88
86
|
return showCollapse && handleExpand(!currentExpand);
|
|
@@ -96,7 +94,7 @@ var BlockHeader = function BlockHeader(props) {
|
|
|
96
94
|
}, title), tooltipProps !== null && tooltipProps !== void 0 && tooltipProps.title ? /*#__PURE__*/React.createElement("div", {
|
|
97
95
|
className: "title__tooltip"
|
|
98
96
|
}, /*#__PURE__*/React.createElement(Tooltip, _extends({}, tooltipProps, {
|
|
99
|
-
className:
|
|
97
|
+
className: clsx(tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.className)
|
|
100
98
|
}), /*#__PURE__*/React.createElement(QuestionCircleOutlined, null))) : null, description ? /*#__PURE__*/React.createElement("div", {
|
|
101
99
|
className: "title__description"
|
|
102
100
|
}, description) : null), addonAfter && /*#__PURE__*/React.createElement("div", {
|
|
@@ -106,14 +104,14 @@ var BlockHeader = function BlockHeader(props) {
|
|
|
106
104
|
}, /*#__PURE__*/React.createElement("div", {
|
|
107
105
|
className: "collapse__text"
|
|
108
106
|
}, currentExpand ? '收起' : '展开'), /*#__PURE__*/React.createElement(UpOutlined, {
|
|
109
|
-
className:
|
|
107
|
+
className: clsx('collapse__icon', {
|
|
110
108
|
'collapse__icon--up': currentExpand,
|
|
111
109
|
'collapse__icon--down': !currentExpand
|
|
112
110
|
})
|
|
113
|
-
}))), /*#__PURE__*/React.createElement(Collapsible,
|
|
111
|
+
}))), /*#__PURE__*/React.createElement(Collapsible, {
|
|
114
112
|
isOpen: !currentExpand
|
|
115
|
-
},
|
|
116
|
-
className:
|
|
113
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
114
|
+
className: clsx("".concat(prefixCls, "__content"), contentClassName, _defineProperty({}, "".concat(prefixCls, "__content--active"), currentExpand || !showCollapse)),
|
|
117
115
|
style: contentStyle
|
|
118
116
|
}, children)));
|
|
119
117
|
};
|