@coreui/react-pro 4.0.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -0
- package/dist/components/accordion/CAccordionCollapse.d.ts +1 -1
- package/dist/components/collapse/CCollapse.d.ts +4 -0
- package/dist/components/form/CFormLabel.d.ts +2 -2
- package/dist/components/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 +341 -211
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +341 -210
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/components/accordion/CAccordionCollapse.tsx +1 -1
- package/src/components/collapse/CCollapse.tsx +36 -3
- package/src/components/form/CFormLabel.tsx +2 -2
- package/src/components/form/__tests__/CFormLabel.spec.tsx +8 -0
- package/src/components/form/__tests__/__snapshots__/CFormLabel.spec.tsx.snap +11 -0
- package/src/components/grid/CCol.tsx +8 -8
- package/src/components/grid/CContainer.tsx +3 -3
- package/src/components/grid/CRow.tsx +6 -6
- package/src/components/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 +25 -12
- 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 = {
|
|
@@ -5984,9 +6064,9 @@ var CFormCheck = React.forwardRef(function (_a, ref) {
|
|
|
5984
6064
|
'me-2': hitArea,
|
|
5985
6065
|
});
|
|
5986
6066
|
var labelClassName = classNames$1(button
|
|
5987
|
-
? classNames$1('btn', button.variant ? "btn-"
|
|
5988
|
-
_b["btn-"
|
|
5989
|
-
_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))
|
|
5990
6070
|
: 'form-check-label');
|
|
5991
6071
|
var formControl = function () {
|
|
5992
6072
|
return React__default["default"].createElement("input", __assign$1({ type: type, className: inputClassName, id: id }, rest, { ref: forkedRef }));
|
|
@@ -6020,8 +6100,8 @@ var CFormFeedback = React.forwardRef(function (_a, ref) {
|
|
|
6020
6100
|
var _b;
|
|
6021
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"]);
|
|
6022
6102
|
var _className = classNames$1((_b = {},
|
|
6023
|
-
_b["invalid-"
|
|
6024
|
-
_b["valid-"
|
|
6103
|
+
_b["invalid-".concat(tooltip ? 'tooltip' : 'feedback')] = invalid,
|
|
6104
|
+
_b["valid-".concat(tooltip ? 'tooltip' : 'feedback')] = valid,
|
|
6025
6105
|
_b), className);
|
|
6026
6106
|
return (React__default["default"].createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
6027
6107
|
});
|
|
@@ -6050,7 +6130,7 @@ var CFormInput = React.forwardRef(function (_a, ref) {
|
|
|
6050
6130
|
var _b;
|
|
6051
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"]);
|
|
6052
6132
|
var _className = classNames$1(plainText ? 'form-control-plaintext' : 'form-control', (_b = {},
|
|
6053
|
-
_b["form-control-"
|
|
6133
|
+
_b["form-control-".concat(size)] = size,
|
|
6054
6134
|
_b['form-control-color'] = type === 'color',
|
|
6055
6135
|
_b['is-invalid'] = invalid,
|
|
6056
6136
|
_b['is-valid'] = valid,
|
|
@@ -6082,7 +6162,7 @@ var CFormSelect = React.forwardRef(function (_a, ref) {
|
|
|
6082
6162
|
var _b;
|
|
6083
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"]);
|
|
6084
6164
|
var _className = classNames$1('form-select', (_b = {},
|
|
6085
|
-
_b["form-select-"
|
|
6165
|
+
_b["form-select-".concat(size)] = size,
|
|
6086
6166
|
_b['is-invalid'] = invalid,
|
|
6087
6167
|
_b['is-valid'] = valid,
|
|
6088
6168
|
_b), className);
|
|
@@ -6108,7 +6188,7 @@ var CFormSwitch = React.forwardRef(function (_a, ref) {
|
|
|
6108
6188
|
var _b;
|
|
6109
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"]);
|
|
6110
6190
|
var _className = classNames$1('form-check form-switch', (_b = {},
|
|
6111
|
-
_b["form-switch-"
|
|
6191
|
+
_b["form-switch-".concat(size)] = size,
|
|
6112
6192
|
_b['is-invalid'] = invalid,
|
|
6113
6193
|
_b['is-valid'] = valid,
|
|
6114
6194
|
_b), className);
|
|
@@ -6165,7 +6245,7 @@ var CInputGroup = React.forwardRef(function (_a, ref) {
|
|
|
6165
6245
|
var _b;
|
|
6166
6246
|
var children = _a.children, className = _a.className, size = _a.size, rest = __rest$1(_a, ["children", "className", "size"]);
|
|
6167
6247
|
var _className = classNames$1('input-group', (_b = {},
|
|
6168
|
-
_b["input-group-"
|
|
6248
|
+
_b["input-group-".concat(size)] = size,
|
|
6169
6249
|
_b), className);
|
|
6170
6250
|
return (React__default["default"].createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
6171
6251
|
});
|
|
@@ -6191,10 +6271,10 @@ CInputGroupText.displayName = 'CInputGroupText';
|
|
|
6191
6271
|
var CHeader = React.forwardRef(function (_a, ref) {
|
|
6192
6272
|
var _b;
|
|
6193
6273
|
var children = _a.children, className = _a.className, container = _a.container, position = _a.position, rest = __rest$1(_a, ["children", "className", "container", "position"]);
|
|
6194
|
-
var _className = classNames$1('header', (_b = {}, _b["header-"
|
|
6274
|
+
var _className = classNames$1('header', (_b = {}, _b["header-".concat(position)] = position, _b), className);
|
|
6195
6275
|
var content;
|
|
6196
6276
|
if (container) {
|
|
6197
|
-
content = (React__default["default"].createElement("div", { className: "container"
|
|
6277
|
+
content = (React__default["default"].createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
6198
6278
|
}
|
|
6199
6279
|
else {
|
|
6200
6280
|
content = children;
|
|
@@ -6279,7 +6359,7 @@ var CImage = React.forwardRef(function (_a, ref) {
|
|
|
6279
6359
|
var _b;
|
|
6280
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"]);
|
|
6281
6361
|
var _className = classNames$1((_b = {},
|
|
6282
|
-
_b["float-"
|
|
6362
|
+
_b["float-".concat(align)] = align && (align === 'start' || align === 'end'),
|
|
6283
6363
|
_b['d-block mx-auto'] = align && align === 'center',
|
|
6284
6364
|
_b['img-fluid'] = fluid,
|
|
6285
6365
|
_b.rounded = rounded,
|
|
@@ -6302,7 +6382,7 @@ var CListGroup = React.forwardRef(function (_a, ref) {
|
|
|
6302
6382
|
var _className = classNames$1('list-group', (_b = {
|
|
6303
6383
|
'list-group-flush': flush
|
|
6304
6384
|
},
|
|
6305
|
-
_b["list-group-"
|
|
6385
|
+
_b["list-group-".concat(layout)] = layout,
|
|
6306
6386
|
_b), className);
|
|
6307
6387
|
return (React__default["default"].createElement(Component, { className: _className, ref: ref }, children));
|
|
6308
6388
|
});
|
|
@@ -6326,7 +6406,7 @@ var CListGroupItem = React.forwardRef(function (_a, ref) {
|
|
|
6326
6406
|
var _b;
|
|
6327
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"]);
|
|
6328
6408
|
var _className = classNames$1('list-group-item', (_b = {},
|
|
6329
|
-
_b["list-group-item-"
|
|
6409
|
+
_b["list-group-item-".concat(color)] = color,
|
|
6330
6410
|
_b['list-group-item-action'] = component === 'a' || component === 'button',
|
|
6331
6411
|
_b.active = active,
|
|
6332
6412
|
_b.disabled = disabled,
|
|
@@ -6352,7 +6432,7 @@ CListGroupItem.displayName = 'CListGroupItem';
|
|
|
6352
6432
|
|
|
6353
6433
|
var CSpinner = React.forwardRef(function (_a, ref) {
|
|
6354
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"]);
|
|
6355
|
-
var _className = classNames$1("spinner-"
|
|
6435
|
+
var _className = classNames$1("spinner-".concat(variant), "text-".concat(color), size && "spinner-".concat(variant, "-").concat(size), className);
|
|
6356
6436
|
return (React__default["default"].createElement(Component, __assign$1({ className: _className, role: "status" }, rest, { ref: ref }),
|
|
6357
6437
|
React__default["default"].createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
6358
6438
|
});
|
|
@@ -6416,9 +6496,9 @@ var CModalDialog = React.forwardRef(function (_a, ref) {
|
|
|
6416
6496
|
},
|
|
6417
6497
|
_b[typeof fullscreen === 'boolean'
|
|
6418
6498
|
? 'modal-fullscreen'
|
|
6419
|
-
: "modal-fullscreen-"
|
|
6499
|
+
: "modal-fullscreen-".concat(fullscreen, "-down")] = fullscreen,
|
|
6420
6500
|
_b['modal-dialog-scrollable'] = scrollable,
|
|
6421
|
-
_b["modal-"
|
|
6501
|
+
_b["modal-".concat(size)] = size,
|
|
6422
6502
|
_b), className);
|
|
6423
6503
|
return (React__default["default"].createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
6424
6504
|
});
|
|
@@ -6654,7 +6734,7 @@ var CMultiSelectSelection = React.forwardRef(function (_a, ref) {
|
|
|
6654
6734
|
multiple &&
|
|
6655
6735
|
selectionType === 'counter' &&
|
|
6656
6736
|
!search &&
|
|
6657
|
-
selected.length
|
|
6737
|
+
"".concat(selected.length, " ").concat(selectionTypeCounterText),
|
|
6658
6738
|
multiple &&
|
|
6659
6739
|
selectionType === 'tags' &&
|
|
6660
6740
|
selected.map(function (option, index) {
|
|
@@ -6829,7 +6909,7 @@ var CMultiSelect = React.forwardRef(function (_a, ref) {
|
|
|
6829
6909
|
multiple && cleaner && selected.length > 0 && (React__default["default"].createElement(CMultiSelectCleaner, { onClick: function () { return handleDeselectAll(); } })),
|
|
6830
6910
|
search && (React__default["default"].createElement(CMultiSelectSearchInput, __assign$1({}, (selected.length === 0 && { placeholder: placeholder }), (selected.length &&
|
|
6831
6911
|
selectionType === 'counter' && {
|
|
6832
|
-
placeholder: selected.length
|
|
6912
|
+
placeholder: "".concat(selected.length, " ").concat(selectionTypeCounterText),
|
|
6833
6913
|
}), (selected.length &&
|
|
6834
6914
|
!multiple && { placeholder: selected.map(function (option) { return option.text; })[0] }), { onChange: function (event) { return handleSearchChange(event); }, onKeyDown: function (event) { return handleSearchKeyDown(event); } }, (multiple &&
|
|
6835
6915
|
selected.length &&
|
|
@@ -6861,8 +6941,8 @@ var CNav = React.forwardRef(function (_a, ref) {
|
|
|
6861
6941
|
var _b;
|
|
6862
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"]);
|
|
6863
6943
|
var _className = classNames$1('nav', (_b = {},
|
|
6864
|
-
_b["nav-"
|
|
6865
|
-
_b["nav-"
|
|
6944
|
+
_b["nav-".concat(layout)] = layout,
|
|
6945
|
+
_b["nav-".concat(variant)] = variant,
|
|
6866
6946
|
_b), className);
|
|
6867
6947
|
return (React__default["default"].createElement(Component, __assign$1({ className: _className, role: "navigation" }, rest, { ref: ref }), children));
|
|
6868
6948
|
});
|
|
@@ -6898,7 +6978,7 @@ var CSidebarNav = React.forwardRef(function (_a, ref) {
|
|
|
6898
6978
|
return (React__default["default"].createElement("ul", __assign$1({ className: classes, ref: ref }, rest),
|
|
6899
6979
|
React__default["default"].createElement(CNavContext.Provider, { value: CNavContextValues }, React__default["default"].Children.map(children, function (child, index) {
|
|
6900
6980
|
if (React__default["default"].isValidElement(child)) {
|
|
6901
|
-
return React__default["default"].cloneElement(child, { key: index, idx: ""
|
|
6981
|
+
return React__default["default"].cloneElement(child, { key: index, idx: "".concat(index) });
|
|
6902
6982
|
}
|
|
6903
6983
|
return;
|
|
6904
6984
|
}))));
|
|
@@ -6958,7 +7038,7 @@ var CNavGroup = React.forwardRef(function (_a, ref) {
|
|
|
6958
7038
|
compact: compact,
|
|
6959
7039
|
}), style: __assign$1(__assign$1({}, style), transitionStyles[state]), ref: navItemsRef }, React__default["default"].Children.map(children, function (child, index) {
|
|
6960
7040
|
if (React__default["default"].isValidElement(child)) {
|
|
6961
|
-
return React__default["default"].cloneElement(child, { key: index, idx: idx
|
|
7041
|
+
return React__default["default"].cloneElement(child, { key: index, idx: "".concat(idx, ".").concat(index) });
|
|
6962
7042
|
}
|
|
6963
7043
|
return;
|
|
6964
7044
|
}))); })));
|
|
@@ -7022,13 +7102,13 @@ var CNavbar = React.forwardRef(function (_a, ref) {
|
|
|
7022
7102
|
var _b;
|
|
7023
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"]);
|
|
7024
7104
|
var _className = classNames$1('navbar', (_b = {},
|
|
7025
|
-
_b["bg-"
|
|
7026
|
-
_b["navbar-"
|
|
7027
|
-
_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,
|
|
7028
7108
|
_b), placement, className);
|
|
7029
7109
|
var content;
|
|
7030
7110
|
if (container) {
|
|
7031
|
-
content = (React__default["default"].createElement("div", { className: "container"
|
|
7111
|
+
content = (React__default["default"].createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
7032
7112
|
}
|
|
7033
7113
|
else {
|
|
7034
7114
|
content = children;
|
|
@@ -7111,8 +7191,8 @@ var CPagination = React.forwardRef(function (_a, ref) {
|
|
|
7111
7191
|
var _b;
|
|
7112
7192
|
var children = _a.children, align = _a.align, className = _a.className, size = _a.size, rest = __rest$1(_a, ["children", "align", "className", "size"]);
|
|
7113
7193
|
var _className = classNames$1('pagination', (_b = {},
|
|
7114
|
-
_b["justify-content-"
|
|
7115
|
-
_b["pagination-"
|
|
7194
|
+
_b["justify-content-".concat(align)] = align,
|
|
7195
|
+
_b["pagination-".concat(size)] = size,
|
|
7116
7196
|
_b), className);
|
|
7117
7197
|
return (React__default["default"].createElement("nav", __assign$1({ ref: ref }, rest),
|
|
7118
7198
|
React__default["default"].createElement("ul", { className: _className }, children)));
|
|
@@ -7146,7 +7226,7 @@ var CSmartPagination = React.forwardRef(function (_a, ref) {
|
|
|
7146
7226
|
React.useEffect(function () {
|
|
7147
7227
|
pages < activePage && onActivePageChange(pages, true);
|
|
7148
7228
|
}, [pages]);
|
|
7149
|
-
var _classNames = classNames$1("justify-content-"
|
|
7229
|
+
var _classNames = classNames$1("justify-content-".concat(align), className);
|
|
7150
7230
|
var showDots = (function () {
|
|
7151
7231
|
return dots && limit > 4 && limit < pages;
|
|
7152
7232
|
})();
|
|
@@ -7198,7 +7278,7 @@ var CSmartPagination = React.forwardRef(function (_a, ref) {
|
|
|
7198
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)),
|
|
7199
7279
|
beforeDots && (React__default["default"].createElement(CPaginationItem, { role: "separator", disabled: true }, "\u2026")),
|
|
7200
7280
|
items.map(function (i) {
|
|
7201
|
-
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));
|
|
7202
7282
|
}),
|
|
7203
7283
|
afterDots && (React__default["default"].createElement(CPaginationItem, { role: "separator", disabled: true }, "\u2026")),
|
|
7204
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)),
|
|
@@ -7222,6 +7302,45 @@ CSmartPagination.propTypes = {
|
|
|
7222
7302
|
};
|
|
7223
7303
|
CSmartPagination.displayName = 'CSmartPagination';
|
|
7224
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
|
+
|
|
7225
7344
|
var CPopover = function (_a) {
|
|
7226
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"]);
|
|
7227
7346
|
var _e = React.useState(visible), _visible = _e[0], setVisible = _e[1];
|
|
@@ -7262,7 +7381,7 @@ var CPopover = function (_a) {
|
|
|
7262
7381
|
},
|
|
7263
7382
|
] }, function (_a) {
|
|
7264
7383
|
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
7265
|
-
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),
|
|
7266
7385
|
React__default["default"].createElement("div", __assign$1({ className: "popover-arrow" }, arrowProps)),
|
|
7267
7386
|
React__default["default"].createElement("div", { className: "popover-header" }, title),
|
|
7268
7387
|
React__default["default"].createElement("div", { className: "popover-body" }, content)));
|
|
@@ -7271,12 +7390,12 @@ var CPopover = function (_a) {
|
|
|
7271
7390
|
};
|
|
7272
7391
|
CPopover.propTypes = {
|
|
7273
7392
|
children: PropTypes$1.any,
|
|
7274
|
-
content: PropTypes$1.node,
|
|
7393
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
7275
7394
|
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
7276
7395
|
offset: PropTypes$1.any,
|
|
7277
7396
|
onHide: PropTypes$1.func,
|
|
7278
7397
|
onShow: PropTypes$1.func,
|
|
7279
|
-
title: PropTypes$1.string,
|
|
7398
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
7280
7399
|
trigger: triggerPropType,
|
|
7281
7400
|
visible: PropTypes$1.bool,
|
|
7282
7401
|
};
|
|
@@ -7286,11 +7405,11 @@ var CProgressBar = React.forwardRef(function (_a, ref) {
|
|
|
7286
7405
|
var _b;
|
|
7287
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"]);
|
|
7288
7407
|
var _className = classNames$1('progress-bar', (_b = {},
|
|
7289
|
-
_b["bg-"
|
|
7290
|
-
_b["progress-bar-"
|
|
7408
|
+
_b["bg-".concat(color)] = color,
|
|
7409
|
+
_b["progress-bar-".concat(variant)] = variant,
|
|
7291
7410
|
_b['progress-bar-animated'] = animated,
|
|
7292
7411
|
_b), className);
|
|
7293
|
-
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));
|
|
7294
7413
|
});
|
|
7295
7414
|
CProgressBar.propTypes = {
|
|
7296
7415
|
animated: PropTypes$1.bool,
|
|
@@ -7308,7 +7427,7 @@ var CProgress = React.forwardRef(function (_a, ref) {
|
|
|
7308
7427
|
'progress-thin': thin,
|
|
7309
7428
|
'progress-white': white,
|
|
7310
7429
|
}, className);
|
|
7311
|
-
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)));
|
|
7312
7431
|
});
|
|
7313
7432
|
CProgress.propTypes = {
|
|
7314
7433
|
children: PropTypes$1.node,
|
|
@@ -7402,12 +7521,12 @@ var CSidebar = React.forwardRef(function (_a, ref) {
|
|
|
7402
7521
|
handleHide();
|
|
7403
7522
|
};
|
|
7404
7523
|
var _className = classNames$1('sidebar', (_b = {},
|
|
7405
|
-
_b["sidebar-"
|
|
7524
|
+
_b["sidebar-".concat(colorScheme)] = colorScheme,
|
|
7406
7525
|
_b['sidebar-narrow'] = narrow,
|
|
7407
7526
|
_b['sidebar-overlaid'] = overlaid,
|
|
7408
|
-
_b["sidebar-"
|
|
7409
|
-
_b["sidebar-"
|
|
7410
|
-
_b["sidebar-"
|
|
7527
|
+
_b["sidebar-".concat(placement)] = placement,
|
|
7528
|
+
_b["sidebar-".concat(position)] = position,
|
|
7529
|
+
_b["sidebar-".concat(size)] = size,
|
|
7411
7530
|
_b['sidebar-narrow-unfoldable'] = unfoldable,
|
|
7412
7531
|
_b.show = _visible === true && mobile,
|
|
7413
7532
|
_b.hide = _visible === false && !mobile,
|
|
@@ -7458,7 +7577,7 @@ var COffcanvas = React.forwardRef(function (_a, ref) {
|
|
|
7458
7577
|
}
|
|
7459
7578
|
}, [_visible]);
|
|
7460
7579
|
var _className = classNames$1('offcanvas', (_b = {},
|
|
7461
|
-
_b["offcanvas-"
|
|
7580
|
+
_b["offcanvas-".concat(placement)] = placement,
|
|
7462
7581
|
_b.show = _visible,
|
|
7463
7582
|
_b), className);
|
|
7464
7583
|
var transitionStyles = {
|
|
@@ -7487,8 +7606,8 @@ var COffcanvas = React.forwardRef(function (_a, ref) {
|
|
|
7487
7606
|
}),
|
|
7488
7607
|
typeof window !== 'undefined' && portal
|
|
7489
7608
|
? backdrop &&
|
|
7490
|
-
ReactDOM.createPortal(React__default["default"].createElement(CBackdrop, {
|
|
7491
|
-
: 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 }))));
|
|
7492
7611
|
});
|
|
7493
7612
|
COffcanvas.propTypes = {
|
|
7494
7613
|
backdrop: PropTypes$1.bool,
|
|
@@ -7607,7 +7726,7 @@ var CElementCover = React.forwardRef(function (_a, ref) {
|
|
|
7607
7726
|
var coords = element.getBoundingClientRect();
|
|
7608
7727
|
sides.forEach(function (side) {
|
|
7609
7728
|
var sideMargin = Math.abs(coords[side] - parentCoords[side]);
|
|
7610
|
-
customBoundaries[side] = sideMargin
|
|
7729
|
+
customBoundaries[side] = "".concat(sideMargin, "px");
|
|
7611
7730
|
});
|
|
7612
7731
|
});
|
|
7613
7732
|
return customBoundaries;
|
|
@@ -7618,7 +7737,7 @@ var CElementCover = React.forwardRef(function (_a, ref) {
|
|
|
7618
7737
|
//render
|
|
7619
7738
|
var classes = classNames$1(className);
|
|
7620
7739
|
var containerCoords = __assign$1({ top: 0, left: 0, right: 0, bottom: 0 }, customBoundaries);
|
|
7621
|
-
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, ")") });
|
|
7622
7741
|
return (React__default["default"].createElement("div", __assign$1({ className: classes, style: coverStyles }, rest, { ref: forkedRef }), children || (React__default["default"].createElement("div", { style: {
|
|
7623
7742
|
position: 'absolute',
|
|
7624
7743
|
top: '50%',
|
|
@@ -7639,17 +7758,17 @@ var CTable = React.forwardRef(function (_a, ref) {
|
|
|
7639
7758
|
var _b;
|
|
7640
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"]);
|
|
7641
7760
|
var _className = classNames$1('table', (_b = {},
|
|
7642
|
-
_b["align-"
|
|
7643
|
-
_b["caption-"
|
|
7644
|
-
_b["border-"
|
|
7761
|
+
_b["align-".concat(align)] = align,
|
|
7762
|
+
_b["caption-".concat(caption)] = caption,
|
|
7763
|
+
_b["border-".concat(borderColor)] = borderColor,
|
|
7645
7764
|
_b['table-bordered'] = bordered,
|
|
7646
7765
|
_b['table-borderless'] = borderless,
|
|
7647
|
-
_b["table-"
|
|
7766
|
+
_b["table-".concat(color)] = color,
|
|
7648
7767
|
_b['table-hover'] = hover,
|
|
7649
7768
|
_b['table-sm'] = small,
|
|
7650
7769
|
_b['table-striped'] = striped,
|
|
7651
7770
|
_b), className);
|
|
7652
|
-
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) },
|
|
7653
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));
|
|
7654
7773
|
});
|
|
7655
7774
|
CTable.propTypes = {
|
|
@@ -7675,7 +7794,7 @@ var CTableFoot = React.forwardRef(function (_a, ref) {
|
|
|
7675
7794
|
var _b;
|
|
7676
7795
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
7677
7796
|
var _className = classNames$1((_b = {},
|
|
7678
|
-
_b["table-"
|
|
7797
|
+
_b["table-".concat(color)] = color,
|
|
7679
7798
|
_b), className);
|
|
7680
7799
|
return (React__default["default"].createElement("tfoot", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7681
7800
|
});
|
|
@@ -7690,7 +7809,7 @@ var CTableBody = React.forwardRef(function (_a, ref) {
|
|
|
7690
7809
|
var _b;
|
|
7691
7810
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
7692
7811
|
var _className = classNames$1((_b = {},
|
|
7693
|
-
_b["table-"
|
|
7812
|
+
_b["table-".concat(color)] = color,
|
|
7694
7813
|
_b), className);
|
|
7695
7814
|
return (React__default["default"].createElement("tbody", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7696
7815
|
});
|
|
@@ -7705,9 +7824,9 @@ var CTableRow = React.forwardRef(function (_a, ref) {
|
|
|
7705
7824
|
var _b;
|
|
7706
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"]);
|
|
7707
7826
|
var _className = classNames$1((_b = {},
|
|
7708
|
-
_b["align-"
|
|
7827
|
+
_b["align-".concat(align)] = align,
|
|
7709
7828
|
_b['table-active'] = active,
|
|
7710
|
-
_b["table-"
|
|
7829
|
+
_b["table-".concat(color)] = color,
|
|
7711
7830
|
_b), className);
|
|
7712
7831
|
return (React__default["default"].createElement("tr", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7713
7832
|
});
|
|
@@ -7724,9 +7843,9 @@ var CTableDataCell = React.forwardRef(function (_a, ref) {
|
|
|
7724
7843
|
var _b;
|
|
7725
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"]);
|
|
7726
7845
|
var _className = classNames$1((_b = {},
|
|
7727
|
-
_b["align-"
|
|
7846
|
+
_b["align-".concat(align)] = align,
|
|
7728
7847
|
_b['table-active'] = active,
|
|
7729
|
-
_b["table-"
|
|
7848
|
+
_b["table-".concat(color)] = color,
|
|
7730
7849
|
_b), className);
|
|
7731
7850
|
return (React__default["default"].createElement("td", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7732
7851
|
});
|
|
@@ -7779,7 +7898,7 @@ var CSmartTableBody = React.forwardRef(function (_a, ref) {
|
|
|
7779
7898
|
React__default["default"].createElement(CTableRow, { onClick: function (event) {
|
|
7780
7899
|
return onRowClick &&
|
|
7781
7900
|
onRowClick(item, trIndex + firstItemOnActivePageIndex, getColumnName(event), true);
|
|
7782
|
-
}, className: "p-0", key: "details"
|
|
7901
|
+
}, className: "p-0", key: "details".concat(trIndex) },
|
|
7783
7902
|
React__default["default"].createElement(CTableDataCell, { colSpan: colspan, className: "p-0", style: { border: 0 } }, scopedColumns.details(item, trIndex + firstItemOnActivePageIndex)))))));
|
|
7784
7903
|
}),
|
|
7785
7904
|
!currentItems.length && (React__default["default"].createElement(CTableRow, null,
|
|
@@ -9006,7 +9125,7 @@ var CIcon = React.forwardRef(function (_a, ref) {
|
|
|
9006
9125
|
var iconName = React.useMemo(function () {
|
|
9007
9126
|
return _icon && typeof _icon === 'string' && _icon.includes('-') ? toCamelCase(_icon) : _icon;
|
|
9008
9127
|
}, [change]);
|
|
9009
|
-
var titleCode = title ? "<title>"
|
|
9128
|
+
var titleCode = title ? "<title>".concat(title, "</title>") : '';
|
|
9010
9129
|
var code = React.useMemo(function () {
|
|
9011
9130
|
if (Array.isArray(_icon)) {
|
|
9012
9131
|
return _icon;
|
|
@@ -9022,13 +9141,13 @@ var CIcon = React.forwardRef(function (_a, ref) {
|
|
|
9022
9141
|
return Array.isArray(code) && code.length > 1 ? code[0] : '64 64';
|
|
9023
9142
|
})();
|
|
9024
9143
|
var viewBox = (function () {
|
|
9025
|
-
return rest['viewBox'] || "0 0 "
|
|
9144
|
+
return rest['viewBox'] || "0 0 ".concat(scale);
|
|
9026
9145
|
})();
|
|
9027
9146
|
// render
|
|
9028
9147
|
var _className = customClassName
|
|
9029
9148
|
? classNames(customClassName)
|
|
9030
9149
|
: classNames('icon', (_b = {},
|
|
9031
|
-
_b["icon-"
|
|
9150
|
+
_b["icon-".concat(size)] = size,
|
|
9032
9151
|
_b["icon-custom-size"] = height || width,
|
|
9033
9152
|
_b), className);
|
|
9034
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 }),
|
|
@@ -9096,7 +9215,7 @@ var CTableHead = React.forwardRef(function (_a, ref) {
|
|
|
9096
9215
|
var _b;
|
|
9097
9216
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
9098
9217
|
var _className = classNames$1((_b = {},
|
|
9099
|
-
_b["table-"
|
|
9218
|
+
_b["table-".concat(color)] = color,
|
|
9100
9219
|
_b), className);
|
|
9101
9220
|
return (React__default["default"].createElement("thead", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
9102
9221
|
});
|
|
@@ -9111,7 +9230,7 @@ var CTableHeaderCell = React.forwardRef(function (_a, ref) {
|
|
|
9111
9230
|
var _b;
|
|
9112
9231
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
9113
9232
|
var _className = classNames$1((_b = {},
|
|
9114
|
-
_b["table-"
|
|
9233
|
+
_b["table-".concat(color)] = color,
|
|
9115
9234
|
_b), className);
|
|
9116
9235
|
return (React__default["default"].createElement("th", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
9117
9236
|
});
|
|
@@ -9123,7 +9242,7 @@ CTableHeaderCell.propTypes = {
|
|
|
9123
9242
|
CTableHeaderCell.displayName = 'CTableHeaderCell';
|
|
9124
9243
|
|
|
9125
9244
|
var CSmartTableHead = React.forwardRef(function (_a, ref) {
|
|
9126
|
-
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"]);
|
|
9127
9246
|
var tableHeaderCellProps = function (column) {
|
|
9128
9247
|
if (typeof column === 'object' && column._props) {
|
|
9129
9248
|
return column._props;
|
|
@@ -9219,12 +9338,15 @@ var CSmartTableHead = React.forwardRef(function (_a, ref) {
|
|
|
9219
9338
|
}, onChange: function (event) {
|
|
9220
9339
|
return handleFilterOnChange &&
|
|
9221
9340
|
handleFilterOnChange(key(column), event.target.value);
|
|
9222
|
-
},
|
|
9341
|
+
}, value: columnFilterState && columnFilterState[key(column)]
|
|
9342
|
+
? columnFilterState[key(column)]
|
|
9343
|
+
: '', "aria-label": "column name: '".concat(label(column), "' filter input") }))));
|
|
9223
9344
|
})))));
|
|
9224
9345
|
});
|
|
9225
9346
|
CSmartTableHead.propTypes = {
|
|
9226
9347
|
columnFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
9227
|
-
|
|
9348
|
+
columnFilterState: PropTypes$1.object,
|
|
9349
|
+
columnSorter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
9228
9350
|
component: PropTypes$1.elementType,
|
|
9229
9351
|
children: PropTypes$1.node,
|
|
9230
9352
|
columns: PropTypes$1.arrayOf(PropTypes$1.oneOfType([PropTypes$1.any, PropTypes$1.string])).isRequired,
|
|
@@ -9285,6 +9407,7 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9285
9407
|
React.useMemo(function () {
|
|
9286
9408
|
if (JSON.stringify(previousSorterValue.current) !== JSON.stringify(sorterValue)) {
|
|
9287
9409
|
previousSorterValue.current = sorterValue;
|
|
9410
|
+
setSorterState(__assign$1({}, sorterValue));
|
|
9288
9411
|
}
|
|
9289
9412
|
}, [sorterValue]);
|
|
9290
9413
|
React.useMemo(function () {
|
|
@@ -9326,7 +9449,12 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9326
9449
|
state.state = 'desc';
|
|
9327
9450
|
}
|
|
9328
9451
|
else {
|
|
9329
|
-
|
|
9452
|
+
if (typeof columnSorter === 'object' && !columnSorter.resetable) {
|
|
9453
|
+
state.state = 'asc';
|
|
9454
|
+
}
|
|
9455
|
+
else {
|
|
9456
|
+
state.state = 0;
|
|
9457
|
+
}
|
|
9330
9458
|
}
|
|
9331
9459
|
}
|
|
9332
9460
|
else {
|
|
@@ -9346,7 +9474,8 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9346
9474
|
if ((isLazy && type === 'input') || (!isLazy && type === 'change')) {
|
|
9347
9475
|
return;
|
|
9348
9476
|
}
|
|
9349
|
-
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);
|
|
9350
9479
|
setColumnFilterState(newState);
|
|
9351
9480
|
};
|
|
9352
9481
|
var tableFilterChange = function (value, type) {
|
|
@@ -9354,6 +9483,7 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9354
9483
|
if ((isLazy && type === 'input') || (!isLazy && type === 'change')) {
|
|
9355
9484
|
return;
|
|
9356
9485
|
}
|
|
9486
|
+
setActivePage(1);
|
|
9357
9487
|
setTableFilterState(value);
|
|
9358
9488
|
};
|
|
9359
9489
|
var clean = function () {
|
|
@@ -9486,6 +9616,7 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9486
9616
|
React.useEffect(function () {
|
|
9487
9617
|
if (selectable) {
|
|
9488
9618
|
var selected = _items.filter(function (item) { return item._selected === true; });
|
|
9619
|
+
onSelectedItemsChange && onSelectedItemsChange(selected);
|
|
9489
9620
|
if (selected.length === _items.length) {
|
|
9490
9621
|
setSelectedAll(true);
|
|
9491
9622
|
return;
|
|
@@ -9497,7 +9628,6 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9497
9628
|
if (selected.length !== 0 && selected.length !== _items.length) {
|
|
9498
9629
|
setSelectedAll('indeterminate');
|
|
9499
9630
|
}
|
|
9500
|
-
onSelectedItemsChange && onSelectedItemsChange(selected);
|
|
9501
9631
|
}
|
|
9502
9632
|
}, [_items]);
|
|
9503
9633
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
@@ -9513,7 +9643,7 @@ var CSmartTable = React.forwardRef(function (_a, ref) {
|
|
|
9513
9643
|
} })))))))),
|
|
9514
9644
|
React__default["default"].createElement("div", { className: "position-relative" },
|
|
9515
9645
|
React__default["default"].createElement(CTable, __assign$1({}, tableProps),
|
|
9516
|
-
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(); } }))),
|
|
9517
9647
|
React__default["default"].createElement(CSmartTableBody, __assign$1({ currentItems: currentItems, firstItemOnActivePageIndex: firstItemOnActivePageIndex, noItemsLabel: noItemsLabel, onRowClick: function (item, index, columnName, event) {
|
|
9518
9648
|
return clickableRows && onRowClick && onRowClick(item, index, columnName, event);
|
|
9519
9649
|
}, onRowChecked: function (id, value) { return handleRowChecked(id, value); }, rawColumnNames: rawColumnNames, scopedColumns: scopedColumns, selectable: selectable }, tableBodyProps)),
|
|
@@ -9643,7 +9773,7 @@ var CToast = React.forwardRef(function (_a, ref) {
|
|
|
9643
9773
|
var _className = classNames$1('toast', (_b = {
|
|
9644
9774
|
fade: animation
|
|
9645
9775
|
},
|
|
9646
|
-
_b["bg-"
|
|
9776
|
+
_b["bg-".concat(color)] = color,
|
|
9647
9777
|
_b['border-0'] = color,
|
|
9648
9778
|
_b), className);
|
|
9649
9779
|
var getTransitionClass = function (state) {
|
|
@@ -9800,7 +9930,7 @@ var CTooltip = function (_a) {
|
|
|
9800
9930
|
var transitionClass = getTransitionClass(state);
|
|
9801
9931
|
return (React__default["default"].createElement(Popper, { placement: placement }, function (_a) {
|
|
9802
9932
|
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
9803
|
-
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),
|
|
9804
9934
|
React__default["default"].createElement("div", __assign$1({ className: "tooltip-arrow" }, arrowProps)),
|
|
9805
9935
|
React__default["default"].createElement("div", { className: "tooltip-inner" }, content)));
|
|
9806
9936
|
}));
|
|
@@ -9808,7 +9938,7 @@ var CTooltip = function (_a) {
|
|
|
9808
9938
|
};
|
|
9809
9939
|
CTooltip.propTypes = {
|
|
9810
9940
|
children: PropTypes$1.any,
|
|
9811
|
-
content: PropTypes$1.node,
|
|
9941
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
9812
9942
|
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
9813
9943
|
onHide: PropTypes$1.func,
|
|
9814
9944
|
onShow: PropTypes$1.func,
|
|
@@ -9820,7 +9950,7 @@ CTooltip.displayName = 'CTooltip';
|
|
|
9820
9950
|
var CWidgetStatsA = React.forwardRef(function (_a, ref) {
|
|
9821
9951
|
var _b;
|
|
9822
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"]);
|
|
9823
|
-
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);
|
|
9824
9954
|
return (React__default["default"].createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
9825
9955
|
React__default["default"].createElement(CCardBody, { className: "pb-0 d-flex justify-content-between align-items-start" },
|
|
9826
9956
|
React__default["default"].createElement("div", null,
|
|
@@ -9863,8 +9993,8 @@ var CWidgetStatsC = React.forwardRef(function (_a, ref) {
|
|
|
9863
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"]);
|
|
9864
9994
|
return (React__default["default"].createElement(CCard, __assign$1({ className: className, color: color }, (inverse && { textColor: 'high-emphasis-inverse' }), rest, { ref: ref }),
|
|
9865
9995
|
React__default["default"].createElement(CCardBody, null,
|
|
9866
|
-
icon && (React__default["default"].createElement("div", { className: "text-medium-emphasis"
|
|
9867
|
-
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)),
|
|
9868
9998
|
title && (React__default["default"].createElement("div", { className: inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis' }, title)),
|
|
9869
9999
|
React__default["default"].createElement(CProgress, __assign$1({ className: "mt-3 mb-0", height: 4 }, (inverse && { white: true }), progress)))));
|
|
9870
10000
|
});
|
|
@@ -9884,7 +10014,7 @@ var CWidgetStatsD = React.forwardRef(function (_a, ref) {
|
|
|
9884
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"]);
|
|
9885
10015
|
var _className = classNames$1(className);
|
|
9886
10016
|
var classNameHeader = classNames$1('position-relative d-flex justify-content-center align-items-center', (_b = {},
|
|
9887
|
-
_b["bg-"
|
|
10017
|
+
_b["bg-".concat(color)] = color,
|
|
9888
10018
|
_b));
|
|
9889
10019
|
return (React__default["default"].createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
9890
10020
|
React__default["default"].createElement(CCardHeader, { className: classNameHeader },
|
|
@@ -9930,10 +10060,10 @@ var CWidgetStatsF = React.forwardRef(function (_a, ref) {
|
|
|
9930
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"]);
|
|
9931
10061
|
var _className = classNames$1(className);
|
|
9932
10062
|
return (React__default["default"].createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
9933
|
-
React__default["default"].createElement(CCardBody, { className: "d-flex align-items-center "
|
|
9934
|
-
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),
|
|
9935
10065
|
React__default["default"].createElement("div", null,
|
|
9936
|
-
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),
|
|
9937
10067
|
React__default["default"].createElement("div", { className: "text-medium-emphasis text-uppercase fw-semibold small" }, title))),
|
|
9938
10068
|
footer && React__default["default"].createElement(CCardFooter, null, footer)));
|
|
9939
10069
|
});
|
|
@@ -10041,6 +10171,7 @@ exports.COffcanvasHeader = COffcanvasHeader;
|
|
|
10041
10171
|
exports.COffcanvasTitle = COffcanvasTitle;
|
|
10042
10172
|
exports.CPagination = CPagination;
|
|
10043
10173
|
exports.CPaginationItem = CPaginationItem;
|
|
10174
|
+
exports.CPlaceholder = CPlaceholder;
|
|
10044
10175
|
exports.CPopover = CPopover;
|
|
10045
10176
|
exports.CProgress = CProgress;
|
|
10046
10177
|
exports.CProgressBar = CProgressBar;
|