@coreui/react 4.1.0 → 4.1.1

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.
@@ -5,7 +5,7 @@ export interface CPopoverProps {
5
5
  /**
6
6
  * Content node for your component.
7
7
  */
8
- content: ReactNode;
8
+ content: ReactNode | string;
9
9
  /**
10
10
  * Offset of the popover relative to its target.
11
11
  */
@@ -21,7 +21,7 @@ export interface CPopoverProps {
21
21
  /**
22
22
  * Title node for your component.
23
23
  */
24
- title?: ReactNode;
24
+ title?: ReactNode | string;
25
25
  /**
26
26
  * Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
27
27
  *
@@ -5,7 +5,7 @@ export interface CTooltipProps {
5
5
  /**
6
6
  * Content node for your component.
7
7
  */
8
- content: ReactNode;
8
+ content: ReactNode | string;
9
9
  /**
10
10
  * Callback fired when the component requests to be hidden.
11
11
  */
package/dist/index.es.js CHANGED
@@ -2360,6 +2360,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
2360
2360
  var CSSTransition$1 = CSSTransition;
2361
2361
 
2362
2362
  // code borrowed from https://github.com/reach/reach-ui
2363
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2363
2364
  function useForkedRef() {
2364
2365
  var refs = [];
2365
2366
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -2369,6 +2370,7 @@ function useForkedRef() {
2369
2370
  if (refs.every(function (ref) { return ref == null; })) {
2370
2371
  return null;
2371
2372
  }
2373
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2372
2374
  return function (node) {
2373
2375
  refs.forEach(function (ref) {
2374
2376
  assignRef(ref, node);
@@ -2376,7 +2378,10 @@ function useForkedRef() {
2376
2378
  };
2377
2379
  }, refs);
2378
2380
  }
2379
- function assignRef(ref, value) {
2381
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2382
+ function assignRef(ref,
2383
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2384
+ value) {
2380
2385
  if (ref == null)
2381
2386
  return;
2382
2387
  if (isFunction(ref)) {
@@ -2391,6 +2396,7 @@ function assignRef(ref, value) {
2391
2396
  }
2392
2397
  }
2393
2398
  }
2399
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
2394
2400
  function isFunction(value) {
2395
2401
  return !!(value && {}.toString.call(value) == '[object Function]');
2396
2402
  }
@@ -6919,12 +6925,12 @@ var CPopover = function (_a) {
6919
6925
  };
6920
6926
  CPopover.propTypes = {
6921
6927
  children: PropTypes.any,
6922
- content: PropTypes.node,
6928
+ content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
6923
6929
  placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
6924
6930
  offset: PropTypes.any,
6925
6931
  onHide: PropTypes.func,
6926
6932
  onShow: PropTypes.func,
6927
- title: PropTypes.string,
6933
+ title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
6928
6934
  trigger: triggerPropType,
6929
6935
  visible: PropTypes.bool,
6930
6936
  };
@@ -7614,7 +7620,7 @@ var CTooltip = function (_a) {
7614
7620
  };
7615
7621
  CTooltip.propTypes = {
7616
7622
  children: PropTypes.any,
7617
- content: PropTypes.node,
7623
+ content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
7618
7624
  placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
7619
7625
  onHide: PropTypes.func,
7620
7626
  onShow: PropTypes.func,