@foris/avocado-suite 1.8.16 → 1.8.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avocado-suite.es.js +6590 -6538
- package/dist/avocado-suite.umd.js +21 -21
- package/dist/components/date-picker/DatePicker.d.ts +16 -0
- package/dist/components/pager/Pager.d.ts +2 -64
- package/dist/components/pager/components/PagerCursor.d.ts +4 -0
- package/dist/components/pager/components/PagerOffset.d.ts +4 -0
- package/dist/components/pager/pager.types.d.ts +45 -0
- package/dist/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +6 -6
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
+
import { type DatePickerProps as ReactDatePickerProps } from 'react-datepicker';
|
|
2
3
|
/**
|
|
3
4
|
* Documentation props https://reactdatepicker.com/
|
|
4
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Native react-datepicker props, excluding the ones DatePicker controls
|
|
8
|
+
* internally (`selected`/`onChange`) and the range/multiple modes that this
|
|
9
|
+
* single-date component does not support.
|
|
10
|
+
*/
|
|
11
|
+
type CalendarProps = Omit<ReactDatePickerProps, 'selected' | 'onChange' | 'selectsRange' | 'selectsMultiple'>;
|
|
5
12
|
export interface DatePickerProps {
|
|
6
13
|
/** Overwrite className */
|
|
7
14
|
className?: string;
|
|
@@ -31,6 +38,15 @@ export interface DatePickerProps {
|
|
|
31
38
|
includeDates?: any;
|
|
32
39
|
/** Locale state */
|
|
33
40
|
locale?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Additional props forwarded to the underlying react-datepicker Calendar.
|
|
43
|
+
* Use it as an escape hatch for native props not surfaced by DatePicker.
|
|
44
|
+
*
|
|
45
|
+
* @see https://reactdatepicker.com/
|
|
46
|
+
* @example
|
|
47
|
+
* <DatePicker calendarProps={{ showWeekNumbers: true, inline: true }} />
|
|
48
|
+
*/
|
|
49
|
+
calendarProps?: CalendarProps;
|
|
34
50
|
/** OnChange function callback */
|
|
35
51
|
onChange?: (date: Date | null) => void;
|
|
36
52
|
}
|
|
@@ -1,67 +1,5 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
classname?: {
|
|
5
|
-
global?: string;
|
|
6
|
-
nav?: string;
|
|
7
|
-
arrow?: string;
|
|
8
|
-
button?: string;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Deprecated is not used in the component
|
|
12
|
-
* @deprecated is not used in the component
|
|
13
|
-
*/
|
|
14
|
-
hasNextPage?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Deprecated is not used in the component
|
|
17
|
-
* @deprecated is not used in the component
|
|
18
|
-
*/
|
|
19
|
-
hasPreviousPage?: boolean;
|
|
20
|
-
labelRowsPerPage?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Callback: Action `onClick` on page
|
|
23
|
-
* @param page number of page
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
onChange?: (page: number) => void;
|
|
27
|
-
/**
|
|
28
|
-
* Deprecated use "onChange" prop.
|
|
29
|
-
* @deprecated use "onChange" prop.
|
|
30
|
-
*/
|
|
31
|
-
onPageChange?: (page: number) => void;
|
|
32
|
-
/**
|
|
33
|
-
* Callback: Action `onChange` on rows per page
|
|
34
|
-
* @param size number of rows per page
|
|
35
|
-
* @returns
|
|
36
|
-
*/
|
|
37
|
-
onRowsPerPageChange?: (size: {
|
|
38
|
-
label: string;
|
|
39
|
-
value: number;
|
|
40
|
-
}) => void;
|
|
41
|
-
/**
|
|
42
|
-
* Current page
|
|
43
|
-
*/
|
|
44
|
-
page: number;
|
|
45
|
-
/**
|
|
46
|
-
* Array of options for rows per page
|
|
47
|
-
*/
|
|
48
|
-
pageSizeOptions?: number[];
|
|
49
|
-
/**
|
|
50
|
-
* Show rows per page select
|
|
51
|
-
*/
|
|
52
|
-
showRowsPerPage?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Size per page
|
|
55
|
-
*/
|
|
56
|
-
size: number;
|
|
57
|
-
/**
|
|
58
|
-
* Total number of items
|
|
59
|
-
*/
|
|
60
|
-
total: number;
|
|
61
|
-
/**
|
|
62
|
-
* Total number of pages
|
|
63
|
-
*/
|
|
64
|
-
totalPages?: number;
|
|
65
|
-
};
|
|
2
|
+
import type { PagerProps } from './pager.types';
|
|
3
|
+
export type { PagerProps, PagerOffsetProps, PagerCursorProps, PagerBaseProps, } from './pager.types';
|
|
66
4
|
declare const Pager: FC<PagerProps>;
|
|
67
5
|
export default Pager;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
type PagerClassname = {
|
|
2
|
+
global?: string;
|
|
3
|
+
nav?: string;
|
|
4
|
+
arrow?: string;
|
|
5
|
+
button?: string;
|
|
6
|
+
};
|
|
7
|
+
export type PagerBaseProps = {
|
|
8
|
+
classname?: PagerClassname;
|
|
9
|
+
onChange?: (page: number) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Deprecated use "onChange" prop.
|
|
12
|
+
* @deprecated use "onChange" prop.
|
|
13
|
+
*/
|
|
14
|
+
onPageChange?: (page: number) => void;
|
|
15
|
+
page: number;
|
|
16
|
+
};
|
|
17
|
+
export type PagerOffsetProps = PagerBaseProps & {
|
|
18
|
+
variant?: 'offset';
|
|
19
|
+
/**
|
|
20
|
+
* Deprecated is not used in offset mode
|
|
21
|
+
* @deprecated is not used in offset mode
|
|
22
|
+
*/
|
|
23
|
+
hasNextPage?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Deprecated is not used in offset mode
|
|
26
|
+
* @deprecated is not used in offset mode
|
|
27
|
+
*/
|
|
28
|
+
hasPreviousPage?: boolean;
|
|
29
|
+
labelRowsPerPage?: string;
|
|
30
|
+
onRowsPerPageChange?: (size: {
|
|
31
|
+
label: string;
|
|
32
|
+
value: number;
|
|
33
|
+
}) => void;
|
|
34
|
+
pageSizeOptions?: number[];
|
|
35
|
+
showRowsPerPage?: boolean;
|
|
36
|
+
size: number;
|
|
37
|
+
total: number;
|
|
38
|
+
totalPages?: number;
|
|
39
|
+
};
|
|
40
|
+
export type PagerCursorProps = PagerBaseProps & {
|
|
41
|
+
variant: 'cursor';
|
|
42
|
+
hasNextPage: boolean;
|
|
43
|
+
};
|
|
44
|
+
export type PagerProps = PagerOffsetProps | PagerCursorProps;
|
|
45
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export type { AccountMenuFooterAction, AccountMenuProps, } from './components/ac
|
|
|
85
85
|
export type { DrawerProps } from './components/drawer/Drawer';
|
|
86
86
|
export type { NavListProps } from './components/nav-list';
|
|
87
87
|
export type { NavListItemData, NavListLeaf } from './components/nav-list/types';
|
|
88
|
+
export type { PagerProps } from './components/pager/Pager';
|
|
88
89
|
export type { PillProps } from './components/Pill/Pill';
|
|
89
90
|
export type { PreviewerMarkdownProps } from './components/previewer-markdown/PreviewerMarkdown';
|
|
90
91
|
export type { ThemeMode, Theme } from './types/theme.types';
|