@coreui/react-pro 4.8.0 → 4.9.0-next.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/README.md +1 -1
- package/dist/components/alert/CAlert.d.ts +1 -1
- package/dist/components/avatar/CAvatar.d.ts +1 -1
- package/dist/components/badge/CBadge.d.ts +1 -1
- package/dist/components/button/CButton.d.ts +1 -1
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/calendar/utils.d.ts +22 -0
- package/dist/components/callout/CCallout.d.ts +1 -1
- package/dist/components/card/CCard.d.ts +1 -1
- package/dist/components/date-picker/CDatePicker.d.ts +1 -1
- package/dist/components/date-range-picker/CDateRangePicker.d.ts +3 -3
- package/dist/components/date-range-picker/utils.d.ts +1 -0
- package/dist/components/dropdown/CDropdown.d.ts +1 -1
- package/dist/components/dropdown/CDropdownToggle.d.ts +1 -1
- package/dist/components/element-cover/CElementCover.d.ts +0 -4
- package/dist/components/element-cover/index.d.ts +2 -0
- package/dist/components/form/CFormCheck.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/list-group/CListGroupItem.d.ts +4 -5
- package/dist/components/multi-select/CMultiSelect.d.ts +1 -13
- package/dist/components/multi-select/CMultiSelectNativeSelect.d.ts +1 -1
- package/dist/components/multi-select/CMultiSelectOptions.d.ts +1 -1
- package/dist/components/multi-select/CMultiSelectSelection.d.ts +1 -1
- package/dist/components/multi-select/types.d.ts +14 -0
- package/dist/components/multi-select/utils.d.ts +6 -0
- package/dist/components/navbar/CNavbar.d.ts +1 -1
- package/dist/components/offcanvas/COffcanvas.d.ts +7 -1
- package/dist/components/picker/CPicker.d.ts +1 -1
- package/dist/components/placeholder/CPlaceholder.d.ts +1 -1
- package/dist/components/popover/CPopover.d.ts +1 -1
- package/dist/components/progress/CProgressBar.d.ts +1 -1
- package/dist/components/smart-table/CSmartTableBody.d.ts +6 -5
- package/dist/components/smart-table/CSmartTableHead.d.ts +6 -3
- package/dist/components/smart-table/CSmartTableInterface.d.ts +38 -59
- package/dist/components/smart-table/types.d.ts +53 -0
- package/dist/components/smart-table/utils.d.ts +16 -0
- package/dist/components/spinner/CSpinner.d.ts +1 -1
- package/dist/components/table/CTable.d.ts +2 -18
- package/dist/components/table/CTableBody.d.ts +1 -1
- package/dist/components/table/CTableDataCell.d.ts +1 -1
- package/dist/components/table/CTableFoot.d.ts +1 -1
- package/dist/components/table/CTableHead.d.ts +1 -1
- package/dist/components/table/CTableHeaderCell.d.ts +1 -1
- package/dist/components/table/CTableRow.d.ts +1 -1
- package/dist/components/table/types.d.ts +17 -0
- package/dist/components/table/utils.d.ts +5 -0
- package/dist/components/time-picker/types.d.ts +15 -0
- package/dist/components/time-picker/utils.d.ts +23 -0
- package/dist/components/toast/CToast.d.ts +1 -1
- package/dist/components/toast/CToastClose.d.ts +1 -1
- package/dist/components/tooltip/CTooltip.d.ts +1 -1
- package/dist/components/virtual-scroller/CVirtualScroller.d.ts +0 -8
- package/dist/components/widgets/CWidgetStatsA.d.ts +1 -1
- package/dist/components/widgets/CWidgetStatsB.d.ts +1 -1
- package/dist/components/widgets/CWidgetStatsC.d.ts +1 -1
- package/dist/components/widgets/CWidgetStatsD.d.ts +1 -1
- package/dist/components/widgets/CWidgetStatsF.d.ts +1 -1
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useForkedRef.d.ts +7 -0
- package/dist/hooks/useStateWithCallback.d.ts +2 -0
- package/dist/index.es.js +1171 -1109
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1171 -1108
- package/dist/index.js.map +1 -1
- package/dist/props.d.ts +8 -0
- package/dist/types.d.ts +7 -0
- package/dist/utils/index.d.ts +2 -3
- package/dist/utils/isObjectInArray.d.ts +2 -0
- package/package.json +11 -11
- package/src/components/accordion/CAccordionBody.tsx +1 -0
- package/src/components/accordion/CAccordionCollapse.tsx +1 -0
- package/src/components/alert/CAlert.tsx +3 -2
- package/src/components/avatar/CAvatar.tsx +2 -8
- package/src/components/backdrop/CBackdrop.tsx +2 -2
- package/src/components/badge/CBadge.tsx +2 -10
- package/src/components/button/CButton.tsx +3 -1
- package/src/components/calendar/CCalendar.tsx +351 -240
- package/src/components/calendar/index.ts +3 -0
- package/src/{utils/calendar.ts → components/calendar/utils.ts} +1 -47
- package/src/components/callout/CCallout.tsx +2 -1
- package/src/components/card/CCard.tsx +2 -1
- package/src/components/carousel/CCarousel.tsx +1 -1
- package/src/components/carousel/CCarouselItem.tsx +1 -1
- package/src/components/collapse/CCollapse.tsx +1 -1
- package/src/components/date-picker/CDatePicker.tsx +1 -1
- package/src/components/date-range-picker/CDateRangePicker.tsx +4 -4
- package/src/components/date-range-picker/utils.ts +49 -0
- package/src/components/dropdown/CDropdown.tsx +3 -2
- package/src/components/dropdown/CDropdownItem.tsx +1 -2
- package/src/components/dropdown/CDropdownMenu.tsx +2 -1
- package/src/components/dropdown/CDropdownToggle.tsx +5 -4
- package/src/components/element-cover/CElementCover.tsx +16 -22
- package/src/components/element-cover/index.ts +3 -0
- package/src/components/form/CFormCheck.tsx +3 -3
- package/src/components/form/CFormControlValidation.tsx +0 -1
- package/src/components/form/CFormControlWrapper.tsx +0 -1
- package/src/components/form/CFormInput.tsx +8 -4
- package/src/components/form/CFormRange.tsx +1 -2
- package/src/components/form/CFormSelect.tsx +1 -2
- package/src/components/form/CFormTextarea.tsx +1 -2
- package/src/components/index.ts +1 -0
- package/src/components/list-group/CListGroupItem.tsx +8 -8
- package/src/components/list-group/CListGroupItem.tsx~HEAD +3 -1
- package/src/components/modal/CModal.tsx +2 -2
- package/src/components/modal/CModalHeader.tsx +3 -2
- package/src/components/multi-select/CMultiSelect.tsx +15 -74
- package/src/components/multi-select/CMultiSelectNativeSelect.tsx +1 -1
- package/src/components/multi-select/CMultiSelectOptions.tsx +2 -2
- package/src/components/multi-select/CMultiSelectSelection.tsx +1 -1
- package/src/components/multi-select/types.ts +15 -0
- package/src/components/multi-select/utils.ts +92 -0
- package/src/components/nav/CNavItem.tsx +1 -0
- package/src/components/nav/CNavLink.tsx +4 -3
- package/src/components/navbar/CNavbar.tsx +2 -1
- package/src/components/offcanvas/COffcanvas.tsx +38 -19
- package/src/components/picker/CPicker.tsx +1 -1
- package/src/components/placeholder/CPlaceholder.tsx +2 -1
- package/src/components/popover/CPopover.tsx +2 -1
- package/src/components/progress/CProgress.tsx +1 -0
- package/src/components/progress/CProgressBar.tsx +2 -1
- package/src/components/sidebar/CSidebar.tsx +3 -2
- package/src/components/smart-table/CSmartTable.tsx +263 -257
- package/src/components/smart-table/CSmartTableBody.tsx +98 -107
- package/src/components/smart-table/CSmartTableCleaner.tsx +1 -1
- package/src/components/smart-table/CSmartTableFilter.tsx +1 -3
- package/src/components/smart-table/CSmartTableHead.tsx +56 -103
- package/src/components/smart-table/CSmartTableInterface.tsx +49 -71
- package/src/components/smart-table/CSmartTableItemsPerPageSelector.tsx +1 -2
- package/src/components/smart-table/types.ts +65 -0
- package/src/components/smart-table/utils.ts +199 -0
- package/src/components/spinner/CSpinner.tsx +2 -1
- package/src/components/table/CTable.tsx +25 -59
- package/src/components/table/CTableBody.tsx +2 -1
- package/src/components/table/CTableDataCell.tsx +2 -1
- package/src/components/table/CTableFoot.tsx +2 -1
- package/src/components/table/CTableHead.tsx +2 -1
- package/src/components/table/CTableHeaderCell.tsx +2 -1
- package/src/components/table/CTableRow.tsx +2 -1
- package/src/components/table/types.ts +20 -0
- package/src/components/table/utils.ts +29 -0
- package/src/components/tabs/CTabPane.tsx +2 -1
- package/src/components/time-picker/CTimePicker.tsx +48 -23
- package/src/components/time-picker/CTimePickerRollCol.tsx +1 -1
- package/src/components/time-picker/types.ts +15 -0
- package/src/{utils/time.ts → components/time-picker/utils.ts} +43 -2
- package/src/components/toast/CToast.tsx +4 -4
- package/src/components/toast/CToastClose.tsx +2 -2
- package/src/components/toast/CToaster.tsx +2 -1
- package/src/components/tooltip/CTooltip.tsx +3 -2
- package/src/components/virtual-scroller/CVirtualScroller.tsx +32 -55
- package/src/components/widgets/CWidgetStatsA.tsx +3 -3
- package/src/components/widgets/CWidgetStatsB.tsx +4 -4
- package/src/components/widgets/CWidgetStatsC.tsx +4 -4
- package/src/components/widgets/CWidgetStatsD.tsx +4 -5
- package/src/components/widgets/CWidgetStatsE.tsx +1 -2
- package/src/components/widgets/CWidgetStatsF.tsx +3 -4
- package/src/{components/Types.tsx → props.ts} +1 -68
- package/src/types.ts +68 -0
- package/src/utils/index.ts +2 -3
- package/src/utils/isObjectInArray.ts +14 -0
- package/src/components/multi-select/CMultiSelectCleaner.tsx +0 -18
- package/src/utils/getNextSibling.ts +0 -18
- package/src/utils/getPreviousSibling.ts +0 -18
- /package/src/{utils/hooks → hooks}/index.ts +0 -0
- /package/src/{utils/hooks → hooks}/useForkedRef.ts +0 -0
- /package/src/{utils/hooks → hooks}/useStateWithCallback.ts +0 -0
package/dist/props.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import type { Placements, Triggers } from './types';
|
|
3
|
+
export declare const colorPropType: PropTypes.Requireable<string>;
|
|
4
|
+
export declare const gradientsPropType: PropTypes.Requireable<string>;
|
|
5
|
+
export declare const placementPropType: PropTypes.Requireable<Placements>;
|
|
6
|
+
export declare const shapePropType: PropTypes.Requireable<string>;
|
|
7
|
+
export declare const textColorsPropType: PropTypes.Requireable<string>;
|
|
8
|
+
export declare const triggerPropType: PropTypes.Requireable<Triggers>;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type Breakpoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
2
|
+
export type Colors = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string;
|
|
3
|
+
export type Gradients = 'primary-gradient' | 'secondary-gradient' | 'success-gradient' | 'danger-gradient' | 'warning-gradient' | 'info-gradient' | 'dark-gradient' | 'light-gradient';
|
|
4
|
+
export type Placements = 'auto' | 'auto-start' | 'auto-end' | 'top-end' | 'top' | 'top-start' | 'bottom-end' | 'bottom' | 'bottom-start' | 'right-start' | 'right' | 'right-end' | 'left-start' | 'left' | 'left-end' | undefined;
|
|
5
|
+
export type Shapes = 'rounded' | 'rounded-top' | 'rounded-end' | 'rounded-bottom' | 'rounded-start' | 'rounded-circle' | 'rounded-pill' | 'rounded-0' | 'rounded-1' | 'rounded-2' | 'rounded-3' | string;
|
|
6
|
+
export type TextColors = Colors | 'white' | 'muted' | 'high-emphasis' | 'medium-emphasis' | 'disabled' | 'high-emphasis-inverse' | 'medium-emphasis-inverse' | 'disabled-inverse' | string;
|
|
7
|
+
export type Triggers = 'hover' | 'focus' | 'click';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import getNextSibling from './getNextSibling';
|
|
2
|
-
import getPreviousSibling from './getPreviousSibling';
|
|
3
1
|
import isInViewport from './isInViewport';
|
|
4
|
-
|
|
2
|
+
import isObjectInArray from './isObjectInArray';
|
|
3
|
+
export { isInViewport, isObjectInArray };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coreui/react-pro",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.9.0-next.1",
|
|
4
4
|
"description": "UI Components Library for React.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -35,28 +35,28 @@
|
|
|
35
35
|
"build": "rollup -c --bundleConfigAsCjs"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@coreui/icons
|
|
39
|
-
"@coreui/icons-react": "^2.
|
|
40
|
-
"@popperjs/core": "^2.11.
|
|
38
|
+
"@coreui/icons": "^3.0.0",
|
|
39
|
+
"@coreui/icons-react": "^2.1.0",
|
|
40
|
+
"@popperjs/core": "^2.11.6",
|
|
41
41
|
"@rollup/plugin-commonjs": "^24.0.1",
|
|
42
42
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
43
43
|
"@rollup/plugin-typescript": "^11.0.0",
|
|
44
44
|
"@testing-library/jest-dom": "^5.16.5",
|
|
45
45
|
"@testing-library/react": "^13.4.0",
|
|
46
46
|
"@types/react": "18.0.27",
|
|
47
|
-
"@types/react-dom": "^18.0.
|
|
47
|
+
"@types/react-dom": "^18.0.10",
|
|
48
48
|
"@types/react-transition-group": "^4.4.5",
|
|
49
49
|
"classnames": "^2.3.2",
|
|
50
|
-
"date-fns": "^2.
|
|
50
|
+
"date-fns": "^2.29.3",
|
|
51
51
|
"prop-types": "^15.8.1",
|
|
52
52
|
"react": "^18.2.0",
|
|
53
|
-
"react-device-detect": "^2.
|
|
53
|
+
"react-device-detect": "^2.2.2",
|
|
54
54
|
"react-dom": "^18.2.0",
|
|
55
|
-
"react-popper": "^2.
|
|
55
|
+
"react-popper": "^2.3.0",
|
|
56
56
|
"react-transition-group": "^4.4.5",
|
|
57
|
-
"rollup": "^3.
|
|
58
|
-
"tslib": "^2.
|
|
59
|
-
"typescript": "^4.9.
|
|
57
|
+
"rollup": "^3.14.0",
|
|
58
|
+
"tslib": "^2.5.0",
|
|
59
|
+
"typescript": "^4.9.5"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"@coreui/coreui-pro": ">=4.4.0",
|
|
@@ -5,6 +5,7 @@ import classNames from 'classnames'
|
|
|
5
5
|
import { CAccordionItemContext } from './CAccordionItem'
|
|
6
6
|
|
|
7
7
|
import { CCollapse } from './../collapse/CCollapse'
|
|
8
|
+
|
|
8
9
|
export interface CAccordionBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
10
|
/**
|
|
10
11
|
* A string of all className you want applied to the base component.
|
|
@@ -3,10 +3,11 @@ import PropTypes from 'prop-types'
|
|
|
3
3
|
import classNames from 'classnames'
|
|
4
4
|
import { Transition } from 'react-transition-group'
|
|
5
5
|
|
|
6
|
-
import { Colors, colorPropType } from '../Types'
|
|
7
6
|
import { CCloseButton } from '../close-button/CCloseButton'
|
|
8
7
|
|
|
9
|
-
import { useForkedRef } from '../../
|
|
8
|
+
import { useForkedRef } from '../../hooks'
|
|
9
|
+
import { colorPropType } from '../../props'
|
|
10
|
+
import type { Colors } from '../../types'
|
|
10
11
|
|
|
11
12
|
export interface CAlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
12
13
|
/**
|
|
@@ -2,14 +2,8 @@ import React, { forwardRef, HTMLAttributes } from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import classNames from 'classnames'
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
Shapes,
|
|
8
|
-
TextColors,
|
|
9
|
-
colorPropType,
|
|
10
|
-
shapePropType,
|
|
11
|
-
textColorsPropType,
|
|
12
|
-
} from '../Types'
|
|
5
|
+
import { colorPropType, shapePropType, textColorsPropType } from '../../props'
|
|
6
|
+
import type { Colors, Shapes, TextColors } from '../../types'
|
|
13
7
|
|
|
14
8
|
export interface CAvatarProps extends HTMLAttributes<HTMLDivElement> {
|
|
15
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef, HTMLAttributes, useRef } from 'react'
|
|
2
|
-
import { Transition } from 'react-transition-group'
|
|
3
2
|
import PropTypes from 'prop-types'
|
|
4
3
|
import classNames from 'classnames'
|
|
4
|
+
import { Transition } from 'react-transition-group'
|
|
5
5
|
|
|
6
|
-
import { useForkedRef } from '../../
|
|
6
|
+
import { useForkedRef } from '../../hooks'
|
|
7
7
|
|
|
8
8
|
export interface CBackdropProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
9
|
/**
|
|
@@ -2,16 +2,8 @@ import React, { ElementType, forwardRef, HTMLAttributes } from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import classNames from 'classnames'
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
Gradients,
|
|
8
|
-
Shapes,
|
|
9
|
-
TextColors,
|
|
10
|
-
colorPropType,
|
|
11
|
-
gradientsPropType,
|
|
12
|
-
shapePropType,
|
|
13
|
-
textColorsPropType,
|
|
14
|
-
} from '../Types'
|
|
5
|
+
import { colorPropType, gradientsPropType, shapePropType, textColorsPropType } from '../../props'
|
|
6
|
+
import type { Colors, Gradients, Shapes, TextColors } from '../../types'
|
|
15
7
|
|
|
16
8
|
export interface CBadgeProps extends HTMLAttributes<HTMLDivElement | HTMLSpanElement> {
|
|
17
9
|
/**
|
|
@@ -2,9 +2,11 @@ import React, { ElementType, forwardRef } from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import classNames from 'classnames'
|
|
4
4
|
|
|
5
|
-
import { Colors, Shapes, colorPropType } from '../Types'
|
|
6
5
|
import { CLink, CLinkProps } from '../link/CLink'
|
|
7
6
|
|
|
7
|
+
import { colorPropType } from '../../props'
|
|
8
|
+
import type { Colors, Shapes } from '../../types'
|
|
9
|
+
|
|
8
10
|
export interface CButtonProps extends Omit<CLinkProps, 'size'> {
|
|
9
11
|
/**
|
|
10
12
|
* Toggle the active state for the component.
|