@coreui/react 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/dropdown/CDropdown.d.ts +1 -3
- package/dist/components/table/CTable.d.ts +1 -1
- package/dist/components/table/CTableDataCell.d.ts +5 -1
- package/dist/components/table/CTableResponsiveWrapper.d.ts +9 -0
- package/dist/components/table/CTableRow.d.ts +1 -1
- package/dist/index.es.js +146 -83
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +146 -83
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/src/components/alert/__tests__/__snapshots__/CAlert.spec.tsx.snap +1 -0
- package/src/components/button/__tests__/__snapshots__/CButtonClose.spec.tsx.snap +2 -0
- package/src/components/carousel/CCarousel.tsx +1 -1
- package/src/components/close-button/__tests__/__snapshots__/CCloseButton.spec.tsx.snap +2 -0
- package/src/components/dropdown/CDropdown.tsx +7 -5
- package/src/components/dropdown/CDropdownMenu.tsx +8 -0
- package/src/components/dropdown/CDropdownToggle.tsx +1 -1
- package/src/components/form/__tests__/__snapshots__/CFormTextarea.spec.tsx.snap +1 -0
- package/src/components/modal/CModal.tsx +18 -1
- package/src/components/modal/__tests__/__snapshots__/CModalHeader.spec.tsx.snap +2 -0
- package/src/components/nav/CNavGroup.tsx +4 -1
- package/src/components/sidebar/CSidebarNav.tsx +4 -1
- package/src/components/table/CTable.tsx +56 -65
- package/src/components/table/CTableDataCell.tsx +5 -1
- package/src/components/table/CTableResponsiveWrapper.tsx +39 -0
- package/src/components/table/CTableRow.tsx +1 -1
- package/src/components/table/__tests__/CTable.spec.tsx +45 -0
- package/src/components/table/__tests__/__snapshots__/CTable.spec.tsx.snap +86 -2
- package/src/components/toast/CToast.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -1263,9 +1263,9 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1263
1263
|
var classnames = {exports: {}};
|
|
1264
1264
|
|
|
1265
1265
|
/*!
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1266
|
+
Copyright (c) 2018 Jed Watson.
|
|
1267
|
+
Licensed under the MIT License (MIT), see
|
|
1268
|
+
http://jedwatson.github.io/classnames
|
|
1269
1269
|
*/
|
|
1270
1270
|
|
|
1271
1271
|
(function (module) {
|
|
@@ -1294,14 +1294,15 @@ var classnames = {exports: {}};
|
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
1296
|
} else if (argType === 'object') {
|
|
1297
|
-
if (arg.toString
|
|
1298
|
-
for (var key in arg) {
|
|
1299
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1300
|
-
classes.push(key);
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
} else {
|
|
1297
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
1304
1298
|
classes.push(arg.toString());
|
|
1299
|
+
continue;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
for (var key in arg) {
|
|
1303
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1304
|
+
classes.push(key);
|
|
1305
|
+
}
|
|
1305
1306
|
}
|
|
1306
1307
|
}
|
|
1307
1308
|
}
|
|
@@ -1361,7 +1362,7 @@ CAccordionItem.propTypes = {
|
|
|
1361
1362
|
CAccordionItem.displayName = 'CAccordionItem';
|
|
1362
1363
|
|
|
1363
1364
|
function _extends() {
|
|
1364
|
-
_extends = Object.assign
|
|
1365
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1365
1366
|
for (var i = 1; i < arguments.length; i++) {
|
|
1366
1367
|
var source = arguments[i];
|
|
1367
1368
|
|
|
@@ -1374,7 +1375,6 @@ function _extends() {
|
|
|
1374
1375
|
|
|
1375
1376
|
return target;
|
|
1376
1377
|
};
|
|
1377
|
-
|
|
1378
1378
|
return _extends.apply(this, arguments);
|
|
1379
1379
|
}
|
|
1380
1380
|
|
|
@@ -1394,11 +1394,10 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1394
1394
|
}
|
|
1395
1395
|
|
|
1396
1396
|
function _setPrototypeOf(o, p) {
|
|
1397
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
1397
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1398
1398
|
o.__proto__ = p;
|
|
1399
1399
|
return o;
|
|
1400
1400
|
};
|
|
1401
|
-
|
|
1402
1401
|
return _setPrototypeOf(o, p);
|
|
1403
1402
|
}
|
|
1404
1403
|
|
|
@@ -1475,6 +1474,10 @@ var classNamesShape = process.env.NODE_ENV !== 'production' ? propTypes.exports.
|
|
|
1475
1474
|
|
|
1476
1475
|
var TransitionGroupContext = React__default["default"].createContext(null);
|
|
1477
1476
|
|
|
1477
|
+
var forceReflow = function forceReflow(node) {
|
|
1478
|
+
return node.scrollTop;
|
|
1479
|
+
};
|
|
1480
|
+
|
|
1478
1481
|
var UNMOUNTED = 'unmounted';
|
|
1479
1482
|
var EXITED = 'exited';
|
|
1480
1483
|
var ENTERING = 'entering';
|
|
@@ -1694,6 +1697,14 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1694
1697
|
this.cancelNextCallback();
|
|
1695
1698
|
|
|
1696
1699
|
if (nextStatus === ENTERING) {
|
|
1700
|
+
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
1701
|
+
var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM__default["default"].findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749
|
|
1702
|
+
// With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.
|
|
1703
|
+
// To make the animation happen, we have to separate each rendering and avoid being processed as batched.
|
|
1704
|
+
|
|
1705
|
+
if (node) forceReflow(node);
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1697
1708
|
this.performEnter(mounting);
|
|
1698
1709
|
} else {
|
|
1699
1710
|
this.performExit();
|
|
@@ -2302,8 +2313,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
2302
2313
|
|
|
2303
2314
|
|
|
2304
2315
|
if (phase === 'active') {
|
|
2305
|
-
|
|
2306
|
-
node && node.scrollTop;
|
|
2316
|
+
if (node) forceReflow(node);
|
|
2307
2317
|
}
|
|
2308
2318
|
|
|
2309
2319
|
if (className) {
|
|
@@ -4246,38 +4256,57 @@ var max = Math.max;
|
|
|
4246
4256
|
var min = Math.min;
|
|
4247
4257
|
var round = Math.round;
|
|
4248
4258
|
|
|
4249
|
-
function
|
|
4259
|
+
function getUAString() {
|
|
4260
|
+
var uaData = navigator.userAgentData;
|
|
4261
|
+
|
|
4262
|
+
if (uaData != null && uaData.brands) {
|
|
4263
|
+
return uaData.brands.map(function (item) {
|
|
4264
|
+
return item.brand + "/" + item.version;
|
|
4265
|
+
}).join(' ');
|
|
4266
|
+
}
|
|
4267
|
+
|
|
4268
|
+
return navigator.userAgent;
|
|
4269
|
+
}
|
|
4270
|
+
|
|
4271
|
+
function isLayoutViewport() {
|
|
4272
|
+
return !/^((?!chrome|android).)*safari/i.test(getUAString());
|
|
4273
|
+
}
|
|
4274
|
+
|
|
4275
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
|
4250
4276
|
if (includeScale === void 0) {
|
|
4251
4277
|
includeScale = false;
|
|
4252
4278
|
}
|
|
4253
4279
|
|
|
4254
|
-
|
|
4280
|
+
if (isFixedStrategy === void 0) {
|
|
4281
|
+
isFixedStrategy = false;
|
|
4282
|
+
}
|
|
4283
|
+
|
|
4284
|
+
var clientRect = element.getBoundingClientRect();
|
|
4255
4285
|
var scaleX = 1;
|
|
4256
4286
|
var scaleY = 1;
|
|
4257
4287
|
|
|
4258
|
-
if (isHTMLElement(element)
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
// Fallback to 1 in case both values are `0`
|
|
4262
|
-
|
|
4263
|
-
if (offsetWidth > 0) {
|
|
4264
|
-
scaleX = round(rect.width) / offsetWidth || 1;
|
|
4265
|
-
}
|
|
4266
|
-
|
|
4267
|
-
if (offsetHeight > 0) {
|
|
4268
|
-
scaleY = round(rect.height) / offsetHeight || 1;
|
|
4269
|
-
}
|
|
4288
|
+
if (includeScale && isHTMLElement(element)) {
|
|
4289
|
+
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
|
4290
|
+
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
|
4270
4291
|
}
|
|
4271
4292
|
|
|
4293
|
+
var _ref = isElement(element) ? getWindow(element) : window,
|
|
4294
|
+
visualViewport = _ref.visualViewport;
|
|
4295
|
+
|
|
4296
|
+
var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
4297
|
+
var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
|
|
4298
|
+
var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
|
|
4299
|
+
var width = clientRect.width / scaleX;
|
|
4300
|
+
var height = clientRect.height / scaleY;
|
|
4272
4301
|
return {
|
|
4273
|
-
width:
|
|
4274
|
-
height:
|
|
4275
|
-
top:
|
|
4276
|
-
right:
|
|
4277
|
-
bottom:
|
|
4278
|
-
left:
|
|
4279
|
-
x:
|
|
4280
|
-
y:
|
|
4302
|
+
width: width,
|
|
4303
|
+
height: height,
|
|
4304
|
+
top: y,
|
|
4305
|
+
right: x + width,
|
|
4306
|
+
bottom: y + height,
|
|
4307
|
+
left: x,
|
|
4308
|
+
x: x,
|
|
4309
|
+
y: y
|
|
4281
4310
|
};
|
|
4282
4311
|
}
|
|
4283
4312
|
|
|
@@ -4372,8 +4401,8 @@ function getTrueOffsetParent(element) {
|
|
|
4372
4401
|
|
|
4373
4402
|
|
|
4374
4403
|
function getContainingBlock(element) {
|
|
4375
|
-
var isFirefox =
|
|
4376
|
-
var isIE =
|
|
4404
|
+
var isFirefox = /firefox/i.test(getUAString());
|
|
4405
|
+
var isIE = /Trident/i.test(getUAString());
|
|
4377
4406
|
|
|
4378
4407
|
if (isIE && isHTMLElement(element)) {
|
|
4379
4408
|
// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
|
|
@@ -4813,31 +4842,21 @@ function getWindowScrollBarX(element) {
|
|
|
4813
4842
|
return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
|
|
4814
4843
|
}
|
|
4815
4844
|
|
|
4816
|
-
function getViewportRect(element) {
|
|
4845
|
+
function getViewportRect(element, strategy) {
|
|
4817
4846
|
var win = getWindow(element);
|
|
4818
4847
|
var html = getDocumentElement(element);
|
|
4819
4848
|
var visualViewport = win.visualViewport;
|
|
4820
4849
|
var width = html.clientWidth;
|
|
4821
4850
|
var height = html.clientHeight;
|
|
4822
4851
|
var x = 0;
|
|
4823
|
-
var y = 0;
|
|
4824
|
-
// can be obscured underneath it.
|
|
4825
|
-
// Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
|
|
4826
|
-
// if it isn't open, so if this isn't available, the popper will be detected
|
|
4827
|
-
// to overflow the bottom of the screen too early.
|
|
4852
|
+
var y = 0;
|
|
4828
4853
|
|
|
4829
4854
|
if (visualViewport) {
|
|
4830
4855
|
width = visualViewport.width;
|
|
4831
|
-
height = visualViewport.height;
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
// Feature detection fails in mobile emulation mode in Chrome.
|
|
4836
|
-
// Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
|
|
4837
|
-
// 0.001
|
|
4838
|
-
// Fallback here: "Not Safari" userAgent
|
|
4839
|
-
|
|
4840
|
-
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
|
|
4856
|
+
height = visualViewport.height;
|
|
4857
|
+
var layoutViewport = isLayoutViewport();
|
|
4858
|
+
|
|
4859
|
+
if (layoutViewport || !layoutViewport && strategy === 'fixed') {
|
|
4841
4860
|
x = visualViewport.offsetLeft;
|
|
4842
4861
|
y = visualViewport.offsetTop;
|
|
4843
4862
|
}
|
|
@@ -4931,8 +4950,8 @@ function rectToClientRect(rect) {
|
|
|
4931
4950
|
});
|
|
4932
4951
|
}
|
|
4933
4952
|
|
|
4934
|
-
function getInnerBoundingClientRect(element) {
|
|
4935
|
-
var rect = getBoundingClientRect(element);
|
|
4953
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
4954
|
+
var rect = getBoundingClientRect(element, false, strategy === 'fixed');
|
|
4936
4955
|
rect.top = rect.top + element.clientTop;
|
|
4937
4956
|
rect.left = rect.left + element.clientLeft;
|
|
4938
4957
|
rect.bottom = rect.top + element.clientHeight;
|
|
@@ -4944,8 +4963,8 @@ function getInnerBoundingClientRect(element) {
|
|
|
4944
4963
|
return rect;
|
|
4945
4964
|
}
|
|
4946
4965
|
|
|
4947
|
-
function getClientRectFromMixedType(element, clippingParent) {
|
|
4948
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
4966
|
+
function getClientRectFromMixedType(element, clippingParent, strategy) {
|
|
4967
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
4949
4968
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
4950
4969
|
// clipping (or hiding) overflowing elements with a position different from
|
|
4951
4970
|
// `initial`
|
|
@@ -4968,18 +4987,18 @@ function getClippingParents(element) {
|
|
|
4968
4987
|
// clipping parents
|
|
4969
4988
|
|
|
4970
4989
|
|
|
4971
|
-
function getClippingRect(element, boundary, rootBoundary) {
|
|
4990
|
+
function getClippingRect(element, boundary, rootBoundary, strategy) {
|
|
4972
4991
|
var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
|
|
4973
4992
|
var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
|
|
4974
4993
|
var firstClippingParent = clippingParents[0];
|
|
4975
4994
|
var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
|
|
4976
|
-
var rect = getClientRectFromMixedType(element, clippingParent);
|
|
4995
|
+
var rect = getClientRectFromMixedType(element, clippingParent, strategy);
|
|
4977
4996
|
accRect.top = max(rect.top, accRect.top);
|
|
4978
4997
|
accRect.right = min(rect.right, accRect.right);
|
|
4979
4998
|
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
4980
4999
|
accRect.left = max(rect.left, accRect.left);
|
|
4981
5000
|
return accRect;
|
|
4982
|
-
}, getClientRectFromMixedType(element, firstClippingParent));
|
|
5001
|
+
}, getClientRectFromMixedType(element, firstClippingParent, strategy));
|
|
4983
5002
|
clippingRect.width = clippingRect.right - clippingRect.left;
|
|
4984
5003
|
clippingRect.height = clippingRect.bottom - clippingRect.top;
|
|
4985
5004
|
clippingRect.x = clippingRect.left;
|
|
@@ -5060,6 +5079,8 @@ function detectOverflow(state, options) {
|
|
|
5060
5079
|
var _options = options,
|
|
5061
5080
|
_options$placement = _options.placement,
|
|
5062
5081
|
placement = _options$placement === void 0 ? state.placement : _options$placement,
|
|
5082
|
+
_options$strategy = _options.strategy,
|
|
5083
|
+
strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,
|
|
5063
5084
|
_options$boundary = _options.boundary,
|
|
5064
5085
|
boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
|
|
5065
5086
|
_options$rootBoundary = _options.rootBoundary,
|
|
@@ -5074,7 +5095,7 @@ function detectOverflow(state, options) {
|
|
|
5074
5095
|
var altContext = elementContext === popper ? reference : popper;
|
|
5075
5096
|
var popperRect = state.rects.popper;
|
|
5076
5097
|
var element = state.elements[altBoundary ? altContext : elementContext];
|
|
5077
|
-
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
|
|
5098
|
+
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
|
|
5078
5099
|
var referenceClientRect = getBoundingClientRect(state.elements.reference);
|
|
5079
5100
|
var popperOffsets = computeOffsets({
|
|
5080
5101
|
reference: referenceClientRect,
|
|
@@ -5592,7 +5613,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
5592
5613
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
5593
5614
|
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
5594
5615
|
var documentElement = getDocumentElement(offsetParent);
|
|
5595
|
-
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
5616
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
|
|
5596
5617
|
var scroll = {
|
|
5597
5618
|
scrollLeft: 0,
|
|
5598
5619
|
scrollTop: 0
|
|
@@ -6464,7 +6485,11 @@ var CDropdown = React.forwardRef(function (_a, ref) {
|
|
|
6464
6485
|
};
|
|
6465
6486
|
var _className = classNames(variant === 'nav-item' ? 'nav-item dropdown' : variant, {
|
|
6466
6487
|
show: _visible,
|
|
6467
|
-
}, direction
|
|
6488
|
+
}, direction === 'center'
|
|
6489
|
+
? 'dropdown-center'
|
|
6490
|
+
: direction === 'dropup-center'
|
|
6491
|
+
? 'dropup dropup-center'
|
|
6492
|
+
: direction, className);
|
|
6468
6493
|
React.useEffect(function () {
|
|
6469
6494
|
setVisible(visible);
|
|
6470
6495
|
}, [visible]);
|
|
@@ -6498,7 +6523,7 @@ CDropdown.propTypes = {
|
|
|
6498
6523
|
className: propTypes.exports.string,
|
|
6499
6524
|
component: propTypes.exports.elementType,
|
|
6500
6525
|
dark: propTypes.exports.bool,
|
|
6501
|
-
direction: propTypes.exports.oneOf(['dropup', 'dropend', 'dropstart']),
|
|
6526
|
+
direction: propTypes.exports.oneOf(['center', 'dropup', 'dropup-center', 'dropend', 'dropstart']),
|
|
6502
6527
|
onHide: propTypes.exports.func,
|
|
6503
6528
|
onShow: propTypes.exports.func,
|
|
6504
6529
|
placement: placementPropType,
|
|
@@ -6587,9 +6612,15 @@ var CDropdownMenu = function (_a) {
|
|
|
6587
6612
|
}
|
|
6588
6613
|
};
|
|
6589
6614
|
var _placement = placement;
|
|
6615
|
+
if (direction === 'center') {
|
|
6616
|
+
_placement = 'bottom';
|
|
6617
|
+
}
|
|
6590
6618
|
if (direction === 'dropup') {
|
|
6591
6619
|
_placement = 'top-start';
|
|
6592
6620
|
}
|
|
6621
|
+
if (direction === 'dropup-center') {
|
|
6622
|
+
_placement = 'top';
|
|
6623
|
+
}
|
|
6593
6624
|
if (direction === 'dropend') {
|
|
6594
6625
|
_placement = 'right-start';
|
|
6595
6626
|
}
|
|
@@ -7350,6 +7381,10 @@ var CModal = React.forwardRef(function (_a, ref) {
|
|
|
7350
7381
|
React.useLayoutEffect(function () {
|
|
7351
7382
|
if (_visible) {
|
|
7352
7383
|
document.body.classList.add('modal-open');
|
|
7384
|
+
if (backdrop) {
|
|
7385
|
+
document.body.style.overflow = 'hidden';
|
|
7386
|
+
document.body.style.paddingRight = '0px';
|
|
7387
|
+
}
|
|
7353
7388
|
setTimeout(function () {
|
|
7354
7389
|
var _a;
|
|
7355
7390
|
(_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -7357,8 +7392,18 @@ var CModal = React.forwardRef(function (_a, ref) {
|
|
|
7357
7392
|
}
|
|
7358
7393
|
else {
|
|
7359
7394
|
document.body.classList.remove('modal-open');
|
|
7395
|
+
if (backdrop) {
|
|
7396
|
+
document.body.style.removeProperty('overflow');
|
|
7397
|
+
document.body.style.removeProperty('padding-right');
|
|
7398
|
+
}
|
|
7360
7399
|
}
|
|
7361
|
-
return function () {
|
|
7400
|
+
return function () {
|
|
7401
|
+
document.body.classList.remove('modal-open');
|
|
7402
|
+
if (backdrop) {
|
|
7403
|
+
document.body.style.removeProperty('overflow');
|
|
7404
|
+
document.body.style.removeProperty('padding-right');
|
|
7405
|
+
}
|
|
7406
|
+
};
|
|
7362
7407
|
}, [_visible]);
|
|
7363
7408
|
var handleClickOutside = function (event) {
|
|
7364
7409
|
if (modalContentRef.current &&
|
|
@@ -7501,7 +7546,10 @@ var CSidebarNav = React.forwardRef(function (_a, ref) {
|
|
|
7501
7546
|
return (React__default["default"].createElement("ul", __assign({ className: classes, ref: ref }, rest),
|
|
7502
7547
|
React__default["default"].createElement(CNavContext.Provider, { value: CNavContextValues }, React__default["default"].Children.map(children, function (child, index) {
|
|
7503
7548
|
if (React__default["default"].isValidElement(child)) {
|
|
7504
|
-
return React__default["default"].cloneElement(child, {
|
|
7549
|
+
return React__default["default"].cloneElement(child, {
|
|
7550
|
+
key: index,
|
|
7551
|
+
idx: "".concat(index),
|
|
7552
|
+
});
|
|
7505
7553
|
}
|
|
7506
7554
|
return;
|
|
7507
7555
|
}))));
|
|
@@ -7561,7 +7609,10 @@ var CNavGroup = React.forwardRef(function (_a, ref) {
|
|
|
7561
7609
|
compact: compact,
|
|
7562
7610
|
}), style: __assign(__assign({}, style), transitionStyles[state]), ref: navItemsRef }, React__default["default"].Children.map(children, function (child, index) {
|
|
7563
7611
|
if (React__default["default"].isValidElement(child)) {
|
|
7564
|
-
return React__default["default"].cloneElement(child, {
|
|
7612
|
+
return React__default["default"].cloneElement(child, {
|
|
7613
|
+
key: index,
|
|
7614
|
+
idx: "".concat(idx, ".").concat(index),
|
|
7615
|
+
});
|
|
7565
7616
|
}
|
|
7566
7617
|
return;
|
|
7567
7618
|
}))); })));
|
|
@@ -8271,6 +8322,19 @@ CTableCaption.propTypes = {
|
|
|
8271
8322
|
};
|
|
8272
8323
|
CTableCaption.displayName = 'CTableCaption';
|
|
8273
8324
|
|
|
8325
|
+
var CTableResponsiveWrapper = function (_a) {
|
|
8326
|
+
var children = _a.children, responsive = _a.responsive, rest = __rest(_a, ["children", "responsive"]);
|
|
8327
|
+
return responsive ? (React__default["default"].createElement("div", __assign({ className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) }, rest), children)) : (children);
|
|
8328
|
+
};
|
|
8329
|
+
CTableResponsiveWrapper.propTypes = {
|
|
8330
|
+
children: propTypes.exports.any,
|
|
8331
|
+
responsive: propTypes.exports.oneOfType([
|
|
8332
|
+
propTypes.exports.bool,
|
|
8333
|
+
propTypes.exports.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
8334
|
+
]),
|
|
8335
|
+
};
|
|
8336
|
+
CTableResponsiveWrapper.displayName = 'CTableResponsiveWrapper';
|
|
8337
|
+
|
|
8274
8338
|
var CTable = React.forwardRef(function (_a, ref) {
|
|
8275
8339
|
var _b;
|
|
8276
8340
|
var children = _a.children, align = _a.align, borderColor = _a.borderColor, bordered = _a.bordered, borderless = _a.borderless, caption = _a.caption, captionTop = _a.captionTop, className = _a.className, color = _a.color, columns = _a.columns, footer = _a.footer, hover = _a.hover, _c = _a.items, items = _c === void 0 ? [] : _c, responsive = _a.responsive, small = _a.small, striped = _a.striped, stripedColumns = _a.stripedColumns, tableFootProps = _a.tableFootProps, tableHeadProps = _a.tableHeadProps, rest = __rest(_a, ["children", "align", "borderColor", "bordered", "borderless", "caption", "captionTop", "className", "color", "columns", "footer", "hover", "items", "responsive", "small", "striped", "stripedColumns", "tableFootProps", "tableHeadProps"]);
|
|
@@ -8310,18 +8374,17 @@ var CTable = React.forwardRef(function (_a, ref) {
|
|
|
8310
8374
|
: pretifyName(column.key)
|
|
8311
8375
|
: pretifyName(column);
|
|
8312
8376
|
};
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
React__default["default"].createElement(Table, null))) : (React__default["default"].createElement(Table, null));
|
|
8377
|
+
return (React__default["default"].createElement(CTableResponsiveWrapper, { responsive: responsive },
|
|
8378
|
+
React__default["default"].createElement("table", __assign({ className: _className }, rest, { ref: ref }),
|
|
8379
|
+
((caption && caption !== 'top') || captionTop) && (React__default["default"].createElement(CTableCaption, null, caption || captionTop)),
|
|
8380
|
+
columns && (React__default["default"].createElement(CTableHead, __assign({}, tableHeadProps),
|
|
8381
|
+
React__default["default"].createElement(CTableRow, null, columns.map(function (column, index) { return (React__default["default"].createElement(CTableHeaderCell, __assign({}, (column._props && __assign({}, column._props)), (column._style && { style: __assign({}, column._style) }), { key: index }), label(column))); })))),
|
|
8382
|
+
items && (React__default["default"].createElement(CTableBody, null, items.map(function (item, index) { return (React__default["default"].createElement(CTableRow, __assign({}, (item._props && __assign({}, item._props)), { key: index }), rawColumnNames.map(function (colName, index) {
|
|
8383
|
+
return item[colName] ? (React__default["default"].createElement(CTableDataCell, __assign({}, (item._cellProps && __assign(__assign({}, (item._cellProps['all'] && __assign({}, item._cellProps['all']))), (item._cellProps[colName] && __assign({}, item._cellProps[colName])))), { key: index }), item[colName])) : null;
|
|
8384
|
+
}))); }))),
|
|
8385
|
+
children,
|
|
8386
|
+
footer && (React__default["default"].createElement(CTableFoot, __assign({}, tableFootProps),
|
|
8387
|
+
React__default["default"].createElement(CTableRow, null, footer.map(function (item, index) { return (React__default["default"].createElement(CTableDataCell, __assign({}, (item._props && __assign({}, item._props)), { key: index }), typeof item === 'object' ? item.label : item)); })))))));
|
|
8325
8388
|
});
|
|
8326
8389
|
CTable.propTypes = {
|
|
8327
8390
|
align: propTypes.exports.oneOf(['bottom', 'middle', 'top']),
|
|
@@ -8430,7 +8493,7 @@ var CToast = React.forwardRef(function (_a, ref) {
|
|
|
8430
8493
|
return (React__default["default"].createElement(Transition, { in: _visible, nodeRef: toastRef, onEnter: function () { return onShow && onShow(index ? index : null); }, onExited: function () { return onClose && onClose(index ? index : null); }, timeout: 250, unmountOnExit: true }, function (state) {
|
|
8431
8494
|
var transitionClass = getTransitionClass(state);
|
|
8432
8495
|
return (React__default["default"].createElement(CToastContext.Provider, { value: contextValues },
|
|
8433
|
-
React__default["default"].createElement("div", __assign({ className: classNames(_className, transitionClass), "aria-live": "assertive", "aria-atomic": "true", role: "alert", onMouseEnter: function () { return clearTimeout(timeout.current); }, onMouseLeave: function () { return _autohide; } }, rest, { key: key, ref: forkedRef }), children)));
|
|
8496
|
+
React__default["default"].createElement("div", __assign({ className: classNames(_className, transitionClass), "aria-live": "assertive", "aria-atomic": "true", role: "alert", onMouseEnter: function () { return clearTimeout(timeout.current); }, onMouseLeave: function () { return _autohide(); } }, rest, { key: key, ref: forkedRef }), children)));
|
|
8434
8497
|
}));
|
|
8435
8498
|
});
|
|
8436
8499
|
CToast.propTypes = {
|