@coreui/vue-pro 4.1.1 → 4.1.2
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 +18 -10
- package/dist/components/accordion/CAccordionBody.d.ts +1 -1
- package/dist/components/accordion/CAccordionButton.d.ts +1 -1
- package/dist/components/accordion/CAccordionCollapse.d.ts +9 -5
- package/dist/components/accordion/CAccordionHeader.d.ts +1 -1
- package/dist/components/accordion/CAccordionItem.d.ts +10 -5
- package/dist/components/alert/CAlert.d.ts +38 -12
- package/dist/components/alert/CAlertHeading.d.ts +10 -5
- package/dist/components/alert/CAlertLink.d.ts +1 -1
- package/dist/components/avatar/CAvatar.d.ts +59 -15
- package/dist/components/backdrop/CBackdrop.d.ts +10 -5
- package/dist/components/badge/CBadge.d.ts +59 -16
- package/dist/components/breadcrumb/CBreadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb/CBreadcrumbItem.d.ts +17 -8
- package/dist/components/button/CButton.d.ts +73 -20
- package/dist/components/button-group/CButtonGroup.d.ts +20 -8
- package/dist/components/button-group/CButtonToolbar.d.ts +1 -1
- package/dist/components/callout/CCallout.d.ts +11 -5
- package/dist/components/card/CCard.d.ts +20 -7
- package/dist/components/card/CCardBody.d.ts +1 -1
- package/dist/components/card/CCardFooter.d.ts +1 -1
- package/dist/components/card/CCardGroup.d.ts +1 -1
- package/dist/components/card/CCardHeader.d.ts +10 -5
- package/dist/components/card/CCardImage.d.ts +21 -8
- package/dist/components/card/CCardImageOverlay.d.ts +1 -1
- package/dist/components/card/CCardLink.d.ts +10 -5
- package/dist/components/card/CCardSubtitle.d.ts +10 -5
- package/dist/components/card/CCardText.d.ts +10 -5
- package/dist/components/card/CCardTitle.d.ts +10 -5
- package/dist/components/carousel/CCarousel.d.ts +58 -19
- package/dist/components/carousel/CCarouselCaption.d.ts +1 -1
- package/dist/components/carousel/CCarouselItem.d.ts +25 -9
- package/dist/components/close-button/CCloseButton.d.ts +16 -7
- package/dist/components/collapse/CCollapse.d.ts +16 -7
- package/dist/components/dropdown/CDropdown.d.ts +82 -22
- package/dist/components/dropdown/CDropdownDivider.d.ts +1 -1
- package/dist/components/dropdown/CDropdownHeader.d.ts +10 -5
- package/dist/components/dropdown/CDropdownItem.d.ts +32 -12
- package/dist/components/dropdown/CDropdownMenu.d.ts +12 -5
- package/dist/components/dropdown/CDropdownToggle.d.ts +78 -22
- package/dist/components/element-cover/CElementCover.d.ts +22 -7
- package/dist/components/footer/CFooter.d.ts +13 -5
- package/dist/components/form/CForm.d.ts +9 -5
- package/dist/components/form/CFormCheck.d.ts +66 -23
- package/dist/components/form/CFormControl.d.ts +61 -20
- package/dist/components/form/CFormFeedback.d.ts +22 -11
- package/dist/components/form/CFormFloating.d.ts +1 -1
- package/dist/components/form/CFormInput.d.ts +66 -20
- package/dist/components/form/CFormLabel.d.ts +10 -5
- package/dist/components/form/CFormRange.d.ts +59 -18
- package/dist/components/form/CFormSelect.d.ts +66 -18
- package/dist/components/form/CFormSwitch.d.ts +61 -18
- package/dist/components/form/CFormText.d.ts +10 -5
- package/dist/components/form/CFormTextarea.d.ts +45 -16
- package/dist/components/form/CInputGroup.d.ts +13 -5
- package/dist/components/form/CInputGroupText.d.ts +10 -5
- package/dist/components/grid/CCol.d.ts +62 -15
- package/dist/components/grid/CContainer.d.ts +44 -15
- package/dist/components/grid/CRow.d.ts +57 -15
- package/dist/components/header/CHeader.d.ts +24 -7
- package/dist/components/header/CHeaderBrand.d.ts +10 -5
- package/dist/components/header/CHeaderDivider.d.ts +1 -1
- package/dist/components/header/CHeaderNav.d.ts +10 -5
- package/dist/components/header/CHeaderText.d.ts +1 -1
- package/dist/components/header/CHeaderToggler.d.ts +1 -1
- package/dist/components/image/CImage.d.ts +34 -12
- package/dist/components/link/CLink.d.ts +32 -12
- package/dist/components/list-group/CListGroup.d.ts +28 -10
- package/dist/components/list-group/CListGroupItem.d.ts +33 -12
- package/dist/components/modal/CModal.d.ts +96 -22
- package/dist/components/modal/CModalBody.d.ts +1 -1
- package/dist/components/modal/CModalFooter.d.ts +1 -1
- package/dist/components/modal/CModalHeader.d.ts +10 -5
- package/dist/components/modal/CModalTitle.d.ts +10 -5
- package/dist/components/multi-select/CMultiSelect.d.ts +131 -30
- package/dist/components/multi-select/CMultiSelectNativeSelect.d.ts +26 -11
- package/dist/components/multi-select/CMultiSelectOptions.d.ts +40 -11
- package/dist/components/multi-select/CMultiSelectSelection.d.ts +47 -13
- package/dist/components/nav/CNav.d.ts +32 -10
- package/dist/components/nav/CNavGroup.d.ts +10 -7
- package/dist/components/nav/CNavGroupItems.d.ts +1 -1
- package/dist/components/nav/CNavLink.d.ts +32 -12
- package/dist/components/nav/CNavTitle.d.ts +1 -1
- package/dist/components/navbar/CNavbar.d.ts +63 -16
- package/dist/components/navbar/CNavbarBrand.d.ts +19 -8
- package/dist/components/navbar/CNavbarNav.d.ts +10 -5
- package/dist/components/navbar/CNavbarText.d.ts +1 -1
- package/dist/components/navbar/CNavbarToggler.d.ts +1 -1
- package/dist/components/offcanvas/COffcanvas.d.ts +44 -14
- package/dist/components/offcanvas/COffcanvasBody.d.ts +1 -1
- package/dist/components/offcanvas/COffcanvasHeader.d.ts +1 -1
- package/dist/components/offcanvas/COffcanvasTitle.d.ts +10 -5
- package/dist/components/pagination/CPagination.d.ts +24 -7
- package/dist/components/pagination/CPaginationItem.d.ts +32 -12
- package/dist/components/pagination/CSmartPagination.d.ts +120 -28
- package/dist/components/placeholder/CPlaceholder.d.ts +89 -24
- package/dist/components/popover/CPopover.d.ts +50 -16
- package/dist/components/progress/CProgressBar.d.ts +37 -12
- package/dist/components/sidebar/CSidebar.d.ts +59 -20
- package/dist/components/sidebar/CSidebarBrand.d.ts +1 -1
- package/dist/components/sidebar/CSidebarFooter.d.ts +1 -1
- package/dist/components/sidebar/CSidebarHeader.d.ts +1 -1
- package/dist/components/sidebar/CSidebarNav.d.ts +1 -1
- package/dist/components/sidebar/CSidebarToggler.d.ts +1 -1
- package/dist/components/smart-table/CSmartTable.d.ts +278 -60
- package/dist/components/smart-table/CSmartTableBody.d.ts +37 -20
- package/dist/components/smart-table/CSmartTableCleaner.d.ts +7 -5
- package/dist/components/smart-table/CSmartTableFilter.d.ts +17 -9
- package/dist/components/smart-table/CSmartTableHead.d.ts +37 -22
- package/dist/components/smart-table/CSmartTableItemsPerPageSelector.d.ts +17 -10
- package/dist/components/spinner/CSpinner.d.ts +51 -14
- package/dist/components/table/CTable.d.ts +88 -24
- package/dist/components/table/CTableBody.d.ts +11 -5
- package/dist/components/table/CTableCaption.d.ts +2 -4
- package/dist/components/table/CTableDataCell.d.ts +29 -10
- package/dist/components/table/CTableFoot.d.ts +11 -5
- package/dist/components/table/CTableHead.d.ts +11 -5
- package/dist/components/table/CTableHeaderCell.d.ts +11 -5
- package/dist/components/table/CTableRow.d.ts +29 -10
- package/dist/components/tabs/CTabContent.d.ts +1 -1
- package/dist/components/tabs/CTabPane.d.ts +10 -5
- package/dist/components/toast/CToast.d.ts +59 -18
- package/dist/components/toast/CToastBody.d.ts +1 -1
- package/dist/components/toast/CToastHeader.d.ts +9 -5
- package/dist/components/toast/CToaster.d.ts +13 -5
- package/dist/components/tooltip/CTooltip.d.ts +42 -14
- package/dist/components/widgets/CWidgetStatsA.d.ts +23 -10
- package/dist/components/widgets/CWidgetStatsB.d.ts +45 -17
- package/dist/components/widgets/CWidgetStatsC.d.ts +37 -15
- package/dist/components/widgets/CWidgetStatsD.d.ts +19 -8
- package/dist/components/widgets/CWidgetStatsE.d.ts +18 -8
- package/dist/components/widgets/CWidgetStatsF.d.ts +42 -14
- package/dist/index.es.js +81 -39
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +80 -38
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/components/form/CFormSelect.ts +19 -6
- package/src/components/form/__tests__/__snapshots__/CFormCheck.spec.ts.snap +8 -2
- package/src/components/form/__tests__/__snapshots__/CFormSelect.spec.ts.snap +1 -1
- package/src/components/modal/CModal.ts +60 -37
- package/src/components/modal/__tests__/__snapshots__/CModal.spec.ts.snap +1 -2
- package/src/components/sidebar/__tests__/__snapshots__/CSidebar.spec.ts.snap +2 -8
package/dist/index.js
CHANGED
|
@@ -2001,13 +2001,21 @@ function mapToStyles(_ref2) {
|
|
|
2001
2001
|
adaptive = _ref2.adaptive,
|
|
2002
2002
|
roundOffsets = _ref2.roundOffsets,
|
|
2003
2003
|
isFixed = _ref2.isFixed;
|
|
2004
|
+
var _offsets$x = offsets.x,
|
|
2005
|
+
x = _offsets$x === void 0 ? 0 : _offsets$x,
|
|
2006
|
+
_offsets$y = offsets.y,
|
|
2007
|
+
y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
2004
2008
|
|
|
2005
|
-
var _ref3 =
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2009
|
+
var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
|
|
2010
|
+
x: x,
|
|
2011
|
+
y: y
|
|
2012
|
+
}) : {
|
|
2013
|
+
x: x,
|
|
2014
|
+
y: y
|
|
2015
|
+
};
|
|
2010
2016
|
|
|
2017
|
+
x = _ref3.x;
|
|
2018
|
+
y = _ref3.y;
|
|
2011
2019
|
var hasX = offsets.hasOwnProperty('x');
|
|
2012
2020
|
var hasY = offsets.hasOwnProperty('y');
|
|
2013
2021
|
var sideX = left;
|
|
@@ -2052,6 +2060,17 @@ function mapToStyles(_ref2) {
|
|
|
2052
2060
|
position: position
|
|
2053
2061
|
}, adaptive && unsetSides);
|
|
2054
2062
|
|
|
2063
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
2064
|
+
x: x,
|
|
2065
|
+
y: y
|
|
2066
|
+
}) : {
|
|
2067
|
+
x: x,
|
|
2068
|
+
y: y
|
|
2069
|
+
};
|
|
2070
|
+
|
|
2071
|
+
x = _ref4.x;
|
|
2072
|
+
y = _ref4.y;
|
|
2073
|
+
|
|
2055
2074
|
if (gpuAcceleration) {
|
|
2056
2075
|
var _Object$assign;
|
|
2057
2076
|
|
|
@@ -2061,9 +2080,9 @@ function mapToStyles(_ref2) {
|
|
|
2061
2080
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
2062
2081
|
}
|
|
2063
2082
|
|
|
2064
|
-
function computeStyles(
|
|
2065
|
-
var state =
|
|
2066
|
-
options =
|
|
2083
|
+
function computeStyles(_ref5) {
|
|
2084
|
+
var state = _ref5.state,
|
|
2085
|
+
options = _ref5.options;
|
|
2067
2086
|
var _options$gpuAccelerat = options.gpuAcceleration,
|
|
2068
2087
|
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
|
2069
2088
|
_options$adaptive = options.adaptive,
|
|
@@ -2362,7 +2381,7 @@ function getClippingParents(element) {
|
|
|
2362
2381
|
|
|
2363
2382
|
|
|
2364
2383
|
return clippingParents.filter(function (clippingParent) {
|
|
2365
|
-
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'
|
|
2384
|
+
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
|
2366
2385
|
});
|
|
2367
2386
|
} // Gets the maximum area that the element is visible in due to any number of
|
|
2368
2387
|
// clipping parents
|
|
@@ -4644,10 +4663,14 @@ const CFormSelect = vue.defineComponent({
|
|
|
4644
4663
|
* The default name for a value passed using v-model.
|
|
4645
4664
|
*/
|
|
4646
4665
|
modelValue: {
|
|
4647
|
-
type: String,
|
|
4666
|
+
type: [String, Array],
|
|
4648
4667
|
default: undefined,
|
|
4649
4668
|
require: false,
|
|
4650
4669
|
},
|
|
4670
|
+
multiple: {
|
|
4671
|
+
type: Boolean,
|
|
4672
|
+
required: false,
|
|
4673
|
+
},
|
|
4651
4674
|
/**
|
|
4652
4675
|
* Options list of the select component. Available keys: `label`, `value`, `disabled`.
|
|
4653
4676
|
* Examples:
|
|
@@ -4696,9 +4719,8 @@ const CFormSelect = vue.defineComponent({
|
|
|
4696
4719
|
const selected = Array.from(target.options)
|
|
4697
4720
|
.filter((option) => option.selected)
|
|
4698
4721
|
.map((option) => option.value);
|
|
4699
|
-
const value = target.multiple ? selected : selected[0];
|
|
4700
4722
|
emit('change', event);
|
|
4701
|
-
emit('update:modelValue',
|
|
4723
|
+
emit('update:modelValue', target.multiple ? selected : selected[0]);
|
|
4702
4724
|
};
|
|
4703
4725
|
return () => vue.h('select', {
|
|
4704
4726
|
class: [
|
|
@@ -4709,14 +4731,23 @@ const CFormSelect = vue.defineComponent({
|
|
|
4709
4731
|
'is-valid': props.valid,
|
|
4710
4732
|
},
|
|
4711
4733
|
],
|
|
4734
|
+
multiple: props.multiple,
|
|
4712
4735
|
onChange: (event) => handleChange(event),
|
|
4713
4736
|
size: props.htmlSize,
|
|
4737
|
+
...(props.modelValue && !props.multiple && { value: props.modelValue }),
|
|
4714
4738
|
}, props.options
|
|
4715
4739
|
? props.options.map((option) => {
|
|
4716
4740
|
return vue.h('option', {
|
|
4717
|
-
...(typeof option === 'object' &&
|
|
4718
|
-
option.disabled && { disabled: option.disabled }),
|
|
4719
|
-
|
|
4741
|
+
...(typeof option === 'object' && {
|
|
4742
|
+
...(option.disabled && { disabled: option.disabled }),
|
|
4743
|
+
...(option.selected && { selected: option.selected }),
|
|
4744
|
+
...(option.value && {
|
|
4745
|
+
value: option.value,
|
|
4746
|
+
...(props.modelValue &&
|
|
4747
|
+
props.multiple &&
|
|
4748
|
+
props.modelValue.includes(option.value) && { selected: true }),
|
|
4749
|
+
}),
|
|
4750
|
+
}),
|
|
4720
4751
|
}, typeof option === 'string' ? option : option.label);
|
|
4721
4752
|
})
|
|
4722
4753
|
: slots.default && slots.default());
|
|
@@ -5742,6 +5773,14 @@ const CModal = vue.defineComponent({
|
|
|
5742
5773
|
default: true,
|
|
5743
5774
|
required: false,
|
|
5744
5775
|
},
|
|
5776
|
+
/**
|
|
5777
|
+
* By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false.
|
|
5778
|
+
*/
|
|
5779
|
+
unmountOnClose: {
|
|
5780
|
+
type: Boolean,
|
|
5781
|
+
default: true,
|
|
5782
|
+
required: false,
|
|
5783
|
+
},
|
|
5745
5784
|
/**
|
|
5746
5785
|
* Toggle the visibility of alert component.
|
|
5747
5786
|
*/
|
|
@@ -5830,35 +5869,38 @@ const CModal = vue.defineComponent({
|
|
|
5830
5869
|
}
|
|
5831
5870
|
};
|
|
5832
5871
|
vue.provide('handleDismiss', handleDismiss);
|
|
5872
|
+
const modal = () => vue.h('div', {
|
|
5873
|
+
class: [
|
|
5874
|
+
'modal',
|
|
5875
|
+
{
|
|
5876
|
+
['fade']: props.transition,
|
|
5877
|
+
},
|
|
5878
|
+
attrs.class,
|
|
5879
|
+
],
|
|
5880
|
+
ref: modalRef,
|
|
5881
|
+
}, vue.h('div', {
|
|
5882
|
+
class: [
|
|
5883
|
+
'modal-dialog',
|
|
5884
|
+
{
|
|
5885
|
+
'modal-dialog-centered': props.alignment === 'center',
|
|
5886
|
+
[`modal-fullscreen-${props.fullscreen}-down`]: props.fullscreen && typeof props.fullscreen === 'string',
|
|
5887
|
+
'modal-fullscreen': props.fullscreen && typeof props.fullscreen === 'boolean',
|
|
5888
|
+
['modal-dialog-scrollable']: props.scrollable,
|
|
5889
|
+
[`modal-${props.size}`]: props.size,
|
|
5890
|
+
},
|
|
5891
|
+
],
|
|
5892
|
+
role: 'dialog',
|
|
5893
|
+
}, vue.h('div', { class: ['modal-content', props.contentClassName], ref: modalContentRef }, slots.default && slots.default())));
|
|
5833
5894
|
return () => [
|
|
5834
5895
|
vue.h(vue.Transition, {
|
|
5896
|
+
css: false,
|
|
5835
5897
|
onEnter: (el, done) => handleEnter(el, done),
|
|
5836
5898
|
onAfterEnter: () => handleAfterEnter(),
|
|
5837
5899
|
onLeave: (el, done) => handleLeave(el, done),
|
|
5838
5900
|
onAfterLeave: (el) => handleAfterLeave(el),
|
|
5839
|
-
}, () =>
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
'modal',
|
|
5843
|
-
{
|
|
5844
|
-
['fade']: props.transition,
|
|
5845
|
-
},
|
|
5846
|
-
attrs.class,
|
|
5847
|
-
],
|
|
5848
|
-
ref: modalRef,
|
|
5849
|
-
}, vue.h('div', {
|
|
5850
|
-
class: [
|
|
5851
|
-
'modal-dialog',
|
|
5852
|
-
{
|
|
5853
|
-
'modal-dialog-centered': props.alignment === 'center',
|
|
5854
|
-
[`modal-fullscreen-${props.fullscreen}-down`]: props.fullscreen && typeof props.fullscreen === 'string',
|
|
5855
|
-
'modal-fullscreen': props.fullscreen && typeof props.fullscreen === 'boolean',
|
|
5856
|
-
['modal-dialog-scrollable']: props.scrollable,
|
|
5857
|
-
[`modal-${props.size}`]: props.size,
|
|
5858
|
-
},
|
|
5859
|
-
],
|
|
5860
|
-
role: 'dialog',
|
|
5861
|
-
}, vue.h('div', { class: ['modal-content', props.contentClassName], ref: modalContentRef }, slots.default && slots.default())))),
|
|
5901
|
+
}, () => props.unmountOnClose
|
|
5902
|
+
? visible.value && modal()
|
|
5903
|
+
: vue.withDirectives(modal(), [[vue.vShow, visible.value]])),
|
|
5862
5904
|
props.backdrop &&
|
|
5863
5905
|
vue.h(CBackdrop, {
|
|
5864
5906
|
class: 'modal-backdrop',
|