@coreui/vue-pro 5.3.0 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/components/accordion/CAccordion.d.ts +5 -5
- package/dist/cjs/components/accordion/CAccordionBody.d.ts +1 -1
- package/dist/cjs/components/accordion/CAccordionButton.d.ts +1 -1
- package/dist/cjs/components/accordion/CAccordionHeader.d.ts +1 -1
- package/dist/cjs/components/accordion/CAccordionItem.d.ts +4 -4
- package/dist/cjs/components/alert/CAlert.d.ts +6 -6
- package/dist/cjs/components/alert/CAlertHeading.d.ts +5 -5
- package/dist/cjs/components/alert/CAlertLink.d.ts +1 -1
- package/dist/cjs/components/avatar/CAvatar.d.ts +4 -4
- package/dist/cjs/components/backdrop/CBackdrop.d.ts +5 -5
- package/dist/cjs/components/badge/CBadge.d.ts +5 -5
- package/dist/cjs/components/breadcrumb/CBreadcrumb.d.ts +1 -1
- package/dist/cjs/components/breadcrumb/CBreadcrumbItem.d.ts +5 -5
- package/dist/cjs/components/button/CButton.d.ts +6 -6
- package/dist/cjs/components/button-group/CButtonGroup.d.ts +5 -5
- package/dist/cjs/components/button-group/CButtonToolbar.d.ts +1 -1
- package/dist/cjs/components/calendar/CCalendar.d.ts +87 -11
- package/dist/cjs/components/calendar/CCalendar.js +57 -5
- package/dist/cjs/components/calendar/CCalendar.js.map +1 -1
- package/dist/cjs/components/calendar/utils.js +1 -3
- package/dist/cjs/components/calendar/utils.js.map +1 -1
- package/dist/cjs/components/callout/CCallout.d.ts +4 -4
- package/dist/cjs/components/card/CCard.d.ts +4 -4
- package/dist/cjs/components/card/CCardBody.d.ts +1 -1
- package/dist/cjs/components/card/CCardFooter.d.ts +1 -1
- package/dist/cjs/components/card/CCardGroup.d.ts +1 -1
- package/dist/cjs/components/card/CCardHeader.d.ts +5 -5
- package/dist/cjs/components/card/CCardImage.d.ts +5 -5
- package/dist/cjs/components/card/CCardImageOverlay.d.ts +1 -1
- package/dist/cjs/components/card/CCardLink.d.ts +5 -5
- package/dist/cjs/components/card/CCardSubtitle.d.ts +5 -5
- package/dist/cjs/components/card/CCardText.d.ts +5 -5
- package/dist/cjs/components/card/CCardTitle.d.ts +5 -5
- package/dist/cjs/components/carousel/CCarousel.d.ts +6 -6
- package/dist/cjs/components/carousel/CCarouselCaption.d.ts +1 -1
- package/dist/cjs/components/carousel/CCarouselItem.d.ts +5 -5
- package/dist/cjs/components/close-button/CCloseButton.d.ts +6 -6
- package/dist/cjs/components/collapse/CCollapse.d.ts +6 -6
- package/dist/cjs/components/conditional-teleport/CConditionalTeleport.d.ts +7 -7
- package/dist/cjs/components/conditional-teleport/CConditionalTeleport.js +1 -1
- package/dist/cjs/components/date-picker/CDatePicker.d.ts +92 -16
- package/dist/cjs/components/date-picker/CDatePicker.js +39 -3
- package/dist/cjs/components/date-picker/CDatePicker.js.map +1 -1
- package/dist/cjs/components/date-range-picker/CDateRangePicker.d.ts +96 -20
- package/dist/cjs/components/date-range-picker/CDateRangePicker.js +49 -6
- package/dist/cjs/components/date-range-picker/CDateRangePicker.js.map +1 -1
- package/dist/cjs/components/dropdown/CDropdown.d.ts +10 -10
- package/dist/cjs/components/dropdown/CDropdown.js +2 -2
- package/dist/cjs/components/dropdown/CDropdownDivider.d.ts +1 -1
- package/dist/cjs/components/dropdown/CDropdownHeader.d.ts +5 -5
- package/dist/cjs/components/dropdown/CDropdownItem.d.ts +5 -5
- package/dist/cjs/components/dropdown/CDropdownMenu.d.ts +5 -5
- package/dist/cjs/components/dropdown/CDropdownToggle.d.ts +8 -8
- package/dist/cjs/components/dropdown/CDropdownToggle.js +1 -1
- package/dist/cjs/components/element-cover/CElementCover.d.ts +5 -5
- package/dist/cjs/components/footer/CFooter.d.ts +5 -5
- package/dist/cjs/components/form/CForm.d.ts +5 -5
- package/dist/cjs/components/form/CFormCheck.d.ts +6 -6
- package/dist/cjs/components/form/CFormControlValidation.d.ts +5 -5
- package/dist/cjs/components/form/CFormControlWrapper.d.ts +31 -3
- package/dist/cjs/components/form/CFormControlWrapper.js +3 -2
- package/dist/cjs/components/form/CFormControlWrapper.js.map +1 -1
- package/dist/cjs/components/form/CFormFeedback.d.ts +5 -5
- package/dist/cjs/components/form/CFormFloating.d.ts +1 -1
- package/dist/cjs/components/form/CFormInput.d.ts +6 -6
- package/dist/cjs/components/form/CFormInput.js +3 -1
- package/dist/cjs/components/form/CFormInput.js.map +1 -1
- package/dist/cjs/components/form/CFormLabel.d.ts +4 -4
- package/dist/cjs/components/form/CFormRange.d.ts +6 -6
- package/dist/cjs/components/form/CFormSelect.d.ts +6 -6
- package/dist/cjs/components/form/CFormSelect.js +3 -1
- package/dist/cjs/components/form/CFormSelect.js.map +1 -1
- package/dist/cjs/components/form/CFormSwitch.d.ts +6 -6
- package/dist/cjs/components/form/CFormText.d.ts +5 -5
- package/dist/cjs/components/form/CFormTextarea.d.ts +6 -6
- package/dist/cjs/components/form/CFormTextarea.js +3 -1
- package/dist/cjs/components/form/CFormTextarea.js.map +1 -1
- package/dist/cjs/components/form/CInputGroup.d.ts +4 -4
- package/dist/cjs/components/form/CInputGroupText.d.ts +5 -5
- package/dist/cjs/components/grid/CCol.d.ts +4 -4
- package/dist/cjs/components/grid/CContainer.d.ts +5 -5
- package/dist/cjs/components/grid/CRow.d.ts +4 -4
- package/dist/cjs/components/header/CHeader.d.ts +20 -4
- package/dist/cjs/components/header/CHeader.js +8 -1
- package/dist/cjs/components/header/CHeader.js.map +1 -1
- package/dist/cjs/components/header/CHeaderBrand.d.ts +5 -5
- package/dist/cjs/components/header/CHeaderDivider.d.ts +1 -1
- package/dist/cjs/components/header/CHeaderNav.d.ts +5 -5
- package/dist/cjs/components/header/CHeaderText.d.ts +1 -1
- package/dist/cjs/components/header/CHeaderToggler.d.ts +1 -1
- package/dist/cjs/components/image/CImage.d.ts +5 -5
- package/dist/cjs/components/link/CLink.d.ts +6 -6
- package/dist/cjs/components/list-group/CListGroup.d.ts +5 -5
- package/dist/cjs/components/list-group/CListGroupItem.d.ts +5 -5
- package/dist/cjs/components/loading-button/CLoadingButton.d.ts +32 -4
- package/dist/cjs/components/loading-button/CLoadingButton.js.map +1 -1
- package/dist/cjs/components/modal/CModal.d.ts +48 -10
- package/dist/cjs/components/modal/CModal.js +41 -17
- package/dist/cjs/components/modal/CModal.js.map +1 -1
- package/dist/cjs/components/modal/CModalBody.d.ts +1 -1
- package/dist/cjs/components/modal/CModalFooter.d.ts +1 -1
- package/dist/cjs/components/modal/CModalHeader.d.ts +5 -5
- package/dist/cjs/components/modal/CModalTitle.d.ts +5 -5
- package/dist/cjs/components/multi-select/CMultiSelect.d.ts +8 -8
- package/dist/cjs/components/multi-select/CMultiSelect.js +3 -1
- package/dist/cjs/components/multi-select/CMultiSelect.js.map +1 -1
- package/dist/cjs/components/multi-select/CMultiSelectNativeSelect.d.ts +6 -6
- package/dist/cjs/components/multi-select/CMultiSelectOptions.d.ts +7 -7
- package/dist/cjs/components/multi-select/CMultiSelectSelection.d.ts +6 -6
- package/dist/cjs/components/nav/CNav.d.ts +5 -5
- package/dist/cjs/components/nav/CNavGroup.d.ts +6 -6
- package/dist/cjs/components/nav/CNavGroupItems.d.ts +1 -1
- package/dist/cjs/components/nav/CNavItem.d.ts +13 -3
- package/dist/cjs/components/nav/CNavItem.js +0 -1
- package/dist/cjs/components/nav/CNavItem.js.map +1 -1
- package/dist/cjs/components/nav/CNavLink.d.ts +5 -5
- package/dist/cjs/components/nav/CNavTitle.d.ts +5 -5
- package/dist/cjs/components/navbar/CNavbar.d.ts +5 -5
- package/dist/cjs/components/navbar/CNavbarBrand.d.ts +5 -5
- package/dist/cjs/components/navbar/CNavbarNav.d.ts +5 -5
- package/dist/cjs/components/navbar/CNavbarText.d.ts +1 -1
- package/dist/cjs/components/navbar/CNavbarToggler.d.ts +1 -1
- package/dist/cjs/components/offcanvas/COffcanvas.d.ts +8 -8
- package/dist/cjs/components/offcanvas/COffcanvas.js +1 -1
- package/dist/cjs/components/offcanvas/COffcanvas.js.map +1 -1
- package/dist/cjs/components/offcanvas/COffcanvasBody.d.ts +1 -1
- package/dist/cjs/components/offcanvas/COffcanvasHeader.d.ts +1 -1
- package/dist/cjs/components/offcanvas/COffcanvasTitle.d.ts +5 -5
- package/dist/cjs/components/pagination/CPagination.d.ts +4 -4
- package/dist/cjs/components/pagination/CPaginationItem.d.ts +5 -5
- package/dist/cjs/components/picker/CPicker.d.ts +6 -6
- package/dist/cjs/components/placeholder/CPlaceholder.d.ts +5 -5
- package/dist/cjs/components/popover/CPopover.d.ts +8 -8
- package/dist/cjs/components/popover/CPopover.js +4 -9
- package/dist/cjs/components/popover/CPopover.js.map +1 -1
- package/dist/cjs/components/progress/CProgress.d.ts +5 -5
- package/dist/cjs/components/progress/CProgressBar.d.ts +5 -5
- package/dist/cjs/components/progress/CProgressStacked.d.ts +2 -8
- package/dist/cjs/components/rating/CRating.d.ts +7 -7
- package/dist/cjs/components/sidebar/CSidebar.d.ts +5 -5
- package/dist/cjs/components/sidebar/CSidebarBrand.d.ts +5 -5
- package/dist/cjs/components/sidebar/CSidebarFooter.d.ts +1 -1
- package/dist/cjs/components/sidebar/CSidebarHeader.d.ts +1 -1
- package/dist/cjs/components/sidebar/CSidebarNav.d.ts +5 -5
- package/dist/cjs/components/sidebar/CSidebarToggler.d.ts +1 -1
- package/dist/cjs/components/smart-pagination/CSmartPagination.d.ts +6 -28
- package/dist/cjs/components/smart-pagination/CSmartPagination.js +0 -11
- package/dist/cjs/components/smart-pagination/CSmartPagination.js.map +1 -1
- package/dist/cjs/components/smart-table/CSmartTable.d.ts +14 -12
- package/dist/cjs/components/smart-table/CSmartTable.js +55 -44
- package/dist/cjs/components/smart-table/CSmartTable.js.map +1 -1
- package/dist/cjs/components/smart-table/CSmartTableBody.d.ts +7 -13
- package/dist/cjs/components/smart-table/CSmartTableBody.js +2 -5
- package/dist/cjs/components/smart-table/CSmartTableBody.js.map +1 -1
- package/dist/cjs/components/smart-table/CSmartTableCleaner.d.ts +6 -6
- package/dist/cjs/components/smart-table/CSmartTableHead.d.ts +15 -8
- package/dist/cjs/components/smart-table/CSmartTableHead.js +4 -1
- package/dist/cjs/components/smart-table/CSmartTableHead.js.map +1 -1
- package/dist/cjs/components/smart-table/types.d.ts +5 -4
- package/dist/cjs/components/smart-table/utils.d.ts +12 -18
- package/dist/cjs/components/smart-table/utils.js +99 -97
- package/dist/cjs/components/smart-table/utils.js.map +1 -1
- package/dist/cjs/components/spinner/CSpinner.d.ts +5 -5
- package/dist/cjs/components/table/CTable.d.ts +5 -5
- package/dist/cjs/components/table/CTableBody.d.ts +4 -4
- package/dist/cjs/components/table/CTableCaption.d.ts +1 -1
- package/dist/cjs/components/table/CTableDataCell.d.ts +5 -5
- package/dist/cjs/components/table/CTableFoot.d.ts +4 -4
- package/dist/cjs/components/table/CTableHead.d.ts +4 -4
- package/dist/cjs/components/table/CTableHeaderCell.d.ts +4 -4
- package/dist/cjs/components/table/CTableRow.d.ts +5 -5
- package/dist/cjs/components/tabs/CTab.d.ts +18 -4
- package/dist/cjs/components/tabs/CTab.js +9 -2
- package/dist/cjs/components/tabs/CTab.js.map +1 -1
- package/dist/cjs/components/tabs/CTabContent.d.ts +1 -1
- package/dist/cjs/components/tabs/CTabList.d.ts +4 -4
- package/dist/cjs/components/tabs/CTabPane.d.ts +6 -6
- package/dist/cjs/components/tabs/CTabPanel.d.ts +6 -6
- package/dist/cjs/components/tabs/CTabPanel.js +2 -2
- package/dist/cjs/components/tabs/CTabPanel.js.map +1 -1
- package/dist/cjs/components/tabs/CTabs.d.ts +5 -5
- package/dist/cjs/components/tabs/CTabs.js +2 -5
- package/dist/cjs/components/tabs/CTabs.js.map +1 -1
- package/dist/cjs/components/time-picker/CTimePicker.d.ts +550 -5
- package/dist/cjs/components/time-picker/CTimePicker.js +16 -4
- package/dist/cjs/components/time-picker/CTimePicker.js.map +1 -1
- package/dist/cjs/components/time-picker/CTimePickerRollCol.d.ts +5 -5
- package/dist/cjs/components/toast/CToast.d.ts +6 -6
- package/dist/cjs/components/toast/CToastBody.d.ts +1 -1
- package/dist/cjs/components/toast/CToastClose.d.ts +14 -4
- package/dist/cjs/components/toast/CToastClose.js +1 -1
- package/dist/cjs/components/toast/CToastClose.js.map +1 -1
- package/dist/cjs/components/toast/CToastHeader.d.ts +5 -7
- package/dist/cjs/components/toast/CToastHeader.js +2 -11
- package/dist/cjs/components/toast/CToastHeader.js.map +1 -1
- package/dist/cjs/components/toast/CToaster.d.ts +4 -4
- package/dist/cjs/components/tooltip/CTooltip.d.ts +8 -8
- package/dist/cjs/components/tooltip/CTooltip.js +4 -9
- package/dist/cjs/components/tooltip/CTooltip.js.map +1 -1
- package/dist/cjs/components/virtual-scroller/CVirtualScroller.d.ts +5 -5
- package/dist/cjs/components/widgets/CWidgetStatsA.d.ts +5 -5
- package/dist/cjs/components/widgets/CWidgetStatsB.d.ts +5 -5
- package/dist/cjs/components/widgets/CWidgetStatsC.d.ts +5 -5
- package/dist/cjs/components/widgets/CWidgetStatsD.d.ts +5 -5
- package/dist/cjs/components/widgets/CWidgetStatsE.d.ts +5 -5
- package/dist/cjs/components/widgets/CWidgetStatsF.d.ts +5 -5
- package/dist/cjs/composables/useColorModes.d.ts +1 -1
- package/dist/cjs/composables/useIsVisible.d.ts +1 -1
- package/dist/cjs/node_modules/@coreui/icons-vue/dist/index.es.js +14 -7
- package/dist/cjs/node_modules/@coreui/icons-vue/dist/index.es.js.map +1 -1
- package/dist/cjs/utils/ComponentProps.d.ts +2 -0
- package/dist/esm/components/accordion/CAccordion.d.ts +5 -5
- package/dist/esm/components/accordion/CAccordionBody.d.ts +1 -1
- package/dist/esm/components/accordion/CAccordionButton.d.ts +1 -1
- package/dist/esm/components/accordion/CAccordionHeader.d.ts +1 -1
- package/dist/esm/components/accordion/CAccordionItem.d.ts +4 -4
- package/dist/esm/components/alert/CAlert.d.ts +6 -6
- package/dist/esm/components/alert/CAlertHeading.d.ts +5 -5
- package/dist/esm/components/alert/CAlertLink.d.ts +1 -1
- package/dist/esm/components/avatar/CAvatar.d.ts +4 -4
- package/dist/esm/components/backdrop/CBackdrop.d.ts +5 -5
- package/dist/esm/components/badge/CBadge.d.ts +5 -5
- package/dist/esm/components/breadcrumb/CBreadcrumb.d.ts +1 -1
- package/dist/esm/components/breadcrumb/CBreadcrumbItem.d.ts +5 -5
- package/dist/esm/components/button/CButton.d.ts +6 -6
- package/dist/esm/components/button-group/CButtonGroup.d.ts +5 -5
- package/dist/esm/components/button-group/CButtonToolbar.d.ts +1 -1
- package/dist/esm/components/calendar/CCalendar.d.ts +87 -11
- package/dist/esm/components/calendar/CCalendar.js +58 -6
- package/dist/esm/components/calendar/CCalendar.js.map +1 -1
- package/dist/esm/components/calendar/utils.js +1 -3
- package/dist/esm/components/calendar/utils.js.map +1 -1
- package/dist/esm/components/callout/CCallout.d.ts +4 -4
- package/dist/esm/components/card/CCard.d.ts +4 -4
- package/dist/esm/components/card/CCardBody.d.ts +1 -1
- package/dist/esm/components/card/CCardFooter.d.ts +1 -1
- package/dist/esm/components/card/CCardGroup.d.ts +1 -1
- package/dist/esm/components/card/CCardHeader.d.ts +5 -5
- package/dist/esm/components/card/CCardImage.d.ts +5 -5
- package/dist/esm/components/card/CCardImageOverlay.d.ts +1 -1
- package/dist/esm/components/card/CCardLink.d.ts +5 -5
- package/dist/esm/components/card/CCardSubtitle.d.ts +5 -5
- package/dist/esm/components/card/CCardText.d.ts +5 -5
- package/dist/esm/components/card/CCardTitle.d.ts +5 -5
- package/dist/esm/components/carousel/CCarousel.d.ts +6 -6
- package/dist/esm/components/carousel/CCarouselCaption.d.ts +1 -1
- package/dist/esm/components/carousel/CCarouselItem.d.ts +5 -5
- package/dist/esm/components/close-button/CCloseButton.d.ts +6 -6
- package/dist/esm/components/collapse/CCollapse.d.ts +6 -6
- package/dist/esm/components/conditional-teleport/CConditionalTeleport.d.ts +7 -7
- package/dist/esm/components/conditional-teleport/CConditionalTeleport.js +1 -1
- package/dist/esm/components/date-picker/CDatePicker.d.ts +92 -16
- package/dist/esm/components/date-picker/CDatePicker.js +39 -3
- package/dist/esm/components/date-picker/CDatePicker.js.map +1 -1
- package/dist/esm/components/date-range-picker/CDateRangePicker.d.ts +96 -20
- package/dist/esm/components/date-range-picker/CDateRangePicker.js +49 -6
- package/dist/esm/components/date-range-picker/CDateRangePicker.js.map +1 -1
- package/dist/esm/components/dropdown/CDropdown.d.ts +10 -10
- package/dist/esm/components/dropdown/CDropdown.js +2 -2
- package/dist/esm/components/dropdown/CDropdownDivider.d.ts +1 -1
- package/dist/esm/components/dropdown/CDropdownHeader.d.ts +5 -5
- package/dist/esm/components/dropdown/CDropdownItem.d.ts +5 -5
- package/dist/esm/components/dropdown/CDropdownMenu.d.ts +5 -5
- package/dist/esm/components/dropdown/CDropdownToggle.d.ts +8 -8
- package/dist/esm/components/dropdown/CDropdownToggle.js +1 -1
- package/dist/esm/components/element-cover/CElementCover.d.ts +5 -5
- package/dist/esm/components/footer/CFooter.d.ts +5 -5
- package/dist/esm/components/form/CForm.d.ts +5 -5
- package/dist/esm/components/form/CFormCheck.d.ts +6 -6
- package/dist/esm/components/form/CFormControlValidation.d.ts +5 -5
- package/dist/esm/components/form/CFormControlWrapper.d.ts +31 -3
- package/dist/esm/components/form/CFormControlWrapper.js +3 -2
- package/dist/esm/components/form/CFormControlWrapper.js.map +1 -1
- package/dist/esm/components/form/CFormFeedback.d.ts +5 -5
- package/dist/esm/components/form/CFormFloating.d.ts +1 -1
- package/dist/esm/components/form/CFormInput.d.ts +6 -6
- package/dist/esm/components/form/CFormInput.js +3 -1
- package/dist/esm/components/form/CFormInput.js.map +1 -1
- package/dist/esm/components/form/CFormLabel.d.ts +4 -4
- package/dist/esm/components/form/CFormRange.d.ts +6 -6
- package/dist/esm/components/form/CFormSelect.d.ts +6 -6
- package/dist/esm/components/form/CFormSelect.js +3 -1
- package/dist/esm/components/form/CFormSelect.js.map +1 -1
- package/dist/esm/components/form/CFormSwitch.d.ts +6 -6
- package/dist/esm/components/form/CFormText.d.ts +5 -5
- package/dist/esm/components/form/CFormTextarea.d.ts +6 -6
- package/dist/esm/components/form/CFormTextarea.js +3 -1
- package/dist/esm/components/form/CFormTextarea.js.map +1 -1
- package/dist/esm/components/form/CInputGroup.d.ts +4 -4
- package/dist/esm/components/form/CInputGroupText.d.ts +5 -5
- package/dist/esm/components/grid/CCol.d.ts +4 -4
- package/dist/esm/components/grid/CContainer.d.ts +5 -5
- package/dist/esm/components/grid/CRow.d.ts +4 -4
- package/dist/esm/components/header/CHeader.d.ts +20 -4
- package/dist/esm/components/header/CHeader.js +8 -1
- package/dist/esm/components/header/CHeader.js.map +1 -1
- package/dist/esm/components/header/CHeaderBrand.d.ts +5 -5
- package/dist/esm/components/header/CHeaderDivider.d.ts +1 -1
- package/dist/esm/components/header/CHeaderNav.d.ts +5 -5
- package/dist/esm/components/header/CHeaderText.d.ts +1 -1
- package/dist/esm/components/header/CHeaderToggler.d.ts +1 -1
- package/dist/esm/components/image/CImage.d.ts +5 -5
- package/dist/esm/components/link/CLink.d.ts +6 -6
- package/dist/esm/components/list-group/CListGroup.d.ts +5 -5
- package/dist/esm/components/list-group/CListGroupItem.d.ts +5 -5
- package/dist/esm/components/loading-button/CLoadingButton.d.ts +32 -4
- package/dist/esm/components/loading-button/CLoadingButton.js.map +1 -1
- package/dist/esm/components/modal/CModal.d.ts +48 -10
- package/dist/esm/components/modal/CModal.js +41 -17
- package/dist/esm/components/modal/CModal.js.map +1 -1
- package/dist/esm/components/modal/CModalBody.d.ts +1 -1
- package/dist/esm/components/modal/CModalFooter.d.ts +1 -1
- package/dist/esm/components/modal/CModalHeader.d.ts +5 -5
- package/dist/esm/components/modal/CModalTitle.d.ts +5 -5
- package/dist/esm/components/multi-select/CMultiSelect.d.ts +8 -8
- package/dist/esm/components/multi-select/CMultiSelect.js +3 -1
- package/dist/esm/components/multi-select/CMultiSelect.js.map +1 -1
- package/dist/esm/components/multi-select/CMultiSelectNativeSelect.d.ts +6 -6
- package/dist/esm/components/multi-select/CMultiSelectOptions.d.ts +7 -7
- package/dist/esm/components/multi-select/CMultiSelectSelection.d.ts +6 -6
- package/dist/esm/components/nav/CNav.d.ts +5 -5
- package/dist/esm/components/nav/CNavGroup.d.ts +6 -6
- package/dist/esm/components/nav/CNavGroupItems.d.ts +1 -1
- package/dist/esm/components/nav/CNavItem.d.ts +13 -3
- package/dist/esm/components/nav/CNavItem.js +0 -1
- package/dist/esm/components/nav/CNavItem.js.map +1 -1
- package/dist/esm/components/nav/CNavLink.d.ts +5 -5
- package/dist/esm/components/nav/CNavTitle.d.ts +5 -5
- package/dist/esm/components/navbar/CNavbar.d.ts +5 -5
- package/dist/esm/components/navbar/CNavbarBrand.d.ts +5 -5
- package/dist/esm/components/navbar/CNavbarNav.d.ts +5 -5
- package/dist/esm/components/navbar/CNavbarText.d.ts +1 -1
- package/dist/esm/components/navbar/CNavbarToggler.d.ts +1 -1
- package/dist/esm/components/offcanvas/COffcanvas.d.ts +8 -8
- package/dist/esm/components/offcanvas/COffcanvas.js +1 -1
- package/dist/esm/components/offcanvas/COffcanvas.js.map +1 -1
- package/dist/esm/components/offcanvas/COffcanvasBody.d.ts +1 -1
- package/dist/esm/components/offcanvas/COffcanvasHeader.d.ts +1 -1
- package/dist/esm/components/offcanvas/COffcanvasTitle.d.ts +5 -5
- package/dist/esm/components/pagination/CPagination.d.ts +4 -4
- package/dist/esm/components/pagination/CPaginationItem.d.ts +5 -5
- package/dist/esm/components/picker/CPicker.d.ts +6 -6
- package/dist/esm/components/placeholder/CPlaceholder.d.ts +5 -5
- package/dist/esm/components/popover/CPopover.d.ts +8 -8
- package/dist/esm/components/popover/CPopover.js +5 -10
- package/dist/esm/components/popover/CPopover.js.map +1 -1
- package/dist/esm/components/progress/CProgress.d.ts +5 -5
- package/dist/esm/components/progress/CProgressBar.d.ts +5 -5
- package/dist/esm/components/progress/CProgressStacked.d.ts +2 -8
- package/dist/esm/components/rating/CRating.d.ts +7 -7
- package/dist/esm/components/sidebar/CSidebar.d.ts +5 -5
- package/dist/esm/components/sidebar/CSidebarBrand.d.ts +5 -5
- package/dist/esm/components/sidebar/CSidebarFooter.d.ts +1 -1
- package/dist/esm/components/sidebar/CSidebarHeader.d.ts +1 -1
- package/dist/esm/components/sidebar/CSidebarNav.d.ts +5 -5
- package/dist/esm/components/sidebar/CSidebarToggler.d.ts +1 -1
- package/dist/esm/components/smart-pagination/CSmartPagination.d.ts +6 -28
- package/dist/esm/components/smart-pagination/CSmartPagination.js +0 -11
- package/dist/esm/components/smart-pagination/CSmartPagination.js.map +1 -1
- package/dist/esm/components/smart-table/CSmartTable.d.ts +14 -12
- package/dist/esm/components/smart-table/CSmartTable.js +56 -45
- package/dist/esm/components/smart-table/CSmartTable.js.map +1 -1
- package/dist/esm/components/smart-table/CSmartTableBody.d.ts +7 -13
- package/dist/esm/components/smart-table/CSmartTableBody.js +3 -6
- package/dist/esm/components/smart-table/CSmartTableBody.js.map +1 -1
- package/dist/esm/components/smart-table/CSmartTableCleaner.d.ts +6 -6
- package/dist/esm/components/smart-table/CSmartTableHead.d.ts +15 -8
- package/dist/esm/components/smart-table/CSmartTableHead.js +4 -1
- package/dist/esm/components/smart-table/CSmartTableHead.js.map +1 -1
- package/dist/esm/components/smart-table/types.d.ts +5 -4
- package/dist/esm/components/smart-table/utils.d.ts +12 -18
- package/dist/esm/components/smart-table/utils.js +98 -98
- package/dist/esm/components/smart-table/utils.js.map +1 -1
- package/dist/esm/components/spinner/CSpinner.d.ts +5 -5
- package/dist/esm/components/table/CTable.d.ts +5 -5
- package/dist/esm/components/table/CTableBody.d.ts +4 -4
- package/dist/esm/components/table/CTableCaption.d.ts +1 -1
- package/dist/esm/components/table/CTableDataCell.d.ts +5 -5
- package/dist/esm/components/table/CTableFoot.d.ts +4 -4
- package/dist/esm/components/table/CTableHead.d.ts +4 -4
- package/dist/esm/components/table/CTableHeaderCell.d.ts +4 -4
- package/dist/esm/components/table/CTableRow.d.ts +5 -5
- package/dist/esm/components/tabs/CTab.d.ts +18 -4
- package/dist/esm/components/tabs/CTab.js +9 -2
- package/dist/esm/components/tabs/CTab.js.map +1 -1
- package/dist/esm/components/tabs/CTabContent.d.ts +1 -1
- package/dist/esm/components/tabs/CTabList.d.ts +4 -4
- package/dist/esm/components/tabs/CTabPane.d.ts +6 -6
- package/dist/esm/components/tabs/CTabPanel.d.ts +6 -6
- package/dist/esm/components/tabs/CTabPanel.js +2 -2
- package/dist/esm/components/tabs/CTabPanel.js.map +1 -1
- package/dist/esm/components/tabs/CTabs.d.ts +5 -5
- package/dist/esm/components/tabs/CTabs.js +3 -6
- package/dist/esm/components/tabs/CTabs.js.map +1 -1
- package/dist/esm/components/time-picker/CTimePicker.d.ts +550 -5
- package/dist/esm/components/time-picker/CTimePicker.js +16 -4
- package/dist/esm/components/time-picker/CTimePicker.js.map +1 -1
- package/dist/esm/components/time-picker/CTimePickerRollCol.d.ts +5 -5
- package/dist/esm/components/toast/CToast.d.ts +6 -6
- package/dist/esm/components/toast/CToastBody.d.ts +1 -1
- package/dist/esm/components/toast/CToastClose.d.ts +14 -4
- package/dist/esm/components/toast/CToastClose.js +2 -2
- package/dist/esm/components/toast/CToastClose.js.map +1 -1
- package/dist/esm/components/toast/CToastHeader.d.ts +5 -7
- package/dist/esm/components/toast/CToastHeader.js +2 -11
- package/dist/esm/components/toast/CToastHeader.js.map +1 -1
- package/dist/esm/components/toast/CToaster.d.ts +4 -4
- package/dist/esm/components/tooltip/CTooltip.d.ts +8 -8
- package/dist/esm/components/tooltip/CTooltip.js +5 -10
- package/dist/esm/components/tooltip/CTooltip.js.map +1 -1
- package/dist/esm/components/virtual-scroller/CVirtualScroller.d.ts +5 -5
- package/dist/esm/components/widgets/CWidgetStatsA.d.ts +5 -5
- package/dist/esm/components/widgets/CWidgetStatsB.d.ts +5 -5
- package/dist/esm/components/widgets/CWidgetStatsC.d.ts +5 -5
- package/dist/esm/components/widgets/CWidgetStatsD.d.ts +5 -5
- package/dist/esm/components/widgets/CWidgetStatsE.d.ts +5 -5
- package/dist/esm/components/widgets/CWidgetStatsF.d.ts +5 -5
- package/dist/esm/composables/useColorModes.d.ts +1 -1
- package/dist/esm/composables/useIsVisible.d.ts +1 -1
- package/dist/esm/node_modules/@coreui/icons-vue/dist/index.es.js +15 -8
- package/dist/esm/node_modules/@coreui/icons-vue/dist/index.es.js.map +1 -1
- package/dist/esm/utils/ComponentProps.d.ts +2 -0
- package/package.json +8 -8
- package/src/components/calendar/CCalendar.ts +57 -5
- package/src/components/calendar/utils.ts +1 -4
- package/src/components/conditional-teleport/CConditionalTeleport.ts +1 -1
- package/src/components/date-picker/CDatePicker.ts +39 -3
- package/src/components/date-range-picker/CDateRangePicker.ts +49 -6
- package/src/components/dropdown/CDropdown.ts +2 -2
- package/src/components/dropdown/CDropdownToggle.ts +1 -1
- package/src/components/form/CFormControlWrapper.ts +13 -3
- package/src/components/form/CFormInput.ts +3 -1
- package/src/components/form/CFormSelect.ts +3 -1
- package/src/components/form/CFormTextarea.ts +3 -1
- package/src/components/header/CHeader.ts +8 -1
- package/src/components/header/__tests__/CHeader.spec.ts +19 -0
- package/src/components/loading-button/CLoadingButton.ts +10 -1
- package/src/components/modal/CModal.ts +49 -19
- package/src/components/multi-select/CMultiSelect.ts +3 -1
- package/src/components/nav/CNavItem.ts +7 -3
- package/src/components/offcanvas/COffcanvas.ts +1 -1
- package/src/components/popover/CPopover.ts +7 -11
- package/src/components/smart-pagination/CSmartPagination.ts +0 -11
- package/src/components/smart-table/CSmartTable.ts +68 -48
- package/src/components/smart-table/CSmartTableBody.ts +5 -7
- package/src/components/smart-table/CSmartTableHead.ts +4 -1
- package/src/components/smart-table/types.ts +5 -4
- package/src/components/smart-table/utils.ts +154 -123
- package/src/components/tabs/CTab.ts +10 -3
- package/src/components/tabs/CTabPanel.ts +3 -4
- package/src/components/tabs/CTabs.ts +3 -5
- package/src/components/time-picker/CTimePicker.ts +18 -6
- package/src/components/toast/CToastClose.ts +9 -3
- package/src/components/toast/CToastHeader.ts +2 -11
- package/src/components/tooltip/CTooltip.ts +7 -11
- package/src/composables/useUniqueId.ts +1 -1
- package/src/utils/ComponentProps.ts +6 -0
- package/dist/cjs/components/smart-table/CSmartTableFilter.d.ts +0 -43
- package/dist/cjs/components/smart-table/CSmartTableItemsPerPageSelector.d.ts +0 -43
- package/dist/esm/components/smart-table/CSmartTableFilter.d.ts +0 -43
- package/dist/esm/components/smart-table/CSmartTableItemsPerPageSelector.d.ts +0 -43
- package/src/components/smart-table/CSmartTableFilter.ts +0 -73
- package/src/components/smart-table/CSmartTableItemsPerPageSelector.ts +0 -82
|
@@ -14,26 +14,31 @@ export const filterColumns = (
|
|
|
14
14
|
columnFilter: boolean | ColumnFilter | undefined,
|
|
15
15
|
columnFilterState: ColumnFilterValue,
|
|
16
16
|
itemsDataColumns: string[],
|
|
17
|
-
) => {
|
|
17
|
+
): Item[] => {
|
|
18
18
|
if (columnFilter && typeof columnFilter === 'object' && columnFilter.external) {
|
|
19
19
|
return items
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
Object.entries(columnFilterState).
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return
|
|
26
|
-
}
|
|
22
|
+
if (Object.entries(columnFilterState).length === 0) {
|
|
23
|
+
return items
|
|
24
|
+
}
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
let filteredItems = [...items]
|
|
27
|
+
|
|
28
|
+
for (const [key, value] of Object.entries(columnFilterState)) {
|
|
29
|
+
if (typeof value === 'function') {
|
|
30
|
+
filteredItems = filteredItems.filter((item) => value(item[key]))
|
|
31
|
+
} else {
|
|
32
|
+
const columnFilterValue = String(value).toLowerCase()
|
|
33
|
+
if (columnFilterValue && itemsDataColumns.includes(key)) {
|
|
34
|
+
filteredItems = filteredItems.filter((item) =>
|
|
35
|
+
String(item[key]).toLowerCase().includes(columnFilterValue),
|
|
36
|
+
)
|
|
37
|
+
}
|
|
33
38
|
}
|
|
34
|
-
}
|
|
39
|
+
}
|
|
35
40
|
|
|
36
|
-
return
|
|
41
|
+
return filteredItems
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
export const filterTable = (
|
|
@@ -41,7 +46,7 @@ export const filterTable = (
|
|
|
41
46
|
tableFilter: boolean | TableFilter | undefined,
|
|
42
47
|
tableFilterState: string,
|
|
43
48
|
itemsDataColumns: string[],
|
|
44
|
-
) => {
|
|
49
|
+
): Item[] => {
|
|
45
50
|
if (
|
|
46
51
|
!tableFilterState ||
|
|
47
52
|
(tableFilter && typeof tableFilter === 'object' && tableFilter.external)
|
|
@@ -50,43 +55,46 @@ export const filterTable = (
|
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
const filter = tableFilterState.toLowerCase()
|
|
53
|
-
const valueContainFilter = (val: any) => String(val).toLowerCase().includes(filter)
|
|
54
|
-
items = items.filter((item) => {
|
|
55
|
-
return !!itemsDataColumns.find((key) => valueContainFilter(item[key]))
|
|
56
|
-
})
|
|
57
58
|
|
|
58
|
-
return items
|
|
59
|
+
return items.filter((item) =>
|
|
60
|
+
itemsDataColumns.some((key) => String(item[key]).toLowerCase().includes(filter)),
|
|
61
|
+
)
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
export const getClickedColumnName = (
|
|
62
|
-
target:
|
|
65
|
+
target: HTMLElement,
|
|
63
66
|
columnNames: string[],
|
|
64
|
-
selectable
|
|
67
|
+
selectable?: boolean,
|
|
65
68
|
): string => {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
69
|
+
const clickedCell = target.closest('td')
|
|
70
|
+
if (!clickedCell) {
|
|
71
|
+
return ''
|
|
72
|
+
}
|
|
71
73
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
const row = clickedCell.closest('tr')
|
|
75
|
+
if (!row) {
|
|
76
|
+
return ''
|
|
77
|
+
}
|
|
74
78
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
? column.label !== undefined
|
|
78
|
-
? column.label
|
|
79
|
-
: pretifyName(column.key)
|
|
80
|
-
: pretifyName(column)
|
|
79
|
+
const cells = Array.from(row.children)
|
|
80
|
+
let index = cells.indexOf(clickedCell)
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return column.key
|
|
82
|
+
if (selectable) {
|
|
83
|
+
index -= 1
|
|
85
84
|
}
|
|
86
85
|
|
|
87
|
-
return
|
|
86
|
+
return columnNames[index] || ''
|
|
88
87
|
}
|
|
89
88
|
|
|
89
|
+
export const getColumnKey = (column: Column | string): string =>
|
|
90
|
+
typeof column === 'object' ? column.key : column
|
|
91
|
+
|
|
92
|
+
export const getColumnLabel = (column: Column | string): string =>
|
|
93
|
+
typeof column === 'object' ? (column.label ?? pretifyName(column.key)) : pretifyName(column)
|
|
94
|
+
|
|
95
|
+
export const getColumnName = (column: Column | string): string =>
|
|
96
|
+
typeof column === 'object' ? column.key : column
|
|
97
|
+
|
|
90
98
|
export const getColumnNames = (
|
|
91
99
|
columns: (string | Column)[] | undefined,
|
|
92
100
|
items: Item[],
|
|
@@ -128,23 +136,22 @@ export const getColumns = (_columns: (Column | Group | string)[]): (Column | str
|
|
|
128
136
|
return columns
|
|
129
137
|
}
|
|
130
138
|
|
|
131
|
-
export const countColumns = (columns: Column[]
|
|
132
|
-
let
|
|
133
|
-
for (const column of columns) {
|
|
134
|
-
if (!column.children) {
|
|
135
|
-
_counter++
|
|
136
|
-
}
|
|
139
|
+
export const countColumns = (columns: Column[]): number => {
|
|
140
|
+
let count = 0
|
|
137
141
|
|
|
138
|
-
|
|
139
|
-
|
|
142
|
+
for (const column of columns) {
|
|
143
|
+
if (!column.children || column.children.length === 0) {
|
|
144
|
+
count++
|
|
145
|
+
} else {
|
|
146
|
+
count += countColumns(column.children)
|
|
140
147
|
}
|
|
141
148
|
}
|
|
142
149
|
|
|
143
|
-
return
|
|
150
|
+
return count
|
|
144
151
|
}
|
|
145
152
|
|
|
146
|
-
export const getColumnGroups = (columns: (string | Column)[] | undefined) => {
|
|
147
|
-
const groups = []
|
|
153
|
+
export const getColumnGroups = (columns: (string | Column)[] | undefined): Group[][] => {
|
|
154
|
+
const groups: Group[][] = []
|
|
148
155
|
|
|
149
156
|
const traverseColumns = (column: Column, deep = 0, colSpan = 0): Group[] => {
|
|
150
157
|
const groups = []
|
|
@@ -205,103 +212,96 @@ export const getColumnGroups = (columns: (string | Column)[] | undefined) => {
|
|
|
205
212
|
return groups
|
|
206
213
|
}
|
|
207
214
|
|
|
208
|
-
export const getColumnNamesFromItems = (items: Item[]) =>
|
|
215
|
+
export const getColumnNamesFromItems = (items: Item[]): string[] =>
|
|
209
216
|
Object.keys(items[0] || {}).filter((el) => el.charAt(0) !== '_')
|
|
210
217
|
|
|
211
|
-
export const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
return 0
|
|
218
|
+
export const getColumnSorterFunction = (column: Column | undefined) => {
|
|
219
|
+
if (
|
|
220
|
+
column &&
|
|
221
|
+
typeof column === 'object' &&
|
|
222
|
+
column.sorter &&
|
|
223
|
+
typeof column.sorter === 'function'
|
|
224
|
+
) {
|
|
225
|
+
return column.sorter
|
|
220
226
|
}
|
|
221
227
|
|
|
222
|
-
return
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export const getColumnValues = (items: Item[], key: string) => {
|
|
226
|
-
return items.map((item) => item[key])
|
|
228
|
+
return
|
|
227
229
|
}
|
|
228
230
|
|
|
229
|
-
export const
|
|
230
|
-
const
|
|
231
|
+
export const getColumnSorterState = (key: string, sorterState?: SorterValue[]): string | number => {
|
|
232
|
+
const state = sorterState && sorterState.find((el) => el.column === key)
|
|
231
233
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
234
|
+
return state ? state.state : 0
|
|
235
|
+
}
|
|
235
236
|
|
|
236
|
-
|
|
237
|
-
Object.assign(props, item._cellProps['all'])
|
|
238
|
-
}
|
|
237
|
+
export const getColumnValues = (items: Item[], key: string): any[] => items.map((item) => item[key])
|
|
239
238
|
|
|
240
|
-
|
|
241
|
-
|
|
239
|
+
export const getTableDataCellProps = (
|
|
240
|
+
column: Column | string,
|
|
241
|
+
item: Item,
|
|
242
|
+
colName: string,
|
|
243
|
+
): Record<string, any> => {
|
|
244
|
+
const props = {
|
|
245
|
+
...(typeof column === 'object' && column._colProps),
|
|
246
|
+
...item._cellProps?.all,
|
|
247
|
+
...item._cellProps?.[colName],
|
|
242
248
|
}
|
|
243
249
|
|
|
244
250
|
return props
|
|
245
251
|
}
|
|
246
252
|
|
|
247
|
-
export const getTableDataCellStyles = (
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
if (item._cellStyle && item._cellStyle[colName]) {
|
|
259
|
-
Object.assign(styles, item._cellStyle[colName])
|
|
253
|
+
export const getTableDataCellStyles = (
|
|
254
|
+
column: Column | string,
|
|
255
|
+
item: Item,
|
|
256
|
+
colName: string,
|
|
257
|
+
): Record<string, any> => {
|
|
258
|
+
const styles = {
|
|
259
|
+
...(typeof column === 'object' && column._colStyle),
|
|
260
|
+
...item._cellStyle?.all,
|
|
261
|
+
...item._cellStyle?.[colName],
|
|
260
262
|
}
|
|
261
263
|
|
|
262
264
|
return styles
|
|
263
265
|
}
|
|
264
266
|
|
|
265
|
-
export const getTableHeaderCellProps = (column: Column | string) =>
|
|
266
|
-
|
|
267
|
-
return column._props
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
return {}
|
|
271
|
-
}
|
|
267
|
+
export const getTableHeaderCellProps = (column: Column | string) =>
|
|
268
|
+
typeof column === 'object' && column._props ? column._props : {}
|
|
272
269
|
|
|
273
270
|
export const getTableHeaderCellStyles = (
|
|
274
271
|
column: Column | string,
|
|
275
272
|
columnSorter: boolean | Sorter | undefined,
|
|
276
|
-
) => {
|
|
277
|
-
const style = {}
|
|
273
|
+
): Record<string, any> => {
|
|
274
|
+
const style: Record<string, any> = {}
|
|
278
275
|
|
|
279
|
-
|
|
276
|
+
const isSortable =
|
|
280
277
|
columnSorter &&
|
|
281
278
|
(typeof column !== 'object' ||
|
|
282
279
|
(typeof column === 'object' && (column.sorter === undefined || column.sorter)))
|
|
283
|
-
|
|
284
|
-
|
|
280
|
+
|
|
281
|
+
if (isSortable) {
|
|
282
|
+
style.cursor = 'pointer'
|
|
285
283
|
}
|
|
286
284
|
|
|
287
285
|
if (typeof column === 'object' && column._style) {
|
|
288
|
-
|
|
286
|
+
Object.assign(style, column._style)
|
|
289
287
|
}
|
|
288
|
+
|
|
290
289
|
return style
|
|
291
290
|
}
|
|
292
291
|
|
|
293
292
|
export const isSortable = (
|
|
294
|
-
|
|
293
|
+
index: number,
|
|
295
294
|
columns: (string | Column)[] | undefined,
|
|
296
|
-
columnSorter:
|
|
295
|
+
columnSorter: boolean | Sorter | undefined,
|
|
297
296
|
itemsDataColumns: string[],
|
|
298
297
|
columnNames: string[],
|
|
299
|
-
): boolean
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
|
|
298
|
+
): boolean => {
|
|
299
|
+
const key = columnNames[index]
|
|
300
|
+
const isDataColumn = itemsDataColumns.includes(key)
|
|
301
|
+
const column = columns ? columns[index] : undefined
|
|
302
|
+
|
|
303
303
|
return (
|
|
304
|
-
columnSorter &&
|
|
304
|
+
!!columnSorter &&
|
|
305
305
|
(!columns ||
|
|
306
306
|
typeof column !== 'object' ||
|
|
307
307
|
(typeof column === 'object' && (column.sorter === undefined || column.sorter))) &&
|
|
@@ -309,7 +309,7 @@ export const isSortable = (
|
|
|
309
309
|
)
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
export const pretifyName = (name: string) => {
|
|
312
|
+
export const pretifyName = (name: string): string => {
|
|
313
313
|
return name
|
|
314
314
|
.replace(/[-_.]/g, ' ')
|
|
315
315
|
.replace(/ +/g, ' ')
|
|
@@ -319,28 +319,59 @@ export const pretifyName = (name: string) => {
|
|
|
319
319
|
.join(' ')
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
+
export const sortBy = (
|
|
323
|
+
column: Column | undefined,
|
|
324
|
+
items: Item[],
|
|
325
|
+
key: string,
|
|
326
|
+
order: SorterValue['state'],
|
|
327
|
+
): Item[] => {
|
|
328
|
+
const sorterFunction = getColumnSorterFunction(column)
|
|
329
|
+
|
|
330
|
+
const sortedItems = [...items].sort(
|
|
331
|
+
sorterFunction ||
|
|
332
|
+
((a, b) => {
|
|
333
|
+
const valA = a[key]
|
|
334
|
+
const valB = b[key]
|
|
335
|
+
const aValue = typeof valA === 'number' ? valA : String(valA).toLowerCase()
|
|
336
|
+
const bValue = typeof valB === 'number' ? valB : String(valB).toLowerCase()
|
|
337
|
+
return aValue > bValue ? 1 : bValue > aValue ? -1 : 0
|
|
338
|
+
}),
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
return order === 'desc' ? sortedItems.reverse() : sortedItems
|
|
342
|
+
}
|
|
343
|
+
|
|
322
344
|
export const sortItems = (
|
|
345
|
+
columns: (Column | string)[] | undefined,
|
|
323
346
|
columnSorter: boolean | Sorter | undefined,
|
|
324
347
|
items: Item[],
|
|
325
348
|
itemsDataColumns: string[],
|
|
326
|
-
sorterState: SorterValue,
|
|
327
|
-
) => {
|
|
328
|
-
const column = sorterState.column
|
|
349
|
+
sorterState: SorterValue[],
|
|
350
|
+
): Item[] => {
|
|
329
351
|
if (
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
(columnSorter && typeof columnSorter === 'object' && columnSorter.external)
|
|
352
|
+
(columnSorter && typeof columnSorter === 'object' && columnSorter.external) ||
|
|
353
|
+
sorterState.length === 0
|
|
333
354
|
) {
|
|
334
355
|
return items
|
|
335
356
|
}
|
|
336
357
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
const
|
|
341
|
-
const
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
358
|
+
let sortedItems = [...items]
|
|
359
|
+
|
|
360
|
+
for (const sorter of [...sorterState].reverse()) {
|
|
361
|
+
const key = sorter.column
|
|
362
|
+
const order = sorter.state
|
|
363
|
+
const column =
|
|
364
|
+
columns &&
|
|
365
|
+
(columns.find((column) => typeof column === 'object' && column.key === key) as
|
|
366
|
+
| Column
|
|
367
|
+
| undefined)
|
|
368
|
+
|
|
369
|
+
if (!key || !itemsDataColumns.includes(key)) {
|
|
370
|
+
continue
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
sortedItems = sortBy(column, sortedItems, key, order)
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return sortedItems
|
|
346
377
|
}
|
|
@@ -3,6 +3,12 @@ import { defineComponent, h, inject, Ref } from 'vue'
|
|
|
3
3
|
const CTab = defineComponent({
|
|
4
4
|
name: 'CTab',
|
|
5
5
|
props: {
|
|
6
|
+
/**
|
|
7
|
+
* Toggle the disabled state for the component.
|
|
8
|
+
*
|
|
9
|
+
* @since 5.4.0
|
|
10
|
+
*/
|
|
11
|
+
disabled: Boolean,
|
|
6
12
|
/**
|
|
7
13
|
* Item key.
|
|
8
14
|
*/
|
|
@@ -13,7 +19,7 @@ const CTab = defineComponent({
|
|
|
13
19
|
},
|
|
14
20
|
setup(props, { slots }) {
|
|
15
21
|
const activeItemKey = inject('activeItemKey') as Ref<number | string>
|
|
16
|
-
const id = inject('id')
|
|
22
|
+
const id = inject('id')
|
|
17
23
|
const setActiveItemKey = inject('setActiveItemKey') as (key: number | string) => void
|
|
18
24
|
|
|
19
25
|
const isActive = () => props.itemKey === activeItemKey.value
|
|
@@ -28,12 +34,13 @@ const CTab = defineComponent({
|
|
|
28
34
|
active: isActive(),
|
|
29
35
|
},
|
|
30
36
|
],
|
|
31
|
-
id: `${props.itemKey}-tab-${id
|
|
37
|
+
id: `${props.itemKey}-tab-${id}`,
|
|
32
38
|
role: 'tab',
|
|
33
39
|
tabindex: isActive() ? 0 : -1,
|
|
34
40
|
type: 'button',
|
|
35
|
-
'aria-controls': `${props.itemKey}-tab-panel-${id
|
|
41
|
+
'aria-controls': `${props.itemKey}-tab-panel-${id}`,
|
|
36
42
|
'aria-selected': isActive(),
|
|
43
|
+
disabled: props.disabled,
|
|
37
44
|
onClick: () => setActiveItemKey(props.itemKey),
|
|
38
45
|
onFocus: () => setActiveItemKey(props.itemKey),
|
|
39
46
|
},
|
|
@@ -50,8 +50,7 @@ const CTabPanel = defineComponent({
|
|
|
50
50
|
],
|
|
51
51
|
setup(props, { slots, emit }) {
|
|
52
52
|
const activeItemKey = inject('activeItemKey') as Ref<number | string>
|
|
53
|
-
const id = inject('id')
|
|
54
|
-
|
|
53
|
+
const id = inject('id')
|
|
55
54
|
const tabPaneRef = ref()
|
|
56
55
|
const firstRender = ref(true)
|
|
57
56
|
const visible = ref()
|
|
@@ -112,9 +111,9 @@ const CTabPanel = defineComponent({
|
|
|
112
111
|
show: firstRender.value && visible.value,
|
|
113
112
|
},
|
|
114
113
|
],
|
|
115
|
-
id: `${props.itemKey}-tab-panel-${id
|
|
114
|
+
id: `${props.itemKey}-tab-panel-${id}`,
|
|
116
115
|
role: 'tabpanel',
|
|
117
|
-
'aria-labelledby': `${props.itemKey}-tab-${id
|
|
116
|
+
'aria-labelledby': `${props.itemKey}-tab-${id}`,
|
|
118
117
|
tabindex: 0,
|
|
119
118
|
ref: tabPaneRef,
|
|
120
119
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { defineComponent, h, provide, ref, watch } from 'vue'
|
|
2
|
-
import { useUniqueId } from '../../composables'
|
|
1
|
+
import { defineComponent, h, provide, ref, useId, watch } from 'vue'
|
|
3
2
|
|
|
4
3
|
const CTabs = defineComponent({
|
|
5
4
|
name: 'CTabs',
|
|
@@ -19,9 +18,8 @@ const CTabs = defineComponent({
|
|
|
19
18
|
'change',
|
|
20
19
|
],
|
|
21
20
|
setup(props, { slots, emit }) {
|
|
22
|
-
const { getUID } = useUniqueId()
|
|
23
|
-
const uID = ref(getUID())
|
|
24
21
|
const activeItemKey = ref(props.activeItemKey)
|
|
22
|
+
const uniqueId = useId()
|
|
25
23
|
const setActiveItemKey = (key: string | number) => {
|
|
26
24
|
activeItemKey.value = key
|
|
27
25
|
}
|
|
@@ -35,7 +33,7 @@ const CTabs = defineComponent({
|
|
|
35
33
|
)
|
|
36
34
|
|
|
37
35
|
provide('activeItemKey', activeItemKey)
|
|
38
|
-
provide('id',
|
|
36
|
+
provide('id', uniqueId)
|
|
39
37
|
provide('setActiveItemKey', setActiveItemKey)
|
|
40
38
|
|
|
41
39
|
return () => h('div', { class: 'tabs' }, slots.default && slots.default())
|
|
@@ -25,16 +25,15 @@ import { Color } from '../props'
|
|
|
25
25
|
const CTimePicker = defineComponent({
|
|
26
26
|
name: 'CTimePicker',
|
|
27
27
|
props: {
|
|
28
|
-
...CPicker.props,
|
|
29
28
|
/**
|
|
30
29
|
* Set if the component should use the 12/24 hour format. If `true` forces the interface to a 12-hour format. If `false` forces the interface into a 24-hour format. If `auto` the current locale will determine the 12 or 24-hour interface by default locales.
|
|
31
30
|
*
|
|
32
31
|
* @since 4.7.0
|
|
33
32
|
*/
|
|
34
33
|
ampm: {
|
|
35
|
-
type: [Boolean, String]
|
|
34
|
+
type: [Boolean, String] as PropType<boolean | 'auto'>,
|
|
36
35
|
default: 'auto',
|
|
37
|
-
validator: (value: boolean |
|
|
36
|
+
validator: (value: boolean | 'auto') => {
|
|
38
37
|
if (typeof value == 'string') {
|
|
39
38
|
return ['auto'].includes(value)
|
|
40
39
|
}
|
|
@@ -130,6 +129,17 @@ const CTimePicker = defineComponent({
|
|
|
130
129
|
return ['ghost', 'outline'].includes(value)
|
|
131
130
|
},
|
|
132
131
|
},
|
|
132
|
+
/**
|
|
133
|
+
* Set container type for the component.
|
|
134
|
+
*/
|
|
135
|
+
container: {
|
|
136
|
+
type: String as PropType<'dropdown' | 'inline'>,
|
|
137
|
+
default: 'dropdown',
|
|
138
|
+
},
|
|
139
|
+
/**
|
|
140
|
+
* Toggle the disabled state for the component.
|
|
141
|
+
*/
|
|
142
|
+
disabled: Boolean,
|
|
133
143
|
/**
|
|
134
144
|
* Provide valuable, actionable feedback.
|
|
135
145
|
*
|
|
@@ -170,7 +180,7 @@ const CTimePicker = defineComponent({
|
|
|
170
180
|
/**
|
|
171
181
|
* Defines the delay (in milliseconds) for the input field's onChange event.
|
|
172
182
|
*
|
|
173
|
-
* @since
|
|
183
|
+
* @since 5.0.0
|
|
174
184
|
*/
|
|
175
185
|
inputOnChangeDelay: {
|
|
176
186
|
type: Number,
|
|
@@ -200,7 +210,7 @@ const CTimePicker = defineComponent({
|
|
|
200
210
|
*/
|
|
201
211
|
locale: {
|
|
202
212
|
type: String,
|
|
203
|
-
|
|
213
|
+
default: 'default',
|
|
204
214
|
},
|
|
205
215
|
/**
|
|
206
216
|
* Toggle the display of minutes, specify a list of available minutes using an array, or customize the filtering of minutes through a function.
|
|
@@ -602,7 +612,9 @@ const CTimePicker = defineComponent({
|
|
|
602
612
|
h(
|
|
603
613
|
CFormControlWrapper,
|
|
604
614
|
{
|
|
605
|
-
|
|
615
|
+
...(typeof attrs['aria-describedby'] === 'string' && {
|
|
616
|
+
describedby: attrs['aria-describedby'],
|
|
617
|
+
}),
|
|
606
618
|
feedback: props.feedback,
|
|
607
619
|
feedbackInvalid: props.feedbackInvalid,
|
|
608
620
|
feedbackValid: props.feedbackValid,
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { defineComponent, h, inject } from 'vue'
|
|
1
|
+
import { defineComponent, h, inject, resolveComponent } from 'vue'
|
|
2
2
|
import { CCloseButton } from '../close-button/CCloseButton'
|
|
3
3
|
|
|
4
|
+
import type { ComponentProps } from '../../utils/ComponentProps'
|
|
5
|
+
|
|
6
|
+
interface CCloseButtonProps extends ComponentProps<typeof CCloseButton> {
|
|
7
|
+
as?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
4
10
|
const CToastClose = defineComponent({
|
|
5
11
|
name: 'CToastClose',
|
|
6
12
|
props: {
|
|
@@ -16,7 +22,7 @@ const CToastClose = defineComponent({
|
|
|
16
22
|
*/
|
|
17
23
|
'close',
|
|
18
24
|
],
|
|
19
|
-
setup(props, { slots, emit }) {
|
|
25
|
+
setup(props: CCloseButtonProps, { slots, emit }) {
|
|
20
26
|
// eslint-disable-next-line no-unused-vars
|
|
21
27
|
const updateVisible = inject('updateVisible') as (visible: boolean) => void
|
|
22
28
|
const handleClose = () => {
|
|
@@ -26,7 +32,7 @@ const CToastClose = defineComponent({
|
|
|
26
32
|
return () =>
|
|
27
33
|
props.as
|
|
28
34
|
? h(
|
|
29
|
-
props.as,
|
|
35
|
+
resolveComponent(props.as),
|
|
30
36
|
{
|
|
31
37
|
onClick: () => {
|
|
32
38
|
handleClose()
|
|
@@ -9,20 +9,11 @@ const CToastHeader = defineComponent({
|
|
|
9
9
|
*/
|
|
10
10
|
closeButton: Boolean,
|
|
11
11
|
},
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Event called after clicking the close button.
|
|
15
|
-
*/
|
|
16
|
-
'close',
|
|
17
|
-
],
|
|
18
|
-
setup(props, { slots, emit }) {
|
|
12
|
+
setup(props, { slots }) {
|
|
19
13
|
return () =>
|
|
20
14
|
h('div', { class: 'toast-header' }, [
|
|
21
15
|
slots.default && slots.default(),
|
|
22
|
-
props.closeButton &&
|
|
23
|
-
h(CToastClose, {
|
|
24
|
-
onClose: () => emit('close'),
|
|
25
|
-
}),
|
|
16
|
+
props.closeButton && h(CToastClose),
|
|
26
17
|
])
|
|
27
18
|
},
|
|
28
19
|
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent, h,
|
|
1
|
+
import { defineComponent, h, PropType, ref, RendererElement, Transition, useId } from 'vue'
|
|
2
2
|
import type { Placement } from '@popperjs/core'
|
|
3
3
|
|
|
4
4
|
import { CConditionalTeleport } from '../conditional-teleport'
|
|
5
|
-
import {
|
|
5
|
+
import { usePopper } from '../../composables'
|
|
6
6
|
import type { Placements, Triggers } from '../../types'
|
|
7
7
|
import { executeAfterTransition } from '../../utils/transition'
|
|
8
8
|
import { getRTLPlacement } from '../../utils'
|
|
@@ -23,7 +23,7 @@ const CTooltip = defineComponent({
|
|
|
23
23
|
/**
|
|
24
24
|
* Appends the vue tooltip to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`.
|
|
25
25
|
*
|
|
26
|
-
* @since
|
|
26
|
+
* @since 5.0.0
|
|
27
27
|
*/
|
|
28
28
|
container: {
|
|
29
29
|
type: [Object, String] as PropType<HTMLElement | (() => HTMLElement) | string>,
|
|
@@ -113,10 +113,10 @@ const CTooltip = defineComponent({
|
|
|
113
113
|
setup(props, { attrs, slots, emit }) {
|
|
114
114
|
const togglerRef = ref()
|
|
115
115
|
const tooltipRef = ref()
|
|
116
|
-
const uID = ref()
|
|
117
116
|
const visible = ref(props.visible)
|
|
118
|
-
|
|
117
|
+
|
|
119
118
|
const { initPopper, destroyPopper } = usePopper()
|
|
119
|
+
const uniqueId = `tooltip-${useId()}`
|
|
120
120
|
|
|
121
121
|
const delay =
|
|
122
122
|
typeof props.delay === 'number' ? { show: props.delay, hide: props.delay } : props.delay
|
|
@@ -145,10 +145,6 @@ const CTooltip = defineComponent({
|
|
|
145
145
|
placement: getRTLPlacement(props.placement, togglerRef.value),
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
onMounted(() => {
|
|
149
|
-
uID.value = getUID()
|
|
150
|
-
})
|
|
151
|
-
|
|
152
148
|
const handleEnter = (el: RendererElement, done: () => void) => {
|
|
153
149
|
emit('show')
|
|
154
150
|
initPopper(togglerRef.value, tooltipRef.value, popperConfig)
|
|
@@ -208,7 +204,7 @@ const CTooltip = defineComponent({
|
|
|
208
204
|
},
|
|
209
205
|
attrs.class,
|
|
210
206
|
],
|
|
211
|
-
id:
|
|
207
|
+
id: uniqueId,
|
|
212
208
|
ref: tooltipRef,
|
|
213
209
|
role: 'tooltip',
|
|
214
210
|
},
|
|
@@ -229,7 +225,7 @@ const CTooltip = defineComponent({
|
|
|
229
225
|
),
|
|
230
226
|
slots.toggler &&
|
|
231
227
|
slots.toggler({
|
|
232
|
-
id: visible.value ?
|
|
228
|
+
id: visible.value ? uniqueId : null,
|
|
233
229
|
on: {
|
|
234
230
|
click: (event: Event) =>
|
|
235
231
|
props.trigger.includes('click') && toggleVisible(event, !visible.value),
|