@coreui/react 4.0.0 → 4.1.1
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 +157 -0
- package/dist/components/accordion/CAccordionCollapse.d.ts +1 -1
- package/dist/components/collapse/CCollapse.d.ts +4 -0
- package/dist/components/form/CFormCheck.d.ts +4 -0
- package/dist/components/form/CFormLabel.d.ts +2 -2
- package/dist/components/form/CFormSelect.d.ts +13 -0
- package/dist/components/placeholder/CPlaceholder.d.ts +51 -0
- package/dist/components/popover/CPopover.d.ts +2 -2
- package/dist/components/tooltip/CTooltip.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +291 -181
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +291 -180
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/src/components/accordion/CAccordionCollapse.tsx +1 -1
- package/src/components/collapse/CCollapse.tsx +36 -3
- package/src/components/form/CFormCheck.tsx +30 -3
- package/src/components/form/CFormLabel.tsx +2 -2
- package/src/components/form/CFormSelect.tsx +28 -2
- package/src/components/form/__tests__/CFormLabel.spec.tsx +8 -0
- package/src/components/form/__tests__/__snapshots__/CFormLabel.spec.tsx.snap +11 -0
- package/src/components/grid/CCol.tsx +8 -8
- package/src/components/grid/CContainer.tsx +3 -3
- package/src/components/grid/CRow.tsx +6 -6
- package/src/components/offcanvas/COffcanvas.tsx +15 -2
- package/src/components/offcanvas/__tests__/COffcanvas.spec.tsx +1 -1
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvas.spec.tsx.snap +2 -2
- package/src/components/placeholder/CPlaceholder.tsx +114 -0
- package/src/components/placeholder/__tests__/CPlaceholder.spec.tsx +21 -0
- package/src/components/placeholder/__tests__/__snapshots__/CPlaceholder.spec.tsx.snap +17 -0
- package/src/components/popover/CPopover.tsx +4 -4
- package/src/components/tooltip/CTooltip.tsx +2 -2
- package/src/index.ts +2 -0
- package/src/utils/hooks/useForkedRef.ts +5 -0
package/dist/index.es.js
CHANGED
|
@@ -2360,6 +2360,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
|
|
|
2360
2360
|
var CSSTransition$1 = CSSTransition;
|
|
2361
2361
|
|
|
2362
2362
|
// code borrowed from https://github.com/reach/reach-ui
|
|
2363
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2363
2364
|
function useForkedRef() {
|
|
2364
2365
|
var refs = [];
|
|
2365
2366
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -2369,6 +2370,7 @@ function useForkedRef() {
|
|
|
2369
2370
|
if (refs.every(function (ref) { return ref == null; })) {
|
|
2370
2371
|
return null;
|
|
2371
2372
|
}
|
|
2373
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2372
2374
|
return function (node) {
|
|
2373
2375
|
refs.forEach(function (ref) {
|
|
2374
2376
|
assignRef(ref, node);
|
|
@@ -2376,7 +2378,10 @@ function useForkedRef() {
|
|
|
2376
2378
|
};
|
|
2377
2379
|
}, refs);
|
|
2378
2380
|
}
|
|
2379
|
-
|
|
2381
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2382
|
+
function assignRef(ref,
|
|
2383
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2384
|
+
value) {
|
|
2380
2385
|
if (ref == null)
|
|
2381
2386
|
return;
|
|
2382
2387
|
if (isFunction(ref)) {
|
|
@@ -2387,17 +2392,19 @@ function assignRef(ref, value) {
|
|
|
2387
2392
|
ref.current = value;
|
|
2388
2393
|
}
|
|
2389
2394
|
catch (error) {
|
|
2390
|
-
throw new Error("Cannot assign value \""
|
|
2395
|
+
throw new Error("Cannot assign value \"".concat(value, "\" to ref \"").concat(ref, "\""));
|
|
2391
2396
|
}
|
|
2392
2397
|
}
|
|
2393
2398
|
}
|
|
2399
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
2394
2400
|
function isFunction(value) {
|
|
2395
2401
|
return !!(value && {}.toString.call(value) == '[object Function]');
|
|
2396
2402
|
}
|
|
2397
2403
|
|
|
2398
2404
|
var CCollapse = forwardRef(function (_a, ref) {
|
|
2399
|
-
var children = _a.children, className = _a.className, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest(_a, ["children", "className", "onHide", "onShow", "visible"]);
|
|
2405
|
+
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"]);
|
|
2400
2406
|
var _b = useState(), height = _b[0], setHeight = _b[1];
|
|
2407
|
+
var _c = useState(), width = _c[0], setWidth = _c[1];
|
|
2401
2408
|
var collapseRef = useRef(null);
|
|
2402
2409
|
var forkedRef = useForkedRef(ref, collapseRef);
|
|
2403
2410
|
var getTransitionClass = function (state) {
|
|
@@ -2411,31 +2418,55 @@ var CCollapse = forwardRef(function (_a, ref) {
|
|
|
2411
2418
|
};
|
|
2412
2419
|
var onEntering = function () {
|
|
2413
2420
|
onShow && onShow();
|
|
2421
|
+
if (horizontal) {
|
|
2422
|
+
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
2423
|
+
return;
|
|
2424
|
+
}
|
|
2414
2425
|
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
2415
2426
|
};
|
|
2416
2427
|
var onEntered = function () {
|
|
2428
|
+
if (horizontal) {
|
|
2429
|
+
setWidth(0);
|
|
2430
|
+
return;
|
|
2431
|
+
}
|
|
2417
2432
|
setHeight(0);
|
|
2418
2433
|
};
|
|
2419
2434
|
var onExit = function () {
|
|
2435
|
+
if (horizontal) {
|
|
2436
|
+
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
2437
|
+
return;
|
|
2438
|
+
}
|
|
2420
2439
|
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
2421
2440
|
};
|
|
2422
2441
|
var onExiting = function () {
|
|
2423
2442
|
onHide && onHide();
|
|
2443
|
+
if (horizontal) {
|
|
2444
|
+
setWidth(0);
|
|
2445
|
+
return;
|
|
2446
|
+
}
|
|
2424
2447
|
setHeight(0);
|
|
2425
2448
|
};
|
|
2426
2449
|
var onExited = function () {
|
|
2450
|
+
if (horizontal) {
|
|
2451
|
+
setWidth(0);
|
|
2452
|
+
return;
|
|
2453
|
+
}
|
|
2427
2454
|
setHeight(0);
|
|
2428
2455
|
};
|
|
2429
|
-
var _className = classNames(
|
|
2456
|
+
var _className = classNames({
|
|
2457
|
+
'collapse-horizontal': horizontal,
|
|
2458
|
+
}, className);
|
|
2430
2459
|
return (React__default.createElement(CSSTransition$1, { in: visible, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 350 }, function (state) {
|
|
2431
2460
|
var transitionClass = getTransitionClass(state);
|
|
2432
2461
|
var currentHeight = height === 0 ? null : { height: height };
|
|
2433
|
-
|
|
2462
|
+
var currentWidth = width === 0 ? null : { width: width };
|
|
2463
|
+
return (React__default.createElement("div", __assign({ className: classNames(_className, transitionClass), style: __assign(__assign({}, currentHeight), currentWidth) }, rest, { ref: forkedRef }), children));
|
|
2434
2464
|
}));
|
|
2435
2465
|
});
|
|
2436
2466
|
CCollapse.propTypes = {
|
|
2437
2467
|
children: PropTypes.node,
|
|
2438
2468
|
className: PropTypes.string,
|
|
2469
|
+
horizontal: PropTypes.bool,
|
|
2439
2470
|
onHide: PropTypes.func,
|
|
2440
2471
|
onShow: PropTypes.func,
|
|
2441
2472
|
visible: PropTypes.bool,
|
|
@@ -2561,7 +2592,7 @@ var CAlert = forwardRef(function (_a, ref) {
|
|
|
2561
2592
|
useEffect(function () {
|
|
2562
2593
|
setVisible(visible);
|
|
2563
2594
|
}, [visible]);
|
|
2564
|
-
var _className = classNames('alert', variant === 'solid' ? "bg-"
|
|
2595
|
+
var _className = classNames('alert', variant === 'solid' ? "bg-".concat(color, " text-white") : "alert-".concat(color), {
|
|
2565
2596
|
'alert-dismissible fade': dismissible,
|
|
2566
2597
|
}, className);
|
|
2567
2598
|
var getTransitionClass = function (state) {
|
|
@@ -2632,11 +2663,11 @@ var CAvatar = forwardRef(function (_a, ref) {
|
|
|
2632
2663
|
var _b;
|
|
2633
2664
|
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"]);
|
|
2634
2665
|
var _className = classNames('avatar', (_b = {},
|
|
2635
|
-
_b["bg-"
|
|
2636
|
-
_b["avatar-"
|
|
2637
|
-
_b["text-"
|
|
2666
|
+
_b["bg-".concat(color)] = color,
|
|
2667
|
+
_b["avatar-".concat(size)] = size,
|
|
2668
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2638
2669
|
_b), shape, className);
|
|
2639
|
-
var statusClassName = status && classNames('avatar-status', "bg-"
|
|
2670
|
+
var statusClassName = status && classNames('avatar-status', "bg-".concat(status));
|
|
2640
2671
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }),
|
|
2641
2672
|
src ? React__default.createElement("img", { src: src, className: "avatar-img" }) : children,
|
|
2642
2673
|
status && React__default.createElement("span", { className: statusClassName })));
|
|
@@ -2657,14 +2688,14 @@ var CBadge = forwardRef(function (_a, ref) {
|
|
|
2657
2688
|
var _b;
|
|
2658
2689
|
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"]);
|
|
2659
2690
|
var _className = classNames('badge', (_b = {},
|
|
2660
|
-
_b["bg-"
|
|
2691
|
+
_b["bg-".concat(color)] = color,
|
|
2661
2692
|
_b['position-absolute translate-middle'] = position,
|
|
2662
2693
|
_b['top-0'] = position === null || position === void 0 ? void 0 : position.includes('top'),
|
|
2663
2694
|
_b['top-100'] = position === null || position === void 0 ? void 0 : position.includes('bottom'),
|
|
2664
2695
|
_b['start-100'] = position === null || position === void 0 ? void 0 : position.includes('end'),
|
|
2665
2696
|
_b['start-0'] = position === null || position === void 0 ? void 0 : position.includes('start'),
|
|
2666
|
-
_b["badge-"
|
|
2667
|
-
_b["text-"
|
|
2697
|
+
_b["badge-".concat(size)] = size,
|
|
2698
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2668
2699
|
_b), shape, className);
|
|
2669
2700
|
return (React__default.createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2670
2701
|
});
|
|
@@ -2727,7 +2758,7 @@ CBreadcrumbItem.displayName = 'CBreadcrumbItem';
|
|
|
2727
2758
|
var CButton = forwardRef(function (_a, ref) {
|
|
2728
2759
|
var _b;
|
|
2729
2760
|
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"]);
|
|
2730
|
-
var _className = classNames('btn', variant ? "btn-"
|
|
2761
|
+
var _className = classNames('btn', variant ? "btn-".concat(variant, "-").concat(color) : "btn-".concat(color), (_b = {}, _b["btn-".concat(size)] = size, _b), shape, className);
|
|
2731
2762
|
return (React__default.createElement(CLink, __assign({ component: rest.href ? 'a' : component, type: type, className: _className }, rest, { ref: ref }), children));
|
|
2732
2763
|
});
|
|
2733
2764
|
CButton.propTypes = {
|
|
@@ -2745,7 +2776,7 @@ CButton.displayName = 'CButton';
|
|
|
2745
2776
|
var CButtonGroup = forwardRef(function (_a, ref) {
|
|
2746
2777
|
var _b;
|
|
2747
2778
|
var children = _a.children, className = _a.className, size = _a.size, vertical = _a.vertical, rest = __rest(_a, ["children", "className", "size", "vertical"]);
|
|
2748
|
-
var _className = classNames(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-"
|
|
2779
|
+
var _className = classNames(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-".concat(size)] = size, _b), className);
|
|
2749
2780
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2750
2781
|
});
|
|
2751
2782
|
CButtonGroup.propTypes = {
|
|
@@ -2771,7 +2802,7 @@ var CCallout = forwardRef(function (_a, ref) {
|
|
|
2771
2802
|
var _b;
|
|
2772
2803
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
2773
2804
|
var _className = classNames('callout', (_b = {},
|
|
2774
|
-
_b["callout-"
|
|
2805
|
+
_b["callout-".concat(color)] = color,
|
|
2775
2806
|
_b), className);
|
|
2776
2807
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2777
2808
|
});
|
|
@@ -2786,8 +2817,8 @@ var CCard = forwardRef(function (_a, ref) {
|
|
|
2786
2817
|
var _b;
|
|
2787
2818
|
var children = _a.children, className = _a.className, color = _a.color, textColor = _a.textColor, rest = __rest(_a, ["children", "className", "color", "textColor"]);
|
|
2788
2819
|
var _className = classNames('card', (_b = {},
|
|
2789
|
-
_b["bg-"
|
|
2790
|
-
_b["text-"
|
|
2820
|
+
_b["bg-".concat(color)] = color,
|
|
2821
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2791
2822
|
_b), className);
|
|
2792
2823
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2793
2824
|
});
|
|
@@ -2846,7 +2877,7 @@ CCardHeader.displayName = 'CCardHeader';
|
|
|
2846
2877
|
|
|
2847
2878
|
var CCardImage = forwardRef(function (_a, ref) {
|
|
2848
2879
|
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"]);
|
|
2849
|
-
var _className = classNames(orientation ? "card-img-"
|
|
2880
|
+
var _className = classNames(orientation ? "card-img-".concat(orientation) : 'card-img', className);
|
|
2850
2881
|
return (React__default.createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2851
2882
|
});
|
|
2852
2883
|
CCardImage.propTypes = {
|
|
@@ -3012,7 +3043,7 @@ var CCarousel = forwardRef(function (_a, ref) {
|
|
|
3012
3043
|
setCustomInterval: setCustomInterval,
|
|
3013
3044
|
} },
|
|
3014
3045
|
indicators && (React__default.createElement("ol", { className: "carousel-indicators" }, Array.from({ length: itemsNumber }, function (_, i) { return i; }).map(function (index) {
|
|
3015
|
-
return (React__default.createElement("li", { key: "indicator"
|
|
3046
|
+
return (React__default.createElement("li", { key: "indicator".concat(index), onClick: function () {
|
|
3016
3047
|
!animating && handleIndicatorClick(index);
|
|
3017
3048
|
}, className: active === index ? 'active' : '', "data-coreui-target": "" }));
|
|
3018
3049
|
}))),
|
|
@@ -3072,7 +3103,7 @@ var CCarouselItem = forwardRef(function (_a, ref) {
|
|
|
3072
3103
|
if (active) {
|
|
3073
3104
|
setCustomInterval(interval);
|
|
3074
3105
|
if (count !== 0)
|
|
3075
|
-
setOrderClassName("carousel-item-"
|
|
3106
|
+
setOrderClassName("carousel-item-".concat(direction));
|
|
3076
3107
|
}
|
|
3077
3108
|
if (prevActive.current && !active) {
|
|
3078
3109
|
setActiveClassName('active');
|
|
@@ -3084,7 +3115,7 @@ var CCarouselItem = forwardRef(function (_a, ref) {
|
|
|
3084
3115
|
// @ts-expect-error reflow is necessary to proper transition
|
|
3085
3116
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3086
3117
|
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
|
|
3087
|
-
setDirectionClassName("carousel-item-"
|
|
3118
|
+
setDirectionClassName("carousel-item-".concat(direction === 'next' ? 'start' : 'end'));
|
|
3088
3119
|
}
|
|
3089
3120
|
}, 0);
|
|
3090
3121
|
}
|
|
@@ -3373,29 +3404,32 @@ function getBasePlacement(placement) {
|
|
|
3373
3404
|
return placement.split('-')[0];
|
|
3374
3405
|
}
|
|
3375
3406
|
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3407
|
+
var max = Math.max;
|
|
3408
|
+
var min = Math.min;
|
|
3409
|
+
var round = Math.round;
|
|
3410
|
+
|
|
3411
|
+
function getBoundingClientRect(element, includeScale) {
|
|
3412
|
+
if (includeScale === void 0) {
|
|
3413
|
+
includeScale = false;
|
|
3414
|
+
}
|
|
3379
3415
|
|
|
3380
3416
|
var rect = element.getBoundingClientRect();
|
|
3381
3417
|
var scaleX = 1;
|
|
3382
|
-
var scaleY = 1;
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
// }
|
|
3398
|
-
// }
|
|
3418
|
+
var scaleY = 1;
|
|
3419
|
+
|
|
3420
|
+
if (isHTMLElement(element) && includeScale) {
|
|
3421
|
+
var offsetHeight = element.offsetHeight;
|
|
3422
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
3423
|
+
// Fallback to 1 in case both values are `0`
|
|
3424
|
+
|
|
3425
|
+
if (offsetWidth > 0) {
|
|
3426
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
3427
|
+
}
|
|
3428
|
+
|
|
3429
|
+
if (offsetHeight > 0) {
|
|
3430
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
3431
|
+
}
|
|
3432
|
+
}
|
|
3399
3433
|
|
|
3400
3434
|
return {
|
|
3401
3435
|
width: rect.width / scaleX,
|
|
@@ -3550,13 +3584,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
3550
3584
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
3551
3585
|
}
|
|
3552
3586
|
|
|
3553
|
-
var max = Math.max;
|
|
3554
|
-
var min = Math.min;
|
|
3555
|
-
var round = Math.round;
|
|
3556
|
-
|
|
3557
3587
|
function within(min$1, value, max$1) {
|
|
3558
3588
|
return max(min$1, min(value, max$1));
|
|
3559
3589
|
}
|
|
3590
|
+
function withinMaxClamp(min, value, max) {
|
|
3591
|
+
var v = within(min, value, max);
|
|
3592
|
+
return v > max ? max : v;
|
|
3593
|
+
}
|
|
3560
3594
|
|
|
3561
3595
|
function getFreshSideObject() {
|
|
3562
3596
|
return {
|
|
@@ -3688,8 +3722,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
3688
3722
|
var win = window;
|
|
3689
3723
|
var dpr = win.devicePixelRatio || 1;
|
|
3690
3724
|
return {
|
|
3691
|
-
x: round(
|
|
3692
|
-
y: round(
|
|
3725
|
+
x: round(x * dpr) / dpr || 0,
|
|
3726
|
+
y: round(y * dpr) / dpr || 0
|
|
3693
3727
|
};
|
|
3694
3728
|
}
|
|
3695
3729
|
|
|
@@ -3704,7 +3738,8 @@ function mapToStyles(_ref2) {
|
|
|
3704
3738
|
position = _ref2.position,
|
|
3705
3739
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
3706
3740
|
adaptive = _ref2.adaptive,
|
|
3707
|
-
roundOffsets = _ref2.roundOffsets
|
|
3741
|
+
roundOffsets = _ref2.roundOffsets,
|
|
3742
|
+
isFixed = _ref2.isFixed;
|
|
3708
3743
|
|
|
3709
3744
|
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
|
|
3710
3745
|
_ref3$x = _ref3.x,
|
|
@@ -3736,16 +3771,18 @@ function mapToStyles(_ref2) {
|
|
|
3736
3771
|
offsetParent = offsetParent;
|
|
3737
3772
|
|
|
3738
3773
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
3739
|
-
sideY = bottom;
|
|
3740
|
-
|
|
3741
|
-
|
|
3774
|
+
sideY = bottom;
|
|
3775
|
+
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
3776
|
+
offsetParent[heightProp];
|
|
3777
|
+
y -= offsetY - popperRect.height;
|
|
3742
3778
|
y *= gpuAcceleration ? 1 : -1;
|
|
3743
3779
|
}
|
|
3744
3780
|
|
|
3745
3781
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
3746
|
-
sideX = right;
|
|
3747
|
-
|
|
3748
|
-
|
|
3782
|
+
sideX = right;
|
|
3783
|
+
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
3784
|
+
offsetParent[widthProp];
|
|
3785
|
+
x -= offsetX - popperRect.width;
|
|
3749
3786
|
x *= gpuAcceleration ? 1 : -1;
|
|
3750
3787
|
}
|
|
3751
3788
|
}
|
|
@@ -3788,7 +3825,8 @@ function computeStyles(_ref4) {
|
|
|
3788
3825
|
variation: getVariation(state.placement),
|
|
3789
3826
|
popper: state.elements.popper,
|
|
3790
3827
|
popperRect: state.rects.popper,
|
|
3791
|
-
gpuAcceleration: gpuAcceleration
|
|
3828
|
+
gpuAcceleration: gpuAcceleration,
|
|
3829
|
+
isFixed: state.options.strategy === 'fixed'
|
|
3792
3830
|
};
|
|
3793
3831
|
|
|
3794
3832
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -4046,7 +4084,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
4046
4084
|
}
|
|
4047
4085
|
|
|
4048
4086
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
4049
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
4087
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
4050
4088
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
4051
4089
|
// clipping (or hiding) overflowing elements with a position different from
|
|
4052
4090
|
// `initial`
|
|
@@ -4063,7 +4101,7 @@ function getClippingParents(element) {
|
|
|
4063
4101
|
|
|
4064
4102
|
|
|
4065
4103
|
return clippingParents.filter(function (clippingParent) {
|
|
4066
|
-
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
|
4104
|
+
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle$1(clippingParent).position !== 'static' : true);
|
|
4067
4105
|
});
|
|
4068
4106
|
} // Gets the maximum area that the element is visible in due to any number of
|
|
4069
4107
|
// clipping parents
|
|
@@ -4563,6 +4601,14 @@ function preventOverflow(_ref) {
|
|
|
4563
4601
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
4564
4602
|
placement: state.placement
|
|
4565
4603
|
})) : tetherOffset;
|
|
4604
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
4605
|
+
mainAxis: tetherOffsetValue,
|
|
4606
|
+
altAxis: tetherOffsetValue
|
|
4607
|
+
} : Object.assign({
|
|
4608
|
+
mainAxis: 0,
|
|
4609
|
+
altAxis: 0
|
|
4610
|
+
}, tetherOffsetValue);
|
|
4611
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
4566
4612
|
var data = {
|
|
4567
4613
|
x: 0,
|
|
4568
4614
|
y: 0
|
|
@@ -4572,13 +4618,15 @@ function preventOverflow(_ref) {
|
|
|
4572
4618
|
return;
|
|
4573
4619
|
}
|
|
4574
4620
|
|
|
4575
|
-
if (checkMainAxis
|
|
4621
|
+
if (checkMainAxis) {
|
|
4622
|
+
var _offsetModifierState$;
|
|
4623
|
+
|
|
4576
4624
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
4577
4625
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
4578
4626
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
4579
4627
|
var offset = popperOffsets[mainAxis];
|
|
4580
|
-
var min$1 =
|
|
4581
|
-
var max$1 =
|
|
4628
|
+
var min$1 = offset + overflow[mainSide];
|
|
4629
|
+
var max$1 = offset - overflow[altSide];
|
|
4582
4630
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
4583
4631
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
4584
4632
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -4598,36 +4646,45 @@ function preventOverflow(_ref) {
|
|
|
4598
4646
|
// width or height)
|
|
4599
4647
|
|
|
4600
4648
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
4601
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
4602
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
4649
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
4650
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
4603
4651
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
4604
4652
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
4605
|
-
var offsetModifierValue =
|
|
4606
|
-
var tetherMin =
|
|
4607
|
-
var tetherMax =
|
|
4653
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
4654
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
4655
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
4656
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
4657
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
4658
|
+
data[mainAxis] = preventedOffset - offset;
|
|
4659
|
+
}
|
|
4608
4660
|
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
4612
|
-
data[mainAxis] = preventedOffset - offset;
|
|
4613
|
-
}
|
|
4661
|
+
if (checkAltAxis) {
|
|
4662
|
+
var _offsetModifierState$2;
|
|
4614
4663
|
|
|
4615
|
-
|
|
4616
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
4664
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
4617
4665
|
|
|
4618
|
-
|
|
4666
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
4619
4667
|
|
|
4620
|
-
|
|
4668
|
+
var _offset = popperOffsets[altAxis];
|
|
4621
4669
|
|
|
4622
|
-
|
|
4670
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
4623
4671
|
|
|
4624
|
-
|
|
4672
|
+
var _min = _offset + overflow[_mainSide];
|
|
4625
4673
|
|
|
4626
|
-
|
|
4674
|
+
var _max = _offset - overflow[_altSide];
|
|
4627
4675
|
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4676
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
4677
|
+
|
|
4678
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
4679
|
+
|
|
4680
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
4681
|
+
|
|
4682
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
4683
|
+
|
|
4684
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
4685
|
+
|
|
4686
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
4687
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
4631
4688
|
}
|
|
4632
4689
|
|
|
4633
4690
|
state.modifiersData[name] = data;
|
|
@@ -4659,8 +4716,8 @@ function getNodeScroll(node) {
|
|
|
4659
4716
|
|
|
4660
4717
|
function isElementScaled(element) {
|
|
4661
4718
|
var rect = element.getBoundingClientRect();
|
|
4662
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
4663
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
4719
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
4720
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
4664
4721
|
return scaleX !== 1 || scaleY !== 1;
|
|
4665
4722
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
4666
4723
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -4672,9 +4729,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
4672
4729
|
}
|
|
4673
4730
|
|
|
4674
4731
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
4675
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
4732
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
4676
4733
|
var documentElement = getDocumentElement(offsetParent);
|
|
4677
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
4734
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
4678
4735
|
var scroll = {
|
|
4679
4736
|
scrollLeft: 0,
|
|
4680
4737
|
scrollTop: 0
|
|
@@ -4691,7 +4748,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
4691
4748
|
}
|
|
4692
4749
|
|
|
4693
4750
|
if (isHTMLElement(offsetParent)) {
|
|
4694
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
4751
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
4695
4752
|
offsets.x += offsetParent.clientLeft;
|
|
4696
4753
|
offsets.y += offsetParent.clientTop;
|
|
4697
4754
|
} else if (documentElement) {
|
|
@@ -5669,11 +5726,11 @@ var CDropdownMenu = function (_a) {
|
|
|
5669
5726
|
var classNames = [];
|
|
5670
5727
|
if (typeof alignment === 'object') {
|
|
5671
5728
|
Object.keys(alignment).map(function (key) {
|
|
5672
|
-
classNames.push("dropdown-menu"
|
|
5729
|
+
classNames.push("dropdown-menu".concat(key === 'xs' ? '' : "-".concat(key), "-").concat(alignment[key]));
|
|
5673
5730
|
});
|
|
5674
5731
|
}
|
|
5675
5732
|
if (typeof alignment === 'string') {
|
|
5676
|
-
classNames.push("dropdown-menu-"
|
|
5733
|
+
classNames.push("dropdown-menu-".concat(alignment));
|
|
5677
5734
|
}
|
|
5678
5735
|
return classNames;
|
|
5679
5736
|
};
|
|
@@ -5742,7 +5799,7 @@ CDropdownToggle.propTypes = {
|
|
|
5742
5799
|
};
|
|
5743
5800
|
CDropdownToggle.displayName = 'CDropdownToggle';
|
|
5744
5801
|
|
|
5745
|
-
var BREAKPOINTS$
|
|
5802
|
+
var BREAKPOINTS$3 = [
|
|
5746
5803
|
'xxl',
|
|
5747
5804
|
'xl',
|
|
5748
5805
|
'lg',
|
|
@@ -5752,33 +5809,33 @@ var BREAKPOINTS$2 = [
|
|
|
5752
5809
|
];
|
|
5753
5810
|
var CCol = forwardRef(function (_a, ref) {
|
|
5754
5811
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
5755
|
-
var
|
|
5756
|
-
BREAKPOINTS$
|
|
5812
|
+
var repsonsiveClassNames = [];
|
|
5813
|
+
BREAKPOINTS$3.forEach(function (bp) {
|
|
5757
5814
|
var breakpoint = rest[bp];
|
|
5758
5815
|
delete rest[bp];
|
|
5759
|
-
var infix = bp === 'xs' ? '' : "-"
|
|
5816
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
5760
5817
|
if (typeof breakpoint === 'number' || typeof breakpoint === 'string') {
|
|
5761
|
-
|
|
5818
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint));
|
|
5762
5819
|
}
|
|
5763
5820
|
if (typeof breakpoint === 'boolean') {
|
|
5764
|
-
|
|
5821
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
5765
5822
|
}
|
|
5766
5823
|
if (breakpoint && typeof breakpoint === 'object') {
|
|
5767
5824
|
if (typeof breakpoint.span === 'number' || typeof breakpoint.span === 'string') {
|
|
5768
|
-
|
|
5825
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint.span));
|
|
5769
5826
|
}
|
|
5770
5827
|
if (typeof breakpoint.span === 'boolean') {
|
|
5771
|
-
|
|
5828
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
5772
5829
|
}
|
|
5773
5830
|
if (typeof breakpoint.order === 'number' || typeof breakpoint.order === 'string') {
|
|
5774
|
-
|
|
5831
|
+
repsonsiveClassNames.push("order".concat(infix, "-").concat(breakpoint.order));
|
|
5775
5832
|
}
|
|
5776
5833
|
if (typeof breakpoint.offset === 'number') {
|
|
5777
|
-
|
|
5834
|
+
repsonsiveClassNames.push("offset".concat(infix, "-").concat(breakpoint.offset));
|
|
5778
5835
|
}
|
|
5779
5836
|
}
|
|
5780
5837
|
});
|
|
5781
|
-
var _className = classNames(
|
|
5838
|
+
var _className = classNames(repsonsiveClassNames.length ? repsonsiveClassNames : 'col', className);
|
|
5782
5839
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5783
5840
|
});
|
|
5784
5841
|
var span = PropTypes.oneOfType([
|
|
@@ -5807,7 +5864,7 @@ CCol.propTypes = {
|
|
|
5807
5864
|
};
|
|
5808
5865
|
CCol.displayName = 'CCol';
|
|
5809
5866
|
|
|
5810
|
-
var BREAKPOINTS$
|
|
5867
|
+
var BREAKPOINTS$2 = [
|
|
5811
5868
|
'xxl',
|
|
5812
5869
|
'xl',
|
|
5813
5870
|
'lg',
|
|
@@ -5817,13 +5874,13 @@ var BREAKPOINTS$1 = [
|
|
|
5817
5874
|
];
|
|
5818
5875
|
var CContainer = forwardRef(function (_a, ref) {
|
|
5819
5876
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
5820
|
-
var
|
|
5821
|
-
BREAKPOINTS$
|
|
5877
|
+
var repsonsiveClassNames = [];
|
|
5878
|
+
BREAKPOINTS$2.forEach(function (bp) {
|
|
5822
5879
|
var breakpoint = rest[bp];
|
|
5823
5880
|
delete rest[bp];
|
|
5824
|
-
breakpoint &&
|
|
5881
|
+
breakpoint && repsonsiveClassNames.push("container-".concat(bp));
|
|
5825
5882
|
});
|
|
5826
|
-
var _className = classNames(
|
|
5883
|
+
var _className = classNames(repsonsiveClassNames.length ? repsonsiveClassNames : 'container', className);
|
|
5827
5884
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5828
5885
|
});
|
|
5829
5886
|
CContainer.propTypes = {
|
|
@@ -5838,7 +5895,7 @@ CContainer.propTypes = {
|
|
|
5838
5895
|
};
|
|
5839
5896
|
CContainer.displayName = 'CContainer';
|
|
5840
5897
|
|
|
5841
|
-
var BREAKPOINTS = [
|
|
5898
|
+
var BREAKPOINTS$1 = [
|
|
5842
5899
|
'xxl',
|
|
5843
5900
|
'xl',
|
|
5844
5901
|
'lg',
|
|
@@ -5848,27 +5905,27 @@ var BREAKPOINTS = [
|
|
|
5848
5905
|
];
|
|
5849
5906
|
var CRow = forwardRef(function (_a, ref) {
|
|
5850
5907
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
5851
|
-
var
|
|
5852
|
-
BREAKPOINTS.forEach(function (bp) {
|
|
5908
|
+
var repsonsiveClassNames = [];
|
|
5909
|
+
BREAKPOINTS$1.forEach(function (bp) {
|
|
5853
5910
|
var breakpoint = rest[bp];
|
|
5854
5911
|
delete rest[bp];
|
|
5855
|
-
var infix = bp === 'xs' ? '' : "-"
|
|
5912
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
5856
5913
|
if (typeof breakpoint === 'object') {
|
|
5857
5914
|
if (breakpoint.cols) {
|
|
5858
|
-
|
|
5915
|
+
repsonsiveClassNames.push("row-cols".concat(infix, "-").concat(breakpoint.cols));
|
|
5859
5916
|
}
|
|
5860
5917
|
if (typeof breakpoint.gutter === 'number') {
|
|
5861
|
-
|
|
5918
|
+
repsonsiveClassNames.push("g".concat(infix, "-").concat(breakpoint.gutter));
|
|
5862
5919
|
}
|
|
5863
5920
|
if (typeof breakpoint.gutterX === 'number') {
|
|
5864
|
-
|
|
5921
|
+
repsonsiveClassNames.push("gx".concat(infix, "-").concat(breakpoint.gutterX));
|
|
5865
5922
|
}
|
|
5866
5923
|
if (typeof breakpoint.gutterY === 'number') {
|
|
5867
|
-
|
|
5924
|
+
repsonsiveClassNames.push("gy".concat(infix, "-").concat(breakpoint.gutterY));
|
|
5868
5925
|
}
|
|
5869
5926
|
}
|
|
5870
5927
|
});
|
|
5871
|
-
var _className = classNames('row',
|
|
5928
|
+
var _className = classNames('row', repsonsiveClassNames, className);
|
|
5872
5929
|
return (React__default.createElement("div", { className: _className, ref: ref }, children));
|
|
5873
5930
|
});
|
|
5874
5931
|
var bp = PropTypes.shape({
|
|
@@ -5892,7 +5949,7 @@ CRow.displayName = 'CRow';
|
|
|
5892
5949
|
var CFooter = forwardRef(function (_a, ref) {
|
|
5893
5950
|
var _b;
|
|
5894
5951
|
var children = _a.children, className = _a.className, position = _a.position, rest = __rest(_a, ["children", "className", "position"]);
|
|
5895
|
-
var _className = classNames('footer', (_b = {}, _b["footer-"
|
|
5952
|
+
var _className = classNames('footer', (_b = {}, _b["footer-".concat(position)] = position, _b), className);
|
|
5896
5953
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5897
5954
|
});
|
|
5898
5955
|
CFooter.propTypes = {
|
|
@@ -5928,7 +5985,14 @@ CFormLabel.displayName = 'CFormLabel';
|
|
|
5928
5985
|
|
|
5929
5986
|
var CFormCheck = forwardRef(function (_a, ref) {
|
|
5930
5987
|
var _b;
|
|
5931
|
-
var className = _a.className, button = _a.button, hitArea = _a.hitArea, id = _a.id, inline = _a.inline, invalid = _a.invalid, label = _a.label, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest(_a, ["className", "button", "hitArea", "id", "inline", "invalid", "label", "type", "valid"]);
|
|
5988
|
+
var className = _a.className, button = _a.button, hitArea = _a.hitArea, id = _a.id, indeterminate = _a.indeterminate, inline = _a.inline, invalid = _a.invalid, label = _a.label, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest(_a, ["className", "button", "hitArea", "id", "indeterminate", "inline", "invalid", "label", "type", "valid"]);
|
|
5989
|
+
var inputRef = useRef(null);
|
|
5990
|
+
var forkedRef = useForkedRef(ref, inputRef);
|
|
5991
|
+
useEffect(function () {
|
|
5992
|
+
if (inputRef.current && indeterminate) {
|
|
5993
|
+
inputRef.current.indeterminate = indeterminate;
|
|
5994
|
+
}
|
|
5995
|
+
}, [indeterminate]);
|
|
5932
5996
|
var _className = classNames('form-check', {
|
|
5933
5997
|
'form-check-inline': inline,
|
|
5934
5998
|
'is-invalid': invalid,
|
|
@@ -5940,12 +6004,12 @@ var CFormCheck = forwardRef(function (_a, ref) {
|
|
|
5940
6004
|
'me-2': hitArea,
|
|
5941
6005
|
});
|
|
5942
6006
|
var labelClassName = classNames(button
|
|
5943
|
-
? classNames('btn', button.variant ? "btn-"
|
|
5944
|
-
_b["btn-"
|
|
5945
|
-
_b), ""
|
|
6007
|
+
? classNames('btn', button.variant ? "btn-".concat(button.variant, "-").concat(button.color) : "btn-".concat(button.color), (_b = {},
|
|
6008
|
+
_b["btn-".concat(button.size)] = button.size,
|
|
6009
|
+
_b), "".concat(button.shape))
|
|
5946
6010
|
: 'form-check-label');
|
|
5947
6011
|
var formControl = function () {
|
|
5948
|
-
return React__default.createElement("input", __assign({ type: type, className: inputClassName, id: id }, rest, { ref:
|
|
6012
|
+
return React__default.createElement("input", __assign({ type: type, className: inputClassName, id: id }, rest, { ref: forkedRef }));
|
|
5949
6013
|
};
|
|
5950
6014
|
var formLabel = function () {
|
|
5951
6015
|
return (React__default.createElement(CFormLabel, __assign({ customClassName: labelClassName }, (id && { htmlFor: id })), label));
|
|
@@ -5963,6 +6027,7 @@ CFormCheck.propTypes = {
|
|
|
5963
6027
|
className: PropTypes.string,
|
|
5964
6028
|
hitArea: PropTypes.oneOf(['full']),
|
|
5965
6029
|
id: PropTypes.string,
|
|
6030
|
+
indeterminate: PropTypes.bool,
|
|
5966
6031
|
inline: PropTypes.bool,
|
|
5967
6032
|
invalid: PropTypes.bool,
|
|
5968
6033
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
@@ -5975,8 +6040,8 @@ var CFormFeedback = forwardRef(function (_a, ref) {
|
|
|
5975
6040
|
var _b;
|
|
5976
6041
|
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"]);
|
|
5977
6042
|
var _className = classNames((_b = {},
|
|
5978
|
-
_b["invalid-"
|
|
5979
|
-
_b["valid-"
|
|
6043
|
+
_b["invalid-".concat(tooltip ? 'tooltip' : 'feedback')] = invalid,
|
|
6044
|
+
_b["valid-".concat(tooltip ? 'tooltip' : 'feedback')] = valid,
|
|
5980
6045
|
_b), className);
|
|
5981
6046
|
return (React__default.createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5982
6047
|
});
|
|
@@ -6005,7 +6070,7 @@ var CFormInput = forwardRef(function (_a, ref) {
|
|
|
6005
6070
|
var _b;
|
|
6006
6071
|
var children = _a.children, className = _a.className, invalid = _a.invalid, plainText = _a.plainText, size = _a.size, _c = _a.type, type = _c === void 0 ? 'text' : _c, valid = _a.valid, rest = __rest(_a, ["children", "className", "invalid", "plainText", "size", "type", "valid"]);
|
|
6007
6072
|
var _className = classNames(plainText ? 'form-control-plaintext' : 'form-control', (_b = {},
|
|
6008
|
-
_b["form-control-"
|
|
6073
|
+
_b["form-control-".concat(size)] = size,
|
|
6009
6074
|
_b['form-control-color'] = type === 'color',
|
|
6010
6075
|
_b['is-invalid'] = invalid,
|
|
6011
6076
|
_b['is-valid'] = valid,
|
|
@@ -6035,19 +6100,25 @@ CFormRange.displayName = 'CFormRange';
|
|
|
6035
6100
|
|
|
6036
6101
|
var CFormSelect = forwardRef(function (_a, ref) {
|
|
6037
6102
|
var _b;
|
|
6038
|
-
var children = _a.children, className = _a.className, htmlSize = _a.htmlSize, invalid = _a.invalid, size = _a.size, valid = _a.valid, rest = __rest(_a, ["children", "className", "htmlSize", "invalid", "size", "valid"]);
|
|
6103
|
+
var children = _a.children, className = _a.className, htmlSize = _a.htmlSize, invalid = _a.invalid, options = _a.options, size = _a.size, valid = _a.valid, rest = __rest(_a, ["children", "className", "htmlSize", "invalid", "options", "size", "valid"]);
|
|
6039
6104
|
var _className = classNames('form-select', (_b = {},
|
|
6040
|
-
_b["form-select-"
|
|
6105
|
+
_b["form-select-".concat(size)] = size,
|
|
6041
6106
|
_b['is-invalid'] = invalid,
|
|
6042
6107
|
_b['is-valid'] = valid,
|
|
6043
6108
|
_b), className);
|
|
6044
|
-
return (React__default.createElement("select", __assign({ className: _className, size: htmlSize }, rest, { ref: ref }),
|
|
6109
|
+
return (React__default.createElement("select", __assign({ className: _className, size: htmlSize }, rest, { ref: ref }), options
|
|
6110
|
+
? options.map(function (option, index) {
|
|
6111
|
+
return (React__default.createElement("option", __assign({}, (typeof option === 'object' &&
|
|
6112
|
+
option.disabled && { disabled: option.disabled }), (typeof option === 'object' && option.value && { value: option.value }), { key: index }), typeof option === 'string' ? option : option.label));
|
|
6113
|
+
})
|
|
6114
|
+
: children));
|
|
6045
6115
|
});
|
|
6046
6116
|
CFormSelect.propTypes = {
|
|
6047
6117
|
children: PropTypes.node,
|
|
6048
6118
|
className: PropTypes.string,
|
|
6049
6119
|
htmlSize: PropTypes.number,
|
|
6050
6120
|
invalid: PropTypes.bool,
|
|
6121
|
+
options: PropTypes.array,
|
|
6051
6122
|
size: PropTypes.oneOf(['sm', 'lg']),
|
|
6052
6123
|
valid: PropTypes.bool,
|
|
6053
6124
|
};
|
|
@@ -6057,7 +6128,7 @@ var CFormSwitch = forwardRef(function (_a, ref) {
|
|
|
6057
6128
|
var _b;
|
|
6058
6129
|
var className = _a.className, id = _a.id, invalid = _a.invalid, label = _a.label, size = _a.size, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest(_a, ["className", "id", "invalid", "label", "size", "type", "valid"]);
|
|
6059
6130
|
var _className = classNames('form-check form-switch', (_b = {},
|
|
6060
|
-
_b["form-switch-"
|
|
6131
|
+
_b["form-switch-".concat(size)] = size,
|
|
6061
6132
|
_b['is-invalid'] = invalid,
|
|
6062
6133
|
_b['is-valid'] = valid,
|
|
6063
6134
|
_b), className);
|
|
@@ -6114,7 +6185,7 @@ var CInputGroup = forwardRef(function (_a, ref) {
|
|
|
6114
6185
|
var _b;
|
|
6115
6186
|
var children = _a.children, className = _a.className, size = _a.size, rest = __rest(_a, ["children", "className", "size"]);
|
|
6116
6187
|
var _className = classNames('input-group', (_b = {},
|
|
6117
|
-
_b["input-group-"
|
|
6188
|
+
_b["input-group-".concat(size)] = size,
|
|
6118
6189
|
_b), className);
|
|
6119
6190
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
6120
6191
|
});
|
|
@@ -6140,10 +6211,10 @@ CInputGroupText.displayName = 'CInputGroupText';
|
|
|
6140
6211
|
var CHeader = forwardRef(function (_a, ref) {
|
|
6141
6212
|
var _b;
|
|
6142
6213
|
var children = _a.children, className = _a.className, container = _a.container, position = _a.position, rest = __rest(_a, ["children", "className", "container", "position"]);
|
|
6143
|
-
var _className = classNames('header', (_b = {}, _b["header-"
|
|
6214
|
+
var _className = classNames('header', (_b = {}, _b["header-".concat(position)] = position, _b), className);
|
|
6144
6215
|
var content;
|
|
6145
6216
|
if (container) {
|
|
6146
|
-
content = (React__default.createElement("div", { className: "container"
|
|
6217
|
+
content = (React__default.createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
6147
6218
|
}
|
|
6148
6219
|
else {
|
|
6149
6220
|
content = children;
|
|
@@ -6228,7 +6299,7 @@ var CImage = forwardRef(function (_a, ref) {
|
|
|
6228
6299
|
var _b;
|
|
6229
6300
|
var align = _a.align, className = _a.className, fluid = _a.fluid, rounded = _a.rounded, thumbnail = _a.thumbnail, rest = __rest(_a, ["align", "className", "fluid", "rounded", "thumbnail"]);
|
|
6230
6301
|
var _className = classNames((_b = {},
|
|
6231
|
-
_b["float-"
|
|
6302
|
+
_b["float-".concat(align)] = align && (align === 'start' || align === 'end'),
|
|
6232
6303
|
_b['d-block mx-auto'] = align && align === 'center',
|
|
6233
6304
|
_b['img-fluid'] = fluid,
|
|
6234
6305
|
_b.rounded = rounded,
|
|
@@ -6251,7 +6322,7 @@ var CListGroup = forwardRef(function (_a, ref) {
|
|
|
6251
6322
|
var _className = classNames('list-group', (_b = {
|
|
6252
6323
|
'list-group-flush': flush
|
|
6253
6324
|
},
|
|
6254
|
-
_b["list-group-"
|
|
6325
|
+
_b["list-group-".concat(layout)] = layout,
|
|
6255
6326
|
_b), className);
|
|
6256
6327
|
return (React__default.createElement(Component, { className: _className, ref: ref }, children));
|
|
6257
6328
|
});
|
|
@@ -6275,7 +6346,7 @@ var CListGroupItem = forwardRef(function (_a, ref) {
|
|
|
6275
6346
|
var _b;
|
|
6276
6347
|
var children = _a.children, active = _a.active, className = _a.className, disabled = _a.disabled, color = _a.color, _c = _a.component, component = _c === void 0 ? 'li' : _c, rest = __rest(_a, ["children", "active", "className", "disabled", "color", "component"]);
|
|
6277
6348
|
var _className = classNames('list-group-item', (_b = {},
|
|
6278
|
-
_b["list-group-item-"
|
|
6349
|
+
_b["list-group-item-".concat(color)] = color,
|
|
6279
6350
|
_b['list-group-item-action'] = component === 'a' || component === 'button',
|
|
6280
6351
|
_b.active = active,
|
|
6281
6352
|
_b.disabled = disabled,
|
|
@@ -6318,9 +6389,9 @@ var CModalDialog = forwardRef(function (_a, ref) {
|
|
|
6318
6389
|
},
|
|
6319
6390
|
_b[typeof fullscreen === 'boolean'
|
|
6320
6391
|
? 'modal-fullscreen'
|
|
6321
|
-
: "modal-fullscreen-"
|
|
6392
|
+
: "modal-fullscreen-".concat(fullscreen, "-down")] = fullscreen,
|
|
6322
6393
|
_b['modal-dialog-scrollable'] = scrollable,
|
|
6323
|
-
_b["modal-"
|
|
6394
|
+
_b["modal-".concat(size)] = size,
|
|
6324
6395
|
_b), className);
|
|
6325
6396
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
6326
6397
|
});
|
|
@@ -6486,8 +6557,8 @@ var CNav = forwardRef(function (_a, ref) {
|
|
|
6486
6557
|
var _b;
|
|
6487
6558
|
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"]);
|
|
6488
6559
|
var _className = classNames('nav', (_b = {},
|
|
6489
|
-
_b["nav-"
|
|
6490
|
-
_b["nav-"
|
|
6560
|
+
_b["nav-".concat(layout)] = layout,
|
|
6561
|
+
_b["nav-".concat(variant)] = variant,
|
|
6491
6562
|
_b), className);
|
|
6492
6563
|
return (React__default.createElement(Component, __assign({ className: _className, role: "navigation" }, rest, { ref: ref }), children));
|
|
6493
6564
|
});
|
|
@@ -6523,7 +6594,7 @@ var CSidebarNav = forwardRef(function (_a, ref) {
|
|
|
6523
6594
|
return (React__default.createElement("ul", __assign({ className: classes, ref: ref }, rest),
|
|
6524
6595
|
React__default.createElement(CNavContext.Provider, { value: CNavContextValues }, React__default.Children.map(children, function (child, index) {
|
|
6525
6596
|
if (React__default.isValidElement(child)) {
|
|
6526
|
-
return React__default.cloneElement(child, { key: index, idx: ""
|
|
6597
|
+
return React__default.cloneElement(child, { key: index, idx: "".concat(index) });
|
|
6527
6598
|
}
|
|
6528
6599
|
return;
|
|
6529
6600
|
}))));
|
|
@@ -6583,7 +6654,7 @@ var CNavGroup = forwardRef(function (_a, ref) {
|
|
|
6583
6654
|
compact: compact,
|
|
6584
6655
|
}), style: __assign(__assign({}, style), transitionStyles[state]), ref: navItemsRef }, React__default.Children.map(children, function (child, index) {
|
|
6585
6656
|
if (React__default.isValidElement(child)) {
|
|
6586
|
-
return React__default.cloneElement(child, { key: index, idx: idx
|
|
6657
|
+
return React__default.cloneElement(child, { key: index, idx: "".concat(idx, ".").concat(index) });
|
|
6587
6658
|
}
|
|
6588
6659
|
return;
|
|
6589
6660
|
}))); })));
|
|
@@ -6647,13 +6718,13 @@ var CNavbar = forwardRef(function (_a, ref) {
|
|
|
6647
6718
|
var _b;
|
|
6648
6719
|
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"]);
|
|
6649
6720
|
var _className = classNames('navbar', (_b = {},
|
|
6650
|
-
_b["bg-"
|
|
6651
|
-
_b["navbar-"
|
|
6652
|
-
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-"
|
|
6721
|
+
_b["bg-".concat(color)] = color,
|
|
6722
|
+
_b["navbar-".concat(colorScheme)] = colorScheme,
|
|
6723
|
+
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-".concat(expand)] = expand,
|
|
6653
6724
|
_b), placement, className);
|
|
6654
6725
|
var content;
|
|
6655
6726
|
if (container) {
|
|
6656
|
-
content = (React__default.createElement("div", { className: "container"
|
|
6727
|
+
content = (React__default.createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
6657
6728
|
}
|
|
6658
6729
|
else {
|
|
6659
6730
|
content = children;
|
|
@@ -6736,8 +6807,8 @@ var CPagination = forwardRef(function (_a, ref) {
|
|
|
6736
6807
|
var _b;
|
|
6737
6808
|
var children = _a.children, align = _a.align, className = _a.className, size = _a.size, rest = __rest(_a, ["children", "align", "className", "size"]);
|
|
6738
6809
|
var _className = classNames('pagination', (_b = {},
|
|
6739
|
-
_b["justify-content-"
|
|
6740
|
-
_b["pagination-"
|
|
6810
|
+
_b["justify-content-".concat(align)] = align,
|
|
6811
|
+
_b["pagination-".concat(size)] = size,
|
|
6741
6812
|
_b), className);
|
|
6742
6813
|
return (React__default.createElement("nav", __assign({ ref: ref }, rest),
|
|
6743
6814
|
React__default.createElement("ul", { className: _className }, children)));
|
|
@@ -6766,6 +6837,45 @@ CPaginationItem.propTypes = {
|
|
|
6766
6837
|
};
|
|
6767
6838
|
CPaginationItem.displayName = 'CPaginationItem';
|
|
6768
6839
|
|
|
6840
|
+
var BREAKPOINTS = [
|
|
6841
|
+
'xxl',
|
|
6842
|
+
'xl',
|
|
6843
|
+
'lg',
|
|
6844
|
+
'md',
|
|
6845
|
+
'sm',
|
|
6846
|
+
'xs',
|
|
6847
|
+
];
|
|
6848
|
+
var CPlaceholder = forwardRef(function (_a, ref) {
|
|
6849
|
+
var _b;
|
|
6850
|
+
var children = _a.children, animation = _a.animation, className = _a.className, color = _a.color, _c = _a.component, Component = _c === void 0 ? 'span' : _c, size = _a.size, rest = __rest(_a, ["children", "animation", "className", "color", "component", "size"]);
|
|
6851
|
+
var repsonsiveClassNames = [];
|
|
6852
|
+
BREAKPOINTS.forEach(function (bp) {
|
|
6853
|
+
var breakpoint = rest[bp];
|
|
6854
|
+
delete rest[bp];
|
|
6855
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
6856
|
+
if (typeof breakpoint === 'number') {
|
|
6857
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint));
|
|
6858
|
+
}
|
|
6859
|
+
if (typeof breakpoint === 'boolean') {
|
|
6860
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
6861
|
+
}
|
|
6862
|
+
});
|
|
6863
|
+
var _className = classNames(animation ? "placeholder-".concat(animation) : 'placeholder', (_b = {},
|
|
6864
|
+
_b["bg-".concat(color)] = color,
|
|
6865
|
+
_b["placeholder-".concat(size)] = size,
|
|
6866
|
+
_b), repsonsiveClassNames, className);
|
|
6867
|
+
return (React__default.createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
6868
|
+
});
|
|
6869
|
+
CPlaceholder.propTypes = {
|
|
6870
|
+
animation: PropTypes.oneOf(['glow', 'wave']),
|
|
6871
|
+
children: PropTypes.node,
|
|
6872
|
+
className: PropTypes.string,
|
|
6873
|
+
color: colorPropType,
|
|
6874
|
+
component: PropTypes.elementType,
|
|
6875
|
+
size: PropTypes.oneOf(['xs', 'sm', 'lg']),
|
|
6876
|
+
};
|
|
6877
|
+
CPlaceholder.displayName = 'CPlaceholder';
|
|
6878
|
+
|
|
6769
6879
|
var CPopover = function (_a) {
|
|
6770
6880
|
var children = _a.children, content = _a.content, _b = _a.placement, placement = _b === void 0 ? 'top' : _b, _c = _a.offset, offset = _c === void 0 ? [0, 8] : _c, onHide = _a.onHide, onShow = _a.onShow, title = _a.title, _d = _a.trigger, trigger = _d === void 0 ? 'click' : _d, visible = _a.visible, rest = __rest(_a, ["children", "content", "placement", "offset", "onHide", "onShow", "title", "trigger", "visible"]);
|
|
6771
6881
|
var _e = useState(visible), _visible = _e[0], setVisible = _e[1];
|
|
@@ -6806,7 +6916,7 @@ var CPopover = function (_a) {
|
|
|
6806
6916
|
},
|
|
6807
6917
|
] }, function (_a) {
|
|
6808
6918
|
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
6809
|
-
return (React__default.createElement("div", __assign({ className: classNames("popover bs-popover-"
|
|
6919
|
+
return (React__default.createElement("div", __assign({ className: classNames("popover bs-popover-".concat(placement === 'left' ? 'start' : placement === 'right' ? 'end' : placement), transitionClass), ref: ref, role: "tooltip", style: style }, rest),
|
|
6810
6920
|
React__default.createElement("div", __assign({ className: "popover-arrow" }, arrowProps)),
|
|
6811
6921
|
React__default.createElement("div", { className: "popover-header" }, title),
|
|
6812
6922
|
React__default.createElement("div", { className: "popover-body" }, content)));
|
|
@@ -6815,12 +6925,12 @@ var CPopover = function (_a) {
|
|
|
6815
6925
|
};
|
|
6816
6926
|
CPopover.propTypes = {
|
|
6817
6927
|
children: PropTypes.any,
|
|
6818
|
-
content: PropTypes.node,
|
|
6928
|
+
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
6819
6929
|
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
6820
6930
|
offset: PropTypes.any,
|
|
6821
6931
|
onHide: PropTypes.func,
|
|
6822
6932
|
onShow: PropTypes.func,
|
|
6823
|
-
title: PropTypes.string,
|
|
6933
|
+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
6824
6934
|
trigger: triggerPropType,
|
|
6825
6935
|
visible: PropTypes.bool,
|
|
6826
6936
|
};
|
|
@@ -6830,11 +6940,11 @@ var CProgressBar = forwardRef(function (_a, ref) {
|
|
|
6830
6940
|
var _b;
|
|
6831
6941
|
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"]);
|
|
6832
6942
|
var _className = classNames('progress-bar', (_b = {},
|
|
6833
|
-
_b["bg-"
|
|
6834
|
-
_b["progress-bar-"
|
|
6943
|
+
_b["bg-".concat(color)] = color,
|
|
6944
|
+
_b["progress-bar-".concat(variant)] = variant,
|
|
6835
6945
|
_b['progress-bar-animated'] = animated,
|
|
6836
6946
|
_b), className);
|
|
6837
|
-
return (React__default.createElement("div", __assign({ className: _className, role: "progressbar", style: { width: value
|
|
6947
|
+
return (React__default.createElement("div", __assign({ className: _className, role: "progressbar", style: { width: "".concat(value, "%") }, "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": 100 }, rest, { ref: ref }), children));
|
|
6838
6948
|
});
|
|
6839
6949
|
CProgressBar.propTypes = {
|
|
6840
6950
|
animated: PropTypes.bool,
|
|
@@ -6852,7 +6962,7 @@ var CProgress = forwardRef(function (_a, ref) {
|
|
|
6852
6962
|
'progress-thin': thin,
|
|
6853
6963
|
'progress-white': white,
|
|
6854
6964
|
}, className);
|
|
6855
|
-
return (React__default.createElement("div", { className: _className, style: height ? { height: height
|
|
6965
|
+
return (React__default.createElement("div", { className: _className, style: height ? { height: "".concat(height, "px") } : {}, ref: ref }, value ? (React__default.createElement(CProgressBar, __assign({ value: value }, rest), children)) : (children)));
|
|
6856
6966
|
});
|
|
6857
6967
|
CProgress.propTypes = {
|
|
6858
6968
|
children: PropTypes.node,
|
|
@@ -6949,8 +7059,8 @@ var CSidebar = forwardRef(function (_a, ref) {
|
|
|
6949
7059
|
'sidebar-narrow': narrow,
|
|
6950
7060
|
'sidebar-overlaid': overlaid
|
|
6951
7061
|
},
|
|
6952
|
-
_b["sidebar-"
|
|
6953
|
-
_b["sidebar-"
|
|
7062
|
+
_b["sidebar-".concat(position)] = position,
|
|
7063
|
+
_b["sidebar-".concat(size)] = size,
|
|
6954
7064
|
_b['sidebar-narrow-unfoldable'] = unfoldable,
|
|
6955
7065
|
_b.show = _visible === true && mobile,
|
|
6956
7066
|
_b.hide = _visible === false && !mobile,
|
|
@@ -6999,7 +7109,7 @@ var COffcanvas = forwardRef(function (_a, ref) {
|
|
|
6999
7109
|
}
|
|
7000
7110
|
}, [_visible]);
|
|
7001
7111
|
var _className = classNames('offcanvas', (_b = {},
|
|
7002
|
-
_b["offcanvas-"
|
|
7112
|
+
_b["offcanvas-".concat(placement)] = placement,
|
|
7003
7113
|
_b.show = _visible,
|
|
7004
7114
|
_b), className);
|
|
7005
7115
|
var transitionStyles = {
|
|
@@ -7028,8 +7138,8 @@ var COffcanvas = forwardRef(function (_a, ref) {
|
|
|
7028
7138
|
}),
|
|
7029
7139
|
typeof window !== 'undefined' && portal
|
|
7030
7140
|
? backdrop &&
|
|
7031
|
-
createPortal(React__default.createElement(CBackdrop, {
|
|
7032
|
-
: backdrop && React__default.createElement(CBackdrop, {
|
|
7141
|
+
createPortal(React__default.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }), document.body)
|
|
7142
|
+
: backdrop && (React__default.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }))));
|
|
7033
7143
|
});
|
|
7034
7144
|
COffcanvas.propTypes = {
|
|
7035
7145
|
backdrop: PropTypes.bool,
|
|
@@ -7126,7 +7236,7 @@ CSidebarHeader.displayName = 'CSidebarHeader';
|
|
|
7126
7236
|
|
|
7127
7237
|
var CSpinner = forwardRef(function (_a, ref) {
|
|
7128
7238
|
var className = _a.className, color = _a.color, _b = _a.component, Component = _b === void 0 ? 'div' : _b, size = _a.size, _c = _a.variant, variant = _c === void 0 ? 'border' : _c, _d = _a.visuallyHiddenLabel, visuallyHiddenLabel = _d === void 0 ? 'Loading...' : _d, rest = __rest(_a, ["className", "color", "component", "size", "variant", "visuallyHiddenLabel"]);
|
|
7129
|
-
var _className = classNames("spinner-"
|
|
7239
|
+
var _className = classNames("spinner-".concat(variant), "text-".concat(color), size && "spinner-".concat(variant, "-").concat(size), className);
|
|
7130
7240
|
return (React__default.createElement(Component, __assign({ className: _className, role: "status" }, rest, { ref: ref }),
|
|
7131
7241
|
React__default.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
7132
7242
|
});
|
|
@@ -7144,17 +7254,17 @@ var CTable = forwardRef(function (_a, ref) {
|
|
|
7144
7254
|
var _b;
|
|
7145
7255
|
var children = _a.children, align = _a.align, borderColor = _a.borderColor, bordered = _a.bordered, borderless = _a.borderless, caption = _a.caption, className = _a.className, color = _a.color, hover = _a.hover, responsive = _a.responsive, small = _a.small, striped = _a.striped, rest = __rest(_a, ["children", "align", "borderColor", "bordered", "borderless", "caption", "className", "color", "hover", "responsive", "small", "striped"]);
|
|
7146
7256
|
var _className = classNames('table', (_b = {},
|
|
7147
|
-
_b["align-"
|
|
7148
|
-
_b["caption-"
|
|
7149
|
-
_b["border-"
|
|
7257
|
+
_b["align-".concat(align)] = align,
|
|
7258
|
+
_b["caption-".concat(caption)] = caption,
|
|
7259
|
+
_b["border-".concat(borderColor)] = borderColor,
|
|
7150
7260
|
_b['table-bordered'] = bordered,
|
|
7151
7261
|
_b['table-borderless'] = borderless,
|
|
7152
|
-
_b["table-"
|
|
7262
|
+
_b["table-".concat(color)] = color,
|
|
7153
7263
|
_b['table-hover'] = hover,
|
|
7154
7264
|
_b['table-sm'] = small,
|
|
7155
7265
|
_b['table-striped'] = striped,
|
|
7156
7266
|
_b), className);
|
|
7157
|
-
return responsive ? (React__default.createElement("div", { className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-"
|
|
7267
|
+
return responsive ? (React__default.createElement("div", { className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) },
|
|
7158
7268
|
React__default.createElement("table", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children))) : (React__default.createElement("table", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7159
7269
|
});
|
|
7160
7270
|
CTable.propTypes = {
|
|
@@ -7180,7 +7290,7 @@ var CTableBody = forwardRef(function (_a, ref) {
|
|
|
7180
7290
|
var _b;
|
|
7181
7291
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7182
7292
|
var _className = classNames((_b = {},
|
|
7183
|
-
_b["table-"
|
|
7293
|
+
_b["table-".concat(color)] = color,
|
|
7184
7294
|
_b), className);
|
|
7185
7295
|
return (React__default.createElement("tbody", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7186
7296
|
});
|
|
@@ -7204,9 +7314,9 @@ var CTableDataCell = forwardRef(function (_a, ref) {
|
|
|
7204
7314
|
var _b;
|
|
7205
7315
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "active", "align", "className", "color"]);
|
|
7206
7316
|
var _className = classNames((_b = {},
|
|
7207
|
-
_b["align-"
|
|
7317
|
+
_b["align-".concat(align)] = align,
|
|
7208
7318
|
_b['table-active'] = active,
|
|
7209
|
-
_b["table-"
|
|
7319
|
+
_b["table-".concat(color)] = color,
|
|
7210
7320
|
_b), className);
|
|
7211
7321
|
return (React__default.createElement("td", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7212
7322
|
});
|
|
@@ -7223,7 +7333,7 @@ var CTableFoot = forwardRef(function (_a, ref) {
|
|
|
7223
7333
|
var _b;
|
|
7224
7334
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7225
7335
|
var _className = classNames((_b = {},
|
|
7226
|
-
_b["table-"
|
|
7336
|
+
_b["table-".concat(color)] = color,
|
|
7227
7337
|
_b), className);
|
|
7228
7338
|
return (React__default.createElement("tfoot", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7229
7339
|
});
|
|
@@ -7238,7 +7348,7 @@ var CTableHead = forwardRef(function (_a, ref) {
|
|
|
7238
7348
|
var _b;
|
|
7239
7349
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7240
7350
|
var _className = classNames((_b = {},
|
|
7241
|
-
_b["table-"
|
|
7351
|
+
_b["table-".concat(color)] = color,
|
|
7242
7352
|
_b), className);
|
|
7243
7353
|
return (React__default.createElement("thead", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7244
7354
|
});
|
|
@@ -7253,7 +7363,7 @@ var CTableHeaderCell = forwardRef(function (_a, ref) {
|
|
|
7253
7363
|
var _b;
|
|
7254
7364
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7255
7365
|
var _className = classNames((_b = {},
|
|
7256
|
-
_b["table-"
|
|
7366
|
+
_b["table-".concat(color)] = color,
|
|
7257
7367
|
_b), className);
|
|
7258
7368
|
return (React__default.createElement("th", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7259
7369
|
});
|
|
@@ -7268,9 +7378,9 @@ var CTableRow = forwardRef(function (_a, ref) {
|
|
|
7268
7378
|
var _b;
|
|
7269
7379
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "active", "align", "className", "color"]);
|
|
7270
7380
|
var _className = classNames((_b = {},
|
|
7271
|
-
_b["align-"
|
|
7381
|
+
_b["align-".concat(align)] = align,
|
|
7272
7382
|
_b['table-active'] = active,
|
|
7273
|
-
_b["table-"
|
|
7383
|
+
_b["table-".concat(color)] = color,
|
|
7274
7384
|
_b), className);
|
|
7275
7385
|
return (React__default.createElement("tr", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7276
7386
|
});
|
|
@@ -7345,7 +7455,7 @@ var CToast = forwardRef(function (_a, ref) {
|
|
|
7345
7455
|
var _className = classNames('toast', (_b = {
|
|
7346
7456
|
fade: animation
|
|
7347
7457
|
},
|
|
7348
|
-
_b["bg-"
|
|
7458
|
+
_b["bg-".concat(color)] = color,
|
|
7349
7459
|
_b['border-0'] = color,
|
|
7350
7460
|
_b), className);
|
|
7351
7461
|
var getTransitionClass = function (state) {
|
|
@@ -7502,7 +7612,7 @@ var CTooltip = function (_a) {
|
|
|
7502
7612
|
var transitionClass = getTransitionClass(state);
|
|
7503
7613
|
return (React__default.createElement(Popper, { placement: placement }, function (_a) {
|
|
7504
7614
|
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
7505
|
-
return (React__default.createElement("div", __assign({ className: classNames("tooltip bs-tooltip-"
|
|
7615
|
+
return (React__default.createElement("div", __assign({ className: classNames("tooltip bs-tooltip-".concat(placement === 'left' ? 'start' : placement === 'right' ? 'end' : placement), transitionClass), ref: ref, role: "tooltip", style: style }, rest),
|
|
7506
7616
|
React__default.createElement("div", __assign({ className: "tooltip-arrow" }, arrowProps)),
|
|
7507
7617
|
React__default.createElement("div", { className: "tooltip-inner" }, content)));
|
|
7508
7618
|
}));
|
|
@@ -7510,7 +7620,7 @@ var CTooltip = function (_a) {
|
|
|
7510
7620
|
};
|
|
7511
7621
|
CTooltip.propTypes = {
|
|
7512
7622
|
children: PropTypes.any,
|
|
7513
|
-
content: PropTypes.node,
|
|
7623
|
+
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
7514
7624
|
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
7515
7625
|
onHide: PropTypes.func,
|
|
7516
7626
|
onShow: PropTypes.func,
|
|
@@ -7522,7 +7632,7 @@ CTooltip.displayName = 'CTooltip';
|
|
|
7522
7632
|
var CWidgetStatsA = forwardRef(function (_a, ref) {
|
|
7523
7633
|
var _b;
|
|
7524
7634
|
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"]);
|
|
7525
|
-
var _className = classNames((_b = {}, _b["bg-"
|
|
7635
|
+
var _className = classNames((_b = {}, _b["bg-".concat(color)] = color, _b['text-high-emphasis-inverse'] = color, _b), className);
|
|
7526
7636
|
return (React__default.createElement(CCard, __assign({ className: _className }, rest, { ref: ref }),
|
|
7527
7637
|
React__default.createElement(CCardBody, { className: "pb-0 d-flex justify-content-between align-items-start" },
|
|
7528
7638
|
React__default.createElement("div", null,
|
|
@@ -7565,8 +7675,8 @@ var CWidgetStatsC = forwardRef(function (_a, ref) {
|
|
|
7565
7675
|
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"]);
|
|
7566
7676
|
return (React__default.createElement(CCard, __assign({ className: className, color: color }, (inverse && { textColor: 'high-emphasis-inverse' }), rest, { ref: ref }),
|
|
7567
7677
|
React__default.createElement(CCardBody, null,
|
|
7568
|
-
icon && (React__default.createElement("div", { className: "text-medium-emphasis"
|
|
7569
|
-
value && (React__default.createElement("div", { className: "text-high-emphasis"
|
|
7678
|
+
icon && (React__default.createElement("div", { className: "text-medium-emphasis".concat(inverse ? '-inverse' : '', " text-end mb-4") }, icon)),
|
|
7679
|
+
value && (React__default.createElement("div", { className: "text-high-emphasis".concat(inverse ? '-inverse' : '', " fs-4 fw-semibold") }, value)),
|
|
7570
7680
|
title && (React__default.createElement("div", { className: inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis' }, title)),
|
|
7571
7681
|
React__default.createElement(CProgress, __assign({ className: "mt-3 mb-0", height: 4 }, (inverse && { white: true }), progress)))));
|
|
7572
7682
|
});
|
|
@@ -7586,7 +7696,7 @@ var CWidgetStatsD = forwardRef(function (_a, ref) {
|
|
|
7586
7696
|
var className = _a.className, chart = _a.chart, color = _a.color, icon = _a.icon, values = _a.values, rest = __rest(_a, ["className", "chart", "color", "icon", "values"]);
|
|
7587
7697
|
var _className = classNames(className);
|
|
7588
7698
|
var classNameHeader = classNames('position-relative d-flex justify-content-center align-items-center', (_b = {},
|
|
7589
|
-
_b["bg-"
|
|
7699
|
+
_b["bg-".concat(color)] = color,
|
|
7590
7700
|
_b));
|
|
7591
7701
|
return (React__default.createElement(CCard, __assign({ className: _className }, rest, { ref: ref }),
|
|
7592
7702
|
React__default.createElement(CCardHeader, { className: classNameHeader },
|
|
@@ -7632,10 +7742,10 @@ var CWidgetStatsF = forwardRef(function (_a, ref) {
|
|
|
7632
7742
|
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"]);
|
|
7633
7743
|
var _className = classNames(className);
|
|
7634
7744
|
return (React__default.createElement(CCard, __assign({ className: _className }, rest, { ref: ref }),
|
|
7635
|
-
React__default.createElement(CCardBody, { className: "d-flex align-items-center "
|
|
7636
|
-
React__default.createElement("div", { className: "me-3 text-white bg-"
|
|
7745
|
+
React__default.createElement(CCardBody, { className: "d-flex align-items-center ".concat(padding === false && 'p-0') },
|
|
7746
|
+
React__default.createElement("div", { className: "me-3 text-white bg-".concat(color, " ").concat(padding ? 'p-3' : 'p-4') }, icon),
|
|
7637
7747
|
React__default.createElement("div", null,
|
|
7638
|
-
React__default.createElement("div", { className: "fs-6 fw-semibold text-"
|
|
7748
|
+
React__default.createElement("div", { className: "fs-6 fw-semibold text-".concat(color) }, value),
|
|
7639
7749
|
React__default.createElement("div", { className: "text-medium-emphasis text-uppercase fw-semibold small" }, title))),
|
|
7640
7750
|
footer && React__default.createElement(CCardFooter, null, footer)));
|
|
7641
7751
|
});
|
|
@@ -7650,5 +7760,5 @@ CWidgetStatsF.propTypes = {
|
|
|
7650
7760
|
};
|
|
7651
7761
|
CWidgetStatsF.displayName = 'CWidgetStatsF';
|
|
7652
7762
|
|
|
7653
|
-
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, 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, CContainer, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CFooter, CForm, CFormCheck, 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, 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 };
|
|
7763
|
+
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, 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, CContainer, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CFooter, CForm, CFormCheck, 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 };
|
|
7654
7764
|
//# sourceMappingURL=index.es.js.map
|