@coreui/react-pro 5.10.0 → 5.11.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 (164) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/components/accordion/CAccordionButton.js +2 -2
  3. package/dist/cjs/components/accordion/CAccordionButton.js.map +1 -1
  4. package/dist/cjs/components/accordion/CAccordionItem.d.ts +1 -0
  5. package/dist/cjs/components/accordion/CAccordionItem.js +6 -3
  6. package/dist/cjs/components/accordion/CAccordionItem.js.map +1 -1
  7. package/dist/cjs/components/badge/CBadge.js +1 -1
  8. package/dist/cjs/components/badge/CBadge.js.map +1 -1
  9. package/dist/cjs/components/calendar/CCalendar.d.ts +57 -44
  10. package/dist/cjs/components/calendar/CCalendar.js +51 -187
  11. package/dist/cjs/components/calendar/CCalendar.js.map +1 -1
  12. package/dist/cjs/components/calendar/CCalendarNavigation.d.ts +21 -0
  13. package/dist/cjs/components/calendar/CCalendarNavigation.js +23 -0
  14. package/dist/cjs/components/calendar/CCalendarNavigation.js.map +1 -0
  15. package/dist/cjs/components/calendar/CCalendarPanel.d.ts +28 -0
  16. package/dist/cjs/components/calendar/CCalendarPanel.js +149 -0
  17. package/dist/cjs/components/calendar/CCalendarPanel.js.map +1 -0
  18. package/dist/cjs/components/calendar/types.d.ts +3 -0
  19. package/dist/cjs/components/calendar/utils.d.ts +175 -18
  20. package/dist/cjs/components/calendar/utils.js +312 -43
  21. package/dist/cjs/components/calendar/utils.js.map +1 -1
  22. package/dist/cjs/components/date-picker/CDatePicker.d.ts +1 -1
  23. package/dist/cjs/components/date-range-picker/CDateRangePicker.d.ts +2 -2
  24. package/dist/cjs/components/date-range-picker/CDateRangePicker.js +0 -2
  25. package/dist/cjs/components/date-range-picker/CDateRangePicker.js.map +1 -1
  26. package/dist/cjs/components/date-range-picker/utils.d.ts +16 -0
  27. package/dist/cjs/components/date-range-picker/utils.js +18 -2
  28. package/dist/cjs/components/date-range-picker/utils.js.map +1 -1
  29. package/dist/cjs/components/dropdown/CDropdownToggle.js +1 -1
  30. package/dist/cjs/components/dropdown/CDropdownToggle.js.map +1 -1
  31. package/dist/cjs/components/modal/CModal.js +0 -1
  32. package/dist/cjs/components/modal/CModal.js.map +1 -1
  33. package/dist/cjs/components/nav/CNavGroup.js +1 -1
  34. package/dist/cjs/components/nav/CNavGroup.js.map +1 -1
  35. package/dist/cjs/components/progress/CProgress.d.ts +1 -1
  36. package/dist/cjs/components/range-slider/CRangeSlider.js +6 -2
  37. package/dist/cjs/components/range-slider/CRangeSlider.js.map +1 -1
  38. package/dist/cjs/components/sidebar/CSidebar.d.ts +7 -2
  39. package/dist/cjs/components/sidebar/CSidebar.js +7 -6
  40. package/dist/cjs/components/sidebar/CSidebar.js.map +1 -1
  41. package/dist/cjs/components/smart-pagination/CSmartPagination.d.ts +4 -12
  42. package/dist/cjs/components/smart-pagination/CSmartPagination.js.map +1 -1
  43. package/dist/cjs/components/smart-table/CSmartTableHead.js +10 -25
  44. package/dist/cjs/components/smart-table/CSmartTableHead.js.map +1 -1
  45. package/dist/cjs/components/time-picker/CTimePicker.d.ts +1 -1
  46. package/dist/cjs/components/time-picker/CTimePicker.js.map +1 -1
  47. package/dist/cjs/components/time-picker/types.d.ts +5 -0
  48. package/dist/cjs/components/time-picker/utils.d.ts +8 -11
  49. package/dist/cjs/components/time-picker/utils.js +8 -4
  50. package/dist/cjs/components/time-picker/utils.js.map +1 -1
  51. package/dist/cjs/hooks/index.d.ts +2 -1
  52. package/dist/cjs/hooks/useClipboard.d.ts +12 -0
  53. package/dist/cjs/hooks/useClipboard.js +54 -0
  54. package/dist/cjs/hooks/useClipboard.js.map +1 -0
  55. package/dist/cjs/hooks/useColorModes.js +5 -5
  56. package/dist/cjs/hooks/useColorModes.js.map +1 -1
  57. package/dist/cjs/index.js +2 -0
  58. package/dist/cjs/index.js.map +1 -1
  59. package/dist/cjs/node_modules/react-device-detect/dist/lib.js +1 -1
  60. package/dist/cjs/node_modules/react-device-detect/dist/lib.js.map +1 -1
  61. package/dist/cjs/node_modules/tslib/tslib.es6.js +40 -0
  62. package/dist/cjs/node_modules/tslib/tslib.es6.js.map +1 -1
  63. package/dist/cjs/utils/index.d.ts +2 -1
  64. package/dist/cjs/utils/mergeClassNames.d.ts +2 -0
  65. package/dist/esm/components/accordion/CAccordionButton.js +2 -2
  66. package/dist/esm/components/accordion/CAccordionButton.js.map +1 -1
  67. package/dist/esm/components/accordion/CAccordionItem.d.ts +1 -0
  68. package/dist/esm/components/accordion/CAccordionItem.js +7 -4
  69. package/dist/esm/components/accordion/CAccordionItem.js.map +1 -1
  70. package/dist/esm/components/badge/CBadge.js +1 -1
  71. package/dist/esm/components/badge/CBadge.js.map +1 -1
  72. package/dist/esm/components/calendar/CCalendar.d.ts +57 -44
  73. package/dist/esm/components/calendar/CCalendar.js +52 -188
  74. package/dist/esm/components/calendar/CCalendar.js.map +1 -1
  75. package/dist/esm/components/calendar/CCalendarNavigation.d.ts +21 -0
  76. package/dist/esm/components/calendar/CCalendarNavigation.js +21 -0
  77. package/dist/esm/components/calendar/CCalendarNavigation.js.map +1 -0
  78. package/dist/esm/components/calendar/CCalendarPanel.d.ts +28 -0
  79. package/dist/esm/components/calendar/CCalendarPanel.js +147 -0
  80. package/dist/esm/components/calendar/CCalendarPanel.js.map +1 -0
  81. package/dist/esm/components/calendar/types.d.ts +3 -0
  82. package/dist/esm/components/calendar/utils.d.ts +175 -18
  83. package/dist/esm/components/calendar/utils.js +306 -44
  84. package/dist/esm/components/calendar/utils.js.map +1 -1
  85. package/dist/esm/components/date-picker/CDatePicker.d.ts +1 -1
  86. package/dist/esm/components/date-range-picker/CDateRangePicker.d.ts +2 -2
  87. package/dist/esm/components/date-range-picker/CDateRangePicker.js +0 -2
  88. package/dist/esm/components/date-range-picker/CDateRangePicker.js.map +1 -1
  89. package/dist/esm/components/date-range-picker/utils.d.ts +16 -0
  90. package/dist/esm/components/date-range-picker/utils.js +18 -2
  91. package/dist/esm/components/date-range-picker/utils.js.map +1 -1
  92. package/dist/esm/components/dropdown/CDropdownToggle.js +1 -1
  93. package/dist/esm/components/dropdown/CDropdownToggle.js.map +1 -1
  94. package/dist/esm/components/modal/CModal.js +0 -1
  95. package/dist/esm/components/modal/CModal.js.map +1 -1
  96. package/dist/esm/components/nav/CNavGroup.js +1 -1
  97. package/dist/esm/components/nav/CNavGroup.js.map +1 -1
  98. package/dist/esm/components/progress/CProgress.d.ts +1 -1
  99. package/dist/esm/components/range-slider/CRangeSlider.js +6 -2
  100. package/dist/esm/components/range-slider/CRangeSlider.js.map +1 -1
  101. package/dist/esm/components/sidebar/CSidebar.d.ts +7 -2
  102. package/dist/esm/components/sidebar/CSidebar.js +7 -6
  103. package/dist/esm/components/sidebar/CSidebar.js.map +1 -1
  104. package/dist/esm/components/smart-pagination/CSmartPagination.d.ts +4 -12
  105. package/dist/esm/components/smart-pagination/CSmartPagination.js.map +1 -1
  106. package/dist/esm/components/smart-table/CSmartTableHead.js +11 -26
  107. package/dist/esm/components/smart-table/CSmartTableHead.js.map +1 -1
  108. package/dist/esm/components/time-picker/CTimePicker.d.ts +1 -1
  109. package/dist/esm/components/time-picker/CTimePicker.js.map +1 -1
  110. package/dist/esm/components/time-picker/types.d.ts +5 -0
  111. package/dist/esm/components/time-picker/utils.d.ts +8 -11
  112. package/dist/esm/components/time-picker/utils.js +8 -4
  113. package/dist/esm/components/time-picker/utils.js.map +1 -1
  114. package/dist/esm/hooks/index.d.ts +2 -1
  115. package/dist/esm/hooks/useClipboard.d.ts +12 -0
  116. package/dist/esm/hooks/useClipboard.js +52 -0
  117. package/dist/esm/hooks/useClipboard.js.map +1 -0
  118. package/dist/esm/hooks/useColorModes.js +5 -5
  119. package/dist/esm/hooks/useColorModes.js.map +1 -1
  120. package/dist/esm/index.js +1 -0
  121. package/dist/esm/index.js.map +1 -1
  122. package/dist/esm/node_modules/react-device-detect/dist/lib.js +1 -1
  123. package/dist/esm/node_modules/react-device-detect/dist/lib.js.map +1 -1
  124. package/dist/esm/node_modules/tslib/tslib.es6.js +39 -1
  125. package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -1
  126. package/dist/esm/utils/index.d.ts +2 -1
  127. package/dist/esm/utils/mergeClassNames.d.ts +2 -0
  128. package/package.json +12 -10
  129. package/src/components/accordion/CAccordionButton.tsx +3 -2
  130. package/src/components/accordion/CAccordionItem.tsx +8 -3
  131. package/src/components/accordion/__tests__/__snapshots__/CAccordionButton.spec.tsx.snap +0 -2
  132. package/src/components/accordion/__tests__/__snapshots__/CAccordionHeader.spec.tsx.snap +0 -2
  133. package/src/components/badge/CBadge.tsx +1 -1
  134. package/src/components/calendar/CCalendar.tsx +154 -489
  135. package/src/components/calendar/CCalendarNavigation.tsx +120 -0
  136. package/src/components/calendar/CCalendarPanel.tsx +306 -0
  137. package/src/components/calendar/types.ts +5 -0
  138. package/src/components/calendar/utils.ts +414 -109
  139. package/src/components/carousel/__tests__/CCarousel.spec.tsx +1 -2
  140. package/src/components/date-picker/CDatePicker.tsx +1 -1
  141. package/src/components/date-range-picker/CDateRangePicker.tsx +2 -4
  142. package/src/components/date-range-picker/utils.ts +23 -3
  143. package/src/components/dropdown/CDropdownToggle.tsx +1 -1
  144. package/src/components/dropdown/__tests__/CDropdown.spec.tsx +43 -19
  145. package/src/components/modal/CModal.tsx +0 -2
  146. package/src/components/modal/__tests__/CModal.spec.tsx +33 -25
  147. package/src/components/nav/CNavGroup.tsx +5 -1
  148. package/src/components/nav/__tests__/__snapshots__/CNavGroup.spec.tsx.snap +4 -1
  149. package/src/components/popover/__tests__/CPopover.spec.tsx +1 -1
  150. package/src/components/popover/__tests__/__snapshots__/CPopover.spec.tsx.snap +2 -3
  151. package/src/components/progress/CProgress.tsx +1 -1
  152. package/src/components/range-slider/CRangeSlider.tsx +7 -2
  153. package/src/components/sidebar/CSidebar.tsx +15 -5
  154. package/src/components/smart-pagination/CSmartPagination.tsx +4 -12
  155. package/src/components/smart-table/CSmartTableHead.tsx +7 -34
  156. package/src/components/time-picker/CTimePicker.tsx +3 -3
  157. package/src/components/time-picker/types.ts +7 -0
  158. package/src/components/time-picker/utils.ts +15 -13
  159. package/src/components/tooltip/__tests__/__snapshots__/CTooltip.spec.tsx.snap +0 -1
  160. package/src/hooks/index.ts +2 -0
  161. package/src/hooks/useClipboard.ts +38 -0
  162. package/src/hooks/useColorModes.ts +5 -5
  163. package/src/utils/index.ts +2 -0
  164. package/src/utils/mergeClassNames.ts +25 -0
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.10.0.zip)
45
+ - [Download the latest release](https://github.com/coreui/coreui-react-pro/archive/v5.11.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`
@@ -8,8 +8,8 @@ var CAccordionItem = require('./CAccordionItem.js');
8
8
 
9
9
  var CAccordionButton = React.forwardRef(function (_a, ref) {
10
10
  var children = _a.children, className = _a.className, rest = tslib_es6.__rest(_a, ["children", "className"]);
11
- var _b = React.useContext(CAccordionItem.CAccordionItemContext), visible = _b.visible, setVisible = _b.setVisible;
12
- return (React.createElement("button", tslib_es6.__assign({ type: "button", className: index.default('accordion-button', { collapsed: !visible }, className), "aria-expanded": !visible, onClick: function () { return setVisible(!visible); } }, rest, { ref: ref }), children));
11
+ var _b = React.useContext(CAccordionItem.CAccordionItemContext), id = _b.id, visible = _b.visible, setVisible = _b.setVisible;
12
+ return (React.createElement("button", tslib_es6.__assign({ type: "button", className: index.default('accordion-button', { collapsed: !visible }, className), "aria-controls": id, "aria-expanded": visible, onClick: function () { return setVisible(!visible); } }, rest, { ref: ref }), children));
13
13
  });
14
14
  CAccordionButton.propTypes = {
15
15
  children: PropTypes.node,
@@ -1 +1 @@
1
- {"version":3,"file":"CAccordionButton.js","sources":["../../../../src/components/accordion/CAccordionButton.tsx"],"sourcesContent":[null],"names":["forwardRef","__rest","useContext","CAccordionItemContext","classNames"],"mappings":";;;;;;;;IAaa,gBAAgB,GAAGA,gBAAU,CACxC,UAAC,EAAgC,EAAE,GAAG,EAAA;IAAnC,IAAA,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAK,IAAI,GAA9BC,gBAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,WAAA,CAAgC,CAAF;IACvB,IAAA,EAAA,GAA0BC,gBAAU,CAACC,oCAAqB,CAAC,EAAzD,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAsC;IAEjE,QACE,mDACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAEC,aAAU,CAAC,kBAAkB,EAAE,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,EAC9D,eAAA,EAAA,CAAC,OAAO,EACvB,OAAO,EAAE,YAAM,EAAA,OAAA,UAAU,CAAC,CAAC,OAAO,CAAC,CAAA,EAAA,EAC/B,EAAA,IAAI,IACR,GAAG,EAAE,GAAG,EAEP,CAAA,EAAA,QAAQ,CACF;AAEb,CAAC;AAGH,gBAAgB,CAAC,SAAS,GAAG;IAC3B,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,SAAS,EAAE,SAAS,CAAC,MAAM;CAC5B;AAED,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
1
+ {"version":3,"file":"CAccordionButton.js","sources":["../../../../src/components/accordion/CAccordionButton.tsx"],"sourcesContent":[null],"names":["forwardRef","__rest","useContext","CAccordionItemContext","classNames"],"mappings":";;;;;;;;IAaa,gBAAgB,GAAGA,gBAAU,CACxC,UAAC,EAAgC,EAAE,GAAG,EAAA;IAAnC,IAAA,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAK,IAAI,GAA9BC,gBAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,WAAA,CAAgC,CAAF;AACvB,IAAA,IAAA,EAA8B,GAAAC,gBAAU,CAACC,oCAAqB,CAAC,EAA7D,EAAE,GAAA,EAAA,CAAA,EAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,UAAU,gBAAsC;IAErE,QACE,mDACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAEC,aAAU,CAAC,kBAAkB,EAAE,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,EAC9D,eAAA,EAAA,EAAE,mBACF,OAAO,EACtB,OAAO,EAAE,YAAA,EAAM,OAAA,UAAU,CAAC,CAAC,OAAO,CAAC,CAAA,EAAA,EAC/B,EAAA,IAAI,IACR,GAAG,EAAE,GAAG,EAEP,CAAA,EAAA,QAAQ,CACF;AAEb,CAAC;AAGH,gBAAgB,CAAC,SAAS,GAAG;IAC3B,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,SAAS,EAAE,SAAS,CAAC,MAAM;CAC5B;AAED,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
@@ -1,5 +1,6 @@
1
1
  import React, { HTMLAttributes } from 'react';
2
2
  export interface CAccordionItemContextProps {
3
+ id: string;
3
4
  setVisible: (a: boolean) => void;
4
5
  visible?: boolean;
5
6
  }
@@ -9,17 +9,20 @@ var CAccordion = require('./CAccordion.js');
9
9
  var CAccordionItemContext = React.createContext({});
10
10
  var CAccordionItem = React.forwardRef(function (_a, ref) {
11
11
  var children = _a.children, className = _a.className, itemKey = _a.itemKey, rest = tslib_es6.__rest(_a, ["children", "className", "itemKey"]);
12
- var _itemKey = React.useRef(itemKey !== null && itemKey !== void 0 ? itemKey : Math.random().toString(36).slice(2, 11));
12
+ var id = React.useId();
13
+ var _itemKey = React.useRef(itemKey !== null && itemKey !== void 0 ? itemKey : id);
13
14
  var _b = React.useContext(CAccordion.CAccordionContext), _activeItemKey = _b._activeItemKey, alwaysOpen = _b.alwaysOpen, setActiveKey = _b.setActiveKey;
14
15
  var _c = React.useState(Boolean(_activeItemKey === _itemKey.current)), visible = _c[0], setVisible = _c[1];
15
16
  React.useEffect(function () {
16
- !alwaysOpen && visible && setActiveKey(_itemKey.current);
17
+ if (!alwaysOpen && visible) {
18
+ setActiveKey(_itemKey.current);
19
+ }
17
20
  }, [visible]);
18
21
  React.useEffect(function () {
19
22
  setVisible(Boolean(_activeItemKey === _itemKey.current));
20
23
  }, [_activeItemKey]);
21
24
  return (React.createElement("div", tslib_es6.__assign({ className: index.default('accordion-item', className) }, rest, { ref: ref }),
22
- React.createElement(CAccordionItemContext.Provider, { value: { setVisible: setVisible, visible: visible } }, children)));
25
+ React.createElement(CAccordionItemContext.Provider, { value: { id: id, setVisible: setVisible, visible: visible } }, children)));
23
26
  });
24
27
  CAccordionItem.propTypes = {
25
28
  children: PropTypes.node,
@@ -1 +1 @@
1
- {"version":3,"file":"CAccordionItem.js","sources":["../../../../src/components/accordion/CAccordionItem.tsx"],"sourcesContent":[null],"names":["createContext","forwardRef","__rest","useRef","useContext","CAccordionContext","useState","useEffect","__assign","classNames"],"mappings":";;;;;;;;IAmBa,qBAAqB,GAAGA,mBAAa,CAAC,EAAgC;IAatE,cAAc,GAAGC,gBAAU,CACtC,UAAC,EAAyC,EAAE,GAAG,EAAA;AAA5C,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA,EAAK,IAAI,GAAvCC,gBAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,WAAA,EAAA,SAAA,CAAyC,CAAF;IACtC,IAAM,QAAQ,GAAGC,YAAM,CAAC,OAAO,KAAP,IAAA,IAAA,OAAO,KAAP,KAAA,CAAA,GAAA,OAAO,GAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAErE,IAAA,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/components/accordion/CAccordionItem.tsx"],"sourcesContent":[null],"names":["createContext","forwardRef","__rest","useId","useRef","useContext","CAccordionContext","useState","useEffect","__assign","classNames"],"mappings":";;;;;;;;IAqBa,qBAAqB,GAAGA,mBAAa,CAAC,EAAgC;IAatE,cAAc,GAAGC,gBAAU,CACtC,UAAC,EAAyC,EAAE,GAAG,EAAA;AAA5C,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA,EAAK,IAAI,GAAvCC,gBAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,WAAA,EAAA,SAAA,CAAyC,CAAF;AACtC,IAAA,IAAM,EAAE,GAAGC,WAAK,EAAE;AAClB,IAAA,IAAM,QAAQ,GAAGC,YAAM,CAAC,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,KAAA,CAAA,GAAP,OAAO,GAAI,EAAE,CAAC;AAEhC,IAAA,IAAA,EAA+C,GAAAC,gBAAU,CAACC,4BAAiB,CAAC,EAA1E,cAAc,GAAA,EAAA,CAAA,cAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,YAAY,kBAAkC;AAC5E,IAAA,IAAA,KAAwBC,cAAQ,CAAC,OAAO,CAAC,cAAc,KAAK,QAAQ,CAAC,OAAO,CAAC,CAAC,EAA7E,OAAO,QAAA,EAAE,UAAU,QAA0D;AAEpF,IAAAC,eAAS,CAAC,YAAA;AACR,QAAA,IAAI,CAAC,UAAU,IAAI,OAAO,EAAE;AAC1B,YAAA,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC;;AAElC,KAAC,EAAE,CAAC,OAAO,CAAC,CAAC;AAEb,IAAAA,eAAS,CAAC,YAAA;QACR,UAAU,CAAC,OAAO,CAAC,cAAc,KAAK,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC1D,KAAC,EAAE,CAAC,cAAc,CAAC,CAAC;AAEpB,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,kBAAA,CAAA,EAAK,SAAS,EAAEC,aAAU,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAAM,EAAA,IAAI,EAAE,EAAA,GAAG,EAAE,GAAG,EAAA,CAAA;QACzE,KAAC,CAAA,aAAA,CAAA,qBAAqB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,EAAE,EAAA,EAAA,EAAE,UAAU,EAAA,UAAA,EAAE,OAAO,EAAA,OAAA,EAAE,IAC/D,QAAQ,CACsB,CAC7B;AAEV,CAAC;AAGH,cAAc,CAAC,SAAS,GAAG;IACzB,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,SAAS,EAAE,SAAS,CAAC,MAAM;AAC3B,IAAA,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;CACnE;AAED,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;;"}
@@ -22,7 +22,7 @@ var CBadge = React.forwardRef(function (_a, ref) {
22
22
  _b), shape, className) }, rest, { ref: ref }), children));
23
23
  });
24
24
  CBadge.propTypes = {
25
- as: PropTypes.string,
25
+ as: PropTypes.elementType,
26
26
  children: PropTypes.node,
27
27
  className: PropTypes.string,
28
28
  color: PropTypes.oneOfType([props.colorPropType, props.gradientsPropType]),
@@ -1 +1 @@
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,GAAA,EAAA,CAAA,EAAsB,EAAlB,SAAS,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,MAAM,GA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,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;AAEhB,CAAC;AAGH,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;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,GAAA,EAAA,CAAA,EAAsB,EAAlB,SAAS,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,MAAM,GAAA,EAAA,EACtB,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,KAAK,WAAA,EACL,QAAQ,G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AA,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;AAEhB,CAAC;AAGH,MAAM,CAAC,SAAS,GAAG;IACjB,EAAE,EAAE,SAAS,CAAC,WAAW;IACzB,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;AAED,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
@@ -1,180 +1,193 @@
1
1
  import React, { ReactNode } from 'react';
2
- export type DisabledDate = ((date: Date) => boolean) | Date | Date[];
2
+ import type { DisabledDate, SelectionTypes } from './types';
3
3
  export interface CCalendarProps {
4
4
  /**
5
- * A string that provides an accessible label for the button that navigates to the next month in the calendar. This label is read by screen readers to describe the action associated with the button.
5
+ * A string that provides an accessible label for the button that navigates to the next month in the React Calendar component. This label is read by screen readers to describe the action associated with the button. Customize for a more accessible calendar experience.
6
6
  *
7
+ * @default 'Next month'
7
8
  * @since 5.5.0
8
9
  */
9
10
  ariaNavNextMonthLabel?: string;
10
11
  /**
11
- * A string that provides an accessible label for the button that navigates to the next year in the calendar. This label is intended for screen readers to help users understand the button's functionality.
12
+ * A string that provides an accessible label for the button that navigates to the next year in the React Calendar component. Screen readers utilize this label to inform users of the button's functionality, aiding in a more inclusive application.
12
13
  *
14
+ * @default 'Next year'
13
15
  * @since 5.5.0
14
16
  */
15
17
  ariaNavNextYearLabel?: string;
16
18
  /**
17
- * A string that provides an accessible label for the button that navigates to the previous month in the calendar. Screen readers will use this label to explain the purpose of the button.
19
+ * A string that provides an accessible label for the button that navigates to the previous month in the React Calendar component. This label is announced by screen readers, ensuring clarity around the button's purpose.
18
20
  *
21
+ * @default 'Previous month'
19
22
  * @since 5.5.0
20
23
  */
21
24
  ariaNavPrevMonthLabel?: string;
22
25
  /**
23
- * A string that provides an accessible label for the button that navigates to the previous year in the calendar. This label helps screen reader users understand the button's function.
26
+ * A string that provides an accessible label for the button that navigates to the previous year in the React Calendar component. Use it to enhance the experience for screen readers and further accessibility.
24
27
  *
28
+ * @default 'Previous year'
25
29
  * @since 5.5.0
26
30
  */
27
31
  ariaNavPrevYearLabel?: string;
28
32
  /**
29
- * Default date of the component
33
+ * Defines the initial date or reference date for the React Calendar component. This date can be either a Date object or a string that can be converted into a valid date.
30
34
  */
31
35
  calendarDate?: Date | string | null;
32
36
  /**
33
- * The number of calendars that render on desktop devices.
37
+ * Specifies how many individual calendars should be displayed side by side on desktop devices. Increasing this number allows your users to view multiple months (or years, etc.) simultaneously.
34
38
  */
35
39
  calendars?: number;
36
40
  /**
37
- * A string of all className you want applied to the component.
41
+ * A string of all classNames you want to apply to the outermost container of the React Calendar component. Use this to style or theme your calendar.
38
42
  */
39
43
  className?: string;
40
44
  /**
41
- * Set the format of day name.
45
+ * Sets the format for day names. Accepts either a built-in format ('numeric' or '2-digit') or a custom function to return any desired string or number for the day.
42
46
  *
43
47
  * @default 'numeric'
44
48
  * @since 4.3.0
45
49
  */
46
50
  dayFormat?: 'numeric' | '2-digit' | ((date: Date) => string | number);
47
51
  /**
48
- * Specify the list of dates that cannot be selected.
52
+ * Specifies one or more dates that cannot be selected by the user. This is useful for disabling weekends, holidays, or any dates that you need to restrict within your React Calendar component.
49
53
  */
50
54
  disabledDates?: DisabledDate | DisabledDate[];
51
55
  /**
52
- * Initial selected to date (range).
56
+ * Defines the initially selected ending date (applicable when using range selection). Accepts both Date objects and valid date strings.
53
57
  */
54
58
  endDate?: Date | string | null;
55
59
  /**
56
- * Sets the day of start week.
57
- * - 0 - Sunday,
58
- * - 1 - Monday,
59
- * - 2 - Tuesday,
60
- * - 3 - Wednesday,
61
- * - 4 - Thursday,
62
- * - 5 - Friday,
63
- * - 6 - Saturday,
60
+ * Sets the first day of the week. This can be adjusted for different locales or preferences:
61
+ * - `0` = Sunday
62
+ * - `1` = Monday
63
+ * - `2` = Tuesday
64
+ * - `3` = Wednesday
65
+ * - `4` = Thursday
66
+ * - `5` = Friday
67
+ * - `6` = Saturday
64
68
  *
65
69
  * @default 1
66
70
  */
67
71
  firstDayOfWeek?: number;
68
72
  /**
69
- * Sets the default locale for components. If not set, it is inherited from the browser.
73
+ * Indicates the locale for the React Calendar component. If not explicitly provided, it inherits the locale settings from the browser.
70
74
  *
71
75
  * @default 'default'
72
76
  */
73
77
  locale?: string;
74
78
  /**
75
- * Max selectable date.
79
+ * The maximum date that can be selected. Any date beyond this value will be disabled within the calendar. This is often used to restrict future selections.
76
80
  */
77
81
  maxDate?: Date | string | null;
78
82
  /**
79
- * Min selectable date.
83
+ * The minimum date that can be selected. Any date before this value will be disabled in the calendar. Useful for preventing selection of past dates or creating limited booking windows.
80
84
  */
81
85
  minDate?: Date | string | null;
82
86
  /**
83
- * Show arrows navigation.
87
+ * Toggles display of arrow-based navigation (previous/next controls) in the React Calendar component. If set to `false`, you can build custom navigation or handle the navigation programmatically.
84
88
  */
85
89
  navigation?: boolean;
86
90
  /**
87
- * The custom next icon.
91
+ * Customizes the icon for navigating to the next view (month, year, etc.) depending on the current view. Accepts any valid `ReactNode`, enabling you to display text, images, or icons.
88
92
  */
89
93
  navNextIcon?: ReactNode;
90
94
  /**
91
- * The custom next double icon.
95
+ * Customizes the icon for navigating multiple steps forward (double jump), e.g., skipping multiple months or years at once. Ideal for quick navigation through large date ranges.
92
96
  */
93
97
  navNextDoubleIcon?: ReactNode;
94
98
  /**
95
- * The custom prev icon.
99
+ * Customizes the icon for navigating to the previous view in the calendar. Accepts any valid ReactNode to provide flexible styling or theming.
96
100
  */
97
101
  navPrevIcon?: ReactNode;
98
102
  /**
99
- * The custom prev double icon.
103
+ * Customizes the icon for a double jump backward (e.g., jumping multiple months or years at once). This feature simplifies larger date range navigation within your React Calendar component.
100
104
  */
101
105
  navPrevDoubleIcon?: ReactNode;
102
106
  /**
103
- * Reorder year-month navigation, and render year first.
107
+ * Reorders the year and month navigation, rendering the year selector first. This offers a different layout for users, particularly useful if you want to prioritize quick year changes.
104
108
  *
109
+ * @default false
105
110
  * @since 4.3.0
106
111
  */
107
112
  navYearFirst?: boolean;
108
113
  /**
109
- * Allow range selection.
114
+ * Enables range selection mode in your React Calendar component, allowing users to select two dates for a range (start and end). Once enabled, the component will manage state for both dates.
110
115
  */
111
116
  range?: boolean;
112
117
  /**
113
- * Set whether days in adjacent months shown before or after the current month are selectable. This only applies if the `showAdjacementDays` option is set to true.
118
+ * Sets whether days from adjacent months (shown at the start/end of the current view) are selectable. This only applies if `showAdjacementDays` is set to `true`.
114
119
  *
120
+ * @default false
115
121
  * @since 4.11.0
116
122
  */
117
123
  selectAdjacementDays?: boolean;
118
124
  /**
119
- * Set whether to display dates in adjacent months (non-selectable) at the start and end of the current month.
125
+ * Controls whether the calendar should display dates from previous or next months (non-selectable if `selectAdjacementDays` is `false`). This can make the calendar visually continuous.
120
126
  *
127
+ * @default true
121
128
  * @since 4.11.0
122
129
  */
123
130
  showAdjacementDays?: boolean;
124
131
  /**
125
- * Set whether to display week numbers in the calendar.
132
+ * Toggles the display of week numbers (ISO 8601) in the calendar's left column. Particularly beneficial for applications where users need to see the week index for scheduling or reporting.
126
133
  *
134
+ * @default false
127
135
  * @since 5.0.0
128
136
  */
129
137
  showWeekNumber?: boolean;
130
138
  /**
131
- * Toggle select mode between start and end date.
139
+ * Indicates if the user's current selection is targeting the end date in range selection mode. Primarily used for controlled components where you need to manage which date (start or end) is currently active.
132
140
  */
133
141
  selectEndDate?: boolean;
134
142
  /**
135
- * Specify the type of date selection as day, week, month, or year.
143
+ * Specifies the selection type for the React Calendar component. Supports:
144
+ * - `day`: Regular day selection (default)
145
+ * - `week`: Select an entire week
146
+ * - `month`: Select an entire month
147
+ * - `year`: Select an entire year
136
148
  *
149
+ * @default 'day'
137
150
  * @since 5.0.0
138
151
  */
139
- selectionType?: 'day' | 'week' | 'month' | 'year';
152
+ selectionType?: SelectionTypes;
140
153
  /**
141
- * Initial selected date.
154
+ * Defines the initially selected starting date. This date can be a Date object or a string convertible into a valid date. Useful when you want to show a pre-selected date.
142
155
  */
143
156
  startDate?: Date | string | null;
144
157
  /**
145
- * Set length or format of day name.
158
+ * Sets the format or length of the weekday names displayed in the calendar header. You can use numeric values like 2 (two-letter abbreviations) or built-in string formats like `'long'`, `'narrow'`, and `'short'`, or provide a custom function to fully control how weekdays are displayed.
146
159
  *
147
160
  * @default 2
148
161
  */
149
162
  weekdayFormat?: number | 'long' | 'narrow' | 'short' | ((date: Date) => string | number);
150
163
  /**
151
- * Label displayed over week numbers in the calendar.
164
+ * Defines the label that appears above the week numbers column. For example, you might label it `'WK'` or `'Week #'`.
152
165
  *
153
166
  * @since 5.0.0
154
167
  */
155
168
  weekNumbersLabel?: string;
156
169
  /**
157
- * Callback fired when the calendar date changed.
170
+ * Callback fired when the calendar's reference date (i.e., the date indicating which month/year is currently displayed) changes. Receives the new `Date | string` as an argument for further handling.
158
171
  */
159
172
  onCalendarDateChange?: (date: Date | string) => void;
160
173
  /**
161
- * Callback fired when the user hovers over the calendar cell.
174
+ * Callback fired when the user hovers over a calendar cell. The argument is the date of the cell that the user is currently hovering.
162
175
  */
163
176
  onDateHover?: (date: Date | string | null) => void;
164
177
  /**
165
- * Callback fired when the start date changed.
178
+ * Callback triggered when the start date of the selection changes. Useful for updating other parts of your application or performing side effects based on the newly chosen start date.
166
179
  */
167
180
  onStartDateChange?: (date: Date | string | null, formatedDate?: string | undefined) => void;
168
181
  /**
169
- * Callback fired when the end date changed.
182
+ * Callback triggered when the end date of the selection changes. Handy for synchronizing the selected date range with external states or components.
170
183
  */
171
184
  onEndDateChange?: (date: Date | string | null, formatedDate?: string | undefined) => void;
172
185
  /**
173
- * Callback fired when the selection type changed.
186
+ * Callback fired when toggling between selecting the start date and the end date in range selection mode. Receives a boolean indicating if the user is currently selecting the end date.
174
187
  */
175
188
  onSelectEndChange?: (value: boolean) => void;
176
189
  /**
177
- * Callback fired when the view type of calendar changed.
190
+ * Callback fired when the calendar's view changes between days, months, or years. For instance, moving from day view to month view or from month view to year view.
178
191
  */
179
192
  onViewChanged?: (view: string) => void;
180
193
  }