chore: update ant-design dependencies and add new icon types

This commit is contained in:
Luiz Costa committed 2025-11-18 09:39:51 -03:00
1 parent 775e562fe9
commit 5c0094d74e
22648 files changed
+2140248 -29

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Collection = Collection;
exports.CollectionContext = void 0;
var React = _interopRequireWildcard(require("react"));
var CollectionContext = exports.CollectionContext = /*#__PURE__*/React.createContext(null);
/**
* Collect all the resize event from children ResizeObserver
*/
function Collection(_ref) {
var children = _ref.children,
onBatchResize = _ref.onBatchResize;
var resizeIdRef = React.useRef(0);
var resizeInfosRef = React.useRef([]);
var onCollectionResize = React.useContext(CollectionContext);
var onResize = React.useCallback(function (size, element, data) {
resizeIdRef.current += 1;
var currentId = resizeIdRef.current;
resizeInfosRef.current.push({
size: size,
element: element,
data: data
});
Promise.resolve().then(function () {
if (currentId === resizeIdRef.current) {
onBatchResize === null || onBatchResize === void 0 || onBatchResize(resizeInfosRef.current);
resizeInfosRef.current = [];
}
});
// Continue bubbling if parent exist
onCollectionResize === null || onCollectionResize === void 0 || onCollectionResize(size, element, data);
}, [onBatchResize, onCollectionResize]);
return /*#__PURE__*/React.createElement(CollectionContext.Provider, {
value: onResize
}, children);
}