@coreui/react 4.0.2 → 4.1.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.
- package/README.md +1 -1
- package/dist/components/accordion/CAccordionCollapse.d.ts +1 -1
- package/dist/components/collapse/CCollapse.d.ts +4 -0
- package/dist/components/placeholder/CPlaceholder.d.ts +51 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +263 -173
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +263 -172
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/components/accordion/CAccordionCollapse.tsx +1 -1
- package/src/components/collapse/CCollapse.tsx +36 -3
- package/src/components/grid/CCol.tsx +8 -8
- package/src/components/grid/CContainer.tsx +3 -3
- package/src/components/grid/CRow.tsx +6 -6
- package/src/components/offcanvas/COffcanvas.tsx +15 -2
- package/src/components/offcanvas/__tests__/COffcanvas.spec.tsx +1 -1
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvas.spec.tsx.snap +2 -2
- package/src/components/placeholder/CPlaceholder.tsx +114 -0
- package/src/components/placeholder/__tests__/CPlaceholder.spec.tsx +21 -0
- package/src/components/placeholder/__tests__/__snapshots__/CPlaceholder.spec.tsx.snap +17 -0
- package/src/index.ts +2 -0
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
Several quick start options are available:
|
|
45
45
|
|
|
46
|
-
- [Download the latest release](https://github.com/coreui/coreui-react/archive/v4.0.
|
|
46
|
+
- [Download the latest release](https://github.com/coreui/coreui-react/archive/v4.1.0.zip)
|
|
47
47
|
- Clone the repo: `git clone https://github.com/coreui/coreui-react.git`
|
|
48
48
|
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/react`
|
|
49
49
|
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/react`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CCollapseProps } from '../collapse/CCollapse';
|
|
3
|
-
export declare const CAccordionCollapse: React.ForwardRefExoticComponent<CCollapseProps & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const CAccordionCollapse: React.ForwardRefExoticComponent<Omit<CCollapseProps, "horizontal"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,6 +4,10 @@ export interface CCollapseProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
* A string of all className you want applied to the base component.
|
|
5
5
|
*/
|
|
6
6
|
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Set horizontal collapsing to transition the width instead of height.
|
|
9
|
+
*/
|
|
10
|
+
horizontal?: boolean;
|
|
7
11
|
/**
|
|
8
12
|
* Callback fired when the component requests to be hidden.
|
|
9
13
|
*/
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { ElementType, HTMLAttributes } from 'react';
|
|
2
|
+
import { Colors } from '../Types';
|
|
3
|
+
export interface CPlaceholderProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Set animation type to better convey the perception of something being actively loaded.
|
|
6
|
+
*/
|
|
7
|
+
animation?: 'glow' | 'wave';
|
|
8
|
+
/**
|
|
9
|
+
* A string of all className you want applied to the component.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
14
|
+
*
|
|
15
|
+
* @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
|
|
16
|
+
*/
|
|
17
|
+
color?: Colors;
|
|
18
|
+
/**
|
|
19
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
20
|
+
*/
|
|
21
|
+
component?: string | ElementType;
|
|
22
|
+
/**
|
|
23
|
+
* Size the component extra small, small, or large.
|
|
24
|
+
*/
|
|
25
|
+
size?: 'xs' | 'sm' | 'lg';
|
|
26
|
+
/**
|
|
27
|
+
* The number of columns on extra small devices (<576px).
|
|
28
|
+
*/
|
|
29
|
+
xs?: number;
|
|
30
|
+
/**
|
|
31
|
+
* The number of columns on small devices (<768px).
|
|
32
|
+
*/
|
|
33
|
+
sm?: number;
|
|
34
|
+
/**
|
|
35
|
+
* The number of columns on medium devices (<992px).
|
|
36
|
+
*/
|
|
37
|
+
md?: number;
|
|
38
|
+
/**
|
|
39
|
+
* The number of columns on large devices (<1200px).
|
|
40
|
+
*/
|
|
41
|
+
lg?: number;
|
|
42
|
+
/**
|
|
43
|
+
* The number of columns on X-Large devices (<1400px).
|
|
44
|
+
*/
|
|
45
|
+
xl?: number;
|
|
46
|
+
/**
|
|
47
|
+
* The number of columns on XX-Large devices (≥1400px).
|
|
48
|
+
*/
|
|
49
|
+
xxl?: number;
|
|
50
|
+
}
|
|
51
|
+
export declare const CPlaceholder: React.ForwardRefExoticComponent<CPlaceholderProps & React.RefAttributes<HTMLSpanElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -86,6 +86,7 @@ import { CNavbarText } from './components/navbar/CNavbarText';
|
|
|
86
86
|
import { CNavbarToggler } from './components/navbar/CNavbarToggler';
|
|
87
87
|
import { CPagination } from './components/pagination/CPagination';
|
|
88
88
|
import { CPaginationItem } from './components/pagination/CPaginationItem';
|
|
89
|
+
import { CPlaceholder } from './components/placeholder/CPlaceholder';
|
|
89
90
|
import { CPopover } from './components/popover/CPopover';
|
|
90
91
|
import { CProgress } from './components/progress/CProgress';
|
|
91
92
|
import { CProgressBar } from './components/progress/CProgressBar';
|
|
@@ -116,5 +117,5 @@ import { CToastClose } from './components/toast/CToastClose';
|
|
|
116
117
|
import { CToastHeader } from './components/toast/CToastHeader';
|
|
117
118
|
import { CToaster } from './components/toast/CToaster';
|
|
118
119
|
import { CTooltip } from './components/tooltip/CTooltip';
|
|
119
|
-
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, CAccordionHeader, CAccordionItem, CAlert, CAlertHeading, CAlertLink, CAvatar, CBadge, CBackdrop, CBreadcrumb, CBreadcrumbItem, CButton, CButtonGroup, CButtonToolbar, CCallout, CCard, CCardBody, CCardFooter, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCloseButton, CCollapse, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CCol, CContainer, CRow, CFooter, CCardGroup, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CImage, CInputGroup, CInputGroupText, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderText, CHeaderToggler, CLink, CListGroup, CListGroupItem, CModal, CModalBody, CModalContent, CModalDialog, CModalFooter, CModalHeader, CModalTitle, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarText, CNavbarToggler, CPagination, CPaginationItem, CPopover, CProgress, CProgressBar, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasTitle, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarToggler, CSidebarHeader, CSidebarNav, CSpinner, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTableRow, CTabContent, CTabPane, CToast, CToastBody, CToastClose, CToastHeader, CToaster, CTooltip, };
|
|
120
|
+
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, CAccordionHeader, CAccordionItem, CAlert, CAlertHeading, CAlertLink, CAvatar, CBadge, CBackdrop, CBreadcrumb, CBreadcrumbItem, CButton, CButtonGroup, CButtonToolbar, CCallout, CCard, CCardBody, CCardFooter, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCloseButton, CCollapse, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CCol, CContainer, CRow, CFooter, CCardGroup, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CImage, CInputGroup, CInputGroupText, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderText, CHeaderToggler, CLink, CListGroup, CListGroupItem, CModal, CModalBody, CModalContent, CModalDialog, CModalFooter, CModalHeader, CModalTitle, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarText, CNavbarToggler, CPagination, CPaginationItem, CPlaceholder, CPopover, CProgress, CProgressBar, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasTitle, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarToggler, CSidebarHeader, CSidebarNav, CSpinner, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTableRow, CTabContent, CTabPane, CToast, CToastBody, CToastClose, CToastHeader, CToaster, CTooltip, };
|
|
120
121
|
export * from './components/';
|