@coreui/react 4.9.0-beta.0 → 4.9.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/dropdown/CDropdown.d.ts +8 -1
- package/dist/components/dropdown/CDropdownMenu.d.ts +3 -4
- package/dist/components/dropdown copy/CDropdown.d.ts +89 -0
- package/dist/components/dropdown copy/CDropdownDivider.d.ts +8 -0
- package/dist/components/dropdown copy/CDropdownHeader.d.ts +12 -0
- package/dist/components/dropdown copy/CDropdownItem.d.ts +13 -0
- package/dist/components/dropdown copy/CDropdownItemPlain.d.ts +12 -0
- package/dist/components/dropdown copy/CDropdownMenu.d.ts +13 -0
- package/dist/components/dropdown copy/CDropdownToggle.d.ts +24 -0
- package/dist/components/dropdown copy/index.d.ts +8 -0
- package/dist/components/popover/CPopover.d.ts +22 -1
- package/dist/components/progress/CProgress.d.ts +6 -0
- package/dist/components/progress/CProgressStacked.d.ts +12 -0
- package/dist/components/progress/index.d.ts +2 -1
- package/dist/components/tooltip/CTooltip.d.ts +22 -1
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/useColorModes.d.ts +4 -2
- package/dist/hooks/usePopper.d.ts +8 -0
- package/dist/index.es.js +1527 -1915
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1312 -1716
- package/dist/index.js.map +1 -1
- package/dist/props.d.ts +1 -0
- package/dist/utils/getRTLPlacement.d.ts +3 -0
- package/dist/utils/index.d.ts +2 -1
- package/package.json +5 -5
- package/src/components/dropdown/CDropdown.tsx +130 -45
- package/src/components/dropdown/CDropdownMenu.tsx +41 -138
- package/src/components/dropdown/CDropdownToggle.tsx +6 -15
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownMenu.spec.tsx.snap +0 -1
- package/src/components/popover/CPopover.tsx +76 -51
- package/src/components/popover/__tests__/__snapshots__/CPopover.spec.tsx.snap +0 -21
- package/src/components/progress/CProgress.tsx +43 -8
- package/src/components/progress/CProgressBar.tsx +5 -6
- package/src/components/progress/CProgressStacked.tsx +39 -0
- package/src/components/progress/index.ts +2 -1
- package/src/components/tooltip/CTooltip.tsx +77 -52
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useColorModes.ts +23 -11
- package/src/hooks/usePopper.ts +31 -0
- package/src/props.ts +5 -0
- package/src/utils/getRTLPlacement.ts +18 -0
- package/src/utils/index.ts +2 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import * as ReactDOM from 'react-dom';
|
|
4
|
-
import ReactDOM__default, { createPortal } from 'react-dom';
|
|
1
|
+
import React, { createContext, forwardRef, useState, useRef, useContext, useEffect, useMemo, Children, useLayoutEffect } from 'react';
|
|
2
|
+
import ReactDOM, { createPortal } from 'react-dom';
|
|
5
3
|
|
|
6
4
|
/******************************************************************************
|
|
7
5
|
Copyright (c) Microsoft Corporation.
|
|
@@ -17,7 +15,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
17
15
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
18
16
|
PERFORMANCE OF THIS SOFTWARE.
|
|
19
17
|
***************************************************************************** */
|
|
20
|
-
/* global Reflect, Promise */
|
|
18
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
21
19
|
|
|
22
20
|
|
|
23
21
|
var __assign = function() {
|
|
@@ -51,7 +49,12 @@ function __spreadArray(to, from, pack) {
|
|
|
51
49
|
}
|
|
52
50
|
}
|
|
53
51
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
54
|
-
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
55
|
+
var e = new Error(message);
|
|
56
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
57
|
+
};
|
|
55
58
|
|
|
56
59
|
function getDefaultExportFromCjs (x) {
|
|
57
60
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -1306,8 +1309,8 @@ var CAccordionContext = createContext({});
|
|
|
1306
1309
|
var CAccordion = forwardRef(function (_a, ref) {
|
|
1307
1310
|
var children = _a.children, activeItemKey = _a.activeItemKey, _b = _a.alwaysOpen, alwaysOpen = _b === void 0 ? false : _b, className = _a.className, flush = _a.flush, rest = __rest(_a, ["children", "activeItemKey", "alwaysOpen", "className", "flush"]);
|
|
1308
1311
|
var _c = useState(activeItemKey), _activeItemKey = _c[0], setActiveKey = _c[1];
|
|
1309
|
-
return (
|
|
1310
|
-
|
|
1312
|
+
return (React.createElement("div", __assign({ className: classNames('accordion', { 'accordion-flush': flush }, className) }, rest, { ref: ref }),
|
|
1313
|
+
React.createElement(CAccordionContext.Provider, { value: { _activeItemKey: _activeItemKey, alwaysOpen: alwaysOpen, setActiveKey: setActiveKey } }, children)));
|
|
1311
1314
|
});
|
|
1312
1315
|
CAccordion.propTypes = {
|
|
1313
1316
|
alwaysOpen: PropTypes.bool,
|
|
@@ -1330,8 +1333,8 @@ var CAccordionItem = forwardRef(function (_a, ref) {
|
|
|
1330
1333
|
useEffect(function () {
|
|
1331
1334
|
setVisible(Boolean(_activeItemKey === _itemKey.current));
|
|
1332
1335
|
}, [_activeItemKey]);
|
|
1333
|
-
return (
|
|
1334
|
-
|
|
1336
|
+
return (React.createElement("div", __assign({ className: classNames('accordion-item', className) }, rest, { ref: ref }),
|
|
1337
|
+
React.createElement(CAccordionItemContext.Provider, { value: { setVisible: setVisible, visible: visible } }, children)));
|
|
1335
1338
|
});
|
|
1336
1339
|
CAccordionItem.propTypes = {
|
|
1337
1340
|
children: PropTypes.node,
|
|
@@ -1447,7 +1450,7 @@ var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfTyp
|
|
|
1447
1450
|
exitActive: PropTypes.string
|
|
1448
1451
|
})]) : null;
|
|
1449
1452
|
|
|
1450
|
-
var TransitionGroupContext =
|
|
1453
|
+
var TransitionGroupContext = React.createContext(null);
|
|
1451
1454
|
|
|
1452
1455
|
var forceReflow = function forceReflow(node) {
|
|
1453
1456
|
return node.scrollTop;
|
|
@@ -1673,7 +1676,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1673
1676
|
|
|
1674
1677
|
if (nextStatus === ENTERING) {
|
|
1675
1678
|
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
1676
|
-
var node = this.props.nodeRef ? this.props.nodeRef.current :
|
|
1679
|
+
var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749
|
|
1677
1680
|
// With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.
|
|
1678
1681
|
// To make the animation happen, we have to separate each rendering and avoid being processed as batched.
|
|
1679
1682
|
|
|
@@ -1697,7 +1700,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1697
1700
|
var enter = this.props.enter;
|
|
1698
1701
|
var appearing = this.context ? this.context.isMounting : mounting;
|
|
1699
1702
|
|
|
1700
|
-
var _ref2 = this.props.nodeRef ? [appearing] : [
|
|
1703
|
+
var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],
|
|
1701
1704
|
maybeNode = _ref2[0],
|
|
1702
1705
|
maybeAppearing = _ref2[1];
|
|
1703
1706
|
|
|
@@ -1735,7 +1738,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1735
1738
|
|
|
1736
1739
|
var exit = this.props.exit;
|
|
1737
1740
|
var timeouts = this.getTimeouts();
|
|
1738
|
-
var maybeNode = this.props.nodeRef ? undefined :
|
|
1741
|
+
var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED
|
|
1739
1742
|
|
|
1740
1743
|
if (!exit || config.disabled) {
|
|
1741
1744
|
this.safeSetState({
|
|
@@ -1799,7 +1802,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1799
1802
|
|
|
1800
1803
|
_proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
|
|
1801
1804
|
this.setNextCallback(handler);
|
|
1802
|
-
var node = this.props.nodeRef ? this.props.nodeRef.current :
|
|
1805
|
+
var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
|
|
1803
1806
|
var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
|
|
1804
1807
|
|
|
1805
1808
|
if (!node || doesNotHaveTimeoutOrListener) {
|
|
@@ -1849,14 +1852,14 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1849
1852
|
return (
|
|
1850
1853
|
/*#__PURE__*/
|
|
1851
1854
|
// allows for nested Transitions
|
|
1852
|
-
|
|
1855
|
+
React.createElement(TransitionGroupContext.Provider, {
|
|
1853
1856
|
value: null
|
|
1854
|
-
}, typeof children === 'function' ? children(status, childProps) :
|
|
1857
|
+
}, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))
|
|
1855
1858
|
);
|
|
1856
1859
|
};
|
|
1857
1860
|
|
|
1858
1861
|
return Transition;
|
|
1859
|
-
}(
|
|
1862
|
+
}(React.Component);
|
|
1860
1863
|
|
|
1861
1864
|
Transition.contextType = TransitionGroupContext;
|
|
1862
1865
|
Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -2324,7 +2327,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
2324
2327
|
_this$props.classNames;
|
|
2325
2328
|
var props = _objectWithoutPropertiesLoose(_this$props, ["classNames"]);
|
|
2326
2329
|
|
|
2327
|
-
return /*#__PURE__*/
|
|
2330
|
+
return /*#__PURE__*/React.createElement(Transition$1, _extends({}, props, {
|
|
2328
2331
|
onEnter: this.onEnter,
|
|
2329
2332
|
onEntered: this.onEntered,
|
|
2330
2333
|
onEntering: this.onEntering,
|
|
@@ -2335,7 +2338,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
2335
2338
|
};
|
|
2336
2339
|
|
|
2337
2340
|
return CSSTransition;
|
|
2338
|
-
}(
|
|
2341
|
+
}(React.Component);
|
|
2339
2342
|
|
|
2340
2343
|
CSSTransition.defaultProps = {
|
|
2341
2344
|
classNames: ''
|
|
@@ -2472,11 +2475,16 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
|
|
|
2472
2475
|
}) : {};
|
|
2473
2476
|
var CSSTransition$1 = CSSTransition;
|
|
2474
2477
|
|
|
2475
|
-
var getStoredTheme = function (localStorageItemName) {
|
|
2478
|
+
var getStoredTheme = function (localStorageItemName) {
|
|
2479
|
+
return typeof window !== 'undefined' && localStorage.getItem(localStorageItemName);
|
|
2480
|
+
};
|
|
2476
2481
|
var setStoredTheme = function (localStorageItemName, colorMode) {
|
|
2477
2482
|
return localStorage.setItem(localStorageItemName, colorMode);
|
|
2478
2483
|
};
|
|
2479
2484
|
var getPreferredColorScheme = function (localStorageItemName) {
|
|
2485
|
+
if (typeof window === 'undefined') {
|
|
2486
|
+
return 'light';
|
|
2487
|
+
}
|
|
2480
2488
|
var storedTheme = getStoredTheme(localStorageItemName);
|
|
2481
2489
|
if (storedTheme) {
|
|
2482
2490
|
return storedTheme;
|
|
@@ -2495,20 +2503,23 @@ var useColorModes = function (localStorageItemName) {
|
|
|
2495
2503
|
if (localStorageItemName === void 0) { localStorageItemName = 'coreui-react-color-scheme'; }
|
|
2496
2504
|
var _a = useState(getPreferredColorScheme(localStorageItemName)), colorMode = _a[0], setColorMode = _a[1];
|
|
2497
2505
|
useEffect(function () {
|
|
2498
|
-
|
|
2499
|
-
|
|
2506
|
+
if (colorMode) {
|
|
2507
|
+
setStoredTheme(localStorageItemName, colorMode);
|
|
2508
|
+
setTheme(colorMode);
|
|
2509
|
+
}
|
|
2500
2510
|
}, [colorMode]);
|
|
2501
2511
|
useEffect(function () {
|
|
2502
2512
|
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function () {
|
|
2503
2513
|
var storedTheme = getStoredTheme(localStorageItemName);
|
|
2504
|
-
if (storedTheme !== 'light' && storedTheme !== 'dark') {
|
|
2514
|
+
if (storedTheme !== 'light' && storedTheme !== 'dark' && colorMode) {
|
|
2505
2515
|
setTheme(colorMode);
|
|
2506
2516
|
}
|
|
2507
2517
|
});
|
|
2508
|
-
}
|
|
2518
|
+
});
|
|
2509
2519
|
return {
|
|
2510
|
-
|
|
2511
|
-
|
|
2520
|
+
colorMode: colorMode,
|
|
2521
|
+
isColorModeSet: function () { return Boolean(getStoredTheme(localStorageItemName)); },
|
|
2522
|
+
setColorMode: setColorMode,
|
|
2512
2523
|
};
|
|
2513
2524
|
};
|
|
2514
2525
|
|
|
@@ -2555,984 +2566,139 @@ function isFunction(value) {
|
|
|
2555
2566
|
return !!(value && {}.toString.call(value) == '[object Function]');
|
|
2556
2567
|
}
|
|
2557
2568
|
|
|
2558
|
-
var
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
}
|
|
2577
|
-
setHeight(0);
|
|
2578
|
-
};
|
|
2579
|
-
var onExit = function () {
|
|
2580
|
-
if (horizontal) {
|
|
2581
|
-
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
2582
|
-
return;
|
|
2583
|
-
}
|
|
2584
|
-
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
2585
|
-
};
|
|
2586
|
-
var onExiting = function () {
|
|
2587
|
-
onHide && onHide();
|
|
2588
|
-
if (horizontal) {
|
|
2589
|
-
setWidth(0);
|
|
2590
|
-
return;
|
|
2591
|
-
}
|
|
2592
|
-
setHeight(0);
|
|
2593
|
-
};
|
|
2594
|
-
var onExited = function () {
|
|
2595
|
-
if (horizontal) {
|
|
2596
|
-
setWidth(0);
|
|
2597
|
-
return;
|
|
2598
|
-
}
|
|
2599
|
-
setHeight(0);
|
|
2600
|
-
};
|
|
2601
|
-
return (React__default.createElement(CSSTransition$1, { in: visible, nodeRef: collapseRef, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 350 }, function (state) {
|
|
2602
|
-
var currentHeight = height === 0 ? null : { height: height };
|
|
2603
|
-
var currentWidth = width === 0 ? null : { width: width };
|
|
2604
|
-
return (React__default.createElement("div", __assign({ className: classNames(className, {
|
|
2605
|
-
'collapse-horizontal': horizontal,
|
|
2606
|
-
collapsing: state === 'entering' || state === 'exiting',
|
|
2607
|
-
'collapse show': state === 'entered',
|
|
2608
|
-
collapse: state === 'exited',
|
|
2609
|
-
}), style: __assign(__assign({}, currentHeight), currentWidth) }, rest, { ref: forkedRef }), children));
|
|
2610
|
-
}));
|
|
2611
|
-
});
|
|
2612
|
-
CCollapse.propTypes = {
|
|
2613
|
-
children: PropTypes.node,
|
|
2614
|
-
className: PropTypes.string,
|
|
2615
|
-
horizontal: PropTypes.bool,
|
|
2616
|
-
onHide: PropTypes.func,
|
|
2617
|
-
onShow: PropTypes.func,
|
|
2618
|
-
visible: PropTypes.bool,
|
|
2619
|
-
};
|
|
2620
|
-
CCollapse.displayName = 'CCollapse';
|
|
2621
|
-
|
|
2622
|
-
var CAccordionBody = forwardRef(function (_a, ref) {
|
|
2623
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
2624
|
-
var visible = useContext(CAccordionItemContext).visible;
|
|
2625
|
-
return (React__default.createElement(CCollapse, { className: "accordion-collapse", visible: visible },
|
|
2626
|
-
React__default.createElement("div", __assign({ className: classNames('accordion-body', className) }, rest, { ref: ref }), children)));
|
|
2627
|
-
});
|
|
2628
|
-
CAccordionBody.propTypes = {
|
|
2629
|
-
children: PropTypes.node,
|
|
2630
|
-
className: PropTypes.string,
|
|
2631
|
-
};
|
|
2632
|
-
CAccordionBody.displayName = 'CAccordionBody';
|
|
2569
|
+
var top = 'top';
|
|
2570
|
+
var bottom = 'bottom';
|
|
2571
|
+
var right = 'right';
|
|
2572
|
+
var left = 'left';
|
|
2573
|
+
var auto = 'auto';
|
|
2574
|
+
var basePlacements = [top, bottom, right, left];
|
|
2575
|
+
var start = 'start';
|
|
2576
|
+
var end = 'end';
|
|
2577
|
+
var clippingParents = 'clippingParents';
|
|
2578
|
+
var viewport = 'viewport';
|
|
2579
|
+
var popper = 'popper';
|
|
2580
|
+
var reference = 'reference';
|
|
2581
|
+
var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
|
|
2582
|
+
return acc.concat([placement + "-" + start, placement + "-" + end]);
|
|
2583
|
+
}, []);
|
|
2584
|
+
var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
|
|
2585
|
+
return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
|
|
2586
|
+
}, []); // modifiers that need to read the DOM
|
|
2633
2587
|
|
|
2634
|
-
var
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
return (React__default.createElement("button", __assign({ type: "button", className: classNames('accordion-button', { collapsed: !visible }, className), "aria-expanded": !visible, onClick: function () { return setVisible(!visible); } }, rest, { ref: ref }), children));
|
|
2638
|
-
});
|
|
2639
|
-
CAccordionButton.propTypes = {
|
|
2640
|
-
children: PropTypes.node,
|
|
2641
|
-
className: PropTypes.string,
|
|
2642
|
-
};
|
|
2643
|
-
CAccordionButton.displayName = 'CAccordionButton';
|
|
2588
|
+
var beforeRead = 'beforeRead';
|
|
2589
|
+
var read = 'read';
|
|
2590
|
+
var afterRead = 'afterRead'; // pure-logic modifiers
|
|
2644
2591
|
|
|
2645
|
-
var
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
React__default.createElement(CAccordionButton, null, children)));
|
|
2649
|
-
});
|
|
2650
|
-
CAccordionHeader.propTypes = {
|
|
2651
|
-
children: PropTypes.node,
|
|
2652
|
-
className: PropTypes.string,
|
|
2653
|
-
};
|
|
2654
|
-
CAccordionHeader.displayName = 'CAccordionHeader';
|
|
2592
|
+
var beforeMain = 'beforeMain';
|
|
2593
|
+
var main = 'main';
|
|
2594
|
+
var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
|
|
2655
2595
|
|
|
2656
|
-
var
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
}, disabled, className), "aria-label": "Close", disabled: disabled }, rest, { ref: ref })));
|
|
2661
|
-
});
|
|
2662
|
-
CCloseButton.propTypes = {
|
|
2663
|
-
className: PropTypes.string,
|
|
2664
|
-
disabled: PropTypes.bool,
|
|
2665
|
-
white: PropTypes.bool,
|
|
2666
|
-
};
|
|
2667
|
-
CCloseButton.displayName = 'CCloseButton';
|
|
2596
|
+
var beforeWrite = 'beforeWrite';
|
|
2597
|
+
var write = 'write';
|
|
2598
|
+
var afterWrite = 'afterWrite';
|
|
2599
|
+
var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
|
|
2668
2600
|
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
'secondary',
|
|
2673
|
-
'success',
|
|
2674
|
-
'danger',
|
|
2675
|
-
'warning',
|
|
2676
|
-
'info',
|
|
2677
|
-
'dark',
|
|
2678
|
-
'light',
|
|
2679
|
-
]),
|
|
2680
|
-
PropTypes.string,
|
|
2681
|
-
]);
|
|
2682
|
-
var placementPropType = PropTypes.oneOf([
|
|
2683
|
-
'auto',
|
|
2684
|
-
'auto-start',
|
|
2685
|
-
'auto-end',
|
|
2686
|
-
'top-end',
|
|
2687
|
-
'top',
|
|
2688
|
-
'top-start',
|
|
2689
|
-
'bottom-end',
|
|
2690
|
-
'bottom',
|
|
2691
|
-
'bottom-start',
|
|
2692
|
-
'right-start',
|
|
2693
|
-
'right',
|
|
2694
|
-
'right-end',
|
|
2695
|
-
'left-start',
|
|
2696
|
-
'left',
|
|
2697
|
-
'left-end',
|
|
2698
|
-
]);
|
|
2699
|
-
var shapePropType = PropTypes.oneOfType([
|
|
2700
|
-
PropTypes.oneOf([
|
|
2701
|
-
'rounded',
|
|
2702
|
-
'rounded-top',
|
|
2703
|
-
'rounded-end',
|
|
2704
|
-
'rounded-bottom',
|
|
2705
|
-
'rounded-start',
|
|
2706
|
-
'rounded-circle',
|
|
2707
|
-
'rounded-pill',
|
|
2708
|
-
'rounded-0',
|
|
2709
|
-
'rounded-1',
|
|
2710
|
-
'rounded-2',
|
|
2711
|
-
'rounded-3',
|
|
2712
|
-
]),
|
|
2713
|
-
PropTypes.string,
|
|
2714
|
-
]);
|
|
2715
|
-
var textColorsPropType = PropTypes.oneOfType([
|
|
2716
|
-
colorPropType,
|
|
2717
|
-
PropTypes.oneOf(['white', 'muted']),
|
|
2718
|
-
PropTypes.string,
|
|
2719
|
-
]);
|
|
2720
|
-
var triggerPropType = PropTypes.oneOfType([
|
|
2721
|
-
PropTypes.arrayOf(PropTypes.oneOf(['hover', 'focus', 'click']).isRequired),
|
|
2722
|
-
PropTypes.oneOf(['hover', 'focus', 'click']),
|
|
2723
|
-
]);
|
|
2601
|
+
function getNodeName(element) {
|
|
2602
|
+
return element ? (element.nodeName || '').toLowerCase() : null;
|
|
2603
|
+
}
|
|
2724
2604
|
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
var _d = useState(visible), _visible = _d[0], setVisible = _d[1];
|
|
2730
|
-
useEffect(function () {
|
|
2731
|
-
setVisible(visible);
|
|
2732
|
-
}, [visible]);
|
|
2733
|
-
return (React__default.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: alertRef, onExit: onClose, timeout: 150, unmountOnExit: true }, function (state) { return (React__default.createElement("div", __assign({ className: classNames('alert', variant === 'solid' ? "bg-".concat(color, " text-white") : "alert-".concat(color), {
|
|
2734
|
-
'alert-dismissible fade': dismissible,
|
|
2735
|
-
show: state === 'entered',
|
|
2736
|
-
}, className), role: "alert" }, rest, { ref: forkedRef }),
|
|
2737
|
-
children,
|
|
2738
|
-
dismissible && React__default.createElement(CCloseButton, { onClick: function () { return setVisible(false); } }))); }));
|
|
2739
|
-
});
|
|
2740
|
-
CAlert.propTypes = {
|
|
2741
|
-
children: PropTypes.node,
|
|
2742
|
-
className: PropTypes.string,
|
|
2743
|
-
color: colorPropType.isRequired,
|
|
2744
|
-
dismissible: PropTypes.bool,
|
|
2745
|
-
onClose: PropTypes.func,
|
|
2746
|
-
variant: PropTypes.string,
|
|
2747
|
-
visible: PropTypes.bool,
|
|
2748
|
-
};
|
|
2749
|
-
CAlert.displayName = 'CAlert';
|
|
2605
|
+
function getWindow(node) {
|
|
2606
|
+
if (node == null) {
|
|
2607
|
+
return window;
|
|
2608
|
+
}
|
|
2750
2609
|
|
|
2751
|
-
|
|
2752
|
-
var
|
|
2753
|
-
return
|
|
2754
|
-
}
|
|
2755
|
-
CAlertHeading.propTypes = {
|
|
2756
|
-
children: PropTypes.node,
|
|
2757
|
-
className: PropTypes.string,
|
|
2758
|
-
component: PropTypes.elementType,
|
|
2759
|
-
};
|
|
2760
|
-
CAlertHeading.displayName = 'CAlertHeading';
|
|
2610
|
+
if (node.toString() !== '[object Window]') {
|
|
2611
|
+
var ownerDocument = node.ownerDocument;
|
|
2612
|
+
return ownerDocument ? ownerDocument.defaultView || window : window;
|
|
2613
|
+
}
|
|
2761
2614
|
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
return (React__default.createElement(Component
|
|
2765
|
-
// TODO: remove duplicated classes ex. `active active` in `<CListGroupItem>`
|
|
2766
|
-
, __assign({
|
|
2767
|
-
// TODO: remove duplicated classes ex. `active active` in `<CListGroupItem>`
|
|
2768
|
-
className: classNames(className, { active: active, disabled: disabled }) }, (active && { 'aria-current': 'page' }), (Component === 'a' && disabled && { 'aria-disabled': true, tabIndex: -1 }), ((Component === 'a' || Component === 'button') && {
|
|
2769
|
-
onClick: function (event) {
|
|
2770
|
-
event.preventDefault;
|
|
2771
|
-
!disabled && rest.onClick && rest.onClick(event);
|
|
2772
|
-
},
|
|
2773
|
-
}), { disabled: disabled }, rest, { ref: ref }), children));
|
|
2774
|
-
});
|
|
2775
|
-
CLink.propTypes = {
|
|
2776
|
-
active: PropTypes.bool,
|
|
2777
|
-
children: PropTypes.node,
|
|
2778
|
-
className: PropTypes.string,
|
|
2779
|
-
component: PropTypes.elementType,
|
|
2780
|
-
disabled: PropTypes.bool,
|
|
2781
|
-
};
|
|
2782
|
-
CLink.displayName = 'CLink';
|
|
2615
|
+
return node;
|
|
2616
|
+
}
|
|
2783
2617
|
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
}
|
|
2788
|
-
CAlertLink.propTypes = {
|
|
2789
|
-
children: PropTypes.node,
|
|
2790
|
-
className: PropTypes.string,
|
|
2791
|
-
};
|
|
2792
|
-
CAlertLink.displayName = 'CAlertLink';
|
|
2793
|
-
|
|
2794
|
-
var CAvatar = forwardRef(function (_a, ref) {
|
|
2795
|
-
var _b;
|
|
2796
|
-
var children = _a.children, className = _a.className, color = _a.color, shape = _a.shape, size = _a.size, src = _a.src, status = _a.status, textColor = _a.textColor, rest = __rest(_a, ["children", "className", "color", "shape", "size", "src", "status", "textColor"]);
|
|
2797
|
-
var statusClassName = status && classNames('avatar-status', "bg-".concat(status));
|
|
2798
|
-
return (React__default.createElement("div", __assign({ className: classNames('avatar', (_b = {},
|
|
2799
|
-
_b["bg-".concat(color)] = color,
|
|
2800
|
-
_b["avatar-".concat(size)] = size,
|
|
2801
|
-
_b["text-".concat(textColor)] = textColor,
|
|
2802
|
-
_b), shape, className) }, rest, { ref: ref }),
|
|
2803
|
-
src ? React__default.createElement("img", { src: src, className: "avatar-img" }) : children,
|
|
2804
|
-
status && React__default.createElement("span", { className: statusClassName })));
|
|
2805
|
-
});
|
|
2806
|
-
CAvatar.propTypes = {
|
|
2807
|
-
children: PropTypes.node,
|
|
2808
|
-
className: PropTypes.string,
|
|
2809
|
-
color: colorPropType,
|
|
2810
|
-
shape: shapePropType,
|
|
2811
|
-
size: PropTypes.string,
|
|
2812
|
-
src: PropTypes.string,
|
|
2813
|
-
status: PropTypes.string,
|
|
2814
|
-
textColor: textColorsPropType,
|
|
2815
|
-
};
|
|
2816
|
-
CAvatar.displayName = 'CAvatar';
|
|
2618
|
+
function isElement(node) {
|
|
2619
|
+
var OwnElement = getWindow(node).Element;
|
|
2620
|
+
return node instanceof OwnElement || node instanceof Element;
|
|
2621
|
+
}
|
|
2817
2622
|
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
return (React__default.createElement(Transition$1, { in: visible, mountOnEnter: true, nodeRef: backdropRef, timeout: 150, unmountOnExit: true }, function (state) { return (React__default.createElement("div", __assign({ className: classNames(className, 'fade', {
|
|
2823
|
-
show: state === 'entered',
|
|
2824
|
-
}) }, rest, { ref: forkedRef }))); }));
|
|
2825
|
-
});
|
|
2826
|
-
CBackdrop.propTypes = {
|
|
2827
|
-
className: PropTypes.string,
|
|
2828
|
-
visible: PropTypes.bool,
|
|
2829
|
-
};
|
|
2830
|
-
CBackdrop.displayName = 'CBackdrop';
|
|
2623
|
+
function isHTMLElement(node) {
|
|
2624
|
+
var OwnElement = getWindow(node).HTMLElement;
|
|
2625
|
+
return node instanceof OwnElement || node instanceof HTMLElement;
|
|
2626
|
+
}
|
|
2831
2627
|
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
return
|
|
2836
|
-
|
|
2837
|
-
_b['position-absolute translate-middle'] = position,
|
|
2838
|
-
_b['top-0'] = position === null || position === void 0 ? void 0 : position.includes('top'),
|
|
2839
|
-
_b['top-100'] = position === null || position === void 0 ? void 0 : position.includes('bottom'),
|
|
2840
|
-
_b['start-100'] = position === null || position === void 0 ? void 0 : position.includes('end'),
|
|
2841
|
-
_b['start-0'] = position === null || position === void 0 ? void 0 : position.includes('start'),
|
|
2842
|
-
_b["badge-".concat(size)] = size,
|
|
2843
|
-
_b["text-".concat(textColor)] = textColor,
|
|
2844
|
-
_b), shape, className) }, rest, { ref: ref }), children));
|
|
2845
|
-
});
|
|
2846
|
-
CBadge.propTypes = {
|
|
2847
|
-
children: PropTypes.node,
|
|
2848
|
-
className: PropTypes.string,
|
|
2849
|
-
color: colorPropType,
|
|
2850
|
-
component: PropTypes.string,
|
|
2851
|
-
position: PropTypes.oneOf(['top-start', 'top-end', 'bottom-end', 'bottom-start']),
|
|
2852
|
-
shape: shapePropType,
|
|
2853
|
-
size: PropTypes.oneOf(['sm']),
|
|
2854
|
-
textColor: textColorsPropType,
|
|
2855
|
-
};
|
|
2856
|
-
CBadge.displayName = 'CBadge';
|
|
2628
|
+
function isShadowRoot(node) {
|
|
2629
|
+
// IE 11 has no ShadowRoot
|
|
2630
|
+
if (typeof ShadowRoot === 'undefined') {
|
|
2631
|
+
return false;
|
|
2632
|
+
}
|
|
2857
2633
|
|
|
2858
|
-
var
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
React__default.createElement("ol", __assign({ className: classNames('breadcrumb', className) }, rest, { ref: ref }), children)));
|
|
2862
|
-
});
|
|
2863
|
-
CBreadcrumb.propTypes = {
|
|
2864
|
-
children: PropTypes.node,
|
|
2865
|
-
className: PropTypes.string,
|
|
2866
|
-
};
|
|
2867
|
-
CBreadcrumb.displayName = 'CBreadcrumb';
|
|
2634
|
+
var OwnElement = getWindow(node).ShadowRoot;
|
|
2635
|
+
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
2636
|
+
}
|
|
2868
2637
|
|
|
2869
|
-
|
|
2870
|
-
var children = _a.children, active = _a.active, className = _a.className, href = _a.href, rest = __rest(_a, ["children", "active", "className", "href"]);
|
|
2871
|
-
return (React__default.createElement("li", __assign({ className: classNames('breadcrumb-item', {
|
|
2872
|
-
active: active,
|
|
2873
|
-
}, className) }, (active && { 'aria-current': 'page' }), rest, { ref: ref }), href ? React__default.createElement(CLink, { href: href }, children) : children));
|
|
2874
|
-
});
|
|
2875
|
-
CBreadcrumbItem.propTypes = {
|
|
2876
|
-
active: PropTypes.bool,
|
|
2877
|
-
children: PropTypes.node,
|
|
2878
|
-
className: PropTypes.string,
|
|
2879
|
-
href: PropTypes.string,
|
|
2880
|
-
};
|
|
2881
|
-
CBreadcrumbItem.displayName = 'CBreadcrumbItem';
|
|
2638
|
+
// and applies them to the HTMLElements such as popper and arrow
|
|
2882
2639
|
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
}
|
|
2888
|
-
|
|
2889
|
-
children: PropTypes.node,
|
|
2890
|
-
className: PropTypes.string,
|
|
2891
|
-
color: colorPropType,
|
|
2892
|
-
component: PropTypes.elementType,
|
|
2893
|
-
shape: PropTypes.string,
|
|
2894
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
2895
|
-
type: PropTypes.oneOf(['button', 'submit', 'reset']),
|
|
2896
|
-
variant: PropTypes.oneOf(['outline', 'ghost']),
|
|
2897
|
-
};
|
|
2898
|
-
CButton.displayName = 'CButton';
|
|
2640
|
+
function applyStyles(_ref) {
|
|
2641
|
+
var state = _ref.state;
|
|
2642
|
+
Object.keys(state.elements).forEach(function (name) {
|
|
2643
|
+
var style = state.styles[name] || {};
|
|
2644
|
+
var attributes = state.attributes[name] || {};
|
|
2645
|
+
var element = state.elements[name]; // arrow is optional + virtual elements
|
|
2899
2646
|
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
children: PropTypes.node,
|
|
2906
|
-
className: PropTypes.string,
|
|
2907
|
-
};
|
|
2908
|
-
CButtonToolbar.displayName = 'CButtonToolbar';
|
|
2647
|
+
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
2648
|
+
return;
|
|
2649
|
+
} // Flow doesn't support to extend this property, but it's the most
|
|
2650
|
+
// effective way to apply styles to an HTMLElement
|
|
2651
|
+
// $FlowFixMe[cannot-write]
|
|
2909
2652
|
|
|
2910
|
-
var CButtonGroup = forwardRef(function (_a, ref) {
|
|
2911
|
-
var _b;
|
|
2912
|
-
var children = _a.children, className = _a.className, size = _a.size, vertical = _a.vertical, rest = __rest(_a, ["children", "className", "size", "vertical"]);
|
|
2913
|
-
return (React__default.createElement("div", __assign({ className: classNames(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-".concat(size)] = size, _b), className) }, rest, { ref: ref }), children));
|
|
2914
|
-
});
|
|
2915
|
-
CButtonGroup.propTypes = {
|
|
2916
|
-
children: PropTypes.node,
|
|
2917
|
-
className: PropTypes.string,
|
|
2918
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
2919
|
-
vertical: PropTypes.bool,
|
|
2920
|
-
};
|
|
2921
|
-
CButtonGroup.displayName = 'CButtonGroup';
|
|
2922
2653
|
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
return (React__default.createElement("div", __assign({ className: classNames('callout', (_b = {},
|
|
2927
|
-
_b["callout-".concat(color)] = color,
|
|
2928
|
-
_b), className) }, rest, { ref: ref }), children));
|
|
2929
|
-
});
|
|
2930
|
-
CCallout.propTypes = {
|
|
2931
|
-
children: PropTypes.node,
|
|
2932
|
-
className: PropTypes.string,
|
|
2933
|
-
color: colorPropType,
|
|
2934
|
-
};
|
|
2935
|
-
CCallout.displayName = 'CCallout';
|
|
2654
|
+
Object.assign(element.style, style);
|
|
2655
|
+
Object.keys(attributes).forEach(function (name) {
|
|
2656
|
+
var value = attributes[name];
|
|
2936
2657
|
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
}
|
|
2945
|
-
CCard.propTypes = {
|
|
2946
|
-
children: PropTypes.node,
|
|
2947
|
-
className: PropTypes.string,
|
|
2948
|
-
color: colorPropType,
|
|
2949
|
-
textColor: PropTypes.string,
|
|
2950
|
-
};
|
|
2951
|
-
CCard.displayName = 'CCard';
|
|
2658
|
+
if (value === false) {
|
|
2659
|
+
element.removeAttribute(name);
|
|
2660
|
+
} else {
|
|
2661
|
+
element.setAttribute(name, value === true ? '' : value);
|
|
2662
|
+
}
|
|
2663
|
+
});
|
|
2664
|
+
});
|
|
2665
|
+
}
|
|
2952
2666
|
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2667
|
+
function effect$2(_ref2) {
|
|
2668
|
+
var state = _ref2.state;
|
|
2669
|
+
var initialStyles = {
|
|
2670
|
+
popper: {
|
|
2671
|
+
position: state.options.strategy,
|
|
2672
|
+
left: '0',
|
|
2673
|
+
top: '0',
|
|
2674
|
+
margin: '0'
|
|
2675
|
+
},
|
|
2676
|
+
arrow: {
|
|
2677
|
+
position: 'absolute'
|
|
2678
|
+
},
|
|
2679
|
+
reference: {}
|
|
2680
|
+
};
|
|
2681
|
+
Object.assign(state.elements.popper.style, initialStyles.popper);
|
|
2682
|
+
state.styles = initialStyles;
|
|
2962
2683
|
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
});
|
|
2967
|
-
CCardFooter.propTypes = {
|
|
2968
|
-
children: PropTypes.node,
|
|
2969
|
-
className: PropTypes.string,
|
|
2970
|
-
};
|
|
2971
|
-
CCardFooter.displayName = 'CCardFooter';
|
|
2684
|
+
if (state.elements.arrow) {
|
|
2685
|
+
Object.assign(state.elements.arrow.style, initialStyles.arrow);
|
|
2686
|
+
}
|
|
2972
2687
|
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
}
|
|
2977
|
-
|
|
2978
|
-
children: PropTypes.node,
|
|
2979
|
-
className: PropTypes.string,
|
|
2980
|
-
};
|
|
2981
|
-
CCardGroup.displayName = 'CCardGroup';
|
|
2688
|
+
return function () {
|
|
2689
|
+
Object.keys(state.elements).forEach(function (name) {
|
|
2690
|
+
var element = state.elements[name];
|
|
2691
|
+
var attributes = state.attributes[name] || {};
|
|
2692
|
+
var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
|
|
2982
2693
|
|
|
2983
|
-
var
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
});
|
|
2987
|
-
CCardHeader.propTypes = {
|
|
2988
|
-
children: PropTypes.node,
|
|
2989
|
-
className: PropTypes.string,
|
|
2990
|
-
component: PropTypes.elementType,
|
|
2991
|
-
};
|
|
2992
|
-
CCardHeader.displayName = 'CCardHeader';
|
|
2694
|
+
var style = styleProperties.reduce(function (style, property) {
|
|
2695
|
+
style[property] = '';
|
|
2696
|
+
return style;
|
|
2697
|
+
}, {}); // arrow is optional + virtual elements
|
|
2993
2698
|
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
});
|
|
2998
|
-
CCardImage.propTypes = {
|
|
2999
|
-
children: PropTypes.node,
|
|
3000
|
-
className: PropTypes.string,
|
|
3001
|
-
component: PropTypes.elementType,
|
|
3002
|
-
orientation: PropTypes.oneOf(['top', 'bottom']),
|
|
3003
|
-
};
|
|
3004
|
-
CCardImage.displayName = 'CCardImage';
|
|
3005
|
-
|
|
3006
|
-
var CCardImageOverlay = forwardRef(function (_a, ref) {
|
|
3007
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
3008
|
-
return (React__default.createElement("div", __assign({ className: classNames('card-img-overlay', className) }, rest, { ref: ref }), children));
|
|
3009
|
-
});
|
|
3010
|
-
CCardImageOverlay.propTypes = {
|
|
3011
|
-
children: PropTypes.node,
|
|
3012
|
-
className: PropTypes.string,
|
|
3013
|
-
};
|
|
3014
|
-
CCardImageOverlay.displayName = 'CCardImageOverlay';
|
|
3015
|
-
|
|
3016
|
-
var CCardLink = forwardRef(function (_a, ref) {
|
|
3017
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
3018
|
-
return (React__default.createElement(CLink, __assign({ className: classNames('card-link', className) }, rest, { ref: ref }), children));
|
|
3019
|
-
});
|
|
3020
|
-
CCardLink.propTypes = {
|
|
3021
|
-
children: PropTypes.node,
|
|
3022
|
-
className: PropTypes.string,
|
|
3023
|
-
};
|
|
3024
|
-
CCardLink.displayName = 'CCardLink';
|
|
3025
|
-
|
|
3026
|
-
var CCardSubtitle = forwardRef(function (_a, ref) {
|
|
3027
|
-
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h6' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
3028
|
-
return (React__default.createElement(Component, __assign({ className: classNames('card-subtitle', className) }, rest, { ref: ref }), children));
|
|
3029
|
-
});
|
|
3030
|
-
CCardSubtitle.propTypes = {
|
|
3031
|
-
children: PropTypes.node,
|
|
3032
|
-
className: PropTypes.string,
|
|
3033
|
-
component: PropTypes.elementType,
|
|
3034
|
-
};
|
|
3035
|
-
CCardSubtitle.displayName = 'CCardSubtitle';
|
|
3036
|
-
|
|
3037
|
-
var CCardText = forwardRef(function (_a, ref) {
|
|
3038
|
-
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'p' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
3039
|
-
return (React__default.createElement(Component, __assign({ className: classNames('card-text', className) }, rest, { ref: ref }), children));
|
|
3040
|
-
});
|
|
3041
|
-
CCardText.propTypes = {
|
|
3042
|
-
children: PropTypes.node,
|
|
3043
|
-
className: PropTypes.string,
|
|
3044
|
-
component: PropTypes.elementType,
|
|
3045
|
-
};
|
|
3046
|
-
CCardText.displayName = 'CCardText';
|
|
3047
|
-
|
|
3048
|
-
var CCardTitle = forwardRef(function (_a, ref) {
|
|
3049
|
-
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
3050
|
-
return (React__default.createElement(Component, __assign({ className: classNames('card-title', className) }, rest, { ref: ref }), children));
|
|
3051
|
-
});
|
|
3052
|
-
CCardTitle.propTypes = {
|
|
3053
|
-
children: PropTypes.node,
|
|
3054
|
-
className: PropTypes.string,
|
|
3055
|
-
component: PropTypes.elementType,
|
|
3056
|
-
};
|
|
3057
|
-
CCardTitle.displayName = 'CCardTitle';
|
|
3058
|
-
|
|
3059
|
-
var isInViewport = function (element) {
|
|
3060
|
-
var rect = element.getBoundingClientRect();
|
|
3061
|
-
return (Math.floor(rect.top) >= 0 &&
|
|
3062
|
-
Math.floor(rect.left) >= 0 &&
|
|
3063
|
-
Math.floor(rect.bottom) <= (window.innerHeight || document.documentElement.clientHeight) &&
|
|
3064
|
-
Math.floor(rect.right) <= (window.innerWidth || document.documentElement.clientWidth));
|
|
3065
|
-
};
|
|
3066
|
-
|
|
3067
|
-
var isRTL = function (element) {
|
|
3068
|
-
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
3069
|
-
return true;
|
|
3070
|
-
}
|
|
3071
|
-
if (element) {
|
|
3072
|
-
return element.closest('[dir="rtl"]') !== null;
|
|
3073
|
-
}
|
|
3074
|
-
return false;
|
|
3075
|
-
};
|
|
3076
|
-
|
|
3077
|
-
var CCarouselContext = createContext({});
|
|
3078
|
-
var CCarousel = forwardRef(function (_a, ref) {
|
|
3079
|
-
var children = _a.children, _b = _a.activeIndex, activeIndex = _b === void 0 ? 0 : _b, className = _a.className, controls = _a.controls, dark = _a.dark, indicators = _a.indicators, _c = _a.interval, interval = _c === void 0 ? 5000 : _c, onSlid = _a.onSlid, onSlide = _a.onSlide, _d = _a.pause, pause = _d === void 0 ? 'hover' : _d, _e = _a.touch, touch = _e === void 0 ? true : _e, transition = _a.transition, _f = _a.wrap, wrap = _f === void 0 ? true : _f, rest = __rest(_a, ["children", "activeIndex", "className", "controls", "dark", "indicators", "interval", "onSlid", "onSlide", "pause", "touch", "transition", "wrap"]);
|
|
3080
|
-
var carouselRef = useRef(null);
|
|
3081
|
-
var forkedRef = useForkedRef(ref, carouselRef);
|
|
3082
|
-
var data = useRef({}).current;
|
|
3083
|
-
var _g = useState(activeIndex), active = _g[0], setActive = _g[1];
|
|
3084
|
-
var _h = useState(false), animating = _h[0], setAnimating = _h[1];
|
|
3085
|
-
var _j = useState(), customInterval = _j[0], setCustomInterval = _j[1];
|
|
3086
|
-
var _k = useState('next'), direction = _k[0], setDirection = _k[1];
|
|
3087
|
-
var _l = useState(0), itemsNumber = _l[0], setItemsNumber = _l[1];
|
|
3088
|
-
var _m = useState(null), touchPosition = _m[0], setTouchPosition = _m[1];
|
|
3089
|
-
var _o = useState(), visible = _o[0], setVisible = _o[1];
|
|
3090
|
-
useEffect(function () {
|
|
3091
|
-
setItemsNumber(Children.toArray(children).length);
|
|
3092
|
-
});
|
|
3093
|
-
useEffect(function () {
|
|
3094
|
-
visible && cycle();
|
|
3095
|
-
}, [visible]);
|
|
3096
|
-
useEffect(function () {
|
|
3097
|
-
!animating && cycle();
|
|
3098
|
-
!animating && onSlid && onSlid(active, direction);
|
|
3099
|
-
animating && onSlide && onSlide(active, direction);
|
|
3100
|
-
}, [animating]);
|
|
3101
|
-
useEffect(function () {
|
|
3102
|
-
window.addEventListener('scroll', handleScroll);
|
|
3103
|
-
return function () {
|
|
3104
|
-
window.removeEventListener('scroll', handleScroll);
|
|
3105
|
-
};
|
|
3106
|
-
});
|
|
3107
|
-
var cycle = function () {
|
|
3108
|
-
_pause();
|
|
3109
|
-
if (!wrap && active === itemsNumber - 1) {
|
|
3110
|
-
return;
|
|
3111
|
-
}
|
|
3112
|
-
if (typeof interval === 'number') {
|
|
3113
|
-
data.timeout = setTimeout(function () { return nextItemWhenVisible(); }, typeof customInterval === 'number' ? customInterval : interval);
|
|
3114
|
-
}
|
|
3115
|
-
};
|
|
3116
|
-
var _pause = function () { return pause && data.timeout && clearTimeout(data.timeout); };
|
|
3117
|
-
var nextItemWhenVisible = function () {
|
|
3118
|
-
// Don't call next when the page isn't visible
|
|
3119
|
-
// or the carousel or its parent isn't visible
|
|
3120
|
-
if (!document.hidden && carouselRef.current && isInViewport(carouselRef.current)) {
|
|
3121
|
-
if (animating) {
|
|
3122
|
-
return;
|
|
3123
|
-
}
|
|
3124
|
-
handleControlClick('next');
|
|
3125
|
-
}
|
|
3126
|
-
};
|
|
3127
|
-
var handleControlClick = function (direction) {
|
|
3128
|
-
if (animating) {
|
|
3129
|
-
return;
|
|
3130
|
-
}
|
|
3131
|
-
setDirection(direction);
|
|
3132
|
-
if (direction === 'next') {
|
|
3133
|
-
active === itemsNumber - 1 ? setActive(0) : setActive(active + 1);
|
|
3134
|
-
}
|
|
3135
|
-
else {
|
|
3136
|
-
active === 0 ? setActive(itemsNumber - 1) : setActive(active - 1);
|
|
3137
|
-
}
|
|
3138
|
-
};
|
|
3139
|
-
var handleIndicatorClick = function (index) {
|
|
3140
|
-
if (active === index) {
|
|
3141
|
-
return;
|
|
3142
|
-
}
|
|
3143
|
-
if (active < index) {
|
|
3144
|
-
setDirection('next');
|
|
3145
|
-
setActive(index);
|
|
3146
|
-
return;
|
|
3147
|
-
}
|
|
3148
|
-
if (active > index) {
|
|
3149
|
-
setDirection('prev');
|
|
3150
|
-
setActive(index);
|
|
3151
|
-
}
|
|
3152
|
-
};
|
|
3153
|
-
var handleScroll = function () {
|
|
3154
|
-
if (!document.hidden && carouselRef.current && isInViewport(carouselRef.current)) {
|
|
3155
|
-
setVisible(true);
|
|
3156
|
-
}
|
|
3157
|
-
else {
|
|
3158
|
-
setVisible(false);
|
|
3159
|
-
}
|
|
3160
|
-
};
|
|
3161
|
-
var handleTouchMove = function (e) {
|
|
3162
|
-
var touchDown = touchPosition;
|
|
3163
|
-
if (touchDown === null) {
|
|
3164
|
-
return;
|
|
3165
|
-
}
|
|
3166
|
-
var currentTouch = e.touches[0].clientX;
|
|
3167
|
-
var diff = touchDown - currentTouch;
|
|
3168
|
-
if (diff > 5) {
|
|
3169
|
-
handleControlClick('next');
|
|
3170
|
-
}
|
|
3171
|
-
if (diff < -5) {
|
|
3172
|
-
handleControlClick('prev');
|
|
3173
|
-
}
|
|
3174
|
-
setTouchPosition(null);
|
|
3175
|
-
};
|
|
3176
|
-
var handleTouchStart = function (e) {
|
|
3177
|
-
var touchDown = e.touches[0].clientX;
|
|
3178
|
-
setTouchPosition(touchDown);
|
|
3179
|
-
};
|
|
3180
|
-
return (React__default.createElement("div", __assign({ className: classNames('carousel slide', {
|
|
3181
|
-
'carousel-dark': dark,
|
|
3182
|
-
'carousel-fade': transition === 'crossfade',
|
|
3183
|
-
}, className), onMouseEnter: _pause, onMouseLeave: cycle }, (touch && { onTouchStart: handleTouchStart, onTouchMove: handleTouchMove }), rest, { ref: forkedRef }),
|
|
3184
|
-
React__default.createElement(CCarouselContext.Provider, { value: {
|
|
3185
|
-
setAnimating: setAnimating,
|
|
3186
|
-
setCustomInterval: setCustomInterval,
|
|
3187
|
-
} },
|
|
3188
|
-
indicators && (React__default.createElement("ol", { className: "carousel-indicators" }, Array.from({ length: itemsNumber }, function (_, i) { return i; }).map(function (index) {
|
|
3189
|
-
return (React__default.createElement("li", { key: "indicator".concat(index), onClick: function () {
|
|
3190
|
-
!animating && handleIndicatorClick(index);
|
|
3191
|
-
}, className: active === index ? 'active' : '', "data-coreui-target": "" }));
|
|
3192
|
-
}))),
|
|
3193
|
-
React__default.createElement("div", { className: "carousel-inner" }, Children.map(children, function (child, index) {
|
|
3194
|
-
if (React__default.isValidElement(child)) {
|
|
3195
|
-
return React__default.cloneElement(child, {
|
|
3196
|
-
active: active === index ? true : false,
|
|
3197
|
-
direction: direction,
|
|
3198
|
-
key: index,
|
|
3199
|
-
});
|
|
3200
|
-
}
|
|
3201
|
-
return;
|
|
3202
|
-
})),
|
|
3203
|
-
controls && (React__default.createElement(React__default.Fragment, null,
|
|
3204
|
-
React__default.createElement("button", { className: "carousel-control-prev", onClick: function () { return handleControlClick('prev'); } },
|
|
3205
|
-
React__default.createElement("span", { className: "carousel-control-prev-icon", "aria-label": "prev" })),
|
|
3206
|
-
React__default.createElement("button", { className: "carousel-control-next", onClick: function () { return handleControlClick('next'); } },
|
|
3207
|
-
React__default.createElement("span", { className: "carousel-control-next-icon", "aria-label": "next" })))))));
|
|
3208
|
-
});
|
|
3209
|
-
CCarousel.propTypes = {
|
|
3210
|
-
activeIndex: PropTypes.number,
|
|
3211
|
-
children: PropTypes.node,
|
|
3212
|
-
className: PropTypes.string,
|
|
3213
|
-
controls: PropTypes.bool,
|
|
3214
|
-
dark: PropTypes.bool,
|
|
3215
|
-
indicators: PropTypes.bool,
|
|
3216
|
-
interval: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
|
|
3217
|
-
onSlid: PropTypes.func,
|
|
3218
|
-
onSlide: PropTypes.func,
|
|
3219
|
-
pause: PropTypes.oneOf([false, 'hover']),
|
|
3220
|
-
touch: PropTypes.bool,
|
|
3221
|
-
transition: PropTypes.oneOf(['slide', 'crossfade']),
|
|
3222
|
-
wrap: PropTypes.bool,
|
|
3223
|
-
};
|
|
3224
|
-
CCarousel.displayName = 'CCarousel';
|
|
3225
|
-
|
|
3226
|
-
var CCarouselCaption = forwardRef(function (_a, ref) {
|
|
3227
|
-
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
3228
|
-
return React__default.createElement("div", __assign({ className: classNames('carousel-caption', className) }, rest, { ref: ref }));
|
|
3229
|
-
});
|
|
3230
|
-
CCarouselCaption.propTypes = {
|
|
3231
|
-
className: PropTypes.string,
|
|
3232
|
-
};
|
|
3233
|
-
CCarouselCaption.displayName = 'CCarouselCaption';
|
|
3234
|
-
|
|
3235
|
-
var CCarouselItem = forwardRef(function (_a, ref) {
|
|
3236
|
-
var children = _a.children, className = _a.className, active = _a.active, direction = _a.direction, _b = _a.interval, interval = _b === void 0 ? false : _b, rest = __rest(_a, ["children", "className", "active", "direction", "interval"]);
|
|
3237
|
-
var _c = useContext(CCarouselContext), setAnimating = _c.setAnimating, setCustomInterval = _c.setCustomInterval;
|
|
3238
|
-
var carouselItemRef = useRef(null);
|
|
3239
|
-
var forkedRef = useForkedRef(ref, carouselItemRef);
|
|
3240
|
-
var prevActive = useRef();
|
|
3241
|
-
var _d = useState(), directionClassName = _d[0], setDirectionClassName = _d[1];
|
|
3242
|
-
var _e = useState(), orderClassName = _e[0], setOrderClassName = _e[1];
|
|
3243
|
-
var _f = useState(active && 'active'), activeClassName = _f[0], setActiveClassName = _f[1];
|
|
3244
|
-
var _g = useState(0), count = _g[0], setCount = _g[1];
|
|
3245
|
-
useEffect(function () {
|
|
3246
|
-
if (active) {
|
|
3247
|
-
setCustomInterval(interval);
|
|
3248
|
-
if (count !== 0)
|
|
3249
|
-
setOrderClassName("carousel-item-".concat(direction));
|
|
3250
|
-
}
|
|
3251
|
-
if (prevActive.current && !active) {
|
|
3252
|
-
setActiveClassName('active');
|
|
3253
|
-
}
|
|
3254
|
-
if (active || prevActive.current) {
|
|
3255
|
-
setTimeout(function () {
|
|
3256
|
-
var _a;
|
|
3257
|
-
if (count !== 0) {
|
|
3258
|
-
// @ts-expect-error reflow is necessary to proper transition
|
|
3259
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3260
|
-
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
|
|
3261
|
-
setDirectionClassName("carousel-item-".concat(direction === 'next' ? 'start' : 'end'));
|
|
3262
|
-
}
|
|
3263
|
-
}, 0);
|
|
3264
|
-
}
|
|
3265
|
-
prevActive.current = active;
|
|
3266
|
-
if (count === 0)
|
|
3267
|
-
setCount(count + 1);
|
|
3268
|
-
}, [active]);
|
|
3269
|
-
useEffect(function () {
|
|
3270
|
-
var _a, _b;
|
|
3271
|
-
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('transitionstart', function () {
|
|
3272
|
-
active && setAnimating(true);
|
|
3273
|
-
});
|
|
3274
|
-
(_b = carouselItemRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('transitionend', function () {
|
|
3275
|
-
active && setAnimating(false);
|
|
3276
|
-
setDirectionClassName('');
|
|
3277
|
-
setOrderClassName('');
|
|
3278
|
-
if (active) {
|
|
3279
|
-
setActiveClassName('active');
|
|
3280
|
-
}
|
|
3281
|
-
if (!active) {
|
|
3282
|
-
setActiveClassName('');
|
|
3283
|
-
}
|
|
3284
|
-
});
|
|
3285
|
-
return function () {
|
|
3286
|
-
var _a, _b;
|
|
3287
|
-
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('transitionstart', function () {
|
|
3288
|
-
active && setAnimating(true);
|
|
3289
|
-
});
|
|
3290
|
-
(_b = carouselItemRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('transitionend', function () {
|
|
3291
|
-
active && setAnimating(false);
|
|
3292
|
-
setDirectionClassName('');
|
|
3293
|
-
setOrderClassName('');
|
|
3294
|
-
if (active) {
|
|
3295
|
-
setActiveClassName('active');
|
|
3296
|
-
}
|
|
3297
|
-
if (!active) {
|
|
3298
|
-
setActiveClassName('');
|
|
3299
|
-
}
|
|
3300
|
-
});
|
|
3301
|
-
};
|
|
3302
|
-
});
|
|
3303
|
-
return (React__default.createElement("div", __assign({ className: classNames('carousel-item', activeClassName, directionClassName, orderClassName, className), ref: forkedRef }, rest), children));
|
|
3304
|
-
});
|
|
3305
|
-
CCarouselItem.propTypes = {
|
|
3306
|
-
active: PropTypes.bool,
|
|
3307
|
-
children: PropTypes.node,
|
|
3308
|
-
className: PropTypes.string,
|
|
3309
|
-
direction: PropTypes.string,
|
|
3310
|
-
interval: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
|
|
3311
|
-
};
|
|
3312
|
-
CCarouselItem.displayName = 'CCarouselItem';
|
|
3313
|
-
|
|
3314
|
-
var CConditionalPortal = function (_a) {
|
|
3315
|
-
var children = _a.children, portal = _a.portal;
|
|
3316
|
-
return typeof window !== 'undefined' && portal ? (createPortal(children, document.body)) : (React__default.createElement(React__default.Fragment, null, children));
|
|
3317
|
-
};
|
|
3318
|
-
CConditionalPortal.propTypes = {
|
|
3319
|
-
children: PropTypes.node,
|
|
3320
|
-
portal: PropTypes.bool.isRequired,
|
|
3321
|
-
};
|
|
3322
|
-
CConditionalPortal.displayName = 'CConditionalPortal';
|
|
3323
|
-
|
|
3324
|
-
var ManagerReferenceNodeContext = React.createContext();
|
|
3325
|
-
var ManagerReferenceNodeSetterContext = React.createContext();
|
|
3326
|
-
function Manager(_ref) {
|
|
3327
|
-
var children = _ref.children;
|
|
3328
|
-
|
|
3329
|
-
var _React$useState = React.useState(null),
|
|
3330
|
-
referenceNode = _React$useState[0],
|
|
3331
|
-
setReferenceNode = _React$useState[1];
|
|
3332
|
-
|
|
3333
|
-
var hasUnmounted = React.useRef(false);
|
|
3334
|
-
React.useEffect(function () {
|
|
3335
|
-
return function () {
|
|
3336
|
-
hasUnmounted.current = true;
|
|
3337
|
-
};
|
|
3338
|
-
}, []);
|
|
3339
|
-
var handleSetReferenceNode = React.useCallback(function (node) {
|
|
3340
|
-
if (!hasUnmounted.current) {
|
|
3341
|
-
setReferenceNode(node);
|
|
3342
|
-
}
|
|
3343
|
-
}, []);
|
|
3344
|
-
return /*#__PURE__*/React.createElement(ManagerReferenceNodeContext.Provider, {
|
|
3345
|
-
value: referenceNode
|
|
3346
|
-
}, /*#__PURE__*/React.createElement(ManagerReferenceNodeSetterContext.Provider, {
|
|
3347
|
-
value: handleSetReferenceNode
|
|
3348
|
-
}, children));
|
|
3349
|
-
}
|
|
3350
|
-
|
|
3351
|
-
/**
|
|
3352
|
-
* Takes an argument and if it's an array, returns the first item in the array,
|
|
3353
|
-
* otherwise returns the argument. Used for Preact compatibility.
|
|
3354
|
-
*/
|
|
3355
|
-
var unwrapArray = function unwrapArray(arg) {
|
|
3356
|
-
return Array.isArray(arg) ? arg[0] : arg;
|
|
3357
|
-
};
|
|
3358
|
-
/**
|
|
3359
|
-
* Takes a maybe-undefined function and arbitrary args and invokes the function
|
|
3360
|
-
* only if it is defined.
|
|
3361
|
-
*/
|
|
3362
|
-
|
|
3363
|
-
var safeInvoke = function safeInvoke(fn) {
|
|
3364
|
-
if (typeof fn === 'function') {
|
|
3365
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3366
|
-
args[_key - 1] = arguments[_key];
|
|
3367
|
-
}
|
|
3368
|
-
|
|
3369
|
-
return fn.apply(void 0, args);
|
|
3370
|
-
}
|
|
3371
|
-
};
|
|
3372
|
-
/**
|
|
3373
|
-
* Sets a ref using either a ref callback or a ref object
|
|
3374
|
-
*/
|
|
3375
|
-
|
|
3376
|
-
var setRef = function setRef(ref, node) {
|
|
3377
|
-
// if its a function call it
|
|
3378
|
-
if (typeof ref === 'function') {
|
|
3379
|
-
return safeInvoke(ref, node);
|
|
3380
|
-
} // otherwise we should treat it as a ref object
|
|
3381
|
-
else if (ref != null) {
|
|
3382
|
-
ref.current = node;
|
|
3383
|
-
}
|
|
3384
|
-
};
|
|
3385
|
-
/**
|
|
3386
|
-
* Simple ponyfill for Object.fromEntries
|
|
3387
|
-
*/
|
|
3388
|
-
|
|
3389
|
-
var fromEntries = function fromEntries(entries) {
|
|
3390
|
-
return entries.reduce(function (acc, _ref) {
|
|
3391
|
-
var key = _ref[0],
|
|
3392
|
-
value = _ref[1];
|
|
3393
|
-
acc[key] = value;
|
|
3394
|
-
return acc;
|
|
3395
|
-
}, {});
|
|
3396
|
-
};
|
|
3397
|
-
/**
|
|
3398
|
-
* Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs
|
|
3399
|
-
*/
|
|
3400
|
-
|
|
3401
|
-
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React.useLayoutEffect : React.useEffect;
|
|
3402
|
-
|
|
3403
|
-
var top = 'top';
|
|
3404
|
-
var bottom = 'bottom';
|
|
3405
|
-
var right = 'right';
|
|
3406
|
-
var left = 'left';
|
|
3407
|
-
var auto = 'auto';
|
|
3408
|
-
var basePlacements = [top, bottom, right, left];
|
|
3409
|
-
var start = 'start';
|
|
3410
|
-
var end = 'end';
|
|
3411
|
-
var clippingParents = 'clippingParents';
|
|
3412
|
-
var viewport = 'viewport';
|
|
3413
|
-
var popper = 'popper';
|
|
3414
|
-
var reference = 'reference';
|
|
3415
|
-
var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
|
|
3416
|
-
return acc.concat([placement + "-" + start, placement + "-" + end]);
|
|
3417
|
-
}, []);
|
|
3418
|
-
var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
|
|
3419
|
-
return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
|
|
3420
|
-
}, []); // modifiers that need to read the DOM
|
|
3421
|
-
|
|
3422
|
-
var beforeRead = 'beforeRead';
|
|
3423
|
-
var read = 'read';
|
|
3424
|
-
var afterRead = 'afterRead'; // pure-logic modifiers
|
|
3425
|
-
|
|
3426
|
-
var beforeMain = 'beforeMain';
|
|
3427
|
-
var main = 'main';
|
|
3428
|
-
var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
|
|
3429
|
-
|
|
3430
|
-
var beforeWrite = 'beforeWrite';
|
|
3431
|
-
var write = 'write';
|
|
3432
|
-
var afterWrite = 'afterWrite';
|
|
3433
|
-
var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
|
|
3434
|
-
|
|
3435
|
-
function getNodeName(element) {
|
|
3436
|
-
return element ? (element.nodeName || '').toLowerCase() : null;
|
|
3437
|
-
}
|
|
3438
|
-
|
|
3439
|
-
function getWindow(node) {
|
|
3440
|
-
if (node == null) {
|
|
3441
|
-
return window;
|
|
3442
|
-
}
|
|
3443
|
-
|
|
3444
|
-
if (node.toString() !== '[object Window]') {
|
|
3445
|
-
var ownerDocument = node.ownerDocument;
|
|
3446
|
-
return ownerDocument ? ownerDocument.defaultView || window : window;
|
|
3447
|
-
}
|
|
3448
|
-
|
|
3449
|
-
return node;
|
|
3450
|
-
}
|
|
3451
|
-
|
|
3452
|
-
function isElement(node) {
|
|
3453
|
-
var OwnElement = getWindow(node).Element;
|
|
3454
|
-
return node instanceof OwnElement || node instanceof Element;
|
|
3455
|
-
}
|
|
3456
|
-
|
|
3457
|
-
function isHTMLElement(node) {
|
|
3458
|
-
var OwnElement = getWindow(node).HTMLElement;
|
|
3459
|
-
return node instanceof OwnElement || node instanceof HTMLElement;
|
|
3460
|
-
}
|
|
3461
|
-
|
|
3462
|
-
function isShadowRoot(node) {
|
|
3463
|
-
// IE 11 has no ShadowRoot
|
|
3464
|
-
if (typeof ShadowRoot === 'undefined') {
|
|
3465
|
-
return false;
|
|
3466
|
-
}
|
|
3467
|
-
|
|
3468
|
-
var OwnElement = getWindow(node).ShadowRoot;
|
|
3469
|
-
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
3470
|
-
}
|
|
3471
|
-
|
|
3472
|
-
// and applies them to the HTMLElements such as popper and arrow
|
|
3473
|
-
|
|
3474
|
-
function applyStyles(_ref) {
|
|
3475
|
-
var state = _ref.state;
|
|
3476
|
-
Object.keys(state.elements).forEach(function (name) {
|
|
3477
|
-
var style = state.styles[name] || {};
|
|
3478
|
-
var attributes = state.attributes[name] || {};
|
|
3479
|
-
var element = state.elements[name]; // arrow is optional + virtual elements
|
|
3480
|
-
|
|
3481
|
-
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
3482
|
-
return;
|
|
3483
|
-
} // Flow doesn't support to extend this property, but it's the most
|
|
3484
|
-
// effective way to apply styles to an HTMLElement
|
|
3485
|
-
// $FlowFixMe[cannot-write]
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
Object.assign(element.style, style);
|
|
3489
|
-
Object.keys(attributes).forEach(function (name) {
|
|
3490
|
-
var value = attributes[name];
|
|
3491
|
-
|
|
3492
|
-
if (value === false) {
|
|
3493
|
-
element.removeAttribute(name);
|
|
3494
|
-
} else {
|
|
3495
|
-
element.setAttribute(name, value === true ? '' : value);
|
|
3496
|
-
}
|
|
3497
|
-
});
|
|
3498
|
-
});
|
|
3499
|
-
}
|
|
3500
|
-
|
|
3501
|
-
function effect$2(_ref2) {
|
|
3502
|
-
var state = _ref2.state;
|
|
3503
|
-
var initialStyles = {
|
|
3504
|
-
popper: {
|
|
3505
|
-
position: state.options.strategy,
|
|
3506
|
-
left: '0',
|
|
3507
|
-
top: '0',
|
|
3508
|
-
margin: '0'
|
|
3509
|
-
},
|
|
3510
|
-
arrow: {
|
|
3511
|
-
position: 'absolute'
|
|
3512
|
-
},
|
|
3513
|
-
reference: {}
|
|
3514
|
-
};
|
|
3515
|
-
Object.assign(state.elements.popper.style, initialStyles.popper);
|
|
3516
|
-
state.styles = initialStyles;
|
|
3517
|
-
|
|
3518
|
-
if (state.elements.arrow) {
|
|
3519
|
-
Object.assign(state.elements.arrow.style, initialStyles.arrow);
|
|
3520
|
-
}
|
|
3521
|
-
|
|
3522
|
-
return function () {
|
|
3523
|
-
Object.keys(state.elements).forEach(function (name) {
|
|
3524
|
-
var element = state.elements[name];
|
|
3525
|
-
var attributes = state.attributes[name] || {};
|
|
3526
|
-
var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
|
|
3527
|
-
|
|
3528
|
-
var style = styleProperties.reduce(function (style, property) {
|
|
3529
|
-
style[property] = '';
|
|
3530
|
-
return style;
|
|
3531
|
-
}, {}); // arrow is optional + virtual elements
|
|
3532
|
-
|
|
3533
|
-
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
3534
|
-
return;
|
|
3535
|
-
}
|
|
2699
|
+
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
2700
|
+
return;
|
|
2701
|
+
}
|
|
3536
2702
|
|
|
3537
2703
|
Object.assign(element.style, style);
|
|
3538
2704
|
Object.keys(attributes).forEach(function (attribute) {
|
|
@@ -5004,603 +4170,1025 @@ var DEFAULT_OPTIONS = {
|
|
|
5004
4170
|
strategy: 'absolute'
|
|
5005
4171
|
};
|
|
5006
4172
|
|
|
5007
|
-
function areValidElements() {
|
|
5008
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5009
|
-
args[_key] = arguments[_key];
|
|
5010
|
-
}
|
|
5011
|
-
|
|
5012
|
-
return !args.some(function (element) {
|
|
5013
|
-
return !(element && typeof element.getBoundingClientRect === 'function');
|
|
5014
|
-
});
|
|
5015
|
-
}
|
|
5016
|
-
|
|
5017
|
-
function popperGenerator(generatorOptions) {
|
|
5018
|
-
if (generatorOptions === void 0) {
|
|
5019
|
-
generatorOptions = {};
|
|
5020
|
-
}
|
|
5021
|
-
|
|
5022
|
-
var _generatorOptions = generatorOptions,
|
|
5023
|
-
_generatorOptions$def = _generatorOptions.defaultModifiers,
|
|
5024
|
-
defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
|
|
5025
|
-
_generatorOptions$def2 = _generatorOptions.defaultOptions,
|
|
5026
|
-
defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
|
|
5027
|
-
return function createPopper(reference, popper, options) {
|
|
5028
|
-
if (options === void 0) {
|
|
5029
|
-
options = defaultOptions;
|
|
5030
|
-
}
|
|
4173
|
+
function areValidElements() {
|
|
4174
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4175
|
+
args[_key] = arguments[_key];
|
|
4176
|
+
}
|
|
4177
|
+
|
|
4178
|
+
return !args.some(function (element) {
|
|
4179
|
+
return !(element && typeof element.getBoundingClientRect === 'function');
|
|
4180
|
+
});
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
function popperGenerator(generatorOptions) {
|
|
4184
|
+
if (generatorOptions === void 0) {
|
|
4185
|
+
generatorOptions = {};
|
|
4186
|
+
}
|
|
4187
|
+
|
|
4188
|
+
var _generatorOptions = generatorOptions,
|
|
4189
|
+
_generatorOptions$def = _generatorOptions.defaultModifiers,
|
|
4190
|
+
defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
|
|
4191
|
+
_generatorOptions$def2 = _generatorOptions.defaultOptions,
|
|
4192
|
+
defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
|
|
4193
|
+
return function createPopper(reference, popper, options) {
|
|
4194
|
+
if (options === void 0) {
|
|
4195
|
+
options = defaultOptions;
|
|
4196
|
+
}
|
|
4197
|
+
|
|
4198
|
+
var state = {
|
|
4199
|
+
placement: 'bottom',
|
|
4200
|
+
orderedModifiers: [],
|
|
4201
|
+
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
|
|
4202
|
+
modifiersData: {},
|
|
4203
|
+
elements: {
|
|
4204
|
+
reference: reference,
|
|
4205
|
+
popper: popper
|
|
4206
|
+
},
|
|
4207
|
+
attributes: {},
|
|
4208
|
+
styles: {}
|
|
4209
|
+
};
|
|
4210
|
+
var effectCleanupFns = [];
|
|
4211
|
+
var isDestroyed = false;
|
|
4212
|
+
var instance = {
|
|
4213
|
+
state: state,
|
|
4214
|
+
setOptions: function setOptions(setOptionsAction) {
|
|
4215
|
+
var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
|
|
4216
|
+
cleanupModifierEffects();
|
|
4217
|
+
state.options = Object.assign({}, defaultOptions, state.options, options);
|
|
4218
|
+
state.scrollParents = {
|
|
4219
|
+
reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
|
|
4220
|
+
popper: listScrollParents(popper)
|
|
4221
|
+
}; // Orders the modifiers based on their dependencies and `phase`
|
|
4222
|
+
// properties
|
|
4223
|
+
|
|
4224
|
+
var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
|
|
4225
|
+
|
|
4226
|
+
state.orderedModifiers = orderedModifiers.filter(function (m) {
|
|
4227
|
+
return m.enabled;
|
|
4228
|
+
});
|
|
4229
|
+
runModifierEffects();
|
|
4230
|
+
return instance.update();
|
|
4231
|
+
},
|
|
4232
|
+
// Sync update – it will always be executed, even if not necessary. This
|
|
4233
|
+
// is useful for low frequency updates where sync behavior simplifies the
|
|
4234
|
+
// logic.
|
|
4235
|
+
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
4236
|
+
// prefer the async Popper#update method
|
|
4237
|
+
forceUpdate: function forceUpdate() {
|
|
4238
|
+
if (isDestroyed) {
|
|
4239
|
+
return;
|
|
4240
|
+
}
|
|
4241
|
+
|
|
4242
|
+
var _state$elements = state.elements,
|
|
4243
|
+
reference = _state$elements.reference,
|
|
4244
|
+
popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
|
|
4245
|
+
// anymore
|
|
4246
|
+
|
|
4247
|
+
if (!areValidElements(reference, popper)) {
|
|
4248
|
+
return;
|
|
4249
|
+
} // Store the reference and popper rects to be read by modifiers
|
|
4250
|
+
|
|
4251
|
+
|
|
4252
|
+
state.rects = {
|
|
4253
|
+
reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
|
|
4254
|
+
popper: getLayoutRect(popper)
|
|
4255
|
+
}; // Modifiers have the ability to reset the current update cycle. The
|
|
4256
|
+
// most common use case for this is the `flip` modifier changing the
|
|
4257
|
+
// placement, which then needs to re-run all the modifiers, because the
|
|
4258
|
+
// logic was previously ran for the previous placement and is therefore
|
|
4259
|
+
// stale/incorrect
|
|
4260
|
+
|
|
4261
|
+
state.reset = false;
|
|
4262
|
+
state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
|
|
4263
|
+
// is filled with the initial data specified by the modifier. This means
|
|
4264
|
+
// it doesn't persist and is fresh on each update.
|
|
4265
|
+
// To ensure persistent data, use `${name}#persistent`
|
|
4266
|
+
|
|
4267
|
+
state.orderedModifiers.forEach(function (modifier) {
|
|
4268
|
+
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
|
|
4269
|
+
});
|
|
4270
|
+
|
|
4271
|
+
for (var index = 0; index < state.orderedModifiers.length; index++) {
|
|
4272
|
+
if (state.reset === true) {
|
|
4273
|
+
state.reset = false;
|
|
4274
|
+
index = -1;
|
|
4275
|
+
continue;
|
|
4276
|
+
}
|
|
4277
|
+
|
|
4278
|
+
var _state$orderedModifie = state.orderedModifiers[index],
|
|
4279
|
+
fn = _state$orderedModifie.fn,
|
|
4280
|
+
_state$orderedModifie2 = _state$orderedModifie.options,
|
|
4281
|
+
_options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
|
|
4282
|
+
name = _state$orderedModifie.name;
|
|
4283
|
+
|
|
4284
|
+
if (typeof fn === 'function') {
|
|
4285
|
+
state = fn({
|
|
4286
|
+
state: state,
|
|
4287
|
+
options: _options,
|
|
4288
|
+
name: name,
|
|
4289
|
+
instance: instance
|
|
4290
|
+
}) || state;
|
|
4291
|
+
}
|
|
4292
|
+
}
|
|
4293
|
+
},
|
|
4294
|
+
// Async and optimistically optimized update – it will not be executed if
|
|
4295
|
+
// not necessary (debounced to run at most once-per-tick)
|
|
4296
|
+
update: debounce(function () {
|
|
4297
|
+
return new Promise(function (resolve) {
|
|
4298
|
+
instance.forceUpdate();
|
|
4299
|
+
resolve(state);
|
|
4300
|
+
});
|
|
4301
|
+
}),
|
|
4302
|
+
destroy: function destroy() {
|
|
4303
|
+
cleanupModifierEffects();
|
|
4304
|
+
isDestroyed = true;
|
|
4305
|
+
}
|
|
4306
|
+
};
|
|
4307
|
+
|
|
4308
|
+
if (!areValidElements(reference, popper)) {
|
|
4309
|
+
return instance;
|
|
4310
|
+
}
|
|
4311
|
+
|
|
4312
|
+
instance.setOptions(options).then(function (state) {
|
|
4313
|
+
if (!isDestroyed && options.onFirstUpdate) {
|
|
4314
|
+
options.onFirstUpdate(state);
|
|
4315
|
+
}
|
|
4316
|
+
}); // Modifiers have the ability to execute arbitrary code before the first
|
|
4317
|
+
// update cycle runs. They will be executed in the same order as the update
|
|
4318
|
+
// cycle. This is useful when a modifier adds some persistent data that
|
|
4319
|
+
// other modifiers need to use, but the modifier is run after the dependent
|
|
4320
|
+
// one.
|
|
4321
|
+
|
|
4322
|
+
function runModifierEffects() {
|
|
4323
|
+
state.orderedModifiers.forEach(function (_ref) {
|
|
4324
|
+
var name = _ref.name,
|
|
4325
|
+
_ref$options = _ref.options,
|
|
4326
|
+
options = _ref$options === void 0 ? {} : _ref$options,
|
|
4327
|
+
effect = _ref.effect;
|
|
4328
|
+
|
|
4329
|
+
if (typeof effect === 'function') {
|
|
4330
|
+
var cleanupFn = effect({
|
|
4331
|
+
state: state,
|
|
4332
|
+
name: name,
|
|
4333
|
+
instance: instance,
|
|
4334
|
+
options: options
|
|
4335
|
+
});
|
|
4336
|
+
|
|
4337
|
+
var noopFn = function noopFn() {};
|
|
4338
|
+
|
|
4339
|
+
effectCleanupFns.push(cleanupFn || noopFn);
|
|
4340
|
+
}
|
|
4341
|
+
});
|
|
4342
|
+
}
|
|
4343
|
+
|
|
4344
|
+
function cleanupModifierEffects() {
|
|
4345
|
+
effectCleanupFns.forEach(function (fn) {
|
|
4346
|
+
return fn();
|
|
4347
|
+
});
|
|
4348
|
+
effectCleanupFns = [];
|
|
4349
|
+
}
|
|
4350
|
+
|
|
4351
|
+
return instance;
|
|
4352
|
+
};
|
|
4353
|
+
}
|
|
4354
|
+
|
|
4355
|
+
var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
|
|
4356
|
+
var createPopper = /*#__PURE__*/popperGenerator({
|
|
4357
|
+
defaultModifiers: defaultModifiers
|
|
4358
|
+
}); // eslint-disable-next-line import/no-unused-modules
|
|
4359
|
+
|
|
4360
|
+
var usePopper = function () {
|
|
4361
|
+
var _popper = useRef();
|
|
4362
|
+
var initPopper = function (reference, popper, options) {
|
|
4363
|
+
_popper.current = createPopper(reference, popper, options);
|
|
4364
|
+
};
|
|
4365
|
+
var destroyPopper = function () {
|
|
4366
|
+
if (_popper.current) {
|
|
4367
|
+
_popper.current.destroy();
|
|
4368
|
+
}
|
|
4369
|
+
_popper.current = undefined;
|
|
4370
|
+
};
|
|
4371
|
+
return {
|
|
4372
|
+
popper: _popper.current,
|
|
4373
|
+
initPopper: initPopper,
|
|
4374
|
+
destroyPopper: destroyPopper,
|
|
4375
|
+
};
|
|
4376
|
+
};
|
|
4377
|
+
|
|
4378
|
+
var CCollapse = forwardRef(function (_a, ref) {
|
|
4379
|
+
var children = _a.children, className = _a.className, horizontal = _a.horizontal, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest(_a, ["children", "className", "horizontal", "onHide", "onShow", "visible"]);
|
|
4380
|
+
var collapseRef = useRef(null);
|
|
4381
|
+
var forkedRef = useForkedRef(ref, collapseRef);
|
|
4382
|
+
var _b = useState(), height = _b[0], setHeight = _b[1];
|
|
4383
|
+
var _c = useState(), width = _c[0], setWidth = _c[1];
|
|
4384
|
+
var onEntering = function () {
|
|
4385
|
+
onShow && onShow();
|
|
4386
|
+
if (horizontal) {
|
|
4387
|
+
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
4388
|
+
return;
|
|
4389
|
+
}
|
|
4390
|
+
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
4391
|
+
};
|
|
4392
|
+
var onEntered = function () {
|
|
4393
|
+
if (horizontal) {
|
|
4394
|
+
setWidth(0);
|
|
4395
|
+
return;
|
|
4396
|
+
}
|
|
4397
|
+
setHeight(0);
|
|
4398
|
+
};
|
|
4399
|
+
var onExit = function () {
|
|
4400
|
+
if (horizontal) {
|
|
4401
|
+
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
4402
|
+
return;
|
|
4403
|
+
}
|
|
4404
|
+
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
4405
|
+
};
|
|
4406
|
+
var onExiting = function () {
|
|
4407
|
+
onHide && onHide();
|
|
4408
|
+
if (horizontal) {
|
|
4409
|
+
setWidth(0);
|
|
4410
|
+
return;
|
|
4411
|
+
}
|
|
4412
|
+
setHeight(0);
|
|
4413
|
+
};
|
|
4414
|
+
var onExited = function () {
|
|
4415
|
+
if (horizontal) {
|
|
4416
|
+
setWidth(0);
|
|
4417
|
+
return;
|
|
4418
|
+
}
|
|
4419
|
+
setHeight(0);
|
|
4420
|
+
};
|
|
4421
|
+
return (React.createElement(CSSTransition$1, { in: visible, nodeRef: collapseRef, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 350 }, function (state) {
|
|
4422
|
+
var currentHeight = height === 0 ? null : { height: height };
|
|
4423
|
+
var currentWidth = width === 0 ? null : { width: width };
|
|
4424
|
+
return (React.createElement("div", __assign({ className: classNames(className, {
|
|
4425
|
+
'collapse-horizontal': horizontal,
|
|
4426
|
+
collapsing: state === 'entering' || state === 'exiting',
|
|
4427
|
+
'collapse show': state === 'entered',
|
|
4428
|
+
collapse: state === 'exited',
|
|
4429
|
+
}), style: __assign(__assign({}, currentHeight), currentWidth) }, rest, { ref: forkedRef }), children));
|
|
4430
|
+
}));
|
|
4431
|
+
});
|
|
4432
|
+
CCollapse.propTypes = {
|
|
4433
|
+
children: PropTypes.node,
|
|
4434
|
+
className: PropTypes.string,
|
|
4435
|
+
horizontal: PropTypes.bool,
|
|
4436
|
+
onHide: PropTypes.func,
|
|
4437
|
+
onShow: PropTypes.func,
|
|
4438
|
+
visible: PropTypes.bool,
|
|
4439
|
+
};
|
|
4440
|
+
CCollapse.displayName = 'CCollapse';
|
|
4441
|
+
|
|
4442
|
+
var CAccordionBody = forwardRef(function (_a, ref) {
|
|
4443
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
4444
|
+
var visible = useContext(CAccordionItemContext).visible;
|
|
4445
|
+
return (React.createElement(CCollapse, { className: "accordion-collapse", visible: visible },
|
|
4446
|
+
React.createElement("div", __assign({ className: classNames('accordion-body', className) }, rest, { ref: ref }), children)));
|
|
4447
|
+
});
|
|
4448
|
+
CAccordionBody.propTypes = {
|
|
4449
|
+
children: PropTypes.node,
|
|
4450
|
+
className: PropTypes.string,
|
|
4451
|
+
};
|
|
4452
|
+
CAccordionBody.displayName = 'CAccordionBody';
|
|
5031
4453
|
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
styles: {}
|
|
5043
|
-
};
|
|
5044
|
-
var effectCleanupFns = [];
|
|
5045
|
-
var isDestroyed = false;
|
|
5046
|
-
var instance = {
|
|
5047
|
-
state: state,
|
|
5048
|
-
setOptions: function setOptions(setOptionsAction) {
|
|
5049
|
-
var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
|
|
5050
|
-
cleanupModifierEffects();
|
|
5051
|
-
state.options = Object.assign({}, defaultOptions, state.options, options);
|
|
5052
|
-
state.scrollParents = {
|
|
5053
|
-
reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
|
|
5054
|
-
popper: listScrollParents(popper)
|
|
5055
|
-
}; // Orders the modifiers based on their dependencies and `phase`
|
|
5056
|
-
// properties
|
|
4454
|
+
var CAccordionButton = forwardRef(function (_a, ref) {
|
|
4455
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
4456
|
+
var _b = useContext(CAccordionItemContext), visible = _b.visible, setVisible = _b.setVisible;
|
|
4457
|
+
return (React.createElement("button", __assign({ type: "button", className: classNames('accordion-button', { collapsed: !visible }, className), "aria-expanded": !visible, onClick: function () { return setVisible(!visible); } }, rest, { ref: ref }), children));
|
|
4458
|
+
});
|
|
4459
|
+
CAccordionButton.propTypes = {
|
|
4460
|
+
children: PropTypes.node,
|
|
4461
|
+
className: PropTypes.string,
|
|
4462
|
+
};
|
|
4463
|
+
CAccordionButton.displayName = 'CAccordionButton';
|
|
5057
4464
|
|
|
5058
|
-
|
|
4465
|
+
var CAccordionHeader = forwardRef(function (_a, ref) {
|
|
4466
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
4467
|
+
return (React.createElement("div", __assign({ className: classNames('accordion-header', className) }, rest, { ref: ref }),
|
|
4468
|
+
React.createElement(CAccordionButton, null, children)));
|
|
4469
|
+
});
|
|
4470
|
+
CAccordionHeader.propTypes = {
|
|
4471
|
+
children: PropTypes.node,
|
|
4472
|
+
className: PropTypes.string,
|
|
4473
|
+
};
|
|
4474
|
+
CAccordionHeader.displayName = 'CAccordionHeader';
|
|
5059
4475
|
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
if (isDestroyed) {
|
|
5073
|
-
return;
|
|
5074
|
-
}
|
|
4476
|
+
var CCloseButton = forwardRef(function (_a, ref) {
|
|
4477
|
+
var className = _a.className, disabled = _a.disabled, white = _a.white, rest = __rest(_a, ["className", "disabled", "white"]);
|
|
4478
|
+
return (React.createElement("button", __assign({ type: "button", className: classNames('btn', 'btn-close', {
|
|
4479
|
+
'btn-close-white': white,
|
|
4480
|
+
}, disabled, className), "aria-label": "Close", disabled: disabled }, rest, { ref: ref })));
|
|
4481
|
+
});
|
|
4482
|
+
CCloseButton.propTypes = {
|
|
4483
|
+
className: PropTypes.string,
|
|
4484
|
+
disabled: PropTypes.bool,
|
|
4485
|
+
white: PropTypes.bool,
|
|
4486
|
+
};
|
|
4487
|
+
CCloseButton.displayName = 'CCloseButton';
|
|
5075
4488
|
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
4489
|
+
var colorPropType = PropTypes.oneOfType([
|
|
4490
|
+
PropTypes.oneOf([
|
|
4491
|
+
'primary',
|
|
4492
|
+
'secondary',
|
|
4493
|
+
'success',
|
|
4494
|
+
'danger',
|
|
4495
|
+
'warning',
|
|
4496
|
+
'info',
|
|
4497
|
+
'dark',
|
|
4498
|
+
'light',
|
|
4499
|
+
]),
|
|
4500
|
+
PropTypes.string,
|
|
4501
|
+
]);
|
|
4502
|
+
var fallbackPlacementsPropType = PropTypes.oneOfType([
|
|
4503
|
+
PropTypes.arrayOf(PropTypes.oneOf(['top', 'bottom', 'right', 'left']).isRequired),
|
|
4504
|
+
PropTypes.oneOf(['top', 'bottom', 'right', 'left']),
|
|
4505
|
+
]);
|
|
4506
|
+
var placementPropType = PropTypes.oneOf([
|
|
4507
|
+
'auto',
|
|
4508
|
+
'auto-start',
|
|
4509
|
+
'auto-end',
|
|
4510
|
+
'top-end',
|
|
4511
|
+
'top',
|
|
4512
|
+
'top-start',
|
|
4513
|
+
'bottom-end',
|
|
4514
|
+
'bottom',
|
|
4515
|
+
'bottom-start',
|
|
4516
|
+
'right-start',
|
|
4517
|
+
'right',
|
|
4518
|
+
'right-end',
|
|
4519
|
+
'left-start',
|
|
4520
|
+
'left',
|
|
4521
|
+
'left-end',
|
|
4522
|
+
]);
|
|
4523
|
+
var shapePropType = PropTypes.oneOfType([
|
|
4524
|
+
PropTypes.oneOf([
|
|
4525
|
+
'rounded',
|
|
4526
|
+
'rounded-top',
|
|
4527
|
+
'rounded-end',
|
|
4528
|
+
'rounded-bottom',
|
|
4529
|
+
'rounded-start',
|
|
4530
|
+
'rounded-circle',
|
|
4531
|
+
'rounded-pill',
|
|
4532
|
+
'rounded-0',
|
|
4533
|
+
'rounded-1',
|
|
4534
|
+
'rounded-2',
|
|
4535
|
+
'rounded-3',
|
|
4536
|
+
]),
|
|
4537
|
+
PropTypes.string,
|
|
4538
|
+
]);
|
|
4539
|
+
var textColorsPropType = PropTypes.oneOfType([
|
|
4540
|
+
colorPropType,
|
|
4541
|
+
PropTypes.oneOf(['white', 'muted']),
|
|
4542
|
+
PropTypes.string,
|
|
4543
|
+
]);
|
|
4544
|
+
var triggerPropType = PropTypes.oneOfType([
|
|
4545
|
+
PropTypes.arrayOf(PropTypes.oneOf(['hover', 'focus', 'click']).isRequired),
|
|
4546
|
+
PropTypes.oneOf(['hover', 'focus', 'click']),
|
|
4547
|
+
]);
|
|
5080
4548
|
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
4549
|
+
var CAlert = forwardRef(function (_a, ref) {
|
|
4550
|
+
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"]);
|
|
4551
|
+
var alertRef = useRef(null);
|
|
4552
|
+
var forkedRef = useForkedRef(ref, alertRef);
|
|
4553
|
+
var _d = useState(visible), _visible = _d[0], setVisible = _d[1];
|
|
4554
|
+
useEffect(function () {
|
|
4555
|
+
setVisible(visible);
|
|
4556
|
+
}, [visible]);
|
|
4557
|
+
return (React.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: alertRef, onExit: onClose, timeout: 150, unmountOnExit: true }, function (state) { return (React.createElement("div", __assign({ className: classNames('alert', variant === 'solid' ? "bg-".concat(color, " text-white") : "alert-".concat(color), {
|
|
4558
|
+
'alert-dismissible fade': dismissible,
|
|
4559
|
+
show: state === 'entered',
|
|
4560
|
+
}, className), role: "alert" }, rest, { ref: forkedRef }),
|
|
4561
|
+
children,
|
|
4562
|
+
dismissible && React.createElement(CCloseButton, { onClick: function () { return setVisible(false); } }))); }));
|
|
4563
|
+
});
|
|
4564
|
+
CAlert.propTypes = {
|
|
4565
|
+
children: PropTypes.node,
|
|
4566
|
+
className: PropTypes.string,
|
|
4567
|
+
color: colorPropType.isRequired,
|
|
4568
|
+
dismissible: PropTypes.bool,
|
|
4569
|
+
onClose: PropTypes.func,
|
|
4570
|
+
variant: PropTypes.string,
|
|
4571
|
+
visible: PropTypes.bool,
|
|
4572
|
+
};
|
|
4573
|
+
CAlert.displayName = 'CAlert';
|
|
5084
4574
|
|
|
4575
|
+
var CAlertHeading = forwardRef(function (_a, ref) {
|
|
4576
|
+
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'h4' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
4577
|
+
return (React.createElement(Component, __assign({ className: classNames('alert-heading', className) }, rest, { ref: ref }), children));
|
|
4578
|
+
});
|
|
4579
|
+
CAlertHeading.propTypes = {
|
|
4580
|
+
children: PropTypes.node,
|
|
4581
|
+
className: PropTypes.string,
|
|
4582
|
+
component: PropTypes.elementType,
|
|
4583
|
+
};
|
|
4584
|
+
CAlertHeading.displayName = 'CAlertHeading';
|
|
5085
4585
|
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
//
|
|
5092
|
-
|
|
5093
|
-
|
|
4586
|
+
var CLink = forwardRef(function (_a, ref) {
|
|
4587
|
+
var children = _a.children, active = _a.active, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'a' : _b, disabled = _a.disabled, rest = __rest(_a, ["children", "active", "className", "component", "disabled"]);
|
|
4588
|
+
return (React.createElement(Component
|
|
4589
|
+
// TODO: remove duplicated classes ex. `active active` in `<CListGroupItem>`
|
|
4590
|
+
, __assign({
|
|
4591
|
+
// TODO: remove duplicated classes ex. `active active` in `<CListGroupItem>`
|
|
4592
|
+
className: classNames(className, { active: active, disabled: disabled }) }, (active && { 'aria-current': 'page' }), (Component === 'a' && disabled && { 'aria-disabled': true, tabIndex: -1 }), ((Component === 'a' || Component === 'button') && {
|
|
4593
|
+
onClick: function (event) {
|
|
4594
|
+
event.preventDefault;
|
|
4595
|
+
!disabled && rest.onClick && rest.onClick(event);
|
|
4596
|
+
},
|
|
4597
|
+
}), { disabled: disabled }, rest, { ref: ref }), children));
|
|
4598
|
+
});
|
|
4599
|
+
CLink.propTypes = {
|
|
4600
|
+
active: PropTypes.bool,
|
|
4601
|
+
children: PropTypes.node,
|
|
4602
|
+
className: PropTypes.string,
|
|
4603
|
+
component: PropTypes.elementType,
|
|
4604
|
+
disabled: PropTypes.bool,
|
|
4605
|
+
};
|
|
4606
|
+
CLink.displayName = 'CLink';
|
|
5094
4607
|
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
4608
|
+
var CAlertLink = forwardRef(function (_a, ref) {
|
|
4609
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
4610
|
+
return (React.createElement(CLink, __assign({ className: classNames('alert-link', className) }, rest, { ref: ref }), children));
|
|
4611
|
+
});
|
|
4612
|
+
CAlertLink.propTypes = {
|
|
4613
|
+
children: PropTypes.node,
|
|
4614
|
+
className: PropTypes.string,
|
|
4615
|
+
};
|
|
4616
|
+
CAlertLink.displayName = 'CAlertLink';
|
|
5100
4617
|
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
4618
|
+
var CAvatar = forwardRef(function (_a, ref) {
|
|
4619
|
+
var _b;
|
|
4620
|
+
var children = _a.children, className = _a.className, color = _a.color, shape = _a.shape, size = _a.size, src = _a.src, status = _a.status, textColor = _a.textColor, rest = __rest(_a, ["children", "className", "color", "shape", "size", "src", "status", "textColor"]);
|
|
4621
|
+
var statusClassName = status && classNames('avatar-status', "bg-".concat(status));
|
|
4622
|
+
return (React.createElement("div", __assign({ className: classNames('avatar', (_b = {},
|
|
4623
|
+
_b["bg-".concat(color)] = color,
|
|
4624
|
+
_b["avatar-".concat(size)] = size,
|
|
4625
|
+
_b["text-".concat(textColor)] = textColor,
|
|
4626
|
+
_b), shape, className) }, rest, { ref: ref }),
|
|
4627
|
+
src ? React.createElement("img", { src: src, className: "avatar-img" }) : children,
|
|
4628
|
+
status && React.createElement("span", { className: statusClassName })));
|
|
4629
|
+
});
|
|
4630
|
+
CAvatar.propTypes = {
|
|
4631
|
+
children: PropTypes.node,
|
|
4632
|
+
className: PropTypes.string,
|
|
4633
|
+
color: colorPropType,
|
|
4634
|
+
shape: shapePropType,
|
|
4635
|
+
size: PropTypes.string,
|
|
4636
|
+
src: PropTypes.string,
|
|
4637
|
+
status: PropTypes.string,
|
|
4638
|
+
textColor: textColorsPropType,
|
|
4639
|
+
};
|
|
4640
|
+
CAvatar.displayName = 'CAvatar';
|
|
5104
4641
|
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
4642
|
+
var CBackdrop = forwardRef(function (_a, ref) {
|
|
4643
|
+
var _b = _a.className, className = _b === void 0 ? 'modal-backdrop' : _b, visible = _a.visible, rest = __rest(_a, ["className", "visible"]);
|
|
4644
|
+
var backdropRef = useRef(null);
|
|
4645
|
+
var forkedRef = useForkedRef(ref, backdropRef);
|
|
4646
|
+
return (React.createElement(Transition$1, { in: visible, mountOnEnter: true, nodeRef: backdropRef, timeout: 150, unmountOnExit: true }, function (state) { return (React.createElement("div", __assign({ className: classNames(className, 'fade', {
|
|
4647
|
+
show: state === 'entered',
|
|
4648
|
+
}) }, rest, { ref: forkedRef }))); }));
|
|
4649
|
+
});
|
|
4650
|
+
CBackdrop.propTypes = {
|
|
4651
|
+
className: PropTypes.string,
|
|
4652
|
+
visible: PropTypes.bool,
|
|
4653
|
+
};
|
|
4654
|
+
CBackdrop.displayName = 'CBackdrop';
|
|
5111
4655
|
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
4656
|
+
var CBadge = forwardRef(function (_a, ref) {
|
|
4657
|
+
var _b;
|
|
4658
|
+
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"]);
|
|
4659
|
+
return (React.createElement(Component, __assign({ className: classNames('badge', (_b = {},
|
|
4660
|
+
_b["bg-".concat(color)] = color,
|
|
4661
|
+
_b['position-absolute translate-middle'] = position,
|
|
4662
|
+
_b['top-0'] = position === null || position === void 0 ? void 0 : position.includes('top'),
|
|
4663
|
+
_b['top-100'] = position === null || position === void 0 ? void 0 : position.includes('bottom'),
|
|
4664
|
+
_b['start-100'] = position === null || position === void 0 ? void 0 : position.includes('end'),
|
|
4665
|
+
_b['start-0'] = position === null || position === void 0 ? void 0 : position.includes('start'),
|
|
4666
|
+
_b["badge-".concat(size)] = size,
|
|
4667
|
+
_b["text-".concat(textColor)] = textColor,
|
|
4668
|
+
_b), shape, className) }, rest, { ref: ref }), children));
|
|
4669
|
+
});
|
|
4670
|
+
CBadge.propTypes = {
|
|
4671
|
+
children: PropTypes.node,
|
|
4672
|
+
className: PropTypes.string,
|
|
4673
|
+
color: colorPropType,
|
|
4674
|
+
component: PropTypes.string,
|
|
4675
|
+
position: PropTypes.oneOf(['top-start', 'top-end', 'bottom-end', 'bottom-start']),
|
|
4676
|
+
shape: shapePropType,
|
|
4677
|
+
size: PropTypes.oneOf(['sm']),
|
|
4678
|
+
textColor: textColorsPropType,
|
|
4679
|
+
};
|
|
4680
|
+
CBadge.displayName = 'CBadge';
|
|
5117
4681
|
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
// Async and optimistically optimized update – it will not be executed if
|
|
5129
|
-
// not necessary (debounced to run at most once-per-tick)
|
|
5130
|
-
update: debounce(function () {
|
|
5131
|
-
return new Promise(function (resolve) {
|
|
5132
|
-
instance.forceUpdate();
|
|
5133
|
-
resolve(state);
|
|
5134
|
-
});
|
|
5135
|
-
}),
|
|
5136
|
-
destroy: function destroy() {
|
|
5137
|
-
cleanupModifierEffects();
|
|
5138
|
-
isDestroyed = true;
|
|
5139
|
-
}
|
|
5140
|
-
};
|
|
4682
|
+
var CBreadcrumb = forwardRef(function (_a, ref) {
|
|
4683
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
4684
|
+
return (React.createElement("nav", { "aria-label": "breadcrumb" },
|
|
4685
|
+
React.createElement("ol", __assign({ className: classNames('breadcrumb', className) }, rest, { ref: ref }), children)));
|
|
4686
|
+
});
|
|
4687
|
+
CBreadcrumb.propTypes = {
|
|
4688
|
+
children: PropTypes.node,
|
|
4689
|
+
className: PropTypes.string,
|
|
4690
|
+
};
|
|
4691
|
+
CBreadcrumb.displayName = 'CBreadcrumb';
|
|
5141
4692
|
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
4693
|
+
var CBreadcrumbItem = forwardRef(function (_a, ref) {
|
|
4694
|
+
var children = _a.children, active = _a.active, className = _a.className, href = _a.href, rest = __rest(_a, ["children", "active", "className", "href"]);
|
|
4695
|
+
return (React.createElement("li", __assign({ className: classNames('breadcrumb-item', {
|
|
4696
|
+
active: active,
|
|
4697
|
+
}, className) }, (active && { 'aria-current': 'page' }), rest, { ref: ref }), href ? React.createElement(CLink, { href: href }, children) : children));
|
|
4698
|
+
});
|
|
4699
|
+
CBreadcrumbItem.propTypes = {
|
|
4700
|
+
active: PropTypes.bool,
|
|
4701
|
+
children: PropTypes.node,
|
|
4702
|
+
className: PropTypes.string,
|
|
4703
|
+
href: PropTypes.string,
|
|
4704
|
+
};
|
|
4705
|
+
CBreadcrumbItem.displayName = 'CBreadcrumbItem';
|
|
5145
4706
|
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
4707
|
+
var CButton = forwardRef(function (_a, ref) {
|
|
4708
|
+
var _b;
|
|
4709
|
+
var children = _a.children, className = _a.className, _c = _a.color, color = _c === void 0 ? 'primary' : _c, _d = _a.component, component = _d === void 0 ? 'button' : _d, shape = _a.shape, size = _a.size, _e = _a.type, type = _e === void 0 ? 'button' : _e, variant = _a.variant, rest = __rest(_a, ["children", "className", "color", "component", "shape", "size", "type", "variant"]);
|
|
4710
|
+
return (React.createElement(CLink, __assign({ component: rest.href ? 'a' : component, type: type, className: classNames('btn', variant ? "btn-".concat(variant, "-").concat(color) : "btn-".concat(color), (_b = {}, _b["btn-".concat(size)] = size, _b), shape, className) }, rest, { ref: ref }), children));
|
|
4711
|
+
});
|
|
4712
|
+
CButton.propTypes = {
|
|
4713
|
+
children: PropTypes.node,
|
|
4714
|
+
className: PropTypes.string,
|
|
4715
|
+
color: colorPropType,
|
|
4716
|
+
component: PropTypes.elementType,
|
|
4717
|
+
shape: PropTypes.string,
|
|
4718
|
+
size: PropTypes.oneOf(['sm', 'lg']),
|
|
4719
|
+
type: PropTypes.oneOf(['button', 'submit', 'reset']),
|
|
4720
|
+
variant: PropTypes.oneOf(['outline', 'ghost']),
|
|
4721
|
+
};
|
|
4722
|
+
CButton.displayName = 'CButton';
|
|
5155
4723
|
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
4724
|
+
var CButtonToolbar = forwardRef(function (_a, ref) {
|
|
4725
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
4726
|
+
return (React.createElement("div", __assign({ className: classNames('btn-toolbar', className) }, rest, { ref: ref }), children));
|
|
4727
|
+
});
|
|
4728
|
+
CButtonToolbar.propTypes = {
|
|
4729
|
+
children: PropTypes.node,
|
|
4730
|
+
className: PropTypes.string,
|
|
4731
|
+
};
|
|
4732
|
+
CButtonToolbar.displayName = 'CButtonToolbar';
|
|
5162
4733
|
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
4734
|
+
var CButtonGroup = forwardRef(function (_a, ref) {
|
|
4735
|
+
var _b;
|
|
4736
|
+
var children = _a.children, className = _a.className, size = _a.size, vertical = _a.vertical, rest = __rest(_a, ["children", "className", "size", "vertical"]);
|
|
4737
|
+
return (React.createElement("div", __assign({ className: classNames(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-".concat(size)] = size, _b), className) }, rest, { ref: ref }), children));
|
|
4738
|
+
});
|
|
4739
|
+
CButtonGroup.propTypes = {
|
|
4740
|
+
children: PropTypes.node,
|
|
4741
|
+
className: PropTypes.string,
|
|
4742
|
+
size: PropTypes.oneOf(['sm', 'lg']),
|
|
4743
|
+
vertical: PropTypes.bool,
|
|
4744
|
+
};
|
|
4745
|
+
CButtonGroup.displayName = 'CButtonGroup';
|
|
5170
4746
|
|
|
5171
|
-
|
|
4747
|
+
var CCallout = forwardRef(function (_a, ref) {
|
|
4748
|
+
var _b;
|
|
4749
|
+
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
4750
|
+
return (React.createElement("div", __assign({ className: classNames('callout', (_b = {},
|
|
4751
|
+
_b["callout-".concat(color)] = color,
|
|
4752
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
4753
|
+
});
|
|
4754
|
+
CCallout.propTypes = {
|
|
4755
|
+
children: PropTypes.node,
|
|
4756
|
+
className: PropTypes.string,
|
|
4757
|
+
color: colorPropType,
|
|
4758
|
+
};
|
|
4759
|
+
CCallout.displayName = 'CCallout';
|
|
5172
4760
|
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
}
|
|
4761
|
+
var CCard = forwardRef(function (_a, ref) {
|
|
4762
|
+
var _b;
|
|
4763
|
+
var children = _a.children, className = _a.className, color = _a.color, textColor = _a.textColor, rest = __rest(_a, ["children", "className", "color", "textColor"]);
|
|
4764
|
+
return (React.createElement("div", __assign({ className: classNames('card', (_b = {},
|
|
4765
|
+
_b["bg-".concat(color)] = color,
|
|
4766
|
+
_b["text-".concat(textColor)] = textColor,
|
|
4767
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
4768
|
+
});
|
|
4769
|
+
CCard.propTypes = {
|
|
4770
|
+
children: PropTypes.node,
|
|
4771
|
+
className: PropTypes.string,
|
|
4772
|
+
color: colorPropType,
|
|
4773
|
+
textColor: PropTypes.string,
|
|
4774
|
+
};
|
|
4775
|
+
CCard.displayName = 'CCard';
|
|
5177
4776
|
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
4777
|
+
var CCardBody = forwardRef(function (_a, ref) {
|
|
4778
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
4779
|
+
return (React.createElement("div", __assign({ className: classNames('card-body', className) }, rest, { ref: ref }), children));
|
|
4780
|
+
});
|
|
4781
|
+
CCardBody.propTypes = {
|
|
4782
|
+
children: PropTypes.node,
|
|
4783
|
+
className: PropTypes.string,
|
|
4784
|
+
};
|
|
4785
|
+
CCardBody.displayName = 'CCardBody';
|
|
5184
4786
|
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
}
|
|
4787
|
+
var CCardFooter = forwardRef(function (_a, ref) {
|
|
4788
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
4789
|
+
return (React.createElement("div", __assign({ className: classNames('card-footer', className) }, rest, { ref: ref }), children));
|
|
4790
|
+
});
|
|
4791
|
+
CCardFooter.propTypes = {
|
|
4792
|
+
children: PropTypes.node,
|
|
4793
|
+
className: PropTypes.string,
|
|
4794
|
+
};
|
|
4795
|
+
CCardFooter.displayName = 'CCardFooter';
|
|
5188
4796
|
|
|
5189
|
-
var
|
|
5190
|
-
var
|
|
5191
|
-
|
|
5192
|
-
});
|
|
4797
|
+
var CCardGroup = forwardRef(function (_a, ref) {
|
|
4798
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
4799
|
+
return (React.createElement("div", __assign({ className: classNames('card-group', className) }, rest, { ref: ref }), children));
|
|
4800
|
+
});
|
|
4801
|
+
CCardGroup.propTypes = {
|
|
4802
|
+
children: PropTypes.node,
|
|
4803
|
+
className: PropTypes.string,
|
|
4804
|
+
};
|
|
4805
|
+
CCardGroup.displayName = 'CCardGroup';
|
|
5193
4806
|
|
|
5194
|
-
|
|
4807
|
+
var CCardHeader = forwardRef(function (_a, ref) {
|
|
4808
|
+
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'div' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
4809
|
+
return (React.createElement(Component, __assign({ className: classNames('card-header', className) }, rest, { ref: ref }), children));
|
|
4810
|
+
});
|
|
4811
|
+
CCardHeader.propTypes = {
|
|
4812
|
+
children: PropTypes.node,
|
|
4813
|
+
className: PropTypes.string,
|
|
4814
|
+
component: PropTypes.elementType,
|
|
4815
|
+
};
|
|
4816
|
+
CCardHeader.displayName = 'CCardHeader';
|
|
5195
4817
|
|
|
5196
|
-
var
|
|
5197
|
-
var
|
|
5198
|
-
|
|
5199
|
-
|
|
4818
|
+
var CCardImage = forwardRef(function (_a, ref) {
|
|
4819
|
+
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'img' : _b, orientation = _a.orientation, rest = __rest(_a, ["children", "className", "component", "orientation"]);
|
|
4820
|
+
return (React.createElement(Component, __assign({ className: classNames(orientation ? "card-img-".concat(orientation) : 'card-img', className) }, rest, { ref: ref }), children));
|
|
4821
|
+
});
|
|
4822
|
+
CCardImage.propTypes = {
|
|
4823
|
+
children: PropTypes.node,
|
|
4824
|
+
className: PropTypes.string,
|
|
4825
|
+
component: PropTypes.elementType,
|
|
4826
|
+
orientation: PropTypes.oneOf(['top', 'bottom']),
|
|
4827
|
+
};
|
|
4828
|
+
CCardImage.displayName = 'CCardImage';
|
|
5200
4829
|
|
|
5201
|
-
|
|
4830
|
+
var CCardImageOverlay = forwardRef(function (_a, ref) {
|
|
4831
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
4832
|
+
return (React.createElement("div", __assign({ className: classNames('card-img-overlay', className) }, rest, { ref: ref }), children));
|
|
4833
|
+
});
|
|
4834
|
+
CCardImageOverlay.propTypes = {
|
|
4835
|
+
children: PropTypes.node,
|
|
4836
|
+
className: PropTypes.string,
|
|
4837
|
+
};
|
|
4838
|
+
CCardImageOverlay.displayName = 'CCardImageOverlay';
|
|
5202
4839
|
|
|
5203
|
-
function
|
|
5204
|
-
|
|
5205
|
-
|
|
4840
|
+
var CCardLink = forwardRef(function (_a, ref) {
|
|
4841
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
4842
|
+
return (React.createElement(CLink, __assign({ className: classNames('card-link', className) }, rest, { ref: ref }), children));
|
|
4843
|
+
});
|
|
4844
|
+
CCardLink.propTypes = {
|
|
4845
|
+
children: PropTypes.node,
|
|
4846
|
+
className: PropTypes.string,
|
|
4847
|
+
};
|
|
4848
|
+
CCardLink.displayName = 'CCardLink';
|
|
5206
4849
|
|
|
5207
|
-
|
|
5208
|
-
|
|
4850
|
+
var CCardSubtitle = forwardRef(function (_a, ref) {
|
|
4851
|
+
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h6' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
4852
|
+
return (React.createElement(Component, __assign({ className: classNames('card-subtitle', className) }, rest, { ref: ref }), children));
|
|
4853
|
+
});
|
|
4854
|
+
CCardSubtitle.propTypes = {
|
|
4855
|
+
children: PropTypes.node,
|
|
4856
|
+
className: PropTypes.string,
|
|
4857
|
+
component: PropTypes.elementType,
|
|
4858
|
+
};
|
|
4859
|
+
CCardSubtitle.displayName = 'CCardSubtitle';
|
|
5209
4860
|
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
4861
|
+
var CCardText = forwardRef(function (_a, ref) {
|
|
4862
|
+
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'p' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
4863
|
+
return (React.createElement(Component, __assign({ className: classNames('card-text', className) }, rest, { ref: ref }), children));
|
|
4864
|
+
});
|
|
4865
|
+
CCardText.propTypes = {
|
|
4866
|
+
children: PropTypes.node,
|
|
4867
|
+
className: PropTypes.string,
|
|
4868
|
+
component: PropTypes.elementType,
|
|
4869
|
+
};
|
|
4870
|
+
CCardText.displayName = 'CCardText';
|
|
5218
4871
|
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
//
|
|
5230
|
-
// ... and convert to:
|
|
5231
|
-
//
|
|
5232
|
-
// ```js
|
|
5233
|
-
// it = a.entries();
|
|
5234
|
-
// while (!(i = it.next()).done)
|
|
5235
|
-
// if (!b.has(i.value[0])) return false;
|
|
5236
|
-
// ```
|
|
5237
|
-
//
|
|
5238
|
-
// **Note**: `i` access switches to `i.value`.
|
|
5239
|
-
var it;
|
|
5240
|
-
if (hasMap && (a instanceof Map) && (b instanceof Map)) {
|
|
5241
|
-
if (a.size !== b.size) return false;
|
|
5242
|
-
it = a.entries();
|
|
5243
|
-
while (!(i = it.next()).done)
|
|
5244
|
-
if (!b.has(i.value[0])) return false;
|
|
5245
|
-
it = a.entries();
|
|
5246
|
-
while (!(i = it.next()).done)
|
|
5247
|
-
if (!equal(i.value[1], b.get(i.value[0]))) return false;
|
|
5248
|
-
return true;
|
|
5249
|
-
}
|
|
4872
|
+
var CCardTitle = forwardRef(function (_a, ref) {
|
|
4873
|
+
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
4874
|
+
return (React.createElement(Component, __assign({ className: classNames('card-title', className) }, rest, { ref: ref }), children));
|
|
4875
|
+
});
|
|
4876
|
+
CCardTitle.propTypes = {
|
|
4877
|
+
children: PropTypes.node,
|
|
4878
|
+
className: PropTypes.string,
|
|
4879
|
+
component: PropTypes.elementType,
|
|
4880
|
+
};
|
|
4881
|
+
CCardTitle.displayName = 'CCardTitle';
|
|
5250
4882
|
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
if (length != b.length) return false;
|
|
5263
|
-
for (i = length; i-- !== 0;)
|
|
5264
|
-
if (a[i] !== b[i]) return false;
|
|
5265
|
-
return true;
|
|
4883
|
+
var getRTLPlacement = function (placement, element) {
|
|
4884
|
+
switch (placement) {
|
|
4885
|
+
case 'right': {
|
|
4886
|
+
return isRTL(element) ? 'left' : 'right';
|
|
4887
|
+
}
|
|
4888
|
+
case 'left': {
|
|
4889
|
+
return isRTL(element) ? 'right' : 'left';
|
|
4890
|
+
}
|
|
4891
|
+
default: {
|
|
4892
|
+
return placement;
|
|
4893
|
+
}
|
|
5266
4894
|
}
|
|
4895
|
+
};
|
|
5267
4896
|
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
// END: Modifications
|
|
5276
|
-
|
|
5277
|
-
keys = Object.keys(a);
|
|
5278
|
-
length = keys.length;
|
|
5279
|
-
if (length !== Object.keys(b).length) return false;
|
|
5280
|
-
|
|
5281
|
-
for (i = length; i-- !== 0;)
|
|
5282
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
5283
|
-
// END: fast-deep-equal
|
|
5284
|
-
|
|
5285
|
-
// START: react-fast-compare
|
|
5286
|
-
// custom handling for DOM elements
|
|
5287
|
-
if (hasElementType && a instanceof Element) return false;
|
|
5288
|
-
|
|
5289
|
-
// custom handling for React/Preact
|
|
5290
|
-
for (i = length; i-- !== 0;) {
|
|
5291
|
-
if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {
|
|
5292
|
-
// React-specific: avoid traversing React elements' _owner
|
|
5293
|
-
// Preact-specific: avoid traversing Preact elements' __v and __o
|
|
5294
|
-
// __v = $_original / $_vnode
|
|
5295
|
-
// __o = $_owner
|
|
5296
|
-
// These properties contain circular references and are not needed when
|
|
5297
|
-
// comparing the actual elements (and not their owners)
|
|
5298
|
-
// .$$typeof and ._store on just reasonable markers of elements
|
|
5299
|
-
|
|
5300
|
-
continue;
|
|
5301
|
-
}
|
|
4897
|
+
var isInViewport = function (element) {
|
|
4898
|
+
var rect = element.getBoundingClientRect();
|
|
4899
|
+
return (Math.floor(rect.top) >= 0 &&
|
|
4900
|
+
Math.floor(rect.left) >= 0 &&
|
|
4901
|
+
Math.floor(rect.bottom) <= (window.innerHeight || document.documentElement.clientHeight) &&
|
|
4902
|
+
Math.floor(rect.right) <= (window.innerWidth || document.documentElement.clientWidth));
|
|
4903
|
+
};
|
|
5302
4904
|
|
|
5303
|
-
|
|
5304
|
-
|
|
4905
|
+
var isRTL = function (element) {
|
|
4906
|
+
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
4907
|
+
return true;
|
|
5305
4908
|
}
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
// START: fast-deep-equal
|
|
5309
|
-
return true;
|
|
5310
|
-
}
|
|
5311
|
-
|
|
5312
|
-
return a !== a && b !== b;
|
|
5313
|
-
}
|
|
5314
|
-
// end fast-deep-equal
|
|
5315
|
-
|
|
5316
|
-
var reactFastCompare = function isEqual(a, b) {
|
|
5317
|
-
try {
|
|
5318
|
-
return equal(a, b);
|
|
5319
|
-
} catch (error) {
|
|
5320
|
-
if (((error.message || '').match(/stack|recursion/i))) {
|
|
5321
|
-
// warn on circular references, don't crash
|
|
5322
|
-
// browsers give this different errors name and messages:
|
|
5323
|
-
// chrome/safari: "RangeError", "Maximum call stack size exceeded"
|
|
5324
|
-
// firefox: "InternalError", too much recursion"
|
|
5325
|
-
// edge: "Error", "Out of stack space"
|
|
5326
|
-
console.warn('react-fast-compare cannot handle circular refs');
|
|
5327
|
-
return false;
|
|
4909
|
+
if (element) {
|
|
4910
|
+
return element.closest('[dir="rtl"]') !== null;
|
|
5328
4911
|
}
|
|
5329
|
-
|
|
5330
|
-
throw error;
|
|
5331
|
-
}
|
|
4912
|
+
return false;
|
|
5332
4913
|
};
|
|
5333
4914
|
|
|
5334
|
-
var
|
|
5335
|
-
|
|
5336
|
-
var
|
|
5337
|
-
var
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
4915
|
+
var CCarouselContext = createContext({});
|
|
4916
|
+
var CCarousel = forwardRef(function (_a, ref) {
|
|
4917
|
+
var children = _a.children, _b = _a.activeIndex, activeIndex = _b === void 0 ? 0 : _b, className = _a.className, controls = _a.controls, dark = _a.dark, indicators = _a.indicators, _c = _a.interval, interval = _c === void 0 ? 5000 : _c, onSlid = _a.onSlid, onSlide = _a.onSlide, _d = _a.pause, pause = _d === void 0 ? 'hover' : _d, _e = _a.touch, touch = _e === void 0 ? true : _e, transition = _a.transition, _f = _a.wrap, wrap = _f === void 0 ? true : _f, rest = __rest(_a, ["children", "activeIndex", "className", "controls", "dark", "indicators", "interval", "onSlid", "onSlide", "pause", "touch", "transition", "wrap"]);
|
|
4918
|
+
var carouselRef = useRef(null);
|
|
4919
|
+
var forkedRef = useForkedRef(ref, carouselRef);
|
|
4920
|
+
var data = useRef({}).current;
|
|
4921
|
+
var _g = useState(activeIndex), active = _g[0], setActive = _g[1];
|
|
4922
|
+
var _h = useState(false), animating = _h[0], setAnimating = _h[1];
|
|
4923
|
+
var _j = useState(), customInterval = _j[0], setCustomInterval = _j[1];
|
|
4924
|
+
var _k = useState('next'), direction = _k[0], setDirection = _k[1];
|
|
4925
|
+
var _l = useState(0), itemsNumber = _l[0], setItemsNumber = _l[1];
|
|
4926
|
+
var _m = useState(null), touchPosition = _m[0], setTouchPosition = _m[1];
|
|
4927
|
+
var _o = useState(), visible = _o[0], setVisible = _o[1];
|
|
4928
|
+
useEffect(function () {
|
|
4929
|
+
setItemsNumber(Children.toArray(children).length);
|
|
4930
|
+
});
|
|
4931
|
+
useEffect(function () {
|
|
4932
|
+
visible && cycle();
|
|
4933
|
+
}, [visible]);
|
|
4934
|
+
useEffect(function () {
|
|
4935
|
+
!animating && cycle();
|
|
4936
|
+
!animating && onSlid && onSlid(active, direction);
|
|
4937
|
+
animating && onSlide && onSlide(active, direction);
|
|
4938
|
+
}, [animating]);
|
|
4939
|
+
useEffect(function () {
|
|
4940
|
+
window.addEventListener('scroll', handleScroll);
|
|
4941
|
+
return function () {
|
|
4942
|
+
window.removeEventListener('scroll', handleScroll);
|
|
4943
|
+
};
|
|
4944
|
+
});
|
|
4945
|
+
var cycle = function () {
|
|
4946
|
+
_pause();
|
|
4947
|
+
if (!wrap && active === itemsNumber - 1) {
|
|
4948
|
+
return;
|
|
4949
|
+
}
|
|
4950
|
+
if (typeof interval === 'number') {
|
|
4951
|
+
data.timeout = setTimeout(function () { return nextItemWhenVisible(); }, typeof customInterval === 'number' ? customInterval : interval);
|
|
4952
|
+
}
|
|
4953
|
+
};
|
|
4954
|
+
var _pause = function () { return pause && data.timeout && clearTimeout(data.timeout); };
|
|
4955
|
+
var nextItemWhenVisible = function () {
|
|
4956
|
+
// Don't call next when the page isn't visible
|
|
4957
|
+
// or the carousel or its parent isn't visible
|
|
4958
|
+
if (!document.hidden && carouselRef.current && isInViewport(carouselRef.current)) {
|
|
4959
|
+
if (animating) {
|
|
4960
|
+
return;
|
|
4961
|
+
}
|
|
4962
|
+
handleControlClick('next');
|
|
4963
|
+
}
|
|
4964
|
+
};
|
|
4965
|
+
var handleControlClick = function (direction) {
|
|
4966
|
+
if (animating) {
|
|
4967
|
+
return;
|
|
4968
|
+
}
|
|
4969
|
+
setDirection(direction);
|
|
4970
|
+
if (direction === 'next') {
|
|
4971
|
+
active === itemsNumber - 1 ? setActive(0) : setActive(active + 1);
|
|
4972
|
+
}
|
|
4973
|
+
else {
|
|
4974
|
+
active === 0 ? setActive(itemsNumber - 1) : setActive(active - 1);
|
|
4975
|
+
}
|
|
4976
|
+
};
|
|
4977
|
+
var handleIndicatorClick = function (index) {
|
|
4978
|
+
if (active === index) {
|
|
4979
|
+
return;
|
|
4980
|
+
}
|
|
4981
|
+
if (active < index) {
|
|
4982
|
+
setDirection('next');
|
|
4983
|
+
setActive(index);
|
|
4984
|
+
return;
|
|
4985
|
+
}
|
|
4986
|
+
if (active > index) {
|
|
4987
|
+
setDirection('prev');
|
|
4988
|
+
setActive(index);
|
|
4989
|
+
}
|
|
4990
|
+
};
|
|
4991
|
+
var handleScroll = function () {
|
|
4992
|
+
if (!document.hidden && carouselRef.current && isInViewport(carouselRef.current)) {
|
|
4993
|
+
setVisible(true);
|
|
4994
|
+
}
|
|
4995
|
+
else {
|
|
4996
|
+
setVisible(false);
|
|
4997
|
+
}
|
|
4998
|
+
};
|
|
4999
|
+
var handleTouchMove = function (e) {
|
|
5000
|
+
var touchDown = touchPosition;
|
|
5001
|
+
if (touchDown === null) {
|
|
5002
|
+
return;
|
|
5003
|
+
}
|
|
5004
|
+
var currentTouch = e.touches[0].clientX;
|
|
5005
|
+
var diff = touchDown - currentTouch;
|
|
5006
|
+
if (diff > 5) {
|
|
5007
|
+
handleControlClick('next');
|
|
5008
|
+
}
|
|
5009
|
+
if (diff < -5) {
|
|
5010
|
+
handleControlClick('prev');
|
|
5011
|
+
}
|
|
5012
|
+
setTouchPosition(null);
|
|
5013
|
+
};
|
|
5014
|
+
var handleTouchStart = function (e) {
|
|
5015
|
+
var touchDown = e.touches[0].clientX;
|
|
5016
|
+
setTouchPosition(touchDown);
|
|
5017
|
+
};
|
|
5018
|
+
return (React.createElement("div", __assign({ className: classNames('carousel slide', {
|
|
5019
|
+
'carousel-dark': dark,
|
|
5020
|
+
'carousel-fade': transition === 'crossfade',
|
|
5021
|
+
}, className), onMouseEnter: _pause, onMouseLeave: cycle }, (touch && { onTouchStart: handleTouchStart, onTouchMove: handleTouchMove }), rest, { ref: forkedRef }),
|
|
5022
|
+
React.createElement(CCarouselContext.Provider, { value: {
|
|
5023
|
+
setAnimating: setAnimating,
|
|
5024
|
+
setCustomInterval: setCustomInterval,
|
|
5025
|
+
} },
|
|
5026
|
+
indicators && (React.createElement("ol", { className: "carousel-indicators" }, Array.from({ length: itemsNumber }, function (_, i) { return i; }).map(function (index) {
|
|
5027
|
+
return (React.createElement("li", { key: "indicator".concat(index), onClick: function () {
|
|
5028
|
+
!animating && handleIndicatorClick(index);
|
|
5029
|
+
}, className: active === index ? 'active' : '', "data-coreui-target": "" }));
|
|
5030
|
+
}))),
|
|
5031
|
+
React.createElement("div", { className: "carousel-inner" }, Children.map(children, function (child, index) {
|
|
5032
|
+
if (React.isValidElement(child)) {
|
|
5033
|
+
return React.cloneElement(child, {
|
|
5034
|
+
active: active === index ? true : false,
|
|
5035
|
+
direction: direction,
|
|
5036
|
+
key: index,
|
|
5037
|
+
});
|
|
5038
|
+
}
|
|
5039
|
+
return;
|
|
5040
|
+
})),
|
|
5041
|
+
controls && (React.createElement(React.Fragment, null,
|
|
5042
|
+
React.createElement("button", { className: "carousel-control-prev", onClick: function () { return handleControlClick('prev'); } },
|
|
5043
|
+
React.createElement("span", { className: "carousel-control-prev-icon", "aria-label": "prev" })),
|
|
5044
|
+
React.createElement("button", { className: "carousel-control-next", onClick: function () { return handleControlClick('next'); } },
|
|
5045
|
+
React.createElement("span", { className: "carousel-control-next-icon", "aria-label": "next" })))))));
|
|
5046
|
+
});
|
|
5047
|
+
CCarousel.propTypes = {
|
|
5048
|
+
activeIndex: PropTypes.number,
|
|
5049
|
+
children: PropTypes.node,
|
|
5050
|
+
className: PropTypes.string,
|
|
5051
|
+
controls: PropTypes.bool,
|
|
5052
|
+
dark: PropTypes.bool,
|
|
5053
|
+
indicators: PropTypes.bool,
|
|
5054
|
+
interval: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
|
|
5055
|
+
onSlid: PropTypes.func,
|
|
5056
|
+
onSlide: PropTypes.func,
|
|
5057
|
+
pause: PropTypes.oneOf([false, 'hover']),
|
|
5058
|
+
touch: PropTypes.bool,
|
|
5059
|
+
transition: PropTypes.oneOf(['slide', 'crossfade']),
|
|
5060
|
+
wrap: PropTypes.bool,
|
|
5061
|
+
};
|
|
5062
|
+
CCarousel.displayName = 'CCarousel';
|
|
5349
5063
|
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
position: 'absolute'
|
|
5359
|
-
}
|
|
5360
|
-
},
|
|
5361
|
-
attributes: {}
|
|
5362
|
-
}),
|
|
5363
|
-
state = _React$useState[0],
|
|
5364
|
-
setState = _React$useState[1];
|
|
5064
|
+
var CCarouselCaption = forwardRef(function (_a, ref) {
|
|
5065
|
+
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
5066
|
+
return React.createElement("div", __assign({ className: classNames('carousel-caption', className) }, rest, { ref: ref }));
|
|
5067
|
+
});
|
|
5068
|
+
CCarouselCaption.propTypes = {
|
|
5069
|
+
className: PropTypes.string,
|
|
5070
|
+
};
|
|
5071
|
+
CCarouselCaption.displayName = 'CCarouselCaption';
|
|
5365
5072
|
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5073
|
+
var CCarouselItem = forwardRef(function (_a, ref) {
|
|
5074
|
+
var children = _a.children, className = _a.className, active = _a.active, direction = _a.direction, _b = _a.interval, interval = _b === void 0 ? false : _b, rest = __rest(_a, ["children", "className", "active", "direction", "interval"]);
|
|
5075
|
+
var _c = useContext(CCarouselContext), setAnimating = _c.setAnimating, setCustomInterval = _c.setCustomInterval;
|
|
5076
|
+
var carouselItemRef = useRef(null);
|
|
5077
|
+
var forkedRef = useForkedRef(ref, carouselItemRef);
|
|
5078
|
+
var prevActive = useRef();
|
|
5079
|
+
var _d = useState(), directionClassName = _d[0], setDirectionClassName = _d[1];
|
|
5080
|
+
var _e = useState(), orderClassName = _e[0], setOrderClassName = _e[1];
|
|
5081
|
+
var _f = useState(active && 'active'), activeClassName = _f[0], setActiveClassName = _f[1];
|
|
5082
|
+
var _g = useState(0), count = _g[0], setCount = _g[1];
|
|
5083
|
+
useEffect(function () {
|
|
5084
|
+
if (active) {
|
|
5085
|
+
setCustomInterval(interval);
|
|
5086
|
+
if (count !== 0)
|
|
5087
|
+
setOrderClassName("carousel-item-".concat(direction));
|
|
5088
|
+
}
|
|
5089
|
+
if (prevActive.current && !active) {
|
|
5090
|
+
setActiveClassName('active');
|
|
5091
|
+
}
|
|
5092
|
+
if (active || prevActive.current) {
|
|
5093
|
+
setTimeout(function () {
|
|
5094
|
+
var _a;
|
|
5095
|
+
if (count !== 0) {
|
|
5096
|
+
// @ts-expect-error reflow is necessary to proper transition
|
|
5097
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5098
|
+
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
|
|
5099
|
+
setDirectionClassName("carousel-item-".concat(direction === 'next' ? 'start' : 'end'));
|
|
5100
|
+
}
|
|
5101
|
+
}, 0);
|
|
5102
|
+
}
|
|
5103
|
+
prevActive.current = active;
|
|
5104
|
+
if (count === 0)
|
|
5105
|
+
setCount(count + 1);
|
|
5106
|
+
}, [active]);
|
|
5107
|
+
useEffect(function () {
|
|
5108
|
+
var _a, _b;
|
|
5109
|
+
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('transitionstart', function () {
|
|
5110
|
+
active && setAnimating(true);
|
|
5383
5111
|
});
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
popperInstance.destroy();
|
|
5422
|
-
popperInstanceRef.current = null;
|
|
5423
|
-
};
|
|
5424
|
-
}, [referenceElement, popperElement, options.createPopper]);
|
|
5425
|
-
return {
|
|
5426
|
-
state: popperInstanceRef.current ? popperInstanceRef.current.state : null,
|
|
5427
|
-
styles: state.styles,
|
|
5428
|
-
attributes: state.attributes,
|
|
5429
|
-
update: popperInstanceRef.current ? popperInstanceRef.current.update : null,
|
|
5430
|
-
forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null
|
|
5431
|
-
};
|
|
5112
|
+
(_b = carouselItemRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('transitionend', function () {
|
|
5113
|
+
active && setAnimating(false);
|
|
5114
|
+
setDirectionClassName('');
|
|
5115
|
+
setOrderClassName('');
|
|
5116
|
+
if (active) {
|
|
5117
|
+
setActiveClassName('active');
|
|
5118
|
+
}
|
|
5119
|
+
if (!active) {
|
|
5120
|
+
setActiveClassName('');
|
|
5121
|
+
}
|
|
5122
|
+
});
|
|
5123
|
+
return function () {
|
|
5124
|
+
var _a, _b;
|
|
5125
|
+
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('transitionstart', function () {
|
|
5126
|
+
active && setAnimating(true);
|
|
5127
|
+
});
|
|
5128
|
+
(_b = carouselItemRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('transitionend', function () {
|
|
5129
|
+
active && setAnimating(false);
|
|
5130
|
+
setDirectionClassName('');
|
|
5131
|
+
setOrderClassName('');
|
|
5132
|
+
if (active) {
|
|
5133
|
+
setActiveClassName('active');
|
|
5134
|
+
}
|
|
5135
|
+
if (!active) {
|
|
5136
|
+
setActiveClassName('');
|
|
5137
|
+
}
|
|
5138
|
+
});
|
|
5139
|
+
};
|
|
5140
|
+
});
|
|
5141
|
+
return (React.createElement("div", __assign({ className: classNames('carousel-item', activeClassName, directionClassName, orderClassName, className), ref: forkedRef }, rest), children));
|
|
5142
|
+
});
|
|
5143
|
+
CCarouselItem.propTypes = {
|
|
5144
|
+
active: PropTypes.bool,
|
|
5145
|
+
children: PropTypes.node,
|
|
5146
|
+
className: PropTypes.string,
|
|
5147
|
+
direction: PropTypes.string,
|
|
5148
|
+
interval: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
|
|
5432
5149
|
};
|
|
5150
|
+
CCarouselItem.displayName = 'CCarouselItem';
|
|
5433
5151
|
|
|
5434
|
-
var
|
|
5435
|
-
|
|
5152
|
+
var CConditionalPortal = function (_a) {
|
|
5153
|
+
var children = _a.children, portal = _a.portal;
|
|
5154
|
+
return typeof window !== 'undefined' && portal ? (createPortal(children, document.body)) : (React.createElement(React.Fragment, null, children));
|
|
5436
5155
|
};
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5156
|
+
CConditionalPortal.propTypes = {
|
|
5157
|
+
children: PropTypes.node,
|
|
5158
|
+
portal: PropTypes.bool.isRequired,
|
|
5440
5159
|
};
|
|
5160
|
+
CConditionalPortal.displayName = 'CConditionalPortal';
|
|
5441
5161
|
|
|
5442
|
-
var
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
_ref$strategy = _ref.strategy,
|
|
5447
|
-
strategy = _ref$strategy === void 0 ? 'absolute' : _ref$strategy,
|
|
5448
|
-
_ref$modifiers = _ref.modifiers,
|
|
5449
|
-
modifiers = _ref$modifiers === void 0 ? EMPTY_MODIFIERS : _ref$modifiers,
|
|
5450
|
-
referenceElement = _ref.referenceElement,
|
|
5451
|
-
onFirstUpdate = _ref.onFirstUpdate,
|
|
5452
|
-
innerRef = _ref.innerRef,
|
|
5453
|
-
children = _ref.children;
|
|
5454
|
-
var referenceNode = React.useContext(ManagerReferenceNodeContext);
|
|
5455
|
-
|
|
5456
|
-
var _React$useState = React.useState(null),
|
|
5457
|
-
popperElement = _React$useState[0],
|
|
5458
|
-
setPopperElement = _React$useState[1];
|
|
5459
|
-
|
|
5460
|
-
var _React$useState2 = React.useState(null),
|
|
5461
|
-
arrowElement = _React$useState2[0],
|
|
5462
|
-
setArrowElement = _React$useState2[1];
|
|
5463
|
-
|
|
5464
|
-
React.useEffect(function () {
|
|
5465
|
-
setRef(innerRef, popperElement);
|
|
5466
|
-
}, [innerRef, popperElement]);
|
|
5467
|
-
var options = React.useMemo(function () {
|
|
5468
|
-
return {
|
|
5469
|
-
placement: placement,
|
|
5470
|
-
strategy: strategy,
|
|
5471
|
-
onFirstUpdate: onFirstUpdate,
|
|
5472
|
-
modifiers: [].concat(modifiers, [{
|
|
5473
|
-
name: 'arrow',
|
|
5474
|
-
enabled: arrowElement != null,
|
|
5475
|
-
options: {
|
|
5476
|
-
element: arrowElement
|
|
5477
|
-
}
|
|
5478
|
-
}])
|
|
5479
|
-
};
|
|
5480
|
-
}, [placement, strategy, onFirstUpdate, modifiers, arrowElement]);
|
|
5481
|
-
|
|
5482
|
-
var _usePopper = usePopper(referenceElement || referenceNode, popperElement, options),
|
|
5483
|
-
state = _usePopper.state,
|
|
5484
|
-
styles = _usePopper.styles,
|
|
5485
|
-
forceUpdate = _usePopper.forceUpdate,
|
|
5486
|
-
update = _usePopper.update;
|
|
5487
|
-
|
|
5488
|
-
var childrenProps = React.useMemo(function () {
|
|
5489
|
-
return {
|
|
5490
|
-
ref: setPopperElement,
|
|
5491
|
-
style: styles.popper,
|
|
5492
|
-
placement: state ? state.placement : placement,
|
|
5493
|
-
hasPopperEscaped: state && state.modifiersData.hide ? state.modifiersData.hide.hasPopperEscaped : null,
|
|
5494
|
-
isReferenceHidden: state && state.modifiersData.hide ? state.modifiersData.hide.isReferenceHidden : null,
|
|
5495
|
-
arrowProps: {
|
|
5496
|
-
style: styles.arrow,
|
|
5497
|
-
ref: setArrowElement
|
|
5498
|
-
},
|
|
5499
|
-
forceUpdate: forceUpdate || NOOP,
|
|
5500
|
-
update: update || NOOP_PROMISE
|
|
5501
|
-
};
|
|
5502
|
-
}, [setPopperElement, setArrowElement, placement, state, styles, update, forceUpdate]);
|
|
5503
|
-
return unwrapArray(children)(childrenProps);
|
|
5504
|
-
}
|
|
5505
|
-
|
|
5506
|
-
/**
|
|
5507
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
5508
|
-
*
|
|
5509
|
-
* This source code is licensed under the MIT license found in the
|
|
5510
|
-
* LICENSE file in the root directory of this source tree.
|
|
5511
|
-
*/
|
|
5512
|
-
|
|
5513
|
-
/**
|
|
5514
|
-
* Similar to invariant but only logs a warning if the condition is not met.
|
|
5515
|
-
* This can be used to log issues in development environments in critical
|
|
5516
|
-
* paths. Removing the logging code for production environments will keep the
|
|
5517
|
-
* same logic and follow the same code paths.
|
|
5518
|
-
*/
|
|
5519
|
-
|
|
5520
|
-
var __DEV__ = process.env.NODE_ENV !== 'production';
|
|
5521
|
-
|
|
5522
|
-
var warning = function() {};
|
|
5523
|
-
|
|
5524
|
-
if (__DEV__) {
|
|
5525
|
-
var printWarning = function printWarning(format, args) {
|
|
5526
|
-
var len = arguments.length;
|
|
5527
|
-
args = new Array(len > 1 ? len - 1 : 0);
|
|
5528
|
-
for (var key = 1; key < len; key++) {
|
|
5529
|
-
args[key - 1] = arguments[key];
|
|
5162
|
+
var getPlacement = function (placement, direction, alignment, isRTL) {
|
|
5163
|
+
var _placement = placement;
|
|
5164
|
+
if (direction === 'dropup') {
|
|
5165
|
+
_placement = isRTL ? 'top-end' : 'top-start';
|
|
5530
5166
|
}
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
format.replace(/%s/g, function() {
|
|
5534
|
-
return args[argIndex++];
|
|
5535
|
-
});
|
|
5536
|
-
if (typeof console !== 'undefined') {
|
|
5537
|
-
console.error(message);
|
|
5167
|
+
if (direction === 'dropup-center') {
|
|
5168
|
+
_placement = 'top';
|
|
5538
5169
|
}
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
5542
|
-
// to find the callsite that caused this warning to fire.
|
|
5543
|
-
throw new Error(message);
|
|
5544
|
-
} catch (x) {}
|
|
5545
|
-
};
|
|
5546
|
-
|
|
5547
|
-
warning = function(condition, format, args) {
|
|
5548
|
-
var len = arguments.length;
|
|
5549
|
-
args = new Array(len > 2 ? len - 2 : 0);
|
|
5550
|
-
for (var key = 2; key < len; key++) {
|
|
5551
|
-
args[key - 2] = arguments[key];
|
|
5170
|
+
if (direction === 'dropend') {
|
|
5171
|
+
_placement = isRTL ? 'left-start' : 'right-start';
|
|
5552
5172
|
}
|
|
5553
|
-
if (
|
|
5554
|
-
|
|
5555
|
-
'`warning(condition, format, ...args)` requires a warning ' +
|
|
5556
|
-
'message argument'
|
|
5557
|
-
);
|
|
5173
|
+
if (direction === 'dropstart') {
|
|
5174
|
+
_placement = isRTL ? 'right-start' : 'left-start';
|
|
5558
5175
|
}
|
|
5559
|
-
if (
|
|
5560
|
-
|
|
5176
|
+
if (alignment === 'end') {
|
|
5177
|
+
_placement = isRTL ? 'bottom-start' : 'bottom-end';
|
|
5561
5178
|
}
|
|
5562
|
-
|
|
5563
|
-
}
|
|
5564
|
-
|
|
5565
|
-
var warning_1 = warning;
|
|
5566
|
-
|
|
5567
|
-
var warning$1 = /*@__PURE__*/getDefaultExportFromCjs(warning_1);
|
|
5568
|
-
|
|
5569
|
-
function Reference(_ref) {
|
|
5570
|
-
var children = _ref.children,
|
|
5571
|
-
innerRef = _ref.innerRef;
|
|
5572
|
-
var setReferenceNode = React.useContext(ManagerReferenceNodeSetterContext);
|
|
5573
|
-
var refHandler = React.useCallback(function (node) {
|
|
5574
|
-
setRef(innerRef, node);
|
|
5575
|
-
safeInvoke(setReferenceNode, node);
|
|
5576
|
-
}, [innerRef, setReferenceNode]); // ran on unmount
|
|
5577
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5578
|
-
|
|
5579
|
-
React.useEffect(function () {
|
|
5580
|
-
return function () {
|
|
5581
|
-
return setRef(innerRef, null);
|
|
5582
|
-
};
|
|
5583
|
-
}, []);
|
|
5584
|
-
React.useEffect(function () {
|
|
5585
|
-
warning$1(Boolean(setReferenceNode), '`Reference` should not be used outside of a `Manager` component.');
|
|
5586
|
-
}, [setReferenceNode]);
|
|
5587
|
-
return unwrapArray(children)({
|
|
5588
|
-
ref: refHandler
|
|
5589
|
-
});
|
|
5590
|
-
}
|
|
5591
|
-
|
|
5592
|
-
var PopperManagerWrapper = function (_a) {
|
|
5593
|
-
var children = _a.children, popper = _a.popper;
|
|
5594
|
-
return popper ? React__default.createElement(Manager, null, children) : React__default.createElement(React__default.Fragment, null, children);
|
|
5179
|
+
return _placement;
|
|
5595
5180
|
};
|
|
5596
5181
|
var CDropdownContext = createContext({});
|
|
5597
5182
|
var CDropdown = forwardRef(function (_a, ref) {
|
|
5598
5183
|
var _b;
|
|
5599
|
-
var children = _a.children, alignment = _a.alignment, _c = _a.autoClose, autoClose = _c === void 0 ? true : _c, className = _a.className, dark = _a.dark, direction = _a.direction, onHide = _a.onHide, onShow = _a.onShow,
|
|
5184
|
+
var children = _a.children, alignment = _a.alignment, _c = _a.autoClose, autoClose = _c === void 0 ? true : _c, className = _a.className, dark = _a.dark, direction = _a.direction, _d = _a.offset, offset = _d === void 0 ? [0, 2] : _d, onHide = _a.onHide, onShow = _a.onShow, _e = _a.placement, placement = _e === void 0 ? 'bottom-start' : _e, _f = _a.popper, popper = _f === void 0 ? true : _f, _g = _a.portal, portal = _g === void 0 ? false : _g, _h = _a.variant, variant = _h === void 0 ? 'btn-group' : _h, _j = _a.component, component = _j === void 0 ? 'div' : _j, _k = _a.visible, visible = _k === void 0 ? false : _k, rest = __rest(_a, ["children", "alignment", "autoClose", "className", "dark", "direction", "offset", "onHide", "onShow", "placement", "popper", "portal", "variant", "component", "visible"]);
|
|
5600
5185
|
var dropdownRef = useRef(null);
|
|
5186
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5601
5187
|
var dropdownToggleRef = useRef(null);
|
|
5188
|
+
var dropdownMenuRef = useRef(null);
|
|
5602
5189
|
var forkedRef = useForkedRef(ref, dropdownRef);
|
|
5603
|
-
var
|
|
5190
|
+
var _l = useState(visible), _visible = _l[0], setVisible = _l[1];
|
|
5191
|
+
var _m = usePopper(), initPopper = _m.initPopper, destroyPopper = _m.destroyPopper;
|
|
5604
5192
|
var Component = variant === 'nav-item' ? 'li' : component;
|
|
5605
5193
|
// Disable popper if responsive aligment is set.
|
|
5606
5194
|
if (typeof alignment === 'object') {
|
|
@@ -5608,44 +5196,83 @@ var CDropdown = forwardRef(function (_a, ref) {
|
|
|
5608
5196
|
}
|
|
5609
5197
|
var contextValues = {
|
|
5610
5198
|
alignment: alignment,
|
|
5611
|
-
autoClose: autoClose,
|
|
5612
5199
|
dark: dark,
|
|
5613
|
-
direction: direction,
|
|
5614
5200
|
dropdownToggleRef: dropdownToggleRef,
|
|
5615
|
-
|
|
5201
|
+
dropdownMenuRef: dropdownMenuRef,
|
|
5616
5202
|
popper: popper,
|
|
5617
5203
|
portal: portal,
|
|
5618
5204
|
variant: variant,
|
|
5619
5205
|
visible: _visible,
|
|
5620
5206
|
setVisible: setVisible,
|
|
5621
5207
|
};
|
|
5208
|
+
var popperConfig = {
|
|
5209
|
+
modifiers: [
|
|
5210
|
+
{
|
|
5211
|
+
name: 'offset',
|
|
5212
|
+
options: {
|
|
5213
|
+
offset: offset,
|
|
5214
|
+
},
|
|
5215
|
+
},
|
|
5216
|
+
],
|
|
5217
|
+
placement: getPlacement(placement, direction, alignment, isRTL(dropdownMenuRef.current)),
|
|
5218
|
+
};
|
|
5622
5219
|
useEffect(function () {
|
|
5623
5220
|
setVisible(visible);
|
|
5624
5221
|
}, [visible]);
|
|
5625
5222
|
useEffect(function () {
|
|
5626
|
-
_visible &&
|
|
5627
|
-
|
|
5223
|
+
if (_visible && dropdownToggleRef.current && dropdownMenuRef.current) {
|
|
5224
|
+
popper && initPopper(dropdownToggleRef.current, dropdownMenuRef.current, popperConfig);
|
|
5225
|
+
window.addEventListener('mouseup', handleMouseUp);
|
|
5226
|
+
window.addEventListener('keyup', handleKeyup);
|
|
5227
|
+
onShow && onShow();
|
|
5228
|
+
}
|
|
5229
|
+
return function () {
|
|
5230
|
+
popper && destroyPopper();
|
|
5231
|
+
window.removeEventListener('mouseup', handleMouseUp);
|
|
5232
|
+
window.removeEventListener('keyup', handleKeyup);
|
|
5233
|
+
onHide && onHide();
|
|
5234
|
+
};
|
|
5628
5235
|
}, [_visible]);
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5236
|
+
var handleKeyup = function (event) {
|
|
5237
|
+
if (autoClose === false) {
|
|
5238
|
+
return;
|
|
5239
|
+
}
|
|
5240
|
+
if (event.key === 'Escape') {
|
|
5241
|
+
setVisible(false);
|
|
5242
|
+
}
|
|
5243
|
+
};
|
|
5244
|
+
var handleMouseUp = function (event) {
|
|
5245
|
+
if (!dropdownToggleRef.current || !dropdownMenuRef.current) {
|
|
5246
|
+
return;
|
|
5247
|
+
}
|
|
5248
|
+
if (dropdownToggleRef.current.contains(event.target)) {
|
|
5249
|
+
return;
|
|
5250
|
+
}
|
|
5251
|
+
if (autoClose === true ||
|
|
5252
|
+
(autoClose === 'inside' && dropdownMenuRef.current.contains(event.target)) ||
|
|
5253
|
+
(autoClose === 'outside' && !dropdownMenuRef.current.contains(event.target))) {
|
|
5254
|
+
setTimeout(function () { return setVisible(false); }, 1);
|
|
5255
|
+
return;
|
|
5256
|
+
}
|
|
5257
|
+
};
|
|
5258
|
+
return (React.createElement(CDropdownContext.Provider, { value: contextValues }, variant === 'input-group' ? (React.createElement(React.Fragment, null, children)) : (React.createElement(Component, __assign({ className: classNames(variant === 'nav-item' ? 'nav-item dropdown' : variant, (_b = {
|
|
5259
|
+
'dropdown-center': direction === 'center',
|
|
5260
|
+
'dropup dropup-center': direction === 'dropup-center'
|
|
5261
|
+
},
|
|
5262
|
+
_b["".concat(direction)] = direction && direction !== 'center' && direction !== 'dropup-center',
|
|
5263
|
+
_b.show = _visible,
|
|
5264
|
+
_b), className) }, rest, { ref: forkedRef }), children))));
|
|
5637
5265
|
});
|
|
5638
5266
|
var alignmentDirection = PropTypes.oneOf(['start', 'end']);
|
|
5639
5267
|
CDropdown.propTypes = {
|
|
5640
|
-
// @ts-expect-error TODO: we have to find a solution
|
|
5641
5268
|
alignment: PropTypes.oneOfType([
|
|
5642
5269
|
alignmentDirection,
|
|
5643
|
-
PropTypes.shape({ xs: alignmentDirection }),
|
|
5644
|
-
PropTypes.shape({ sm: alignmentDirection }),
|
|
5645
|
-
PropTypes.shape({ md: alignmentDirection }),
|
|
5646
|
-
PropTypes.shape({ lg: alignmentDirection }),
|
|
5647
|
-
PropTypes.shape({ xl: alignmentDirection }),
|
|
5648
|
-
PropTypes.shape({ xxl: alignmentDirection }),
|
|
5270
|
+
PropTypes.shape({ xs: alignmentDirection.isRequired }),
|
|
5271
|
+
PropTypes.shape({ sm: alignmentDirection.isRequired }),
|
|
5272
|
+
PropTypes.shape({ md: alignmentDirection.isRequired }),
|
|
5273
|
+
PropTypes.shape({ lg: alignmentDirection.isRequired }),
|
|
5274
|
+
PropTypes.shape({ xl: alignmentDirection.isRequired }),
|
|
5275
|
+
PropTypes.shape({ xxl: alignmentDirection.isRequired }),
|
|
5649
5276
|
]),
|
|
5650
5277
|
autoClose: PropTypes.oneOfType([
|
|
5651
5278
|
PropTypes.bool,
|
|
@@ -5656,6 +5283,7 @@ CDropdown.propTypes = {
|
|
|
5656
5283
|
component: PropTypes.elementType,
|
|
5657
5284
|
dark: PropTypes.bool,
|
|
5658
5285
|
direction: PropTypes.oneOf(['center', 'dropup', 'dropup-center', 'dropend', 'dropstart']),
|
|
5286
|
+
offset: PropTypes.any,
|
|
5659
5287
|
onHide: PropTypes.func,
|
|
5660
5288
|
onShow: PropTypes.func,
|
|
5661
5289
|
placement: placementPropType,
|
|
@@ -5668,7 +5296,7 @@ CDropdown.displayName = 'CDropdown';
|
|
|
5668
5296
|
|
|
5669
5297
|
var CDropdownDivider = forwardRef(function (_a, ref) {
|
|
5670
5298
|
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
5671
|
-
return
|
|
5299
|
+
return React.createElement("hr", __assign({ className: classNames('dropdown-divider', className) }, rest, { ref: ref }));
|
|
5672
5300
|
});
|
|
5673
5301
|
CDropdownDivider.propTypes = {
|
|
5674
5302
|
className: PropTypes.string,
|
|
@@ -5677,7 +5305,7 @@ CDropdownDivider.displayName = 'CDropdownDivider';
|
|
|
5677
5305
|
|
|
5678
5306
|
var CDropdownHeader = forwardRef(function (_a, ref) {
|
|
5679
5307
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'h6' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5680
|
-
return (
|
|
5308
|
+
return (React.createElement(Component, __assign({ className: classNames('dropdown-header', className) }, rest, { ref: ref }), children));
|
|
5681
5309
|
});
|
|
5682
5310
|
CDropdownHeader.propTypes = {
|
|
5683
5311
|
children: PropTypes.node,
|
|
@@ -5688,7 +5316,7 @@ CDropdownHeader.displayName = 'CDropdownHeader';
|
|
|
5688
5316
|
|
|
5689
5317
|
var CDropdownItem = forwardRef(function (_a, ref) {
|
|
5690
5318
|
var children = _a.children, className = _a.className, _b = _a.component, component = _b === void 0 ? 'a' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5691
|
-
return (
|
|
5319
|
+
return (React.createElement(CLink, __assign({ className: classNames('dropdown-item', className), component: component }, rest, { ref: ref }), children));
|
|
5692
5320
|
});
|
|
5693
5321
|
CDropdownItem.propTypes = {
|
|
5694
5322
|
children: PropTypes.node,
|
|
@@ -5699,7 +5327,7 @@ CDropdownItem.displayName = 'CDropdownItem';
|
|
|
5699
5327
|
|
|
5700
5328
|
var CDropdownItemPlain = forwardRef(function (_a, ref) {
|
|
5701
5329
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'span' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5702
|
-
return (
|
|
5330
|
+
return (React.createElement(Component, __assign({ className: classNames('dropdown-item-text', className) }, rest, { ref: ref }), children));
|
|
5703
5331
|
});
|
|
5704
5332
|
CDropdownItemPlain.propTypes = {
|
|
5705
5333
|
children: PropTypes.node,
|
|
@@ -5720,74 +5348,23 @@ var alignmentClassNames = function (alignment) {
|
|
|
5720
5348
|
}
|
|
5721
5349
|
return classNames;
|
|
5722
5350
|
};
|
|
5723
|
-
var CDropdownMenu = function (_a) {
|
|
5351
|
+
var CDropdownMenu = forwardRef(function (_a, ref) {
|
|
5724
5352
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'ul' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5725
|
-
var _c = useContext(CDropdownContext), alignment = _c.alignment,
|
|
5726
|
-
var
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
visible && window.addEventListener('keyup', handleKeyup);
|
|
5730
|
-
return function () {
|
|
5731
|
-
window.removeEventListener('mouseup', handleMouseUp);
|
|
5732
|
-
window.removeEventListener('keyup', handleKeyup);
|
|
5733
|
-
};
|
|
5734
|
-
}, [visible]);
|
|
5735
|
-
var handleKeyup = function (event) {
|
|
5736
|
-
if (autoClose === false) {
|
|
5737
|
-
return;
|
|
5738
|
-
}
|
|
5739
|
-
if (event.key === 'Escape') {
|
|
5740
|
-
setVisible(false);
|
|
5741
|
-
}
|
|
5742
|
-
};
|
|
5743
|
-
var handleMouseUp = function (event) {
|
|
5744
|
-
var _a, _b;
|
|
5745
|
-
if (dropdownToggleRef && dropdownToggleRef.current.contains(event.target)) {
|
|
5746
|
-
return;
|
|
5747
|
-
}
|
|
5748
|
-
if (autoClose === true ||
|
|
5749
|
-
(autoClose === 'inside' && ((_a = dropdownMenuRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) ||
|
|
5750
|
-
(autoClose === 'outside' && !((_b = dropdownMenuRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target)))) {
|
|
5751
|
-
setTimeout(function () { return setVisible(false); }, 1);
|
|
5752
|
-
return;
|
|
5753
|
-
}
|
|
5754
|
-
};
|
|
5755
|
-
var _placement = placement;
|
|
5756
|
-
if (direction === 'center') {
|
|
5757
|
-
_placement = 'bottom';
|
|
5758
|
-
}
|
|
5759
|
-
if (direction === 'dropup') {
|
|
5760
|
-
_placement = isRTL(dropdownMenuRef.current) ? 'top-end' : 'top-start';
|
|
5761
|
-
}
|
|
5762
|
-
if (direction === 'dropup-center') {
|
|
5763
|
-
_placement = 'top';
|
|
5764
|
-
}
|
|
5765
|
-
if (direction === 'dropend') {
|
|
5766
|
-
_placement = isRTL(dropdownMenuRef.current) ? 'left-start' : 'right-start';
|
|
5767
|
-
}
|
|
5768
|
-
if (direction === 'dropstart') {
|
|
5769
|
-
_placement = isRTL(dropdownMenuRef.current) ? 'right-start' : 'left-start';
|
|
5770
|
-
}
|
|
5771
|
-
if (alignment === 'end') {
|
|
5772
|
-
_placement = isRTL(dropdownMenuRef.current) ? 'bottom-start' : 'bottom-end';
|
|
5773
|
-
}
|
|
5774
|
-
var dropdownMenuComponent = function (style, ref) { return (React__default.createElement(CConditionalPortal, { portal: portal !== null && portal !== void 0 ? portal : false },
|
|
5775
|
-
React__default.createElement(Component, __assign({ className: classNames('dropdown-menu', {
|
|
5353
|
+
var _c = useContext(CDropdownContext), alignment = _c.alignment, dark = _c.dark, dropdownMenuRef = _c.dropdownMenuRef, popper = _c.popper, portal = _c.portal, visible = _c.visible;
|
|
5354
|
+
var forkedRef = useForkedRef(ref, dropdownMenuRef);
|
|
5355
|
+
return (React.createElement(CConditionalPortal, { portal: portal !== null && portal !== void 0 ? portal : false },
|
|
5356
|
+
React.createElement(Component, __assign({ className: classNames('dropdown-menu', {
|
|
5776
5357
|
'dropdown-menu-dark': dark,
|
|
5777
5358
|
show: visible,
|
|
5778
|
-
}, alignment && alignmentClassNames(alignment), className), ref:
|
|
5779
|
-
?
|
|
5780
|
-
if (
|
|
5781
|
-
return
|
|
5359
|
+
}, alignment && alignmentClassNames(alignment), className), ref: forkedRef, role: "menu", "aria-hidden": !visible }, (!popper && { 'data-coreui-popper': 'static' }), rest), Component === 'ul'
|
|
5360
|
+
? React.Children.map(children, function (child, index) {
|
|
5361
|
+
if (React.isValidElement(child)) {
|
|
5362
|
+
return React.createElement("li", { key: index }, React.cloneElement(child));
|
|
5782
5363
|
}
|
|
5783
5364
|
return;
|
|
5784
5365
|
})
|
|
5785
|
-
: children)));
|
|
5786
|
-
|
|
5787
|
-
var ref = _a.ref, style = _a.style;
|
|
5788
|
-
return dropdownMenuComponent(style, ref);
|
|
5789
|
-
})) : (dropdownMenuComponent());
|
|
5790
|
-
};
|
|
5366
|
+
: children)));
|
|
5367
|
+
});
|
|
5791
5368
|
CDropdownMenu.propTypes = {
|
|
5792
5369
|
children: PropTypes.node,
|
|
5793
5370
|
className: PropTypes.string,
|
|
@@ -5797,7 +5374,7 @@ CDropdownMenu.displayName = 'CDropdownMenu';
|
|
|
5797
5374
|
|
|
5798
5375
|
var CDropdownToggle = function (_a) {
|
|
5799
5376
|
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"]);
|
|
5800
|
-
var _d = useContext(CDropdownContext), dropdownToggleRef = _d.dropdownToggleRef,
|
|
5377
|
+
var _d = useContext(CDropdownContext), dropdownToggleRef = _d.dropdownToggleRef, variant = _d.variant, visible = _d.visible, setVisible = _d.setVisible;
|
|
5801
5378
|
var triggers = __assign(__assign({}, ((trigger === 'click' || trigger.includes('click')) && {
|
|
5802
5379
|
onClick: function (event) {
|
|
5803
5380
|
event.preventDefault();
|
|
@@ -5813,22 +5390,18 @@ var CDropdownToggle = function (_a) {
|
|
|
5813
5390
|
'nav-link': variant === 'nav-item',
|
|
5814
5391
|
}, className), 'aria-expanded': visible }, (!rest.disabled && __assign({}, triggers)));
|
|
5815
5392
|
// We use any because Toggler can be `a` as well as `button`.
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
return (React__default.createElement(React__default.Fragment, null, React__default.cloneElement(children, __assign(__assign({ 'aria-expanded': visible }, (!rest.disabled && __assign({}, triggers))), { ref: useForkedRef(ref, dropdownToggleRef) }))));
|
|
5393
|
+
var Toggler = function () {
|
|
5394
|
+
if (custom && React.isValidElement(children)) {
|
|
5395
|
+
return (React.createElement(React.Fragment, null, React.cloneElement(children, __assign(__assign({ 'aria-expanded': visible }, (!rest.disabled && __assign({}, triggers))), { ref: dropdownToggleRef }))));
|
|
5820
5396
|
}
|
|
5821
5397
|
if (variant === 'nav-item') {
|
|
5822
|
-
return (
|
|
5398
|
+
return (React.createElement("a", __assign({ href: "#" }, togglerProps, { ref: dropdownToggleRef }), children));
|
|
5823
5399
|
}
|
|
5824
|
-
return (
|
|
5400
|
+
return (React.createElement(CButton, __assign({ type: "button" }, togglerProps, { tabIndex: 0 }, rest, { ref: dropdownToggleRef }),
|
|
5825
5401
|
children,
|
|
5826
|
-
split &&
|
|
5402
|
+
split && React.createElement("span", { className: "visually-hidden" }, "Toggle Dropdown")));
|
|
5827
5403
|
};
|
|
5828
|
-
return
|
|
5829
|
-
var ref = _a.ref;
|
|
5830
|
-
return Toggler(ref);
|
|
5831
|
-
}) : Toggler(dropdownToggleRef);
|
|
5404
|
+
return React.createElement(Toggler, null);
|
|
5832
5405
|
};
|
|
5833
5406
|
CDropdownToggle.propTypes = {
|
|
5834
5407
|
caret: PropTypes.bool,
|
|
@@ -5843,7 +5416,7 @@ CDropdownToggle.displayName = 'CDropdownToggle';
|
|
|
5843
5416
|
var CFooter = forwardRef(function (_a, ref) {
|
|
5844
5417
|
var _b;
|
|
5845
5418
|
var children = _a.children, className = _a.className, position = _a.position, rest = __rest(_a, ["children", "className", "position"]);
|
|
5846
|
-
return (
|
|
5419
|
+
return (React.createElement("div", __assign({ className: classNames('footer', (_b = {}, _b["footer-".concat(position)] = position, _b), className) }, rest, { ref: ref }), children));
|
|
5847
5420
|
});
|
|
5848
5421
|
CFooter.propTypes = {
|
|
5849
5422
|
children: PropTypes.node,
|
|
@@ -5854,7 +5427,7 @@ CFooter.displayName = 'CFooter';
|
|
|
5854
5427
|
|
|
5855
5428
|
var CForm = forwardRef(function (_a, ref) {
|
|
5856
5429
|
var children = _a.children, className = _a.className, validated = _a.validated, rest = __rest(_a, ["children", "className", "validated"]);
|
|
5857
|
-
return (
|
|
5430
|
+
return (React.createElement("form", __assign({ className: classNames({ 'was-validated': validated }, className) || undefined }, rest, { ref: ref }), children));
|
|
5858
5431
|
});
|
|
5859
5432
|
CForm.propTypes = {
|
|
5860
5433
|
children: PropTypes.node,
|
|
@@ -5866,7 +5439,7 @@ CForm.displayName = 'CForm';
|
|
|
5866
5439
|
var CFormFeedback = forwardRef(function (_a, ref) {
|
|
5867
5440
|
var _b;
|
|
5868
5441
|
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"]);
|
|
5869
|
-
return (
|
|
5442
|
+
return (React.createElement(Component, __assign({ className: classNames((_b = {},
|
|
5870
5443
|
_b["invalid-".concat(tooltip ? 'tooltip' : 'feedback')] = invalid,
|
|
5871
5444
|
_b["valid-".concat(tooltip ? 'tooltip' : 'feedback')] = valid,
|
|
5872
5445
|
_b), className) }, rest, { ref: ref }), children));
|
|
@@ -5883,10 +5456,10 @@ CFormFeedback.displayName = 'CFormFeedback';
|
|
|
5883
5456
|
|
|
5884
5457
|
var CFormControlValidation = function (_a) {
|
|
5885
5458
|
var describedby = _a.describedby, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, invalid = _a.invalid, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid;
|
|
5886
|
-
return (
|
|
5887
|
-
feedback && (valid || invalid) && (
|
|
5888
|
-
feedbackInvalid && (
|
|
5889
|
-
feedbackValid && (
|
|
5459
|
+
return (React.createElement(React.Fragment, null,
|
|
5460
|
+
feedback && (valid || invalid) && (React.createElement(CFormFeedback, __assign({}, (invalid && { id: describedby }), { invalid: invalid, tooltip: tooltipFeedback, valid: valid }), feedback)),
|
|
5461
|
+
feedbackInvalid && (React.createElement(CFormFeedback, { id: describedby, invalid: true, tooltip: tooltipFeedback }, feedbackInvalid)),
|
|
5462
|
+
feedbackValid && (React.createElement(CFormFeedback, { valid: true, tooltip: tooltipFeedback }, feedbackValid))));
|
|
5890
5463
|
};
|
|
5891
5464
|
CFormControlValidation.propTypes = {
|
|
5892
5465
|
describedby: PropTypes.string,
|
|
@@ -5901,7 +5474,7 @@ CFormControlValidation.displayName = 'CFormControlValidation';
|
|
|
5901
5474
|
|
|
5902
5475
|
var CFormLabel = forwardRef(function (_a, ref) {
|
|
5903
5476
|
var children = _a.children, className = _a.className, customClassName = _a.customClassName, rest = __rest(_a, ["children", "className", "customClassName"]);
|
|
5904
|
-
return (
|
|
5477
|
+
return (React.createElement("label", __assign({ className: customClassName !== null && customClassName !== void 0 ? customClassName : classNames('form-label', className) }, rest, { ref: ref }), children));
|
|
5905
5478
|
});
|
|
5906
5479
|
CFormLabel.propTypes = {
|
|
5907
5480
|
children: PropTypes.node,
|
|
@@ -5919,15 +5492,15 @@ var CFormCheck = forwardRef(function (_a, ref) {
|
|
|
5919
5492
|
inputRef.current.indeterminate = indeterminate;
|
|
5920
5493
|
}
|
|
5921
5494
|
}, [indeterminate, inputRef.current]);
|
|
5922
|
-
var FormControl = function () { return (
|
|
5495
|
+
var FormControl = function () { return (React.createElement("input", __assign({ type: type, className: classNames(button ? 'btn-check' : 'form-check-input', {
|
|
5923
5496
|
'is-invalid': invalid,
|
|
5924
5497
|
'is-valid': valid,
|
|
5925
5498
|
'me-2': hitArea,
|
|
5926
5499
|
}), id: id }, rest, { ref: forkedRef }))); };
|
|
5927
|
-
var FormValidation = function () { return (
|
|
5500
|
+
var FormValidation = function () { return (React.createElement(CFormControlValidation, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingLabel: floatingLabel, invalid: invalid, tooltipFeedback: tooltipFeedback, valid: valid })); };
|
|
5928
5501
|
var FormLabel = function () {
|
|
5929
5502
|
var _a;
|
|
5930
|
-
return (
|
|
5503
|
+
return (React.createElement(CFormLabel, __assign({ customClassName: classNames(button
|
|
5931
5504
|
? classNames('btn', button.variant ? "btn-".concat(button.variant, "-").concat(button.color) : "btn-".concat(button.color), (_a = {},
|
|
5932
5505
|
_a["btn-".concat(button.size)] = button.size,
|
|
5933
5506
|
_a), "".concat(button.shape))
|
|
@@ -5935,35 +5508,35 @@ var CFormCheck = forwardRef(function (_a, ref) {
|
|
|
5935
5508
|
};
|
|
5936
5509
|
var FormCheck = function () {
|
|
5937
5510
|
if (button) {
|
|
5938
|
-
return (
|
|
5939
|
-
|
|
5940
|
-
label &&
|
|
5941
|
-
|
|
5511
|
+
return (React.createElement(React.Fragment, null,
|
|
5512
|
+
React.createElement(FormControl, null),
|
|
5513
|
+
label && React.createElement(FormLabel, null),
|
|
5514
|
+
React.createElement(FormValidation, null)));
|
|
5942
5515
|
}
|
|
5943
5516
|
if (label) {
|
|
5944
|
-
return hitArea ? (
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5517
|
+
return hitArea ? (React.createElement(React.Fragment, null,
|
|
5518
|
+
React.createElement(FormControl, null),
|
|
5519
|
+
React.createElement(CFormLabel, __assign({ customClassName: classNames('form-check-label stretched-link', className) }, (id && { htmlFor: id })), label),
|
|
5520
|
+
React.createElement(FormValidation, null))) : (React.createElement("div", { className: classNames('form-check', {
|
|
5948
5521
|
'form-check-inline': inline,
|
|
5949
5522
|
'form-check-reverse': reverse,
|
|
5950
5523
|
'is-invalid': invalid,
|
|
5951
5524
|
'is-valid': valid,
|
|
5952
5525
|
}, className) },
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5526
|
+
React.createElement(FormControl, null),
|
|
5527
|
+
React.createElement(FormLabel, null),
|
|
5528
|
+
React.createElement(FormValidation, null)));
|
|
5956
5529
|
}
|
|
5957
|
-
return
|
|
5530
|
+
return React.createElement(FormControl, null);
|
|
5958
5531
|
};
|
|
5959
|
-
return
|
|
5532
|
+
return React.createElement(FormCheck, null);
|
|
5960
5533
|
});
|
|
5961
5534
|
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]), reverse: PropTypes.bool, type: PropTypes.oneOf(['checkbox', 'radio']) }, CFormControlValidation.propTypes);
|
|
5962
5535
|
CFormCheck.displayName = 'CFormCheck';
|
|
5963
5536
|
|
|
5964
5537
|
var CFormFloating = forwardRef(function (_a, ref) {
|
|
5965
5538
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
5966
|
-
return (
|
|
5539
|
+
return (React.createElement("div", __assign({ className: classNames('form-floating', className) }, rest, { ref: ref }), children));
|
|
5967
5540
|
});
|
|
5968
5541
|
CFormFloating.propTypes = {
|
|
5969
5542
|
children: PropTypes.node,
|
|
@@ -5973,7 +5546,7 @@ CFormFloating.displayName = 'CFormFloating';
|
|
|
5973
5546
|
|
|
5974
5547
|
var CFormText = forwardRef(function (_a, ref) {
|
|
5975
5548
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'div' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5976
|
-
return (
|
|
5549
|
+
return (React.createElement(Component, __assign({ className: classNames('form-text', className) }, rest, { ref: ref }), children));
|
|
5977
5550
|
});
|
|
5978
5551
|
CFormText.propTypes = {
|
|
5979
5552
|
children: PropTypes.node,
|
|
@@ -5984,16 +5557,16 @@ CFormText.displayName = 'CFormText';
|
|
|
5984
5557
|
|
|
5985
5558
|
var CFormControlWrapper = function (_a) {
|
|
5986
5559
|
var children = _a.children, describedby = _a.describedby, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingClassName = _a.floatingClassName, floatingLabel = _a.floatingLabel, id = _a.id, invalid = _a.invalid, label = _a.label, text = _a.text, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid;
|
|
5987
|
-
var FormControlValidation = function () { return (
|
|
5988
|
-
return floatingLabel ? (
|
|
5560
|
+
var FormControlValidation = function () { return (React.createElement(CFormControlValidation, { describedby: describedby, feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingLabel: floatingLabel, invalid: invalid, tooltipFeedback: tooltipFeedback, valid: valid })); };
|
|
5561
|
+
return floatingLabel ? (React.createElement(CFormFloating, { className: floatingClassName },
|
|
5989
5562
|
children,
|
|
5990
|
-
|
|
5991
|
-
text &&
|
|
5992
|
-
|
|
5993
|
-
label &&
|
|
5563
|
+
React.createElement(CFormLabel, { htmlFor: id }, label || floatingLabel),
|
|
5564
|
+
text && React.createElement(CFormText, { id: describedby }, text),
|
|
5565
|
+
React.createElement(FormControlValidation, null))) : (React.createElement(React.Fragment, null,
|
|
5566
|
+
label && React.createElement(CFormLabel, { htmlFor: id }, label),
|
|
5994
5567
|
children,
|
|
5995
|
-
text &&
|
|
5996
|
-
|
|
5568
|
+
text && React.createElement(CFormText, { id: describedby }, text),
|
|
5569
|
+
React.createElement(FormControlValidation, null)));
|
|
5997
5570
|
};
|
|
5998
5571
|
CFormControlWrapper.propTypes = __assign({ children: PropTypes.node, floatingClassName: PropTypes.string, floatingLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.string]), label: PropTypes.oneOfType([PropTypes.node, PropTypes.string]), text: PropTypes.oneOfType([PropTypes.node, PropTypes.string]) }, CFormControlValidation.propTypes);
|
|
5999
5572
|
CFormControlWrapper.displayName = 'CFormControlWrapper';
|
|
@@ -6006,8 +5579,8 @@ var CFormInput = forwardRef(function (_a, ref) {
|
|
|
6006
5579
|
var timeOutId = setTimeout(function () { return value && onChange && onChange(value); }, typeof delay === 'number' ? delay : 500);
|
|
6007
5580
|
return function () { return clearTimeout(timeOutId); };
|
|
6008
5581
|
}, [value]);
|
|
6009
|
-
return (
|
|
6010
|
-
|
|
5582
|
+
return (React.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingClassName: floatingClassName, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
5583
|
+
React.createElement("input", __assign({ className: classNames(plainText ? 'form-control-plaintext' : 'form-control', (_b = {},
|
|
6011
5584
|
_b["form-control-".concat(size)] = size,
|
|
6012
5585
|
_b['form-control-color'] = type === 'color',
|
|
6013
5586
|
_b['is-invalid'] = invalid,
|
|
@@ -6019,9 +5592,9 @@ CFormInput.displayName = 'CFormInput';
|
|
|
6019
5592
|
|
|
6020
5593
|
var CFormRange = forwardRef(function (_a, ref) {
|
|
6021
5594
|
var className = _a.className, label = _a.label, rest = __rest(_a, ["className", "label"]);
|
|
6022
|
-
return (
|
|
6023
|
-
label &&
|
|
6024
|
-
|
|
5595
|
+
return (React.createElement(React.Fragment, null,
|
|
5596
|
+
label && React.createElement(CFormLabel, { htmlFor: rest.id }, label),
|
|
5597
|
+
React.createElement("input", __assign({ type: "range", className: classNames('form-range', className) }, rest, { ref: ref }))));
|
|
6025
5598
|
});
|
|
6026
5599
|
CFormRange.propTypes = {
|
|
6027
5600
|
className: PropTypes.string,
|
|
@@ -6032,14 +5605,14 @@ CFormRange.displayName = 'CFormRange';
|
|
|
6032
5605
|
var CFormSelect = forwardRef(function (_a, ref) {
|
|
6033
5606
|
var _b;
|
|
6034
5607
|
var children = _a.children, className = _a.className, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingClassName = _a.floatingClassName, floatingLabel = _a.floatingLabel, htmlSize = _a.htmlSize, id = _a.id, invalid = _a.invalid, label = _a.label, options = _a.options, size = _a.size, text = _a.text, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, rest = __rest(_a, ["children", "className", "feedback", "feedbackInvalid", "feedbackValid", "floatingClassName", "floatingLabel", "htmlSize", "id", "invalid", "label", "options", "size", "text", "tooltipFeedback", "valid"]);
|
|
6035
|
-
return (
|
|
6036
|
-
|
|
5608
|
+
return (React.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingClassName: floatingClassName, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
5609
|
+
React.createElement("select", __assign({ id: id, className: classNames('form-select', (_b = {},
|
|
6037
5610
|
_b["form-select-".concat(size)] = size,
|
|
6038
5611
|
_b['is-invalid'] = invalid,
|
|
6039
5612
|
_b['is-valid'] = valid,
|
|
6040
5613
|
_b), className), size: htmlSize }, rest, { ref: ref }), options
|
|
6041
5614
|
? options.map(function (option, index) {
|
|
6042
|
-
return (
|
|
5615
|
+
return (React.createElement("option", __assign({}, (typeof option === 'object' &&
|
|
6043
5616
|
option.disabled && { disabled: option.disabled }), (typeof option === 'object' &&
|
|
6044
5617
|
option.value !== undefined && { value: option.value }), { key: index }), typeof option === 'string' ? option : option.label));
|
|
6045
5618
|
})
|
|
@@ -6051,18 +5624,18 @@ CFormSelect.displayName = 'CFormSelect';
|
|
|
6051
5624
|
var CFormSwitch = forwardRef(function (_a, ref) {
|
|
6052
5625
|
var _b;
|
|
6053
5626
|
var className = _a.className, id = _a.id, invalid = _a.invalid, label = _a.label, reverse = _a.reverse, size = _a.size, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest(_a, ["className", "id", "invalid", "label", "reverse", "size", "type", "valid"]);
|
|
6054
|
-
return (
|
|
5627
|
+
return (React.createElement("div", { className: classNames('form-check form-switch', (_b = {
|
|
6055
5628
|
'form-check-reverse': reverse
|
|
6056
5629
|
},
|
|
6057
5630
|
_b["form-switch-".concat(size)] = size,
|
|
6058
5631
|
_b['is-invalid'] = invalid,
|
|
6059
5632
|
_b['is-valid'] = valid,
|
|
6060
5633
|
_b), className) },
|
|
6061
|
-
|
|
5634
|
+
React.createElement("input", __assign({ type: type, className: classNames('form-check-input', {
|
|
6062
5635
|
'is-invalid': invalid,
|
|
6063
5636
|
'is-valid': valid,
|
|
6064
5637
|
}), id: id }, rest, { ref: ref })),
|
|
6065
|
-
label && (
|
|
5638
|
+
label && (React.createElement(CFormLabel, __assign({ customClassName: "form-check-label" }, (id && { htmlFor: id })), label))));
|
|
6066
5639
|
});
|
|
6067
5640
|
CFormSwitch.propTypes = {
|
|
6068
5641
|
className: PropTypes.string,
|
|
@@ -6078,8 +5651,8 @@ CFormSwitch.displayName = 'CFormSwitch';
|
|
|
6078
5651
|
|
|
6079
5652
|
var CFormTextarea = forwardRef(function (_a, ref) {
|
|
6080
5653
|
var children = _a.children, className = _a.className, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingClassName = _a.floatingClassName, floatingLabel = _a.floatingLabel, id = _a.id, invalid = _a.invalid, label = _a.label, plainText = _a.plainText, text = _a.text, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, rest = __rest(_a, ["children", "className", "feedback", "feedbackInvalid", "feedbackValid", "floatingClassName", "floatingLabel", "id", "invalid", "label", "plainText", "text", "tooltipFeedback", "valid"]);
|
|
6081
|
-
return (
|
|
6082
|
-
|
|
5654
|
+
return (React.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingClassName: floatingClassName, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
5655
|
+
React.createElement("textarea", __assign({ className: classNames(plainText ? 'form-control-plaintext' : 'form-control', {
|
|
6083
5656
|
'is-invalid': invalid,
|
|
6084
5657
|
'is-valid': valid,
|
|
6085
5658
|
}, className), id: id }, rest, { ref: ref }), children)));
|
|
@@ -6090,7 +5663,7 @@ CFormTextarea.displayName = 'CFormTextarea';
|
|
|
6090
5663
|
var CInputGroup = forwardRef(function (_a, ref) {
|
|
6091
5664
|
var _b;
|
|
6092
5665
|
var children = _a.children, className = _a.className, size = _a.size, rest = __rest(_a, ["children", "className", "size"]);
|
|
6093
|
-
return (
|
|
5666
|
+
return (React.createElement("div", __assign({ className: classNames('input-group', (_b = {},
|
|
6094
5667
|
_b["input-group-".concat(size)] = size,
|
|
6095
5668
|
_b), className) }, rest, { ref: ref }), children));
|
|
6096
5669
|
});
|
|
@@ -6103,7 +5676,7 @@ CInputGroup.displayName = 'CInputGroup';
|
|
|
6103
5676
|
|
|
6104
5677
|
var CInputGroupText = forwardRef(function (_a, ref) {
|
|
6105
5678
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'span' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
6106
|
-
return (
|
|
5679
|
+
return (React.createElement(Component, __assign({ className: classNames('input-group-text', className) }, rest, { ref: ref }), children));
|
|
6107
5680
|
});
|
|
6108
5681
|
CInputGroupText.propTypes = {
|
|
6109
5682
|
children: PropTypes.node,
|
|
@@ -6148,7 +5721,7 @@ var CCol = forwardRef(function (_a, ref) {
|
|
|
6148
5721
|
}
|
|
6149
5722
|
}
|
|
6150
5723
|
});
|
|
6151
|
-
return (
|
|
5724
|
+
return (React.createElement("div", __assign({ className: classNames(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'col', className) }, rest, { ref: ref }), children));
|
|
6152
5725
|
});
|
|
6153
5726
|
var span = PropTypes.oneOfType([
|
|
6154
5727
|
PropTypes.bool,
|
|
@@ -6196,7 +5769,7 @@ var CContainer = forwardRef(function (_a, ref) {
|
|
|
6196
5769
|
delete rest[bp];
|
|
6197
5770
|
breakpoint && repsonsiveClassNames.push("container-".concat(bp));
|
|
6198
5771
|
});
|
|
6199
|
-
return (
|
|
5772
|
+
return (React.createElement("div", __assign({ className: classNames(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'container', className) }, rest, { ref: ref }), children));
|
|
6200
5773
|
});
|
|
6201
5774
|
CContainer.propTypes = {
|
|
6202
5775
|
children: PropTypes.node,
|
|
@@ -6240,7 +5813,7 @@ var CRow = forwardRef(function (_a, ref) {
|
|
|
6240
5813
|
}
|
|
6241
5814
|
}
|
|
6242
5815
|
});
|
|
6243
|
-
return (
|
|
5816
|
+
return (React.createElement("div", { className: classNames('row', repsonsiveClassNames, className), ref: ref }, children));
|
|
6244
5817
|
});
|
|
6245
5818
|
var bp = PropTypes.shape({
|
|
6246
5819
|
cols: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.string]),
|
|
@@ -6263,7 +5836,7 @@ CRow.displayName = 'CRow';
|
|
|
6263
5836
|
var CHeader = forwardRef(function (_a, ref) {
|
|
6264
5837
|
var _b;
|
|
6265
5838
|
var children = _a.children, className = _a.className, container = _a.container, position = _a.position, rest = __rest(_a, ["children", "className", "container", "position"]);
|
|
6266
|
-
return (
|
|
5839
|
+
return (React.createElement("div", __assign({ className: classNames('header', (_b = {}, _b["header-".concat(position)] = position, _b), className) }, rest, { ref: ref }), container ? (React.createElement("div", { className: typeof container === 'string' ? "container-".concat(container) : 'container' }, children)) : (React.createElement(React.Fragment, null, children))));
|
|
6267
5840
|
});
|
|
6268
5841
|
CHeader.propTypes = {
|
|
6269
5842
|
children: PropTypes.node,
|
|
@@ -6285,7 +5858,7 @@ CHeader.displayName = 'CHeader';
|
|
|
6285
5858
|
|
|
6286
5859
|
var CHeaderBrand = forwardRef(function (_a, ref) {
|
|
6287
5860
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'a' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6288
|
-
return (
|
|
5861
|
+
return (React.createElement(Component, __assign({ className: classNames('header-brand', className) }, rest, { ref: ref }), children));
|
|
6289
5862
|
});
|
|
6290
5863
|
CHeaderBrand.propTypes = {
|
|
6291
5864
|
children: PropTypes.node,
|
|
@@ -6296,7 +5869,7 @@ CHeaderBrand.displayName = 'CHeaderBrand';
|
|
|
6296
5869
|
|
|
6297
5870
|
var CHeaderDivider = forwardRef(function (_a, ref) {
|
|
6298
5871
|
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
6299
|
-
return
|
|
5872
|
+
return React.createElement("div", __assign({ className: classNames('header-divider', className) }, rest, { ref: ref }));
|
|
6300
5873
|
});
|
|
6301
5874
|
CHeaderDivider.propTypes = {
|
|
6302
5875
|
className: PropTypes.string,
|
|
@@ -6305,7 +5878,7 @@ CHeaderDivider.displayName = 'CHeaderDivider';
|
|
|
6305
5878
|
|
|
6306
5879
|
var CHeaderNav = forwardRef(function (_a, ref) {
|
|
6307
5880
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'ul' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6308
|
-
return (
|
|
5881
|
+
return (React.createElement(Component, __assign({ className: classNames('header-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
6309
5882
|
});
|
|
6310
5883
|
CHeaderNav.propTypes = {
|
|
6311
5884
|
children: PropTypes.node,
|
|
@@ -6316,7 +5889,7 @@ CHeaderNav.displayName = 'CHeaderNav';
|
|
|
6316
5889
|
|
|
6317
5890
|
var CHeaderText = forwardRef(function (_a, ref) {
|
|
6318
5891
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6319
|
-
return (
|
|
5892
|
+
return (React.createElement("span", __assign({ className: classNames('header-text', className) }, rest, { ref: ref }), children));
|
|
6320
5893
|
});
|
|
6321
5894
|
CHeaderText.propTypes = {
|
|
6322
5895
|
children: PropTypes.node,
|
|
@@ -6326,7 +5899,7 @@ CHeaderText.displayName = 'CHeaderText';
|
|
|
6326
5899
|
|
|
6327
5900
|
var CHeaderToggler = forwardRef(function (_a, ref) {
|
|
6328
5901
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6329
|
-
return (
|
|
5902
|
+
return (React.createElement("button", __assign({ type: "button", className: classNames('header-toggler', className) }, rest, { ref: ref }), children !== null && children !== void 0 ? children : React.createElement("span", { className: "header-toggler-icon" })));
|
|
6330
5903
|
});
|
|
6331
5904
|
CHeaderToggler.propTypes = {
|
|
6332
5905
|
children: PropTypes.node,
|
|
@@ -6337,7 +5910,7 @@ CHeaderToggler.displayName = 'CHeaderToggler';
|
|
|
6337
5910
|
var CImage = forwardRef(function (_a, ref) {
|
|
6338
5911
|
var _b;
|
|
6339
5912
|
var align = _a.align, className = _a.className, fluid = _a.fluid, rounded = _a.rounded, thumbnail = _a.thumbnail, rest = __rest(_a, ["align", "className", "fluid", "rounded", "thumbnail"]);
|
|
6340
|
-
return (
|
|
5913
|
+
return (React.createElement("img", __assign({ className: classNames((_b = {},
|
|
6341
5914
|
_b["float-".concat(align)] = align && (align === 'start' || align === 'end'),
|
|
6342
5915
|
_b['d-block mx-auto'] = align && align === 'center',
|
|
6343
5916
|
_b['img-fluid'] = fluid,
|
|
@@ -6357,7 +5930,7 @@ CImage.displayName = 'CImage';
|
|
|
6357
5930
|
var CListGroup = forwardRef(function (_a, ref) {
|
|
6358
5931
|
var _b;
|
|
6359
5932
|
var children = _a.children, className = _a.className, _c = _a.component, Component = _c === void 0 ? 'ul' : _c, flush = _a.flush, layout = _a.layout;
|
|
6360
|
-
return (
|
|
5933
|
+
return (React.createElement(Component, { className: classNames('list-group', (_b = {
|
|
6361
5934
|
'list-group-flush': flush
|
|
6362
5935
|
},
|
|
6363
5936
|
_b["list-group-".concat(layout)] = layout,
|
|
@@ -6389,7 +5962,7 @@ var CListGroupItem = forwardRef(function (_a, ref) {
|
|
|
6389
5962
|
component: component,
|
|
6390
5963
|
ref: ref,
|
|
6391
5964
|
})), (active && { 'aria-current': true })), (disabled && { 'aria-disabled': true })), rest);
|
|
6392
|
-
return (
|
|
5965
|
+
return (React.createElement(Component, __assign({ className: classNames('list-group-item', (_b = {},
|
|
6393
5966
|
_b["list-group-item-".concat(color)] = color,
|
|
6394
5967
|
_b['list-group-item-action'] = component === 'a' || component === 'button',
|
|
6395
5968
|
_b.active = active,
|
|
@@ -6408,7 +5981,7 @@ CListGroupItem.displayName = 'CListGroupItem';
|
|
|
6408
5981
|
|
|
6409
5982
|
var CModalContent = forwardRef(function (_a, ref) {
|
|
6410
5983
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6411
|
-
return (
|
|
5984
|
+
return (React.createElement("div", __assign({ className: classNames('modal-content', className) }, rest, { ref: ref }), children));
|
|
6412
5985
|
});
|
|
6413
5986
|
CModalContent.propTypes = {
|
|
6414
5987
|
children: PropTypes.node,
|
|
@@ -6419,7 +5992,7 @@ CModalContent.displayName = 'CModalContent';
|
|
|
6419
5992
|
var CModalDialog = forwardRef(function (_a, ref) {
|
|
6420
5993
|
var _b;
|
|
6421
5994
|
var children = _a.children, alignment = _a.alignment, className = _a.className, fullscreen = _a.fullscreen, scrollable = _a.scrollable, size = _a.size, rest = __rest(_a, ["children", "alignment", "className", "fullscreen", "scrollable", "size"]);
|
|
6422
|
-
return (
|
|
5995
|
+
return (React.createElement("div", __assign({ className: classNames('modal-dialog', (_b = {
|
|
6423
5996
|
'modal-dialog-centered': alignment === 'center'
|
|
6424
5997
|
},
|
|
6425
5998
|
_b[typeof fullscreen === 'boolean'
|
|
@@ -6515,18 +6088,18 @@ var CModal = forwardRef(function (_a, ref) {
|
|
|
6515
6088
|
handleDismiss();
|
|
6516
6089
|
}
|
|
6517
6090
|
};
|
|
6518
|
-
return (
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6091
|
+
return (React.createElement(React.Fragment, null,
|
|
6092
|
+
React.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: modalRef, onEnter: onShow, onExit: onClose, unmountOnExit: unmountOnClose, timeout: transition ? duration : 0 }, function (state) { return (React.createElement(CConditionalPortal, { portal: portal },
|
|
6093
|
+
React.createElement(CModalContext.Provider, { value: contextValues },
|
|
6094
|
+
React.createElement("div", { className: classNames('modal', {
|
|
6522
6095
|
'modal-static': staticBackdrop,
|
|
6523
6096
|
fade: transition,
|
|
6524
6097
|
show: state === 'entered',
|
|
6525
6098
|
}, className), tabIndex: -1, role: "dialog", style: __assign({}, (state !== 'exited' && { display: 'block' })), ref: forkedRef },
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
backdrop && (
|
|
6529
|
-
|
|
6099
|
+
React.createElement(CModalDialog, { alignment: alignment, fullscreen: fullscreen, scrollable: scrollable, size: size },
|
|
6100
|
+
React.createElement(CModalContent, __assign({}, rest, { ref: modalContentRef }), children)))))); }),
|
|
6101
|
+
backdrop && (React.createElement(CConditionalPortal, { portal: portal },
|
|
6102
|
+
React.createElement(CBackdrop, { visible: _visible })))));
|
|
6530
6103
|
});
|
|
6531
6104
|
CModal.propTypes = {
|
|
6532
6105
|
alignment: PropTypes.oneOf(['top', 'center']),
|
|
@@ -6553,7 +6126,7 @@ CModal.displayName = 'CModal';
|
|
|
6553
6126
|
|
|
6554
6127
|
var CModalBody = forwardRef(function (_a, ref) {
|
|
6555
6128
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6556
|
-
return (
|
|
6129
|
+
return (React.createElement("div", __assign({ className: classNames('modal-body', className) }, rest, { ref: ref }), children));
|
|
6557
6130
|
});
|
|
6558
6131
|
CModalBody.propTypes = {
|
|
6559
6132
|
children: PropTypes.node,
|
|
@@ -6563,7 +6136,7 @@ CModalBody.displayName = 'CModalBody';
|
|
|
6563
6136
|
|
|
6564
6137
|
var CModalFooter = forwardRef(function (_a, ref) {
|
|
6565
6138
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6566
|
-
return (
|
|
6139
|
+
return (React.createElement("div", __assign({ className: classNames('modal-footer', className) }, rest, { ref: ref }), children));
|
|
6567
6140
|
});
|
|
6568
6141
|
CModalFooter.propTypes = {
|
|
6569
6142
|
children: PropTypes.node,
|
|
@@ -6574,9 +6147,9 @@ CModalFooter.displayName = 'CModalFooter';
|
|
|
6574
6147
|
var CModalHeader = forwardRef(function (_a, ref) {
|
|
6575
6148
|
var children = _a.children, className = _a.className, _b = _a.closeButton, closeButton = _b === void 0 ? true : _b, rest = __rest(_a, ["children", "className", "closeButton"]);
|
|
6576
6149
|
var setVisible = useContext(CModalContext).setVisible;
|
|
6577
|
-
return (
|
|
6150
|
+
return (React.createElement("div", __assign({ className: classNames('modal-header', className) }, rest, { ref: ref }),
|
|
6578
6151
|
children,
|
|
6579
|
-
closeButton &&
|
|
6152
|
+
closeButton && React.createElement(CCloseButton, { onClick: function () { return setVisible(false); } })));
|
|
6580
6153
|
});
|
|
6581
6154
|
CModalHeader.propTypes = {
|
|
6582
6155
|
children: PropTypes.node,
|
|
@@ -6587,7 +6160,7 @@ CModalHeader.displayName = 'CModalHeader';
|
|
|
6587
6160
|
|
|
6588
6161
|
var CModalTitle = forwardRef(function (_a, ref) {
|
|
6589
6162
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6590
|
-
return (
|
|
6163
|
+
return (React.createElement(Component, __assign({ className: classNames('modal-title', className) }, rest, { ref: ref }), children));
|
|
6591
6164
|
});
|
|
6592
6165
|
CModalTitle.propTypes = {
|
|
6593
6166
|
children: PropTypes.node,
|
|
@@ -6599,7 +6172,7 @@ CModalTitle.displayName = 'CModalTitle';
|
|
|
6599
6172
|
var CNav = forwardRef(function (_a, ref) {
|
|
6600
6173
|
var _b;
|
|
6601
6174
|
var children = _a.children, className = _a.className, _c = _a.component, Component = _c === void 0 ? 'ul' : _c, layout = _a.layout, variant = _a.variant, rest = __rest(_a, ["children", "className", "component", "layout", "variant"]);
|
|
6602
|
-
return (
|
|
6175
|
+
return (React.createElement(Component, __assign({ className: classNames('nav', (_b = {},
|
|
6603
6176
|
_b["nav-".concat(layout)] = layout,
|
|
6604
6177
|
_b["nav-".concat(variant)] = variant,
|
|
6605
6178
|
_b), className), role: "navigation" }, rest, { ref: ref }), children));
|
|
@@ -6615,7 +6188,7 @@ CNav.displayName = 'CNav';
|
|
|
6615
6188
|
|
|
6616
6189
|
var CNavGroupItems = forwardRef(function (_a, ref) {
|
|
6617
6190
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6618
|
-
return (
|
|
6191
|
+
return (React.createElement("ul", __assign({ className: classNames('nav-group-items', className) }, rest, { ref: ref }), children));
|
|
6619
6192
|
});
|
|
6620
6193
|
CNavGroupItems.propTypes = {
|
|
6621
6194
|
children: PropTypes.node,
|
|
@@ -6631,10 +6204,10 @@ var CSidebarNav = forwardRef(function (_a, ref) {
|
|
|
6631
6204
|
visibleGroup: visibleGroup,
|
|
6632
6205
|
setVisibleGroup: setVisibleGroup,
|
|
6633
6206
|
};
|
|
6634
|
-
return (
|
|
6635
|
-
|
|
6636
|
-
if (
|
|
6637
|
-
return
|
|
6207
|
+
return (React.createElement("ul", __assign({ className: classNames('sidebar-nav', className), ref: ref }, rest),
|
|
6208
|
+
React.createElement(CNavContext.Provider, { value: CNavContextValues }, React.Children.map(children, function (child, index) {
|
|
6209
|
+
if (React.isValidElement(child)) {
|
|
6210
|
+
return React.cloneElement(child, {
|
|
6638
6211
|
key: index,
|
|
6639
6212
|
idx: "".concat(index),
|
|
6640
6213
|
});
|
|
@@ -6690,13 +6263,13 @@ var CNavGroup = forwardRef(function (_a, ref) {
|
|
|
6690
6263
|
exiting: { display: 'block', height: height },
|
|
6691
6264
|
exited: { height: height },
|
|
6692
6265
|
};
|
|
6693
|
-
return (
|
|
6694
|
-
toggler && (
|
|
6695
|
-
|
|
6266
|
+
return (React.createElement("li", __assign({ className: classNames('nav-group', { show: _visible }, className) }, rest, { ref: ref }),
|
|
6267
|
+
toggler && (React.createElement("a", { className: "nav-link nav-group-toggle", onClick: function (event) { return handleTogglerOnCLick(event); } }, toggler)),
|
|
6268
|
+
React.createElement(Transition$1, { in: _visible, nodeRef: navItemsRef, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 300 }, function (state) { return (React.createElement("ul", { className: classNames('nav-group-items', {
|
|
6696
6269
|
compact: compact,
|
|
6697
|
-
}), style: __assign(__assign({}, style), transitionStyles[state]), ref: navItemsRef },
|
|
6698
|
-
if (
|
|
6699
|
-
return
|
|
6270
|
+
}), style: __assign(__assign({}, style), transitionStyles[state]), ref: navItemsRef }, React.Children.map(children, function (child, index) {
|
|
6271
|
+
if (React.isValidElement(child)) {
|
|
6272
|
+
return React.cloneElement(child, {
|
|
6700
6273
|
key: index,
|
|
6701
6274
|
idx: "".concat(idx, ".").concat(index),
|
|
6702
6275
|
});
|
|
@@ -6724,7 +6297,7 @@ var CNavLink = forwardRef(function (_a, ref) {
|
|
|
6724
6297
|
rest.active = (_a = navLinkRef.current) === null || _a === void 0 ? void 0 : _a.classList.contains('active');
|
|
6725
6298
|
idx && rest.active && setVisibleGroup(idx);
|
|
6726
6299
|
}, [rest.active, className]);
|
|
6727
|
-
return (
|
|
6300
|
+
return (React.createElement(CLink, __assign({ className: classNames('nav-link', className) }, rest, { ref: forkedRef }), children));
|
|
6728
6301
|
});
|
|
6729
6302
|
CNavLink.propTypes = {
|
|
6730
6303
|
children: PropTypes.node,
|
|
@@ -6735,7 +6308,7 @@ CNavLink.displayName = 'CNavLink';
|
|
|
6735
6308
|
|
|
6736
6309
|
var CNavItem = forwardRef(function (_a, ref) {
|
|
6737
6310
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6738
|
-
return (
|
|
6311
|
+
return (React.createElement("li", { className: classNames('nav-item', className), ref: ref }, rest.href || rest.to ? (React.createElement(CNavLink, __assign({ className: className }, rest), children)) : (children)));
|
|
6739
6312
|
});
|
|
6740
6313
|
CNavItem.propTypes = {
|
|
6741
6314
|
children: PropTypes.node,
|
|
@@ -6745,7 +6318,7 @@ CNavItem.displayName = 'CNavItem';
|
|
|
6745
6318
|
|
|
6746
6319
|
var CNavTitle = forwardRef(function (_a, ref) {
|
|
6747
6320
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6748
|
-
return (
|
|
6321
|
+
return (React.createElement("li", __assign({ className: classNames('nav-title', className) }, rest, { ref: ref }), children));
|
|
6749
6322
|
});
|
|
6750
6323
|
CNavTitle.propTypes = {
|
|
6751
6324
|
children: PropTypes.node,
|
|
@@ -6756,11 +6329,11 @@ CNavTitle.displayName = 'CNavTitle';
|
|
|
6756
6329
|
var CNavbar = forwardRef(function (_a, ref) {
|
|
6757
6330
|
var _b;
|
|
6758
6331
|
var children = _a.children, className = _a.className, color = _a.color, colorScheme = _a.colorScheme, _c = _a.component, Component = _c === void 0 ? 'nav' : _c, container = _a.container, expand = _a.expand, placement = _a.placement, rest = __rest(_a, ["children", "className", "color", "colorScheme", "component", "container", "expand", "placement"]);
|
|
6759
|
-
return (
|
|
6332
|
+
return (React.createElement(Component, __assign({ className: classNames('navbar', (_b = {},
|
|
6760
6333
|
_b["bg-".concat(color)] = color,
|
|
6761
6334
|
_b["navbar-".concat(colorScheme)] = colorScheme,
|
|
6762
6335
|
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-".concat(expand)] = expand,
|
|
6763
|
-
_b), placement, className) }, rest, { ref: ref }), container ? (
|
|
6336
|
+
_b), placement, className) }, rest, { ref: ref }), container ? (React.createElement("div", { className: typeof container === 'string' ? "container-".concat(container) : 'container' }, children)) : (React.createElement(React.Fragment, null, children))));
|
|
6764
6337
|
});
|
|
6765
6338
|
CNavbar.propTypes = {
|
|
6766
6339
|
children: PropTypes.node,
|
|
@@ -6790,7 +6363,7 @@ CNavbar.displayName = 'CNavbar';
|
|
|
6790
6363
|
var CNavbarBrand = forwardRef(function (_a, ref) {
|
|
6791
6364
|
var children = _a.children, component = _a.component, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6792
6365
|
var Component = component !== null && component !== void 0 ? component : (rest.href ? 'a' : 'span');
|
|
6793
|
-
return (
|
|
6366
|
+
return (React.createElement(Component, __assign({ className: classNames('navbar-brand', className) }, rest, { ref: ref }), children));
|
|
6794
6367
|
});
|
|
6795
6368
|
CNavbarBrand.propTypes = {
|
|
6796
6369
|
children: PropTypes.node,
|
|
@@ -6801,7 +6374,7 @@ CNavbarBrand.displayName = 'CNavbarBrand';
|
|
|
6801
6374
|
|
|
6802
6375
|
var CNavbarNav = forwardRef(function (_a, ref) {
|
|
6803
6376
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'ul' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6804
|
-
return (
|
|
6377
|
+
return (React.createElement(Component, __assign({ className: classNames('navbar-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
6805
6378
|
});
|
|
6806
6379
|
CNavbarNav.propTypes = {
|
|
6807
6380
|
children: PropTypes.node,
|
|
@@ -6812,7 +6385,7 @@ CNavbarNav.displayName = 'CNavbarNav';
|
|
|
6812
6385
|
|
|
6813
6386
|
var CNavbarText = forwardRef(function (_a, ref) {
|
|
6814
6387
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6815
|
-
return (
|
|
6388
|
+
return (React.createElement("span", __assign({ className: classNames('navbar-text', className) }, rest, { ref: ref }), children));
|
|
6816
6389
|
});
|
|
6817
6390
|
CNavbarText.propTypes = {
|
|
6818
6391
|
children: PropTypes.node,
|
|
@@ -6822,7 +6395,7 @@ CNavbarText.displayName = 'CNavbarText';
|
|
|
6822
6395
|
|
|
6823
6396
|
var CNavbarToggler = forwardRef(function (_a, ref) {
|
|
6824
6397
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6825
|
-
return (
|
|
6398
|
+
return (React.createElement("button", __assign({ type: "button", className: classNames('navbar-toggler', className) }, rest, { ref: ref }), children !== null && children !== void 0 ? children : React.createElement("span", { className: "navbar-toggler-icon" })));
|
|
6826
6399
|
});
|
|
6827
6400
|
CNavbarToggler.propTypes = {
|
|
6828
6401
|
children: PropTypes.node,
|
|
@@ -6862,11 +6435,11 @@ var COffcanvas = forwardRef(function (_a, ref) {
|
|
|
6862
6435
|
return handleDismiss();
|
|
6863
6436
|
}
|
|
6864
6437
|
};
|
|
6865
|
-
return (
|
|
6866
|
-
|
|
6438
|
+
return (React.createElement(React.Fragment, null,
|
|
6439
|
+
React.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) {
|
|
6867
6440
|
var _a;
|
|
6868
|
-
return (
|
|
6869
|
-
|
|
6441
|
+
return (React.createElement(CConditionalPortal, { portal: portal },
|
|
6442
|
+
React.createElement("div", __assign({ className: classNames((_a = {},
|
|
6870
6443
|
_a["offcanvas".concat(typeof responsive === 'string' ? '-' + responsive : '')] = responsive,
|
|
6871
6444
|
_a["offcanvas-".concat(placement)] = placement,
|
|
6872
6445
|
_a.showing = state === 'entering',
|
|
@@ -6874,8 +6447,8 @@ var COffcanvas = forwardRef(function (_a, ref) {
|
|
|
6874
6447
|
_a['show hiding'] = state === 'exiting',
|
|
6875
6448
|
_a), className), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, rest, { ref: forkedRef }), children)));
|
|
6876
6449
|
}),
|
|
6877
|
-
backdrop && (
|
|
6878
|
-
|
|
6450
|
+
backdrop && (React.createElement(CConditionalPortal, { portal: portal },
|
|
6451
|
+
React.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleBackdropDismiss, visible: _visible })))));
|
|
6879
6452
|
});
|
|
6880
6453
|
COffcanvas.propTypes = {
|
|
6881
6454
|
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])]),
|
|
@@ -6898,7 +6471,7 @@ COffcanvas.displayName = 'COffcanvas';
|
|
|
6898
6471
|
|
|
6899
6472
|
var COffcanvasBody = forwardRef(function (_a, ref) {
|
|
6900
6473
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6901
|
-
return (
|
|
6474
|
+
return (React.createElement("div", __assign({ className: classNames('offcanvas-body', className) }, rest, { ref: ref }), children));
|
|
6902
6475
|
});
|
|
6903
6476
|
COffcanvasBody.propTypes = {
|
|
6904
6477
|
children: PropTypes.node,
|
|
@@ -6908,7 +6481,7 @@ COffcanvasBody.displayName = 'COffcanvasBody';
|
|
|
6908
6481
|
|
|
6909
6482
|
var COffcanvasHeader = forwardRef(function (_a, ref) {
|
|
6910
6483
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6911
|
-
return (
|
|
6484
|
+
return (React.createElement("div", __assign({ className: classNames('offcanvas-header', className) }, rest, { ref: ref }), children));
|
|
6912
6485
|
});
|
|
6913
6486
|
COffcanvasHeader.propTypes = {
|
|
6914
6487
|
children: PropTypes.node,
|
|
@@ -6918,7 +6491,7 @@ COffcanvasHeader.displayName = 'COffcanvasHeader';
|
|
|
6918
6491
|
|
|
6919
6492
|
var COffcanvasTitle = forwardRef(function (_a, ref) {
|
|
6920
6493
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6921
|
-
return (
|
|
6494
|
+
return (React.createElement(Component, __assign({ className: classNames('offcanvas-title', className) }, rest, { ref: ref }), children));
|
|
6922
6495
|
});
|
|
6923
6496
|
COffcanvasTitle.propTypes = {
|
|
6924
6497
|
children: PropTypes.node,
|
|
@@ -6930,8 +6503,8 @@ COffcanvasTitle.displayName = 'COffcanvasTitle';
|
|
|
6930
6503
|
var CPagination = forwardRef(function (_a, ref) {
|
|
6931
6504
|
var _b;
|
|
6932
6505
|
var children = _a.children, align = _a.align, className = _a.className, size = _a.size, rest = __rest(_a, ["children", "align", "className", "size"]);
|
|
6933
|
-
return (
|
|
6934
|
-
|
|
6506
|
+
return (React.createElement("nav", __assign({ ref: ref }, rest),
|
|
6507
|
+
React.createElement("ul", { className: classNames('pagination', (_b = {},
|
|
6935
6508
|
_b["justify-content-".concat(align)] = align,
|
|
6936
6509
|
_b["pagination-".concat(size)] = size,
|
|
6937
6510
|
_b), className) }, children)));
|
|
@@ -6947,10 +6520,10 @@ CPagination.displayName = 'CPagination';
|
|
|
6947
6520
|
var CPaginationItem = forwardRef(function (_a, ref) {
|
|
6948
6521
|
var children = _a.children, className = _a.className, component = _a.component, rest = __rest(_a, ["children", "className", "component"]);
|
|
6949
6522
|
var Component = component !== null && component !== void 0 ? component : (rest.active ? 'span' : 'a');
|
|
6950
|
-
return (
|
|
6523
|
+
return (React.createElement("li", __assign({ className: classNames('page-item', {
|
|
6951
6524
|
active: rest.active,
|
|
6952
6525
|
disabled: rest.disabled,
|
|
6953
|
-
}, className) }, (rest.active && { 'aria-current': 'page' })), Component === 'a' ? (
|
|
6526
|
+
}, className) }, (rest.active && { 'aria-current': 'page' })), Component === 'a' ? (React.createElement(CLink, __assign({ className: "page-link", component: Component }, rest, { ref: ref }), children)) : (React.createElement(Component, { className: "page-link", ref: ref }, children))));
|
|
6954
6527
|
});
|
|
6955
6528
|
CPaginationItem.propTypes = {
|
|
6956
6529
|
children: PropTypes.node,
|
|
@@ -6982,7 +6555,7 @@ var CPlaceholder = forwardRef(function (_a, ref) {
|
|
|
6982
6555
|
repsonsiveClassNames.push("col".concat(infix));
|
|
6983
6556
|
}
|
|
6984
6557
|
});
|
|
6985
|
-
return (
|
|
6558
|
+
return (React.createElement(Component, __assign({ className: classNames(animation ? "placeholder-".concat(animation) : 'placeholder', (_b = {},
|
|
6986
6559
|
_b["bg-".concat(color)] = color,
|
|
6987
6560
|
_b["placeholder-".concat(size)] = size,
|
|
6988
6561
|
_b), repsonsiveClassNames, className) }, rest, { ref: ref }), children));
|
|
@@ -6997,14 +6570,29 @@ CPlaceholder.propTypes = {
|
|
|
6997
6570
|
};
|
|
6998
6571
|
CPlaceholder.displayName = 'CPlaceholder';
|
|
6999
6572
|
|
|
6573
|
+
var CProgressStackedContext = createContext({});
|
|
6574
|
+
var CProgressStacked = forwardRef(function (_a, ref) {
|
|
6575
|
+
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6576
|
+
return (React.createElement("div", __assign({ className: classNames('progress-stacked', className), ref: ref }, rest),
|
|
6577
|
+
React.createElement(CProgressStackedContext.Provider, { value: {
|
|
6578
|
+
stacked: true,
|
|
6579
|
+
} }, children)));
|
|
6580
|
+
});
|
|
6581
|
+
CProgressStacked.propTypes = {
|
|
6582
|
+
children: PropTypes.node,
|
|
6583
|
+
className: PropTypes.string,
|
|
6584
|
+
};
|
|
6585
|
+
CProgressStacked.displayName = 'CProgressStacked';
|
|
6586
|
+
|
|
7000
6587
|
var CProgressBar = forwardRef(function (_a, ref) {
|
|
7001
6588
|
var _b;
|
|
7002
6589
|
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"]);
|
|
7003
|
-
|
|
6590
|
+
var stacked = useContext(CProgressStackedContext).stacked;
|
|
6591
|
+
return (React.createElement("div", __assign({ className: classNames('progress-bar', (_b = {},
|
|
7004
6592
|
_b["bg-".concat(color)] = color,
|
|
7005
6593
|
_b["progress-bar-".concat(variant)] = variant,
|
|
7006
6594
|
_b['progress-bar-animated'] = animated,
|
|
7007
|
-
_b), className),
|
|
6595
|
+
_b), className) }, (!stacked && { style: { width: "".concat(value, "%") } }), rest, { ref: ref }), children));
|
|
7008
6596
|
});
|
|
7009
6597
|
CProgressBar.propTypes = {
|
|
7010
6598
|
animated: PropTypes.bool,
|
|
@@ -7016,102 +6604,121 @@ CProgressBar.propTypes = {
|
|
|
7016
6604
|
};
|
|
7017
6605
|
CProgressBar.displayName = 'CProgressBar';
|
|
7018
6606
|
|
|
7019
|
-
// TODO: update markup and add '.progress-stacked' in v5
|
|
7020
6607
|
var CProgress = forwardRef(function (_a, ref) {
|
|
7021
|
-
var children = _a.children, className = _a.className, height = _a.height,
|
|
7022
|
-
|
|
6608
|
+
var children = _a.children, className = _a.className, height = _a.height, progressBarClassName = _a.progressBarClassName, thin = _a.thin, value = _a.value, white = _a.white, rest = __rest(_a, ["children", "className", "height", "progressBarClassName", "thin", "value", "white"]);
|
|
6609
|
+
var stacked = useContext(CProgressStackedContext).stacked;
|
|
6610
|
+
return (React.createElement("div", __assign({ className: classNames('progress', {
|
|
7023
6611
|
'progress-thin': thin,
|
|
7024
6612
|
'progress-white': white,
|
|
7025
|
-
}, className)
|
|
6613
|
+
}, className) }, (value !== undefined && {
|
|
6614
|
+
role: 'progressbar',
|
|
6615
|
+
'aria-valuenow': value,
|
|
6616
|
+
'aria-valuemin': 0,
|
|
6617
|
+
'aria-valuemax': 100,
|
|
6618
|
+
}), { style: __assign(__assign({}, (height ? { height: "".concat(height, "px") } : {})), (stacked ? { width: "".concat(value, "%") } : {})), ref: ref }), React.Children.toArray(children).some(
|
|
6619
|
+
// @ts-expect-error displayName is set in the CProgressBar component
|
|
6620
|
+
function (child) { return child.type && child.type.displayName === 'CProgressBar'; }) ? (React.Children.map(children, function (child) {
|
|
6621
|
+
// @ts-expect-error displayName is set in the CProgressBar component
|
|
6622
|
+
if (React.isValidElement(child) && child.type.displayName === 'CProgressBar') {
|
|
6623
|
+
return React.cloneElement(child, __assign(__assign({}, (value && { value: value })), rest));
|
|
6624
|
+
}
|
|
6625
|
+
return;
|
|
6626
|
+
})) : (React.createElement(CProgressBar, __assign({}, (progressBarClassName && { className: progressBarClassName }), { value: value }, rest), children))));
|
|
7026
6627
|
});
|
|
7027
6628
|
CProgress.propTypes = {
|
|
7028
6629
|
children: PropTypes.node,
|
|
7029
6630
|
className: PropTypes.string,
|
|
7030
6631
|
height: PropTypes.number,
|
|
6632
|
+
progressBarClassName: PropTypes.string,
|
|
7031
6633
|
thin: PropTypes.bool,
|
|
7032
6634
|
value: PropTypes.number,
|
|
7033
6635
|
white: PropTypes.bool,
|
|
7034
6636
|
};
|
|
7035
6637
|
CProgress.displayName = 'CProgress';
|
|
7036
6638
|
|
|
7037
|
-
var getPlacement$1 = function (placement, element) {
|
|
7038
|
-
switch (placement) {
|
|
7039
|
-
case 'right': {
|
|
7040
|
-
return isRTL(element) ? 'left' : 'right';
|
|
7041
|
-
}
|
|
7042
|
-
case 'left': {
|
|
7043
|
-
return isRTL(element) ? 'right' : 'left';
|
|
7044
|
-
}
|
|
7045
|
-
default: {
|
|
7046
|
-
return placement;
|
|
7047
|
-
}
|
|
7048
|
-
}
|
|
7049
|
-
};
|
|
7050
6639
|
var CPopover = function (_a) {
|
|
7051
|
-
var children = _a.children, className = _a.className, content = _a.content,
|
|
6640
|
+
var children = _a.children, _b = _a.animation, animation = _b === void 0 ? true : _b, className = _a.className, content = _a.content, _c = _a.delay, delay = _c === void 0 ? 0 : _c, _d = _a.fallbackPlacements, fallbackPlacements = _d === void 0 ? ['top', 'right', 'bottom', 'left'] : _d, _e = _a.offset, offset = _e === void 0 ? [0, 8] : _e, onHide = _a.onHide, onShow = _a.onShow, _f = _a.placement, placement = _f === void 0 ? 'top' : _f, title = _a.title, _g = _a.trigger, trigger = _g === void 0 ? 'click' : _g, visible = _a.visible, rest = __rest(_a, ["children", "animation", "className", "content", "delay", "fallbackPlacements", "offset", "onHide", "onShow", "placement", "title", "trigger", "visible"]);
|
|
7052
6641
|
var popoverRef = useRef(null);
|
|
7053
6642
|
var togglerRef = useRef(null);
|
|
7054
|
-
var
|
|
7055
|
-
var
|
|
6643
|
+
var _h = usePopper(), initPopper = _h.initPopper, destroyPopper = _h.destroyPopper;
|
|
6644
|
+
var _j = useState(visible), _visible = _j[0], setVisible = _j[1];
|
|
6645
|
+
var _delay = typeof delay === 'number' ? { show: delay, hide: delay } : delay;
|
|
6646
|
+
var popperConfig = {
|
|
6647
|
+
modifiers: [
|
|
6648
|
+
{
|
|
6649
|
+
name: 'arrow',
|
|
6650
|
+
options: {
|
|
6651
|
+
element: '.popover-arrow',
|
|
6652
|
+
},
|
|
6653
|
+
},
|
|
6654
|
+
{
|
|
6655
|
+
name: 'flip',
|
|
6656
|
+
options: {
|
|
6657
|
+
fallbackPlacements: fallbackPlacements,
|
|
6658
|
+
},
|
|
6659
|
+
},
|
|
6660
|
+
{
|
|
6661
|
+
name: 'offset',
|
|
6662
|
+
options: {
|
|
6663
|
+
offset: offset,
|
|
6664
|
+
},
|
|
6665
|
+
},
|
|
6666
|
+
],
|
|
6667
|
+
placement: getRTLPlacement(placement, togglerRef.current),
|
|
6668
|
+
};
|
|
7056
6669
|
useEffect(function () {
|
|
7057
6670
|
setVisible(visible);
|
|
7058
6671
|
}, [visible]);
|
|
7059
6672
|
useEffect(function () {
|
|
7060
|
-
if (_visible) {
|
|
7061
|
-
initPopper();
|
|
6673
|
+
if (_visible && togglerRef.current && popoverRef.current) {
|
|
6674
|
+
initPopper(togglerRef.current, popoverRef.current, popperConfig);
|
|
7062
6675
|
}
|
|
7063
6676
|
return function () {
|
|
7064
6677
|
destroyPopper();
|
|
7065
6678
|
};
|
|
7066
6679
|
}, [_visible]);
|
|
7067
|
-
var
|
|
7068
|
-
if (
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
{
|
|
7072
|
-
name: 'offset',
|
|
7073
|
-
options: {
|
|
7074
|
-
offset: offset,
|
|
7075
|
-
},
|
|
7076
|
-
},
|
|
7077
|
-
],
|
|
7078
|
-
placement: getPlacement$1(placement, togglerRef.current),
|
|
7079
|
-
});
|
|
7080
|
-
}
|
|
7081
|
-
};
|
|
7082
|
-
var destroyPopper = function () {
|
|
7083
|
-
if (popper.current) {
|
|
7084
|
-
popper.current.destroy();
|
|
6680
|
+
var toggleVisible = function (visible) {
|
|
6681
|
+
if (visible) {
|
|
6682
|
+
setTimeout(function () { return setVisible(true); }, _delay.show);
|
|
6683
|
+
return;
|
|
7085
6684
|
}
|
|
7086
|
-
|
|
6685
|
+
setTimeout(function () { return setVisible(false); }, _delay.hide);
|
|
7087
6686
|
};
|
|
7088
|
-
return (
|
|
7089
|
-
|
|
7090
|
-
onClick: function () { return
|
|
6687
|
+
return (React.createElement(React.Fragment, null,
|
|
6688
|
+
React.cloneElement(children, __assign(__assign(__assign({ ref: togglerRef }, ((trigger === 'click' || trigger.includes('click')) && {
|
|
6689
|
+
onClick: function () { return toggleVisible(!_visible); },
|
|
7091
6690
|
})), ((trigger === 'focus' || trigger.includes('focus')) && {
|
|
7092
|
-
onFocus: function () { return
|
|
7093
|
-
onBlur: function () { return
|
|
6691
|
+
onFocus: function () { return toggleVisible(true); },
|
|
6692
|
+
onBlur: function () { return toggleVisible(false); },
|
|
7094
6693
|
})), ((trigger === 'hover' || trigger.includes('hover')) && {
|
|
7095
|
-
onMouseEnter: function () { return
|
|
7096
|
-
onMouseLeave: function () { return
|
|
6694
|
+
onMouseEnter: function () { return toggleVisible(true); },
|
|
6695
|
+
onMouseLeave: function () { return toggleVisible(false); },
|
|
7097
6696
|
}))),
|
|
7098
6697
|
typeof window !== 'undefined' &&
|
|
7099
|
-
createPortal(
|
|
6698
|
+
createPortal(React.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: popoverRef, onEnter: onShow, onExit: onHide, timeout: {
|
|
7100
6699
|
enter: 0,
|
|
7101
6700
|
exit: 200,
|
|
7102
|
-
}, unmountOnExit: true }, function (state) { return (
|
|
7103
|
-
|
|
7104
|
-
.replace('right', 'end')), 'fade', {
|
|
6701
|
+
}, unmountOnExit: true }, function (state) { return (React.createElement("div", __assign({ className: classNames('popover', 'bs-popover-auto', {
|
|
6702
|
+
fade: animation,
|
|
7105
6703
|
show: state === 'entered',
|
|
7106
6704
|
}, className), ref: popoverRef, role: "tooltip" }, rest),
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
6705
|
+
React.createElement("div", { className: "popover-arrow" }),
|
|
6706
|
+
React.createElement("div", { className: "popover-header" }, title),
|
|
6707
|
+
React.createElement("div", { className: "popover-body" }, content))); }), document.body)));
|
|
7110
6708
|
};
|
|
7111
6709
|
CPopover.propTypes = {
|
|
6710
|
+
animation: PropTypes.bool,
|
|
7112
6711
|
children: PropTypes.node,
|
|
7113
6712
|
className: PropTypes.string,
|
|
7114
6713
|
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
6714
|
+
delay: PropTypes.oneOfType([
|
|
6715
|
+
PropTypes.number,
|
|
6716
|
+
PropTypes.shape({
|
|
6717
|
+
show: PropTypes.number.isRequired,
|
|
6718
|
+
hide: PropTypes.number.isRequired,
|
|
6719
|
+
}),
|
|
6720
|
+
]),
|
|
6721
|
+
fallbackPlacements: fallbackPlacementsPropType,
|
|
7115
6722
|
offset: PropTypes.any,
|
|
7116
6723
|
onHide: PropTypes.func,
|
|
7117
6724
|
onShow: PropTypes.func,
|
|
@@ -7196,8 +6803,8 @@ var CSidebar = forwardRef(function (_a, ref) {
|
|
|
7196
6803
|
mobile &&
|
|
7197
6804
|
handleHide();
|
|
7198
6805
|
};
|
|
7199
|
-
return (
|
|
7200
|
-
|
|
6806
|
+
return (React.createElement(React.Fragment, null,
|
|
6807
|
+
React.createElement("div", __assign({ className: classNames('sidebar', (_b = {
|
|
7201
6808
|
'sidebar-narrow': narrow,
|
|
7202
6809
|
'sidebar-overlaid': overlaid
|
|
7203
6810
|
},
|
|
@@ -7209,7 +6816,7 @@ var CSidebar = forwardRef(function (_a, ref) {
|
|
|
7209
6816
|
_b), className) }, rest, { ref: forkedRef }), children),
|
|
7210
6817
|
typeof window !== 'undefined' &&
|
|
7211
6818
|
mobile &&
|
|
7212
|
-
createPortal(
|
|
6819
|
+
createPortal(React.createElement(CBackdrop, { className: "sidebar-backdrop", visible: _visible }), document.body)));
|
|
7213
6820
|
});
|
|
7214
6821
|
CSidebar.propTypes = {
|
|
7215
6822
|
children: PropTypes.node,
|
|
@@ -7228,7 +6835,7 @@ CSidebar.displayName = 'CSidebar';
|
|
|
7228
6835
|
|
|
7229
6836
|
var CSidebarBrand = forwardRef(function (_a, ref) {
|
|
7230
6837
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7231
|
-
return (
|
|
6838
|
+
return (React.createElement("div", __assign({ className: classNames('sidebar-brand', className), ref: ref }, rest), children));
|
|
7232
6839
|
});
|
|
7233
6840
|
CSidebarBrand.propTypes = {
|
|
7234
6841
|
children: PropTypes.node,
|
|
@@ -7238,7 +6845,7 @@ CSidebarBrand.displayName = 'CSidebarBrand';
|
|
|
7238
6845
|
|
|
7239
6846
|
var CSidebarFooter = forwardRef(function (_a, ref) {
|
|
7240
6847
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7241
|
-
return (
|
|
6848
|
+
return (React.createElement("div", __assign({ className: classNames('sidebar-footer', className), ref: ref }, rest), children));
|
|
7242
6849
|
});
|
|
7243
6850
|
CSidebarFooter.propTypes = {
|
|
7244
6851
|
children: PropTypes.node,
|
|
@@ -7248,7 +6855,7 @@ CSidebarFooter.displayName = 'CSidebarFooter';
|
|
|
7248
6855
|
|
|
7249
6856
|
var CSidebarToggler = forwardRef(function (_a, ref) {
|
|
7250
6857
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7251
|
-
return (
|
|
6858
|
+
return (React.createElement("button", __assign({ className: classNames('sidebar-toggler', className), ref: ref }, rest), children));
|
|
7252
6859
|
});
|
|
7253
6860
|
CSidebarToggler.propTypes = {
|
|
7254
6861
|
children: PropTypes.node,
|
|
@@ -7258,7 +6865,7 @@ CSidebarToggler.displayName = 'CSidebarToggler';
|
|
|
7258
6865
|
|
|
7259
6866
|
var CSidebarHeader = forwardRef(function (_a, ref) {
|
|
7260
6867
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7261
|
-
return (
|
|
6868
|
+
return (React.createElement("div", __assign({ className: classNames('sidebar-header', className), ref: ref }, rest), children));
|
|
7262
6869
|
});
|
|
7263
6870
|
CSidebarHeader.propTypes = {
|
|
7264
6871
|
children: PropTypes.node,
|
|
@@ -7269,11 +6876,11 @@ CSidebarHeader.displayName = 'CSidebarHeader';
|
|
|
7269
6876
|
var CSpinner = forwardRef(function (_a, ref) {
|
|
7270
6877
|
var _b;
|
|
7271
6878
|
var className = _a.className, color = _a.color, _c = _a.component, Component = _c === void 0 ? 'div' : _c, size = _a.size, _d = _a.variant, variant = _d === void 0 ? 'border' : _d, _e = _a.visuallyHiddenLabel, visuallyHiddenLabel = _e === void 0 ? 'Loading...' : _e, rest = __rest(_a, ["className", "color", "component", "size", "variant", "visuallyHiddenLabel"]);
|
|
7272
|
-
return (
|
|
6879
|
+
return (React.createElement(Component, __assign({ className: classNames("spinner-".concat(variant), (_b = {},
|
|
7273
6880
|
_b["spinner-".concat(variant, "-").concat(size)] = size,
|
|
7274
6881
|
_b["text-".concat(color)] = color,
|
|
7275
6882
|
_b), className), role: "status" }, rest, { ref: ref }),
|
|
7276
|
-
|
|
6883
|
+
React.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
7277
6884
|
});
|
|
7278
6885
|
CSpinner.propTypes = {
|
|
7279
6886
|
className: PropTypes.string,
|
|
@@ -7288,7 +6895,7 @@ CSpinner.displayName = 'CSpinner';
|
|
|
7288
6895
|
var CTableHead = forwardRef(function (_a, ref) {
|
|
7289
6896
|
var _b;
|
|
7290
6897
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7291
|
-
return (
|
|
6898
|
+
return (React.createElement("thead", __assign({ className: classNames((_b = {},
|
|
7292
6899
|
_b["table-".concat(color)] = color,
|
|
7293
6900
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
7294
6901
|
});
|
|
@@ -7302,7 +6909,7 @@ CTableHead.displayName = 'CTableHead';
|
|
|
7302
6909
|
var CTableHeaderCell = forwardRef(function (_a, ref) {
|
|
7303
6910
|
var _b;
|
|
7304
6911
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7305
|
-
return (
|
|
6912
|
+
return (React.createElement("th", __assign({ className: classNames((_b = {},
|
|
7306
6913
|
_b["table-".concat(color)] = color,
|
|
7307
6914
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
7308
6915
|
});
|
|
@@ -7316,7 +6923,7 @@ CTableHeaderCell.displayName = 'CTableHeaderCell';
|
|
|
7316
6923
|
var CTableBody = forwardRef(function (_a, ref) {
|
|
7317
6924
|
var _b;
|
|
7318
6925
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7319
|
-
return (
|
|
6926
|
+
return (React.createElement("tbody", __assign({ className: classNames((_b = {},
|
|
7320
6927
|
_b["table-".concat(color)] = color,
|
|
7321
6928
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
7322
6929
|
});
|
|
@@ -7331,7 +6938,7 @@ var CTableDataCell = forwardRef(function (_a, ref) {
|
|
|
7331
6938
|
var _b;
|
|
7332
6939
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "active", "align", "className", "color"]);
|
|
7333
6940
|
var Component = rest.scope ? 'th' : 'td';
|
|
7334
|
-
return (
|
|
6941
|
+
return (React.createElement(Component, __assign({ className: classNames((_b = {},
|
|
7335
6942
|
_b["align-".concat(align)] = align,
|
|
7336
6943
|
_b['table-active'] = active,
|
|
7337
6944
|
_b["table-".concat(color)] = color,
|
|
@@ -7349,7 +6956,7 @@ CTableDataCell.displayName = 'CTableDataCell';
|
|
|
7349
6956
|
var CTableRow = forwardRef(function (_a, ref) {
|
|
7350
6957
|
var _b;
|
|
7351
6958
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "active", "align", "className", "color"]);
|
|
7352
|
-
return (
|
|
6959
|
+
return (React.createElement("tr", __assign({ className: classNames((_b = {},
|
|
7353
6960
|
_b["align-".concat(align)] = align,
|
|
7354
6961
|
_b['table-active'] = active,
|
|
7355
6962
|
_b["table-".concat(color)] = color,
|
|
@@ -7367,7 +6974,7 @@ CTableRow.displayName = 'CTableRow';
|
|
|
7367
6974
|
var CTableFoot = forwardRef(function (_a, ref) {
|
|
7368
6975
|
var _b;
|
|
7369
6976
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7370
|
-
return (
|
|
6977
|
+
return (React.createElement("tfoot", __assign({ className: classNames((_b = {},
|
|
7371
6978
|
_b["table-".concat(color)] = color,
|
|
7372
6979
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
7373
6980
|
});
|
|
@@ -7380,7 +6987,7 @@ CTableFoot.displayName = 'CTableFoot';
|
|
|
7380
6987
|
|
|
7381
6988
|
var CTableCaption = forwardRef(function (_a, ref) {
|
|
7382
6989
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
7383
|
-
return (
|
|
6990
|
+
return (React.createElement("caption", __assign({}, props, { ref: ref }), children));
|
|
7384
6991
|
});
|
|
7385
6992
|
CTableCaption.propTypes = {
|
|
7386
6993
|
children: PropTypes.node,
|
|
@@ -7389,7 +6996,7 @@ CTableCaption.displayName = 'CTableCaption';
|
|
|
7389
6996
|
|
|
7390
6997
|
var CTableResponsiveWrapper = function (_a) {
|
|
7391
6998
|
var children = _a.children, responsive = _a.responsive, rest = __rest(_a, ["children", "responsive"]);
|
|
7392
|
-
return responsive ? (
|
|
6999
|
+
return responsive ? (React.createElement("div", __assign({ className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) }, rest), children)) : (React.createElement(React.Fragment, null, children));
|
|
7393
7000
|
};
|
|
7394
7001
|
CTableResponsiveWrapper.propTypes = {
|
|
7395
7002
|
children: PropTypes.node,
|
|
@@ -7425,8 +7032,8 @@ var CTable = forwardRef(function (_a, ref) {
|
|
|
7425
7032
|
var _b;
|
|
7426
7033
|
var children = _a.children, align = _a.align, borderColor = _a.borderColor, bordered = _a.bordered, borderless = _a.borderless, caption = _a.caption, captionTop = _a.captionTop, className = _a.className, color = _a.color, columns = _a.columns, footer = _a.footer, hover = _a.hover, items = _a.items, responsive = _a.responsive, small = _a.small, striped = _a.striped, stripedColumns = _a.stripedColumns, tableFootProps = _a.tableFootProps, tableHeadProps = _a.tableHeadProps, rest = __rest(_a, ["children", "align", "borderColor", "bordered", "borderless", "caption", "captionTop", "className", "color", "columns", "footer", "hover", "items", "responsive", "small", "striped", "stripedColumns", "tableFootProps", "tableHeadProps"]);
|
|
7427
7034
|
var columnNames = useMemo(function () { return getColumnNames(columns, items); }, [columns, items]);
|
|
7428
|
-
return (
|
|
7429
|
-
|
|
7035
|
+
return (React.createElement(CTableResponsiveWrapper, { responsive: responsive },
|
|
7036
|
+
React.createElement("table", __assign({ className: classNames('table', (_b = {},
|
|
7430
7037
|
_b["align-".concat(align)] = align,
|
|
7431
7038
|
_b["border-".concat(borderColor)] = borderColor,
|
|
7432
7039
|
_b["caption-top"] = captionTop || caption === 'top',
|
|
@@ -7438,17 +7045,17 @@ var CTable = forwardRef(function (_a, ref) {
|
|
|
7438
7045
|
_b['table-striped'] = striped,
|
|
7439
7046
|
_b['table-striped-columns'] = stripedColumns,
|
|
7440
7047
|
_b), className) }, rest, { ref: ref }),
|
|
7441
|
-
((caption && caption !== 'top') || captionTop) && (
|
|
7442
|
-
columns && (
|
|
7443
|
-
|
|
7444
|
-
items && (
|
|
7048
|
+
((caption && caption !== 'top') || captionTop) && (React.createElement(CTableCaption, null, caption || captionTop)),
|
|
7049
|
+
columns && (React.createElement(CTableHead, __assign({}, tableHeadProps),
|
|
7050
|
+
React.createElement(CTableRow, null, columns.map(function (column, index) { return (React.createElement(CTableHeaderCell, __assign({}, (column._props && __assign({}, column._props)), (column._style && { style: __assign({}, column._style) }), { key: index }), getColumnLabel(column))); })))),
|
|
7051
|
+
items && (React.createElement(CTableBody, null, items.map(function (item, index) { return (React.createElement(CTableRow, __assign({}, (item._props && __assign({}, item._props)), { key: index }), columnNames &&
|
|
7445
7052
|
columnNames.map(function (colName, index) {
|
|
7446
7053
|
// eslint-disable-next-line unicorn/no-negated-condition
|
|
7447
|
-
return item[colName] !== undefined ? (
|
|
7054
|
+
return item[colName] !== undefined ? (React.createElement(CTableDataCell, __assign({}, (item._cellProps && __assign(__assign({}, (item._cellProps['all'] && __assign({}, item._cellProps['all']))), (item._cellProps[colName] && __assign({}, item._cellProps[colName])))), { key: index }), item[colName])) : null;
|
|
7448
7055
|
}))); }))),
|
|
7449
7056
|
children,
|
|
7450
|
-
footer && (
|
|
7451
|
-
|
|
7057
|
+
footer && (React.createElement(CTableFoot, __assign({}, tableFootProps),
|
|
7058
|
+
React.createElement(CTableRow, null, footer.map(function (item, index) { return (React.createElement(CTableDataCell, __assign({}, (typeof item === 'object' && item._props && __assign({}, item._props)), { key: index }), typeof item === 'object' ? item.label : item)); })))))));
|
|
7452
7059
|
});
|
|
7453
7060
|
CTable.propTypes = {
|
|
7454
7061
|
align: PropTypes.oneOf(['bottom', 'middle', 'top']),
|
|
@@ -7478,7 +7085,7 @@ CTable.displayName = 'CTable';
|
|
|
7478
7085
|
|
|
7479
7086
|
var CTabContent = forwardRef(function (_a, ref) {
|
|
7480
7087
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7481
|
-
return (
|
|
7088
|
+
return (React.createElement("div", __assign({ className: classNames('tab-content', className) }, rest, { ref: ref }), children));
|
|
7482
7089
|
});
|
|
7483
7090
|
CTabContent.propTypes = {
|
|
7484
7091
|
children: PropTypes.node,
|
|
@@ -7490,7 +7097,7 @@ var CTabPane = forwardRef(function (_a, ref) {
|
|
|
7490
7097
|
var children = _a.children, className = _a.className, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest(_a, ["children", "className", "onHide", "onShow", "visible"]);
|
|
7491
7098
|
var tabPaneRef = useRef();
|
|
7492
7099
|
var forkedRef = useForkedRef(ref, tabPaneRef);
|
|
7493
|
-
return (
|
|
7100
|
+
return (React.createElement(Transition$1, { in: visible, nodeRef: tabPaneRef, onEnter: onShow, onExit: onHide, timeout: 150 }, function (state) { return (React.createElement("div", __assign({ className: classNames('tab-pane', 'fade', {
|
|
7494
7101
|
active: visible,
|
|
7495
7102
|
show: state === 'entered',
|
|
7496
7103
|
}, className) }, rest, { ref: forkedRef }), children)); }));
|
|
@@ -7531,10 +7138,10 @@ var CToast = forwardRef(function (_a, ref) {
|
|
|
7531
7138
|
}, delay);
|
|
7532
7139
|
}
|
|
7533
7140
|
};
|
|
7534
|
-
return (
|
|
7141
|
+
return (React.createElement(Transition$1, { in: _visible, nodeRef: toastRef, onEnter: function () { return onShow && onShow(index !== null && index !== void 0 ? index : null); }, onExited: function () { return onClose && onClose(index !== null && index !== void 0 ? index : null); }, timeout: 250, unmountOnExit: true }, function (state) {
|
|
7535
7142
|
var _a;
|
|
7536
|
-
return (
|
|
7537
|
-
|
|
7143
|
+
return (React.createElement(CToastContext.Provider, { value: contextValues },
|
|
7144
|
+
React.createElement("div", __assign({ className: classNames('toast', (_a = {
|
|
7538
7145
|
fade: animation
|
|
7539
7146
|
},
|
|
7540
7147
|
_a["bg-".concat(color)] = color,
|
|
@@ -7561,7 +7168,7 @@ CToast.displayName = 'CToast';
|
|
|
7561
7168
|
|
|
7562
7169
|
var CToastBody = forwardRef(function (_a, ref) {
|
|
7563
7170
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7564
|
-
return (
|
|
7171
|
+
return (React.createElement("div", __assign({ className: classNames('toast-body', className) }, rest, { ref: ref }), children));
|
|
7565
7172
|
});
|
|
7566
7173
|
CToastBody.propTypes = {
|
|
7567
7174
|
children: PropTypes.node,
|
|
@@ -7572,16 +7179,16 @@ CToastBody.displayName = 'CToastBody';
|
|
|
7572
7179
|
var CToastClose = forwardRef(function (_a, ref) {
|
|
7573
7180
|
var children = _a.children, Component = _a.component, rest = __rest(_a, ["children", "component"]);
|
|
7574
7181
|
var setVisible = useContext(CToastContext).setVisible;
|
|
7575
|
-
return Component ? (
|
|
7182
|
+
return Component ? (React.createElement(Component, __assign({ onClick: function () { return setVisible(false); } }, rest, { ref: ref }), children)) : (React.createElement(CCloseButton, __assign({ onClick: function () { return setVisible(false); } }, rest, { ref: ref })));
|
|
7576
7183
|
});
|
|
7577
7184
|
CToastClose.propTypes = __assign(__assign({}, CCloseButton.propTypes), { component: PropTypes.elementType });
|
|
7578
7185
|
CToastClose.displayName = 'CToastClose';
|
|
7579
7186
|
|
|
7580
7187
|
var CToastHeader = forwardRef(function (_a, ref) {
|
|
7581
7188
|
var children = _a.children, className = _a.className, closeButton = _a.closeButton, rest = __rest(_a, ["children", "className", "closeButton"]);
|
|
7582
|
-
return (
|
|
7189
|
+
return (React.createElement("div", __assign({ className: classNames('toast-header', className) }, rest, { ref: ref }),
|
|
7583
7190
|
children,
|
|
7584
|
-
closeButton &&
|
|
7191
|
+
closeButton && React.createElement(CToastClose, null)));
|
|
7585
7192
|
});
|
|
7586
7193
|
CToastHeader.propTypes = {
|
|
7587
7194
|
children: PropTypes.node,
|
|
@@ -7600,7 +7207,7 @@ var CToaster = forwardRef(function (_a, ref) {
|
|
|
7600
7207
|
}, [push]);
|
|
7601
7208
|
var addToast = function (push) {
|
|
7602
7209
|
setToasts(function (state) { return __spreadArray(__spreadArray([], state, true), [
|
|
7603
|
-
|
|
7210
|
+
React.cloneElement(push, {
|
|
7604
7211
|
index: index.current,
|
|
7605
7212
|
key: index.current,
|
|
7606
7213
|
onClose: function (index) {
|
|
@@ -7609,7 +7216,7 @@ var CToaster = forwardRef(function (_a, ref) {
|
|
|
7609
7216
|
}),
|
|
7610
7217
|
], false); });
|
|
7611
7218
|
};
|
|
7612
|
-
return (
|
|
7219
|
+
return (React.createElement(CConditionalPortal, { portal: typeof placement === 'string' }, toasts.length > 0 || children ? (React.createElement("div", __assign({ className: classNames('toaster toast-container p-3', {
|
|
7613
7220
|
'position-fixed': placement,
|
|
7614
7221
|
'top-0': placement && placement.includes('top'),
|
|
7615
7222
|
'top-50 translate-middle-y': placement && placement.includes('middle'),
|
|
@@ -7619,7 +7226,7 @@ var CToaster = forwardRef(function (_a, ref) {
|
|
|
7619
7226
|
'end-0': placement && placement.includes('end'),
|
|
7620
7227
|
}, className) }, rest, { ref: ref }),
|
|
7621
7228
|
children,
|
|
7622
|
-
toasts.map(function (toast) { return
|
|
7229
|
+
toasts.map(function (toast) { return React.cloneElement(toast, { visible: true }); }))) : null));
|
|
7623
7230
|
});
|
|
7624
7231
|
CToaster.propTypes = {
|
|
7625
7232
|
children: PropTypes.node,
|
|
@@ -7642,82 +7249,87 @@ CToaster.propTypes = {
|
|
|
7642
7249
|
};
|
|
7643
7250
|
CToaster.displayName = 'CToaster';
|
|
7644
7251
|
|
|
7645
|
-
var getPlacement = function (placement, element) {
|
|
7646
|
-
switch (placement) {
|
|
7647
|
-
case 'right': {
|
|
7648
|
-
return isRTL(element) ? 'left' : 'right';
|
|
7649
|
-
}
|
|
7650
|
-
case 'left': {
|
|
7651
|
-
return isRTL(element) ? 'right' : 'left';
|
|
7652
|
-
}
|
|
7653
|
-
default: {
|
|
7654
|
-
return placement;
|
|
7655
|
-
}
|
|
7656
|
-
}
|
|
7657
|
-
};
|
|
7658
7252
|
var CTooltip = function (_a) {
|
|
7659
|
-
var children = _a.children, className = _a.className, content = _a.content,
|
|
7253
|
+
var children = _a.children, _b = _a.animation, animation = _b === void 0 ? true : _b, className = _a.className, content = _a.content, _c = _a.delay, delay = _c === void 0 ? 0 : _c, _d = _a.fallbackPlacements, fallbackPlacements = _d === void 0 ? ['top', 'right', 'bottom', 'left'] : _d, _e = _a.offset, offset = _e === void 0 ? [0, 6] : _e, onHide = _a.onHide, onShow = _a.onShow, _f = _a.placement, placement = _f === void 0 ? 'top' : _f, _g = _a.trigger, trigger = _g === void 0 ? ['hover', 'focus'] : _g, visible = _a.visible, rest = __rest(_a, ["children", "animation", "className", "content", "delay", "fallbackPlacements", "offset", "onHide", "onShow", "placement", "trigger", "visible"]);
|
|
7660
7254
|
var tooltipRef = useRef(null);
|
|
7661
7255
|
var togglerRef = useRef(null);
|
|
7662
|
-
var
|
|
7663
|
-
var
|
|
7256
|
+
var _h = usePopper(), initPopper = _h.initPopper, destroyPopper = _h.destroyPopper;
|
|
7257
|
+
var _j = useState(visible), _visible = _j[0], setVisible = _j[1];
|
|
7258
|
+
var _delay = typeof delay === 'number' ? { show: delay, hide: delay } : delay;
|
|
7259
|
+
var popperConfig = {
|
|
7260
|
+
modifiers: [
|
|
7261
|
+
{
|
|
7262
|
+
name: 'arrow',
|
|
7263
|
+
options: {
|
|
7264
|
+
element: '.tooltip-arrow',
|
|
7265
|
+
},
|
|
7266
|
+
},
|
|
7267
|
+
{
|
|
7268
|
+
name: 'flip',
|
|
7269
|
+
options: {
|
|
7270
|
+
fallbackPlacements: fallbackPlacements,
|
|
7271
|
+
},
|
|
7272
|
+
},
|
|
7273
|
+
{
|
|
7274
|
+
name: 'offset',
|
|
7275
|
+
options: {
|
|
7276
|
+
offset: offset,
|
|
7277
|
+
},
|
|
7278
|
+
},
|
|
7279
|
+
],
|
|
7280
|
+
placement: getRTLPlacement(placement, togglerRef.current),
|
|
7281
|
+
};
|
|
7664
7282
|
useEffect(function () {
|
|
7665
7283
|
setVisible(visible);
|
|
7666
7284
|
}, [visible]);
|
|
7667
7285
|
useEffect(function () {
|
|
7668
|
-
if (_visible) {
|
|
7669
|
-
initPopper();
|
|
7286
|
+
if (_visible && togglerRef.current && tooltipRef.current) {
|
|
7287
|
+
initPopper(togglerRef.current, tooltipRef.current, popperConfig);
|
|
7670
7288
|
}
|
|
7671
7289
|
return function () {
|
|
7672
7290
|
destroyPopper();
|
|
7673
7291
|
};
|
|
7674
7292
|
}, [_visible]);
|
|
7675
|
-
var
|
|
7676
|
-
if (
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
{
|
|
7680
|
-
name: 'offset',
|
|
7681
|
-
options: {
|
|
7682
|
-
offset: offset,
|
|
7683
|
-
},
|
|
7684
|
-
},
|
|
7685
|
-
],
|
|
7686
|
-
placement: getPlacement(placement, togglerRef.current),
|
|
7687
|
-
});
|
|
7688
|
-
}
|
|
7689
|
-
};
|
|
7690
|
-
var destroyPopper = function () {
|
|
7691
|
-
if (popper.current) {
|
|
7692
|
-
popper.current.destroy();
|
|
7293
|
+
var toggleVisible = function (visible) {
|
|
7294
|
+
if (visible) {
|
|
7295
|
+
setTimeout(function () { return setVisible(true); }, _delay.show);
|
|
7296
|
+
return;
|
|
7693
7297
|
}
|
|
7694
|
-
|
|
7298
|
+
setTimeout(function () { return setVisible(false); }, _delay.hide);
|
|
7695
7299
|
};
|
|
7696
|
-
return (
|
|
7697
|
-
|
|
7698
|
-
onClick: function () { return
|
|
7300
|
+
return (React.createElement(React.Fragment, null,
|
|
7301
|
+
React.cloneElement(children, __assign(__assign(__assign({ ref: togglerRef }, ((trigger === 'click' || trigger.includes('click')) && {
|
|
7302
|
+
onClick: function () { return toggleVisible(!_visible); },
|
|
7699
7303
|
})), ((trigger === 'focus' || trigger.includes('focus')) && {
|
|
7700
|
-
onFocus: function () { return
|
|
7701
|
-
onBlur: function () { return
|
|
7304
|
+
onFocus: function () { return toggleVisible(true); },
|
|
7305
|
+
onBlur: function () { return toggleVisible(false); },
|
|
7702
7306
|
})), ((trigger === 'hover' || trigger.includes('hover')) && {
|
|
7703
|
-
onMouseEnter: function () { return
|
|
7704
|
-
onMouseLeave: function () { return
|
|
7307
|
+
onMouseEnter: function () { return toggleVisible(true); },
|
|
7308
|
+
onMouseLeave: function () { return toggleVisible(false); },
|
|
7705
7309
|
}))),
|
|
7706
7310
|
typeof window !== 'undefined' &&
|
|
7707
|
-
createPortal(
|
|
7311
|
+
createPortal(React.createElement(Transition$1, { in: _visible, mountOnEnter: true, onEnter: onShow, onExit: onHide, timeout: {
|
|
7708
7312
|
enter: 0,
|
|
7709
7313
|
exit: 200,
|
|
7710
|
-
}, unmountOnExit: true }, function (state) { return (
|
|
7711
|
-
|
|
7712
|
-
.replace('right', 'end')), 'fade', {
|
|
7314
|
+
}, unmountOnExit: true }, function (state) { return (React.createElement("div", __assign({ className: classNames('tooltip', 'bs-tooltip-auto', {
|
|
7315
|
+
fade: animation,
|
|
7713
7316
|
show: state === 'entered',
|
|
7714
7317
|
}, className), ref: tooltipRef, role: "tooltip" }, rest),
|
|
7715
|
-
|
|
7716
|
-
|
|
7318
|
+
React.createElement("div", { className: "tooltip-arrow" }),
|
|
7319
|
+
React.createElement("div", { className: "tooltip-inner" }, content))); }), document.body)));
|
|
7717
7320
|
};
|
|
7718
7321
|
CTooltip.propTypes = {
|
|
7322
|
+
animation: PropTypes.bool,
|
|
7719
7323
|
children: PropTypes.node,
|
|
7720
7324
|
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
7325
|
+
delay: PropTypes.oneOfType([
|
|
7326
|
+
PropTypes.number,
|
|
7327
|
+
PropTypes.shape({
|
|
7328
|
+
show: PropTypes.number.isRequired,
|
|
7329
|
+
hide: PropTypes.number.isRequired,
|
|
7330
|
+
}),
|
|
7331
|
+
]),
|
|
7332
|
+
fallbackPlacements: fallbackPlacementsPropType,
|
|
7721
7333
|
offset: PropTypes.any,
|
|
7722
7334
|
onHide: PropTypes.func,
|
|
7723
7335
|
onShow: PropTypes.func,
|
|
@@ -7730,11 +7342,11 @@ CTooltip.displayName = 'CTooltip';
|
|
|
7730
7342
|
var CWidgetStatsA = forwardRef(function (_a, ref) {
|
|
7731
7343
|
var _b;
|
|
7732
7344
|
var action = _a.action, chart = _a.chart, className = _a.className, color = _a.color, title = _a.title, value = _a.value, rest = __rest(_a, ["action", "chart", "className", "color", "title", "value"]);
|
|
7733
|
-
return (
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
value &&
|
|
7737
|
-
title &&
|
|
7345
|
+
return (React.createElement(CCard, __assign({ className: classNames((_b = {}, _b["bg-".concat(color)] = color, _b['text-high-emphasis-inverse'] = color, _b), className) }, rest, { ref: ref }),
|
|
7346
|
+
React.createElement(CCardBody, { className: "pb-0 d-flex justify-content-between align-items-start" },
|
|
7347
|
+
React.createElement("div", null,
|
|
7348
|
+
value && React.createElement("div", { className: "fs-4 fw-semibold" }, value),
|
|
7349
|
+
title && React.createElement("div", null, title)),
|
|
7738
7350
|
action),
|
|
7739
7351
|
chart));
|
|
7740
7352
|
});
|
|
@@ -7750,12 +7362,12 @@ CWidgetStatsA.displayName = 'CWidgetStatsA';
|
|
|
7750
7362
|
|
|
7751
7363
|
var CWidgetStatsB = forwardRef(function (_a, ref) {
|
|
7752
7364
|
var className = _a.className, color = _a.color, inverse = _a.inverse, progress = _a.progress, text = _a.text, title = _a.title, value = _a.value, rest = __rest(_a, ["className", "color", "inverse", "progress", "text", "title", "value"]);
|
|
7753
|
-
return (
|
|
7754
|
-
|
|
7755
|
-
value &&
|
|
7756
|
-
title &&
|
|
7757
|
-
|
|
7758
|
-
text && (
|
|
7365
|
+
return (React.createElement(CCard, __assign({ className: className, color: color }, (inverse && { textColor: 'high-emphasis-inverse' }), rest, { ref: ref }),
|
|
7366
|
+
React.createElement(CCardBody, null,
|
|
7367
|
+
value && React.createElement("div", { className: "fs-4 fw-semibold" }, value),
|
|
7368
|
+
title && React.createElement("div", null, title),
|
|
7369
|
+
React.createElement(CProgress, __assign({ className: "my-2", height: 4 }, (inverse && { white: true }), progress)),
|
|
7370
|
+
text && (React.createElement("small", { className: inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis' }, text)))));
|
|
7759
7371
|
});
|
|
7760
7372
|
CWidgetStatsB.propTypes = {
|
|
7761
7373
|
className: PropTypes.string,
|
|
@@ -7770,12 +7382,12 @@ CWidgetStatsB.displayName = 'CWidgetCWidgetStatsB';
|
|
|
7770
7382
|
|
|
7771
7383
|
var CWidgetStatsC = forwardRef(function (_a, ref) {
|
|
7772
7384
|
var className = _a.className, color = _a.color, icon = _a.icon, inverse = _a.inverse, progress = _a.progress, title = _a.title, value = _a.value, rest = __rest(_a, ["className", "color", "icon", "inverse", "progress", "title", "value"]);
|
|
7773
|
-
return (
|
|
7774
|
-
|
|
7775
|
-
icon && (
|
|
7776
|
-
value && (
|
|
7777
|
-
title && (
|
|
7778
|
-
|
|
7385
|
+
return (React.createElement(CCard, __assign({ className: className, color: color }, (inverse && { textColor: 'high-emphasis-inverse' }), rest, { ref: ref }),
|
|
7386
|
+
React.createElement(CCardBody, null,
|
|
7387
|
+
icon && (React.createElement("div", { className: "text-medium-emphasis".concat(inverse ? '-inverse' : '', " text-end mb-4") }, icon)),
|
|
7388
|
+
value && (React.createElement("div", { className: "text-high-emphasis".concat(inverse ? '-inverse' : '', " fs-4 fw-semibold") }, value)),
|
|
7389
|
+
title && (React.createElement("div", { className: inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis' }, title)),
|
|
7390
|
+
React.createElement(CProgress, __assign({ className: "mt-3 mb-0", height: 4 }, (inverse && { white: true }), progress)))));
|
|
7779
7391
|
});
|
|
7780
7392
|
CWidgetStatsC.propTypes = {
|
|
7781
7393
|
className: PropTypes.string,
|
|
@@ -7791,19 +7403,19 @@ CWidgetStatsC.displayName = 'CWidgetStatsCWidgetStatsC';
|
|
|
7791
7403
|
var CWidgetStatsD = forwardRef(function (_a, ref) {
|
|
7792
7404
|
var _b;
|
|
7793
7405
|
var className = _a.className, chart = _a.chart, color = _a.color, icon = _a.icon, values = _a.values, rest = __rest(_a, ["className", "chart", "color", "icon", "values"]);
|
|
7794
|
-
return (
|
|
7795
|
-
|
|
7406
|
+
return (React.createElement(CCard, __assign({ className: className }, rest, { ref: ref }),
|
|
7407
|
+
React.createElement(CCardHeader, { className: classNames('position-relative d-flex justify-content-center align-items-center', (_b = {},
|
|
7796
7408
|
_b["bg-".concat(color)] = color,
|
|
7797
7409
|
_b)) },
|
|
7798
7410
|
icon,
|
|
7799
7411
|
chart),
|
|
7800
|
-
|
|
7412
|
+
React.createElement(CCardBody, { className: "row text-center" }, values &&
|
|
7801
7413
|
values.map(function (value, index) {
|
|
7802
|
-
return (
|
|
7803
|
-
index % 2 !== 0 &&
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7414
|
+
return (React.createElement(React.Fragment, { key: index },
|
|
7415
|
+
index % 2 !== 0 && React.createElement("div", { className: "vr" }),
|
|
7416
|
+
React.createElement(CCol, null,
|
|
7417
|
+
React.createElement("div", { className: "fs-5 fw-semibold" }, value.value),
|
|
7418
|
+
React.createElement("div", { className: "text-uppercase text-medium-emphasis small" }, value.title))));
|
|
7807
7419
|
}))));
|
|
7808
7420
|
});
|
|
7809
7421
|
CWidgetStatsD.propTypes = {
|
|
@@ -7817,10 +7429,10 @@ CWidgetStatsD.displayName = 'CWidgetStatsD';
|
|
|
7817
7429
|
|
|
7818
7430
|
var CWidgetStatsE = forwardRef(function (_a, ref) {
|
|
7819
7431
|
var chart = _a.chart, className = _a.className, title = _a.title, value = _a.value, rest = __rest(_a, ["chart", "className", "title", "value"]);
|
|
7820
|
-
return (
|
|
7821
|
-
|
|
7822
|
-
title && (
|
|
7823
|
-
value &&
|
|
7432
|
+
return (React.createElement(CCard, __assign({ className: classNames(className) }, rest, { ref: ref }),
|
|
7433
|
+
React.createElement(CCardBody, { className: "text-center" },
|
|
7434
|
+
title && (React.createElement("div", { className: "text-medium-emphasis small text-uppercase fw-semibold" }, title)),
|
|
7435
|
+
value && React.createElement("div", { className: "fs-6 fw-semibold py-3" }, value),
|
|
7824
7436
|
chart)));
|
|
7825
7437
|
});
|
|
7826
7438
|
CWidgetStatsE.propTypes = {
|
|
@@ -7834,13 +7446,13 @@ CWidgetStatsE.displayName = 'CWidgetStatsE';
|
|
|
7834
7446
|
|
|
7835
7447
|
var CWidgetStatsF = forwardRef(function (_a, ref) {
|
|
7836
7448
|
var className = _a.className, color = _a.color, footer = _a.footer, icon = _a.icon, _b = _a.padding, padding = _b === void 0 ? true : _b, title = _a.title, value = _a.value, rest = __rest(_a, ["className", "color", "footer", "icon", "padding", "title", "value"]);
|
|
7837
|
-
return (
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
footer &&
|
|
7449
|
+
return (React.createElement(CCard, __assign({ className: className }, rest, { ref: ref }),
|
|
7450
|
+
React.createElement(CCardBody, { className: "d-flex align-items-center ".concat(padding === false && 'p-0') },
|
|
7451
|
+
React.createElement("div", { className: "me-3 text-white bg-".concat(color, " ").concat(padding ? 'p-3' : 'p-4') }, icon),
|
|
7452
|
+
React.createElement("div", null,
|
|
7453
|
+
React.createElement("div", { className: "fs-6 fw-semibold text-".concat(color) }, value),
|
|
7454
|
+
React.createElement("div", { className: "text-medium-emphasis text-uppercase fw-semibold small" }, title))),
|
|
7455
|
+
footer && React.createElement(CCardFooter, null, footer)));
|
|
7844
7456
|
});
|
|
7845
7457
|
CWidgetStatsF.propTypes = {
|
|
7846
7458
|
className: PropTypes.string,
|
|
@@ -7853,5 +7465,5 @@ CWidgetStatsF.propTypes = {
|
|
|
7853
7465
|
};
|
|
7854
7466
|
CWidgetStatsF.displayName = 'CWidgetStatsF';
|
|
7855
7467
|
|
|
7856
|
-
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionHeader, CAccordionItem, CAlert, CAlertHeading, CAlertLink, CAvatar, CBackdrop, CBadge, CBreadcrumb, CBreadcrumbItem, CButton, CButtonGroup, CButtonToolbar, CCallout, CCard, CCardBody, CCardFooter, CCardGroup, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCloseButton, CCol, CCollapse, CConditionalPortal, CContainer, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CFooter, CForm, CFormCheck, CFormControlValidation, CFormControlWrapper, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderText, CHeaderToggler, CImage, CInputGroup, CInputGroupText, CLink, CListGroup, CListGroupItem, CModal, CModalBody, CModalContent, CModalDialog, CModalFooter, CModalHeader, CModalTitle, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarText, CNavbarToggler, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasTitle, CPagination, CPaginationItem, CPlaceholder, CPopover, CProgress, CProgressBar, CRow, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarHeader, CSidebarNav, CSidebarToggler, CSpinner, CTabContent, CTabPane, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTableRow, CToast, CToastBody, CToastClose, CToastHeader, CToaster, CTooltip, CWidgetStatsA, CWidgetStatsB, CWidgetStatsC, CWidgetStatsD, CWidgetStatsE, CWidgetStatsF, useColorModes, useForkedRef };
|
|
7468
|
+
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionHeader, CAccordionItem, CAlert, CAlertHeading, CAlertLink, CAvatar, CBackdrop, CBadge, CBreadcrumb, CBreadcrumbItem, CButton, CButtonGroup, CButtonToolbar, CCallout, CCard, CCardBody, CCardFooter, CCardGroup, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCloseButton, CCol, CCollapse, CConditionalPortal, CContainer, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CFooter, CForm, CFormCheck, CFormControlValidation, CFormControlWrapper, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderText, CHeaderToggler, CImage, CInputGroup, CInputGroupText, CLink, CListGroup, CListGroupItem, CModal, CModalBody, CModalContent, CModalDialog, CModalFooter, CModalHeader, CModalTitle, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarText, CNavbarToggler, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasTitle, CPagination, CPaginationItem, CPlaceholder, CPopover, CProgress, CProgressBar, CProgressStacked, CRow, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarHeader, CSidebarNav, CSidebarToggler, CSpinner, CTabContent, CTabPane, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTableRow, CToast, CToastBody, CToastClose, CToastHeader, CToaster, CTooltip, CWidgetStatsA, CWidgetStatsB, CWidgetStatsC, CWidgetStatsD, CWidgetStatsE, CWidgetStatsF, useColorModes, useForkedRef, usePopper };
|
|
7857
7469
|
//# sourceMappingURL=index.es.js.map
|