Skip to content

Commit eb79651

Browse files
fix: type updates
1 parent 6fa1e40 commit eb79651

File tree

27 files changed

+397
-149
lines changed

27 files changed

+397
-149
lines changed

packages/@primereact/headless/src/datepicker/useDatePicker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2976,7 +2976,7 @@ export const useDatePicker = withHeadless<useDatePickerProps, typeof defaultProp
29762976
role: 'grid' as const,
29772977
'aria-labelledby': id ? id + '_title' : undefined
29782978
};
2979-
}, [id]);
2979+
}, [id, state.currentView]);
29802980

29812981
const getDayProps = React.useCallback(
29822982
(date: useDatePickerDateMeta, groupIndex: number) => {

packages/@primereact/types/src/primitive/autocomplete/AutoCompleteRoot.types.ts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*
1010
*/
1111
import type { ComponentInstance } from '@primereact/types/core';
12-
import type { BaseComponentProps, PassThroughType } from '../..';
1312
import type {
1413
useAutoCompleteCompleteEvent,
1514
useAutoCompleteExposes,
@@ -19,6 +18,7 @@ import type {
1918
useAutoCompleteState,
2019
useAutoCompleteValueChangeEvent
2120
} from '@primereact/types/headless/autocomplete';
21+
import type { BaseComponentProps, PassThroughType } from '../..';
2222

2323
/**
2424
* Defines passthrough(pt) options type in AutoComplete component.
@@ -45,26 +45,18 @@ export interface AutoCompleteRootPassThrough {
4545
* Used to pass attributes to the value's DOM element (non-editable mode).
4646
*/
4747
value?: AutoCompleteRootPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
48-
/**
49-
* Used to pass attributes to the portal's DOM element.
50-
*/
51-
portal?: AutoCompleteRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
5248
/**
5349
* Used to pass attributes to the positioner's DOM element.
5450
*/
5551
positioner?: AutoCompleteRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
5652
/**
57-
* Used to pass attributes to the panel's DOM element.
58-
*/
59-
panel?: AutoCompleteRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
60-
/**
61-
* Used to pass attributes to the pcListbox's DOM element.
53+
* Used to pass attributes to the popup's DOM element.
6254
*/
63-
pcListbox?: AutoCompleteRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
55+
popup?: AutoCompleteRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
6456
/**
65-
* Used to pass attributes to the options' DOM element.
57+
* Used to pass attributes to the list's DOM element.
6658
*/
67-
options?: AutoCompleteRootPassThroughType<React.HTMLAttributes<HTMLUListElement>>;
59+
list?: AutoCompleteRootPassThroughType<React.HTMLAttributes<HTMLUListElement>>;
6860
/**
6961
* Used to pass attributes to the option's DOM element.
7062
*/

packages/@primereact/types/src/primitive/card/CardRoot.types.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,34 @@ export interface CardRootPassThrough {
2525
* Used to pass attributes to the root's DOM element.
2626
*/
2727
root?: CardRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
28+
/**
29+
* Used to pass attributes to the body's DOM element.
30+
*/
31+
body?: CardRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
32+
/**
33+
* Used to pass attributes to the header's DOM element.
34+
*/
35+
header?: CardRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
36+
/**
37+
* Used to pass attributes to the title's DOM element.
38+
*/
39+
title?: CardRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
40+
/**
41+
* Used to pass attributes to the subtitle's DOM element.
42+
*/
43+
subtitle?: CardRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
44+
/**
45+
* Used to pass attributes to the caption's DOM element.
46+
*/
47+
caption?: CardRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
48+
/**
49+
* Used to pass attributes to the content's DOM element.
50+
*/
51+
content?: CardRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
52+
/**
53+
* Used to pass attributes to the footer's DOM element.
54+
*/
55+
footer?: CardRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
2856
}
2957

3058
/**

packages/@primereact/types/src/primitive/carousel/CarouselRoot.types.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,30 @@ export interface CarouselRootPassThrough {
2525
* Used to pass attributes to the root's DOM element.
2626
*/
2727
root?: CarouselRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
28+
/**
29+
* Used to pass attributes to the content's DOM element.
30+
*/
31+
content?: CarouselRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
32+
/**
33+
* Used to pass attributes to the item's DOM element.
34+
*/
35+
item?: CarouselRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
36+
/**
37+
* Used to pass attributes to the prev button's DOM element.
38+
*/
39+
prev?: CarouselRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
40+
/**
41+
* Used to pass attributes to the next button's DOM element.
42+
*/
43+
next?: CarouselRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
44+
/**
45+
* Used to pass attributes to the indicators' DOM element.
46+
*/
47+
indicators?: CarouselRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
48+
/**
49+
* Used to pass attributes to the indicator's DOM element.
50+
*/
51+
indicator?: CarouselRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
2852
}
2953

3054
/**

packages/@primereact/types/src/primitive/compare/CompareRoot.types.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ export interface CompareRootPassThrough {
2525
* Used to pass attributes to the root's DOM element.
2626
*/
2727
root?: CompareRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
28+
/**
29+
* Used to pass attributes to the item's DOM element.
30+
*/
31+
item?: CompareRootPassThroughType<React.HTMLAttributes<HTMLImageElement>>;
32+
/**
33+
* Used to pass attributes to the handle's DOM element.
34+
*/
35+
handle?: CompareRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
36+
/**
37+
* Used to pass attributes to the indicator's DOM element.
38+
*/
39+
indicator?: CompareRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
2840
}
2941

3042
/**

packages/@primereact/types/src/primitive/confirmdialog/ConfirmDialogRoot.types.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
*
1010
*/
1111
import type { ComponentInstance } from '@primereact/types/core';
12-
import type { BaseComponentProps, PassThroughType } from '../..';
1312
import type { useConfirmDialogChangeEvent, useConfirmDialogExposes, useConfirmDialogProps, useConfirmDialogState } from '@primereact/types/headless/confirmdialog';
13+
import type { BaseComponentProps, PassThroughType } from '../..';
1414

1515
/**
1616
* Defines passthrough(pt) options type in ConfirmDialog component.
@@ -41,10 +41,6 @@ export interface ConfirmDialogRootPassThrough {
4141
* Used to pass attributes to the trigger icon's DOM element.
4242
*/
4343
triggerIcon?: ConfirmDialogRootPassThroughType<React.HTMLAttributes<HTMLElement>>;
44-
/**
45-
* Used to pass attributes to the portal's DOM element.
46-
*/
47-
portal?: ConfirmDialogRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
4844
/**
4945
* Used to pass attributes to the header's DOM element.
5046
*/

packages/@primereact/types/src/primitive/confirmpopup/ConfirmPopupRoot.types.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
*
1010
*/
1111
import type { ComponentInstance } from '@primereact/types/core';
12-
import type { BaseComponentProps, PassThroughType } from '../..';
1312
import type { useConfirmPopupExposes, useConfirmPopupProps, useConfirmPopupState } from '@primereact/types/headless/confirmpopup';
13+
import type { BaseComponentProps, PassThroughType } from '../..';
1414

1515
/**
1616
* Defines passthrough(pt) options type in ConfirmPopup component.
@@ -29,10 +29,6 @@ export interface ConfirmPopupRootPassThrough {
2929
* Used to pass attributes to the trigger's DOM element.
3030
*/
3131
trigger?: ConfirmPopupRootPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
32-
/**
33-
* Used to pass attributes to the portal's DOM element.
34-
*/
35-
portal?: ConfirmPopupRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
3632
/**
3733
* Used to pass attributes to the positioner's DOM element.
3834
*/

packages/@primereact/types/src/primitive/datepicker/DatePickerRoot.types.ts

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,14 @@ export interface DatePickerRootPassThrough {
2929
* Used to pass attributes to the input's DOM element.
3030
*/
3131
pcInputText?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLInputElement>>;
32-
/**
33-
* Used to pass attributes to the portal's DOM element.
34-
*/
35-
portal?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
3632
/**
3733
* Used to pass attributes to the panel's DOM element.
3834
*/
3935
panel?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
4036
/**
41-
* Used to pass attributes to the container's DOM element.
37+
* Used to pass attributes to the calendarContainer's DOM element.
4238
*/
43-
container?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
39+
calendarContainer?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
4440
/**
4541
* Used to pass attributes to the calendar's DOM element.
4642
*/
@@ -205,6 +201,34 @@ export interface DatePickerRootPassThrough {
205201
* Used to pass attributes to the trigger's DOM element.
206202
*/
207203
trigger?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
204+
/**
205+
* Used to pass attributes to the positioner's DOM element.
206+
*/
207+
positioner?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
208+
/**
209+
* Used to pass attributes to the popup's DOM element.
210+
*/
211+
popup?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
212+
/**
213+
* Used to pass attributes to the arrow's DOM element.
214+
*/
215+
arrow?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
216+
/**
217+
* Used to pass attributes to the day's DOM element.
218+
*/
219+
day?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
220+
/**
221+
* Used to pass attributes to the month's DOM element.
222+
*/
223+
month?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
224+
/**
225+
* Used to pass attributes to the year's DOM element.
226+
*/
227+
year?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
228+
/**
229+
* Used to pass attributes to the value's DOM element.
230+
*/
231+
value?: DatePickerRootPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
208232
/**
209233
* Used to pass attributes to the footer's DOM element.
210234
*/

packages/@primereact/types/src/primitive/dialog/DialogRoot.types.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
*
1010
*/
1111
import type { ComponentInstance } from '@primereact/types/core';
12-
import type { BaseComponentProps, PassThroughType } from '../..';
1312
import type { useDialogChangeEvent, useDialogExposes, useDialogProps, useDialogState } from '@primereact/types/headless/dialog';
13+
import type { BaseComponentProps, PassThroughType } from '../..';
1414

1515
/**
1616
* Defines passthrough(pt) options type in Dialog component.
@@ -33,10 +33,6 @@ export interface DialogRootPassThrough {
3333
* Used to pass attributes to the trigger's DOM element.
3434
*/
3535
trigger?: DialogRootPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
36-
/**
37-
* Used to pass attributes to the portal's DOM element.
38-
*/
39-
portal?: DialogRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
4036
/**
4137
* Used to pass attributes to the header's DOM element.
4238
*/

packages/@primereact/types/src/primitive/drawer/DrawerRoot.types.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
*
1010
*/
1111
import type { ComponentInstance } from '@primereact/types/core';
12-
import type { BaseComponentProps, PassThroughType } from '../..';
1312
import type { useDrawerChangeEvent, useDrawerExposes, useDrawerProps, useDrawerState } from '@primereact/types/headless/drawer';
13+
import type { BaseComponentProps, PassThroughType } from '../..';
1414

1515
/**
1616
* Defines passthrough(pt) options type in Drawer component.
@@ -33,10 +33,6 @@ export interface DrawerRootPassThrough {
3333
* Used to pass attributes to the trigger's DOM element.
3434
*/
3535
trigger?: DrawerRootPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
36-
/**
37-
* Used to pass attributes to the portal's DOM element.
38-
*/
39-
portal?: DrawerRootPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
4036
/**
4137
* Used to pass attributes to the header's DOM element.
4238
*/

0 commit comments

Comments
 (0)