@coreui/vue-pro 4.8.0 → 4.8.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/accordion/CAccordion.d.ts +2 -11
- package/dist/components/accordion/CAccordionItem.d.ts +3 -13
- package/dist/components/alert/CAlert.d.ts +2 -17
- package/dist/components/alert/CAlertHeading.d.ts +0 -2
- package/dist/components/avatar/CAvatar.d.ts +13 -25
- package/dist/components/backdrop/CBackdrop.d.ts +1 -4
- package/dist/components/badge/CBadge.d.ts +0 -12
- package/dist/components/breadcrumb/CBreadcrumbItem.d.ts +4 -19
- package/dist/components/button/CButton.d.ts +6 -43
- package/dist/components/button-group/CButtonGroup.d.ts +2 -13
- package/dist/components/card/CCardHeader.d.ts +0 -2
- package/dist/components/card/CCardImage.d.ts +0 -7
- package/dist/components/card/CCardLink.d.ts +0 -2
- package/dist/components/card/CCardSubtitle.d.ts +0 -2
- package/dist/components/card/CCardText.d.ts +0 -2
- package/dist/components/card/CCardTitle.d.ts +0 -2
- package/dist/components/carousel/CCarousel.d.ts +0 -10
- package/dist/components/carousel/CCarouselItem.d.ts +0 -4
- package/dist/components/close-button/CCloseButton.d.ts +5 -17
- package/dist/components/collapse/CCollapse.d.ts +4 -16
- package/dist/components/dropdown/CDropdown.d.ts +11 -46
- package/dist/components/dropdown/CDropdownHeader.d.ts +0 -2
- package/dist/components/dropdown/CDropdownItem.d.ts +6 -29
- package/dist/components/dropdown/CDropdownMenu.d.ts +0 -2
- package/dist/components/dropdown/CDropdownToggle.d.ts +7 -43
- package/dist/components/footer/CFooter.d.ts +1 -7
- package/dist/components/form/CForm.d.ts +2 -8
- package/dist/components/form/CFormCheck.d.ts +17 -49
- package/dist/components/form/CFormControlValidation.d.ts +8 -24
- package/dist/components/form/CFormFeedback.d.ts +0 -2
- package/dist/components/form/CFormInput.d.ts +145 -194
- package/dist/components/form/CFormLabel.d.ts +3 -13
- package/dist/components/form/CFormRange.d.ts +16 -64
- package/dist/components/form/CFormSelect.d.ts +20 -82
- package/dist/components/form/CFormSwitch.d.ts +11 -33
- package/dist/components/form/CFormText.d.ts +0 -2
- package/dist/components/form/CFormTextarea.d.ts +22 -69
- package/dist/components/form/CInputGroup.d.ts +1 -7
- package/dist/components/form/CInputGroupText.d.ts +0 -2
- package/dist/components/grid/CCol.d.ts +1 -32
- package/dist/components/grid/CContainer.d.ts +12 -48
- package/dist/components/grid/CRow.d.ts +23 -68
- package/dist/components/header/CHeader.d.ts +1 -12
- package/dist/components/header/CHeaderBrand.d.ts +0 -2
- package/dist/components/header/CHeaderNav.d.ts +0 -2
- package/dist/components/image/CImage.d.ts +6 -29
- package/dist/components/link/CLink.d.ts +6 -29
- package/dist/components/list-group/CListGroup.d.ts +2 -15
- package/dist/components/list-group/CListGroupItem.d.ts +4 -18
- package/dist/components/modal/CModal.d.ts +4 -21
- package/dist/components/modal/CModalHeader.d.ts +0 -2
- package/dist/components/modal/CModalTitle.d.ts +0 -2
- package/dist/components/nav/CNav.d.ts +0 -12
- package/dist/components/nav/CNavLink.d.ts +6 -29
- package/dist/components/navbar/CNavbar.d.ts +0 -22
- package/dist/components/navbar/CNavbarBrand.d.ts +2 -13
- package/dist/components/navbar/CNavbarNav.d.ts +0 -2
- package/dist/components/offcanvas/COffcanvas.d.ts +8 -5
- package/dist/components/offcanvas/COffcanvasTitle.d.ts +0 -2
- package/dist/components/pagination/CPagination.d.ts +1 -12
- package/dist/components/pagination/CPaginationItem.d.ts +8 -38
- package/dist/components/placeholder/CPlaceholder.d.ts +12 -78
- package/dist/components/popover/CPopover.d.ts +4 -28
- package/dist/components/progress/CProgressBar.d.ts +2 -15
- package/dist/components/props.d.ts +5 -6
- package/dist/components/sidebar/CSidebar.d.ts +4 -22
- package/dist/components/spinner/CSpinner.d.ts +0 -16
- package/dist/components/table/CTable.d.ts +17 -110
- package/dist/components/table/CTableDataCell.d.ts +4 -21
- package/dist/components/table/CTableRow.d.ts +2 -13
- package/dist/components/table/types.d.ts +14 -0
- package/dist/components/table/utils.d.ts +5 -0
- package/dist/components/tabs/CTabPane.d.ts +0 -2
- package/dist/components/toast/CToast.d.ts +7 -46
- package/dist/components/toast/CToastHeader.d.ts +2 -8
- package/dist/components/toast/CToaster.d.ts +1 -7
- package/dist/components/tooltip/CTooltip.d.ts +2 -17
- package/dist/components/widgets/CWidgetStatsA.d.ts +4 -24
- package/dist/components/widgets/CWidgetStatsB.d.ts +6 -34
- package/dist/components/widgets/CWidgetStatsC.d.ts +14 -23
- package/dist/components/widgets/CWidgetStatsD.d.ts +0 -2
- package/dist/components/widgets/CWidgetStatsE.d.ts +2 -13
- package/dist/components/widgets/CWidgetStatsF.d.ts +4 -24
- package/dist/index.es.js +353 -995
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +353 -995
- package/dist/index.js.map +1 -1
- package/dist/props.d.ts +19 -0
- package/dist/types.d.ts +5 -0
- package/package.json +1 -1
- package/src/components/accordion/CAccordion.ts +1 -5
- package/src/components/accordion/CAccordionBody.ts +1 -1
- package/src/components/accordion/CAccordionItem.ts +1 -6
- package/src/components/accordion/__tests__/__snapshots__/CAccordion.spec.ts.snap +1 -1
- package/src/components/accordion/__tests__/__snapshots__/CAccordionBody.spec.ts.snap +3 -3
- package/src/components/accordion/__tests__/__snapshots__/CAccordionButton.spec.ts.snap +1 -1
- package/src/components/accordion/__tests__/__snapshots__/CAccordionHeader.spec.ts.snap +1 -1
- package/src/components/accordion/__tests__/__snapshots__/CAccordionItem.spec.ts.snap +1 -1
- package/src/components/alert/CAlert.ts +4 -12
- package/src/components/alert/CAlertHeading.ts +0 -1
- package/src/components/alert/__tests__/CAlert.spec.ts +1 -1
- package/src/components/alert/__tests__/__snapshots__/CAlert.spec.ts.snap +16 -1
- package/src/components/alert/__tests__/__snapshots__/CAlertHeading.spec.ts.snap +2 -2
- package/src/components/alert/__tests__/__snapshots__/CAlertLink.spec.ts.snap +1 -1
- package/src/components/avatar/CAvatar.ts +3 -10
- package/src/components/avatar/__tests__/__snapshots__/CAvatar.spec.ts.snap +2 -2
- package/src/components/backdrop/CBackdrop.ts +7 -29
- package/src/components/backdrop/__tests__/__snapshots__/CBackdrop.spec.ts.snap +2 -2
- package/src/components/badge/CBadge.ts +1 -6
- package/src/components/badge/__tests__/CBadge.spec.ts +1 -1
- package/src/components/breadcrumb/CBreadcrumbItem.ts +2 -9
- package/src/components/breadcrumb/__tests__/__snapshots__/CBreadcrumb.spec.ts.snap +2 -2
- package/src/components/breadcrumb/__tests__/__snapshots__/CBreadcrumbItem.spec.ts.snap +2 -2
- package/src/components/button/CButton.ts +5 -21
- package/src/components/button/__tests__/__snapshots__/CButton.spec.ts.snap +3 -3
- package/src/components/button-group/CButtonGroup.ts +1 -6
- package/src/components/button-group/__tests__/__snapshots__/CButtonGroup.spec.ts.snap +2 -2
- package/src/components/button-group/__tests__/__snapshots__/CButtonToolbar.spec.ts.snap +1 -1
- package/src/components/callout/CCallout.ts +2 -1
- package/src/components/callout/__tests__/__snapshots__/CCallout.spec.ts.snap +2 -2
- package/src/components/card/CCard.ts +2 -1
- package/src/components/card/CCardHeader.ts +0 -1
- package/src/components/card/CCardImage.ts +0 -3
- package/src/components/card/CCardLink.ts +0 -1
- package/src/components/card/CCardSubtitle.ts +0 -1
- package/src/components/card/CCardText.ts +0 -1
- package/src/components/card/CCardTitle.ts +0 -1
- package/src/components/card/__tests__/__snapshots__/CCard.spec.ts.snap +2 -2
- package/src/components/card/__tests__/__snapshots__/CCardBody.spec.ts.snap +1 -1
- package/src/components/card/__tests__/__snapshots__/CCardFooter.spec.ts.snap +1 -1
- package/src/components/card/__tests__/__snapshots__/CCardGroup.spec.ts.snap +1 -1
- package/src/components/card/__tests__/__snapshots__/CCardHeader.spec.ts.snap +2 -2
- package/src/components/card/__tests__/__snapshots__/CCardImage.spec.ts.snap +2 -2
- package/src/components/card/__tests__/__snapshots__/CCardImageOverlay.spec.ts.snap +1 -1
- package/src/components/card/__tests__/__snapshots__/CCardLink.spec.ts.snap +1 -1
- package/src/components/card/__tests__/__snapshots__/CCardSubtitle.spec.ts.snap +2 -2
- package/src/components/card/__tests__/__snapshots__/CCardText.spec.ts.snap +2 -2
- package/src/components/card/__tests__/__snapshots__/CCardTitle.spec.ts.snap +2 -2
- package/src/components/carousel/CCarousel.ts +1 -6
- package/src/components/carousel/CCarouselItem.ts +0 -2
- package/src/components/carousel/__tests__/__snapshots__/CCarousel.spec.ts.snap +5 -5
- package/src/components/carousel/__tests__/__snapshots__/CCarouselCaption.spec.ts.snap +1 -1
- package/src/components/carousel/__tests__/__snapshots__/CCarouselItem.spec.ts.snap +2 -2
- package/src/components/close-button/CCloseButton.ts +2 -8
- package/src/components/close-button/__tests__/__snapshots__/CCloseButton.spec.ts.snap +2 -2
- package/src/components/collapse/CCollapse.ts +3 -9
- package/src/components/collapse/__test__/__snapshots__/CCollapse.spec.ts.snap +4 -4
- package/src/components/dropdown/CDropdown.ts +6 -21
- package/src/components/dropdown/CDropdownHeader.ts +0 -1
- package/src/components/dropdown/CDropdownItem.ts +3 -14
- package/src/components/dropdown/CDropdownMenu.ts +0 -1
- package/src/components/dropdown/CDropdownToggle.ts +8 -23
- package/src/components/dropdown/__tests__/__snapshots__/CDropdown.spec.ts.snap +2 -2
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownDivider.spec.ts.snap +1 -1
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownHeader.spec.ts.snap +2 -2
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownItem.spec.ts.snap +2 -2
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownMenu.spec.ts.snap +2 -2
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownToggle.spec.ts.snap +2 -2
- package/src/components/footer/CFooter.ts +0 -2
- package/src/components/footer/__tests__/__snapshots__/CFooter.spec.ts.snap +2 -2
- package/src/components/form/CForm.ts +1 -4
- package/src/components/form/CFormCheck.ts +8 -24
- package/src/components/form/CFormControlValidation.ts +4 -12
- package/src/components/form/CFormControlWrapper.ts +4 -12
- package/src/components/form/CFormFeedback.ts +0 -1
- package/src/components/form/CFormInput.ts +11 -37
- package/src/components/form/CFormLabel.ts +1 -5
- package/src/components/form/CFormRange.ts +8 -30
- package/src/components/form/CFormSelect.ts +10 -39
- package/src/components/form/CFormSwitch.ts +5 -16
- package/src/components/form/CFormText.ts +0 -1
- package/src/components/form/CFormTextarea.ts +11 -34
- package/src/components/form/CInputGroup.ts +0 -2
- package/src/components/form/CInputGroupText.ts +0 -1
- package/src/components/form/__tests__/__snapshots__/CForm.spec.ts.snap +2 -2
- package/src/components/form/__tests__/__snapshots__/CFormCheck.spec.ts.snap +5 -5
- package/src/components/form/__tests__/__snapshots__/CFormFeedback.spec.ts.snap +3 -3
- package/src/components/form/__tests__/__snapshots__/CFormFloating.spec.ts.snap +1 -1
- package/src/components/form/__tests__/__snapshots__/CFormInput.spec.ts.snap +3 -3
- package/src/components/form/__tests__/__snapshots__/CFormLabel.spec.ts.snap +2 -2
- package/src/components/form/__tests__/__snapshots__/CFormRange.spec.ts.snap +2 -2
- package/src/components/form/__tests__/__snapshots__/CFormSelect.spec.ts.snap +2 -2
- package/src/components/form/__tests__/__snapshots__/CFormSwitch.spec.ts.snap +2 -2
- package/src/components/form/__tests__/__snapshots__/CFormText.spec.ts.snap +2 -2
- package/src/components/form/__tests__/__snapshots__/CFormTextarea.spec.ts.snap +2 -2
- package/src/components/form/__tests__/__snapshots__/CInputGroup.spec.ts.snap +2 -2
- package/src/components/form/__tests__/__snapshots__/CInputGroupText.spec.ts.snap +2 -2
- package/src/components/grid/CCol.ts +0 -12
- package/src/components/grid/CContainer.ts +6 -24
- package/src/components/grid/CRow.ts +11 -35
- package/src/components/grid/__tests__/__snapshots__/CCol.spec.ts.snap +2 -2
- package/src/components/grid/__tests__/__snapshots__/CContainer.spec.ts.snap +2 -2
- package/src/components/grid/__tests__/__snapshots__/CRow.spec.ts.snap +2 -2
- package/src/components/header/CHeader.ts +0 -4
- package/src/components/header/CHeaderBrand.ts +0 -1
- package/src/components/header/CHeaderNav.ts +0 -1
- package/src/components/header/__tests__/__snapshots__/CHeader.spec.ts.snap +3 -3
- package/src/components/header/__tests__/__snapshots__/CHeaderBrand.spec.ts.snap +2 -2
- package/src/components/header/__tests__/__snapshots__/CHeaderDivider.spec.ts.snap +1 -1
- package/src/components/header/__tests__/__snapshots__/CHeaderNav.spec.ts.snap +2 -2
- package/src/components/header/__tests__/__snapshots__/CHeaderText.spec.ts.snap +1 -1
- package/src/components/header/__tests__/__snapshots__/CHeaderToggler.spec.ts.snap +2 -2
- package/src/components/image/CImage.ts +3 -14
- package/src/components/image/__tests__/__snapshots__/CImage.spec.ts.snap +3 -3
- package/src/components/link/CLink.ts +3 -14
- package/src/components/link/__tests__/__snapshots__/CLink.spec.ts.snap +2 -2
- package/src/components/list-group/CListGroup.ts +1 -7
- package/src/components/list-group/CListGroupItem.ts +3 -10
- package/src/components/list-group/__tests__/__snapshots__/CListGroup.spec.ts.snap +2 -2
- package/src/components/list-group/__tests__/__snapshots__/CListGroupItem.spec.ts.snap +3 -3
- package/src/components/modal/CModal.ts +4 -11
- package/src/components/modal/CModalHeader.ts +0 -1
- package/src/components/modal/CModalTitle.ts +0 -1
- package/src/components/modal/__tests__/__snapshots__/CModal.spec.ts.snap +10 -10
- package/src/components/modal/__tests__/__snapshots__/CModalBody.spec.ts.snap +1 -1
- package/src/components/modal/__tests__/__snapshots__/CModalFooter.spec.ts.snap +1 -1
- package/src/components/modal/__tests__/__snapshots__/CModalHeader.spec.ts.snap +2 -2
- package/src/components/modal/__tests__/__snapshots__/CModalTitle.spec.ts.snap +2 -2
- package/src/components/nav/CNav.ts +0 -5
- package/src/components/nav/CNavGroup.ts +1 -1
- package/src/components/nav/CNavLink.ts +3 -14
- package/src/components/nav/__tests__/__snapshots__/CNav.spec.ts.snap +2 -2
- package/src/components/nav/__tests__/__snapshots__/CNavGroup.spec.ts.snap +5 -5
- package/src/components/nav/__tests__/__snapshots__/CNavGroupItems.spec.ts.snap +1 -1
- package/src/components/nav/__tests__/__snapshots__/CNavItem.spec.ts.snap +3 -3
- package/src/components/nav/__tests__/__snapshots__/CNavLink.spec.ts.snap +2 -2
- package/src/components/nav/__tests__/__snapshots__/CNavTitle.spec.ts.snap +1 -1
- package/src/components/navbar/CNavbar.ts +1 -10
- package/src/components/navbar/CNavbarBrand.ts +1 -6
- package/src/components/navbar/CNavbarNav.ts +0 -1
- package/src/components/navbar/__tests__/__snapshots__/CNavbar.spec.ts.snap +3 -3
- package/src/components/navbar/__tests__/__snapshots__/CNavbarBrand.spec.ts.snap +3 -3
- package/src/components/navbar/__tests__/__snapshots__/CNavbarNav.spec.ts.snap +2 -2
- package/src/components/navbar/__tests__/__snapshots__/CNavbarText.spec.ts.snap +1 -1
- package/src/components/navbar/__tests__/__snapshots__/CNavbarToggler.spec.ts.snap +2 -2
- package/src/components/offcanvas/COffcanvas.ts +11 -8
- package/src/components/offcanvas/COffcanvasTitle.ts +0 -1
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvas.spec.ts.snap +8 -8
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvasBody.spec.ts.snap +1 -1
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvasHeader.spec.ts.snap +1 -1
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvasTitle.spec.ts.snap +2 -2
- package/src/components/pagination/CPagination.ts +0 -4
- package/src/components/pagination/CPaginationItem.ts +4 -18
- package/src/components/pagination/__tests__/__snapshots__/CPagination.spec.ts.snap +2 -2
- package/src/components/pagination/__tests__/__snapshots__/CPaginationItem.spec.ts.snap +2 -2
- package/src/components/placeholder/CPlaceholder.ts +7 -36
- package/src/components/placeholder/__tests__/CPlaceholder.spec.ts +1 -1
- package/src/components/popover/CPopover.ts +3 -14
- package/src/components/progress/CProgress.ts +1 -5
- package/src/components/progress/CProgressBar.ts +2 -8
- package/src/components/progress/__tests__/__snapshots__/CProgress.spec.ts.snap +2 -2
- package/src/components/progress/__tests__/__snapshots__/CProgressBar.spec.ts.snap +2 -2
- package/src/components/props.ts +10 -8
- package/src/components/sidebar/CSidebar.ts +3 -11
- package/src/components/sidebar/__tests__/__snapshots__/CSidebar.spec.ts.snap +2 -2
- package/src/components/sidebar/__tests__/__snapshots__/CSidebarBrand.spec.ts.snap +1 -1
- package/src/components/sidebar/__tests__/__snapshots__/CSidebarFooter.spec.ts.snap +1 -1
- package/src/components/sidebar/__tests__/__snapshots__/CSidebarHeader.spec.ts.snap +1 -1
- package/src/components/sidebar/__tests__/__snapshots__/CSidebarNav.spec.ts.snap +1 -1
- package/src/components/sidebar/__tests__/__snapshots__/CSidebarToggler.spec.ts.snap +1 -1
- package/src/components/smart-table/CSmartTable.ts +7 -7
- package/src/components/spinner/CSpinner.ts +0 -7
- package/src/components/spinner/__tests__/__snapshots__/CSpinner.spec.ts.snap +2 -2
- package/src/components/table/CTable.ts +21 -93
- package/src/components/table/CTableBody.ts +1 -1
- package/src/components/table/CTableDataCell.ts +3 -11
- package/src/components/table/CTableFoot.ts +1 -1
- package/src/components/table/CTableHead.ts +1 -1
- package/src/components/table/CTableHeaderCell.ts +1 -1
- package/src/components/table/CTableRow.ts +2 -7
- package/src/components/table/__tests__/__snapshots__/CTable.spec.ts.snap +15 -3
- package/src/components/table/__tests__/__snapshots__/CTableBody.spec.ts.snap +2 -2
- package/src/components/table/__tests__/__snapshots__/CTableDataCell.spec.ts.snap +2 -2
- package/src/components/table/__tests__/__snapshots__/CTableFoot.spec.ts.snap +2 -2
- package/src/components/table/__tests__/__snapshots__/CTableHead.spec.ts.snap +2 -2
- package/src/components/table/__tests__/__snapshots__/CTableHeaderCell.spec.ts.snap +2 -2
- package/src/components/table/__tests__/__snapshots__/CTableRow.spec.ts.snap +2 -2
- package/src/components/table/types.ts +20 -0
- package/src/components/table/utils.ts +24 -0
- package/src/components/tabs/CTabPane.ts +1 -2
- package/src/components/tabs/__tests__/__snapshots__/CTabContent.spec.ts.snap +1 -1
- package/src/components/tabs/__tests__/__snapshots__/CTabPane.spec.ts.snap +4 -4
- package/src/components/toast/CToast.ts +48 -83
- package/src/components/toast/CToastClose.ts +1 -5
- package/src/components/toast/CToastHeader.ts +1 -4
- package/src/components/toast/CToaster.ts +0 -2
- package/src/components/toast/__tests__/CToast.spec.ts +3 -1
- package/src/components/toast/__tests__/__snapshots__/CToast.spec.ts.snap +4 -4
- package/src/components/toast/__tests__/__snapshots__/CToastBody.spec.ts.snap +1 -1
- package/src/components/toast/__tests__/__snapshots__/CToastClose.spec.ts.snap +2 -2
- package/src/components/toast/__tests__/__snapshots__/CToastHeader.spec.ts.snap +2 -2
- package/src/components/toast/__tests__/__snapshots__/CToaster.spec.ts.snap +2 -2
- package/src/components/tooltip/CTooltip.ts +2 -9
- package/src/components/widgets/CWidgetStatsA.ts +3 -12
- package/src/components/widgets/CWidgetStatsB.ts +8 -20
- package/src/components/widgets/CWidgetStatsC.ts +5 -14
- package/src/components/widgets/CWidgetStatsD.ts +4 -4
- package/src/components/widgets/CWidgetStatsE.ts +3 -8
- package/src/components/widgets/CWidgetStatsF.ts +6 -14
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsA.spec.ts.snap +3 -3
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsB.spec.ts.snap +6 -6
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsC.spec.ts.snap +7 -7
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsD.spec.ts.snap +10 -10
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsE.spec.ts.snap +4 -4
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsF.spec.ts.snap +6 -6
- package/src/props.ts +88 -0
- package/src/types.ts +54 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, h, PropType, ref, RendererElement, Teleport, Transition } from 'vue'
|
|
2
2
|
import { createPopper, Placement } from '@popperjs/core'
|
|
3
3
|
|
|
4
|
-
import { executeAfterTransition } from '
|
|
4
|
+
import { executeAfterTransition } from '../../utils/transition'
|
|
5
5
|
|
|
6
6
|
const CPopover = defineComponent({
|
|
7
7
|
name: 'CPopover',
|
|
@@ -9,18 +9,13 @@ const CPopover = defineComponent({
|
|
|
9
9
|
/**
|
|
10
10
|
* Content for your component. If you want to pass non-string value please use dedicated slot `<template #content>...</template>`
|
|
11
11
|
*/
|
|
12
|
-
content:
|
|
13
|
-
type: String,
|
|
14
|
-
default: undefined,
|
|
15
|
-
required: false,
|
|
16
|
-
},
|
|
12
|
+
content: String,
|
|
17
13
|
/**
|
|
18
14
|
* Offset of the popover relative to its target.
|
|
19
15
|
*/
|
|
20
16
|
offset: {
|
|
21
17
|
type: Array,
|
|
22
18
|
default: () => [0, 8],
|
|
23
|
-
required: false,
|
|
24
19
|
},
|
|
25
20
|
/**
|
|
26
21
|
* Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.
|
|
@@ -28,7 +23,6 @@ const CPopover = defineComponent({
|
|
|
28
23
|
placement: {
|
|
29
24
|
type: String as PropType<Placement>,
|
|
30
25
|
default: 'top',
|
|
31
|
-
required: false,
|
|
32
26
|
validator: (value: string) => {
|
|
33
27
|
return ['top', 'right', 'bottom', 'left'].includes(value)
|
|
34
28
|
},
|
|
@@ -36,11 +30,7 @@ const CPopover = defineComponent({
|
|
|
36
30
|
/**
|
|
37
31
|
* Title for your component. If you want to pass non-string value please use dedicated slot `<template #title>...</template>`
|
|
38
32
|
*/
|
|
39
|
-
title:
|
|
40
|
-
type: String,
|
|
41
|
-
default: undefined,
|
|
42
|
-
required: false,
|
|
43
|
-
},
|
|
33
|
+
title: String,
|
|
44
34
|
/**
|
|
45
35
|
* Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
|
|
46
36
|
*
|
|
@@ -49,7 +39,6 @@ const CPopover = defineComponent({
|
|
|
49
39
|
trigger: {
|
|
50
40
|
type: [String, Array] as PropType<string | string[]>,
|
|
51
41
|
default: 'click',
|
|
52
|
-
required: false,
|
|
53
42
|
validator: (value: string | string[]) => {
|
|
54
43
|
if (typeof value === 'string') {
|
|
55
44
|
return ['click', 'focus', 'hover'].includes(value)
|
|
@@ -8,11 +8,7 @@ const CProgress = defineComponent({
|
|
|
8
8
|
/**
|
|
9
9
|
* Sets the height of the component. If you set that value the inner `<CProgressBar>` will automatically resize accordingly.
|
|
10
10
|
*/
|
|
11
|
-
height:
|
|
12
|
-
type: Number,
|
|
13
|
-
default: undefined,
|
|
14
|
-
required: false,
|
|
15
|
-
},
|
|
11
|
+
height: Number,
|
|
16
12
|
/**
|
|
17
13
|
* Makes progress bar thinner.
|
|
18
14
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h } from 'vue'
|
|
2
2
|
|
|
3
|
-
import { Color } from '
|
|
3
|
+
import { Color } from '../../props'
|
|
4
4
|
|
|
5
5
|
const CProgressBar = defineComponent({
|
|
6
6
|
name: 'CProgressBar',
|
|
@@ -8,10 +8,7 @@ const CProgressBar = defineComponent({
|
|
|
8
8
|
/**
|
|
9
9
|
* Use to animate the stripes right to left via CSS3 animations.
|
|
10
10
|
*/
|
|
11
|
-
animated:
|
|
12
|
-
type: Boolean,
|
|
13
|
-
required: false,
|
|
14
|
-
},
|
|
11
|
+
animated: Boolean,
|
|
15
12
|
/**
|
|
16
13
|
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
17
14
|
*
|
|
@@ -23,7 +20,6 @@ const CProgressBar = defineComponent({
|
|
|
23
20
|
*/
|
|
24
21
|
value: {
|
|
25
22
|
type: Number,
|
|
26
|
-
required: false,
|
|
27
23
|
default: 0,
|
|
28
24
|
},
|
|
29
25
|
/**
|
|
@@ -33,8 +29,6 @@ const CProgressBar = defineComponent({
|
|
|
33
29
|
*/
|
|
34
30
|
variant: {
|
|
35
31
|
type: String,
|
|
36
|
-
default: undefined,
|
|
37
|
-
require: false,
|
|
38
32
|
validator: (value: string) => {
|
|
39
33
|
return value === 'striped'
|
|
40
34
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Customize CProgress component renders correctly 1`] = `"<div class
|
|
3
|
+
exports[`Customize CProgress component renders correctly 1`] = `"<div class="progress progress-thin progress-white" style="height: 100px;">Default slot</div>"`;
|
|
4
4
|
|
|
5
|
-
exports[`Loads and display CProgress component renders correctly 1`] = `"<div class
|
|
5
|
+
exports[`Loads and display CProgress component renders correctly 1`] = `"<div class="progress" style="">Default slot</div>"`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Customize CProgressBar component renders correctly 1`] = `"<div class
|
|
3
|
+
exports[`Customize CProgressBar component renders correctly 1`] = `"<div class="progress-bar bg-warning progress-bar-striped progress-bar-animated" role="progressbar" style="width: 75%;" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">Default slot</div>"`;
|
|
4
4
|
|
|
5
|
-
exports[`Loads and display CProgressBar component renders correctly 1`] = `"<div class
|
|
5
|
+
exports[`Loads and display CProgressBar component renders correctly 1`] = `"<div class="progress-bar bg-undefined" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">Default slot</div>"`;
|
package/src/components/props.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const Shape = {
|
|
1
|
+
export const Shape = {
|
|
2
2
|
type: String,
|
|
3
3
|
validator: (value: string): boolean => {
|
|
4
4
|
// The value must match one of these strings
|
|
@@ -17,14 +17,16 @@ const Shape = {
|
|
|
17
17
|
].includes(value)
|
|
18
18
|
},
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
export const Align = {
|
|
21
22
|
type: String,
|
|
22
23
|
validator: (value: string): boolean => {
|
|
23
24
|
// The value must match one of these strings
|
|
24
25
|
return ['', 'left', 'center', 'right'].includes(value)
|
|
25
26
|
},
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
|
|
29
|
+
export const Color = {
|
|
28
30
|
type: String,
|
|
29
31
|
validator: (value: string): boolean => {
|
|
30
32
|
// The value must match one of these strings
|
|
@@ -50,7 +52,8 @@ const Color = {
|
|
|
50
52
|
].includes(value)
|
|
51
53
|
},
|
|
52
54
|
}
|
|
53
|
-
|
|
55
|
+
|
|
56
|
+
export const TextColor = {
|
|
54
57
|
type: String,
|
|
55
58
|
validator: (value: string): boolean => {
|
|
56
59
|
return [
|
|
@@ -73,7 +76,8 @@ const TextColor = {
|
|
|
73
76
|
].includes(value)
|
|
74
77
|
},
|
|
75
78
|
}
|
|
76
|
-
|
|
79
|
+
|
|
80
|
+
export const Breakpoint = {
|
|
77
81
|
validator: (value: boolean | number): boolean => {
|
|
78
82
|
if (typeof value == 'boolean' || typeof value == 'number') {
|
|
79
83
|
return true
|
|
@@ -81,6 +85,4 @@ const Breakpoint = {
|
|
|
81
85
|
return false
|
|
82
86
|
}
|
|
83
87
|
},
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export { Align, Breakpoint, Color, Shape, TextColor }
|
|
88
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, h, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
|
2
2
|
import { CBackdrop } from '../backdrop'
|
|
3
3
|
|
|
4
|
-
import { isInViewport } from '
|
|
4
|
+
import { isInViewport } from '../../utils'
|
|
5
5
|
|
|
6
6
|
const isOnMobile = (element: HTMLDivElement) =>
|
|
7
7
|
Boolean(getComputedStyle(element).getPropertyValue('--cui-is-mobile'))
|
|
@@ -24,17 +24,11 @@ const CSidebar = defineComponent({
|
|
|
24
24
|
/**
|
|
25
25
|
* Make sidebar narrow.
|
|
26
26
|
*/
|
|
27
|
-
narrow:
|
|
28
|
-
type: Boolean,
|
|
29
|
-
required: false,
|
|
30
|
-
},
|
|
27
|
+
narrow: Boolean,
|
|
31
28
|
/**
|
|
32
29
|
* Set sidebar to overlaid variant.
|
|
33
30
|
*/
|
|
34
|
-
overlaid:
|
|
35
|
-
type: Boolean,
|
|
36
|
-
required: false,
|
|
37
|
-
},
|
|
31
|
+
overlaid: Boolean,
|
|
38
32
|
/**
|
|
39
33
|
* Components placement, there’s no default placement.
|
|
40
34
|
* @values 'start', 'end'
|
|
@@ -51,7 +45,6 @@ const CSidebar = defineComponent({
|
|
|
51
45
|
*/
|
|
52
46
|
position: {
|
|
53
47
|
type: String,
|
|
54
|
-
default: undefined,
|
|
55
48
|
validator: (value: string) => {
|
|
56
49
|
return ['fixed'].includes(value)
|
|
57
50
|
},
|
|
@@ -61,7 +54,6 @@ const CSidebar = defineComponent({
|
|
|
61
54
|
*/
|
|
62
55
|
size: {
|
|
63
56
|
type: String,
|
|
64
|
-
default: undefined,
|
|
65
57
|
validator: (value: string) => {
|
|
66
58
|
return ['sm', 'lg', 'xl'].includes(value)
|
|
67
59
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Customize CSidebar component renders correctly 1`] = `"<div class
|
|
3
|
+
exports[`Customize CSidebar component renders correctly 1`] = `"<div class="sidebar sidebar-narrow sidebar-overlaid sidebar-fixed sidebar-xl sidebar-narrow-unfoldable">Default slot</div>"`;
|
|
4
4
|
|
|
5
|
-
exports[`Loads and display CSidebar component renders correctly 1`] = `"<div class
|
|
5
|
+
exports[`Loads and display CSidebar component renders correctly 1`] = `"<div class="sidebar hide">Default slot</div>"`;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Loads and display CSidebarBrand component renders correctly 1`] = `"<div class
|
|
3
|
+
exports[`Loads and display CSidebarBrand component renders correctly 1`] = `"<div class="sidebar-brand">Default slot</div>"`;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Loads and display CSidebarFooter component renders correctly 1`] = `"<div class
|
|
3
|
+
exports[`Loads and display CSidebarFooter component renders correctly 1`] = `"<div class="sidebar-footer">Default slot</div>"`;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Loads and display CSidebarHeader component renders correctly 1`] = `"<div class
|
|
3
|
+
exports[`Loads and display CSidebarHeader component renders correctly 1`] = `"<div class="sidebar-header">Default slot</div>"`;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Loads and display CSidebarToggler component renders correctly 1`] = `"<button class
|
|
3
|
+
exports[`Loads and display CSidebarToggler component renders correctly 1`] = `"<button class="sidebar-toggler">Default slot</button>"`;
|
|
@@ -900,12 +900,12 @@ const CSmartTable = defineComponent({
|
|
|
900
900
|
})
|
|
901
901
|
: '',
|
|
902
902
|
),
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
903
|
+
props.itemsPerPageSelect &&
|
|
904
|
+
h(
|
|
905
|
+
'div',
|
|
906
|
+
{
|
|
907
|
+
class: 'col-auto ms-auto',
|
|
908
|
+
},
|
|
909
909
|
h(
|
|
910
910
|
'div',
|
|
911
911
|
{
|
|
@@ -952,7 +952,7 @@ const CSmartTable = defineComponent({
|
|
|
952
952
|
],
|
|
953
953
|
},
|
|
954
954
|
),
|
|
955
|
-
|
|
955
|
+
),
|
|
956
956
|
],
|
|
957
957
|
),
|
|
958
958
|
])
|
|
@@ -10,8 +10,6 @@ const CSpinner = defineComponent({
|
|
|
10
10
|
*/
|
|
11
11
|
color: {
|
|
12
12
|
type: String,
|
|
13
|
-
default: undefined,
|
|
14
|
-
required: false,
|
|
15
13
|
validator: (value: string) => {
|
|
16
14
|
return [
|
|
17
15
|
'primary',
|
|
@@ -31,7 +29,6 @@ const CSpinner = defineComponent({
|
|
|
31
29
|
component: {
|
|
32
30
|
type: String,
|
|
33
31
|
default: 'div',
|
|
34
|
-
required: false,
|
|
35
32
|
},
|
|
36
33
|
/**
|
|
37
34
|
* Size the component small.
|
|
@@ -40,8 +37,6 @@ const CSpinner = defineComponent({
|
|
|
40
37
|
*/
|
|
41
38
|
size: {
|
|
42
39
|
type: String,
|
|
43
|
-
default: undefined,
|
|
44
|
-
required: false,
|
|
45
40
|
validator: (value: string) => {
|
|
46
41
|
return value === 'sm'
|
|
47
42
|
},
|
|
@@ -54,7 +49,6 @@ const CSpinner = defineComponent({
|
|
|
54
49
|
variant: {
|
|
55
50
|
type: String,
|
|
56
51
|
default: 'border',
|
|
57
|
-
required: false,
|
|
58
52
|
validator: (value: string) => {
|
|
59
53
|
return ['border', 'grow'].includes(value)
|
|
60
54
|
},
|
|
@@ -65,7 +59,6 @@ const CSpinner = defineComponent({
|
|
|
65
59
|
visuallyHiddenLabel: {
|
|
66
60
|
type: String,
|
|
67
61
|
default: 'Loading...',
|
|
68
|
-
required: false,
|
|
69
62
|
},
|
|
70
63
|
},
|
|
71
64
|
setup(props) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Customize CSpinner component renders correctly 1`] = `"<h4 class
|
|
3
|
+
exports[`Customize CSpinner component renders correctly 1`] = `"<h4 class="spinner-grow text-warning spinner-grow-sm" role="status"><span class="visually-hidden">visuallyHiddenLabel</span></h4>"`;
|
|
4
4
|
|
|
5
|
-
exports[`Loads and display CSpinner component renders correctly 1`] = `"<div class
|
|
5
|
+
exports[`Loads and display CSpinner component renders correctly 1`] = `"<div class="spinner-border text-undefined" role="status"><span class="visually-hidden">Loading...</span></div>"`;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { computed, defineComponent, h, PropType } from 'vue'
|
|
2
2
|
|
|
3
|
-
import { Color } from '../props'
|
|
4
3
|
import { CTableBody } from './CTableBody'
|
|
5
4
|
import { CTableCaption } from './CTableCaption'
|
|
6
5
|
import { CTableDataCell } from './CTableDataCell'
|
|
@@ -9,43 +8,9 @@ import { CTableHead } from './CTableHead'
|
|
|
9
8
|
import { CTableHeaderCell } from './CTableHeaderCell'
|
|
10
9
|
import { CTableRow } from './CTableRow'
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
-
_style?: any
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
-
_props?: any
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface FooterItem {
|
|
22
|
-
label?: string
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
|
-
_props?: any
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type Item = {
|
|
28
|
-
[key: string]: number | string | any
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
-
_props?: any
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const pretifyName = (name: string) => {
|
|
34
|
-
return name
|
|
35
|
-
.replace(/[-_.]/g, ' ')
|
|
36
|
-
.replace(/ +/g, ' ')
|
|
37
|
-
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
38
|
-
.split(' ')
|
|
39
|
-
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
40
|
-
.join(' ')
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const label = (column: Column | string) =>
|
|
44
|
-
typeof column === 'object'
|
|
45
|
-
? column.label !== undefined
|
|
46
|
-
? column.label
|
|
47
|
-
: pretifyName(column.key)
|
|
48
|
-
: pretifyName(column)
|
|
11
|
+
import { Color } from '../../props'
|
|
12
|
+
import { getColumnLabel, getColumnNames } from './utils'
|
|
13
|
+
import type { Column, FooterItem, Item } from './types'
|
|
49
14
|
|
|
50
15
|
const CTable = defineComponent({
|
|
51
16
|
name: 'CTable',
|
|
@@ -57,8 +22,6 @@ const CTable = defineComponent({
|
|
|
57
22
|
*/
|
|
58
23
|
align: {
|
|
59
24
|
type: String,
|
|
60
|
-
default: undefined,
|
|
61
|
-
required: false,
|
|
62
25
|
validator: (value: string) => {
|
|
63
26
|
return ['bottom', 'middle', 'top'].includes(value)
|
|
64
27
|
},
|
|
@@ -72,37 +35,23 @@ const CTable = defineComponent({
|
|
|
72
35
|
/**
|
|
73
36
|
* Add borders on all sides of the table and cells.
|
|
74
37
|
*/
|
|
75
|
-
bordered:
|
|
76
|
-
type: Boolean,
|
|
77
|
-
required: false,
|
|
78
|
-
},
|
|
38
|
+
bordered: Boolean,
|
|
79
39
|
/**
|
|
80
40
|
* Remove borders on all sides of the table and cells.
|
|
81
41
|
*/
|
|
82
|
-
borderless:
|
|
83
|
-
type: Boolean,
|
|
84
|
-
required: false,
|
|
85
|
-
},
|
|
42
|
+
borderless: Boolean,
|
|
86
43
|
/**
|
|
87
44
|
* Put the `<caption>` on the top of the table.
|
|
88
45
|
*
|
|
89
46
|
* @values 'top' | string
|
|
90
47
|
*/
|
|
91
|
-
caption:
|
|
92
|
-
type: String,
|
|
93
|
-
default: undefined,
|
|
94
|
-
required: false,
|
|
95
|
-
},
|
|
48
|
+
caption: String,
|
|
96
49
|
/**
|
|
97
50
|
* Set the text of the table caption and the caption on the top of the table.
|
|
98
51
|
*
|
|
99
52
|
* @since 4.5.0
|
|
100
53
|
*/
|
|
101
|
-
captionTop:
|
|
102
|
-
type: String,
|
|
103
|
-
default: undefined,
|
|
104
|
-
required: false,
|
|
105
|
-
},
|
|
54
|
+
captionTop: String,
|
|
106
55
|
/**
|
|
107
56
|
* Prop for table columns configuration. If prop is not defined, table will display columns based on the first item keys, omitting keys that begins with underscore (e.g. '_props')
|
|
108
57
|
*
|
|
@@ -118,7 +67,6 @@ const CTable = defineComponent({
|
|
|
118
67
|
*/
|
|
119
68
|
columns: {
|
|
120
69
|
type: Array as PropType<(Column | string)[]>,
|
|
121
|
-
required: false,
|
|
122
70
|
},
|
|
123
71
|
/**
|
|
124
72
|
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
@@ -138,15 +86,11 @@ const CTable = defineComponent({
|
|
|
138
86
|
*/
|
|
139
87
|
footer: {
|
|
140
88
|
type: Array as PropType<(FooterItem | string)[]>,
|
|
141
|
-
required: false,
|
|
142
89
|
},
|
|
143
90
|
/**
|
|
144
91
|
* Enable a hover state on table rows within a `<CTableBody>`.
|
|
145
92
|
*/
|
|
146
|
-
hover:
|
|
147
|
-
type: Boolean,
|
|
148
|
-
required: false,
|
|
149
|
-
},
|
|
93
|
+
hover: Boolean,
|
|
150
94
|
/**
|
|
151
95
|
* Array of objects, where each object represents one item - row in table. Additionally, you can add style classes to each row by passing them by '_props' key and to single cell by '_cellProps'.
|
|
152
96
|
*
|
|
@@ -157,12 +101,9 @@ const CTable = defineComponent({
|
|
|
157
101
|
*/
|
|
158
102
|
items: {
|
|
159
103
|
type: Array as PropType<Item[]>,
|
|
160
|
-
required: false,
|
|
161
104
|
},
|
|
162
105
|
responsive: {
|
|
163
106
|
type: [Boolean, String],
|
|
164
|
-
default: undefined,
|
|
165
|
-
required: false,
|
|
166
107
|
validator: (value: boolean | string) => {
|
|
167
108
|
if (typeof value == 'string') {
|
|
168
109
|
return ['sm', 'md', 'lg', 'xl', 'xxl'].includes(value)
|
|
@@ -176,26 +117,17 @@ const CTable = defineComponent({
|
|
|
176
117
|
/**
|
|
177
118
|
* Make table more compact by cutting all cell `padding` in half.
|
|
178
119
|
*/
|
|
179
|
-
small:
|
|
180
|
-
type: Boolean,
|
|
181
|
-
required: false,
|
|
182
|
-
},
|
|
120
|
+
small: Boolean,
|
|
183
121
|
/**
|
|
184
122
|
* Add zebra-striping to any table row within the `<CTableBody>`.
|
|
185
123
|
*/
|
|
186
|
-
striped:
|
|
187
|
-
type: Boolean,
|
|
188
|
-
required: false,
|
|
189
|
-
},
|
|
124
|
+
striped: Boolean,
|
|
190
125
|
/**
|
|
191
126
|
* Add zebra-striping to any table column.
|
|
192
127
|
*
|
|
193
128
|
* @since 4.4.0
|
|
194
129
|
*/
|
|
195
|
-
stripedColumns:
|
|
196
|
-
type: Boolean,
|
|
197
|
-
required: false,
|
|
198
|
-
},
|
|
130
|
+
stripedColumns: Boolean,
|
|
199
131
|
/**
|
|
200
132
|
* Properties that will be passed to the table footer component.
|
|
201
133
|
*
|
|
@@ -204,8 +136,6 @@ const CTable = defineComponent({
|
|
|
204
136
|
*/
|
|
205
137
|
tableFootProps: {
|
|
206
138
|
type: Object,
|
|
207
|
-
default: undefined,
|
|
208
|
-
required: false,
|
|
209
139
|
},
|
|
210
140
|
/**
|
|
211
141
|
* Properties that will be passed to the table head component.
|
|
@@ -215,19 +145,17 @@ const CTable = defineComponent({
|
|
|
215
145
|
*/
|
|
216
146
|
tableHeadProps: {
|
|
217
147
|
type: Object,
|
|
218
|
-
default: undefined,
|
|
219
|
-
required: false,
|
|
220
148
|
},
|
|
221
149
|
},
|
|
222
150
|
setup(props, { slots, attrs }) {
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
)
|
|
151
|
+
const columnNames = computed(() => getColumnNames(props.columns, props.items))
|
|
152
|
+
// props.columns
|
|
153
|
+
// ? props.columns.map((column: Column | string) => {
|
|
154
|
+
// if (typeof column === 'object') return column.key
|
|
155
|
+
// else return column
|
|
156
|
+
// })
|
|
157
|
+
// : Object.keys((props.items && props.items[0]) || {}).filter((el) => el.charAt(0) !== '_'),
|
|
158
|
+
// )
|
|
231
159
|
|
|
232
160
|
const table = () =>
|
|
233
161
|
h(
|
|
@@ -284,7 +212,7 @@ const CTable = defineComponent({
|
|
|
284
212
|
column._style && { style: { ...column._style } }),
|
|
285
213
|
},
|
|
286
214
|
{
|
|
287
|
-
default: () =>
|
|
215
|
+
default: () => getColumnLabel(column),
|
|
288
216
|
},
|
|
289
217
|
),
|
|
290
218
|
),
|
|
@@ -308,7 +236,7 @@ const CTable = defineComponent({
|
|
|
308
236
|
},
|
|
309
237
|
{
|
|
310
238
|
default: () => [
|
|
311
|
-
|
|
239
|
+
columnNames.value && columnNames.value.map(
|
|
312
240
|
(colName: string) =>
|
|
313
241
|
item[colName] &&
|
|
314
242
|
h(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h } from 'vue'
|
|
2
2
|
|
|
3
|
-
import { Color } from '
|
|
3
|
+
import { Color } from '../../props'
|
|
4
4
|
|
|
5
5
|
const CTableDataCell = defineComponent({
|
|
6
6
|
name: 'CTableDataCell',
|
|
@@ -8,10 +8,7 @@ const CTableDataCell = defineComponent({
|
|
|
8
8
|
/**
|
|
9
9
|
* Highlight a table row or cell.
|
|
10
10
|
*/
|
|
11
|
-
active:
|
|
12
|
-
type: Boolean,
|
|
13
|
-
required: false,
|
|
14
|
-
},
|
|
11
|
+
active: Boolean,
|
|
15
12
|
/**
|
|
16
13
|
* Set the vertical aligment.
|
|
17
14
|
*
|
|
@@ -19,8 +16,6 @@ const CTableDataCell = defineComponent({
|
|
|
19
16
|
*/
|
|
20
17
|
align: {
|
|
21
18
|
type: String,
|
|
22
|
-
default: undefined,
|
|
23
|
-
required: false,
|
|
24
19
|
validator: (value: string) => {
|
|
25
20
|
return ['bottom', 'middle', 'top'].includes(value)
|
|
26
21
|
},
|
|
@@ -34,10 +29,7 @@ const CTableDataCell = defineComponent({
|
|
|
34
29
|
/**
|
|
35
30
|
* @ignore
|
|
36
31
|
*/
|
|
37
|
-
scope:
|
|
38
|
-
type: String,
|
|
39
|
-
required: false,
|
|
40
|
-
},
|
|
32
|
+
scope: String,
|
|
41
33
|
},
|
|
42
34
|
setup(props, { slots }) {
|
|
43
35
|
return () =>
|