@coreui/react-pro 4.12.0-beta.3 → 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.
Files changed (34) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/dist/components/dropdown/CDropdown.d.ts +1 -1
  4. package/dist/components/multi-select/CMultiSelect.d.ts +2 -2
  5. package/dist/components/popover/CPopover.d.ts +3 -3
  6. package/dist/components/tooltip/CTooltip.d.ts +3 -3
  7. package/dist/hooks/index.d.ts +1 -2
  8. package/dist/index.es.js +72 -120
  9. package/dist/index.es.js.map +1 -1
  10. package/dist/index.js +71 -120
  11. package/dist/index.js.map +1 -1
  12. package/package.json +11 -11
  13. package/src/components/date-range-picker/CDateRangePicker.tsx +40 -20
  14. package/src/components/dropdown/CDropdown.tsx +1 -1
  15. package/src/components/multi-select/CMultiSelect.tsx +8 -17
  16. package/src/components/multi-select/CMultiSelectSelection.tsx +3 -1
  17. package/src/components/picker/CPicker.tsx +11 -2
  18. package/src/components/popover/CPopover.tsx +3 -3
  19. package/src/components/time-picker/CTimePicker.tsx +33 -16
  20. package/src/components/tooltip/CTooltip.tsx +3 -3
  21. package/src/hooks/index.ts +1 -2
  22. package/src/utils/getRTLPlacement.ts +1 -1
  23. package/dist/components/date-range-picker/CDateRangePicker copy.d.ts +0 -114
  24. package/dist/components/multi-select-new/CMultiSelect.d.ts +0 -133
  25. package/dist/components/multi-select-new/CMultiSelectNativeSelect.d.ts +0 -7
  26. package/dist/components/multi-select-new/CMultiSelectNew.d.ts +0 -121
  27. package/dist/components/multi-select-new/CMultiSelectOptions.d.ts +0 -16
  28. package/dist/components/multi-select-new/CMultiSelectSelection.d.ts +0 -11
  29. package/dist/components/multi-select-new/index.d.ts +0 -2
  30. package/dist/components/multi-select-new/types.d.ts +0 -15
  31. package/dist/components/multi-select-new/utils.d.ts +0 -11
  32. package/dist/components/picker/CPicker copy.d.ts +0 -82
  33. package/dist/components/picker copy/CPicker.d.ts +0 -82
  34. package/dist/components/smart-table/CSmartTableCleaner.d.ts +0 -7
@@ -1,121 +0,0 @@
1
- import React, { HTMLAttributes, ReactNode } from 'react';
2
- import { CFormControlWrapperProps } from './../form/CFormControlWrapper';
3
- import type { Option } from './types';
4
- export interface CMultiSelectProps extends Omit<CFormControlWrapperProps, 'floatingClassName' | 'floatingLabel'>, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
5
- /**
6
- * Allow users to create options if they are not in the list of options.
7
- *
8
- * @since 4.11.0-next.0
9
- */
10
- allowCreateOptions?: boolean;
11
- /**
12
- * A string of all className you want applied to the base component.
13
- */
14
- className?: string;
15
- /**
16
- * Enables selection cleaner element.
17
- */
18
- cleaner?: boolean;
19
- /**
20
- * Clear current search on selecting an item.
21
- *
22
- * @since 4.11.0-next.0
23
- */
24
- clearSearchOnSelect?: boolean;
25
- /**
26
- * Toggle the disabled state for the component.
27
- */
28
- disabled?: boolean;
29
- /**
30
- * The id global attribute defines an identifier (ID) that must be unique in the whole document.
31
- *
32
- * The name and id attributes for the native select element are generated based on the `id` property:
33
- * - <select id="\{id\}-multi-select" name="\{id\}-multi-select" />
34
- */
35
- id?: string;
36
- /**
37
- * When set, the options list will have a loading style: loading spinner and reduced opacity.
38
- *
39
- * @since 4.11.0-next.0
40
- */
41
- loading?: boolean;
42
- /**
43
- * It specifies that multiple options can be selected at once.
44
- */
45
- multiple?: boolean;
46
- /**
47
- * Execute a function when a user changes the selected option.
48
- */
49
- onChange?: (selected: Option[]) => void;
50
- /**
51
- * Execute a function when the filter value changed.
52
- *
53
- * @since 4.8.0
54
- */
55
- onFilterChange?: (value: string) => void;
56
- /**
57
- * List of option elements.
58
- */
59
- options: Option[];
60
- /**
61
- * Sets maxHeight of options list.
62
- */
63
- optionsMaxHeight?: number | string;
64
- /**
65
- * Sets option style.
66
- */
67
- optionsStyle?: 'checkbox' | 'text';
68
- /**
69
- * Specifies a short hint that is visible in the search input.
70
- */
71
- placeholder?: string;
72
- /**
73
- * @since XXXX
74
- */
75
- required?: boolean;
76
- /**
77
- * Enables search input element.
78
- */
79
- search?: boolean | 'external';
80
- /**
81
- * Sets the label for no results when filtering.
82
- */
83
- searchNoResultsLabel?: string | ReactNode;
84
- /**
85
- * Enables select all button.
86
- */
87
- selectAll?: boolean;
88
- /**
89
- * Sets the select all button label.
90
- */
91
- selectAllLabel?: string | ReactNode;
92
- /**
93
- * Sets the selection style.
94
- */
95
- selectionType?: 'counter' | 'tags' | 'text';
96
- /**
97
- * Sets the counter selection label.
98
- */
99
- selectionTypeCounterText?: string;
100
- /**
101
- * Size the component small or large.
102
- */
103
- size?: 'sm' | 'lg';
104
- /**
105
- * Enable virtual scroller for the options list.
106
- *
107
- * @since 4.8.0
108
- */
109
- virtualScroller?: boolean;
110
- /**
111
- * Toggle the visibility of multi select dropdown.
112
- */
113
- visible?: boolean;
114
- /**
115
- * Amount of visible items when virtualScroller is set to `true`.
116
- *
117
- * @since 4.8.0
118
- */
119
- visibleItems?: number;
120
- }
121
- export declare const CMultiSelectNew: React.ForwardRefExoticComponent<CMultiSelectProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,16 +0,0 @@
1
- import React, { HTMLAttributes, ReactNode } from 'react';
2
- import type { Option } from './types';
3
- export interface CMultiSelectOptionsProps extends HTMLAttributes<HTMLDivElement> {
4
- handleOptionOnClick?: (option: Option) => void;
5
- loading?: boolean;
6
- options: Option[];
7
- optionsMaxHeight?: number | string;
8
- optionsStyle?: 'checkbox' | 'text';
9
- optionsTemplate?: (option: Option) => ReactNode;
10
- optionsGroupsTemplate?: (option: Option) => ReactNode;
11
- searchNoResultsLabel?: string | ReactNode;
12
- selected: Option[];
13
- virtualScroller?: boolean;
14
- visibleItems?: number;
15
- }
16
- export declare const CMultiSelectOptions: React.ForwardRefExoticComponent<CMultiSelectOptionsProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,11 +0,0 @@
1
- import React, { HTMLAttributes } from 'react';
2
- import type { SelectedOption } from './types';
3
- export interface CMultiSelectSelectionProps extends HTMLAttributes<HTMLSpanElement> {
4
- multiple?: boolean;
5
- onRemove?: (option: SelectedOption) => void;
6
- search?: boolean | 'external';
7
- selected?: SelectedOption[];
8
- selectionType?: 'counter' | 'tags' | 'text';
9
- selectionTypeCounterText?: string;
10
- }
11
- export declare const CMultiSelectSelection: React.ForwardRefExoticComponent<CMultiSelectSelectionProps & React.RefAttributes<HTMLSpanElement>>;
@@ -1,2 +0,0 @@
1
- import { CMultiSelectNew } from './CMultiSelect';
2
- export { CMultiSelectNew };
@@ -1,15 +0,0 @@
1
- export type Option = {
2
- custom?: boolean;
3
- disabled?: boolean;
4
- label?: string;
5
- options?: Option[];
6
- selected?: boolean;
7
- text: string;
8
- value: number | string;
9
- [key: string]: number | string | any;
10
- };
11
- export type SelectedOption = {
12
- disabled?: boolean;
13
- text: string;
14
- value: number | string;
15
- };
@@ -1,11 +0,0 @@
1
- import type { Option, SelectedOption } from './types';
2
- export declare const createOption: (text: string, options: Option[]) => {
3
- value: string;
4
- text: string;
5
- custom: boolean;
6
- }[];
7
- export declare const filterOptionsList: (search: string, _options: Option[]) => Option[];
8
- export declare const flattenArray: (options: Option[]) => Option[];
9
- export declare const getNextSibling: (elem: HTMLElement, selector?: string) => Element | null | undefined;
10
- export declare const getPreviousSibling: (elem: HTMLElement, selector?: string) => Element | null | undefined;
11
- export declare const selectOptions: (options: Option[], selected: SelectedOption[], deselected?: Option[]) => SelectedOption[];
@@ -1,82 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { CDropdownProps } from '../dropdown/CDropdown';
3
- import { Colors } from '../../types';
4
- export interface CPickerProps extends Omit<CDropdownProps, 'variant'> {
5
- /**
6
- * Toggle visibility or set the content of cancel button.
7
- *
8
- * @default 'Cancel'
9
- */
10
- cancelButton?: boolean | ReactNode;
11
- /**
12
- * Sets the color context of the cancel button to one of CoreUI’s themed colors.
13
- *
14
- * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
15
- * @default 'primary'
16
- */
17
- cancelButtonColor?: Colors;
18
- /**
19
- * Size the cancel button small or large.
20
- *
21
- * @default 'sm'
22
- */
23
- cancelButtonSize?: 'sm' | 'lg';
24
- /**
25
- * Set the cancel button variant to an outlined button or a ghost button.
26
- *
27
- * @default 'ghost'
28
- */
29
- cancelButtonVariant?: 'outline' | 'ghost';
30
- /**
31
- * Toggle visibility or set the content of confirm button.
32
- *
33
- * @default 'OK'
34
- */
35
- confirmButton?: boolean | ReactNode;
36
- /**
37
- * Sets the color context of the confirm button to one of CoreUI’s themed colors.
38
- *
39
- * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
40
- * @default 'primary'
41
- */
42
- confirmButtonColor?: Colors;
43
- /**
44
- * Size the confirm button small or large.
45
- *
46
- * @default 'sm'
47
- */
48
- confirmButtonSize?: 'sm' | 'lg';
49
- /**
50
- * Set the confirm button variant to an outlined button or a ghost button.
51
- */
52
- confirmButtonVariant?: 'outline' | 'ghost';
53
- /**
54
- * Set container type for the component.
55
- */
56
- container?: 'dropdown' | 'inline';
57
- /**
58
- * Toggle the disabled state for the component.
59
- */
60
- disabled?: boolean;
61
- /**
62
- * Toggle visibility of footer element or set the content of footer.
63
- */
64
- footer?: boolean | ReactNode;
65
- /**
66
- * Add custom elements to the footer.
67
- */
68
- footerContent?: ReactNode;
69
- /**
70
- * Callback fired when the cancel button has been clicked.
71
- */
72
- onCancel?: () => void;
73
- /**
74
- * Callback fired when the confirm button has been clicked.
75
- */
76
- onConfirm?: () => void;
77
- /**
78
- * The content of toggler.
79
- */
80
- toggler?: ReactNode;
81
- }
82
- export declare const CPicker: React.ForwardRefExoticComponent<CPickerProps & React.RefAttributes<HTMLDivElement | HTMLLIElement>>;
@@ -1,82 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { CDropdownProps } from '../dropdown/CDropdown';
3
- import { Colors } from '../../types';
4
- export interface CPickerProps extends Omit<CDropdownProps, 'variant'> {
5
- /**
6
- * Toggle visibility or set the content of cancel button.
7
- *
8
- * @default 'Cancel'
9
- */
10
- cancelButton?: boolean | ReactNode;
11
- /**
12
- * Sets the color context of the cancel button to one of CoreUI’s themed colors.
13
- *
14
- * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
15
- * @default 'primary'
16
- */
17
- cancelButtonColor?: Colors;
18
- /**
19
- * Size the cancel button small or large.
20
- *
21
- * @default 'sm'
22
- */
23
- cancelButtonSize?: 'sm' | 'lg';
24
- /**
25
- * Set the cancel button variant to an outlined button or a ghost button.
26
- *
27
- * @default 'ghost'
28
- */
29
- cancelButtonVariant?: 'outline' | 'ghost';
30
- /**
31
- * Toggle visibility or set the content of confirm button.
32
- *
33
- * @default 'OK'
34
- */
35
- confirmButton?: boolean | ReactNode;
36
- /**
37
- * Sets the color context of the confirm button to one of CoreUI’s themed colors.
38
- *
39
- * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
40
- * @default 'primary'
41
- */
42
- confirmButtonColor?: Colors;
43
- /**
44
- * Size the confirm button small or large.
45
- *
46
- * @default 'sm'
47
- */
48
- confirmButtonSize?: 'sm' | 'lg';
49
- /**
50
- * Set the confirm button variant to an outlined button or a ghost button.
51
- */
52
- confirmButtonVariant?: 'outline' | 'ghost';
53
- /**
54
- * Set container type for the component.
55
- */
56
- container?: 'dropdown' | 'inline';
57
- /**
58
- * Toggle the disabled state for the component.
59
- */
60
- disabled?: boolean;
61
- /**
62
- * Toggle visibility of footer element or set the content of footer.
63
- */
64
- footer?: boolean | ReactNode;
65
- /**
66
- * Add custom elements to the footer.
67
- */
68
- footerContent?: ReactNode;
69
- /**
70
- * Callback fired when the cancel button has been clicked.
71
- */
72
- onCancel?: () => void;
73
- /**
74
- * Callback fired when the confirm button has been clicked.
75
- */
76
- onConfirm?: () => void;
77
- /**
78
- * The content of toggler.
79
- */
80
- toggler?: ReactNode;
81
- }
82
- export declare const CPicker: React.ForwardRefExoticComponent<CPickerProps & React.RefAttributes<HTMLDivElement | HTMLLIElement>>;
@@ -1,7 +0,0 @@
1
- import React, { HTMLAttributes, ReactNode } from 'react';
2
- interface CSmartTableCleanerProps extends HTMLAttributes<HTMLButtonElement> {
3
- content?: string | ReactNode;
4
- isFiltered?: string;
5
- }
6
- export declare const CSmartTableCleaner: React.ForwardRefExoticComponent<CSmartTableCleanerProps & React.RefAttributes<HTMLButtonElement>>;
7
- export {};