@coreui/react 4.9.0-rc.0 → 4.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coreui/react",
3
- "version": "4.9.0-rc.0",
3
+ "version": "4.9.1",
4
4
  "description": "UI Components Library for React.js",
5
5
  "keywords": [
6
6
  "react",
@@ -38,25 +38,25 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@popperjs/core": "^2.11.8",
41
- "@rollup/plugin-commonjs": "^25.0.1",
41
+ "@rollup/plugin-commonjs": "^25.0.2",
42
42
  "@rollup/plugin-node-resolve": "^15.1.0",
43
- "@rollup/plugin-typescript": "^11.1.1",
43
+ "@rollup/plugin-typescript": "^11.1.2",
44
44
  "@testing-library/jest-dom": "^5.16.5",
45
45
  "@testing-library/react": "^14.0.0",
46
- "@types/react": "18.2.12",
47
- "@types/react-dom": "^18.2.5",
46
+ "@types/react": "18.2.14",
47
+ "@types/react-dom": "^18.2.6",
48
48
  "@types/react-transition-group": "^4.4.6",
49
49
  "classnames": "^2.3.2",
50
- "jest": "^29.5.0",
51
- "jest-environment-jsdom": "^29.5.0",
50
+ "jest": "^29.6.1",
51
+ "jest-environment-jsdom": "^29.6.1",
52
52
  "prop-types": "^15.8.1",
53
53
  "react": "^18.2.0",
54
54
  "react-dom": "^18.2.0",
55
55
  "react-popper": "^2.3.0",
56
56
  "react-transition-group": "^4.4.5",
57
- "rollup": "^3.25.1",
58
- "ts-jest": "^29.1.0",
59
- "tslib": "^2.5.3",
57
+ "rollup": "^3.26.2",
58
+ "ts-jest": "^29.1.1",
59
+ "tslib": "^2.6.0",
60
60
  "typescript": "^4.9.5"
61
61
  },
62
62
  "peerDependencies": {
@@ -66,7 +66,7 @@ export interface CDropdownProps extends HTMLAttributes<HTMLDivElement | HTMLLIEl
66
66
  /**
67
67
  * Callback fired when the component requests to be hidden.
68
68
  *
69
- * @since 4.9.0-rc.0
69
+ * @since 4.9.0
70
70
  */
71
71
  onHide?: () => void
72
72
  /**
@@ -128,11 +128,13 @@ export const CModal = forwardRef<HTMLDivElement, CModalProps>(
128
128
  }, [visible])
129
129
 
130
130
  useEffect(() => {
131
- document.addEventListener('click', handleClickOutside)
132
- document.addEventListener('keydown', handleKeyDown)
131
+ if (_visible) {
132
+ document.addEventListener('mouseup', handleClickOutside)
133
+ document.addEventListener('keydown', handleKeyDown)
134
+ }
133
135
 
134
136
  return () => {
135
- document.removeEventListener('click', handleClickOutside)
137
+ document.removeEventListener('mouseup', handleClickOutside)
136
138
  document.removeEventListener('keydown', handleKeyDown)
137
139
  }
138
140
  }, [_visible])
@@ -13,7 +13,7 @@ export interface CPopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
13
13
  /**
14
14
  * Apply a CSS fade transition to the popover.
15
15
  *
16
- * @since 4.9.0-rc.0
16
+ * @since 4.9.0
17
17
  */
18
18
  animation?: boolean
19
19
  /**
@@ -31,13 +31,13 @@ export interface CPopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
31
31
  /**
32
32
  * The delay for displaying and hiding the popover (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: `{ 'show': 500, 'hide': 100 }`.
33
33
  *
34
- * @since 4.9.0-rc.0
34
+ * @since 4.9.0
35
35
  */
36
36
  delay?: number | { show: number; hide: number }
37
37
  /**
38
38
  * Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference.
39
39
  *
40
- * @since 4.9.0-rc.0
40
+ * @since 4.9.0
41
41
  */
42
42
  fallbackPlacements?: Placements | Placements[]
43
43
  /**
@@ -13,7 +13,7 @@ export interface CTooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'con
13
13
  /**
14
14
  * Apply a CSS fade transition to the tooltip.
15
15
  *
16
- * @since 4.9.0-rc.0
16
+ * @since 4.9.0
17
17
  */
18
18
  animation?: boolean
19
19
  /**
@@ -27,13 +27,13 @@ export interface CTooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'con
27
27
  /**
28
28
  * The delay for displaying and hiding the tooltip (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: `{ 'show': 500, 'hide': 100 }`.
29
29
  *
30
- * @since 4.9.0-rc.0
30
+ * @since 4.9.0
31
31
  */
32
32
  delay?: number | { show: number; hide: number }
33
33
  /**
34
34
  * Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference.
35
35
  *
36
- * @since 4.9.0-rc.0
36
+ * @since 4.9.0
37
37
  */
38
38
  fallbackPlacements?: Placements | Placements[]
39
39
  /**
@@ -1,5 +1,5 @@
1
1
  import { Placement } from '@popperjs/core'
2
- import { isRTL } from '../utils'
2
+ import isRTL from './isRTL'
3
3
 
4
4
  const getRTLPlacement = (placement: string, element: HTMLDivElement | null): Placement => {
5
5
  switch (placement) {