From 35b8a13449ca005193f55b69027df6825271f6c3 Mon Sep 17 00:00:00 2001 From: melloware Date: Sat, 8 Oct 2022 08:00:27 -0400 Subject: [PATCH] Fix #3440: Change style from object to CSSStyleDeclaration --- components/lib/accordion/accordion.d.ts | 6 +++--- components/lib/autocomplete/autocomplete.d.ts | 6 +++--- components/lib/calendar/calendar.d.ts | 6 +++--- components/lib/cascadeselect/cascadeselect.d.ts | 2 +- components/lib/chart/chart.d.ts | 2 +- components/lib/checkbox/checkbox.d.ts | 2 +- components/lib/column/column.d.ts | 12 ++++++------ components/lib/confirmpopup/confirmpopup.d.ts | 2 +- components/lib/datatable/datatable.d.ts | 4 ++-- components/lib/dataview/dataview.d.ts | 2 +- components/lib/dialog/dialog.d.ts | 8 ++++---- components/lib/dropdown/dropdown.d.ts | 4 ++-- components/lib/editor/editor.d.ts | 2 +- components/lib/fileupload/fileupload.d.ts | 8 ++++---- components/lib/inputnumber/inputnumber.d.ts | 2 +- components/lib/inputswitch/inputswitch.d.ts | 2 +- components/lib/knob/knob.d.ts | 2 +- components/lib/listbox/listbox.d.ts | 2 +- components/lib/mention/mention.d.ts | 4 ++-- components/lib/menuitem/menuitem.d.ts | 2 +- components/lib/multiselect/multiselect.d.ts | 4 ++-- .../lib/multistatecheckbox/multistatecheckbox.d.ts | 2 +- components/lib/orderlist/orderlist.d.ts | 2 +- components/lib/password/password.d.ts | 4 ++-- components/lib/picklist/picklist.d.ts | 6 +++--- components/lib/row/row.d.ts | 2 +- components/lib/scrolltop/scrolltop.d.ts | 2 +- components/lib/sidebar/sidebar.d.ts | 2 +- components/lib/speeddial/speeddial.d.ts | 4 ++-- components/lib/splitbutton/splitbutton.d.ts | 2 +- components/lib/splitter/splitter.d.ts | 2 +- components/lib/tabview/tabview.d.ts | 8 ++++---- components/lib/toast/toast.d.ts | 4 ++-- components/lib/tooltip/tooltipoptions.d.ts | 2 +- components/lib/tree/tree.d.ts | 4 ++-- components/lib/treenode/treenode.d.ts | 2 +- components/lib/treeselect/treeselect.d.ts | 2 +- components/lib/treetable/treetable.d.ts | 4 ++-- components/lib/virtualscroller/virtualscroller.d.ts | 2 +- 39 files changed, 70 insertions(+), 70 deletions(-) diff --git a/components/lib/accordion/accordion.d.ts b/components/lib/accordion/accordion.d.ts index 2b7d6bf9f1..1e0cbbe78d 100644 --- a/components/lib/accordion/accordion.d.ts +++ b/components/lib/accordion/accordion.d.ts @@ -8,13 +8,13 @@ interface AccordionTabProps { children?: React.ReactNode; className?: string; contentClassName?: string; - contentStyle?: object; + contentStyle?: CSSStyleDeclaration; disabled?: boolean; header?: React.ReactNode; headerClassName?: string; - headerStyle?: object; + headerStyle?: CSSStyleDeclaration; headerTemplate?: AccordionTabHeaderTemplateType; - style?: object; + style?: CSSStyleDeclaration; tabIndex: number; } diff --git a/components/lib/autocomplete/autocomplete.d.ts b/components/lib/autocomplete/autocomplete.d.ts index 084468edec..28bb852ac2 100755 --- a/components/lib/autocomplete/autocomplete.d.ts +++ b/components/lib/autocomplete/autocomplete.d.ts @@ -64,7 +64,7 @@ export interface AutoCompleteProps extends Omit; - inputStyle?: object; + inputStyle?: CSSStyleDeclaration; itemTemplate?: AutoCompleteItemTemplateType; maxLength?: number; minLength?: number; @@ -74,7 +74,7 @@ export interface AutoCompleteProps extends Omit; @@ -82,7 +82,7 @@ export interface AutoCompleteProps extends Omit; - inputStyle?: object; + inputStyle?: CSSStyleDeclaration; keepInvalid?: boolean; locale?: string; mask?: string; @@ -103,7 +103,7 @@ export interface CalendarProps { name?: string; numberOfMonths?: number; panelClassName?: string; - panelStyle?: object; + panelStyle?: CSSStyleDeclaration; placeholder?: string; readOnlyInput?: boolean; required?: boolean; @@ -123,7 +123,7 @@ export interface CalendarProps { stepMillisec?: number; stepMinute?: number; stepSecond?: number; - style?: object; + style?: CSSStyleDeclaration; tabIndex?: number; timeOnly?: boolean; todayButtonClassName?: string; diff --git a/components/lib/cascadeselect/cascadeselect.d.ts b/components/lib/cascadeselect/cascadeselect.d.ts index 198e56499a..9f050f3d55 100644 --- a/components/lib/cascadeselect/cascadeselect.d.ts +++ b/components/lib/cascadeselect/cascadeselect.d.ts @@ -16,7 +16,7 @@ interface CascadeSelectGroupChangeParams extends CascadeSelectChangeParams {} export interface CascadeSelectProps extends Omit, HTMLDivElement>, 'onChange' | 'ref'> { id?: string; inputRef?: React.Ref; - style?: object; + style?: CSSStyleDeclaration; className?: string; value?: any; name?: string; diff --git a/components/lib/chart/chart.d.ts b/components/lib/chart/chart.d.ts index 7328e08a40..3b4c4b4e7b 100644 --- a/components/lib/chart/chart.d.ts +++ b/components/lib/chart/chart.d.ts @@ -8,7 +8,7 @@ export interface ChartProps { plugins?: any[]; width?: string; height?: string; - style?: object; + style?: CSSStyleDeclaration; className?: string; children?: React.ReactNode; } diff --git a/components/lib/checkbox/checkbox.d.ts b/components/lib/checkbox/checkbox.d.ts index 7761a40bac..98551b6718 100644 --- a/components/lib/checkbox/checkbox.d.ts +++ b/components/lib/checkbox/checkbox.d.ts @@ -28,7 +28,7 @@ export interface CheckboxProps extends Omit): void; diff --git a/components/lib/dropdown/dropdown.d.ts b/components/lib/dropdown/dropdown.d.ts index 42f72c1e37..5b7dfb509f 100755 --- a/components/lib/dropdown/dropdown.d.ts +++ b/components/lib/dropdown/dropdown.d.ts @@ -59,7 +59,7 @@ export interface DropdownProps extends Omit, HTMLDivElement>, 'ref'> { id?: string; value?: string; - style?: object; + style?: CSSStyleDeclaration; className?: string; placeholder?: string; readOnly?: boolean; diff --git a/components/lib/fileupload/fileupload.d.ts b/components/lib/fileupload/fileupload.d.ts index f9a4dec3c5..7abf93e409 100644 --- a/components/lib/fileupload/fileupload.d.ts +++ b/components/lib/fileupload/fileupload.d.ts @@ -8,7 +8,7 @@ interface FileUploadOptionsType { icon?: IconType; iconOnly?: boolean; className?: string; - style?: object; + style?: CSSStyleDeclaration; } interface FileUploadHeaderTemplateOptions { @@ -93,7 +93,7 @@ interface FileUploadProps { maxFileSize?: number; invalidFileSizeMessageSummary?: string; invalidFileSizeMessageDetail?: string; - style?: object; + style?: CSSStyleDeclaration; className?: string; withCredentials?: boolean; previewWidth?: number; @@ -105,9 +105,9 @@ interface FileUploadProps { cancelOptions?: FileUploadOptionsType; customUpload?: boolean; headerClassName?: string; - headerStyle?: object; + headerStyle?: CSSStyleDeclaration; contentClassName?: string; - contentStyle?: object; + contentStyle?: CSSStyleDeclaration; headerTemplate?: FileUploadHeaderTemplateType; itemTemplate?: FileUploadItemTemplateType; emptyTemplate?: FileUploadEmptyTemplateType; diff --git a/components/lib/inputnumber/inputnumber.d.ts b/components/lib/inputnumber/inputnumber.d.ts index 992f612e19..242c55b2e6 100644 --- a/components/lib/inputnumber/inputnumber.d.ts +++ b/components/lib/inputnumber/inputnumber.d.ts @@ -56,7 +56,7 @@ export interface InputNumberProps extends Omit, HTMLDivElement>, 'onChange' | 'ref'> { id?: string; inputRef?: React.Ref; - style?: object; + style?: CSSStyleDeclaration; className?: string; inputId?: string; name?: string; diff --git a/components/lib/knob/knob.d.ts b/components/lib/knob/knob.d.ts index e1448de736..d66fd7b1d0 100644 --- a/components/lib/knob/knob.d.ts +++ b/components/lib/knob/knob.d.ts @@ -6,7 +6,7 @@ interface KnobChangeParams { export interface KnobProps extends Omit, HTMLDivElement>, 'onChange' | 'ref'> { id?: string; - style?: object; + style?: CSSStyleDeclaration; className?: string; value?: number; size?: number; diff --git a/components/lib/listbox/listbox.d.ts b/components/lib/listbox/listbox.d.ts index cd01da36a1..a0d299921f 100755 --- a/components/lib/listbox/listbox.d.ts +++ b/components/lib/listbox/listbox.d.ts @@ -46,7 +46,7 @@ export interface ListBoxProps extends Omit; - inputStyle?: object; + inputStyle?: CSSStyleDeclaration; itemTemplate?: MentionItemTemplateType; panelClassName?: string; - panelStyle?: object; + panelStyle?: CSSStyleDeclaration; scrollHeight?: string; suggestions?: any[]; transitionOptions?: CSSTransitionProps; diff --git a/components/lib/menuitem/menuitem.d.ts b/components/lib/menuitem/menuitem.d.ts index c7b6fa3a90..6ec133f550 100644 --- a/components/lib/menuitem/menuitem.d.ts +++ b/components/lib/menuitem/menuitem.d.ts @@ -27,7 +27,7 @@ export interface MenuItem { visible?: boolean; target?: string; separator?: boolean; - style?: object; + style?: CSSStyleDeclaration; className?: string; command?(e: MenuItemCommandParams): void; template?: MenuItemTemplateType; diff --git a/components/lib/multiselect/multiselect.d.ts b/components/lib/multiselect/multiselect.d.ts index 20101e2ab3..59868d7670 100755 --- a/components/lib/multiselect/multiselect.d.ts +++ b/components/lib/multiselect/multiselect.d.ts @@ -86,10 +86,10 @@ export interface MultiSelectProps extends Omit; - style: object; + style: CSSStyleDeclaration; className: string; [key: string]: any; } diff --git a/components/lib/orderlist/orderlist.d.ts b/components/lib/orderlist/orderlist.d.ts index 88da039e24..e2e6762a2c 100755 --- a/components/lib/orderlist/orderlist.d.ts +++ b/components/lib/orderlist/orderlist.d.ts @@ -15,7 +15,7 @@ interface OrderListFilterOptions { export interface OrderListProps extends Omit, HTMLDivElement>, 'onChange' | 'ref'> { value?: any[]; header?: React.ReactNode; - listStyle?: object; + listStyle?: CSSStyleDeclaration; dragdrop?: boolean; dataKey?: string; filter?: boolean; diff --git a/components/lib/password/password.d.ts b/components/lib/password/password.d.ts index abbd132237..a23d909768 100644 --- a/components/lib/password/password.d.ts +++ b/components/lib/password/password.d.ts @@ -24,7 +24,7 @@ type PasswordAppendToType = 'self' | HTMLElement | undefined | null; export interface PasswordProps extends Omit, HTMLInputElement>, 'onInput' | 'ref'> { inputId?: string; inputRef?: React.Ref; - inputStyle?: object; + inputStyle?: CSSStyleDeclaration; inputClassName?: string; promptLabel?: string; weakLabel?: string; @@ -42,7 +42,7 @@ export interface PasswordProps extends Omit, validatePattern: boolean): void; diff --git a/components/lib/picklist/picklist.d.ts b/components/lib/picklist/picklist.d.ts index 753234009a..ed70cf1f21 100755 --- a/components/lib/picklist/picklist.d.ts +++ b/components/lib/picklist/picklist.d.ts @@ -35,10 +35,10 @@ export interface PickListProps { target?: any[]; sourceHeader?: React.ReactNode; targetHeader?: React.ReactNode; - style?: object; + style?: CSSStyleDeclaration; className?: string; - sourceStyle?: object; - targetStyle?: object; + sourceStyle?: CSSStyleDeclaration; + targetStyle?: CSSStyleDeclaration; sourceSelection?: any; targetSelection?: any; showSourceControls?: boolean; diff --git a/components/lib/row/row.d.ts b/components/lib/row/row.d.ts index 1512efc230..5e1762da5d 100644 --- a/components/lib/row/row.d.ts +++ b/components/lib/row/row.d.ts @@ -1,7 +1,7 @@ import * as React from 'react'; export interface RowProps { - style?: object; + style?: CSSStyleDeclaration; className?: string; children?: React.ReactNode; } diff --git a/components/lib/scrolltop/scrolltop.d.ts b/components/lib/scrolltop/scrolltop.d.ts index e6f00cfc95..9ebae92674 100644 --- a/components/lib/scrolltop/scrolltop.d.ts +++ b/components/lib/scrolltop/scrolltop.d.ts @@ -12,7 +12,7 @@ export interface ScrollTopProps { icon?: IconType; behavior?: ScrollTopScrollBehavior; className?: string; - style?: object; + style?: CSSStyleDeclaration; transitionOptions?: CSSTransitionProps; onShow?(): void; onHide?(): void; diff --git a/components/lib/sidebar/sidebar.d.ts b/components/lib/sidebar/sidebar.d.ts index afb00b8298..f8417b0bc2 100644 --- a/components/lib/sidebar/sidebar.d.ts +++ b/components/lib/sidebar/sidebar.d.ts @@ -8,7 +8,7 @@ type SidebarTemplateType = React.ReactNode | ((props: SidebarProps) => React.Rea type SidebarAppendToType = 'self' | HTMLElement | undefined | null; export interface SidebarProps extends Omit, HTMLDivElement>, 'ref'> { - maskStyle?: object; + maskStyle?: CSSStyleDeclaration; maskClassName?: string; visible?: boolean; position?: SidebarPositionType; diff --git a/components/lib/speeddial/speeddial.d.ts b/components/lib/speeddial/speeddial.d.ts index 5b62d4a43f..314be01f7a 100644 --- a/components/lib/speeddial/speeddial.d.ts +++ b/components/lib/speeddial/speeddial.d.ts @@ -27,10 +27,10 @@ export interface SpeedDialProps extends Omit; hideIcon?: IconType; diff --git a/components/lib/splitbutton/splitbutton.d.ts b/components/lib/splitbutton/splitbutton.d.ts index 17c786806f..0558376fde 100644 --- a/components/lib/splitbutton/splitbutton.d.ts +++ b/components/lib/splitbutton/splitbutton.d.ts @@ -15,7 +15,7 @@ export interface SplitButtonProps extends Omit, HTMLDivElement>, 'ref'> { diff --git a/components/lib/tooltip/tooltipoptions.d.ts b/components/lib/tooltip/tooltipoptions.d.ts index a88d01eabf..30ccf8b99c 100644 --- a/components/lib/tooltip/tooltipoptions.d.ts +++ b/components/lib/tooltip/tooltipoptions.d.ts @@ -13,7 +13,7 @@ interface TooltipEventParams { export default interface TooltipOptions { className?: string; - style?: object; + style?: CSSStyleDeclaration; appendTo?: TooltipAppendToType; position?: TooltipPositionType; my?: string; diff --git a/components/lib/tree/tree.d.ts b/components/lib/tree/tree.d.ts index 44ea5fe81c..831a16e6a8 100644 --- a/components/lib/tree/tree.d.ts +++ b/components/lib/tree/tree.d.ts @@ -116,9 +116,9 @@ export interface TreeProps { selectionKeys?: TreeSelectionKeys; contextMenuSelectionKey?: string; expandedKeys?: TreeExpandedKeysType; - style?: object; + style?: CSSStyleDeclaration; className?: string; - contentStyle?: object; + contentStyle?: CSSStyleDeclaration; contentClassName?: string; metaKeySelection?: boolean; propagateSelectionUp?: boolean; diff --git a/components/lib/treenode/treenode.d.ts b/components/lib/treenode/treenode.d.ts index dcf3f63f5c..5956c87333 100644 --- a/components/lib/treenode/treenode.d.ts +++ b/components/lib/treenode/treenode.d.ts @@ -6,7 +6,7 @@ export default interface TreeNode { data?: any; icon?: IconType; children?: TreeNode[]; - style?: object; + style?: CSSStyleDeclaration; className?: string; droppable?: boolean; draggable?: boolean; diff --git a/components/lib/treeselect/treeselect.d.ts b/components/lib/treeselect/treeselect.d.ts index fc5ac11d44..b946b6f7dd 100644 --- a/components/lib/treeselect/treeselect.d.ts +++ b/components/lib/treeselect/treeselect.d.ts @@ -91,7 +91,7 @@ export interface TreeSelectProps extends Omit