@coreui/react-pro 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/smart-table/CSmartTableBody.d.ts +3 -3
- package/dist/components/smart-table/CSmartTableHead.d.ts +2 -1
- package/dist/components/smart-table/CSmartTableInterface.d.ts +9 -6
- package/dist/components/tooltip/CTooltip.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +371 -239
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +371 -238
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- 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/smart-table/CSmartTable.tsx +41 -45
- package/src/components/smart-table/CSmartTableBody.tsx +9 -4
- package/src/components/smart-table/CSmartTableHead.tsx +16 -3
- package/src/components/smart-table/CSmartTableInterface.tsx +10 -6
- 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.js
CHANGED
|
@@ -385,6 +385,8 @@ var ReactPropTypesSecret$7 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
|
385
385
|
|
|
386
386
|
var ReactPropTypesSecret_1$1 = ReactPropTypesSecret$7;
|
|
387
387
|
|
|
388
|
+
var has$4 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
389
|
+
|
|
388
390
|
/**
|
|
389
391
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
390
392
|
*
|
|
@@ -397,7 +399,7 @@ var printWarning$4 = function() {};
|
|
|
397
399
|
if (process.env.NODE_ENV !== 'production') {
|
|
398
400
|
var ReactPropTypesSecret$6 = ReactPropTypesSecret_1$1;
|
|
399
401
|
var loggedTypeFailures$1 = {};
|
|
400
|
-
var has$3 =
|
|
402
|
+
var has$3 = has$4;
|
|
401
403
|
|
|
402
404
|
printWarning$4 = function(text) {
|
|
403
405
|
var message = 'Warning: ' + text;
|
|
@@ -409,7 +411,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
409
411
|
// This error was thrown as a convenience so that you can use this stack
|
|
410
412
|
// to find the callsite that caused this warning to fire.
|
|
411
413
|
throw new Error(message);
|
|
412
|
-
} catch (x) {}
|
|
414
|
+
} catch (x) { /**/ }
|
|
413
415
|
};
|
|
414
416
|
}
|
|
415
417
|
|
|
@@ -438,7 +440,8 @@ function checkPropTypes$3(typeSpecs, values, location, componentName, getStack)
|
|
|
438
440
|
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
439
441
|
var err = Error(
|
|
440
442
|
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
441
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
443
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
444
|
+
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
442
445
|
);
|
|
443
446
|
err.name = 'Invariant Violation';
|
|
444
447
|
throw err;
|
|
@@ -497,9 +500,9 @@ var ReactIs$3 = reactIs$1.exports;
|
|
|
497
500
|
var assign$1 = objectAssign$1;
|
|
498
501
|
|
|
499
502
|
var ReactPropTypesSecret$5 = ReactPropTypesSecret_1$1;
|
|
503
|
+
var has$2 = has$4;
|
|
500
504
|
var checkPropTypes$2 = checkPropTypes_1$1;
|
|
501
505
|
|
|
502
|
-
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
503
506
|
var printWarning$3 = function() {};
|
|
504
507
|
|
|
505
508
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -600,6 +603,7 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
600
603
|
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
601
604
|
var ReactPropTypes = {
|
|
602
605
|
array: createPrimitiveTypeChecker('array'),
|
|
606
|
+
bigint: createPrimitiveTypeChecker('bigint'),
|
|
603
607
|
bool: createPrimitiveTypeChecker('boolean'),
|
|
604
608
|
func: createPrimitiveTypeChecker('function'),
|
|
605
609
|
number: createPrimitiveTypeChecker('number'),
|
|
@@ -645,8 +649,9 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
645
649
|
* is prohibitively expensive if they are created too often, such as what
|
|
646
650
|
* happens in oneOfType() for any type before the one that matched.
|
|
647
651
|
*/
|
|
648
|
-
function PropTypeError(message) {
|
|
652
|
+
function PropTypeError(message, data) {
|
|
649
653
|
this.message = message;
|
|
654
|
+
this.data = data && typeof data === 'object' ? data: {};
|
|
650
655
|
this.stack = '';
|
|
651
656
|
}
|
|
652
657
|
// Make `instanceof Error` still work for returned errors.
|
|
@@ -681,7 +686,7 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
681
686
|
) {
|
|
682
687
|
printWarning$3(
|
|
683
688
|
'You are manually calling a React.PropTypes validation ' +
|
|
684
|
-
'function for the `' + propFullName + '` prop on `' + componentName
|
|
689
|
+
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
685
690
|
'and will throw in the standalone `prop-types` package. ' +
|
|
686
691
|
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
687
692
|
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
@@ -720,7 +725,10 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
720
725
|
// 'of type `object`'.
|
|
721
726
|
var preciseType = getPreciseType(propValue);
|
|
722
727
|
|
|
723
|
-
return new PropTypeError(
|
|
728
|
+
return new PropTypeError(
|
|
729
|
+
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
730
|
+
{expectedType: expectedType}
|
|
731
|
+
);
|
|
724
732
|
}
|
|
725
733
|
return null;
|
|
726
734
|
}
|
|
@@ -864,14 +872,19 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
864
872
|
}
|
|
865
873
|
|
|
866
874
|
function validate(props, propName, componentName, location, propFullName) {
|
|
875
|
+
var expectedTypes = [];
|
|
867
876
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
868
877
|
var checker = arrayOfTypeCheckers[i];
|
|
869
|
-
|
|
878
|
+
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$5);
|
|
879
|
+
if (checkerResult == null) {
|
|
870
880
|
return null;
|
|
871
881
|
}
|
|
882
|
+
if (checkerResult.data.hasOwnProperty('expectedType')) {
|
|
883
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
884
|
+
}
|
|
872
885
|
}
|
|
873
|
-
|
|
874
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '
|
|
886
|
+
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
887
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
875
888
|
}
|
|
876
889
|
return createChainableTypeChecker(validate);
|
|
877
890
|
}
|
|
@@ -886,6 +899,13 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
886
899
|
return createChainableTypeChecker(validate);
|
|
887
900
|
}
|
|
888
901
|
|
|
902
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
903
|
+
return new PropTypeError(
|
|
904
|
+
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
905
|
+
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
906
|
+
);
|
|
907
|
+
}
|
|
908
|
+
|
|
889
909
|
function createShapeTypeChecker(shapeTypes) {
|
|
890
910
|
function validate(props, propName, componentName, location, propFullName) {
|
|
891
911
|
var propValue = props[propName];
|
|
@@ -895,8 +915,8 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
895
915
|
}
|
|
896
916
|
for (var key in shapeTypes) {
|
|
897
917
|
var checker = shapeTypes[key];
|
|
898
|
-
if (
|
|
899
|
-
|
|
918
|
+
if (typeof checker !== 'function') {
|
|
919
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
900
920
|
}
|
|
901
921
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$5);
|
|
902
922
|
if (error) {
|
|
@@ -915,16 +935,18 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
915
935
|
if (propType !== 'object') {
|
|
916
936
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
917
937
|
}
|
|
918
|
-
// We need to check all keys in case some are required but missing from
|
|
919
|
-
// props.
|
|
938
|
+
// We need to check all keys in case some are required but missing from props.
|
|
920
939
|
var allKeys = assign$1({}, props[propName], shapeTypes);
|
|
921
940
|
for (var key in allKeys) {
|
|
922
941
|
var checker = shapeTypes[key];
|
|
942
|
+
if (has$2(shapeTypes, key) && typeof checker !== 'function') {
|
|
943
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
944
|
+
}
|
|
923
945
|
if (!checker) {
|
|
924
946
|
return new PropTypeError(
|
|
925
947
|
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
926
948
|
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
927
|
-
'\nValid keys: ' +
|
|
949
|
+
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
928
950
|
);
|
|
929
951
|
}
|
|
930
952
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$5);
|
|
@@ -1109,6 +1131,7 @@ var factoryWithThrowingShims$1 = function() {
|
|
|
1109
1131
|
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1110
1132
|
var ReactPropTypes = {
|
|
1111
1133
|
array: shim,
|
|
1134
|
+
bigint: shim,
|
|
1112
1135
|
bool: shim,
|
|
1113
1136
|
func: shim,
|
|
1114
1137
|
number: shim,
|
|
@@ -2387,6 +2410,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
|
|
|
2387
2410
|
var CSSTransition$1 = CSSTransition;
|
|
2388
2411
|
|
|
2389
2412
|
// code borrowed from https://github.com/reach/reach-ui
|
|
2413
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2390
2414
|
function useForkedRef() {
|
|
2391
2415
|
var refs = [];
|
|
2392
2416
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -2396,6 +2420,7 @@ function useForkedRef() {
|
|
|
2396
2420
|
if (refs.every(function (ref) { return ref == null; })) {
|
|
2397
2421
|
return null;
|
|
2398
2422
|
}
|
|
2423
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2399
2424
|
return function (node) {
|
|
2400
2425
|
refs.forEach(function (ref) {
|
|
2401
2426
|
assignRef(ref, node);
|
|
@@ -2403,7 +2428,10 @@ function useForkedRef() {
|
|
|
2403
2428
|
};
|
|
2404
2429
|
}, refs);
|
|
2405
2430
|
}
|
|
2406
|
-
|
|
2431
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2432
|
+
function assignRef(ref,
|
|
2433
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2434
|
+
value) {
|
|
2407
2435
|
if (ref == null)
|
|
2408
2436
|
return;
|
|
2409
2437
|
if (isFunction(ref)) {
|
|
@@ -2414,17 +2442,19 @@ function assignRef(ref, value) {
|
|
|
2414
2442
|
ref.current = value;
|
|
2415
2443
|
}
|
|
2416
2444
|
catch (error) {
|
|
2417
|
-
throw new Error("Cannot assign value \""
|
|
2445
|
+
throw new Error("Cannot assign value \"".concat(value, "\" to ref \"").concat(ref, "\""));
|
|
2418
2446
|
}
|
|
2419
2447
|
}
|
|
2420
2448
|
}
|
|
2449
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
2421
2450
|
function isFunction(value) {
|
|
2422
2451
|
return !!(value && {}.toString.call(value) == '[object Function]');
|
|
2423
2452
|
}
|
|
2424
2453
|
|
|
2425
2454
|
var CCollapse = React.forwardRef(function (_a, ref) {
|
|
2426
|
-
var children = _a.children, className = _a.className, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest$1(_a, ["children", "className", "onHide", "onShow", "visible"]);
|
|
2455
|
+
var children = _a.children, className = _a.className, horizontal = _a.horizontal, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest$1(_a, ["children", "className", "horizontal", "onHide", "onShow", "visible"]);
|
|
2427
2456
|
var _b = React.useState(), height = _b[0], setHeight = _b[1];
|
|
2457
|
+
var _c = React.useState(), width = _c[0], setWidth = _c[1];
|
|
2428
2458
|
var collapseRef = React.useRef(null);
|
|
2429
2459
|
var forkedRef = useForkedRef(ref, collapseRef);
|
|
2430
2460
|
var getTransitionClass = function (state) {
|
|
@@ -2438,31 +2468,55 @@ var CCollapse = React.forwardRef(function (_a, ref) {
|
|
|
2438
2468
|
};
|
|
2439
2469
|
var onEntering = function () {
|
|
2440
2470
|
onShow && onShow();
|
|
2471
|
+
if (horizontal) {
|
|
2472
|
+
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
2473
|
+
return;
|
|
2474
|
+
}
|
|
2441
2475
|
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
2442
2476
|
};
|
|
2443
2477
|
var onEntered = function () {
|
|
2478
|
+
if (horizontal) {
|
|
2479
|
+
setWidth(0);
|
|
2480
|
+
return;
|
|
2481
|
+
}
|
|
2444
2482
|
setHeight(0);
|
|
2445
2483
|
};
|
|
2446
2484
|
var onExit = function () {
|
|
2485
|
+
if (horizontal) {
|
|
2486
|
+
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
2487
|
+
return;
|
|
2488
|
+
}
|
|
2447
2489
|
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
2448
2490
|
};
|
|
2449
2491
|
var onExiting = function () {
|
|
2450
2492
|
onHide && onHide();
|
|
2493
|
+
if (horizontal) {
|
|
2494
|
+
setWidth(0);
|
|
2495
|
+
return;
|
|
2496
|
+
}
|
|
2451
2497
|
setHeight(0);
|
|
2452
2498
|
};
|
|
2453
2499
|
var onExited = function () {
|
|
2500
|
+
if (horizontal) {
|
|
2501
|
+
setWidth(0);
|
|
2502
|
+
return;
|
|
2503
|
+
}
|
|
2454
2504
|
setHeight(0);
|
|
2455
2505
|
};
|
|
2456
|
-
var _className = classNames$1(
|
|
2506
|
+
var _className = classNames$1({
|
|
2507
|
+
'collapse-horizontal': horizontal,
|
|
2508
|
+
}, className);
|
|
2457
2509
|
return (React__default["default"].createElement(CSSTransition$1, { in: visible, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 350 }, function (state) {
|
|
2458
2510
|
var transitionClass = getTransitionClass(state);
|
|
2459
2511
|
var currentHeight = height === 0 ? null : { height: height };
|
|
2460
|
-
|
|
2512
|
+
var currentWidth = width === 0 ? null : { width: width };
|
|
2513
|
+
return (React__default["default"].createElement("div", __assign$1({ className: classNames$1(_className, transitionClass), style: __assign$1(__assign$1({}, currentHeight), currentWidth) }, rest, { ref: forkedRef }), children));
|
|
2461
2514
|
}));
|
|
2462
2515
|
});
|
|
2463
2516
|
CCollapse.propTypes = {
|
|
2464
2517
|
children: PropTypes$1.node,
|
|
2465
2518
|
className: PropTypes$1.string,
|
|
2519
|
+
horizontal: PropTypes$1.bool,
|
|
2466
2520
|
onHide: PropTypes$1.func,
|
|
2467
2521
|
onShow: PropTypes$1.func,
|
|
2468
2522
|
visible: PropTypes$1.bool,
|
|
@@ -2598,7 +2652,7 @@ var CAlert = React.forwardRef(function (_a, ref) {
|
|
|
2598
2652
|
React.useEffect(function () {
|
|
2599
2653
|
setVisible(visible);
|
|
2600
2654
|
}, [visible]);
|
|
2601
|
-
var _className = classNames$1('alert', variant === 'solid' ? "bg-"
|
|
2655
|
+
var _className = classNames$1('alert', variant === 'solid' ? "bg-".concat(color, " text-white") : "alert-".concat(color), {
|
|
2602
2656
|
'alert-dismissible fade': dismissible,
|
|
2603
2657
|
}, className);
|
|
2604
2658
|
var getTransitionClass = function (state) {
|
|
@@ -2669,11 +2723,11 @@ var CAvatar = React.forwardRef(function (_a, ref) {
|
|
|
2669
2723
|
var _b;
|
|
2670
2724
|
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$1(_a, ["children", "className", "color", "shape", "size", "src", "status", "textColor"]);
|
|
2671
2725
|
var _className = classNames$1('avatar', (_b = {},
|
|
2672
|
-
_b["bg-"
|
|
2673
|
-
_b["avatar-"
|
|
2674
|
-
_b["text-"
|
|
2726
|
+
_b["bg-".concat(color)] = color,
|
|
2727
|
+
_b["avatar-".concat(size)] = size,
|
|
2728
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2675
2729
|
_b), shape, className);
|
|
2676
|
-
var statusClassName = status && classNames$1('avatar-status', "bg-"
|
|
2730
|
+
var statusClassName = status && classNames$1('avatar-status', "bg-".concat(status));
|
|
2677
2731
|
return (React__default["default"].createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
2678
2732
|
src ? React__default["default"].createElement("img", { src: src, className: "avatar-img" }) : children,
|
|
2679
2733
|
status && React__default["default"].createElement("span", { className: statusClassName })));
|
|
@@ -2694,14 +2748,14 @@ var CBadge = React.forwardRef(function (_a, ref) {
|
|
|
2694
2748
|
var _b;
|
|
2695
2749
|
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$1(_a, ["children", "className", "color", "component", "position", "shape", "size", "textColor"]);
|
|
2696
2750
|
var _className = classNames$1('badge', (_b = {},
|
|
2697
|
-
_b["bg-"
|
|
2751
|
+
_b["bg-".concat(color)] = color,
|
|
2698
2752
|
_b['position-absolute translate-middle'] = position,
|
|
2699
2753
|
_b['top-0'] = position === null || position === void 0 ? void 0 : position.includes('top'),
|
|
2700
2754
|
_b['top-100'] = position === null || position === void 0 ? void 0 : position.includes('bottom'),
|
|
2701
2755
|
_b['start-100'] = position === null || position === void 0 ? void 0 : position.includes('end'),
|
|
2702
2756
|
_b['start-0'] = position === null || position === void 0 ? void 0 : position.includes('start'),
|
|
2703
|
-
_b["badge-"
|
|
2704
|
-
_b["text-"
|
|
2757
|
+
_b["badge-".concat(size)] = size,
|
|
2758
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2705
2759
|
_b), shape, className);
|
|
2706
2760
|
return (React__default["default"].createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2707
2761
|
});
|
|
@@ -2764,7 +2818,7 @@ CBreadcrumbItem.displayName = 'CBreadcrumbItem';
|
|
|
2764
2818
|
var CButton = React.forwardRef(function (_a, ref) {
|
|
2765
2819
|
var _b;
|
|
2766
2820
|
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$1(_a, ["children", "className", "color", "component", "shape", "size", "type", "variant"]);
|
|
2767
|
-
var _className = classNames$1('btn', variant ? "btn-"
|
|
2821
|
+
var _className = classNames$1('btn', variant ? "btn-".concat(variant, "-").concat(color) : "btn-".concat(color), (_b = {}, _b["btn-".concat(size)] = size, _b), shape, className);
|
|
2768
2822
|
return (React__default["default"].createElement(CLink, __assign$1({ component: rest.href ? 'a' : component, type: type, className: _className }, rest, { ref: ref }), children));
|
|
2769
2823
|
});
|
|
2770
2824
|
CButton.propTypes = {
|
|
@@ -2782,7 +2836,7 @@ CButton.displayName = 'CButton';
|
|
|
2782
2836
|
var CButtonGroup = React.forwardRef(function (_a, ref) {
|
|
2783
2837
|
var _b;
|
|
2784
2838
|
var children = _a.children, className = _a.className, size = _a.size, vertical = _a.vertical, rest = __rest$1(_a, ["children", "className", "size", "vertical"]);
|
|
2785
|
-
var _className = classNames$1(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-"
|
|
2839
|
+
var _className = classNames$1(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-".concat(size)] = size, _b), className);
|
|
2786
2840
|
return (React__default["default"].createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2787
2841
|
});
|
|
2788
2842
|
CButtonGroup.propTypes = {
|
|
@@ -2808,7 +2862,7 @@ var CCallout = React.forwardRef(function (_a, ref) {
|
|
|
2808
2862
|
var _b;
|
|
2809
2863
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
2810
2864
|
var _className = classNames$1('callout', (_b = {},
|
|
2811
|
-
_b["callout-"
|
|
2865
|
+
_b["callout-".concat(color)] = color,
|
|
2812
2866
|
_b), className);
|
|
2813
2867
|
return (React__default["default"].createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2814
2868
|
});
|
|
@@ -2823,8 +2877,8 @@ var CCard = React.forwardRef(function (_a, ref) {
|
|
|
2823
2877
|
var _b;
|
|
2824
2878
|
var children = _a.children, className = _a.className, color = _a.color, textColor = _a.textColor, rest = __rest$1(_a, ["children", "className", "color", "textColor"]);
|
|
2825
2879
|
var _className = classNames$1('card', (_b = {},
|
|
2826
|
-
_b["bg-"
|
|
2827
|
-
_b["text-"
|
|
2880
|
+
_b["bg-".concat(color)] = color,
|
|
2881
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2828
2882
|
_b), className);
|
|
2829
2883
|
return (React__default["default"].createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2830
2884
|
});
|
|
@@ -2883,7 +2937,7 @@ CCardHeader.displayName = 'CCardHeader';
|
|
|
2883
2937
|
|
|
2884
2938
|
var CCardImage = React.forwardRef(function (_a, ref) {
|
|
2885
2939
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'img' : _b, orientation = _a.orientation, rest = __rest$1(_a, ["children", "className", "component", "orientation"]);
|
|
2886
|
-
var _className = classNames$1(orientation ? "card-img-"
|
|
2940
|
+
var _className = classNames$1(orientation ? "card-img-".concat(orientation) : 'card-img', className);
|
|
2887
2941
|
return (React__default["default"].createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2888
2942
|
});
|
|
2889
2943
|
CCardImage.propTypes = {
|
|
@@ -3049,7 +3103,7 @@ var CCarousel = React.forwardRef(function (_a, ref) {
|
|
|
3049
3103
|
setCustomInterval: setCustomInterval,
|
|
3050
3104
|
} },
|
|
3051
3105
|
indicators && (React__default["default"].createElement("ol", { className: "carousel-indicators" }, Array.from({ length: itemsNumber }, function (_, i) { return i; }).map(function (index) {
|
|
3052
|
-
return (React__default["default"].createElement("li", { key: "indicator"
|
|
3106
|
+
return (React__default["default"].createElement("li", { key: "indicator".concat(index), onClick: function () {
|
|
3053
3107
|
!animating && handleIndicatorClick(index);
|
|
3054
3108
|
}, className: active === index ? 'active' : '', "data-coreui-target": "" }));
|
|
3055
3109
|
}))),
|
|
@@ -3109,7 +3163,7 @@ var CCarouselItem = React.forwardRef(function (_a, ref) {
|
|
|
3109
3163
|
if (active) {
|
|
3110
3164
|
setCustomInterval(interval);
|
|
3111
3165
|
if (count !== 0)
|
|
3112
|
-
setOrderClassName("carousel-item-"
|
|
3166
|
+
setOrderClassName("carousel-item-".concat(direction));
|
|
3113
3167
|
}
|
|
3114
3168
|
if (prevActive.current && !active) {
|
|
3115
3169
|
setActiveClassName('active');
|
|
@@ -3121,7 +3175,7 @@ var CCarouselItem = React.forwardRef(function (_a, ref) {
|
|
|
3121
3175
|
// @ts-expect-error reflow is necessary to proper transition
|
|
3122
3176
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3123
3177
|
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
|
|
3124
|
-
setDirectionClassName("carousel-item-"
|
|
3178
|
+
setDirectionClassName("carousel-item-".concat(direction === 'next' ? 'start' : 'end'));
|
|
3125
3179
|
}
|
|
3126
3180
|
}, 0);
|
|
3127
3181
|
}
|
|
@@ -3410,29 +3464,32 @@ function getBasePlacement(placement) {
|
|
|
3410
3464
|
return placement.split('-')[0];
|
|
3411
3465
|
}
|
|
3412
3466
|
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3467
|
+
var max = Math.max;
|
|
3468
|
+
var min = Math.min;
|
|
3469
|
+
var round = Math.round;
|
|
3470
|
+
|
|
3471
|
+
function getBoundingClientRect(element, includeScale) {
|
|
3472
|
+
if (includeScale === void 0) {
|
|
3473
|
+
includeScale = false;
|
|
3474
|
+
}
|
|
3416
3475
|
|
|
3417
3476
|
var rect = element.getBoundingClientRect();
|
|
3418
3477
|
var scaleX = 1;
|
|
3419
|
-
var scaleY = 1;
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
// }
|
|
3435
|
-
// }
|
|
3478
|
+
var scaleY = 1;
|
|
3479
|
+
|
|
3480
|
+
if (isHTMLElement(element) && includeScale) {
|
|
3481
|
+
var offsetHeight = element.offsetHeight;
|
|
3482
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
3483
|
+
// Fallback to 1 in case both values are `0`
|
|
3484
|
+
|
|
3485
|
+
if (offsetWidth > 0) {
|
|
3486
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
3487
|
+
}
|
|
3488
|
+
|
|
3489
|
+
if (offsetHeight > 0) {
|
|
3490
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3436
3493
|
|
|
3437
3494
|
return {
|
|
3438
3495
|
width: rect.width / scaleX,
|
|
@@ -3587,13 +3644,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
3587
3644
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
3588
3645
|
}
|
|
3589
3646
|
|
|
3590
|
-
var max = Math.max;
|
|
3591
|
-
var min = Math.min;
|
|
3592
|
-
var round = Math.round;
|
|
3593
|
-
|
|
3594
3647
|
function within(min$1, value, max$1) {
|
|
3595
3648
|
return max(min$1, min(value, max$1));
|
|
3596
3649
|
}
|
|
3650
|
+
function withinMaxClamp(min, value, max) {
|
|
3651
|
+
var v = within(min, value, max);
|
|
3652
|
+
return v > max ? max : v;
|
|
3653
|
+
}
|
|
3597
3654
|
|
|
3598
3655
|
function getFreshSideObject() {
|
|
3599
3656
|
return {
|
|
@@ -3725,8 +3782,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
3725
3782
|
var win = window;
|
|
3726
3783
|
var dpr = win.devicePixelRatio || 1;
|
|
3727
3784
|
return {
|
|
3728
|
-
x: round(
|
|
3729
|
-
y: round(
|
|
3785
|
+
x: round(x * dpr) / dpr || 0,
|
|
3786
|
+
y: round(y * dpr) / dpr || 0
|
|
3730
3787
|
};
|
|
3731
3788
|
}
|
|
3732
3789
|
|
|
@@ -3741,7 +3798,8 @@ function mapToStyles(_ref2) {
|
|
|
3741
3798
|
position = _ref2.position,
|
|
3742
3799
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
3743
3800
|
adaptive = _ref2.adaptive,
|
|
3744
|
-
roundOffsets = _ref2.roundOffsets
|
|
3801
|
+
roundOffsets = _ref2.roundOffsets,
|
|
3802
|
+
isFixed = _ref2.isFixed;
|
|
3745
3803
|
|
|
3746
3804
|
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
|
|
3747
3805
|
_ref3$x = _ref3.x,
|
|
@@ -3773,16 +3831,18 @@ function mapToStyles(_ref2) {
|
|
|
3773
3831
|
offsetParent = offsetParent;
|
|
3774
3832
|
|
|
3775
3833
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
3776
|
-
sideY = bottom;
|
|
3777
|
-
|
|
3778
|
-
|
|
3834
|
+
sideY = bottom;
|
|
3835
|
+
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
3836
|
+
offsetParent[heightProp];
|
|
3837
|
+
y -= offsetY - popperRect.height;
|
|
3779
3838
|
y *= gpuAcceleration ? 1 : -1;
|
|
3780
3839
|
}
|
|
3781
3840
|
|
|
3782
3841
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
3783
|
-
sideX = right;
|
|
3784
|
-
|
|
3785
|
-
|
|
3842
|
+
sideX = right;
|
|
3843
|
+
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
3844
|
+
offsetParent[widthProp];
|
|
3845
|
+
x -= offsetX - popperRect.width;
|
|
3786
3846
|
x *= gpuAcceleration ? 1 : -1;
|
|
3787
3847
|
}
|
|
3788
3848
|
}
|
|
@@ -3825,7 +3885,8 @@ function computeStyles(_ref4) {
|
|
|
3825
3885
|
variation: getVariation(state.placement),
|
|
3826
3886
|
popper: state.elements.popper,
|
|
3827
3887
|
popperRect: state.rects.popper,
|
|
3828
|
-
gpuAcceleration: gpuAcceleration
|
|
3888
|
+
gpuAcceleration: gpuAcceleration,
|
|
3889
|
+
isFixed: state.options.strategy === 'fixed'
|
|
3829
3890
|
};
|
|
3830
3891
|
|
|
3831
3892
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -4083,7 +4144,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
4083
4144
|
}
|
|
4084
4145
|
|
|
4085
4146
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
4086
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
4147
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
4087
4148
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
4088
4149
|
// clipping (or hiding) overflowing elements with a position different from
|
|
4089
4150
|
// `initial`
|
|
@@ -4100,7 +4161,7 @@ function getClippingParents(element) {
|
|
|
4100
4161
|
|
|
4101
4162
|
|
|
4102
4163
|
return clippingParents.filter(function (clippingParent) {
|
|
4103
|
-
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
|
4164
|
+
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle$1(clippingParent).position !== 'static' : true);
|
|
4104
4165
|
});
|
|
4105
4166
|
} // Gets the maximum area that the element is visible in due to any number of
|
|
4106
4167
|
// clipping parents
|
|
@@ -4600,6 +4661,14 @@ function preventOverflow(_ref) {
|
|
|
4600
4661
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
4601
4662
|
placement: state.placement
|
|
4602
4663
|
})) : tetherOffset;
|
|
4664
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
4665
|
+
mainAxis: tetherOffsetValue,
|
|
4666
|
+
altAxis: tetherOffsetValue
|
|
4667
|
+
} : Object.assign({
|
|
4668
|
+
mainAxis: 0,
|
|
4669
|
+
altAxis: 0
|
|
4670
|
+
}, tetherOffsetValue);
|
|
4671
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
4603
4672
|
var data = {
|
|
4604
4673
|
x: 0,
|
|
4605
4674
|
y: 0
|
|
@@ -4609,13 +4678,15 @@ function preventOverflow(_ref) {
|
|
|
4609
4678
|
return;
|
|
4610
4679
|
}
|
|
4611
4680
|
|
|
4612
|
-
if (checkMainAxis
|
|
4681
|
+
if (checkMainAxis) {
|
|
4682
|
+
var _offsetModifierState$;
|
|
4683
|
+
|
|
4613
4684
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
4614
4685
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
4615
4686
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
4616
4687
|
var offset = popperOffsets[mainAxis];
|
|
4617
|
-
var min$1 =
|
|
4618
|
-
var max$1 =
|
|
4688
|
+
var min$1 = offset + overflow[mainSide];
|
|
4689
|
+
var max$1 = offset - overflow[altSide];
|
|
4619
4690
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
4620
4691
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
4621
4692
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -4635,36 +4706,45 @@ function preventOverflow(_ref) {
|
|
|
4635
4706
|
// width or height)
|
|
4636
4707
|
|
|
4637
4708
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
4638
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
4639
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
4709
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
4710
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
4640
4711
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
4641
4712
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
4642
|
-
var offsetModifierValue =
|
|
4643
|
-
var tetherMin =
|
|
4644
|
-
var tetherMax =
|
|
4713
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
4714
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
4715
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
4716
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
4717
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
4718
|
+
data[mainAxis] = preventedOffset - offset;
|
|
4719
|
+
}
|
|
4645
4720
|
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
4649
|
-
data[mainAxis] = preventedOffset - offset;
|
|
4650
|
-
}
|
|
4721
|
+
if (checkAltAxis) {
|
|
4722
|
+
var _offsetModifierState$2;
|
|
4651
4723
|
|
|
4652
|
-
|
|
4653
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
4724
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
4654
4725
|
|
|
4655
|
-
|
|
4726
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
4656
4727
|
|
|
4657
|
-
|
|
4728
|
+
var _offset = popperOffsets[altAxis];
|
|
4658
4729
|
|
|
4659
|
-
|
|
4730
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
4660
4731
|
|
|
4661
|
-
|
|
4732
|
+
var _min = _offset + overflow[_mainSide];
|
|
4662
4733
|
|
|
4663
|
-
|
|
4734
|
+
var _max = _offset - overflow[_altSide];
|
|
4664
4735
|
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4736
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
4737
|
+
|
|
4738
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
4739
|
+
|
|
4740
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
4741
|
+
|
|
4742
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
4743
|
+
|
|
4744
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
4745
|
+
|
|
4746
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
4747
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
4668
4748
|
}
|
|
4669
4749
|
|
|
4670
4750
|
state.modifiersData[name] = data;
|
|
@@ -4696,8 +4776,8 @@ function getNodeScroll(node) {
|
|
|
4696
4776
|
|
|
4697
4777
|
function isElementScaled(element) {
|
|
4698
4778
|
var rect = element.getBoundingClientRect();
|
|
4699
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
4700
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
4779
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
4780
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
4701
4781
|
return scaleX !== 1 || scaleY !== 1;
|
|
4702
4782
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
4703
4783
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -4709,9 +4789,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
4709
4789
|
}
|
|
4710
4790
|
|
|
4711
4791
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
4712
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
4792
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
4713
4793
|
var documentElement = getDocumentElement(offsetParent);
|
|
4714
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
4794
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
4715
4795
|
var scroll = {
|
|
4716
4796
|
scrollLeft: 0,
|
|
4717
4797
|
scrollTop: 0
|
|
@@ -4728,7 +4808,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
4728
4808
|
}
|
|
4729
4809
|
|
|
4730
4810
|
if (isHTMLElement(offsetParent)) {
|
|
4731
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
4811
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
4732
4812
|
offsets.x += offsetParent.clientLeft;
|
|
4733
4813
|
offsets.y += offsetParent.clientTop;
|
|
4734
4814
|
} else if (documentElement) {
|
|
@@ -5706,11 +5786,11 @@ var CDropdownMenu = function (_a) {
|
|
|
5706
5786
|
var classNames = [];
|
|
5707
5787
|
if (typeof alignment === 'object') {
|
|
5708
5788
|
Object.keys(alignment).map(function (key) {
|
|
5709
|
-
classNames.push("dropdown-menu"
|
|
5789
|
+
classNames.push("dropdown-menu".concat(key === 'xs' ? '' : "-".concat(key), "-").concat(alignment[key]));
|
|
5710
5790
|
});
|
|
5711
5791
|
}
|
|
5712
5792
|
if (typeof alignment === 'string') {
|
|
5713
|
-
classNames.push("dropdown-menu-"
|
|
5793
|
+
classNames.push("dropdown-menu-".concat(alignment));
|
|
5714
5794
|
}
|
|
5715
5795
|
return classNames;
|
|
5716
5796
|
};
|
|
@@ -5779,7 +5859,7 @@ CDropdownToggle.propTypes = {
|
|
|
5779
5859
|
};
|
|
5780
5860
|
CDropdownToggle.displayName = 'CDropdownToggle';
|
|
5781
5861
|
|
|
5782
|
-
var BREAKPOINTS$
|
|
5862
|
+
var BREAKPOINTS$3 = [
|
|
5783
5863
|
'xxl',
|
|
5784
5864
|
'xl',
|
|
5785
5865
|
'lg',
|
|
@@ -5789,33 +5869,33 @@ var BREAKPOINTS$2 = [
|
|
|
5789
5869
|
];
|
|
5790
5870
|
var CCol = React.forwardRef(function (_a, ref) {
|
|
5791
5871
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
5792
|
-
var
|
|
5793
|
-
BREAKPOINTS$
|
|
5872
|
+
var repsonsiveClassNames = [];
|
|
5873
|
+
BREAKPOINTS$3.forEach(function (bp) {
|
|
5794
5874
|
var breakpoint = rest[bp];
|
|
5795
5875
|
delete rest[bp];
|
|
5796
|
-
var infix = bp === 'xs' ? '' : "-"
|
|
5876
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
5797
5877
|
if (typeof breakpoint === 'number' || typeof breakpoint === 'string') {
|
|
5798
|
-
|
|
5878
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint));
|
|
5799
5879
|
}
|
|
5800
5880
|
if (typeof breakpoint === 'boolean') {
|
|
5801
|
-
|
|
5881
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
5802
5882
|
}
|
|
5803
5883
|
if (breakpoint && typeof breakpoint === 'object') {
|
|
5804
5884
|
if (typeof breakpoint.span === 'number' || typeof breakpoint.span === 'string') {
|
|
5805
|
-
|
|
5885
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint.span));
|
|
5806
5886
|
}
|
|
5807
5887
|
if (typeof breakpoint.span === 'boolean') {
|
|
5808
|
-
|
|
5888
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
5809
5889
|
}
|
|
5810
5890
|
if (typeof breakpoint.order === 'number' || typeof breakpoint.order === 'string') {
|
|
5811
|
-
|
|
5891
|
+
repsonsiveClassNames.push("order".concat(infix, "-").concat(breakpoint.order));
|
|
5812
5892
|
}
|
|
5813
5893
|
if (typeof breakpoint.offset === 'number') {
|
|
5814
|
-
|
|
5894
|
+
repsonsiveClassNames.push("offset".concat(infix, "-").concat(breakpoint.offset));
|
|
5815
5895
|
}
|
|
5816
5896
|
}
|
|
5817
5897
|
});
|
|
5818
|
-
var _className = classNames$1(
|
|
5898
|
+
var _className = classNames$1(repsonsiveClassNames.length ? repsonsiveClassNames : 'col', className);
|
|
5819
5899
|
return (React__default["default"].createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
5820
5900
|
});
|
|
5821
5901
|
var span = PropTypes$1.oneOfType([
|
|
@@ -5844,7 +5924,7 @@ CCol.propTypes = {
|
|
|
5844
5924
|
};
|
|
5845
5925
|
CCol.displayName = 'CCol';
|
|
5846
5926
|
|
|
5847
|
-
var BREAKPOINTS$
|
|
5927
|
+
var BREAKPOINTS$2 = [
|
|
5848
5928
|
'xxl',
|
|
5849
5929
|
'xl',
|
|
5850
5930
|
'lg',
|
|
@@ -5854,13 +5934,13 @@ var BREAKPOINTS$1 = [
|
|
|
5854
5934
|
];
|
|
5855
5935
|
var CContainer = React.forwardRef(function (_a, ref) {
|
|
5856
5936
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
5857
|
-
var
|
|
5858
|
-
BREAKPOINTS$
|
|
5937
|
+
var repsonsiveClassNames = [];
|
|
5938
|
+
BREAKPOINTS$2.forEach(function (bp) {
|
|
5859
5939
|
var breakpoint = rest[bp];
|
|
5860
5940
|
delete rest[bp];
|
|
5861
|
-
breakpoint &&
|
|
5941
|
+
breakpoint && repsonsiveClassNames.push("container-".concat(bp));
|
|
5862
5942
|
});
|
|
5863
|
-
var _className = classNames$1(
|
|
5943
|
+
var _className = classNames$1(repsonsiveClassNames.length ? repsonsiveClassNames : 'container', className);
|
|
5864
5944
|
return (React__default["default"].createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
5865
5945
|
});
|
|
5866
5946
|
CContainer.propTypes = {
|
|
@@ -5875,7 +5955,7 @@ CContainer.propTypes = {
|
|
|
5875
5955
|
};
|
|
5876
5956
|
CContainer.displayName = 'CContainer';
|
|
5877
5957
|
|
|
5878
|
-
var BREAKPOINTS = [
|
|
5958
|
+
var BREAKPOINTS$1 = [
|
|
5879
5959
|
'xxl',
|
|
5880
5960
|
'xl',
|
|
5881
5961
|
'lg',
|
|
@@ -5885,27 +5965,27 @@ var BREAKPOINTS = [
|
|
|
5885
5965
|
];
|
|
5886
5966
|
var CRow = React.forwardRef(function (_a, ref) {
|
|
5887
5967
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
5888
|
-
var
|
|
5889
|
-
BREAKPOINTS.forEach(function (bp) {
|
|
5968
|
+
var repsonsiveClassNames = [];
|
|
5969
|
+
BREAKPOINTS$1.forEach(function (bp) {
|
|
5890
5970
|
var breakpoint = rest[bp];
|
|
5891
5971
|
delete rest[bp];
|
|
5892
|
-
var infix = bp === 'xs' ? '' : "-"
|
|
5972
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
5893
5973
|
if (typeof breakpoint === 'object') {
|
|
5894
5974
|
if (breakpoint.cols) {
|
|
5895
|
-
|
|
5975
|
+
repsonsiveClassNames.push("row-cols".concat(infix, "-").concat(breakpoint.cols));
|
|
5896
5976
|
}
|
|
5897
5977
|
if (typeof breakpoint.gutter === 'number') {
|
|
5898
|
-
|
|
5978
|
+
repsonsiveClassNames.push("g".concat(infix, "-").concat(breakpoint.gutter));
|
|
5899
5979
|
}
|
|
5900
5980
|
if (typeof breakpoint.gutterX === 'number') {
|
|
5901
|
-
|
|
5981
|
+
repsonsiveClassNames.push("gx".concat(infix, "-").concat(breakpoint.gutterX));
|
|
5902
5982
|
}
|
|
5903
5983
|
if (typeof breakpoint.gutterY === 'number') {
|
|
5904
|
-
|
|
5984
|
+
repsonsiveClassNames.push("gy".concat(infix, "-").concat(breakpoint.gutterY));
|
|
5905
5985
|
}
|
|
5906
5986
|
}
|
|
5907
5987
|
});
|
|
5908
|
-
var _className = classNames$1('row',
|
|
5988
|
+
var _className = classNames$1('row', repsonsiveClassNames, className);
|
|
5909
5989
|
return (React__default["default"].createElement("div", { className: _className, ref: ref }, children));
|
|
5910
5990
|
});
|
|
5911
5991
|
var bp = PropTypes$1.shape({
|
|
@@ -5929,7 +6009,7 @@ CRow.displayName = 'CRow';
|
|
|
5929
6009
|
var CFooter = React.forwardRef(function (_a, ref) {
|
|
5930
6010
|
var _b;
|
|
5931
6011
|
var children = _a.children, className = _a.className, position = _a.position, rest = __rest$1(_a, ["children", "className", "position"]);
|
|
5932
|
-
var _className = classNames$1('footer', (_b = {}, _b["footer-"
|
|
6012
|
+
var _className = classNames$1('footer', (_b = {}, _b["footer-".concat(position)] = position, _b), className);
|
|
5933
6013
|
return (React__default["default"].createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
5934
6014
|
});
|
|
5935
6015
|
CFooter.propTypes = {
|
|
@@ -5965,7 +6045,14 @@ CFormLabel.displayName = 'CFormLabel';
|
|
|
5965
6045
|
|
|
5966
6046
|
var CFormCheck = React.forwardRef(function (_a, ref) {
|
|
5967
6047
|
var _b;
|
|
5968
|
-
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$1(_a, ["className", "button", "hitArea", "id", "inline", "invalid", "label", "type", "valid"]);
|
|
6048
|
+
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$1(_a, ["className", "button", "hitArea", "id", "indeterminate", "inline", "invalid", "label", "type", "valid"]);
|
|
6049
|
+
var inputRef = React.useRef(null);
|
|
6050
|
+
var forkedRef = useForkedRef(ref, inputRef);
|
|
6051
|
+
React.useEffect(function () {
|
|
6052
|
+
if (inputRef.current && indeterminate) {
|
|
6053
|
+
inputRef.current.indeterminate = indeterminate;
|
|
6054
|
+
}
|
|
6055
|
+
}, [indeterminate]);
|
|
5969
6056
|
var _className = classNames$1('form-check', {
|
|
5970
6057
|
'form-check-inline': inline,
|
|
5971
6058
|
'is-invalid': invalid,
|
|
@@ -5977,12 +6064,12 @@ var CFormCheck = React.forwardRef(function (_a, ref) {
|
|
|
5977
6064
|
'me-2': hitArea,
|
|
5978
6065
|
});
|
|
5979
6066
|
var labelClassName = classNames$1(button
|
|
5980
|
-
? classNames$1('btn', button.variant ? "btn-"
|
|
5981
|
-
_b["btn-"
|
|
5982
|
-
_b), ""
|
|
6067
|
+
? classNames$1('btn', button.variant ? "btn-".concat(button.variant, "-").concat(button.color) : "btn-".concat(button.color), (_b = {},
|
|
6068
|
+
_b["btn-".concat(button.size)] = button.size,
|
|
6069
|
+
_b), "".concat(button.shape))
|
|
5983
6070
|
: 'form-check-label');
|
|
5984
6071
|
var formControl = function () {
|
|
5985
|
-
return React__default["default"].createElement("input", __assign$1({ type: type, className: inputClassName, id: id }, rest, { ref:
|
|
6072
|
+
return React__default["default"].createElement("input", __assign$1({ type: type, className: inputClassName, id: id }, rest, { ref: forkedRef }));
|
|
5986
6073
|
};
|
|
5987
6074
|
var formLabel = function () {
|
|
5988
6075
|
return (React__default["default"].createElement(CFormLabel, __assign$1({ customClassName: labelClassName }, (id && { htmlFor: id })), label));
|
|
@@ -6000,6 +6087,7 @@ CFormCheck.propTypes = {
|
|
|
6000
6087
|
className: PropTypes$1.string,
|
|
6001
6088
|
hitArea: PropTypes$1.oneOf(['full']),
|
|
6002
6089
|
id: PropTypes$1.string,
|
|
6090
|
+
indeterminate: PropTypes$1.bool,
|
|
6003
6091
|
inline: PropTypes$1.bool,
|
|
6004
6092
|
invalid: PropTypes$1.bool,
|
|
6005
6093
|
label: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
@@ -6012,8 +6100,8 @@ var CFormFeedback = React.forwardRef(function (_a, ref) {
|
|
|
6012
6100
|
var _b;
|
|
6013
6101
|
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$1(_a, ["children", "className", "component", "invalid", "tooltip", "valid"]);
|
|
6014
6102
|
var _className = classNames$1((_b = {},
|
|
6015
|
-
_b["invalid-"
|
|
6016
|
-
_b["valid-"
|
|
6103
|
+
_b["invalid-".concat(tooltip ? 'tooltip' : 'feedback')] = invalid,
|
|
6104
|
+
_b["valid-".concat(tooltip ? 'tooltip' : 'feedback')] = valid,
|
|
6017
6105
|
_b), className);
|
|
6018
6106
|
return (React__default["default"].createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
6019
6107
|
});
|
|
@@ -6042,7 +6130,7 @@ var CFormInput = React.forwardRef(function (_a, ref) {
|
|
|
6042
6130
|
var _b;
|
|
6043
6131
|
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$1(_a, ["children", "className", "invalid", "plainText", "size", "type", "valid"]);
|
|
6044
6132
|
var _className = classNames$1(plainText ? 'form-control-plaintext' : 'form-control', (_b = {},
|
|
6045
|
-
_b["form-control-"
|
|
6133
|
+
_b["form-control-".concat(size)] = size,
|
|
6046
6134
|
_b['form-control-color'] = type === 'color',
|
|
6047
6135
|
_b['is-invalid'] = invalid,
|
|
6048
6136
|
_b['is-valid'] = valid,
|
|
@@ -6072,19 +6160,25 @@ CFormRange.displayName = 'CFormRange';
|
|
|
6072
6160
|
|
|
6073
6161
|
var CFormSelect = React.forwardRef(function (_a, ref) {
|
|
6074
6162
|
var _b;
|
|
6075
|
-
var children = _a.children, className = _a.className, htmlSize = _a.htmlSize, invalid = _a.invalid, size = _a.size, valid = _a.valid, rest = __rest$1(_a, ["children", "className", "htmlSize", "invalid", "size", "valid"]);
|
|
6163
|
+
var children = _a.children, className = _a.className, htmlSize = _a.htmlSize, invalid = _a.invalid, options = _a.options, size = _a.size, valid = _a.valid, rest = __rest$1(_a, ["children", "className", "htmlSize", "invalid", "options", "size", "valid"]);
|
|
6076
6164
|
var _className = classNames$1('form-select', (_b = {},
|
|
6077
|
-
_b["form-select-"
|
|
6165
|
+
_b["form-select-".concat(size)] = size,
|
|
6078
6166
|
_b['is-invalid'] = invalid,
|
|
6079
6167
|
_b['is-valid'] = valid,
|
|
6080
6168
|
_b), className);
|
|
6081
|
-
return (React__default["default"].createElement("select", __assign$1({ className: _className, size: htmlSize }, rest, { ref: ref }),
|
|
6169
|
+
return (React__default["default"].createElement("select", __assign$1({ className: _className, size: htmlSize }, rest, { ref: ref }), options
|
|
6170
|
+
? options.map(function (option, index) {
|
|
6171
|
+
return (React__default["default"].createElement("option", __assign$1({}, (typeof option === 'object' &&
|
|
6172
|
+
option.disabled && { disabled: option.disabled }), (typeof option === 'object' && option.value && { value: option.value }), { key: index }), typeof option === 'string' ? option : option.label));
|
|
6173
|
+
})
|
|
6174
|
+
: children));
|
|
6082
6175
|
});
|
|
6083
6176
|
CFormSelect.propTypes = {
|
|
6084
6177
|
children: PropTypes$1.node,
|
|
6085
6178
|
className: PropTypes$1.string,
|
|
6086
6179
|
htmlSize: PropTypes$1.number,
|
|
6087
6180
|
invalid: PropTypes$1.bool,
|
|
6181
|
+
options: PropTypes$1.array,
|
|
6088
6182
|
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
6089
6183
|
valid: PropTypes$1.bool,
|
|
6090
6184
|
};
|
|
@@ -6094,7 +6188,7 @@ var CFormSwitch = React.forwardRef(function (_a, ref) {
|
|
|
6094
6188
|
var _b;
|
|
6095
6189
|
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$1(_a, ["className", "id", "invalid", "label", "size", "type", "valid"]);
|
|
6096
6190
|
var _className = classNames$1('form-check form-switch', (_b = {},
|
|
6097
|
-
_b["form-switch-"
|
|
6191
|
+
_b["form-switch-".concat(size)] = size,
|
|
6098
6192
|
_b['is-invalid'] = invalid,
|
|
6099
6193
|
_b['is-valid'] = valid,
|
|
6100
6194
|
_b), className);
|
|
@@ -6151,7 +6245,7 @@ var CInputGroup = React.forwardRef(function (_a, ref) {
|
|
|
6151
6245
|
var _b;
|
|
6152
6246
|
var children = _a.children, className = _a.className, size = _a.size, rest = __rest$1(_a, ["children", "className", "size"]);
|
|
6153
6247
|
var _className = classNames$1('input-group', (_b = {},
|
|
6154
|
-
_b["input-group-"
|
|
6248
|
+
_b["input-group-".concat(size)] = size,
|
|
6155
6249
|
_b), className);
|
|
6156
6250
|
return (React__default["default"].createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
6157
6251
|
});
|
|
@@ -6177,10 +6271,10 @@ CInputGroupText.displayName = 'CInputGroupText';
|
|
|
6177
6271
|
var CHeader = React.forwardRef(function (_a, ref) {
|
|
6178
6272
|
var _b;
|
|
6179
6273
|
var children = _a.children, className = _a.className, container = _a.container, position = _a.position, rest = __rest$1(_a, ["children", "className", "container", "position"]);
|
|
6180
|
-
var _className = classNames$1('header', (_b = {}, _b["header-"
|
|
6274
|
+
var _className = classNames$1('header', (_b = {}, _b["header-".concat(position)] = position, _b), className);
|
|
6181
6275
|
var content;
|
|
6182
6276
|
if (container) {
|
|
6183
|
-
content = (React__default["default"].createElement("div", { className: "container"
|
|
6277
|
+
content = (React__default["default"].createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
6184
6278
|
}
|
|
6185
6279
|
else {
|
|
6186
6280
|
content = children;
|
|
@@ -6265,7 +6359,7 @@ var CImage = React.forwardRef(function (_a, ref) {
|
|
|
6265
6359
|
var _b;
|
|
6266
6360
|
var align = _a.align, className = _a.className, fluid = _a.fluid, rounded = _a.rounded, thumbnail = _a.thumbnail, rest = __rest$1(_a, ["align", "className", "fluid", "rounded", "thumbnail"]);
|
|
6267
6361
|
var _className = classNames$1((_b = {},
|
|
6268
|
-
_b["float-"
|
|
6362
|
+
_b["float-".concat(align)] = align && (align === 'start' || align === 'end'),
|
|
6269
6363
|
_b['d-block mx-auto'] = align && align === 'center',
|
|
6270
6364
|
_b['img-fluid'] = fluid,
|
|
6271
6365
|
_b.rounded = rounded,
|
|
@@ -6288,7 +6382,7 @@ var CListGroup = React.forwardRef(function (_a, ref) {
|
|
|
6288
6382
|
var _className = classNames$1('list-group', (_b = {
|
|
6289
6383
|
'list-group-flush': flush
|
|
6290
6384
|
},
|
|
6291
|
-
_b["list-group-"
|
|
6385
|
+
_b["list-group-".concat(layout)] = layout,
|
|
6292
6386
|
_b), className);
|
|
6293
6387
|
return (React__default["default"].createElement(Component, { className: _className, ref: ref }, children));
|
|
6294
6388
|
});
|
|
@@ -6312,7 +6406,7 @@ var CListGroupItem = React.forwardRef(function (_a, ref) {
|
|
|
6312
6406
|
var _b;
|
|
6313
6407
|
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$1(_a, ["children", "active", "className", "disabled", "color", "component"]);
|
|
6314
6408
|
var _className = classNames$1('list-group-item', (_b = {},
|
|
6315
|
-
_b["list-group-item-"
|
|
6409
|
+
_b["list-group-item-".concat(color)] = color,
|
|
6316
6410
|
_b['list-group-item-action'] = component === 'a' || component === 'button',
|
|
6317
6411
|
_b.active = active,
|
|
6318
6412
|
_b.disabled = disabled,
|
|
@@ -6338,7 +6432,7 @@ CListGroupItem.displayName = 'CListGroupItem';
|
|
|
6338
6432
|
|
|
6339
6433
|
var CSpinner = React.forwardRef(function (_a, ref) {
|
|
6340
6434
|
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$1(_a, ["className", "color", "component", "size", "variant", "visuallyHiddenLabel"]);
|
|
6341
|
-
var _className = classNames$1("spinner-"
|
|
6435
|
+
var _className = classNames$1("spinner-".concat(variant), "text-".concat(color), size && "spinner-".concat(variant, "-").concat(size), className);
|
|
6342
6436
|
return (React__default["default"].createElement(Component, __assign$1({ className: _className, role: "status" }, rest, { ref: ref }),
|
|
6343
6437
|
React__default["default"].createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
6344
6438
|
});
|
|
@@ -6402,9 +6496,9 @@ var CModalDialog = React.forwardRef(function (_a, ref) {
|
|
|
6402
6496
|
},
|
|
6403
6497
|
_b[typeof fullscreen === 'boolean'
|
|
6404
6498
|
? 'modal-fullscreen'
|
|
6405
|
-
: "modal-fullscreen-"
|
|
6499
|
+
: "modal-fullscreen-".concat(fullscreen, "-down")] = fullscreen,
|
|
6406
6500
|
_b['modal-dialog-scrollable'] = scrollable,
|
|
6407
|
-
_b["modal-"
|
|
6501
|
+
_b["modal-".concat(size)] = size,
|
|
6408
6502
|
_b), className);
|
|
6409
6503
|
return (React__default["default"].createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
6410
6504
|
});
|
|
@@ -6640,7 +6734,7 @@ var CMultiSelectSelection = React.forwardRef(function (_a, ref) {
|
|
|
6640
6734
|
multiple &&
|
|
6641
6735
|
selectionType === 'counter' &&
|
|
6642
6736
|
!search &&
|
|
6643
|
-
selected.length
|
|
6737
|
+
"".concat(selected.length, " ").concat(selectionTypeCounterText),
|
|
6644
6738
|
multiple &&
|
|
6645
6739
|
selectionType === 'tags' &&
|
|
6646
6740
|
selected.map(function (option, index) {
|
|
@@ -6815,7 +6909,7 @@ var CMultiSelect = React.forwardRef(function (_a, ref) {
|
|
|
6815
6909
|
multiple && cleaner && selected.length > 0 && (React__default["default"].createElement(CMultiSelectCleaner, { onClick: function () { return handleDeselectAll(); } })),
|
|
6816
6910
|
search && (React__default["default"].createElement(CMultiSelectSearchInput, __assign$1({}, (selected.length === 0 && { placeholder: placeholder }), (selected.length &&
|
|
6817
6911
|
selectionType === 'counter' && {
|
|
6818
|
-
placeholder: selected.length
|
|
6912
|
+
placeholder: "".concat(selected.length, " ").concat(selectionTypeCounterText),
|
|
6819
6913
|
}), (selected.length &&
|
|
6820
6914
|
!multiple && { placeholder: selected.map(function (option) { return option.text; })[0] }), { onChange: function (event) { return handleSearchChange(event); }, onKeyDown: function (event) { return handleSearchKeyDown(event); } }, (multiple &&
|
|
6821
6915
|
selected.length &&
|
|
@@ -6847,8 +6941,8 @@ var CNav = React.forwardRef(function (_a, ref) {
|
|
|
6847
6941
|
var _b;
|
|
6848
6942
|
var children = _a.children, className = _a.className, _c = _a.component, Component = _c === void 0 ? 'ul' : _c, layout = _a.layout, variant = _a.variant, rest = __rest$1(_a, ["children", "className", "component", "layout", "variant"]);
|
|
6849
6943
|
var _className = classNames$1('nav', (_b = {},
|
|
6850
|
-
_b["nav-"
|
|
6851
|
-
_b["nav-"
|
|
6944
|
+
_b["nav-".concat(layout)] = layout,
|
|
6945
|
+
_b["nav-".concat(variant)] = variant,
|
|
6852
6946
|
_b), className);
|
|
6853
6947
|
return (React__default["default"].createElement(Component, __assign$1({ className: _className, role: "navigation" }, rest, { ref: ref }), children));
|
|
6854
6948
|
});
|
|
@@ -6884,7 +6978,7 @@ var CSidebarNav = React.forwardRef(function (_a, ref) {
|
|
|
6884
6978
|
return (React__default["default"].createElement("ul", __assign$1({ className: classes, ref: ref }, rest),
|
|
6885
6979
|
React__default["default"].createElement(CNavContext.Provider, { value: CNavContextValues }, React__default["default"].Children.map(children, function (child, index) {
|
|
6886
6980
|
if (React__default["default"].isValidElement(child)) {
|
|
6887
|
-
return React__default["default"].cloneElement(child, { key: index, idx: ""
|
|
6981
|
+
return React__default["default"].cloneElement(child, { key: index, idx: "".concat(index) });
|
|
6888
6982
|
}
|
|
6889
6983
|
return;
|
|
6890
6984
|
}))));
|
|
@@ -6944,7 +7038,7 @@ var CNavGroup = React.forwardRef(function (_a, ref) {
|
|
|
6944
7038
|
compact: compact,
|
|
6945
7039
|
}), style: __assign$1(__assign$1({}, style), transitionStyles[state]), ref: navItemsRef }, React__default["default"].Children.map(children, function (child, index) {
|
|
6946
7040
|
if (React__default["default"].isValidElement(child)) {
|
|
6947
|
-
return React__default["default"].cloneElement(child, { key: index, idx: idx
|
|
7041
|
+
return React__default["default"].cloneElement(child, { key: index, idx: "".concat(idx, ".").concat(index) });
|
|
6948
7042
|
}
|
|
6949
7043
|
return;
|
|
6950
7044
|
}))); })));
|
|
@@ -7008,13 +7102,13 @@ var CNavbar = React.forwardRef(function (_a, ref) {
|
|
|
7008
7102
|
var _b;
|
|
7009
7103
|
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$1(_a, ["children", "className", "color", "colorScheme", "component", "container", "expand", "placement"]);
|
|
7010
7104
|
var _className = classNames$1('navbar', (_b = {},
|
|
7011
|
-
_b["bg-"
|
|
7012
|
-
_b["navbar-"
|
|
7013
|
-
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-"
|
|
7105
|
+
_b["bg-".concat(color)] = color,
|
|
7106
|
+
_b["navbar-".concat(colorScheme)] = colorScheme,
|
|
7107
|
+
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-".concat(expand)] = expand,
|
|
7014
7108
|
_b), placement, className);
|
|
7015
7109
|
var content;
|
|
7016
7110
|
if (container) {
|
|
7017
|
-
content = (React__default["default"].createElement("div", { className: "container"
|
|
7111
|
+
content = (React__default["default"].createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
7018
7112
|
}
|
|
7019
7113
|
else {
|
|
7020
7114
|
content = children;
|
|
@@ -7097,8 +7191,8 @@ var CPagination = React.forwardRef(function (_a, ref) {
|
|
|
7097
7191
|
var _b;
|
|
7098
7192
|
var children = _a.children, align = _a.align, className = _a.className, size = _a.size, rest = __rest$1(_a, ["children", "align", "className", "size"]);
|
|
7099
7193
|
var _className = classNames$1('pagination', (_b = {},
|
|
7100
|
-
_b["justify-content-"
|
|
7101
|
-
_b["pagination-"
|
|
7194
|
+
_b["justify-content-".concat(align)] = align,
|
|
7195
|
+
_b["pagination-".concat(size)] = size,
|
|
7102
7196
|
_b), className);
|
|
7103
7197
|
return (React__default["default"].createElement("nav", __assign$1({ ref: ref }, rest),
|
|
7104
7198
|
React__default["default"].createElement("ul", { className: _className }, children)));
|
|
@@ -7132,7 +7226,7 @@ var CSmartPagination = React.forwardRef(function (_a, ref) {
|
|
|
7132
7226
|
React.useEffect(function () {
|
|
7133
7227
|
pages < activePage && onActivePageChange(pages, true);
|
|
7134
7228
|
}, [pages]);
|
|
7135
|
-
var _classNames = classNames$1("justify-content-"
|
|
7229
|
+
var _classNames = classNames$1("justify-content-".concat(align), className);
|
|
7136
7230
|
var showDots = (function () {
|
|
7137
7231
|
return dots && limit > 4 && limit < pages;
|
|
7138
7232
|
})();
|
|
@@ -7184,7 +7278,7 @@ var CSmartPagination = React.forwardRef(function (_a, ref) {
|
|
|
7184
7278
|
arrows && (React__default["default"].createElement(CPaginationItem, { onClick: function () { return setPage(activePage - 1); }, "aria-label": "Go to previous page", "aria-disabled": activePage === 1, disabled: activePage === 1 }, previousButton)),
|
|
7185
7279
|
beforeDots && (React__default["default"].createElement(CPaginationItem, { role: "separator", disabled: true }, "\u2026")),
|
|
7186
7280
|
items.map(function (i) {
|
|
7187
|
-
return (React__default["default"].createElement(CPaginationItem, { onClick: function () { return setPage(i); }, "aria-label": activePage === i ? "Current page "
|
|
7281
|
+
return (React__default["default"].createElement(CPaginationItem, { onClick: function () { return setPage(i); }, "aria-label": activePage === i ? "Current page ".concat(i) : "Go to page ".concat(i), active: activePage === i, key: i }, i));
|
|
7188
7282
|
}),
|
|
7189
7283
|
afterDots && (React__default["default"].createElement(CPaginationItem, { role: "separator", disabled: true }, "\u2026")),
|
|
7190
7284
|
arrows && (React__default["default"].createElement(CPaginationItem, { onClick: function () { return setPage(activePage + 1); }, "aria-label": "Go to next page", "aria-disabled": activePage === pages, disabled: activePage === pages }, nextButton)),
|
|
@@ -7208,6 +7302,45 @@ CSmartPagination.propTypes = {
|
|
|
7208
7302
|
};
|
|
7209
7303
|
CSmartPagination.displayName = 'CSmartPagination';
|
|
7210
7304
|
|
|
7305
|
+
var BREAKPOINTS = [
|
|
7306
|
+
'xxl',
|
|
7307
|
+
'xl',
|
|
7308
|
+
'lg',
|
|
7309
|
+
'md',
|
|
7310
|
+
'sm',
|
|
7311
|
+
'xs',
|
|
7312
|
+
];
|
|
7313
|
+
var CPlaceholder = React.forwardRef(function (_a, ref) {
|
|
7314
|
+
var _b;
|
|
7315
|
+
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$1(_a, ["children", "animation", "className", "color", "component", "size"]);
|
|
7316
|
+
var repsonsiveClassNames = [];
|
|
7317
|
+
BREAKPOINTS.forEach(function (bp) {
|
|
7318
|
+
var breakpoint = rest[bp];
|
|
7319
|
+
delete rest[bp];
|
|
7320
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
7321
|
+
if (typeof breakpoint === 'number') {
|
|
7322
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint));
|
|
7323
|
+
}
|
|
7324
|
+
if (typeof breakpoint === 'boolean') {
|
|
7325
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
7326
|
+
}
|
|
7327
|
+
});
|
|
7328
|
+
var _className = classNames$1(animation ? "placeholder-".concat(animation) : 'placeholder', (_b = {},
|
|
7329
|
+
_b["bg-".concat(color)] = color,
|
|
7330
|
+
_b["placeholder-".concat(size)] = size,
|
|
7331
|
+
_b), repsonsiveClassNames, className);
|
|
7332
|
+
return (React__default["default"].createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7333
|
+
});
|
|
7334
|
+
CPlaceholder.propTypes = {
|
|
7335
|
+
animation: PropTypes$1.oneOf(['glow', 'wave']),
|
|
7336
|
+
children: PropTypes$1.node,
|
|
7337
|
+
className: PropTypes$1.string,
|
|
7338
|
+
color: colorPropType,
|
|
7339
|
+
component: PropTypes$1.elementType,
|
|
7340
|
+
size: PropTypes$1.oneOf(['xs', 'sm', 'lg']),
|
|
7341
|
+
};
|
|
7342
|
+
CPlaceholder.displayName = 'CPlaceholder';
|
|
7343
|
+
|
|
7211
7344
|
var CPopover = function (_a) {
|
|
7212
7345
|
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$1(_a, ["children", "content", "placement", "offset", "onHide", "onShow", "title", "trigger", "visible"]);
|
|
7213
7346
|
var _e = React.useState(visible), _visible = _e[0], setVisible = _e[1];
|
|
@@ -7248,7 +7381,7 @@ var CPopover = function (_a) {
|
|
|
7248
7381
|
},
|
|
7249
7382
|
] }, function (_a) {
|
|
7250
7383
|
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
7251
|
-
return (React__default["default"].createElement("div", __assign$1({ className: classNames$1("popover bs-popover-"
|
|
7384
|
+
return (React__default["default"].createElement("div", __assign$1({ className: classNames$1("popover bs-popover-".concat(placement === 'left' ? 'start' : placement === 'right' ? 'end' : placement), transitionClass), ref: ref, role: "tooltip", style: style }, rest),
|
|
7252
7385
|
React__default["default"].createElement("div", __assign$1({ className: "popover-arrow" }, arrowProps)),
|
|
7253
7386
|
React__default["default"].createElement("div", { className: "popover-header" }, title),
|
|
7254
7387
|
React__default["default"].createElement("div", { className: "popover-body" }, content)));
|
|
@@ -7257,12 +7390,12 @@ var CPopover = function (_a) {
|
|
|
7257
7390
|
};
|
|
7258
7391
|
CPopover.propTypes = {
|
|
7259
7392
|
children: PropTypes$1.any,
|
|
7260
|
-
content: PropTypes$1.node,
|
|
7393
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
7261
7394
|
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
7262
7395
|
offset: PropTypes$1.any,
|
|
7263
7396
|
onHide: PropTypes$1.func,
|
|
7264
7397
|
onShow: PropTypes$1.func,
|
|
7265
|
-
title: PropTypes$1.string,
|
|
7398
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
7266
7399
|
trigger: triggerPropType,
|
|
7267
7400
|
visible: PropTypes$1.bool,
|
|
7268
7401
|
};
|
|
@@ -7272,11 +7405,11 @@ var CProgressBar = React.forwardRef(function (_a, ref) {
|
|
|
7272
7405
|
var _b;
|
|
7273
7406
|
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$1(_a, ["children", "animated", "className", "color", "value", "variant"]);
|
|
7274
7407
|
var _className = classNames$1('progress-bar', (_b = {},
|
|
7275
|
-
_b["bg-"
|
|
7276
|
-
_b["progress-bar-"
|
|
7408
|
+
_b["bg-".concat(color)] = color,
|
|
7409
|
+
_b["progress-bar-".concat(variant)] = variant,
|
|
7277
7410
|
_b['progress-bar-animated'] = animated,
|
|
7278
7411
|
_b), className);
|
|
7279
|
-
return (React__default["default"].createElement("div", __assign$1({ className: _className, role: "progressbar", style: { width: value
|
|
7412
|
+
return (React__default["default"].createElement("div", __assign$1({ className: _className, role: "progressbar", style: { width: "".concat(value, "%") }, "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": 100 }, rest, { ref: ref }), children));
|
|
7280
7413
|
});
|
|
7281
7414
|
CProgressBar.propTypes = {
|
|
7282
7415
|
animated: PropTypes$1.bool,
|
|
@@ -7294,7 +7427,7 @@ var CProgress = React.forwardRef(function (_a, ref) {
|
|
|
7294
7427
|
'progress-thin': thin,
|
|
7295
7428
|
'progress-white': white,
|
|
7296
7429
|
}, className);
|
|
7297
|
-
return (React__default["default"].createElement("div", { className: _className, style: height ? { height: height
|
|
7430
|
+
return (React__default["default"].createElement("div", { className: _className, style: height ? { height: "".concat(height, "px") } : {}, ref: ref }, value ? (React__default["default"].createElement(CProgressBar, __assign$1({ value: value }, rest), children)) : (children)));
|
|
7298
7431
|
});
|
|
7299
7432
|
CProgress.propTypes = {
|
|
7300
7433
|
children: PropTypes$1.node,
|
|
@@ -7388,12 +7521,12 @@ var CSidebar = React.forwardRef(function (_a, ref) {
|
|
|
7388
7521
|
handleHide();
|
|
7389
7522
|
};
|
|
7390
7523
|
var _className = classNames$1('sidebar', (_b = {},
|
|
7391
|
-
_b["sidebar-"
|
|
7524
|
+
_b["sidebar-".concat(colorScheme)] = colorScheme,
|
|
7392
7525
|
_b['sidebar-narrow'] = narrow,
|
|
7393
7526
|
_b['sidebar-overlaid'] = overlaid,
|
|
7394
|
-
_b["sidebar-"
|
|
7395
|
-
_b["sidebar-"
|
|
7396
|
-
_b["sidebar-"
|
|
7527
|
+
_b["sidebar-".concat(placement)] = placement,
|
|
7528
|
+
_b["sidebar-".concat(position)] = position,
|
|
7529
|
+
_b["sidebar-".concat(size)] = size,
|
|
7397
7530
|
_b['sidebar-narrow-unfoldable'] = unfoldable,
|
|
7398
7531
|
_b.show = _visible === true && mobile,
|
|
7399
7532
|
_b.hide = _visible === false && !mobile,
|
|
@@ -7444,7 +7577,7 @@ var COffcanvas = React.forwardRef(function (_a, ref) {
|
|
|
7444
7577
|
}
|
|
7445
7578
|
}, [_visible]);
|
|
7446
7579
|
var _className = classNames$1('offcanvas', (_b = {},
|
|
7447
|
-
_b["offcanvas-"
|
|
7580
|
+
_b["offcanvas-".concat(placement)] = placement,
|
|
7448
7581
|
_b.show = _visible,
|
|
7449
7582
|
_b), className);
|
|
7450
7583
|
var transitionStyles = {
|
|
@@ -7473,8 +7606,8 @@ var COffcanvas = React.forwardRef(function (_a, ref) {
|
|
|
7473
7606
|
}),
|
|
7474
7607
|
typeof window !== 'undefined' && portal
|
|
7475
7608
|
? backdrop &&
|
|
7476
|
-
ReactDOM.createPortal(React__default["default"].createElement(CBackdrop, {
|
|
7477
|
-
: backdrop && React__default["default"].createElement(CBackdrop, {
|
|
7609
|
+
ReactDOM.createPortal(React__default["default"].createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }), document.body)
|
|
7610
|
+
: backdrop && (React__default["default"].createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }))));
|
|
7478
7611
|
});
|
|
7479
7612
|
COffcanvas.propTypes = {
|
|
7480
7613
|
backdrop: PropTypes$1.bool,
|
|
@@ -7593,7 +7726,7 @@ var CElementCover = React.forwardRef(function (_a, ref) {
|
|
|
7593
7726
|
var coords = element.getBoundingClientRect();
|
|
7594
7727
|
sides.forEach(function (side) {
|
|
7595
7728
|
var sideMargin = Math.abs(coords[side] - parentCoords[side]);
|
|
7596
|
-
customBoundaries[side] = sideMargin
|
|
7729
|
+
customBoundaries[side] = "".concat(sideMargin, "px");
|
|
7597
7730
|
});
|
|
7598
7731
|
});
|
|
7599
7732
|
return customBoundaries;
|
|
@@ -7604,7 +7737,7 @@ var CElementCover = React.forwardRef(function (_a, ref) {
|
|
|
7604
7737
|
//render
|
|
7605
7738
|
var classes = classNames$1(className);
|
|
7606
7739
|
var containerCoords = __assign$1({ top: 0, left: 0, right: 0, bottom: 0 }, customBoundaries);
|
|
7607
|
-
var coverStyles = __assign$1(__assign$1({}, containerCoords), { position: 'absolute', backgroundColor: "rgb(255,255,255,"
|
|
7740
|
+
var coverStyles = __assign$1(__assign$1({}, containerCoords), { position: 'absolute', backgroundColor: "rgb(255,255,255,".concat(opacity, ")") });
|
|
7608
7741
|
return (React__default["default"].createElement("div", __assign$1({ className: classes, style: coverStyles }, rest, { ref: forkedRef }), children || (React__default["default"].createElement("div", { style: {
|
|
7609
7742
|
position: 'absolute',
|
|
7610
7743
|
top: '50%',
|
|
@@ -7625,17 +7758,17 @@ var CTable = React.forwardRef(function (_a, ref) {
|
|
|
7625
7758
|
var _b;
|
|
7626
7759
|
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$1(_a, ["children", "align", "borderColor", "bordered", "borderless", "caption", "className", "color", "hover", "responsive", "small", "striped"]);
|
|
7627
7760
|
var _className = classNames$1('table', (_b = {},
|
|
7628
|
-
_b["align-"
|
|
7629
|
-
_b["caption-"
|
|
7630
|
-
_b["border-"
|
|
7761
|
+
_b["align-".concat(align)] = align,
|
|
7762
|
+
_b["caption-".concat(caption)] = caption,
|
|
7763
|
+
_b["border-".concat(borderColor)] = borderColor,
|
|
7631
7764
|
_b['table-bordered'] = bordered,
|
|
7632
7765
|
_b['table-borderless'] = borderless,
|
|
7633
|
-
_b["table-"
|
|
7766
|
+
_b["table-".concat(color)] = color,
|
|
7634
7767
|
_b['table-hover'] = hover,
|
|
7635
7768
|
_b['table-sm'] = small,
|
|
7636
7769
|
_b['table-striped'] = striped,
|
|
7637
7770
|
_b), className);
|
|
7638
|
-
return responsive ? (React__default["default"].createElement("div", { className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-"
|
|
7771
|
+
return responsive ? (React__default["default"].createElement("div", { className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) },
|
|
7639
7772
|
React__default["default"].createElement("table", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children))) : (React__default["default"].createElement("table", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7640
7773
|
});
|
|
7641
7774
|
CTable.propTypes = {
|
|
@@ -7661,7 +7794,7 @@ var CTableFoot = React.forwardRef(function (_a, ref) {
|
|
|
7661
7794
|
var _b;
|
|
7662
7795
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
7663
7796
|
var _className = classNames$1((_b = {},
|
|
7664
|
-
_b["table-"
|
|
7797
|
+
_b["table-".concat(color)] = color,
|
|
7665
7798
|
_b), className);
|
|
7666
7799
|
return (React__default["default"].createElement("tfoot", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7667
7800
|
});
|
|
@@ -7676,7 +7809,7 @@ var CTableBody = React.forwardRef(function (_a, ref) {
|
|
|
7676
7809
|
var _b;
|
|
7677
7810
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
7678
7811
|
var _className = classNames$1((_b = {},
|
|
7679
|
-
_b["table-"
|
|
7812
|
+
_b["table-".concat(color)] = color,
|
|
7680
7813
|
_b), className);
|
|
7681
7814
|
return (React__default["default"].createElement("tbody", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7682
7815
|
});
|
|
@@ -7691,9 +7824,9 @@ var CTableRow = React.forwardRef(function (_a, ref) {
|
|
|
7691
7824
|
var _b;
|
|
7692
7825
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "active", "align", "className", "color"]);
|
|
7693
7826
|
var _className = classNames$1((_b = {},
|
|
7694
|
-
_b["align-"
|
|
7827
|
+
_b["align-".concat(align)] = align,
|
|
7695
7828
|
_b['table-active'] = active,
|
|
7696
|
-
_b["table-"
|
|
7829
|
+
_b["table-".concat(color)] = color,
|
|
7697
7830
|
_b), className);
|
|
7698
7831
|
return (React__default["default"].createElement("tr", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7699
7832
|
});
|
|
@@ -7710,9 +7843,9 @@ var CTableDataCell = React.forwardRef(function (_a, ref) {
|
|
|
7710
7843
|
var _b;
|
|
7711
7844
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "active", "align", "className", "color"]);
|
|
7712
7845
|
var _className = classNames$1((_b = {},
|
|
7713
|
-
_b["align-"
|
|
7846
|
+
_b["align-".concat(align)] = align,
|
|
7714
7847
|
_b['table-active'] = active,
|
|
7715
|
-
_b["table-"
|
|
7848
|
+
_b["table-".concat(color)] = color,
|
|
7716
7849
|
_b), className);
|
|
7717
7850
|
return (React__default["default"].createElement("td", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7718
7851
|
});
|
|
@@ -7765,7 +7898,7 @@ var CSmartTableBody = React.forwardRef(function (_a, ref) {
|
|
|
7765
7898
|
React__default["default"].createElement(CTableRow, { onClick: function (event) {
|
|
7766
7899
|
return onRowClick &&
|
|
7767
7900
|
onRowClick(item, trIndex + firstItemOnActivePageIndex, getColumnName(event), true);
|
|
7768
|
-
}, className: "p-0", key: "details"
|
|
7901
|
+
}, className: "p-0", key: "details".concat(trIndex) },
|
|
7769
7902
|
React__default["default"].createElement(CTableDataCell, { colSpan: colspan, className: "p-0", style: { border: 0 } }, scopedColumns.details(item, trIndex + firstItemOnActivePageIndex)))))));
|
|
7770
7903
|
}),
|
|
7771
7904
|
!currentItems.length && (React__default["default"].createElement(CTableRow, null,
|
|
@@ -8992,7 +9125,7 @@ var CIcon = React.forwardRef(function (_a, ref) {
|
|
|
8992
9125
|
var iconName = React.useMemo(function () {
|
|
8993
9126
|
return _icon && typeof _icon === 'string' && _icon.includes('-') ? toCamelCase(_icon) : _icon;
|
|
8994
9127
|
}, [change]);
|
|
8995
|
-
var titleCode = title ? "<title>"
|
|
9128
|
+
var titleCode = title ? "<title>".concat(title, "</title>") : '';
|
|
8996
9129
|
var code = React.useMemo(function () {
|
|
8997
9130
|
if (Array.isArray(_icon)) {
|
|
8998
9131
|
return _icon;
|
|
@@ -9008,13 +9141,13 @@ var CIcon = React.forwardRef(function (_a, ref) {
|
|
|
9008
9141
|
return Array.isArray(code) && code.length > 1 ? code[0] : '64 64';
|
|
9009
9142
|
})();
|
|
9010
9143
|
var viewBox = (function () {
|
|
9011
|
-
return rest['viewBox'] || "0 0 "
|
|
9144
|
+
return rest['viewBox'] || "0 0 ".concat(scale);
|
|
9012
9145
|
})();
|
|
9013
9146
|
// render
|
|
9014
9147
|
var _className = customClassName
|
|
9015
9148
|
? classNames(customClassName)
|
|
9016
9149
|
: classNames('icon', (_b = {},
|
|
9017
|
-
_b["icon-"
|
|
9150
|
+
_b["icon-".concat(size)] = size,
|
|
9018
9151
|
_b["icon-custom-size"] = height || width,
|
|
9019
9152
|
_b), className);
|
|
9020
9153
|
return use ? (React__default["default"].createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", className: _className }, (height && { height: height }), (width && { width: width }), { role: "img" }, rest, { ref: ref }),
|
|
@@ -9082,7 +9215,7 @@ var CTableHead = React.forwardRef(function (_a, ref) {
|
|
|
9082
9215
|
var _b;
|
|
9083
9216
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
9084
9217
|
var _className = classNames$1((_b = {},
|
|
9085
|
-
_b["table-"
|
|
9218
|
+
_b["table-".concat(color)] = color,
|
|
9086
9219
|
_b), className);
|
|
9087
9220
|
return (React__default["default"].createElement("thead", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
9088
9221
|
});
|
|
@@ -9097,7 +9230,7 @@ var CTableHeaderCell = React.forwardRef(function (_a, ref) {
|
|
|
9097
9230
|
var _b;
|
|
9098
9231
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
9099
9232
|
var _className = classNames$1((_b = {},
|
|
9100
|
-
_b["table-"
|
|
9233
|
+
_b["table-".concat(color)] = color,
|
|
9101
9234
|
_b), className);
|
|
9102
9235
|
return (React__default["default"].createElement("th", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
9103
9236
|
});
|
|
@@ -9109,7 +9242,7 @@ CTableHeaderCell.propTypes = {
|
|
|
9109
9242
|
CTableHeaderCell.displayName = 'CTableHeaderCell';
|
|
9110
9243
|
|
|
9111
9244
|
var CSmartTableHead = React.forwardRef(function (_a, ref) {
|
|
9112
|
-
var columnFilter = _a.columnFilter, columnSorter = _a.columnSorter, _b = _a.component, Component = _b === void 0 ? CTableHead : _b, columns = _a.columns, handleFilterOnChange = _a.handleFilterOnChange, handleFilterOnInput = _a.handleFilterOnInput, handleSelectAllChecked = _a.handleSelectAllChecked, handleSort = _a.handleSort, selectable = _a.selectable, selectAll = _a.selectAll, sorterState = _a.sorterState, sortingIcon = _a.sortingIcon, sortingIconAscending = _a.sortingIconAscending, sortingIconDescending = _a.sortingIconDescending, rest = __rest$1(_a, ["columnFilter", "columnSorter", "component", "columns", "handleFilterOnChange", "handleFilterOnInput", "handleSelectAllChecked", "handleSort", "selectable", "selectAll", "sorterState", "sortingIcon", "sortingIconAscending", "sortingIconDescending"]);
|
|
9245
|
+
var columnFilter = _a.columnFilter, columnFilterState = _a.columnFilterState, columnSorter = _a.columnSorter, _b = _a.component, Component = _b === void 0 ? CTableHead : _b, columns = _a.columns, handleFilterOnChange = _a.handleFilterOnChange, handleFilterOnInput = _a.handleFilterOnInput, handleSelectAllChecked = _a.handleSelectAllChecked, handleSort = _a.handleSort, selectable = _a.selectable, selectAll = _a.selectAll, sorterState = _a.sorterState, sortingIcon = _a.sortingIcon, sortingIconAscending = _a.sortingIconAscending, sortingIconDescending = _a.sortingIconDescending, rest = __rest$1(_a, ["columnFilter", "columnFilterState", "columnSorter", "component", "columns", "handleFilterOnChange", "handleFilterOnInput", "handleSelectAllChecked", "handleSort", "selectable", "selectAll", "sorterState", "sortingIcon", "sortingIconAscending", "sortingIconDescending"]);
|
|
9113
9246
|
var tableHeaderCellProps = function (column) {
|
|
9114
9247
|
if (typeof column === 'object' && column._props) {
|
|
9115
9248
|
return column._props;
|
|
@@ -9205,12 +9338,15 @@ var CSmartTableHead = React.forwardRef(function (_a, ref) {
|
|
|
9205
9338
|
}, onChange: function (event) {
|
|
9206
9339
|
return handleFilterOnChange &&
|
|
9207
9340
|
handleFilterOnChange(key(column), event.target.value);
|
|
9208
|
-
},
|
|
9341
|
+
}, value: columnFilterState && columnFilterState[key(column)]
|
|
9342
|
+
? columnFilterState[key(column)]
|
|
9343
|
+
: '', "aria-label": "column name: '".concat(label(column), "' filter input") }))));
|
|
9209
9344
|
})))));
|
|
9210
9345
|
});
|
|
9211
9346
|
CSmartTableHead.propTypes = {
|
|
9212
9347
|
columnFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
9213
|
-
|
|
9348
|
+
columnFilterState: PropTypes$1.object,
|
|
9349
|
+
columnSorter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
9214
9350
|
component: PropTypes$1.elementType,
|
|
9215
9351
|
children: PropTypes$1.node,
|
|
9216
9352
|
columns: PropTypes$1.arrayOf(PropTypes$1.oneOfType([PropTypes$1.any, PropTypes$1.string])).isRequired,
|
|
@@ -9260,15 +9396,25 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9260
9396
|
// instance data
|
|
9261
9397
|
var compData = React.useRef({ firstRun: true, columnFiltered: 0, changeItems: 0 }).current;
|
|
9262
9398
|
var previousSorterValue = React.useRef();
|
|
9399
|
+
var previousItemsValue = React.useRef();
|
|
9400
|
+
var _o = React.useState(activePage), _activePage = _o[0], setActivePage = _o[1];
|
|
9401
|
+
var _p = React.useState([]), _items = _p[0], setItems = _p[1];
|
|
9402
|
+
var _q = React.useState(itemsPerPage), _itemsPerPage = _q[0], setItemsPerPage = _q[1];
|
|
9403
|
+
var _r = React.useState(columnFilterValue ? columnFilterValue : {}), columnFilterState = _r[0], setColumnFilterState = _r[1];
|
|
9404
|
+
var _s = React.useState(), selectedAll = _s[0], setSelectedAll = _s[1];
|
|
9405
|
+
var _t = React.useState(previousSorterValue.current || {}), sorterState = _t[0], setSorterState = _t[1];
|
|
9406
|
+
var _u = React.useState(tableFilterValue ? tableFilterValue : ''), tableFilterState = _u[0], setTableFilterState = _u[1];
|
|
9263
9407
|
React.useMemo(function () {
|
|
9264
9408
|
if (JSON.stringify(previousSorterValue.current) !== JSON.stringify(sorterValue)) {
|
|
9265
9409
|
previousSorterValue.current = sorterValue;
|
|
9410
|
+
setSorterState(__assign$1({}, sorterValue));
|
|
9266
9411
|
}
|
|
9267
9412
|
}, [sorterValue]);
|
|
9268
|
-
var previousItemsValue = React.useRef();
|
|
9269
|
-
var _o = React.useState([]), _items = _o[0], setItems = _o[1];
|
|
9270
9413
|
React.useMemo(function () {
|
|
9271
9414
|
if (JSON.stringify(previousItemsValue.current) !== JSON.stringify(items)) {
|
|
9415
|
+
if (items && items.length < _itemsPerPage * _activePage - _itemsPerPage) {
|
|
9416
|
+
setActivePage(1);
|
|
9417
|
+
}
|
|
9272
9418
|
previousItemsValue.current = items;
|
|
9273
9419
|
Array.isArray(items) &&
|
|
9274
9420
|
setItems(items === null || items === void 0 ? void 0 : items.map(function (item, index) {
|
|
@@ -9276,12 +9422,6 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9276
9422
|
}));
|
|
9277
9423
|
}
|
|
9278
9424
|
}, [items]);
|
|
9279
|
-
var _p = React.useState(itemsPerPage), _itemsPerPage = _p[0], setItemsPerPage = _p[1];
|
|
9280
|
-
var _q = React.useState(activePage), _activePage = _q[0], setActivePage = _q[1];
|
|
9281
|
-
var _r = React.useState(), selectedAll = _r[0], setSelectedAll = _r[1];
|
|
9282
|
-
var _s = React.useState(previousSorterValue.current || {}), sorterState = _s[0], setSorterState = _s[1];
|
|
9283
|
-
var _t = React.useState(tableFilterValue ? tableFilterValue : ''), tableFilterState = _t[0], setTableFilterState = _t[1];
|
|
9284
|
-
var _u = React.useState(columnFilterValue ? columnFilterValue : {}), columnFilterState = _u[0], setColumnFilterState = _u[1];
|
|
9285
9425
|
// functions
|
|
9286
9426
|
var isSortable = function (i) {
|
|
9287
9427
|
var isDataColumn = itemsDataColumns.includes(rawColumnNames[i]);
|
|
@@ -9309,7 +9449,12 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9309
9449
|
state.state = 'desc';
|
|
9310
9450
|
}
|
|
9311
9451
|
else {
|
|
9312
|
-
|
|
9452
|
+
if (typeof columnSorter === 'object' && !columnSorter.resetable) {
|
|
9453
|
+
state.state = 'asc';
|
|
9454
|
+
}
|
|
9455
|
+
else {
|
|
9456
|
+
state.state = 0;
|
|
9457
|
+
}
|
|
9313
9458
|
}
|
|
9314
9459
|
}
|
|
9315
9460
|
else {
|
|
@@ -9329,7 +9474,8 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9329
9474
|
if ((isLazy && type === 'input') || (!isLazy && type === 'change')) {
|
|
9330
9475
|
return;
|
|
9331
9476
|
}
|
|
9332
|
-
var newState = __assign$1(__assign$1({}, columnFilterState), (_a = {}, _a[""
|
|
9477
|
+
var newState = __assign$1(__assign$1({}, columnFilterState), (_a = {}, _a["".concat(colName)] = value, _a));
|
|
9478
|
+
setActivePage(1);
|
|
9333
9479
|
setColumnFilterState(newState);
|
|
9334
9480
|
};
|
|
9335
9481
|
var tableFilterChange = function (value, type) {
|
|
@@ -9337,6 +9483,7 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9337
9483
|
if ((isLazy && type === 'input') || (!isLazy && type === 'change')) {
|
|
9338
9484
|
return;
|
|
9339
9485
|
}
|
|
9486
|
+
setActivePage(1);
|
|
9340
9487
|
setTableFilterState(value);
|
|
9341
9488
|
};
|
|
9342
9489
|
var clean = function () {
|
|
@@ -9449,21 +9596,6 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9449
9596
|
setSorterState(__assign$1({}, sorterValue));
|
|
9450
9597
|
}, [sorterValue]);
|
|
9451
9598
|
React.useMemo(function () { return setColumnFilterState(__assign$1({}, columnFilterValue)); }, [columnFilterValue]);
|
|
9452
|
-
//items
|
|
9453
|
-
// useMemo(() => {
|
|
9454
|
-
// if (
|
|
9455
|
-
// items &&
|
|
9456
|
-
// !compData.firstRun &&
|
|
9457
|
-
// (items.length !== _items.length || JSON.stringify(items) !== JSON.stringify(_items))
|
|
9458
|
-
// ) {
|
|
9459
|
-
// setItems(
|
|
9460
|
-
// items?.map((item: Item, index: number) => {
|
|
9461
|
-
// return { ...item, _id: index }
|
|
9462
|
-
// }),
|
|
9463
|
-
// )
|
|
9464
|
-
// compData.changeItems++
|
|
9465
|
-
// }
|
|
9466
|
-
// }, [items])
|
|
9467
9599
|
compData.firstRun = false;
|
|
9468
9600
|
var handleRowChecked = function (id, value) {
|
|
9469
9601
|
var newArr = __spreadArray([], _items, true);
|
|
@@ -9484,6 +9616,7 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9484
9616
|
React.useEffect(function () {
|
|
9485
9617
|
if (selectable) {
|
|
9486
9618
|
var selected = _items.filter(function (item) { return item._selected === true; });
|
|
9619
|
+
onSelectedItemsChange && onSelectedItemsChange(selected);
|
|
9487
9620
|
if (selected.length === _items.length) {
|
|
9488
9621
|
setSelectedAll(true);
|
|
9489
9622
|
return;
|
|
@@ -9495,7 +9628,6 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9495
9628
|
if (selected.length !== 0 && selected.length !== _items.length) {
|
|
9496
9629
|
setSelectedAll('indeterminate');
|
|
9497
9630
|
}
|
|
9498
|
-
onSelectedItemsChange && onSelectedItemsChange(selected);
|
|
9499
9631
|
}
|
|
9500
9632
|
}, [_items]);
|
|
9501
9633
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
@@ -9511,7 +9643,7 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9511
9643
|
} })))))))),
|
|
9512
9644
|
React__default["default"].createElement("div", { className: "position-relative" },
|
|
9513
9645
|
React__default["default"].createElement(CTable, __assign$1({}, tableProps),
|
|
9514
|
-
header && (React__default["default"].createElement(CSmartTableHead, __assign$1({}, tableHeadProps, { columnFilter: columnFilter, columns: columns ? columns : rawColumnNames, columnSorter: columnSorter, selectable: selectable, selectAll: selectedAll, sorterState: sorterState, sortingIcon: sortingIcon, sortingIconAscending: sortingIconAscending, sortingIconDescending: sortingIconDescending, handleSort: function (key, index) { return sorterChange(key, index); }, handleFilterOnChange: function (key, event) { return columnFilterChange(key, event, 'change'); }, handleFilterOnInput: function (key, event) { return columnFilterChange(key, event, 'input'); }, handleSelectAllChecked: function () { return handleSelectAllChecked(); } }))),
|
|
9646
|
+
header && (React__default["default"].createElement(CSmartTableHead, __assign$1({}, tableHeadProps, { columnFilter: columnFilter, columnFilterState: columnFilterState, columns: columns ? columns : rawColumnNames, columnSorter: columnSorter, selectable: selectable, selectAll: selectedAll, sorterState: sorterState, sortingIcon: sortingIcon, sortingIconAscending: sortingIconAscending, sortingIconDescending: sortingIconDescending, handleSort: function (key, index) { return sorterChange(key, index); }, handleFilterOnChange: function (key, event) { return columnFilterChange(key, event, 'change'); }, handleFilterOnInput: function (key, event) { return columnFilterChange(key, event, 'input'); }, handleSelectAllChecked: function () { return handleSelectAllChecked(); } }))),
|
|
9515
9647
|
React__default["default"].createElement(CSmartTableBody, __assign$1({ currentItems: currentItems, firstItemOnActivePageIndex: firstItemOnActivePageIndex, noItemsLabel: noItemsLabel, onRowClick: function (item, index, columnName, event) {
|
|
9516
9648
|
return clickableRows && onRowClick && onRowClick(item, index, columnName, event);
|
|
9517
9649
|
}, onRowChecked: function (id, value) { return handleRowChecked(id, value); }, rawColumnNames: rawColumnNames, scopedColumns: scopedColumns, selectable: selectable }, tableBodyProps)),
|
|
@@ -9521,7 +9653,7 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9521
9653
|
{ sides: ['bottom'], query: 'tbody' },
|
|
9522
9654
|
] }))),
|
|
9523
9655
|
(pagination || itemsPerPageSelect) && (React__default["default"].createElement("div", { className: "row" },
|
|
9524
|
-
React__default["default"].createElement("div", { className: "col
|
|
9656
|
+
React__default["default"].createElement("div", { className: "col" }, pagination && numberOfPages > 1 && (React__default["default"].createElement(CSmartPagination, __assign$1({}, paginationProps, { onActivePageChange: function (page) {
|
|
9525
9657
|
setActivePage(page);
|
|
9526
9658
|
}, pages: numberOfPages, activePage: _activePage })))),
|
|
9527
9659
|
React__default["default"].createElement("div", { className: "col-auto ms-auto" }, itemsPerPageSelect && (React__default["default"].createElement(CSmartTableItemsPerPageSelector, { itemsPerPage: _itemsPerPage, itemsPerPageLabel: itemsPerPageLabel, itemsPerPageOptions: itemsPerPageOptions, onChange: function (event) { return itemsPerPageChange(event); } })))))));
|
|
@@ -9641,7 +9773,7 @@ var CToast = React.forwardRef(function (_a, ref) {
|
|
|
9641
9773
|
var _className = classNames$1('toast', (_b = {
|
|
9642
9774
|
fade: animation
|
|
9643
9775
|
},
|
|
9644
|
-
_b["bg-"
|
|
9776
|
+
_b["bg-".concat(color)] = color,
|
|
9645
9777
|
_b['border-0'] = color,
|
|
9646
9778
|
_b), className);
|
|
9647
9779
|
var getTransitionClass = function (state) {
|
|
@@ -9798,7 +9930,7 @@ var CTooltip = function (_a) {
|
|
|
9798
9930
|
var transitionClass = getTransitionClass(state);
|
|
9799
9931
|
return (React__default["default"].createElement(Popper, { placement: placement }, function (_a) {
|
|
9800
9932
|
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
9801
|
-
return (React__default["default"].createElement("div", __assign$1({ className: classNames$1("tooltip bs-tooltip-"
|
|
9933
|
+
return (React__default["default"].createElement("div", __assign$1({ className: classNames$1("tooltip bs-tooltip-".concat(placement === 'left' ? 'start' : placement === 'right' ? 'end' : placement), transitionClass), ref: ref, role: "tooltip", style: style }, rest),
|
|
9802
9934
|
React__default["default"].createElement("div", __assign$1({ className: "tooltip-arrow" }, arrowProps)),
|
|
9803
9935
|
React__default["default"].createElement("div", { className: "tooltip-inner" }, content)));
|
|
9804
9936
|
}));
|
|
@@ -9806,7 +9938,7 @@ var CTooltip = function (_a) {
|
|
|
9806
9938
|
};
|
|
9807
9939
|
CTooltip.propTypes = {
|
|
9808
9940
|
children: PropTypes$1.any,
|
|
9809
|
-
content: PropTypes$1.node,
|
|
9941
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
9810
9942
|
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
9811
9943
|
onHide: PropTypes$1.func,
|
|
9812
9944
|
onShow: PropTypes$1.func,
|
|
@@ -9818,7 +9950,7 @@ CTooltip.displayName = 'CTooltip';
|
|
|
9818
9950
|
var CWidgetStatsA = React.forwardRef(function (_a, ref) {
|
|
9819
9951
|
var _b;
|
|
9820
9952
|
var action = _a.action, chart = _a.chart, className = _a.className, color = _a.color, title = _a.title, value = _a.value, rest = __rest$1(_a, ["action", "chart", "className", "color", "title", "value"]);
|
|
9821
|
-
var _className = classNames$1((_b = {}, _b["bg-"
|
|
9953
|
+
var _className = classNames$1((_b = {}, _b["bg-".concat(color)] = color, _b['text-high-emphasis-inverse'] = color, _b), className);
|
|
9822
9954
|
return (React__default["default"].createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
9823
9955
|
React__default["default"].createElement(CCardBody, { className: "pb-0 d-flex justify-content-between align-items-start" },
|
|
9824
9956
|
React__default["default"].createElement("div", null,
|
|
@@ -9861,8 +9993,8 @@ var CWidgetStatsC = React.forwardRef(function (_a, ref) {
|
|
|
9861
9993
|
var className = _a.className, color = _a.color, icon = _a.icon, inverse = _a.inverse, progress = _a.progress, title = _a.title, value = _a.value, rest = __rest$1(_a, ["className", "color", "icon", "inverse", "progress", "title", "value"]);
|
|
9862
9994
|
return (React__default["default"].createElement(CCard, __assign$1({ className: className, color: color }, (inverse && { textColor: 'high-emphasis-inverse' }), rest, { ref: ref }),
|
|
9863
9995
|
React__default["default"].createElement(CCardBody, null,
|
|
9864
|
-
icon && (React__default["default"].createElement("div", { className: "text-medium-emphasis"
|
|
9865
|
-
value && (React__default["default"].createElement("div", { className: "text-high-emphasis"
|
|
9996
|
+
icon && (React__default["default"].createElement("div", { className: "text-medium-emphasis".concat(inverse ? '-inverse' : '', " text-end mb-4") }, icon)),
|
|
9997
|
+
value && (React__default["default"].createElement("div", { className: "text-high-emphasis".concat(inverse ? '-inverse' : '', " fs-4 fw-semibold") }, value)),
|
|
9866
9998
|
title && (React__default["default"].createElement("div", { className: inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis' }, title)),
|
|
9867
9999
|
React__default["default"].createElement(CProgress, __assign$1({ className: "mt-3 mb-0", height: 4 }, (inverse && { white: true }), progress)))));
|
|
9868
10000
|
});
|
|
@@ -9882,7 +10014,7 @@ var CWidgetStatsD = React.forwardRef(function (_a, ref) {
|
|
|
9882
10014
|
var className = _a.className, chart = _a.chart, color = _a.color, icon = _a.icon, values = _a.values, rest = __rest$1(_a, ["className", "chart", "color", "icon", "values"]);
|
|
9883
10015
|
var _className = classNames$1(className);
|
|
9884
10016
|
var classNameHeader = classNames$1('position-relative d-flex justify-content-center align-items-center', (_b = {},
|
|
9885
|
-
_b["bg-"
|
|
10017
|
+
_b["bg-".concat(color)] = color,
|
|
9886
10018
|
_b));
|
|
9887
10019
|
return (React__default["default"].createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
9888
10020
|
React__default["default"].createElement(CCardHeader, { className: classNameHeader },
|
|
@@ -9928,10 +10060,10 @@ var CWidgetStatsF = React.forwardRef(function (_a, ref) {
|
|
|
9928
10060
|
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$1(_a, ["className", "color", "footer", "icon", "padding", "title", "value"]);
|
|
9929
10061
|
var _className = classNames$1(className);
|
|
9930
10062
|
return (React__default["default"].createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
9931
|
-
React__default["default"].createElement(CCardBody, { className: "d-flex align-items-center "
|
|
9932
|
-
React__default["default"].createElement("div", { className: "me-3 text-white bg-"
|
|
10063
|
+
React__default["default"].createElement(CCardBody, { className: "d-flex align-items-center ".concat(padding === false && 'p-0') },
|
|
10064
|
+
React__default["default"].createElement("div", { className: "me-3 text-white bg-".concat(color, " ").concat(padding ? 'p-3' : 'p-4') }, icon),
|
|
9933
10065
|
React__default["default"].createElement("div", null,
|
|
9934
|
-
React__default["default"].createElement("div", { className: "fs-6 fw-semibold text-"
|
|
10066
|
+
React__default["default"].createElement("div", { className: "fs-6 fw-semibold text-".concat(color) }, value),
|
|
9935
10067
|
React__default["default"].createElement("div", { className: "text-medium-emphasis text-uppercase fw-semibold small" }, title))),
|
|
9936
10068
|
footer && React__default["default"].createElement(CCardFooter, null, footer)));
|
|
9937
10069
|
});
|
|
@@ -10039,6 +10171,7 @@ exports.COffcanvasHeader = COffcanvasHeader;
|
|
|
10039
10171
|
exports.COffcanvasTitle = COffcanvasTitle;
|
|
10040
10172
|
exports.CPagination = CPagination;
|
|
10041
10173
|
exports.CPaginationItem = CPaginationItem;
|
|
10174
|
+
exports.CPlaceholder = CPlaceholder;
|
|
10042
10175
|
exports.CPopover = CPopover;
|
|
10043
10176
|
exports.CProgress = CProgress;
|
|
10044
10177
|
exports.CProgressBar = CProgressBar;
|