@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.es.js
CHANGED
|
@@ -358,6 +358,8 @@ var ReactPropTypesSecret$7 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
|
358
358
|
|
|
359
359
|
var ReactPropTypesSecret_1$1 = ReactPropTypesSecret$7;
|
|
360
360
|
|
|
361
|
+
var has$4 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
362
|
+
|
|
361
363
|
/**
|
|
362
364
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
363
365
|
*
|
|
@@ -370,7 +372,7 @@ var printWarning$4 = function() {};
|
|
|
370
372
|
if (process.env.NODE_ENV !== 'production') {
|
|
371
373
|
var ReactPropTypesSecret$6 = ReactPropTypesSecret_1$1;
|
|
372
374
|
var loggedTypeFailures$1 = {};
|
|
373
|
-
var has$3 =
|
|
375
|
+
var has$3 = has$4;
|
|
374
376
|
|
|
375
377
|
printWarning$4 = function(text) {
|
|
376
378
|
var message = 'Warning: ' + text;
|
|
@@ -382,7 +384,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
382
384
|
// This error was thrown as a convenience so that you can use this stack
|
|
383
385
|
// to find the callsite that caused this warning to fire.
|
|
384
386
|
throw new Error(message);
|
|
385
|
-
} catch (x) {}
|
|
387
|
+
} catch (x) { /**/ }
|
|
386
388
|
};
|
|
387
389
|
}
|
|
388
390
|
|
|
@@ -411,7 +413,8 @@ function checkPropTypes$3(typeSpecs, values, location, componentName, getStack)
|
|
|
411
413
|
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
412
414
|
var err = Error(
|
|
413
415
|
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
414
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
416
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
417
|
+
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
415
418
|
);
|
|
416
419
|
err.name = 'Invariant Violation';
|
|
417
420
|
throw err;
|
|
@@ -470,9 +473,9 @@ var ReactIs$3 = reactIs$1.exports;
|
|
|
470
473
|
var assign$1 = objectAssign$1;
|
|
471
474
|
|
|
472
475
|
var ReactPropTypesSecret$5 = ReactPropTypesSecret_1$1;
|
|
476
|
+
var has$2 = has$4;
|
|
473
477
|
var checkPropTypes$2 = checkPropTypes_1$1;
|
|
474
478
|
|
|
475
|
-
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
476
479
|
var printWarning$3 = function() {};
|
|
477
480
|
|
|
478
481
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -573,6 +576,7 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
573
576
|
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
574
577
|
var ReactPropTypes = {
|
|
575
578
|
array: createPrimitiveTypeChecker('array'),
|
|
579
|
+
bigint: createPrimitiveTypeChecker('bigint'),
|
|
576
580
|
bool: createPrimitiveTypeChecker('boolean'),
|
|
577
581
|
func: createPrimitiveTypeChecker('function'),
|
|
578
582
|
number: createPrimitiveTypeChecker('number'),
|
|
@@ -618,8 +622,9 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
618
622
|
* is prohibitively expensive if they are created too often, such as what
|
|
619
623
|
* happens in oneOfType() for any type before the one that matched.
|
|
620
624
|
*/
|
|
621
|
-
function PropTypeError(message) {
|
|
625
|
+
function PropTypeError(message, data) {
|
|
622
626
|
this.message = message;
|
|
627
|
+
this.data = data && typeof data === 'object' ? data: {};
|
|
623
628
|
this.stack = '';
|
|
624
629
|
}
|
|
625
630
|
// Make `instanceof Error` still work for returned errors.
|
|
@@ -654,7 +659,7 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
654
659
|
) {
|
|
655
660
|
printWarning$3(
|
|
656
661
|
'You are manually calling a React.PropTypes validation ' +
|
|
657
|
-
'function for the `' + propFullName + '` prop on `' + componentName
|
|
662
|
+
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
658
663
|
'and will throw in the standalone `prop-types` package. ' +
|
|
659
664
|
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
660
665
|
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
@@ -693,7 +698,10 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
693
698
|
// 'of type `object`'.
|
|
694
699
|
var preciseType = getPreciseType(propValue);
|
|
695
700
|
|
|
696
|
-
return new PropTypeError(
|
|
701
|
+
return new PropTypeError(
|
|
702
|
+
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
703
|
+
{expectedType: expectedType}
|
|
704
|
+
);
|
|
697
705
|
}
|
|
698
706
|
return null;
|
|
699
707
|
}
|
|
@@ -837,14 +845,19 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
837
845
|
}
|
|
838
846
|
|
|
839
847
|
function validate(props, propName, componentName, location, propFullName) {
|
|
848
|
+
var expectedTypes = [];
|
|
840
849
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
841
850
|
var checker = arrayOfTypeCheckers[i];
|
|
842
|
-
|
|
851
|
+
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$5);
|
|
852
|
+
if (checkerResult == null) {
|
|
843
853
|
return null;
|
|
844
854
|
}
|
|
855
|
+
if (checkerResult.data.hasOwnProperty('expectedType')) {
|
|
856
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
857
|
+
}
|
|
845
858
|
}
|
|
846
|
-
|
|
847
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '
|
|
859
|
+
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
860
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
848
861
|
}
|
|
849
862
|
return createChainableTypeChecker(validate);
|
|
850
863
|
}
|
|
@@ -859,6 +872,13 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
859
872
|
return createChainableTypeChecker(validate);
|
|
860
873
|
}
|
|
861
874
|
|
|
875
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
876
|
+
return new PropTypeError(
|
|
877
|
+
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
878
|
+
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
879
|
+
);
|
|
880
|
+
}
|
|
881
|
+
|
|
862
882
|
function createShapeTypeChecker(shapeTypes) {
|
|
863
883
|
function validate(props, propName, componentName, location, propFullName) {
|
|
864
884
|
var propValue = props[propName];
|
|
@@ -868,8 +888,8 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
868
888
|
}
|
|
869
889
|
for (var key in shapeTypes) {
|
|
870
890
|
var checker = shapeTypes[key];
|
|
871
|
-
if (
|
|
872
|
-
|
|
891
|
+
if (typeof checker !== 'function') {
|
|
892
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
873
893
|
}
|
|
874
894
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$5);
|
|
875
895
|
if (error) {
|
|
@@ -888,16 +908,18 @@ var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
|
888
908
|
if (propType !== 'object') {
|
|
889
909
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
890
910
|
}
|
|
891
|
-
// We need to check all keys in case some are required but missing from
|
|
892
|
-
// props.
|
|
911
|
+
// We need to check all keys in case some are required but missing from props.
|
|
893
912
|
var allKeys = assign$1({}, props[propName], shapeTypes);
|
|
894
913
|
for (var key in allKeys) {
|
|
895
914
|
var checker = shapeTypes[key];
|
|
915
|
+
if (has$2(shapeTypes, key) && typeof checker !== 'function') {
|
|
916
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
917
|
+
}
|
|
896
918
|
if (!checker) {
|
|
897
919
|
return new PropTypeError(
|
|
898
920
|
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
899
921
|
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
900
|
-
'\nValid keys: ' +
|
|
922
|
+
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
901
923
|
);
|
|
902
924
|
}
|
|
903
925
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$5);
|
|
@@ -1082,6 +1104,7 @@ var factoryWithThrowingShims$1 = function() {
|
|
|
1082
1104
|
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1083
1105
|
var ReactPropTypes = {
|
|
1084
1106
|
array: shim,
|
|
1107
|
+
bigint: shim,
|
|
1085
1108
|
bool: shim,
|
|
1086
1109
|
func: shim,
|
|
1087
1110
|
number: shim,
|
|
@@ -2360,6 +2383,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
|
|
|
2360
2383
|
var CSSTransition$1 = CSSTransition;
|
|
2361
2384
|
|
|
2362
2385
|
// code borrowed from https://github.com/reach/reach-ui
|
|
2386
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2363
2387
|
function useForkedRef() {
|
|
2364
2388
|
var refs = [];
|
|
2365
2389
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -2369,6 +2393,7 @@ function useForkedRef() {
|
|
|
2369
2393
|
if (refs.every(function (ref) { return ref == null; })) {
|
|
2370
2394
|
return null;
|
|
2371
2395
|
}
|
|
2396
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2372
2397
|
return function (node) {
|
|
2373
2398
|
refs.forEach(function (ref) {
|
|
2374
2399
|
assignRef(ref, node);
|
|
@@ -2376,7 +2401,10 @@ function useForkedRef() {
|
|
|
2376
2401
|
};
|
|
2377
2402
|
}, refs);
|
|
2378
2403
|
}
|
|
2379
|
-
|
|
2404
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2405
|
+
function assignRef(ref,
|
|
2406
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2407
|
+
value) {
|
|
2380
2408
|
if (ref == null)
|
|
2381
2409
|
return;
|
|
2382
2410
|
if (isFunction(ref)) {
|
|
@@ -2387,17 +2415,19 @@ function assignRef(ref, value) {
|
|
|
2387
2415
|
ref.current = value;
|
|
2388
2416
|
}
|
|
2389
2417
|
catch (error) {
|
|
2390
|
-
throw new Error("Cannot assign value \""
|
|
2418
|
+
throw new Error("Cannot assign value \"".concat(value, "\" to ref \"").concat(ref, "\""));
|
|
2391
2419
|
}
|
|
2392
2420
|
}
|
|
2393
2421
|
}
|
|
2422
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
2394
2423
|
function isFunction(value) {
|
|
2395
2424
|
return !!(value && {}.toString.call(value) == '[object Function]');
|
|
2396
2425
|
}
|
|
2397
2426
|
|
|
2398
2427
|
var CCollapse = forwardRef(function (_a, ref) {
|
|
2399
|
-
var children = _a.children, className = _a.className, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest$1(_a, ["children", "className", "onHide", "onShow", "visible"]);
|
|
2428
|
+
var children = _a.children, className = _a.className, horizontal = _a.horizontal, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest$1(_a, ["children", "className", "horizontal", "onHide", "onShow", "visible"]);
|
|
2400
2429
|
var _b = useState(), height = _b[0], setHeight = _b[1];
|
|
2430
|
+
var _c = useState(), width = _c[0], setWidth = _c[1];
|
|
2401
2431
|
var collapseRef = useRef(null);
|
|
2402
2432
|
var forkedRef = useForkedRef(ref, collapseRef);
|
|
2403
2433
|
var getTransitionClass = function (state) {
|
|
@@ -2411,31 +2441,55 @@ var CCollapse = forwardRef(function (_a, ref) {
|
|
|
2411
2441
|
};
|
|
2412
2442
|
var onEntering = function () {
|
|
2413
2443
|
onShow && onShow();
|
|
2444
|
+
if (horizontal) {
|
|
2445
|
+
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
2446
|
+
return;
|
|
2447
|
+
}
|
|
2414
2448
|
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
2415
2449
|
};
|
|
2416
2450
|
var onEntered = function () {
|
|
2451
|
+
if (horizontal) {
|
|
2452
|
+
setWidth(0);
|
|
2453
|
+
return;
|
|
2454
|
+
}
|
|
2417
2455
|
setHeight(0);
|
|
2418
2456
|
};
|
|
2419
2457
|
var onExit = function () {
|
|
2458
|
+
if (horizontal) {
|
|
2459
|
+
collapseRef.current && setWidth(collapseRef.current.scrollWidth);
|
|
2460
|
+
return;
|
|
2461
|
+
}
|
|
2420
2462
|
collapseRef.current && setHeight(collapseRef.current.scrollHeight);
|
|
2421
2463
|
};
|
|
2422
2464
|
var onExiting = function () {
|
|
2423
2465
|
onHide && onHide();
|
|
2466
|
+
if (horizontal) {
|
|
2467
|
+
setWidth(0);
|
|
2468
|
+
return;
|
|
2469
|
+
}
|
|
2424
2470
|
setHeight(0);
|
|
2425
2471
|
};
|
|
2426
2472
|
var onExited = function () {
|
|
2473
|
+
if (horizontal) {
|
|
2474
|
+
setWidth(0);
|
|
2475
|
+
return;
|
|
2476
|
+
}
|
|
2427
2477
|
setHeight(0);
|
|
2428
2478
|
};
|
|
2429
|
-
var _className = classNames$1(
|
|
2479
|
+
var _className = classNames$1({
|
|
2480
|
+
'collapse-horizontal': horizontal,
|
|
2481
|
+
}, className);
|
|
2430
2482
|
return (React__default.createElement(CSSTransition$1, { in: visible, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 350 }, function (state) {
|
|
2431
2483
|
var transitionClass = getTransitionClass(state);
|
|
2432
2484
|
var currentHeight = height === 0 ? null : { height: height };
|
|
2433
|
-
|
|
2485
|
+
var currentWidth = width === 0 ? null : { width: width };
|
|
2486
|
+
return (React__default.createElement("div", __assign$1({ className: classNames$1(_className, transitionClass), style: __assign$1(__assign$1({}, currentHeight), currentWidth) }, rest, { ref: forkedRef }), children));
|
|
2434
2487
|
}));
|
|
2435
2488
|
});
|
|
2436
2489
|
CCollapse.propTypes = {
|
|
2437
2490
|
children: PropTypes$1.node,
|
|
2438
2491
|
className: PropTypes$1.string,
|
|
2492
|
+
horizontal: PropTypes$1.bool,
|
|
2439
2493
|
onHide: PropTypes$1.func,
|
|
2440
2494
|
onShow: PropTypes$1.func,
|
|
2441
2495
|
visible: PropTypes$1.bool,
|
|
@@ -2571,7 +2625,7 @@ var CAlert = forwardRef(function (_a, ref) {
|
|
|
2571
2625
|
useEffect(function () {
|
|
2572
2626
|
setVisible(visible);
|
|
2573
2627
|
}, [visible]);
|
|
2574
|
-
var _className = classNames$1('alert', variant === 'solid' ? "bg-"
|
|
2628
|
+
var _className = classNames$1('alert', variant === 'solid' ? "bg-".concat(color, " text-white") : "alert-".concat(color), {
|
|
2575
2629
|
'alert-dismissible fade': dismissible,
|
|
2576
2630
|
}, className);
|
|
2577
2631
|
var getTransitionClass = function (state) {
|
|
@@ -2642,11 +2696,11 @@ var CAvatar = forwardRef(function (_a, ref) {
|
|
|
2642
2696
|
var _b;
|
|
2643
2697
|
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"]);
|
|
2644
2698
|
var _className = classNames$1('avatar', (_b = {},
|
|
2645
|
-
_b["bg-"
|
|
2646
|
-
_b["avatar-"
|
|
2647
|
-
_b["text-"
|
|
2699
|
+
_b["bg-".concat(color)] = color,
|
|
2700
|
+
_b["avatar-".concat(size)] = size,
|
|
2701
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2648
2702
|
_b), shape, className);
|
|
2649
|
-
var statusClassName = status && classNames$1('avatar-status', "bg-"
|
|
2703
|
+
var statusClassName = status && classNames$1('avatar-status', "bg-".concat(status));
|
|
2650
2704
|
return (React__default.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
2651
2705
|
src ? React__default.createElement("img", { src: src, className: "avatar-img" }) : children,
|
|
2652
2706
|
status && React__default.createElement("span", { className: statusClassName })));
|
|
@@ -2667,14 +2721,14 @@ var CBadge = forwardRef(function (_a, ref) {
|
|
|
2667
2721
|
var _b;
|
|
2668
2722
|
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"]);
|
|
2669
2723
|
var _className = classNames$1('badge', (_b = {},
|
|
2670
|
-
_b["bg-"
|
|
2724
|
+
_b["bg-".concat(color)] = color,
|
|
2671
2725
|
_b['position-absolute translate-middle'] = position,
|
|
2672
2726
|
_b['top-0'] = position === null || position === void 0 ? void 0 : position.includes('top'),
|
|
2673
2727
|
_b['top-100'] = position === null || position === void 0 ? void 0 : position.includes('bottom'),
|
|
2674
2728
|
_b['start-100'] = position === null || position === void 0 ? void 0 : position.includes('end'),
|
|
2675
2729
|
_b['start-0'] = position === null || position === void 0 ? void 0 : position.includes('start'),
|
|
2676
|
-
_b["badge-"
|
|
2677
|
-
_b["text-"
|
|
2730
|
+
_b["badge-".concat(size)] = size,
|
|
2731
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2678
2732
|
_b), shape, className);
|
|
2679
2733
|
return (React__default.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2680
2734
|
});
|
|
@@ -2737,7 +2791,7 @@ CBreadcrumbItem.displayName = 'CBreadcrumbItem';
|
|
|
2737
2791
|
var CButton = forwardRef(function (_a, ref) {
|
|
2738
2792
|
var _b;
|
|
2739
2793
|
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"]);
|
|
2740
|
-
var _className = classNames$1('btn', variant ? "btn-"
|
|
2794
|
+
var _className = classNames$1('btn', variant ? "btn-".concat(variant, "-").concat(color) : "btn-".concat(color), (_b = {}, _b["btn-".concat(size)] = size, _b), shape, className);
|
|
2741
2795
|
return (React__default.createElement(CLink, __assign$1({ component: rest.href ? 'a' : component, type: type, className: _className }, rest, { ref: ref }), children));
|
|
2742
2796
|
});
|
|
2743
2797
|
CButton.propTypes = {
|
|
@@ -2755,7 +2809,7 @@ CButton.displayName = 'CButton';
|
|
|
2755
2809
|
var CButtonGroup = forwardRef(function (_a, ref) {
|
|
2756
2810
|
var _b;
|
|
2757
2811
|
var children = _a.children, className = _a.className, size = _a.size, vertical = _a.vertical, rest = __rest$1(_a, ["children", "className", "size", "vertical"]);
|
|
2758
|
-
var _className = classNames$1(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-"
|
|
2812
|
+
var _className = classNames$1(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-".concat(size)] = size, _b), className);
|
|
2759
2813
|
return (React__default.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2760
2814
|
});
|
|
2761
2815
|
CButtonGroup.propTypes = {
|
|
@@ -2781,7 +2835,7 @@ var CCallout = forwardRef(function (_a, ref) {
|
|
|
2781
2835
|
var _b;
|
|
2782
2836
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
2783
2837
|
var _className = classNames$1('callout', (_b = {},
|
|
2784
|
-
_b["callout-"
|
|
2838
|
+
_b["callout-".concat(color)] = color,
|
|
2785
2839
|
_b), className);
|
|
2786
2840
|
return (React__default.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2787
2841
|
});
|
|
@@ -2796,8 +2850,8 @@ var CCard = forwardRef(function (_a, ref) {
|
|
|
2796
2850
|
var _b;
|
|
2797
2851
|
var children = _a.children, className = _a.className, color = _a.color, textColor = _a.textColor, rest = __rest$1(_a, ["children", "className", "color", "textColor"]);
|
|
2798
2852
|
var _className = classNames$1('card', (_b = {},
|
|
2799
|
-
_b["bg-"
|
|
2800
|
-
_b["text-"
|
|
2853
|
+
_b["bg-".concat(color)] = color,
|
|
2854
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2801
2855
|
_b), className);
|
|
2802
2856
|
return (React__default.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2803
2857
|
});
|
|
@@ -2856,7 +2910,7 @@ CCardHeader.displayName = 'CCardHeader';
|
|
|
2856
2910
|
|
|
2857
2911
|
var CCardImage = forwardRef(function (_a, ref) {
|
|
2858
2912
|
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"]);
|
|
2859
|
-
var _className = classNames$1(orientation ? "card-img-"
|
|
2913
|
+
var _className = classNames$1(orientation ? "card-img-".concat(orientation) : 'card-img', className);
|
|
2860
2914
|
return (React__default.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2861
2915
|
});
|
|
2862
2916
|
CCardImage.propTypes = {
|
|
@@ -3022,7 +3076,7 @@ var CCarousel = forwardRef(function (_a, ref) {
|
|
|
3022
3076
|
setCustomInterval: setCustomInterval,
|
|
3023
3077
|
} },
|
|
3024
3078
|
indicators && (React__default.createElement("ol", { className: "carousel-indicators" }, Array.from({ length: itemsNumber }, function (_, i) { return i; }).map(function (index) {
|
|
3025
|
-
return (React__default.createElement("li", { key: "indicator"
|
|
3079
|
+
return (React__default.createElement("li", { key: "indicator".concat(index), onClick: function () {
|
|
3026
3080
|
!animating && handleIndicatorClick(index);
|
|
3027
3081
|
}, className: active === index ? 'active' : '', "data-coreui-target": "" }));
|
|
3028
3082
|
}))),
|
|
@@ -3082,7 +3136,7 @@ var CCarouselItem = forwardRef(function (_a, ref) {
|
|
|
3082
3136
|
if (active) {
|
|
3083
3137
|
setCustomInterval(interval);
|
|
3084
3138
|
if (count !== 0)
|
|
3085
|
-
setOrderClassName("carousel-item-"
|
|
3139
|
+
setOrderClassName("carousel-item-".concat(direction));
|
|
3086
3140
|
}
|
|
3087
3141
|
if (prevActive.current && !active) {
|
|
3088
3142
|
setActiveClassName('active');
|
|
@@ -3094,7 +3148,7 @@ var CCarouselItem = forwardRef(function (_a, ref) {
|
|
|
3094
3148
|
// @ts-expect-error reflow is necessary to proper transition
|
|
3095
3149
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3096
3150
|
(_a = carouselItemRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
|
|
3097
|
-
setDirectionClassName("carousel-item-"
|
|
3151
|
+
setDirectionClassName("carousel-item-".concat(direction === 'next' ? 'start' : 'end'));
|
|
3098
3152
|
}
|
|
3099
3153
|
}, 0);
|
|
3100
3154
|
}
|
|
@@ -3383,29 +3437,32 @@ function getBasePlacement(placement) {
|
|
|
3383
3437
|
return placement.split('-')[0];
|
|
3384
3438
|
}
|
|
3385
3439
|
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3440
|
+
var max = Math.max;
|
|
3441
|
+
var min = Math.min;
|
|
3442
|
+
var round = Math.round;
|
|
3443
|
+
|
|
3444
|
+
function getBoundingClientRect(element, includeScale) {
|
|
3445
|
+
if (includeScale === void 0) {
|
|
3446
|
+
includeScale = false;
|
|
3447
|
+
}
|
|
3389
3448
|
|
|
3390
3449
|
var rect = element.getBoundingClientRect();
|
|
3391
3450
|
var scaleX = 1;
|
|
3392
|
-
var scaleY = 1;
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
// }
|
|
3408
|
-
// }
|
|
3451
|
+
var scaleY = 1;
|
|
3452
|
+
|
|
3453
|
+
if (isHTMLElement(element) && includeScale) {
|
|
3454
|
+
var offsetHeight = element.offsetHeight;
|
|
3455
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
3456
|
+
// Fallback to 1 in case both values are `0`
|
|
3457
|
+
|
|
3458
|
+
if (offsetWidth > 0) {
|
|
3459
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
3460
|
+
}
|
|
3461
|
+
|
|
3462
|
+
if (offsetHeight > 0) {
|
|
3463
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3409
3466
|
|
|
3410
3467
|
return {
|
|
3411
3468
|
width: rect.width / scaleX,
|
|
@@ -3560,13 +3617,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
3560
3617
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
3561
3618
|
}
|
|
3562
3619
|
|
|
3563
|
-
var max = Math.max;
|
|
3564
|
-
var min = Math.min;
|
|
3565
|
-
var round = Math.round;
|
|
3566
|
-
|
|
3567
3620
|
function within(min$1, value, max$1) {
|
|
3568
3621
|
return max(min$1, min(value, max$1));
|
|
3569
3622
|
}
|
|
3623
|
+
function withinMaxClamp(min, value, max) {
|
|
3624
|
+
var v = within(min, value, max);
|
|
3625
|
+
return v > max ? max : v;
|
|
3626
|
+
}
|
|
3570
3627
|
|
|
3571
3628
|
function getFreshSideObject() {
|
|
3572
3629
|
return {
|
|
@@ -3698,8 +3755,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
3698
3755
|
var win = window;
|
|
3699
3756
|
var dpr = win.devicePixelRatio || 1;
|
|
3700
3757
|
return {
|
|
3701
|
-
x: round(
|
|
3702
|
-
y: round(
|
|
3758
|
+
x: round(x * dpr) / dpr || 0,
|
|
3759
|
+
y: round(y * dpr) / dpr || 0
|
|
3703
3760
|
};
|
|
3704
3761
|
}
|
|
3705
3762
|
|
|
@@ -3714,7 +3771,8 @@ function mapToStyles(_ref2) {
|
|
|
3714
3771
|
position = _ref2.position,
|
|
3715
3772
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
3716
3773
|
adaptive = _ref2.adaptive,
|
|
3717
|
-
roundOffsets = _ref2.roundOffsets
|
|
3774
|
+
roundOffsets = _ref2.roundOffsets,
|
|
3775
|
+
isFixed = _ref2.isFixed;
|
|
3718
3776
|
|
|
3719
3777
|
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
|
|
3720
3778
|
_ref3$x = _ref3.x,
|
|
@@ -3746,16 +3804,18 @@ function mapToStyles(_ref2) {
|
|
|
3746
3804
|
offsetParent = offsetParent;
|
|
3747
3805
|
|
|
3748
3806
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
3749
|
-
sideY = bottom;
|
|
3750
|
-
|
|
3751
|
-
|
|
3807
|
+
sideY = bottom;
|
|
3808
|
+
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
3809
|
+
offsetParent[heightProp];
|
|
3810
|
+
y -= offsetY - popperRect.height;
|
|
3752
3811
|
y *= gpuAcceleration ? 1 : -1;
|
|
3753
3812
|
}
|
|
3754
3813
|
|
|
3755
3814
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
3756
|
-
sideX = right;
|
|
3757
|
-
|
|
3758
|
-
|
|
3815
|
+
sideX = right;
|
|
3816
|
+
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
3817
|
+
offsetParent[widthProp];
|
|
3818
|
+
x -= offsetX - popperRect.width;
|
|
3759
3819
|
x *= gpuAcceleration ? 1 : -1;
|
|
3760
3820
|
}
|
|
3761
3821
|
}
|
|
@@ -3798,7 +3858,8 @@ function computeStyles(_ref4) {
|
|
|
3798
3858
|
variation: getVariation(state.placement),
|
|
3799
3859
|
popper: state.elements.popper,
|
|
3800
3860
|
popperRect: state.rects.popper,
|
|
3801
|
-
gpuAcceleration: gpuAcceleration
|
|
3861
|
+
gpuAcceleration: gpuAcceleration,
|
|
3862
|
+
isFixed: state.options.strategy === 'fixed'
|
|
3802
3863
|
};
|
|
3803
3864
|
|
|
3804
3865
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -4056,7 +4117,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
4056
4117
|
}
|
|
4057
4118
|
|
|
4058
4119
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
4059
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
4120
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
4060
4121
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
4061
4122
|
// clipping (or hiding) overflowing elements with a position different from
|
|
4062
4123
|
// `initial`
|
|
@@ -4073,7 +4134,7 @@ function getClippingParents(element) {
|
|
|
4073
4134
|
|
|
4074
4135
|
|
|
4075
4136
|
return clippingParents.filter(function (clippingParent) {
|
|
4076
|
-
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
|
4137
|
+
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle$1(clippingParent).position !== 'static' : true);
|
|
4077
4138
|
});
|
|
4078
4139
|
} // Gets the maximum area that the element is visible in due to any number of
|
|
4079
4140
|
// clipping parents
|
|
@@ -4573,6 +4634,14 @@ function preventOverflow(_ref) {
|
|
|
4573
4634
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
4574
4635
|
placement: state.placement
|
|
4575
4636
|
})) : tetherOffset;
|
|
4637
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
4638
|
+
mainAxis: tetherOffsetValue,
|
|
4639
|
+
altAxis: tetherOffsetValue
|
|
4640
|
+
} : Object.assign({
|
|
4641
|
+
mainAxis: 0,
|
|
4642
|
+
altAxis: 0
|
|
4643
|
+
}, tetherOffsetValue);
|
|
4644
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
4576
4645
|
var data = {
|
|
4577
4646
|
x: 0,
|
|
4578
4647
|
y: 0
|
|
@@ -4582,13 +4651,15 @@ function preventOverflow(_ref) {
|
|
|
4582
4651
|
return;
|
|
4583
4652
|
}
|
|
4584
4653
|
|
|
4585
|
-
if (checkMainAxis
|
|
4654
|
+
if (checkMainAxis) {
|
|
4655
|
+
var _offsetModifierState$;
|
|
4656
|
+
|
|
4586
4657
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
4587
4658
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
4588
4659
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
4589
4660
|
var offset = popperOffsets[mainAxis];
|
|
4590
|
-
var min$1 =
|
|
4591
|
-
var max$1 =
|
|
4661
|
+
var min$1 = offset + overflow[mainSide];
|
|
4662
|
+
var max$1 = offset - overflow[altSide];
|
|
4592
4663
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
4593
4664
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
4594
4665
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -4608,36 +4679,45 @@ function preventOverflow(_ref) {
|
|
|
4608
4679
|
// width or height)
|
|
4609
4680
|
|
|
4610
4681
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
4611
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
4612
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
4682
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
4683
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
4613
4684
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
4614
4685
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
4615
|
-
var offsetModifierValue =
|
|
4616
|
-
var tetherMin =
|
|
4617
|
-
var tetherMax =
|
|
4686
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
4687
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
4688
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
4689
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
4690
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
4691
|
+
data[mainAxis] = preventedOffset - offset;
|
|
4692
|
+
}
|
|
4618
4693
|
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
4622
|
-
data[mainAxis] = preventedOffset - offset;
|
|
4623
|
-
}
|
|
4694
|
+
if (checkAltAxis) {
|
|
4695
|
+
var _offsetModifierState$2;
|
|
4624
4696
|
|
|
4625
|
-
|
|
4626
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
4697
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
4627
4698
|
|
|
4628
|
-
|
|
4699
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
4629
4700
|
|
|
4630
|
-
|
|
4701
|
+
var _offset = popperOffsets[altAxis];
|
|
4631
4702
|
|
|
4632
|
-
|
|
4703
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
4633
4704
|
|
|
4634
|
-
|
|
4705
|
+
var _min = _offset + overflow[_mainSide];
|
|
4635
4706
|
|
|
4636
|
-
|
|
4707
|
+
var _max = _offset - overflow[_altSide];
|
|
4637
4708
|
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4709
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
4710
|
+
|
|
4711
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
4712
|
+
|
|
4713
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
4714
|
+
|
|
4715
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
4716
|
+
|
|
4717
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
4718
|
+
|
|
4719
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
4720
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
4641
4721
|
}
|
|
4642
4722
|
|
|
4643
4723
|
state.modifiersData[name] = data;
|
|
@@ -4669,8 +4749,8 @@ function getNodeScroll(node) {
|
|
|
4669
4749
|
|
|
4670
4750
|
function isElementScaled(element) {
|
|
4671
4751
|
var rect = element.getBoundingClientRect();
|
|
4672
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
4673
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
4752
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
4753
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
4674
4754
|
return scaleX !== 1 || scaleY !== 1;
|
|
4675
4755
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
4676
4756
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -4682,9 +4762,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
4682
4762
|
}
|
|
4683
4763
|
|
|
4684
4764
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
4685
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
4765
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
4686
4766
|
var documentElement = getDocumentElement(offsetParent);
|
|
4687
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
4767
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
4688
4768
|
var scroll = {
|
|
4689
4769
|
scrollLeft: 0,
|
|
4690
4770
|
scrollTop: 0
|
|
@@ -4701,7 +4781,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
4701
4781
|
}
|
|
4702
4782
|
|
|
4703
4783
|
if (isHTMLElement(offsetParent)) {
|
|
4704
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
4784
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
4705
4785
|
offsets.x += offsetParent.clientLeft;
|
|
4706
4786
|
offsets.y += offsetParent.clientTop;
|
|
4707
4787
|
} else if (documentElement) {
|
|
@@ -5679,11 +5759,11 @@ var CDropdownMenu = function (_a) {
|
|
|
5679
5759
|
var classNames = [];
|
|
5680
5760
|
if (typeof alignment === 'object') {
|
|
5681
5761
|
Object.keys(alignment).map(function (key) {
|
|
5682
|
-
classNames.push("dropdown-menu"
|
|
5762
|
+
classNames.push("dropdown-menu".concat(key === 'xs' ? '' : "-".concat(key), "-").concat(alignment[key]));
|
|
5683
5763
|
});
|
|
5684
5764
|
}
|
|
5685
5765
|
if (typeof alignment === 'string') {
|
|
5686
|
-
classNames.push("dropdown-menu-"
|
|
5766
|
+
classNames.push("dropdown-menu-".concat(alignment));
|
|
5687
5767
|
}
|
|
5688
5768
|
return classNames;
|
|
5689
5769
|
};
|
|
@@ -5752,7 +5832,7 @@ CDropdownToggle.propTypes = {
|
|
|
5752
5832
|
};
|
|
5753
5833
|
CDropdownToggle.displayName = 'CDropdownToggle';
|
|
5754
5834
|
|
|
5755
|
-
var BREAKPOINTS$
|
|
5835
|
+
var BREAKPOINTS$3 = [
|
|
5756
5836
|
'xxl',
|
|
5757
5837
|
'xl',
|
|
5758
5838
|
'lg',
|
|
@@ -5762,33 +5842,33 @@ var BREAKPOINTS$2 = [
|
|
|
5762
5842
|
];
|
|
5763
5843
|
var CCol = forwardRef(function (_a, ref) {
|
|
5764
5844
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
5765
|
-
var
|
|
5766
|
-
BREAKPOINTS$
|
|
5845
|
+
var repsonsiveClassNames = [];
|
|
5846
|
+
BREAKPOINTS$3.forEach(function (bp) {
|
|
5767
5847
|
var breakpoint = rest[bp];
|
|
5768
5848
|
delete rest[bp];
|
|
5769
|
-
var infix = bp === 'xs' ? '' : "-"
|
|
5849
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
5770
5850
|
if (typeof breakpoint === 'number' || typeof breakpoint === 'string') {
|
|
5771
|
-
|
|
5851
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint));
|
|
5772
5852
|
}
|
|
5773
5853
|
if (typeof breakpoint === 'boolean') {
|
|
5774
|
-
|
|
5854
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
5775
5855
|
}
|
|
5776
5856
|
if (breakpoint && typeof breakpoint === 'object') {
|
|
5777
5857
|
if (typeof breakpoint.span === 'number' || typeof breakpoint.span === 'string') {
|
|
5778
|
-
|
|
5858
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint.span));
|
|
5779
5859
|
}
|
|
5780
5860
|
if (typeof breakpoint.span === 'boolean') {
|
|
5781
|
-
|
|
5861
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
5782
5862
|
}
|
|
5783
5863
|
if (typeof breakpoint.order === 'number' || typeof breakpoint.order === 'string') {
|
|
5784
|
-
|
|
5864
|
+
repsonsiveClassNames.push("order".concat(infix, "-").concat(breakpoint.order));
|
|
5785
5865
|
}
|
|
5786
5866
|
if (typeof breakpoint.offset === 'number') {
|
|
5787
|
-
|
|
5867
|
+
repsonsiveClassNames.push("offset".concat(infix, "-").concat(breakpoint.offset));
|
|
5788
5868
|
}
|
|
5789
5869
|
}
|
|
5790
5870
|
});
|
|
5791
|
-
var _className = classNames$1(
|
|
5871
|
+
var _className = classNames$1(repsonsiveClassNames.length ? repsonsiveClassNames : 'col', className);
|
|
5792
5872
|
return (React__default.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
5793
5873
|
});
|
|
5794
5874
|
var span = PropTypes$1.oneOfType([
|
|
@@ -5817,7 +5897,7 @@ CCol.propTypes = {
|
|
|
5817
5897
|
};
|
|
5818
5898
|
CCol.displayName = 'CCol';
|
|
5819
5899
|
|
|
5820
|
-
var BREAKPOINTS$
|
|
5900
|
+
var BREAKPOINTS$2 = [
|
|
5821
5901
|
'xxl',
|
|
5822
5902
|
'xl',
|
|
5823
5903
|
'lg',
|
|
@@ -5827,13 +5907,13 @@ var BREAKPOINTS$1 = [
|
|
|
5827
5907
|
];
|
|
5828
5908
|
var CContainer = forwardRef(function (_a, ref) {
|
|
5829
5909
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
5830
|
-
var
|
|
5831
|
-
BREAKPOINTS$
|
|
5910
|
+
var repsonsiveClassNames = [];
|
|
5911
|
+
BREAKPOINTS$2.forEach(function (bp) {
|
|
5832
5912
|
var breakpoint = rest[bp];
|
|
5833
5913
|
delete rest[bp];
|
|
5834
|
-
breakpoint &&
|
|
5914
|
+
breakpoint && repsonsiveClassNames.push("container-".concat(bp));
|
|
5835
5915
|
});
|
|
5836
|
-
var _className = classNames$1(
|
|
5916
|
+
var _className = classNames$1(repsonsiveClassNames.length ? repsonsiveClassNames : 'container', className);
|
|
5837
5917
|
return (React__default.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
5838
5918
|
});
|
|
5839
5919
|
CContainer.propTypes = {
|
|
@@ -5848,7 +5928,7 @@ CContainer.propTypes = {
|
|
|
5848
5928
|
};
|
|
5849
5929
|
CContainer.displayName = 'CContainer';
|
|
5850
5930
|
|
|
5851
|
-
var BREAKPOINTS = [
|
|
5931
|
+
var BREAKPOINTS$1 = [
|
|
5852
5932
|
'xxl',
|
|
5853
5933
|
'xl',
|
|
5854
5934
|
'lg',
|
|
@@ -5858,27 +5938,27 @@ var BREAKPOINTS = [
|
|
|
5858
5938
|
];
|
|
5859
5939
|
var CRow = forwardRef(function (_a, ref) {
|
|
5860
5940
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
5861
|
-
var
|
|
5862
|
-
BREAKPOINTS.forEach(function (bp) {
|
|
5941
|
+
var repsonsiveClassNames = [];
|
|
5942
|
+
BREAKPOINTS$1.forEach(function (bp) {
|
|
5863
5943
|
var breakpoint = rest[bp];
|
|
5864
5944
|
delete rest[bp];
|
|
5865
|
-
var infix = bp === 'xs' ? '' : "-"
|
|
5945
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
5866
5946
|
if (typeof breakpoint === 'object') {
|
|
5867
5947
|
if (breakpoint.cols) {
|
|
5868
|
-
|
|
5948
|
+
repsonsiveClassNames.push("row-cols".concat(infix, "-").concat(breakpoint.cols));
|
|
5869
5949
|
}
|
|
5870
5950
|
if (typeof breakpoint.gutter === 'number') {
|
|
5871
|
-
|
|
5951
|
+
repsonsiveClassNames.push("g".concat(infix, "-").concat(breakpoint.gutter));
|
|
5872
5952
|
}
|
|
5873
5953
|
if (typeof breakpoint.gutterX === 'number') {
|
|
5874
|
-
|
|
5954
|
+
repsonsiveClassNames.push("gx".concat(infix, "-").concat(breakpoint.gutterX));
|
|
5875
5955
|
}
|
|
5876
5956
|
if (typeof breakpoint.gutterY === 'number') {
|
|
5877
|
-
|
|
5957
|
+
repsonsiveClassNames.push("gy".concat(infix, "-").concat(breakpoint.gutterY));
|
|
5878
5958
|
}
|
|
5879
5959
|
}
|
|
5880
5960
|
});
|
|
5881
|
-
var _className = classNames$1('row',
|
|
5961
|
+
var _className = classNames$1('row', repsonsiveClassNames, className);
|
|
5882
5962
|
return (React__default.createElement("div", { className: _className, ref: ref }, children));
|
|
5883
5963
|
});
|
|
5884
5964
|
var bp = PropTypes$1.shape({
|
|
@@ -5902,7 +5982,7 @@ CRow.displayName = 'CRow';
|
|
|
5902
5982
|
var CFooter = forwardRef(function (_a, ref) {
|
|
5903
5983
|
var _b;
|
|
5904
5984
|
var children = _a.children, className = _a.className, position = _a.position, rest = __rest$1(_a, ["children", "className", "position"]);
|
|
5905
|
-
var _className = classNames$1('footer', (_b = {}, _b["footer-"
|
|
5985
|
+
var _className = classNames$1('footer', (_b = {}, _b["footer-".concat(position)] = position, _b), className);
|
|
5906
5986
|
return (React__default.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
5907
5987
|
});
|
|
5908
5988
|
CFooter.propTypes = {
|
|
@@ -5957,9 +6037,9 @@ var CFormCheck = forwardRef(function (_a, ref) {
|
|
|
5957
6037
|
'me-2': hitArea,
|
|
5958
6038
|
});
|
|
5959
6039
|
var labelClassName = classNames$1(button
|
|
5960
|
-
? classNames$1('btn', button.variant ? "btn-"
|
|
5961
|
-
_b["btn-"
|
|
5962
|
-
_b), ""
|
|
6040
|
+
? classNames$1('btn', button.variant ? "btn-".concat(button.variant, "-").concat(button.color) : "btn-".concat(button.color), (_b = {},
|
|
6041
|
+
_b["btn-".concat(button.size)] = button.size,
|
|
6042
|
+
_b), "".concat(button.shape))
|
|
5963
6043
|
: 'form-check-label');
|
|
5964
6044
|
var formControl = function () {
|
|
5965
6045
|
return React__default.createElement("input", __assign$1({ type: type, className: inputClassName, id: id }, rest, { ref: forkedRef }));
|
|
@@ -5993,8 +6073,8 @@ var CFormFeedback = forwardRef(function (_a, ref) {
|
|
|
5993
6073
|
var _b;
|
|
5994
6074
|
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"]);
|
|
5995
6075
|
var _className = classNames$1((_b = {},
|
|
5996
|
-
_b["invalid-"
|
|
5997
|
-
_b["valid-"
|
|
6076
|
+
_b["invalid-".concat(tooltip ? 'tooltip' : 'feedback')] = invalid,
|
|
6077
|
+
_b["valid-".concat(tooltip ? 'tooltip' : 'feedback')] = valid,
|
|
5998
6078
|
_b), className);
|
|
5999
6079
|
return (React__default.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
6000
6080
|
});
|
|
@@ -6023,7 +6103,7 @@ var CFormInput = forwardRef(function (_a, ref) {
|
|
|
6023
6103
|
var _b;
|
|
6024
6104
|
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"]);
|
|
6025
6105
|
var _className = classNames$1(plainText ? 'form-control-plaintext' : 'form-control', (_b = {},
|
|
6026
|
-
_b["form-control-"
|
|
6106
|
+
_b["form-control-".concat(size)] = size,
|
|
6027
6107
|
_b['form-control-color'] = type === 'color',
|
|
6028
6108
|
_b['is-invalid'] = invalid,
|
|
6029
6109
|
_b['is-valid'] = valid,
|
|
@@ -6055,7 +6135,7 @@ var CFormSelect = forwardRef(function (_a, ref) {
|
|
|
6055
6135
|
var _b;
|
|
6056
6136
|
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"]);
|
|
6057
6137
|
var _className = classNames$1('form-select', (_b = {},
|
|
6058
|
-
_b["form-select-"
|
|
6138
|
+
_b["form-select-".concat(size)] = size,
|
|
6059
6139
|
_b['is-invalid'] = invalid,
|
|
6060
6140
|
_b['is-valid'] = valid,
|
|
6061
6141
|
_b), className);
|
|
@@ -6081,7 +6161,7 @@ var CFormSwitch = forwardRef(function (_a, ref) {
|
|
|
6081
6161
|
var _b;
|
|
6082
6162
|
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"]);
|
|
6083
6163
|
var _className = classNames$1('form-check form-switch', (_b = {},
|
|
6084
|
-
_b["form-switch-"
|
|
6164
|
+
_b["form-switch-".concat(size)] = size,
|
|
6085
6165
|
_b['is-invalid'] = invalid,
|
|
6086
6166
|
_b['is-valid'] = valid,
|
|
6087
6167
|
_b), className);
|
|
@@ -6138,7 +6218,7 @@ var CInputGroup = forwardRef(function (_a, ref) {
|
|
|
6138
6218
|
var _b;
|
|
6139
6219
|
var children = _a.children, className = _a.className, size = _a.size, rest = __rest$1(_a, ["children", "className", "size"]);
|
|
6140
6220
|
var _className = classNames$1('input-group', (_b = {},
|
|
6141
|
-
_b["input-group-"
|
|
6221
|
+
_b["input-group-".concat(size)] = size,
|
|
6142
6222
|
_b), className);
|
|
6143
6223
|
return (React__default.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
6144
6224
|
});
|
|
@@ -6164,10 +6244,10 @@ CInputGroupText.displayName = 'CInputGroupText';
|
|
|
6164
6244
|
var CHeader = forwardRef(function (_a, ref) {
|
|
6165
6245
|
var _b;
|
|
6166
6246
|
var children = _a.children, className = _a.className, container = _a.container, position = _a.position, rest = __rest$1(_a, ["children", "className", "container", "position"]);
|
|
6167
|
-
var _className = classNames$1('header', (_b = {}, _b["header-"
|
|
6247
|
+
var _className = classNames$1('header', (_b = {}, _b["header-".concat(position)] = position, _b), className);
|
|
6168
6248
|
var content;
|
|
6169
6249
|
if (container) {
|
|
6170
|
-
content = (React__default.createElement("div", { className: "container"
|
|
6250
|
+
content = (React__default.createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
6171
6251
|
}
|
|
6172
6252
|
else {
|
|
6173
6253
|
content = children;
|
|
@@ -6252,7 +6332,7 @@ var CImage = forwardRef(function (_a, ref) {
|
|
|
6252
6332
|
var _b;
|
|
6253
6333
|
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"]);
|
|
6254
6334
|
var _className = classNames$1((_b = {},
|
|
6255
|
-
_b["float-"
|
|
6335
|
+
_b["float-".concat(align)] = align && (align === 'start' || align === 'end'),
|
|
6256
6336
|
_b['d-block mx-auto'] = align && align === 'center',
|
|
6257
6337
|
_b['img-fluid'] = fluid,
|
|
6258
6338
|
_b.rounded = rounded,
|
|
@@ -6275,7 +6355,7 @@ var CListGroup = forwardRef(function (_a, ref) {
|
|
|
6275
6355
|
var _className = classNames$1('list-group', (_b = {
|
|
6276
6356
|
'list-group-flush': flush
|
|
6277
6357
|
},
|
|
6278
|
-
_b["list-group-"
|
|
6358
|
+
_b["list-group-".concat(layout)] = layout,
|
|
6279
6359
|
_b), className);
|
|
6280
6360
|
return (React__default.createElement(Component, { className: _className, ref: ref }, children));
|
|
6281
6361
|
});
|
|
@@ -6299,7 +6379,7 @@ var CListGroupItem = forwardRef(function (_a, ref) {
|
|
|
6299
6379
|
var _b;
|
|
6300
6380
|
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"]);
|
|
6301
6381
|
var _className = classNames$1('list-group-item', (_b = {},
|
|
6302
|
-
_b["list-group-item-"
|
|
6382
|
+
_b["list-group-item-".concat(color)] = color,
|
|
6303
6383
|
_b['list-group-item-action'] = component === 'a' || component === 'button',
|
|
6304
6384
|
_b.active = active,
|
|
6305
6385
|
_b.disabled = disabled,
|
|
@@ -6325,7 +6405,7 @@ CListGroupItem.displayName = 'CListGroupItem';
|
|
|
6325
6405
|
|
|
6326
6406
|
var CSpinner = forwardRef(function (_a, ref) {
|
|
6327
6407
|
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"]);
|
|
6328
|
-
var _className = classNames$1("spinner-"
|
|
6408
|
+
var _className = classNames$1("spinner-".concat(variant), "text-".concat(color), size && "spinner-".concat(variant, "-").concat(size), className);
|
|
6329
6409
|
return (React__default.createElement(Component, __assign$1({ className: _className, role: "status" }, rest, { ref: ref }),
|
|
6330
6410
|
React__default.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
6331
6411
|
});
|
|
@@ -6389,9 +6469,9 @@ var CModalDialog = forwardRef(function (_a, ref) {
|
|
|
6389
6469
|
},
|
|
6390
6470
|
_b[typeof fullscreen === 'boolean'
|
|
6391
6471
|
? 'modal-fullscreen'
|
|
6392
|
-
: "modal-fullscreen-"
|
|
6472
|
+
: "modal-fullscreen-".concat(fullscreen, "-down")] = fullscreen,
|
|
6393
6473
|
_b['modal-dialog-scrollable'] = scrollable,
|
|
6394
|
-
_b["modal-"
|
|
6474
|
+
_b["modal-".concat(size)] = size,
|
|
6395
6475
|
_b), className);
|
|
6396
6476
|
return (React__default.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
6397
6477
|
});
|
|
@@ -6627,7 +6707,7 @@ var CMultiSelectSelection = forwardRef(function (_a, ref) {
|
|
|
6627
6707
|
multiple &&
|
|
6628
6708
|
selectionType === 'counter' &&
|
|
6629
6709
|
!search &&
|
|
6630
|
-
selected.length
|
|
6710
|
+
"".concat(selected.length, " ").concat(selectionTypeCounterText),
|
|
6631
6711
|
multiple &&
|
|
6632
6712
|
selectionType === 'tags' &&
|
|
6633
6713
|
selected.map(function (option, index) {
|
|
@@ -6802,7 +6882,7 @@ var CMultiSelect = forwardRef(function (_a, ref) {
|
|
|
6802
6882
|
multiple && cleaner && selected.length > 0 && (React__default.createElement(CMultiSelectCleaner, { onClick: function () { return handleDeselectAll(); } })),
|
|
6803
6883
|
search && (React__default.createElement(CMultiSelectSearchInput, __assign$1({}, (selected.length === 0 && { placeholder: placeholder }), (selected.length &&
|
|
6804
6884
|
selectionType === 'counter' && {
|
|
6805
|
-
placeholder: selected.length
|
|
6885
|
+
placeholder: "".concat(selected.length, " ").concat(selectionTypeCounterText),
|
|
6806
6886
|
}), (selected.length &&
|
|
6807
6887
|
!multiple && { placeholder: selected.map(function (option) { return option.text; })[0] }), { onChange: function (event) { return handleSearchChange(event); }, onKeyDown: function (event) { return handleSearchKeyDown(event); } }, (multiple &&
|
|
6808
6888
|
selected.length &&
|
|
@@ -6834,8 +6914,8 @@ var CNav = forwardRef(function (_a, ref) {
|
|
|
6834
6914
|
var _b;
|
|
6835
6915
|
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"]);
|
|
6836
6916
|
var _className = classNames$1('nav', (_b = {},
|
|
6837
|
-
_b["nav-"
|
|
6838
|
-
_b["nav-"
|
|
6917
|
+
_b["nav-".concat(layout)] = layout,
|
|
6918
|
+
_b["nav-".concat(variant)] = variant,
|
|
6839
6919
|
_b), className);
|
|
6840
6920
|
return (React__default.createElement(Component, __assign$1({ className: _className, role: "navigation" }, rest, { ref: ref }), children));
|
|
6841
6921
|
});
|
|
@@ -6871,7 +6951,7 @@ var CSidebarNav = forwardRef(function (_a, ref) {
|
|
|
6871
6951
|
return (React__default.createElement("ul", __assign$1({ className: classes, ref: ref }, rest),
|
|
6872
6952
|
React__default.createElement(CNavContext.Provider, { value: CNavContextValues }, React__default.Children.map(children, function (child, index) {
|
|
6873
6953
|
if (React__default.isValidElement(child)) {
|
|
6874
|
-
return React__default.cloneElement(child, { key: index, idx: ""
|
|
6954
|
+
return React__default.cloneElement(child, { key: index, idx: "".concat(index) });
|
|
6875
6955
|
}
|
|
6876
6956
|
return;
|
|
6877
6957
|
}))));
|
|
@@ -6931,7 +7011,7 @@ var CNavGroup = forwardRef(function (_a, ref) {
|
|
|
6931
7011
|
compact: compact,
|
|
6932
7012
|
}), style: __assign$1(__assign$1({}, style), transitionStyles[state]), ref: navItemsRef }, React__default.Children.map(children, function (child, index) {
|
|
6933
7013
|
if (React__default.isValidElement(child)) {
|
|
6934
|
-
return React__default.cloneElement(child, { key: index, idx: idx
|
|
7014
|
+
return React__default.cloneElement(child, { key: index, idx: "".concat(idx, ".").concat(index) });
|
|
6935
7015
|
}
|
|
6936
7016
|
return;
|
|
6937
7017
|
}))); })));
|
|
@@ -6995,13 +7075,13 @@ var CNavbar = forwardRef(function (_a, ref) {
|
|
|
6995
7075
|
var _b;
|
|
6996
7076
|
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"]);
|
|
6997
7077
|
var _className = classNames$1('navbar', (_b = {},
|
|
6998
|
-
_b["bg-"
|
|
6999
|
-
_b["navbar-"
|
|
7000
|
-
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-"
|
|
7078
|
+
_b["bg-".concat(color)] = color,
|
|
7079
|
+
_b["navbar-".concat(colorScheme)] = colorScheme,
|
|
7080
|
+
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-".concat(expand)] = expand,
|
|
7001
7081
|
_b), placement, className);
|
|
7002
7082
|
var content;
|
|
7003
7083
|
if (container) {
|
|
7004
|
-
content = (React__default.createElement("div", { className: "container"
|
|
7084
|
+
content = (React__default.createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
7005
7085
|
}
|
|
7006
7086
|
else {
|
|
7007
7087
|
content = children;
|
|
@@ -7084,8 +7164,8 @@ var CPagination = forwardRef(function (_a, ref) {
|
|
|
7084
7164
|
var _b;
|
|
7085
7165
|
var children = _a.children, align = _a.align, className = _a.className, size = _a.size, rest = __rest$1(_a, ["children", "align", "className", "size"]);
|
|
7086
7166
|
var _className = classNames$1('pagination', (_b = {},
|
|
7087
|
-
_b["justify-content-"
|
|
7088
|
-
_b["pagination-"
|
|
7167
|
+
_b["justify-content-".concat(align)] = align,
|
|
7168
|
+
_b["pagination-".concat(size)] = size,
|
|
7089
7169
|
_b), className);
|
|
7090
7170
|
return (React__default.createElement("nav", __assign$1({ ref: ref }, rest),
|
|
7091
7171
|
React__default.createElement("ul", { className: _className }, children)));
|
|
@@ -7119,7 +7199,7 @@ var CSmartPagination = forwardRef(function (_a, ref) {
|
|
|
7119
7199
|
useEffect(function () {
|
|
7120
7200
|
pages < activePage && onActivePageChange(pages, true);
|
|
7121
7201
|
}, [pages]);
|
|
7122
|
-
var _classNames = classNames$1("justify-content-"
|
|
7202
|
+
var _classNames = classNames$1("justify-content-".concat(align), className);
|
|
7123
7203
|
var showDots = (function () {
|
|
7124
7204
|
return dots && limit > 4 && limit < pages;
|
|
7125
7205
|
})();
|
|
@@ -7171,7 +7251,7 @@ var CSmartPagination = forwardRef(function (_a, ref) {
|
|
|
7171
7251
|
arrows && (React__default.createElement(CPaginationItem, { onClick: function () { return setPage(activePage - 1); }, "aria-label": "Go to previous page", "aria-disabled": activePage === 1, disabled: activePage === 1 }, previousButton)),
|
|
7172
7252
|
beforeDots && (React__default.createElement(CPaginationItem, { role: "separator", disabled: true }, "\u2026")),
|
|
7173
7253
|
items.map(function (i) {
|
|
7174
|
-
return (React__default.createElement(CPaginationItem, { onClick: function () { return setPage(i); }, "aria-label": activePage === i ? "Current page "
|
|
7254
|
+
return (React__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));
|
|
7175
7255
|
}),
|
|
7176
7256
|
afterDots && (React__default.createElement(CPaginationItem, { role: "separator", disabled: true }, "\u2026")),
|
|
7177
7257
|
arrows && (React__default.createElement(CPaginationItem, { onClick: function () { return setPage(activePage + 1); }, "aria-label": "Go to next page", "aria-disabled": activePage === pages, disabled: activePage === pages }, nextButton)),
|
|
@@ -7195,6 +7275,45 @@ CSmartPagination.propTypes = {
|
|
|
7195
7275
|
};
|
|
7196
7276
|
CSmartPagination.displayName = 'CSmartPagination';
|
|
7197
7277
|
|
|
7278
|
+
var BREAKPOINTS = [
|
|
7279
|
+
'xxl',
|
|
7280
|
+
'xl',
|
|
7281
|
+
'lg',
|
|
7282
|
+
'md',
|
|
7283
|
+
'sm',
|
|
7284
|
+
'xs',
|
|
7285
|
+
];
|
|
7286
|
+
var CPlaceholder = forwardRef(function (_a, ref) {
|
|
7287
|
+
var _b;
|
|
7288
|
+
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"]);
|
|
7289
|
+
var repsonsiveClassNames = [];
|
|
7290
|
+
BREAKPOINTS.forEach(function (bp) {
|
|
7291
|
+
var breakpoint = rest[bp];
|
|
7292
|
+
delete rest[bp];
|
|
7293
|
+
var infix = bp === 'xs' ? '' : "-".concat(bp);
|
|
7294
|
+
if (typeof breakpoint === 'number') {
|
|
7295
|
+
repsonsiveClassNames.push("col".concat(infix, "-").concat(breakpoint));
|
|
7296
|
+
}
|
|
7297
|
+
if (typeof breakpoint === 'boolean') {
|
|
7298
|
+
repsonsiveClassNames.push("col".concat(infix));
|
|
7299
|
+
}
|
|
7300
|
+
});
|
|
7301
|
+
var _className = classNames$1(animation ? "placeholder-".concat(animation) : 'placeholder', (_b = {},
|
|
7302
|
+
_b["bg-".concat(color)] = color,
|
|
7303
|
+
_b["placeholder-".concat(size)] = size,
|
|
7304
|
+
_b), repsonsiveClassNames, className);
|
|
7305
|
+
return (React__default.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7306
|
+
});
|
|
7307
|
+
CPlaceholder.propTypes = {
|
|
7308
|
+
animation: PropTypes$1.oneOf(['glow', 'wave']),
|
|
7309
|
+
children: PropTypes$1.node,
|
|
7310
|
+
className: PropTypes$1.string,
|
|
7311
|
+
color: colorPropType,
|
|
7312
|
+
component: PropTypes$1.elementType,
|
|
7313
|
+
size: PropTypes$1.oneOf(['xs', 'sm', 'lg']),
|
|
7314
|
+
};
|
|
7315
|
+
CPlaceholder.displayName = 'CPlaceholder';
|
|
7316
|
+
|
|
7198
7317
|
var CPopover = function (_a) {
|
|
7199
7318
|
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"]);
|
|
7200
7319
|
var _e = useState(visible), _visible = _e[0], setVisible = _e[1];
|
|
@@ -7235,7 +7354,7 @@ var CPopover = function (_a) {
|
|
|
7235
7354
|
},
|
|
7236
7355
|
] }, function (_a) {
|
|
7237
7356
|
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
7238
|
-
return (React__default.createElement("div", __assign$1({ className: classNames$1("popover bs-popover-"
|
|
7357
|
+
return (React__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),
|
|
7239
7358
|
React__default.createElement("div", __assign$1({ className: "popover-arrow" }, arrowProps)),
|
|
7240
7359
|
React__default.createElement("div", { className: "popover-header" }, title),
|
|
7241
7360
|
React__default.createElement("div", { className: "popover-body" }, content)));
|
|
@@ -7244,12 +7363,12 @@ var CPopover = function (_a) {
|
|
|
7244
7363
|
};
|
|
7245
7364
|
CPopover.propTypes = {
|
|
7246
7365
|
children: PropTypes$1.any,
|
|
7247
|
-
content: PropTypes$1.node,
|
|
7366
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
7248
7367
|
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
7249
7368
|
offset: PropTypes$1.any,
|
|
7250
7369
|
onHide: PropTypes$1.func,
|
|
7251
7370
|
onShow: PropTypes$1.func,
|
|
7252
|
-
title: PropTypes$1.string,
|
|
7371
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
7253
7372
|
trigger: triggerPropType,
|
|
7254
7373
|
visible: PropTypes$1.bool,
|
|
7255
7374
|
};
|
|
@@ -7259,11 +7378,11 @@ var CProgressBar = forwardRef(function (_a, ref) {
|
|
|
7259
7378
|
var _b;
|
|
7260
7379
|
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"]);
|
|
7261
7380
|
var _className = classNames$1('progress-bar', (_b = {},
|
|
7262
|
-
_b["bg-"
|
|
7263
|
-
_b["progress-bar-"
|
|
7381
|
+
_b["bg-".concat(color)] = color,
|
|
7382
|
+
_b["progress-bar-".concat(variant)] = variant,
|
|
7264
7383
|
_b['progress-bar-animated'] = animated,
|
|
7265
7384
|
_b), className);
|
|
7266
|
-
return (React__default.createElement("div", __assign$1({ className: _className, role: "progressbar", style: { width: value
|
|
7385
|
+
return (React__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));
|
|
7267
7386
|
});
|
|
7268
7387
|
CProgressBar.propTypes = {
|
|
7269
7388
|
animated: PropTypes$1.bool,
|
|
@@ -7281,7 +7400,7 @@ var CProgress = forwardRef(function (_a, ref) {
|
|
|
7281
7400
|
'progress-thin': thin,
|
|
7282
7401
|
'progress-white': white,
|
|
7283
7402
|
}, className);
|
|
7284
|
-
return (React__default.createElement("div", { className: _className, style: height ? { height: height
|
|
7403
|
+
return (React__default.createElement("div", { className: _className, style: height ? { height: "".concat(height, "px") } : {}, ref: ref }, value ? (React__default.createElement(CProgressBar, __assign$1({ value: value }, rest), children)) : (children)));
|
|
7285
7404
|
});
|
|
7286
7405
|
CProgress.propTypes = {
|
|
7287
7406
|
children: PropTypes$1.node,
|
|
@@ -7375,12 +7494,12 @@ var CSidebar = forwardRef(function (_a, ref) {
|
|
|
7375
7494
|
handleHide();
|
|
7376
7495
|
};
|
|
7377
7496
|
var _className = classNames$1('sidebar', (_b = {},
|
|
7378
|
-
_b["sidebar-"
|
|
7497
|
+
_b["sidebar-".concat(colorScheme)] = colorScheme,
|
|
7379
7498
|
_b['sidebar-narrow'] = narrow,
|
|
7380
7499
|
_b['sidebar-overlaid'] = overlaid,
|
|
7381
|
-
_b["sidebar-"
|
|
7382
|
-
_b["sidebar-"
|
|
7383
|
-
_b["sidebar-"
|
|
7500
|
+
_b["sidebar-".concat(placement)] = placement,
|
|
7501
|
+
_b["sidebar-".concat(position)] = position,
|
|
7502
|
+
_b["sidebar-".concat(size)] = size,
|
|
7384
7503
|
_b['sidebar-narrow-unfoldable'] = unfoldable,
|
|
7385
7504
|
_b.show = _visible === true && mobile,
|
|
7386
7505
|
_b.hide = _visible === false && !mobile,
|
|
@@ -7431,7 +7550,7 @@ var COffcanvas = forwardRef(function (_a, ref) {
|
|
|
7431
7550
|
}
|
|
7432
7551
|
}, [_visible]);
|
|
7433
7552
|
var _className = classNames$1('offcanvas', (_b = {},
|
|
7434
|
-
_b["offcanvas-"
|
|
7553
|
+
_b["offcanvas-".concat(placement)] = placement,
|
|
7435
7554
|
_b.show = _visible,
|
|
7436
7555
|
_b), className);
|
|
7437
7556
|
var transitionStyles = {
|
|
@@ -7460,8 +7579,8 @@ var COffcanvas = forwardRef(function (_a, ref) {
|
|
|
7460
7579
|
}),
|
|
7461
7580
|
typeof window !== 'undefined' && portal
|
|
7462
7581
|
? backdrop &&
|
|
7463
|
-
createPortal(React__default.createElement(CBackdrop, {
|
|
7464
|
-
: backdrop && React__default.createElement(CBackdrop, {
|
|
7582
|
+
createPortal(React__default.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }), document.body)
|
|
7583
|
+
: backdrop && (React__default.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleDismiss, visible: _visible }))));
|
|
7465
7584
|
});
|
|
7466
7585
|
COffcanvas.propTypes = {
|
|
7467
7586
|
backdrop: PropTypes$1.bool,
|
|
@@ -7580,7 +7699,7 @@ var CElementCover = forwardRef(function (_a, ref) {
|
|
|
7580
7699
|
var coords = element.getBoundingClientRect();
|
|
7581
7700
|
sides.forEach(function (side) {
|
|
7582
7701
|
var sideMargin = Math.abs(coords[side] - parentCoords[side]);
|
|
7583
|
-
customBoundaries[side] = sideMargin
|
|
7702
|
+
customBoundaries[side] = "".concat(sideMargin, "px");
|
|
7584
7703
|
});
|
|
7585
7704
|
});
|
|
7586
7705
|
return customBoundaries;
|
|
@@ -7591,7 +7710,7 @@ var CElementCover = forwardRef(function (_a, ref) {
|
|
|
7591
7710
|
//render
|
|
7592
7711
|
var classes = classNames$1(className);
|
|
7593
7712
|
var containerCoords = __assign$1({ top: 0, left: 0, right: 0, bottom: 0 }, customBoundaries);
|
|
7594
|
-
var coverStyles = __assign$1(__assign$1({}, containerCoords), { position: 'absolute', backgroundColor: "rgb(255,255,255,"
|
|
7713
|
+
var coverStyles = __assign$1(__assign$1({}, containerCoords), { position: 'absolute', backgroundColor: "rgb(255,255,255,".concat(opacity, ")") });
|
|
7595
7714
|
return (React__default.createElement("div", __assign$1({ className: classes, style: coverStyles }, rest, { ref: forkedRef }), children || (React__default.createElement("div", { style: {
|
|
7596
7715
|
position: 'absolute',
|
|
7597
7716
|
top: '50%',
|
|
@@ -7612,17 +7731,17 @@ var CTable = forwardRef(function (_a, ref) {
|
|
|
7612
7731
|
var _b;
|
|
7613
7732
|
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"]);
|
|
7614
7733
|
var _className = classNames$1('table', (_b = {},
|
|
7615
|
-
_b["align-"
|
|
7616
|
-
_b["caption-"
|
|
7617
|
-
_b["border-"
|
|
7734
|
+
_b["align-".concat(align)] = align,
|
|
7735
|
+
_b["caption-".concat(caption)] = caption,
|
|
7736
|
+
_b["border-".concat(borderColor)] = borderColor,
|
|
7618
7737
|
_b['table-bordered'] = bordered,
|
|
7619
7738
|
_b['table-borderless'] = borderless,
|
|
7620
|
-
_b["table-"
|
|
7739
|
+
_b["table-".concat(color)] = color,
|
|
7621
7740
|
_b['table-hover'] = hover,
|
|
7622
7741
|
_b['table-sm'] = small,
|
|
7623
7742
|
_b['table-striped'] = striped,
|
|
7624
7743
|
_b), className);
|
|
7625
|
-
return responsive ? (React__default.createElement("div", { className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-"
|
|
7744
|
+
return responsive ? (React__default.createElement("div", { className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) },
|
|
7626
7745
|
React__default.createElement("table", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children))) : (React__default.createElement("table", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7627
7746
|
});
|
|
7628
7747
|
CTable.propTypes = {
|
|
@@ -7648,7 +7767,7 @@ var CTableFoot = forwardRef(function (_a, ref) {
|
|
|
7648
7767
|
var _b;
|
|
7649
7768
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
7650
7769
|
var _className = classNames$1((_b = {},
|
|
7651
|
-
_b["table-"
|
|
7770
|
+
_b["table-".concat(color)] = color,
|
|
7652
7771
|
_b), className);
|
|
7653
7772
|
return (React__default.createElement("tfoot", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7654
7773
|
});
|
|
@@ -7663,7 +7782,7 @@ var CTableBody = forwardRef(function (_a, ref) {
|
|
|
7663
7782
|
var _b;
|
|
7664
7783
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
7665
7784
|
var _className = classNames$1((_b = {},
|
|
7666
|
-
_b["table-"
|
|
7785
|
+
_b["table-".concat(color)] = color,
|
|
7667
7786
|
_b), className);
|
|
7668
7787
|
return (React__default.createElement("tbody", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7669
7788
|
});
|
|
@@ -7678,9 +7797,9 @@ var CTableRow = forwardRef(function (_a, ref) {
|
|
|
7678
7797
|
var _b;
|
|
7679
7798
|
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"]);
|
|
7680
7799
|
var _className = classNames$1((_b = {},
|
|
7681
|
-
_b["align-"
|
|
7800
|
+
_b["align-".concat(align)] = align,
|
|
7682
7801
|
_b['table-active'] = active,
|
|
7683
|
-
_b["table-"
|
|
7802
|
+
_b["table-".concat(color)] = color,
|
|
7684
7803
|
_b), className);
|
|
7685
7804
|
return (React__default.createElement("tr", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7686
7805
|
});
|
|
@@ -7697,9 +7816,9 @@ var CTableDataCell = forwardRef(function (_a, ref) {
|
|
|
7697
7816
|
var _b;
|
|
7698
7817
|
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"]);
|
|
7699
7818
|
var _className = classNames$1((_b = {},
|
|
7700
|
-
_b["align-"
|
|
7819
|
+
_b["align-".concat(align)] = align,
|
|
7701
7820
|
_b['table-active'] = active,
|
|
7702
|
-
_b["table-"
|
|
7821
|
+
_b["table-".concat(color)] = color,
|
|
7703
7822
|
_b), className);
|
|
7704
7823
|
return (React__default.createElement("td", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
7705
7824
|
});
|
|
@@ -7752,7 +7871,7 @@ var CSmartTableBody = forwardRef(function (_a, ref) {
|
|
|
7752
7871
|
React__default.createElement(CTableRow, { onClick: function (event) {
|
|
7753
7872
|
return onRowClick &&
|
|
7754
7873
|
onRowClick(item, trIndex + firstItemOnActivePageIndex, getColumnName(event), true);
|
|
7755
|
-
}, className: "p-0", key: "details"
|
|
7874
|
+
}, className: "p-0", key: "details".concat(trIndex) },
|
|
7756
7875
|
React__default.createElement(CTableDataCell, { colSpan: colspan, className: "p-0", style: { border: 0 } }, scopedColumns.details(item, trIndex + firstItemOnActivePageIndex)))))));
|
|
7757
7876
|
}),
|
|
7758
7877
|
!currentItems.length && (React__default.createElement(CTableRow, null,
|
|
@@ -8979,7 +9098,7 @@ var CIcon = forwardRef(function (_a, ref) {
|
|
|
8979
9098
|
var iconName = useMemo(function () {
|
|
8980
9099
|
return _icon && typeof _icon === 'string' && _icon.includes('-') ? toCamelCase(_icon) : _icon;
|
|
8981
9100
|
}, [change]);
|
|
8982
|
-
var titleCode = title ? "<title>"
|
|
9101
|
+
var titleCode = title ? "<title>".concat(title, "</title>") : '';
|
|
8983
9102
|
var code = useMemo(function () {
|
|
8984
9103
|
if (Array.isArray(_icon)) {
|
|
8985
9104
|
return _icon;
|
|
@@ -8995,13 +9114,13 @@ var CIcon = forwardRef(function (_a, ref) {
|
|
|
8995
9114
|
return Array.isArray(code) && code.length > 1 ? code[0] : '64 64';
|
|
8996
9115
|
})();
|
|
8997
9116
|
var viewBox = (function () {
|
|
8998
|
-
return rest['viewBox'] || "0 0 "
|
|
9117
|
+
return rest['viewBox'] || "0 0 ".concat(scale);
|
|
8999
9118
|
})();
|
|
9000
9119
|
// render
|
|
9001
9120
|
var _className = customClassName
|
|
9002
9121
|
? classNames(customClassName)
|
|
9003
9122
|
: classNames('icon', (_b = {},
|
|
9004
|
-
_b["icon-"
|
|
9123
|
+
_b["icon-".concat(size)] = size,
|
|
9005
9124
|
_b["icon-custom-size"] = height || width,
|
|
9006
9125
|
_b), className);
|
|
9007
9126
|
return use ? (React__default.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", className: _className }, (height && { height: height }), (width && { width: width }), { role: "img" }, rest, { ref: ref }),
|
|
@@ -9069,7 +9188,7 @@ var CTableHead = forwardRef(function (_a, ref) {
|
|
|
9069
9188
|
var _b;
|
|
9070
9189
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
9071
9190
|
var _className = classNames$1((_b = {},
|
|
9072
|
-
_b["table-"
|
|
9191
|
+
_b["table-".concat(color)] = color,
|
|
9073
9192
|
_b), className);
|
|
9074
9193
|
return (React__default.createElement("thead", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
9075
9194
|
});
|
|
@@ -9084,7 +9203,7 @@ var CTableHeaderCell = forwardRef(function (_a, ref) {
|
|
|
9084
9203
|
var _b;
|
|
9085
9204
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
9086
9205
|
var _className = classNames$1((_b = {},
|
|
9087
|
-
_b["table-"
|
|
9206
|
+
_b["table-".concat(color)] = color,
|
|
9088
9207
|
_b), className);
|
|
9089
9208
|
return (React__default.createElement("th", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
9090
9209
|
});
|
|
@@ -9096,7 +9215,7 @@ CTableHeaderCell.propTypes = {
|
|
|
9096
9215
|
CTableHeaderCell.displayName = 'CTableHeaderCell';
|
|
9097
9216
|
|
|
9098
9217
|
var CSmartTableHead = forwardRef(function (_a, ref) {
|
|
9099
|
-
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"]);
|
|
9218
|
+
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"]);
|
|
9100
9219
|
var tableHeaderCellProps = function (column) {
|
|
9101
9220
|
if (typeof column === 'object' && column._props) {
|
|
9102
9221
|
return column._props;
|
|
@@ -9192,12 +9311,15 @@ var CSmartTableHead = forwardRef(function (_a, ref) {
|
|
|
9192
9311
|
}, onChange: function (event) {
|
|
9193
9312
|
return handleFilterOnChange &&
|
|
9194
9313
|
handleFilterOnChange(key(column), event.target.value);
|
|
9195
|
-
},
|
|
9314
|
+
}, value: columnFilterState && columnFilterState[key(column)]
|
|
9315
|
+
? columnFilterState[key(column)]
|
|
9316
|
+
: '', "aria-label": "column name: '".concat(label(column), "' filter input") }))));
|
|
9196
9317
|
})))));
|
|
9197
9318
|
});
|
|
9198
9319
|
CSmartTableHead.propTypes = {
|
|
9199
9320
|
columnFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
9200
|
-
|
|
9321
|
+
columnFilterState: PropTypes$1.object,
|
|
9322
|
+
columnSorter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
9201
9323
|
component: PropTypes$1.elementType,
|
|
9202
9324
|
children: PropTypes$1.node,
|
|
9203
9325
|
columns: PropTypes$1.arrayOf(PropTypes$1.oneOfType([PropTypes$1.any, PropTypes$1.string])).isRequired,
|
|
@@ -9258,6 +9380,7 @@ var CSmartTable = forwardRef(function (_a, ref) {
|
|
|
9258
9380
|
useMemo(function () {
|
|
9259
9381
|
if (JSON.stringify(previousSorterValue.current) !== JSON.stringify(sorterValue)) {
|
|
9260
9382
|
previousSorterValue.current = sorterValue;
|
|
9383
|
+
setSorterState(__assign$1({}, sorterValue));
|
|
9261
9384
|
}
|
|
9262
9385
|
}, [sorterValue]);
|
|
9263
9386
|
useMemo(function () {
|
|
@@ -9299,7 +9422,12 @@ var CSmartTable = forwardRef(function (_a, ref) {
|
|
|
9299
9422
|
state.state = 'desc';
|
|
9300
9423
|
}
|
|
9301
9424
|
else {
|
|
9302
|
-
|
|
9425
|
+
if (typeof columnSorter === 'object' && !columnSorter.resetable) {
|
|
9426
|
+
state.state = 'asc';
|
|
9427
|
+
}
|
|
9428
|
+
else {
|
|
9429
|
+
state.state = 0;
|
|
9430
|
+
}
|
|
9303
9431
|
}
|
|
9304
9432
|
}
|
|
9305
9433
|
else {
|
|
@@ -9319,7 +9447,8 @@ var CSmartTable = forwardRef(function (_a, ref) {
|
|
|
9319
9447
|
if ((isLazy && type === 'input') || (!isLazy && type === 'change')) {
|
|
9320
9448
|
return;
|
|
9321
9449
|
}
|
|
9322
|
-
var newState = __assign$1(__assign$1({}, columnFilterState), (_a = {}, _a[""
|
|
9450
|
+
var newState = __assign$1(__assign$1({}, columnFilterState), (_a = {}, _a["".concat(colName)] = value, _a));
|
|
9451
|
+
setActivePage(1);
|
|
9323
9452
|
setColumnFilterState(newState);
|
|
9324
9453
|
};
|
|
9325
9454
|
var tableFilterChange = function (value, type) {
|
|
@@ -9327,6 +9456,7 @@ var CSmartTable = forwardRef(function (_a, ref) {
|
|
|
9327
9456
|
if ((isLazy && type === 'input') || (!isLazy && type === 'change')) {
|
|
9328
9457
|
return;
|
|
9329
9458
|
}
|
|
9459
|
+
setActivePage(1);
|
|
9330
9460
|
setTableFilterState(value);
|
|
9331
9461
|
};
|
|
9332
9462
|
var clean = function () {
|
|
@@ -9459,6 +9589,7 @@ var CSmartTable = forwardRef(function (_a, ref) {
|
|
|
9459
9589
|
useEffect(function () {
|
|
9460
9590
|
if (selectable) {
|
|
9461
9591
|
var selected = _items.filter(function (item) { return item._selected === true; });
|
|
9592
|
+
onSelectedItemsChange && onSelectedItemsChange(selected);
|
|
9462
9593
|
if (selected.length === _items.length) {
|
|
9463
9594
|
setSelectedAll(true);
|
|
9464
9595
|
return;
|
|
@@ -9470,7 +9601,6 @@ var CSmartTable = forwardRef(function (_a, ref) {
|
|
|
9470
9601
|
if (selected.length !== 0 && selected.length !== _items.length) {
|
|
9471
9602
|
setSelectedAll('indeterminate');
|
|
9472
9603
|
}
|
|
9473
|
-
onSelectedItemsChange && onSelectedItemsChange(selected);
|
|
9474
9604
|
}
|
|
9475
9605
|
}, [_items]);
|
|
9476
9606
|
return (React__default.createElement(React__default.Fragment, null,
|
|
@@ -9486,7 +9616,7 @@ var CSmartTable = forwardRef(function (_a, ref) {
|
|
|
9486
9616
|
} })))))))),
|
|
9487
9617
|
React__default.createElement("div", { className: "position-relative" },
|
|
9488
9618
|
React__default.createElement(CTable, __assign$1({}, tableProps),
|
|
9489
|
-
header && (React__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(); } }))),
|
|
9619
|
+
header && (React__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(); } }))),
|
|
9490
9620
|
React__default.createElement(CSmartTableBody, __assign$1({ currentItems: currentItems, firstItemOnActivePageIndex: firstItemOnActivePageIndex, noItemsLabel: noItemsLabel, onRowClick: function (item, index, columnName, event) {
|
|
9491
9621
|
return clickableRows && onRowClick && onRowClick(item, index, columnName, event);
|
|
9492
9622
|
}, onRowChecked: function (id, value) { return handleRowChecked(id, value); }, rawColumnNames: rawColumnNames, scopedColumns: scopedColumns, selectable: selectable }, tableBodyProps)),
|
|
@@ -9616,7 +9746,7 @@ var CToast = forwardRef(function (_a, ref) {
|
|
|
9616
9746
|
var _className = classNames$1('toast', (_b = {
|
|
9617
9747
|
fade: animation
|
|
9618
9748
|
},
|
|
9619
|
-
_b["bg-"
|
|
9749
|
+
_b["bg-".concat(color)] = color,
|
|
9620
9750
|
_b['border-0'] = color,
|
|
9621
9751
|
_b), className);
|
|
9622
9752
|
var getTransitionClass = function (state) {
|
|
@@ -9773,7 +9903,7 @@ var CTooltip = function (_a) {
|
|
|
9773
9903
|
var transitionClass = getTransitionClass(state);
|
|
9774
9904
|
return (React__default.createElement(Popper, { placement: placement }, function (_a) {
|
|
9775
9905
|
var arrowProps = _a.arrowProps, style = _a.style, ref = _a.ref;
|
|
9776
|
-
return (React__default.createElement("div", __assign$1({ className: classNames$1("tooltip bs-tooltip-"
|
|
9906
|
+
return (React__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),
|
|
9777
9907
|
React__default.createElement("div", __assign$1({ className: "tooltip-arrow" }, arrowProps)),
|
|
9778
9908
|
React__default.createElement("div", { className: "tooltip-inner" }, content)));
|
|
9779
9909
|
}));
|
|
@@ -9781,7 +9911,7 @@ var CTooltip = function (_a) {
|
|
|
9781
9911
|
};
|
|
9782
9912
|
CTooltip.propTypes = {
|
|
9783
9913
|
children: PropTypes$1.any,
|
|
9784
|
-
content: PropTypes$1.node,
|
|
9914
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
9785
9915
|
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
9786
9916
|
onHide: PropTypes$1.func,
|
|
9787
9917
|
onShow: PropTypes$1.func,
|
|
@@ -9793,7 +9923,7 @@ CTooltip.displayName = 'CTooltip';
|
|
|
9793
9923
|
var CWidgetStatsA = forwardRef(function (_a, ref) {
|
|
9794
9924
|
var _b;
|
|
9795
9925
|
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"]);
|
|
9796
|
-
var _className = classNames$1((_b = {}, _b["bg-"
|
|
9926
|
+
var _className = classNames$1((_b = {}, _b["bg-".concat(color)] = color, _b['text-high-emphasis-inverse'] = color, _b), className);
|
|
9797
9927
|
return (React__default.createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
9798
9928
|
React__default.createElement(CCardBody, { className: "pb-0 d-flex justify-content-between align-items-start" },
|
|
9799
9929
|
React__default.createElement("div", null,
|
|
@@ -9836,8 +9966,8 @@ var CWidgetStatsC = forwardRef(function (_a, ref) {
|
|
|
9836
9966
|
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"]);
|
|
9837
9967
|
return (React__default.createElement(CCard, __assign$1({ className: className, color: color }, (inverse && { textColor: 'high-emphasis-inverse' }), rest, { ref: ref }),
|
|
9838
9968
|
React__default.createElement(CCardBody, null,
|
|
9839
|
-
icon && (React__default.createElement("div", { className: "text-medium-emphasis"
|
|
9840
|
-
value && (React__default.createElement("div", { className: "text-high-emphasis"
|
|
9969
|
+
icon && (React__default.createElement("div", { className: "text-medium-emphasis".concat(inverse ? '-inverse' : '', " text-end mb-4") }, icon)),
|
|
9970
|
+
value && (React__default.createElement("div", { className: "text-high-emphasis".concat(inverse ? '-inverse' : '', " fs-4 fw-semibold") }, value)),
|
|
9841
9971
|
title && (React__default.createElement("div", { className: inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis' }, title)),
|
|
9842
9972
|
React__default.createElement(CProgress, __assign$1({ className: "mt-3 mb-0", height: 4 }, (inverse && { white: true }), progress)))));
|
|
9843
9973
|
});
|
|
@@ -9857,7 +9987,7 @@ var CWidgetStatsD = forwardRef(function (_a, ref) {
|
|
|
9857
9987
|
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"]);
|
|
9858
9988
|
var _className = classNames$1(className);
|
|
9859
9989
|
var classNameHeader = classNames$1('position-relative d-flex justify-content-center align-items-center', (_b = {},
|
|
9860
|
-
_b["bg-"
|
|
9990
|
+
_b["bg-".concat(color)] = color,
|
|
9861
9991
|
_b));
|
|
9862
9992
|
return (React__default.createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
9863
9993
|
React__default.createElement(CCardHeader, { className: classNameHeader },
|
|
@@ -9903,10 +10033,10 @@ var CWidgetStatsF = forwardRef(function (_a, ref) {
|
|
|
9903
10033
|
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"]);
|
|
9904
10034
|
var _className = classNames$1(className);
|
|
9905
10035
|
return (React__default.createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
9906
|
-
React__default.createElement(CCardBody, { className: "d-flex align-items-center "
|
|
9907
|
-
React__default.createElement("div", { className: "me-3 text-white bg-"
|
|
10036
|
+
React__default.createElement(CCardBody, { className: "d-flex align-items-center ".concat(padding === false && 'p-0') },
|
|
10037
|
+
React__default.createElement("div", { className: "me-3 text-white bg-".concat(color, " ").concat(padding ? 'p-3' : 'p-4') }, icon),
|
|
9908
10038
|
React__default.createElement("div", null,
|
|
9909
|
-
React__default.createElement("div", { className: "fs-6 fw-semibold text-"
|
|
10039
|
+
React__default.createElement("div", { className: "fs-6 fw-semibold text-".concat(color) }, value),
|
|
9910
10040
|
React__default.createElement("div", { className: "text-medium-emphasis text-uppercase fw-semibold small" }, title))),
|
|
9911
10041
|
footer && React__default.createElement(CCardFooter, null, footer)));
|
|
9912
10042
|
});
|
|
@@ -9921,5 +10051,5 @@ CWidgetStatsF.propTypes = {
|
|
|
9921
10051
|
};
|
|
9922
10052
|
CWidgetStatsF.displayName = 'CWidgetStatsF';
|
|
9923
10053
|
|
|
9924
|
-
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, CAccordionHeader, CAccordionItem, CAlert, CAlertHeading, CAlertLink, CAvatar, CBackdrop, CBadge, CBreadcrumb, CBreadcrumbItem, CButton, CButtonGroup, CButtonToolbar, CCallout, CCard, CCardBody, CCardFooter, CCardGroup, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCloseButton, CCol, CCollapse, CContainer, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CFooter, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderText, CHeaderToggler, CImage, CInputGroup, CInputGroupText, CLink, CListGroup, CListGroupItem, CLoadingButton, CModal, CModalBody, CModalContent, CModalDialog, CModalFooter, CModalHeader, CModalTitle, CMultiSelect, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarText, CNavbarToggler, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasTitle, CPagination, CPaginationItem, CPopover, CProgress, CProgressBar, CRow, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarHeader, CSidebarNav, CSidebarToggler, CSmartPagination, CSmartTable, CSpinner, CTabContent, CTabPane, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTableRow, CToast, CToastBody, CToastClose, CToastHeader, CToaster, CTooltip, CWidgetStatsA, CWidgetStatsB, CWidgetStatsC, CWidgetStatsD, CWidgetStatsE, CWidgetStatsF };
|
|
10054
|
+
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionCollapse, CAccordionHeader, CAccordionItem, CAlert, CAlertHeading, CAlertLink, CAvatar, CBackdrop, CBadge, CBreadcrumb, CBreadcrumbItem, CButton, CButtonGroup, CButtonToolbar, CCallout, CCard, CCardBody, CCardFooter, CCardGroup, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCloseButton, CCol, CCollapse, CContainer, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, CFooter, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderText, CHeaderToggler, CImage, CInputGroup, CInputGroupText, CLink, CListGroup, CListGroupItem, CLoadingButton, CModal, CModalBody, CModalContent, CModalDialog, CModalFooter, CModalHeader, CModalTitle, CMultiSelect, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarText, CNavbarToggler, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasTitle, CPagination, CPaginationItem, CPlaceholder, CPopover, CProgress, CProgressBar, CRow, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarHeader, CSidebarNav, CSidebarToggler, CSmartPagination, CSmartTable, CSpinner, CTabContent, CTabPane, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTableRow, CToast, CToastBody, CToastClose, CToastHeader, CToaster, CTooltip, CWidgetStatsA, CWidgetStatsB, CWidgetStatsC, CWidgetStatsD, CWidgetStatsE, CWidgetStatsF };
|
|
9925
10055
|
//# sourceMappingURL=index.es.js.map
|