@coreui/react 4.0.1 → 4.1.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/accordion/CAccordionCollapse.d.ts +1 -1
- package/dist/components/collapse/CCollapse.d.ts +4 -0
- package/dist/components/form/CFormLabel.d.ts +2 -2
- package/dist/components/modal/CModal.d.ts +1 -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 +338 -204
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +338 -203
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/components/accordion/CAccordionCollapse.tsx +1 -1
- package/src/components/collapse/CCollapse.tsx +36 -3
- package/src/components/form/CFormLabel.tsx +2 -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/modal/CModal.tsx +42 -19
- package/src/components/modal/__tests__/CModal.spec.tsx +1 -1
- package/src/components/modal/__tests__/__snapshots__/CModal.spec.tsx.snap +2 -10
- 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
|
@@ -358,6 +358,8 @@ var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
|
358
358
|
|
|
359
359
|
var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
|
|
360
360
|
|
|
361
|
+
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
362
|
+
|
|
361
363
|
/**
|
|
362
364
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
363
365
|
*
|
|
@@ -370,7 +372,7 @@ var printWarning$2 = function() {};
|
|
|
370
372
|
if (process.env.NODE_ENV !== 'production') {
|
|
371
373
|
var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
|
|
372
374
|
var loggedTypeFailures = {};
|
|
373
|
-
var has$1 =
|
|
375
|
+
var has$1 = has$2;
|
|
374
376
|
|
|
375
377
|
printWarning$2 = function(text) {
|
|
376
378
|
var message = 'Warning: ' + text;
|
|
@@ -382,7 +384,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
382
384
|
// This error was thrown as a convenience so that you can use this stack
|
|
383
385
|
// to find the callsite that caused this warning to fire.
|
|
384
386
|
throw new Error(message);
|
|
385
|
-
} catch (x) {}
|
|
387
|
+
} catch (x) { /**/ }
|
|
386
388
|
};
|
|
387
389
|
}
|
|
388
390
|
|
|
@@ -411,7 +413,8 @@ function checkPropTypes$1(typeSpecs, values, location, componentName, getStack)
|
|
|
411
413
|
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
412
414
|
var err = Error(
|
|
413
415
|
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
414
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
416
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
417
|
+
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
415
418
|
);
|
|
416
419
|
err.name = 'Invariant Violation';
|
|
417
420
|
throw err;
|
|
@@ -470,9 +473,9 @@ var ReactIs$1 = reactIs.exports;
|
|
|
470
473
|
var assign = objectAssign;
|
|
471
474
|
|
|
472
475
|
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
|
476
|
+
var has = has$2;
|
|
473
477
|
var checkPropTypes = checkPropTypes_1;
|
|
474
478
|
|
|
475
|
-
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
476
479
|
var printWarning$1 = function() {};
|
|
477
480
|
|
|
478
481
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -573,6 +576,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
573
576
|
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
574
577
|
var ReactPropTypes = {
|
|
575
578
|
array: createPrimitiveTypeChecker('array'),
|
|
579
|
+
bigint: createPrimitiveTypeChecker('bigint'),
|
|
576
580
|
bool: createPrimitiveTypeChecker('boolean'),
|
|
577
581
|
func: createPrimitiveTypeChecker('function'),
|
|
578
582
|
number: createPrimitiveTypeChecker('number'),
|
|
@@ -618,8 +622,9 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
618
622
|
* is prohibitively expensive if they are created too often, such as what
|
|
619
623
|
* happens in oneOfType() for any type before the one that matched.
|
|
620
624
|
*/
|
|
621
|
-
function PropTypeError(message) {
|
|
625
|
+
function PropTypeError(message, data) {
|
|
622
626
|
this.message = message;
|
|
627
|
+
this.data = data && typeof data === 'object' ? data: {};
|
|
623
628
|
this.stack = '';
|
|
624
629
|
}
|
|
625
630
|
// Make `instanceof Error` still work for returned errors.
|
|
@@ -654,7 +659,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
654
659
|
) {
|
|
655
660
|
printWarning$1(
|
|
656
661
|
'You are manually calling a React.PropTypes validation ' +
|
|
657
|
-
'function for the `' + propFullName + '` prop on `' + componentName
|
|
662
|
+
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
658
663
|
'and will throw in the standalone `prop-types` package. ' +
|
|
659
664
|
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
660
665
|
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
@@ -693,7 +698,10 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
693
698
|
// 'of type `object`'.
|
|
694
699
|
var preciseType = getPreciseType(propValue);
|
|
695
700
|
|
|
696
|
-
return new PropTypeError(
|
|
701
|
+
return new PropTypeError(
|
|
702
|
+
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
703
|
+
{expectedType: expectedType}
|
|
704
|
+
);
|
|
697
705
|
}
|
|
698
706
|
return null;
|
|
699
707
|
}
|
|
@@ -837,14 +845,19 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
837
845
|
}
|
|
838
846
|
|
|
839
847
|
function validate(props, propName, componentName, location, propFullName) {
|
|
848
|
+
var expectedTypes = [];
|
|
840
849
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
841
850
|
var checker = arrayOfTypeCheckers[i];
|
|
842
|
-
|
|
851
|
+
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1);
|
|
852
|
+
if (checkerResult == null) {
|
|
843
853
|
return null;
|
|
844
854
|
}
|
|
855
|
+
if (checkerResult.data.hasOwnProperty('expectedType')) {
|
|
856
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
857
|
+
}
|
|
845
858
|
}
|
|
846
|
-
|
|
847
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '
|
|
859
|
+
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
860
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
848
861
|
}
|
|
849
862
|
return createChainableTypeChecker(validate);
|
|
850
863
|
}
|
|
@@ -859,6 +872,13 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
859
872
|
return createChainableTypeChecker(validate);
|
|
860
873
|
}
|
|
861
874
|
|
|
875
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
876
|
+
return new PropTypeError(
|
|
877
|
+
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
878
|
+
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
879
|
+
);
|
|
880
|
+
}
|
|
881
|
+
|
|
862
882
|
function createShapeTypeChecker(shapeTypes) {
|
|
863
883
|
function validate(props, propName, componentName, location, propFullName) {
|
|
864
884
|
var propValue = props[propName];
|
|
@@ -868,8 +888,8 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
868
888
|
}
|
|
869
889
|
for (var key in shapeTypes) {
|
|
870
890
|
var checker = shapeTypes[key];
|
|
871
|
-
if (
|
|
872
|
-
|
|
891
|
+
if (typeof checker !== 'function') {
|
|
892
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
873
893
|
}
|
|
874
894
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
875
895
|
if (error) {
|
|
@@ -888,16 +908,18 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
888
908
|
if (propType !== 'object') {
|
|
889
909
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
890
910
|
}
|
|
891
|
-
// We need to check all keys in case some are required but missing from
|
|
892
|
-
// props.
|
|
911
|
+
// We need to check all keys in case some are required but missing from props.
|
|
893
912
|
var allKeys = assign({}, props[propName], shapeTypes);
|
|
894
913
|
for (var key in allKeys) {
|
|
895
914
|
var checker = shapeTypes[key];
|
|
915
|
+
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
916
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
917
|
+
}
|
|
896
918
|
if (!checker) {
|
|
897
919
|
return new PropTypeError(
|
|
898
920
|
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
899
921
|
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
900
|
-
'\nValid keys: ' +
|
|
922
|
+
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
901
923
|
);
|
|
902
924
|
}
|
|
903
925
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
@@ -1082,6 +1104,7 @@ var factoryWithThrowingShims = function() {
|
|
|
1082
1104
|
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1083
1105
|
var ReactPropTypes = {
|
|
1084
1106
|
array: shim,
|
|
1107
|
+
bigint: shim,
|
|
1085
1108
|
bool: shim,
|
|
1086
1109
|
func: shim,
|
|
1087
1110
|
number: shim,
|
|
@@ -2360,6 +2383,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
|
|
|
2360
2383
|
var CSSTransition$1 = CSSTransition;
|
|
2361
2384
|
|
|
2362
2385
|
// code borrowed from https://github.com/reach/reach-ui
|
|
2386
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2363
2387
|
function useForkedRef() {
|
|
2364
2388
|
var refs = [];
|
|
2365
2389
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -2369,6 +2393,7 @@ function useForkedRef() {
|
|
|
2369
2393
|
if (refs.every(function (ref) { return ref == null; })) {
|
|
2370
2394
|
return null;
|
|
2371
2395
|
}
|
|
2396
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2372
2397
|
return function (node) {
|
|
2373
2398
|
refs.forEach(function (ref) {
|
|
2374
2399
|
assignRef(ref, node);
|
|
@@ -2376,7 +2401,10 @@ function useForkedRef() {
|
|
|
2376
2401
|
};
|
|
2377
2402
|
}, refs);
|
|
2378
2403
|
}
|
|
2379
|
-
|
|
2404
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2405
|
+
function assignRef(ref,
|
|
2406
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2407
|
+
value) {
|
|
2380
2408
|
if (ref == null)
|
|
2381
2409
|
return;
|
|
2382
2410
|
if (isFunction(ref)) {
|
|
@@ -2387,17 +2415,19 @@ function assignRef(ref, value) {
|
|
|
2387
2415
|
ref.current = value;
|
|
2388
2416
|
}
|
|
2389
2417
|
catch (error) {
|
|
2390
|
-
throw new Error("Cannot assign value \""
|
|
2418
|
+
throw new Error("Cannot assign value \"".concat(value, "\" to ref \"").concat(ref, "\""));
|
|
2391
2419
|
}
|
|
2392
2420
|
}
|
|
2393
2421
|
}
|
|
2422
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
2394
2423
|
function isFunction(value) {
|
|
2395
2424
|
return !!(value && {}.toString.call(value) == '[object Function]');
|
|
2396
2425
|
}
|
|
2397
2426
|
|
|
2398
2427
|
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"]);
|
|
2428
|
+
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
2429
|
var _b = useState(), height = _b[0], setHeight = _b[1];
|
|
2430
|
+
var _c = useState(), width = _c[0], setWidth = _c[1];
|
|
2401
2431
|
var collapseRef = useRef(null);
|
|
2402
2432
|
var forkedRef = useForkedRef(ref, collapseRef);
|
|
2403
2433
|
var getTransitionClass = function (state) {
|
|
@@ -2411,31 +2441,55 @@ var CCollapse = forwardRef(function (_a, ref) {
|
|
|
2411
2441
|
};
|
|
2412
2442
|
var onEntering = function () {
|
|
2413
2443
|
onShow && onShow();
|
|
2444
|
+
if (horizontal) {
|
|
2445
|
+
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
2446
|
+
return;
|
|
2447
|
+
}
|
|
2414
2448
|
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
2415
2449
|
};
|
|
2416
2450
|
var onEntered = function () {
|
|
2451
|
+
if (horizontal) {
|
|
2452
|
+
setWidth(0);
|
|
2453
|
+
return;
|
|
2454
|
+
}
|
|
2417
2455
|
setHeight(0);
|
|
2418
2456
|
};
|
|
2419
2457
|
var onExit = function () {
|
|
2458
|
+
if (horizontal) {
|
|
2459
|
+
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
2460
|
+
return;
|
|
2461
|
+
}
|
|
2420
2462
|
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
2421
2463
|
};
|
|
2422
2464
|
var onExiting = function () {
|
|
2423
2465
|
onHide && onHide();
|
|
2466
|
+
if (horizontal) {
|
|
2467
|
+
setWidth(0);
|
|
2468
|
+
return;
|
|
2469
|
+
}
|
|
2424
2470
|
setHeight(0);
|
|
2425
2471
|
};
|
|
2426
2472
|
var onExited = function () {
|
|
2473
|
+
if (horizontal) {
|
|
2474
|
+
setWidth(0);
|
|
2475
|
+
return;
|
|
2476
|
+
}
|
|
2427
2477
|
setHeight(0);
|
|
2428
2478
|
};
|
|
2429
|
-
var _className = classNames(
|
|
2479
|
+
var _className = classNames({
|
|
2480
|
+
'collapse-horizontal': horizontal,
|
|
2481
|
+
}, className);
|
|
2430
2482
|
return (React__default.createElement(CSSTransition$1, { in: visible, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 350 }, function (state) {
|
|
2431
2483
|
var transitionClass = getTransitionClass(state);
|
|
2432
2484
|
var currentHeight = height === 0 ? null : { height: height };
|
|
2433
|
-
|
|
2485
|
+
var currentWidth = width === 0 ? null : { width: width };
|
|
2486
|
+
return (React__default.createElement("div", __assign({ className: classNames(_className, transitionClass), style: __assign(__assign({}, currentHeight), currentWidth) }, rest, { ref: forkedRef }), children));
|
|
2434
2487
|
}));
|
|
2435
2488
|
});
|
|
2436
2489
|
CCollapse.propTypes = {
|
|
2437
2490
|
children: PropTypes.node,
|
|
2438
2491
|
className: PropTypes.string,
|
|
2492
|
+
horizontal: PropTypes.bool,
|
|
2439
2493
|
onHide: PropTypes.func,
|
|
2440
2494
|
onShow: PropTypes.func,
|
|
2441
2495
|
visible: PropTypes.bool,
|
|
@@ -2561,7 +2615,7 @@ var CAlert = forwardRef(function (_a, ref) {
|
|
|
2561
2615
|
useEffect(function () {
|
|
2562
2616
|
setVisible(visible);
|
|
2563
2617
|
}, [visible]);
|
|
2564
|
-
var _className = classNames('alert', variant === 'solid' ? "bg-"
|
|
2618
|
+
var _className = classNames('alert', variant === 'solid' ? "bg-".concat(color, " text-white") : "alert-".concat(color), {
|
|
2565
2619
|
'alert-dismissible fade': dismissible,
|
|
2566
2620
|
}, className);
|
|
2567
2621
|
var getTransitionClass = function (state) {
|
|
@@ -2632,11 +2686,11 @@ var CAvatar = forwardRef(function (_a, ref) {
|
|
|
2632
2686
|
var _b;
|
|
2633
2687
|
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
2688
|
var _className = classNames('avatar', (_b = {},
|
|
2635
|
-
_b["bg-"
|
|
2636
|
-
_b["avatar-"
|
|
2637
|
-
_b["text-"
|
|
2689
|
+
_b["bg-".concat(color)] = color,
|
|
2690
|
+
_b["avatar-".concat(size)] = size,
|
|
2691
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2638
2692
|
_b), shape, className);
|
|
2639
|
-
var statusClassName = status && classNames('avatar-status', "bg-"
|
|
2693
|
+
var statusClassName = status && classNames('avatar-status', "bg-".concat(status));
|
|
2640
2694
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }),
|
|
2641
2695
|
src ? React__default.createElement("img", { src: src, className: "avatar-img" }) : children,
|
|
2642
2696
|
status && React__default.createElement("span", { className: statusClassName })));
|
|
@@ -2657,14 +2711,14 @@ var CBadge = forwardRef(function (_a, ref) {
|
|
|
2657
2711
|
var _b;
|
|
2658
2712
|
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
2713
|
var _className = classNames('badge', (_b = {},
|
|
2660
|
-
_b["bg-"
|
|
2714
|
+
_b["bg-".concat(color)] = color,
|
|
2661
2715
|
_b['position-absolute translate-middle'] = position,
|
|
2662
2716
|
_b['top-0'] = position === null || position === void 0 ? void 0 : position.includes('top'),
|
|
2663
2717
|
_b['top-100'] = position === null || position === void 0 ? void 0 : position.includes('bottom'),
|
|
2664
2718
|
_b['start-100'] = position === null || position === void 0 ? void 0 : position.includes('end'),
|
|
2665
2719
|
_b['start-0'] = position === null || position === void 0 ? void 0 : position.includes('start'),
|
|
2666
|
-
_b["badge-"
|
|
2667
|
-
_b["text-"
|
|
2720
|
+
_b["badge-".concat(size)] = size,
|
|
2721
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2668
2722
|
_b), shape, className);
|
|
2669
2723
|
return (React__default.createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2670
2724
|
});
|
|
@@ -2727,7 +2781,7 @@ CBreadcrumbItem.displayName = 'CBreadcrumbItem';
|
|
|
2727
2781
|
var CButton = forwardRef(function (_a, ref) {
|
|
2728
2782
|
var _b;
|
|
2729
2783
|
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-"
|
|
2784
|
+
var _className = classNames('btn', variant ? "btn-".concat(variant, "-").concat(color) : "btn-".concat(color), (_b = {}, _b["btn-".concat(size)] = size, _b), shape, className);
|
|
2731
2785
|
return (React__default.createElement(CLink, __assign({ component: rest.href ? 'a' : component, type: type, className: _className }, rest, { ref: ref }), children));
|
|
2732
2786
|
});
|
|
2733
2787
|
CButton.propTypes = {
|
|
@@ -2745,7 +2799,7 @@ CButton.displayName = 'CButton';
|
|
|
2745
2799
|
var CButtonGroup = forwardRef(function (_a, ref) {
|
|
2746
2800
|
var _b;
|
|
2747
2801
|
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-"
|
|
2802
|
+
var _className = classNames(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-".concat(size)] = size, _b), className);
|
|
2749
2803
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2750
2804
|
});
|
|
2751
2805
|
CButtonGroup.propTypes = {
|
|
@@ -2771,7 +2825,7 @@ var CCallout = forwardRef(function (_a, ref) {
|
|
|
2771
2825
|
var _b;
|
|
2772
2826
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
2773
2827
|
var _className = classNames('callout', (_b = {},
|
|
2774
|
-
_b["callout-"
|
|
2828
|
+
_b["callout-".concat(color)] = color,
|
|
2775
2829
|
_b), className);
|
|
2776
2830
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2777
2831
|
});
|
|
@@ -2786,8 +2840,8 @@ var CCard = forwardRef(function (_a, ref) {
|
|
|
2786
2840
|
var _b;
|
|
2787
2841
|
var children = _a.children, className = _a.className, color = _a.color, textColor = _a.textColor, rest = __rest(_a, ["children", "className", "color", "textColor"]);
|
|
2788
2842
|
var _className = classNames('card', (_b = {},
|
|
2789
|
-
_b["bg-"
|
|
2790
|
-
_b["text-"
|
|
2843
|
+
_b["bg-".concat(color)] = color,
|
|
2844
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2791
2845
|
_b), className);
|
|
2792
2846
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2793
2847
|
});
|
|
@@ -2846,7 +2900,7 @@ CCardHeader.displayName = 'CCardHeader';
|
|
|
2846
2900
|
|
|
2847
2901
|
var CCardImage = forwardRef(function (_a, ref) {
|
|
2848
2902
|
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-"
|
|
2903
|
+
var _className = classNames(orientation ? "card-img-".concat(orientation) : 'card-img', className);
|
|
2850
2904
|
return (React__default.createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
2851
2905
|
});
|
|
2852
2906
|
CCardImage.propTypes = {
|
|
@@ -3012,7 +3066,7 @@ var CCarousel = forwardRef(function (_a, ref) {
|
|
|
3012
3066
|
setCustomInterval: setCustomInterval,
|
|
3013
3067
|
} },
|
|
3014
3068
|
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"
|
|
3069
|
+
return (React__default.createElement("li", { key: "indicator".concat(index), onClick: function () {
|
|
3016
3070
|
!animating && handleIndicatorClick(index);
|
|
3017
3071
|
}, className: active === index ? 'active' : '', "data-coreui-target": "" }));
|
|
3018
3072
|
}))),
|
|
@@ -3072,7 +3126,7 @@ var CCarouselItem = forwardRef(function (_a, ref) {
|
|
|
3072
3126
|
if (active) {
|
|
3073
3127
|
setCustomInterval(interval);
|
|
3074
3128
|
if (count !== 0)
|
|
3075
|
-
setOrderClassName("carousel-item-"
|
|
3129
|
+
setOrderClassName("carousel-item-".concat(direction));
|
|
3076
3130
|
}
|
|
3077
3131
|
if (prevActive.current && !active) {
|
|
3078
3132
|
setActiveClassName('active');
|
|
@@ -3084,7 +3138,7 @@ var CCarouselItem = forwardRef(function (_a, ref) {
|
|
|
3084
3138
|
// @ts-expect-error reflow is necessary to proper transition
|
|
3085
3139
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3086
3140
|
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
|
|
3087
|
-
setDirectionClassName("carousel-item-"
|
|
3141
|
+
setDirectionClassName("carousel-item-".concat(direction === 'next' ? 'start' : 'end'));
|
|
3088
3142
|
}
|
|
3089
3143
|
}, 0);
|
|
3090
3144
|
}
|
|
@@ -3373,29 +3427,32 @@ function getBasePlacement(placement) {
|
|
|
3373
3427
|
return placement.split('-')[0];
|
|
3374
3428
|
}
|
|
3375
3429
|
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3430
|
+
var max = Math.max;
|
|
3431
|
+
var min = Math.min;
|
|
3432
|
+
var round = Math.round;
|
|
3433
|
+
|
|
3434
|
+
function getBoundingClientRect(element, includeScale) {
|
|
3435
|
+
if (includeScale === void 0) {
|
|
3436
|
+
includeScale = false;
|
|
3437
|
+
}
|
|
3379
3438
|
|
|
3380
3439
|
var rect = element.getBoundingClientRect();
|
|
3381
3440
|
var scaleX = 1;
|
|
3382
|
-
var scaleY = 1;
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
// }
|
|
3398
|
-
// }
|
|
3441
|
+
var scaleY = 1;
|
|
3442
|
+
|
|
3443
|
+
if (isHTMLElement(element) && includeScale) {
|
|
3444
|
+
var offsetHeight = element.offsetHeight;
|
|
3445
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
3446
|
+
// Fallback to 1 in case both values are `0`
|
|
3447
|
+
|
|
3448
|
+
if (offsetWidth > 0) {
|
|
3449
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
3450
|
+
}
|
|
3451
|
+
|
|
3452
|
+
if (offsetHeight > 0) {
|
|
3453
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
3454
|
+
}
|
|
3455
|
+
}
|
|
3399
3456
|
|
|
3400
3457
|
return {
|
|
3401
3458
|
width: rect.width / scaleX,
|
|
@@ -3550,13 +3607,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
3550
3607
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
3551
3608
|
}
|
|
3552
3609
|
|
|
3553
|
-
var max = Math.max;
|
|
3554
|
-
var min = Math.min;
|
|
3555
|
-
var round = Math.round;
|
|
3556
|
-
|
|
3557
3610
|
function within(min$1, value, max$1) {
|
|
3558
3611
|
return max(min$1, min(value, max$1));
|
|
3559
3612
|
}
|
|
3613
|
+
function withinMaxClamp(min, value, max) {
|
|
3614
|
+
var v = within(min, value, max);
|
|
3615
|
+
return v > max ? max : v;
|
|
3616
|
+
}
|
|
3560
3617
|
|
|
3561
3618
|
function getFreshSideObject() {
|
|
3562
3619
|
return {
|
|
@@ -3688,8 +3745,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
3688
3745
|
var win = window;
|
|
3689
3746
|
var dpr = win.devicePixelRatio || 1;
|
|
3690
3747
|
return {
|
|
3691
|
-
x: round(
|
|
3692
|
-
y: round(
|
|
3748
|
+
x: round(x * dpr) / dpr || 0,
|
|
3749
|
+
y: round(y * dpr) / dpr || 0
|
|
3693
3750
|
};
|
|
3694
3751
|
}
|
|
3695
3752
|
|
|
@@ -3704,7 +3761,8 @@ function mapToStyles(_ref2) {
|
|
|
3704
3761
|
position = _ref2.position,
|
|
3705
3762
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
3706
3763
|
adaptive = _ref2.adaptive,
|
|
3707
|
-
roundOffsets = _ref2.roundOffsets
|
|
3764
|
+
roundOffsets = _ref2.roundOffsets,
|
|
3765
|
+
isFixed = _ref2.isFixed;
|
|
3708
3766
|
|
|
3709
3767
|
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
|
|
3710
3768
|
_ref3$x = _ref3.x,
|
|
@@ -3736,16 +3794,18 @@ function mapToStyles(_ref2) {
|
|
|
3736
3794
|
offsetParent = offsetParent;
|
|
3737
3795
|
|
|
3738
3796
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
3739
|
-
sideY = bottom;
|
|
3740
|
-
|
|
3741
|
-
|
|
3797
|
+
sideY = bottom;
|
|
3798
|
+
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
3799
|
+
offsetParent[heightProp];
|
|
3800
|
+
y -= offsetY - popperRect.height;
|
|
3742
3801
|
y *= gpuAcceleration ? 1 : -1;
|
|
3743
3802
|
}
|
|
3744
3803
|
|
|
3745
3804
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
3746
|
-
sideX = right;
|
|
3747
|
-
|
|
3748
|
-
|
|
3805
|
+
sideX = right;
|
|
3806
|
+
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
3807
|
+
offsetParent[widthProp];
|
|
3808
|
+
x -= offsetX - popperRect.width;
|
|
3749
3809
|
x *= gpuAcceleration ? 1 : -1;
|
|
3750
3810
|
}
|
|
3751
3811
|
}
|
|
@@ -3788,7 +3848,8 @@ function computeStyles(_ref4) {
|
|
|
3788
3848
|
variation: getVariation(state.placement),
|
|
3789
3849
|
popper: state.elements.popper,
|
|
3790
3850
|
popperRect: state.rects.popper,
|
|
3791
|
-
gpuAcceleration: gpuAcceleration
|
|
3851
|
+
gpuAcceleration: gpuAcceleration,
|
|
3852
|
+
isFixed: state.options.strategy === 'fixed'
|
|
3792
3853
|
};
|
|
3793
3854
|
|
|
3794
3855
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -4046,7 +4107,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
4046
4107
|
}
|
|
4047
4108
|
|
|
4048
4109
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
4049
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
4110
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
4050
4111
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
4051
4112
|
// clipping (or hiding) overflowing elements with a position different from
|
|
4052
4113
|
// `initial`
|
|
@@ -4063,7 +4124,7 @@ function getClippingParents(element) {
|
|
|
4063
4124
|
|
|
4064
4125
|
|
|
4065
4126
|
return clippingParents.filter(function (clippingParent) {
|
|
4066
|
-
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
|
4127
|
+
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle$1(clippingParent).position !== 'static' : true);
|
|
4067
4128
|
});
|
|
4068
4129
|
} // Gets the maximum area that the element is visible in due to any number of
|
|
4069
4130
|
// clipping parents
|
|
@@ -4563,6 +4624,14 @@ function preventOverflow(_ref) {
|
|
|
4563
4624
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
4564
4625
|
placement: state.placement
|
|
4565
4626
|
})) : tetherOffset;
|
|
4627
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
4628
|
+
mainAxis: tetherOffsetValue,
|
|
4629
|
+
altAxis: tetherOffsetValue
|
|
4630
|
+
} : Object.assign({
|
|
4631
|
+
mainAxis: 0,
|
|
4632
|
+
altAxis: 0
|
|
4633
|
+
}, tetherOffsetValue);
|
|
4634
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
4566
4635
|
var data = {
|
|
4567
4636
|
x: 0,
|
|
4568
4637
|
y: 0
|
|
@@ -4572,13 +4641,15 @@ function preventOverflow(_ref) {
|
|
|
4572
4641
|
return;
|
|
4573
4642
|
}
|
|
4574
4643
|
|
|
4575
|
-
if (checkMainAxis
|
|
4644
|
+
if (checkMainAxis) {
|
|
4645
|
+
var _offsetModifierState$;
|
|
4646
|
+
|
|
4576
4647
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
4577
4648
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
4578
4649
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
4579
4650
|
var offset = popperOffsets[mainAxis];
|
|
4580
|
-
var min$1 =
|
|
4581
|
-
var max$1 =
|
|
4651
|
+
var min$1 = offset + overflow[mainSide];
|
|
4652
|
+
var max$1 = offset - overflow[altSide];
|
|
4582
4653
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
4583
4654
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
4584
4655
|
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 +4669,45 @@ function preventOverflow(_ref) {
|
|
|
4598
4669
|
// width or height)
|
|
4599
4670
|
|
|
4600
4671
|
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 +
|
|
4672
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
4673
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
4603
4674
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
4604
4675
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
4605
|
-
var offsetModifierValue =
|
|
4606
|
-
var tetherMin =
|
|
4607
|
-
var tetherMax =
|
|
4676
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
4677
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
4678
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
4679
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
4680
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
4681
|
+
data[mainAxis] = preventedOffset - offset;
|
|
4682
|
+
}
|
|
4608
4683
|
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
4612
|
-
data[mainAxis] = preventedOffset - offset;
|
|
4613
|
-
}
|
|
4684
|
+
if (checkAltAxis) {
|
|
4685
|
+
var _offsetModifierState$2;
|
|
4614
4686
|
|
|
4615
|
-
|
|
4616
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
4687
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
4617
4688
|
|
|
4618
|
-
|
|
4689
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
4619
4690
|
|
|
4620
|
-
|
|
4691
|
+
var _offset = popperOffsets[altAxis];
|
|
4621
4692
|
|
|
4622
|
-
|
|
4693
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
4623
4694
|
|
|
4624
|
-
|
|
4695
|
+
var _min = _offset + overflow[_mainSide];
|
|
4625
4696
|
|
|
4626
|
-
|
|
4697
|
+
var _max = _offset - overflow[_altSide];
|
|
4627
4698
|
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4699
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
4700
|
+
|
|
4701
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
4702
|
+
|
|
4703
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
4704
|
+
|
|
4705
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
4706
|
+
|
|
4707
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
4708
|
+
|
|
4709
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
4710
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
4631
4711
|
}
|
|
4632
4712
|
|
|
4633
4713
|
state.modifiersData[name] = data;
|
|
@@ -4659,8 +4739,8 @@ function getNodeScroll(node) {
|
|
|
4659
4739
|
|
|
4660
4740
|
function isElementScaled(element) {
|
|
4661
4741
|
var rect = element.getBoundingClientRect();
|
|
4662
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
4663
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
4742
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
4743
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
4664
4744
|
return scaleX !== 1 || scaleY !== 1;
|
|
4665
4745
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
4666
4746
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -4672,9 +4752,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
4672
4752
|
}
|
|
4673
4753
|
|
|
4674
4754
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
4675
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
4755
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
4676
4756
|
var documentElement = getDocumentElement(offsetParent);
|
|
4677
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
4757
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
4678
4758
|
var scroll = {
|
|
4679
4759
|
scrollLeft: 0,
|
|
4680
4760
|
scrollTop: 0
|
|
@@ -4691,7 +4771,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
4691
4771
|
}
|
|
4692
4772
|
|
|
4693
4773
|
if (isHTMLElement(offsetParent)) {
|
|
4694
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
4774
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
4695
4775
|
offsets.x += offsetParent.clientLeft;
|
|
4696
4776
|
offsets.y += offsetParent.clientTop;
|
|
4697
4777
|
} else if (documentElement) {
|
|
@@ -5669,11 +5749,11 @@ var CDropdownMenu = function (_a) {
|
|
|
5669
5749
|
var classNames = [];
|
|
5670
5750
|
if (typeof alignment === 'object') {
|
|
5671
5751
|
Object.keys(alignment).map(function (key) {
|
|
5672
|
-
classNames.push("dropdown-menu"
|
|
5752
|
+
classNames.push("dropdown-menu".concat(key === 'xs' ? '' : "-".concat(key), "-").concat(alignment[key]));
|
|
5673
5753
|
});
|
|
5674
5754
|
}
|
|
5675
5755
|
if (typeof alignment === 'string') {
|
|
5676
|
-
classNames.push("dropdown-menu-"
|
|
5756
|
+
classNames.push("dropdown-menu-".concat(alignment));
|
|
5677
5757
|
}
|
|
5678
5758
|
return classNames;
|
|
5679
5759
|
};
|
|
@@ -5742,7 +5822,7 @@ CDropdownToggle.propTypes = {
|
|
|
5742
5822
|
};
|
|
5743
5823
|
CDropdownToggle.displayName = 'CDropdownToggle';
|
|
5744
5824
|
|
|
5745
|
-
var BREAKPOINTS$
|
|
5825
|
+
var BREAKPOINTS$3 = [
|
|
5746
5826
|
'xxl',
|
|
5747
5827
|
'xl',
|
|
5748
5828
|
'lg',
|
|
@@ -5752,33 +5832,33 @@ var BREAKPOINTS$2 = [
|
|
|
5752
5832
|
];
|
|
5753
5833
|
var CCol = forwardRef(function (_a, ref) {
|
|
5754
5834
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
5755
|
-
var
|
|
5756
|
-
BREAKPOINTS$
|
|
5835
|
+
var repsonsiveClassNames = [];
|
|
5836
|
+
BREAKPOINTS$3.forEach(function (bp) {
|
|
5757
5837
|
var breakpoint = rest[bp];
|
|
5758
5838
|
delete rest[bp];
|
|
5759
|
-
var infix = bp === 'xs' ? '' : "-"
|
|
5839
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
5760
5840
|
if (typeof breakpoint === 'number' || typeof breakpoint === 'string') {
|
|
5761
|
-
|
|
5841
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint));
|
|
5762
5842
|
}
|
|
5763
5843
|
if (typeof breakpoint === 'boolean') {
|
|
5764
|
-
|
|
5844
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
5765
5845
|
}
|
|
5766
5846
|
if (breakpoint && typeof breakpoint === 'object') {
|
|
5767
5847
|
if (typeof breakpoint.span === 'number' || typeof breakpoint.span === 'string') {
|
|
5768
|
-
|
|
5848
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint.span));
|
|
5769
5849
|
}
|
|
5770
5850
|
if (typeof breakpoint.span === 'boolean') {
|
|
5771
|
-
|
|
5851
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
5772
5852
|
}
|
|
5773
5853
|
if (typeof breakpoint.order === 'number' || typeof breakpoint.order === 'string') {
|
|
5774
|
-
|
|
5854
|
+
repsonsiveClassNames.push("order".concat(infix, "-").concat(breakpoint.order));
|
|
5775
5855
|
}
|
|
5776
5856
|
if (typeof breakpoint.offset === 'number') {
|
|
5777
|
-
|
|
5857
|
+
repsonsiveClassNames.push("offset".concat(infix, "-").concat(breakpoint.offset));
|
|
5778
5858
|
}
|
|
5779
5859
|
}
|
|
5780
5860
|
});
|
|
5781
|
-
var _className = classNames(
|
|
5861
|
+
var _className = classNames(repsonsiveClassNames.length ? repsonsiveClassNames : 'col', className);
|
|
5782
5862
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5783
5863
|
});
|
|
5784
5864
|
var span = PropTypes.oneOfType([
|
|
@@ -5807,7 +5887,7 @@ CCol.propTypes = {
|
|
|
5807
5887
|
};
|
|
5808
5888
|
CCol.displayName = 'CCol';
|
|
5809
5889
|
|
|
5810
|
-
var BREAKPOINTS$
|
|
5890
|
+
var BREAKPOINTS$2 = [
|
|
5811
5891
|
'xxl',
|
|
5812
5892
|
'xl',
|
|
5813
5893
|
'lg',
|
|
@@ -5817,13 +5897,13 @@ var BREAKPOINTS$1 = [
|
|
|
5817
5897
|
];
|
|
5818
5898
|
var CContainer = forwardRef(function (_a, ref) {
|
|
5819
5899
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
5820
|
-
var
|
|
5821
|
-
BREAKPOINTS$
|
|
5900
|
+
var repsonsiveClassNames = [];
|
|
5901
|
+
BREAKPOINTS$2.forEach(function (bp) {
|
|
5822
5902
|
var breakpoint = rest[bp];
|
|
5823
5903
|
delete rest[bp];
|
|
5824
|
-
breakpoint &&
|
|
5904
|
+
breakpoint && repsonsiveClassNames.push("container-".concat(bp));
|
|
5825
5905
|
});
|
|
5826
|
-
var _className = classNames(
|
|
5906
|
+
var _className = classNames(repsonsiveClassNames.length ? repsonsiveClassNames : 'container', className);
|
|
5827
5907
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5828
5908
|
});
|
|
5829
5909
|
CContainer.propTypes = {
|
|
@@ -5838,7 +5918,7 @@ CContainer.propTypes = {
|
|
|
5838
5918
|
};
|
|
5839
5919
|
CContainer.displayName = 'CContainer';
|
|
5840
5920
|
|
|
5841
|
-
var BREAKPOINTS = [
|
|
5921
|
+
var BREAKPOINTS$1 = [
|
|
5842
5922
|
'xxl',
|
|
5843
5923
|
'xl',
|
|
5844
5924
|
'lg',
|
|
@@ -5848,27 +5928,27 @@ var BREAKPOINTS = [
|
|
|
5848
5928
|
];
|
|
5849
5929
|
var CRow = forwardRef(function (_a, ref) {
|
|
5850
5930
|
var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
|
|
5851
|
-
var
|
|
5852
|
-
BREAKPOINTS.forEach(function (bp) {
|
|
5931
|
+
var repsonsiveClassNames = [];
|
|
5932
|
+
BREAKPOINTS$1.forEach(function (bp) {
|
|
5853
5933
|
var breakpoint = rest[bp];
|
|
5854
5934
|
delete rest[bp];
|
|
5855
|
-
var infix = bp === 'xs' ? '' : "-"
|
|
5935
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
5856
5936
|
if (typeof breakpoint === 'object') {
|
|
5857
5937
|
if (breakpoint.cols) {
|
|
5858
|
-
|
|
5938
|
+
repsonsiveClassNames.push("row-cols".concat(infix, "-").concat(breakpoint.cols));
|
|
5859
5939
|
}
|
|
5860
5940
|
if (typeof breakpoint.gutter === 'number') {
|
|
5861
|
-
|
|
5941
|
+
repsonsiveClassNames.push("g".concat(infix, "-").concat(breakpoint.gutter));
|
|
5862
5942
|
}
|
|
5863
5943
|
if (typeof breakpoint.gutterX === 'number') {
|
|
5864
|
-
|
|
5944
|
+
repsonsiveClassNames.push("gx".concat(infix, "-").concat(breakpoint.gutterX));
|
|
5865
5945
|
}
|
|
5866
5946
|
if (typeof breakpoint.gutterY === 'number') {
|
|
5867
|
-
|
|
5947
|
+
repsonsiveClassNames.push("gy".concat(infix, "-").concat(breakpoint.gutterY));
|
|
5868
5948
|
}
|
|
5869
5949
|
}
|
|
5870
5950
|
});
|
|
5871
|
-
var _className = classNames('row',
|
|
5951
|
+
var _className = classNames('row', repsonsiveClassNames, className);
|
|
5872
5952
|
return (React__default.createElement("div", { className: _className, ref: ref }, children));
|
|
5873
5953
|
});
|
|
5874
5954
|
var bp = PropTypes.shape({
|
|
@@ -5892,7 +5972,7 @@ CRow.displayName = 'CRow';
|
|
|
5892
5972
|
var CFooter = forwardRef(function (_a, ref) {
|
|
5893
5973
|
var _b;
|
|
5894
5974
|
var children = _a.children, className = _a.className, position = _a.position, rest = __rest(_a, ["children", "className", "position"]);
|
|
5895
|
-
var _className = classNames('footer', (_b = {}, _b["footer-"
|
|
5975
|
+
var _className = classNames('footer', (_b = {}, _b["footer-".concat(position)] = position, _b), className);
|
|
5896
5976
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5897
5977
|
});
|
|
5898
5978
|
CFooter.propTypes = {
|
|
@@ -5947,9 +6027,9 @@ var CFormCheck = forwardRef(function (_a, ref) {
|
|
|
5947
6027
|
'me-2': hitArea,
|
|
5948
6028
|
});
|
|
5949
6029
|
var labelClassName = classNames(button
|
|
5950
|
-
? classNames('btn', button.variant ? "btn-"
|
|
5951
|
-
_b["btn-"
|
|
5952
|
-
_b), ""
|
|
6030
|
+
? classNames('btn', button.variant ? "btn-".concat(button.variant, "-").concat(button.color) : "btn-".concat(button.color), (_b = {},
|
|
6031
|
+
_b["btn-".concat(button.size)] = button.size,
|
|
6032
|
+
_b), "".concat(button.shape))
|
|
5953
6033
|
: 'form-check-label');
|
|
5954
6034
|
var formControl = function () {
|
|
5955
6035
|
return React__default.createElement("input", __assign({ type: type, className: inputClassName, id: id }, rest, { ref: forkedRef }));
|
|
@@ -5983,8 +6063,8 @@ var CFormFeedback = forwardRef(function (_a, ref) {
|
|
|
5983
6063
|
var _b;
|
|
5984
6064
|
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"]);
|
|
5985
6065
|
var _className = classNames((_b = {},
|
|
5986
|
-
_b["invalid-"
|
|
5987
|
-
_b["valid-"
|
|
6066
|
+
_b["invalid-".concat(tooltip ? 'tooltip' : 'feedback')] = invalid,
|
|
6067
|
+
_b["valid-".concat(tooltip ? 'tooltip' : 'feedback')] = valid,
|
|
5988
6068
|
_b), className);
|
|
5989
6069
|
return (React__default.createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
5990
6070
|
});
|
|
@@ -6013,7 +6093,7 @@ var CFormInput = forwardRef(function (_a, ref) {
|
|
|
6013
6093
|
var _b;
|
|
6014
6094
|
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"]);
|
|
6015
6095
|
var _className = classNames(plainText ? 'form-control-plaintext' : 'form-control', (_b = {},
|
|
6016
|
-
_b["form-control-"
|
|
6096
|
+
_b["form-control-".concat(size)] = size,
|
|
6017
6097
|
_b['form-control-color'] = type === 'color',
|
|
6018
6098
|
_b['is-invalid'] = invalid,
|
|
6019
6099
|
_b['is-valid'] = valid,
|
|
@@ -6045,7 +6125,7 @@ var CFormSelect = forwardRef(function (_a, ref) {
|
|
|
6045
6125
|
var _b;
|
|
6046
6126
|
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"]);
|
|
6047
6127
|
var _className = classNames('form-select', (_b = {},
|
|
6048
|
-
_b["form-select-"
|
|
6128
|
+
_b["form-select-".concat(size)] = size,
|
|
6049
6129
|
_b['is-invalid'] = invalid,
|
|
6050
6130
|
_b['is-valid'] = valid,
|
|
6051
6131
|
_b), className);
|
|
@@ -6071,7 +6151,7 @@ var CFormSwitch = forwardRef(function (_a, ref) {
|
|
|
6071
6151
|
var _b;
|
|
6072
6152
|
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"]);
|
|
6073
6153
|
var _className = classNames('form-check form-switch', (_b = {},
|
|
6074
|
-
_b["form-switch-"
|
|
6154
|
+
_b["form-switch-".concat(size)] = size,
|
|
6075
6155
|
_b['is-invalid'] = invalid,
|
|
6076
6156
|
_b['is-valid'] = valid,
|
|
6077
6157
|
_b), className);
|
|
@@ -6128,7 +6208,7 @@ var CInputGroup = forwardRef(function (_a, ref) {
|
|
|
6128
6208
|
var _b;
|
|
6129
6209
|
var children = _a.children, className = _a.className, size = _a.size, rest = __rest(_a, ["children", "className", "size"]);
|
|
6130
6210
|
var _className = classNames('input-group', (_b = {},
|
|
6131
|
-
_b["input-group-"
|
|
6211
|
+
_b["input-group-".concat(size)] = size,
|
|
6132
6212
|
_b), className);
|
|
6133
6213
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
6134
6214
|
});
|
|
@@ -6154,10 +6234,10 @@ CInputGroupText.displayName = 'CInputGroupText';
|
|
|
6154
6234
|
var CHeader = forwardRef(function (_a, ref) {
|
|
6155
6235
|
var _b;
|
|
6156
6236
|
var children = _a.children, className = _a.className, container = _a.container, position = _a.position, rest = __rest(_a, ["children", "className", "container", "position"]);
|
|
6157
|
-
var _className = classNames('header', (_b = {}, _b["header-"
|
|
6237
|
+
var _className = classNames('header', (_b = {}, _b["header-".concat(position)] = position, _b), className);
|
|
6158
6238
|
var content;
|
|
6159
6239
|
if (container) {
|
|
6160
|
-
content = (React__default.createElement("div", { className: "container"
|
|
6240
|
+
content = (React__default.createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
6161
6241
|
}
|
|
6162
6242
|
else {
|
|
6163
6243
|
content = children;
|
|
@@ -6242,7 +6322,7 @@ var CImage = forwardRef(function (_a, ref) {
|
|
|
6242
6322
|
var _b;
|
|
6243
6323
|
var align = _a.align, className = _a.className, fluid = _a.fluid, rounded = _a.rounded, thumbnail = _a.thumbnail, rest = __rest(_a, ["align", "className", "fluid", "rounded", "thumbnail"]);
|
|
6244
6324
|
var _className = classNames((_b = {},
|
|
6245
|
-
_b["float-"
|
|
6325
|
+
_b["float-".concat(align)] = align && (align === 'start' || align === 'end'),
|
|
6246
6326
|
_b['d-block mx-auto'] = align && align === 'center',
|
|
6247
6327
|
_b['img-fluid'] = fluid,
|
|
6248
6328
|
_b.rounded = rounded,
|
|
@@ -6265,7 +6345,7 @@ var CListGroup = forwardRef(function (_a, ref) {
|
|
|
6265
6345
|
var _className = classNames('list-group', (_b = {
|
|
6266
6346
|
'list-group-flush': flush
|
|
6267
6347
|
},
|
|
6268
|
-
_b["list-group-"
|
|
6348
|
+
_b["list-group-".concat(layout)] = layout,
|
|
6269
6349
|
_b), className);
|
|
6270
6350
|
return (React__default.createElement(Component, { className: _className, ref: ref }, children));
|
|
6271
6351
|
});
|
|
@@ -6289,7 +6369,7 @@ var CListGroupItem = forwardRef(function (_a, ref) {
|
|
|
6289
6369
|
var _b;
|
|
6290
6370
|
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"]);
|
|
6291
6371
|
var _className = classNames('list-group-item', (_b = {},
|
|
6292
|
-
_b["list-group-item-"
|
|
6372
|
+
_b["list-group-item-".concat(color)] = color,
|
|
6293
6373
|
_b['list-group-item-action'] = component === 'a' || component === 'button',
|
|
6294
6374
|
_b.active = active,
|
|
6295
6375
|
_b.disabled = disabled,
|
|
@@ -6332,9 +6412,9 @@ var CModalDialog = forwardRef(function (_a, ref) {
|
|
|
6332
6412
|
},
|
|
6333
6413
|
_b[typeof fullscreen === 'boolean'
|
|
6334
6414
|
? 'modal-fullscreen'
|
|
6335
|
-
: "modal-fullscreen-"
|
|
6415
|
+
: "modal-fullscreen-".concat(fullscreen, "-down")] = fullscreen,
|
|
6336
6416
|
_b['modal-dialog-scrollable'] = scrollable,
|
|
6337
|
-
_b["modal-"
|
|
6417
|
+
_b["modal-".concat(size)] = size,
|
|
6338
6418
|
_b), className);
|
|
6339
6419
|
return (React__default.createElement("div", __assign({ className: _className }, rest, { ref: ref }), children));
|
|
6340
6420
|
});
|
|
@@ -6353,11 +6433,12 @@ CModalDialog.displayName = 'CModalDialog';
|
|
|
6353
6433
|
|
|
6354
6434
|
var CModalContext = createContext({});
|
|
6355
6435
|
var CModal = forwardRef(function (_a, ref) {
|
|
6356
|
-
var children = _a.children, alignment = _a.alignment, _b = _a.backdrop, backdrop = _b === void 0 ? true : _b, className = _a.className, _c = _a.duration, duration = _c === void 0 ? 150 : _c, fullscreen = _a.fullscreen, _d = _a.keyboard, keyboard = _d === void 0 ? true : _d, onClose = _a.onClose, onClosePrevented = _a.onClosePrevented, onShow = _a.onShow, _e = _a.portal, portal = _e === void 0 ? true : _e, scrollable = _a.scrollable, size = _a.size, _f = _a.transition, transition = _f === void 0 ? true : _f, visible = _a.visible;
|
|
6436
|
+
var children = _a.children, alignment = _a.alignment, _b = _a.backdrop, backdrop = _b === void 0 ? true : _b, className = _a.className, _c = _a.duration, duration = _c === void 0 ? 150 : _c, fullscreen = _a.fullscreen, _d = _a.keyboard, keyboard = _d === void 0 ? true : _d, onClose = _a.onClose, onClosePrevented = _a.onClosePrevented, onShow = _a.onShow, _e = _a.portal, portal = _e === void 0 ? true : _e, scrollable = _a.scrollable, size = _a.size, _f = _a.transition, transition = _f === void 0 ? true : _f, _g = _a.unmountOnClose, unmountOnClose = _g === void 0 ? true : _g, visible = _a.visible;
|
|
6357
6437
|
var modalRef = useRef(null);
|
|
6438
|
+
var modalContentRef = useRef(null);
|
|
6358
6439
|
var forkedRef = useForkedRef(ref, modalRef);
|
|
6359
|
-
var
|
|
6360
|
-
var
|
|
6440
|
+
var _h = useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
6441
|
+
var _j = useState(false), staticBackdrop = _j[0], setStaticBackdrop = _j[1];
|
|
6361
6442
|
useEffect(function () {
|
|
6362
6443
|
setVisible(visible);
|
|
6363
6444
|
}, [visible]);
|
|
@@ -6365,6 +6446,14 @@ var CModal = forwardRef(function (_a, ref) {
|
|
|
6365
6446
|
visible: _visible,
|
|
6366
6447
|
setVisible: setVisible,
|
|
6367
6448
|
};
|
|
6449
|
+
useEffect(function () {
|
|
6450
|
+
modalRef.current && modalRef.current.addEventListener('click', handleClickOutside);
|
|
6451
|
+
modalRef.current && modalRef.current.addEventListener('keyup', handleKeyDown);
|
|
6452
|
+
return function () {
|
|
6453
|
+
modalRef.current && modalRef.current.removeEventListener('click', handleClickOutside);
|
|
6454
|
+
modalRef.current && modalRef.current.removeEventListener('keyup', handleKeyDown);
|
|
6455
|
+
};
|
|
6456
|
+
}, [_visible]);
|
|
6368
6457
|
var handleDismiss = function () {
|
|
6369
6458
|
if (backdrop === 'static') {
|
|
6370
6459
|
return setStaticBackdrop(true);
|
|
@@ -6402,6 +6491,12 @@ var CModal = forwardRef(function (_a, ref) {
|
|
|
6402
6491
|
}
|
|
6403
6492
|
return function () { return document.body.classList.remove('modal-open'); };
|
|
6404
6493
|
}, [_visible]);
|
|
6494
|
+
var handleClickOutside = function (event) {
|
|
6495
|
+
if (modalContentRef.current &&
|
|
6496
|
+
!modalContentRef.current.contains(event.target)) {
|
|
6497
|
+
handleDismiss();
|
|
6498
|
+
}
|
|
6499
|
+
};
|
|
6405
6500
|
var handleKeyDown = useCallback(function (event) {
|
|
6406
6501
|
if (event.key === 'Escape' && keyboard) {
|
|
6407
6502
|
return handleDismiss();
|
|
@@ -6410,17 +6505,16 @@ var CModal = forwardRef(function (_a, ref) {
|
|
|
6410
6505
|
var modal = function (ref, transitionClass) {
|
|
6411
6506
|
return (React__default.createElement(CModalContext.Provider, { value: contextValues },
|
|
6412
6507
|
React__default.createElement("div", { className: classNames(_className, transitionClass), tabIndex: -1, role: "dialog", ref: ref },
|
|
6413
|
-
React__default.createElement(CModalDialog, { alignment: alignment, fullscreen: fullscreen, scrollable: scrollable, size: size
|
|
6414
|
-
React__default.createElement(CModalContent,
|
|
6508
|
+
React__default.createElement(CModalDialog, { alignment: alignment, fullscreen: fullscreen, scrollable: scrollable, size: size },
|
|
6509
|
+
React__default.createElement(CModalContent, { ref: modalContentRef }, children)))));
|
|
6415
6510
|
};
|
|
6416
6511
|
return (React__default.createElement(React__default.Fragment, null,
|
|
6417
|
-
React__default.createElement(
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
})),
|
|
6512
|
+
React__default.createElement(Transition$1, { in: _visible, mountOnEnter: true, onEnter: onShow, onExit: onClose, unmountOnExit: unmountOnClose, timeout: !transition ? 0 : duration }, function (state) {
|
|
6513
|
+
var transitionClass = getTransitionClass(state);
|
|
6514
|
+
return typeof window !== 'undefined' && portal
|
|
6515
|
+
? createPortal(modal(forkedRef, transitionClass), document.body)
|
|
6516
|
+
: modal(forkedRef, transitionClass);
|
|
6517
|
+
}),
|
|
6424
6518
|
typeof window !== 'undefined' && portal
|
|
6425
6519
|
? backdrop && createPortal(React__default.createElement(CBackdrop, { visible: _visible }), document.body)
|
|
6426
6520
|
: backdrop && React__default.createElement(CBackdrop, { visible: _visible })));
|
|
@@ -6443,6 +6537,7 @@ CModal.propTypes = {
|
|
|
6443
6537
|
scrollable: PropTypes.bool,
|
|
6444
6538
|
size: PropTypes.oneOf(['sm', 'lg', 'xl']),
|
|
6445
6539
|
transition: PropTypes.bool,
|
|
6540
|
+
unmountOnClose: PropTypes.bool,
|
|
6446
6541
|
visible: PropTypes.bool,
|
|
6447
6542
|
};
|
|
6448
6543
|
CModal.displayName = 'CModal';
|
|
@@ -6500,8 +6595,8 @@ var CNav = forwardRef(function (_a, ref) {
|
|
|
6500
6595
|
var _b;
|
|
6501
6596
|
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"]);
|
|
6502
6597
|
var _className = classNames('nav', (_b = {},
|
|
6503
|
-
_b["nav-"
|
|
6504
|
-
_b["nav-"
|
|
6598
|
+
_b["nav-".concat(layout)] = layout,
|
|
6599
|
+
_b["nav-".concat(variant)] = variant,
|
|
6505
6600
|
_b), className);
|
|
6506
6601
|
return (React__default.createElement(Component, __assign({ className: _className, role: "navigation" }, rest, { ref: ref }), children));
|
|
6507
6602
|
});
|
|
@@ -6537,7 +6632,7 @@ var CSidebarNav = forwardRef(function (_a, ref) {
|
|
|
6537
6632
|
return (React__default.createElement("ul", __assign({ className: classes, ref: ref }, rest),
|
|
6538
6633
|
React__default.createElement(CNavContext.Provider, { value: CNavContextValues }, React__default.Children.map(children, function (child, index) {
|
|
6539
6634
|
if (React__default.isValidElement(child)) {
|
|
6540
|
-
return React__default.cloneElement(child, { key: index, idx: ""
|
|
6635
|
+
return React__default.cloneElement(child, { key: index, idx: "".concat(index) });
|
|
6541
6636
|
}
|
|
6542
6637
|
return;
|
|
6543
6638
|
}))));
|
|
@@ -6597,7 +6692,7 @@ var CNavGroup = forwardRef(function (_a, ref) {
|
|
|
6597
6692
|
compact: compact,
|
|
6598
6693
|
}), style: __assign(__assign({}, style), transitionStyles[state]), ref: navItemsRef }, React__default.Children.map(children, function (child, index) {
|
|
6599
6694
|
if (React__default.isValidElement(child)) {
|
|
6600
|
-
return React__default.cloneElement(child, { key: index, idx: idx
|
|
6695
|
+
return React__default.cloneElement(child, { key: index, idx: "".concat(idx, ".").concat(index) });
|
|
6601
6696
|
}
|
|
6602
6697
|
return;
|
|
6603
6698
|
}))); })));
|
|
@@ -6661,13 +6756,13 @@ var CNavbar = forwardRef(function (_a, ref) {
|
|
|
6661
6756
|
var _b;
|
|
6662
6757
|
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"]);
|
|
6663
6758
|
var _className = classNames('navbar', (_b = {},
|
|
6664
|
-
_b["bg-"
|
|
6665
|
-
_b["navbar-"
|
|
6666
|
-
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-"
|
|
6759
|
+
_b["bg-".concat(color)] = color,
|
|
6760
|
+
_b["navbar-".concat(colorScheme)] = colorScheme,
|
|
6761
|
+
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-".concat(expand)] = expand,
|
|
6667
6762
|
_b), placement, className);
|
|
6668
6763
|
var content;
|
|
6669
6764
|
if (container) {
|
|
6670
|
-
content = (React__default.createElement("div", { className: "container"
|
|
6765
|
+
content = (React__default.createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
6671
6766
|
}
|
|
6672
6767
|
else {
|
|
6673
6768
|
content = children;
|
|
@@ -6750,8 +6845,8 @@ var CPagination = forwardRef(function (_a, ref) {
|
|
|
6750
6845
|
var _b;
|
|
6751
6846
|
var children = _a.children, align = _a.align, className = _a.className, size = _a.size, rest = __rest(_a, ["children", "align", "className", "size"]);
|
|
6752
6847
|
var _className = classNames('pagination', (_b = {},
|
|
6753
|
-
_b["justify-content-"
|
|
6754
|
-
_b["pagination-"
|
|
6848
|
+
_b["justify-content-".concat(align)] = align,
|
|
6849
|
+
_b["pagination-".concat(size)] = size,
|
|
6755
6850
|
_b), className);
|
|
6756
6851
|
return (React__default.createElement("nav", __assign({ ref: ref }, rest),
|
|
6757
6852
|
React__default.createElement("ul", { className: _className }, children)));
|
|
@@ -6780,6 +6875,45 @@ CPaginationItem.propTypes = {
|
|
|
6780
6875
|
};
|
|
6781
6876
|
CPaginationItem.displayName = 'CPaginationItem';
|
|
6782
6877
|
|
|
6878
|
+
var BREAKPOINTS = [
|
|
6879
|
+
'xxl',
|
|
6880
|
+
'xl',
|
|
6881
|
+
'lg',
|
|
6882
|
+
'md',
|
|
6883
|
+
'sm',
|
|
6884
|
+
'xs',
|
|
6885
|
+
];
|
|
6886
|
+
var CPlaceholder = forwardRef(function (_a, ref) {
|
|
6887
|
+
var _b;
|
|
6888
|
+
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"]);
|
|
6889
|
+
var repsonsiveClassNames = [];
|
|
6890
|
+
BREAKPOINTS.forEach(function (bp) {
|
|
6891
|
+
var breakpoint = rest[bp];
|
|
6892
|
+
delete rest[bp];
|
|
6893
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
6894
|
+
if (typeof breakpoint === 'number') {
|
|
6895
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint));
|
|
6896
|
+
}
|
|
6897
|
+
if (typeof breakpoint === 'boolean') {
|
|
6898
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
6899
|
+
}
|
|
6900
|
+
});
|
|
6901
|
+
var _className = classNames(animation ? "placeholder-".concat(animation) : 'placeholder', (_b = {},
|
|
6902
|
+
_b["bg-".concat(color)] = color,
|
|
6903
|
+
_b["placeholder-".concat(size)] = size,
|
|
6904
|
+
_b), repsonsiveClassNames, className);
|
|
6905
|
+
return (React__default.createElement(Component, __assign({ className: _className }, rest, { ref: ref }), children));
|
|
6906
|
+
});
|
|
6907
|
+
CPlaceholder.propTypes = {
|
|
6908
|
+
animation: PropTypes.oneOf(['glow', 'wave']),
|
|
6909
|
+
children: PropTypes.node,
|
|
6910
|
+
className: PropTypes.string,
|
|
6911
|
+
color: colorPropType,
|
|
6912
|
+
component: PropTypes.elementType,
|
|
6913
|
+
size: PropTypes.oneOf(['xs', 'sm', 'lg']),
|
|
6914
|
+
};
|
|
6915
|
+
CPlaceholder.displayName = 'CPlaceholder';
|
|
6916
|
+
|
|
6783
6917
|
var CPopover = function (_a) {
|
|
6784
6918
|
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"]);
|
|
6785
6919
|
var _e = useState(visible), _visible = _e[0], setVisible = _e[1];
|
|
@@ -6820,7 +6954,7 @@ var CPopover = function (_a) {
|
|
|
6820
6954
|
},
|
|
6821
6955
|
] }, function (_a) {
|
|
6822
6956
|
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
6823
|
-
return (React__default.createElement("div", __assign({ className: classNames("popover bs-popover-"
|
|
6957
|
+
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),
|
|
6824
6958
|
React__default.createElement("div", __assign({ className: "popover-arrow" }, arrowProps)),
|
|
6825
6959
|
React__default.createElement("div", { className: "popover-header" }, title),
|
|
6826
6960
|
React__default.createElement("div", { className: "popover-body" }, content)));
|
|
@@ -6829,12 +6963,12 @@ var CPopover = function (_a) {
|
|
|
6829
6963
|
};
|
|
6830
6964
|
CPopover.propTypes = {
|
|
6831
6965
|
children: PropTypes.any,
|
|
6832
|
-
content: PropTypes.node,
|
|
6966
|
+
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
6833
6967
|
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
6834
6968
|
offset: PropTypes.any,
|
|
6835
6969
|
onHide: PropTypes.func,
|
|
6836
6970
|
onShow: PropTypes.func,
|
|
6837
|
-
title: PropTypes.string,
|
|
6971
|
+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
6838
6972
|
trigger: triggerPropType,
|
|
6839
6973
|
visible: PropTypes.bool,
|
|
6840
6974
|
};
|
|
@@ -6844,11 +6978,11 @@ var CProgressBar = forwardRef(function (_a, ref) {
|
|
|
6844
6978
|
var _b;
|
|
6845
6979
|
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"]);
|
|
6846
6980
|
var _className = classNames('progress-bar', (_b = {},
|
|
6847
|
-
_b["bg-"
|
|
6848
|
-
_b["progress-bar-"
|
|
6981
|
+
_b["bg-".concat(color)] = color,
|
|
6982
|
+
_b["progress-bar-".concat(variant)] = variant,
|
|
6849
6983
|
_b['progress-bar-animated'] = animated,
|
|
6850
6984
|
_b), className);
|
|
6851
|
-
return (React__default.createElement("div", __assign({ className: _className, role: "progressbar", style: { width: value
|
|
6985
|
+
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));
|
|
6852
6986
|
});
|
|
6853
6987
|
CProgressBar.propTypes = {
|
|
6854
6988
|
animated: PropTypes.bool,
|
|
@@ -6866,7 +7000,7 @@ var CProgress = forwardRef(function (_a, ref) {
|
|
|
6866
7000
|
'progress-thin': thin,
|
|
6867
7001
|
'progress-white': white,
|
|
6868
7002
|
}, className);
|
|
6869
|
-
return (React__default.createElement("div", { className: _className, style: height ? { height: height
|
|
7003
|
+
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)));
|
|
6870
7004
|
});
|
|
6871
7005
|
CProgress.propTypes = {
|
|
6872
7006
|
children: PropTypes.node,
|
|
@@ -6963,8 +7097,8 @@ var CSidebar = forwardRef(function (_a, ref) {
|
|
|
6963
7097
|
'sidebar-narrow': narrow,
|
|
6964
7098
|
'sidebar-overlaid': overlaid
|
|
6965
7099
|
},
|
|
6966
|
-
_b["sidebar-"
|
|
6967
|
-
_b["sidebar-"
|
|
7100
|
+
_b["sidebar-".concat(position)] = position,
|
|
7101
|
+
_b["sidebar-".concat(size)] = size,
|
|
6968
7102
|
_b['sidebar-narrow-unfoldable'] = unfoldable,
|
|
6969
7103
|
_b.show = _visible === true && mobile,
|
|
6970
7104
|
_b.hide = _visible === false && !mobile,
|
|
@@ -7013,7 +7147,7 @@ var COffcanvas = forwardRef(function (_a, ref) {
|
|
|
7013
7147
|
}
|
|
7014
7148
|
}, [_visible]);
|
|
7015
7149
|
var _className = classNames('offcanvas', (_b = {},
|
|
7016
|
-
_b["offcanvas-"
|
|
7150
|
+
_b["offcanvas-".concat(placement)] = placement,
|
|
7017
7151
|
_b.show = _visible,
|
|
7018
7152
|
_b), className);
|
|
7019
7153
|
var transitionStyles = {
|
|
@@ -7042,8 +7176,8 @@ var COffcanvas = forwardRef(function (_a, ref) {
|
|
|
7042
7176
|
}),
|
|
7043
7177
|
typeof window !== 'undefined' && portal
|
|
7044
7178
|
? backdrop &&
|
|
7045
|
-
createPortal(React__default.createElement(CBackdrop, {
|
|
7046
|
-
: backdrop && React__default.createElement(CBackdrop, {
|
|
7179
|
+
createPortal(React__default.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }), document.body)
|
|
7180
|
+
: backdrop && (React__default.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }))));
|
|
7047
7181
|
});
|
|
7048
7182
|
COffcanvas.propTypes = {
|
|
7049
7183
|
backdrop: PropTypes.bool,
|
|
@@ -7140,7 +7274,7 @@ CSidebarHeader.displayName = 'CSidebarHeader';
|
|
|
7140
7274
|
|
|
7141
7275
|
var CSpinner = forwardRef(function (_a, ref) {
|
|
7142
7276
|
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"]);
|
|
7143
|
-
var _className = classNames("spinner-"
|
|
7277
|
+
var _className = classNames("spinner-".concat(variant), "text-".concat(color), size && "spinner-".concat(variant, "-").concat(size), className);
|
|
7144
7278
|
return (React__default.createElement(Component, __assign({ className: _className, role: "status" }, rest, { ref: ref }),
|
|
7145
7279
|
React__default.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
7146
7280
|
});
|
|
@@ -7158,17 +7292,17 @@ var CTable = forwardRef(function (_a, ref) {
|
|
|
7158
7292
|
var _b;
|
|
7159
7293
|
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"]);
|
|
7160
7294
|
var _className = classNames('table', (_b = {},
|
|
7161
|
-
_b["align-"
|
|
7162
|
-
_b["caption-"
|
|
7163
|
-
_b["border-"
|
|
7295
|
+
_b["align-".concat(align)] = align,
|
|
7296
|
+
_b["caption-".concat(caption)] = caption,
|
|
7297
|
+
_b["border-".concat(borderColor)] = borderColor,
|
|
7164
7298
|
_b['table-bordered'] = bordered,
|
|
7165
7299
|
_b['table-borderless'] = borderless,
|
|
7166
|
-
_b["table-"
|
|
7300
|
+
_b["table-".concat(color)] = color,
|
|
7167
7301
|
_b['table-hover'] = hover,
|
|
7168
7302
|
_b['table-sm'] = small,
|
|
7169
7303
|
_b['table-striped'] = striped,
|
|
7170
7304
|
_b), className);
|
|
7171
|
-
return responsive ? (React__default.createElement("div", { className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-"
|
|
7305
|
+
return responsive ? (React__default.createElement("div", { className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) },
|
|
7172
7306
|
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));
|
|
7173
7307
|
});
|
|
7174
7308
|
CTable.propTypes = {
|
|
@@ -7194,7 +7328,7 @@ var CTableBody = forwardRef(function (_a, ref) {
|
|
|
7194
7328
|
var _b;
|
|
7195
7329
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7196
7330
|
var _className = classNames((_b = {},
|
|
7197
|
-
_b["table-"
|
|
7331
|
+
_b["table-".concat(color)] = color,
|
|
7198
7332
|
_b), className);
|
|
7199
7333
|
return (React__default.createElement("tbody", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7200
7334
|
});
|
|
@@ -7218,9 +7352,9 @@ var CTableDataCell = forwardRef(function (_a, ref) {
|
|
|
7218
7352
|
var _b;
|
|
7219
7353
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "active", "align", "className", "color"]);
|
|
7220
7354
|
var _className = classNames((_b = {},
|
|
7221
|
-
_b["align-"
|
|
7355
|
+
_b["align-".concat(align)] = align,
|
|
7222
7356
|
_b['table-active'] = active,
|
|
7223
|
-
_b["table-"
|
|
7357
|
+
_b["table-".concat(color)] = color,
|
|
7224
7358
|
_b), className);
|
|
7225
7359
|
return (React__default.createElement("td", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7226
7360
|
});
|
|
@@ -7237,7 +7371,7 @@ var CTableFoot = forwardRef(function (_a, ref) {
|
|
|
7237
7371
|
var _b;
|
|
7238
7372
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7239
7373
|
var _className = classNames((_b = {},
|
|
7240
|
-
_b["table-"
|
|
7374
|
+
_b["table-".concat(color)] = color,
|
|
7241
7375
|
_b), className);
|
|
7242
7376
|
return (React__default.createElement("tfoot", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7243
7377
|
});
|
|
@@ -7252,7 +7386,7 @@ var CTableHead = forwardRef(function (_a, ref) {
|
|
|
7252
7386
|
var _b;
|
|
7253
7387
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7254
7388
|
var _className = classNames((_b = {},
|
|
7255
|
-
_b["table-"
|
|
7389
|
+
_b["table-".concat(color)] = color,
|
|
7256
7390
|
_b), className);
|
|
7257
7391
|
return (React__default.createElement("thead", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7258
7392
|
});
|
|
@@ -7267,7 +7401,7 @@ var CTableHeaderCell = forwardRef(function (_a, ref) {
|
|
|
7267
7401
|
var _b;
|
|
7268
7402
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "className", "color"]);
|
|
7269
7403
|
var _className = classNames((_b = {},
|
|
7270
|
-
_b["table-"
|
|
7404
|
+
_b["table-".concat(color)] = color,
|
|
7271
7405
|
_b), className);
|
|
7272
7406
|
return (React__default.createElement("th", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7273
7407
|
});
|
|
@@ -7282,9 +7416,9 @@ var CTableRow = forwardRef(function (_a, ref) {
|
|
|
7282
7416
|
var _b;
|
|
7283
7417
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest(_a, ["children", "active", "align", "className", "color"]);
|
|
7284
7418
|
var _className = classNames((_b = {},
|
|
7285
|
-
_b["align-"
|
|
7419
|
+
_b["align-".concat(align)] = align,
|
|
7286
7420
|
_b['table-active'] = active,
|
|
7287
|
-
_b["table-"
|
|
7421
|
+
_b["table-".concat(color)] = color,
|
|
7288
7422
|
_b), className);
|
|
7289
7423
|
return (React__default.createElement("tr", __assign({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7290
7424
|
});
|
|
@@ -7359,7 +7493,7 @@ var CToast = forwardRef(function (_a, ref) {
|
|
|
7359
7493
|
var _className = classNames('toast', (_b = {
|
|
7360
7494
|
fade: animation
|
|
7361
7495
|
},
|
|
7362
|
-
_b["bg-"
|
|
7496
|
+
_b["bg-".concat(color)] = color,
|
|
7363
7497
|
_b['border-0'] = color,
|
|
7364
7498
|
_b), className);
|
|
7365
7499
|
var getTransitionClass = function (state) {
|
|
@@ -7516,7 +7650,7 @@ var CTooltip = function (_a) {
|
|
|
7516
7650
|
var transitionClass = getTransitionClass(state);
|
|
7517
7651
|
return (React__default.createElement(Popper, { placement: placement }, function (_a) {
|
|
7518
7652
|
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
7519
|
-
return (React__default.createElement("div", __assign({ className: classNames("tooltip bs-tooltip-"
|
|
7653
|
+
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),
|
|
7520
7654
|
React__default.createElement("div", __assign({ className: "tooltip-arrow" }, arrowProps)),
|
|
7521
7655
|
React__default.createElement("div", { className: "tooltip-inner" }, content)));
|
|
7522
7656
|
}));
|
|
@@ -7524,7 +7658,7 @@ var CTooltip = function (_a) {
|
|
|
7524
7658
|
};
|
|
7525
7659
|
CTooltip.propTypes = {
|
|
7526
7660
|
children: PropTypes.any,
|
|
7527
|
-
content: PropTypes.node,
|
|
7661
|
+
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
7528
7662
|
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
7529
7663
|
onHide: PropTypes.func,
|
|
7530
7664
|
onShow: PropTypes.func,
|
|
@@ -7536,7 +7670,7 @@ CTooltip.displayName = 'CTooltip';
|
|
|
7536
7670
|
var CWidgetStatsA = forwardRef(function (_a, ref) {
|
|
7537
7671
|
var _b;
|
|
7538
7672
|
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"]);
|
|
7539
|
-
var _className = classNames((_b = {}, _b["bg-"
|
|
7673
|
+
var _className = classNames((_b = {}, _b["bg-".concat(color)] = color, _b['text-high-emphasis-inverse'] = color, _b), className);
|
|
7540
7674
|
return (React__default.createElement(CCard, __assign({ className: _className }, rest, { ref: ref }),
|
|
7541
7675
|
React__default.createElement(CCardBody, { className: "pb-0 d-flex justify-content-between align-items-start" },
|
|
7542
7676
|
React__default.createElement("div", null,
|
|
@@ -7579,8 +7713,8 @@ var CWidgetStatsC = forwardRef(function (_a, ref) {
|
|
|
7579
7713
|
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"]);
|
|
7580
7714
|
return (React__default.createElement(CCard, __assign({ className: className, color: color }, (inverse && { textColor: 'high-emphasis-inverse' }), rest, { ref: ref }),
|
|
7581
7715
|
React__default.createElement(CCardBody, null,
|
|
7582
|
-
icon && (React__default.createElement("div", { className: "text-medium-emphasis"
|
|
7583
|
-
value && (React__default.createElement("div", { className: "text-high-emphasis"
|
|
7716
|
+
icon && (React__default.createElement("div", { className: "text-medium-emphasis".concat(inverse ? '-inverse' : '', " text-end mb-4") }, icon)),
|
|
7717
|
+
value && (React__default.createElement("div", { className: "text-high-emphasis".concat(inverse ? '-inverse' : '', " fs-4 fw-semibold") }, value)),
|
|
7584
7718
|
title && (React__default.createElement("div", { className: inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis' }, title)),
|
|
7585
7719
|
React__default.createElement(CProgress, __assign({ className: "mt-3 mb-0", height: 4 }, (inverse && { white: true }), progress)))));
|
|
7586
7720
|
});
|
|
@@ -7600,7 +7734,7 @@ var CWidgetStatsD = forwardRef(function (_a, ref) {
|
|
|
7600
7734
|
var className = _a.className, chart = _a.chart, color = _a.color, icon = _a.icon, values = _a.values, rest = __rest(_a, ["className", "chart", "color", "icon", "values"]);
|
|
7601
7735
|
var _className = classNames(className);
|
|
7602
7736
|
var classNameHeader = classNames('position-relative d-flex justify-content-center align-items-center', (_b = {},
|
|
7603
|
-
_b["bg-"
|
|
7737
|
+
_b["bg-".concat(color)] = color,
|
|
7604
7738
|
_b));
|
|
7605
7739
|
return (React__default.createElement(CCard, __assign({ className: _className }, rest, { ref: ref }),
|
|
7606
7740
|
React__default.createElement(CCardHeader, { className: classNameHeader },
|
|
@@ -7646,10 +7780,10 @@ var CWidgetStatsF = forwardRef(function (_a, ref) {
|
|
|
7646
7780
|
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"]);
|
|
7647
7781
|
var _className = classNames(className);
|
|
7648
7782
|
return (React__default.createElement(CCard, __assign({ className: _className }, rest, { ref: ref }),
|
|
7649
|
-
React__default.createElement(CCardBody, { className: "d-flex align-items-center "
|
|
7650
|
-
React__default.createElement("div", { className: "me-3 text-white bg-"
|
|
7783
|
+
React__default.createElement(CCardBody, { className: "d-flex align-items-center ".concat(padding === false && 'p-0') },
|
|
7784
|
+
React__default.createElement("div", { className: "me-3 text-white bg-".concat(color, " ").concat(padding ? 'p-3' : 'p-4') }, icon),
|
|
7651
7785
|
React__default.createElement("div", null,
|
|
7652
|
-
React__default.createElement("div", { className: "fs-6 fw-semibold text-"
|
|
7786
|
+
React__default.createElement("div", { className: "fs-6 fw-semibold text-".concat(color) }, value),
|
|
7653
7787
|
React__default.createElement("div", { className: "text-medium-emphasis text-uppercase fw-semibold small" }, title))),
|
|
7654
7788
|
footer && React__default.createElement(CCardFooter, null, footer)));
|
|
7655
7789
|
});
|
|
@@ -7664,5 +7798,5 @@ CWidgetStatsF.propTypes = {
|
|
|
7664
7798
|
};
|
|
7665
7799
|
CWidgetStatsF.displayName = 'CWidgetStatsF';
|
|
7666
7800
|
|
|
7667
|
-
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 };
|
|
7801
|
+
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 };
|
|
7668
7802
|
//# sourceMappingURL=index.es.js.map
|