@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.
Files changed (30) hide show
  1. package/README.md +1 -1
  2. package/dist/components/dropdown/CDropdown.d.ts +1 -3
  3. package/dist/components/table/CTable.d.ts +1 -1
  4. package/dist/components/table/CTableDataCell.d.ts +5 -1
  5. package/dist/components/table/CTableResponsiveWrapper.d.ts +9 -0
  6. package/dist/components/table/CTableRow.d.ts +1 -1
  7. package/dist/index.es.js +146 -83
  8. package/dist/index.es.js.map +1 -1
  9. package/dist/index.js +146 -83
  10. package/dist/index.js.map +1 -1
  11. package/package.json +10 -10
  12. package/src/components/alert/__tests__/__snapshots__/CAlert.spec.tsx.snap +1 -0
  13. package/src/components/button/__tests__/__snapshots__/CButtonClose.spec.tsx.snap +2 -0
  14. package/src/components/carousel/CCarousel.tsx +1 -1
  15. package/src/components/close-button/__tests__/__snapshots__/CCloseButton.spec.tsx.snap +2 -0
  16. package/src/components/dropdown/CDropdown.tsx +7 -5
  17. package/src/components/dropdown/CDropdownMenu.tsx +8 -0
  18. package/src/components/dropdown/CDropdownToggle.tsx +1 -1
  19. package/src/components/form/__tests__/__snapshots__/CFormTextarea.spec.tsx.snap +1 -0
  20. package/src/components/modal/CModal.tsx +18 -1
  21. package/src/components/modal/__tests__/__snapshots__/CModalHeader.spec.tsx.snap +2 -0
  22. package/src/components/nav/CNavGroup.tsx +4 -1
  23. package/src/components/sidebar/CSidebarNav.tsx +4 -1
  24. package/src/components/table/CTable.tsx +56 -65
  25. package/src/components/table/CTableDataCell.tsx +5 -1
  26. package/src/components/table/CTableResponsiveWrapper.tsx +39 -0
  27. package/src/components/table/CTableRow.tsx +1 -1
  28. package/src/components/table/__tests__/CTable.spec.tsx +45 -0
  29. package/src/components/table/__tests__/__snapshots__/CTable.spec.tsx.snap +86 -2
  30. package/src/components/toast/CToast.tsx +1 -1
package/README.md CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  Several quick start options are available:
48
48
 
49
- - [Download the latest release](https://github.com/coreui/coreui-react/archive/v4.2.2.zip)
49
+ - [Download the latest release](https://github.com/coreui/coreui-react/archive/v4.4.0.zip)
50
50
  - Clone the repo: `git clone https://github.com/coreui/coreui-react.git`
51
51
  - Install with [npm](https://www.npmjs.com/): `npm install @coreui/react`
52
52
  - Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/react`
@@ -44,10 +44,8 @@ export interface CDropdownProps extends HTMLAttributes<HTMLDivElement | HTMLLIEl
44
44
  dark?: boolean;
45
45
  /**
46
46
  * Sets a specified direction and location of the dropdown menu.
47
- *
48
- * @type 'dropup' | 'dropend' | 'dropstart'
49
47
  */
50
- direction?: 'dropup' | 'dropend' | 'dropstart';
48
+ direction?: 'center' | 'dropup' | 'dropup-center' | 'dropend' | 'dropstart';
51
49
  /**
52
50
  * Callback fired when the component requests to be hidden.
53
51
  */
@@ -9,7 +9,7 @@ export interface CTableProps extends Omit<TableHTMLAttributes<HTMLTableElement>,
9
9
  /**
10
10
  * Set the vertical aligment.
11
11
  */
12
- align?: 'bottom' | 'middle' | 'top';
12
+ align?: 'bottom' | 'middle' | 'top' | string;
13
13
  /**
14
14
  * Sets the border color of the component to one of CoreUI’s themed colors.
15
15
  *
@@ -8,7 +8,7 @@ export interface CTableDataCellProps extends Omit<TdHTMLAttributes<HTMLTableCell
8
8
  /**
9
9
  * Set the vertical aligment.
10
10
  */
11
- align?: 'bottom' | 'middle' | 'top';
11
+ align?: 'bottom' | 'middle' | 'top' | string;
12
12
  /**
13
13
  * A string of all className you want applied to the component.
14
14
  */
@@ -19,5 +19,9 @@ export interface CTableDataCellProps extends Omit<TdHTMLAttributes<HTMLTableCell
19
19
  * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
20
20
  */
21
21
  color?: Colors;
22
+ /**
23
+ * @ignore
24
+ */
25
+ colSpan?: number;
22
26
  }
23
27
  export declare const CTableDataCell: React.ForwardRefExoticComponent<CTableDataCellProps & React.RefAttributes<HTMLTableCellElement>>;
@@ -0,0 +1,9 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ export interface CTableResponsiveWrapperProps extends HTMLAttributes<HTMLDivElement> {
3
+ children: any;
4
+ /**
5
+ * Make any table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to.
6
+ */
7
+ responsive?: boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
8
+ }
9
+ export declare const CTableResponsiveWrapper: FC<CTableResponsiveWrapperProps>;
@@ -8,7 +8,7 @@ export interface CTableRowProps extends HTMLAttributes<HTMLTableRowElement> {
8
8
  /**
9
9
  * Set the vertical aligment.
10
10
  */
11
- align?: 'bottom' | 'middle' | 'top';
11
+ align?: 'bottom' | 'middle' | 'top' | string;
12
12
  /**
13
13
  * A string of all className you want applied to the component.
14
14
  */
package/dist/index.es.js CHANGED
@@ -1236,9 +1236,9 @@ if (process.env.NODE_ENV !== 'production') {
1236
1236
  var classnames = {exports: {}};
1237
1237
 
1238
1238
  /*!
1239
- Copyright (c) 2018 Jed Watson.
1240
- Licensed under the MIT License (MIT), see
1241
- http://jedwatson.github.io/classnames
1239
+ Copyright (c) 2018 Jed Watson.
1240
+ Licensed under the MIT License (MIT), see
1241
+ http://jedwatson.github.io/classnames
1242
1242
  */
1243
1243
 
1244
1244
  (function (module) {
@@ -1267,14 +1267,15 @@ var classnames = {exports: {}};
1267
1267
  }
1268
1268
  }
1269
1269
  } else if (argType === 'object') {
1270
- if (arg.toString === Object.prototype.toString) {
1271
- for (var key in arg) {
1272
- if (hasOwn.call(arg, key) && arg[key]) {
1273
- classes.push(key);
1274
- }
1275
- }
1276
- } else {
1270
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
1277
1271
  classes.push(arg.toString());
1272
+ continue;
1273
+ }
1274
+
1275
+ for (var key in arg) {
1276
+ if (hasOwn.call(arg, key) && arg[key]) {
1277
+ classes.push(key);
1278
+ }
1278
1279
  }
1279
1280
  }
1280
1281
  }
@@ -1334,7 +1335,7 @@ CAccordionItem.propTypes = {
1334
1335
  CAccordionItem.displayName = 'CAccordionItem';
1335
1336
 
1336
1337
  function _extends() {
1337
- _extends = Object.assign || function (target) {
1338
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
1338
1339
  for (var i = 1; i < arguments.length; i++) {
1339
1340
  var source = arguments[i];
1340
1341
 
@@ -1347,7 +1348,6 @@ function _extends() {
1347
1348
 
1348
1349
  return target;
1349
1350
  };
1350
-
1351
1351
  return _extends.apply(this, arguments);
1352
1352
  }
1353
1353
 
@@ -1367,11 +1367,10 @@ function _objectWithoutPropertiesLoose(source, excluded) {
1367
1367
  }
1368
1368
 
1369
1369
  function _setPrototypeOf(o, p) {
1370
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
1370
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
1371
1371
  o.__proto__ = p;
1372
1372
  return o;
1373
1373
  };
1374
-
1375
1374
  return _setPrototypeOf(o, p);
1376
1375
  }
1377
1376
 
@@ -1448,6 +1447,10 @@ var classNamesShape = process.env.NODE_ENV !== 'production' ? propTypes.exports.
1448
1447
 
1449
1448
  var TransitionGroupContext = React__default.createContext(null);
1450
1449
 
1450
+ var forceReflow = function forceReflow(node) {
1451
+ return node.scrollTop;
1452
+ };
1453
+
1451
1454
  var UNMOUNTED = 'unmounted';
1452
1455
  var EXITED = 'exited';
1453
1456
  var ENTERING = 'entering';
@@ -1667,6 +1670,14 @@ var Transition = /*#__PURE__*/function (_React$Component) {
1667
1670
  this.cancelNextCallback();
1668
1671
 
1669
1672
  if (nextStatus === ENTERING) {
1673
+ if (this.props.unmountOnExit || this.props.mountOnEnter) {
1674
+ var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM__default.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749
1675
+ // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.
1676
+ // To make the animation happen, we have to separate each rendering and avoid being processed as batched.
1677
+
1678
+ if (node) forceReflow(node);
1679
+ }
1680
+
1670
1681
  this.performEnter(mounting);
1671
1682
  } else {
1672
1683
  this.performExit();
@@ -2275,8 +2286,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
2275
2286
 
2276
2287
 
2277
2288
  if (phase === 'active') {
2278
- /* eslint-disable no-unused-expressions */
2279
- node && node.scrollTop;
2289
+ if (node) forceReflow(node);
2280
2290
  }
2281
2291
 
2282
2292
  if (className) {
@@ -4219,38 +4229,57 @@ var max = Math.max;
4219
4229
  var min = Math.min;
4220
4230
  var round = Math.round;
4221
4231
 
4222
- function getBoundingClientRect(element, includeScale) {
4232
+ function getUAString() {
4233
+ var uaData = navigator.userAgentData;
4234
+
4235
+ if (uaData != null && uaData.brands) {
4236
+ return uaData.brands.map(function (item) {
4237
+ return item.brand + "/" + item.version;
4238
+ }).join(' ');
4239
+ }
4240
+
4241
+ return navigator.userAgent;
4242
+ }
4243
+
4244
+ function isLayoutViewport() {
4245
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
4246
+ }
4247
+
4248
+ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
4223
4249
  if (includeScale === void 0) {
4224
4250
  includeScale = false;
4225
4251
  }
4226
4252
 
4227
- var rect = element.getBoundingClientRect();
4253
+ if (isFixedStrategy === void 0) {
4254
+ isFixedStrategy = false;
4255
+ }
4256
+
4257
+ var clientRect = element.getBoundingClientRect();
4228
4258
  var scaleX = 1;
4229
4259
  var scaleY = 1;
4230
4260
 
4231
- if (isHTMLElement(element) && includeScale) {
4232
- var offsetHeight = element.offsetHeight;
4233
- var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
4234
- // Fallback to 1 in case both values are `0`
4235
-
4236
- if (offsetWidth > 0) {
4237
- scaleX = round(rect.width) / offsetWidth || 1;
4238
- }
4239
-
4240
- if (offsetHeight > 0) {
4241
- scaleY = round(rect.height) / offsetHeight || 1;
4242
- }
4261
+ if (includeScale && isHTMLElement(element)) {
4262
+ scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
4263
+ scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
4243
4264
  }
4244
4265
 
4266
+ var _ref = isElement(element) ? getWindow(element) : window,
4267
+ visualViewport = _ref.visualViewport;
4268
+
4269
+ var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
4270
+ var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
4271
+ var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
4272
+ var width = clientRect.width / scaleX;
4273
+ var height = clientRect.height / scaleY;
4245
4274
  return {
4246
- width: rect.width / scaleX,
4247
- height: rect.height / scaleY,
4248
- top: rect.top / scaleY,
4249
- right: rect.right / scaleX,
4250
- bottom: rect.bottom / scaleY,
4251
- left: rect.left / scaleX,
4252
- x: rect.left / scaleX,
4253
- y: rect.top / scaleY
4275
+ width: width,
4276
+ height: height,
4277
+ top: y,
4278
+ right: x + width,
4279
+ bottom: y + height,
4280
+ left: x,
4281
+ x: x,
4282
+ y: y
4254
4283
  };
4255
4284
  }
4256
4285
 
@@ -4345,8 +4374,8 @@ function getTrueOffsetParent(element) {
4345
4374
 
4346
4375
 
4347
4376
  function getContainingBlock(element) {
4348
- var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
4349
- var isIE = navigator.userAgent.indexOf('Trident') !== -1;
4377
+ var isFirefox = /firefox/i.test(getUAString());
4378
+ var isIE = /Trident/i.test(getUAString());
4350
4379
 
4351
4380
  if (isIE && isHTMLElement(element)) {
4352
4381
  // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
@@ -4786,31 +4815,21 @@ function getWindowScrollBarX(element) {
4786
4815
  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
4787
4816
  }
4788
4817
 
4789
- function getViewportRect(element) {
4818
+ function getViewportRect(element, strategy) {
4790
4819
  var win = getWindow(element);
4791
4820
  var html = getDocumentElement(element);
4792
4821
  var visualViewport = win.visualViewport;
4793
4822
  var width = html.clientWidth;
4794
4823
  var height = html.clientHeight;
4795
4824
  var x = 0;
4796
- var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
4797
- // can be obscured underneath it.
4798
- // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
4799
- // if it isn't open, so if this isn't available, the popper will be detected
4800
- // to overflow the bottom of the screen too early.
4825
+ var y = 0;
4801
4826
 
4802
4827
  if (visualViewport) {
4803
4828
  width = visualViewport.width;
4804
- height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
4805
- // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
4806
- // errors due to floating point numbers, so we need to check precision.
4807
- // Safari returns a number <= 0, usually < -1 when pinch-zoomed
4808
- // Feature detection fails in mobile emulation mode in Chrome.
4809
- // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
4810
- // 0.001
4811
- // Fallback here: "Not Safari" userAgent
4812
-
4813
- if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
4829
+ height = visualViewport.height;
4830
+ var layoutViewport = isLayoutViewport();
4831
+
4832
+ if (layoutViewport || !layoutViewport && strategy === 'fixed') {
4814
4833
  x = visualViewport.offsetLeft;
4815
4834
  y = visualViewport.offsetTop;
4816
4835
  }
@@ -4904,8 +4923,8 @@ function rectToClientRect(rect) {
4904
4923
  });
4905
4924
  }
4906
4925
 
4907
- function getInnerBoundingClientRect(element) {
4908
- var rect = getBoundingClientRect(element);
4926
+ function getInnerBoundingClientRect(element, strategy) {
4927
+ var rect = getBoundingClientRect(element, false, strategy === 'fixed');
4909
4928
  rect.top = rect.top + element.clientTop;
4910
4929
  rect.left = rect.left + element.clientLeft;
4911
4930
  rect.bottom = rect.top + element.clientHeight;
@@ -4917,8 +4936,8 @@ function getInnerBoundingClientRect(element) {
4917
4936
  return rect;
4918
4937
  }
4919
4938
 
4920
- function getClientRectFromMixedType(element, clippingParent) {
4921
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
4939
+ function getClientRectFromMixedType(element, clippingParent, strategy) {
4940
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
4922
4941
  } // A "clipping parent" is an overflowable container with the characteristic of
4923
4942
  // clipping (or hiding) overflowing elements with a position different from
4924
4943
  // `initial`
@@ -4941,18 +4960,18 @@ function getClippingParents(element) {
4941
4960
  // clipping parents
4942
4961
 
4943
4962
 
4944
- function getClippingRect(element, boundary, rootBoundary) {
4963
+ function getClippingRect(element, boundary, rootBoundary, strategy) {
4945
4964
  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
4946
4965
  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
4947
4966
  var firstClippingParent = clippingParents[0];
4948
4967
  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
4949
- var rect = getClientRectFromMixedType(element, clippingParent);
4968
+ var rect = getClientRectFromMixedType(element, clippingParent, strategy);
4950
4969
  accRect.top = max(rect.top, accRect.top);
4951
4970
  accRect.right = min(rect.right, accRect.right);
4952
4971
  accRect.bottom = min(rect.bottom, accRect.bottom);
4953
4972
  accRect.left = max(rect.left, accRect.left);
4954
4973
  return accRect;
4955
- }, getClientRectFromMixedType(element, firstClippingParent));
4974
+ }, getClientRectFromMixedType(element, firstClippingParent, strategy));
4956
4975
  clippingRect.width = clippingRect.right - clippingRect.left;
4957
4976
  clippingRect.height = clippingRect.bottom - clippingRect.top;
4958
4977
  clippingRect.x = clippingRect.left;
@@ -5033,6 +5052,8 @@ function detectOverflow(state, options) {
5033
5052
  var _options = options,
5034
5053
  _options$placement = _options.placement,
5035
5054
  placement = _options$placement === void 0 ? state.placement : _options$placement,
5055
+ _options$strategy = _options.strategy,
5056
+ strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,
5036
5057
  _options$boundary = _options.boundary,
5037
5058
  boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
5038
5059
  _options$rootBoundary = _options.rootBoundary,
@@ -5047,7 +5068,7 @@ function detectOverflow(state, options) {
5047
5068
  var altContext = elementContext === popper ? reference : popper;
5048
5069
  var popperRect = state.rects.popper;
5049
5070
  var element = state.elements[altBoundary ? altContext : elementContext];
5050
- var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
5071
+ var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
5051
5072
  var referenceClientRect = getBoundingClientRect(state.elements.reference);
5052
5073
  var popperOffsets = computeOffsets({
5053
5074
  reference: referenceClientRect,
@@ -5565,7 +5586,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
5565
5586
  var isOffsetParentAnElement = isHTMLElement(offsetParent);
5566
5587
  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
5567
5588
  var documentElement = getDocumentElement(offsetParent);
5568
- var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
5589
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
5569
5590
  var scroll = {
5570
5591
  scrollLeft: 0,
5571
5592
  scrollTop: 0
@@ -6437,7 +6458,11 @@ var CDropdown = forwardRef(function (_a, ref) {
6437
6458
  };
6438
6459
  var _className = classNames(variant === 'nav-item' ? 'nav-item dropdown' : variant, {
6439
6460
  show: _visible,
6440
- }, direction, className);
6461
+ }, direction === 'center'
6462
+ ? 'dropdown-center'
6463
+ : direction === 'dropup-center'
6464
+ ? 'dropup dropup-center'
6465
+ : direction, className);
6441
6466
  useEffect(function () {
6442
6467
  setVisible(visible);
6443
6468
  }, [visible]);
@@ -6471,7 +6496,7 @@ CDropdown.propTypes = {
6471
6496
  className: propTypes.exports.string,
6472
6497
  component: propTypes.exports.elementType,
6473
6498
  dark: propTypes.exports.bool,
6474
- direction: propTypes.exports.oneOf(['dropup', 'dropend', 'dropstart']),
6499
+ direction: propTypes.exports.oneOf(['center', 'dropup', 'dropup-center', 'dropend', 'dropstart']),
6475
6500
  onHide: propTypes.exports.func,
6476
6501
  onShow: propTypes.exports.func,
6477
6502
  placement: placementPropType,
@@ -6560,9 +6585,15 @@ var CDropdownMenu = function (_a) {
6560
6585
  }
6561
6586
  };
6562
6587
  var _placement = placement;
6588
+ if (direction === 'center') {
6589
+ _placement = 'bottom';
6590
+ }
6563
6591
  if (direction === 'dropup') {
6564
6592
  _placement = 'top-start';
6565
6593
  }
6594
+ if (direction === 'dropup-center') {
6595
+ _placement = 'top';
6596
+ }
6566
6597
  if (direction === 'dropend') {
6567
6598
  _placement = 'right-start';
6568
6599
  }
@@ -7323,6 +7354,10 @@ var CModal = forwardRef(function (_a, ref) {
7323
7354
  useLayoutEffect(function () {
7324
7355
  if (_visible) {
7325
7356
  document.body.classList.add('modal-open');
7357
+ if (backdrop) {
7358
+ document.body.style.overflow = 'hidden';
7359
+ document.body.style.paddingRight = '0px';
7360
+ }
7326
7361
  setTimeout(function () {
7327
7362
  var _a;
7328
7363
  (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.focus();
@@ -7330,8 +7365,18 @@ var CModal = forwardRef(function (_a, ref) {
7330
7365
  }
7331
7366
  else {
7332
7367
  document.body.classList.remove('modal-open');
7368
+ if (backdrop) {
7369
+ document.body.style.removeProperty('overflow');
7370
+ document.body.style.removeProperty('padding-right');
7371
+ }
7333
7372
  }
7334
- return function () { return document.body.classList.remove('modal-open'); };
7373
+ return function () {
7374
+ document.body.classList.remove('modal-open');
7375
+ if (backdrop) {
7376
+ document.body.style.removeProperty('overflow');
7377
+ document.body.style.removeProperty('padding-right');
7378
+ }
7379
+ };
7335
7380
  }, [_visible]);
7336
7381
  var handleClickOutside = function (event) {
7337
7382
  if (modalContentRef.current &&
@@ -7474,7 +7519,10 @@ var CSidebarNav = forwardRef(function (_a, ref) {
7474
7519
  return (React__default.createElement("ul", __assign({ className: classes, ref: ref }, rest),
7475
7520
  React__default.createElement(CNavContext.Provider, { value: CNavContextValues }, React__default.Children.map(children, function (child, index) {
7476
7521
  if (React__default.isValidElement(child)) {
7477
- return React__default.cloneElement(child, { key: index, idx: "".concat(index) });
7522
+ return React__default.cloneElement(child, {
7523
+ key: index,
7524
+ idx: "".concat(index),
7525
+ });
7478
7526
  }
7479
7527
  return;
7480
7528
  }))));
@@ -7534,7 +7582,10 @@ var CNavGroup = forwardRef(function (_a, ref) {
7534
7582
  compact: compact,
7535
7583
  }), style: __assign(__assign({}, style), transitionStyles[state]), ref: navItemsRef }, React__default.Children.map(children, function (child, index) {
7536
7584
  if (React__default.isValidElement(child)) {
7537
- return React__default.cloneElement(child, { key: index, idx: "".concat(idx, ".").concat(index) });
7585
+ return React__default.cloneElement(child, {
7586
+ key: index,
7587
+ idx: "".concat(idx, ".").concat(index),
7588
+ });
7538
7589
  }
7539
7590
  return;
7540
7591
  }))); })));
@@ -8244,6 +8295,19 @@ CTableCaption.propTypes = {
8244
8295
  };
8245
8296
  CTableCaption.displayName = 'CTableCaption';
8246
8297
 
8298
+ var CTableResponsiveWrapper = function (_a) {
8299
+ var children = _a.children, responsive = _a.responsive, rest = __rest(_a, ["children", "responsive"]);
8300
+ return responsive ? (React__default.createElement("div", __assign({ className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) }, rest), children)) : (children);
8301
+ };
8302
+ CTableResponsiveWrapper.propTypes = {
8303
+ children: propTypes.exports.any,
8304
+ responsive: propTypes.exports.oneOfType([
8305
+ propTypes.exports.bool,
8306
+ propTypes.exports.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
8307
+ ]),
8308
+ };
8309
+ CTableResponsiveWrapper.displayName = 'CTableResponsiveWrapper';
8310
+
8247
8311
  var CTable = forwardRef(function (_a, ref) {
8248
8312
  var _b;
8249
8313
  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"]);
@@ -8283,18 +8347,17 @@ var CTable = forwardRef(function (_a, ref) {
8283
8347
  : pretifyName(column.key)
8284
8348
  : pretifyName(column);
8285
8349
  };
8286
- var Table = function () { return (React__default.createElement("table", __assign({ className: _className }, rest, { ref: ref }),
8287
- ((caption && caption !== 'top') || captionTop) && (React__default.createElement(CTableCaption, null, caption || captionTop)),
8288
- columns && (React__default.createElement(CTableHead, __assign({}, tableHeadProps),
8289
- React__default.createElement(CTableRow, null, columns.map(function (column, index) { return (React__default.createElement(CTableHeaderCell, __assign({}, (column._props && __assign({}, column._props)), (column._style && { style: __assign({}, column._style) }), { key: index }), label(column))); })))),
8290
- items && (React__default.createElement(CTableBody, null, items.map(function (item, index) { return (React__default.createElement(CTableRow, __assign({}, (item._props && __assign({}, item._props)), { key: index }), rawColumnNames.map(function (colName, index) {
8291
- return item[colName] ? (React__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;
8292
- }))); }))),
8293
- children,
8294
- footer && (React__default.createElement(CTableFoot, __assign({}, tableFootProps),
8295
- React__default.createElement(CTableRow, null, footer.map(function (item, index) { return (React__default.createElement(CTableDataCell, __assign({}, (item._props && __assign({}, item._props)), { key: index }), typeof item === 'object' ? item.label : item)); })))))); };
8296
- return responsive ? (React__default.createElement("div", { className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) },
8297
- React__default.createElement(Table, null))) : (React__default.createElement(Table, null));
8350
+ return (React__default.createElement(CTableResponsiveWrapper, { responsive: responsive },
8351
+ React__default.createElement("table", __assign({ className: _className }, rest, { ref: ref }),
8352
+ ((caption && caption !== 'top') || captionTop) && (React__default.createElement(CTableCaption, null, caption || captionTop)),
8353
+ columns && (React__default.createElement(CTableHead, __assign({}, tableHeadProps),
8354
+ React__default.createElement(CTableRow, null, columns.map(function (column, index) { return (React__default.createElement(CTableHeaderCell, __assign({}, (column._props && __assign({}, column._props)), (column._style && { style: __assign({}, column._style) }), { key: index }), label(column))); })))),
8355
+ items && (React__default.createElement(CTableBody, null, items.map(function (item, index) { return (React__default.createElement(CTableRow, __assign({}, (item._props && __assign({}, item._props)), { key: index }), rawColumnNames.map(function (colName, index) {
8356
+ return item[colName] ? (React__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;
8357
+ }))); }))),
8358
+ children,
8359
+ footer && (React__default.createElement(CTableFoot, __assign({}, tableFootProps),
8360
+ React__default.createElement(CTableRow, null, footer.map(function (item, index) { return (React__default.createElement(CTableDataCell, __assign({}, (item._props && __assign({}, item._props)), { key: index }), typeof item === 'object' ? item.label : item)); })))))));
8298
8361
  });
8299
8362
  CTable.propTypes = {
8300
8363
  align: propTypes.exports.oneOf(['bottom', 'middle', 'top']),
@@ -8403,7 +8466,7 @@ var CToast = forwardRef(function (_a, ref) {
8403
8466
  return (React__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) {
8404
8467
  var transitionClass = getTransitionClass(state);
8405
8468
  return (React__default.createElement(CToastContext.Provider, { value: contextValues },
8406
- React__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)));
8469
+ React__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)));
8407
8470
  }));
8408
8471
  });
8409
8472
  CToast.propTypes = {