@coreui/react-pro 5.0.0-rc.2 → 5.0.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.
Files changed (43) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/components/badge/CBadge.d.ts +7 -0
  3. package/dist/cjs/components/badge/CBadge.js +4 -2
  4. package/dist/cjs/components/badge/CBadge.js.map +1 -1
  5. package/dist/cjs/components/calendar/CCalendar.d.ts +3 -3
  6. package/dist/cjs/components/card/CCard.d.ts +7 -0
  7. package/dist/cjs/components/card/CCard.js +3 -1
  8. package/dist/cjs/components/card/CCard.js.map +1 -1
  9. package/dist/cjs/components/date-range-picker/CDateRangePicker.d.ts +3 -3
  10. package/dist/cjs/components/dropdown/CDropdownToggle.d.ts +1 -1
  11. package/dist/cjs/components/nav/CNavGroup.d.ts +1 -1
  12. package/dist/cjs/components/nav/CNavGroupItems.d.ts +1 -1
  13. package/dist/cjs/components/nav/CNavItem.d.ts +1 -1
  14. package/dist/cjs/components/sidebar/CSidebarBrand.d.ts +1 -1
  15. package/dist/cjs/components/sidebar/CSidebarNav.d.ts +1 -1
  16. package/dist/cjs/components/time-picker/CTimePicker.d.ts +3 -3
  17. package/dist/esm/components/badge/CBadge.d.ts +7 -0
  18. package/dist/esm/components/badge/CBadge.js +4 -2
  19. package/dist/esm/components/badge/CBadge.js.map +1 -1
  20. package/dist/esm/components/calendar/CCalendar.d.ts +3 -3
  21. package/dist/esm/components/card/CCard.d.ts +7 -0
  22. package/dist/esm/components/card/CCard.js +3 -1
  23. package/dist/esm/components/card/CCard.js.map +1 -1
  24. package/dist/esm/components/date-range-picker/CDateRangePicker.d.ts +3 -3
  25. package/dist/esm/components/dropdown/CDropdownToggle.d.ts +1 -1
  26. package/dist/esm/components/nav/CNavGroup.d.ts +1 -1
  27. package/dist/esm/components/nav/CNavGroupItems.d.ts +1 -1
  28. package/dist/esm/components/nav/CNavItem.d.ts +1 -1
  29. package/dist/esm/components/sidebar/CSidebarBrand.d.ts +1 -1
  30. package/dist/esm/components/sidebar/CSidebarNav.d.ts +1 -1
  31. package/dist/esm/components/time-picker/CTimePicker.d.ts +3 -3
  32. package/package.json +7 -7
  33. package/src/components/badge/CBadge.tsx +11 -1
  34. package/src/components/calendar/CCalendar.tsx +3 -3
  35. package/src/components/card/CCard.tsx +10 -1
  36. package/src/components/date-range-picker/CDateRangePicker.tsx +3 -3
  37. package/src/components/dropdown/CDropdownToggle.tsx +1 -1
  38. package/src/components/nav/CNavGroup.tsx +1 -1
  39. package/src/components/nav/CNavGroupItems.tsx +1 -1
  40. package/src/components/nav/CNavItem.tsx +1 -1
  41. package/src/components/sidebar/CSidebarBrand.tsx +1 -1
  42. package/src/components/sidebar/CSidebarNav.tsx +1 -1
  43. package/src/components/time-picker/CTimePicker.tsx +3 -3
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/v5.0.0-rc.2.zip)
45
+ - [Download the latest release](https://github.com/coreui/coreui-react-pro/archive/v5.0.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`
@@ -30,6 +30,13 @@ export interface CBadgeProps extends HTMLAttributes<HTMLDivElement | HTMLSpanEle
30
30
  * Size the component small.
31
31
  */
32
32
  size?: 'sm';
33
+ /**
34
+ * Sets the component's color scheme to one of CoreUI's themed colors, ensuring the text color contrast adheres to the WCAG 4.5:1 contrast ratio standard for accessibility.
35
+ *
36
+ * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
37
+ * @since 5.0.0
38
+ */
39
+ textBgColor?: Colors;
33
40
  /**
34
41
  * Sets the text color of the component to one of CoreUI’s themed colors.
35
42
  *
@@ -8,9 +8,9 @@ var props = require('../../props.js');
8
8
 
9
9
  var CBadge = React.forwardRef(function (_a, ref) {
10
10
  var _b;
11
- var children = _a.children, _c = _a.as, Component = _c === void 0 ? 'span' : _c, className = _a.className, color = _a.color, position = _a.position, shape = _a.shape, size = _a.size, textColor = _a.textColor, rest = tslib_es6.__rest(_a, ["children", "as", "className", "color", "position", "shape", "size", "textColor"]);
11
+ var children = _a.children, _c = _a.as, Component = _c === void 0 ? 'span' : _c, className = _a.className, color = _a.color, position = _a.position, shape = _a.shape, size = _a.size, textBgColor = _a.textBgColor, textColor = _a.textColor, rest = tslib_es6.__rest(_a, ["children", "as", "className", "color", "position", "shape", "size", "textBgColor", "textColor"]);
12
12
  return (React.createElement(Component, tslib_es6.__assign({ className: index.default('badge', (_b = {},
13
- _b["text-bg-".concat(color)] = color,
13
+ _b["bg-".concat(color)] = color,
14
14
  _b['position-absolute translate-middle'] = position,
15
15
  _b['top-0'] = position === null || position === void 0 ? void 0 : position.includes('top'),
16
16
  _b['top-100'] = position === null || position === void 0 ? void 0 : position.includes('bottom'),
@@ -18,6 +18,7 @@ var CBadge = React.forwardRef(function (_a, ref) {
18
18
  _b['start-0'] = position === null || position === void 0 ? void 0 : position.includes('start'),
19
19
  _b["badge-".concat(size)] = size,
20
20
  _b["text-".concat(textColor)] = textColor,
21
+ _b["text-bg-".concat(textBgColor)] = textBgColor,
21
22
  _b), shape, className) }, rest, { ref: ref }), children));
22
23
  });
23
24
  CBadge.propTypes = {
@@ -28,6 +29,7 @@ CBadge.propTypes = {
28
29
  position: PropTypes.oneOf(['top-start', 'top-end', 'bottom-end', 'bottom-start']),
29
30
  shape: props.shapePropType,
30
31
  size: PropTypes.oneOf(['sm']),
32
+ textBgColor: props.colorPropType,
31
33
  textColor: props.textColorsPropType,
32
34
  };
33
35
  CBadge.displayName = 'CBadge';
@@ -1 +1 @@
1
- {"version":3,"file":"CBadge.js","sources":["../../../../src/components/badge/CBadge.tsx"],"sourcesContent":[null],"names":["forwardRef","__rest","__assign","classNames","colorProp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AS,CAAA,SAAA,CAAA,GAAE,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAR,QAAQ,CAAE,QAAQ,CAAC,OAAO,CAAC;AACtC,YAAA,EAAA,CAAC,QAAS,CAAA,MAAA,CAAA,IAAI,CAAE,CAAA,GAAG,IAAI;AACvB,YAAA,EAAA,CAAC,OAAQ,CAAA,MAAA,CAAA,SAAS,CAAE,CAAA,GAAG,SAAS;AAElC,YAAA,EAAA,GAAA,KAAK,EACL,SAAS,CACV,EAAA,EACG,IAAI,EAAA,EACR,GAAG,EAAE,GAAG,EAAA,CAAA,EAEP,QAAQ,CACC,EACb;AACH,CAAC,EACF;AAED,MAAM,CAAC,SAAS,GAAG;IACjB,EAAE,EAAE,SAAS,CAAC,MAAM;IACpB,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAACC,mBAAa,EAAEC,uBAAiB,CAAC,CAAC;AAC9D,IAAA,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;AACjF,IAAA,KAAK,EAAEC,mBAAa;IACpB,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;AAC7B,IAAA,SAAS,EAAEC,wBAAkB;CAC9B,CAAA;AAED,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
1
+ {"version":3,"file":"CBadge.js","sources":["../../../../src/components/badge/CBadge.tsx"],"sourcesContent":[null],"names":["forwardRef","__rest","__assign","classNames","colorPropType","gradientsPropType","shapePropType","textColorsPropType"],"mappings":";;;;;;;;IAmDa,MAAM,GAA2DA,gBAAU,CAItF,UACE,EAWC,EACD,GAAG,EAAA;;AAXD,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,EAAA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CAAA,MAAA,CAAA,IAAI,CAAE,CAAA,GAAG,IAAI;AACvB,YAAA,EAAA,CAAC,OAAQ,CAAA,MAAA,CAAA,SAAS,CAAE,CAAA,GAAG,SAAS;AAChC,YAAA,EAAA,CAAC,UAAW,CAAA,MAAA,CAAA,WAAW,CAAE,CAAA,GAAG,WAAW;AAEzC,YAAA,EAAA,GAAA,KAAK,EACL,SAAS,CACV,EAAA,EACG,IAAI,EAAA,EACR,GAAG,EAAE,GAAG,EAAA,CAAA,EAEP,QAAQ,CACC,EACb;AACH,CAAC,EACF;AAED,MAAM,CAAC,SAAS,GAAG;IACjB,EAAE,EAAE,SAAS,CAAC,MAAM;IACpB,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAACC,mBAAa,EAAEC,uBAAiB,CAAC,CAAC;AAC9D,IAAA,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;AACjF,IAAA,KAAK,EAAEC,mBAAa;IACpB,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;AAC7B,IAAA,WAAW,EAAEF,mBAAa;AAC1B,IAAA,SAAS,EAAEG,wBAAkB;CAC9B,CAAA;AAED,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
@@ -99,7 +99,7 @@ export interface CCalendarProps {
99
99
  /**
100
100
  * Set whether to display week numbers in the calendar.
101
101
  *
102
- * @since 5.0.0-rc.2
102
+ * @since 5.0.0
103
103
  */
104
104
  showWeekNumber?: boolean;
105
105
  /**
@@ -109,7 +109,7 @@ export interface CCalendarProps {
109
109
  /**
110
110
  * Specify the type of date selection as day, week, month, or year.
111
111
  *
112
- * @since 5.0.0-rc.2
112
+ * @since 5.0.0
113
113
  */
114
114
  selectionType?: 'day' | 'week' | 'month' | 'year';
115
115
  /**
@@ -125,7 +125,7 @@ export interface CCalendarProps {
125
125
  /**
126
126
  * Label displayed over week numbers in the calendar.
127
127
  *
128
- * @since 5.0.0-rc.2
128
+ * @since 5.0.0
129
129
  */
130
130
  weekNumbersLabel?: string;
131
131
  /**
@@ -17,5 +17,12 @@ export interface CCardProps extends HTMLAttributes<HTMLDivElement> {
17
17
  * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'primary-emphasis' | 'secondary-emphasis' | 'success-emphasis' | 'danger-emphasis' | 'warning-emphasis' | 'info-emphasis' | 'light-emphasis' | 'body' | 'body-emphasis' | 'body-secondary' | 'body-tertiary' | 'black' | 'black-50' | 'white' | 'white-50' | string
18
18
  */
19
19
  textColor?: string;
20
+ /**
21
+ * Sets the component's color scheme to one of CoreUI's themed colors, ensuring the text color contrast adheres to the WCAG 4.5:1 contrast ratio standard for accessibility.
22
+ *
23
+ * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
24
+ * @since 5.0.0
25
+ */
26
+ textBgColor?: Colors;
20
27
  }
21
28
  export declare const CCard: React.ForwardRefExoticComponent<CCardProps & React.RefAttributes<HTMLDivElement>>;
@@ -8,16 +8,18 @@ var props = require('../../props.js');
8
8
 
9
9
  var CCard = React.forwardRef(function (_a, ref) {
10
10
  var _b;
11
- var children = _a.children, className = _a.className, color = _a.color, textColor = _a.textColor, rest = tslib_es6.__rest(_a, ["children", "className", "color", "textColor"]);
11
+ var children = _a.children, className = _a.className, color = _a.color, textBgColor = _a.textBgColor, textColor = _a.textColor, rest = tslib_es6.__rest(_a, ["children", "className", "color", "textBgColor", "textColor"]);
12
12
  return (React.createElement("div", tslib_es6.__assign({ className: index.default('card', (_b = {},
13
13
  _b["bg-".concat(color)] = color,
14
14
  _b["text-".concat(textColor)] = textColor,
15
+ _b["text-bg-".concat(textBgColor)] = textBgColor,
15
16
  _b), className) }, rest, { ref: ref }), children));
16
17
  });
17
18
  CCard.propTypes = {
18
19
  children: PropTypes.node,
19
20
  className: PropTypes.string,
20
21
  color: PropTypes.oneOfType([props.colorPropType, props.gradientsPropType]),
22
+ textBgColor: props.colorPropType,
21
23
  textColor: PropTypes.string,
22
24
  };
23
25
  CCard.displayName = 'CCard';
@@ -1 +1 @@
1
- {"version":3,"file":"CCard.js","sources":["../../../../src/components/card/CCard.tsx"],"sourcesContent":[null],"names":["forwardRef","__rest","__assign","classNames","colorPropType","gradientsPropType"],"mappings":";;;;;;;;IA0Ba,KAAK,GAAGA,gBAAU,CAC7B,UAAC,EAAkD,EAAE,GAAG,EAAA;;AAArD,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,eAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAK,IAAI,GAAAC,gBAAA,CAAA,EAAA,EAAhD,+CAAkD,CAAF,CAAA;AAC/C,IAAA,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAAC,kBAAA,CAAA,EAAA,SAAS,EAAEC,aAAU,CACnB,MAAM,GAAA,EAAA,GAAA,EAAA;AAEJ,YAAA,EAAA,CAAC,KAAM,CAAA,MAAA,CAAA,KAAK,CAAE,CAAA,GAAG,KAAK;AACtB,YAAA,EAAA,CAAC,OAAQ,CAAA,MAAA,CAAA,SAAS,CAAE,CAAA,GAAG,SAAS;iBAElC,SAAS,CACV,EACG,EAAA,IAAI,EACR,EAAA,GAAG,EAAE,GAAG,EAEP,CAAA,EAAA,QAAQ,CACL,EACP;AACH,CAAC,EACF;AAED,KAAK,CAAC,SAAS,GAAG;IAChB,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAACC,mBAAa,EAAEC,uBAAiB,CAAC,CAAC;IAC9D,SAAS,EAAE,SAAS,CAAC,MAAM;CAC5B,CAAA;AAED,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
1
+ {"version":3,"file":"CCard.js","sources":["../../../../src/components/card/CCard.tsx"],"sourcesContent":[null],"names":["forwardRef","__rest","__assign","classNames","colorPropType","gradientsPropType"],"mappings":";;;;;;;;IAiCa,KAAK,GAAGA,gBAAU,CAC7B,UAAC,EAA+D,EAAE,GAAG,EAAA;;AAAlE,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAK,IAAI,GAAAC,gBAAA,CAAA,EAAA,EAA7D,8DAA+D,CAAF,CAAA;AAC5D,IAAA,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAAC,kBAAA,CAAA,EAAA,SAAS,EAAEC,aAAU,CACnB,MAAM,GAAA,EAAA,GAAA,EAAA;AAEJ,YAAA,EAAA,CAAC,KAAM,CAAA,MAAA,CAAA,KAAK,CAAE,CAAA,GAAG,KAAK;AACtB,YAAA,EAAA,CAAC,OAAQ,CAAA,MAAA,CAAA,SAAS,CAAE,CAAA,GAAG,SAAS;AAChC,YAAA,EAAA,CAAC,UAAW,CAAA,MAAA,CAAA,WAAW,CAAE,CAAA,GAAG,WAAW;iBAEzC,SAAS,CACV,EACG,EAAA,IAAI,EACR,EAAA,GAAG,EAAE,GAAG,EAEP,CAAA,EAAA,QAAQ,CACL,EACP;AACH,CAAC,EACF;AAED,KAAK,CAAC,SAAS,GAAG;IAChB,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAACC,mBAAa,EAAEC,uBAAiB,CAAC,CAAC;AAC9D,IAAA,WAAW,EAAED,mBAAa;IAC1B,SAAS,EAAE,SAAS,CAAC,MAAM;CAC5B,CAAA;AAED,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
@@ -85,19 +85,19 @@ export interface CDateRangePickerProps extends Omit<CFormControlWrapperProps, 'f
85
85
  /**
86
86
  * Custom function to format the selected date into a string according to a custom format.
87
87
  *
88
- * @since v5.0.0-rc.2
88
+ * @since 5.0.0
89
89
  */
90
90
  inputDateFormat?: (date: Date) => string;
91
91
  /**
92
92
  * Custom function to parse the input value into a valid Date object.
93
93
  *
94
- * @since v5.0.0-rc.2
94
+ * @since 5.0.0
95
95
  */
96
96
  inputDateParse?: (date: string | Date) => Date;
97
97
  /**
98
98
  * Defines the delay (in milliseconds) for the input field's onChange event.
99
99
  *
100
- * @since v5.0.0-rc.2
100
+ * @since 5.0.0
101
101
  */
102
102
  inputOnChangeDelay?: number;
103
103
  /**
@@ -13,7 +13,7 @@ export interface CDropdownToggleProps extends Omit<CButtonProps, 'type'> {
13
13
  /**
14
14
  * If a dropdown `variant` is set to `nav-item` then render the toggler as a link instead of a button.
15
15
  *
16
- * @since v5.0.0-rc.2
16
+ * @since 5.0.0
17
17
  */
18
18
  navLink?: boolean;
19
19
  /**
@@ -4,7 +4,7 @@ export interface CNavGroupProps extends HTMLAttributes<HTMLDivElement | HTMLLIEl
4
4
  /**
5
5
  * Component used for the root node. Either a string to use a HTML element or a component.
6
6
  *
7
- * @since 5.0.0-rc.2
7
+ * @since 5.0.0
8
8
  */
9
9
  as?: ElementType;
10
10
  /**
@@ -4,7 +4,7 @@ export interface CNavGroupItemsProps extends HTMLAttributes<HTMLDivElement | HTM
4
4
  /**
5
5
  * Component used for the root node. Either a string to use a HTML element or a component.
6
6
  *
7
- * @since 5.0.0-rc.2
7
+ * @since 5.0.0
8
8
  */
9
9
  as?: ElementType;
10
10
  /**
@@ -5,7 +5,7 @@ export interface CNavItemProps extends Omit<CNavLinkProps, 'component'> {
5
5
  /**
6
6
  * Component used for the root node. Either a string to use a HTML element or a component.
7
7
  *
8
- * @since 5.0.0-rc.2
8
+ * @since 5.0.0
9
9
  */
10
10
  as?: ElementType;
11
11
  }
@@ -4,7 +4,7 @@ export interface CSidebarBrandProps extends HTMLAttributes<HTMLAnchorElement | H
4
4
  /**
5
5
  * Component used for the root node. Either a string to use a HTML element or a component.
6
6
  *
7
- * @since 5.0.0-rc.2
7
+ * @since 5.0.0
8
8
  */
9
9
  as?: ElementType;
10
10
  /**
@@ -4,7 +4,7 @@ export interface CSidebarNavProps extends HTMLAttributes<HTMLUListElement> {
4
4
  /**
5
5
  * Component used for the root node. Either a string to use a HTML element or a component.
6
6
  *
7
- * @since 5.0.0-rc.2
7
+ * @since 5.0.0
8
8
  */
9
9
  as?: ElementType;
10
10
  /**
@@ -59,7 +59,7 @@ export interface CTimePickerProps extends Omit<CFormControlWrapperProps, 'floati
59
59
  /**
60
60
  * Specify a list of available hours using an array, or customize the filtering of hours through a function.
61
61
  *
62
- * @since 5.0.0-rc.2
62
+ * @since 5.0.0
63
63
  */
64
64
  hours?: number[] | ((hour: number) => number[]);
65
65
  /**
@@ -69,7 +69,7 @@ export interface CTimePickerProps extends Omit<CFormControlWrapperProps, 'floati
69
69
  /**
70
70
  * Defines the delay (in milliseconds) for the input field's onChange event.
71
71
  *
72
- * @since v5.0.0-rc.2
72
+ * @since 5.0.0
73
73
  */
74
74
  inputOnChangeDelay?: number;
75
75
  /**
@@ -83,7 +83,7 @@ export interface CTimePickerProps extends Omit<CFormControlWrapperProps, 'floati
83
83
  /**
84
84
  * Toggle the display of minutes, specify a list of available minutes using an array, or customize the filtering of minutes through a function.
85
85
  *
86
- * @since 5.0.0-rc.2
86
+ * @since 5.0.0
87
87
  */
88
88
  minutes?: boolean | number[] | ((minute: number) => number[]);
89
89
  /**
@@ -30,6 +30,13 @@ export interface CBadgeProps extends HTMLAttributes<HTMLDivElement | HTMLSpanEle
30
30
  * Size the component small.
31
31
  */
32
32
  size?: 'sm';
33
+ /**
34
+ * Sets the component's color scheme to one of CoreUI's themed colors, ensuring the text color contrast adheres to the WCAG 4.5:1 contrast ratio standard for accessibility.
35
+ *
36
+ * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
37
+ * @since 5.0.0
38
+ */
39
+ textBgColor?: Colors;
33
40
  /**
34
41
  * Sets the text color of the component to one of CoreUI’s themed colors.
35
42
  *
@@ -6,9 +6,9 @@ import { colorPropType, gradientsPropType, shapePropType, textColorsPropType } f
6
6
 
7
7
  var CBadge = forwardRef(function (_a, ref) {
8
8
  var _b;
9
- var children = _a.children, _c = _a.as, Component = _c === void 0 ? 'span' : _c, className = _a.className, color = _a.color, position = _a.position, shape = _a.shape, size = _a.size, textColor = _a.textColor, rest = __rest(_a, ["children", "as", "className", "color", "position", "shape", "size", "textColor"]);
9
+ var children = _a.children, _c = _a.as, Component = _c === void 0 ? 'span' : _c, className = _a.className, color = _a.color, position = _a.position, shape = _a.shape, size = _a.size, textBgColor = _a.textBgColor, textColor = _a.textColor, rest = __rest(_a, ["children", "as", "className", "color", "position", "shape", "size", "textBgColor", "textColor"]);
10
10
  return (React.createElement(Component, __assign({ className: classNames('badge', (_b = {},
11
- _b["text-bg-".concat(color)] = color,
11
+ _b["bg-".concat(color)] = color,
12
12
  _b['position-absolute translate-middle'] = position,
13
13
  _b['top-0'] = position === null || position === void 0 ? void 0 : position.includes('top'),
14
14
  _b['top-100'] = position === null || position === void 0 ? void 0 : position.includes('bottom'),
@@ -16,6 +16,7 @@ var CBadge = forwardRef(function (_a, ref) {
16
16
  _b['start-0'] = position === null || position === void 0 ? void 0 : position.includes('start'),
17
17
  _b["badge-".concat(size)] = size,
18
18
  _b["text-".concat(textColor)] = textColor,
19
+ _b["text-bg-".concat(textBgColor)] = textBgColor,
19
20
  _b), shape, className) }, rest, { ref: ref }), children));
20
21
  });
21
22
  CBadge.propTypes = {
@@ -26,6 +27,7 @@ CBadge.propTypes = {
26
27
  position: PropTypes.oneOf(['top-start', 'top-end', 'bottom-end', 'bottom-start']),
27
28
  shape: shapePropType,
28
29
  size: PropTypes.oneOf(['sm']),
30
+ textBgColor: colorPropType,
29
31
  textColor: textColorsPropType,
30
32
  };
31
33
  CBadge.displayName = 'CBadge';
@@ -1 +1 @@
1
- {"version":3,"file":"CBadge.js","sources":["../../../../src/components/badge/CBadge.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;;IA4Ca,MAAM,GAA2D,UAAU,CAItF,UACE,EAUC,EACD,GAAG,EAAA;;AAVD,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,EAAA,GAAA,EAAA,CAAA,EAAsB,EAAlB,SAAS,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,MAAM,GAAA,EAAA,EACtB,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,SAAS,GAAA,EAAA,CAAA,SAAA,EACN,IAAI,GAAA,MAAA,CAAA,EAAA,EATT,kFAUC,CADQ,CAAA;IAIT,QACE,oBAAC,SAAS,EAAA,QAAA,CAAA,EACR,SAAS,EAAE,UAAU,CACnB,OAAO,GAAA,EAAA,GAAA,EAAA;AAEL,YAAA,EAAA,CAAC,UAAW,CAAA,MAAA,CAAA,KAAK,CAAE,CAAA,GAAG,KAAK;AAC3B,YAAA,EAAA,CAAA,oCAAA,CAAoC,GAAE,QAAQ;YAC9C,EAAO,CAAA,OAAA,CAAA,GAAE,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAR,QAAQ,CAAE,QAAQ,CAAC,KAAK,CAAC;YAClC,EAAS,CAAA,SAAA,CAAA,GAAE,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAR,QAAQ,CAAE,QAAQ,CAAC,QAAQ,CAAC;YACvC,EAAW,C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AR,QAAQ,CAAE,QAAQ,CAAC,OAAO,CAAC;AACtC,YAAA,EAAA,CAAC,QAAS,CAAA,MAAA,CAAA,IAAI,CAAE,CAAA,GAAG,IAAI;AACvB,YAAA,EAAA,CAAC,OAAQ,CAAA,MAAA,CAAA,SAAS,CAAE,CAAA,GAAG,SAAS;AAChC,YAAA,EAAA,CAAC,UAAW,CAAA,MAAA,CAAA,WAAW,CAAE,CAAA,GAAG,WAAW;AAEzC,YAAA,EAAA,GAAA,KAAK,EACL,SAAS,CACV,EAAA,EACG,IAAI,EAAA,EACR,GAAG,EAAE,GAAG,EAAA,CAAA,EAEP,QAAQ,CACC,EACb;AACH,CAAC,EACF;AAED,MAAM,CAAC,SAAS,GAAG;IACjB,EAAE,EAAE,SAAS,CAAC,MAAM;IACpB,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;AAC9D,IAAA,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;AACjF,IAAA,KAAK,EAAE,aAAa;IACpB,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;AAC7B,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,SAAS,EAAE,kBAAkB;CAC9B,CAAA;AAED,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
@@ -99,7 +99,7 @@ export interface CCalendarProps {
99
99
  /**
100
100
  * Set whether to display week numbers in the calendar.
101
101
  *
102
- * @since 5.0.0-rc.2
102
+ * @since 5.0.0
103
103
  */
104
104
  showWeekNumber?: boolean;
105
105
  /**
@@ -109,7 +109,7 @@ export interface CCalendarProps {
109
109
  /**
110
110
  * Specify the type of date selection as day, week, month, or year.
111
111
  *
112
- * @since 5.0.0-rc.2
112
+ * @since 5.0.0
113
113
  */
114
114
  selectionType?: 'day' | 'week' | 'month' | 'year';
115
115
  /**
@@ -125,7 +125,7 @@ export interface CCalendarProps {
125
125
  /**
126
126
  * Label displayed over week numbers in the calendar.
127
127
  *
128
- * @since 5.0.0-rc.2
128
+ * @since 5.0.0
129
129
  */
130
130
  weekNumbersLabel?: string;
131
131
  /**
@@ -17,5 +17,12 @@ export interface CCardProps extends HTMLAttributes<HTMLDivElement> {
17
17
  * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'primary-emphasis' | 'secondary-emphasis' | 'success-emphasis' | 'danger-emphasis' | 'warning-emphasis' | 'info-emphasis' | 'light-emphasis' | 'body' | 'body-emphasis' | 'body-secondary' | 'body-tertiary' | 'black' | 'black-50' | 'white' | 'white-50' | string
18
18
  */
19
19
  textColor?: string;
20
+ /**
21
+ * Sets the component's color scheme to one of CoreUI's themed colors, ensuring the text color contrast adheres to the WCAG 4.5:1 contrast ratio standard for accessibility.
22
+ *
23
+ * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
24
+ * @since 5.0.0
25
+ */
26
+ textBgColor?: Colors;
20
27
  }
21
28
  export declare const CCard: React.ForwardRefExoticComponent<CCardProps & React.RefAttributes<HTMLDivElement>>;
@@ -6,16 +6,18 @@ import { colorPropType, gradientsPropType } from '../../props.js';
6
6
 
7
7
  var CCard = forwardRef(function (_a, ref) {
8
8
  var _b;
9
- var children = _a.children, className = _a.className, color = _a.color, textColor = _a.textColor, rest = __rest(_a, ["children", "className", "color", "textColor"]);
9
+ var children = _a.children, className = _a.className, color = _a.color, textBgColor = _a.textBgColor, textColor = _a.textColor, rest = __rest(_a, ["children", "className", "color", "textBgColor", "textColor"]);
10
10
  return (React.createElement("div", __assign({ className: classNames('card', (_b = {},
11
11
  _b["bg-".concat(color)] = color,
12
12
  _b["text-".concat(textColor)] = textColor,
13
+ _b["text-bg-".concat(textBgColor)] = textBgColor,
13
14
  _b), className) }, rest, { ref: ref }), children));
14
15
  });
15
16
  CCard.propTypes = {
16
17
  children: PropTypes.node,
17
18
  className: PropTypes.string,
18
19
  color: PropTypes.oneOfType([colorPropType, gradientsPropType]),
20
+ textBgColor: colorPropType,
19
21
  textColor: PropTypes.string,
20
22
  };
21
23
  CCard.displayName = 'CCard';
@@ -1 +1 @@
1
- {"version":3,"file":"CCard.js","sources":["../../../../src/components/card/CCard.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;;IA0Ba,KAAK,GAAG,UAAU,CAC7B,UAAC,EAAkD,EAAE,GAAG,EAAA;;AAArD,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,eAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAK,IAAI,GAAA,MAAA,CAAA,EAAA,EAAhD,+CAAkD,CAAF,CAAA;AAC/C,IAAA,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,QAAA,CAAA,EAAA,SAAS,EAAE,UAAU,CACnB,MAAM,GAAA,EAAA,GAAA,EAAA;AAEJ,YAAA,EAAA,CAAC,KAAM,CAAA,MAAA,CAAA,KAAK,CAAE,CAAA,GAAG,KAAK;AACtB,YAAA,EAAA,CAAC,OAAQ,CAAA,MAAA,CAAA,SAAS,CAAE,CAAA,GAAG,SAAS;iBAElC,SAAS,CACV,EACG,EAAA,IAAI,EACR,EAAA,GAAG,EAAE,GAAG,EAEP,CAAA,EAAA,QAAQ,CACL,EACP;AACH,CAAC,EACF;AAED,KAAK,CAAC,SAAS,GAAG;IAChB,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;IAC9D,SAAS,EAAE,SAAS,CAAC,MAAM;CAC5B,CAAA;AAED,KAAK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,19 +85,19 @@ export interface CDateRangePickerProps extends Omit<CFormControlWrapperProps, 'f
85
85
  /**
86
86
  * Custom function to format the selected date into a string according to a custom format.
87
87
  *
88
- * @since v5.0.0-rc.2
88
+ * @since 5.0.0
89
89
  */
90
90
  inputDateFormat?: (date: Date) => string;
91
91
  /**
92
92
  * Custom function to parse the input value into a valid Date object.
93
93
  *
94
- * @since v5.0.0-rc.2
94
+ * @since 5.0.0
95
95
  */
96
96
  inputDateParse?: (date: string | Date) => Date;
97
97
  /**
98
98
  * Defines the delay (in milliseconds) for the input field's onChange event.
99
99
  *
100
- * @since v5.0.0-rc.2
100
+ * @since 5.0.0
101
101
  */
102
102
  inputOnChangeDelay?: number;
103
103
  /**
@@ -13,7 +13,7 @@ export interface CDropdownToggleProps extends Omit<CButtonProps, 'type'> {
13
13
  /**
14
14
  * If a dropdown `variant` is set to `nav-item` then render the toggler as a link instead of a button.
15
15
  *
16
- * @since v5.0.0-rc.2
16
+ * @since 5.0.0
17
17
  */
18
18
  navLink?: boolean;
19
19
  /**
@@ -4,7 +4,7 @@ export interface CNavGroupProps extends HTMLAttributes<HTMLDivElement | HTMLLIEl
4
4
  /**
5
5
  * Component used for the root node. Either a string to use a HTML element or a component.
6
6
  *
7
- * @since 5.0.0-rc.2
7
+ * @since 5.0.0
8
8
  */
9
9
  as?: ElementType;
10
10
  /**
@@ -4,7 +4,7 @@ export interface CNavGroupItemsProps extends HTMLAttributes<HTMLDivElement | HTM
4
4
  /**
5
5
  * Component used for the root node. Either a string to use a HTML element or a component.
6
6
  *
7
- * @since 5.0.0-rc.2
7
+ * @since 5.0.0
8
8
  */
9
9
  as?: ElementType;
10
10
  /**
@@ -5,7 +5,7 @@ export interface CNavItemProps extends Omit<CNavLinkProps, 'component'> {
5
5
  /**
6
6
  * Component used for the root node. Either a string to use a HTML element or a component.
7
7
  *
8
- * @since 5.0.0-rc.2
8
+ * @since 5.0.0
9
9
  */
10
10
  as?: ElementType;
11
11
  }
@@ -4,7 +4,7 @@ export interface CSidebarBrandProps extends HTMLAttributes<HTMLAnchorElement | H
4
4
  /**
5
5
  * Component used for the root node. Either a string to use a HTML element or a component.
6
6
  *
7
- * @since 5.0.0-rc.2
7
+ * @since 5.0.0
8
8
  */
9
9
  as?: ElementType;
10
10
  /**
@@ -4,7 +4,7 @@ export interface CSidebarNavProps extends HTMLAttributes<HTMLUListElement> {
4
4
  /**
5
5
  * Component used for the root node. Either a string to use a HTML element or a component.
6
6
  *
7
- * @since 5.0.0-rc.2
7
+ * @since 5.0.0
8
8
  */
9
9
  as?: ElementType;
10
10
  /**
@@ -59,7 +59,7 @@ export interface CTimePickerProps extends Omit<CFormControlWrapperProps, 'floati
59
59
  /**
60
60
  * Specify a list of available hours using an array, or customize the filtering of hours through a function.
61
61
  *
62
- * @since 5.0.0-rc.2
62
+ * @since 5.0.0
63
63
  */
64
64
  hours?: number[] | ((hour: number) => number[]);
65
65
  /**
@@ -69,7 +69,7 @@ export interface CTimePickerProps extends Omit<CFormControlWrapperProps, 'floati
69
69
  /**
70
70
  * Defines the delay (in milliseconds) for the input field's onChange event.
71
71
  *
72
- * @since v5.0.0-rc.2
72
+ * @since 5.0.0
73
73
  */
74
74
  inputOnChangeDelay?: number;
75
75
  /**
@@ -83,7 +83,7 @@ export interface CTimePickerProps extends Omit<CFormControlWrapperProps, 'floati
83
83
  /**
84
84
  * Toggle the display of minutes, specify a list of available minutes using an array, or customize the filtering of minutes through a function.
85
85
  *
86
- * @since 5.0.0-rc.2
86
+ * @since 5.0.0
87
87
  */
88
88
  minutes?: boolean | number[] | ((minute: number) => number[]);
89
89
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coreui/react-pro",
3
- "version": "5.0.0-rc.2",
3
+ "version": "5.0.0",
4
4
  "description": "UI Components Library for React.js",
5
5
  "keywords": [
6
6
  "react",
@@ -41,7 +41,7 @@
41
41
  "test:update": "jest --coverage --updateSnapshot"
42
42
  },
43
43
  "dependencies": {
44
- "@coreui/coreui-pro": "^5.0.0-rc.2",
44
+ "@coreui/coreui-pro": "^5.0.0",
45
45
  "@popperjs/core": "^2.11.8",
46
46
  "prop-types": "^15.8.1"
47
47
  },
@@ -50,10 +50,10 @@
50
50
  "@rollup/plugin-node-resolve": "^15.2.3",
51
51
  "@rollup/plugin-typescript": "^11.1.6",
52
52
  "@testing-library/jest-dom": "^6.4.2",
53
- "@testing-library/react": "^14.2.1",
53
+ "@testing-library/react": "^14.2.2",
54
54
  "@types/jest": "^29.5.12",
55
- "@types/react": "18.2.63",
56
- "@types/react-dom": "^18.2.20",
55
+ "@types/react": "18.2.73",
56
+ "@types/react-dom": "^18.2.22",
57
57
  "@types/react-transition-group": "^4.4.10",
58
58
  "classnames": "^2.5.1",
59
59
  "cross-env": "^7.0.3",
@@ -63,10 +63,10 @@
63
63
  "react-device-detect": "^2.2.3",
64
64
  "react-dom": "^18.2.0",
65
65
  "react-transition-group": "^4.4.5",
66
- "rollup": "^4.12.1",
66
+ "rollup": "^4.13.1",
67
67
  "ts-jest": "^29.1.2",
68
68
  "tslib": "^2.6.2",
69
- "typescript": "^5.4.2"
69
+ "typescript": "^5.4.3"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "react": ">=17",
@@ -35,6 +35,13 @@ export interface CBadgeProps extends HTMLAttributes<HTMLDivElement | HTMLSpanEle
35
35
  * Size the component small.
36
36
  */
37
37
  size?: 'sm'
38
+ /**
39
+ * Sets the component's color scheme to one of CoreUI's themed colors, ensuring the text color contrast adheres to the WCAG 4.5:1 contrast ratio standard for accessibility.
40
+ *
41
+ * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
42
+ * @since 5.0.0
43
+ */
44
+ textBgColor?: Colors
38
45
  /**
39
46
  * Sets the text color of the component to one of CoreUI’s themed colors.
40
47
  *
@@ -55,6 +62,7 @@ export const CBadge: PolymorphicRefForwardingComponent<'span', CBadgeProps> = fo
55
62
  position,
56
63
  shape,
57
64
  size,
65
+ textBgColor,
58
66
  textColor,
59
67
  ...rest
60
68
  },
@@ -65,7 +73,7 @@ export const CBadge: PolymorphicRefForwardingComponent<'span', CBadgeProps> = fo
65
73
  className={classNames(
66
74
  'badge',
67
75
  {
68
- [`text-bg-${color}`]: color,
76
+ [`bg-${color}`]: color,
69
77
  'position-absolute translate-middle': position,
70
78
  'top-0': position?.includes('top'),
71
79
  'top-100': position?.includes('bottom'),
@@ -73,6 +81,7 @@ export const CBadge: PolymorphicRefForwardingComponent<'span', CBadgeProps> = fo
73
81
  'start-0': position?.includes('start'),
74
82
  [`badge-${size}`]: size,
75
83
  [`text-${textColor}`]: textColor,
84
+ [`text-bg-${textBgColor}`]: textBgColor,
76
85
  },
77
86
  shape,
78
87
  className,
@@ -94,6 +103,7 @@ CBadge.propTypes = {
94
103
  position: PropTypes.oneOf(['top-start', 'top-end', 'bottom-end', 'bottom-start']),
95
104
  shape: shapePropType,
96
105
  size: PropTypes.oneOf(['sm']),
106
+ textBgColor: colorPropType,
97
107
  textColor: textColorsPropType,
98
108
  }
99
109
 
@@ -122,7 +122,7 @@ export interface CCalendarProps {
122
122
  /**
123
123
  * Set whether to display week numbers in the calendar.
124
124
  *
125
- * @since 5.0.0-rc.2
125
+ * @since 5.0.0
126
126
  */
127
127
  showWeekNumber?: boolean
128
128
  /**
@@ -132,7 +132,7 @@ export interface CCalendarProps {
132
132
  /**
133
133
  * Specify the type of date selection as day, week, month, or year.
134
134
  *
135
- * @since 5.0.0-rc.2
135
+ * @since 5.0.0
136
136
  */
137
137
  selectionType?: 'day' | 'week' | 'month' | 'year'
138
138
  /**
@@ -148,7 +148,7 @@ export interface CCalendarProps {
148
148
  /**
149
149
  * Label displayed over week numbers in the calendar.
150
150
  *
151
- * @since 5.0.0-rc.2
151
+ * @since 5.0.0
152
152
  */
153
153
  weekNumbersLabel?: string
154
154
  /**
@@ -22,10 +22,17 @@ export interface CCardProps extends HTMLAttributes<HTMLDivElement> {
22
22
  * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'primary-emphasis' | 'secondary-emphasis' | 'success-emphasis' | 'danger-emphasis' | 'warning-emphasis' | 'info-emphasis' | 'light-emphasis' | 'body' | 'body-emphasis' | 'body-secondary' | 'body-tertiary' | 'black' | 'black-50' | 'white' | 'white-50' | string
23
23
  */
24
24
  textColor?: string
25
+ /**
26
+ * Sets the component's color scheme to one of CoreUI's themed colors, ensuring the text color contrast adheres to the WCAG 4.5:1 contrast ratio standard for accessibility.
27
+ *
28
+ * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
29
+ * @since 5.0.0
30
+ */
31
+ textBgColor?: Colors
25
32
  }
26
33
 
27
34
  export const CCard = forwardRef<HTMLDivElement, CCardProps>(
28
- ({ children, className, color, textColor, ...rest }, ref) => {
35
+ ({ children, className, color, textBgColor, textColor, ...rest }, ref) => {
29
36
  return (
30
37
  <div
31
38
  className={classNames(
@@ -33,6 +40,7 @@ export const CCard = forwardRef<HTMLDivElement, CCardProps>(
33
40
  {
34
41
  [`bg-${color}`]: color,
35
42
  [`text-${textColor}`]: textColor,
43
+ [`text-bg-${textBgColor}`]: textBgColor,
36
44
  },
37
45
  className,
38
46
  )}
@@ -49,6 +57,7 @@ CCard.propTypes = {
49
57
  children: PropTypes.node,
50
58
  className: PropTypes.string,
51
59
  color: PropTypes.oneOfType([colorPropType, gradientsPropType]),
60
+ textBgColor: colorPropType,
52
61
  textColor: PropTypes.string,
53
62
  }
54
63
 
@@ -99,19 +99,19 @@ export interface CDateRangePickerProps
99
99
  /**
100
100
  * Custom function to format the selected date into a string according to a custom format.
101
101
  *
102
- * @since v5.0.0-rc.2
102
+ * @since 5.0.0
103
103
  */
104
104
  inputDateFormat?: (date: Date) => string
105
105
  /**
106
106
  * Custom function to parse the input value into a valid Date object.
107
107
  *
108
- * @since v5.0.0-rc.2
108
+ * @since 5.0.0
109
109
  */
110
110
  inputDateParse?: (date: string | Date) => Date
111
111
  /**
112
112
  * Defines the delay (in milliseconds) for the input field's onChange event.
113
113
  *
114
- * @since v5.0.0-rc.2
114
+ * @since 5.0.0
115
115
  */
116
116
  inputOnChangeDelay?: number
117
117
  /**
@@ -21,7 +21,7 @@ export interface CDropdownToggleProps extends Omit<CButtonProps, 'type'> {
21
21
  /**
22
22
  * If a dropdown `variant` is set to `nav-item` then render the toggler as a link instead of a button.
23
23
  *
24
- * @since v5.0.0-rc.2
24
+ * @since 5.0.0
25
25
  */
26
26
  navLink?: boolean
27
27
  /**
@@ -22,7 +22,7 @@ export interface CNavGroupProps extends HTMLAttributes<HTMLDivElement | HTMLLIEl
22
22
  /**
23
23
  * Component used for the root node. Either a string to use a HTML element or a component.
24
24
  *
25
- * @since 5.0.0-rc.2
25
+ * @since 5.0.0
26
26
  */
27
27
  as?: ElementType
28
28
  /**
@@ -8,7 +8,7 @@ export interface CNavGroupItemsProps extends HTMLAttributes<HTMLDivElement | HTM
8
8
  /**
9
9
  * Component used for the root node. Either a string to use a HTML element or a component.
10
10
  *
11
- * @since 5.0.0-rc.2
11
+ * @since 5.0.0
12
12
  */
13
13
  as?: ElementType
14
14
  /**
@@ -10,7 +10,7 @@ export interface CNavItemProps extends Omit<CNavLinkProps, 'component'> {
10
10
  /**
11
11
  * Component used for the root node. Either a string to use a HTML element or a component.
12
12
  *
13
- * @since 5.0.0-rc.2
13
+ * @since 5.0.0
14
14
  */
15
15
  as?: ElementType
16
16
  }
@@ -8,7 +8,7 @@ export interface CSidebarBrandProps extends HTMLAttributes<HTMLAnchorElement | H
8
8
  /**
9
9
  * Component used for the root node. Either a string to use a HTML element or a component.
10
10
  *
11
- * @since 5.0.0-rc.2
11
+ * @since 5.0.0
12
12
  */
13
13
  as?: ElementType
14
14
  /**
@@ -16,7 +16,7 @@ export interface CSidebarNavProps extends HTMLAttributes<HTMLUListElement> {
16
16
  /**
17
17
  * Component used for the root node. Either a string to use a HTML element or a component.
18
18
  *
19
- * @since 5.0.0-rc.2
19
+ * @since 5.0.0
20
20
  */
21
21
  as?: ElementType
22
22
  /**
@@ -81,7 +81,7 @@ export interface CTimePickerProps
81
81
  /**
82
82
  * Specify a list of available hours using an array, or customize the filtering of hours through a function.
83
83
  *
84
- * @since 5.0.0-rc.2
84
+ * @since 5.0.0
85
85
  */
86
86
  hours?: number[] | ((hour: number) => number[])
87
87
  /**
@@ -91,7 +91,7 @@ export interface CTimePickerProps
91
91
  /**
92
92
  * Defines the delay (in milliseconds) for the input field's onChange event.
93
93
  *
94
- * @since v5.0.0-rc.2
94
+ * @since 5.0.0
95
95
  */
96
96
  inputOnChangeDelay?: number
97
97
  /**
@@ -105,7 +105,7 @@ export interface CTimePickerProps
105
105
  /**
106
106
  * Toggle the display of minutes, specify a list of available minutes using an array, or customize the filtering of minutes through a function.
107
107
  *
108
- * @since 5.0.0-rc.2
108
+ * @since 5.0.0
109
109
  */
110
110
  minutes?: boolean | number[] | ((minute: number) => number[])
111
111
  /**