@coreui/react 4.2.0 → 4.2.3

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.2.0",
3
+ "version": "4.2.3",
4
4
  "description": "UI Components Library for React.js",
5
5
  "keywords": [
6
6
  "react",
@@ -36,27 +36,27 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@popperjs/core": "^2.11.5",
39
- "@rollup/plugin-commonjs": "^21.0.3",
40
- "@rollup/plugin-node-resolve": "^13.1.3",
41
- "@rollup/plugin-typescript": "^8.3.1",
39
+ "@rollup/plugin-commonjs": "^22.0.0",
40
+ "@rollup/plugin-node-resolve": "^13.3.0",
41
+ "@rollup/plugin-typescript": "^8.3.3",
42
42
  "@testing-library/jest-dom": "^5.16.4",
43
- "@testing-library/react": "^12.1.4",
44
- "@types/react": "17.0.39",
45
- "@types/react-dom": "^17.0.15",
46
- "@types/react-transition-group": "^4.4.4",
43
+ "@testing-library/react": "^13.3.0",
44
+ "@types/react": "18.0.14",
45
+ "@types/react-dom": "^18.0.5",
46
+ "@types/react-transition-group": "^4.4.5",
47
47
  "classnames": "^2.3.1",
48
48
  "prop-types": "^15.8.1",
49
- "react": "^17.0.2",
50
- "react-dom": "^17.0.2",
49
+ "react": "^18.2.0",
50
+ "react-dom": "^18.2.0",
51
51
  "react-popper": "^2.2.5",
52
52
  "react-transition-group": "^4.4.2",
53
- "rollup": "^2.70.1",
53
+ "rollup": "^2.75.7",
54
54
  "rollup-plugin-peer-deps-external": "^2.2.4",
55
55
  "tslib": "^2.4.0",
56
- "typescript": "^4.6.3"
56
+ "typescript": "^4.7.4"
57
57
  },
58
58
  "peerDependencies": {
59
- "react": "^17",
60
- "react-dom": "^17"
59
+ "react": ">=17",
60
+ "react-dom": ">=17"
61
61
  }
62
62
  }
@@ -1,9 +1,9 @@
1
- import React, { ElementType, forwardRef, HTMLAttributes } from 'react'
1
+ import React, { ElementType, forwardRef, ImgHTMLAttributes } from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import classNames from 'classnames'
4
4
 
5
5
  export interface CCardImageProps
6
- extends HTMLAttributes<HTMLImageElement | HTMLOrSVGElement | HTMLOrSVGImageElement> {
6
+ extends ImgHTMLAttributes<HTMLImageElement | HTMLOrSVGElement | HTMLOrSVGImageElement> {
7
7
  /**
8
8
  * A string of all className you want applied to the base component.
9
9
  */
@@ -29,7 +29,14 @@ export const CCloseButton = forwardRef<HTMLButtonElement, CCloseButtonProps>(
29
29
  className,
30
30
  )
31
31
  return (
32
- <button className={_className} aria-label="Close" disabled={disabled} {...rest} ref={ref} />
32
+ <button
33
+ type="button"
34
+ className={_className}
35
+ aria-label="Close"
36
+ disabled={disabled}
37
+ {...rest}
38
+ ref={ref}
39
+ />
33
40
  )
34
41
  },
35
42
  )
@@ -1,4 +1,4 @@
1
- import React, { ChangeEventHandler, forwardRef, InputHTMLAttributes } from 'react'
1
+ import React, { ChangeEventHandler, forwardRef, TextareaHTMLAttributes } from 'react'
2
2
 
3
3
  import classNames from 'classnames'
4
4
  import PropTypes from 'prop-types'
@@ -7,7 +7,7 @@ import { CFormControlWrapper, CFormControlWrapperProps } from './CFormControlWra
7
7
 
8
8
  export interface CFormTextareaProps
9
9
  extends CFormControlWrapperProps,
10
- InputHTMLAttributes<HTMLTextAreaElement> {
10
+ TextareaHTMLAttributes<HTMLTextAreaElement> {
11
11
  /**
12
12
  * A string of all className you want applied to the component.
13
13
  */
@@ -78,7 +78,7 @@ export const CFormTextarea = forwardRef<HTMLTextAreaElement, CFormTextareaProps>
78
78
  tooltipFeedback={tooltipFeedback}
79
79
  valid={valid}
80
80
  >
81
- <textarea className={_className} {...rest} ref={ref}>
81
+ <textarea className={_className} id={id} {...rest} ref={ref}>
82
82
  {children}
83
83
  </textarea>
84
84
  </CFormControlWrapper>
@@ -19,6 +19,7 @@ test('CFormTextarea customize', async () => {
19
19
  readOnly={true}
20
20
  valid={true}
21
21
  defaultValue="Some value"
22
+ rows={2}
22
23
  />,
23
24
  )
24
25
  expect(container).toMatchSnapshot()
@@ -193,7 +193,7 @@ export const CModal = forwardRef<HTMLDivElement, CModalProps>(
193
193
  }
194
194
 
195
195
  const handleKeyDown = useCallback(
196
- (event) => {
196
+ (event: KeyboardEvent) => {
197
197
  if (event.key === 'Escape' && keyboard) {
198
198
  return handleDismiss()
199
199
  }
@@ -107,7 +107,7 @@ export const COffcanvas = forwardRef<HTMLDivElement, COffcanvasProps>(
107
107
  }
108
108
 
109
109
  const handleKeyDown = useCallback(
110
- (event) => {
110
+ (event: React.KeyboardEvent<HTMLDivElement>) => {
111
111
  if (event.key === 'Escape' && keyboard) {
112
112
  return handleDismiss()
113
113
  }
@@ -9,7 +9,7 @@ exports[`CPopover customize 1`] = `
9
9
  Test
10
10
  </button>
11
11
  <div
12
- class="popover bs-popover-end fade show"
12
+ class="popover bs-popover-end fade"
13
13
  role="tooltip"
14
14
  style="position: absolute; left: 0px; top: 0px;"
15
15
  >
@@ -4,7 +4,7 @@ import classNames from 'classnames'
4
4
 
5
5
  import { Colors, colorPropType } from '../Types'
6
6
 
7
- export interface CTableProps extends TableHTMLAttributes<HTMLTableElement> {
7
+ export interface CTableProps extends Omit<TableHTMLAttributes<HTMLTableElement>, 'align'> {
8
8
  /**
9
9
  * Set the vertical aligment.
10
10
  */