@coreui/react 4.1.2 → 4.2.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/accordion/index.d.ts +7 -0
- package/dist/components/alert/index.d.ts +4 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/backdrop/index.d.ts +2 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button-group/index.d.ts +3 -0
- package/dist/components/callout/index.d.ts +2 -0
- package/dist/components/card/index.d.ts +12 -0
- package/dist/components/carousel/index.d.ts +4 -0
- package/dist/components/close-button/index.d.ts +2 -0
- package/dist/components/collapse/index.d.ts +2 -0
- package/dist/components/dropdown/CDropdown.d.ts +10 -1
- package/dist/components/dropdown/CDropdownToggle.d.ts +4 -0
- package/dist/components/dropdown/index.d.ts +8 -0
- package/dist/components/footer/index.d.ts +2 -0
- package/dist/components/form/CForm.d.ts +2 -2
- package/dist/components/form/CFormCheck.d.ts +2 -1
- package/dist/components/form/CFormControlValidation.d.ts +46 -0
- package/dist/components/form/CFormControlWrapper.d.ts +31 -0
- package/dist/components/form/CFormInput.d.ts +6 -9
- package/dist/components/form/CFormRange.d.ts +7 -1
- package/dist/components/form/CFormSelect.d.ts +3 -10
- package/dist/components/form/CFormTextarea.d.ts +2 -9
- package/dist/components/form/index.d.ts +14 -0
- package/dist/components/grid/index.d.ts +4 -0
- package/dist/components/header/index.d.ts +7 -0
- package/dist/components/image/index.d.ts +2 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/link/index.d.ts +2 -0
- package/dist/components/list-group/index.d.ts +3 -0
- package/dist/components/modal/CModal.d.ts +3 -0
- package/dist/components/modal/index.d.ts +8 -0
- package/dist/components/nav/index.d.ts +7 -0
- package/dist/components/navbar/index.d.ts +6 -0
- package/dist/components/offcanvas/index.d.ts +5 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/placeholder/index.d.ts +2 -0
- package/dist/components/popover/CPopover.d.ts +2 -2
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/sidebar/index.d.ts +7 -0
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/table/index.d.ts +9 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/toast/index.d.ts +6 -0
- package/dist/components/tooltip/CTooltip.d.ts +6 -2
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/index.d.ts +0 -120
- package/dist/index.es.js +585 -512
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +585 -512
- package/dist/index.js.map +1 -1
- package/package.json +13 -12
- package/src/components/accordion/CAccordionButton.tsx +2 -1
- package/src/components/accordion/__tests__/__snapshots__/CAccordionButton.spec.tsx.snap +2 -0
- package/src/components/accordion/__tests__/__snapshots__/CAccordionHeader.spec.tsx.snap +2 -0
- package/src/components/accordion/index.ts +15 -0
- package/src/components/alert/CAlert.tsx +14 -3
- package/src/components/alert/index.ts +5 -0
- package/src/components/avatar/index.ts +3 -0
- package/src/components/backdrop/CBackdrop.tsx +10 -3
- package/src/components/backdrop/index.ts +3 -0
- package/src/components/badge/index.ts +3 -0
- package/src/components/breadcrumb/index.ts +4 -0
- package/src/components/button/index.ts +3 -0
- package/src/components/button-group/index.ts +4 -0
- package/src/components/callout/index.ts +3 -0
- package/src/components/card/index.ts +25 -0
- package/src/components/carousel/index.ts +5 -0
- package/src/components/close-button/index.ts +3 -0
- package/src/components/collapse/CCollapse.tsx +1 -0
- package/src/components/collapse/index.ts +3 -0
- package/src/components/dropdown/CDropdown.tsx +19 -24
- package/src/components/dropdown/CDropdownItem.tsx +1 -1
- package/src/components/dropdown/CDropdownMenu.tsx +55 -3
- package/src/components/dropdown/CDropdownToggle.tsx +28 -5
- package/src/components/dropdown/index.ts +17 -0
- package/src/components/footer/index.ts +3 -0
- package/src/components/form/CForm.tsx +2 -2
- package/src/components/form/CFormCheck.tsx +32 -7
- package/src/components/form/CFormControlValidation.tsx +97 -0
- package/src/components/form/CFormControlWrapper.tsx +85 -0
- package/src/components/form/CFormInput.tsx +75 -19
- package/src/components/form/CFormRange.tsx +18 -4
- package/src/components/form/CFormSelect.tsx +60 -32
- package/src/components/form/CFormTextarea.tsx +45 -17
- package/src/components/form/index.ts +29 -0
- package/src/components/grid/index.ts +5 -0
- package/src/components/header/index.ts +8 -0
- package/src/components/image/index.ts +3 -0
- package/src/components/index.ts +35 -0
- package/src/components/link/index.ts +3 -0
- package/src/components/list-group/index.ts +4 -0
- package/src/components/modal/CModal.tsx +3 -2
- package/src/components/modal/index.ts +9 -0
- package/src/components/nav/CNavGroup.tsx +1 -0
- package/src/components/nav/index.ts +8 -0
- package/src/components/navbar/index.ts +7 -0
- package/src/components/offcanvas/COffcanvas.tsx +1 -0
- package/src/components/offcanvas/index.ts +6 -0
- package/src/components/pagination/index.ts +4 -0
- package/src/components/placeholder/index.ts +3 -0
- package/src/components/popover/CPopover.tsx +59 -57
- package/src/components/popover/index.ts +3 -0
- package/src/components/progress/index.ts +4 -0
- package/src/components/sidebar/index.ts +8 -0
- package/src/components/spinner/index.ts +3 -0
- package/src/components/table/index.ts +19 -0
- package/src/components/tabs/CTabPane.tsx +7 -3
- package/src/components/tabs/index.ts +4 -0
- package/src/components/toast/CToast.tsx +6 -1
- package/src/components/toast/index.ts +7 -0
- package/src/components/tooltip/CTooltip.tsx +63 -45
- package/src/components/tooltip/index.ts +3 -0
- package/src/index.ts +0 -242
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
29
29
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
30
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
/******************************************************************************
|
|
33
33
|
Copyright (c) Microsoft Corporation.
|
|
34
34
|
|
|
35
35
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -879,7 +879,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
879
879
|
if (checkerResult == null) {
|
|
880
880
|
return null;
|
|
881
881
|
}
|
|
882
|
-
if (checkerResult.data.
|
|
882
|
+
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
883
883
|
expectedTypes.push(checkerResult.data.expectedType);
|
|
884
884
|
}
|
|
885
885
|
}
|
|
@@ -2506,7 +2506,7 @@ var CCollapse = React.forwardRef(function (_a, ref) {
|
|
|
2506
2506
|
var _className = classNames({
|
|
2507
2507
|
'collapse-horizontal': horizontal,
|
|
2508
2508
|
}, className);
|
|
2509
|
-
return (React__default["default"].createElement(CSSTransition$1, { in: visible, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 350 }, function (state) {
|
|
2509
|
+
return (React__default["default"].createElement(CSSTransition$1, { in: visible, nodeRef: collapseRef, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 350 }, function (state) {
|
|
2510
2510
|
var transitionClass = getTransitionClass(state);
|
|
2511
2511
|
var currentHeight = height === 0 ? null : { height: height };
|
|
2512
2512
|
var currentWidth = width === 0 ? null : { width: width };
|
|
@@ -2540,7 +2540,7 @@ var CAccordionButton = React.forwardRef(function (_a, ref) {
|
|
|
2540
2540
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
2541
2541
|
var _b = React.useContext(CAccordionItemContext), visible = _b.visible, setVisible = _b.setVisible;
|
|
2542
2542
|
var _className = classNames('accordion-button', { collapsed: !visible }, className);
|
|
2543
|
-
return (React__default["default"].createElement("button", __assign({ className: _className
|
|
2543
|
+
return (React__default["default"].createElement("button", __assign({ type: "button", className: _className, "aria-expanded": !visible, onClick: function () { return setVisible(!visible); } }, rest, { ref: ref }), children));
|
|
2544
2544
|
});
|
|
2545
2545
|
CAccordionButton.propTypes = {
|
|
2546
2546
|
children: PropTypes.node,
|
|
@@ -2638,6 +2638,8 @@ CCloseButton.displayName = 'CCloseButton';
|
|
|
2638
2638
|
|
|
2639
2639
|
var CAlert = React.forwardRef(function (_a, ref) {
|
|
2640
2640
|
var children = _a.children, className = _a.className, _b = _a.color, color = _b === void 0 ? 'primary' : _b, dismissible = _a.dismissible, variant = _a.variant, _c = _a.visible, visible = _c === void 0 ? true : _c, onClose = _a.onClose, rest = __rest(_a, ["children", "className", "color", "dismissible", "variant", "visible", "onClose"]);
|
|
2641
|
+
var alertRef = React.useRef(null);
|
|
2642
|
+
var forkedRef = useForkedRef(ref, alertRef);
|
|
2641
2643
|
var _d = React.useState(visible), _visible = _d[0], setVisible = _d[1];
|
|
2642
2644
|
React.useEffect(function () {
|
|
2643
2645
|
setVisible(visible);
|
|
@@ -2648,9 +2650,9 @@ var CAlert = React.forwardRef(function (_a, ref) {
|
|
|
2648
2650
|
var getTransitionClass = function (state) {
|
|
2649
2651
|
return state === 'entered' && 'show';
|
|
2650
2652
|
};
|
|
2651
|
-
return (React__default["default"].createElement(Transition$1, { in: _visible, mountOnEnter: true, onExit: onClose, timeout: 150, unmountOnExit: true }, function (state) {
|
|
2653
|
+
return (React__default["default"].createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: alertRef, onExit: onClose, timeout: 150, unmountOnExit: true }, function (state) {
|
|
2652
2654
|
var transitionClass = getTransitionClass(state);
|
|
2653
|
-
return (React__default["default"].createElement("div", __assign({ className: classNames(_className, transitionClass), role: "alert" }, rest, { ref:
|
|
2655
|
+
return (React__default["default"].createElement("div", __assign({ className: classNames(_className, transitionClass), role: "alert" }, rest, { ref: forkedRef }),
|
|
2654
2656
|
children,
|
|
2655
2657
|
dismissible && React__default["default"].createElement(CCloseButton, { onClick: function () { return setVisible(false); } })));
|
|
2656
2658
|
}));
|
|
@@ -2734,6 +2736,25 @@ CAvatar.propTypes = {
|
|
|
2734
2736
|
};
|
|
2735
2737
|
CAvatar.displayName = 'CAvatar';
|
|
2736
2738
|
|
|
2739
|
+
var CBackdrop = React.forwardRef(function (_a, ref) {
|
|
2740
|
+
var _b = _a.className, className = _b === void 0 ? 'modal-backdrop' : _b, visible = _a.visible, rest = __rest(_a, ["className", "visible"]);
|
|
2741
|
+
var backdropRef = React.useRef(null);
|
|
2742
|
+
var forkedRef = useForkedRef(ref, backdropRef);
|
|
2743
|
+
var _className = classNames(className, 'fade');
|
|
2744
|
+
var getTransitionClass = function (state) {
|
|
2745
|
+
return state === 'entered' && 'show';
|
|
2746
|
+
};
|
|
2747
|
+
return (React__default["default"].createElement(Transition$1, { in: visible, mountOnEnter: true, nodeRef: backdropRef, timeout: 150, unmountOnExit: true }, function (state) {
|
|
2748
|
+
var transitionClass = getTransitionClass(state);
|
|
2749
|
+
return (React__default["default"].createElement("div", __assign({ className: classNames(_className, transitionClass) }, rest, { ref: forkedRef })));
|
|
2750
|
+
}));
|
|
2751
|
+
});
|
|
2752
|
+
CBackdrop.propTypes = {
|
|
2753
|
+
className: PropTypes.string,
|
|
2754
|
+
visible: PropTypes.bool,
|
|
2755
|
+
};
|
|
2756
|
+
CBackdrop.displayName = 'CBackdrop';
|
|
2757
|
+
|
|
2737
2758
|
var CBadge = React.forwardRef(function (_a, ref) {
|
|
2738
2759
|
var _b;
|
|
2739
2760
|
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(_a, ["children", "className", "color", "component", "position", "shape", "size", "textColor"]);
|
|
@@ -2761,23 +2782,6 @@ CBadge.propTypes = {
|
|
|
2761
2782
|
};
|
|
2762
2783
|
CBadge.displayName = 'CBadge';
|
|
2763
2784
|
|
|
2764
|
-
var CBackdrop = React.forwardRef(function (_a, ref) {
|
|
2765
|
-
var _b = _a.className, className = _b === void 0 ? 'modal-backdrop' : _b, visible = _a.visible, rest = __rest(_a, ["className", "visible"]);
|
|
2766
|
-
var _className = classNames(className, 'fade');
|
|
2767
|
-
var getTransitionClass = function (state) {
|
|
2768
|
-
return state === 'entered' && 'show';
|
|
2769
|
-
};
|
|
2770
|
-
return (React__default["default"].createElement(Transition$1, { in: visible, mountOnEnter: true, timeout: 150, unmountOnExit: true }, function (state) {
|
|
2771
|
-
var transitionClass = getTransitionClass(state);
|
|
2772
|
-
return React__default["default"].createElement("div", __assign({ className: classNames(_className, transitionClass) }, rest, { ref: ref }));
|
|
2773
|
-
}));
|
|
2774
|
-
});
|
|
2775
|
-
CBackdrop.propTypes = {
|
|
2776
|
-
className: PropTypes.string,
|
|
2777
|
-
visible: PropTypes.bool,
|
|
2778
|
-
};
|
|
2779
|
-
CBackdrop.displayName = 'CBackdrop';
|
|
2780
|
-
|
|
2781
2785
|
var CBreadcrumb = React.forwardRef(function (_a, ref) {
|
|
2782
2786
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
2783
2787
|
var _className = classNames('breadcrumb', className);
|
|
@@ -2823,6 +2827,17 @@ CButton.propTypes = {
|
|
|
2823
2827
|
};
|
|
2824
2828
|
CButton.displayName = 'CButton';
|
|
2825
2829
|
|
|
2830
|
+
var CButtonToolbar = React.forwardRef(function (_a, ref) {
|
|
2831
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
2832
|
+
var _className = classNames('btn-toolbar', className);
|
|
2833
|
+
return (React__default["default"].createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2834
|
+
});
|
|
2835
|
+
CButtonToolbar.propTypes = {
|
|
2836
|
+
children: PropTypes.node,
|
|
2837
|
+
className: PropTypes.string,
|
|
2838
|
+
};
|
|
2839
|
+
CButtonToolbar.displayName = 'CButtonToolbar';
|
|
2840
|
+
|
|
2826
2841
|
var CButtonGroup = React.forwardRef(function (_a, ref) {
|
|
2827
2842
|
var _b;
|
|
2828
2843
|
var children = _a.children, className = _a.className, size = _a.size, vertical = _a.vertical, rest = __rest(_a, ["children", "className", "size", "vertical"]);
|
|
@@ -2837,17 +2852,6 @@ CButtonGroup.propTypes = {
|
|
|
2837
2852
|
};
|
|
2838
2853
|
CButtonGroup.displayName = 'CButtonGroup';
|
|
2839
2854
|
|
|
2840
|
-
var CButtonToolbar = React.forwardRef(function (_a, ref) {
|
|
2841
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
2842
|
-
var _className = classNames('btn-toolbar', className);
|
|
2843
|
-
return (React__default["default"].createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2844
|
-
});
|
|
2845
|
-
CButtonToolbar.propTypes = {
|
|
2846
|
-
children: PropTypes.node,
|
|
2847
|
-
className: PropTypes.string,
|
|
2848
|
-
};
|
|
2849
|
-
CButtonToolbar.displayName = 'CButtonToolbar';
|
|
2850
|
-
|
|
2851
2855
|
var CCallout = React.forwardRef(function (_a, ref) {
|
|
2852
2856
|
var _b;
|
|
2853
2857
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
@@ -3598,6 +3602,10 @@ function getContainingBlock(element) {
|
|
|
3598
3602
|
|
|
3599
3603
|
var currentNode = getParentNode(element);
|
|
3600
3604
|
|
|
3605
|
+
if (isShadowRoot(currentNode)) {
|
|
3606
|
+
currentNode = currentNode.host;
|
|
3607
|
+
}
|
|
3608
|
+
|
|
3601
3609
|
while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
|
|
3602
3610
|
var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that
|
|
3603
3611
|
// create a containing block.
|
|
@@ -3790,13 +3798,21 @@ function mapToStyles(_ref2) {
|
|
|
3790
3798
|
adaptive = _ref2.adaptive,
|
|
3791
3799
|
roundOffsets = _ref2.roundOffsets,
|
|
3792
3800
|
isFixed = _ref2.isFixed;
|
|
3801
|
+
var _offsets$x = offsets.x,
|
|
3802
|
+
x = _offsets$x === void 0 ? 0 : _offsets$x,
|
|
3803
|
+
_offsets$y = offsets.y,
|
|
3804
|
+
y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
3793
3805
|
|
|
3794
|
-
var _ref3 =
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3806
|
+
var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
|
|
3807
|
+
x: x,
|
|
3808
|
+
y: y
|
|
3809
|
+
}) : {
|
|
3810
|
+
x: x,
|
|
3811
|
+
y: y
|
|
3812
|
+
};
|
|
3799
3813
|
|
|
3814
|
+
x = _ref3.x;
|
|
3815
|
+
y = _ref3.y;
|
|
3800
3816
|
var hasX = offsets.hasOwnProperty('x');
|
|
3801
3817
|
var hasY = offsets.hasOwnProperty('y');
|
|
3802
3818
|
var sideX = left;
|
|
@@ -3822,7 +3838,7 @@ function mapToStyles(_ref2) {
|
|
|
3822
3838
|
|
|
3823
3839
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
3824
3840
|
sideY = bottom;
|
|
3825
|
-
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
3841
|
+
var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
3826
3842
|
offsetParent[heightProp];
|
|
3827
3843
|
y -= offsetY - popperRect.height;
|
|
3828
3844
|
y *= gpuAcceleration ? 1 : -1;
|
|
@@ -3830,7 +3846,7 @@ function mapToStyles(_ref2) {
|
|
|
3830
3846
|
|
|
3831
3847
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
3832
3848
|
sideX = right;
|
|
3833
|
-
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
3849
|
+
var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
3834
3850
|
offsetParent[widthProp];
|
|
3835
3851
|
x -= offsetX - popperRect.width;
|
|
3836
3852
|
x *= gpuAcceleration ? 1 : -1;
|
|
@@ -3841,6 +3857,17 @@ function mapToStyles(_ref2) {
|
|
|
3841
3857
|
position: position
|
|
3842
3858
|
}, adaptive && unsetSides);
|
|
3843
3859
|
|
|
3860
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
3861
|
+
x: x,
|
|
3862
|
+
y: y
|
|
3863
|
+
}) : {
|
|
3864
|
+
x: x,
|
|
3865
|
+
y: y
|
|
3866
|
+
};
|
|
3867
|
+
|
|
3868
|
+
x = _ref4.x;
|
|
3869
|
+
y = _ref4.y;
|
|
3870
|
+
|
|
3844
3871
|
if (gpuAcceleration) {
|
|
3845
3872
|
var _Object$assign;
|
|
3846
3873
|
|
|
@@ -3850,9 +3877,9 @@ function mapToStyles(_ref2) {
|
|
|
3850
3877
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
3851
3878
|
}
|
|
3852
3879
|
|
|
3853
|
-
function computeStyles(
|
|
3854
|
-
var state =
|
|
3855
|
-
options =
|
|
3880
|
+
function computeStyles(_ref5) {
|
|
3881
|
+
var state = _ref5.state,
|
|
3882
|
+
options = _ref5.options;
|
|
3856
3883
|
var _options$gpuAccelerat = options.gpuAcceleration,
|
|
3857
3884
|
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
|
3858
3885
|
_options$adaptive = options.adaptive,
|
|
@@ -4151,7 +4178,7 @@ function getClippingParents(element) {
|
|
|
4151
4178
|
|
|
4152
4179
|
|
|
4153
4180
|
return clippingParents.filter(function (clippingParent) {
|
|
4154
|
-
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'
|
|
4181
|
+
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
|
4155
4182
|
});
|
|
4156
4183
|
} // Gets the maximum area that the element is visible in due to any number of
|
|
4157
4184
|
// clipping parents
|
|
@@ -5626,9 +5653,10 @@ function Reference(_ref) {
|
|
|
5626
5653
|
|
|
5627
5654
|
var CDropdownContext = React.createContext({});
|
|
5628
5655
|
var CDropdown = React.forwardRef(function (_a, ref) {
|
|
5629
|
-
var children = _a.children, alignment = _a.alignment, className = _a.className, dark = _a.dark, direction = _a.direction, onHide = _a.onHide, onShow = _a.onShow,
|
|
5630
|
-
var
|
|
5656
|
+
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(_a, ["children", "alignment", "autoClose", "className", "dark", "direction", "onHide", "onShow", "placement", "popper", "variant", "component", "visible"]);
|
|
5657
|
+
var _h = React.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
5631
5658
|
var dropdownRef = React.useRef(null);
|
|
5659
|
+
var dropdownToggleRef = React.useRef(null);
|
|
5632
5660
|
var forkedRef = useForkedRef(ref, dropdownRef);
|
|
5633
5661
|
var Component = variant === 'nav-item' ? 'li' : component;
|
|
5634
5662
|
// Disable popper if responsive aligment is set.
|
|
@@ -5637,8 +5665,10 @@ var CDropdown = React.forwardRef(function (_a, ref) {
|
|
|
5637
5665
|
}
|
|
5638
5666
|
var contextValues = {
|
|
5639
5667
|
alignment: alignment,
|
|
5668
|
+
autoClose: autoClose,
|
|
5640
5669
|
dark: dark,
|
|
5641
5670
|
direction: direction,
|
|
5671
|
+
dropdownToggleRef: dropdownToggleRef,
|
|
5642
5672
|
placement: placement,
|
|
5643
5673
|
popper: popper,
|
|
5644
5674
|
variant: variant,
|
|
@@ -5648,17 +5678,6 @@ var CDropdown = React.forwardRef(function (_a, ref) {
|
|
|
5648
5678
|
var _className = classNames(variant === 'nav-item' ? 'nav-item dropdown' : variant, {
|
|
5649
5679
|
show: _visible,
|
|
5650
5680
|
}, direction, className);
|
|
5651
|
-
React.useEffect(function () {
|
|
5652
|
-
_visible &&
|
|
5653
|
-
setTimeout(function () {
|
|
5654
|
-
window.addEventListener('click', handleClickOutside);
|
|
5655
|
-
window.addEventListener('keyup', handleKeyup);
|
|
5656
|
-
});
|
|
5657
|
-
return function () {
|
|
5658
|
-
window.removeEventListener('click', handleClickOutside);
|
|
5659
|
-
window.removeEventListener('keyup', handleKeyup);
|
|
5660
|
-
};
|
|
5661
|
-
}, [_visible]);
|
|
5662
5681
|
React.useEffect(function () {
|
|
5663
5682
|
setVisible(visible);
|
|
5664
5683
|
}, [visible]);
|
|
@@ -5666,18 +5685,6 @@ var CDropdown = React.forwardRef(function (_a, ref) {
|
|
|
5666
5685
|
_visible && onShow && onShow();
|
|
5667
5686
|
!_visible && onHide && onHide();
|
|
5668
5687
|
}, [_visible]);
|
|
5669
|
-
var handleKeyup = function (event) {
|
|
5670
|
-
var _a;
|
|
5671
|
-
if (!((_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
|
|
5672
|
-
setVisible(false);
|
|
5673
|
-
}
|
|
5674
|
-
};
|
|
5675
|
-
var handleClickOutside = function (event) {
|
|
5676
|
-
var _a;
|
|
5677
|
-
if (!((_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
|
|
5678
|
-
setVisible(false);
|
|
5679
|
-
}
|
|
5680
|
-
};
|
|
5681
5688
|
var dropdownContent = function () {
|
|
5682
5689
|
return variant === 'input-group' ? (React__default["default"].createElement(React__default["default"].Fragment, null, children)) : (React__default["default"].createElement(Component, __assign({ className: _className }, rest, { ref: forkedRef }), children));
|
|
5683
5690
|
};
|
|
@@ -5696,6 +5703,10 @@ CDropdown.propTypes = {
|
|
|
5696
5703
|
PropTypes.shape({ xl: alignmentDirection }),
|
|
5697
5704
|
PropTypes.shape({ xxl: alignmentDirection }),
|
|
5698
5705
|
]),
|
|
5706
|
+
autoClose: PropTypes.oneOfType([
|
|
5707
|
+
PropTypes.bool,
|
|
5708
|
+
PropTypes.oneOf(['inside', 'outside']),
|
|
5709
|
+
]),
|
|
5699
5710
|
children: PropTypes.node,
|
|
5700
5711
|
className: PropTypes.string,
|
|
5701
5712
|
component: PropTypes.elementType,
|
|
@@ -5735,7 +5746,7 @@ CDropdownHeader.displayName = 'CDropdownHeader';
|
|
|
5735
5746
|
var CDropdownItem = React.forwardRef(function (_a, ref) {
|
|
5736
5747
|
var children = _a.children, className = _a.className, _b = _a.component, component = _b === void 0 ? 'a' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5737
5748
|
var _className = classNames('dropdown-item', className);
|
|
5738
|
-
return (React__default["default"].createElement(CLink, __assign({ component: component }, rest, {
|
|
5749
|
+
return (React__default["default"].createElement(CLink, __assign({ className: _className, component: component }, rest, { ref: ref }), children));
|
|
5739
5750
|
});
|
|
5740
5751
|
CDropdownItem.propTypes = {
|
|
5741
5752
|
children: PropTypes.node,
|
|
@@ -5758,7 +5769,36 @@ CDropdownItemPlain.displayName = 'CDropdownItemPlain';
|
|
|
5758
5769
|
|
|
5759
5770
|
var CDropdownMenu = function (_a) {
|
|
5760
5771
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'ul' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5761
|
-
var _c = React.useContext(CDropdownContext), alignment = _c.alignment, dark = _c.dark, direction = _c.direction, placement = _c.placement, popper = _c.popper, visible = _c.visible;
|
|
5772
|
+
var _c = React.useContext(CDropdownContext), alignment = _c.alignment, autoClose = _c.autoClose, dark = _c.dark, direction = _c.direction, dropdownToggleRef = _c.dropdownToggleRef, placement = _c.placement, popper = _c.popper, visible = _c.visible, setVisible = _c.setVisible;
|
|
5773
|
+
var dropdownMenuRef = React.useRef(null);
|
|
5774
|
+
React.useEffect(function () {
|
|
5775
|
+
visible && window.addEventListener('mouseup', handleMouseUp);
|
|
5776
|
+
visible && window.addEventListener('keyup', handleKeyup);
|
|
5777
|
+
return function () {
|
|
5778
|
+
window.removeEventListener('mouseup', handleMouseUp);
|
|
5779
|
+
window.removeEventListener('keyup', handleKeyup);
|
|
5780
|
+
};
|
|
5781
|
+
}, [visible]);
|
|
5782
|
+
var handleKeyup = function (event) {
|
|
5783
|
+
if (autoClose === false) {
|
|
5784
|
+
return;
|
|
5785
|
+
}
|
|
5786
|
+
if (event.key === 'Escape') {
|
|
5787
|
+
setVisible(false);
|
|
5788
|
+
}
|
|
5789
|
+
};
|
|
5790
|
+
var handleMouseUp = function (event) {
|
|
5791
|
+
var _a, _b;
|
|
5792
|
+
if (dropdownToggleRef && dropdownToggleRef.current.contains(event.target)) {
|
|
5793
|
+
return;
|
|
5794
|
+
}
|
|
5795
|
+
if (autoClose === true ||
|
|
5796
|
+
(autoClose === 'inside' && ((_a = dropdownMenuRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) ||
|
|
5797
|
+
(autoClose === 'outside' && !((_b = dropdownMenuRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target)))) {
|
|
5798
|
+
setTimeout(function () { return setVisible(false); }, 1);
|
|
5799
|
+
return;
|
|
5800
|
+
}
|
|
5801
|
+
};
|
|
5762
5802
|
var _placement = placement;
|
|
5763
5803
|
if (direction === 'dropup') {
|
|
5764
5804
|
_placement = 'top-start';
|
|
@@ -5798,7 +5838,7 @@ var CDropdownMenu = function (_a) {
|
|
|
5798
5838
|
})
|
|
5799
5839
|
: children));
|
|
5800
5840
|
};
|
|
5801
|
-
return popper && visible ? (React__default["default"].createElement(Popper, { placement: _placement }, function (_a) {
|
|
5841
|
+
return popper && visible ? (React__default["default"].createElement(Popper, { innerRef: dropdownMenuRef, placement: _placement }, function (_a) {
|
|
5802
5842
|
var ref = _a.ref, style = _a.style;
|
|
5803
5843
|
return dropdownMenuComponent(style, ref);
|
|
5804
5844
|
})) : (dropdownMenuComponent());
|
|
@@ -5811,8 +5851,8 @@ CDropdownMenu.propTypes = {
|
|
|
5811
5851
|
CDropdownMenu.displayName = 'CDropdownMenu';
|
|
5812
5852
|
|
|
5813
5853
|
var CDropdownToggle = function (_a) {
|
|
5814
|
-
var children = _a.children, _b = _a.caret, caret = _b === void 0 ? true : _b, className = _a.className, split = _a.split, _c = _a.trigger, trigger = _c === void 0 ? 'click' : _c, rest = __rest(_a, ["children", "caret", "className", "split", "trigger"]);
|
|
5815
|
-
var _d = React.useContext(CDropdownContext), popper = _d.popper, variant = _d.variant, visible = _d.visible, setVisible = _d.setVisible;
|
|
5854
|
+
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(_a, ["children", "caret", "custom", "className", "split", "trigger"]);
|
|
5855
|
+
var _d = React.useContext(CDropdownContext), dropdownToggleRef = _d.dropdownToggleRef, popper = _d.popper, variant = _d.variant, visible = _d.visible, setVisible = _d.setVisible;
|
|
5816
5856
|
var _className = classNames({
|
|
5817
5857
|
'dropdown-toggle': caret,
|
|
5818
5858
|
'dropdown-toggle-split': split,
|
|
@@ -5827,175 +5867,29 @@ var CDropdownToggle = function (_a) {
|
|
|
5827
5867
|
onFocus: function () { return setVisible(true); },
|
|
5828
5868
|
onBlur: function () { return setVisible(false); },
|
|
5829
5869
|
}));
|
|
5830
|
-
var togglerProps = __assign({ className: _className, 'aria-expanded': visible }, triggers);
|
|
5870
|
+
var togglerProps = __assign(__assign({ className: _className, 'aria-expanded': visible }, (!rest.disabled && __assign({}, triggers))), triggers);
|
|
5831
5871
|
// We use any because Toggler can be `a` as well as `button`.
|
|
5832
5872
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5833
5873
|
var Toggler = function (ref) {
|
|
5834
|
-
return variant === 'nav-item' ? (React__default["default"].createElement("a", __assign({ href: "#" }, togglerProps, { ref: ref }), children)) : (React__default["default"].createElement(CButton, __assign({ type: "button" }, togglerProps, { tabIndex: 0 }, rest, { ref: ref }),
|
|
5874
|
+
return custom && React__default["default"].isValidElement(children) ? (React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].cloneElement(children, __assign(__assign({ 'aria-expanded': visible }, (!rest.disabled && __assign({}, triggers))), { ref: useForkedRef(ref, dropdownToggleRef) })))) : variant === 'nav-item' ? (React__default["default"].createElement("a", __assign({ href: "#" }, togglerProps, { ref: useForkedRef(ref, dropdownToggleRef) }), children)) : (React__default["default"].createElement(CButton, __assign({ type: "button" }, togglerProps, { tabIndex: 0 }, rest, { ref: useForkedRef(ref, dropdownToggleRef) }),
|
|
5835
5875
|
children,
|
|
5836
5876
|
split && React__default["default"].createElement("span", { className: "visually-hidden" }, "Toggle Dropdown")));
|
|
5837
5877
|
};
|
|
5838
5878
|
return popper ? React__default["default"].createElement(Reference, null, function (_a) {
|
|
5839
5879
|
var ref = _a.ref;
|
|
5840
5880
|
return Toggler(ref);
|
|
5841
|
-
}) : Toggler();
|
|
5881
|
+
}) : Toggler(dropdownToggleRef);
|
|
5842
5882
|
};
|
|
5843
5883
|
CDropdownToggle.propTypes = {
|
|
5844
5884
|
caret: PropTypes.bool,
|
|
5845
5885
|
children: PropTypes.node,
|
|
5846
5886
|
className: PropTypes.string,
|
|
5887
|
+
custom: PropTypes.bool,
|
|
5847
5888
|
split: PropTypes.bool,
|
|
5848
5889
|
trigger: triggerPropType,
|
|
5849
5890
|
};
|
|
5850
5891
|
CDropdownToggle.displayName = 'CDropdownToggle';
|
|
5851
5892
|
|
|
5852
|
-
var BREAKPOINTS$3 = [
|
|
5853
|
-
'xxl',
|
|
5854
|
-
'xl',
|
|
5855
|
-
'lg',
|
|
5856
|
-
'md',
|
|
5857
|
-
'sm',
|
|
5858
|
-
'xs',
|
|
5859
|
-
];
|
|
5860
|
-
var CCol = React.forwardRef(function (_a, ref) {
|
|
5861
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
5862
|
-
var repsonsiveClassNames = [];
|
|
5863
|
-
BREAKPOINTS$3.forEach(function (bp) {
|
|
5864
|
-
var breakpoint = rest[bp];
|
|
5865
|
-
delete rest[bp];
|
|
5866
|
-
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
5867
|
-
if (typeof breakpoint === 'number' || typeof breakpoint === 'string') {
|
|
5868
|
-
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint));
|
|
5869
|
-
}
|
|
5870
|
-
if (typeof breakpoint === 'boolean') {
|
|
5871
|
-
repsonsiveClassNames.push("col".concat(infix));
|
|
5872
|
-
}
|
|
5873
|
-
if (breakpoint && typeof breakpoint === 'object') {
|
|
5874
|
-
if (typeof breakpoint.span === 'number' || typeof breakpoint.span === 'string') {
|
|
5875
|
-
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint.span));
|
|
5876
|
-
}
|
|
5877
|
-
if (typeof breakpoint.span === 'boolean') {
|
|
5878
|
-
repsonsiveClassNames.push("col".concat(infix));
|
|
5879
|
-
}
|
|
5880
|
-
if (typeof breakpoint.order === 'number' || typeof breakpoint.order === 'string') {
|
|
5881
|
-
repsonsiveClassNames.push("order".concat(infix, "-").concat(breakpoint.order));
|
|
5882
|
-
}
|
|
5883
|
-
if (typeof breakpoint.offset === 'number') {
|
|
5884
|
-
repsonsiveClassNames.push("offset".concat(infix, "-").concat(breakpoint.offset));
|
|
5885
|
-
}
|
|
5886
|
-
}
|
|
5887
|
-
});
|
|
5888
|
-
var _className = classNames(repsonsiveClassNames.length ? repsonsiveClassNames : 'col', className);
|
|
5889
|
-
return (React__default["default"].createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5890
|
-
});
|
|
5891
|
-
var span = PropTypes.oneOfType([
|
|
5892
|
-
PropTypes.bool,
|
|
5893
|
-
PropTypes.number,
|
|
5894
|
-
PropTypes.string,
|
|
5895
|
-
PropTypes.oneOf(['auto']),
|
|
5896
|
-
]);
|
|
5897
|
-
var col = PropTypes.oneOfType([
|
|
5898
|
-
span,
|
|
5899
|
-
PropTypes.shape({
|
|
5900
|
-
span: span,
|
|
5901
|
-
offset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
5902
|
-
order: PropTypes.oneOfType([
|
|
5903
|
-
PropTypes.oneOf(['first', 'last']),
|
|
5904
|
-
PropTypes.number,
|
|
5905
|
-
PropTypes.string,
|
|
5906
|
-
]),
|
|
5907
|
-
}),
|
|
5908
|
-
]);
|
|
5909
|
-
CCol.propTypes = {
|
|
5910
|
-
children: PropTypes.node,
|
|
5911
|
-
className: PropTypes.string,
|
|
5912
|
-
xs: col,
|
|
5913
|
-
sm: col,
|
|
5914
|
-
};
|
|
5915
|
-
CCol.displayName = 'CCol';
|
|
5916
|
-
|
|
5917
|
-
var BREAKPOINTS$2 = [
|
|
5918
|
-
'xxl',
|
|
5919
|
-
'xl',
|
|
5920
|
-
'lg',
|
|
5921
|
-
'md',
|
|
5922
|
-
'sm',
|
|
5923
|
-
'fluid',
|
|
5924
|
-
];
|
|
5925
|
-
var CContainer = React.forwardRef(function (_a, ref) {
|
|
5926
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
5927
|
-
var repsonsiveClassNames = [];
|
|
5928
|
-
BREAKPOINTS$2.forEach(function (bp) {
|
|
5929
|
-
var breakpoint = rest[bp];
|
|
5930
|
-
delete rest[bp];
|
|
5931
|
-
breakpoint && repsonsiveClassNames.push("container-".concat(bp));
|
|
5932
|
-
});
|
|
5933
|
-
var _className = classNames(repsonsiveClassNames.length ? repsonsiveClassNames : 'container', className);
|
|
5934
|
-
return (React__default["default"].createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5935
|
-
});
|
|
5936
|
-
CContainer.propTypes = {
|
|
5937
|
-
children: PropTypes.node,
|
|
5938
|
-
className: PropTypes.string,
|
|
5939
|
-
sm: PropTypes.bool,
|
|
5940
|
-
md: PropTypes.bool,
|
|
5941
|
-
lg: PropTypes.bool,
|
|
5942
|
-
xl: PropTypes.bool,
|
|
5943
|
-
xxl: PropTypes.bool,
|
|
5944
|
-
fluid: PropTypes.bool,
|
|
5945
|
-
};
|
|
5946
|
-
CContainer.displayName = 'CContainer';
|
|
5947
|
-
|
|
5948
|
-
var BREAKPOINTS$1 = [
|
|
5949
|
-
'xxl',
|
|
5950
|
-
'xl',
|
|
5951
|
-
'lg',
|
|
5952
|
-
'md',
|
|
5953
|
-
'sm',
|
|
5954
|
-
'xs',
|
|
5955
|
-
];
|
|
5956
|
-
var CRow = React.forwardRef(function (_a, ref) {
|
|
5957
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
5958
|
-
var repsonsiveClassNames = [];
|
|
5959
|
-
BREAKPOINTS$1.forEach(function (bp) {
|
|
5960
|
-
var breakpoint = rest[bp];
|
|
5961
|
-
delete rest[bp];
|
|
5962
|
-
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
5963
|
-
if (typeof breakpoint === 'object') {
|
|
5964
|
-
if (breakpoint.cols) {
|
|
5965
|
-
repsonsiveClassNames.push("row-cols".concat(infix, "-").concat(breakpoint.cols));
|
|
5966
|
-
}
|
|
5967
|
-
if (typeof breakpoint.gutter === 'number') {
|
|
5968
|
-
repsonsiveClassNames.push("g".concat(infix, "-").concat(breakpoint.gutter));
|
|
5969
|
-
}
|
|
5970
|
-
if (typeof breakpoint.gutterX === 'number') {
|
|
5971
|
-
repsonsiveClassNames.push("gx".concat(infix, "-").concat(breakpoint.gutterX));
|
|
5972
|
-
}
|
|
5973
|
-
if (typeof breakpoint.gutterY === 'number') {
|
|
5974
|
-
repsonsiveClassNames.push("gy".concat(infix, "-").concat(breakpoint.gutterY));
|
|
5975
|
-
}
|
|
5976
|
-
}
|
|
5977
|
-
});
|
|
5978
|
-
var _className = classNames('row', repsonsiveClassNames, className);
|
|
5979
|
-
return (React__default["default"].createElement("div", { className: _className, ref: ref }, children));
|
|
5980
|
-
});
|
|
5981
|
-
var bp = PropTypes.shape({
|
|
5982
|
-
cols: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.string]),
|
|
5983
|
-
gutter: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
5984
|
-
gutterX: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
5985
|
-
gutterY: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
5986
|
-
});
|
|
5987
|
-
CRow.propTypes = {
|
|
5988
|
-
children: PropTypes.node,
|
|
5989
|
-
className: PropTypes.string,
|
|
5990
|
-
xs: bp,
|
|
5991
|
-
sm: bp,
|
|
5992
|
-
md: bp,
|
|
5993
|
-
lg: bp,
|
|
5994
|
-
xl: bp,
|
|
5995
|
-
xxl: bp,
|
|
5996
|
-
};
|
|
5997
|
-
CRow.displayName = 'CRow';
|
|
5998
|
-
|
|
5999
5893
|
var CFooter = React.forwardRef(function (_a, ref) {
|
|
6000
5894
|
var _b;
|
|
6001
5895
|
var children = _a.children, className = _a.className, position = _a.position, rest = __rest(_a, ["children", "className", "position"]);
|
|
@@ -6021,12 +5915,49 @@ CForm.propTypes = {
|
|
|
6021
5915
|
};
|
|
6022
5916
|
CForm.displayName = 'CForm';
|
|
6023
5917
|
|
|
6024
|
-
var
|
|
6025
|
-
var
|
|
6026
|
-
var
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
5918
|
+
var CFormFeedback = React.forwardRef(function (_a, ref) {
|
|
5919
|
+
var _b;
|
|
5920
|
+
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(_a, ["children", "className", "component", "invalid", "tooltip", "valid"]);
|
|
5921
|
+
var _className = classNames((_b = {},
|
|
5922
|
+
_b["invalid-".concat(tooltip ? 'tooltip' : 'feedback')] = invalid,
|
|
5923
|
+
_b["valid-".concat(tooltip ? 'tooltip' : 'feedback')] = valid,
|
|
5924
|
+
_b), className);
|
|
5925
|
+
return (React__default["default"].createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5926
|
+
});
|
|
5927
|
+
CFormFeedback.propTypes = {
|
|
5928
|
+
children: PropTypes.node,
|
|
5929
|
+
className: PropTypes.string,
|
|
5930
|
+
component: PropTypes.elementType,
|
|
5931
|
+
invalid: PropTypes.bool,
|
|
5932
|
+
tooltip: PropTypes.bool,
|
|
5933
|
+
valid: PropTypes.bool,
|
|
5934
|
+
};
|
|
5935
|
+
CFormFeedback.displayName = 'CFormFeedback';
|
|
5936
|
+
|
|
5937
|
+
var CFormControlValidation = function (_a) {
|
|
5938
|
+
var describedby = _a.describedby, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, invalid = _a.invalid, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid;
|
|
5939
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
5940
|
+
feedback && (valid || invalid) && (React__default["default"].createElement(CFormFeedback, __assign({}, (invalid && { id: describedby }), { invalid: invalid, tooltip: tooltipFeedback, valid: valid }), feedback)),
|
|
5941
|
+
feedbackInvalid && (React__default["default"].createElement(CFormFeedback, { id: describedby, invalid: true, tooltip: tooltipFeedback }, feedbackInvalid)),
|
|
5942
|
+
feedbackValid && (React__default["default"].createElement(CFormFeedback, { valid: true, tooltip: tooltipFeedback }, feedbackValid))));
|
|
5943
|
+
};
|
|
5944
|
+
CFormControlValidation.propTypes = {
|
|
5945
|
+
describedby: PropTypes.string,
|
|
5946
|
+
feedback: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
5947
|
+
feedbackValid: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
5948
|
+
feedbackInvalid: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
5949
|
+
invalid: PropTypes.bool,
|
|
5950
|
+
tooltipFeedback: PropTypes.bool,
|
|
5951
|
+
valid: PropTypes.bool,
|
|
5952
|
+
};
|
|
5953
|
+
CFormControlValidation.displayName = 'CFormControlValidation';
|
|
5954
|
+
|
|
5955
|
+
var CFormLabel = React.forwardRef(function (_a, ref) {
|
|
5956
|
+
var children = _a.children, className = _a.className, customClassName = _a.customClassName, rest = __rest(_a, ["children", "className", "customClassName"]);
|
|
5957
|
+
var _className = customClassName ? customClassName : classNames('form-label', className);
|
|
5958
|
+
return (React__default["default"].createElement("label", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5959
|
+
});
|
|
5960
|
+
CFormLabel.propTypes = {
|
|
6030
5961
|
children: PropTypes.node,
|
|
6031
5962
|
className: PropTypes.string,
|
|
6032
5963
|
customClassName: PropTypes.string,
|
|
@@ -6035,7 +5966,7 @@ CFormLabel.displayName = 'CFormLabel';
|
|
|
6035
5966
|
|
|
6036
5967
|
var CFormCheck = React.forwardRef(function (_a, ref) {
|
|
6037
5968
|
var _b;
|
|
6038
|
-
var className = _a.className, button = _a.button, 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(_a, ["className", "button", "hitArea", "id", "indeterminate", "inline", "invalid", "label", "type", "valid"]);
|
|
5969
|
+
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(_a, ["className", "button", "feedback", "feedbackInvalid", "feedbackValid", "floatingLabel", "tooltipFeedback", "hitArea", "id", "indeterminate", "inline", "invalid", "label", "type", "valid"]);
|
|
6039
5970
|
var inputRef = React.useRef(null);
|
|
6040
5971
|
var forkedRef = useForkedRef(ref, inputRef);
|
|
6041
5972
|
React.useEffect(function () {
|
|
@@ -6061,50 +5992,25 @@ var CFormCheck = React.forwardRef(function (_a, ref) {
|
|
|
6061
5992
|
var formControl = function () {
|
|
6062
5993
|
return React__default["default"].createElement("input", __assign({ type: type, className: inputClassName, id: id }, rest, { ref: forkedRef }));
|
|
6063
5994
|
};
|
|
5995
|
+
var formValidation = function () { return (React__default["default"].createElement(CFormControlValidation, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingLabel: floatingLabel, invalid: invalid, tooltipFeedback: tooltipFeedback, valid: valid })); };
|
|
6064
5996
|
var formLabel = function () {
|
|
6065
5997
|
return (React__default["default"].createElement(CFormLabel, __assign({ customClassName: labelClassName }, (id && { htmlFor: id })), label));
|
|
6066
5998
|
};
|
|
6067
5999
|
return button ? (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6068
6000
|
formControl(),
|
|
6069
|
-
label && formLabel()
|
|
6001
|
+
label && formLabel(),
|
|
6002
|
+
formValidation())) : label ? (hitArea ? (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6003
|
+
React__default["default"].createElement(CFormLabel, __assign({ customClassName: className }, (id && { htmlFor: id })),
|
|
6004
|
+
formControl(),
|
|
6005
|
+
label),
|
|
6006
|
+
formValidation())) : (React__default["default"].createElement("div", { className: _className },
|
|
6070
6007
|
formControl(),
|
|
6071
|
-
|
|
6072
|
-
formControl()
|
|
6073
|
-
formLabel()))) : (formControl());
|
|
6008
|
+
formLabel(),
|
|
6009
|
+
formValidation()))) : (formControl());
|
|
6074
6010
|
});
|
|
6075
|
-
CFormCheck.propTypes = {
|
|
6076
|
-
button: PropTypes.object,
|
|
6077
|
-
className: PropTypes.string,
|
|
6078
|
-
hitArea: PropTypes.oneOf(['full']),
|
|
6079
|
-
id: PropTypes.string,
|
|
6080
|
-
indeterminate: PropTypes.bool,
|
|
6081
|
-
inline: PropTypes.bool,
|
|
6082
|
-
invalid: PropTypes.bool,
|
|
6083
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
6084
|
-
type: PropTypes.oneOf(['checkbox', 'radio']),
|
|
6085
|
-
valid: PropTypes.bool,
|
|
6086
|
-
};
|
|
6011
|
+
CFormCheck.propTypes = __assign({ button: PropTypes.object, className: PropTypes.string, hitArea: PropTypes.oneOf(['full']), id: PropTypes.string, indeterminate: PropTypes.bool, inline: PropTypes.bool, label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), type: PropTypes.oneOf(['checkbox', 'radio']) }, CFormControlValidation.propTypes);
|
|
6087
6012
|
CFormCheck.displayName = 'CFormCheck';
|
|
6088
6013
|
|
|
6089
|
-
var CFormFeedback = React.forwardRef(function (_a, ref) {
|
|
6090
|
-
var _b;
|
|
6091
|
-
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(_a, ["children", "className", "component", "invalid", "tooltip", "valid"]);
|
|
6092
|
-
var _className = classNames((_b = {},
|
|
6093
|
-
_b["invalid-".concat(tooltip ? 'tooltip' : 'feedback')] = invalid,
|
|
6094
|
-
_b["valid-".concat(tooltip ? 'tooltip' : 'feedback')] = valid,
|
|
6095
|
-
_b), className);
|
|
6096
|
-
return (React__default["default"].createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
6097
|
-
});
|
|
6098
|
-
CFormFeedback.propTypes = {
|
|
6099
|
-
children: PropTypes.node,
|
|
6100
|
-
className: PropTypes.string,
|
|
6101
|
-
component: PropTypes.elementType,
|
|
6102
|
-
invalid: PropTypes.bool,
|
|
6103
|
-
tooltip: PropTypes.bool,
|
|
6104
|
-
valid: PropTypes.bool,
|
|
6105
|
-
};
|
|
6106
|
-
CFormFeedback.displayName = 'CFormFeedback';
|
|
6107
|
-
|
|
6108
6014
|
var CFormFloating = React.forwardRef(function (_a, ref) {
|
|
6109
6015
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6110
6016
|
var _className = classNames('form-floating', className);
|
|
@@ -6116,62 +6022,81 @@ CFormFloating.propTypes = {
|
|
|
6116
6022
|
};
|
|
6117
6023
|
CFormFloating.displayName = 'CFormFloating';
|
|
6118
6024
|
|
|
6025
|
+
var CFormText = React.forwardRef(function (_a, ref) {
|
|
6026
|
+
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'div' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
6027
|
+
var _className = classNames('form-text', className);
|
|
6028
|
+
return (React__default["default"].createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
6029
|
+
});
|
|
6030
|
+
CFormText.propTypes = {
|
|
6031
|
+
children: PropTypes.node,
|
|
6032
|
+
className: PropTypes.string,
|
|
6033
|
+
component: PropTypes.elementType,
|
|
6034
|
+
};
|
|
6035
|
+
CFormText.displayName = 'CFormText';
|
|
6036
|
+
|
|
6037
|
+
var CFormControlWrapper = function (_a) {
|
|
6038
|
+
var children = _a.children, describedby = _a.describedby, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingLabel = _a.floatingLabel, id = _a.id, invalid = _a.invalid, label = _a.label, text = _a.text, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid;
|
|
6039
|
+
return floatingLabel ? (React__default["default"].createElement(CFormFloating, null,
|
|
6040
|
+
children,
|
|
6041
|
+
React__default["default"].createElement(CFormLabel, { htmlFor: id }, label || floatingLabel))) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6042
|
+
label && React__default["default"].createElement(CFormLabel, { htmlFor: id }, label),
|
|
6043
|
+
children,
|
|
6044
|
+
text && React__default["default"].createElement(CFormText, { id: describedby }, text),
|
|
6045
|
+
React__default["default"].createElement(CFormControlValidation, { describedby: describedby, feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingLabel: floatingLabel, invalid: invalid, tooltipFeedback: tooltipFeedback, valid: valid })));
|
|
6046
|
+
};
|
|
6047
|
+
CFormControlWrapper.propTypes = __assign({ children: PropTypes.node, floatingLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.string]), label: PropTypes.oneOfType([PropTypes.node, PropTypes.string]), text: PropTypes.oneOfType([PropTypes.node, PropTypes.string]) }, CFormControlValidation.propTypes);
|
|
6048
|
+
CFormControlWrapper.displayName = 'CFormControlWrapper';
|
|
6049
|
+
|
|
6119
6050
|
var CFormInput = React.forwardRef(function (_a, ref) {
|
|
6120
6051
|
var _b;
|
|
6121
|
-
var children = _a.children, className = _a.className, invalid = _a.invalid, plainText = _a.plainText, size = _a.size,
|
|
6052
|
+
var children = _a.children, className = _a.className, _c = _a.delay, delay = _c === void 0 ? false : _c, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingLabel = _a.floatingLabel, id = _a.id, invalid = _a.invalid, label = _a.label, onChange = _a.onChange, plainText = _a.plainText, size = _a.size, text = _a.text, tooltipFeedback = _a.tooltipFeedback, _d = _a.type, type = _d === void 0 ? 'text' : _d, valid = _a.valid, rest = __rest(_a, ["children", "className", "delay", "feedback", "feedbackInvalid", "feedbackValid", "floatingLabel", "id", "invalid", "label", "onChange", "plainText", "size", "text", "tooltipFeedback", "type", "valid"]);
|
|
6053
|
+
var _e = React.useState(), value = _e[0], setValue = _e[1];
|
|
6054
|
+
React.useEffect(function () {
|
|
6055
|
+
var timeOutId = setTimeout(function () { return value && onChange && onChange(value); }, typeof delay === 'number' ? delay : 500);
|
|
6056
|
+
return function () { return clearTimeout(timeOutId); };
|
|
6057
|
+
}, [value]);
|
|
6122
6058
|
var _className = classNames(plainText ? 'form-control-plaintext' : 'form-control', (_b = {},
|
|
6123
6059
|
_b["form-control-".concat(size)] = size,
|
|
6124
6060
|
_b['form-control-color'] = type === 'color',
|
|
6125
6061
|
_b['is-invalid'] = invalid,
|
|
6126
6062
|
_b['is-valid'] = valid,
|
|
6127
6063
|
_b), className);
|
|
6128
|
-
return (React__default["default"].createElement(
|
|
6064
|
+
return (React__default["default"].createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
6065
|
+
React__default["default"].createElement("input", __assign({ className: _className, id: id, type: type, onChange: function (event) { return (delay ? setValue(event) : onChange && onChange(event)); } }, rest, { ref: ref }), children)));
|
|
6129
6066
|
});
|
|
6130
|
-
CFormInput.propTypes = {
|
|
6131
|
-
children: PropTypes.node,
|
|
6132
|
-
className: PropTypes.string,
|
|
6133
|
-
invalid: PropTypes.bool,
|
|
6134
|
-
plainText: PropTypes.bool,
|
|
6135
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
6136
|
-
type: PropTypes.oneOfType([PropTypes.oneOf(['color', 'file', 'text']), PropTypes.string]),
|
|
6137
|
-
valid: PropTypes.bool,
|
|
6138
|
-
};
|
|
6067
|
+
CFormInput.propTypes = __assign({ className: PropTypes.string, id: PropTypes.string, delay: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]), plainText: PropTypes.bool, size: PropTypes.oneOf(['sm', 'lg']), type: PropTypes.oneOfType([PropTypes.oneOf(['color', 'file', 'text']), PropTypes.string]) }, CFormControlWrapper.propTypes);
|
|
6139
6068
|
CFormInput.displayName = 'CFormInput';
|
|
6140
6069
|
|
|
6141
6070
|
var CFormRange = React.forwardRef(function (_a, ref) {
|
|
6142
|
-
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
6071
|
+
var className = _a.className, label = _a.label, rest = __rest(_a, ["className", "label"]);
|
|
6143
6072
|
var _className = classNames('form-range', className);
|
|
6144
|
-
return React__default["default"].createElement("
|
|
6073
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6074
|
+
label && React__default["default"].createElement(CFormLabel, { htmlFor: rest.id }, label),
|
|
6075
|
+
React__default["default"].createElement("input", __assign({ type: "range", className: _className }, rest, { ref: ref }))));
|
|
6145
6076
|
});
|
|
6146
6077
|
CFormRange.propTypes = {
|
|
6147
6078
|
className: PropTypes.string,
|
|
6079
|
+
label: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
6148
6080
|
};
|
|
6149
6081
|
CFormRange.displayName = 'CFormRange';
|
|
6150
6082
|
|
|
6151
6083
|
var CFormSelect = React.forwardRef(function (_a, ref) {
|
|
6152
6084
|
var _b;
|
|
6153
|
-
var children = _a.children, className = _a.className, htmlSize = _a.htmlSize, invalid = _a.invalid, options = _a.options, size = _a.size, valid = _a.valid, rest = __rest(_a, ["children", "className", "htmlSize", "invalid", "options", "size", "valid"]);
|
|
6085
|
+
var children = _a.children, className = _a.className, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, 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(_a, ["children", "className", "feedback", "feedbackInvalid", "feedbackValid", "floatingLabel", "htmlSize", "id", "invalid", "label", "options", "size", "text", "tooltipFeedback", "valid"]);
|
|
6154
6086
|
var _className = classNames('form-select', (_b = {},
|
|
6155
6087
|
_b["form-select-".concat(size)] = size,
|
|
6156
6088
|
_b['is-invalid'] = invalid,
|
|
6157
6089
|
_b['is-valid'] = valid,
|
|
6158
6090
|
_b), className);
|
|
6159
|
-
return (React__default["default"].createElement(
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6091
|
+
return (React__default["default"].createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
6092
|
+
React__default["default"].createElement("select", __assign({ id: id, className: _className, size: htmlSize }, rest, { ref: ref }), options
|
|
6093
|
+
? options.map(function (option, index) {
|
|
6094
|
+
return (React__default["default"].createElement("option", __assign({}, (typeof option === 'object' &&
|
|
6095
|
+
option.disabled && { disabled: option.disabled }), (typeof option === 'object' && option.value && { value: option.value }), { key: index }), typeof option === 'string' ? option : option.label));
|
|
6096
|
+
})
|
|
6097
|
+
: children)));
|
|
6165
6098
|
});
|
|
6166
|
-
CFormSelect.propTypes = {
|
|
6167
|
-
children: PropTypes.node,
|
|
6168
|
-
className: PropTypes.string,
|
|
6169
|
-
htmlSize: PropTypes.number,
|
|
6170
|
-
invalid: PropTypes.bool,
|
|
6171
|
-
options: PropTypes.array,
|
|
6172
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
6173
|
-
valid: PropTypes.bool,
|
|
6174
|
-
};
|
|
6099
|
+
CFormSelect.propTypes = __assign({ className: PropTypes.string, htmlSize: PropTypes.number, options: PropTypes.array }, CFormControlWrapper.propTypes);
|
|
6175
6100
|
CFormSelect.displayName = 'CFormSelect';
|
|
6176
6101
|
|
|
6177
6102
|
var CFormSwitch = React.forwardRef(function (_a, ref) {
|
|
@@ -6202,33 +6127,16 @@ CFormSwitch.propTypes = {
|
|
|
6202
6127
|
};
|
|
6203
6128
|
CFormSwitch.displayName = 'CFormSwitch';
|
|
6204
6129
|
|
|
6205
|
-
var CFormText = React.forwardRef(function (_a, ref) {
|
|
6206
|
-
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'div' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
6207
|
-
var _className = classNames('form-text', className);
|
|
6208
|
-
return (React__default["default"].createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
6209
|
-
});
|
|
6210
|
-
CFormText.propTypes = {
|
|
6211
|
-
children: PropTypes.node,
|
|
6212
|
-
className: PropTypes.string,
|
|
6213
|
-
component: PropTypes.elementType,
|
|
6214
|
-
};
|
|
6215
|
-
CFormText.displayName = 'CFormText';
|
|
6216
|
-
|
|
6217
6130
|
var CFormTextarea = React.forwardRef(function (_a, ref) {
|
|
6218
|
-
var children = _a.children, className = _a.className, invalid = _a.invalid, plainText = _a.plainText, valid = _a.valid, rest = __rest(_a, ["children", "className", "invalid", "plainText", "valid"]);
|
|
6131
|
+
var children = _a.children, className = _a.className, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, 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(_a, ["children", "className", "feedback", "feedbackInvalid", "feedbackValid", "floatingLabel", "id", "invalid", "label", "plainText", "text", "tooltipFeedback", "valid"]);
|
|
6219
6132
|
var _className = classNames(plainText ? 'form-control-plaintext' : 'form-control', {
|
|
6220
6133
|
'is-invalid': invalid,
|
|
6221
6134
|
'is-valid': valid,
|
|
6222
6135
|
}, className);
|
|
6223
|
-
return (React__default["default"].createElement(
|
|
6136
|
+
return (React__default["default"].createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
6137
|
+
React__default["default"].createElement("textarea", __assign({ className: _className }, rest, { ref: ref }), children)));
|
|
6224
6138
|
});
|
|
6225
|
-
CFormTextarea.propTypes = {
|
|
6226
|
-
children: PropTypes.node,
|
|
6227
|
-
className: PropTypes.string,
|
|
6228
|
-
invalid: PropTypes.bool,
|
|
6229
|
-
plainText: PropTypes.bool,
|
|
6230
|
-
valid: PropTypes.bool,
|
|
6231
|
-
};
|
|
6139
|
+
CFormTextarea.propTypes = __assign({ className: PropTypes.string, id: PropTypes.string, plainText: PropTypes.bool }, CFormControlWrapper.propTypes);
|
|
6232
6140
|
CFormTextarea.displayName = 'CFormTextarea';
|
|
6233
6141
|
|
|
6234
6142
|
var CInputGroup = React.forwardRef(function (_a, ref) {
|
|
@@ -6258,6 +6166,153 @@ CInputGroupText.propTypes = {
|
|
|
6258
6166
|
};
|
|
6259
6167
|
CInputGroupText.displayName = 'CInputGroupText';
|
|
6260
6168
|
|
|
6169
|
+
var BREAKPOINTS$3 = [
|
|
6170
|
+
'xxl',
|
|
6171
|
+
'xl',
|
|
6172
|
+
'lg',
|
|
6173
|
+
'md',
|
|
6174
|
+
'sm',
|
|
6175
|
+
'xs',
|
|
6176
|
+
];
|
|
6177
|
+
var CCol = React.forwardRef(function (_a, ref) {
|
|
6178
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6179
|
+
var repsonsiveClassNames = [];
|
|
6180
|
+
BREAKPOINTS$3.forEach(function (bp) {
|
|
6181
|
+
var breakpoint = rest[bp];
|
|
6182
|
+
delete rest[bp];
|
|
6183
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
6184
|
+
if (typeof breakpoint === 'number' || typeof breakpoint === 'string') {
|
|
6185
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint));
|
|
6186
|
+
}
|
|
6187
|
+
if (typeof breakpoint === 'boolean') {
|
|
6188
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
6189
|
+
}
|
|
6190
|
+
if (breakpoint && typeof breakpoint === 'object') {
|
|
6191
|
+
if (typeof breakpoint.span === 'number' || typeof breakpoint.span === 'string') {
|
|
6192
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint.span));
|
|
6193
|
+
}
|
|
6194
|
+
if (typeof breakpoint.span === 'boolean') {
|
|
6195
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
6196
|
+
}
|
|
6197
|
+
if (typeof breakpoint.order === 'number' || typeof breakpoint.order === 'string') {
|
|
6198
|
+
repsonsiveClassNames.push("order".concat(infix, "-").concat(breakpoint.order));
|
|
6199
|
+
}
|
|
6200
|
+
if (typeof breakpoint.offset === 'number') {
|
|
6201
|
+
repsonsiveClassNames.push("offset".concat(infix, "-").concat(breakpoint.offset));
|
|
6202
|
+
}
|
|
6203
|
+
}
|
|
6204
|
+
});
|
|
6205
|
+
var _className = classNames(repsonsiveClassNames.length ? repsonsiveClassNames : 'col', className);
|
|
6206
|
+
return (React__default["default"].createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
6207
|
+
});
|
|
6208
|
+
var span = PropTypes.oneOfType([
|
|
6209
|
+
PropTypes.bool,
|
|
6210
|
+
PropTypes.number,
|
|
6211
|
+
PropTypes.string,
|
|
6212
|
+
PropTypes.oneOf(['auto']),
|
|
6213
|
+
]);
|
|
6214
|
+
var col = PropTypes.oneOfType([
|
|
6215
|
+
span,
|
|
6216
|
+
PropTypes.shape({
|
|
6217
|
+
span: span,
|
|
6218
|
+
offset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
6219
|
+
order: PropTypes.oneOfType([
|
|
6220
|
+
PropTypes.oneOf(['first', 'last']),
|
|
6221
|
+
PropTypes.number,
|
|
6222
|
+
PropTypes.string,
|
|
6223
|
+
]),
|
|
6224
|
+
}),
|
|
6225
|
+
]);
|
|
6226
|
+
CCol.propTypes = {
|
|
6227
|
+
children: PropTypes.node,
|
|
6228
|
+
className: PropTypes.string,
|
|
6229
|
+
xs: col,
|
|
6230
|
+
sm: col,
|
|
6231
|
+
};
|
|
6232
|
+
CCol.displayName = 'CCol';
|
|
6233
|
+
|
|
6234
|
+
var BREAKPOINTS$2 = [
|
|
6235
|
+
'xxl',
|
|
6236
|
+
'xl',
|
|
6237
|
+
'lg',
|
|
6238
|
+
'md',
|
|
6239
|
+
'sm',
|
|
6240
|
+
'fluid',
|
|
6241
|
+
];
|
|
6242
|
+
var CContainer = React.forwardRef(function (_a, ref) {
|
|
6243
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6244
|
+
var repsonsiveClassNames = [];
|
|
6245
|
+
BREAKPOINTS$2.forEach(function (bp) {
|
|
6246
|
+
var breakpoint = rest[bp];
|
|
6247
|
+
delete rest[bp];
|
|
6248
|
+
breakpoint && repsonsiveClassNames.push("container-".concat(bp));
|
|
6249
|
+
});
|
|
6250
|
+
var _className = classNames(repsonsiveClassNames.length ? repsonsiveClassNames : 'container', className);
|
|
6251
|
+
return (React__default["default"].createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
6252
|
+
});
|
|
6253
|
+
CContainer.propTypes = {
|
|
6254
|
+
children: PropTypes.node,
|
|
6255
|
+
className: PropTypes.string,
|
|
6256
|
+
sm: PropTypes.bool,
|
|
6257
|
+
md: PropTypes.bool,
|
|
6258
|
+
lg: PropTypes.bool,
|
|
6259
|
+
xl: PropTypes.bool,
|
|
6260
|
+
xxl: PropTypes.bool,
|
|
6261
|
+
fluid: PropTypes.bool,
|
|
6262
|
+
};
|
|
6263
|
+
CContainer.displayName = 'CContainer';
|
|
6264
|
+
|
|
6265
|
+
var BREAKPOINTS$1 = [
|
|
6266
|
+
'xxl',
|
|
6267
|
+
'xl',
|
|
6268
|
+
'lg',
|
|
6269
|
+
'md',
|
|
6270
|
+
'sm',
|
|
6271
|
+
'xs',
|
|
6272
|
+
];
|
|
6273
|
+
var CRow = React.forwardRef(function (_a, ref) {
|
|
6274
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6275
|
+
var repsonsiveClassNames = [];
|
|
6276
|
+
BREAKPOINTS$1.forEach(function (bp) {
|
|
6277
|
+
var breakpoint = rest[bp];
|
|
6278
|
+
delete rest[bp];
|
|
6279
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
6280
|
+
if (typeof breakpoint === 'object') {
|
|
6281
|
+
if (breakpoint.cols) {
|
|
6282
|
+
repsonsiveClassNames.push("row-cols".concat(infix, "-").concat(breakpoint.cols));
|
|
6283
|
+
}
|
|
6284
|
+
if (typeof breakpoint.gutter === 'number') {
|
|
6285
|
+
repsonsiveClassNames.push("g".concat(infix, "-").concat(breakpoint.gutter));
|
|
6286
|
+
}
|
|
6287
|
+
if (typeof breakpoint.gutterX === 'number') {
|
|
6288
|
+
repsonsiveClassNames.push("gx".concat(infix, "-").concat(breakpoint.gutterX));
|
|
6289
|
+
}
|
|
6290
|
+
if (typeof breakpoint.gutterY === 'number') {
|
|
6291
|
+
repsonsiveClassNames.push("gy".concat(infix, "-").concat(breakpoint.gutterY));
|
|
6292
|
+
}
|
|
6293
|
+
}
|
|
6294
|
+
});
|
|
6295
|
+
var _className = classNames('row', repsonsiveClassNames, className);
|
|
6296
|
+
return (React__default["default"].createElement("div", { className: _className, ref: ref }, children));
|
|
6297
|
+
});
|
|
6298
|
+
var bp = PropTypes.shape({
|
|
6299
|
+
cols: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.string]),
|
|
6300
|
+
gutter: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
6301
|
+
gutterX: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
6302
|
+
gutterY: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
6303
|
+
});
|
|
6304
|
+
CRow.propTypes = {
|
|
6305
|
+
children: PropTypes.node,
|
|
6306
|
+
className: PropTypes.string,
|
|
6307
|
+
xs: bp,
|
|
6308
|
+
sm: bp,
|
|
6309
|
+
md: bp,
|
|
6310
|
+
lg: bp,
|
|
6311
|
+
xl: bp,
|
|
6312
|
+
xxl: bp,
|
|
6313
|
+
};
|
|
6314
|
+
CRow.displayName = 'CRow';
|
|
6315
|
+
|
|
6261
6316
|
var CHeader = React.forwardRef(function (_a, ref) {
|
|
6262
6317
|
var _b;
|
|
6263
6318
|
var children = _a.children, className = _a.className, container = _a.container, position = _a.position, rest = __rest(_a, ["children", "className", "container", "position"]);
|
|
@@ -6536,7 +6591,7 @@ var CModal = React.forwardRef(function (_a, ref) {
|
|
|
6536
6591
|
React__default["default"].createElement(CModalContent, { ref: modalContentRef }, children)))));
|
|
6537
6592
|
};
|
|
6538
6593
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6539
|
-
React__default["default"].createElement(Transition$1, { in: _visible, mountOnEnter: true, onEnter: onShow, onExit: onClose, unmountOnExit: unmountOnClose, timeout: !transition ? 0 : duration }, function (state) {
|
|
6594
|
+
React__default["default"].createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: modalRef, onEnter: onShow, onExit: onClose, unmountOnExit: unmountOnClose, timeout: !transition ? 0 : duration }, function (state) {
|
|
6540
6595
|
var transitionClass = getTransitionClass(state);
|
|
6541
6596
|
return typeof window !== 'undefined' && portal
|
|
6542
6597
|
? ReactDOM.createPortal(modal(forkedRef, transitionClass), document.body)
|
|
@@ -6715,7 +6770,7 @@ var CNavGroup = React.forwardRef(function (_a, ref) {
|
|
|
6715
6770
|
var _className = classNames('nav-group', { show: _visible }, className);
|
|
6716
6771
|
return (React__default["default"].createElement("li", __assign({ className: _className }, rest, { ref: ref }),
|
|
6717
6772
|
toggler && (React__default["default"].createElement("a", { className: "nav-link nav-group-toggle", onClick: function (event) { return handleTogglerOnCLick(event); } }, toggler)),
|
|
6718
|
-
React__default["default"].createElement(Transition$1, { in: _visible, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 300 }, function (state) { return (React__default["default"].createElement("ul", { className: classNames('nav-group-items', {
|
|
6773
|
+
React__default["default"].createElement(Transition$1, { in: _visible, nodeRef: navItemsRef, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 300 }, function (state) { return (React__default["default"].createElement("ul", { className: classNames('nav-group-items', {
|
|
6719
6774
|
compact: compact,
|
|
6720
6775
|
}), style: __assign(__assign({}, style), transitionStyles[state]), ref: navItemsRef }, React__default["default"].Children.map(children, function (child, index) {
|
|
6721
6776
|
if (React__default["default"].isValidElement(child)) {
|
|
@@ -6868,9 +6923,113 @@ CNavbarToggler.propTypes = {
|
|
|
6868
6923
|
};
|
|
6869
6924
|
CNavbarToggler.displayName = 'CNavbarToggler';
|
|
6870
6925
|
|
|
6871
|
-
var
|
|
6926
|
+
var COffcanvas = React.forwardRef(function (_a, ref) {
|
|
6872
6927
|
var _b;
|
|
6873
|
-
var children = _a.children,
|
|
6928
|
+
var children = _a.children, _c = _a.backdrop, backdrop = _c === void 0 ? true : _c, className = _a.className, _d = _a.keyboard, keyboard = _d === void 0 ? true : _d, onHide = _a.onHide, onShow = _a.onShow, placement = _a.placement, _e = _a.portal, portal = _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(_a, ["children", "backdrop", "className", "keyboard", "onHide", "onShow", "placement", "portal", "scroll", "visible"]);
|
|
6929
|
+
var _h = React.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
6930
|
+
var offcanvasRef = React.useRef(null);
|
|
6931
|
+
var forkedRef = useForkedRef(ref, offcanvasRef);
|
|
6932
|
+
React.useEffect(function () {
|
|
6933
|
+
setVisible(visible);
|
|
6934
|
+
}, [visible]);
|
|
6935
|
+
React.useEffect(function () {
|
|
6936
|
+
if (_visible) {
|
|
6937
|
+
if (!scroll) {
|
|
6938
|
+
document.body.style.overflow = 'hidden';
|
|
6939
|
+
document.body.style.paddingRight = '0px';
|
|
6940
|
+
}
|
|
6941
|
+
return;
|
|
6942
|
+
}
|
|
6943
|
+
if (!scroll) {
|
|
6944
|
+
document.body.style.removeProperty('overflow');
|
|
6945
|
+
document.body.style.removeProperty('padding-right');
|
|
6946
|
+
}
|
|
6947
|
+
}, [_visible]);
|
|
6948
|
+
var _className = classNames('offcanvas', (_b = {},
|
|
6949
|
+
_b["offcanvas-".concat(placement)] = placement,
|
|
6950
|
+
_b.show = _visible,
|
|
6951
|
+
_b), className);
|
|
6952
|
+
var transitionStyles = {
|
|
6953
|
+
entering: { visibility: 'visible' },
|
|
6954
|
+
entered: { visibility: 'visible' },
|
|
6955
|
+
exiting: { visibility: 'visible' },
|
|
6956
|
+
exited: { visibility: 'hidden' },
|
|
6957
|
+
};
|
|
6958
|
+
var handleDismiss = function () {
|
|
6959
|
+
setVisible(false);
|
|
6960
|
+
};
|
|
6961
|
+
var handleKeyDown = React.useCallback(function (event) {
|
|
6962
|
+
if (event.key === 'Escape' && keyboard) {
|
|
6963
|
+
return handleDismiss();
|
|
6964
|
+
}
|
|
6965
|
+
}, [ref, handleDismiss]);
|
|
6966
|
+
var offcanvas = function (ref, state) {
|
|
6967
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6968
|
+
React__default["default"].createElement("div", __assign({ className: _className, role: "dialog", style: __assign({}, transitionStyles[state]), tabIndex: -1, onKeyDown: handleKeyDown }, rest, { ref: ref }), children)));
|
|
6969
|
+
};
|
|
6970
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6971
|
+
React__default["default"].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) {
|
|
6972
|
+
return typeof window !== 'undefined' && portal
|
|
6973
|
+
? ReactDOM.createPortal(offcanvas(forkedRef, state), document.body)
|
|
6974
|
+
: offcanvas(forkedRef, state);
|
|
6975
|
+
}),
|
|
6976
|
+
typeof window !== 'undefined' && portal
|
|
6977
|
+
? backdrop &&
|
|
6978
|
+
ReactDOM.createPortal(React__default["default"].createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }), document.body)
|
|
6979
|
+
: backdrop && (React__default["default"].createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }))));
|
|
6980
|
+
});
|
|
6981
|
+
COffcanvas.propTypes = {
|
|
6982
|
+
backdrop: PropTypes.bool,
|
|
6983
|
+
children: PropTypes.node,
|
|
6984
|
+
className: PropTypes.string,
|
|
6985
|
+
keyboard: PropTypes.bool,
|
|
6986
|
+
onHide: PropTypes.func,
|
|
6987
|
+
onShow: PropTypes.func,
|
|
6988
|
+
placement: PropTypes.oneOf(['start', 'end', 'top', 'bottom'])
|
|
6989
|
+
.isRequired,
|
|
6990
|
+
portal: PropTypes.bool,
|
|
6991
|
+
scroll: PropTypes.bool,
|
|
6992
|
+
visible: PropTypes.bool,
|
|
6993
|
+
};
|
|
6994
|
+
COffcanvas.displayName = 'COffcanvas';
|
|
6995
|
+
|
|
6996
|
+
var COffcanvasBody = React.forwardRef(function (_a, ref) {
|
|
6997
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6998
|
+
var _className = classNames('offcanvas-body', className);
|
|
6999
|
+
return (React__default["default"].createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
7000
|
+
});
|
|
7001
|
+
COffcanvasBody.propTypes = {
|
|
7002
|
+
children: PropTypes.node,
|
|
7003
|
+
className: PropTypes.string,
|
|
7004
|
+
};
|
|
7005
|
+
COffcanvasBody.displayName = 'COffcanvasBody';
|
|
7006
|
+
|
|
7007
|
+
var COffcanvasHeader = React.forwardRef(function (_a, ref) {
|
|
7008
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7009
|
+
var _className = classNames('offcanvas-header', className);
|
|
7010
|
+
return (React__default["default"].createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
7011
|
+
});
|
|
7012
|
+
COffcanvasHeader.propTypes = {
|
|
7013
|
+
children: PropTypes.node,
|
|
7014
|
+
className: PropTypes.string,
|
|
7015
|
+
};
|
|
7016
|
+
COffcanvasHeader.displayName = 'COffcanvasHeader';
|
|
7017
|
+
|
|
7018
|
+
var COffcanvasTitle = React.forwardRef(function (_a, ref) {
|
|
7019
|
+
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
7020
|
+
var _className = classNames('offcanvas-title', className);
|
|
7021
|
+
return (React__default["default"].createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
7022
|
+
});
|
|
7023
|
+
COffcanvasTitle.propTypes = {
|
|
7024
|
+
children: PropTypes.node,
|
|
7025
|
+
className: PropTypes.string,
|
|
7026
|
+
component: PropTypes.elementType,
|
|
7027
|
+
};
|
|
7028
|
+
COffcanvasTitle.displayName = 'COffcanvasTitle';
|
|
7029
|
+
|
|
7030
|
+
var CPagination = React.forwardRef(function (_a, ref) {
|
|
7031
|
+
var _b;
|
|
7032
|
+
var children = _a.children, align = _a.align, className = _a.className, size = _a.size, rest = __rest(_a, ["children", "align", "className", "size"]);
|
|
6874
7033
|
var _className = classNames('pagination', (_b = {},
|
|
6875
7034
|
_b["justify-content-".concat(align)] = align,
|
|
6876
7035
|
_b["pagination-".concat(size)] = size,
|
|
@@ -6941,66 +7100,6 @@ CPlaceholder.propTypes = {
|
|
|
6941
7100
|
};
|
|
6942
7101
|
CPlaceholder.displayName = 'CPlaceholder';
|
|
6943
7102
|
|
|
6944
|
-
var CPopover = function (_a) {
|
|
6945
|
-
var children = _a.children, content = _a.content, _b = _a.placement, placement = _b === void 0 ? 'top' : _b, _c = _a.offset, offset = _c === void 0 ? [0, 8] : _c, onHide = _a.onHide, onShow = _a.onShow, title = _a.title, _d = _a.trigger, trigger = _d === void 0 ? 'click' : _d, visible = _a.visible, rest = __rest(_a, ["children", "content", "placement", "offset", "onHide", "onShow", "title", "trigger", "visible"]);
|
|
6946
|
-
var _e = React.useState(visible), _visible = _e[0], setVisible = _e[1];
|
|
6947
|
-
var getTransitionClass = function (state) {
|
|
6948
|
-
return state === 'entering'
|
|
6949
|
-
? 'fade'
|
|
6950
|
-
: state === 'entered'
|
|
6951
|
-
? 'fade show'
|
|
6952
|
-
: state === 'exiting'
|
|
6953
|
-
? 'fade'
|
|
6954
|
-
: 'fade';
|
|
6955
|
-
};
|
|
6956
|
-
return (React__default["default"].createElement(Manager, null,
|
|
6957
|
-
React__default["default"].createElement(Reference, null, function (_a) {
|
|
6958
|
-
var ref = _a.ref;
|
|
6959
|
-
return React__default["default"].cloneElement(children, __assign(__assign(__assign({ ref: ref }, ((trigger === 'click' || trigger.includes('click')) && {
|
|
6960
|
-
onClick: function () { return setVisible(!_visible); },
|
|
6961
|
-
})), ((trigger === 'focus' || trigger.includes('focus')) && {
|
|
6962
|
-
onFocus: function () { return setVisible(true); },
|
|
6963
|
-
onBlur: function () { return setVisible(false); },
|
|
6964
|
-
})), ((trigger === 'hover' || trigger.includes('hover')) && {
|
|
6965
|
-
onMouseEnter: function () { return setVisible(true); },
|
|
6966
|
-
onMouseLeave: function () { return setVisible(false); },
|
|
6967
|
-
})));
|
|
6968
|
-
}),
|
|
6969
|
-
typeof window !== 'undefined' &&
|
|
6970
|
-
ReactDOM.createPortal(React__default["default"].createElement(Transition$1, { in: _visible, onEnter: onShow, onExit: onHide, mountOnEnter: true, timeout: {
|
|
6971
|
-
enter: 0,
|
|
6972
|
-
exit: 200,
|
|
6973
|
-
}, unmountOnExit: true }, function (state) {
|
|
6974
|
-
var transitionClass = getTransitionClass(state);
|
|
6975
|
-
return (React__default["default"].createElement(Popper, { placement: placement, modifiers: [
|
|
6976
|
-
{
|
|
6977
|
-
name: 'offset',
|
|
6978
|
-
options: {
|
|
6979
|
-
offset: offset,
|
|
6980
|
-
},
|
|
6981
|
-
},
|
|
6982
|
-
] }, function (_a) {
|
|
6983
|
-
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
6984
|
-
return (React__default["default"].createElement("div", __assign({ className: classNames("popover bs-popover-".concat(placement === 'left' ? 'start' : placement === 'right' ? 'end' : placement), transitionClass), ref: ref, role: "tooltip", style: style }, rest),
|
|
6985
|
-
React__default["default"].createElement("div", __assign({ className: "popover-arrow" }, arrowProps)),
|
|
6986
|
-
React__default["default"].createElement("div", { className: "popover-header" }, title),
|
|
6987
|
-
React__default["default"].createElement("div", { className: "popover-body" }, content)));
|
|
6988
|
-
}));
|
|
6989
|
-
}), document.body)));
|
|
6990
|
-
};
|
|
6991
|
-
CPopover.propTypes = {
|
|
6992
|
-
children: PropTypes.any,
|
|
6993
|
-
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
6994
|
-
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
6995
|
-
offset: PropTypes.any,
|
|
6996
|
-
onHide: PropTypes.func,
|
|
6997
|
-
onShow: PropTypes.func,
|
|
6998
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
6999
|
-
trigger: triggerPropType,
|
|
7000
|
-
visible: PropTypes.bool,
|
|
7001
|
-
};
|
|
7002
|
-
CPopover.displayName = 'CPopover';
|
|
7003
|
-
|
|
7004
7103
|
var CProgressBar = React.forwardRef(function (_a, ref) {
|
|
7005
7104
|
var _b;
|
|
7006
7105
|
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(_a, ["children", "animated", "className", "color", "value", "variant"]);
|
|
@@ -7039,6 +7138,69 @@ CProgress.propTypes = {
|
|
|
7039
7138
|
};
|
|
7040
7139
|
CProgress.displayName = 'CProgress';
|
|
7041
7140
|
|
|
7141
|
+
var CPopover = function (_a) {
|
|
7142
|
+
var children = _a.children, content = _a.content, _b = _a.offset, offset = _b === void 0 ? [0, 8] : _b, onHide = _a.onHide, onShow = _a.onShow, _c = _a.placement, placement = _c === void 0 ? 'top' : _c, title = _a.title, _d = _a.trigger, trigger = _d === void 0 ? 'click' : _d, visible = _a.visible, rest = __rest(_a, ["children", "content", "offset", "onHide", "onShow", "placement", "title", "trigger", "visible"]);
|
|
7143
|
+
var _e = React.useState(visible), _visible = _e[0], setVisible = _e[1];
|
|
7144
|
+
var popoverRef = React.useRef();
|
|
7145
|
+
var _f = React.useState(null), referenceElement = _f[0], setReferenceElement = _f[1];
|
|
7146
|
+
var _g = React.useState(null), popperElement = _g[0], setPopperElement = _g[1];
|
|
7147
|
+
var _h = React.useState(null), arrowElement = _h[0], setArrowElement = _h[1];
|
|
7148
|
+
var _j = usePopper(referenceElement, popperElement, {
|
|
7149
|
+
modifiers: [
|
|
7150
|
+
{ name: 'arrow', options: { element: arrowElement } },
|
|
7151
|
+
{
|
|
7152
|
+
name: 'offset',
|
|
7153
|
+
options: {
|
|
7154
|
+
offset: offset,
|
|
7155
|
+
},
|
|
7156
|
+
},
|
|
7157
|
+
],
|
|
7158
|
+
placement: placement,
|
|
7159
|
+
}), styles = _j.styles, attributes = _j.attributes;
|
|
7160
|
+
var getTransitionClass = function (state) {
|
|
7161
|
+
return state === 'entering'
|
|
7162
|
+
? 'fade'
|
|
7163
|
+
: state === 'entered'
|
|
7164
|
+
? 'fade show'
|
|
7165
|
+
: state === 'exiting'
|
|
7166
|
+
? 'fade'
|
|
7167
|
+
: 'fade';
|
|
7168
|
+
};
|
|
7169
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
7170
|
+
React__default["default"].cloneElement(children, __assign(__assign(__assign({ ref: setReferenceElement }, ((trigger === 'click' || trigger.includes('click')) && {
|
|
7171
|
+
onClick: function () { return setVisible(!_visible); },
|
|
7172
|
+
})), ((trigger === 'focus' || trigger.includes('focus')) && {
|
|
7173
|
+
onFocus: function () { return setVisible(true); },
|
|
7174
|
+
onBlur: function () { return setVisible(false); },
|
|
7175
|
+
})), ((trigger === 'hover' || trigger.includes('hover')) && {
|
|
7176
|
+
onMouseEnter: function () { return setVisible(true); },
|
|
7177
|
+
onMouseLeave: function () { return setVisible(false); },
|
|
7178
|
+
}))),
|
|
7179
|
+
typeof window !== 'undefined' &&
|
|
7180
|
+
ReactDOM.createPortal(React__default["default"].createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: popoverRef, onEnter: onShow, onExit: onHide, timeout: {
|
|
7181
|
+
enter: 0,
|
|
7182
|
+
exit: 200,
|
|
7183
|
+
}, unmountOnExit: true }, function (state) {
|
|
7184
|
+
var transitionClass = getTransitionClass(state);
|
|
7185
|
+
return (React__default["default"].createElement("div", __assign({ className: classNames("popover bs-popover-".concat(placement === 'left' ? 'start' : placement === 'right' ? 'end' : placement), transitionClass), ref: setPopperElement, role: "tooltip", style: styles.popper }, attributes.popper, rest),
|
|
7186
|
+
React__default["default"].createElement("div", { className: "popover-arrow", style: styles.arrow, ref: setArrowElement }),
|
|
7187
|
+
React__default["default"].createElement("div", { className: "popover-header" }, title),
|
|
7188
|
+
React__default["default"].createElement("div", { className: "popover-body" }, content)));
|
|
7189
|
+
}), document.body)));
|
|
7190
|
+
};
|
|
7191
|
+
CPopover.propTypes = {
|
|
7192
|
+
children: PropTypes.any,
|
|
7193
|
+
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
7194
|
+
offset: PropTypes.any,
|
|
7195
|
+
onHide: PropTypes.func,
|
|
7196
|
+
onShow: PropTypes.func,
|
|
7197
|
+
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
7198
|
+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
7199
|
+
trigger: triggerPropType,
|
|
7200
|
+
visible: PropTypes.bool,
|
|
7201
|
+
};
|
|
7202
|
+
CPopover.displayName = 'CPopover';
|
|
7203
|
+
|
|
7042
7204
|
var isOnMobile = function (element) {
|
|
7043
7205
|
return Boolean(getComputedStyle(element).getPropertyValue('--cui-is-mobile'));
|
|
7044
7206
|
};
|
|
@@ -7151,110 +7313,6 @@ CSidebar.propTypes = {
|
|
|
7151
7313
|
};
|
|
7152
7314
|
CSidebar.displayName = 'CSidebar';
|
|
7153
7315
|
|
|
7154
|
-
var COffcanvas = React.forwardRef(function (_a, ref) {
|
|
7155
|
-
var _b;
|
|
7156
|
-
var children = _a.children, _c = _a.backdrop, backdrop = _c === void 0 ? true : _c, className = _a.className, _d = _a.keyboard, keyboard = _d === void 0 ? true : _d, onHide = _a.onHide, onShow = _a.onShow, placement = _a.placement, _e = _a.portal, portal = _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(_a, ["children", "backdrop", "className", "keyboard", "onHide", "onShow", "placement", "portal", "scroll", "visible"]);
|
|
7157
|
-
var _h = React.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
7158
|
-
var offcanvasRef = React.useRef(null);
|
|
7159
|
-
var forkedRef = useForkedRef(ref, offcanvasRef);
|
|
7160
|
-
React.useEffect(function () {
|
|
7161
|
-
setVisible(visible);
|
|
7162
|
-
}, [visible]);
|
|
7163
|
-
React.useEffect(function () {
|
|
7164
|
-
if (_visible) {
|
|
7165
|
-
if (!scroll) {
|
|
7166
|
-
document.body.style.overflow = 'hidden';
|
|
7167
|
-
document.body.style.paddingRight = '0px';
|
|
7168
|
-
}
|
|
7169
|
-
return;
|
|
7170
|
-
}
|
|
7171
|
-
if (!scroll) {
|
|
7172
|
-
document.body.style.removeProperty('overflow');
|
|
7173
|
-
document.body.style.removeProperty('padding-right');
|
|
7174
|
-
}
|
|
7175
|
-
}, [_visible]);
|
|
7176
|
-
var _className = classNames('offcanvas', (_b = {},
|
|
7177
|
-
_b["offcanvas-".concat(placement)] = placement,
|
|
7178
|
-
_b.show = _visible,
|
|
7179
|
-
_b), className);
|
|
7180
|
-
var transitionStyles = {
|
|
7181
|
-
entering: { visibility: 'visible' },
|
|
7182
|
-
entered: { visibility: 'visible' },
|
|
7183
|
-
exiting: { visibility: 'visible' },
|
|
7184
|
-
exited: { visibility: 'hidden' },
|
|
7185
|
-
};
|
|
7186
|
-
var handleDismiss = function () {
|
|
7187
|
-
setVisible(false);
|
|
7188
|
-
};
|
|
7189
|
-
var handleKeyDown = React.useCallback(function (event) {
|
|
7190
|
-
if (event.key === 'Escape' && keyboard) {
|
|
7191
|
-
return handleDismiss();
|
|
7192
|
-
}
|
|
7193
|
-
}, [ref, handleDismiss]);
|
|
7194
|
-
var offcanvas = function (ref, state) {
|
|
7195
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
7196
|
-
React__default["default"].createElement("div", __assign({ className: _className, role: "dialog", style: __assign({}, transitionStyles[state]), tabIndex: -1, onKeyDown: handleKeyDown }, rest, { ref: ref }), children)));
|
|
7197
|
-
};
|
|
7198
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
7199
|
-
React__default["default"].createElement(Transition$1, { in: _visible, onEnter: onShow, onEntered: function () { var _a; return (_a = offcanvasRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }, onExit: onHide, timeout: 300 }, function (state) {
|
|
7200
|
-
return typeof window !== 'undefined' && portal
|
|
7201
|
-
? ReactDOM.createPortal(offcanvas(forkedRef, state), document.body)
|
|
7202
|
-
: offcanvas(forkedRef, state);
|
|
7203
|
-
}),
|
|
7204
|
-
typeof window !== 'undefined' && portal
|
|
7205
|
-
? backdrop &&
|
|
7206
|
-
ReactDOM.createPortal(React__default["default"].createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }), document.body)
|
|
7207
|
-
: backdrop && (React__default["default"].createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }))));
|
|
7208
|
-
});
|
|
7209
|
-
COffcanvas.propTypes = {
|
|
7210
|
-
backdrop: PropTypes.bool,
|
|
7211
|
-
children: PropTypes.node,
|
|
7212
|
-
className: PropTypes.string,
|
|
7213
|
-
keyboard: PropTypes.bool,
|
|
7214
|
-
onHide: PropTypes.func,
|
|
7215
|
-
onShow: PropTypes.func,
|
|
7216
|
-
placement: PropTypes.oneOf(['start', 'end', 'top', 'bottom'])
|
|
7217
|
-
.isRequired,
|
|
7218
|
-
portal: PropTypes.bool,
|
|
7219
|
-
scroll: PropTypes.bool,
|
|
7220
|
-
visible: PropTypes.bool,
|
|
7221
|
-
};
|
|
7222
|
-
COffcanvas.displayName = 'COffcanvas';
|
|
7223
|
-
|
|
7224
|
-
var COffcanvasBody = React.forwardRef(function (_a, ref) {
|
|
7225
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7226
|
-
var _className = classNames('offcanvas-body', className);
|
|
7227
|
-
return (React__default["default"].createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
7228
|
-
});
|
|
7229
|
-
COffcanvasBody.propTypes = {
|
|
7230
|
-
children: PropTypes.node,
|
|
7231
|
-
className: PropTypes.string,
|
|
7232
|
-
};
|
|
7233
|
-
COffcanvasBody.displayName = 'COffcanvasBody';
|
|
7234
|
-
|
|
7235
|
-
var COffcanvasHeader = React.forwardRef(function (_a, ref) {
|
|
7236
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7237
|
-
var _className = classNames('offcanvas-header', className);
|
|
7238
|
-
return (React__default["default"].createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
7239
|
-
});
|
|
7240
|
-
COffcanvasHeader.propTypes = {
|
|
7241
|
-
children: PropTypes.node,
|
|
7242
|
-
className: PropTypes.string,
|
|
7243
|
-
};
|
|
7244
|
-
COffcanvasHeader.displayName = 'COffcanvasHeader';
|
|
7245
|
-
|
|
7246
|
-
var COffcanvasTitle = React.forwardRef(function (_a, ref) {
|
|
7247
|
-
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
7248
|
-
var _className = classNames('offcanvas-title', className);
|
|
7249
|
-
return (React__default["default"].createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
7250
|
-
});
|
|
7251
|
-
COffcanvasTitle.propTypes = {
|
|
7252
|
-
children: PropTypes.node,
|
|
7253
|
-
className: PropTypes.string,
|
|
7254
|
-
component: PropTypes.elementType,
|
|
7255
|
-
};
|
|
7256
|
-
COffcanvasTitle.displayName = 'COffcanvasTitle';
|
|
7257
|
-
|
|
7258
7316
|
var CSidebarBrand = React.forwardRef(function (_a, ref) {
|
|
7259
7317
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7260
7318
|
var _className = classNames('sidebar-brand', className);
|
|
@@ -7471,15 +7529,17 @@ CTabContent.displayName = 'CTabContent';
|
|
|
7471
7529
|
|
|
7472
7530
|
var CTabPane = React.forwardRef(function (_a, ref) {
|
|
7473
7531
|
var children = _a.children, className = _a.className, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest(_a, ["children", "className", "onHide", "onShow", "visible"]);
|
|
7532
|
+
var tabPaneRef = React.useRef();
|
|
7533
|
+
var forkedRef = useForkedRef(ref, tabPaneRef);
|
|
7474
7534
|
var getTransitionClass = function (state) {
|
|
7475
7535
|
return state === 'entered' && 'show';
|
|
7476
7536
|
};
|
|
7477
7537
|
var _className = classNames('tab-pane', 'fade', {
|
|
7478
7538
|
active: visible,
|
|
7479
7539
|
}, className);
|
|
7480
|
-
return (React__default["default"].createElement(Transition$1, { in: visible, onEnter: onShow, onExit: onHide, timeout: 150 }, function (state) {
|
|
7540
|
+
return (React__default["default"].createElement(Transition$1, { in: visible, nodeRef: tabPaneRef, onEnter: onShow, onExit: onHide, timeout: 150 }, function (state) {
|
|
7481
7541
|
var transitionClass = getTransitionClass(state);
|
|
7482
|
-
return (React__default["default"].createElement("div", __assign({ className: classNames(_className, transitionClass) }, rest, { ref:
|
|
7542
|
+
return (React__default["default"].createElement("div", __assign({ className: classNames(_className, transitionClass) }, rest, { ref: forkedRef }), children));
|
|
7483
7543
|
}));
|
|
7484
7544
|
});
|
|
7485
7545
|
CTabPane.propTypes = {
|
|
@@ -7495,6 +7555,8 @@ var CToastContext = React.createContext({});
|
|
|
7495
7555
|
var CToast = React.forwardRef(function (_a, ref) {
|
|
7496
7556
|
var _b;
|
|
7497
7557
|
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(_a, ["children", "animation", "autohide", "className", "color", "delay", "index", "key", "visible", "onClose", "onShow"]);
|
|
7558
|
+
var toastRef = React.useRef();
|
|
7559
|
+
var forkedRef = useForkedRef(ref, toastRef);
|
|
7498
7560
|
var _g = React.useState(false), _visible = _g[0], setVisible = _g[1];
|
|
7499
7561
|
var timeout = React.useRef();
|
|
7500
7562
|
React.useEffect(function () {
|
|
@@ -7532,10 +7594,10 @@ var CToast = React.forwardRef(function (_a, ref) {
|
|
|
7532
7594
|
? 'showing'
|
|
7533
7595
|
: 'fade';
|
|
7534
7596
|
};
|
|
7535
|
-
return (React__default["default"].createElement(Transition$1, { in: _visible, onEnter: function () { return onShow && onShow(index ? index : null); }, onExited: function () { return onClose && onClose(index ? index : null); }, timeout: 250, unmountOnExit: true }, function (state) {
|
|
7597
|
+
return (React__default["default"].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) {
|
|
7536
7598
|
var transitionClass = getTransitionClass(state);
|
|
7537
7599
|
return (React__default["default"].createElement(CToastContext.Provider, { value: contextValues },
|
|
7538
|
-
React__default["default"].createElement("div", __assign({ className: classNames(_className, transitionClass), "aria-live": "assertive", "aria-atomic": "true", role: "alert", onMouseEnter: function () { return clearTimeout(timeout.current); }, onMouseLeave: function () { return _autohide; } }, rest, { key: key, ref:
|
|
7600
|
+
React__default["default"].createElement("div", __assign({ className: classNames(_className, transitionClass), "aria-live": "assertive", "aria-atomic": "true", role: "alert", onMouseEnter: function () { return clearTimeout(timeout.current); }, onMouseLeave: function () { return _autohide; } }, rest, { key: key, ref: forkedRef }), children)));
|
|
7539
7601
|
}));
|
|
7540
7602
|
});
|
|
7541
7603
|
CToast.propTypes = {
|
|
@@ -7645,8 +7707,24 @@ CToaster.propTypes = {
|
|
|
7645
7707
|
CToaster.displayName = 'CToaster';
|
|
7646
7708
|
|
|
7647
7709
|
var CTooltip = function (_a) {
|
|
7648
|
-
var children = _a.children, content = _a.content, _b = _a.
|
|
7649
|
-
var
|
|
7710
|
+
var children = _a.children, content = _a.content, _b = _a.offset, offset = _b === void 0 ? [0, 0] : _b, onHide = _a.onHide, onShow = _a.onShow, _c = _a.placement, placement = _c === void 0 ? 'top' : _c, _d = _a.trigger, trigger = _d === void 0 ? 'hover' : _d, visible = _a.visible, rest = __rest(_a, ["children", "content", "offset", "onHide", "onShow", "placement", "trigger", "visible"]);
|
|
7711
|
+
var tooltipRef = React.useRef();
|
|
7712
|
+
var _e = React.useState(visible), _visible = _e[0], setVisible = _e[1];
|
|
7713
|
+
var _f = React.useState(null), referenceElement = _f[0], setReferenceElement = _f[1];
|
|
7714
|
+
var _g = React.useState(null), popperElement = _g[0], setPopperElement = _g[1];
|
|
7715
|
+
var _h = React.useState(null), arrowElement = _h[0], setArrowElement = _h[1];
|
|
7716
|
+
var _j = usePopper(referenceElement, popperElement, {
|
|
7717
|
+
modifiers: [
|
|
7718
|
+
{ name: 'arrow', options: { element: arrowElement } },
|
|
7719
|
+
{
|
|
7720
|
+
name: 'offset',
|
|
7721
|
+
options: {
|
|
7722
|
+
offset: offset,
|
|
7723
|
+
},
|
|
7724
|
+
},
|
|
7725
|
+
],
|
|
7726
|
+
placement: placement,
|
|
7727
|
+
}), styles = _j.styles, attributes = _j.attributes;
|
|
7650
7728
|
var getTransitionClass = function (state) {
|
|
7651
7729
|
return state === 'entering'
|
|
7652
7730
|
? 'fade'
|
|
@@ -7656,39 +7734,34 @@ var CTooltip = function (_a) {
|
|
|
7656
7734
|
? 'fade'
|
|
7657
7735
|
: 'fade';
|
|
7658
7736
|
};
|
|
7659
|
-
return (React__default["default"].createElement(
|
|
7660
|
-
React__default["default"].
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
onMouseLeave: function () { return setVisible(false); },
|
|
7670
|
-
})));
|
|
7671
|
-
}),
|
|
7737
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
7738
|
+
React__default["default"].cloneElement(children, __assign(__assign(__assign({ ref: setReferenceElement }, ((trigger === 'click' || trigger.includes('click')) && {
|
|
7739
|
+
onClick: function () { return setVisible(!_visible); },
|
|
7740
|
+
})), ((trigger === 'focus' || trigger.includes('focus')) && {
|
|
7741
|
+
onFocus: function () { return setVisible(true); },
|
|
7742
|
+
onBlur: function () { return setVisible(false); },
|
|
7743
|
+
})), ((trigger === 'hover' || trigger.includes('hover')) && {
|
|
7744
|
+
onMouseEnter: function () { return setVisible(true); },
|
|
7745
|
+
onMouseLeave: function () { return setVisible(false); },
|
|
7746
|
+
}))),
|
|
7672
7747
|
typeof window !== 'undefined' &&
|
|
7673
|
-
ReactDOM.createPortal(React__default["default"].createElement(Transition$1, { in: _visible, mountOnEnter: true, onEnter: onShow, onExit: onHide, timeout: {
|
|
7748
|
+
ReactDOM.createPortal(React__default["default"].createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: tooltipRef, onEnter: onShow, onExit: onHide, timeout: {
|
|
7674
7749
|
enter: 0,
|
|
7675
7750
|
exit: 200,
|
|
7676
7751
|
}, unmountOnExit: true }, function (state) {
|
|
7677
7752
|
var transitionClass = getTransitionClass(state);
|
|
7678
|
-
return (React__default["default"].createElement(
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
React__default["default"].createElement("div", __assign({ className: "tooltip-arrow" }, arrowProps)),
|
|
7682
|
-
React__default["default"].createElement("div", { className: "tooltip-inner" }, content)));
|
|
7683
|
-
}));
|
|
7753
|
+
return (React__default["default"].createElement("div", __assign({ className: classNames("tooltip bs-tooltip-".concat(placement === 'left' ? 'start' : placement === 'right' ? 'end' : placement), transitionClass), ref: setPopperElement, role: "tooltip", style: styles.popper }, attributes.popper, rest),
|
|
7754
|
+
React__default["default"].createElement("div", { className: "tooltip-arrow", style: styles.arrow, ref: setArrowElement }),
|
|
7755
|
+
React__default["default"].createElement("div", { className: "tooltip-inner" }, content)));
|
|
7684
7756
|
}), document.body)));
|
|
7685
7757
|
};
|
|
7686
7758
|
CTooltip.propTypes = {
|
|
7687
7759
|
children: PropTypes.any,
|
|
7688
7760
|
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
7689
|
-
|
|
7761
|
+
offset: PropTypes.any,
|
|
7690
7762
|
onHide: PropTypes.func,
|
|
7691
7763
|
onShow: PropTypes.func,
|
|
7764
|
+
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
7692
7765
|
trigger: triggerPropType,
|
|
7693
7766
|
visible: PropTypes.bool,
|
|
7694
7767
|
};
|