@coreui/react-pro 4.9.0-next.1 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/conditional-portal/CConditionalPortal.d.ts +12 -0
- package/dist/components/conditional-portal/index.d.ts +2 -0
- package/dist/components/date-range-picker/CDateRangePicker.d.ts +6 -0
- package/dist/components/form/CFormCheck.d.ts +7 -1
- package/dist/components/form/CFormSwitch.d.ts +6 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/table/CTableResponsiveWrapper.d.ts +0 -1
- package/dist/components/time-picker/CTimePicker.d.ts +6 -0
- package/dist/index.es.js +507 -728
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +506 -726
- package/dist/index.js.map +1 -1
- package/package.json +11 -6
- package/src/components/accordion/CAccordion.tsx +7 -3
- package/src/components/accordion/CAccordionBody.tsx +1 -2
- package/src/components/accordion/CAccordionButton.tsx +1 -3
- package/src/components/accordion/CAccordionHeader.tsx +1 -3
- package/src/components/accordion/CAccordionItem.tsx +2 -4
- package/src/components/accordion/__tests__/__snapshots__/CAccordionBody.spec.tsx.snap +2 -2
- package/src/components/alert/CAlert.tsx +19 -27
- package/src/components/alert/CAlertHeading.tsx +1 -3
- package/src/components/alert/CAlertLink.tsx +1 -3
- package/src/components/alert/__tests__/__snapshots__/CAlert.spec.tsx.snap +1 -1
- package/src/components/avatar/CAvatar.tsx +14 -11
- package/src/components/backdrop/CBackdrop.tsx +9 -12
- package/src/components/badge/CBadge.tsx +19 -17
- package/src/components/breadcrumb/CBreadcrumb.tsx +1 -2
- package/src/components/breadcrumb/CBreadcrumbItem.tsx +12 -8
- package/src/components/button/CButton.tsx +7 -9
- package/src/components/button-group/CButtonGroup.tsx +9 -7
- package/src/components/button-group/CButtonToolbar.tsx +1 -3
- package/src/components/calendar/utils.ts +7 -9
- package/src/components/callout/CCallout.tsx +11 -9
- package/src/components/card/CCard.tsx +12 -10
- package/src/components/card/CCardBody.tsx +1 -3
- package/src/components/card/CCardFooter.tsx +1 -3
- package/src/components/card/CCardGroup.tsx +1 -3
- package/src/components/card/CCardHeader.tsx +1 -3
- package/src/components/card/CCardImage.tsx +5 -3
- package/src/components/card/CCardImageOverlay.tsx +1 -3
- package/src/components/card/CCardLink.tsx +1 -3
- package/src/components/card/CCardSubtitle.tsx +1 -3
- package/src/components/card/CCardText.tsx +1 -3
- package/src/components/card/CCardTitle.tsx +1 -3
- package/src/components/carousel/CCarousel.tsx +8 -8
- package/src/components/carousel/CCarouselCaption.tsx +1 -3
- package/src/components/carousel/CCarouselItem.tsx +11 -9
- package/src/components/close-button/CCloseButton.tsx +9 -10
- package/src/components/collapse/CCollapse.tsx +8 -20
- package/src/components/collapse/__tests__/CCollapse.spec.tsx +2 -3
- package/src/components/conditional-portal/CConditionalPortal.tsx +29 -0
- package/src/components/conditional-portal/index.ts +3 -0
- package/src/components/date-range-picker/CDateRangePicker.tsx +19 -11
- package/src/components/date-range-picker/utils.ts +2 -2
- package/src/components/dropdown/CDropdown.tsx +35 -30
- package/src/components/dropdown/CDropdownDivider.tsx +1 -3
- package/src/components/dropdown/CDropdownHeader.tsx +1 -3
- package/src/components/dropdown/CDropdownItem.tsx +6 -3
- package/src/components/dropdown/CDropdownItemPlain.tsx +1 -3
- package/src/components/dropdown/CDropdownMenu.tsx +27 -31
- package/src/components/dropdown/CDropdownToggle.tsx +29 -23
- package/src/components/dropdown/__tests__/CDropdown.spec.tsx +2 -4
- package/src/components/dropdown/__tests__/__snapshots__/CDropdown.spec.tsx.snap +1 -1
- package/src/components/footer/CFooter.tsx +5 -3
- package/src/components/form/CForm.tsx +5 -2
- package/src/components/form/CFormCheck.tsx +87 -63
- package/src/components/form/CFormControlWrapper.tsx +3 -3
- package/src/components/form/CFormFeedback.tsx +11 -8
- package/src/components/form/CFormFloating.tsx +1 -2
- package/src/components/form/CFormInput.tsx +10 -12
- package/src/components/form/CFormLabel.tsx +1 -2
- package/src/components/form/CFormRange.tsx +1 -2
- package/src/components/form/CFormSelect.tsx +15 -10
- package/src/components/form/CFormSwitch.tsx +31 -20
- package/src/components/form/CFormText.tsx +1 -2
- package/src/components/form/CFormTextarea.tsx +13 -9
- package/src/components/form/CInputGroup.tsx +11 -8
- package/src/components/form/CInputGroupText.tsx +1 -2
- package/src/components/form/__tests__/CFormRange.spec.tsx +1 -1
- package/src/components/form/__tests__/__snapshots__/CForm.spec.tsx.snap +2 -6
- package/src/components/form/__tests__/__snapshots__/CFormRange.spec.tsx.snap +2 -2
- package/src/components/grid/CCol.tsx +8 -6
- package/src/components/grid/CContainer.tsx +8 -6
- package/src/components/grid/CRow.tsx +4 -3
- package/src/components/header/CHeader.tsx +12 -13
- package/src/components/header/CHeaderBrand.tsx +1 -3
- package/src/components/header/CHeaderBrand.tsx~HEAD +1 -3
- package/src/components/header/CHeaderDivider.tsx +1 -3
- package/src/components/header/CHeaderNav.tsx +6 -3
- package/src/components/header/CHeaderText.tsx +1 -3
- package/src/components/header/CHeaderToggler.tsx +2 -4
- package/src/components/image/CImage.tsx +17 -10
- package/src/components/image/__tests__/__snapshots__/CImage.spec.tsx.snap +1 -3
- package/src/components/index.ts +1 -0
- package/src/components/link/CLink.tsx +2 -4
- package/src/components/list-group/CListGroup.tsx +11 -10
- package/src/components/list-group/CListGroupItem.tsx +13 -12
- package/src/components/loading-button/CLoadingButton.tsx +1 -3
- package/src/components/modal/CModal.tsx +55 -70
- package/src/components/modal/CModalBody.tsx +1 -3
- package/src/components/modal/CModalContent.tsx +1 -3
- package/src/components/modal/CModalDialog.tsx +16 -14
- package/src/components/modal/CModalFooter.tsx +1 -3
- package/src/components/modal/CModalHeader.tsx +1 -2
- package/src/components/modal/CModalTitle.tsx +1 -3
- package/src/components/modal/__tests__/CModal.spec.tsx +19 -20
- package/src/components/multi-select/CMultiSelect.tsx +19 -19
- package/src/components/multi-select/utils.ts +3 -3
- package/src/components/nav/CNav.tsx +13 -10
- package/src/components/nav/CNavGroup.tsx +1 -3
- package/src/components/nav/CNavGroupItems.tsx +1 -2
- package/src/components/nav/CNavItem.tsx +8 -10
- package/src/components/nav/CNavLink.tsx +1 -2
- package/src/components/nav/CNavTitle.tsx +1 -2
- package/src/components/navbar/CNavbar.tsx +21 -22
- package/src/components/navbar/CNavbarBrand.tsx +2 -3
- package/src/components/navbar/CNavbarNav.tsx +6 -3
- package/src/components/navbar/CNavbarText.tsx +1 -3
- package/src/components/navbar/CNavbarToggler.tsx +2 -4
- package/src/components/offcanvas/COffcanvas.tsx +39 -66
- package/src/components/offcanvas/COffcanvasBody.tsx +1 -3
- package/src/components/offcanvas/COffcanvasHeader.tsx +1 -3
- package/src/components/offcanvas/COffcanvasTitle.tsx +1 -3
- package/src/components/offcanvas/__tests__/COffcanvas.spec.tsx +7 -2
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvas.spec.tsx.snap +9 -4
- package/src/components/pagination/CPagination.tsx +12 -9
- package/src/components/pagination/CPaginationItem.tsx +12 -11
- package/src/components/pagination/__tests__/CPagination.spec.tsx +3 -3
- package/src/components/pagination/__tests__/CPaginationItem.spec.tsx +3 -3
- package/src/components/picker/CPicker.tsx +6 -6
- package/src/components/placeholder/CPlaceholder.tsx +13 -11
- package/src/components/popover/CPopover.tsx +22 -33
- package/src/components/progress/CProgress.tsx +12 -10
- package/src/components/progress/CProgressBar.tsx +9 -11
- package/src/components/sidebar/CSidebar.tsx +20 -18
- package/src/components/sidebar/CSidebarBrand.tsx +1 -2
- package/src/components/sidebar/CSidebarFooter.tsx +1 -2
- package/src/components/sidebar/CSidebarHeader.tsx +1 -2
- package/src/components/sidebar/CSidebarNav.tsx +2 -2
- package/src/components/sidebar/CSidebarToggler.tsx +1 -2
- package/src/components/smart-pagination/CSmartPagination.tsx +22 -20
- package/src/components/smart-table/CSmartTable.tsx +4 -8
- package/src/components/smart-table/utils.ts +3 -4
- package/src/components/spinner/CSpinner.tsx +11 -8
- package/src/components/table/CTable.tsx +20 -18
- package/src/components/table/CTableBody.tsx +12 -8
- package/src/components/table/CTableDataCell.tsx +14 -10
- package/src/components/table/CTableFoot.tsx +12 -8
- package/src/components/table/CTableHead.tsx +12 -8
- package/src/components/table/CTableHeaderCell.tsx +12 -8
- package/src/components/table/CTableResponsiveWrapper.tsx +2 -3
- package/src/components/table/CTableRow.tsx +14 -10
- package/src/components/table/__tests__/__snapshots__/CTable.spec.tsx.snap +1 -5
- package/src/components/table/utils.ts +2 -7
- package/src/components/tabs/CTabContent.tsx +1 -2
- package/src/components/tabs/CTabPane.tsx +17 -20
- package/src/components/tabs/__tests__/CTabPane.spec.tsx +2 -5
- package/src/components/tabs/__tests__/__snapshots__/CTabPane.spec.tsx.snap +1 -1
- package/src/components/time-picker/CTimePicker.tsx +21 -14
- package/src/components/toast/CToast.tsx +29 -42
- package/src/components/toast/CToastBody.tsx +1 -2
- package/src/components/toast/CToastClose.tsx +3 -1
- package/src/components/toast/CToastHeader.tsx +1 -2
- package/src/components/toast/CToaster.tsx +26 -26
- package/src/components/toast/__tests__/CToast.spec.tsx +2 -1
- package/src/components/toast/__tests__/__snapshots__/CToast.spec.tsx.snap +1 -66
- package/src/components/tooltip/CTooltip.tsx +21 -32
- package/src/components/virtual-scroller/CVirtualScroller.tsx +4 -6
- package/src/components/widgets/CWidgetStatsA.tsx +8 -6
- package/src/components/widgets/CWidgetStatsD.tsx +9 -10
- package/src/components/widgets/CWidgetStatsE.tsx +1 -3
- package/src/components/widgets/CWidgetStatsF.tsx +1 -4
- package/dist/components/Types.d.ts +0 -14
- package/dist/components/multi-select/CMultiSelectCleaner.d.ts +0 -2
- package/dist/components/multi-select/CMultiSelectSearchInput.d.ts +0 -5
- package/dist/components/pagination/CSmartPagination.d.ts +0 -80
- package/dist/components/time-picker/CTimePicker copy.d.ts +0 -46
- package/dist/utils/calendar.d.ts +0 -23
- package/dist/utils/getNextSibling.d.ts +0 -2
- package/dist/utils/getPreviousSibling.d.ts +0 -2
- package/dist/utils/hooks/index.d.ts +0 -3
- package/dist/utils/hooks/useForkedRef.d.ts +0 -7
- package/dist/utils/hooks/useStateWithCallback.d.ts +0 -2
- package/dist/utils/isVisible.d.ts +0 -2
- package/dist/utils/time.d.ts +0 -21
package/dist/index.js
CHANGED
|
@@ -1330,10 +1330,9 @@ var classNames$1 = classnamesExports;
|
|
|
1330
1330
|
|
|
1331
1331
|
var CAccordionContext = React$1.createContext({});
|
|
1332
1332
|
var CAccordion = React$1.forwardRef(function (_a, ref) {
|
|
1333
|
-
var children = _a.children,
|
|
1334
|
-
var
|
|
1335
|
-
|
|
1336
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
1333
|
+
var children = _a.children, activeItemKey = _a.activeItemKey, _b = _a.alwaysOpen, alwaysOpen = _b === void 0 ? false : _b, className = _a.className, flush = _a.flush, rest = __rest$1(_a, ["children", "activeItemKey", "alwaysOpen", "className", "flush"]);
|
|
1334
|
+
var _c = React$1.useState(activeItemKey), _activeItemKey = _c[0], setActiveKey = _c[1];
|
|
1335
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('accordion', { 'accordion-flush': flush }, className) }, rest, { ref: ref }),
|
|
1337
1336
|
React$1.createElement(CAccordionContext.Provider, { value: { _activeItemKey: _activeItemKey, alwaysOpen: alwaysOpen, setActiveKey: setActiveKey } }, children)));
|
|
1338
1337
|
});
|
|
1339
1338
|
CAccordion.propTypes = {
|
|
@@ -1348,7 +1347,7 @@ CAccordion.displayName = 'CAccordion';
|
|
|
1348
1347
|
var CAccordionItemContext = React$1.createContext({});
|
|
1349
1348
|
var CAccordionItem = React$1.forwardRef(function (_a, ref) {
|
|
1350
1349
|
var children = _a.children, className = _a.className, itemKey = _a.itemKey, rest = __rest$1(_a, ["children", "className", "itemKey"]);
|
|
1351
|
-
var _itemKey = React$1.useRef(itemKey ? itemKey : Math.random().toString(36).
|
|
1350
|
+
var _itemKey = React$1.useRef(itemKey !== null && itemKey !== void 0 ? itemKey : Math.random().toString(36).slice(2, 11));
|
|
1352
1351
|
var _b = React$1.useContext(CAccordionContext), _activeItemKey = _b._activeItemKey, alwaysOpen = _b.alwaysOpen, setActiveKey = _b.setActiveKey;
|
|
1353
1352
|
var _c = React$1.useState(Boolean(_activeItemKey === _itemKey.current)), visible = _c[0], setVisible = _c[1];
|
|
1354
1353
|
React$1.useEffect(function () {
|
|
@@ -1357,8 +1356,7 @@ var CAccordionItem = React$1.forwardRef(function (_a, ref) {
|
|
|
1357
1356
|
React$1.useEffect(function () {
|
|
1358
1357
|
setVisible(Boolean(_activeItemKey === _itemKey.current));
|
|
1359
1358
|
}, [_activeItemKey]);
|
|
1360
|
-
|
|
1361
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
1359
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('accordion-item', className) }, rest, { ref: ref }),
|
|
1362
1360
|
React$1.createElement(CAccordionItemContext.Provider, { value: { setVisible: setVisible, visible: visible } }, children)));
|
|
1363
1361
|
});
|
|
1364
1362
|
CAccordionItem.propTypes = {
|
|
@@ -2553,19 +2551,10 @@ var useStateWithCallback = function (initialState, handler, runHandler) {
|
|
|
2553
2551
|
|
|
2554
2552
|
var CCollapse = React$1.forwardRef(function (_a, ref) {
|
|
2555
2553
|
var children = _a.children, className = _a.className, horizontal = _a.horizontal, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest$1(_a, ["children", "className", "horizontal", "onHide", "onShow", "visible"]);
|
|
2556
|
-
var _b = React$1.useState(), height = _b[0], setHeight = _b[1];
|
|
2557
|
-
var _c = React$1.useState(), width = _c[0], setWidth = _c[1];
|
|
2558
2554
|
var collapseRef = React$1.useRef(null);
|
|
2559
2555
|
var forkedRef = useForkedRef(ref, collapseRef);
|
|
2560
|
-
var
|
|
2561
|
-
|
|
2562
|
-
? 'collapsing'
|
|
2563
|
-
: state === 'entered'
|
|
2564
|
-
? 'collapse show'
|
|
2565
|
-
: state === 'exiting'
|
|
2566
|
-
? 'collapsing'
|
|
2567
|
-
: 'collapse';
|
|
2568
|
-
};
|
|
2556
|
+
var _b = React$1.useState(), height = _b[0], setHeight = _b[1];
|
|
2557
|
+
var _c = React$1.useState(), width = _c[0], setWidth = _c[1];
|
|
2569
2558
|
var onEntering = function () {
|
|
2570
2559
|
onShow && onShow();
|
|
2571
2560
|
if (horizontal) {
|
|
@@ -2603,14 +2592,15 @@ var CCollapse = React$1.forwardRef(function (_a, ref) {
|
|
|
2603
2592
|
}
|
|
2604
2593
|
setHeight(0);
|
|
2605
2594
|
};
|
|
2606
|
-
var _className = classNames$1({
|
|
2607
|
-
'collapse-horizontal': horizontal,
|
|
2608
|
-
}, className);
|
|
2609
2595
|
return (React$1.createElement(CSSTransition$1, { in: visible, nodeRef: collapseRef, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 350 }, function (state) {
|
|
2610
|
-
var transitionClass = getTransitionClass(state);
|
|
2611
2596
|
var currentHeight = height === 0 ? null : { height: height };
|
|
2612
2597
|
var currentWidth = width === 0 ? null : { width: width };
|
|
2613
|
-
return (React$1.createElement("div", __assign$1({ className: classNames$1(
|
|
2598
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1(className, {
|
|
2599
|
+
'collapse-horizontal': horizontal,
|
|
2600
|
+
collapsing: state === 'entering' || state === 'exiting',
|
|
2601
|
+
'collapse show': state === 'entered',
|
|
2602
|
+
collapse: state === 'exited',
|
|
2603
|
+
}), style: __assign$1(__assign$1({}, currentHeight), currentWidth) }, rest, { ref: forkedRef }), children));
|
|
2614
2604
|
}));
|
|
2615
2605
|
});
|
|
2616
2606
|
CCollapse.propTypes = {
|
|
@@ -2626,9 +2616,8 @@ CCollapse.displayName = 'CCollapse';
|
|
|
2626
2616
|
var CAccordionBody = React$1.forwardRef(function (_a, ref) {
|
|
2627
2617
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2628
2618
|
var visible = React$1.useContext(CAccordionItemContext).visible;
|
|
2629
|
-
var _className = classNames$1('accordion-body', className);
|
|
2630
2619
|
return (React$1.createElement(CCollapse, { className: "accordion-collapse", visible: visible },
|
|
2631
|
-
React$1.createElement("div", __assign$1({ className:
|
|
2620
|
+
React$1.createElement("div", __assign$1({ className: classNames$1('accordion-body', className) }, rest, { ref: ref }), children)));
|
|
2632
2621
|
});
|
|
2633
2622
|
CAccordionBody.propTypes = {
|
|
2634
2623
|
children: propTypesExports.node,
|
|
@@ -2639,8 +2628,7 @@ CAccordionBody.displayName = 'CAccordionBody';
|
|
|
2639
2628
|
var CAccordionButton = React$1.forwardRef(function (_a, ref) {
|
|
2640
2629
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2641
2630
|
var _b = React$1.useContext(CAccordionItemContext), visible = _b.visible, setVisible = _b.setVisible;
|
|
2642
|
-
|
|
2643
|
-
return (React$1.createElement("button", __assign$1({ type: "button", className: _className, "aria-expanded": !visible, onClick: function () { return setVisible(!visible); } }, rest, { ref: ref }), children));
|
|
2631
|
+
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('accordion-button', { collapsed: !visible }, className), "aria-expanded": !visible, onClick: function () { return setVisible(!visible); } }, rest, { ref: ref }), children));
|
|
2644
2632
|
});
|
|
2645
2633
|
CAccordionButton.propTypes = {
|
|
2646
2634
|
children: propTypesExports.node,
|
|
@@ -2659,8 +2647,7 @@ CAccordionCollapse.displayName = 'CAccordionCollapse';
|
|
|
2659
2647
|
|
|
2660
2648
|
var CAccordionHeader = React$1.forwardRef(function (_a, ref) {
|
|
2661
2649
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2662
|
-
|
|
2663
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
2650
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('accordion-header', className) }, rest, { ref: ref }),
|
|
2664
2651
|
React$1.createElement(CAccordionButton, null, children)));
|
|
2665
2652
|
});
|
|
2666
2653
|
CAccordionHeader.propTypes = {
|
|
@@ -2671,10 +2658,9 @@ CAccordionHeader.displayName = 'CAccordionHeader';
|
|
|
2671
2658
|
|
|
2672
2659
|
var CCloseButton = React$1.forwardRef(function (_a, ref) {
|
|
2673
2660
|
var className = _a.className, disabled = _a.disabled, white = _a.white, rest = __rest$1(_a, ["className", "disabled", "white"]);
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
return (React$1.createElement("button", __assign$1({ type: "button", className: _className, "aria-label": "Close", disabled: disabled }, rest, { ref: ref })));
|
|
2661
|
+
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('btn', 'btn-close', {
|
|
2662
|
+
'btn-close-white': white,
|
|
2663
|
+
}, disabled, className), "aria-label": "Close", disabled: disabled }, rest, { ref: ref })));
|
|
2678
2664
|
});
|
|
2679
2665
|
CCloseButton.propTypes = {
|
|
2680
2666
|
className: propTypesExports.string,
|
|
@@ -2754,18 +2740,12 @@ var CAlert = React$1.forwardRef(function (_a, ref) {
|
|
|
2754
2740
|
React$1.useEffect(function () {
|
|
2755
2741
|
setVisible(visible);
|
|
2756
2742
|
}, [visible]);
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
return (React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: alertRef, onExit: onClose, timeout: 150, unmountOnExit: true }, function (state) {
|
|
2764
|
-
var transitionClass = getTransitionClass(state);
|
|
2765
|
-
return (React$1.createElement("div", __assign$1({ className: classNames$1(_className, transitionClass), role: "alert" }, rest, { ref: forkedRef }),
|
|
2766
|
-
children,
|
|
2767
|
-
dismissible && React$1.createElement(CCloseButton, { onClick: function () { return setVisible(false); } })));
|
|
2768
|
-
}));
|
|
2743
|
+
return (React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: alertRef, onExit: onClose, timeout: 150, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('alert', variant === 'solid' ? "bg-".concat(color, " text-white") : "alert-".concat(color), {
|
|
2744
|
+
'alert-dismissible fade': dismissible,
|
|
2745
|
+
show: state === 'entered',
|
|
2746
|
+
}, className), role: "alert" }, rest, { ref: forkedRef }),
|
|
2747
|
+
children,
|
|
2748
|
+
dismissible && React$1.createElement(CCloseButton, { onClick: function () { return setVisible(false); } }))); }));
|
|
2769
2749
|
});
|
|
2770
2750
|
CAlert.propTypes = {
|
|
2771
2751
|
children: propTypesExports.node,
|
|
@@ -2780,8 +2760,7 @@ CAlert.displayName = 'CAlert';
|
|
|
2780
2760
|
|
|
2781
2761
|
var CAlertHeading = React$1.forwardRef(function (_a, ref) {
|
|
2782
2762
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'h4' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
2783
|
-
|
|
2784
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2763
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('alert-heading', className) }, rest, { ref: ref }), children));
|
|
2785
2764
|
});
|
|
2786
2765
|
CAlertHeading.propTypes = {
|
|
2787
2766
|
children: propTypesExports.node,
|
|
@@ -2792,9 +2771,11 @@ CAlertHeading.displayName = 'CAlertHeading';
|
|
|
2792
2771
|
|
|
2793
2772
|
var CLink = React$1.forwardRef(function (_a, ref) {
|
|
2794
2773
|
var children = _a.children, active = _a.active, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'a' : _b, disabled = _a.disabled, rest = __rest$1(_a, ["children", "active", "className", "component", "disabled"]);
|
|
2774
|
+
return (React$1.createElement(Component
|
|
2795
2775
|
// TODO: remove duplicated classes ex. `active active` in `<CListGroupItem>`
|
|
2796
|
-
|
|
2797
|
-
|
|
2776
|
+
, __assign$1({
|
|
2777
|
+
// TODO: remove duplicated classes ex. `active active` in `<CListGroupItem>`
|
|
2778
|
+
className: classNames$1(className, { active: active, disabled: disabled }) }, (active && { 'aria-current': 'page' }), (Component === 'a' && disabled && { 'aria-disabled': true, tabIndex: -1 }), ((Component === 'a' || Component === 'button') && {
|
|
2798
2779
|
onClick: function (event) {
|
|
2799
2780
|
event.preventDefault;
|
|
2800
2781
|
!disabled && rest.onClick && rest.onClick(event);
|
|
@@ -2812,8 +2793,7 @@ CLink.displayName = 'CLink';
|
|
|
2812
2793
|
|
|
2813
2794
|
var CAlertLink = React$1.forwardRef(function (_a, ref) {
|
|
2814
2795
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2815
|
-
|
|
2816
|
-
return (React$1.createElement(CLink, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2796
|
+
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('alert-link', className) }, rest, { ref: ref }), children));
|
|
2817
2797
|
});
|
|
2818
2798
|
CAlertLink.propTypes = {
|
|
2819
2799
|
children: propTypesExports.node,
|
|
@@ -2824,13 +2804,12 @@ CAlertLink.displayName = 'CAlertLink';
|
|
|
2824
2804
|
var CAvatar = React$1.forwardRef(function (_a, ref) {
|
|
2825
2805
|
var _b;
|
|
2826
2806
|
var children = _a.children, className = _a.className, color = _a.color, shape = _a.shape, size = _a.size, src = _a.src, status = _a.status, textColor = _a.textColor, rest = __rest$1(_a, ["children", "className", "color", "shape", "size", "src", "status", "textColor"]);
|
|
2827
|
-
var _className = classNames$1('avatar', (_b = {},
|
|
2828
|
-
_b["bg-".concat(color)] = color,
|
|
2829
|
-
_b["avatar-".concat(size)] = size,
|
|
2830
|
-
_b["text-".concat(textColor)] = textColor,
|
|
2831
|
-
_b), shape, className);
|
|
2832
2807
|
var statusClassName = status && classNames$1('avatar-status', "bg-".concat(status));
|
|
2833
|
-
return (React$1.createElement("div", __assign$1({ className:
|
|
2808
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('avatar', (_b = {},
|
|
2809
|
+
_b["bg-".concat(color)] = color,
|
|
2810
|
+
_b["avatar-".concat(size)] = size,
|
|
2811
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2812
|
+
_b), shape, className) }, rest, { ref: ref }),
|
|
2834
2813
|
src ? React$1.createElement("img", { src: src, className: "avatar-img" }) : children,
|
|
2835
2814
|
status && React$1.createElement("span", { className: statusClassName })));
|
|
2836
2815
|
});
|
|
@@ -2850,14 +2829,9 @@ var CBackdrop = React$1.forwardRef(function (_a, ref) {
|
|
|
2850
2829
|
var _b = _a.className, className = _b === void 0 ? 'modal-backdrop' : _b, visible = _a.visible, rest = __rest$1(_a, ["className", "visible"]);
|
|
2851
2830
|
var backdropRef = React$1.useRef(null);
|
|
2852
2831
|
var forkedRef = useForkedRef(ref, backdropRef);
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
};
|
|
2857
|
-
return (React$1.createElement(Transition$1, { in: visible, mountOnEnter: true, nodeRef: backdropRef, timeout: 150, unmountOnExit: true }, function (state) {
|
|
2858
|
-
var transitionClass = getTransitionClass(state);
|
|
2859
|
-
return (React$1.createElement("div", __assign$1({ className: classNames$1(_className, transitionClass) }, rest, { ref: forkedRef })));
|
|
2860
|
-
}));
|
|
2832
|
+
return (React$1.createElement(Transition$1, { in: visible, mountOnEnter: true, nodeRef: backdropRef, timeout: 150, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1(className, 'fade', {
|
|
2833
|
+
show: state === 'entered',
|
|
2834
|
+
}) }, rest, { ref: forkedRef }))); }));
|
|
2861
2835
|
});
|
|
2862
2836
|
CBackdrop.propTypes = {
|
|
2863
2837
|
className: propTypesExports.string,
|
|
@@ -2868,17 +2842,16 @@ CBackdrop.displayName = 'CBackdrop';
|
|
|
2868
2842
|
var CBadge = React$1.forwardRef(function (_a, ref) {
|
|
2869
2843
|
var _b;
|
|
2870
2844
|
var children = _a.children, className = _a.className, color = _a.color, _c = _a.component, Component = _c === void 0 ? 'span' : _c, position = _a.position, shape = _a.shape, size = _a.size, textColor = _a.textColor, rest = __rest$1(_a, ["children", "className", "color", "component", "position", "shape", "size", "textColor"]);
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2845
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('badge', (_b = {},
|
|
2846
|
+
_b["bg-".concat(color)] = color,
|
|
2847
|
+
_b['position-absolute translate-middle'] = position,
|
|
2848
|
+
_b['top-0'] = position === null || position === void 0 ? void 0 : position.includes('top'),
|
|
2849
|
+
_b['top-100'] = position === null || position === void 0 ? void 0 : position.includes('bottom'),
|
|
2850
|
+
_b['start-100'] = position === null || position === void 0 ? void 0 : position.includes('end'),
|
|
2851
|
+
_b['start-0'] = position === null || position === void 0 ? void 0 : position.includes('start'),
|
|
2852
|
+
_b["badge-".concat(size)] = size,
|
|
2853
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2854
|
+
_b), shape, className) }, rest, { ref: ref }), children));
|
|
2882
2855
|
});
|
|
2883
2856
|
CBadge.propTypes = {
|
|
2884
2857
|
children: propTypesExports.node,
|
|
@@ -2894,9 +2867,8 @@ CBadge.displayName = 'CBadge';
|
|
|
2894
2867
|
|
|
2895
2868
|
var CBreadcrumb = React$1.forwardRef(function (_a, ref) {
|
|
2896
2869
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2897
|
-
var _className = classNames$1('breadcrumb', className);
|
|
2898
2870
|
return (React$1.createElement("nav", { "aria-label": "breadcrumb" },
|
|
2899
|
-
React$1.createElement("ol", __assign$1({ className:
|
|
2871
|
+
React$1.createElement("ol", __assign$1({ className: classNames$1('breadcrumb', className) }, rest, { ref: ref }), children)));
|
|
2900
2872
|
});
|
|
2901
2873
|
CBreadcrumb.propTypes = {
|
|
2902
2874
|
children: propTypesExports.node,
|
|
@@ -2906,10 +2878,9 @@ CBreadcrumb.displayName = 'CBreadcrumb';
|
|
|
2906
2878
|
|
|
2907
2879
|
var CBreadcrumbItem = React$1.forwardRef(function (_a, ref) {
|
|
2908
2880
|
var children = _a.children, active = _a.active, className = _a.className, href = _a.href, rest = __rest$1(_a, ["children", "active", "className", "href"]);
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
return (React$1.createElement("li", __assign$1({ className: _className }, (active && { 'aria-current': 'page' }), rest, { ref: ref }), href ? React$1.createElement(CLink, { href: href }, children) : children));
|
|
2881
|
+
return (React$1.createElement("li", __assign$1({ className: classNames$1('breadcrumb-item', {
|
|
2882
|
+
active: active,
|
|
2883
|
+
}, className) }, (active && { 'aria-current': 'page' }), rest, { ref: ref }), href ? React$1.createElement(CLink, { href: href }, children) : children));
|
|
2913
2884
|
});
|
|
2914
2885
|
CBreadcrumbItem.propTypes = {
|
|
2915
2886
|
active: propTypesExports.bool,
|
|
@@ -2922,8 +2893,7 @@ CBreadcrumbItem.displayName = 'CBreadcrumbItem';
|
|
|
2922
2893
|
var CButton = React$1.forwardRef(function (_a, ref) {
|
|
2923
2894
|
var _b;
|
|
2924
2895
|
var children = _a.children, className = _a.className, _c = _a.color, color = _c === void 0 ? 'primary' : _c, _d = _a.component, component = _d === void 0 ? 'button' : _d, shape = _a.shape, size = _a.size, _e = _a.type, type = _e === void 0 ? 'button' : _e, variant = _a.variant, rest = __rest$1(_a, ["children", "className", "color", "component", "shape", "size", "type", "variant"]);
|
|
2925
|
-
|
|
2926
|
-
return (React$1.createElement(CLink, __assign$1({ component: rest.href ? 'a' : component, type: type, className: _className }, rest, { ref: ref }), children));
|
|
2896
|
+
return (React$1.createElement(CLink, __assign$1({ component: rest.href ? 'a' : component, type: type, className: classNames$1('btn', variant ? "btn-".concat(variant, "-").concat(color) : "btn-".concat(color), (_b = {}, _b["btn-".concat(size)] = size, _b), shape, className) }, rest, { ref: ref }), children));
|
|
2927
2897
|
});
|
|
2928
2898
|
CButton.propTypes = {
|
|
2929
2899
|
children: propTypesExports.node,
|
|
@@ -2939,8 +2909,7 @@ CButton.displayName = 'CButton';
|
|
|
2939
2909
|
|
|
2940
2910
|
var CButtonToolbar = React$1.forwardRef(function (_a, ref) {
|
|
2941
2911
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2942
|
-
|
|
2943
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2912
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('btn-toolbar', className) }, rest, { ref: ref }), children));
|
|
2944
2913
|
});
|
|
2945
2914
|
CButtonToolbar.propTypes = {
|
|
2946
2915
|
children: propTypesExports.node,
|
|
@@ -2951,8 +2920,7 @@ CButtonToolbar.displayName = 'CButtonToolbar';
|
|
|
2951
2920
|
var CButtonGroup = React$1.forwardRef(function (_a, ref) {
|
|
2952
2921
|
var _b;
|
|
2953
2922
|
var children = _a.children, className = _a.className, size = _a.size, vertical = _a.vertical, rest = __rest$1(_a, ["children", "className", "size", "vertical"]);
|
|
2954
|
-
|
|
2955
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2923
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-".concat(size)] = size, _b), className) }, rest, { ref: ref }), children));
|
|
2956
2924
|
});
|
|
2957
2925
|
CButtonGroup.propTypes = {
|
|
2958
2926
|
children: propTypesExports.node,
|
|
@@ -2965,10 +2933,9 @@ CButtonGroup.displayName = 'CButtonGroup';
|
|
|
2965
2933
|
var CCallout = React$1.forwardRef(function (_a, ref) {
|
|
2966
2934
|
var _b;
|
|
2967
2935
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2936
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('callout', (_b = {},
|
|
2937
|
+
_b["callout-".concat(color)] = color,
|
|
2938
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
2972
2939
|
});
|
|
2973
2940
|
CCallout.propTypes = {
|
|
2974
2941
|
children: propTypesExports.node,
|
|
@@ -2980,11 +2947,10 @@ CCallout.displayName = 'CCallout';
|
|
|
2980
2947
|
var CCard = React$1.forwardRef(function (_a, ref) {
|
|
2981
2948
|
var _b;
|
|
2982
2949
|
var children = _a.children, className = _a.className, color = _a.color, textColor = _a.textColor, rest = __rest$1(_a, ["children", "className", "color", "textColor"]);
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2950
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('card', (_b = {},
|
|
2951
|
+
_b["bg-".concat(color)] = color,
|
|
2952
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2953
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
2988
2954
|
});
|
|
2989
2955
|
CCard.propTypes = {
|
|
2990
2956
|
children: propTypesExports.node,
|
|
@@ -2996,8 +2962,7 @@ CCard.displayName = 'CCard';
|
|
|
2996
2962
|
|
|
2997
2963
|
var CCardBody = React$1.forwardRef(function (_a, ref) {
|
|
2998
2964
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2999
|
-
|
|
3000
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2965
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-body', className) }, rest, { ref: ref }), children));
|
|
3001
2966
|
});
|
|
3002
2967
|
CCardBody.propTypes = {
|
|
3003
2968
|
children: propTypesExports.node,
|
|
@@ -3007,8 +2972,7 @@ CCardBody.displayName = 'CCardBody';
|
|
|
3007
2972
|
|
|
3008
2973
|
var CCardFooter = React$1.forwardRef(function (_a, ref) {
|
|
3009
2974
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
3010
|
-
|
|
3011
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2975
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-footer', className) }, rest, { ref: ref }), children));
|
|
3012
2976
|
});
|
|
3013
2977
|
CCardFooter.propTypes = {
|
|
3014
2978
|
children: propTypesExports.node,
|
|
@@ -3018,8 +2982,7 @@ CCardFooter.displayName = 'CCardFooter';
|
|
|
3018
2982
|
|
|
3019
2983
|
var CCardGroup = React$1.forwardRef(function (_a, ref) {
|
|
3020
2984
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
3021
|
-
|
|
3022
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2985
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-group', className) }, rest, { ref: ref }), children));
|
|
3023
2986
|
});
|
|
3024
2987
|
CCardGroup.propTypes = {
|
|
3025
2988
|
children: propTypesExports.node,
|
|
@@ -3029,8 +2992,7 @@ CCardGroup.displayName = 'CCardGroup';
|
|
|
3029
2992
|
|
|
3030
2993
|
var CCardHeader = React$1.forwardRef(function (_a, ref) {
|
|
3031
2994
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'div' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
3032
|
-
|
|
3033
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2995
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-header', className) }, rest, { ref: ref }), children));
|
|
3034
2996
|
});
|
|
3035
2997
|
CCardHeader.propTypes = {
|
|
3036
2998
|
children: propTypesExports.node,
|
|
@@ -3041,8 +3003,7 @@ CCardHeader.displayName = 'CCardHeader';
|
|
|
3041
3003
|
|
|
3042
3004
|
var CCardImage = React$1.forwardRef(function (_a, ref) {
|
|
3043
3005
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'img' : _b, orientation = _a.orientation, rest = __rest$1(_a, ["children", "className", "component", "orientation"]);
|
|
3044
|
-
|
|
3045
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3006
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1(orientation ? "card-img-".concat(orientation) : 'card-img', className) }, rest, { ref: ref }), children));
|
|
3046
3007
|
});
|
|
3047
3008
|
CCardImage.propTypes = {
|
|
3048
3009
|
children: propTypesExports.node,
|
|
@@ -3054,8 +3015,7 @@ CCardImage.displayName = 'CCardImage';
|
|
|
3054
3015
|
|
|
3055
3016
|
var CCardImageOverlay = React$1.forwardRef(function (_a, ref) {
|
|
3056
3017
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
3057
|
-
|
|
3058
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3018
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-img-overlay', className) }, rest, { ref: ref }), children));
|
|
3059
3019
|
});
|
|
3060
3020
|
CCardImageOverlay.propTypes = {
|
|
3061
3021
|
children: propTypesExports.node,
|
|
@@ -3065,8 +3025,7 @@ CCardImageOverlay.displayName = 'CCardImageOverlay';
|
|
|
3065
3025
|
|
|
3066
3026
|
var CCardLink = React$1.forwardRef(function (_a, ref) {
|
|
3067
3027
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
3068
|
-
|
|
3069
|
-
return (React$1.createElement(CLink, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3028
|
+
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('card-link', className) }, rest, { ref: ref }), children));
|
|
3070
3029
|
});
|
|
3071
3030
|
CCardLink.propTypes = {
|
|
3072
3031
|
children: propTypesExports.node,
|
|
@@ -3076,8 +3035,7 @@ CCardLink.displayName = 'CCardLink';
|
|
|
3076
3035
|
|
|
3077
3036
|
var CCardSubtitle = React$1.forwardRef(function (_a, ref) {
|
|
3078
3037
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h6' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
3079
|
-
|
|
3080
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3038
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-subtitle', className) }, rest, { ref: ref }), children));
|
|
3081
3039
|
});
|
|
3082
3040
|
CCardSubtitle.propTypes = {
|
|
3083
3041
|
children: propTypesExports.node,
|
|
@@ -3088,8 +3046,7 @@ CCardSubtitle.displayName = 'CCardSubtitle';
|
|
|
3088
3046
|
|
|
3089
3047
|
var CCardText = React$1.forwardRef(function (_a, ref) {
|
|
3090
3048
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'p' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
3091
|
-
|
|
3092
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3049
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-text', className) }, rest, { ref: ref }), children));
|
|
3093
3050
|
});
|
|
3094
3051
|
CCardText.propTypes = {
|
|
3095
3052
|
children: propTypesExports.node,
|
|
@@ -3100,8 +3057,7 @@ CCardText.displayName = 'CCardText';
|
|
|
3100
3057
|
|
|
3101
3058
|
var CCardTitle = React$1.forwardRef(function (_a, ref) {
|
|
3102
3059
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
3103
|
-
|
|
3104
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3060
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-title', className) }, rest, { ref: ref }), children));
|
|
3105
3061
|
});
|
|
3106
3062
|
CCardTitle.propTypes = {
|
|
3107
3063
|
children: propTypesExports.node,
|
|
@@ -3162,7 +3118,6 @@ var CCarousel = React$1.forwardRef(function (_a, ref) {
|
|
|
3162
3118
|
window.removeEventListener('scroll', handleScroll);
|
|
3163
3119
|
};
|
|
3164
3120
|
});
|
|
3165
|
-
var _className = classNames$1('carousel slide', transition === 'crossfade' && 'carousel-fade', dark && 'carousel-dark', className);
|
|
3166
3121
|
var cycle = function () {
|
|
3167
3122
|
_pause();
|
|
3168
3123
|
if (!wrap && active === itemsNumber - 1) {
|
|
@@ -3236,7 +3191,10 @@ var CCarousel = React$1.forwardRef(function (_a, ref) {
|
|
|
3236
3191
|
var touchDown = e.touches[0].clientX;
|
|
3237
3192
|
setTouchPosition(touchDown);
|
|
3238
3193
|
};
|
|
3239
|
-
return (React$1.createElement("div", __assign$1({ className:
|
|
3194
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('carousel slide', {
|
|
3195
|
+
'carousel-dark': dark,
|
|
3196
|
+
'carousel-fade': transition === 'crossfade',
|
|
3197
|
+
}, className), onMouseEnter: _pause, onMouseLeave: cycle }, (touch && { onTouchStart: handleTouchStart, onTouchMove: handleTouchMove }), rest, { ref: forkedRef }),
|
|
3240
3198
|
React$1.createElement(CCarouselContext.Provider, { value: {
|
|
3241
3199
|
setAnimating: setAnimating,
|
|
3242
3200
|
setCustomInterval: setCustomInterval,
|
|
@@ -3281,8 +3239,7 @@ CCarousel.displayName = 'CCarousel';
|
|
|
3281
3239
|
|
|
3282
3240
|
var CCarouselCaption = React$1.forwardRef(function (_a, ref) {
|
|
3283
3241
|
var className = _a.className, rest = __rest$1(_a, ["className"]);
|
|
3284
|
-
|
|
3285
|
-
return React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }));
|
|
3242
|
+
return React$1.createElement("div", __assign$1({ className: classNames$1('carousel-caption', className) }, rest, { ref: ref }));
|
|
3286
3243
|
});
|
|
3287
3244
|
CCarouselCaption.propTypes = {
|
|
3288
3245
|
className: propTypesExports.string,
|
|
@@ -3357,8 +3314,7 @@ var CCarouselItem = React$1.forwardRef(function (_a, ref) {
|
|
|
3357
3314
|
});
|
|
3358
3315
|
};
|
|
3359
3316
|
});
|
|
3360
|
-
|
|
3361
|
-
return (React$1.createElement("div", __assign$1({ className: _className, ref: forkedRef }, rest), children));
|
|
3317
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('carousel-item', activeClassName, directionClassName, orderClassName, className), ref: forkedRef }, rest), children));
|
|
3362
3318
|
});
|
|
3363
3319
|
CCarouselItem.propTypes = {
|
|
3364
3320
|
active: propTypesExports.bool,
|
|
@@ -3369,6 +3325,16 @@ CCarouselItem.propTypes = {
|
|
|
3369
3325
|
};
|
|
3370
3326
|
CCarouselItem.displayName = 'CCarouselItem';
|
|
3371
3327
|
|
|
3328
|
+
var CConditionalPortal = function (_a) {
|
|
3329
|
+
var children = _a.children, portal = _a.portal;
|
|
3330
|
+
return typeof window !== 'undefined' && portal ? (ReactDOM.createPortal(children, document.body)) : (React$1.createElement(React$1.Fragment, null, children));
|
|
3331
|
+
};
|
|
3332
|
+
CConditionalPortal.propTypes = {
|
|
3333
|
+
children: propTypesExports.node,
|
|
3334
|
+
portal: propTypesExports.bool.isRequired,
|
|
3335
|
+
};
|
|
3336
|
+
CConditionalPortal.displayName = 'CConditionalPortal';
|
|
3337
|
+
|
|
3372
3338
|
function toInteger(dirtyNumber) {
|
|
3373
3339
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
3374
3340
|
return NaN;
|
|
@@ -6826,7 +6792,7 @@ lib.withOrientationChange = withOrientationChange;
|
|
|
6826
6792
|
|
|
6827
6793
|
var createGroupsInArray = function (arr, numberOfGroups) {
|
|
6828
6794
|
var perGroup = Math.ceil(arr.length / numberOfGroups);
|
|
6829
|
-
return
|
|
6795
|
+
return Array.from({ length: numberOfGroups })
|
|
6830
6796
|
.fill('')
|
|
6831
6797
|
.map(function (_, i) { return arr.slice(i * perGroup, (i + 1) * perGroup); });
|
|
6832
6798
|
};
|
|
@@ -6922,15 +6888,11 @@ var isDateDisabled = function (date, min, max, dates) {
|
|
|
6922
6888
|
var disabled;
|
|
6923
6889
|
if (dates) {
|
|
6924
6890
|
dates.forEach(function (_date) {
|
|
6925
|
-
if (Array.isArray(_date)) {
|
|
6926
|
-
|
|
6927
|
-
disabled = true;
|
|
6928
|
-
}
|
|
6891
|
+
if (Array.isArray(_date) && isDateInRange(date, _date[0], _date[1])) {
|
|
6892
|
+
disabled = true;
|
|
6929
6893
|
}
|
|
6930
|
-
if (_date instanceof Date) {
|
|
6931
|
-
|
|
6932
|
-
disabled = true;
|
|
6933
|
-
}
|
|
6894
|
+
if (_date instanceof Date && isSameDateAs(date, _date)) {
|
|
6895
|
+
disabled = true;
|
|
6934
6896
|
}
|
|
6935
6897
|
});
|
|
6936
6898
|
}
|
|
@@ -7275,8 +7237,7 @@ CCalendar.displayName = 'CCalendar';
|
|
|
7275
7237
|
|
|
7276
7238
|
var CForm = React$1.forwardRef(function (_a, ref) {
|
|
7277
7239
|
var children = _a.children, className = _a.className, validated = _a.validated, rest = __rest$1(_a, ["children", "className", "validated"]);
|
|
7278
|
-
|
|
7279
|
-
return (React$1.createElement("form", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7240
|
+
return (React$1.createElement("form", __assign$1({ className: classNames$1({ 'was-validated': validated }, className) || undefined }, rest, { ref: ref }), children));
|
|
7280
7241
|
});
|
|
7281
7242
|
CForm.propTypes = {
|
|
7282
7243
|
children: propTypesExports.node,
|
|
@@ -7288,11 +7249,10 @@ CForm.displayName = 'CForm';
|
|
|
7288
7249
|
var CFormFeedback = React$1.forwardRef(function (_a, ref) {
|
|
7289
7250
|
var _b;
|
|
7290
7251
|
var children = _a.children, className = _a.className, _c = _a.component, Component = _c === void 0 ? 'div' : _c, invalid = _a.invalid, tooltip = _a.tooltip, valid = _a.valid, rest = __rest$1(_a, ["children", "className", "component", "invalid", "tooltip", "valid"]);
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7252
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1((_b = {},
|
|
7253
|
+
_b["invalid-".concat(tooltip ? 'tooltip' : 'feedback')] = invalid,
|
|
7254
|
+
_b["valid-".concat(tooltip ? 'tooltip' : 'feedback')] = valid,
|
|
7255
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
7296
7256
|
});
|
|
7297
7257
|
CFormFeedback.propTypes = {
|
|
7298
7258
|
children: propTypesExports.node,
|
|
@@ -7324,8 +7284,7 @@ CFormControlValidation.displayName = 'CFormControlValidation';
|
|
|
7324
7284
|
|
|
7325
7285
|
var CFormLabel = React$1.forwardRef(function (_a, ref) {
|
|
7326
7286
|
var children = _a.children, className = _a.className, customClassName = _a.customClassName, rest = __rest$1(_a, ["children", "className", "customClassName"]);
|
|
7327
|
-
|
|
7328
|
-
return (React$1.createElement("label", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7287
|
+
return (React$1.createElement("label", __assign$1({ className: customClassName !== null && customClassName !== void 0 ? customClassName : classNames$1('form-label', className) }, rest, { ref: ref }), children));
|
|
7329
7288
|
});
|
|
7330
7289
|
CFormLabel.propTypes = {
|
|
7331
7290
|
children: propTypesExports.node,
|
|
@@ -7335,8 +7294,7 @@ CFormLabel.propTypes = {
|
|
|
7335
7294
|
CFormLabel.displayName = 'CFormLabel';
|
|
7336
7295
|
|
|
7337
7296
|
var CFormCheck = React$1.forwardRef(function (_a, ref) {
|
|
7338
|
-
var _b;
|
|
7339
|
-
var className = _a.className, button = _a.button, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingLabel = _a.floatingLabel, tooltipFeedback = _a.tooltipFeedback, hitArea = _a.hitArea, id = _a.id, indeterminate = _a.indeterminate, inline = _a.inline, invalid = _a.invalid, label = _a.label, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest$1(_a, ["className", "button", "feedback", "feedbackInvalid", "feedbackValid", "floatingLabel", "tooltipFeedback", "hitArea", "id", "indeterminate", "inline", "invalid", "label", "type", "valid"]);
|
|
7297
|
+
var className = _a.className, button = _a.button, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingLabel = _a.floatingLabel, tooltipFeedback = _a.tooltipFeedback, hitArea = _a.hitArea, id = _a.id, indeterminate = _a.indeterminate, inline = _a.inline, invalid = _a.invalid, label = _a.label, reverse = _a.reverse, _b = _a.type, type = _b === void 0 ? 'checkbox' : _b, valid = _a.valid, rest = __rest$1(_a, ["className", "button", "feedback", "feedbackInvalid", "feedbackValid", "floatingLabel", "tooltipFeedback", "hitArea", "id", "indeterminate", "inline", "invalid", "label", "reverse", "type", "valid"]);
|
|
7340
7298
|
var inputRef = React$1.useRef(null);
|
|
7341
7299
|
var forkedRef = useForkedRef(ref, inputRef);
|
|
7342
7300
|
React$1.useEffect(function () {
|
|
@@ -7344,47 +7302,51 @@ var CFormCheck = React$1.forwardRef(function (_a, ref) {
|
|
|
7344
7302
|
inputRef.current.indeterminate = indeterminate;
|
|
7345
7303
|
}
|
|
7346
7304
|
}, [indeterminate]);
|
|
7347
|
-
var
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
var
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
_b), "".concat(button.shape))
|
|
7361
|
-
: 'form-check-label');
|
|
7362
|
-
var formControl = function () {
|
|
7363
|
-
return React$1.createElement("input", __assign$1({ type: type, className: inputClassName, id: id }, rest, { ref: forkedRef }));
|
|
7305
|
+
var FormControl = function () { return (React$1.createElement("input", __assign$1({ type: type, className: classNames$1(button ? 'btn-check' : 'form-check-input', {
|
|
7306
|
+
'is-invalid': invalid,
|
|
7307
|
+
'is-valid': valid,
|
|
7308
|
+
'me-2': hitArea,
|
|
7309
|
+
}), id: id }, rest, { ref: forkedRef }))); };
|
|
7310
|
+
var FormValidation = function () { return (React$1.createElement(CFormControlValidation, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingLabel: floatingLabel, invalid: invalid, tooltipFeedback: tooltipFeedback, valid: valid })); };
|
|
7311
|
+
var FormLabel = function () {
|
|
7312
|
+
var _a;
|
|
7313
|
+
return (React$1.createElement(CFormLabel, __assign$1({ customClassName: classNames$1(button
|
|
7314
|
+
? classNames$1('btn', button.variant ? "btn-".concat(button.variant, "-").concat(button.color) : "btn-".concat(button.color), (_a = {},
|
|
7315
|
+
_a["btn-".concat(button.size)] = button.size,
|
|
7316
|
+
_a), "".concat(button.shape))
|
|
7317
|
+
: 'form-check-label') }, (id && { htmlFor: id })), label));
|
|
7364
7318
|
};
|
|
7365
|
-
var
|
|
7366
|
-
|
|
7367
|
-
|
|
7319
|
+
var FormCheck = function () {
|
|
7320
|
+
if (button) {
|
|
7321
|
+
return (React$1.createElement(React$1.Fragment, null,
|
|
7322
|
+
React$1.createElement(FormControl, null),
|
|
7323
|
+
label && React$1.createElement(FormLabel, null),
|
|
7324
|
+
React$1.createElement(FormValidation, null)));
|
|
7325
|
+
}
|
|
7326
|
+
if (label) {
|
|
7327
|
+
return hitArea ? (React$1.createElement(React$1.Fragment, null,
|
|
7328
|
+
React$1.createElement(FormControl, null),
|
|
7329
|
+
React$1.createElement(CFormLabel, __assign$1({ customClassName: classNames$1('form-check-label stretched-link', className) }, (id && { htmlFor: id })), label),
|
|
7330
|
+
React$1.createElement(FormValidation, null))) : (React$1.createElement("div", { className: classNames$1('form-check', {
|
|
7331
|
+
'form-check-inline': inline,
|
|
7332
|
+
'form-check-reverse': reverse,
|
|
7333
|
+
'is-invalid': invalid,
|
|
7334
|
+
'is-valid': valid,
|
|
7335
|
+
}, className) },
|
|
7336
|
+
React$1.createElement(FormControl, null),
|
|
7337
|
+
React$1.createElement(FormLabel, null),
|
|
7338
|
+
React$1.createElement(FormValidation, null)));
|
|
7339
|
+
}
|
|
7340
|
+
return React$1.createElement(FormControl, null);
|
|
7368
7341
|
};
|
|
7369
|
-
return
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
formValidation())) : label ? (hitArea ? (React$1.createElement(React$1.Fragment, null,
|
|
7373
|
-
React$1.createElement(CFormLabel, __assign$1({ customClassName: className }, (id && { htmlFor: id })),
|
|
7374
|
-
formControl(),
|
|
7375
|
-
label),
|
|
7376
|
-
formValidation())) : (React$1.createElement("div", { className: _className },
|
|
7377
|
-
formControl(),
|
|
7378
|
-
formLabel(),
|
|
7379
|
-
formValidation()))) : (formControl());
|
|
7380
|
-
});
|
|
7381
|
-
CFormCheck.propTypes = __assign$1({ button: propTypesExports.object, className: propTypesExports.string, hitArea: propTypesExports.oneOf(['full']), id: propTypesExports.string, indeterminate: propTypesExports.bool, inline: propTypesExports.bool, label: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.node]), type: propTypesExports.oneOf(['checkbox', 'radio']) }, CFormControlValidation.propTypes);
|
|
7342
|
+
return React$1.createElement(FormCheck, null);
|
|
7343
|
+
});
|
|
7344
|
+
CFormCheck.propTypes = __assign$1({ button: propTypesExports.object, className: propTypesExports.string, hitArea: propTypesExports.oneOf(['full']), id: propTypesExports.string, indeterminate: propTypesExports.bool, inline: propTypesExports.bool, label: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.node]), reverse: propTypesExports.bool, type: propTypesExports.oneOf(['checkbox', 'radio']) }, CFormControlValidation.propTypes);
|
|
7382
7345
|
CFormCheck.displayName = 'CFormCheck';
|
|
7383
7346
|
|
|
7384
7347
|
var CFormFloating = React$1.forwardRef(function (_a, ref) {
|
|
7385
7348
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
7386
|
-
|
|
7387
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7349
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('form-floating', className) }, rest, { ref: ref }), children));
|
|
7388
7350
|
});
|
|
7389
7351
|
CFormFloating.propTypes = {
|
|
7390
7352
|
children: propTypesExports.node,
|
|
@@ -7394,8 +7356,7 @@ CFormFloating.displayName = 'CFormFloating';
|
|
|
7394
7356
|
|
|
7395
7357
|
var CFormText = React$1.forwardRef(function (_a, ref) {
|
|
7396
7358
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'div' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
7397
|
-
|
|
7398
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7359
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('form-text', className) }, rest, { ref: ref }), children));
|
|
7399
7360
|
});
|
|
7400
7361
|
CFormText.propTypes = {
|
|
7401
7362
|
children: propTypesExports.node,
|
|
@@ -7406,16 +7367,16 @@ CFormText.displayName = 'CFormText';
|
|
|
7406
7367
|
|
|
7407
7368
|
var CFormControlWrapper = function (_a) {
|
|
7408
7369
|
var children = _a.children, describedby = _a.describedby, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingClassName = _a.floatingClassName, floatingLabel = _a.floatingLabel, id = _a.id, invalid = _a.invalid, label = _a.label, text = _a.text, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid;
|
|
7409
|
-
var
|
|
7370
|
+
var FormControlValidation = function () { return (React$1.createElement(CFormControlValidation, { describedby: describedby, feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingLabel: floatingLabel, invalid: invalid, tooltipFeedback: tooltipFeedback, valid: valid })); };
|
|
7410
7371
|
return floatingLabel ? (React$1.createElement(CFormFloating, { className: floatingClassName },
|
|
7411
7372
|
children,
|
|
7412
7373
|
React$1.createElement(CFormLabel, { htmlFor: id }, label || floatingLabel),
|
|
7413
7374
|
text && React$1.createElement(CFormText, { id: describedby }, text),
|
|
7414
|
-
|
|
7375
|
+
React$1.createElement(FormControlValidation, null))) : (React$1.createElement(React$1.Fragment, null,
|
|
7415
7376
|
label && React$1.createElement(CFormLabel, { htmlFor: id }, label),
|
|
7416
7377
|
children,
|
|
7417
7378
|
text && React$1.createElement(CFormText, { id: describedby }, text),
|
|
7418
|
-
|
|
7379
|
+
React$1.createElement(FormControlValidation, null)));
|
|
7419
7380
|
};
|
|
7420
7381
|
CFormControlWrapper.propTypes = __assign$1({ children: propTypesExports.node, floatingClassName: propTypesExports.string, floatingLabel: propTypesExports.oneOfType([propTypesExports.node, propTypesExports.string]), label: propTypesExports.oneOfType([propTypesExports.node, propTypesExports.string]), text: propTypesExports.oneOfType([propTypesExports.node, propTypesExports.string]) }, CFormControlValidation.propTypes);
|
|
7421
7382
|
CFormControlWrapper.displayName = 'CFormControlWrapper';
|
|
@@ -7428,24 +7389,22 @@ var CFormInput = React$1.forwardRef(function (_a, ref) {
|
|
|
7428
7389
|
var timeOutId = setTimeout(function () { return value && onChange && onChange(value); }, typeof delay === 'number' ? delay : 500);
|
|
7429
7390
|
return function () { return clearTimeout(timeOutId); };
|
|
7430
7391
|
}, [value]);
|
|
7431
|
-
var _className = classNames$1(plainText ? 'form-control-plaintext' : 'form-control', (_b = {},
|
|
7432
|
-
_b["form-control-".concat(size)] = size,
|
|
7433
|
-
_b['form-control-color'] = type === 'color',
|
|
7434
|
-
_b['is-invalid'] = invalid,
|
|
7435
|
-
_b['is-valid'] = valid,
|
|
7436
|
-
_b), className);
|
|
7437
7392
|
return (React$1.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingClassName: floatingClassName, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
7438
|
-
React$1.createElement("input", __assign$1({ className:
|
|
7393
|
+
React$1.createElement("input", __assign$1({ className: classNames$1(plainText ? 'form-control-plaintext' : 'form-control', (_b = {},
|
|
7394
|
+
_b["form-control-".concat(size)] = size,
|
|
7395
|
+
_b['form-control-color'] = type === 'color',
|
|
7396
|
+
_b['is-invalid'] = invalid,
|
|
7397
|
+
_b['is-valid'] = valid,
|
|
7398
|
+
_b), className), id: id, type: type, onChange: function (event) { return (delay ? setValue(event) : onChange && onChange(event)); } }, rest, { ref: ref }), children)));
|
|
7439
7399
|
});
|
|
7440
7400
|
CFormInput.propTypes = __assign$1({ className: propTypesExports.string, id: propTypesExports.string, delay: propTypesExports.oneOfType([propTypesExports.bool, propTypesExports.number]), plainText: propTypesExports.bool, size: propTypesExports.oneOf(['sm', 'lg']), type: propTypesExports.oneOfType([propTypesExports.oneOf(['color', 'file', 'text']), propTypesExports.string]) }, CFormControlWrapper.propTypes);
|
|
7441
7401
|
CFormInput.displayName = 'CFormInput';
|
|
7442
7402
|
|
|
7443
7403
|
var CFormRange = React$1.forwardRef(function (_a, ref) {
|
|
7444
7404
|
var className = _a.className, label = _a.label, rest = __rest$1(_a, ["className", "label"]);
|
|
7445
|
-
var _className = classNames$1('form-range', className);
|
|
7446
7405
|
return (React$1.createElement(React$1.Fragment, null,
|
|
7447
7406
|
label && React$1.createElement(CFormLabel, { htmlFor: rest.id }, label),
|
|
7448
|
-
React$1.createElement("input", __assign$1({ type: "range", className:
|
|
7407
|
+
React$1.createElement("input", __assign$1({ type: "range", className: classNames$1('form-range', className) }, rest, { ref: ref }))));
|
|
7449
7408
|
});
|
|
7450
7409
|
CFormRange.propTypes = {
|
|
7451
7410
|
className: propTypesExports.string,
|
|
@@ -7456,13 +7415,12 @@ CFormRange.displayName = 'CFormRange';
|
|
|
7456
7415
|
var CFormSelect = React$1.forwardRef(function (_a, ref) {
|
|
7457
7416
|
var _b;
|
|
7458
7417
|
var children = _a.children, className = _a.className, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingClassName = _a.floatingClassName, floatingLabel = _a.floatingLabel, htmlSize = _a.htmlSize, id = _a.id, invalid = _a.invalid, label = _a.label, options = _a.options, size = _a.size, text = _a.text, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, rest = __rest$1(_a, ["children", "className", "feedback", "feedbackInvalid", "feedbackValid", "floatingClassName", "floatingLabel", "htmlSize", "id", "invalid", "label", "options", "size", "text", "tooltipFeedback", "valid"]);
|
|
7459
|
-
var _className = classNames$1('form-select', (_b = {},
|
|
7460
|
-
_b["form-select-".concat(size)] = size,
|
|
7461
|
-
_b['is-invalid'] = invalid,
|
|
7462
|
-
_b['is-valid'] = valid,
|
|
7463
|
-
_b), className);
|
|
7464
7418
|
return (React$1.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingClassName: floatingClassName, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
7465
|
-
React$1.createElement("select", __assign$1({ id: id, className:
|
|
7419
|
+
React$1.createElement("select", __assign$1({ id: id, className: classNames$1('form-select', (_b = {},
|
|
7420
|
+
_b["form-select-".concat(size)] = size,
|
|
7421
|
+
_b['is-invalid'] = invalid,
|
|
7422
|
+
_b['is-valid'] = valid,
|
|
7423
|
+
_b), className), size: htmlSize }, rest, { ref: ref }), options
|
|
7466
7424
|
? options.map(function (option, index) {
|
|
7467
7425
|
return (React$1.createElement("option", __assign$1({}, (typeof option === 'object' &&
|
|
7468
7426
|
option.disabled && { disabled: option.disabled }), (typeof option === 'object' && option.value && { value: option.value }), { key: index }), typeof option === 'string' ? option : option.label));
|
|
@@ -7474,26 +7432,26 @@ CFormSelect.displayName = 'CFormSelect';
|
|
|
7474
7432
|
|
|
7475
7433
|
var CFormSwitch = React$1.forwardRef(function (_a, ref) {
|
|
7476
7434
|
var _b;
|
|
7477
|
-
var className = _a.className, id = _a.id, invalid = _a.invalid, label = _a.label, size = _a.size, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest$1(_a, ["className", "id", "invalid", "label", "size", "type", "valid"]);
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
'
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
React$1.createElement(
|
|
7490
|
-
label && (React$1.createElement(CFormLabel, __assign$1({ customClassName: labelClassName }, (id && { htmlFor: id })), label))));
|
|
7435
|
+
var className = _a.className, id = _a.id, invalid = _a.invalid, label = _a.label, reverse = _a.reverse, size = _a.size, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest$1(_a, ["className", "id", "invalid", "label", "reverse", "size", "type", "valid"]);
|
|
7436
|
+
return (React$1.createElement("div", { className: classNames$1('form-check form-switch', (_b = {
|
|
7437
|
+
'form-check-reverse': reverse
|
|
7438
|
+
},
|
|
7439
|
+
_b["form-switch-".concat(size)] = size,
|
|
7440
|
+
_b['is-invalid'] = invalid,
|
|
7441
|
+
_b['is-valid'] = valid,
|
|
7442
|
+
_b), className) },
|
|
7443
|
+
React$1.createElement("input", __assign$1({ type: type, className: classNames$1('form-check-input', {
|
|
7444
|
+
'is-invalid': invalid,
|
|
7445
|
+
'is-valid': valid,
|
|
7446
|
+
}), id: id }, rest, { ref: ref })),
|
|
7447
|
+
label && (React$1.createElement(CFormLabel, __assign$1({ customClassName: "form-check-label" }, (id && { htmlFor: id })), label))));
|
|
7491
7448
|
});
|
|
7492
7449
|
CFormSwitch.propTypes = {
|
|
7493
7450
|
className: propTypesExports.string,
|
|
7494
7451
|
id: propTypesExports.string,
|
|
7495
7452
|
invalid: propTypesExports.bool,
|
|
7496
7453
|
label: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.node]),
|
|
7454
|
+
reverse: propTypesExports.bool,
|
|
7497
7455
|
size: propTypesExports.oneOf(['lg', 'xl']),
|
|
7498
7456
|
type: propTypesExports.oneOf(['checkbox', 'radio']),
|
|
7499
7457
|
valid: propTypesExports.bool,
|
|
@@ -7502,12 +7460,11 @@ CFormSwitch.displayName = 'CFormSwitch';
|
|
|
7502
7460
|
|
|
7503
7461
|
var CFormTextarea = React$1.forwardRef(function (_a, ref) {
|
|
7504
7462
|
var children = _a.children, className = _a.className, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingClassName = _a.floatingClassName, floatingLabel = _a.floatingLabel, id = _a.id, invalid = _a.invalid, label = _a.label, plainText = _a.plainText, text = _a.text, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, rest = __rest$1(_a, ["children", "className", "feedback", "feedbackInvalid", "feedbackValid", "floatingClassName", "floatingLabel", "id", "invalid", "label", "plainText", "text", "tooltipFeedback", "valid"]);
|
|
7505
|
-
var _className = classNames$1(plainText ? 'form-control-plaintext' : 'form-control', {
|
|
7506
|
-
'is-invalid': invalid,
|
|
7507
|
-
'is-valid': valid,
|
|
7508
|
-
}, className);
|
|
7509
7463
|
return (React$1.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingClassName: floatingClassName, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
7510
|
-
React$1.createElement("textarea", __assign$1({ className:
|
|
7464
|
+
React$1.createElement("textarea", __assign$1({ className: classNames$1(plainText ? 'form-control-plaintext' : 'form-control', {
|
|
7465
|
+
'is-invalid': invalid,
|
|
7466
|
+
'is-valid': valid,
|
|
7467
|
+
}, className), id: id }, rest, { ref: ref }), children)));
|
|
7511
7468
|
});
|
|
7512
7469
|
CFormTextarea.propTypes = __assign$1({ className: propTypesExports.string, id: propTypesExports.string, plainText: propTypesExports.bool }, CFormControlWrapper.propTypes);
|
|
7513
7470
|
CFormTextarea.displayName = 'CFormTextarea';
|
|
@@ -7515,10 +7472,9 @@ CFormTextarea.displayName = 'CFormTextarea';
|
|
|
7515
7472
|
var CInputGroup = React$1.forwardRef(function (_a, ref) {
|
|
7516
7473
|
var _b;
|
|
7517
7474
|
var children = _a.children, className = _a.className, size = _a.size, rest = __rest$1(_a, ["children", "className", "size"]);
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7475
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('input-group', (_b = {},
|
|
7476
|
+
_b["input-group-".concat(size)] = size,
|
|
7477
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
7522
7478
|
});
|
|
7523
7479
|
CInputGroup.propTypes = {
|
|
7524
7480
|
children: propTypesExports.node,
|
|
@@ -7529,8 +7485,7 @@ CInputGroup.displayName = 'CInputGroup';
|
|
|
7529
7485
|
|
|
7530
7486
|
var CInputGroupText = React$1.forwardRef(function (_a, ref) {
|
|
7531
7487
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'span' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
7532
|
-
|
|
7533
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7488
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('input-group-text', className) }, rest, { ref: ref }), children));
|
|
7534
7489
|
});
|
|
7535
7490
|
CInputGroupText.propTypes = {
|
|
7536
7491
|
children: propTypesExports.node,
|
|
@@ -9981,13 +9936,17 @@ function Reference(_ref) {
|
|
|
9981
9936
|
});
|
|
9982
9937
|
}
|
|
9983
9938
|
|
|
9939
|
+
var PopperManagerWrapper = function (_a) {
|
|
9940
|
+
var children = _a.children, popper = _a.popper;
|
|
9941
|
+
return popper ? React$1.createElement(Manager, null, children) : React$1.createElement(React$1.Fragment, null, children);
|
|
9942
|
+
};
|
|
9984
9943
|
var CDropdownContext = React$1.createContext({});
|
|
9985
9944
|
var CDropdown = React$1.forwardRef(function (_a, ref) {
|
|
9986
9945
|
var children = _a.children, alignment = _a.alignment, _b = _a.autoClose, autoClose = _b === void 0 ? true : _b, className = _a.className, dark = _a.dark, direction = _a.direction, onHide = _a.onHide, onShow = _a.onShow, _c = _a.placement, placement = _c === void 0 ? 'bottom-start' : _c, _d = _a.popper, popper = _d === void 0 ? true : _d, _e = _a.variant, variant = _e === void 0 ? 'btn-group' : _e, _f = _a.component, component = _f === void 0 ? 'div' : _f, _g = _a.visible, visible = _g === void 0 ? false : _g, rest = __rest$1(_a, ["children", "alignment", "autoClose", "className", "dark", "direction", "onHide", "onShow", "placement", "popper", "variant", "component", "visible"]);
|
|
9987
|
-
var _h = React$1.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
9988
9946
|
var dropdownRef = React$1.useRef(null);
|
|
9989
9947
|
var dropdownToggleRef = React$1.useRef(null);
|
|
9990
9948
|
var forkedRef = useForkedRef(ref, dropdownRef);
|
|
9949
|
+
var _h = React$1.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
9991
9950
|
var Component = variant === 'nav-item' ? 'li' : component;
|
|
9992
9951
|
// Disable popper if responsive aligment is set.
|
|
9993
9952
|
if (typeof alignment === 'object') {
|
|
@@ -10005,13 +9964,6 @@ var CDropdown = React$1.forwardRef(function (_a, ref) {
|
|
|
10005
9964
|
visible: _visible,
|
|
10006
9965
|
setVisible: setVisible,
|
|
10007
9966
|
};
|
|
10008
|
-
var _className = classNames$1(variant === 'nav-item' ? 'nav-item dropdown' : variant, {
|
|
10009
|
-
show: _visible,
|
|
10010
|
-
}, direction === 'center'
|
|
10011
|
-
? 'dropdown-center'
|
|
10012
|
-
: direction === 'dropup-center'
|
|
10013
|
-
? 'dropup dropup-center'
|
|
10014
|
-
: direction, className);
|
|
10015
9967
|
React$1.useEffect(function () {
|
|
10016
9968
|
setVisible(visible);
|
|
10017
9969
|
}, [visible]);
|
|
@@ -10019,11 +9971,13 @@ var CDropdown = React$1.forwardRef(function (_a, ref) {
|
|
|
10019
9971
|
_visible && onShow && onShow();
|
|
10020
9972
|
!_visible && onHide && onHide();
|
|
10021
9973
|
}, [_visible]);
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
9974
|
+
return (React$1.createElement(CDropdownContext.Provider, { value: contextValues },
|
|
9975
|
+
React$1.createElement(PopperManagerWrapper, { popper: popper }, variant === 'input-group' ? (React$1.createElement(React$1.Fragment, null, children)) : (React$1.createElement(Component, __assign$1({ className: classNames$1(variant === 'nav-item' ? 'nav-item dropdown' : variant, {
|
|
9976
|
+
'dropdown-center': direction === 'center',
|
|
9977
|
+
'dropup dropup-center': direction === 'dropup-center',
|
|
9978
|
+
direction: direction && direction !== 'center' && direction !== 'dropup-center',
|
|
9979
|
+
show: _visible,
|
|
9980
|
+
}, className) }, rest, { ref: forkedRef }), children)))));
|
|
10027
9981
|
});
|
|
10028
9982
|
var alignmentDirection = propTypesExports.oneOf(['start', 'end']);
|
|
10029
9983
|
CDropdown.propTypes = {
|
|
@@ -10118,20 +10072,17 @@ var CDropdownMenu = function (_a) {
|
|
|
10118
10072
|
}
|
|
10119
10073
|
return classNames;
|
|
10120
10074
|
};
|
|
10121
|
-
var
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
})
|
|
10133
|
-
: children));
|
|
10134
|
-
};
|
|
10075
|
+
var dropdownMenuComponent = function (style, ref) { return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-menu', {
|
|
10076
|
+
'dropdown-menu-dark': dark,
|
|
10077
|
+
show: visible,
|
|
10078
|
+
}, alignment && alignmentClassNames(alignment), className), ref: ref, style: style, role: "menu", "aria-hidden": !visible }, (!popper && { 'data-coreui-popper': 'static' }), rest), Component === 'ul'
|
|
10079
|
+
? React$1.Children.map(children, function (child, index) {
|
|
10080
|
+
if (React$1.isValidElement(child)) {
|
|
10081
|
+
return React$1.createElement("li", { key: index }, React$1.cloneElement(child));
|
|
10082
|
+
}
|
|
10083
|
+
return;
|
|
10084
|
+
})
|
|
10085
|
+
: children)); };
|
|
10135
10086
|
return popper && visible ? (React$1.createElement(Popper, { innerRef: dropdownMenuRef, placement: _placement }, function (_a) {
|
|
10136
10087
|
var ref = _a.ref, style = _a.style;
|
|
10137
10088
|
return dropdownMenuComponent(style, ref);
|
|
@@ -10147,11 +10098,6 @@ CDropdownMenu.displayName = 'CDropdownMenu';
|
|
|
10147
10098
|
var CDropdownToggle = function (_a) {
|
|
10148
10099
|
var children = _a.children, _b = _a.caret, caret = _b === void 0 ? true : _b, custom = _a.custom, className = _a.className, split = _a.split, _c = _a.trigger, trigger = _c === void 0 ? 'click' : _c, rest = __rest$1(_a, ["children", "caret", "custom", "className", "split", "trigger"]);
|
|
10149
10100
|
var _d = React$1.useContext(CDropdownContext), dropdownToggleRef = _d.dropdownToggleRef, popper = _d.popper, variant = _d.variant, visible = _d.visible, setVisible = _d.setVisible;
|
|
10150
|
-
var _className = classNames$1({
|
|
10151
|
-
'dropdown-toggle': caret,
|
|
10152
|
-
'dropdown-toggle-split': split,
|
|
10153
|
-
'nav-link': variant === 'nav-item',
|
|
10154
|
-
}, className);
|
|
10155
10101
|
var triggers = __assign$1(__assign$1({}, ((trigger === 'click' || trigger.includes('click')) && {
|
|
10156
10102
|
onClick: function (event) {
|
|
10157
10103
|
event.preventDefault();
|
|
@@ -10161,11 +10107,21 @@ var CDropdownToggle = function (_a) {
|
|
|
10161
10107
|
onFocus: function () { return setVisible(true); },
|
|
10162
10108
|
onBlur: function () { return setVisible(false); },
|
|
10163
10109
|
}));
|
|
10164
|
-
var togglerProps = __assign$1(
|
|
10110
|
+
var togglerProps = __assign$1({ className: classNames$1({
|
|
10111
|
+
'dropdown-toggle': caret,
|
|
10112
|
+
'dropdown-toggle-split': split,
|
|
10113
|
+
'nav-link': variant === 'nav-item',
|
|
10114
|
+
}, className), 'aria-expanded': visible }, (!rest.disabled && __assign$1({}, triggers)));
|
|
10165
10115
|
// We use any because Toggler can be `a` as well as `button`.
|
|
10166
10116
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10167
10117
|
var Toggler = function (ref) {
|
|
10168
|
-
|
|
10118
|
+
if (custom && React$1.isValidElement(children)) {
|
|
10119
|
+
return (React$1.createElement(React$1.Fragment, null, React$1.cloneElement(children, __assign$1(__assign$1({ 'aria-expanded': visible }, (!rest.disabled && __assign$1({}, triggers))), { ref: useForkedRef(ref, dropdownToggleRef) }))));
|
|
10120
|
+
}
|
|
10121
|
+
if (variant === 'nav-item') {
|
|
10122
|
+
return (React$1.createElement("a", __assign$1({ href: "#" }, togglerProps, { ref: useForkedRef(ref, dropdownToggleRef) }), children));
|
|
10123
|
+
}
|
|
10124
|
+
return (React$1.createElement(CButton, __assign$1({ type: "button" }, togglerProps, { tabIndex: 0 }, rest, { ref: useForkedRef(ref, dropdownToggleRef) }),
|
|
10169
10125
|
children,
|
|
10170
10126
|
split && React$1.createElement("span", { className: "visually-hidden" }, "Toggle Dropdown")));
|
|
10171
10127
|
};
|
|
@@ -10198,12 +10154,12 @@ var CPicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10198
10154
|
onConfirm && onConfirm();
|
|
10199
10155
|
setVisible(false);
|
|
10200
10156
|
} }, confirmButton)))); };
|
|
10201
|
-
var _className = classNames$1('picker', className);
|
|
10202
10157
|
switch (container) {
|
|
10203
|
-
case 'inline':
|
|
10204
|
-
return React$1.createElement("div", { className:
|
|
10205
|
-
|
|
10206
|
-
|
|
10158
|
+
case 'inline': {
|
|
10159
|
+
return React$1.createElement("div", { className: classNames$1('picker', className) }, children);
|
|
10160
|
+
}
|
|
10161
|
+
default: {
|
|
10162
|
+
return (React$1.createElement(CDropdown, __assign$1({ autoClose: "outside", className: classNames$1('picker', className), onHide: function () {
|
|
10207
10163
|
setVisible(false);
|
|
10208
10164
|
onHide && onHide();
|
|
10209
10165
|
}, onShow: function () {
|
|
@@ -10214,6 +10170,7 @@ var CPicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10214
10170
|
React$1.createElement(CDropdownMenu, { component: "div" },
|
|
10215
10171
|
children,
|
|
10216
10172
|
footer && (React$1.createElement("div", { className: "picker-footer" }, typeof footer === 'boolean' ? Footer() : footer)))));
|
|
10173
|
+
}
|
|
10217
10174
|
}
|
|
10218
10175
|
});
|
|
10219
10176
|
CPicker.displayName = 'CPicker';
|
|
@@ -10328,7 +10285,7 @@ var isValidTime = function (time) {
|
|
|
10328
10285
|
|
|
10329
10286
|
var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
10330
10287
|
var _b;
|
|
10331
|
-
var _c = _a.ampm, ampm = _c === void 0 ? 'auto' : _c, className = _a.className, _d = _a.cleaner, cleaner = _d === void 0 ? true : _d, _e = _a.container, container = _e === void 0 ? 'dropdown' : _e, disabled = _a.disabled, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, _f = _a.footer, footer = _f === void 0 ? true : _f, id = _a.id, _g = _a.indicator, indicator = _g === void 0 ? true : _g, inputReadOnly = _a.inputReadOnly, invalid = _a.invalid, label = _a.label, _h = _a.locale, locale = _h === void 0 ? 'default' : _h, onTimeChange = _a.onTimeChange, onHide = _a.onHide, onShow = _a.onShow, _j = _a.placeholder, placeholder = _j === void 0 ? 'Select time' : _j, _k = _a.seconds, seconds = _k === void 0 ? true : _k, size = _a.size, text = _a.text, time = _a.time, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, _l = _a.variant, variant = _l === void 0 ? 'roll' : _l, visible = _a.visible, rest = __rest$1(_a, ["ampm", "className", "cleaner", "container", "disabled", "feedback", "feedbackInvalid", "feedbackValid", "footer", "id", "indicator", "inputReadOnly", "invalid", "label", "locale", "onTimeChange", "onHide", "onShow", "placeholder", "seconds", "size", "text", "time", "tooltipFeedback", "valid", "variant", "visible"]);
|
|
10288
|
+
var _c = _a.ampm, ampm = _c === void 0 ? 'auto' : _c, className = _a.className, _d = _a.cleaner, cleaner = _d === void 0 ? true : _d, _e = _a.container, container = _e === void 0 ? 'dropdown' : _e, disabled = _a.disabled, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, _f = _a.footer, footer = _f === void 0 ? true : _f, id = _a.id, _g = _a.indicator, indicator = _g === void 0 ? true : _g, inputReadOnly = _a.inputReadOnly, invalid = _a.invalid, label = _a.label, _h = _a.locale, locale = _h === void 0 ? 'default' : _h, onTimeChange = _a.onTimeChange, onHide = _a.onHide, onShow = _a.onShow, _j = _a.placeholder, placeholder = _j === void 0 ? 'Select time' : _j, required = _a.required, _k = _a.seconds, seconds = _k === void 0 ? true : _k, size = _a.size, text = _a.text, time = _a.time, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, _l = _a.variant, variant = _l === void 0 ? 'roll' : _l, visible = _a.visible, rest = __rest$1(_a, ["ampm", "className", "cleaner", "container", "disabled", "feedback", "feedbackInvalid", "feedbackValid", "footer", "id", "indicator", "inputReadOnly", "invalid", "label", "locale", "onTimeChange", "onHide", "onShow", "placeholder", "required", "seconds", "size", "text", "time", "tooltipFeedback", "valid", "variant", "visible"]);
|
|
10332
10289
|
var inputRef = React$1.useRef(null);
|
|
10333
10290
|
var _m = React$1.useState(convertTimeToDate(time)), date = _m[0], setDate = _m[1];
|
|
10334
10291
|
var _o = React$1.useState(null), initialDate = _o[0], setInitialDate = _o[1];
|
|
@@ -10369,17 +10326,17 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10369
10326
|
}
|
|
10370
10327
|
if (set === 'hours') {
|
|
10371
10328
|
if (localizedTimePartials && localizedTimePartials.hour12) {
|
|
10372
|
-
_date.setHours(convert12hTo24h(_ampm, parseInt(value)));
|
|
10329
|
+
_date.setHours(convert12hTo24h(_ampm, Number.parseInt(value)));
|
|
10373
10330
|
}
|
|
10374
10331
|
else {
|
|
10375
|
-
_date.setHours(parseInt(value));
|
|
10332
|
+
_date.setHours(Number.parseInt(value));
|
|
10376
10333
|
}
|
|
10377
10334
|
}
|
|
10378
10335
|
if (set === 'minutes') {
|
|
10379
|
-
_date.setMinutes(parseInt(value));
|
|
10336
|
+
_date.setMinutes(Number.parseInt(value));
|
|
10380
10337
|
}
|
|
10381
10338
|
if (set === 'seconds') {
|
|
10382
|
-
_date.setSeconds(parseInt(value));
|
|
10339
|
+
_date.setSeconds(Number.parseInt(value));
|
|
10383
10340
|
}
|
|
10384
10341
|
setDate(new Date(_date));
|
|
10385
10342
|
onTimeChange && onTimeChange(_date.toTimeString(), _date.toLocaleTimeString(), _date);
|
|
@@ -10387,7 +10344,7 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10387
10344
|
var InputGroup = function () { return (React$1.createElement(CInputGroup, { className: "picker-input-group", size: size },
|
|
10388
10345
|
React$1.createElement(CFormInput, { autoComplete: "off", delay: true, disabled: disabled, onChange: function (event) {
|
|
10389
10346
|
return isValidTime(event.target.value) && setDate(convertTimeToDate(event.target.value));
|
|
10390
|
-
}, placeholder: placeholder, readOnly: inputReadOnly, ref: inputRef }),
|
|
10347
|
+
}, placeholder: placeholder, readOnly: inputReadOnly, required: required, ref: inputRef }),
|
|
10391
10348
|
(indicator || cleaner) && (React$1.createElement(CInputGroupText, null,
|
|
10392
10349
|
indicator && (React$1.createElement("span", { className: "picker-input-group-indicator" }, typeof indicator === 'boolean' ? (React$1.createElement("span", { className: "picker-input-group-icon time-picker-input-icon" })) : (indicator))),
|
|
10393
10350
|
cleaner && date && (React$1.createElement("span", { className: "picker-input-group-cleaner", role: "button", onClick: function (event) { return handleClear(event); } }, typeof cleaner === 'boolean' ? (React$1.createElement("span", { className: "picker-input-group-icon time-picker-cleaner-icon" })) : (cleaner))))))); };
|
|
@@ -10440,12 +10397,11 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10440
10397
|
{ value: 'am', label: 'AM' },
|
|
10441
10398
|
{ value: 'pm', label: 'PM' },
|
|
10442
10399
|
], onClick: function (value) { return handleTimeChange('toggle', value); }, selected: _ampm })))); };
|
|
10443
|
-
var _className = classNames$1('time-picker', {
|
|
10444
|
-
'is-invalid': invalid,
|
|
10445
|
-
'is-valid': valid,
|
|
10446
|
-
}, className);
|
|
10447
10400
|
return (React$1.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
10448
|
-
React$1.createElement(CPicker, __assign$1({ className:
|
|
10401
|
+
React$1.createElement(CPicker, __assign$1({ className: classNames$1('time-picker', {
|
|
10402
|
+
'is-invalid': invalid,
|
|
10403
|
+
'is-valid': valid,
|
|
10404
|
+
}, className), container: container, disabled: disabled, footer: footer, id: id, onCancel: function () {
|
|
10449
10405
|
initialDate && setDate(new Date(initialDate));
|
|
10450
10406
|
setVisible(false);
|
|
10451
10407
|
}, onHide: function () {
|
|
@@ -10460,11 +10416,11 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10460
10416
|
_b['time-picker-roll'] = variant === 'roll',
|
|
10461
10417
|
_b)) }, variant === 'select' ? React$1.createElement(TimePickerSelect, null) : TimePickerRoll()))));
|
|
10462
10418
|
});
|
|
10463
|
-
CTimePicker.propTypes = __assign$1(__assign$1(__assign$1({}, CFormControlWrapper.propTypes), CPicker.propTypes), { ampm: propTypesExports.oneOfType([propTypesExports.oneOf(['auto']), propTypesExports.bool]), className: propTypesExports.string, locale: propTypesExports.string, onTimeChange: propTypesExports.func, seconds: propTypesExports.bool, time: propTypesExports.oneOfType([propTypesExports.instanceOf(Date), propTypesExports.string]), variant: propTypesExports.oneOf(['roll', 'select']) });
|
|
10419
|
+
CTimePicker.propTypes = __assign$1(__assign$1(__assign$1({}, CFormControlWrapper.propTypes), CPicker.propTypes), { ampm: propTypesExports.oneOfType([propTypesExports.oneOf(['auto']), propTypesExports.bool]), className: propTypesExports.string, locale: propTypesExports.string, onTimeChange: propTypesExports.func, required: propTypesExports.bool, seconds: propTypesExports.bool, time: propTypesExports.oneOfType([propTypesExports.instanceOf(Date), propTypesExports.string]), variant: propTypesExports.oneOf(['roll', 'select']) });
|
|
10464
10420
|
CTimePicker.displayName = 'CTimePicker';
|
|
10465
10421
|
|
|
10466
10422
|
var getLocalDateFromString = function (string, locale, time) {
|
|
10467
|
-
if (!isNaN(Date.parse(string))) {
|
|
10423
|
+
if (!Number.isNaN(Date.parse(string))) {
|
|
10468
10424
|
return new Date(Date.parse(string));
|
|
10469
10425
|
}
|
|
10470
10426
|
var date = new Date(2013, 11, 31, 17, 19, 22);
|
|
@@ -10481,7 +10437,7 @@ var getLocalDateFromString = function (string, locale, time) {
|
|
|
10481
10437
|
.replace('22', '(?<second>[0-9]{1,2})')
|
|
10482
10438
|
.replace('PM', '(?<ampm>[A-Z]{2})');
|
|
10483
10439
|
}
|
|
10484
|
-
var rgx = RegExp("".concat(regex));
|
|
10440
|
+
var rgx = new RegExp("".concat(regex));
|
|
10485
10441
|
var partials = string.match(rgx);
|
|
10486
10442
|
if (partials === null)
|
|
10487
10443
|
return;
|
|
@@ -10498,7 +10454,7 @@ var getLocalDateFromString = function (string, locale, time) {
|
|
|
10498
10454
|
|
|
10499
10455
|
var _a, _b, _c, _d, _e, _f;
|
|
10500
10456
|
var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
10501
|
-
var _b = _a.calendars, calendars = _b === void 0 ? 2 : _b, className = _a.className, _c = _a.cleaner, cleaner = _c === void 0 ? true : _c, calendarDate = _a.calendarDate, _d = _a.closeOnSelect, closeOnSelect = _d === void 0 ? true : _d, _e = _a.indicator, indicator = _e === void 0 ? true : _e, dayFormat = _a.dayFormat, disabled = _a.disabled, disabledDates = _a.disabledDates, endDate = _a.endDate, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, firstDayOfWeek = _a.firstDayOfWeek, format = _a.format, footer = _a.footer, id = _a.id, inputReadOnly = _a.inputReadOnly, invalid = _a.invalid, label = _a.label, _f = _a.locale, locale = _f === void 0 ? 'default' : _f, maxDate = _a.maxDate, minDate = _a.minDate, navigation = _a.navigation, navYearFirst = _a.navYearFirst, onEndDateChange = _a.onEndDateChange, onHide = _a.onHide, onStartDateChange = _a.onStartDateChange, onShow = _a.onShow, _g = _a.placeholder, placeholder = _g === void 0 ? ['Start date', 'End date'] : _g, _h = _a.range, range = _h === void 0 ? true : _h, ranges = _a.ranges, _j = _a.rangesButtonsColor, rangesButtonsColor = _j === void 0 ? 'secondary' : _j, rangesButtonsSize = _a.rangesButtonsSize, _k = _a.rangesButtonsVariant, rangesButtonsVariant = _k === void 0 ? 'ghost' : _k, _l = _a.separator, separator = _l === void 0 ? true : _l, size = _a.size, startDate = _a.startDate, text = _a.text, timepicker = _a.timepicker, toggler = _a.toggler, _m = _a.todayButton, todayButton = _m === void 0 ? 'Today' : _m, _o = _a.todayButtonColor, todayButtonColor = _o === void 0 ? 'primary' : _o, _p = _a.todayButtonSize, todayButtonSize = _p === void 0 ? 'sm' : _p, todayButtonVariant = _a.todayButtonVariant, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, visible = _a.visible, weekdayFormat = _a.weekdayFormat, rest = __rest$1(_a, ["calendars", "className", "cleaner", "calendarDate", "closeOnSelect", "indicator", "dayFormat", "disabled", "disabledDates", "endDate", "feedback", "feedbackInvalid", "feedbackValid", "firstDayOfWeek", "format", "footer", "id", "inputReadOnly", "invalid", "label", "locale", "maxDate", "minDate", "navigation", "navYearFirst", "onEndDateChange", "onHide", "onStartDateChange", "onShow", "placeholder", "range", "ranges", "rangesButtonsColor", "rangesButtonsSize", "rangesButtonsVariant", "separator", "size", "startDate", "text", "timepicker", "toggler", "todayButton", "todayButtonColor", "todayButtonSize", "todayButtonVariant", "tooltipFeedback", "valid", "visible", "weekdayFormat"]);
|
|
10457
|
+
var _b = _a.calendars, calendars = _b === void 0 ? 2 : _b, className = _a.className, _c = _a.cleaner, cleaner = _c === void 0 ? true : _c, calendarDate = _a.calendarDate, _d = _a.closeOnSelect, closeOnSelect = _d === void 0 ? true : _d, _e = _a.indicator, indicator = _e === void 0 ? true : _e, dayFormat = _a.dayFormat, disabled = _a.disabled, disabledDates = _a.disabledDates, endDate = _a.endDate, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, firstDayOfWeek = _a.firstDayOfWeek, format = _a.format, footer = _a.footer, id = _a.id, inputReadOnly = _a.inputReadOnly, invalid = _a.invalid, label = _a.label, _f = _a.locale, locale = _f === void 0 ? 'default' : _f, maxDate = _a.maxDate, minDate = _a.minDate, navigation = _a.navigation, navYearFirst = _a.navYearFirst, onEndDateChange = _a.onEndDateChange, onHide = _a.onHide, onStartDateChange = _a.onStartDateChange, onShow = _a.onShow, _g = _a.placeholder, placeholder = _g === void 0 ? ['Start date', 'End date'] : _g, _h = _a.range, range = _h === void 0 ? true : _h, ranges = _a.ranges, _j = _a.rangesButtonsColor, rangesButtonsColor = _j === void 0 ? 'secondary' : _j, rangesButtonsSize = _a.rangesButtonsSize, _k = _a.rangesButtonsVariant, rangesButtonsVariant = _k === void 0 ? 'ghost' : _k, required = _a.required, _l = _a.separator, separator = _l === void 0 ? true : _l, size = _a.size, startDate = _a.startDate, text = _a.text, timepicker = _a.timepicker, toggler = _a.toggler, _m = _a.todayButton, todayButton = _m === void 0 ? 'Today' : _m, _o = _a.todayButtonColor, todayButtonColor = _o === void 0 ? 'primary' : _o, _p = _a.todayButtonSize, todayButtonSize = _p === void 0 ? 'sm' : _p, todayButtonVariant = _a.todayButtonVariant, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, visible = _a.visible, weekdayFormat = _a.weekdayFormat, rest = __rest$1(_a, ["calendars", "className", "cleaner", "calendarDate", "closeOnSelect", "indicator", "dayFormat", "disabled", "disabledDates", "endDate", "feedback", "feedbackInvalid", "feedbackValid", "firstDayOfWeek", "format", "footer", "id", "inputReadOnly", "invalid", "label", "locale", "maxDate", "minDate", "navigation", "navYearFirst", "onEndDateChange", "onHide", "onStartDateChange", "onShow", "placeholder", "range", "ranges", "rangesButtonsColor", "rangesButtonsSize", "rangesButtonsVariant", "required", "separator", "size", "startDate", "text", "timepicker", "toggler", "todayButton", "todayButtonColor", "todayButtonSize", "todayButtonVariant", "tooltipFeedback", "valid", "visible", "weekdayFormat"]);
|
|
10502
10458
|
var _q = React$1.useState(visible), _visible = _q[0], setVisible = _q[1];
|
|
10503
10459
|
var inputStartRef = React$1.useRef(null);
|
|
10504
10460
|
var inputEndRef = React$1.useRef(null);
|
|
@@ -10596,14 +10552,10 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10596
10552
|
setStartDate(null);
|
|
10597
10553
|
setEndDate(null);
|
|
10598
10554
|
};
|
|
10599
|
-
var _className = classNames$1('date-picker', {
|
|
10600
|
-
'is-invalid': invalid,
|
|
10601
|
-
'is-valid': valid,
|
|
10602
|
-
}, className);
|
|
10603
10555
|
var InputGroup = function () { return (React$1.createElement(CInputGroup, { className: "picker-input-group", size: size },
|
|
10604
10556
|
React$1.createElement(CFormInput, __assign$1({ autoComplete: "off", className: classNames$1({
|
|
10605
10557
|
hover: inputStartHoverValue,
|
|
10606
|
-
}), delay: true, disabled: disabled }, (id && { name: range ? "".concat(id, "-start-date") : "".concat(id, "-date") }), { placeholder: Array.isArray(placeholder) ? placeholder[0] : placeholder, readOnly: inputReadOnly || typeof format === 'string', onChange: function (event) {
|
|
10558
|
+
}), delay: true, disabled: disabled }, (id && { name: range ? "".concat(id, "-start-date") : "".concat(id, "-date") }), { placeholder: Array.isArray(placeholder) ? placeholder[0] : placeholder, readOnly: inputReadOnly || typeof format === 'string', required: required, onChange: function (event) {
|
|
10607
10559
|
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
10608
10560
|
if (date instanceof Date && date.getTime()) {
|
|
10609
10561
|
setCalendarDate(date);
|
|
@@ -10613,7 +10565,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10613
10565
|
range && separator !== false && (React$1.createElement(CInputGroupText, null, typeof separator === 'boolean' ? (React$1.createElement("span", { className: "picker-input-group-icon date-picker-arrow-icon" })) : (separator))),
|
|
10614
10566
|
range && (React$1.createElement(CFormInput, __assign$1({ autoComplete: "off", className: classNames$1({
|
|
10615
10567
|
hover: inputEndHoverValue,
|
|
10616
|
-
}), delay: true, disabled: disabled }, (id && { name: "".concat(id, "-end-date") }), { placeholder: placeholder[1], readOnly: inputReadOnly || typeof format === 'string', onChange: function (event) {
|
|
10568
|
+
}), delay: true, disabled: disabled }, (id && { name: "".concat(id, "-end-date") }), { placeholder: placeholder[1], readOnly: inputReadOnly || typeof format === 'string', required: required, onChange: function (event) {
|
|
10617
10569
|
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
10618
10570
|
if (date instanceof Date && date.getTime()) {
|
|
10619
10571
|
setCalendarDate(date);
|
|
@@ -10624,12 +10576,15 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10624
10576
|
indicator && (React$1.createElement("span", { className: "picker-input-group-indicator" }, typeof indicator === 'boolean' ? (React$1.createElement("span", { className: "picker-input-group-icon date-picker-input-icon" })) : (indicator))),
|
|
10625
10577
|
cleaner && _startDate && (React$1.createElement("span", { className: "picker-input-group-cleaner", role: "button", onClick: function (event) { return handleClear(event); } }, typeof cleaner === 'boolean' ? (React$1.createElement("span", { className: "picker-input-group-icon date-picker-cleaner-icon" })) : (cleaner))))))); };
|
|
10626
10578
|
return (React$1.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
10627
|
-
React$1.createElement(CPicker, __assign$1({ className:
|
|
10579
|
+
React$1.createElement(CPicker, __assign$1({ className: classNames$1('date-picker', {
|
|
10580
|
+
'is-invalid': invalid,
|
|
10581
|
+
'is-valid': valid,
|
|
10582
|
+
}, className), disabled: disabled, footer: footer || timepicker, footerContent: todayButton && (React$1.createElement(CButton, { className: "me-auto", color: todayButtonColor, size: todayButtonSize, variant: todayButtonVariant, onClick: function () {
|
|
10628
10583
|
var date = new Date();
|
|
10629
10584
|
handleStartDateChange(date);
|
|
10630
10585
|
handleEndDateChange(date);
|
|
10631
10586
|
setCalendarDate(date);
|
|
10632
|
-
} }, todayButton)), id: id, toggler: toggler ? toggler : InputGroup(), onCancel: function () {
|
|
10587
|
+
} }, todayButton)), id: id, toggler: toggler !== null && toggler !== void 0 ? toggler : InputGroup(), onCancel: function () {
|
|
10633
10588
|
handleStartDateChange(initialStartDate);
|
|
10634
10589
|
handleEndDateChange(initialEndDate);
|
|
10635
10590
|
setVisible(false);
|
|
@@ -10663,7 +10618,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10663
10618
|
}, time: index === 0 ? _startDate : _endDate, variant: "select" })); }))))))));
|
|
10664
10619
|
});
|
|
10665
10620
|
CDateRangePicker.displayName = 'CDateRangePicker';
|
|
10666
|
-
CDateRangePicker.propTypes = __assign$1(__assign$1(__assign$1(__assign$1({}, CCalendar.propTypes), CFormControlWrapper.propTypes), CPicker.propTypes), { calendars: propTypesExports.number, className: propTypesExports.string, cleaner: propTypesExports.bool, closeOnSelect: propTypesExports.bool, id: propTypesExports.string, indicator: propTypesExports.oneOfType([propTypesExports.bool, propTypesExports.node]), inputReadOnly: propTypesExports.bool, placeholder: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.arrayOf(propTypesExports.any)]), range: propTypesExports.bool, ranges: propTypesExports.object, rangesButtonsColor: (_a = CButton.propTypes) === null || _a === void 0 ? void 0 : _a.color, rangesButtonsSize: (_b = CButton.propTypes) === null || _b === void 0 ? void 0 : _b.size, rangesButtonsVariant: (_c = CButton.propTypes) === null || _c === void 0 ? void 0 : _c.variant, separator: propTypesExports.oneOfType([propTypesExports.bool, propTypesExports.node]), size: propTypesExports.oneOf(['sm', 'lg']), timepicker: propTypesExports.bool, todayButton: propTypesExports.oneOfType([propTypesExports.bool, propTypesExports.node]), todayButtonColor: (_d = CButton.propTypes) === null || _d === void 0 ? void 0 : _d.color, todayButtonSize: (_e = CButton.propTypes) === null || _e === void 0 ? void 0 : _e.size, todayButtonVariant: (_f = CButton.propTypes) === null || _f === void 0 ? void 0 : _f.variant });
|
|
10621
|
+
CDateRangePicker.propTypes = __assign$1(__assign$1(__assign$1(__assign$1({}, CCalendar.propTypes), CFormControlWrapper.propTypes), CPicker.propTypes), { calendars: propTypesExports.number, className: propTypesExports.string, cleaner: propTypesExports.bool, closeOnSelect: propTypesExports.bool, id: propTypesExports.string, indicator: propTypesExports.oneOfType([propTypesExports.bool, propTypesExports.node]), inputReadOnly: propTypesExports.bool, placeholder: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.arrayOf(propTypesExports.any)]), range: propTypesExports.bool, ranges: propTypesExports.object, rangesButtonsColor: (_a = CButton.propTypes) === null || _a === void 0 ? void 0 : _a.color, rangesButtonsSize: (_b = CButton.propTypes) === null || _b === void 0 ? void 0 : _b.size, rangesButtonsVariant: (_c = CButton.propTypes) === null || _c === void 0 ? void 0 : _c.variant, required: propTypesExports.bool, separator: propTypesExports.oneOfType([propTypesExports.bool, propTypesExports.node]), size: propTypesExports.oneOf(['sm', 'lg']), timepicker: propTypesExports.bool, todayButton: propTypesExports.oneOfType([propTypesExports.bool, propTypesExports.node]), todayButtonColor: (_d = CButton.propTypes) === null || _d === void 0 ? void 0 : _d.color, todayButtonSize: (_e = CButton.propTypes) === null || _e === void 0 ? void 0 : _e.size, todayButtonVariant: (_f = CButton.propTypes) === null || _f === void 0 ? void 0 : _f.variant });
|
|
10667
10622
|
|
|
10668
10623
|
var CDatePicker = React$1.forwardRef(function (_a, ref) {
|
|
10669
10624
|
var date = _a.date, id = _a.id, onDateChange = _a.onDateChange, _b = _a.placeholder, placeholder = _b === void 0 ? 'Select date' : _b, rest = __rest$1(_a, ["date", "id", "onDateChange", "placeholder"]);
|
|
@@ -10674,8 +10629,7 @@ CDatePicker.propTypes = __assign$1(__assign$1({}, CDateRangePicker.propTypes), {
|
|
|
10674
10629
|
|
|
10675
10630
|
var CDropdownDivider = React$1.forwardRef(function (_a, ref) {
|
|
10676
10631
|
var className = _a.className, rest = __rest$1(_a, ["className"]);
|
|
10677
|
-
|
|
10678
|
-
return React$1.createElement("hr", __assign$1({ className: _className }, rest, { ref: ref }));
|
|
10632
|
+
return React$1.createElement("hr", __assign$1({ className: classNames$1('dropdown-divider', className) }, rest, { ref: ref }));
|
|
10679
10633
|
});
|
|
10680
10634
|
CDropdownDivider.propTypes = {
|
|
10681
10635
|
className: propTypesExports.string,
|
|
@@ -10684,8 +10638,7 @@ CDropdownDivider.displayName = 'CDropdownDivider';
|
|
|
10684
10638
|
|
|
10685
10639
|
var CDropdownHeader = React$1.forwardRef(function (_a, ref) {
|
|
10686
10640
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'h6' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
10687
|
-
|
|
10688
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10641
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-header', className) }, rest, { ref: ref }), children));
|
|
10689
10642
|
});
|
|
10690
10643
|
CDropdownHeader.propTypes = {
|
|
10691
10644
|
children: propTypesExports.node,
|
|
@@ -10696,8 +10649,7 @@ CDropdownHeader.displayName = 'CDropdownHeader';
|
|
|
10696
10649
|
|
|
10697
10650
|
var CDropdownItem = React$1.forwardRef(function (_a, ref) {
|
|
10698
10651
|
var children = _a.children, className = _a.className, _b = _a.component, component = _b === void 0 ? 'a' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
10699
|
-
|
|
10700
|
-
return (React$1.createElement(CLink, __assign$1({ className: _className, component: component }, rest, { ref: ref }), children));
|
|
10652
|
+
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('dropdown-item', className), component: component }, rest, { ref: ref }), children));
|
|
10701
10653
|
});
|
|
10702
10654
|
CDropdownItem.propTypes = {
|
|
10703
10655
|
children: propTypesExports.node,
|
|
@@ -10708,8 +10660,7 @@ CDropdownItem.displayName = 'CDropdownItem';
|
|
|
10708
10660
|
|
|
10709
10661
|
var CDropdownItemPlain = React$1.forwardRef(function (_a, ref) {
|
|
10710
10662
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'span' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
10711
|
-
|
|
10712
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10663
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-item-text', className) }, rest, { ref: ref }), children));
|
|
10713
10664
|
});
|
|
10714
10665
|
CDropdownItemPlain.propTypes = {
|
|
10715
10666
|
children: propTypesExports.node,
|
|
@@ -10720,8 +10671,7 @@ CDropdownItemPlain.displayName = 'CDropdownItemPlain';
|
|
|
10720
10671
|
|
|
10721
10672
|
var CSpinner = React$1.forwardRef(function (_a, ref) {
|
|
10722
10673
|
var className = _a.className, color = _a.color, _b = _a.component, Component = _b === void 0 ? 'div' : _b, size = _a.size, _c = _a.variant, variant = _c === void 0 ? 'border' : _c, _d = _a.visuallyHiddenLabel, visuallyHiddenLabel = _d === void 0 ? 'Loading...' : _d, rest = __rest$1(_a, ["className", "color", "component", "size", "variant", "visuallyHiddenLabel"]);
|
|
10723
|
-
|
|
10724
|
-
return (React$1.createElement(Component, __assign$1({ className: _className, role: "status" }, rest, { ref: ref }),
|
|
10674
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1("spinner-".concat(variant), "text-".concat(color), size && "spinner-".concat(variant, "-").concat(size), className), role: "status" }, rest, { ref: ref }),
|
|
10725
10675
|
React$1.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
10726
10676
|
});
|
|
10727
10677
|
CSpinner.propTypes = {
|
|
@@ -10788,8 +10738,7 @@ CElementCover.displayName = 'CElementCover';
|
|
|
10788
10738
|
var CFooter = React$1.forwardRef(function (_a, ref) {
|
|
10789
10739
|
var _b;
|
|
10790
10740
|
var children = _a.children, className = _a.className, position = _a.position, rest = __rest$1(_a, ["children", "className", "position"]);
|
|
10791
|
-
|
|
10792
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10741
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('footer', (_b = {}, _b["footer-".concat(position)] = position, _b), className) }, rest, { ref: ref }), children));
|
|
10793
10742
|
});
|
|
10794
10743
|
CFooter.propTypes = {
|
|
10795
10744
|
children: propTypesExports.node,
|
|
@@ -10834,8 +10783,7 @@ var CCol = React$1.forwardRef(function (_a, ref) {
|
|
|
10834
10783
|
}
|
|
10835
10784
|
}
|
|
10836
10785
|
});
|
|
10837
|
-
|
|
10838
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10786
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'col', className) }, rest, { ref: ref }), children));
|
|
10839
10787
|
});
|
|
10840
10788
|
var span = propTypesExports.oneOfType([
|
|
10841
10789
|
propTypesExports.bool,
|
|
@@ -10883,8 +10831,7 @@ var CContainer = React$1.forwardRef(function (_a, ref) {
|
|
|
10883
10831
|
delete rest[bp];
|
|
10884
10832
|
breakpoint && repsonsiveClassNames.push("container-".concat(bp));
|
|
10885
10833
|
});
|
|
10886
|
-
|
|
10887
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10834
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'container', className) }, rest, { ref: ref }), children));
|
|
10888
10835
|
});
|
|
10889
10836
|
CContainer.propTypes = {
|
|
10890
10837
|
children: propTypesExports.node,
|
|
@@ -10928,8 +10875,7 @@ var CRow = React$1.forwardRef(function (_a, ref) {
|
|
|
10928
10875
|
}
|
|
10929
10876
|
}
|
|
10930
10877
|
});
|
|
10931
|
-
|
|
10932
|
-
return (React$1.createElement("div", { className: _className, ref: ref }, children));
|
|
10878
|
+
return (React$1.createElement("div", { className: classNames$1('row', repsonsiveClassNames, className), ref: ref }, children));
|
|
10933
10879
|
});
|
|
10934
10880
|
var bp = propTypesExports.shape({
|
|
10935
10881
|
cols: propTypesExports.oneOfType([propTypesExports.oneOf(['auto']), propTypesExports.number, propTypesExports.string]),
|
|
@@ -10952,15 +10898,7 @@ CRow.displayName = 'CRow';
|
|
|
10952
10898
|
var CHeader = React$1.forwardRef(function (_a, ref) {
|
|
10953
10899
|
var _b;
|
|
10954
10900
|
var children = _a.children, className = _a.className, container = _a.container, position = _a.position, rest = __rest$1(_a, ["children", "className", "container", "position"]);
|
|
10955
|
-
|
|
10956
|
-
var content;
|
|
10957
|
-
if (container) {
|
|
10958
|
-
content = (React$1.createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
10959
|
-
}
|
|
10960
|
-
else {
|
|
10961
|
-
content = children;
|
|
10962
|
-
}
|
|
10963
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), content));
|
|
10901
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('header', (_b = {}, _b["header-".concat(position)] = position, _b), className) }, rest, { ref: ref }), container ? (React$1.createElement("div", { className: typeof container === 'string' ? "container-".concat(container) : 'container' }, children)) : (React$1.createElement(React$1.Fragment, null, children))));
|
|
10964
10902
|
});
|
|
10965
10903
|
CHeader.propTypes = {
|
|
10966
10904
|
children: propTypesExports.node,
|
|
@@ -10982,8 +10920,7 @@ CHeader.displayName = 'CHeader';
|
|
|
10982
10920
|
|
|
10983
10921
|
var CHeaderBrand = React$1.forwardRef(function (_a, ref) {
|
|
10984
10922
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'a' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
10985
|
-
|
|
10986
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10923
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('header-brand', className) }, rest, { ref: ref }), children));
|
|
10987
10924
|
});
|
|
10988
10925
|
CHeaderBrand.propTypes = {
|
|
10989
10926
|
children: propTypesExports.node,
|
|
@@ -10994,8 +10931,7 @@ CHeaderBrand.displayName = 'CHeaderBrand';
|
|
|
10994
10931
|
|
|
10995
10932
|
var CHeaderDivider = React$1.forwardRef(function (_a, ref) {
|
|
10996
10933
|
var className = _a.className, rest = __rest$1(_a, ["className"]);
|
|
10997
|
-
|
|
10998
|
-
return React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }));
|
|
10934
|
+
return React$1.createElement("div", __assign$1({ className: classNames$1('header-divider', className) }, rest, { ref: ref }));
|
|
10999
10935
|
});
|
|
11000
10936
|
CHeaderDivider.propTypes = {
|
|
11001
10937
|
className: propTypesExports.string,
|
|
@@ -11004,8 +10940,7 @@ CHeaderDivider.displayName = 'CHeaderDivider';
|
|
|
11004
10940
|
|
|
11005
10941
|
var CHeaderNav = React$1.forwardRef(function (_a, ref) {
|
|
11006
10942
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'ul' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
11007
|
-
|
|
11008
|
-
return (React$1.createElement(Component, __assign$1({ className: _className, role: "navigation" }, rest, { ref: ref }), children));
|
|
10943
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('header-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11009
10944
|
});
|
|
11010
10945
|
CHeaderNav.propTypes = {
|
|
11011
10946
|
children: propTypesExports.node,
|
|
@@ -11016,8 +10951,7 @@ CHeaderNav.displayName = 'CHeaderNav';
|
|
|
11016
10951
|
|
|
11017
10952
|
var CHeaderText = React$1.forwardRef(function (_a, ref) {
|
|
11018
10953
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11019
|
-
|
|
11020
|
-
return (React$1.createElement("span", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10954
|
+
return (React$1.createElement("span", __assign$1({ className: classNames$1('header-text', className) }, rest, { ref: ref }), children));
|
|
11021
10955
|
});
|
|
11022
10956
|
CHeaderText.propTypes = {
|
|
11023
10957
|
children: propTypesExports.node,
|
|
@@ -11027,8 +10961,7 @@ CHeaderText.displayName = 'CHeaderText';
|
|
|
11027
10961
|
|
|
11028
10962
|
var CHeaderToggler = React$1.forwardRef(function (_a, ref) {
|
|
11029
10963
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11030
|
-
|
|
11031
|
-
return (React$1.createElement("button", __assign$1({ type: "button", className: _className }, rest, { ref: ref }), children ? children : React$1.createElement("span", { className: "header-toggler-icon" })));
|
|
10964
|
+
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('header-toggler', className) }, rest, { ref: ref }), children !== null && children !== void 0 ? children : React$1.createElement("span", { className: "header-toggler-icon" })));
|
|
11032
10965
|
});
|
|
11033
10966
|
CHeaderToggler.propTypes = {
|
|
11034
10967
|
children: propTypesExports.node,
|
|
@@ -11039,14 +10972,13 @@ CHeaderToggler.displayName = 'CHeaderToggler';
|
|
|
11039
10972
|
var CImage = React$1.forwardRef(function (_a, ref) {
|
|
11040
10973
|
var _b;
|
|
11041
10974
|
var align = _a.align, className = _a.className, fluid = _a.fluid, rounded = _a.rounded, thumbnail = _a.thumbnail, rest = __rest$1(_a, ["align", "className", "fluid", "rounded", "thumbnail"]);
|
|
11042
|
-
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
return React$1.createElement("img", __assign$1({ className: _className }, rest, { ref: ref }));
|
|
10975
|
+
return (React$1.createElement("img", __assign$1({ className: classNames$1((_b = {},
|
|
10976
|
+
_b["float-".concat(align)] = align && (align === 'start' || align === 'end'),
|
|
10977
|
+
_b['d-block mx-auto'] = align && align === 'center',
|
|
10978
|
+
_b['img-fluid'] = fluid,
|
|
10979
|
+
_b.rounded = rounded,
|
|
10980
|
+
_b['img-thumbnail'] = thumbnail,
|
|
10981
|
+
_b), className) || undefined }, rest, { ref: ref })));
|
|
11050
10982
|
});
|
|
11051
10983
|
CImage.propTypes = {
|
|
11052
10984
|
align: propTypesExports.oneOf(['start', 'center', 'end']),
|
|
@@ -11060,12 +10992,11 @@ CImage.displayName = 'CImage';
|
|
|
11060
10992
|
var CListGroup = React$1.forwardRef(function (_a, ref) {
|
|
11061
10993
|
var _b;
|
|
11062
10994
|
var children = _a.children, className = _a.className, _c = _a.component, Component = _c === void 0 ? 'ul' : _c, flush = _a.flush, layout = _a.layout;
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
return (React$1.createElement(Component, { className: _className, ref: ref }, children));
|
|
10995
|
+
return (React$1.createElement(Component, { className: classNames$1('list-group', (_b = {
|
|
10996
|
+
'list-group-flush': flush
|
|
10997
|
+
},
|
|
10998
|
+
_b["list-group-".concat(layout)] = layout,
|
|
10999
|
+
_b), className), ref: ref }, children));
|
|
11069
11000
|
});
|
|
11070
11001
|
CListGroup.propTypes = {
|
|
11071
11002
|
children: propTypesExports.node,
|
|
@@ -11086,12 +11017,6 @@ CListGroup.displayName = 'CListGroup';
|
|
|
11086
11017
|
var CListGroupItem = React$1.forwardRef(function (_a, ref) {
|
|
11087
11018
|
var _b;
|
|
11088
11019
|
var children = _a.children, active = _a.active, className = _a.className, disabled = _a.disabled, color = _a.color, _c = _a.component, component = _c === void 0 ? 'li' : _c, rest = __rest$1(_a, ["children", "active", "className", "disabled", "color", "component"]);
|
|
11089
|
-
var _className = classNames$1('list-group-item', (_b = {},
|
|
11090
|
-
_b["list-group-item-".concat(color)] = color,
|
|
11091
|
-
_b['list-group-item-action'] = component === 'a' || component === 'button',
|
|
11092
|
-
_b.active = active,
|
|
11093
|
-
_b.disabled = disabled,
|
|
11094
|
-
_b), className);
|
|
11095
11020
|
var Component = component === 'a' || component === 'button' ? CLink : component;
|
|
11096
11021
|
rest = __assign$1(__assign$1(__assign$1(__assign$1({}, ((component === 'a' || component === 'button') && {
|
|
11097
11022
|
active: active,
|
|
@@ -11099,7 +11024,12 @@ var CListGroupItem = React$1.forwardRef(function (_a, ref) {
|
|
|
11099
11024
|
component: component,
|
|
11100
11025
|
ref: ref,
|
|
11101
11026
|
})), (active && { 'aria-current': true })), (disabled && { 'aria-disabled': true })), rest);
|
|
11102
|
-
return (React$1.createElement(Component, __assign$1({ className:
|
|
11027
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('list-group-item', (_b = {},
|
|
11028
|
+
_b["list-group-item-".concat(color)] = color,
|
|
11029
|
+
_b['list-group-item-action'] = component === 'a' || component === 'button',
|
|
11030
|
+
_b.active = active,
|
|
11031
|
+
_b.disabled = disabled,
|
|
11032
|
+
_b), className) }, rest), children));
|
|
11103
11033
|
});
|
|
11104
11034
|
CListGroupItem.propTypes = {
|
|
11105
11035
|
active: propTypesExports.bool,
|
|
@@ -11126,8 +11056,7 @@ var CLoadingButton = React$1.forwardRef(function (_a, ref) {
|
|
|
11126
11056
|
}, timeout);
|
|
11127
11057
|
}
|
|
11128
11058
|
};
|
|
11129
|
-
|
|
11130
|
-
return (React$1.createElement(CButton, __assign$1({ className: _className }, (disabledOnLoading && _loading && { disabled: true }), { onClick: handleOnClick }, rest, { ref: ref }),
|
|
11059
|
+
return (React$1.createElement(CButton, __assign$1({ className: classNames$1('btn-loading', _loading && 'is-loading', className) }, (disabledOnLoading && _loading && { disabled: true }), { onClick: handleOnClick }, rest, { ref: ref }),
|
|
11131
11060
|
React$1.createElement(CSpinner, { className: "btn-loading-spinner", size: "sm", variant: spinnerType }),
|
|
11132
11061
|
children));
|
|
11133
11062
|
});
|
|
@@ -11144,8 +11073,7 @@ CLoadingButton.displayName = 'CLoadingButton';
|
|
|
11144
11073
|
|
|
11145
11074
|
var CModalContent = React$1.forwardRef(function (_a, ref) {
|
|
11146
11075
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11147
|
-
|
|
11148
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11076
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-content', className) }, rest, { ref: ref }), children));
|
|
11149
11077
|
});
|
|
11150
11078
|
CModalContent.propTypes = {
|
|
11151
11079
|
children: propTypesExports.node,
|
|
@@ -11156,16 +11084,15 @@ CModalContent.displayName = 'CModalContent';
|
|
|
11156
11084
|
var CModalDialog = React$1.forwardRef(function (_a, ref) {
|
|
11157
11085
|
var _b;
|
|
11158
11086
|
var children = _a.children, alignment = _a.alignment, className = _a.className, fullscreen = _a.fullscreen, scrollable = _a.scrollable, size = _a.size, rest = __rest$1(_a, ["children", "alignment", "className", "fullscreen", "scrollable", "size"]);
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11087
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-dialog', (_b = {
|
|
11088
|
+
'modal-dialog-centered': alignment === 'center'
|
|
11089
|
+
},
|
|
11090
|
+
_b[typeof fullscreen === 'boolean'
|
|
11091
|
+
? 'modal-fullscreen'
|
|
11092
|
+
: "modal-fullscreen-".concat(fullscreen, "-down")] = fullscreen,
|
|
11093
|
+
_b['modal-dialog-scrollable'] = scrollable,
|
|
11094
|
+
_b["modal-".concat(size)] = size,
|
|
11095
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
11169
11096
|
});
|
|
11170
11097
|
CModalDialog.propTypes = {
|
|
11171
11098
|
alignment: propTypesExports.oneOf(['top', 'center']),
|
|
@@ -11188,19 +11115,19 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
11188
11115
|
var forkedRef = useForkedRef(ref, modalRef);
|
|
11189
11116
|
var _h = React$1.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
11190
11117
|
var _j = React$1.useState(false), staticBackdrop = _j[0], setStaticBackdrop = _j[1];
|
|
11191
|
-
React$1.useEffect(function () {
|
|
11192
|
-
setVisible(visible);
|
|
11193
|
-
}, [visible]);
|
|
11194
11118
|
var contextValues = {
|
|
11195
11119
|
visible: _visible,
|
|
11196
11120
|
setVisible: setVisible,
|
|
11197
11121
|
};
|
|
11198
11122
|
React$1.useEffect(function () {
|
|
11199
|
-
|
|
11200
|
-
|
|
11123
|
+
setVisible(visible);
|
|
11124
|
+
}, [visible]);
|
|
11125
|
+
React$1.useEffect(function () {
|
|
11126
|
+
document.addEventListener('click', handleClickOutside);
|
|
11127
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
11201
11128
|
return function () {
|
|
11202
|
-
|
|
11203
|
-
|
|
11129
|
+
document.removeEventListener('click', handleClickOutside);
|
|
11130
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
11204
11131
|
};
|
|
11205
11132
|
}, [_visible]);
|
|
11206
11133
|
var handleDismiss = function () {
|
|
@@ -11213,19 +11140,6 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
11213
11140
|
onClosePrevented && onClosePrevented();
|
|
11214
11141
|
setTimeout(function () { return setStaticBackdrop(false); }, duration);
|
|
11215
11142
|
}, [staticBackdrop]);
|
|
11216
|
-
var getTransitionClass = function (state) {
|
|
11217
|
-
return state === 'entering'
|
|
11218
|
-
? 'd-block'
|
|
11219
|
-
: state === 'entered'
|
|
11220
|
-
? 'show d-block'
|
|
11221
|
-
: state === 'exiting'
|
|
11222
|
-
? 'd-block'
|
|
11223
|
-
: '';
|
|
11224
|
-
};
|
|
11225
|
-
var _className = classNames$1('modal', {
|
|
11226
|
-
'modal-static': staticBackdrop,
|
|
11227
|
-
fade: transition,
|
|
11228
|
-
}, className);
|
|
11229
11143
|
// Set focus to modal after open
|
|
11230
11144
|
React$1.useLayoutEffect(function () {
|
|
11231
11145
|
if (_visible) {
|
|
@@ -11237,7 +11151,7 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
11237
11151
|
setTimeout(function () {
|
|
11238
11152
|
var _a;
|
|
11239
11153
|
(_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11240
|
-
},
|
|
11154
|
+
}, transition ? duration : 0);
|
|
11241
11155
|
}
|
|
11242
11156
|
else {
|
|
11243
11157
|
document.body.classList.remove('modal-open');
|
|
@@ -11260,27 +11174,23 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
11260
11174
|
handleDismiss();
|
|
11261
11175
|
}
|
|
11262
11176
|
};
|
|
11263
|
-
var handleKeyDown =
|
|
11177
|
+
var handleKeyDown = function (event) {
|
|
11264
11178
|
if (event.key === 'Escape' && keyboard) {
|
|
11265
|
-
|
|
11179
|
+
handleDismiss();
|
|
11266
11180
|
}
|
|
11267
|
-
}, [modalRef, handleDismiss]);
|
|
11268
|
-
var modal = function (ref, transitionClass) {
|
|
11269
|
-
return (React$1.createElement(CModalContext.Provider, { value: contextValues },
|
|
11270
|
-
React$1.createElement("div", { className: classNames$1(_className, transitionClass), tabIndex: -1, role: "dialog", ref: ref },
|
|
11271
|
-
React$1.createElement(CModalDialog, { alignment: alignment, fullscreen: fullscreen, scrollable: scrollable, size: size },
|
|
11272
|
-
React$1.createElement(CModalContent, __assign$1({}, rest, { ref: modalContentRef }), children)))));
|
|
11273
11181
|
};
|
|
11274
11182
|
return (React$1.createElement(React$1.Fragment, null,
|
|
11275
|
-
React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: modalRef, onEnter: onShow, onExit: onClose, unmountOnExit: unmountOnClose, timeout:
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11183
|
+
React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: modalRef, onEnter: onShow, onExit: onClose, unmountOnExit: unmountOnClose, timeout: transition ? duration : 0 }, function (state) { return (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
11184
|
+
React$1.createElement(CModalContext.Provider, { value: contextValues },
|
|
11185
|
+
React$1.createElement("div", { className: classNames$1('modal', {
|
|
11186
|
+
'modal-static': staticBackdrop,
|
|
11187
|
+
fade: transition,
|
|
11188
|
+
show: state === 'entered',
|
|
11189
|
+
}, className), tabIndex: -1, role: "dialog", style: __assign$1({}, (state !== 'exited' && { display: 'block' })), ref: forkedRef },
|
|
11190
|
+
React$1.createElement(CModalDialog, { alignment: alignment, fullscreen: fullscreen, scrollable: scrollable, size: size },
|
|
11191
|
+
React$1.createElement(CModalContent, __assign$1({}, rest, { ref: modalContentRef }), children)))))); }),
|
|
11192
|
+
backdrop && (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
11193
|
+
React$1.createElement(CBackdrop, { visible: _visible })))));
|
|
11284
11194
|
});
|
|
11285
11195
|
CModal.propTypes = {
|
|
11286
11196
|
alignment: propTypesExports.oneOf(['top', 'center']),
|
|
@@ -11307,8 +11217,7 @@ CModal.displayName = 'CModal';
|
|
|
11307
11217
|
|
|
11308
11218
|
var CModalBody = React$1.forwardRef(function (_a, ref) {
|
|
11309
11219
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11310
|
-
|
|
11311
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11220
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-body', className) }, rest, { ref: ref }), children));
|
|
11312
11221
|
});
|
|
11313
11222
|
CModalBody.propTypes = {
|
|
11314
11223
|
children: propTypesExports.node,
|
|
@@ -11318,8 +11227,7 @@ CModalBody.displayName = 'CModalBody';
|
|
|
11318
11227
|
|
|
11319
11228
|
var CModalFooter = React$1.forwardRef(function (_a, ref) {
|
|
11320
11229
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11321
|
-
|
|
11322
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11230
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-footer', className) }, rest, { ref: ref }), children));
|
|
11323
11231
|
});
|
|
11324
11232
|
CModalFooter.propTypes = {
|
|
11325
11233
|
children: propTypesExports.node,
|
|
@@ -11330,8 +11238,7 @@ CModalFooter.displayName = 'CModalFooter';
|
|
|
11330
11238
|
var CModalHeader = React$1.forwardRef(function (_a, ref) {
|
|
11331
11239
|
var children = _a.children, className = _a.className, _b = _a.closeButton, closeButton = _b === void 0 ? true : _b, rest = __rest$1(_a, ["children", "className", "closeButton"]);
|
|
11332
11240
|
var setVisible = React$1.useContext(CModalContext).setVisible;
|
|
11333
|
-
|
|
11334
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
11241
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-header', className) }, rest, { ref: ref }),
|
|
11335
11242
|
children,
|
|
11336
11243
|
closeButton && React$1.createElement(CCloseButton, { onClick: function () { return setVisible(false); } })));
|
|
11337
11244
|
});
|
|
@@ -11344,8 +11251,7 @@ CModalHeader.displayName = 'CModalHeader';
|
|
|
11344
11251
|
|
|
11345
11252
|
var CModalTitle = React$1.forwardRef(function (_a, ref) {
|
|
11346
11253
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
11347
|
-
|
|
11348
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11254
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('modal-title', className) }, rest, { ref: ref }), children));
|
|
11349
11255
|
});
|
|
11350
11256
|
CModalTitle.propTypes = {
|
|
11351
11257
|
children: propTypesExports.node,
|
|
@@ -11385,7 +11291,7 @@ var CVirtualScroller = React$1.forwardRef(function (_a, ref) {
|
|
|
11385
11291
|
React$1.useEffect(function () {
|
|
11386
11292
|
virtualScrollRef.current && virtualScrollRef.current.scrollTop;
|
|
11387
11293
|
virtualScrollRef.current &&
|
|
11388
|
-
setViewportPadding(parseFloat(getComputedStyle(virtualScrollRef.current).paddingTop));
|
|
11294
|
+
setViewportPadding(Number.parseFloat(getComputedStyle(virtualScrollRef.current).paddingTop));
|
|
11389
11295
|
});
|
|
11390
11296
|
React$1.useEffect(function () {
|
|
11391
11297
|
setItemsNumber(itemsNumber || React$1.Children.count(children));
|
|
@@ -11405,8 +11311,7 @@ var CVirtualScroller = React$1.forwardRef(function (_a, ref) {
|
|
|
11405
11311
|
setCurrentItemIndex(_currentItemIndex);
|
|
11406
11312
|
onScroll && onScroll(_currentItemIndex);
|
|
11407
11313
|
};
|
|
11408
|
-
|
|
11409
|
-
return (React$1.createElement("div", { className: _className, onScroll: function (event) {
|
|
11314
|
+
return (React$1.createElement("div", { className: classNames$1('virtual-scroller', className), onScroll: function (event) {
|
|
11410
11315
|
return handleScroll(event.target.scrollTop);
|
|
11411
11316
|
}, ref: forkedRef, style: {
|
|
11412
11317
|
height: maxHeight > viewportHeight ? viewportHeight : maxHeight,
|
|
@@ -11430,8 +11335,8 @@ var CVirtualScroller = React$1.forwardRef(function (_a, ref) {
|
|
|
11430
11335
|
return node &&
|
|
11431
11336
|
node.offsetHeight &&
|
|
11432
11337
|
setItemHeight(node.offsetHeight +
|
|
11433
|
-
parseFloat(getComputedStyle(node).marginTop) +
|
|
11434
|
-
parseFloat(getComputedStyle(node).marginBottom));
|
|
11338
|
+
Number.parseFloat(getComputedStyle(node).marginTop) +
|
|
11339
|
+
Number.parseFloat(getComputedStyle(node).marginBottom));
|
|
11435
11340
|
},
|
|
11436
11341
|
});
|
|
11437
11342
|
}
|
|
@@ -11445,7 +11350,7 @@ CVirtualScroller.propTypes = {
|
|
|
11445
11350
|
CVirtualScroller.displayName = 'CVirtualScroller';
|
|
11446
11351
|
|
|
11447
11352
|
var filterOptionsList = function (search, _options) {
|
|
11448
|
-
return search.length
|
|
11353
|
+
return search.length > 0
|
|
11449
11354
|
? _options &&
|
|
11450
11355
|
_options.reduce(function (acc, val) {
|
|
11451
11356
|
var options = val.options &&
|
|
@@ -11453,8 +11358,8 @@ var filterOptionsList = function (search, _options) {
|
|
|
11453
11358
|
return element.text && element.text.toLowerCase().includes(search.toLowerCase());
|
|
11454
11359
|
});
|
|
11455
11360
|
if ((val.text && val.text.toLowerCase().includes(search.toLowerCase())) ||
|
|
11456
|
-
(options && options.length)) {
|
|
11457
|
-
acc.push(Object.assign({}, val, options && options.length && { options: options }));
|
|
11361
|
+
(options && options.length > 0)) {
|
|
11362
|
+
acc.push(Object.assign({}, val, options && options.length > 0 && { options: options }));
|
|
11458
11363
|
}
|
|
11459
11364
|
return acc;
|
|
11460
11365
|
}, [])
|
|
@@ -11626,16 +11531,6 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11626
11531
|
nativeSelectRef.current &&
|
|
11627
11532
|
nativeSelectRef.current.dispatchEvent(new Event('change', { bubbles: true }));
|
|
11628
11533
|
}, [JSON.stringify(selected)]);
|
|
11629
|
-
var _className = classNames$1('form-multi-select', (_b = {
|
|
11630
|
-
'form-multi-select-with-cleaner': cleaner
|
|
11631
|
-
},
|
|
11632
|
-
_b["form-multi-select-".concat(size)] = size,
|
|
11633
|
-
_b.show = _visible,
|
|
11634
|
-
_b['form-multi-select-selection-tags'] = multiple && selectionType === 'tags',
|
|
11635
|
-
_b.disabled = disabled,
|
|
11636
|
-
_b['is-invalid'] = invalid,
|
|
11637
|
-
_b['is-valid'] = valid,
|
|
11638
|
-
_b), className);
|
|
11639
11534
|
React$1.useEffect(function () {
|
|
11640
11535
|
isInitialMount.current = false;
|
|
11641
11536
|
}, []);
|
|
@@ -11647,8 +11542,9 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11647
11542
|
onFilterChange && onFilterChange(target.value);
|
|
11648
11543
|
};
|
|
11649
11544
|
var handleSearchKeyDown = function (event) {
|
|
11650
|
-
if (_search.length)
|
|
11545
|
+
if (_search.length > 0) {
|
|
11651
11546
|
return;
|
|
11547
|
+
}
|
|
11652
11548
|
if (event.key === 'Backspace' || event.key === 'Delete') {
|
|
11653
11549
|
var last_1 = selected.filter(function (option) { return !option.disabled; }).pop();
|
|
11654
11550
|
last_1 && setSelected(selected.filter(function (option) { return option.value !== last_1.value; }));
|
|
@@ -11681,18 +11577,27 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11681
11577
|
React$1.createElement(CMultiSelectNativeSelect, { multiple: multiple, options: selected, value: multiple
|
|
11682
11578
|
? selected.map(function (option) { return option.value.toString(); })
|
|
11683
11579
|
: selected.map(function (option) { return option.value; })[0], onChange: function () { return onChange && onChange(selected); }, ref: nativeSelectRef }),
|
|
11684
|
-
React$1.createElement(CPicker, { className:
|
|
11580
|
+
React$1.createElement(CPicker, { className: classNames$1('form-multi-select', (_b = {
|
|
11581
|
+
'form-multi-select-with-cleaner': cleaner
|
|
11582
|
+
},
|
|
11583
|
+
_b["form-multi-select-".concat(size)] = size,
|
|
11584
|
+
_b.show = _visible,
|
|
11585
|
+
_b['form-multi-select-selection-tags'] = multiple && selectionType === 'tags',
|
|
11586
|
+
_b.disabled = disabled,
|
|
11587
|
+
_b['is-invalid'] = invalid,
|
|
11588
|
+
_b['is-valid'] = valid,
|
|
11589
|
+
_b), className), disabled: disabled, id: id, onHide: function () { return setVisible(false); }, onShow: function () {
|
|
11685
11590
|
searchRef.current && searchRef.current.focus();
|
|
11686
11591
|
setVisible(true);
|
|
11687
11592
|
}, toggler: React$1.createElement("div", null,
|
|
11688
11593
|
React$1.createElement(CMultiSelectSelection, { multiple: multiple, onRemove: function (option) { return !disabled && handleOptionOnClick(option); }, search: search, selected: selected, selectionType: selectionType, selectionTypeCounterText: selectionTypeCounterText }),
|
|
11689
11594
|
multiple && cleaner && selected.length > 0 && (React$1.createElement("button", { type: "button", className: "form-multi-select-selection-cleaner", onClick: function () { return handleDeselectAll(); } })),
|
|
11690
|
-
search && (React$1.createElement("input", __assign$1({ type: "text", className: "form-multi-select-search", disabled: disabled, onChange: function (event) { return handleSearchChange(event); }, onKeyDown: function (event) { return handleSearchKeyDown(event); } }, (selected.length === 0 && { placeholder: placeholder }), (selected.length &&
|
|
11595
|
+
search && (React$1.createElement("input", __assign$1({ type: "text", className: "form-multi-select-search", disabled: disabled, onChange: function (event) { return handleSearchChange(event); }, onKeyDown: function (event) { return handleSearchKeyDown(event); } }, (selected.length === 0 && { placeholder: placeholder }), (selected.length > 0 &&
|
|
11691
11596
|
selectionType === 'counter' && {
|
|
11692
11597
|
placeholder: "".concat(selected.length, " ").concat(selectionTypeCounterText),
|
|
11693
|
-
}), (selected.length &&
|
|
11598
|
+
}), (selected.length > 0 &&
|
|
11694
11599
|
!multiple && { placeholder: selected.map(function (option) { return option.text; })[0] }), (multiple &&
|
|
11695
|
-
selected.length &&
|
|
11600
|
+
selected.length > 0 &&
|
|
11696
11601
|
selectionType !== 'counter' && { size: _search.length + 2 }), { ref: searchRef })))), visible: _visible, ref: ref },
|
|
11697
11602
|
React$1.createElement(React$1.Fragment, null,
|
|
11698
11603
|
multiple && selectAll && (React$1.createElement("button", { type: "button", className: "form-multi-select-all", onClick: function () { return handleSelectAll(); } }, selectAllLabel)),
|
|
@@ -11704,11 +11609,10 @@ CMultiSelect.displayName = 'CMultiSelect';
|
|
|
11704
11609
|
var CNav = React$1.forwardRef(function (_a, ref) {
|
|
11705
11610
|
var _b;
|
|
11706
11611
|
var children = _a.children, className = _a.className, _c = _a.component, Component = _c === void 0 ? 'ul' : _c, layout = _a.layout, variant = _a.variant, rest = __rest$1(_a, ["children", "className", "component", "layout", "variant"]);
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
return (React$1.createElement(Component, __assign$1({ className: _className, role: "navigation" }, rest, { ref: ref }), children));
|
|
11612
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('nav', (_b = {},
|
|
11613
|
+
_b["nav-".concat(layout)] = layout,
|
|
11614
|
+
_b["nav-".concat(variant)] = variant,
|
|
11615
|
+
_b), className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11712
11616
|
});
|
|
11713
11617
|
CNav.propTypes = {
|
|
11714
11618
|
children: propTypesExports.node,
|
|
@@ -11721,8 +11625,7 @@ CNav.displayName = 'CNav';
|
|
|
11721
11625
|
|
|
11722
11626
|
var CNavGroupItems = React$1.forwardRef(function (_a, ref) {
|
|
11723
11627
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11724
|
-
|
|
11725
|
-
return (React$1.createElement("ul", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11628
|
+
return (React$1.createElement("ul", __assign$1({ className: classNames$1('nav-group-items', className) }, rest, { ref: ref }), children));
|
|
11726
11629
|
});
|
|
11727
11630
|
CNavGroupItems.propTypes = {
|
|
11728
11631
|
children: propTypesExports.node,
|
|
@@ -11738,8 +11641,7 @@ var CSidebarNav = React$1.forwardRef(function (_a, ref) {
|
|
|
11738
11641
|
visibleGroup: visibleGroup,
|
|
11739
11642
|
setVisibleGroup: setVisibleGroup,
|
|
11740
11643
|
};
|
|
11741
|
-
|
|
11742
|
-
return (React$1.createElement("ul", __assign$1({ className: classes, ref: ref }, rest),
|
|
11644
|
+
return (React$1.createElement("ul", __assign$1({ className: classNames$1('sidebar-nav', className), ref: ref }, rest),
|
|
11743
11645
|
React$1.createElement(CNavContext.Provider, { value: CNavContextValues }, React$1.Children.map(children, function (child, index) {
|
|
11744
11646
|
if (React$1.isValidElement(child)) {
|
|
11745
11647
|
return React$1.cloneElement(child, {
|
|
@@ -11798,8 +11700,7 @@ var CNavGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
11798
11700
|
exiting: { display: 'block', height: height },
|
|
11799
11701
|
exited: { height: height },
|
|
11800
11702
|
};
|
|
11801
|
-
|
|
11802
|
-
return (React$1.createElement("li", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
11703
|
+
return (React$1.createElement("li", __assign$1({ className: classNames$1('nav-group', { show: _visible }, className) }, rest, { ref: ref }),
|
|
11803
11704
|
toggler && (React$1.createElement("a", { className: "nav-link nav-group-toggle", onClick: function (event) { return handleTogglerOnCLick(event); } }, toggler)),
|
|
11804
11705
|
React$1.createElement(Transition$1, { in: _visible, nodeRef: navItemsRef, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 300 }, function (state) { return (React$1.createElement("ul", { className: classNames$1('nav-group-items', {
|
|
11805
11706
|
compact: compact,
|
|
@@ -11828,13 +11729,12 @@ var CNavLink = React$1.forwardRef(function (_a, ref) {
|
|
|
11828
11729
|
var navLinkRef = React$1.useRef(null);
|
|
11829
11730
|
var forkedRef = useForkedRef(ref, navLinkRef);
|
|
11830
11731
|
var setVisibleGroup = React$1.useContext(CNavContext).setVisibleGroup;
|
|
11831
|
-
var _className = classNames$1('nav-link', className);
|
|
11832
11732
|
React$1.useEffect(function () {
|
|
11833
11733
|
var _a;
|
|
11834
11734
|
rest.active = (_a = navLinkRef.current) === null || _a === void 0 ? void 0 : _a.classList.contains('active');
|
|
11835
11735
|
idx && rest.active && setVisibleGroup(idx);
|
|
11836
11736
|
}, [rest.active, className]);
|
|
11837
|
-
return (React$1.createElement(CLink, __assign$1({ className:
|
|
11737
|
+
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('nav-link', className) }, rest, { ref: forkedRef }), children));
|
|
11838
11738
|
});
|
|
11839
11739
|
CNavLink.propTypes = {
|
|
11840
11740
|
children: propTypesExports.node,
|
|
@@ -11845,11 +11745,7 @@ CNavLink.displayName = 'CNavLink';
|
|
|
11845
11745
|
|
|
11846
11746
|
var CNavItem = React$1.forwardRef(function (_a, ref) {
|
|
11847
11747
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11848
|
-
|
|
11849
|
-
if (rest.href || rest.to) {
|
|
11850
|
-
children = (React$1.createElement(CNavLink, __assign$1({ className: className }, rest), children));
|
|
11851
|
-
}
|
|
11852
|
-
return (React$1.createElement("li", { className: _className, ref: ref }, children));
|
|
11748
|
+
return (React$1.createElement("li", { className: classNames$1('nav-item', className), ref: ref }, rest.href || rest.to ? (React$1.createElement(CNavLink, __assign$1({ className: className }, rest), children)) : (children)));
|
|
11853
11749
|
});
|
|
11854
11750
|
CNavItem.propTypes = {
|
|
11855
11751
|
children: propTypesExports.node,
|
|
@@ -11859,8 +11755,7 @@ CNavItem.displayName = 'CNavItem';
|
|
|
11859
11755
|
|
|
11860
11756
|
var CNavTitle = React$1.forwardRef(function (_a, ref) {
|
|
11861
11757
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11862
|
-
|
|
11863
|
-
return (React$1.createElement("li", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11758
|
+
return (React$1.createElement("li", __assign$1({ className: classNames$1('nav-title', className) }, rest, { ref: ref }), children));
|
|
11864
11759
|
});
|
|
11865
11760
|
CNavTitle.propTypes = {
|
|
11866
11761
|
children: propTypesExports.node,
|
|
@@ -11871,19 +11766,11 @@ CNavTitle.displayName = 'CNavTitle';
|
|
|
11871
11766
|
var CNavbar = React$1.forwardRef(function (_a, ref) {
|
|
11872
11767
|
var _b;
|
|
11873
11768
|
var children = _a.children, className = _a.className, color = _a.color, colorScheme = _a.colorScheme, _c = _a.component, Component = _c === void 0 ? 'nav' : _c, container = _a.container, expand = _a.expand, placement = _a.placement, rest = __rest$1(_a, ["children", "className", "color", "colorScheme", "component", "container", "expand", "placement"]);
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
|
|
11879
|
-
var content;
|
|
11880
|
-
if (container) {
|
|
11881
|
-
content = (React$1.createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
11882
|
-
}
|
|
11883
|
-
else {
|
|
11884
|
-
content = children;
|
|
11885
|
-
}
|
|
11886
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), content));
|
|
11769
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar', (_b = {},
|
|
11770
|
+
_b["bg-".concat(color)] = color,
|
|
11771
|
+
_b["navbar-".concat(colorScheme)] = colorScheme,
|
|
11772
|
+
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-".concat(expand)] = expand,
|
|
11773
|
+
_b), placement, className) }, rest, { ref: ref }), container ? (React$1.createElement("div", { className: typeof container === 'string' ? "container-".concat(container) : 'container' }, children)) : (React$1.createElement(React$1.Fragment, null, children))));
|
|
11887
11774
|
});
|
|
11888
11775
|
CNavbar.propTypes = {
|
|
11889
11776
|
children: propTypesExports.node,
|
|
@@ -11912,9 +11799,8 @@ CNavbar.displayName = 'CNavbar';
|
|
|
11912
11799
|
|
|
11913
11800
|
var CNavbarBrand = React$1.forwardRef(function (_a, ref) {
|
|
11914
11801
|
var children = _a.children, component = _a.component, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
11915
|
-
var Component = component ? component : rest.href ? 'a' : 'span';
|
|
11916
|
-
|
|
11917
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11802
|
+
var Component = component !== null && component !== void 0 ? component : (rest.href ? 'a' : 'span');
|
|
11803
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar-brand', className) }, rest, { ref: ref }), children));
|
|
11918
11804
|
});
|
|
11919
11805
|
CNavbarBrand.propTypes = {
|
|
11920
11806
|
children: propTypesExports.node,
|
|
@@ -11925,8 +11811,7 @@ CNavbarBrand.displayName = 'CNavbarBrand';
|
|
|
11925
11811
|
|
|
11926
11812
|
var CNavbarNav = React$1.forwardRef(function (_a, ref) {
|
|
11927
11813
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'ul' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
11928
|
-
|
|
11929
|
-
return (React$1.createElement(Component, __assign$1({ className: _className, role: "navigation" }, rest, { ref: ref }), children));
|
|
11814
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11930
11815
|
});
|
|
11931
11816
|
CNavbarNav.propTypes = {
|
|
11932
11817
|
children: propTypesExports.node,
|
|
@@ -11937,8 +11822,7 @@ CNavbarNav.displayName = 'CNavbarNav';
|
|
|
11937
11822
|
|
|
11938
11823
|
var CNavbarText = React$1.forwardRef(function (_a, ref) {
|
|
11939
11824
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11940
|
-
|
|
11941
|
-
return (React$1.createElement("span", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11825
|
+
return (React$1.createElement("span", __assign$1({ className: classNames$1('navbar-text', className) }, rest, { ref: ref }), children));
|
|
11942
11826
|
});
|
|
11943
11827
|
CNavbarText.propTypes = {
|
|
11944
11828
|
children: propTypesExports.node,
|
|
@@ -11948,8 +11832,7 @@ CNavbarText.displayName = 'CNavbarText';
|
|
|
11948
11832
|
|
|
11949
11833
|
var CNavbarToggler = React$1.forwardRef(function (_a, ref) {
|
|
11950
11834
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11951
|
-
|
|
11952
|
-
return (React$1.createElement("button", __assign$1({ type: "button", className: _className }, rest, { ref: ref }), children ? children : React$1.createElement("span", { className: "navbar-toggler-icon" })));
|
|
11835
|
+
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('navbar-toggler', className) }, rest, { ref: ref }), children !== null && children !== void 0 ? children : React$1.createElement("span", { className: "navbar-toggler-icon" })));
|
|
11953
11836
|
});
|
|
11954
11837
|
CNavbarToggler.propTypes = {
|
|
11955
11838
|
children: propTypesExports.node,
|
|
@@ -11958,9 +11841,8 @@ CNavbarToggler.propTypes = {
|
|
|
11958
11841
|
CNavbarToggler.displayName = 'CNavbarToggler';
|
|
11959
11842
|
|
|
11960
11843
|
var COffcanvas = React$1.forwardRef(function (_a, ref) {
|
|
11961
|
-
var _b;
|
|
11962
|
-
var
|
|
11963
|
-
var _j = React$1.useState(visible), _visible = _j[0], setVisible = _j[1];
|
|
11844
|
+
var children = _a.children, _b = _a.backdrop, backdrop = _b === void 0 ? true : _b, className = _a.className, _c = _a.keyboard, keyboard = _c === void 0 ? true : _c, onHide = _a.onHide, onShow = _a.onShow, placement = _a.placement, _d = _a.portal, portal = _d === void 0 ? false : _d, _e = _a.responsive, responsive = _e === void 0 ? true : _e, _f = _a.scroll, scroll = _f === void 0 ? false : _f, _g = _a.visible, visible = _g === void 0 ? false : _g, rest = __rest$1(_a, ["children", "backdrop", "className", "keyboard", "onHide", "onShow", "placement", "portal", "responsive", "scroll", "visible"]);
|
|
11845
|
+
var _h = React$1.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
11964
11846
|
var offcanvasRef = React$1.useRef(null);
|
|
11965
11847
|
var forkedRef = useForkedRef(ref, offcanvasRef);
|
|
11966
11848
|
React$1.useEffect(function () {
|
|
@@ -11979,19 +11861,6 @@ var COffcanvas = React$1.forwardRef(function (_a, ref) {
|
|
|
11979
11861
|
document.body.style.removeProperty('padding-right');
|
|
11980
11862
|
}
|
|
11981
11863
|
}, [_visible]);
|
|
11982
|
-
var getTransitionClass = function (state) {
|
|
11983
|
-
return state === 'entering'
|
|
11984
|
-
? 'showing'
|
|
11985
|
-
: state === 'entered'
|
|
11986
|
-
? 'show'
|
|
11987
|
-
: state === 'exiting'
|
|
11988
|
-
? 'show hiding'
|
|
11989
|
-
: '';
|
|
11990
|
-
};
|
|
11991
|
-
var _className = classNames$1((_b = {},
|
|
11992
|
-
_b["offcanvas".concat(typeof responsive !== 'boolean' ? '-' + responsive : '')] = responsive,
|
|
11993
|
-
_b["offcanvas-".concat(placement)] = placement,
|
|
11994
|
-
_b), className);
|
|
11995
11864
|
var handleDismiss = function () {
|
|
11996
11865
|
setVisible(false);
|
|
11997
11866
|
};
|
|
@@ -12000,25 +11869,25 @@ var COffcanvas = React$1.forwardRef(function (_a, ref) {
|
|
|
12000
11869
|
setVisible(false);
|
|
12001
11870
|
}
|
|
12002
11871
|
};
|
|
12003
|
-
var handleKeyDown =
|
|
11872
|
+
var handleKeyDown = function (event) {
|
|
12004
11873
|
if (event.key === 'Escape' && keyboard) {
|
|
12005
11874
|
return handleDismiss();
|
|
12006
11875
|
}
|
|
12007
|
-
}, [ref, handleDismiss]);
|
|
12008
|
-
var offcanvas = function (ref, state) {
|
|
12009
|
-
return (React$1.createElement(React$1.Fragment, null,
|
|
12010
|
-
React$1.createElement("div", __assign$1({ className: classNames$1(_className, getTransitionClass(state)), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, rest, { ref: ref }), children)));
|
|
12011
11876
|
};
|
|
12012
11877
|
return (React$1.createElement(React$1.Fragment, null,
|
|
12013
11878
|
React$1.createElement(Transition$1, { in: _visible, nodeRef: offcanvasRef, onEnter: onShow, onEntered: function () { var _a; return (_a = offcanvasRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }, onExit: onHide, timeout: 300 }, function (state) {
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
:
|
|
11879
|
+
var _a;
|
|
11880
|
+
return (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
11881
|
+
React$1.createElement("div", __assign$1({ className: classNames$1((_a = {},
|
|
11882
|
+
_a["offcanvas".concat(typeof responsive === 'string' ? '-' + responsive : '')] = responsive,
|
|
11883
|
+
_a["offcanvas-".concat(placement)] = placement,
|
|
11884
|
+
_a.showing = state === 'entering',
|
|
11885
|
+
_a.show = state === 'entered',
|
|
11886
|
+
_a['show hiding'] = state === 'exiting',
|
|
11887
|
+
_a), className), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, rest, { ref: forkedRef }), children)));
|
|
12017
11888
|
}),
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
ReactDOM.createPortal(React$1.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleBackdropDismiss, visible: _visible }), document.body)
|
|
12021
|
-
: backdrop && (React$1.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleBackdropDismiss, visible: _visible }))));
|
|
11889
|
+
backdrop && (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
11890
|
+
React$1.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleBackdropDismiss, visible: _visible })))));
|
|
12022
11891
|
});
|
|
12023
11892
|
COffcanvas.propTypes = {
|
|
12024
11893
|
backdrop: propTypesExports.oneOfType([propTypesExports.bool, propTypesExports.oneOf(['static'])]),
|
|
@@ -12041,8 +11910,7 @@ COffcanvas.displayName = 'COffcanvas';
|
|
|
12041
11910
|
|
|
12042
11911
|
var COffcanvasBody = React$1.forwardRef(function (_a, ref) {
|
|
12043
11912
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
12044
|
-
|
|
12045
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11913
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('offcanvas-body', className) }, rest, { ref: ref }), children));
|
|
12046
11914
|
});
|
|
12047
11915
|
COffcanvasBody.propTypes = {
|
|
12048
11916
|
children: propTypesExports.node,
|
|
@@ -12052,8 +11920,7 @@ COffcanvasBody.displayName = 'COffcanvasBody';
|
|
|
12052
11920
|
|
|
12053
11921
|
var COffcanvasHeader = React$1.forwardRef(function (_a, ref) {
|
|
12054
11922
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
12055
|
-
|
|
12056
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11923
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('offcanvas-header', className) }, rest, { ref: ref }), children));
|
|
12057
11924
|
});
|
|
12058
11925
|
COffcanvasHeader.propTypes = {
|
|
12059
11926
|
children: propTypesExports.node,
|
|
@@ -12063,8 +11930,7 @@ COffcanvasHeader.displayName = 'COffcanvasHeader';
|
|
|
12063
11930
|
|
|
12064
11931
|
var COffcanvasTitle = React$1.forwardRef(function (_a, ref) {
|
|
12065
11932
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
12066
|
-
|
|
12067
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11933
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('offcanvas-title', className) }, rest, { ref: ref }), children));
|
|
12068
11934
|
});
|
|
12069
11935
|
COffcanvasTitle.propTypes = {
|
|
12070
11936
|
children: propTypesExports.node,
|
|
@@ -12076,12 +11942,11 @@ COffcanvasTitle.displayName = 'COffcanvasTitle';
|
|
|
12076
11942
|
var CPagination = React$1.forwardRef(function (_a, ref) {
|
|
12077
11943
|
var _b;
|
|
12078
11944
|
var children = _a.children, align = _a.align, className = _a.className, size = _a.size, rest = __rest$1(_a, ["children", "align", "className", "size"]);
|
|
12079
|
-
var _className = classNames$1('pagination', (_b = {},
|
|
12080
|
-
_b["justify-content-".concat(align)] = align,
|
|
12081
|
-
_b["pagination-".concat(size)] = size,
|
|
12082
|
-
_b), className);
|
|
12083
11945
|
return (React$1.createElement("nav", __assign$1({ ref: ref }, rest),
|
|
12084
|
-
React$1.createElement("ul", { className:
|
|
11946
|
+
React$1.createElement("ul", { className: classNames$1('pagination', (_b = {},
|
|
11947
|
+
_b["justify-content-".concat(align)] = align,
|
|
11948
|
+
_b["pagination-".concat(size)] = size,
|
|
11949
|
+
_b), className) }, children)));
|
|
12085
11950
|
});
|
|
12086
11951
|
CPagination.propTypes = {
|
|
12087
11952
|
align: propTypesExports.oneOf(['start', 'center', 'end']),
|
|
@@ -12093,12 +11958,11 @@ CPagination.displayName = 'CPagination';
|
|
|
12093
11958
|
|
|
12094
11959
|
var CPaginationItem = React$1.forwardRef(function (_a, ref) {
|
|
12095
11960
|
var children = _a.children, className = _a.className, component = _a.component, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
12096
|
-
var
|
|
12097
|
-
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
return (React$1.createElement("li", __assign$1({ className: _className }, (rest.active && { 'aria-current': 'page' })), Component === 'a' ? (React$1.createElement(CLink, __assign$1({ className: "page-link", component: Component }, rest, { ref: ref }), children)) : (React$1.createElement(Component, { className: "page-link", ref: ref }, children))));
|
|
11961
|
+
var Component = component !== null && component !== void 0 ? component : (rest.active ? 'span' : 'a');
|
|
11962
|
+
return (React$1.createElement("li", __assign$1({ className: classNames$1('page-item', {
|
|
11963
|
+
active: rest.active,
|
|
11964
|
+
disabled: rest.disabled,
|
|
11965
|
+
}, className) }, (rest.active && { 'aria-current': 'page' })), Component === 'a' ? (React$1.createElement(CLink, __assign$1({ className: "page-link", component: Component }, rest, { ref: ref }), children)) : (React$1.createElement(Component, { className: "page-link", ref: ref }, children))));
|
|
12102
11966
|
});
|
|
12103
11967
|
CPaginationItem.propTypes = {
|
|
12104
11968
|
children: propTypesExports.node,
|
|
@@ -12130,11 +11994,10 @@ var CPlaceholder = React$1.forwardRef(function (_a, ref) {
|
|
|
12130
11994
|
repsonsiveClassNames.push("col".concat(infix));
|
|
12131
11995
|
}
|
|
12132
11996
|
});
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11997
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1(animation ? "placeholder-".concat(animation) : 'placeholder', (_b = {},
|
|
11998
|
+
_b["bg-".concat(color)] = color,
|
|
11999
|
+
_b["placeholder-".concat(size)] = size,
|
|
12000
|
+
_b), repsonsiveClassNames, className) }, rest, { ref: ref }), children));
|
|
12138
12001
|
});
|
|
12139
12002
|
CPlaceholder.propTypes = {
|
|
12140
12003
|
animation: propTypesExports.oneOf(['glow', 'wave']),
|
|
@@ -12149,12 +12012,11 @@ CPlaceholder.displayName = 'CPlaceholder';
|
|
|
12149
12012
|
var CProgressBar = React$1.forwardRef(function (_a, ref) {
|
|
12150
12013
|
var _b;
|
|
12151
12014
|
var children = _a.children, animated = _a.animated, className = _a.className, color = _a.color, _c = _a.value, value = _c === void 0 ? 0 : _c, variant = _a.variant, rest = __rest$1(_a, ["children", "animated", "className", "color", "value", "variant"]);
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
return (React$1.createElement("div", __assign$1({ className: _className, role: "progressbar", style: { width: "".concat(value, "%") }, "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": 100 }, rest, { ref: ref }), children));
|
|
12015
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('progress-bar', (_b = {},
|
|
12016
|
+
_b["bg-".concat(color)] = color,
|
|
12017
|
+
_b["progress-bar-".concat(variant)] = variant,
|
|
12018
|
+
_b['progress-bar-animated'] = animated,
|
|
12019
|
+
_b), className), role: "progressbar", style: { width: "".concat(value, "%") }, "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": 100 }, rest, { ref: ref }), children));
|
|
12158
12020
|
});
|
|
12159
12021
|
CProgressBar.propTypes = {
|
|
12160
12022
|
animated: propTypesExports.bool,
|
|
@@ -12168,11 +12030,10 @@ CProgressBar.displayName = 'CProgressBar';
|
|
|
12168
12030
|
|
|
12169
12031
|
var CProgress = React$1.forwardRef(function (_a, ref) {
|
|
12170
12032
|
var children = _a.children, className = _a.className, height = _a.height, thin = _a.thin, _b = _a.value, value = _b === void 0 ? 0 : _b, white = _a.white, rest = __rest$1(_a, ["children", "className", "height", "thin", "value", "white"]);
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
return (React$1.createElement("div", { className: _className, style: height ? { height: "".concat(height, "px") } : {}, ref: ref }, value ? (React$1.createElement(CProgressBar, __assign$1({ value: value }, rest), children)) : (children)));
|
|
12033
|
+
return (React$1.createElement("div", { className: classNames$1('progress', {
|
|
12034
|
+
'progress-thin': thin,
|
|
12035
|
+
'progress-white': white,
|
|
12036
|
+
}, className), style: height ? { height: "".concat(height, "px") } : {}, ref: ref }, value ? (React$1.createElement(CProgressBar, __assign$1({ value: value }, rest), children)) : (children)));
|
|
12176
12037
|
});
|
|
12177
12038
|
CProgress.propTypes = {
|
|
12178
12039
|
children: propTypesExports.node,
|
|
@@ -12206,15 +12067,6 @@ var CPopover = function (_a) {
|
|
|
12206
12067
|
React$1.useEffect(function () {
|
|
12207
12068
|
setVisible(visible);
|
|
12208
12069
|
}, [visible]);
|
|
12209
|
-
var getTransitionClass = function (state) {
|
|
12210
|
-
return state === 'entering'
|
|
12211
|
-
? 'fade'
|
|
12212
|
-
: state === 'entered'
|
|
12213
|
-
? 'fade show'
|
|
12214
|
-
: state === 'exiting'
|
|
12215
|
-
? 'fade'
|
|
12216
|
-
: 'fade';
|
|
12217
|
-
};
|
|
12218
12070
|
return (React$1.createElement(React$1.Fragment, null,
|
|
12219
12071
|
React$1.cloneElement(children, __assign$1(__assign$1(__assign$1({ ref: setReferenceElement }, ((trigger === 'click' || trigger.includes('click')) && {
|
|
12220
12072
|
onClick: function () { return setVisible(!_visible); },
|
|
@@ -12229,13 +12081,12 @@ var CPopover = function (_a) {
|
|
|
12229
12081
|
ReactDOM.createPortal(React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: popoverRef, onEnter: onShow, onExit: onHide, timeout: {
|
|
12230
12082
|
enter: 0,
|
|
12231
12083
|
exit: 200,
|
|
12232
|
-
}, unmountOnExit: true }, function (state) {
|
|
12233
|
-
|
|
12234
|
-
|
|
12235
|
-
|
|
12236
|
-
|
|
12237
|
-
|
|
12238
|
-
}), document.body)));
|
|
12084
|
+
}, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('popover', "bs-popover-".concat(placement.replace('left', 'start').replace('right', 'end')), 'fade', {
|
|
12085
|
+
show: state === 'entered',
|
|
12086
|
+
}, className), ref: setPopperElement, role: "tooltip", style: styles.popper }, attributes.popper, rest),
|
|
12087
|
+
React$1.createElement("div", { className: "popover-arrow", style: styles.arrow, ref: setArrowElement }),
|
|
12088
|
+
React$1.createElement("div", { className: "popover-header" }, title),
|
|
12089
|
+
React$1.createElement("div", { className: "popover-body" }, content))); }), document.body)));
|
|
12239
12090
|
};
|
|
12240
12091
|
CPopover.propTypes = {
|
|
12241
12092
|
children: propTypesExports.node,
|
|
@@ -13625,7 +13476,6 @@ CIcon.displayName = 'CIcon';
|
|
|
13625
13476
|
|
|
13626
13477
|
var CSmartPagination = React$1.forwardRef(function (_a, ref) {
|
|
13627
13478
|
var className = _a.className, _b = _a.activePage, activePage = _b === void 0 ? 1 : _b, _c = _a.align, align = _c === void 0 ? 'start' : _c, _d = _a.arrows, arrows = _d === void 0 ? true : _d, _e = _a.dots, dots = _e === void 0 ? true : _e, _f = _a.doubleArrows, doubleArrows = _f === void 0 ? true : _f, _g = _a.firstButton, firstButton = _g === void 0 ? React$1.createElement(React$1.Fragment, null, "\u00AB") : _g, _h = _a.lastButton, lastButton = _h === void 0 ? React$1.createElement(React$1.Fragment, null, "\u00BB") : _h, _j = _a.limit, limit = _j === void 0 ? 5 : _j, _k = _a.nextButton, nextButton = _k === void 0 ? React$1.createElement(React$1.Fragment, null, "\u203A") : _k, onActivePageChange = _a.onActivePageChange, pages = _a.pages, _l = _a.previousButton, previousButton = _l === void 0 ? React$1.createElement(React$1.Fragment, null, "\u2039") : _l, size = _a.size, rest = __rest$1(_a, ["className", "activePage", "align", "arrows", "dots", "doubleArrows", "firstButton", "lastButton", "limit", "nextButton", "onActivePageChange", "pages", "previousButton", "size"]);
|
|
13628
|
-
var _classNames = classNames$1("justify-content-".concat(align), className);
|
|
13629
13479
|
var showDots = (function () {
|
|
13630
13480
|
return dots && limit > 4 && limit < pages;
|
|
13631
13481
|
})();
|
|
@@ -13654,25 +13504,22 @@ var CSmartPagination = React$1.forwardRef(function (_a, ref) {
|
|
|
13654
13504
|
return pages < computedLimit ? pages : computedLimit;
|
|
13655
13505
|
})();
|
|
13656
13506
|
var items = (function () {
|
|
13657
|
-
|
|
13658
|
-
|
|
13507
|
+
return activePage - maxPrevItems <= 1
|
|
13508
|
+
? Array.from({
|
|
13659
13509
|
length: itemsAmount,
|
|
13660
|
-
}, function (_v, i) { return i + 1; })
|
|
13661
|
-
|
|
13662
|
-
else {
|
|
13663
|
-
return Array.from({
|
|
13510
|
+
}, function (_v, i) { return i + 1; })
|
|
13511
|
+
: Array.from({
|
|
13664
13512
|
length: itemsAmount,
|
|
13665
13513
|
}, function (_v, i) {
|
|
13666
13514
|
return lastItem - i;
|
|
13667
13515
|
}).reverse();
|
|
13668
|
-
}
|
|
13669
13516
|
})();
|
|
13670
13517
|
var setPage = function (number) {
|
|
13671
13518
|
if (number !== activePage) {
|
|
13672
13519
|
onActivePageChange && onActivePageChange(number);
|
|
13673
13520
|
}
|
|
13674
13521
|
};
|
|
13675
|
-
return (React$1.createElement(CPagination, __assign$1({ className:
|
|
13522
|
+
return (React$1.createElement(CPagination, __assign$1({ className: classNames$1("justify-content-".concat(align), className), "aria-label": "pagination", size: size }, rest, { ref: ref }),
|
|
13676
13523
|
doubleArrows && (React$1.createElement(CPaginationItem, { onClick: function () { return setPage(1); }, "aria-label": "Go to first page", "aria-disabled": activePage === 1, disabled: activePage === 1 }, firstButton)),
|
|
13677
13524
|
arrows && (React$1.createElement(CPaginationItem, { onClick: function () { return setPage(activePage - 1); }, "aria-label": "Go to previous page", "aria-disabled": activePage === 1, disabled: activePage === 1 }, previousButton)),
|
|
13678
13525
|
beforeDots && (React$1.createElement(CPaginationItem, { role: "separator", disabled: true }, "\u2026")),
|
|
@@ -13704,10 +13551,9 @@ CSmartPagination.displayName = 'CSmartPagination';
|
|
|
13704
13551
|
var CTableHead = React$1.forwardRef(function (_a, ref) {
|
|
13705
13552
|
var _b;
|
|
13706
13553
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
13707
|
-
|
|
13708
|
-
|
|
13709
|
-
|
|
13710
|
-
return (React$1.createElement("thead", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
13554
|
+
return (React$1.createElement("thead", __assign$1({ className: classNames$1((_b = {},
|
|
13555
|
+
_b["table-".concat(color)] = color,
|
|
13556
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13711
13557
|
});
|
|
13712
13558
|
CTableHead.propTypes = {
|
|
13713
13559
|
children: propTypesExports.node,
|
|
@@ -13719,10 +13565,9 @@ CTableHead.displayName = 'CTableHead';
|
|
|
13719
13565
|
var CTableHeaderCell = React$1.forwardRef(function (_a, ref) {
|
|
13720
13566
|
var _b;
|
|
13721
13567
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
13722
|
-
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
return (React$1.createElement("th", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
13568
|
+
return (React$1.createElement("th", __assign$1({ className: classNames$1((_b = {},
|
|
13569
|
+
_b["table-".concat(color)] = color,
|
|
13570
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13726
13571
|
});
|
|
13727
13572
|
CTableHeaderCell.propTypes = {
|
|
13728
13573
|
children: propTypesExports.node,
|
|
@@ -13734,10 +13579,9 @@ CTableHeaderCell.displayName = 'CTableHeaderCell';
|
|
|
13734
13579
|
var CTableBody = React$1.forwardRef(function (_a, ref) {
|
|
13735
13580
|
var _b;
|
|
13736
13581
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
return (React$1.createElement("tbody", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
13582
|
+
return (React$1.createElement("tbody", __assign$1({ className: classNames$1((_b = {},
|
|
13583
|
+
_b["table-".concat(color)] = color,
|
|
13584
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13741
13585
|
});
|
|
13742
13586
|
CTableBody.propTypes = {
|
|
13743
13587
|
children: propTypesExports.node,
|
|
@@ -13749,13 +13593,12 @@ CTableBody.displayName = 'CTableBody';
|
|
|
13749
13593
|
var CTableDataCell = React$1.forwardRef(function (_a, ref) {
|
|
13750
13594
|
var _b;
|
|
13751
13595
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "active", "align", "className", "color"]);
|
|
13752
|
-
var _className = classNames$1((_b = {},
|
|
13753
|
-
_b["align-".concat(align)] = align,
|
|
13754
|
-
_b['table-active'] = active,
|
|
13755
|
-
_b["table-".concat(color)] = color,
|
|
13756
|
-
_b), className);
|
|
13757
13596
|
var Component = rest.scope ? 'th' : 'td';
|
|
13758
|
-
return (React$1.createElement(Component, __assign$1({ className:
|
|
13597
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1((_b = {},
|
|
13598
|
+
_b["align-".concat(align)] = align,
|
|
13599
|
+
_b['table-active'] = active,
|
|
13600
|
+
_b["table-".concat(color)] = color,
|
|
13601
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13759
13602
|
});
|
|
13760
13603
|
CTableDataCell.propTypes = {
|
|
13761
13604
|
active: propTypesExports.bool,
|
|
@@ -13769,12 +13612,11 @@ CTableDataCell.displayName = 'CTableDataCell';
|
|
|
13769
13612
|
var CTableRow = React$1.forwardRef(function (_a, ref) {
|
|
13770
13613
|
var _b;
|
|
13771
13614
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "active", "align", "className", "color"]);
|
|
13772
|
-
|
|
13773
|
-
|
|
13774
|
-
|
|
13775
|
-
|
|
13776
|
-
|
|
13777
|
-
return (React$1.createElement("tr", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
13615
|
+
return (React$1.createElement("tr", __assign$1({ className: classNames$1((_b = {},
|
|
13616
|
+
_b["align-".concat(align)] = align,
|
|
13617
|
+
_b['table-active'] = active,
|
|
13618
|
+
_b["table-".concat(color)] = color,
|
|
13619
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13778
13620
|
});
|
|
13779
13621
|
CTableRow.propTypes = {
|
|
13780
13622
|
active: propTypesExports.bool,
|
|
@@ -13788,10 +13630,9 @@ CTableRow.displayName = 'CTableRow';
|
|
|
13788
13630
|
var CTableFoot = React$1.forwardRef(function (_a, ref) {
|
|
13789
13631
|
var _b;
|
|
13790
13632
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
13791
|
-
|
|
13792
|
-
|
|
13793
|
-
|
|
13794
|
-
return (React$1.createElement("tfoot", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
13633
|
+
return (React$1.createElement("tfoot", __assign$1({ className: classNames$1((_b = {},
|
|
13634
|
+
_b["table-".concat(color)] = color,
|
|
13635
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13795
13636
|
});
|
|
13796
13637
|
CTableFoot.propTypes = {
|
|
13797
13638
|
children: propTypesExports.node,
|
|
@@ -13811,10 +13652,10 @@ CTableCaption.displayName = 'CTableCaption';
|
|
|
13811
13652
|
|
|
13812
13653
|
var CTableResponsiveWrapper = function (_a) {
|
|
13813
13654
|
var children = _a.children, responsive = _a.responsive, rest = __rest$1(_a, ["children", "responsive"]);
|
|
13814
|
-
return responsive ? (React$1.createElement("div", __assign$1({ className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) }, rest), children)) : (children);
|
|
13655
|
+
return responsive ? (React$1.createElement("div", __assign$1({ className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) }, rest), children)) : (React$1.createElement(React$1.Fragment, null, children));
|
|
13815
13656
|
};
|
|
13816
13657
|
CTableResponsiveWrapper.propTypes = {
|
|
13817
|
-
children: propTypesExports.
|
|
13658
|
+
children: propTypesExports.node,
|
|
13818
13659
|
responsive: propTypesExports.oneOfType([
|
|
13819
13660
|
propTypesExports.bool,
|
|
13820
13661
|
propTypesExports.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
@@ -13831,20 +13672,11 @@ var pretifyName$1 = function (name) {
|
|
|
13831
13672
|
.map(function (word) { return word.charAt(0).toUpperCase() + word.slice(1); })
|
|
13832
13673
|
.join(' ');
|
|
13833
13674
|
};
|
|
13834
|
-
var getColumnLabel$1 = function (column) {
|
|
13835
|
-
return typeof column === 'object'
|
|
13836
|
-
? column.label !== undefined
|
|
13837
|
-
? column.label
|
|
13838
|
-
: pretifyName$1(column.key)
|
|
13839
|
-
: pretifyName$1(column);
|
|
13840
|
-
};
|
|
13675
|
+
var getColumnLabel$1 = function (column) { var _a; return typeof column === 'object' ? (_a = column.label) !== null && _a !== void 0 ? _a : pretifyName$1(column.key) : pretifyName$1(column); };
|
|
13841
13676
|
var getColumnNames$1 = function (columns, items) {
|
|
13842
13677
|
return columns
|
|
13843
13678
|
? columns.map(function (column) {
|
|
13844
|
-
|
|
13845
|
-
return column.key;
|
|
13846
|
-
else
|
|
13847
|
-
return column;
|
|
13679
|
+
return typeof column === 'object' ? column.key : column;
|
|
13848
13680
|
})
|
|
13849
13681
|
: items && getColumnNamesFromItems$1(items);
|
|
13850
13682
|
};
|
|
@@ -13855,21 +13687,20 @@ var getColumnNamesFromItems$1 = function (items) {
|
|
|
13855
13687
|
var CTable = React$1.forwardRef(function (_a, ref) {
|
|
13856
13688
|
var _b;
|
|
13857
13689
|
var children = _a.children, align = _a.align, borderColor = _a.borderColor, bordered = _a.bordered, borderless = _a.borderless, caption = _a.caption, captionTop = _a.captionTop, className = _a.className, color = _a.color, columns = _a.columns, footer = _a.footer, hover = _a.hover, items = _a.items, responsive = _a.responsive, small = _a.small, striped = _a.striped, stripedColumns = _a.stripedColumns, tableFootProps = _a.tableFootProps, tableHeadProps = _a.tableHeadProps, rest = __rest$1(_a, ["children", "align", "borderColor", "bordered", "borderless", "caption", "captionTop", "className", "color", "columns", "footer", "hover", "items", "responsive", "small", "striped", "stripedColumns", "tableFootProps", "tableHeadProps"]);
|
|
13858
|
-
var _className = classNames$1('table', (_b = {},
|
|
13859
|
-
_b["align-".concat(align)] = align,
|
|
13860
|
-
_b["border-".concat(borderColor)] = borderColor,
|
|
13861
|
-
_b["caption-top"] = captionTop || caption === 'top',
|
|
13862
|
-
_b['table-bordered'] = bordered,
|
|
13863
|
-
_b['table-borderless'] = borderless,
|
|
13864
|
-
_b["table-".concat(color)] = color,
|
|
13865
|
-
_b['table-hover'] = hover,
|
|
13866
|
-
_b['table-sm'] = small,
|
|
13867
|
-
_b['table-striped'] = striped,
|
|
13868
|
-
_b['table-striped-columns'] = stripedColumns,
|
|
13869
|
-
_b), className);
|
|
13870
13690
|
var columnNames = React$1.useMemo(function () { return getColumnNames$1(columns, items); }, [columns, items]);
|
|
13871
13691
|
return (React$1.createElement(CTableResponsiveWrapper, { responsive: responsive },
|
|
13872
|
-
React$1.createElement("table", __assign$1({ className:
|
|
13692
|
+
React$1.createElement("table", __assign$1({ className: classNames$1('table', (_b = {},
|
|
13693
|
+
_b["align-".concat(align)] = align,
|
|
13694
|
+
_b["border-".concat(borderColor)] = borderColor,
|
|
13695
|
+
_b["caption-top"] = captionTop || caption === 'top',
|
|
13696
|
+
_b['table-bordered'] = bordered,
|
|
13697
|
+
_b['table-borderless'] = borderless,
|
|
13698
|
+
_b["table-".concat(color)] = color,
|
|
13699
|
+
_b['table-hover'] = hover,
|
|
13700
|
+
_b['table-sm'] = small,
|
|
13701
|
+
_b['table-striped'] = striped,
|
|
13702
|
+
_b['table-striped-columns'] = stripedColumns,
|
|
13703
|
+
_b), className) }, rest, { ref: ref }),
|
|
13873
13704
|
((caption && caption !== 'top') || captionTop) && (React$1.createElement(CTableCaption, null, caption || captionTop)),
|
|
13874
13705
|
columns && (React$1.createElement(CTableHead, __assign$1({}, tableHeadProps),
|
|
13875
13706
|
React$1.createElement(CTableRow, null, columns.map(function (column, index) { return (React$1.createElement(CTableHeaderCell, __assign$1({}, (column._props && __assign$1({}, column._props)), (column._style && { style: __assign$1({}, column._style) }), { key: index }), getColumnLabel$1(column))); })))),
|
|
@@ -13957,10 +13788,7 @@ var getColumnLabel = function (column) {
|
|
|
13957
13788
|
var getColumnNames = function (columns, items) {
|
|
13958
13789
|
return columns
|
|
13959
13790
|
? columns.map(function (column) {
|
|
13960
|
-
|
|
13961
|
-
return column.key;
|
|
13962
|
-
else
|
|
13963
|
-
return column;
|
|
13791
|
+
return typeof column === 'object' ? column.key : column;
|
|
13964
13792
|
})
|
|
13965
13793
|
: getColumnNamesFromItems(items);
|
|
13966
13794
|
};
|
|
@@ -13993,7 +13821,7 @@ var getTableHeaderCellStyles = function (column, columnSorter) {
|
|
|
13993
13821
|
var style = {};
|
|
13994
13822
|
if (columnSorter &&
|
|
13995
13823
|
(typeof column !== 'object' ||
|
|
13996
|
-
(typeof column === 'object' && (
|
|
13824
|
+
(typeof column === 'object' && (column.sorter === undefined || column.sorter)))) {
|
|
13997
13825
|
style['cursor'] = 'pointer';
|
|
13998
13826
|
}
|
|
13999
13827
|
if (typeof column === 'object' && column._style) {
|
|
@@ -14009,7 +13837,7 @@ var isSortable = function (i, columns, columnSorter, itemsDataColumns, columnNam
|
|
|
14009
13837
|
return (columnSorter &&
|
|
14010
13838
|
(!columns ||
|
|
14011
13839
|
typeof column !== 'object' ||
|
|
14012
|
-
(typeof column === 'object' && (
|
|
13840
|
+
(typeof column === 'object' && (column.sorter === undefined || column.sorter))) &&
|
|
14013
13841
|
isDataColumn);
|
|
14014
13842
|
};
|
|
14015
13843
|
var pretifyName = function (name) {
|
|
@@ -14349,7 +14177,7 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14349
14177
|
return;
|
|
14350
14178
|
}
|
|
14351
14179
|
//if column changed or sort was descending change asc to true
|
|
14352
|
-
var state = sorterState ? sorterState : { column: '', state: '' };
|
|
14180
|
+
var state = sorterState !== null && sorterState !== void 0 ? sorterState : { column: '', state: '' };
|
|
14353
14181
|
if (state.column === column) {
|
|
14354
14182
|
if (state.state === 0) {
|
|
14355
14183
|
state.state = 'asc';
|
|
@@ -14358,12 +14186,7 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14358
14186
|
state.state = 'desc';
|
|
14359
14187
|
}
|
|
14360
14188
|
else {
|
|
14361
|
-
|
|
14362
|
-
state.state = 'asc';
|
|
14363
|
-
}
|
|
14364
|
-
else {
|
|
14365
|
-
state.state = 0;
|
|
14366
|
-
}
|
|
14189
|
+
state.state = typeof columnSorter === 'object' && !columnSorter.resetable ? 'asc' : 0;
|
|
14367
14190
|
}
|
|
14368
14191
|
}
|
|
14369
14192
|
else {
|
|
@@ -14401,13 +14224,13 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14401
14224
|
} })))))))),
|
|
14402
14225
|
React$1.createElement("div", { className: "position-relative" },
|
|
14403
14226
|
React$1.createElement(CTable, __assign$1({}, tableProps),
|
|
14404
|
-
header && (React$1.createElement(CSmartTableHead, __assign$1({}, tableHeadProps, { columnFilter: columnFilter, columnFilterState: columnFilterState, columns: columns ? columns : columnNames, columnSorter: columnSorter, items: _items, selectable: selectable, selectAll: selectAll, selectedAll: selectedAll, sorterState: sorterState, sortingIcon: sortingIcon, sortingIconAscending: sortingIconAscending, sortingIconDescending: sortingIconDescending, handleFilterOnChange: function (key, event) {
|
|
14227
|
+
header && (React$1.createElement(CSmartTableHead, __assign$1({}, tableHeadProps, { columnFilter: columnFilter, columnFilterState: columnFilterState, columns: columns !== null && columns !== void 0 ? columns : columnNames, columnSorter: columnSorter, items: _items, selectable: selectable, selectAll: selectAll, selectedAll: selectedAll, sorterState: sorterState, sortingIcon: sortingIcon, sortingIconAscending: sortingIconAscending, sortingIconDescending: sortingIconDescending, handleFilterOnChange: function (key, event) {
|
|
14405
14228
|
return handleColumnFilterChange(key, event, 'change');
|
|
14406
14229
|
}, handleFilterOnInput: function (key, event) { return handleColumnFilterChange(key, event, 'input'); }, handleOnCustomFilterChange: function (key, event) { return handleColumnFilterChange(key, event); }, handleSelectAllChecked: function () { return handleSelectAllChecked(); }, handleSort: function (key, index) { return handleSorterChange(key, index); } }))),
|
|
14407
14230
|
React$1.createElement(CSmartTableBody, __assign$1({ clickableRows: clickableRows, currentItems: currentItems, firstItemOnActivePageIndex: firstItemOnActivePageIndex, noItemsLabel: noItemsLabel, onRowClick: function (item, index, columnName, event) {
|
|
14408
14231
|
return clickableRows && onRowClick && onRowClick(item, index, columnName, event);
|
|
14409
14232
|
}, onRowChecked: function (item, value) { return handleRowChecked(item, value); }, columnNames: columnNames, scopedColumns: scopedColumns, selectable: selectable, selected: _selected }, tableBodyProps)),
|
|
14410
|
-
typeof footer === 'boolean' && footer && (React$1.createElement(CSmartTableHead, __assign$1({ component: CTableFoot }, tableFootProps, { columnFilter: false, columnSorter: false, columns: columns ? columns : columnNames, items: _items, handleSelectAllChecked: function () { return handleSelectAllChecked(); }, selectable: selectable, selectAll: selectAll, selectedAll: selectedAll }))),
|
|
14233
|
+
typeof footer === 'boolean' && footer && (React$1.createElement(CSmartTableHead, __assign$1({ component: CTableFoot }, tableFootProps, { columnFilter: false, columnSorter: false, columns: columns !== null && columns !== void 0 ? columns : columnNames, items: _items, handleSelectAllChecked: function () { return handleSelectAllChecked(); }, selectable: selectable, selectAll: selectAll, selectedAll: selectedAll }))),
|
|
14411
14234
|
Array.isArray(footer) && (React$1.createElement(CTableFoot, __assign$1({}, tableFootProps),
|
|
14412
14235
|
React$1.createElement(CTableRow, null, footer.map(function (item, index) { return (React$1.createElement(CTableDataCell, __assign$1({}, (typeof item === 'object' && item._props && __assign$1({}, item._props)), { key: index }), typeof item === 'object' ? item.label : item)); }))))),
|
|
14413
14236
|
loading && (React$1.createElement(CElementCover, { boundaries: [
|
|
@@ -14495,7 +14318,7 @@ var CSidebar = React$1.forwardRef(function (_a, ref) {
|
|
|
14495
14318
|
setVisible(visible);
|
|
14496
14319
|
}, [visible]);
|
|
14497
14320
|
React$1.useEffect(function () {
|
|
14498
|
-
|
|
14321
|
+
inViewport !== undefined && onVisibleChange && onVisibleChange(inViewport);
|
|
14499
14322
|
!inViewport && onHide && onHide();
|
|
14500
14323
|
inViewport && onShow && onShow();
|
|
14501
14324
|
}, [inViewport]);
|
|
@@ -14553,19 +14376,18 @@ var CSidebar = React$1.forwardRef(function (_a, ref) {
|
|
|
14553
14376
|
mobile &&
|
|
14554
14377
|
handleHide();
|
|
14555
14378
|
};
|
|
14556
|
-
var _className = classNames$1('sidebar', (_b = {},
|
|
14557
|
-
_b["sidebar-".concat(colorScheme)] = colorScheme,
|
|
14558
|
-
_b['sidebar-narrow'] = narrow,
|
|
14559
|
-
_b['sidebar-overlaid'] = overlaid,
|
|
14560
|
-
_b["sidebar-".concat(placement)] = placement,
|
|
14561
|
-
_b["sidebar-".concat(position)] = position,
|
|
14562
|
-
_b["sidebar-".concat(size)] = size,
|
|
14563
|
-
_b['sidebar-narrow-unfoldable'] = unfoldable,
|
|
14564
|
-
_b.show = _visible === true && mobile,
|
|
14565
|
-
_b.hide = _visible === false && !mobile,
|
|
14566
|
-
_b), className);
|
|
14567
14379
|
return (React$1.createElement(React$1.Fragment, null,
|
|
14568
|
-
React$1.createElement("div", __assign$1({ className:
|
|
14380
|
+
React$1.createElement("div", __assign$1({ className: classNames$1('sidebar', (_b = {},
|
|
14381
|
+
_b["sidebar-".concat(colorScheme)] = colorScheme,
|
|
14382
|
+
_b['sidebar-narrow'] = narrow,
|
|
14383
|
+
_b['sidebar-overlaid'] = overlaid,
|
|
14384
|
+
_b["sidebar-".concat(placement)] = placement,
|
|
14385
|
+
_b["sidebar-".concat(position)] = position,
|
|
14386
|
+
_b["sidebar-".concat(size)] = size,
|
|
14387
|
+
_b['sidebar-narrow-unfoldable'] = unfoldable,
|
|
14388
|
+
_b.show = _visible === true && mobile,
|
|
14389
|
+
_b.hide = _visible === false && !mobile,
|
|
14390
|
+
_b), className) }, rest, { ref: forkedRef }), children),
|
|
14569
14391
|
typeof window !== 'undefined' &&
|
|
14570
14392
|
mobile &&
|
|
14571
14393
|
ReactDOM.createPortal(React$1.createElement(CBackdrop, { className: "sidebar-backdrop", visible: _visible }), document.body)));
|
|
@@ -14589,8 +14411,7 @@ CSidebar.displayName = 'CSidebar';
|
|
|
14589
14411
|
|
|
14590
14412
|
var CSidebarBrand = React$1.forwardRef(function (_a, ref) {
|
|
14591
14413
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14592
|
-
|
|
14593
|
-
return (React$1.createElement("div", __assign$1({ className: _className, ref: ref }, rest), children));
|
|
14414
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-brand', className), ref: ref }, rest), children));
|
|
14594
14415
|
});
|
|
14595
14416
|
CSidebarBrand.propTypes = {
|
|
14596
14417
|
children: propTypesExports.node,
|
|
@@ -14600,8 +14421,7 @@ CSidebarBrand.displayName = 'CSidebarBrand';
|
|
|
14600
14421
|
|
|
14601
14422
|
var CSidebarFooter = React$1.forwardRef(function (_a, ref) {
|
|
14602
14423
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14603
|
-
|
|
14604
|
-
return (React$1.createElement("div", __assign$1({ className: _className, ref: ref }, rest), children));
|
|
14424
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-footer', className), ref: ref }, rest), children));
|
|
14605
14425
|
});
|
|
14606
14426
|
CSidebarFooter.propTypes = {
|
|
14607
14427
|
children: propTypesExports.node,
|
|
@@ -14611,8 +14431,7 @@ CSidebarFooter.displayName = 'CSidebarFooter';
|
|
|
14611
14431
|
|
|
14612
14432
|
var CSidebarToggler = React$1.forwardRef(function (_a, ref) {
|
|
14613
14433
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14614
|
-
|
|
14615
|
-
return (React$1.createElement("button", __assign$1({ className: _className, ref: ref }, rest), children));
|
|
14434
|
+
return (React$1.createElement("button", __assign$1({ className: classNames$1('sidebar-toggler', className), ref: ref }, rest), children));
|
|
14616
14435
|
});
|
|
14617
14436
|
CSidebarToggler.propTypes = {
|
|
14618
14437
|
children: propTypesExports.node,
|
|
@@ -14622,8 +14441,7 @@ CSidebarToggler.displayName = 'CSidebarToggler';
|
|
|
14622
14441
|
|
|
14623
14442
|
var CSidebarHeader = React$1.forwardRef(function (_a, ref) {
|
|
14624
14443
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14625
|
-
|
|
14626
|
-
return (React$1.createElement("div", __assign$1({ className: _className, ref: ref }, rest), children));
|
|
14444
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-header', className), ref: ref }, rest), children));
|
|
14627
14445
|
});
|
|
14628
14446
|
CSidebarHeader.propTypes = {
|
|
14629
14447
|
children: propTypesExports.node,
|
|
@@ -14633,8 +14451,7 @@ CSidebarHeader.displayName = 'CSidebarHeader';
|
|
|
14633
14451
|
|
|
14634
14452
|
var CTabContent = React$1.forwardRef(function (_a, ref) {
|
|
14635
14453
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14636
|
-
|
|
14637
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
14454
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('tab-content', className) }, rest, { ref: ref }), children));
|
|
14638
14455
|
});
|
|
14639
14456
|
CTabContent.propTypes = {
|
|
14640
14457
|
children: propTypesExports.node,
|
|
@@ -14646,16 +14463,10 @@ var CTabPane = React$1.forwardRef(function (_a, ref) {
|
|
|
14646
14463
|
var children = _a.children, className = _a.className, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest$1(_a, ["children", "className", "onHide", "onShow", "visible"]);
|
|
14647
14464
|
var tabPaneRef = React$1.useRef();
|
|
14648
14465
|
var forkedRef = useForkedRef(ref, tabPaneRef);
|
|
14649
|
-
|
|
14650
|
-
|
|
14651
|
-
|
|
14652
|
-
|
|
14653
|
-
active: visible,
|
|
14654
|
-
}, className);
|
|
14655
|
-
return (React$1.createElement(Transition$1, { in: visible, nodeRef: tabPaneRef, onEnter: onShow, onExit: onHide, timeout: 150 }, function (state) {
|
|
14656
|
-
var transitionClass = getTransitionClass(state);
|
|
14657
|
-
return (React$1.createElement("div", __assign$1({ className: classNames$1(_className, transitionClass) }, rest, { ref: forkedRef }), children));
|
|
14658
|
-
}));
|
|
14466
|
+
return (React$1.createElement(Transition$1, { in: visible, nodeRef: tabPaneRef, onEnter: onShow, onExit: onHide, timeout: 150 }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('tab-pane', 'fade', {
|
|
14467
|
+
active: visible,
|
|
14468
|
+
show: state === 'entered',
|
|
14469
|
+
}, className) }, rest, { ref: forkedRef }), children)); }));
|
|
14659
14470
|
});
|
|
14660
14471
|
CTabPane.propTypes = {
|
|
14661
14472
|
children: propTypesExports.node,
|
|
@@ -14668,11 +14479,10 @@ CTabPane.displayName = 'CTabPane';
|
|
|
14668
14479
|
|
|
14669
14480
|
var CToastContext = React$1.createContext({});
|
|
14670
14481
|
var CToast = React$1.forwardRef(function (_a, ref) {
|
|
14671
|
-
var _b;
|
|
14672
|
-
var children = _a.children, _c = _a.animation, animation = _c === void 0 ? true : _c, _d = _a.autohide, autohide = _d === void 0 ? true : _d, className = _a.className, color = _a.color, _e = _a.delay, delay = _e === void 0 ? 5000 : _e, index = _a.index, key = _a.key, _f = _a.visible, visible = _f === void 0 ? false : _f, onClose = _a.onClose, onShow = _a.onShow, rest = __rest$1(_a, ["children", "animation", "autohide", "className", "color", "delay", "index", "key", "visible", "onClose", "onShow"]);
|
|
14482
|
+
var children = _a.children, _b = _a.animation, animation = _b === void 0 ? true : _b, _c = _a.autohide, autohide = _c === void 0 ? true : _c, className = _a.className, color = _a.color, _d = _a.delay, delay = _d === void 0 ? 5000 : _d, index = _a.index, key = _a.key, _e = _a.visible, visible = _e === void 0 ? false : _e, onClose = _a.onClose, onShow = _a.onShow, rest = __rest$1(_a, ["children", "animation", "autohide", "className", "color", "delay", "index", "key", "visible", "onClose", "onShow"]);
|
|
14673
14483
|
var toastRef = React$1.useRef();
|
|
14674
14484
|
var forkedRef = useForkedRef(ref, toastRef);
|
|
14675
|
-
var
|
|
14485
|
+
var _f = React$1.useState(false), _visible = _f[0], setVisible = _f[1];
|
|
14676
14486
|
var timeout = React$1.useRef();
|
|
14677
14487
|
React$1.useEffect(function () {
|
|
14678
14488
|
setVisible(visible);
|
|
@@ -14694,25 +14504,17 @@ var CToast = React$1.forwardRef(function (_a, ref) {
|
|
|
14694
14504
|
}, delay);
|
|
14695
14505
|
}
|
|
14696
14506
|
};
|
|
14697
|
-
|
|
14698
|
-
|
|
14699
|
-
},
|
|
14700
|
-
_b["bg-".concat(color)] = color,
|
|
14701
|
-
_b['border-0'] = color,
|
|
14702
|
-
_b), className);
|
|
14703
|
-
var getTransitionClass = function (state) {
|
|
14704
|
-
return state === 'entering'
|
|
14705
|
-
? 'showing'
|
|
14706
|
-
: state === 'entered'
|
|
14707
|
-
? 'show'
|
|
14708
|
-
: state === 'exiting'
|
|
14709
|
-
? 'showing'
|
|
14710
|
-
: 'fade';
|
|
14711
|
-
};
|
|
14712
|
-
return (React$1.createElement(Transition$1, { in: _visible, nodeRef: toastRef, onEnter: function () { return onShow && onShow(index ? index : null); }, onExited: function () { return onClose && onClose(index ? index : null); }, timeout: 250, unmountOnExit: true }, function (state) {
|
|
14713
|
-
var transitionClass = getTransitionClass(state);
|
|
14507
|
+
return (React$1.createElement(Transition$1, { in: _visible, nodeRef: toastRef, onEnter: function () { return onShow && onShow(index !== null && index !== void 0 ? index : null); }, onExited: function () { return onClose && onClose(index !== null && index !== void 0 ? index : null); }, timeout: 250, unmountOnExit: true }, function (state) {
|
|
14508
|
+
var _a;
|
|
14714
14509
|
return (React$1.createElement(CToastContext.Provider, { value: contextValues },
|
|
14715
|
-
React$1.createElement("div", __assign$1({ className: classNames$1(
|
|
14510
|
+
React$1.createElement("div", __assign$1({ className: classNames$1('toast', (_a = {
|
|
14511
|
+
fade: animation
|
|
14512
|
+
},
|
|
14513
|
+
_a["bg-".concat(color)] = color,
|
|
14514
|
+
_a['border-0'] = color,
|
|
14515
|
+
_a['show showing'] = state === 'entering' || state === 'exiting',
|
|
14516
|
+
_a.show = state === 'entered',
|
|
14517
|
+
_a), className), "aria-live": "assertive", "aria-atomic": "true", role: "alert", onMouseEnter: function () { return clearTimeout(timeout.current); }, onMouseLeave: function () { return _autohide(); } }, rest, { key: key, ref: forkedRef }), children)));
|
|
14716
14518
|
}));
|
|
14717
14519
|
});
|
|
14718
14520
|
CToast.propTypes = {
|
|
@@ -14732,8 +14534,7 @@ CToast.displayName = 'CToast';
|
|
|
14732
14534
|
|
|
14733
14535
|
var CToastBody = React$1.forwardRef(function (_a, ref) {
|
|
14734
14536
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14735
|
-
|
|
14736
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
14537
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('toast-body', className) }, rest, { ref: ref }), children));
|
|
14737
14538
|
});
|
|
14738
14539
|
CToastBody.propTypes = {
|
|
14739
14540
|
children: propTypesExports.node,
|
|
@@ -14751,8 +14552,7 @@ CToastClose.displayName = 'CToastClose';
|
|
|
14751
14552
|
|
|
14752
14553
|
var CToastHeader = React$1.forwardRef(function (_a, ref) {
|
|
14753
14554
|
var children = _a.children, className = _a.className, closeButton = _a.closeButton, rest = __rest$1(_a, ["children", "className", "closeButton"]);
|
|
14754
|
-
|
|
14755
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
14555
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('toast-header', className) }, rest, { ref: ref }),
|
|
14756
14556
|
children,
|
|
14757
14557
|
closeButton && React$1.createElement(CToastClose, null)));
|
|
14758
14558
|
});
|
|
@@ -14782,23 +14582,17 @@ var CToaster = React$1.forwardRef(function (_a, ref) {
|
|
|
14782
14582
|
}),
|
|
14783
14583
|
], false); });
|
|
14784
14584
|
};
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
|
|
14789
|
-
|
|
14790
|
-
|
|
14791
|
-
|
|
14792
|
-
|
|
14793
|
-
|
|
14794
|
-
|
|
14795
|
-
|
|
14796
|
-
children,
|
|
14797
|
-
toasts.map(function (toast) { return React$1.cloneElement(toast, { visible: true }); }))) : null;
|
|
14798
|
-
};
|
|
14799
|
-
return typeof window !== 'undefined' && placement
|
|
14800
|
-
? ReactDOM.createPortal(toaster(ref), document.body)
|
|
14801
|
-
: toaster(ref);
|
|
14585
|
+
return (React$1.createElement(CConditionalPortal, { portal: typeof placement === 'string' }, toasts.length > 0 || children ? (React$1.createElement("div", __assign$1({ className: classNames$1('toaster toast-container p-3', {
|
|
14586
|
+
'position-fixed': placement,
|
|
14587
|
+
'top-0': placement && placement.includes('top'),
|
|
14588
|
+
'top-50 translate-middle-y': placement && placement.includes('middle'),
|
|
14589
|
+
'bottom-0': placement && placement.includes('bottom'),
|
|
14590
|
+
'start-0': placement && placement.includes('start'),
|
|
14591
|
+
'start-50 translate-middle-x': placement && placement.includes('center'),
|
|
14592
|
+
'end-0': placement && placement.includes('end'),
|
|
14593
|
+
}, className) }, rest, { ref: ref }),
|
|
14594
|
+
children,
|
|
14595
|
+
toasts.map(function (toast) { return React$1.cloneElement(toast, { visible: true }); }))) : null));
|
|
14802
14596
|
});
|
|
14803
14597
|
CToaster.propTypes = {
|
|
14804
14598
|
children: propTypesExports.node,
|
|
@@ -14843,15 +14637,6 @@ var CTooltip = function (_a) {
|
|
|
14843
14637
|
React$1.useEffect(function () {
|
|
14844
14638
|
setVisible(visible);
|
|
14845
14639
|
}, [visible]);
|
|
14846
|
-
var getTransitionClass = function (state) {
|
|
14847
|
-
return state === 'entering'
|
|
14848
|
-
? 'fade'
|
|
14849
|
-
: state === 'entered'
|
|
14850
|
-
? 'fade show'
|
|
14851
|
-
: state === 'exiting'
|
|
14852
|
-
? 'fade'
|
|
14853
|
-
: 'fade';
|
|
14854
|
-
};
|
|
14855
14640
|
return (React$1.createElement(React$1.Fragment, null,
|
|
14856
14641
|
React$1.cloneElement(children, __assign$1(__assign$1(__assign$1({ ref: setReferenceElement }, ((trigger === 'click' || trigger.includes('click')) && {
|
|
14857
14642
|
onClick: function () { return setVisible(!_visible); },
|
|
@@ -14866,12 +14651,11 @@ var CTooltip = function (_a) {
|
|
|
14866
14651
|
ReactDOM.createPortal(React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: tooltipRef, onEnter: onShow, onExit: onHide, timeout: {
|
|
14867
14652
|
enter: 0,
|
|
14868
14653
|
exit: 200,
|
|
14869
|
-
}, unmountOnExit: true }, function (state) {
|
|
14870
|
-
|
|
14871
|
-
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
}), document.body)));
|
|
14654
|
+
}, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('tooltip', "bs-popover-".concat(placement.replace('left', 'start').replace('right', 'end')), 'fade', {
|
|
14655
|
+
show: state === 'entered',
|
|
14656
|
+
}, className), ref: setPopperElement, role: "tooltip", style: styles.popper }, attributes.popper, rest),
|
|
14657
|
+
React$1.createElement("div", { className: "tooltip-arrow", style: styles.arrow, ref: setArrowElement }),
|
|
14658
|
+
React$1.createElement("div", { className: "tooltip-inner" }, content))); }), document.body)));
|
|
14875
14659
|
};
|
|
14876
14660
|
CTooltip.propTypes = {
|
|
14877
14661
|
children: propTypesExports.node,
|
|
@@ -14888,8 +14672,7 @@ CTooltip.displayName = 'CTooltip';
|
|
|
14888
14672
|
var CWidgetStatsA = React$1.forwardRef(function (_a, ref) {
|
|
14889
14673
|
var _b;
|
|
14890
14674
|
var action = _a.action, chart = _a.chart, className = _a.className, color = _a.color, title = _a.title, value = _a.value, rest = __rest$1(_a, ["action", "chart", "className", "color", "title", "value"]);
|
|
14891
|
-
|
|
14892
|
-
return (React$1.createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
14675
|
+
return (React$1.createElement(CCard, __assign$1({ className: classNames$1((_b = {}, _b["bg-".concat(color)] = color, _b['text-high-emphasis-inverse'] = color, _b), className) }, rest, { ref: ref }),
|
|
14893
14676
|
React$1.createElement(CCardBody, { className: "pb-0 d-flex justify-content-between align-items-start" },
|
|
14894
14677
|
React$1.createElement("div", null,
|
|
14895
14678
|
value && React$1.createElement("div", { className: "fs-4 fw-semibold" }, value),
|
|
@@ -14950,12 +14733,10 @@ CWidgetStatsC.displayName = 'CWidgetStatsCWidgetStatsC';
|
|
|
14950
14733
|
var CWidgetStatsD = React$1.forwardRef(function (_a, ref) {
|
|
14951
14734
|
var _b;
|
|
14952
14735
|
var className = _a.className, chart = _a.chart, color = _a.color, icon = _a.icon, values = _a.values, rest = __rest$1(_a, ["className", "chart", "color", "icon", "values"]);
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
|
|
14956
|
-
|
|
14957
|
-
return (React$1.createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
14958
|
-
React$1.createElement(CCardHeader, { className: classNameHeader },
|
|
14736
|
+
return (React$1.createElement(CCard, __assign$1({ className: className }, rest, { ref: ref }),
|
|
14737
|
+
React$1.createElement(CCardHeader, { className: classNames$1('position-relative d-flex justify-content-center align-items-center', (_b = {},
|
|
14738
|
+
_b["bg-".concat(color)] = color,
|
|
14739
|
+
_b)) },
|
|
14959
14740
|
icon,
|
|
14960
14741
|
chart),
|
|
14961
14742
|
React$1.createElement(CCardBody, { className: "row text-center" }, values &&
|
|
@@ -14978,8 +14759,7 @@ CWidgetStatsD.displayName = 'CWidgetStatsD';
|
|
|
14978
14759
|
|
|
14979
14760
|
var CWidgetStatsE = React$1.forwardRef(function (_a, ref) {
|
|
14980
14761
|
var chart = _a.chart, className = _a.className, title = _a.title, value = _a.value, rest = __rest$1(_a, ["chart", "className", "title", "value"]);
|
|
14981
|
-
|
|
14982
|
-
return (React$1.createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
14762
|
+
return (React$1.createElement(CCard, __assign$1({ className: classNames$1(className) }, rest, { ref: ref }),
|
|
14983
14763
|
React$1.createElement(CCardBody, { className: "text-center" },
|
|
14984
14764
|
title && (React$1.createElement("div", { className: "text-medium-emphasis small text-uppercase fw-semibold" }, title)),
|
|
14985
14765
|
value && React$1.createElement("div", { className: "fs-6 fw-semibold py-3" }, value),
|
|
@@ -14996,8 +14776,7 @@ CWidgetStatsE.displayName = 'CWidgetStatsE';
|
|
|
14996
14776
|
|
|
14997
14777
|
var CWidgetStatsF = React$1.forwardRef(function (_a, ref) {
|
|
14998
14778
|
var className = _a.className, color = _a.color, footer = _a.footer, icon = _a.icon, _b = _a.padding, padding = _b === void 0 ? true : _b, title = _a.title, value = _a.value, rest = __rest$1(_a, ["className", "color", "footer", "icon", "padding", "title", "value"]);
|
|
14999
|
-
|
|
15000
|
-
return (React$1.createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
14779
|
+
return (React$1.createElement(CCard, __assign$1({ className: className }, rest, { ref: ref }),
|
|
15001
14780
|
React$1.createElement(CCardBody, { className: "d-flex align-items-center ".concat(padding === false && 'p-0') },
|
|
15002
14781
|
React$1.createElement("div", { className: "me-3 text-white bg-".concat(color, " ").concat(padding ? 'p-3' : 'p-4') }, icon),
|
|
15003
14782
|
React$1.createElement("div", null,
|
|
@@ -15051,6 +14830,7 @@ exports.CCarouselItem = CCarouselItem;
|
|
|
15051
14830
|
exports.CCloseButton = CCloseButton;
|
|
15052
14831
|
exports.CCol = CCol;
|
|
15053
14832
|
exports.CCollapse = CCollapse;
|
|
14833
|
+
exports.CConditionalPortal = CConditionalPortal;
|
|
15054
14834
|
exports.CContainer = CContainer;
|
|
15055
14835
|
exports.CDatePicker = CDatePicker;
|
|
15056
14836
|
exports.CDateRangePicker = CDateRangePicker;
|