@coreui/react-pro 4.12.0-rc.0 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/dropdown/CDropdown.d.ts +1 -1
- package/dist/components/multi-select/CMultiSelect.d.ts +2 -2
- package/dist/components/popover/CPopover.d.ts +3 -3
- package/dist/components/tooltip/CTooltip.d.ts +3 -3
- package/dist/index.es.js +58 -49
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +58 -49
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/src/components/date-range-picker/CDateRangePicker.tsx +6 -3
- package/src/components/dropdown/CDropdown.tsx +1 -1
- package/src/components/multi-select/CMultiSelect.tsx +2 -2
- package/src/components/popover/CPopover.tsx +3 -3
- package/src/components/time-picker/CTimePicker.tsx +5 -2
- package/src/components/tooltip/CTooltip.tsx +3 -3
- package/src/utils/getRTLPlacement.ts +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
Several quick start options are available:
|
|
44
44
|
|
|
45
|
-
- [Download the latest release](https://github.com/coreui/coreui-react-pro/archive/v4.12.0
|
|
45
|
+
- [Download the latest release](https://github.com/coreui/coreui-react-pro/archive/v4.12.0.zip)
|
|
46
46
|
- Clone the repo: `git clone https://github.com/coreui/coreui-react.git`
|
|
47
47
|
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/react`
|
|
48
48
|
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/react`
|
|
@@ -76,13 +76,13 @@ export interface CMultiSelectProps extends Omit<CFormControlWrapperProps, 'float
|
|
|
76
76
|
/**
|
|
77
77
|
* Custom template for options.
|
|
78
78
|
*
|
|
79
|
-
* @since 4.12.0
|
|
79
|
+
* @since 4.12.0
|
|
80
80
|
*/
|
|
81
81
|
optionsTemplate?: (option: Option) => ReactNode;
|
|
82
82
|
/**
|
|
83
83
|
* Custom template for options groups.
|
|
84
84
|
*
|
|
85
|
-
* @since 4.12.0
|
|
85
|
+
* @since 4.12.0
|
|
86
86
|
*/
|
|
87
87
|
optionsGroupsTemplate?: (option: OptionsGroup) => ReactNode;
|
|
88
88
|
/**
|
|
@@ -4,7 +4,7 @@ export interface CPopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
4
4
|
/**
|
|
5
5
|
* Apply a CSS fade transition to the popover.
|
|
6
6
|
*
|
|
7
|
-
* @since 4.9.0
|
|
7
|
+
* @since 4.9.0
|
|
8
8
|
*/
|
|
9
9
|
animation?: boolean;
|
|
10
10
|
/**
|
|
@@ -22,7 +22,7 @@ export interface CPopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
22
22
|
/**
|
|
23
23
|
* The delay for displaying and hiding the popover (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: `{ 'show': 500, 'hide': 100 }`.
|
|
24
24
|
*
|
|
25
|
-
* @since 4.9.0
|
|
25
|
+
* @since 4.9.0
|
|
26
26
|
*/
|
|
27
27
|
delay?: number | {
|
|
28
28
|
show: number;
|
|
@@ -31,7 +31,7 @@ export interface CPopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
31
31
|
/**
|
|
32
32
|
* Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference.
|
|
33
33
|
*
|
|
34
|
-
* @since 4.9.0
|
|
34
|
+
* @since 4.9.0
|
|
35
35
|
*/
|
|
36
36
|
fallbackPlacements?: Placements | Placements[];
|
|
37
37
|
/**
|
|
@@ -4,7 +4,7 @@ export interface CTooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'con
|
|
|
4
4
|
/**
|
|
5
5
|
* Apply a CSS fade transition to the tooltip.
|
|
6
6
|
*
|
|
7
|
-
* @since 4.9.0
|
|
7
|
+
* @since 4.9.0
|
|
8
8
|
*/
|
|
9
9
|
animation?: boolean;
|
|
10
10
|
/**
|
|
@@ -18,7 +18,7 @@ export interface CTooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'con
|
|
|
18
18
|
/**
|
|
19
19
|
* The delay for displaying and hiding the tooltip (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: `{ 'show': 500, 'hide': 100 }`.
|
|
20
20
|
*
|
|
21
|
-
* @since 4.9.0
|
|
21
|
+
* @since 4.9.0
|
|
22
22
|
*/
|
|
23
23
|
delay?: number | {
|
|
24
24
|
show: number;
|
|
@@ -27,7 +27,7 @@ export interface CTooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'con
|
|
|
27
27
|
/**
|
|
28
28
|
* Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference.
|
|
29
29
|
*
|
|
30
|
-
* @since 4.9.0
|
|
30
|
+
* @since 4.9.0
|
|
31
31
|
*/
|
|
32
32
|
fallbackPlacements?: Placements | Placements[];
|
|
33
33
|
/**
|
package/dist/index.es.js
CHANGED
|
@@ -15,7 +15,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
15
15
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
16
16
|
PERFORMANCE OF THIS SOFTWARE.
|
|
17
17
|
***************************************************************************** */
|
|
18
|
-
/* global Reflect, Promise */
|
|
18
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var __assign$1 = function() {
|
|
@@ -49,7 +49,12 @@ function __spreadArray(to, from, pack) {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
52
|
-
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
55
|
+
var e = new Error(message);
|
|
56
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
57
|
+
};
|
|
53
58
|
|
|
54
59
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
55
60
|
|
|
@@ -4848,6 +4853,16 @@ CCardTitle.propTypes = {
|
|
|
4848
4853
|
};
|
|
4849
4854
|
CCardTitle.displayName = 'CCardTitle';
|
|
4850
4855
|
|
|
4856
|
+
var isRTL = function (element) {
|
|
4857
|
+
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
4858
|
+
return true;
|
|
4859
|
+
}
|
|
4860
|
+
if (element) {
|
|
4861
|
+
return element.closest('[dir="rtl"]') !== null;
|
|
4862
|
+
}
|
|
4863
|
+
return false;
|
|
4864
|
+
};
|
|
4865
|
+
|
|
4851
4866
|
var getRTLPlacement = function (placement, element) {
|
|
4852
4867
|
switch (placement) {
|
|
4853
4868
|
case 'right': {
|
|
@@ -4884,16 +4899,6 @@ var isObjectInArray = function (array, item, ignore) {
|
|
|
4884
4899
|
});
|
|
4885
4900
|
};
|
|
4886
4901
|
|
|
4887
|
-
var isRTL = function (element) {
|
|
4888
|
-
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
4889
|
-
return true;
|
|
4890
|
-
}
|
|
4891
|
-
if (element) {
|
|
4892
|
-
return element.closest('[dir="rtl"]') !== null;
|
|
4893
|
-
}
|
|
4894
|
-
return false;
|
|
4895
|
-
};
|
|
4896
|
-
|
|
4897
4902
|
var CCarouselContext = createContext({});
|
|
4898
4903
|
var CCarousel = forwardRef(function (_a, ref) {
|
|
4899
4904
|
var children = _a.children, _b = _a.activeIndex, activeIndex = _b === void 0 ? 0 : _b, className = _a.className, controls = _a.controls, dark = _a.dark, indicators = _a.indicators, _c = _a.interval, interval = _c === void 0 ? 5000 : _c, onSlid = _a.onSlid, onSlide = _a.onSlide, _d = _a.pause, pause = _d === void 0 ? 'hover' : _d, _e = _a.touch, touch = _e === void 0 ? true : _e, transition = _a.transition, _f = _a.wrap, wrap = _f === void 0 ? true : _f, rest = __rest$1(_a, ["children", "activeIndex", "className", "controls", "dark", "indicators", "interval", "onSlid", "onSlide", "pause", "touch", "transition", "wrap"]);
|
|
@@ -9269,15 +9274,18 @@ var CTimePicker = forwardRef(function (_a, ref) {
|
|
|
9269
9274
|
setDate(new Date(_date));
|
|
9270
9275
|
onTimeChange && onTimeChange(_date.toTimeString(), _date.toLocaleTimeString(), _date);
|
|
9271
9276
|
};
|
|
9272
|
-
var InputGroup = function () {
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9277
|
+
var InputGroup = function () {
|
|
9278
|
+
var _a;
|
|
9279
|
+
return (React$1.createElement("div", { className: classNames$1('input-group', 'picker-input-group', (_a = {},
|
|
9280
|
+
_a["input-group-".concat(size)] = size,
|
|
9281
|
+
_a)) },
|
|
9282
|
+
React$1.createElement("input", { autoComplete: "off", className: "form-control", disabled: disabled, onChange: function (event) {
|
|
9283
|
+
return isValidTime(event.target.value) && setDate(convertTimeToDate(event.target.value));
|
|
9284
|
+
}, placeholder: placeholder, readOnly: inputReadOnly, required: required, ref: inputRef }),
|
|
9285
|
+
(indicator || cleaner) && (React$1.createElement("span", { className: "input-group-text" },
|
|
9286
|
+
indicator && (React$1.createElement("span", { className: "picker-input-group-indicator" }, typeof indicator === 'boolean' ? (React$1.createElement("span", { className: "picker-input-group-icon time-picker-input-icon" })) : (indicator))),
|
|
9287
|
+
cleaner && date && (React$1.createElement("span", { className: "picker-input-group-cleaner", role: "button", onClick: function (event) { return handleClear(event); } }, typeof cleaner === 'boolean' ? (React$1.createElement("span", { className: "picker-input-group-icon time-picker-cleaner-icon" })) : (cleaner)))))));
|
|
9288
|
+
};
|
|
9281
9289
|
var TimePickerSelect = function () {
|
|
9282
9290
|
return (React$1.createElement(React$1.Fragment, null,
|
|
9283
9291
|
React$1.createElement("span", { className: "time-picker-inline-icon" }),
|
|
@@ -9499,34 +9507,35 @@ var CDateRangePicker = forwardRef(function (_a, ref) {
|
|
|
9499
9507
|
setVisible(false);
|
|
9500
9508
|
}
|
|
9501
9509
|
};
|
|
9502
|
-
var InputGroup = function () {
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9510
|
+
var InputGroup = function () {
|
|
9511
|
+
var _a;
|
|
9512
|
+
return (React$1.createElement("div", { className: classNames$1('input-group', 'picker-input-group', (_a = {},
|
|
9513
|
+
_a["input-group-".concat(size)] = size,
|
|
9514
|
+
_a)) },
|
|
9515
|
+
React$1.createElement("input", __assign$1({ autoComplete: "off", className: classNames$1('form-control date-picker-input', {
|
|
9516
|
+
hover: inputStartHoverValue,
|
|
9517
|
+
}), disabled: disabled }, (id && { name: range ? "".concat(id, "-start-date") : "".concat(id, "-date") }), { placeholder: Array.isArray(placeholder) ? placeholder[0] : placeholder, readOnly: inputReadOnly || typeof format$1 === 'string', required: required, onChange: function (event) {
|
|
9518
|
+
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
9519
|
+
if (date instanceof Date && date.getTime()) {
|
|
9520
|
+
setCalendarDate(date);
|
|
9521
|
+
setStartDate(date);
|
|
9522
|
+
}
|
|
9523
|
+
}, onClick: function () { return setSelectEndDate(false); }, ref: inputStartRef })),
|
|
9524
|
+
range && separator !== false && (React$1.createElement("span", { className: "input-group-text" },
|
|
9525
|
+
React$1.createElement("span", { className: "picker-input-group-icon date-picker-arrow-icon" }))),
|
|
9526
|
+
range && (React$1.createElement("input", __assign$1({ autoComplete: "off", className: classNames$1('form-control date-picker-input', {
|
|
9527
|
+
hover: inputEndHoverValue,
|
|
9528
|
+
}), disabled: disabled }, (id && { name: "".concat(id, "-end-date") }), { placeholder: placeholder[1], readOnly: inputReadOnly || typeof format$1 === 'string', required: required, onChange: function (event) {
|
|
9529
|
+
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
9530
|
+
if (date instanceof Date && date.getTime()) {
|
|
9531
|
+
setCalendarDate(date);
|
|
9532
|
+
setEndDate(date);
|
|
9533
|
+
}
|
|
9534
|
+
}, onClick: function () { return setSelectEndDate(true); }, ref: inputEndRef }))),
|
|
9535
|
+
(indicator || cleaner) && (React$1.createElement("span", { className: "input-group-text" },
|
|
9536
|
+
indicator && (React$1.createElement("span", { className: "picker-input-group-indicator" }, typeof indicator === 'boolean' ? (React$1.createElement("span", { className: "picker-input-group-icon date-picker-input-icon" })) : (indicator))),
|
|
9537
|
+
cleaner && (_startDate || _endDate) && (React$1.createElement("span", { className: "picker-input-group-cleaner", role: "button", onClick: function (event) { return handleClear(event); } }, typeof cleaner === 'boolean' ? (React$1.createElement("span", { className: "picker-input-group-icon date-picker-cleaner-icon" })) : (cleaner)))))));
|
|
9538
|
+
};
|
|
9530
9539
|
return (React$1.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, id: id, invalid: isValid === false ? true : false, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: isValid },
|
|
9531
9540
|
React$1.createElement(CPicker, __assign$1({ className: classNames$1('date-picker', (_b = {},
|
|
9532
9541
|
_b["date-picker-".concat(size)] = size,
|