@coreui/react 4.0.0-rc.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/LICENSE +21 -0
- package/README.md +144 -0
- package/dist/components/Types.d.ts +12 -0
- package/dist/components/accordion/CAccordion.d.ts +12 -0
- package/dist/components/accordion/CAccordionBody.d.ts +8 -0
- package/dist/components/accordion/CAccordionButton.d.ts +12 -0
- package/dist/components/accordion/CAccordionCollapse.d.ts +3 -0
- package/dist/components/accordion/CAccordionHeader.d.ts +8 -0
- package/dist/components/accordion/CAccordionItem.d.ts +8 -0
- package/dist/components/alert/CAlert.d.ts +38 -0
- package/dist/components/alert/CAlertHeading.d.ts +14 -0
- package/dist/components/alert/CAlertLink.d.ts +8 -0
- package/dist/components/avatar/CAvatar.d.ts +41 -0
- package/dist/components/backdrop/CBackdrop.d.ts +12 -0
- package/dist/components/badge/CBadge.d.ts +39 -0
- package/dist/components/breadcrumb/CBreadcrumb.d.ts +8 -0
- package/dist/components/breadcrumb/CBreadcrumbItem.d.ts +16 -0
- package/dist/components/button/CButton.d.ts +58 -0
- package/dist/components/button-group/CButtonGroup.d.ts +18 -0
- package/dist/components/button-group/CButtonToolbar.d.ts +8 -0
- package/dist/components/callout/CCallout.d.ts +15 -0
- package/dist/components/card/CCard.d.ts +21 -0
- package/dist/components/card/CCardBody.d.ts +8 -0
- package/dist/components/card/CCardFooter.d.ts +8 -0
- package/dist/components/card/CCardGroup.d.ts +8 -0
- package/dist/components/card/CCardHeader.d.ts +14 -0
- package/dist/components/card/CCardImage.d.ts +18 -0
- package/dist/components/card/CCardImageOverlay.d.ts +8 -0
- package/dist/components/card/CCardLink.d.ts +12 -0
- package/dist/components/card/CCardSubtitle.d.ts +14 -0
- package/dist/components/card/CCardText.d.ts +14 -0
- package/dist/components/card/CCardTitle.d.ts +14 -0
- package/dist/components/carousel/CCarousel.d.ts +53 -0
- package/dist/components/carousel/CCarouselCaption.d.ts +8 -0
- package/dist/components/carousel/CCarouselControl.d.ts +16 -0
- package/dist/components/carousel/CCarouselIndicators.d.ts +12 -0
- package/dist/components/carousel/CCarouselInner.d.ts +8 -0
- package/dist/components/carousel/CCarouselItem.d.ts +12 -0
- package/dist/components/close-button/CCloseButton.d.ts +16 -0
- package/dist/components/collapse/CCollapse.d.ts +12 -0
- package/dist/components/dropdown/CDropdown.d.ts +72 -0
- package/dist/components/dropdown/CDropdownDivider.d.ts +8 -0
- package/dist/components/dropdown/CDropdownHeader.d.ts +14 -0
- package/dist/components/dropdown/CDropdownItem.d.ts +15 -0
- package/dist/components/dropdown/CDropdownItemPlain.d.ts +14 -0
- package/dist/components/dropdown/CDropdownMenu.d.ts +15 -0
- package/dist/components/dropdown/CDropdownToggle.d.ts +20 -0
- package/dist/components/footer/CFooter.d.ts +12 -0
- package/dist/components/form/CForm.d.ts +12 -0
- package/dist/components/form/CFormCheck.d.ts +68 -0
- package/dist/components/form/CFormFeedback.d.ts +26 -0
- package/dist/components/form/CFormFloating.d.ts +8 -0
- package/dist/components/form/CFormInput.d.ts +51 -0
- package/dist/components/form/CFormLabel.d.ts +12 -0
- package/dist/components/form/CFormRange.d.ts +38 -0
- package/dist/components/form/CFormSelect.d.ts +26 -0
- package/dist/components/form/CFormSwitch.d.ts +37 -0
- package/dist/components/form/CFormText.d.ts +14 -0
- package/dist/components/form/CFormTextarea.d.ts +38 -0
- package/dist/components/form/CInputGroup.d.ts +14 -0
- package/dist/components/form/CInputGroupText.d.ts +14 -0
- package/dist/components/grid/CCol.d.ts +52 -0
- package/dist/components/grid/CContainer.d.ts +32 -0
- package/dist/components/grid/CRow.d.ts +50 -0
- package/dist/components/header/CHeader.d.ts +18 -0
- package/dist/components/header/CHeaderBrand.d.ts +14 -0
- package/dist/components/header/CHeaderDivider.d.ts +8 -0
- package/dist/components/header/CHeaderNav.d.ts +14 -0
- package/dist/components/header/CHeaderText.d.ts +8 -0
- package/dist/components/header/CHeaderToggler.d.ts +8 -0
- package/dist/components/image/CImage.d.ts +24 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/link/CLink.d.ts +26 -0
- package/dist/components/list-group/CListGroup.d.ts +22 -0
- package/dist/components/list-group/CListGroupItem.d.ts +29 -0
- package/dist/components/modal/CModal.d.ts +56 -0
- package/dist/components/modal/CModalBody.d.ts +8 -0
- package/dist/components/modal/CModalContent.d.ts +8 -0
- package/dist/components/modal/CModalDialog.d.ts +26 -0
- package/dist/components/modal/CModalFooter.d.ts +8 -0
- package/dist/components/modal/CModalHeader.d.ts +12 -0
- package/dist/components/modal/CModalTitle.d.ts +14 -0
- package/dist/components/nav/CNav.d.ts +22 -0
- package/dist/components/nav/CNavGroup.d.ts +25 -0
- package/dist/components/nav/CNavGroupItems.d.ts +8 -0
- package/dist/components/nav/CNavItem.d.ts +3 -0
- package/dist/components/nav/CNavLink.d.ts +31 -0
- package/dist/components/nav/CNavTitle.d.ts +8 -0
- package/dist/components/navbar/CNavbar.d.ts +43 -0
- package/dist/components/navbar/CNavbarBrand.d.ts +17 -0
- package/dist/components/navbar/CNavbarNav.d.ts +14 -0
- package/dist/components/navbar/CNavbarText.d.ts +8 -0
- package/dist/components/navbar/CNavbarToggler.d.ts +8 -0
- package/dist/components/offcanvas/COffcanvas.d.ts +37 -0
- package/dist/components/offcanvas/COffcanvasBody.d.ts +8 -0
- package/dist/components/offcanvas/COffcanvasHeader.d.ts +8 -0
- package/dist/components/offcanvas/COffcanvasTitle.d.ts +14 -0
- package/dist/components/pagination/CPagination.d.ts +16 -0
- package/dist/components/pagination/CPaginationItem.d.ts +16 -0
- package/dist/components/popover/CPopover.d.ts +36 -0
- package/dist/components/popover/CPopoverContent.d.ts +10 -0
- package/dist/components/progress/CProgress.d.ts +26 -0
- package/dist/components/progress/CProgressBar.d.ts +29 -0
- package/dist/components/sidebar/CSidebar.d.ts +36 -0
- package/dist/components/sidebar/CSidebarBrand.d.ts +8 -0
- package/dist/components/sidebar/CSidebarFooter.d.ts +8 -0
- package/dist/components/sidebar/CSidebarHeader.d.ts +8 -0
- package/dist/components/sidebar/CSidebarNav.d.ts +14 -0
- package/dist/components/sidebar/CSidebarToggler.d.ts +8 -0
- package/dist/components/spinner/CSpinner.d.ts +37 -0
- package/dist/components/table/CTable.d.ts +53 -0
- package/dist/components/table/CTableBody.d.ts +15 -0
- package/dist/components/table/CTableCaption.d.ts +2 -0
- package/dist/components/table/CTableDataCell.d.ts +23 -0
- package/dist/components/table/CTableFoot.d.ts +15 -0
- package/dist/components/table/CTableHead.d.ts +15 -0
- package/dist/components/table/CTableHeaderCell.d.ts +15 -0
- package/dist/components/table/CTableRow.d.ts +23 -0
- package/dist/components/tabs/CTabContent.d.ts +8 -0
- package/dist/components/tabs/CTabPane.d.ts +12 -0
- package/dist/components/toast/CToast.d.ts +53 -0
- package/dist/components/toast/CToastBody.d.ts +8 -0
- package/dist/components/toast/CToastClose.d.ts +9 -0
- package/dist/components/toast/CToastHeader.d.ts +12 -0
- package/dist/components/toast/CToaster.d.ts +18 -0
- package/dist/components/tooltip/CTooltip.d.ts +27 -0
- package/dist/components/tooltip/CTooltipContent.d.ts +10 -0
- package/dist/components/widgets/CWidgetStatsA.d.ts +31 -0
- package/dist/components/widgets/CWidgetStatsB.d.ts +38 -0
- package/dist/components/widgets/CWidgetStatsC.d.ts +38 -0
- package/dist/components/widgets/CWidgetStatsD.d.ts +32 -0
- package/dist/components/widgets/CWidgetStatsE.d.ts +20 -0
- package/dist/components/widgets/CWidgetStatsF.d.ts +35 -0
- package/dist/components/widgets/index.d.ts +7 -0
- package/dist/docs/components/CodeBlock copy.d.ts +3 -0
- package/dist/docs/components/CodeBlock.d.ts +3 -0
- package/dist/docs/components/Example.d.ts +6 -0
- package/dist/docs/components/Footer.d.ts +3 -0
- package/dist/docs/components/Header.d.ts +3 -0
- package/dist/docs/components/Seo.d.ts +22 -0
- package/dist/docs/components/Sidebar.d.ts +6 -0
- package/dist/docs/components/SidebarNav.d.ts +24 -0
- package/dist/docs/components/index.d.ts +9 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/nav.d.ts +20 -0
- package/dist/docs/templates/Docs.d.ts +6 -0
- package/dist/docs/templates/Layout.d.ts +4 -0
- package/dist/index.d.ts +125 -0
- package/dist/index.es.js +7539 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.js +7696 -0
- package/dist/index.js.map +1 -0
- package/dist/pages/404.d.ts +2 -0
- package/dist/utils/hooks/index.d.ts +2 -0
- package/dist/utils/hooks/useForkedRef.d.ts +7 -0
- package/package.json +99 -0
- package/src/components/Types.tsx +107 -0
- package/src/components/accordion/CAccordion.tsx +33 -0
- package/src/components/accordion/CAccordionBody.tsx +29 -0
- package/src/components/accordion/CAccordionButton.tsx +34 -0
- package/src/components/accordion/CAccordionCollapse.tsx +19 -0
- package/src/components/accordion/CAccordionHeader.tsx +29 -0
- package/src/components/accordion/CAccordionItem.tsx +29 -0
- package/src/components/accordion/__tests__/CAccordion.spec.tsx +36 -0
- package/src/components/accordion/__tests__/CAccordionBody.spec.tsx +16 -0
- package/src/components/accordion/__tests__/CAccordionButton.spec.tsx +21 -0
- package/src/components/accordion/__tests__/CAccordionCollapse.spec.tsx +10 -0
- package/src/components/accordion/__tests__/CAccordionHeader.spec.tsx +16 -0
- package/src/components/accordion/__tests__/CAccordionItem.spec.tsx +16 -0
- package/src/components/accordion/__tests__/__snapshots__/CAccordion.spec.tsx.snap +21 -0
- package/src/components/accordion/__tests__/__snapshots__/CAccordionBody.spec.tsx.snap +21 -0
- package/src/components/accordion/__tests__/__snapshots__/CAccordionButton.spec.tsx.snap +23 -0
- package/src/components/accordion/__tests__/__snapshots__/CAccordionCollapse.spec.tsx.snap +11 -0
- package/src/components/accordion/__tests__/__snapshots__/CAccordionHeader.spec.tsx.snap +21 -0
- package/src/components/accordion/__tests__/__snapshots__/CAccordionItem.spec.tsx.snap +21 -0
- package/src/components/alert/CAlert.tsx +100 -0
- package/src/components/alert/CAlertHeading.tsx +36 -0
- package/src/components/alert/CAlertLink.tsx +31 -0
- package/src/components/alert/__tests__/CAlert.spec.tsx +45 -0
- package/src/components/alert/__tests__/CAlertHeading.spec.tsx +20 -0
- package/src/components/alert/__tests__/CAlertLink.spec.tsx +20 -0
- package/src/components/alert/__tests__/__snapshots__/CAlert.spec.tsx.snap +27 -0
- package/src/components/alert/__tests__/__snapshots__/CAlertHeading.spec.tsx.snap +21 -0
- package/src/components/alert/__tests__/__snapshots__/CAlertLink.spec.tsx.snap +22 -0
- package/src/components/avatar/CAvatar.tsx +87 -0
- package/src/components/avatar/__tests__/CAvatar.spec.tsx +54 -0
- package/src/components/avatar/__tests__/__snapshots__/CAvatar.spec.tsx.snap +40 -0
- package/src/components/backdrop/CBackdrop.tsx +41 -0
- package/src/components/backdrop/__tests__/CBackdrop.spec.tsx +31 -0
- package/src/components/backdrop/__tests__/__snapshots__/CBackdrop.spec.tsx.snap +23 -0
- package/src/components/badge/CBadge.tsx +84 -0
- package/src/components/badge/__tests__/CBadge.spec.tsx +22 -0
- package/src/components/badge/__tests__/__snapshots__/CBadge.spec.tsx.snap +21 -0
- package/src/components/breadcrumb/CBreadcrumb.tsx +30 -0
- package/src/components/breadcrumb/CBreadcrumbItem.tsx +46 -0
- package/src/components/breadcrumb/__tests__/CBreadcrumb.spec.tsx +22 -0
- package/src/components/breadcrumb/__tests__/CBreadcrumbItem.spec.tsx +21 -0
- package/src/components/breadcrumb/__tests__/__snapshots__/CBreadcrumb.spec.tsx.snap +42 -0
- package/src/components/breadcrumb/__tests__/__snapshots__/CBreadcrumbItem.spec.tsx.snap +22 -0
- package/src/components/button/CButton.tsx +112 -0
- package/src/components/button/__tests__/CButton.spec.tsx +44 -0
- package/src/components/button/__tests__/CButtonClose.spec.tsx +23 -0
- package/src/components/button/__tests__/__snapshots__/CButton.spec.tsx.snap +38 -0
- package/src/components/button/__tests__/__snapshots__/CButtonClose.spec.tsx.snap +24 -0
- package/src/components/button-group/CButtonGroup.tsx +45 -0
- package/src/components/button-group/CButtonToolbar.tsx +29 -0
- package/src/components/button-group/__tests__/CButtonGroup.spec.tsx +37 -0
- package/src/components/button-group/__tests__/CButtonToolbar.spec.tsx +29 -0
- package/src/components/button-group/__tests__/__snapshots__/CButtonGroup.spec.tsx.snap +63 -0
- package/src/components/button-group/__tests__/__snapshots__/CButtonToolbar.spec.tsx.snap +66 -0
- package/src/components/callout/CCallout.tsx +44 -0
- package/src/components/callout/__tests__/CCallout.spec.tsx +21 -0
- package/src/components/callout/__tests__/__snapshots__/CCallout.spec.tsx.snap +21 -0
- package/src/components/card/CCard.tsx +52 -0
- package/src/components/card/CCardBody.tsx +29 -0
- package/src/components/card/CCardFooter.tsx +29 -0
- package/src/components/card/CCardGroup.tsx +29 -0
- package/src/components/card/CCardHeader.tsx +36 -0
- package/src/components/card/CCardImage.tsx +43 -0
- package/src/components/card/CCardImageOverlay.tsx +29 -0
- package/src/components/card/CCardLink.tsx +35 -0
- package/src/components/card/CCardSubtitle.tsx +35 -0
- package/src/components/card/CCardText.tsx +36 -0
- package/src/components/card/CCardTitle.tsx +36 -0
- package/src/components/card/__tests__/CCard.spec.tsx +22 -0
- package/src/components/card/__tests__/CCardBody.spec.tsx +16 -0
- package/src/components/card/__tests__/CCardFooter.spec.tsx +16 -0
- package/src/components/card/__tests__/CCardGroup.spec.tsx +51 -0
- package/src/components/card/__tests__/CCardHeader.spec.tsx +20 -0
- package/src/components/card/__tests__/CCardImage.spec.tsx +18 -0
- package/src/components/card/__tests__/CCardImageOverlay.spec.tsx +17 -0
- package/src/components/card/__tests__/CCardLink.spec.tsx +20 -0
- package/src/components/card/__tests__/CCardSubtitle.spec.tsx +20 -0
- package/src/components/card/__tests__/CCardText.spec.tsx +20 -0
- package/src/components/card/__tests__/CCardTitle.spec.tsx +20 -0
- package/src/components/card/__tests__/__snapshots__/CCard.spec.tsx.snap +21 -0
- package/src/components/card/__tests__/__snapshots__/CCardBody.spec.tsx.snap +21 -0
- package/src/components/card/__tests__/__snapshots__/CCardFooter.spec.tsx.snap +21 -0
- package/src/components/card/__tests__/__snapshots__/CCardGroup.spec.tsx.snap +86 -0
- package/src/components/card/__tests__/__snapshots__/CCardHeader.spec.tsx.snap +21 -0
- package/src/components/card/__tests__/__snapshots__/CCardImage.spec.tsx.snap +17 -0
- package/src/components/card/__tests__/__snapshots__/CCardImageOverlay.spec.tsx.snap +19 -0
- package/src/components/card/__tests__/__snapshots__/CCardLink.spec.tsx.snap +22 -0
- package/src/components/card/__tests__/__snapshots__/CCardSubtitle.spec.tsx.snap +21 -0
- package/src/components/card/__tests__/__snapshots__/CCardText.spec.tsx.snap +21 -0
- package/src/components/card/__tests__/__snapshots__/CCardTitle.spec.tsx.snap +21 -0
- package/src/components/carousel/CCarousel.tsx +168 -0
- package/src/components/carousel/CCarouselCaption.tsx +24 -0
- package/src/components/carousel/CCarouselControl.tsx +56 -0
- package/src/components/carousel/CCarouselIndicators.tsx +49 -0
- package/src/components/carousel/CCarouselInner.tsx +41 -0
- package/src/components/carousel/CCarouselItem.tsx +110 -0
- package/src/components/carousel/__tests__/CCarousel.spec.tsx +275 -0
- package/src/components/carousel/__tests__/__snapshots__/CCarousel.spec.tsx.snap +376 -0
- package/src/components/close-button/CCloseButton.tsx +43 -0
- package/src/components/close-button/__tests__/CCloseButton.spec.tsx +24 -0
- package/src/components/close-button/__tests__/__snapshots__/CCloseButton.spec.tsx.snap +20 -0
- package/src/components/collapse/CCollapse.tsx +92 -0
- package/src/components/collapse/__tests__/CCollapse.spec.tsx +41 -0
- package/src/components/collapse/__tests__/__snapshots__/CCollapse.spec.tsx.snap +21 -0
- package/src/components/dropdown/CDropdown.tsx +205 -0
- package/src/components/dropdown/CDropdownDivider.tsx +24 -0
- package/src/components/dropdown/CDropdownHeader.tsx +36 -0
- package/src/components/dropdown/CDropdownItem.tsx +39 -0
- package/src/components/dropdown/CDropdownItemPlain.tsx +36 -0
- package/src/components/dropdown/CDropdownMenu.tsx +111 -0
- package/src/components/dropdown/CDropdownToggle.tsx +91 -0
- package/src/components/dropdown/__tests__/CDropdown.spec.tsx +95 -0
- package/src/components/dropdown/__tests__/CDropdownDivider.spec.tsx +16 -0
- package/src/components/dropdown/__tests__/CDropdownHeader.spec.tsx +20 -0
- package/src/components/dropdown/__tests__/CDropdownItem.spec.tsx +20 -0
- package/src/components/dropdown/__tests__/CDropdownItemPlain.spec.tsx +20 -0
- package/src/components/dropdown/__tests__/CDropdownMenu.spec.tsx +23 -0
- package/src/components/dropdown/__tests__/CDropdownToggle.spec.tsx +20 -0
- package/src/components/dropdown/__tests__/__snapshots__/CDropdown.spec.tsx.snap +77 -0
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownDivider.spec.tsx.snap +17 -0
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownHeader.spec.tsx.snap +21 -0
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownItem.spec.tsx.snap +21 -0
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownItemPlain.spec.tsx.snap +21 -0
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownMenu.spec.tsx.snap +29 -0
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownToggle.spec.tsx.snap +30 -0
- package/src/components/footer/CFooter.tsx +34 -0
- package/src/components/footer/__tests__/CFooter.spec.tsx +21 -0
- package/src/components/footer/__tests__/__snapshots__/CFooter.spec.tsx.snap +21 -0
- package/src/components/form/CForm.tsx +33 -0
- package/src/components/form/CFormCheck.tsx +156 -0
- package/src/components/form/CFormFeedback.tsx +59 -0
- package/src/components/form/CFormFloating.tsx +28 -0
- package/src/components/form/CFormInput.tsx +87 -0
- package/src/components/form/CFormLabel.tsx +33 -0
- package/src/components/form/CFormRange.tsx +53 -0
- package/src/components/form/CFormSelect.tsx +58 -0
- package/src/components/form/CFormSwitch.tsx +84 -0
- package/src/components/form/CFormText.tsx +35 -0
- package/src/components/form/CFormTextarea.tsx +68 -0
- package/src/components/form/CInputGroup.tsx +41 -0
- package/src/components/form/CInputGroupText.tsx +35 -0
- package/src/components/form/__tests__/CForm.spec.tsx +35 -0
- package/src/components/form/__tests__/CFormCheck.spec.tsx +33 -0
- package/src/components/form/__tests__/CFormControl.spec.tsx +44 -0
- package/src/components/form/__tests__/CFormFeedback.spec.tsx +29 -0
- package/src/components/form/__tests__/CFormFloating.spec.tsx +17 -0
- package/src/components/form/__tests__/CFormInput.spec.tsx +42 -0
- package/src/components/form/__tests__/CFormLabel.spec.tsx +17 -0
- package/src/components/form/__tests__/CFormRange.spec.tsx +33 -0
- package/src/components/form/__tests__/CFormSelect.spec.tsx +22 -0
- package/src/components/form/__tests__/CFormSwitch.spec.tsx +42 -0
- package/src/components/form/__tests__/CFormText.spec.tsx +20 -0
- package/src/components/form/__tests__/CFormTextarea.spec.tsx +32 -0
- package/src/components/form/__tests__/CInputGroup.spec.tsx +21 -0
- package/src/components/form/__tests__/CInputGroupText.spec.tsx +16 -0
- package/src/components/form/__tests__/__snapshots__/CForm.spec.tsx.snap +64 -0
- package/src/components/form/__tests__/__snapshots__/CFormCheck.spec.tsx.snap +46 -0
- package/src/components/form/__tests__/__snapshots__/CFormControl.spec.tsx.snap +22 -0
- package/src/components/form/__tests__/__snapshots__/CFormFeedback.spec.tsx.snap +25 -0
- package/src/components/form/__tests__/__snapshots__/CFormFloating.spec.tsx.snap +19 -0
- package/src/components/form/__tests__/__snapshots__/CFormInput.spec.tsx.snap +31 -0
- package/src/components/form/__tests__/__snapshots__/CFormLabel.spec.tsx.snap +21 -0
- package/src/components/form/__tests__/__snapshots__/CFormRange.spec.tsx.snap +26 -0
- package/src/components/form/__tests__/__snapshots__/CFormSelect.spec.tsx.snap +26 -0
- package/src/components/form/__tests__/__snapshots__/CFormSwitch.spec.tsx.snap +34 -0
- package/src/components/form/__tests__/__snapshots__/CFormText.spec.tsx.snap +21 -0
- package/src/components/form/__tests__/__snapshots__/CFormTextarea.spec.tsx.snap +23 -0
- package/src/components/form/__tests__/__snapshots__/CInputGroup.spec.tsx.snap +21 -0
- package/src/components/form/__tests__/__snapshots__/CInputGroupText.spec.tsx.snap +21 -0
- package/src/components/grid/CCol.tsx +144 -0
- package/src/components/grid/CContainer.tsx +80 -0
- package/src/components/grid/CRow.tsx +118 -0
- package/src/components/grid/__tests__/CCol.spec.tsx +42 -0
- package/src/components/grid/__tests__/CContainer.spec.tsx +31 -0
- package/src/components/grid/__tests__/CRow.spec.tsx +116 -0
- package/src/components/grid/__tests__/__snapshots__/CCol.spec.tsx.snap +31 -0
- package/src/components/grid/__tests__/__snapshots__/CContainer.spec.tsx.snap +31 -0
- package/src/components/grid/__tests__/__snapshots__/CRow.spec.tsx.snap +61 -0
- package/src/components/header/CHeader.tsx +60 -0
- package/src/components/header/CHeaderBrand.tsx +36 -0
- package/src/components/header/CHeaderDivider.tsx +24 -0
- package/src/components/header/CHeaderNav.tsx +36 -0
- package/src/components/header/CHeaderText.tsx +29 -0
- package/src/components/header/CHeaderToggler.tsx +29 -0
- package/src/components/header/__tests__/CHeader.spec.tsx +21 -0
- package/src/components/header/__tests__/CHeaderBrand.spec.tsx +20 -0
- package/src/components/header/__tests__/CHeaderDivider.spec.tsx +16 -0
- package/src/components/header/__tests__/CHeaderNav.spec.tsx +20 -0
- package/src/components/header/__tests__/CHeaderText.spec.tsx +16 -0
- package/src/components/header/__tests__/CHeaderToggler.spec.tsx +16 -0
- package/src/components/header/__tests__/__snapshots__/CHeader.spec.tsx.snap +25 -0
- package/src/components/header/__tests__/__snapshots__/CHeaderBrand.spec.tsx.snap +21 -0
- package/src/components/header/__tests__/__snapshots__/CHeaderDivider.spec.tsx.snap +21 -0
- package/src/components/header/__tests__/__snapshots__/CHeaderNav.spec.tsx.snap +23 -0
- package/src/components/header/__tests__/__snapshots__/CHeaderText.spec.tsx.snap +21 -0
- package/src/components/header/__tests__/__snapshots__/CHeaderToggler.spec.tsx.snap +23 -0
- package/src/components/image/CImage.tsx +52 -0
- package/src/components/image/__tests__/CImage.spec.tsx +28 -0
- package/src/components/image/__tests__/__snapshots__/CImage.spec.tsx.snap +25 -0
- package/src/components/index.ts +1 -0
- package/src/components/link/CLink.tsx +64 -0
- package/src/components/link/__tests__/CLink.spec.tsx +51 -0
- package/src/components/link/__tests__/__snapshots__/CLink.spec.tsx.snap +24 -0
- package/src/components/list-group/CListGroup.tsx +66 -0
- package/src/components/list-group/CListGroupItem.tsx +81 -0
- package/src/components/list-group/__tests__/CListGroup.spec.tsx +33 -0
- package/src/components/list-group/__tests__/CListGroupItem.spec.tsx +29 -0
- package/src/components/list-group/__tests__/__snapshots__/CListGroup.spec.tsx.snap +45 -0
- package/src/components/list-group/__tests__/__snapshots__/CListGroupItem.spec.tsx.snap +24 -0
- package/src/components/modal/CModal.tsx +221 -0
- package/src/components/modal/CModalBody.tsx +29 -0
- package/src/components/modal/CModalContent.tsx +29 -0
- package/src/components/modal/CModalDialog.tsx +65 -0
- package/src/components/modal/CModalFooter.tsx +29 -0
- package/src/components/modal/CModalHeader.tsx +36 -0
- package/src/components/modal/CModalTitle.tsx +36 -0
- package/src/components/modal/__tests__/CModal.spec.tsx +67 -0
- package/src/components/modal/__tests__/CModalBody.spec.tsx +16 -0
- package/src/components/modal/__tests__/CModalContent.spec.tsx +16 -0
- package/src/components/modal/__tests__/CModalDialog.spec.tsx +30 -0
- package/src/components/modal/__tests__/CModalFooter.spec.tsx +16 -0
- package/src/components/modal/__tests__/CModalHeader.spec.tsx +31 -0
- package/src/components/modal/__tests__/CModalTitle.spec.tsx +20 -0
- package/src/components/modal/__tests__/__snapshots__/CModal.spec.tsx.snap +13 -0
- package/src/components/modal/__tests__/__snapshots__/CModalBody.spec.tsx.snap +21 -0
- package/src/components/modal/__tests__/__snapshots__/CModalContent.spec.tsx.snap +21 -0
- package/src/components/modal/__tests__/__snapshots__/CModalDialog.spec.tsx.snap +21 -0
- package/src/components/modal/__tests__/__snapshots__/CModalFooter.spec.tsx.snap +21 -0
- package/src/components/modal/__tests__/__snapshots__/CModalHeader.spec.tsx.snap +21 -0
- package/src/components/modal/__tests__/__snapshots__/CModalTitle.spec.tsx.snap +21 -0
- package/src/components/nav/CNav.tsx +54 -0
- package/src/components/nav/CNavGroup.tsx +147 -0
- package/src/components/nav/CNavGroupItems.tsx +28 -0
- package/src/components/nav/CNavItem.tsx +29 -0
- package/src/components/nav/CNavLink.tsx +66 -0
- package/src/components/nav/CNavTitle.tsx +28 -0
- package/src/components/nav/__tests__/CNav.spec.tsx +62 -0
- package/src/components/nav/__tests__/CNavGroup.spec.tsx +25 -0
- package/src/components/nav/__tests__/CNavGroupItems.spec.tsx +16 -0
- package/src/components/nav/__tests__/CNavItem.spec.tsx +22 -0
- package/src/components/nav/__tests__/CNavLink.spec.tsx +25 -0
- package/src/components/nav/__tests__/CNavTitle.spec.tsx +16 -0
- package/src/components/nav/__tests__/__snapshots__/CNav.spec.tsx.snap +118 -0
- package/src/components/nav/__tests__/__snapshots__/CNavGroup.spec.tsx.snap +36 -0
- package/src/components/nav/__tests__/__snapshots__/CNavGroupItems.spec.tsx.snap +21 -0
- package/src/components/nav/__tests__/__snapshots__/CNavItem.spec.tsx.snap +45 -0
- package/src/components/nav/__tests__/__snapshots__/CNavLink.spec.tsx.snap +35 -0
- package/src/components/nav/__tests__/__snapshots__/CNavTitle.spec.tsx.snap +21 -0
- package/src/components/navbar/CNavbar.tsx +115 -0
- package/src/components/navbar/CNavbarBrand.tsx +40 -0
- package/src/components/navbar/CNavbarNav.tsx +36 -0
- package/src/components/navbar/CNavbarText.tsx +29 -0
- package/src/components/navbar/CNavbarToggler.tsx +29 -0
- package/src/components/navbar/__tests__/CNavbar.spec.tsx +46 -0
- package/src/components/navbar/__tests__/CNavbarBrand.spec.tsx +25 -0
- package/src/components/navbar/__tests__/CNavbarNav.spec.tsx +21 -0
- package/src/components/navbar/__tests__/CNavbarText.spec.tsx +16 -0
- package/src/components/navbar/__tests__/CNavbarToggler.spec.tsx +23 -0
- package/src/components/navbar/__tests__/__snapshots__/CNavbar.spec.tsx.snap +39 -0
- package/src/components/navbar/__tests__/__snapshots__/CNavbarBrand.spec.tsx.snap +33 -0
- package/src/components/navbar/__tests__/__snapshots__/CNavbarNav.spec.tsx.snap +23 -0
- package/src/components/navbar/__tests__/__snapshots__/CNavbarText.spec.tsx.snap +21 -0
- package/src/components/navbar/__tests__/__snapshots__/CNavbarToggler.spec.tsx.snap +38 -0
- package/src/components/offcanvas/COffcanvas.tsx +146 -0
- package/src/components/offcanvas/COffcanvasBody.tsx +29 -0
- package/src/components/offcanvas/COffcanvasHeader.tsx +29 -0
- package/src/components/offcanvas/COffcanvasTitle.tsx +36 -0
- package/src/components/offcanvas/__tests__/COffcanvas.spec.tsx +97 -0
- package/src/components/offcanvas/__tests__/COffcanvasBody.spec.tsx +17 -0
- package/src/components/offcanvas/__tests__/COffcanvasHeader.spec.tsx +17 -0
- package/src/components/offcanvas/__tests__/COffcanvasTitle.spec.tsx +21 -0
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvas.spec.tsx.snap +45 -0
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvasBody.spec.tsx.snap +19 -0
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvasHeader.spec.tsx.snap +19 -0
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvasTitle.spec.tsx.snap +19 -0
- package/src/components/pagination/CPagination.tsx +45 -0
- package/src/components/pagination/CPaginationItem.tsx +57 -0
- package/src/components/pagination/__tests__/CPagination.spec.tsx +38 -0
- package/src/components/pagination/__tests__/CPaginationItem.spec.tsx +29 -0
- package/src/components/pagination/__tests__/__snapshots__/CPagination.spec.tsx.snap +65 -0
- package/src/components/pagination/__tests__/__snapshots__/CPaginationItem.spec.tsx.snap +30 -0
- package/src/components/popover/CPopover.tsx +137 -0
- package/src/components/popover/CPopoverContent.tsx +41 -0
- package/src/components/popover/__tests__/CPopover.spec.tsx +84 -0
- package/src/components/popover/__tests__/__snapshots__/CPopover.spec.tsx.snap +43 -0
- package/src/components/progress/CProgress.tsx +66 -0
- package/src/components/progress/CProgressBar.tsx +70 -0
- package/src/components/progress/__tests__/CProgress.spec.tsx +21 -0
- package/src/components/progress/__tests__/CProgressBar.spec.tsx +25 -0
- package/src/components/progress/__tests__/__snapshots__/CProgress.spec.tsx.snap +31 -0
- package/src/components/progress/__tests__/__snapshots__/CProgressBar.spec.tsx.snap +31 -0
- package/src/components/sidebar/CSidebar.tsx +197 -0
- package/src/components/sidebar/CSidebarBrand.tsx +28 -0
- package/src/components/sidebar/CSidebarFooter.tsx +28 -0
- package/src/components/sidebar/CSidebarHeader.tsx +28 -0
- package/src/components/sidebar/CSidebarNav.tsx +47 -0
- package/src/components/sidebar/CSidebarToggler.tsx +28 -0
- package/src/components/sidebar/__tests__/CSidebar.spec.tsx +55 -0
- package/src/components/sidebar/__tests__/CSidebarBrand.spec.tsx +16 -0
- package/src/components/sidebar/__tests__/CSidebarFooter.spec.tsx +16 -0
- package/src/components/sidebar/__tests__/CSidebarHeader.spec.tsx +16 -0
- package/src/components/sidebar/__tests__/CSidebarNav.spec.tsx +16 -0
- package/src/components/sidebar/__tests__/CSidebarToggler.spec.tsx +17 -0
- package/src/components/sidebar/__tests__/__snapshots__/CSidebar.spec.tsx.snap +31 -0
- package/src/components/sidebar/__tests__/__snapshots__/CSidebarBrand.spec.tsx.snap +22 -0
- package/src/components/sidebar/__tests__/__snapshots__/CSidebarFooter.spec.tsx.snap +21 -0
- package/src/components/sidebar/__tests__/__snapshots__/CSidebarHeader.spec.tsx.snap +21 -0
- package/src/components/sidebar/__tests__/__snapshots__/CSidebarNav.spec.tsx.snap +17 -0
- package/src/components/sidebar/__tests__/__snapshots__/CSidebarToggler.spec.tsx.snap +19 -0
- package/src/components/spinner/CSpinner.tsx +79 -0
- package/src/components/spinner/__tests__/CSpinner.spec.tsx +22 -0
- package/src/components/spinner/__tests__/__snapshots__/CSpinner.spec.tsx.snap +31 -0
- package/src/components/table/CTable.tsx +129 -0
- package/src/components/table/CTableBody.tsx +43 -0
- package/src/components/table/CTableCaption.tsx +19 -0
- package/src/components/table/CTableDataCell.tsx +56 -0
- package/src/components/table/CTableFoot.tsx +43 -0
- package/src/components/table/CTableHead.tsx +43 -0
- package/src/components/table/CTableHeaderCell.tsx +43 -0
- package/src/components/table/CTableRow.tsx +55 -0
- package/src/components/table/__tests__/CTable.spec.tsx +105 -0
- package/src/components/table/__tests__/CTableBody.spec.tsx +30 -0
- package/src/components/table/__tests__/CTableCaption.spec.tsx +21 -0
- package/src/components/table/__tests__/CTableDataCell.spec.tsx +43 -0
- package/src/components/table/__tests__/CTableFoot.spec.tsx +30 -0
- package/src/components/table/__tests__/CTableHead.spec.tsx +30 -0
- package/src/components/table/__tests__/CTableHeaderCell.spec.tsx +39 -0
- package/src/components/table/__tests__/CTableRow.spec.tsx +37 -0
- package/src/components/table/__tests__/__snapshots__/CTable.spec.tsx.snap +117 -0
- package/src/components/table/__tests__/__snapshots__/CTableBody.spec.tsx.snap +21 -0
- package/src/components/table/__tests__/__snapshots__/CTableCaption.spec.tsx.snap +15 -0
- package/src/components/table/__tests__/__snapshots__/CTableDataCell.spec.tsx.snap +25 -0
- package/src/components/table/__tests__/__snapshots__/CTableFoot.spec.tsx.snap +21 -0
- package/src/components/table/__tests__/__snapshots__/CTableHead.spec.tsx.snap +21 -0
- package/src/components/table/__tests__/__snapshots__/CTableHeaderCell.spec.tsx.snap +25 -0
- package/src/components/table/__tests__/__snapshots__/CTableRow.spec.tsx.snap +23 -0
- package/src/components/tabs/CTabContent.tsx +28 -0
- package/src/components/tabs/CTabPane.tsx +60 -0
- package/src/components/tabs/__tests__/CTabContent.spec.tsx +16 -0
- package/src/components/tabs/__tests__/CTabPane.spec.tsx +51 -0
- package/src/components/tabs/__tests__/__snapshots__/CTabContent.spec.tsx.snap +21 -0
- package/src/components/tabs/__tests__/__snapshots__/CTabPane.spec.tsx.snap +23 -0
- package/src/components/toast/CToast.tsx +177 -0
- package/src/components/toast/CToastBody.tsx +28 -0
- package/src/components/toast/CToastClose.tsx +31 -0
- package/src/components/toast/CToastHeader.tsx +36 -0
- package/src/components/toast/CToaster.tsx +103 -0
- package/src/components/toast/__tests__/CToast.spec.tsx +87 -0
- package/src/components/toast/__tests__/CToastBody.spec.tsx +16 -0
- package/src/components/toast/__tests__/CToastHeader.spec.tsx +16 -0
- package/src/components/toast/__tests__/CToaster.spec.tsx +47 -0
- package/src/components/toast/__tests__/__snapshots__/CToast.spec.tsx.snap +27 -0
- package/src/components/toast/__tests__/__snapshots__/CToastBody.spec.tsx.snap +21 -0
- package/src/components/toast/__tests__/__snapshots__/CToastHeader.spec.tsx.snap +21 -0
- package/src/components/toast/__tests__/__snapshots__/CToaster.spec.tsx.snap +25 -0
- package/src/components/tooltip/CTooltip.tsx +116 -0
- package/src/components/tooltip/CTooltipContent.tsx +37 -0
- package/src/components/tooltip/__tests__/CTooltip.spec.tsx +50 -0
- package/src/components/tooltip/__tests__/__snapshots__/CTooltip.spec.tsx.snap +21 -0
- package/src/components/widgets/CWidgetStatsA.tsx +70 -0
- package/src/components/widgets/CWidgetStatsB.tsx +80 -0
- package/src/components/widgets/CWidgetStatsC.tsx +93 -0
- package/src/components/widgets/CWidgetStatsD.tsx +85 -0
- package/src/components/widgets/CWidgetStatsE.tsx +53 -0
- package/src/components/widgets/CWidgetStatsF.tsx +73 -0
- package/src/components/widgets/__tests__/CWidgetStatsA.spec.tsx +47 -0
- package/src/components/widgets/__tests__/CWidgetStatsB.spec.tsx +38 -0
- package/src/components/widgets/__tests__/CWidgetStatsC.spec.tsx +39 -0
- package/src/components/widgets/__tests__/CWidgetStatsD.spec.tsx +51 -0
- package/src/components/widgets/__tests__/CWidgetStatsE.spec.tsx +30 -0
- package/src/components/widgets/__tests__/CWidgetStatsF.spec.tsx +59 -0
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsA.spec.tsx.snap +40 -0
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsB.spec.tsx.snap +57 -0
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsC.spec.tsx.snap +59 -0
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsD.spec.tsx.snap +63 -0
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsE.spec.tsx.snap +36 -0
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsF.spec.tsx.snap +60 -0
- package/src/components/widgets/index.ts +8 -0
- package/src/index.ts +251 -0
- package/src/utils/hooks/index.ts +3 -0
- package/src/utils/hooks/useForkedRef.ts +45 -0
- package/tsconfig.json +25 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import React, { forwardRef, HTMLAttributes } from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import classNames from 'classnames'
|
|
4
|
+
|
|
5
|
+
type Span = 'auto' | number | string | boolean | null
|
|
6
|
+
|
|
7
|
+
type BPObject = {
|
|
8
|
+
span?: Span
|
|
9
|
+
offset?: number | string | null
|
|
10
|
+
order?: 'first' | 'last' | number | string | null
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type Col = Span | BPObject
|
|
14
|
+
|
|
15
|
+
export interface CColProps extends HTMLAttributes<HTMLDivElement> {
|
|
16
|
+
/**
|
|
17
|
+
* A string of all className you want applied to the base component. [docs]
|
|
18
|
+
*/
|
|
19
|
+
className?: string
|
|
20
|
+
/**
|
|
21
|
+
* The number of columns/offset/order on extra small devices (<576px). [docs]
|
|
22
|
+
*
|
|
23
|
+
* @type { 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}
|
|
24
|
+
*/
|
|
25
|
+
xs?: Col
|
|
26
|
+
/**
|
|
27
|
+
* The number of columns/offset/order on small devices (<768px). [docs]
|
|
28
|
+
*
|
|
29
|
+
* @type { 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}
|
|
30
|
+
*/
|
|
31
|
+
sm?: Col
|
|
32
|
+
/**
|
|
33
|
+
* The number of columns/offset/order on medium devices (<992px). [docs]
|
|
34
|
+
*
|
|
35
|
+
* @type { 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}
|
|
36
|
+
*/
|
|
37
|
+
md?: Col
|
|
38
|
+
/**
|
|
39
|
+
* The number of columns/offset/order on large devices (<1200px). [docs]
|
|
40
|
+
*
|
|
41
|
+
* @type { 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}
|
|
42
|
+
*/
|
|
43
|
+
lg?: Col
|
|
44
|
+
/**
|
|
45
|
+
* The number of columns/offset/order on X-Large devices (<1400px). [docs]
|
|
46
|
+
*
|
|
47
|
+
* @type { 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}
|
|
48
|
+
*/
|
|
49
|
+
xl?: Col
|
|
50
|
+
/**
|
|
51
|
+
* The number of columns/offset/order on XX-Large devices (≥1400px). [docs]
|
|
52
|
+
*
|
|
53
|
+
* @type { 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }}
|
|
54
|
+
*/
|
|
55
|
+
xxl?: Col
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const BREAKPOINTS = [
|
|
59
|
+
'xxl' as const,
|
|
60
|
+
'xl' as const,
|
|
61
|
+
'lg' as const,
|
|
62
|
+
'md' as const,
|
|
63
|
+
'sm' as const,
|
|
64
|
+
'xs' as const,
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
export const CCol = forwardRef<HTMLDivElement, CColProps>(
|
|
68
|
+
({ children, className, ...rest }, ref) => {
|
|
69
|
+
const repsonsiveCLassNames: string[] = []
|
|
70
|
+
|
|
71
|
+
BREAKPOINTS.forEach((bp) => {
|
|
72
|
+
const breakpoint = rest[bp]
|
|
73
|
+
delete rest[bp]
|
|
74
|
+
|
|
75
|
+
const infix = bp === 'xs' ? '' : `-${bp}`
|
|
76
|
+
|
|
77
|
+
if (typeof breakpoint === 'number' || typeof breakpoint === 'string') {
|
|
78
|
+
repsonsiveCLassNames.push(`col${infix}-${breakpoint}`)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (typeof breakpoint === 'boolean') {
|
|
82
|
+
repsonsiveCLassNames.push(`col${infix}`)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (breakpoint && typeof breakpoint === 'object') {
|
|
86
|
+
if (typeof breakpoint.span === 'number' || typeof breakpoint.span === 'string') {
|
|
87
|
+
repsonsiveCLassNames.push(`col${infix}-${breakpoint.span}`)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (typeof breakpoint.span === 'boolean') {
|
|
91
|
+
repsonsiveCLassNames.push(`col${infix}`)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (typeof breakpoint.order === 'number' || typeof breakpoint.order === 'string') {
|
|
95
|
+
repsonsiveCLassNames.push(`order${infix}-${breakpoint.order}`)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (typeof breakpoint.offset === 'number') {
|
|
99
|
+
repsonsiveCLassNames.push(`offset${infix}-${breakpoint.offset}`)
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
const _className = classNames(
|
|
105
|
+
repsonsiveCLassNames.length ? repsonsiveCLassNames : 'col',
|
|
106
|
+
className,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<div className={_className} {...rest} ref={ref}>
|
|
111
|
+
{children}
|
|
112
|
+
</div>
|
|
113
|
+
)
|
|
114
|
+
},
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
const span = PropTypes.oneOfType([
|
|
118
|
+
PropTypes.bool,
|
|
119
|
+
PropTypes.number,
|
|
120
|
+
PropTypes.string,
|
|
121
|
+
PropTypes.oneOf(['auto']),
|
|
122
|
+
])
|
|
123
|
+
|
|
124
|
+
const col = PropTypes.oneOfType([
|
|
125
|
+
span,
|
|
126
|
+
PropTypes.shape({
|
|
127
|
+
span: span,
|
|
128
|
+
offset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
129
|
+
order: PropTypes.oneOfType([
|
|
130
|
+
PropTypes.oneOf(['first', 'last']),
|
|
131
|
+
PropTypes.number,
|
|
132
|
+
PropTypes.string,
|
|
133
|
+
]),
|
|
134
|
+
}),
|
|
135
|
+
])
|
|
136
|
+
|
|
137
|
+
CCol.propTypes = {
|
|
138
|
+
children: PropTypes.node,
|
|
139
|
+
className: PropTypes.string,
|
|
140
|
+
xs: col,
|
|
141
|
+
sm: col,
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
CCol.displayName = 'CCol'
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React, { forwardRef, HTMLAttributes } from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import classNames from 'classnames'
|
|
4
|
+
|
|
5
|
+
export interface CContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* A string of all className you want applied to the base component. [docs]
|
|
8
|
+
*/
|
|
9
|
+
className?: string
|
|
10
|
+
/**
|
|
11
|
+
* Set container 100% wide until small breakpoint. [docs]
|
|
12
|
+
*/
|
|
13
|
+
sm?: boolean
|
|
14
|
+
/**
|
|
15
|
+
* Set container 100% wide until medium breakpoint. [docs]
|
|
16
|
+
*/
|
|
17
|
+
md?: boolean
|
|
18
|
+
/**
|
|
19
|
+
* Set container 100% wide until large breakpoint. [docs]
|
|
20
|
+
*/
|
|
21
|
+
lg?: boolean
|
|
22
|
+
/**
|
|
23
|
+
* Set container 100% wide until X-large breakpoint. [docs]
|
|
24
|
+
*/
|
|
25
|
+
xl?: boolean
|
|
26
|
+
/**
|
|
27
|
+
* Set container 100% wide until XX-large breakpoint. [docs]
|
|
28
|
+
*/
|
|
29
|
+
xxl?: boolean
|
|
30
|
+
/**
|
|
31
|
+
* Set container 100% wide, spanning the entire width of the viewport. [docs]
|
|
32
|
+
*/
|
|
33
|
+
fluid?: boolean
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const BREAKPOINTS = [
|
|
37
|
+
'xxl' as const,
|
|
38
|
+
'xl' as const,
|
|
39
|
+
'lg' as const,
|
|
40
|
+
'md' as const,
|
|
41
|
+
'sm' as const,
|
|
42
|
+
'fluid' as const,
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
export const CContainer = forwardRef<HTMLDivElement, CContainerProps>(
|
|
46
|
+
({ children, className, ...rest }, ref) => {
|
|
47
|
+
const repsonsiveCLassNames: string[] = []
|
|
48
|
+
|
|
49
|
+
BREAKPOINTS.forEach((bp) => {
|
|
50
|
+
const breakpoint = rest[bp]
|
|
51
|
+
delete rest[bp]
|
|
52
|
+
|
|
53
|
+
breakpoint && repsonsiveCLassNames.push(`container-${bp}`)
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const _className = classNames(
|
|
57
|
+
repsonsiveCLassNames.length ? repsonsiveCLassNames : 'container',
|
|
58
|
+
className,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div className={_className} {...rest} ref={ref}>
|
|
63
|
+
{children}
|
|
64
|
+
</div>
|
|
65
|
+
)
|
|
66
|
+
},
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
CContainer.propTypes = {
|
|
70
|
+
children: PropTypes.node,
|
|
71
|
+
className: PropTypes.string,
|
|
72
|
+
sm: PropTypes.bool,
|
|
73
|
+
md: PropTypes.bool,
|
|
74
|
+
lg: PropTypes.bool,
|
|
75
|
+
xl: PropTypes.bool,
|
|
76
|
+
xxl: PropTypes.bool,
|
|
77
|
+
fluid: PropTypes.bool,
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
CContainer.displayName = 'CContainer'
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React, { forwardRef, HTMLAttributes } from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import classNames from 'classnames'
|
|
4
|
+
|
|
5
|
+
export type BPObject = {
|
|
6
|
+
cols?: 'auto' | number | string | null
|
|
7
|
+
gutter?: number | string | null
|
|
8
|
+
gutterX?: number | string | null
|
|
9
|
+
gutterY?: number | string | null
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface CRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
/**
|
|
14
|
+
* A string of all className you want applied to the base component. [docs]
|
|
15
|
+
*/
|
|
16
|
+
className?: string
|
|
17
|
+
/**
|
|
18
|
+
* The number of columns/offset/order on extra small devices (<576px). [docs]
|
|
19
|
+
*
|
|
20
|
+
* @type {{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}
|
|
21
|
+
*/
|
|
22
|
+
xs?: BPObject
|
|
23
|
+
/**
|
|
24
|
+
* The number of columns/offset/order on small devices (<768px). [docs]
|
|
25
|
+
*
|
|
26
|
+
* @type {{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}
|
|
27
|
+
*/
|
|
28
|
+
sm?: BPObject
|
|
29
|
+
/**
|
|
30
|
+
* The number of columns/offset/order on medium devices (<992px). [docs]
|
|
31
|
+
*
|
|
32
|
+
* @type {{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}
|
|
33
|
+
*/
|
|
34
|
+
md?: BPObject
|
|
35
|
+
/**
|
|
36
|
+
* The number of columns/offset/order on large devices (<1200px). [docs]
|
|
37
|
+
*
|
|
38
|
+
* @type {{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}
|
|
39
|
+
*/
|
|
40
|
+
lg?: BPObject
|
|
41
|
+
/**
|
|
42
|
+
* The number of columns/offset/order on X-Large devices (<1400px). [docs]
|
|
43
|
+
*
|
|
44
|
+
* @type {{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}
|
|
45
|
+
*/
|
|
46
|
+
xl?: BPObject
|
|
47
|
+
/**
|
|
48
|
+
* The number of columns/offset/order on XX-Large devices (≥1400px). [docs]
|
|
49
|
+
*
|
|
50
|
+
* @type {{ cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }}
|
|
51
|
+
*/
|
|
52
|
+
xxl?: BPObject
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const BREAKPOINTS = [
|
|
56
|
+
'xxl' as const,
|
|
57
|
+
'xl' as const,
|
|
58
|
+
'lg' as const,
|
|
59
|
+
'md' as const,
|
|
60
|
+
'sm' as const,
|
|
61
|
+
'xs' as const,
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
export const CRow = forwardRef<HTMLDivElement, CRowProps>(
|
|
65
|
+
({ children, className, ...rest }, ref) => {
|
|
66
|
+
const repsonsiveCLassNames: string[] = []
|
|
67
|
+
|
|
68
|
+
BREAKPOINTS.forEach((bp) => {
|
|
69
|
+
const breakpoint = rest[bp]
|
|
70
|
+
delete rest[bp]
|
|
71
|
+
|
|
72
|
+
const infix = bp === 'xs' ? '' : `-${bp}`
|
|
73
|
+
|
|
74
|
+
if (typeof breakpoint === 'object') {
|
|
75
|
+
if (breakpoint.cols) {
|
|
76
|
+
repsonsiveCLassNames.push(`row-cols${infix}-${breakpoint.cols}`)
|
|
77
|
+
}
|
|
78
|
+
if (typeof breakpoint.gutter === 'number') {
|
|
79
|
+
repsonsiveCLassNames.push(`g${infix}-${breakpoint.gutter}`)
|
|
80
|
+
}
|
|
81
|
+
if (typeof breakpoint.gutterX === 'number') {
|
|
82
|
+
repsonsiveCLassNames.push(`gx${infix}-${breakpoint.gutterX}`)
|
|
83
|
+
}
|
|
84
|
+
if (typeof breakpoint.gutterY === 'number') {
|
|
85
|
+
repsonsiveCLassNames.push(`gy${infix}-${breakpoint.gutterY}`)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
const _className = classNames('row', repsonsiveCLassNames, className)
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<div className={_className} ref={ref}>
|
|
94
|
+
{children}
|
|
95
|
+
</div>
|
|
96
|
+
)
|
|
97
|
+
},
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
const bp = PropTypes.shape({
|
|
101
|
+
cols: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.string]),
|
|
102
|
+
gutter: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
103
|
+
gutterX: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
104
|
+
gutterY: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
CRow.propTypes = {
|
|
108
|
+
children: PropTypes.node,
|
|
109
|
+
className: PropTypes.string,
|
|
110
|
+
xs: bp,
|
|
111
|
+
sm: bp,
|
|
112
|
+
md: bp,
|
|
113
|
+
lg: bp,
|
|
114
|
+
xl: bp,
|
|
115
|
+
xxl: bp,
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
CRow.displayName = 'CRow'
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { render } from '@testing-library/react'
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect'
|
|
4
|
+
import { CCol } from '../../../index'
|
|
5
|
+
|
|
6
|
+
test('CCol no-breakpoints', async () => {
|
|
7
|
+
const { container } = render(<CCol>Test</CCol>)
|
|
8
|
+
expect(container).toMatchSnapshot()
|
|
9
|
+
expect(container.firstChild).toHaveClass('col')
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
test('CCol customize breakpoints are numbers', async () => {
|
|
13
|
+
const { container } = render(
|
|
14
|
+
<CCol className="bazinga" xs={1} sm={2} md={3} lg={4} xl={5} xxl={6}>
|
|
15
|
+
Test
|
|
16
|
+
</CCol>,
|
|
17
|
+
)
|
|
18
|
+
expect(container).toMatchSnapshot()
|
|
19
|
+
expect(container.firstChild).toHaveClass('bazinga')
|
|
20
|
+
expect(container.firstChild).toHaveClass('col-1')
|
|
21
|
+
expect(container.firstChild).toHaveClass('col-sm-2')
|
|
22
|
+
expect(container.firstChild).toHaveClass('col-md-3')
|
|
23
|
+
expect(container.firstChild).toHaveClass('col-lg-4')
|
|
24
|
+
expect(container.firstChild).toHaveClass('col-xl-5')
|
|
25
|
+
expect(container.firstChild).toHaveClass('col-xxl-6')
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
test('CCol customize breakpoints are boolean', async () => {
|
|
29
|
+
const { container } = render(
|
|
30
|
+
<CCol className="bazinga" xs={true} sm={true} md={true} lg={true} xl={true} xxl={true}>
|
|
31
|
+
Test
|
|
32
|
+
</CCol>,
|
|
33
|
+
)
|
|
34
|
+
expect(container).toMatchSnapshot()
|
|
35
|
+
expect(container.firstChild).toHaveClass('bazinga')
|
|
36
|
+
expect(container.firstChild).toHaveClass('col')
|
|
37
|
+
expect(container.firstChild).toHaveClass('col-sm')
|
|
38
|
+
expect(container.firstChild).toHaveClass('col-md')
|
|
39
|
+
expect(container.firstChild).toHaveClass('col-lg')
|
|
40
|
+
expect(container.firstChild).toHaveClass('col-xl')
|
|
41
|
+
expect(container.firstChild).toHaveClass('col-xxl')
|
|
42
|
+
})
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { render } from '@testing-library/react'
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect'
|
|
4
|
+
import { CContainer } from '../../../index'
|
|
5
|
+
|
|
6
|
+
test('loads and displays CContainer component', async () => {
|
|
7
|
+
const { container } = render(<CContainer>Test</CContainer>)
|
|
8
|
+
expect(container).toMatchSnapshot()
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
test('CContainer customize fluid', async () => {
|
|
12
|
+
const { container } = render(
|
|
13
|
+
<CContainer className="bazinga" fluid>
|
|
14
|
+
Test
|
|
15
|
+
</CContainer>,
|
|
16
|
+
)
|
|
17
|
+
expect(container).toMatchSnapshot()
|
|
18
|
+
expect(container.firstChild).toHaveClass('bazinga')
|
|
19
|
+
expect(container.firstChild).toHaveClass('container-fluid')
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
test('CContainer customize', async () => {
|
|
23
|
+
const { container } = render(
|
|
24
|
+
<CContainer md className="bazinga">
|
|
25
|
+
Test
|
|
26
|
+
</CContainer>,
|
|
27
|
+
)
|
|
28
|
+
expect(container).toMatchSnapshot()
|
|
29
|
+
expect(container.firstChild).toHaveClass('bazinga')
|
|
30
|
+
expect(container.firstChild).toHaveClass('container-md')
|
|
31
|
+
})
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { render } from '@testing-library/react'
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect'
|
|
4
|
+
import { CRow } from '../../../index'
|
|
5
|
+
|
|
6
|
+
test('CRow not-customize', async () => {
|
|
7
|
+
const { container } = render(<CRow>Test</CRow>)
|
|
8
|
+
expect(container).toMatchSnapshot()
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
test('CRow customize cols', async () => {
|
|
12
|
+
const { container } = render(
|
|
13
|
+
<CRow
|
|
14
|
+
className="bazinga"
|
|
15
|
+
xs={{ cols: 1 }}
|
|
16
|
+
sm={{ cols: 2 }}
|
|
17
|
+
md={{ cols: 3 }}
|
|
18
|
+
lg={{ cols: 4 }}
|
|
19
|
+
xl={{ cols: 5 }}
|
|
20
|
+
xxl={{ cols: 6 }}
|
|
21
|
+
>
|
|
22
|
+
Test
|
|
23
|
+
</CRow>,
|
|
24
|
+
)
|
|
25
|
+
expect(container).toMatchSnapshot()
|
|
26
|
+
expect(container.firstChild).toHaveClass('bazinga')
|
|
27
|
+
expect(container.firstChild).toHaveClass('row-cols-1')
|
|
28
|
+
expect(container.firstChild).toHaveClass('row-cols-sm-2')
|
|
29
|
+
expect(container.firstChild).toHaveClass('row-cols-md-3')
|
|
30
|
+
expect(container.firstChild).toHaveClass('row-cols-lg-4')
|
|
31
|
+
expect(container.firstChild).toHaveClass('row-cols-xl-5')
|
|
32
|
+
expect(container.firstChild).toHaveClass('row-cols-xxl-6')
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
test('CRow customize gutter single gutter', async () => {
|
|
36
|
+
const { container } = render(
|
|
37
|
+
<CRow className="bazinga" xs={{ gutter: 7 }}>
|
|
38
|
+
Test
|
|
39
|
+
</CRow>,
|
|
40
|
+
)
|
|
41
|
+
expect(container).toMatchSnapshot()
|
|
42
|
+
expect(container.firstChild).toHaveClass('bazinga')
|
|
43
|
+
expect(container.firstChild).toHaveClass('g-7')
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
test('CRow customize gutter', async () => {
|
|
47
|
+
const { container } = render(
|
|
48
|
+
<CRow
|
|
49
|
+
className="bazinga"
|
|
50
|
+
xs={{ gutter: 1 }}
|
|
51
|
+
sm={{ gutter: 2 }}
|
|
52
|
+
md={{ gutter: 3 }}
|
|
53
|
+
lg={{ gutter: 4 }}
|
|
54
|
+
xl={{ gutter: 5 }}
|
|
55
|
+
xxl={{ gutter: 6 }}
|
|
56
|
+
>
|
|
57
|
+
Test
|
|
58
|
+
</CRow>,
|
|
59
|
+
)
|
|
60
|
+
expect(container).toMatchSnapshot()
|
|
61
|
+
expect(container.firstChild).toHaveClass('bazinga')
|
|
62
|
+
expect(container.firstChild).toHaveClass('g-1')
|
|
63
|
+
expect(container.firstChild).toHaveClass('g-sm-2')
|
|
64
|
+
expect(container.firstChild).toHaveClass('g-md-3')
|
|
65
|
+
expect(container.firstChild).toHaveClass('g-lg-4')
|
|
66
|
+
expect(container.firstChild).toHaveClass('g-xl-5')
|
|
67
|
+
expect(container.firstChild).toHaveClass('g-xxl-6')
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
test('CRow customize gutterX', async () => {
|
|
71
|
+
const { container } = render(
|
|
72
|
+
<CRow
|
|
73
|
+
className="bazinga"
|
|
74
|
+
xs={{ gutterX: 1 }}
|
|
75
|
+
sm={{ gutterX: 2 }}
|
|
76
|
+
md={{ gutterX: 3 }}
|
|
77
|
+
lg={{ gutterX: 4 }}
|
|
78
|
+
xl={{ gutterX: 5 }}
|
|
79
|
+
xxl={{ gutterX: 6 }}
|
|
80
|
+
>
|
|
81
|
+
Test
|
|
82
|
+
</CRow>,
|
|
83
|
+
)
|
|
84
|
+
expect(container).toMatchSnapshot()
|
|
85
|
+
expect(container.firstChild).toHaveClass('bazinga')
|
|
86
|
+
expect(container.firstChild).toHaveClass('gx-1')
|
|
87
|
+
expect(container.firstChild).toHaveClass('gx-sm-2')
|
|
88
|
+
expect(container.firstChild).toHaveClass('gx-md-3')
|
|
89
|
+
expect(container.firstChild).toHaveClass('gx-lg-4')
|
|
90
|
+
expect(container.firstChild).toHaveClass('gx-xl-5')
|
|
91
|
+
expect(container.firstChild).toHaveClass('gx-xxl-6')
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
test('CRow customize gutterY', async () => {
|
|
95
|
+
const { container } = render(
|
|
96
|
+
<CRow
|
|
97
|
+
className="bazinga"
|
|
98
|
+
xs={{ gutterY: 1 }}
|
|
99
|
+
sm={{ gutterY: 2 }}
|
|
100
|
+
md={{ gutterY: 3 }}
|
|
101
|
+
lg={{ gutterY: 4 }}
|
|
102
|
+
xl={{ gutterY: 5 }}
|
|
103
|
+
xxl={{ gutterY: 6 }}
|
|
104
|
+
>
|
|
105
|
+
Test
|
|
106
|
+
</CRow>,
|
|
107
|
+
)
|
|
108
|
+
expect(container).toMatchSnapshot()
|
|
109
|
+
expect(container.firstChild).toHaveClass('bazinga')
|
|
110
|
+
expect(container.firstChild).toHaveClass('gy-1')
|
|
111
|
+
expect(container.firstChild).toHaveClass('gy-sm-2')
|
|
112
|
+
expect(container.firstChild).toHaveClass('gy-md-3')
|
|
113
|
+
expect(container.firstChild).toHaveClass('gy-lg-4')
|
|
114
|
+
expect(container.firstChild).toHaveClass('gy-xl-5')
|
|
115
|
+
expect(container.firstChild).toHaveClass('gy-xxl-6')
|
|
116
|
+
})
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`CCol customize breakpoints are boolean 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="col-xxl col-xl col-lg col-md col-sm col bazinga"
|
|
7
|
+
>
|
|
8
|
+
Test
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
exports[`CCol customize breakpoints are numbers 1`] = `
|
|
14
|
+
<div>
|
|
15
|
+
<div
|
|
16
|
+
class="col-xxl-6 col-xl-5 col-lg-4 col-md-3 col-sm-2 col-1 bazinga"
|
|
17
|
+
>
|
|
18
|
+
Test
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
exports[`CCol no-breakpoints 1`] = `
|
|
24
|
+
<div>
|
|
25
|
+
<div
|
|
26
|
+
class="col"
|
|
27
|
+
>
|
|
28
|
+
Test
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
`;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`CContainer customize 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="container-md bazinga"
|
|
7
|
+
>
|
|
8
|
+
Test
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
exports[`CContainer customize fluid 1`] = `
|
|
14
|
+
<div>
|
|
15
|
+
<div
|
|
16
|
+
class="container-fluid bazinga"
|
|
17
|
+
>
|
|
18
|
+
Test
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
exports[`loads and displays CContainer component 1`] = `
|
|
24
|
+
<div>
|
|
25
|
+
<div
|
|
26
|
+
class="container"
|
|
27
|
+
>
|
|
28
|
+
Test
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
`;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`CRow customize cols 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="row row-cols-xxl-6 row-cols-xl-5 row-cols-lg-4 row-cols-md-3 row-cols-sm-2 row-cols-1 bazinga"
|
|
7
|
+
>
|
|
8
|
+
Test
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
exports[`CRow customize gutter 1`] = `
|
|
14
|
+
<div>
|
|
15
|
+
<div
|
|
16
|
+
class="row g-xxl-6 g-xl-5 g-lg-4 g-md-3 g-sm-2 g-1 bazinga"
|
|
17
|
+
>
|
|
18
|
+
Test
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
exports[`CRow customize gutter single gutter 1`] = `
|
|
24
|
+
<div>
|
|
25
|
+
<div
|
|
26
|
+
class="row g-7 bazinga"
|
|
27
|
+
>
|
|
28
|
+
Test
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
exports[`CRow customize gutterX 1`] = `
|
|
34
|
+
<div>
|
|
35
|
+
<div
|
|
36
|
+
class="row gx-xxl-6 gx-xl-5 gx-lg-4 gx-md-3 gx-sm-2 gx-1 bazinga"
|
|
37
|
+
>
|
|
38
|
+
Test
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
exports[`CRow customize gutterY 1`] = `
|
|
44
|
+
<div>
|
|
45
|
+
<div
|
|
46
|
+
class="row gy-xxl-6 gy-xl-5 gy-lg-4 gy-md-3 gy-sm-2 gy-1 bazinga"
|
|
47
|
+
>
|
|
48
|
+
Test
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
exports[`CRow not-customize 1`] = `
|
|
54
|
+
<div>
|
|
55
|
+
<div
|
|
56
|
+
class="row"
|
|
57
|
+
>
|
|
58
|
+
Test
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
`;
|