@coreui/react 4.9.0-beta.1 → 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 +3 -2
- package/dist/hooks/usePopper.d.ts +8 -0
- package/dist/index.es.js +1526 -1915
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1311 -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 +21 -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,21 +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
|
-
|
|
2520
|
+
colorMode: colorMode,
|
|
2511
2521
|
isColorModeSet: function () { return Boolean(getStoredTheme(localStorageItemName)); },
|
|
2512
|
-
setColorMode:
|
|
2522
|
+
setColorMode: setColorMode,
|
|
2513
2523
|
};
|
|
2514
2524
|
};
|
|
2515
2525
|
|
|
@@ -2556,984 +2566,139 @@ function isFunction(value) {
|
|
|
2556
2566
|
return !!(value && {}.toString.call(value) == '[object Function]');
|
|
2557
2567
|
}
|
|
2558
2568
|
|
|
2559
|
-
var
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
}
|
|
2578
|
-
setHeight(0);
|
|
2579
|
-
};
|
|
2580
|
-
var onExit = function () {
|
|
2581
|
-
if (horizontal) {
|
|
2582
|
-
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
2583
|
-
return;
|
|
2584
|
-
}
|
|
2585
|
-
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
2586
|
-
};
|
|
2587
|
-
var onExiting = function () {
|
|
2588
|
-
onHide && onHide();
|
|
2589
|
-
if (horizontal) {
|
|
2590
|
-
setWidth(0);
|
|
2591
|
-
return;
|
|
2592
|
-
}
|
|
2593
|
-
setHeight(0);
|
|
2594
|
-
};
|
|
2595
|
-
var onExited = function () {
|
|
2596
|
-
if (horizontal) {
|
|
2597
|
-
setWidth(0);
|
|
2598
|
-
return;
|
|
2599
|
-
}
|
|
2600
|
-
setHeight(0);
|
|
2601
|
-
};
|
|
2602
|
-
return (React__default.createElement(CSSTransition$1, { in: visible, nodeRef: collapseRef, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 350 }, function (state) {
|
|
2603
|
-
var currentHeight = height === 0 ? null : { height: height };
|
|
2604
|
-
var currentWidth = width === 0 ? null : { width: width };
|
|
2605
|
-
return (React__default.createElement("div", __assign({ className: classNames(className, {
|
|
2606
|
-
'collapse-horizontal': horizontal,
|
|
2607
|
-
collapsing: state === 'entering' || state === 'exiting',
|
|
2608
|
-
'collapse show': state === 'entered',
|
|
2609
|
-
collapse: state === 'exited',
|
|
2610
|
-
}), style: __assign(__assign({}, currentHeight), currentWidth) }, rest, { ref: forkedRef }), children));
|
|
2611
|
-
}));
|
|
2612
|
-
});
|
|
2613
|
-
CCollapse.propTypes = {
|
|
2614
|
-
children: PropTypes.node,
|
|
2615
|
-
className: PropTypes.string,
|
|
2616
|
-
horizontal: PropTypes.bool,
|
|
2617
|
-
onHide: PropTypes.func,
|
|
2618
|
-
onShow: PropTypes.func,
|
|
2619
|
-
visible: PropTypes.bool,
|
|
2620
|
-
};
|
|
2621
|
-
CCollapse.displayName = 'CCollapse';
|
|
2622
|
-
|
|
2623
|
-
var CAccordionBody = forwardRef(function (_a, ref) {
|
|
2624
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
2625
|
-
var visible = useContext(CAccordionItemContext).visible;
|
|
2626
|
-
return (React__default.createElement(CCollapse, { className: "accordion-collapse", visible: visible },
|
|
2627
|
-
React__default.createElement("div", __assign({ className: classNames('accordion-body', className) }, rest, { ref: ref }), children)));
|
|
2628
|
-
});
|
|
2629
|
-
CAccordionBody.propTypes = {
|
|
2630
|
-
children: PropTypes.node,
|
|
2631
|
-
className: PropTypes.string,
|
|
2632
|
-
};
|
|
2633
|
-
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
|
|
2634
2587
|
|
|
2635
|
-
var
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
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));
|
|
2639
|
-
});
|
|
2640
|
-
CAccordionButton.propTypes = {
|
|
2641
|
-
children: PropTypes.node,
|
|
2642
|
-
className: PropTypes.string,
|
|
2643
|
-
};
|
|
2644
|
-
CAccordionButton.displayName = 'CAccordionButton';
|
|
2588
|
+
var beforeRead = 'beforeRead';
|
|
2589
|
+
var read = 'read';
|
|
2590
|
+
var afterRead = 'afterRead'; // pure-logic modifiers
|
|
2645
2591
|
|
|
2646
|
-
var
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
React__default.createElement(CAccordionButton, null, children)));
|
|
2650
|
-
});
|
|
2651
|
-
CAccordionHeader.propTypes = {
|
|
2652
|
-
children: PropTypes.node,
|
|
2653
|
-
className: PropTypes.string,
|
|
2654
|
-
};
|
|
2655
|
-
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)
|
|
2656
2595
|
|
|
2657
|
-
var
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
}, disabled, className), "aria-label": "Close", disabled: disabled }, rest, { ref: ref })));
|
|
2662
|
-
});
|
|
2663
|
-
CCloseButton.propTypes = {
|
|
2664
|
-
className: PropTypes.string,
|
|
2665
|
-
disabled: PropTypes.bool,
|
|
2666
|
-
white: PropTypes.bool,
|
|
2667
|
-
};
|
|
2668
|
-
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];
|
|
2669
2600
|
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
'secondary',
|
|
2674
|
-
'success',
|
|
2675
|
-
'danger',
|
|
2676
|
-
'warning',
|
|
2677
|
-
'info',
|
|
2678
|
-
'dark',
|
|
2679
|
-
'light',
|
|
2680
|
-
]),
|
|
2681
|
-
PropTypes.string,
|
|
2682
|
-
]);
|
|
2683
|
-
var placementPropType = PropTypes.oneOf([
|
|
2684
|
-
'auto',
|
|
2685
|
-
'auto-start',
|
|
2686
|
-
'auto-end',
|
|
2687
|
-
'top-end',
|
|
2688
|
-
'top',
|
|
2689
|
-
'top-start',
|
|
2690
|
-
'bottom-end',
|
|
2691
|
-
'bottom',
|
|
2692
|
-
'bottom-start',
|
|
2693
|
-
'right-start',
|
|
2694
|
-
'right',
|
|
2695
|
-
'right-end',
|
|
2696
|
-
'left-start',
|
|
2697
|
-
'left',
|
|
2698
|
-
'left-end',
|
|
2699
|
-
]);
|
|
2700
|
-
var shapePropType = PropTypes.oneOfType([
|
|
2701
|
-
PropTypes.oneOf([
|
|
2702
|
-
'rounded',
|
|
2703
|
-
'rounded-top',
|
|
2704
|
-
'rounded-end',
|
|
2705
|
-
'rounded-bottom',
|
|
2706
|
-
'rounded-start',
|
|
2707
|
-
'rounded-circle',
|
|
2708
|
-
'rounded-pill',
|
|
2709
|
-
'rounded-0',
|
|
2710
|
-
'rounded-1',
|
|
2711
|
-
'rounded-2',
|
|
2712
|
-
'rounded-3',
|
|
2713
|
-
]),
|
|
2714
|
-
PropTypes.string,
|
|
2715
|
-
]);
|
|
2716
|
-
var textColorsPropType = PropTypes.oneOfType([
|
|
2717
|
-
colorPropType,
|
|
2718
|
-
PropTypes.oneOf(['white', 'muted']),
|
|
2719
|
-
PropTypes.string,
|
|
2720
|
-
]);
|
|
2721
|
-
var triggerPropType = PropTypes.oneOfType([
|
|
2722
|
-
PropTypes.arrayOf(PropTypes.oneOf(['hover', 'focus', 'click']).isRequired),
|
|
2723
|
-
PropTypes.oneOf(['hover', 'focus', 'click']),
|
|
2724
|
-
]);
|
|
2601
|
+
function getNodeName(element) {
|
|
2602
|
+
return element ? (element.nodeName || '').toLowerCase() : null;
|
|
2603
|
+
}
|
|
2725
2604
|
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
var _d = useState(visible), _visible = _d[0], setVisible = _d[1];
|
|
2731
|
-
useEffect(function () {
|
|
2732
|
-
setVisible(visible);
|
|
2733
|
-
}, [visible]);
|
|
2734
|
-
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), {
|
|
2735
|
-
'alert-dismissible fade': dismissible,
|
|
2736
|
-
show: state === 'entered',
|
|
2737
|
-
}, className), role: "alert" }, rest, { ref: forkedRef }),
|
|
2738
|
-
children,
|
|
2739
|
-
dismissible && React__default.createElement(CCloseButton, { onClick: function () { return setVisible(false); } }))); }));
|
|
2740
|
-
});
|
|
2741
|
-
CAlert.propTypes = {
|
|
2742
|
-
children: PropTypes.node,
|
|
2743
|
-
className: PropTypes.string,
|
|
2744
|
-
color: colorPropType.isRequired,
|
|
2745
|
-
dismissible: PropTypes.bool,
|
|
2746
|
-
onClose: PropTypes.func,
|
|
2747
|
-
variant: PropTypes.string,
|
|
2748
|
-
visible: PropTypes.bool,
|
|
2749
|
-
};
|
|
2750
|
-
CAlert.displayName = 'CAlert';
|
|
2605
|
+
function getWindow(node) {
|
|
2606
|
+
if (node == null) {
|
|
2607
|
+
return window;
|
|
2608
|
+
}
|
|
2751
2609
|
|
|
2752
|
-
|
|
2753
|
-
var
|
|
2754
|
-
return
|
|
2755
|
-
}
|
|
2756
|
-
CAlertHeading.propTypes = {
|
|
2757
|
-
children: PropTypes.node,
|
|
2758
|
-
className: PropTypes.string,
|
|
2759
|
-
component: PropTypes.elementType,
|
|
2760
|
-
};
|
|
2761
|
-
CAlertHeading.displayName = 'CAlertHeading';
|
|
2610
|
+
if (node.toString() !== '[object Window]') {
|
|
2611
|
+
var ownerDocument = node.ownerDocument;
|
|
2612
|
+
return ownerDocument ? ownerDocument.defaultView || window : window;
|
|
2613
|
+
}
|
|
2762
2614
|
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
return (React__default.createElement(Component
|
|
2766
|
-
// TODO: remove duplicated classes ex. `active active` in `<CListGroupItem>`
|
|
2767
|
-
, __assign({
|
|
2768
|
-
// TODO: remove duplicated classes ex. `active active` in `<CListGroupItem>`
|
|
2769
|
-
className: classNames(className, { active: active, disabled: disabled }) }, (active && { 'aria-current': 'page' }), (Component === 'a' && disabled && { 'aria-disabled': true, tabIndex: -1 }), ((Component === 'a' || Component === 'button') && {
|
|
2770
|
-
onClick: function (event) {
|
|
2771
|
-
event.preventDefault;
|
|
2772
|
-
!disabled && rest.onClick && rest.onClick(event);
|
|
2773
|
-
},
|
|
2774
|
-
}), { disabled: disabled }, rest, { ref: ref }), children));
|
|
2775
|
-
});
|
|
2776
|
-
CLink.propTypes = {
|
|
2777
|
-
active: PropTypes.bool,
|
|
2778
|
-
children: PropTypes.node,
|
|
2779
|
-
className: PropTypes.string,
|
|
2780
|
-
component: PropTypes.elementType,
|
|
2781
|
-
disabled: PropTypes.bool,
|
|
2782
|
-
};
|
|
2783
|
-
CLink.displayName = 'CLink';
|
|
2615
|
+
return node;
|
|
2616
|
+
}
|
|
2784
2617
|
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
}
|
|
2789
|
-
CAlertLink.propTypes = {
|
|
2790
|
-
children: PropTypes.node,
|
|
2791
|
-
className: PropTypes.string,
|
|
2792
|
-
};
|
|
2793
|
-
CAlertLink.displayName = 'CAlertLink';
|
|
2794
|
-
|
|
2795
|
-
var CAvatar = forwardRef(function (_a, ref) {
|
|
2796
|
-
var _b;
|
|
2797
|
-
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"]);
|
|
2798
|
-
var statusClassName = status && classNames('avatar-status', "bg-".concat(status));
|
|
2799
|
-
return (React__default.createElement("div", __assign({ className: classNames('avatar', (_b = {},
|
|
2800
|
-
_b["bg-".concat(color)] = color,
|
|
2801
|
-
_b["avatar-".concat(size)] = size,
|
|
2802
|
-
_b["text-".concat(textColor)] = textColor,
|
|
2803
|
-
_b), shape, className) }, rest, { ref: ref }),
|
|
2804
|
-
src ? React__default.createElement("img", { src: src, className: "avatar-img" }) : children,
|
|
2805
|
-
status && React__default.createElement("span", { className: statusClassName })));
|
|
2806
|
-
});
|
|
2807
|
-
CAvatar.propTypes = {
|
|
2808
|
-
children: PropTypes.node,
|
|
2809
|
-
className: PropTypes.string,
|
|
2810
|
-
color: colorPropType,
|
|
2811
|
-
shape: shapePropType,
|
|
2812
|
-
size: PropTypes.string,
|
|
2813
|
-
src: PropTypes.string,
|
|
2814
|
-
status: PropTypes.string,
|
|
2815
|
-
textColor: textColorsPropType,
|
|
2816
|
-
};
|
|
2817
|
-
CAvatar.displayName = 'CAvatar';
|
|
2618
|
+
function isElement(node) {
|
|
2619
|
+
var OwnElement = getWindow(node).Element;
|
|
2620
|
+
return node instanceof OwnElement || node instanceof Element;
|
|
2621
|
+
}
|
|
2818
2622
|
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
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', {
|
|
2824
|
-
show: state === 'entered',
|
|
2825
|
-
}) }, rest, { ref: forkedRef }))); }));
|
|
2826
|
-
});
|
|
2827
|
-
CBackdrop.propTypes = {
|
|
2828
|
-
className: PropTypes.string,
|
|
2829
|
-
visible: PropTypes.bool,
|
|
2830
|
-
};
|
|
2831
|
-
CBackdrop.displayName = 'CBackdrop';
|
|
2623
|
+
function isHTMLElement(node) {
|
|
2624
|
+
var OwnElement = getWindow(node).HTMLElement;
|
|
2625
|
+
return node instanceof OwnElement || node instanceof HTMLElement;
|
|
2626
|
+
}
|
|
2832
2627
|
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
return
|
|
2837
|
-
|
|
2838
|
-
_b['position-absolute translate-middle'] = position,
|
|
2839
|
-
_b['top-0'] = position === null || position === void 0 ? void 0 : position.includes('top'),
|
|
2840
|
-
_b['top-100'] = position === null || position === void 0 ? void 0 : position.includes('bottom'),
|
|
2841
|
-
_b['start-100'] = position === null || position === void 0 ? void 0 : position.includes('end'),
|
|
2842
|
-
_b['start-0'] = position === null || position === void 0 ? void 0 : position.includes('start'),
|
|
2843
|
-
_b["badge-".concat(size)] = size,
|
|
2844
|
-
_b["text-".concat(textColor)] = textColor,
|
|
2845
|
-
_b), shape, className) }, rest, { ref: ref }), children));
|
|
2846
|
-
});
|
|
2847
|
-
CBadge.propTypes = {
|
|
2848
|
-
children: PropTypes.node,
|
|
2849
|
-
className: PropTypes.string,
|
|
2850
|
-
color: colorPropType,
|
|
2851
|
-
component: PropTypes.string,
|
|
2852
|
-
position: PropTypes.oneOf(['top-start', 'top-end', 'bottom-end', 'bottom-start']),
|
|
2853
|
-
shape: shapePropType,
|
|
2854
|
-
size: PropTypes.oneOf(['sm']),
|
|
2855
|
-
textColor: textColorsPropType,
|
|
2856
|
-
};
|
|
2857
|
-
CBadge.displayName = 'CBadge';
|
|
2628
|
+
function isShadowRoot(node) {
|
|
2629
|
+
// IE 11 has no ShadowRoot
|
|
2630
|
+
if (typeof ShadowRoot === 'undefined') {
|
|
2631
|
+
return false;
|
|
2632
|
+
}
|
|
2858
2633
|
|
|
2859
|
-
var
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
React__default.createElement("ol", __assign({ className: classNames('breadcrumb', className) }, rest, { ref: ref }), children)));
|
|
2863
|
-
});
|
|
2864
|
-
CBreadcrumb.propTypes = {
|
|
2865
|
-
children: PropTypes.node,
|
|
2866
|
-
className: PropTypes.string,
|
|
2867
|
-
};
|
|
2868
|
-
CBreadcrumb.displayName = 'CBreadcrumb';
|
|
2634
|
+
var OwnElement = getWindow(node).ShadowRoot;
|
|
2635
|
+
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
2636
|
+
}
|
|
2869
2637
|
|
|
2870
|
-
|
|
2871
|
-
var children = _a.children, active = _a.active, className = _a.className, href = _a.href, rest = __rest(_a, ["children", "active", "className", "href"]);
|
|
2872
|
-
return (React__default.createElement("li", __assign({ className: classNames('breadcrumb-item', {
|
|
2873
|
-
active: active,
|
|
2874
|
-
}, className) }, (active && { 'aria-current': 'page' }), rest, { ref: ref }), href ? React__default.createElement(CLink, { href: href }, children) : children));
|
|
2875
|
-
});
|
|
2876
|
-
CBreadcrumbItem.propTypes = {
|
|
2877
|
-
active: PropTypes.bool,
|
|
2878
|
-
children: PropTypes.node,
|
|
2879
|
-
className: PropTypes.string,
|
|
2880
|
-
href: PropTypes.string,
|
|
2881
|
-
};
|
|
2882
|
-
CBreadcrumbItem.displayName = 'CBreadcrumbItem';
|
|
2638
|
+
// and applies them to the HTMLElements such as popper and arrow
|
|
2883
2639
|
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
}
|
|
2889
|
-
|
|
2890
|
-
children: PropTypes.node,
|
|
2891
|
-
className: PropTypes.string,
|
|
2892
|
-
color: colorPropType,
|
|
2893
|
-
component: PropTypes.elementType,
|
|
2894
|
-
shape: PropTypes.string,
|
|
2895
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
2896
|
-
type: PropTypes.oneOf(['button', 'submit', 'reset']),
|
|
2897
|
-
variant: PropTypes.oneOf(['outline', 'ghost']),
|
|
2898
|
-
};
|
|
2899
|
-
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
|
|
2900
2646
|
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
children: PropTypes.node,
|
|
2907
|
-
className: PropTypes.string,
|
|
2908
|
-
};
|
|
2909
|
-
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]
|
|
2910
2652
|
|
|
2911
|
-
var CButtonGroup = forwardRef(function (_a, ref) {
|
|
2912
|
-
var _b;
|
|
2913
|
-
var children = _a.children, className = _a.className, size = _a.size, vertical = _a.vertical, rest = __rest(_a, ["children", "className", "size", "vertical"]);
|
|
2914
|
-
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));
|
|
2915
|
-
});
|
|
2916
|
-
CButtonGroup.propTypes = {
|
|
2917
|
-
children: PropTypes.node,
|
|
2918
|
-
className: PropTypes.string,
|
|
2919
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
2920
|
-
vertical: PropTypes.bool,
|
|
2921
|
-
};
|
|
2922
|
-
CButtonGroup.displayName = 'CButtonGroup';
|
|
2923
2653
|
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
return (React__default.createElement("div", __assign({ className: classNames('callout', (_b = {},
|
|
2928
|
-
_b["callout-".concat(color)] = color,
|
|
2929
|
-
_b), className) }, rest, { ref: ref }), children));
|
|
2930
|
-
});
|
|
2931
|
-
CCallout.propTypes = {
|
|
2932
|
-
children: PropTypes.node,
|
|
2933
|
-
className: PropTypes.string,
|
|
2934
|
-
color: colorPropType,
|
|
2935
|
-
};
|
|
2936
|
-
CCallout.displayName = 'CCallout';
|
|
2654
|
+
Object.assign(element.style, style);
|
|
2655
|
+
Object.keys(attributes).forEach(function (name) {
|
|
2656
|
+
var value = attributes[name];
|
|
2937
2657
|
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
}
|
|
2946
|
-
CCard.propTypes = {
|
|
2947
|
-
children: PropTypes.node,
|
|
2948
|
-
className: PropTypes.string,
|
|
2949
|
-
color: colorPropType,
|
|
2950
|
-
textColor: PropTypes.string,
|
|
2951
|
-
};
|
|
2952
|
-
CCard.displayName = 'CCard';
|
|
2658
|
+
if (value === false) {
|
|
2659
|
+
element.removeAttribute(name);
|
|
2660
|
+
} else {
|
|
2661
|
+
element.setAttribute(name, value === true ? '' : value);
|
|
2662
|
+
}
|
|
2663
|
+
});
|
|
2664
|
+
});
|
|
2665
|
+
}
|
|
2953
2666
|
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
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;
|
|
2963
2683
|
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
});
|
|
2968
|
-
CCardFooter.propTypes = {
|
|
2969
|
-
children: PropTypes.node,
|
|
2970
|
-
className: PropTypes.string,
|
|
2971
|
-
};
|
|
2972
|
-
CCardFooter.displayName = 'CCardFooter';
|
|
2684
|
+
if (state.elements.arrow) {
|
|
2685
|
+
Object.assign(state.elements.arrow.style, initialStyles.arrow);
|
|
2686
|
+
}
|
|
2973
2687
|
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
}
|
|
2978
|
-
|
|
2979
|
-
children: PropTypes.node,
|
|
2980
|
-
className: PropTypes.string,
|
|
2981
|
-
};
|
|
2982
|
-
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
|
|
2983
2693
|
|
|
2984
|
-
var
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
});
|
|
2988
|
-
CCardHeader.propTypes = {
|
|
2989
|
-
children: PropTypes.node,
|
|
2990
|
-
className: PropTypes.string,
|
|
2991
|
-
component: PropTypes.elementType,
|
|
2992
|
-
};
|
|
2993
|
-
CCardHeader.displayName = 'CCardHeader';
|
|
2694
|
+
var style = styleProperties.reduce(function (style, property) {
|
|
2695
|
+
style[property] = '';
|
|
2696
|
+
return style;
|
|
2697
|
+
}, {}); // arrow is optional + virtual elements
|
|
2994
2698
|
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
});
|
|
2999
|
-
CCardImage.propTypes = {
|
|
3000
|
-
children: PropTypes.node,
|
|
3001
|
-
className: PropTypes.string,
|
|
3002
|
-
component: PropTypes.elementType,
|
|
3003
|
-
orientation: PropTypes.oneOf(['top', 'bottom']),
|
|
3004
|
-
};
|
|
3005
|
-
CCardImage.displayName = 'CCardImage';
|
|
3006
|
-
|
|
3007
|
-
var CCardImageOverlay = forwardRef(function (_a, ref) {
|
|
3008
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
3009
|
-
return (React__default.createElement("div", __assign({ className: classNames('card-img-overlay', className) }, rest, { ref: ref }), children));
|
|
3010
|
-
});
|
|
3011
|
-
CCardImageOverlay.propTypes = {
|
|
3012
|
-
children: PropTypes.node,
|
|
3013
|
-
className: PropTypes.string,
|
|
3014
|
-
};
|
|
3015
|
-
CCardImageOverlay.displayName = 'CCardImageOverlay';
|
|
3016
|
-
|
|
3017
|
-
var CCardLink = forwardRef(function (_a, ref) {
|
|
3018
|
-
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
3019
|
-
return (React__default.createElement(CLink, __assign({ className: classNames('card-link', className) }, rest, { ref: ref }), children));
|
|
3020
|
-
});
|
|
3021
|
-
CCardLink.propTypes = {
|
|
3022
|
-
children: PropTypes.node,
|
|
3023
|
-
className: PropTypes.string,
|
|
3024
|
-
};
|
|
3025
|
-
CCardLink.displayName = 'CCardLink';
|
|
3026
|
-
|
|
3027
|
-
var CCardSubtitle = forwardRef(function (_a, ref) {
|
|
3028
|
-
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h6' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
3029
|
-
return (React__default.createElement(Component, __assign({ className: classNames('card-subtitle', className) }, rest, { ref: ref }), children));
|
|
3030
|
-
});
|
|
3031
|
-
CCardSubtitle.propTypes = {
|
|
3032
|
-
children: PropTypes.node,
|
|
3033
|
-
className: PropTypes.string,
|
|
3034
|
-
component: PropTypes.elementType,
|
|
3035
|
-
};
|
|
3036
|
-
CCardSubtitle.displayName = 'CCardSubtitle';
|
|
3037
|
-
|
|
3038
|
-
var CCardText = forwardRef(function (_a, ref) {
|
|
3039
|
-
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'p' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
3040
|
-
return (React__default.createElement(Component, __assign({ className: classNames('card-text', className) }, rest, { ref: ref }), children));
|
|
3041
|
-
});
|
|
3042
|
-
CCardText.propTypes = {
|
|
3043
|
-
children: PropTypes.node,
|
|
3044
|
-
className: PropTypes.string,
|
|
3045
|
-
component: PropTypes.elementType,
|
|
3046
|
-
};
|
|
3047
|
-
CCardText.displayName = 'CCardText';
|
|
3048
|
-
|
|
3049
|
-
var CCardTitle = forwardRef(function (_a, ref) {
|
|
3050
|
-
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
3051
|
-
return (React__default.createElement(Component, __assign({ className: classNames('card-title', className) }, rest, { ref: ref }), children));
|
|
3052
|
-
});
|
|
3053
|
-
CCardTitle.propTypes = {
|
|
3054
|
-
children: PropTypes.node,
|
|
3055
|
-
className: PropTypes.string,
|
|
3056
|
-
component: PropTypes.elementType,
|
|
3057
|
-
};
|
|
3058
|
-
CCardTitle.displayName = 'CCardTitle';
|
|
3059
|
-
|
|
3060
|
-
var isInViewport = function (element) {
|
|
3061
|
-
var rect = element.getBoundingClientRect();
|
|
3062
|
-
return (Math.floor(rect.top) >= 0 &&
|
|
3063
|
-
Math.floor(rect.left) >= 0 &&
|
|
3064
|
-
Math.floor(rect.bottom) <= (window.innerHeight || document.documentElement.clientHeight) &&
|
|
3065
|
-
Math.floor(rect.right) <= (window.innerWidth || document.documentElement.clientWidth));
|
|
3066
|
-
};
|
|
3067
|
-
|
|
3068
|
-
var isRTL = function (element) {
|
|
3069
|
-
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
3070
|
-
return true;
|
|
3071
|
-
}
|
|
3072
|
-
if (element) {
|
|
3073
|
-
return element.closest('[dir="rtl"]') !== null;
|
|
3074
|
-
}
|
|
3075
|
-
return false;
|
|
3076
|
-
};
|
|
3077
|
-
|
|
3078
|
-
var CCarouselContext = createContext({});
|
|
3079
|
-
var CCarousel = forwardRef(function (_a, ref) {
|
|
3080
|
-
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"]);
|
|
3081
|
-
var carouselRef = useRef(null);
|
|
3082
|
-
var forkedRef = useForkedRef(ref, carouselRef);
|
|
3083
|
-
var data = useRef({}).current;
|
|
3084
|
-
var _g = useState(activeIndex), active = _g[0], setActive = _g[1];
|
|
3085
|
-
var _h = useState(false), animating = _h[0], setAnimating = _h[1];
|
|
3086
|
-
var _j = useState(), customInterval = _j[0], setCustomInterval = _j[1];
|
|
3087
|
-
var _k = useState('next'), direction = _k[0], setDirection = _k[1];
|
|
3088
|
-
var _l = useState(0), itemsNumber = _l[0], setItemsNumber = _l[1];
|
|
3089
|
-
var _m = useState(null), touchPosition = _m[0], setTouchPosition = _m[1];
|
|
3090
|
-
var _o = useState(), visible = _o[0], setVisible = _o[1];
|
|
3091
|
-
useEffect(function () {
|
|
3092
|
-
setItemsNumber(Children.toArray(children).length);
|
|
3093
|
-
});
|
|
3094
|
-
useEffect(function () {
|
|
3095
|
-
visible && cycle();
|
|
3096
|
-
}, [visible]);
|
|
3097
|
-
useEffect(function () {
|
|
3098
|
-
!animating && cycle();
|
|
3099
|
-
!animating && onSlid && onSlid(active, direction);
|
|
3100
|
-
animating && onSlide && onSlide(active, direction);
|
|
3101
|
-
}, [animating]);
|
|
3102
|
-
useEffect(function () {
|
|
3103
|
-
window.addEventListener('scroll', handleScroll);
|
|
3104
|
-
return function () {
|
|
3105
|
-
window.removeEventListener('scroll', handleScroll);
|
|
3106
|
-
};
|
|
3107
|
-
});
|
|
3108
|
-
var cycle = function () {
|
|
3109
|
-
_pause();
|
|
3110
|
-
if (!wrap && active === itemsNumber - 1) {
|
|
3111
|
-
return;
|
|
3112
|
-
}
|
|
3113
|
-
if (typeof interval === 'number') {
|
|
3114
|
-
data.timeout = setTimeout(function () { return nextItemWhenVisible(); }, typeof customInterval === 'number' ? customInterval : interval);
|
|
3115
|
-
}
|
|
3116
|
-
};
|
|
3117
|
-
var _pause = function () { return pause && data.timeout && clearTimeout(data.timeout); };
|
|
3118
|
-
var nextItemWhenVisible = function () {
|
|
3119
|
-
// Don't call next when the page isn't visible
|
|
3120
|
-
// or the carousel or its parent isn't visible
|
|
3121
|
-
if (!document.hidden && carouselRef.current && isInViewport(carouselRef.current)) {
|
|
3122
|
-
if (animating) {
|
|
3123
|
-
return;
|
|
3124
|
-
}
|
|
3125
|
-
handleControlClick('next');
|
|
3126
|
-
}
|
|
3127
|
-
};
|
|
3128
|
-
var handleControlClick = function (direction) {
|
|
3129
|
-
if (animating) {
|
|
3130
|
-
return;
|
|
3131
|
-
}
|
|
3132
|
-
setDirection(direction);
|
|
3133
|
-
if (direction === 'next') {
|
|
3134
|
-
active === itemsNumber - 1 ? setActive(0) : setActive(active + 1);
|
|
3135
|
-
}
|
|
3136
|
-
else {
|
|
3137
|
-
active === 0 ? setActive(itemsNumber - 1) : setActive(active - 1);
|
|
3138
|
-
}
|
|
3139
|
-
};
|
|
3140
|
-
var handleIndicatorClick = function (index) {
|
|
3141
|
-
if (active === index) {
|
|
3142
|
-
return;
|
|
3143
|
-
}
|
|
3144
|
-
if (active < index) {
|
|
3145
|
-
setDirection('next');
|
|
3146
|
-
setActive(index);
|
|
3147
|
-
return;
|
|
3148
|
-
}
|
|
3149
|
-
if (active > index) {
|
|
3150
|
-
setDirection('prev');
|
|
3151
|
-
setActive(index);
|
|
3152
|
-
}
|
|
3153
|
-
};
|
|
3154
|
-
var handleScroll = function () {
|
|
3155
|
-
if (!document.hidden && carouselRef.current && isInViewport(carouselRef.current)) {
|
|
3156
|
-
setVisible(true);
|
|
3157
|
-
}
|
|
3158
|
-
else {
|
|
3159
|
-
setVisible(false);
|
|
3160
|
-
}
|
|
3161
|
-
};
|
|
3162
|
-
var handleTouchMove = function (e) {
|
|
3163
|
-
var touchDown = touchPosition;
|
|
3164
|
-
if (touchDown === null) {
|
|
3165
|
-
return;
|
|
3166
|
-
}
|
|
3167
|
-
var currentTouch = e.touches[0].clientX;
|
|
3168
|
-
var diff = touchDown - currentTouch;
|
|
3169
|
-
if (diff > 5) {
|
|
3170
|
-
handleControlClick('next');
|
|
3171
|
-
}
|
|
3172
|
-
if (diff < -5) {
|
|
3173
|
-
handleControlClick('prev');
|
|
3174
|
-
}
|
|
3175
|
-
setTouchPosition(null);
|
|
3176
|
-
};
|
|
3177
|
-
var handleTouchStart = function (e) {
|
|
3178
|
-
var touchDown = e.touches[0].clientX;
|
|
3179
|
-
setTouchPosition(touchDown);
|
|
3180
|
-
};
|
|
3181
|
-
return (React__default.createElement("div", __assign({ className: classNames('carousel slide', {
|
|
3182
|
-
'carousel-dark': dark,
|
|
3183
|
-
'carousel-fade': transition === 'crossfade',
|
|
3184
|
-
}, className), onMouseEnter: _pause, onMouseLeave: cycle }, (touch && { onTouchStart: handleTouchStart, onTouchMove: handleTouchMove }), rest, { ref: forkedRef }),
|
|
3185
|
-
React__default.createElement(CCarouselContext.Provider, { value: {
|
|
3186
|
-
setAnimating: setAnimating,
|
|
3187
|
-
setCustomInterval: setCustomInterval,
|
|
3188
|
-
} },
|
|
3189
|
-
indicators && (React__default.createElement("ol", { className: "carousel-indicators" }, Array.from({ length: itemsNumber }, function (_, i) { return i; }).map(function (index) {
|
|
3190
|
-
return (React__default.createElement("li", { key: "indicator".concat(index), onClick: function () {
|
|
3191
|
-
!animating && handleIndicatorClick(index);
|
|
3192
|
-
}, className: active === index ? 'active' : '', "data-coreui-target": "" }));
|
|
3193
|
-
}))),
|
|
3194
|
-
React__default.createElement("div", { className: "carousel-inner" }, Children.map(children, function (child, index) {
|
|
3195
|
-
if (React__default.isValidElement(child)) {
|
|
3196
|
-
return React__default.cloneElement(child, {
|
|
3197
|
-
active: active === index ? true : false,
|
|
3198
|
-
direction: direction,
|
|
3199
|
-
key: index,
|
|
3200
|
-
});
|
|
3201
|
-
}
|
|
3202
|
-
return;
|
|
3203
|
-
})),
|
|
3204
|
-
controls && (React__default.createElement(React__default.Fragment, null,
|
|
3205
|
-
React__default.createElement("button", { className: "carousel-control-prev", onClick: function () { return handleControlClick('prev'); } },
|
|
3206
|
-
React__default.createElement("span", { className: "carousel-control-prev-icon", "aria-label": "prev" })),
|
|
3207
|
-
React__default.createElement("button", { className: "carousel-control-next", onClick: function () { return handleControlClick('next'); } },
|
|
3208
|
-
React__default.createElement("span", { className: "carousel-control-next-icon", "aria-label": "next" })))))));
|
|
3209
|
-
});
|
|
3210
|
-
CCarousel.propTypes = {
|
|
3211
|
-
activeIndex: PropTypes.number,
|
|
3212
|
-
children: PropTypes.node,
|
|
3213
|
-
className: PropTypes.string,
|
|
3214
|
-
controls: PropTypes.bool,
|
|
3215
|
-
dark: PropTypes.bool,
|
|
3216
|
-
indicators: PropTypes.bool,
|
|
3217
|
-
interval: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
|
|
3218
|
-
onSlid: PropTypes.func,
|
|
3219
|
-
onSlide: PropTypes.func,
|
|
3220
|
-
pause: PropTypes.oneOf([false, 'hover']),
|
|
3221
|
-
touch: PropTypes.bool,
|
|
3222
|
-
transition: PropTypes.oneOf(['slide', 'crossfade']),
|
|
3223
|
-
wrap: PropTypes.bool,
|
|
3224
|
-
};
|
|
3225
|
-
CCarousel.displayName = 'CCarousel';
|
|
3226
|
-
|
|
3227
|
-
var CCarouselCaption = forwardRef(function (_a, ref) {
|
|
3228
|
-
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
3229
|
-
return React__default.createElement("div", __assign({ className: classNames('carousel-caption', className) }, rest, { ref: ref }));
|
|
3230
|
-
});
|
|
3231
|
-
CCarouselCaption.propTypes = {
|
|
3232
|
-
className: PropTypes.string,
|
|
3233
|
-
};
|
|
3234
|
-
CCarouselCaption.displayName = 'CCarouselCaption';
|
|
3235
|
-
|
|
3236
|
-
var CCarouselItem = forwardRef(function (_a, ref) {
|
|
3237
|
-
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"]);
|
|
3238
|
-
var _c = useContext(CCarouselContext), setAnimating = _c.setAnimating, setCustomInterval = _c.setCustomInterval;
|
|
3239
|
-
var carouselItemRef = useRef(null);
|
|
3240
|
-
var forkedRef = useForkedRef(ref, carouselItemRef);
|
|
3241
|
-
var prevActive = useRef();
|
|
3242
|
-
var _d = useState(), directionClassName = _d[0], setDirectionClassName = _d[1];
|
|
3243
|
-
var _e = useState(), orderClassName = _e[0], setOrderClassName = _e[1];
|
|
3244
|
-
var _f = useState(active && 'active'), activeClassName = _f[0], setActiveClassName = _f[1];
|
|
3245
|
-
var _g = useState(0), count = _g[0], setCount = _g[1];
|
|
3246
|
-
useEffect(function () {
|
|
3247
|
-
if (active) {
|
|
3248
|
-
setCustomInterval(interval);
|
|
3249
|
-
if (count !== 0)
|
|
3250
|
-
setOrderClassName("carousel-item-".concat(direction));
|
|
3251
|
-
}
|
|
3252
|
-
if (prevActive.current && !active) {
|
|
3253
|
-
setActiveClassName('active');
|
|
3254
|
-
}
|
|
3255
|
-
if (active || prevActive.current) {
|
|
3256
|
-
setTimeout(function () {
|
|
3257
|
-
var _a;
|
|
3258
|
-
if (count !== 0) {
|
|
3259
|
-
// @ts-expect-error reflow is necessary to proper transition
|
|
3260
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3261
|
-
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
|
|
3262
|
-
setDirectionClassName("carousel-item-".concat(direction === 'next' ? 'start' : 'end'));
|
|
3263
|
-
}
|
|
3264
|
-
}, 0);
|
|
3265
|
-
}
|
|
3266
|
-
prevActive.current = active;
|
|
3267
|
-
if (count === 0)
|
|
3268
|
-
setCount(count + 1);
|
|
3269
|
-
}, [active]);
|
|
3270
|
-
useEffect(function () {
|
|
3271
|
-
var _a, _b;
|
|
3272
|
-
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('transitionstart', function () {
|
|
3273
|
-
active && setAnimating(true);
|
|
3274
|
-
});
|
|
3275
|
-
(_b = carouselItemRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('transitionend', function () {
|
|
3276
|
-
active && setAnimating(false);
|
|
3277
|
-
setDirectionClassName('');
|
|
3278
|
-
setOrderClassName('');
|
|
3279
|
-
if (active) {
|
|
3280
|
-
setActiveClassName('active');
|
|
3281
|
-
}
|
|
3282
|
-
if (!active) {
|
|
3283
|
-
setActiveClassName('');
|
|
3284
|
-
}
|
|
3285
|
-
});
|
|
3286
|
-
return function () {
|
|
3287
|
-
var _a, _b;
|
|
3288
|
-
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('transitionstart', function () {
|
|
3289
|
-
active && setAnimating(true);
|
|
3290
|
-
});
|
|
3291
|
-
(_b = carouselItemRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('transitionend', function () {
|
|
3292
|
-
active && setAnimating(false);
|
|
3293
|
-
setDirectionClassName('');
|
|
3294
|
-
setOrderClassName('');
|
|
3295
|
-
if (active) {
|
|
3296
|
-
setActiveClassName('active');
|
|
3297
|
-
}
|
|
3298
|
-
if (!active) {
|
|
3299
|
-
setActiveClassName('');
|
|
3300
|
-
}
|
|
3301
|
-
});
|
|
3302
|
-
};
|
|
3303
|
-
});
|
|
3304
|
-
return (React__default.createElement("div", __assign({ className: classNames('carousel-item', activeClassName, directionClassName, orderClassName, className), ref: forkedRef }, rest), children));
|
|
3305
|
-
});
|
|
3306
|
-
CCarouselItem.propTypes = {
|
|
3307
|
-
active: PropTypes.bool,
|
|
3308
|
-
children: PropTypes.node,
|
|
3309
|
-
className: PropTypes.string,
|
|
3310
|
-
direction: PropTypes.string,
|
|
3311
|
-
interval: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
|
|
3312
|
-
};
|
|
3313
|
-
CCarouselItem.displayName = 'CCarouselItem';
|
|
3314
|
-
|
|
3315
|
-
var CConditionalPortal = function (_a) {
|
|
3316
|
-
var children = _a.children, portal = _a.portal;
|
|
3317
|
-
return typeof window !== 'undefined' && portal ? (createPortal(children, document.body)) : (React__default.createElement(React__default.Fragment, null, children));
|
|
3318
|
-
};
|
|
3319
|
-
CConditionalPortal.propTypes = {
|
|
3320
|
-
children: PropTypes.node,
|
|
3321
|
-
portal: PropTypes.bool.isRequired,
|
|
3322
|
-
};
|
|
3323
|
-
CConditionalPortal.displayName = 'CConditionalPortal';
|
|
3324
|
-
|
|
3325
|
-
var ManagerReferenceNodeContext = React.createContext();
|
|
3326
|
-
var ManagerReferenceNodeSetterContext = React.createContext();
|
|
3327
|
-
function Manager(_ref) {
|
|
3328
|
-
var children = _ref.children;
|
|
3329
|
-
|
|
3330
|
-
var _React$useState = React.useState(null),
|
|
3331
|
-
referenceNode = _React$useState[0],
|
|
3332
|
-
setReferenceNode = _React$useState[1];
|
|
3333
|
-
|
|
3334
|
-
var hasUnmounted = React.useRef(false);
|
|
3335
|
-
React.useEffect(function () {
|
|
3336
|
-
return function () {
|
|
3337
|
-
hasUnmounted.current = true;
|
|
3338
|
-
};
|
|
3339
|
-
}, []);
|
|
3340
|
-
var handleSetReferenceNode = React.useCallback(function (node) {
|
|
3341
|
-
if (!hasUnmounted.current) {
|
|
3342
|
-
setReferenceNode(node);
|
|
3343
|
-
}
|
|
3344
|
-
}, []);
|
|
3345
|
-
return /*#__PURE__*/React.createElement(ManagerReferenceNodeContext.Provider, {
|
|
3346
|
-
value: referenceNode
|
|
3347
|
-
}, /*#__PURE__*/React.createElement(ManagerReferenceNodeSetterContext.Provider, {
|
|
3348
|
-
value: handleSetReferenceNode
|
|
3349
|
-
}, children));
|
|
3350
|
-
}
|
|
3351
|
-
|
|
3352
|
-
/**
|
|
3353
|
-
* Takes an argument and if it's an array, returns the first item in the array,
|
|
3354
|
-
* otherwise returns the argument. Used for Preact compatibility.
|
|
3355
|
-
*/
|
|
3356
|
-
var unwrapArray = function unwrapArray(arg) {
|
|
3357
|
-
return Array.isArray(arg) ? arg[0] : arg;
|
|
3358
|
-
};
|
|
3359
|
-
/**
|
|
3360
|
-
* Takes a maybe-undefined function and arbitrary args and invokes the function
|
|
3361
|
-
* only if it is defined.
|
|
3362
|
-
*/
|
|
3363
|
-
|
|
3364
|
-
var safeInvoke = function safeInvoke(fn) {
|
|
3365
|
-
if (typeof fn === 'function') {
|
|
3366
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3367
|
-
args[_key - 1] = arguments[_key];
|
|
3368
|
-
}
|
|
3369
|
-
|
|
3370
|
-
return fn.apply(void 0, args);
|
|
3371
|
-
}
|
|
3372
|
-
};
|
|
3373
|
-
/**
|
|
3374
|
-
* Sets a ref using either a ref callback or a ref object
|
|
3375
|
-
*/
|
|
3376
|
-
|
|
3377
|
-
var setRef = function setRef(ref, node) {
|
|
3378
|
-
// if its a function call it
|
|
3379
|
-
if (typeof ref === 'function') {
|
|
3380
|
-
return safeInvoke(ref, node);
|
|
3381
|
-
} // otherwise we should treat it as a ref object
|
|
3382
|
-
else if (ref != null) {
|
|
3383
|
-
ref.current = node;
|
|
3384
|
-
}
|
|
3385
|
-
};
|
|
3386
|
-
/**
|
|
3387
|
-
* Simple ponyfill for Object.fromEntries
|
|
3388
|
-
*/
|
|
3389
|
-
|
|
3390
|
-
var fromEntries = function fromEntries(entries) {
|
|
3391
|
-
return entries.reduce(function (acc, _ref) {
|
|
3392
|
-
var key = _ref[0],
|
|
3393
|
-
value = _ref[1];
|
|
3394
|
-
acc[key] = value;
|
|
3395
|
-
return acc;
|
|
3396
|
-
}, {});
|
|
3397
|
-
};
|
|
3398
|
-
/**
|
|
3399
|
-
* Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs
|
|
3400
|
-
*/
|
|
3401
|
-
|
|
3402
|
-
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React.useLayoutEffect : React.useEffect;
|
|
3403
|
-
|
|
3404
|
-
var top = 'top';
|
|
3405
|
-
var bottom = 'bottom';
|
|
3406
|
-
var right = 'right';
|
|
3407
|
-
var left = 'left';
|
|
3408
|
-
var auto = 'auto';
|
|
3409
|
-
var basePlacements = [top, bottom, right, left];
|
|
3410
|
-
var start = 'start';
|
|
3411
|
-
var end = 'end';
|
|
3412
|
-
var clippingParents = 'clippingParents';
|
|
3413
|
-
var viewport = 'viewport';
|
|
3414
|
-
var popper = 'popper';
|
|
3415
|
-
var reference = 'reference';
|
|
3416
|
-
var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
|
|
3417
|
-
return acc.concat([placement + "-" + start, placement + "-" + end]);
|
|
3418
|
-
}, []);
|
|
3419
|
-
var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
|
|
3420
|
-
return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
|
|
3421
|
-
}, []); // modifiers that need to read the DOM
|
|
3422
|
-
|
|
3423
|
-
var beforeRead = 'beforeRead';
|
|
3424
|
-
var read = 'read';
|
|
3425
|
-
var afterRead = 'afterRead'; // pure-logic modifiers
|
|
3426
|
-
|
|
3427
|
-
var beforeMain = 'beforeMain';
|
|
3428
|
-
var main = 'main';
|
|
3429
|
-
var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
|
|
3430
|
-
|
|
3431
|
-
var beforeWrite = 'beforeWrite';
|
|
3432
|
-
var write = 'write';
|
|
3433
|
-
var afterWrite = 'afterWrite';
|
|
3434
|
-
var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
|
|
3435
|
-
|
|
3436
|
-
function getNodeName(element) {
|
|
3437
|
-
return element ? (element.nodeName || '').toLowerCase() : null;
|
|
3438
|
-
}
|
|
3439
|
-
|
|
3440
|
-
function getWindow(node) {
|
|
3441
|
-
if (node == null) {
|
|
3442
|
-
return window;
|
|
3443
|
-
}
|
|
3444
|
-
|
|
3445
|
-
if (node.toString() !== '[object Window]') {
|
|
3446
|
-
var ownerDocument = node.ownerDocument;
|
|
3447
|
-
return ownerDocument ? ownerDocument.defaultView || window : window;
|
|
3448
|
-
}
|
|
3449
|
-
|
|
3450
|
-
return node;
|
|
3451
|
-
}
|
|
3452
|
-
|
|
3453
|
-
function isElement(node) {
|
|
3454
|
-
var OwnElement = getWindow(node).Element;
|
|
3455
|
-
return node instanceof OwnElement || node instanceof Element;
|
|
3456
|
-
}
|
|
3457
|
-
|
|
3458
|
-
function isHTMLElement(node) {
|
|
3459
|
-
var OwnElement = getWindow(node).HTMLElement;
|
|
3460
|
-
return node instanceof OwnElement || node instanceof HTMLElement;
|
|
3461
|
-
}
|
|
3462
|
-
|
|
3463
|
-
function isShadowRoot(node) {
|
|
3464
|
-
// IE 11 has no ShadowRoot
|
|
3465
|
-
if (typeof ShadowRoot === 'undefined') {
|
|
3466
|
-
return false;
|
|
3467
|
-
}
|
|
3468
|
-
|
|
3469
|
-
var OwnElement = getWindow(node).ShadowRoot;
|
|
3470
|
-
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
3471
|
-
}
|
|
3472
|
-
|
|
3473
|
-
// and applies them to the HTMLElements such as popper and arrow
|
|
3474
|
-
|
|
3475
|
-
function applyStyles(_ref) {
|
|
3476
|
-
var state = _ref.state;
|
|
3477
|
-
Object.keys(state.elements).forEach(function (name) {
|
|
3478
|
-
var style = state.styles[name] || {};
|
|
3479
|
-
var attributes = state.attributes[name] || {};
|
|
3480
|
-
var element = state.elements[name]; // arrow is optional + virtual elements
|
|
3481
|
-
|
|
3482
|
-
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
3483
|
-
return;
|
|
3484
|
-
} // Flow doesn't support to extend this property, but it's the most
|
|
3485
|
-
// effective way to apply styles to an HTMLElement
|
|
3486
|
-
// $FlowFixMe[cannot-write]
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
Object.assign(element.style, style);
|
|
3490
|
-
Object.keys(attributes).forEach(function (name) {
|
|
3491
|
-
var value = attributes[name];
|
|
3492
|
-
|
|
3493
|
-
if (value === false) {
|
|
3494
|
-
element.removeAttribute(name);
|
|
3495
|
-
} else {
|
|
3496
|
-
element.setAttribute(name, value === true ? '' : value);
|
|
3497
|
-
}
|
|
3498
|
-
});
|
|
3499
|
-
});
|
|
3500
|
-
}
|
|
3501
|
-
|
|
3502
|
-
function effect$2(_ref2) {
|
|
3503
|
-
var state = _ref2.state;
|
|
3504
|
-
var initialStyles = {
|
|
3505
|
-
popper: {
|
|
3506
|
-
position: state.options.strategy,
|
|
3507
|
-
left: '0',
|
|
3508
|
-
top: '0',
|
|
3509
|
-
margin: '0'
|
|
3510
|
-
},
|
|
3511
|
-
arrow: {
|
|
3512
|
-
position: 'absolute'
|
|
3513
|
-
},
|
|
3514
|
-
reference: {}
|
|
3515
|
-
};
|
|
3516
|
-
Object.assign(state.elements.popper.style, initialStyles.popper);
|
|
3517
|
-
state.styles = initialStyles;
|
|
3518
|
-
|
|
3519
|
-
if (state.elements.arrow) {
|
|
3520
|
-
Object.assign(state.elements.arrow.style, initialStyles.arrow);
|
|
3521
|
-
}
|
|
3522
|
-
|
|
3523
|
-
return function () {
|
|
3524
|
-
Object.keys(state.elements).forEach(function (name) {
|
|
3525
|
-
var element = state.elements[name];
|
|
3526
|
-
var attributes = state.attributes[name] || {};
|
|
3527
|
-
var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
|
|
3528
|
-
|
|
3529
|
-
var style = styleProperties.reduce(function (style, property) {
|
|
3530
|
-
style[property] = '';
|
|
3531
|
-
return style;
|
|
3532
|
-
}, {}); // arrow is optional + virtual elements
|
|
3533
|
-
|
|
3534
|
-
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
3535
|
-
return;
|
|
3536
|
-
}
|
|
2699
|
+
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
2700
|
+
return;
|
|
2701
|
+
}
|
|
3537
2702
|
|
|
3538
2703
|
Object.assign(element.style, style);
|
|
3539
2704
|
Object.keys(attributes).forEach(function (attribute) {
|
|
@@ -5005,603 +4170,1025 @@ var DEFAULT_OPTIONS = {
|
|
|
5005
4170
|
strategy: 'absolute'
|
|
5006
4171
|
};
|
|
5007
4172
|
|
|
5008
|
-
function areValidElements() {
|
|
5009
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5010
|
-
args[_key] = arguments[_key];
|
|
5011
|
-
}
|
|
5012
|
-
|
|
5013
|
-
return !args.some(function (element) {
|
|
5014
|
-
return !(element && typeof element.getBoundingClientRect === 'function');
|
|
5015
|
-
});
|
|
5016
|
-
}
|
|
5017
|
-
|
|
5018
|
-
function popperGenerator(generatorOptions) {
|
|
5019
|
-
if (generatorOptions === void 0) {
|
|
5020
|
-
generatorOptions = {};
|
|
5021
|
-
}
|
|
5022
|
-
|
|
5023
|
-
var _generatorOptions = generatorOptions,
|
|
5024
|
-
_generatorOptions$def = _generatorOptions.defaultModifiers,
|
|
5025
|
-
defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
|
|
5026
|
-
_generatorOptions$def2 = _generatorOptions.defaultOptions,
|
|
5027
|
-
defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
|
|
5028
|
-
return function createPopper(reference, popper, options) {
|
|
5029
|
-
if (options === void 0) {
|
|
5030
|
-
options = defaultOptions;
|
|
5031
|
-
}
|
|
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';
|
|
5032
4453
|
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
styles: {}
|
|
5044
|
-
};
|
|
5045
|
-
var effectCleanupFns = [];
|
|
5046
|
-
var isDestroyed = false;
|
|
5047
|
-
var instance = {
|
|
5048
|
-
state: state,
|
|
5049
|
-
setOptions: function setOptions(setOptionsAction) {
|
|
5050
|
-
var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
|
|
5051
|
-
cleanupModifierEffects();
|
|
5052
|
-
state.options = Object.assign({}, defaultOptions, state.options, options);
|
|
5053
|
-
state.scrollParents = {
|
|
5054
|
-
reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
|
|
5055
|
-
popper: listScrollParents(popper)
|
|
5056
|
-
}; // Orders the modifiers based on their dependencies and `phase`
|
|
5057
|
-
// 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';
|
|
5058
4464
|
|
|
5059
|
-
|
|
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';
|
|
5060
4475
|
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
if (isDestroyed) {
|
|
5074
|
-
return;
|
|
5075
|
-
}
|
|
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';
|
|
5076
4488
|
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
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
|
+
]);
|
|
5081
4548
|
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
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';
|
|
5085
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';
|
|
5086
4585
|
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
//
|
|
5093
|
-
|
|
5094
|
-
|
|
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';
|
|
5095
4607
|
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
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';
|
|
5101
4617
|
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
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';
|
|
5105
4641
|
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
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';
|
|
5112
4655
|
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
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';
|
|
5118
4681
|
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
// Async and optimistically optimized update – it will not be executed if
|
|
5130
|
-
// not necessary (debounced to run at most once-per-tick)
|
|
5131
|
-
update: debounce(function () {
|
|
5132
|
-
return new Promise(function (resolve) {
|
|
5133
|
-
instance.forceUpdate();
|
|
5134
|
-
resolve(state);
|
|
5135
|
-
});
|
|
5136
|
-
}),
|
|
5137
|
-
destroy: function destroy() {
|
|
5138
|
-
cleanupModifierEffects();
|
|
5139
|
-
isDestroyed = true;
|
|
5140
|
-
}
|
|
5141
|
-
};
|
|
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';
|
|
5142
4692
|
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
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';
|
|
5146
4706
|
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
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';
|
|
5156
4723
|
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
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';
|
|
5163
4733
|
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
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';
|
|
5171
4746
|
|
|
5172
|
-
|
|
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';
|
|
5173
4760
|
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
}
|
|
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';
|
|
5178
4776
|
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
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';
|
|
5185
4786
|
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
}
|
|
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';
|
|
5189
4796
|
|
|
5190
|
-
var
|
|
5191
|
-
var
|
|
5192
|
-
|
|
5193
|
-
});
|
|
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';
|
|
5194
4806
|
|
|
5195
|
-
|
|
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';
|
|
5196
4817
|
|
|
5197
|
-
var
|
|
5198
|
-
var
|
|
5199
|
-
|
|
5200
|
-
|
|
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';
|
|
5201
4829
|
|
|
5202
|
-
|
|
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';
|
|
5203
4839
|
|
|
5204
|
-
function
|
|
5205
|
-
|
|
5206
|
-
|
|
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';
|
|
5207
4849
|
|
|
5208
|
-
|
|
5209
|
-
|
|
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';
|
|
5210
4860
|
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
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';
|
|
5219
4871
|
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
//
|
|
5231
|
-
// ... and convert to:
|
|
5232
|
-
//
|
|
5233
|
-
// ```js
|
|
5234
|
-
// it = a.entries();
|
|
5235
|
-
// while (!(i = it.next()).done)
|
|
5236
|
-
// if (!b.has(i.value[0])) return false;
|
|
5237
|
-
// ```
|
|
5238
|
-
//
|
|
5239
|
-
// **Note**: `i` access switches to `i.value`.
|
|
5240
|
-
var it;
|
|
5241
|
-
if (hasMap && (a instanceof Map) && (b instanceof Map)) {
|
|
5242
|
-
if (a.size !== b.size) return false;
|
|
5243
|
-
it = a.entries();
|
|
5244
|
-
while (!(i = it.next()).done)
|
|
5245
|
-
if (!b.has(i.value[0])) return false;
|
|
5246
|
-
it = a.entries();
|
|
5247
|
-
while (!(i = it.next()).done)
|
|
5248
|
-
if (!equal(i.value[1], b.get(i.value[0]))) return false;
|
|
5249
|
-
return true;
|
|
5250
|
-
}
|
|
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';
|
|
5251
4882
|
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
if (length != b.length) return false;
|
|
5264
|
-
for (i = length; i-- !== 0;)
|
|
5265
|
-
if (a[i] !== b[i]) return false;
|
|
5266
|
-
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
|
+
}
|
|
5267
4894
|
}
|
|
4895
|
+
};
|
|
5268
4896
|
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
// END: Modifications
|
|
5277
|
-
|
|
5278
|
-
keys = Object.keys(a);
|
|
5279
|
-
length = keys.length;
|
|
5280
|
-
if (length !== Object.keys(b).length) return false;
|
|
5281
|
-
|
|
5282
|
-
for (i = length; i-- !== 0;)
|
|
5283
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
5284
|
-
// END: fast-deep-equal
|
|
5285
|
-
|
|
5286
|
-
// START: react-fast-compare
|
|
5287
|
-
// custom handling for DOM elements
|
|
5288
|
-
if (hasElementType && a instanceof Element) return false;
|
|
5289
|
-
|
|
5290
|
-
// custom handling for React/Preact
|
|
5291
|
-
for (i = length; i-- !== 0;) {
|
|
5292
|
-
if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {
|
|
5293
|
-
// React-specific: avoid traversing React elements' _owner
|
|
5294
|
-
// Preact-specific: avoid traversing Preact elements' __v and __o
|
|
5295
|
-
// __v = $_original / $_vnode
|
|
5296
|
-
// __o = $_owner
|
|
5297
|
-
// These properties contain circular references and are not needed when
|
|
5298
|
-
// comparing the actual elements (and not their owners)
|
|
5299
|
-
// .$$typeof and ._store on just reasonable markers of elements
|
|
5300
|
-
|
|
5301
|
-
continue;
|
|
5302
|
-
}
|
|
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
|
+
};
|
|
5303
4904
|
|
|
5304
|
-
|
|
5305
|
-
|
|
4905
|
+
var isRTL = function (element) {
|
|
4906
|
+
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
4907
|
+
return true;
|
|
5306
4908
|
}
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
// START: fast-deep-equal
|
|
5310
|
-
return true;
|
|
5311
|
-
}
|
|
5312
|
-
|
|
5313
|
-
return a !== a && b !== b;
|
|
5314
|
-
}
|
|
5315
|
-
// end fast-deep-equal
|
|
5316
|
-
|
|
5317
|
-
var reactFastCompare = function isEqual(a, b) {
|
|
5318
|
-
try {
|
|
5319
|
-
return equal(a, b);
|
|
5320
|
-
} catch (error) {
|
|
5321
|
-
if (((error.message || '').match(/stack|recursion/i))) {
|
|
5322
|
-
// warn on circular references, don't crash
|
|
5323
|
-
// browsers give this different errors name and messages:
|
|
5324
|
-
// chrome/safari: "RangeError", "Maximum call stack size exceeded"
|
|
5325
|
-
// firefox: "InternalError", too much recursion"
|
|
5326
|
-
// edge: "Error", "Out of stack space"
|
|
5327
|
-
console.warn('react-fast-compare cannot handle circular refs');
|
|
5328
|
-
return false;
|
|
4909
|
+
if (element) {
|
|
4910
|
+
return element.closest('[dir="rtl"]') !== null;
|
|
5329
4911
|
}
|
|
5330
|
-
|
|
5331
|
-
throw error;
|
|
5332
|
-
}
|
|
4912
|
+
return false;
|
|
5333
4913
|
};
|
|
5334
4914
|
|
|
5335
|
-
var
|
|
5336
|
-
|
|
5337
|
-
var
|
|
5338
|
-
var
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
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';
|
|
5350
5063
|
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
position: 'absolute'
|
|
5360
|
-
}
|
|
5361
|
-
},
|
|
5362
|
-
attributes: {}
|
|
5363
|
-
}),
|
|
5364
|
-
state = _React$useState[0],
|
|
5365
|
-
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';
|
|
5366
5072
|
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
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);
|
|
5384
5111
|
});
|
|
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
|
-
|
|
5422
|
-
popperInstance.destroy();
|
|
5423
|
-
popperInstanceRef.current = null;
|
|
5424
|
-
};
|
|
5425
|
-
}, [referenceElement, popperElement, options.createPopper]);
|
|
5426
|
-
return {
|
|
5427
|
-
state: popperInstanceRef.current ? popperInstanceRef.current.state : null,
|
|
5428
|
-
styles: state.styles,
|
|
5429
|
-
attributes: state.attributes,
|
|
5430
|
-
update: popperInstanceRef.current ? popperInstanceRef.current.update : null,
|
|
5431
|
-
forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null
|
|
5432
|
-
};
|
|
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]),
|
|
5433
5149
|
};
|
|
5150
|
+
CCarouselItem.displayName = 'CCarouselItem';
|
|
5434
5151
|
|
|
5435
|
-
var
|
|
5436
|
-
|
|
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));
|
|
5437
5155
|
};
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5156
|
+
CConditionalPortal.propTypes = {
|
|
5157
|
+
children: PropTypes.node,
|
|
5158
|
+
portal: PropTypes.bool.isRequired,
|
|
5441
5159
|
};
|
|
5160
|
+
CConditionalPortal.displayName = 'CConditionalPortal';
|
|
5442
5161
|
|
|
5443
|
-
var
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
_ref$strategy = _ref.strategy,
|
|
5448
|
-
strategy = _ref$strategy === void 0 ? 'absolute' : _ref$strategy,
|
|
5449
|
-
_ref$modifiers = _ref.modifiers,
|
|
5450
|
-
modifiers = _ref$modifiers === void 0 ? EMPTY_MODIFIERS : _ref$modifiers,
|
|
5451
|
-
referenceElement = _ref.referenceElement,
|
|
5452
|
-
onFirstUpdate = _ref.onFirstUpdate,
|
|
5453
|
-
innerRef = _ref.innerRef,
|
|
5454
|
-
children = _ref.children;
|
|
5455
|
-
var referenceNode = React.useContext(ManagerReferenceNodeContext);
|
|
5456
|
-
|
|
5457
|
-
var _React$useState = React.useState(null),
|
|
5458
|
-
popperElement = _React$useState[0],
|
|
5459
|
-
setPopperElement = _React$useState[1];
|
|
5460
|
-
|
|
5461
|
-
var _React$useState2 = React.useState(null),
|
|
5462
|
-
arrowElement = _React$useState2[0],
|
|
5463
|
-
setArrowElement = _React$useState2[1];
|
|
5464
|
-
|
|
5465
|
-
React.useEffect(function () {
|
|
5466
|
-
setRef(innerRef, popperElement);
|
|
5467
|
-
}, [innerRef, popperElement]);
|
|
5468
|
-
var options = React.useMemo(function () {
|
|
5469
|
-
return {
|
|
5470
|
-
placement: placement,
|
|
5471
|
-
strategy: strategy,
|
|
5472
|
-
onFirstUpdate: onFirstUpdate,
|
|
5473
|
-
modifiers: [].concat(modifiers, [{
|
|
5474
|
-
name: 'arrow',
|
|
5475
|
-
enabled: arrowElement != null,
|
|
5476
|
-
options: {
|
|
5477
|
-
element: arrowElement
|
|
5478
|
-
}
|
|
5479
|
-
}])
|
|
5480
|
-
};
|
|
5481
|
-
}, [placement, strategy, onFirstUpdate, modifiers, arrowElement]);
|
|
5482
|
-
|
|
5483
|
-
var _usePopper = usePopper(referenceElement || referenceNode, popperElement, options),
|
|
5484
|
-
state = _usePopper.state,
|
|
5485
|
-
styles = _usePopper.styles,
|
|
5486
|
-
forceUpdate = _usePopper.forceUpdate,
|
|
5487
|
-
update = _usePopper.update;
|
|
5488
|
-
|
|
5489
|
-
var childrenProps = React.useMemo(function () {
|
|
5490
|
-
return {
|
|
5491
|
-
ref: setPopperElement,
|
|
5492
|
-
style: styles.popper,
|
|
5493
|
-
placement: state ? state.placement : placement,
|
|
5494
|
-
hasPopperEscaped: state && state.modifiersData.hide ? state.modifiersData.hide.hasPopperEscaped : null,
|
|
5495
|
-
isReferenceHidden: state && state.modifiersData.hide ? state.modifiersData.hide.isReferenceHidden : null,
|
|
5496
|
-
arrowProps: {
|
|
5497
|
-
style: styles.arrow,
|
|
5498
|
-
ref: setArrowElement
|
|
5499
|
-
},
|
|
5500
|
-
forceUpdate: forceUpdate || NOOP,
|
|
5501
|
-
update: update || NOOP_PROMISE
|
|
5502
|
-
};
|
|
5503
|
-
}, [setPopperElement, setArrowElement, placement, state, styles, update, forceUpdate]);
|
|
5504
|
-
return unwrapArray(children)(childrenProps);
|
|
5505
|
-
}
|
|
5506
|
-
|
|
5507
|
-
/**
|
|
5508
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
5509
|
-
*
|
|
5510
|
-
* This source code is licensed under the MIT license found in the
|
|
5511
|
-
* LICENSE file in the root directory of this source tree.
|
|
5512
|
-
*/
|
|
5513
|
-
|
|
5514
|
-
/**
|
|
5515
|
-
* Similar to invariant but only logs a warning if the condition is not met.
|
|
5516
|
-
* This can be used to log issues in development environments in critical
|
|
5517
|
-
* paths. Removing the logging code for production environments will keep the
|
|
5518
|
-
* same logic and follow the same code paths.
|
|
5519
|
-
*/
|
|
5520
|
-
|
|
5521
|
-
var __DEV__ = process.env.NODE_ENV !== 'production';
|
|
5522
|
-
|
|
5523
|
-
var warning = function() {};
|
|
5524
|
-
|
|
5525
|
-
if (__DEV__) {
|
|
5526
|
-
var printWarning = function printWarning(format, args) {
|
|
5527
|
-
var len = arguments.length;
|
|
5528
|
-
args = new Array(len > 1 ? len - 1 : 0);
|
|
5529
|
-
for (var key = 1; key < len; key++) {
|
|
5530
|
-
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';
|
|
5531
5166
|
}
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
format.replace(/%s/g, function() {
|
|
5535
|
-
return args[argIndex++];
|
|
5536
|
-
});
|
|
5537
|
-
if (typeof console !== 'undefined') {
|
|
5538
|
-
console.error(message);
|
|
5167
|
+
if (direction === 'dropup-center') {
|
|
5168
|
+
_placement = 'top';
|
|
5539
5169
|
}
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
5543
|
-
// to find the callsite that caused this warning to fire.
|
|
5544
|
-
throw new Error(message);
|
|
5545
|
-
} catch (x) {}
|
|
5546
|
-
};
|
|
5547
|
-
|
|
5548
|
-
warning = function(condition, format, args) {
|
|
5549
|
-
var len = arguments.length;
|
|
5550
|
-
args = new Array(len > 2 ? len - 2 : 0);
|
|
5551
|
-
for (var key = 2; key < len; key++) {
|
|
5552
|
-
args[key - 2] = arguments[key];
|
|
5170
|
+
if (direction === 'dropend') {
|
|
5171
|
+
_placement = isRTL ? 'left-start' : 'right-start';
|
|
5553
5172
|
}
|
|
5554
|
-
if (
|
|
5555
|
-
|
|
5556
|
-
'`warning(condition, format, ...args)` requires a warning ' +
|
|
5557
|
-
'message argument'
|
|
5558
|
-
);
|
|
5173
|
+
if (direction === 'dropstart') {
|
|
5174
|
+
_placement = isRTL ? 'right-start' : 'left-start';
|
|
5559
5175
|
}
|
|
5560
|
-
if (
|
|
5561
|
-
|
|
5176
|
+
if (alignment === 'end') {
|
|
5177
|
+
_placement = isRTL ? 'bottom-start' : 'bottom-end';
|
|
5562
5178
|
}
|
|
5563
|
-
|
|
5564
|
-
}
|
|
5565
|
-
|
|
5566
|
-
var warning_1 = warning;
|
|
5567
|
-
|
|
5568
|
-
var warning$1 = /*@__PURE__*/getDefaultExportFromCjs(warning_1);
|
|
5569
|
-
|
|
5570
|
-
function Reference(_ref) {
|
|
5571
|
-
var children = _ref.children,
|
|
5572
|
-
innerRef = _ref.innerRef;
|
|
5573
|
-
var setReferenceNode = React.useContext(ManagerReferenceNodeSetterContext);
|
|
5574
|
-
var refHandler = React.useCallback(function (node) {
|
|
5575
|
-
setRef(innerRef, node);
|
|
5576
|
-
safeInvoke(setReferenceNode, node);
|
|
5577
|
-
}, [innerRef, setReferenceNode]); // ran on unmount
|
|
5578
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5579
|
-
|
|
5580
|
-
React.useEffect(function () {
|
|
5581
|
-
return function () {
|
|
5582
|
-
return setRef(innerRef, null);
|
|
5583
|
-
};
|
|
5584
|
-
}, []);
|
|
5585
|
-
React.useEffect(function () {
|
|
5586
|
-
warning$1(Boolean(setReferenceNode), '`Reference` should not be used outside of a `Manager` component.');
|
|
5587
|
-
}, [setReferenceNode]);
|
|
5588
|
-
return unwrapArray(children)({
|
|
5589
|
-
ref: refHandler
|
|
5590
|
-
});
|
|
5591
|
-
}
|
|
5592
|
-
|
|
5593
|
-
var PopperManagerWrapper = function (_a) {
|
|
5594
|
-
var children = _a.children, popper = _a.popper;
|
|
5595
|
-
return popper ? React__default.createElement(Manager, null, children) : React__default.createElement(React__default.Fragment, null, children);
|
|
5179
|
+
return _placement;
|
|
5596
5180
|
};
|
|
5597
5181
|
var CDropdownContext = createContext({});
|
|
5598
5182
|
var CDropdown = forwardRef(function (_a, ref) {
|
|
5599
5183
|
var _b;
|
|
5600
|
-
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"]);
|
|
5601
5185
|
var dropdownRef = useRef(null);
|
|
5186
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5602
5187
|
var dropdownToggleRef = useRef(null);
|
|
5188
|
+
var dropdownMenuRef = useRef(null);
|
|
5603
5189
|
var forkedRef = useForkedRef(ref, dropdownRef);
|
|
5604
|
-
var
|
|
5190
|
+
var _l = useState(visible), _visible = _l[0], setVisible = _l[1];
|
|
5191
|
+
var _m = usePopper(), initPopper = _m.initPopper, destroyPopper = _m.destroyPopper;
|
|
5605
5192
|
var Component = variant === 'nav-item' ? 'li' : component;
|
|
5606
5193
|
// Disable popper if responsive aligment is set.
|
|
5607
5194
|
if (typeof alignment === 'object') {
|
|
@@ -5609,44 +5196,83 @@ var CDropdown = forwardRef(function (_a, ref) {
|
|
|
5609
5196
|
}
|
|
5610
5197
|
var contextValues = {
|
|
5611
5198
|
alignment: alignment,
|
|
5612
|
-
autoClose: autoClose,
|
|
5613
5199
|
dark: dark,
|
|
5614
|
-
direction: direction,
|
|
5615
5200
|
dropdownToggleRef: dropdownToggleRef,
|
|
5616
|
-
|
|
5201
|
+
dropdownMenuRef: dropdownMenuRef,
|
|
5617
5202
|
popper: popper,
|
|
5618
5203
|
portal: portal,
|
|
5619
5204
|
variant: variant,
|
|
5620
5205
|
visible: _visible,
|
|
5621
5206
|
setVisible: setVisible,
|
|
5622
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
|
+
};
|
|
5623
5219
|
useEffect(function () {
|
|
5624
5220
|
setVisible(visible);
|
|
5625
5221
|
}, [visible]);
|
|
5626
5222
|
useEffect(function () {
|
|
5627
|
-
_visible &&
|
|
5628
|
-
|
|
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
|
+
};
|
|
5629
5235
|
}, [_visible]);
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
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))));
|
|
5638
5265
|
});
|
|
5639
5266
|
var alignmentDirection = PropTypes.oneOf(['start', 'end']);
|
|
5640
5267
|
CDropdown.propTypes = {
|
|
5641
|
-
// @ts-expect-error TODO: we have to find a solution
|
|
5642
5268
|
alignment: PropTypes.oneOfType([
|
|
5643
5269
|
alignmentDirection,
|
|
5644
|
-
PropTypes.shape({ xs: alignmentDirection }),
|
|
5645
|
-
PropTypes.shape({ sm: alignmentDirection }),
|
|
5646
|
-
PropTypes.shape({ md: alignmentDirection }),
|
|
5647
|
-
PropTypes.shape({ lg: alignmentDirection }),
|
|
5648
|
-
PropTypes.shape({ xl: alignmentDirection }),
|
|
5649
|
-
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 }),
|
|
5650
5276
|
]),
|
|
5651
5277
|
autoClose: PropTypes.oneOfType([
|
|
5652
5278
|
PropTypes.bool,
|
|
@@ -5657,6 +5283,7 @@ CDropdown.propTypes = {
|
|
|
5657
5283
|
component: PropTypes.elementType,
|
|
5658
5284
|
dark: PropTypes.bool,
|
|
5659
5285
|
direction: PropTypes.oneOf(['center', 'dropup', 'dropup-center', 'dropend', 'dropstart']),
|
|
5286
|
+
offset: PropTypes.any,
|
|
5660
5287
|
onHide: PropTypes.func,
|
|
5661
5288
|
onShow: PropTypes.func,
|
|
5662
5289
|
placement: placementPropType,
|
|
@@ -5669,7 +5296,7 @@ CDropdown.displayName = 'CDropdown';
|
|
|
5669
5296
|
|
|
5670
5297
|
var CDropdownDivider = forwardRef(function (_a, ref) {
|
|
5671
5298
|
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
5672
|
-
return
|
|
5299
|
+
return React.createElement("hr", __assign({ className: classNames('dropdown-divider', className) }, rest, { ref: ref }));
|
|
5673
5300
|
});
|
|
5674
5301
|
CDropdownDivider.propTypes = {
|
|
5675
5302
|
className: PropTypes.string,
|
|
@@ -5678,7 +5305,7 @@ CDropdownDivider.displayName = 'CDropdownDivider';
|
|
|
5678
5305
|
|
|
5679
5306
|
var CDropdownHeader = forwardRef(function (_a, ref) {
|
|
5680
5307
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'h6' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5681
|
-
return (
|
|
5308
|
+
return (React.createElement(Component, __assign({ className: classNames('dropdown-header', className) }, rest, { ref: ref }), children));
|
|
5682
5309
|
});
|
|
5683
5310
|
CDropdownHeader.propTypes = {
|
|
5684
5311
|
children: PropTypes.node,
|
|
@@ -5689,7 +5316,7 @@ CDropdownHeader.displayName = 'CDropdownHeader';
|
|
|
5689
5316
|
|
|
5690
5317
|
var CDropdownItem = forwardRef(function (_a, ref) {
|
|
5691
5318
|
var children = _a.children, className = _a.className, _b = _a.component, component = _b === void 0 ? 'a' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5692
|
-
return (
|
|
5319
|
+
return (React.createElement(CLink, __assign({ className: classNames('dropdown-item', className), component: component }, rest, { ref: ref }), children));
|
|
5693
5320
|
});
|
|
5694
5321
|
CDropdownItem.propTypes = {
|
|
5695
5322
|
children: PropTypes.node,
|
|
@@ -5700,7 +5327,7 @@ CDropdownItem.displayName = 'CDropdownItem';
|
|
|
5700
5327
|
|
|
5701
5328
|
var CDropdownItemPlain = forwardRef(function (_a, ref) {
|
|
5702
5329
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'span' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5703
|
-
return (
|
|
5330
|
+
return (React.createElement(Component, __assign({ className: classNames('dropdown-item-text', className) }, rest, { ref: ref }), children));
|
|
5704
5331
|
});
|
|
5705
5332
|
CDropdownItemPlain.propTypes = {
|
|
5706
5333
|
children: PropTypes.node,
|
|
@@ -5721,74 +5348,23 @@ var alignmentClassNames = function (alignment) {
|
|
|
5721
5348
|
}
|
|
5722
5349
|
return classNames;
|
|
5723
5350
|
};
|
|
5724
|
-
var CDropdownMenu = function (_a) {
|
|
5351
|
+
var CDropdownMenu = forwardRef(function (_a, ref) {
|
|
5725
5352
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'ul' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5726
|
-
var _c = useContext(CDropdownContext), alignment = _c.alignment,
|
|
5727
|
-
var
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
visible && window.addEventListener('keyup', handleKeyup);
|
|
5731
|
-
return function () {
|
|
5732
|
-
window.removeEventListener('mouseup', handleMouseUp);
|
|
5733
|
-
window.removeEventListener('keyup', handleKeyup);
|
|
5734
|
-
};
|
|
5735
|
-
}, [visible]);
|
|
5736
|
-
var handleKeyup = function (event) {
|
|
5737
|
-
if (autoClose === false) {
|
|
5738
|
-
return;
|
|
5739
|
-
}
|
|
5740
|
-
if (event.key === 'Escape') {
|
|
5741
|
-
setVisible(false);
|
|
5742
|
-
}
|
|
5743
|
-
};
|
|
5744
|
-
var handleMouseUp = function (event) {
|
|
5745
|
-
var _a, _b;
|
|
5746
|
-
if (dropdownToggleRef && dropdownToggleRef.current.contains(event.target)) {
|
|
5747
|
-
return;
|
|
5748
|
-
}
|
|
5749
|
-
if (autoClose === true ||
|
|
5750
|
-
(autoClose === 'inside' && ((_a = dropdownMenuRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) ||
|
|
5751
|
-
(autoClose === 'outside' && !((_b = dropdownMenuRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target)))) {
|
|
5752
|
-
setTimeout(function () { return setVisible(false); }, 1);
|
|
5753
|
-
return;
|
|
5754
|
-
}
|
|
5755
|
-
};
|
|
5756
|
-
var _placement = placement;
|
|
5757
|
-
if (direction === 'center') {
|
|
5758
|
-
_placement = 'bottom';
|
|
5759
|
-
}
|
|
5760
|
-
if (direction === 'dropup') {
|
|
5761
|
-
_placement = isRTL(dropdownMenuRef.current) ? 'top-end' : 'top-start';
|
|
5762
|
-
}
|
|
5763
|
-
if (direction === 'dropup-center') {
|
|
5764
|
-
_placement = 'top';
|
|
5765
|
-
}
|
|
5766
|
-
if (direction === 'dropend') {
|
|
5767
|
-
_placement = isRTL(dropdownMenuRef.current) ? 'left-start' : 'right-start';
|
|
5768
|
-
}
|
|
5769
|
-
if (direction === 'dropstart') {
|
|
5770
|
-
_placement = isRTL(dropdownMenuRef.current) ? 'right-start' : 'left-start';
|
|
5771
|
-
}
|
|
5772
|
-
if (alignment === 'end') {
|
|
5773
|
-
_placement = isRTL(dropdownMenuRef.current) ? 'bottom-start' : 'bottom-end';
|
|
5774
|
-
}
|
|
5775
|
-
var dropdownMenuComponent = function (style, ref) { return (React__default.createElement(CConditionalPortal, { portal: portal !== null && portal !== void 0 ? portal : false },
|
|
5776
|
-
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', {
|
|
5777
5357
|
'dropdown-menu-dark': dark,
|
|
5778
5358
|
show: visible,
|
|
5779
|
-
}, alignment && alignmentClassNames(alignment), className), ref:
|
|
5780
|
-
?
|
|
5781
|
-
if (
|
|
5782
|
-
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));
|
|
5783
5363
|
}
|
|
5784
5364
|
return;
|
|
5785
5365
|
})
|
|
5786
|
-
: children)));
|
|
5787
|
-
|
|
5788
|
-
var ref = _a.ref, style = _a.style;
|
|
5789
|
-
return dropdownMenuComponent(style, ref);
|
|
5790
|
-
})) : (dropdownMenuComponent());
|
|
5791
|
-
};
|
|
5366
|
+
: children)));
|
|
5367
|
+
});
|
|
5792
5368
|
CDropdownMenu.propTypes = {
|
|
5793
5369
|
children: PropTypes.node,
|
|
5794
5370
|
className: PropTypes.string,
|
|
@@ -5798,7 +5374,7 @@ CDropdownMenu.displayName = 'CDropdownMenu';
|
|
|
5798
5374
|
|
|
5799
5375
|
var CDropdownToggle = function (_a) {
|
|
5800
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"]);
|
|
5801
|
-
var _d = useContext(CDropdownContext), dropdownToggleRef = _d.dropdownToggleRef,
|
|
5377
|
+
var _d = useContext(CDropdownContext), dropdownToggleRef = _d.dropdownToggleRef, variant = _d.variant, visible = _d.visible, setVisible = _d.setVisible;
|
|
5802
5378
|
var triggers = __assign(__assign({}, ((trigger === 'click' || trigger.includes('click')) && {
|
|
5803
5379
|
onClick: function (event) {
|
|
5804
5380
|
event.preventDefault();
|
|
@@ -5814,22 +5390,18 @@ var CDropdownToggle = function (_a) {
|
|
|
5814
5390
|
'nav-link': variant === 'nav-item',
|
|
5815
5391
|
}, className), 'aria-expanded': visible }, (!rest.disabled && __assign({}, triggers)));
|
|
5816
5392
|
// We use any because Toggler can be `a` as well as `button`.
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
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 }))));
|
|
5821
5396
|
}
|
|
5822
5397
|
if (variant === 'nav-item') {
|
|
5823
|
-
return (
|
|
5398
|
+
return (React.createElement("a", __assign({ href: "#" }, togglerProps, { ref: dropdownToggleRef }), children));
|
|
5824
5399
|
}
|
|
5825
|
-
return (
|
|
5400
|
+
return (React.createElement(CButton, __assign({ type: "button" }, togglerProps, { tabIndex: 0 }, rest, { ref: dropdownToggleRef }),
|
|
5826
5401
|
children,
|
|
5827
|
-
split &&
|
|
5402
|
+
split && React.createElement("span", { className: "visually-hidden" }, "Toggle Dropdown")));
|
|
5828
5403
|
};
|
|
5829
|
-
return
|
|
5830
|
-
var ref = _a.ref;
|
|
5831
|
-
return Toggler(ref);
|
|
5832
|
-
}) : Toggler(dropdownToggleRef);
|
|
5404
|
+
return React.createElement(Toggler, null);
|
|
5833
5405
|
};
|
|
5834
5406
|
CDropdownToggle.propTypes = {
|
|
5835
5407
|
caret: PropTypes.bool,
|
|
@@ -5844,7 +5416,7 @@ CDropdownToggle.displayName = 'CDropdownToggle';
|
|
|
5844
5416
|
var CFooter = forwardRef(function (_a, ref) {
|
|
5845
5417
|
var _b;
|
|
5846
5418
|
var children = _a.children, className = _a.className, position = _a.position, rest = __rest(_a, ["children", "className", "position"]);
|
|
5847
|
-
return (
|
|
5419
|
+
return (React.createElement("div", __assign({ className: classNames('footer', (_b = {}, _b["footer-".concat(position)] = position, _b), className) }, rest, { ref: ref }), children));
|
|
5848
5420
|
});
|
|
5849
5421
|
CFooter.propTypes = {
|
|
5850
5422
|
children: PropTypes.node,
|
|
@@ -5855,7 +5427,7 @@ CFooter.displayName = 'CFooter';
|
|
|
5855
5427
|
|
|
5856
5428
|
var CForm = forwardRef(function (_a, ref) {
|
|
5857
5429
|
var children = _a.children, className = _a.className, validated = _a.validated, rest = __rest(_a, ["children", "className", "validated"]);
|
|
5858
|
-
return (
|
|
5430
|
+
return (React.createElement("form", __assign({ className: classNames({ 'was-validated': validated }, className) || undefined }, rest, { ref: ref }), children));
|
|
5859
5431
|
});
|
|
5860
5432
|
CForm.propTypes = {
|
|
5861
5433
|
children: PropTypes.node,
|
|
@@ -5867,7 +5439,7 @@ CForm.displayName = 'CForm';
|
|
|
5867
5439
|
var CFormFeedback = forwardRef(function (_a, ref) {
|
|
5868
5440
|
var _b;
|
|
5869
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"]);
|
|
5870
|
-
return (
|
|
5442
|
+
return (React.createElement(Component, __assign({ className: classNames((_b = {},
|
|
5871
5443
|
_b["invalid-".concat(tooltip ? 'tooltip' : 'feedback')] = invalid,
|
|
5872
5444
|
_b["valid-".concat(tooltip ? 'tooltip' : 'feedback')] = valid,
|
|
5873
5445
|
_b), className) }, rest, { ref: ref }), children));
|
|
@@ -5884,10 +5456,10 @@ CFormFeedback.displayName = 'CFormFeedback';
|
|
|
5884
5456
|
|
|
5885
5457
|
var CFormControlValidation = function (_a) {
|
|
5886
5458
|
var describedby = _a.describedby, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, invalid = _a.invalid, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid;
|
|
5887
|
-
return (
|
|
5888
|
-
feedback && (valid || invalid) && (
|
|
5889
|
-
feedbackInvalid && (
|
|
5890
|
-
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))));
|
|
5891
5463
|
};
|
|
5892
5464
|
CFormControlValidation.propTypes = {
|
|
5893
5465
|
describedby: PropTypes.string,
|
|
@@ -5902,7 +5474,7 @@ CFormControlValidation.displayName = 'CFormControlValidation';
|
|
|
5902
5474
|
|
|
5903
5475
|
var CFormLabel = forwardRef(function (_a, ref) {
|
|
5904
5476
|
var children = _a.children, className = _a.className, customClassName = _a.customClassName, rest = __rest(_a, ["children", "className", "customClassName"]);
|
|
5905
|
-
return (
|
|
5477
|
+
return (React.createElement("label", __assign({ className: customClassName !== null && customClassName !== void 0 ? customClassName : classNames('form-label', className) }, rest, { ref: ref }), children));
|
|
5906
5478
|
});
|
|
5907
5479
|
CFormLabel.propTypes = {
|
|
5908
5480
|
children: PropTypes.node,
|
|
@@ -5920,15 +5492,15 @@ var CFormCheck = forwardRef(function (_a, ref) {
|
|
|
5920
5492
|
inputRef.current.indeterminate = indeterminate;
|
|
5921
5493
|
}
|
|
5922
5494
|
}, [indeterminate, inputRef.current]);
|
|
5923
|
-
var FormControl = function () { return (
|
|
5495
|
+
var FormControl = function () { return (React.createElement("input", __assign({ type: type, className: classNames(button ? 'btn-check' : 'form-check-input', {
|
|
5924
5496
|
'is-invalid': invalid,
|
|
5925
5497
|
'is-valid': valid,
|
|
5926
5498
|
'me-2': hitArea,
|
|
5927
5499
|
}), id: id }, rest, { ref: forkedRef }))); };
|
|
5928
|
-
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 })); };
|
|
5929
5501
|
var FormLabel = function () {
|
|
5930
5502
|
var _a;
|
|
5931
|
-
return (
|
|
5503
|
+
return (React.createElement(CFormLabel, __assign({ customClassName: classNames(button
|
|
5932
5504
|
? classNames('btn', button.variant ? "btn-".concat(button.variant, "-").concat(button.color) : "btn-".concat(button.color), (_a = {},
|
|
5933
5505
|
_a["btn-".concat(button.size)] = button.size,
|
|
5934
5506
|
_a), "".concat(button.shape))
|
|
@@ -5936,35 +5508,35 @@ var CFormCheck = forwardRef(function (_a, ref) {
|
|
|
5936
5508
|
};
|
|
5937
5509
|
var FormCheck = function () {
|
|
5938
5510
|
if (button) {
|
|
5939
|
-
return (
|
|
5940
|
-
|
|
5941
|
-
label &&
|
|
5942
|
-
|
|
5511
|
+
return (React.createElement(React.Fragment, null,
|
|
5512
|
+
React.createElement(FormControl, null),
|
|
5513
|
+
label && React.createElement(FormLabel, null),
|
|
5514
|
+
React.createElement(FormValidation, null)));
|
|
5943
5515
|
}
|
|
5944
5516
|
if (label) {
|
|
5945
|
-
return hitArea ? (
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
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', {
|
|
5949
5521
|
'form-check-inline': inline,
|
|
5950
5522
|
'form-check-reverse': reverse,
|
|
5951
5523
|
'is-invalid': invalid,
|
|
5952
5524
|
'is-valid': valid,
|
|
5953
5525
|
}, className) },
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5526
|
+
React.createElement(FormControl, null),
|
|
5527
|
+
React.createElement(FormLabel, null),
|
|
5528
|
+
React.createElement(FormValidation, null)));
|
|
5957
5529
|
}
|
|
5958
|
-
return
|
|
5530
|
+
return React.createElement(FormControl, null);
|
|
5959
5531
|
};
|
|
5960
|
-
return
|
|
5532
|
+
return React.createElement(FormCheck, null);
|
|
5961
5533
|
});
|
|
5962
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);
|
|
5963
5535
|
CFormCheck.displayName = 'CFormCheck';
|
|
5964
5536
|
|
|
5965
5537
|
var CFormFloating = forwardRef(function (_a, ref) {
|
|
5966
5538
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
5967
|
-
return (
|
|
5539
|
+
return (React.createElement("div", __assign({ className: classNames('form-floating', className) }, rest, { ref: ref }), children));
|
|
5968
5540
|
});
|
|
5969
5541
|
CFormFloating.propTypes = {
|
|
5970
5542
|
children: PropTypes.node,
|
|
@@ -5974,7 +5546,7 @@ CFormFloating.displayName = 'CFormFloating';
|
|
|
5974
5546
|
|
|
5975
5547
|
var CFormText = forwardRef(function (_a, ref) {
|
|
5976
5548
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'div' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
5977
|
-
return (
|
|
5549
|
+
return (React.createElement(Component, __assign({ className: classNames('form-text', className) }, rest, { ref: ref }), children));
|
|
5978
5550
|
});
|
|
5979
5551
|
CFormText.propTypes = {
|
|
5980
5552
|
children: PropTypes.node,
|
|
@@ -5985,16 +5557,16 @@ CFormText.displayName = 'CFormText';
|
|
|
5985
5557
|
|
|
5986
5558
|
var CFormControlWrapper = function (_a) {
|
|
5987
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;
|
|
5988
|
-
var FormControlValidation = function () { return (
|
|
5989
|
-
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 },
|
|
5990
5562
|
children,
|
|
5991
|
-
|
|
5992
|
-
text &&
|
|
5993
|
-
|
|
5994
|
-
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),
|
|
5995
5567
|
children,
|
|
5996
|
-
text &&
|
|
5997
|
-
|
|
5568
|
+
text && React.createElement(CFormText, { id: describedby }, text),
|
|
5569
|
+
React.createElement(FormControlValidation, null)));
|
|
5998
5570
|
};
|
|
5999
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);
|
|
6000
5572
|
CFormControlWrapper.displayName = 'CFormControlWrapper';
|
|
@@ -6007,8 +5579,8 @@ var CFormInput = forwardRef(function (_a, ref) {
|
|
|
6007
5579
|
var timeOutId = setTimeout(function () { return value && onChange && onChange(value); }, typeof delay === 'number' ? delay : 500);
|
|
6008
5580
|
return function () { return clearTimeout(timeOutId); };
|
|
6009
5581
|
}, [value]);
|
|
6010
|
-
return (
|
|
6011
|
-
|
|
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 = {},
|
|
6012
5584
|
_b["form-control-".concat(size)] = size,
|
|
6013
5585
|
_b['form-control-color'] = type === 'color',
|
|
6014
5586
|
_b['is-invalid'] = invalid,
|
|
@@ -6020,9 +5592,9 @@ CFormInput.displayName = 'CFormInput';
|
|
|
6020
5592
|
|
|
6021
5593
|
var CFormRange = forwardRef(function (_a, ref) {
|
|
6022
5594
|
var className = _a.className, label = _a.label, rest = __rest(_a, ["className", "label"]);
|
|
6023
|
-
return (
|
|
6024
|
-
label &&
|
|
6025
|
-
|
|
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 }))));
|
|
6026
5598
|
});
|
|
6027
5599
|
CFormRange.propTypes = {
|
|
6028
5600
|
className: PropTypes.string,
|
|
@@ -6033,14 +5605,14 @@ CFormRange.displayName = 'CFormRange';
|
|
|
6033
5605
|
var CFormSelect = forwardRef(function (_a, ref) {
|
|
6034
5606
|
var _b;
|
|
6035
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"]);
|
|
6036
|
-
return (
|
|
6037
|
-
|
|
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 = {},
|
|
6038
5610
|
_b["form-select-".concat(size)] = size,
|
|
6039
5611
|
_b['is-invalid'] = invalid,
|
|
6040
5612
|
_b['is-valid'] = valid,
|
|
6041
5613
|
_b), className), size: htmlSize }, rest, { ref: ref }), options
|
|
6042
5614
|
? options.map(function (option, index) {
|
|
6043
|
-
return (
|
|
5615
|
+
return (React.createElement("option", __assign({}, (typeof option === 'object' &&
|
|
6044
5616
|
option.disabled && { disabled: option.disabled }), (typeof option === 'object' &&
|
|
6045
5617
|
option.value !== undefined && { value: option.value }), { key: index }), typeof option === 'string' ? option : option.label));
|
|
6046
5618
|
})
|
|
@@ -6052,18 +5624,18 @@ CFormSelect.displayName = 'CFormSelect';
|
|
|
6052
5624
|
var CFormSwitch = forwardRef(function (_a, ref) {
|
|
6053
5625
|
var _b;
|
|
6054
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"]);
|
|
6055
|
-
return (
|
|
5627
|
+
return (React.createElement("div", { className: classNames('form-check form-switch', (_b = {
|
|
6056
5628
|
'form-check-reverse': reverse
|
|
6057
5629
|
},
|
|
6058
5630
|
_b["form-switch-".concat(size)] = size,
|
|
6059
5631
|
_b['is-invalid'] = invalid,
|
|
6060
5632
|
_b['is-valid'] = valid,
|
|
6061
5633
|
_b), className) },
|
|
6062
|
-
|
|
5634
|
+
React.createElement("input", __assign({ type: type, className: classNames('form-check-input', {
|
|
6063
5635
|
'is-invalid': invalid,
|
|
6064
5636
|
'is-valid': valid,
|
|
6065
5637
|
}), id: id }, rest, { ref: ref })),
|
|
6066
|
-
label && (
|
|
5638
|
+
label && (React.createElement(CFormLabel, __assign({ customClassName: "form-check-label" }, (id && { htmlFor: id })), label))));
|
|
6067
5639
|
});
|
|
6068
5640
|
CFormSwitch.propTypes = {
|
|
6069
5641
|
className: PropTypes.string,
|
|
@@ -6079,8 +5651,8 @@ CFormSwitch.displayName = 'CFormSwitch';
|
|
|
6079
5651
|
|
|
6080
5652
|
var CFormTextarea = forwardRef(function (_a, ref) {
|
|
6081
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"]);
|
|
6082
|
-
return (
|
|
6083
|
-
|
|
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', {
|
|
6084
5656
|
'is-invalid': invalid,
|
|
6085
5657
|
'is-valid': valid,
|
|
6086
5658
|
}, className), id: id }, rest, { ref: ref }), children)));
|
|
@@ -6091,7 +5663,7 @@ CFormTextarea.displayName = 'CFormTextarea';
|
|
|
6091
5663
|
var CInputGroup = forwardRef(function (_a, ref) {
|
|
6092
5664
|
var _b;
|
|
6093
5665
|
var children = _a.children, className = _a.className, size = _a.size, rest = __rest(_a, ["children", "className", "size"]);
|
|
6094
|
-
return (
|
|
5666
|
+
return (React.createElement("div", __assign({ className: classNames('input-group', (_b = {},
|
|
6095
5667
|
_b["input-group-".concat(size)] = size,
|
|
6096
5668
|
_b), className) }, rest, { ref: ref }), children));
|
|
6097
5669
|
});
|
|
@@ -6104,7 +5676,7 @@ CInputGroup.displayName = 'CInputGroup';
|
|
|
6104
5676
|
|
|
6105
5677
|
var CInputGroupText = forwardRef(function (_a, ref) {
|
|
6106
5678
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'span' : _b, rest = __rest(_a, ["children", "className", "component"]);
|
|
6107
|
-
return (
|
|
5679
|
+
return (React.createElement(Component, __assign({ className: classNames('input-group-text', className) }, rest, { ref: ref }), children));
|
|
6108
5680
|
});
|
|
6109
5681
|
CInputGroupText.propTypes = {
|
|
6110
5682
|
children: PropTypes.node,
|
|
@@ -6149,7 +5721,7 @@ var CCol = forwardRef(function (_a, ref) {
|
|
|
6149
5721
|
}
|
|
6150
5722
|
}
|
|
6151
5723
|
});
|
|
6152
|
-
return (
|
|
5724
|
+
return (React.createElement("div", __assign({ className: classNames(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'col', className) }, rest, { ref: ref }), children));
|
|
6153
5725
|
});
|
|
6154
5726
|
var span = PropTypes.oneOfType([
|
|
6155
5727
|
PropTypes.bool,
|
|
@@ -6197,7 +5769,7 @@ var CContainer = forwardRef(function (_a, ref) {
|
|
|
6197
5769
|
delete rest[bp];
|
|
6198
5770
|
breakpoint && repsonsiveClassNames.push("container-".concat(bp));
|
|
6199
5771
|
});
|
|
6200
|
-
return (
|
|
5772
|
+
return (React.createElement("div", __assign({ className: classNames(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'container', className) }, rest, { ref: ref }), children));
|
|
6201
5773
|
});
|
|
6202
5774
|
CContainer.propTypes = {
|
|
6203
5775
|
children: PropTypes.node,
|
|
@@ -6241,7 +5813,7 @@ var CRow = forwardRef(function (_a, ref) {
|
|
|
6241
5813
|
}
|
|
6242
5814
|
}
|
|
6243
5815
|
});
|
|
6244
|
-
return (
|
|
5816
|
+
return (React.createElement("div", { className: classNames('row', repsonsiveClassNames, className), ref: ref }, children));
|
|
6245
5817
|
});
|
|
6246
5818
|
var bp = PropTypes.shape({
|
|
6247
5819
|
cols: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.string]),
|
|
@@ -6264,7 +5836,7 @@ CRow.displayName = 'CRow';
|
|
|
6264
5836
|
var CHeader = forwardRef(function (_a, ref) {
|
|
6265
5837
|
var _b;
|
|
6266
5838
|
var children = _a.children, className = _a.className, container = _a.container, position = _a.position, rest = __rest(_a, ["children", "className", "container", "position"]);
|
|
6267
|
-
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))));
|
|
6268
5840
|
});
|
|
6269
5841
|
CHeader.propTypes = {
|
|
6270
5842
|
children: PropTypes.node,
|
|
@@ -6286,7 +5858,7 @@ CHeader.displayName = 'CHeader';
|
|
|
6286
5858
|
|
|
6287
5859
|
var CHeaderBrand = forwardRef(function (_a, ref) {
|
|
6288
5860
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'a' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6289
|
-
return (
|
|
5861
|
+
return (React.createElement(Component, __assign({ className: classNames('header-brand', className) }, rest, { ref: ref }), children));
|
|
6290
5862
|
});
|
|
6291
5863
|
CHeaderBrand.propTypes = {
|
|
6292
5864
|
children: PropTypes.node,
|
|
@@ -6297,7 +5869,7 @@ CHeaderBrand.displayName = 'CHeaderBrand';
|
|
|
6297
5869
|
|
|
6298
5870
|
var CHeaderDivider = forwardRef(function (_a, ref) {
|
|
6299
5871
|
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
6300
|
-
return
|
|
5872
|
+
return React.createElement("div", __assign({ className: classNames('header-divider', className) }, rest, { ref: ref }));
|
|
6301
5873
|
});
|
|
6302
5874
|
CHeaderDivider.propTypes = {
|
|
6303
5875
|
className: PropTypes.string,
|
|
@@ -6306,7 +5878,7 @@ CHeaderDivider.displayName = 'CHeaderDivider';
|
|
|
6306
5878
|
|
|
6307
5879
|
var CHeaderNav = forwardRef(function (_a, ref) {
|
|
6308
5880
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'ul' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6309
|
-
return (
|
|
5881
|
+
return (React.createElement(Component, __assign({ className: classNames('header-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
6310
5882
|
});
|
|
6311
5883
|
CHeaderNav.propTypes = {
|
|
6312
5884
|
children: PropTypes.node,
|
|
@@ -6317,7 +5889,7 @@ CHeaderNav.displayName = 'CHeaderNav';
|
|
|
6317
5889
|
|
|
6318
5890
|
var CHeaderText = forwardRef(function (_a, ref) {
|
|
6319
5891
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6320
|
-
return (
|
|
5892
|
+
return (React.createElement("span", __assign({ className: classNames('header-text', className) }, rest, { ref: ref }), children));
|
|
6321
5893
|
});
|
|
6322
5894
|
CHeaderText.propTypes = {
|
|
6323
5895
|
children: PropTypes.node,
|
|
@@ -6327,7 +5899,7 @@ CHeaderText.displayName = 'CHeaderText';
|
|
|
6327
5899
|
|
|
6328
5900
|
var CHeaderToggler = forwardRef(function (_a, ref) {
|
|
6329
5901
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6330
|
-
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" })));
|
|
6331
5903
|
});
|
|
6332
5904
|
CHeaderToggler.propTypes = {
|
|
6333
5905
|
children: PropTypes.node,
|
|
@@ -6338,7 +5910,7 @@ CHeaderToggler.displayName = 'CHeaderToggler';
|
|
|
6338
5910
|
var CImage = forwardRef(function (_a, ref) {
|
|
6339
5911
|
var _b;
|
|
6340
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"]);
|
|
6341
|
-
return (
|
|
5913
|
+
return (React.createElement("img", __assign({ className: classNames((_b = {},
|
|
6342
5914
|
_b["float-".concat(align)] = align && (align === 'start' || align === 'end'),
|
|
6343
5915
|
_b['d-block mx-auto'] = align && align === 'center',
|
|
6344
5916
|
_b['img-fluid'] = fluid,
|
|
@@ -6358,7 +5930,7 @@ CImage.displayName = 'CImage';
|
|
|
6358
5930
|
var CListGroup = forwardRef(function (_a, ref) {
|
|
6359
5931
|
var _b;
|
|
6360
5932
|
var children = _a.children, className = _a.className, _c = _a.component, Component = _c === void 0 ? 'ul' : _c, flush = _a.flush, layout = _a.layout;
|
|
6361
|
-
return (
|
|
5933
|
+
return (React.createElement(Component, { className: classNames('list-group', (_b = {
|
|
6362
5934
|
'list-group-flush': flush
|
|
6363
5935
|
},
|
|
6364
5936
|
_b["list-group-".concat(layout)] = layout,
|
|
@@ -6390,7 +5962,7 @@ var CListGroupItem = forwardRef(function (_a, ref) {
|
|
|
6390
5962
|
component: component,
|
|
6391
5963
|
ref: ref,
|
|
6392
5964
|
})), (active && { 'aria-current': true })), (disabled && { 'aria-disabled': true })), rest);
|
|
6393
|
-
return (
|
|
5965
|
+
return (React.createElement(Component, __assign({ className: classNames('list-group-item', (_b = {},
|
|
6394
5966
|
_b["list-group-item-".concat(color)] = color,
|
|
6395
5967
|
_b['list-group-item-action'] = component === 'a' || component === 'button',
|
|
6396
5968
|
_b.active = active,
|
|
@@ -6409,7 +5981,7 @@ CListGroupItem.displayName = 'CListGroupItem';
|
|
|
6409
5981
|
|
|
6410
5982
|
var CModalContent = forwardRef(function (_a, ref) {
|
|
6411
5983
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6412
|
-
return (
|
|
5984
|
+
return (React.createElement("div", __assign({ className: classNames('modal-content', className) }, rest, { ref: ref }), children));
|
|
6413
5985
|
});
|
|
6414
5986
|
CModalContent.propTypes = {
|
|
6415
5987
|
children: PropTypes.node,
|
|
@@ -6420,7 +5992,7 @@ CModalContent.displayName = 'CModalContent';
|
|
|
6420
5992
|
var CModalDialog = forwardRef(function (_a, ref) {
|
|
6421
5993
|
var _b;
|
|
6422
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"]);
|
|
6423
|
-
return (
|
|
5995
|
+
return (React.createElement("div", __assign({ className: classNames('modal-dialog', (_b = {
|
|
6424
5996
|
'modal-dialog-centered': alignment === 'center'
|
|
6425
5997
|
},
|
|
6426
5998
|
_b[typeof fullscreen === 'boolean'
|
|
@@ -6516,18 +6088,18 @@ var CModal = forwardRef(function (_a, ref) {
|
|
|
6516
6088
|
handleDismiss();
|
|
6517
6089
|
}
|
|
6518
6090
|
};
|
|
6519
|
-
return (
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
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', {
|
|
6523
6095
|
'modal-static': staticBackdrop,
|
|
6524
6096
|
fade: transition,
|
|
6525
6097
|
show: state === 'entered',
|
|
6526
6098
|
}, className), tabIndex: -1, role: "dialog", style: __assign({}, (state !== 'exited' && { display: 'block' })), ref: forkedRef },
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
backdrop && (
|
|
6530
|
-
|
|
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 })))));
|
|
6531
6103
|
});
|
|
6532
6104
|
CModal.propTypes = {
|
|
6533
6105
|
alignment: PropTypes.oneOf(['top', 'center']),
|
|
@@ -6554,7 +6126,7 @@ CModal.displayName = 'CModal';
|
|
|
6554
6126
|
|
|
6555
6127
|
var CModalBody = forwardRef(function (_a, ref) {
|
|
6556
6128
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6557
|
-
return (
|
|
6129
|
+
return (React.createElement("div", __assign({ className: classNames('modal-body', className) }, rest, { ref: ref }), children));
|
|
6558
6130
|
});
|
|
6559
6131
|
CModalBody.propTypes = {
|
|
6560
6132
|
children: PropTypes.node,
|
|
@@ -6564,7 +6136,7 @@ CModalBody.displayName = 'CModalBody';
|
|
|
6564
6136
|
|
|
6565
6137
|
var CModalFooter = forwardRef(function (_a, ref) {
|
|
6566
6138
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6567
|
-
return (
|
|
6139
|
+
return (React.createElement("div", __assign({ className: classNames('modal-footer', className) }, rest, { ref: ref }), children));
|
|
6568
6140
|
});
|
|
6569
6141
|
CModalFooter.propTypes = {
|
|
6570
6142
|
children: PropTypes.node,
|
|
@@ -6575,9 +6147,9 @@ CModalFooter.displayName = 'CModalFooter';
|
|
|
6575
6147
|
var CModalHeader = forwardRef(function (_a, ref) {
|
|
6576
6148
|
var children = _a.children, className = _a.className, _b = _a.closeButton, closeButton = _b === void 0 ? true : _b, rest = __rest(_a, ["children", "className", "closeButton"]);
|
|
6577
6149
|
var setVisible = useContext(CModalContext).setVisible;
|
|
6578
|
-
return (
|
|
6150
|
+
return (React.createElement("div", __assign({ className: classNames('modal-header', className) }, rest, { ref: ref }),
|
|
6579
6151
|
children,
|
|
6580
|
-
closeButton &&
|
|
6152
|
+
closeButton && React.createElement(CCloseButton, { onClick: function () { return setVisible(false); } })));
|
|
6581
6153
|
});
|
|
6582
6154
|
CModalHeader.propTypes = {
|
|
6583
6155
|
children: PropTypes.node,
|
|
@@ -6588,7 +6160,7 @@ CModalHeader.displayName = 'CModalHeader';
|
|
|
6588
6160
|
|
|
6589
6161
|
var CModalTitle = forwardRef(function (_a, ref) {
|
|
6590
6162
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6591
|
-
return (
|
|
6163
|
+
return (React.createElement(Component, __assign({ className: classNames('modal-title', className) }, rest, { ref: ref }), children));
|
|
6592
6164
|
});
|
|
6593
6165
|
CModalTitle.propTypes = {
|
|
6594
6166
|
children: PropTypes.node,
|
|
@@ -6600,7 +6172,7 @@ CModalTitle.displayName = 'CModalTitle';
|
|
|
6600
6172
|
var CNav = forwardRef(function (_a, ref) {
|
|
6601
6173
|
var _b;
|
|
6602
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"]);
|
|
6603
|
-
return (
|
|
6175
|
+
return (React.createElement(Component, __assign({ className: classNames('nav', (_b = {},
|
|
6604
6176
|
_b["nav-".concat(layout)] = layout,
|
|
6605
6177
|
_b["nav-".concat(variant)] = variant,
|
|
6606
6178
|
_b), className), role: "navigation" }, rest, { ref: ref }), children));
|
|
@@ -6616,7 +6188,7 @@ CNav.displayName = 'CNav';
|
|
|
6616
6188
|
|
|
6617
6189
|
var CNavGroupItems = forwardRef(function (_a, ref) {
|
|
6618
6190
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6619
|
-
return (
|
|
6191
|
+
return (React.createElement("ul", __assign({ className: classNames('nav-group-items', className) }, rest, { ref: ref }), children));
|
|
6620
6192
|
});
|
|
6621
6193
|
CNavGroupItems.propTypes = {
|
|
6622
6194
|
children: PropTypes.node,
|
|
@@ -6632,10 +6204,10 @@ var CSidebarNav = forwardRef(function (_a, ref) {
|
|
|
6632
6204
|
visibleGroup: visibleGroup,
|
|
6633
6205
|
setVisibleGroup: setVisibleGroup,
|
|
6634
6206
|
};
|
|
6635
|
-
return (
|
|
6636
|
-
|
|
6637
|
-
if (
|
|
6638
|
-
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, {
|
|
6639
6211
|
key: index,
|
|
6640
6212
|
idx: "".concat(index),
|
|
6641
6213
|
});
|
|
@@ -6691,13 +6263,13 @@ var CNavGroup = forwardRef(function (_a, ref) {
|
|
|
6691
6263
|
exiting: { display: 'block', height: height },
|
|
6692
6264
|
exited: { height: height },
|
|
6693
6265
|
};
|
|
6694
|
-
return (
|
|
6695
|
-
toggler && (
|
|
6696
|
-
|
|
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', {
|
|
6697
6269
|
compact: compact,
|
|
6698
|
-
}), style: __assign(__assign({}, style), transitionStyles[state]), ref: navItemsRef },
|
|
6699
|
-
if (
|
|
6700
|
-
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, {
|
|
6701
6273
|
key: index,
|
|
6702
6274
|
idx: "".concat(idx, ".").concat(index),
|
|
6703
6275
|
});
|
|
@@ -6725,7 +6297,7 @@ var CNavLink = forwardRef(function (_a, ref) {
|
|
|
6725
6297
|
rest.active = (_a = navLinkRef.current) === null || _a === void 0 ? void 0 : _a.classList.contains('active');
|
|
6726
6298
|
idx && rest.active && setVisibleGroup(idx);
|
|
6727
6299
|
}, [rest.active, className]);
|
|
6728
|
-
return (
|
|
6300
|
+
return (React.createElement(CLink, __assign({ className: classNames('nav-link', className) }, rest, { ref: forkedRef }), children));
|
|
6729
6301
|
});
|
|
6730
6302
|
CNavLink.propTypes = {
|
|
6731
6303
|
children: PropTypes.node,
|
|
@@ -6736,7 +6308,7 @@ CNavLink.displayName = 'CNavLink';
|
|
|
6736
6308
|
|
|
6737
6309
|
var CNavItem = forwardRef(function (_a, ref) {
|
|
6738
6310
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6739
|
-
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)));
|
|
6740
6312
|
});
|
|
6741
6313
|
CNavItem.propTypes = {
|
|
6742
6314
|
children: PropTypes.node,
|
|
@@ -6746,7 +6318,7 @@ CNavItem.displayName = 'CNavItem';
|
|
|
6746
6318
|
|
|
6747
6319
|
var CNavTitle = forwardRef(function (_a, ref) {
|
|
6748
6320
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6749
|
-
return (
|
|
6321
|
+
return (React.createElement("li", __assign({ className: classNames('nav-title', className) }, rest, { ref: ref }), children));
|
|
6750
6322
|
});
|
|
6751
6323
|
CNavTitle.propTypes = {
|
|
6752
6324
|
children: PropTypes.node,
|
|
@@ -6757,11 +6329,11 @@ CNavTitle.displayName = 'CNavTitle';
|
|
|
6757
6329
|
var CNavbar = forwardRef(function (_a, ref) {
|
|
6758
6330
|
var _b;
|
|
6759
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"]);
|
|
6760
|
-
return (
|
|
6332
|
+
return (React.createElement(Component, __assign({ className: classNames('navbar', (_b = {},
|
|
6761
6333
|
_b["bg-".concat(color)] = color,
|
|
6762
6334
|
_b["navbar-".concat(colorScheme)] = colorScheme,
|
|
6763
6335
|
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-".concat(expand)] = expand,
|
|
6764
|
-
_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))));
|
|
6765
6337
|
});
|
|
6766
6338
|
CNavbar.propTypes = {
|
|
6767
6339
|
children: PropTypes.node,
|
|
@@ -6791,7 +6363,7 @@ CNavbar.displayName = 'CNavbar';
|
|
|
6791
6363
|
var CNavbarBrand = forwardRef(function (_a, ref) {
|
|
6792
6364
|
var children = _a.children, component = _a.component, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6793
6365
|
var Component = component !== null && component !== void 0 ? component : (rest.href ? 'a' : 'span');
|
|
6794
|
-
return (
|
|
6366
|
+
return (React.createElement(Component, __assign({ className: classNames('navbar-brand', className) }, rest, { ref: ref }), children));
|
|
6795
6367
|
});
|
|
6796
6368
|
CNavbarBrand.propTypes = {
|
|
6797
6369
|
children: PropTypes.node,
|
|
@@ -6802,7 +6374,7 @@ CNavbarBrand.displayName = 'CNavbarBrand';
|
|
|
6802
6374
|
|
|
6803
6375
|
var CNavbarNav = forwardRef(function (_a, ref) {
|
|
6804
6376
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'ul' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6805
|
-
return (
|
|
6377
|
+
return (React.createElement(Component, __assign({ className: classNames('navbar-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
6806
6378
|
});
|
|
6807
6379
|
CNavbarNav.propTypes = {
|
|
6808
6380
|
children: PropTypes.node,
|
|
@@ -6813,7 +6385,7 @@ CNavbarNav.displayName = 'CNavbarNav';
|
|
|
6813
6385
|
|
|
6814
6386
|
var CNavbarText = forwardRef(function (_a, ref) {
|
|
6815
6387
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6816
|
-
return (
|
|
6388
|
+
return (React.createElement("span", __assign({ className: classNames('navbar-text', className) }, rest, { ref: ref }), children));
|
|
6817
6389
|
});
|
|
6818
6390
|
CNavbarText.propTypes = {
|
|
6819
6391
|
children: PropTypes.node,
|
|
@@ -6823,7 +6395,7 @@ CNavbarText.displayName = 'CNavbarText';
|
|
|
6823
6395
|
|
|
6824
6396
|
var CNavbarToggler = forwardRef(function (_a, ref) {
|
|
6825
6397
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6826
|
-
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" })));
|
|
6827
6399
|
});
|
|
6828
6400
|
CNavbarToggler.propTypes = {
|
|
6829
6401
|
children: PropTypes.node,
|
|
@@ -6863,11 +6435,11 @@ var COffcanvas = forwardRef(function (_a, ref) {
|
|
|
6863
6435
|
return handleDismiss();
|
|
6864
6436
|
}
|
|
6865
6437
|
};
|
|
6866
|
-
return (
|
|
6867
|
-
|
|
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) {
|
|
6868
6440
|
var _a;
|
|
6869
|
-
return (
|
|
6870
|
-
|
|
6441
|
+
return (React.createElement(CConditionalPortal, { portal: portal },
|
|
6442
|
+
React.createElement("div", __assign({ className: classNames((_a = {},
|
|
6871
6443
|
_a["offcanvas".concat(typeof responsive === 'string' ? '-' + responsive : '')] = responsive,
|
|
6872
6444
|
_a["offcanvas-".concat(placement)] = placement,
|
|
6873
6445
|
_a.showing = state === 'entering',
|
|
@@ -6875,8 +6447,8 @@ var COffcanvas = forwardRef(function (_a, ref) {
|
|
|
6875
6447
|
_a['show hiding'] = state === 'exiting',
|
|
6876
6448
|
_a), className), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, rest, { ref: forkedRef }), children)));
|
|
6877
6449
|
}),
|
|
6878
|
-
backdrop && (
|
|
6879
|
-
|
|
6450
|
+
backdrop && (React.createElement(CConditionalPortal, { portal: portal },
|
|
6451
|
+
React.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleBackdropDismiss, visible: _visible })))));
|
|
6880
6452
|
});
|
|
6881
6453
|
COffcanvas.propTypes = {
|
|
6882
6454
|
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])]),
|
|
@@ -6899,7 +6471,7 @@ COffcanvas.displayName = 'COffcanvas';
|
|
|
6899
6471
|
|
|
6900
6472
|
var COffcanvasBody = forwardRef(function (_a, ref) {
|
|
6901
6473
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6902
|
-
return (
|
|
6474
|
+
return (React.createElement("div", __assign({ className: classNames('offcanvas-body', className) }, rest, { ref: ref }), children));
|
|
6903
6475
|
});
|
|
6904
6476
|
COffcanvasBody.propTypes = {
|
|
6905
6477
|
children: PropTypes.node,
|
|
@@ -6909,7 +6481,7 @@ COffcanvasBody.displayName = 'COffcanvasBody';
|
|
|
6909
6481
|
|
|
6910
6482
|
var COffcanvasHeader = forwardRef(function (_a, ref) {
|
|
6911
6483
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
6912
|
-
return (
|
|
6484
|
+
return (React.createElement("div", __assign({ className: classNames('offcanvas-header', className) }, rest, { ref: ref }), children));
|
|
6913
6485
|
});
|
|
6914
6486
|
COffcanvasHeader.propTypes = {
|
|
6915
6487
|
children: PropTypes.node,
|
|
@@ -6919,7 +6491,7 @@ COffcanvasHeader.displayName = 'COffcanvasHeader';
|
|
|
6919
6491
|
|
|
6920
6492
|
var COffcanvasTitle = forwardRef(function (_a, ref) {
|
|
6921
6493
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest(_a, ["children", "component", "className"]);
|
|
6922
|
-
return (
|
|
6494
|
+
return (React.createElement(Component, __assign({ className: classNames('offcanvas-title', className) }, rest, { ref: ref }), children));
|
|
6923
6495
|
});
|
|
6924
6496
|
COffcanvasTitle.propTypes = {
|
|
6925
6497
|
children: PropTypes.node,
|
|
@@ -6931,8 +6503,8 @@ COffcanvasTitle.displayName = 'COffcanvasTitle';
|
|
|
6931
6503
|
var CPagination = forwardRef(function (_a, ref) {
|
|
6932
6504
|
var _b;
|
|
6933
6505
|
var children = _a.children, align = _a.align, className = _a.className, size = _a.size, rest = __rest(_a, ["children", "align", "className", "size"]);
|
|
6934
|
-
return (
|
|
6935
|
-
|
|
6506
|
+
return (React.createElement("nav", __assign({ ref: ref }, rest),
|
|
6507
|
+
React.createElement("ul", { className: classNames('pagination', (_b = {},
|
|
6936
6508
|
_b["justify-content-".concat(align)] = align,
|
|
6937
6509
|
_b["pagination-".concat(size)] = size,
|
|
6938
6510
|
_b), className) }, children)));
|
|
@@ -6948,10 +6520,10 @@ CPagination.displayName = 'CPagination';
|
|
|
6948
6520
|
var CPaginationItem = forwardRef(function (_a, ref) {
|
|
6949
6521
|
var children = _a.children, className = _a.className, component = _a.component, rest = __rest(_a, ["children", "className", "component"]);
|
|
6950
6522
|
var Component = component !== null && component !== void 0 ? component : (rest.active ? 'span' : 'a');
|
|
6951
|
-
return (
|
|
6523
|
+
return (React.createElement("li", __assign({ className: classNames('page-item', {
|
|
6952
6524
|
active: rest.active,
|
|
6953
6525
|
disabled: rest.disabled,
|
|
6954
|
-
}, 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))));
|
|
6955
6527
|
});
|
|
6956
6528
|
CPaginationItem.propTypes = {
|
|
6957
6529
|
children: PropTypes.node,
|
|
@@ -6983,7 +6555,7 @@ var CPlaceholder = forwardRef(function (_a, ref) {
|
|
|
6983
6555
|
repsonsiveClassNames.push("col".concat(infix));
|
|
6984
6556
|
}
|
|
6985
6557
|
});
|
|
6986
|
-
return (
|
|
6558
|
+
return (React.createElement(Component, __assign({ className: classNames(animation ? "placeholder-".concat(animation) : 'placeholder', (_b = {},
|
|
6987
6559
|
_b["bg-".concat(color)] = color,
|
|
6988
6560
|
_b["placeholder-".concat(size)] = size,
|
|
6989
6561
|
_b), repsonsiveClassNames, className) }, rest, { ref: ref }), children));
|
|
@@ -6998,14 +6570,29 @@ CPlaceholder.propTypes = {
|
|
|
6998
6570
|
};
|
|
6999
6571
|
CPlaceholder.displayName = 'CPlaceholder';
|
|
7000
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
|
+
|
|
7001
6587
|
var CProgressBar = forwardRef(function (_a, ref) {
|
|
7002
6588
|
var _b;
|
|
7003
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"]);
|
|
7004
|
-
|
|
6590
|
+
var stacked = useContext(CProgressStackedContext).stacked;
|
|
6591
|
+
return (React.createElement("div", __assign({ className: classNames('progress-bar', (_b = {},
|
|
7005
6592
|
_b["bg-".concat(color)] = color,
|
|
7006
6593
|
_b["progress-bar-".concat(variant)] = variant,
|
|
7007
6594
|
_b['progress-bar-animated'] = animated,
|
|
7008
|
-
_b), className),
|
|
6595
|
+
_b), className) }, (!stacked && { style: { width: "".concat(value, "%") } }), rest, { ref: ref }), children));
|
|
7009
6596
|
});
|
|
7010
6597
|
CProgressBar.propTypes = {
|
|
7011
6598
|
animated: PropTypes.bool,
|
|
@@ -7017,102 +6604,121 @@ CProgressBar.propTypes = {
|
|
|
7017
6604
|
};
|
|
7018
6605
|
CProgressBar.displayName = 'CProgressBar';
|
|
7019
6606
|
|
|
7020
|
-
// TODO: update markup and add '.progress-stacked' in v5
|
|
7021
6607
|
var CProgress = forwardRef(function (_a, ref) {
|
|
7022
|
-
var children = _a.children, className = _a.className, height = _a.height,
|
|
7023
|
-
|
|
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', {
|
|
7024
6611
|
'progress-thin': thin,
|
|
7025
6612
|
'progress-white': white,
|
|
7026
|
-
}, 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))));
|
|
7027
6627
|
});
|
|
7028
6628
|
CProgress.propTypes = {
|
|
7029
6629
|
children: PropTypes.node,
|
|
7030
6630
|
className: PropTypes.string,
|
|
7031
6631
|
height: PropTypes.number,
|
|
6632
|
+
progressBarClassName: PropTypes.string,
|
|
7032
6633
|
thin: PropTypes.bool,
|
|
7033
6634
|
value: PropTypes.number,
|
|
7034
6635
|
white: PropTypes.bool,
|
|
7035
6636
|
};
|
|
7036
6637
|
CProgress.displayName = 'CProgress';
|
|
7037
6638
|
|
|
7038
|
-
var getPlacement$1 = function (placement, element) {
|
|
7039
|
-
switch (placement) {
|
|
7040
|
-
case 'right': {
|
|
7041
|
-
return isRTL(element) ? 'left' : 'right';
|
|
7042
|
-
}
|
|
7043
|
-
case 'left': {
|
|
7044
|
-
return isRTL(element) ? 'right' : 'left';
|
|
7045
|
-
}
|
|
7046
|
-
default: {
|
|
7047
|
-
return placement;
|
|
7048
|
-
}
|
|
7049
|
-
}
|
|
7050
|
-
};
|
|
7051
6639
|
var CPopover = function (_a) {
|
|
7052
|
-
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"]);
|
|
7053
6641
|
var popoverRef = useRef(null);
|
|
7054
6642
|
var togglerRef = useRef(null);
|
|
7055
|
-
var
|
|
7056
|
-
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
|
+
};
|
|
7057
6669
|
useEffect(function () {
|
|
7058
6670
|
setVisible(visible);
|
|
7059
6671
|
}, [visible]);
|
|
7060
6672
|
useEffect(function () {
|
|
7061
|
-
if (_visible) {
|
|
7062
|
-
initPopper();
|
|
6673
|
+
if (_visible && togglerRef.current && popoverRef.current) {
|
|
6674
|
+
initPopper(togglerRef.current, popoverRef.current, popperConfig);
|
|
7063
6675
|
}
|
|
7064
6676
|
return function () {
|
|
7065
6677
|
destroyPopper();
|
|
7066
6678
|
};
|
|
7067
6679
|
}, [_visible]);
|
|
7068
|
-
var
|
|
7069
|
-
if (
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
{
|
|
7073
|
-
name: 'offset',
|
|
7074
|
-
options: {
|
|
7075
|
-
offset: offset,
|
|
7076
|
-
},
|
|
7077
|
-
},
|
|
7078
|
-
],
|
|
7079
|
-
placement: getPlacement$1(placement, togglerRef.current),
|
|
7080
|
-
});
|
|
7081
|
-
}
|
|
7082
|
-
};
|
|
7083
|
-
var destroyPopper = function () {
|
|
7084
|
-
if (popper.current) {
|
|
7085
|
-
popper.current.destroy();
|
|
6680
|
+
var toggleVisible = function (visible) {
|
|
6681
|
+
if (visible) {
|
|
6682
|
+
setTimeout(function () { return setVisible(true); }, _delay.show);
|
|
6683
|
+
return;
|
|
7086
6684
|
}
|
|
7087
|
-
|
|
6685
|
+
setTimeout(function () { return setVisible(false); }, _delay.hide);
|
|
7088
6686
|
};
|
|
7089
|
-
return (
|
|
7090
|
-
|
|
7091
|
-
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); },
|
|
7092
6690
|
})), ((trigger === 'focus' || trigger.includes('focus')) && {
|
|
7093
|
-
onFocus: function () { return
|
|
7094
|
-
onBlur: function () { return
|
|
6691
|
+
onFocus: function () { return toggleVisible(true); },
|
|
6692
|
+
onBlur: function () { return toggleVisible(false); },
|
|
7095
6693
|
})), ((trigger === 'hover' || trigger.includes('hover')) && {
|
|
7096
|
-
onMouseEnter: function () { return
|
|
7097
|
-
onMouseLeave: function () { return
|
|
6694
|
+
onMouseEnter: function () { return toggleVisible(true); },
|
|
6695
|
+
onMouseLeave: function () { return toggleVisible(false); },
|
|
7098
6696
|
}))),
|
|
7099
6697
|
typeof window !== 'undefined' &&
|
|
7100
|
-
createPortal(
|
|
6698
|
+
createPortal(React.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: popoverRef, onEnter: onShow, onExit: onHide, timeout: {
|
|
7101
6699
|
enter: 0,
|
|
7102
6700
|
exit: 200,
|
|
7103
|
-
}, unmountOnExit: true }, function (state) { return (
|
|
7104
|
-
|
|
7105
|
-
.replace('right', 'end')), 'fade', {
|
|
6701
|
+
}, unmountOnExit: true }, function (state) { return (React.createElement("div", __assign({ className: classNames('popover', 'bs-popover-auto', {
|
|
6702
|
+
fade: animation,
|
|
7106
6703
|
show: state === 'entered',
|
|
7107
6704
|
}, className), ref: popoverRef, role: "tooltip" }, rest),
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
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)));
|
|
7111
6708
|
};
|
|
7112
6709
|
CPopover.propTypes = {
|
|
6710
|
+
animation: PropTypes.bool,
|
|
7113
6711
|
children: PropTypes.node,
|
|
7114
6712
|
className: PropTypes.string,
|
|
7115
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,
|
|
7116
6722
|
offset: PropTypes.any,
|
|
7117
6723
|
onHide: PropTypes.func,
|
|
7118
6724
|
onShow: PropTypes.func,
|
|
@@ -7197,8 +6803,8 @@ var CSidebar = forwardRef(function (_a, ref) {
|
|
|
7197
6803
|
mobile &&
|
|
7198
6804
|
handleHide();
|
|
7199
6805
|
};
|
|
7200
|
-
return (
|
|
7201
|
-
|
|
6806
|
+
return (React.createElement(React.Fragment, null,
|
|
6807
|
+
React.createElement("div", __assign({ className: classNames('sidebar', (_b = {
|
|
7202
6808
|
'sidebar-narrow': narrow,
|
|
7203
6809
|
'sidebar-overlaid': overlaid
|
|
7204
6810
|
},
|
|
@@ -7210,7 +6816,7 @@ var CSidebar = forwardRef(function (_a, ref) {
|
|
|
7210
6816
|
_b), className) }, rest, { ref: forkedRef }), children),
|
|
7211
6817
|
typeof window !== 'undefined' &&
|
|
7212
6818
|
mobile &&
|
|
7213
|
-
createPortal(
|
|
6819
|
+
createPortal(React.createElement(CBackdrop, { className: "sidebar-backdrop", visible: _visible }), document.body)));
|
|
7214
6820
|
});
|
|
7215
6821
|
CSidebar.propTypes = {
|
|
7216
6822
|
children: PropTypes.node,
|
|
@@ -7229,7 +6835,7 @@ CSidebar.displayName = 'CSidebar';
|
|
|
7229
6835
|
|
|
7230
6836
|
var CSidebarBrand = forwardRef(function (_a, ref) {
|
|
7231
6837
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7232
|
-
return (
|
|
6838
|
+
return (React.createElement("div", __assign({ className: classNames('sidebar-brand', className), ref: ref }, rest), children));
|
|
7233
6839
|
});
|
|
7234
6840
|
CSidebarBrand.propTypes = {
|
|
7235
6841
|
children: PropTypes.node,
|
|
@@ -7239,7 +6845,7 @@ CSidebarBrand.displayName = 'CSidebarBrand';
|
|
|
7239
6845
|
|
|
7240
6846
|
var CSidebarFooter = forwardRef(function (_a, ref) {
|
|
7241
6847
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7242
|
-
return (
|
|
6848
|
+
return (React.createElement("div", __assign({ className: classNames('sidebar-footer', className), ref: ref }, rest), children));
|
|
7243
6849
|
});
|
|
7244
6850
|
CSidebarFooter.propTypes = {
|
|
7245
6851
|
children: PropTypes.node,
|
|
@@ -7249,7 +6855,7 @@ CSidebarFooter.displayName = 'CSidebarFooter';
|
|
|
7249
6855
|
|
|
7250
6856
|
var CSidebarToggler = forwardRef(function (_a, ref) {
|
|
7251
6857
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7252
|
-
return (
|
|
6858
|
+
return (React.createElement("button", __assign({ className: classNames('sidebar-toggler', className), ref: ref }, rest), children));
|
|
7253
6859
|
});
|
|
7254
6860
|
CSidebarToggler.propTypes = {
|
|
7255
6861
|
children: PropTypes.node,
|
|
@@ -7259,7 +6865,7 @@ CSidebarToggler.displayName = 'CSidebarToggler';
|
|
|
7259
6865
|
|
|
7260
6866
|
var CSidebarHeader = forwardRef(function (_a, ref) {
|
|
7261
6867
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7262
|
-
return (
|
|
6868
|
+
return (React.createElement("div", __assign({ className: classNames('sidebar-header', className), ref: ref }, rest), children));
|
|
7263
6869
|
});
|
|
7264
6870
|
CSidebarHeader.propTypes = {
|
|
7265
6871
|
children: PropTypes.node,
|
|
@@ -7270,11 +6876,11 @@ CSidebarHeader.displayName = 'CSidebarHeader';
|
|
|
7270
6876
|
var CSpinner = forwardRef(function (_a, ref) {
|
|
7271
6877
|
var _b;
|
|
7272
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"]);
|
|
7273
|
-
return (
|
|
6879
|
+
return (React.createElement(Component, __assign({ className: classNames("spinner-".concat(variant), (_b = {},
|
|
7274
6880
|
_b["spinner-".concat(variant, "-").concat(size)] = size,
|
|
7275
6881
|
_b["text-".concat(color)] = color,
|
|
7276
6882
|
_b), className), role: "status" }, rest, { ref: ref }),
|
|
7277
|
-
|
|
6883
|
+
React.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
7278
6884
|
});
|
|
7279
6885
|
CSpinner.propTypes = {
|
|
7280
6886
|
className: PropTypes.string,
|
|
@@ -7289,7 +6895,7 @@ CSpinner.displayName = 'CSpinner';
|
|
|
7289
6895
|
var CTableHead = forwardRef(function (_a, ref) {
|
|
7290
6896
|
var _b;
|
|
7291
6897
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7292
|
-
return (
|
|
6898
|
+
return (React.createElement("thead", __assign({ className: classNames((_b = {},
|
|
7293
6899
|
_b["table-".concat(color)] = color,
|
|
7294
6900
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
7295
6901
|
});
|
|
@@ -7303,7 +6909,7 @@ CTableHead.displayName = 'CTableHead';
|
|
|
7303
6909
|
var CTableHeaderCell = forwardRef(function (_a, ref) {
|
|
7304
6910
|
var _b;
|
|
7305
6911
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7306
|
-
return (
|
|
6912
|
+
return (React.createElement("th", __assign({ className: classNames((_b = {},
|
|
7307
6913
|
_b["table-".concat(color)] = color,
|
|
7308
6914
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
7309
6915
|
});
|
|
@@ -7317,7 +6923,7 @@ CTableHeaderCell.displayName = 'CTableHeaderCell';
|
|
|
7317
6923
|
var CTableBody = forwardRef(function (_a, ref) {
|
|
7318
6924
|
var _b;
|
|
7319
6925
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7320
|
-
return (
|
|
6926
|
+
return (React.createElement("tbody", __assign({ className: classNames((_b = {},
|
|
7321
6927
|
_b["table-".concat(color)] = color,
|
|
7322
6928
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
7323
6929
|
});
|
|
@@ -7332,7 +6938,7 @@ var CTableDataCell = forwardRef(function (_a, ref) {
|
|
|
7332
6938
|
var _b;
|
|
7333
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"]);
|
|
7334
6940
|
var Component = rest.scope ? 'th' : 'td';
|
|
7335
|
-
return (
|
|
6941
|
+
return (React.createElement(Component, __assign({ className: classNames((_b = {},
|
|
7336
6942
|
_b["align-".concat(align)] = align,
|
|
7337
6943
|
_b['table-active'] = active,
|
|
7338
6944
|
_b["table-".concat(color)] = color,
|
|
@@ -7350,7 +6956,7 @@ CTableDataCell.displayName = 'CTableDataCell';
|
|
|
7350
6956
|
var CTableRow = forwardRef(function (_a, ref) {
|
|
7351
6957
|
var _b;
|
|
7352
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"]);
|
|
7353
|
-
return (
|
|
6959
|
+
return (React.createElement("tr", __assign({ className: classNames((_b = {},
|
|
7354
6960
|
_b["align-".concat(align)] = align,
|
|
7355
6961
|
_b['table-active'] = active,
|
|
7356
6962
|
_b["table-".concat(color)] = color,
|
|
@@ -7368,7 +6974,7 @@ CTableRow.displayName = 'CTableRow';
|
|
|
7368
6974
|
var CTableFoot = forwardRef(function (_a, ref) {
|
|
7369
6975
|
var _b;
|
|
7370
6976
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7371
|
-
return (
|
|
6977
|
+
return (React.createElement("tfoot", __assign({ className: classNames((_b = {},
|
|
7372
6978
|
_b["table-".concat(color)] = color,
|
|
7373
6979
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
7374
6980
|
});
|
|
@@ -7381,7 +6987,7 @@ CTableFoot.displayName = 'CTableFoot';
|
|
|
7381
6987
|
|
|
7382
6988
|
var CTableCaption = forwardRef(function (_a, ref) {
|
|
7383
6989
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
7384
|
-
return (
|
|
6990
|
+
return (React.createElement("caption", __assign({}, props, { ref: ref }), children));
|
|
7385
6991
|
});
|
|
7386
6992
|
CTableCaption.propTypes = {
|
|
7387
6993
|
children: PropTypes.node,
|
|
@@ -7390,7 +6996,7 @@ CTableCaption.displayName = 'CTableCaption';
|
|
|
7390
6996
|
|
|
7391
6997
|
var CTableResponsiveWrapper = function (_a) {
|
|
7392
6998
|
var children = _a.children, responsive = _a.responsive, rest = __rest(_a, ["children", "responsive"]);
|
|
7393
|
-
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));
|
|
7394
7000
|
};
|
|
7395
7001
|
CTableResponsiveWrapper.propTypes = {
|
|
7396
7002
|
children: PropTypes.node,
|
|
@@ -7426,8 +7032,8 @@ var CTable = forwardRef(function (_a, ref) {
|
|
|
7426
7032
|
var _b;
|
|
7427
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"]);
|
|
7428
7034
|
var columnNames = useMemo(function () { return getColumnNames(columns, items); }, [columns, items]);
|
|
7429
|
-
return (
|
|
7430
|
-
|
|
7035
|
+
return (React.createElement(CTableResponsiveWrapper, { responsive: responsive },
|
|
7036
|
+
React.createElement("table", __assign({ className: classNames('table', (_b = {},
|
|
7431
7037
|
_b["align-".concat(align)] = align,
|
|
7432
7038
|
_b["border-".concat(borderColor)] = borderColor,
|
|
7433
7039
|
_b["caption-top"] = captionTop || caption === 'top',
|
|
@@ -7439,17 +7045,17 @@ var CTable = forwardRef(function (_a, ref) {
|
|
|
7439
7045
|
_b['table-striped'] = striped,
|
|
7440
7046
|
_b['table-striped-columns'] = stripedColumns,
|
|
7441
7047
|
_b), className) }, rest, { ref: ref }),
|
|
7442
|
-
((caption && caption !== 'top') || captionTop) && (
|
|
7443
|
-
columns && (
|
|
7444
|
-
|
|
7445
|
-
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 &&
|
|
7446
7052
|
columnNames.map(function (colName, index) {
|
|
7447
7053
|
// eslint-disable-next-line unicorn/no-negated-condition
|
|
7448
|
-
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;
|
|
7449
7055
|
}))); }))),
|
|
7450
7056
|
children,
|
|
7451
|
-
footer && (
|
|
7452
|
-
|
|
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)); })))))));
|
|
7453
7059
|
});
|
|
7454
7060
|
CTable.propTypes = {
|
|
7455
7061
|
align: PropTypes.oneOf(['bottom', 'middle', 'top']),
|
|
@@ -7479,7 +7085,7 @@ CTable.displayName = 'CTable';
|
|
|
7479
7085
|
|
|
7480
7086
|
var CTabContent = forwardRef(function (_a, ref) {
|
|
7481
7087
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7482
|
-
return (
|
|
7088
|
+
return (React.createElement("div", __assign({ className: classNames('tab-content', className) }, rest, { ref: ref }), children));
|
|
7483
7089
|
});
|
|
7484
7090
|
CTabContent.propTypes = {
|
|
7485
7091
|
children: PropTypes.node,
|
|
@@ -7491,7 +7097,7 @@ var CTabPane = forwardRef(function (_a, ref) {
|
|
|
7491
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"]);
|
|
7492
7098
|
var tabPaneRef = useRef();
|
|
7493
7099
|
var forkedRef = useForkedRef(ref, tabPaneRef);
|
|
7494
|
-
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', {
|
|
7495
7101
|
active: visible,
|
|
7496
7102
|
show: state === 'entered',
|
|
7497
7103
|
}, className) }, rest, { ref: forkedRef }), children)); }));
|
|
@@ -7532,10 +7138,10 @@ var CToast = forwardRef(function (_a, ref) {
|
|
|
7532
7138
|
}, delay);
|
|
7533
7139
|
}
|
|
7534
7140
|
};
|
|
7535
|
-
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) {
|
|
7536
7142
|
var _a;
|
|
7537
|
-
return (
|
|
7538
|
-
|
|
7143
|
+
return (React.createElement(CToastContext.Provider, { value: contextValues },
|
|
7144
|
+
React.createElement("div", __assign({ className: classNames('toast', (_a = {
|
|
7539
7145
|
fade: animation
|
|
7540
7146
|
},
|
|
7541
7147
|
_a["bg-".concat(color)] = color,
|
|
@@ -7562,7 +7168,7 @@ CToast.displayName = 'CToast';
|
|
|
7562
7168
|
|
|
7563
7169
|
var CToastBody = forwardRef(function (_a, ref) {
|
|
7564
7170
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
7565
|
-
return (
|
|
7171
|
+
return (React.createElement("div", __assign({ className: classNames('toast-body', className) }, rest, { ref: ref }), children));
|
|
7566
7172
|
});
|
|
7567
7173
|
CToastBody.propTypes = {
|
|
7568
7174
|
children: PropTypes.node,
|
|
@@ -7573,16 +7179,16 @@ CToastBody.displayName = 'CToastBody';
|
|
|
7573
7179
|
var CToastClose = forwardRef(function (_a, ref) {
|
|
7574
7180
|
var children = _a.children, Component = _a.component, rest = __rest(_a, ["children", "component"]);
|
|
7575
7181
|
var setVisible = useContext(CToastContext).setVisible;
|
|
7576
|
-
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 })));
|
|
7577
7183
|
});
|
|
7578
7184
|
CToastClose.propTypes = __assign(__assign({}, CCloseButton.propTypes), { component: PropTypes.elementType });
|
|
7579
7185
|
CToastClose.displayName = 'CToastClose';
|
|
7580
7186
|
|
|
7581
7187
|
var CToastHeader = forwardRef(function (_a, ref) {
|
|
7582
7188
|
var children = _a.children, className = _a.className, closeButton = _a.closeButton, rest = __rest(_a, ["children", "className", "closeButton"]);
|
|
7583
|
-
return (
|
|
7189
|
+
return (React.createElement("div", __assign({ className: classNames('toast-header', className) }, rest, { ref: ref }),
|
|
7584
7190
|
children,
|
|
7585
|
-
closeButton &&
|
|
7191
|
+
closeButton && React.createElement(CToastClose, null)));
|
|
7586
7192
|
});
|
|
7587
7193
|
CToastHeader.propTypes = {
|
|
7588
7194
|
children: PropTypes.node,
|
|
@@ -7601,7 +7207,7 @@ var CToaster = forwardRef(function (_a, ref) {
|
|
|
7601
7207
|
}, [push]);
|
|
7602
7208
|
var addToast = function (push) {
|
|
7603
7209
|
setToasts(function (state) { return __spreadArray(__spreadArray([], state, true), [
|
|
7604
|
-
|
|
7210
|
+
React.cloneElement(push, {
|
|
7605
7211
|
index: index.current,
|
|
7606
7212
|
key: index.current,
|
|
7607
7213
|
onClose: function (index) {
|
|
@@ -7610,7 +7216,7 @@ var CToaster = forwardRef(function (_a, ref) {
|
|
|
7610
7216
|
}),
|
|
7611
7217
|
], false); });
|
|
7612
7218
|
};
|
|
7613
|
-
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', {
|
|
7614
7220
|
'position-fixed': placement,
|
|
7615
7221
|
'top-0': placement && placement.includes('top'),
|
|
7616
7222
|
'top-50 translate-middle-y': placement && placement.includes('middle'),
|
|
@@ -7620,7 +7226,7 @@ var CToaster = forwardRef(function (_a, ref) {
|
|
|
7620
7226
|
'end-0': placement && placement.includes('end'),
|
|
7621
7227
|
}, className) }, rest, { ref: ref }),
|
|
7622
7228
|
children,
|
|
7623
|
-
toasts.map(function (toast) { return
|
|
7229
|
+
toasts.map(function (toast) { return React.cloneElement(toast, { visible: true }); }))) : null));
|
|
7624
7230
|
});
|
|
7625
7231
|
CToaster.propTypes = {
|
|
7626
7232
|
children: PropTypes.node,
|
|
@@ -7643,82 +7249,87 @@ CToaster.propTypes = {
|
|
|
7643
7249
|
};
|
|
7644
7250
|
CToaster.displayName = 'CToaster';
|
|
7645
7251
|
|
|
7646
|
-
var getPlacement = function (placement, element) {
|
|
7647
|
-
switch (placement) {
|
|
7648
|
-
case 'right': {
|
|
7649
|
-
return isRTL(element) ? 'left' : 'right';
|
|
7650
|
-
}
|
|
7651
|
-
case 'left': {
|
|
7652
|
-
return isRTL(element) ? 'right' : 'left';
|
|
7653
|
-
}
|
|
7654
|
-
default: {
|
|
7655
|
-
return placement;
|
|
7656
|
-
}
|
|
7657
|
-
}
|
|
7658
|
-
};
|
|
7659
7252
|
var CTooltip = function (_a) {
|
|
7660
|
-
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"]);
|
|
7661
7254
|
var tooltipRef = useRef(null);
|
|
7662
7255
|
var togglerRef = useRef(null);
|
|
7663
|
-
var
|
|
7664
|
-
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
|
+
};
|
|
7665
7282
|
useEffect(function () {
|
|
7666
7283
|
setVisible(visible);
|
|
7667
7284
|
}, [visible]);
|
|
7668
7285
|
useEffect(function () {
|
|
7669
|
-
if (_visible) {
|
|
7670
|
-
initPopper();
|
|
7286
|
+
if (_visible && togglerRef.current && tooltipRef.current) {
|
|
7287
|
+
initPopper(togglerRef.current, tooltipRef.current, popperConfig);
|
|
7671
7288
|
}
|
|
7672
7289
|
return function () {
|
|
7673
7290
|
destroyPopper();
|
|
7674
7291
|
};
|
|
7675
7292
|
}, [_visible]);
|
|
7676
|
-
var
|
|
7677
|
-
if (
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
{
|
|
7681
|
-
name: 'offset',
|
|
7682
|
-
options: {
|
|
7683
|
-
offset: offset,
|
|
7684
|
-
},
|
|
7685
|
-
},
|
|
7686
|
-
],
|
|
7687
|
-
placement: getPlacement(placement, togglerRef.current),
|
|
7688
|
-
});
|
|
7689
|
-
}
|
|
7690
|
-
};
|
|
7691
|
-
var destroyPopper = function () {
|
|
7692
|
-
if (popper.current) {
|
|
7693
|
-
popper.current.destroy();
|
|
7293
|
+
var toggleVisible = function (visible) {
|
|
7294
|
+
if (visible) {
|
|
7295
|
+
setTimeout(function () { return setVisible(true); }, _delay.show);
|
|
7296
|
+
return;
|
|
7694
7297
|
}
|
|
7695
|
-
|
|
7298
|
+
setTimeout(function () { return setVisible(false); }, _delay.hide);
|
|
7696
7299
|
};
|
|
7697
|
-
return (
|
|
7698
|
-
|
|
7699
|
-
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); },
|
|
7700
7303
|
})), ((trigger === 'focus' || trigger.includes('focus')) && {
|
|
7701
|
-
onFocus: function () { return
|
|
7702
|
-
onBlur: function () { return
|
|
7304
|
+
onFocus: function () { return toggleVisible(true); },
|
|
7305
|
+
onBlur: function () { return toggleVisible(false); },
|
|
7703
7306
|
})), ((trigger === 'hover' || trigger.includes('hover')) && {
|
|
7704
|
-
onMouseEnter: function () { return
|
|
7705
|
-
onMouseLeave: function () { return
|
|
7307
|
+
onMouseEnter: function () { return toggleVisible(true); },
|
|
7308
|
+
onMouseLeave: function () { return toggleVisible(false); },
|
|
7706
7309
|
}))),
|
|
7707
7310
|
typeof window !== 'undefined' &&
|
|
7708
|
-
createPortal(
|
|
7311
|
+
createPortal(React.createElement(Transition$1, { in: _visible, mountOnEnter: true, onEnter: onShow, onExit: onHide, timeout: {
|
|
7709
7312
|
enter: 0,
|
|
7710
7313
|
exit: 200,
|
|
7711
|
-
}, unmountOnExit: true }, function (state) { return (
|
|
7712
|
-
|
|
7713
|
-
.replace('right', 'end')), 'fade', {
|
|
7314
|
+
}, unmountOnExit: true }, function (state) { return (React.createElement("div", __assign({ className: classNames('tooltip', 'bs-tooltip-auto', {
|
|
7315
|
+
fade: animation,
|
|
7714
7316
|
show: state === 'entered',
|
|
7715
7317
|
}, className), ref: tooltipRef, role: "tooltip" }, rest),
|
|
7716
|
-
|
|
7717
|
-
|
|
7318
|
+
React.createElement("div", { className: "tooltip-arrow" }),
|
|
7319
|
+
React.createElement("div", { className: "tooltip-inner" }, content))); }), document.body)));
|
|
7718
7320
|
};
|
|
7719
7321
|
CTooltip.propTypes = {
|
|
7322
|
+
animation: PropTypes.bool,
|
|
7720
7323
|
children: PropTypes.node,
|
|
7721
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,
|
|
7722
7333
|
offset: PropTypes.any,
|
|
7723
7334
|
onHide: PropTypes.func,
|
|
7724
7335
|
onShow: PropTypes.func,
|
|
@@ -7731,11 +7342,11 @@ CTooltip.displayName = 'CTooltip';
|
|
|
7731
7342
|
var CWidgetStatsA = forwardRef(function (_a, ref) {
|
|
7732
7343
|
var _b;
|
|
7733
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"]);
|
|
7734
|
-
return (
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
value &&
|
|
7738
|
-
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)),
|
|
7739
7350
|
action),
|
|
7740
7351
|
chart));
|
|
7741
7352
|
});
|
|
@@ -7751,12 +7362,12 @@ CWidgetStatsA.displayName = 'CWidgetStatsA';
|
|
|
7751
7362
|
|
|
7752
7363
|
var CWidgetStatsB = forwardRef(function (_a, ref) {
|
|
7753
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"]);
|
|
7754
|
-
return (
|
|
7755
|
-
|
|
7756
|
-
value &&
|
|
7757
|
-
title &&
|
|
7758
|
-
|
|
7759
|
-
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)))));
|
|
7760
7371
|
});
|
|
7761
7372
|
CWidgetStatsB.propTypes = {
|
|
7762
7373
|
className: PropTypes.string,
|
|
@@ -7771,12 +7382,12 @@ CWidgetStatsB.displayName = 'CWidgetCWidgetStatsB';
|
|
|
7771
7382
|
|
|
7772
7383
|
var CWidgetStatsC = forwardRef(function (_a, ref) {
|
|
7773
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"]);
|
|
7774
|
-
return (
|
|
7775
|
-
|
|
7776
|
-
icon && (
|
|
7777
|
-
value && (
|
|
7778
|
-
title && (
|
|
7779
|
-
|
|
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)))));
|
|
7780
7391
|
});
|
|
7781
7392
|
CWidgetStatsC.propTypes = {
|
|
7782
7393
|
className: PropTypes.string,
|
|
@@ -7792,19 +7403,19 @@ CWidgetStatsC.displayName = 'CWidgetStatsCWidgetStatsC';
|
|
|
7792
7403
|
var CWidgetStatsD = forwardRef(function (_a, ref) {
|
|
7793
7404
|
var _b;
|
|
7794
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"]);
|
|
7795
|
-
return (
|
|
7796
|
-
|
|
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 = {},
|
|
7797
7408
|
_b["bg-".concat(color)] = color,
|
|
7798
7409
|
_b)) },
|
|
7799
7410
|
icon,
|
|
7800
7411
|
chart),
|
|
7801
|
-
|
|
7412
|
+
React.createElement(CCardBody, { className: "row text-center" }, values &&
|
|
7802
7413
|
values.map(function (value, index) {
|
|
7803
|
-
return (
|
|
7804
|
-
index % 2 !== 0 &&
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
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))));
|
|
7808
7419
|
}))));
|
|
7809
7420
|
});
|
|
7810
7421
|
CWidgetStatsD.propTypes = {
|
|
@@ -7818,10 +7429,10 @@ CWidgetStatsD.displayName = 'CWidgetStatsD';
|
|
|
7818
7429
|
|
|
7819
7430
|
var CWidgetStatsE = forwardRef(function (_a, ref) {
|
|
7820
7431
|
var chart = _a.chart, className = _a.className, title = _a.title, value = _a.value, rest = __rest(_a, ["chart", "className", "title", "value"]);
|
|
7821
|
-
return (
|
|
7822
|
-
|
|
7823
|
-
title && (
|
|
7824
|
-
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),
|
|
7825
7436
|
chart)));
|
|
7826
7437
|
});
|
|
7827
7438
|
CWidgetStatsE.propTypes = {
|
|
@@ -7835,13 +7446,13 @@ CWidgetStatsE.displayName = 'CWidgetStatsE';
|
|
|
7835
7446
|
|
|
7836
7447
|
var CWidgetStatsF = forwardRef(function (_a, ref) {
|
|
7837
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"]);
|
|
7838
|
-
return (
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
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)));
|
|
7845
7456
|
});
|
|
7846
7457
|
CWidgetStatsF.propTypes = {
|
|
7847
7458
|
className: PropTypes.string,
|
|
@@ -7854,5 +7465,5 @@ CWidgetStatsF.propTypes = {
|
|
|
7854
7465
|
};
|
|
7855
7466
|
CWidgetStatsF.displayName = 'CWidgetStatsF';
|
|
7856
7467
|
|
|
7857
|
-
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 };
|
|
7858
7469
|
//# sourceMappingURL=index.es.js.map
|