@coreui/react-pro 4.12.0-alpha.0 → 4.12.0-beta.1

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 (41) hide show
  1. package/README.md +1 -1
  2. package/dist/components/accordion/index.d.ts +1 -1
  3. package/dist/components/calendar/CCalendar.d.ts +4 -4
  4. package/dist/components/date-range-picker/CDateRangePicker.d.ts +1 -1
  5. package/dist/components/multi-select/CMultiSelect.d.ts +2 -2
  6. package/dist/hooks/index.d.ts +2 -1
  7. package/dist/hooks/useColorModes.d.ts +7 -0
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.es.js +134 -274
  10. package/dist/index.es.js.map +1 -1
  11. package/dist/index.js +136 -273
  12. package/dist/index.js.map +1 -1
  13. package/dist/props.d.ts +1 -1
  14. package/package.json +12 -12
  15. package/src/components/accordion/index.ts +1 -7
  16. package/src/components/calendar/CCalendar.tsx +49 -64
  17. package/src/components/calendar/utils.ts +1 -1
  18. package/src/components/date-range-picker/CDateRangePicker.tsx +10 -10
  19. package/src/components/date-range-picker/utils.ts +2 -2
  20. package/src/components/form/CFormSelect.tsx +3 -1
  21. package/src/components/modal/CModal.tsx +2 -0
  22. package/src/components/multi-select/CMultiSelect.tsx +2 -2
  23. package/src/components/popover/CPopover.tsx +0 -1
  24. package/src/components/popover/__tests__/__snapshots__/CPopover.spec.tsx.snap +2 -1
  25. package/src/components/progress/CProgress.tsx +1 -0
  26. package/src/components/sidebar/CSidebar.tsx +2 -2
  27. package/src/components/smart-table/CSmartTable.tsx +22 -10
  28. package/src/components/smart-table/CSmartTableBody.tsx +3 -5
  29. package/src/components/smart-table/CSmartTableHead.tsx +5 -6
  30. package/src/components/spinner/CSpinner.tsx +4 -2
  31. package/src/components/spinner/__tests__/__snapshots__/CSpinner.spec.tsx.snap +2 -2
  32. package/src/components/table/CTable.tsx +2 -1
  33. package/src/components/tooltip/CTooltip.tsx +0 -1
  34. package/src/components/tooltip/__tests__/CTooltip.spec.tsx +1 -1
  35. package/src/hooks/index.ts +2 -1
  36. package/src/hooks/useColorModes.ts +57 -0
  37. package/src/hooks/useForkedRef.ts +1 -1
  38. package/src/index.ts +1 -0
  39. package/src/props.ts +4 -1
  40. package/src/utils/isRTL.ts +1 -1
  41. package/src/components/smart-table/CSmartTableCleaner.tsx +0 -37
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-alpha.0.zip)
45
+ - [Download the latest release](https://github.com/coreui/coreui-react-pro/archive/v4.12.0-beta.1.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`
@@ -3,4 +3,4 @@ import { CAccordionBody } from './CAccordionBody';
3
3
  import { CAccordionButton } from './CAccordionButton';
4
4
  import { CAccordionHeader } from './CAccordionHeader';
5
5
  import { CAccordionItem } from './CAccordionItem';
6
- export { CAccordion, CAccordionBody, CAccordionButton, CAccordionHeader, CAccordionItem, };
6
+ export { CAccordion, CAccordionBody, CAccordionButton, CAccordionHeader, CAccordionItem };
@@ -110,14 +110,14 @@ export interface CCalendarProps {
110
110
  * @default 2
111
111
  */
112
112
  weekdayFormat?: number | 'long' | 'narrow' | 'short' | ((date: Date) => string | number);
113
- /**
114
- * Callback fired when the user hovers over the calendar cell.
115
- */
116
- onCalendarCellHover?: (date: Date | null) => void;
117
113
  /**
118
114
  * Callback fired when the calendar date changed.
119
115
  */
120
116
  onCalendarDateChange?: (date: Date) => void;
117
+ /**
118
+ * Callback fired when the user hovers over the calendar cell.
119
+ */
120
+ onDayHover?: (date: Date | null) => void;
121
121
  /**
122
122
  * Callback fired when the start date changed.
123
123
  */
@@ -3,7 +3,7 @@ import { CCalendarProps } from '../calendar/CCalendar';
3
3
  import { CFormControlWrapperProps } from '../form/CFormControlWrapper';
4
4
  import { CPickerProps } from '../picker/CPicker';
5
5
  import { Colors } from '../../types';
6
- export interface CDateRangePickerProps extends Omit<CFormControlWrapperProps, 'floatingLabel'>, Omit<CPickerProps, 'placeholder'>, Omit<CCalendarProps, 'onCalendarCellHover' | 'onCalendarDateChange'> {
6
+ export interface CDateRangePickerProps extends Omit<CFormControlWrapperProps, 'floatingLabel'>, Omit<CPickerProps, 'placeholder'>, Omit<CCalendarProps, 'onDayHover' | 'onCalendarDateChange'> {
7
7
  /**
8
8
  * The number of calendars that render on desktop devices.
9
9
  */
@@ -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-alpha.0
79
+ * @since 4.12.0-beta.1
80
80
  */
81
81
  optionsTemplate?: (option: Option) => ReactNode;
82
82
  /**
83
83
  * Custom template for options groups.
84
84
  *
85
- * @since 4.12.0-alpha.0
85
+ * @since 4.12.0-beta.1
86
86
  */
87
87
  optionsGroupsTemplate?: (option: OptionsGroup) => ReactNode;
88
88
  /**
@@ -1,3 +1,4 @@
1
+ import { useColorModes } from './useColorModes';
1
2
  import { useForkedRef } from './useForkedRef';
2
3
  import { useStateWithCallback } from './useStateWithCallback';
3
- export { useForkedRef, useStateWithCallback };
4
+ export { useColorModes, useForkedRef, useStateWithCallback };
@@ -0,0 +1,7 @@
1
+ interface UseColorModesOutput {
2
+ getColorMode: () => string;
3
+ isColorModeSet: () => boolean;
4
+ setColorMode: (mode: string) => void;
5
+ }
6
+ export declare const useColorModes: (localStorageItemName?: string) => UseColorModesOutput;
7
+ export {};
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './components/';
2
+ export * from './hooks/';