diff --git a/packages/livechat/src/components/uiKit/message/StaticSelectElement/index.tsx b/packages/livechat/src/components/uiKit/message/StaticSelectElement/index.tsx index f85c612d3d9aa..340a1884946bb 100644 --- a/packages/livechat/src/components/uiKit/message/StaticSelectElement/index.tsx +++ b/packages/livechat/src/components/uiKit/message/StaticSelectElement/index.tsx @@ -8,7 +8,7 @@ import { createClassName } from '../../../../helpers/createClassName'; import { SelectInput } from '../../../Form/SelectInput'; import { usePerformAction } from '../Block'; -type StaticSelectElementProps = uikit.StaticSelectElement & { +export type StaticSelectElementProps = uikit.StaticSelectElement & { parser: uikit.SurfaceRenderer; }; diff --git a/packages/livechat/src/providers/SDKProvider.tsx b/packages/livechat/src/providers/SDKProvider.tsx index 8b2c475e3b9f5..bff10e7985632 100644 --- a/packages/livechat/src/providers/SDKProvider.tsx +++ b/packages/livechat/src/providers/SDKProvider.tsx @@ -18,7 +18,9 @@ export const useSDK = () => { return context.sdk; }; -const SDKProvider = ({ children }: { serverURL: string; children: ComponentChildren }) => { +export type SDKProviderProps = { serverURL: string; children: ComponentChildren }; + +const SDKProvider = ({ children }: SDKProviderProps) => { const sdk = useMemo(() => Livechat, []); return {children}; diff --git a/packages/livechat/src/providers/ServerProvider.tsx b/packages/livechat/src/providers/ServerProvider.tsx index 6f3eedd97369f..3be4da63c18e5 100644 --- a/packages/livechat/src/providers/ServerProvider.tsx +++ b/packages/livechat/src/providers/ServerProvider.tsx @@ -20,7 +20,9 @@ import { host } from '../components/App'; import { useStore } from '../store'; import { useSDK } from './SDKProvider'; -const ServerProvider = ({ children }: { children: ComponentChildren }) => { +export type ServerProviderProps = { children: ComponentChildren }; + +const ServerProvider = ({ children }: ServerProviderProps) => { const sdk = useSDK(); const { token } = useStore(); diff --git a/packages/livechat/src/routes/Chat/connector.tsx b/packages/livechat/src/routes/Chat/connector.tsx index f2f2459a8c6cc..935f8a17e5dc1 100644 --- a/packages/livechat/src/routes/Chat/connector.tsx +++ b/packages/livechat/src/routes/Chat/connector.tsx @@ -9,7 +9,7 @@ import { canRenderMessage } from '../../helpers/canRenderMessage'; import { formatAgent } from '../../helpers/formatAgent'; import { StoreContext } from '../../store'; -type ChatConnectorProps = { +export type ChatConnectorProps = { path: string; default: boolean; t: TFunction; diff --git a/packages/livechat/src/routes/ChatFinished/component.tsx b/packages/livechat/src/routes/ChatFinished/component.tsx index dca3584c1c55b..b665c60da117f 100644 --- a/packages/livechat/src/routes/ChatFinished/component.tsx +++ b/packages/livechat/src/routes/ChatFinished/component.tsx @@ -7,7 +7,7 @@ import { Screen, ScreenContent, ScreenFooter } from '../../components/Screen'; import { createClassName } from '../../helpers/createClassName'; import Triggers from '../../lib/triggers'; -type ChatFinishedProps = { +export type ChatFinishedProps = { title: string; greeting?: string; message?: string; diff --git a/packages/livechat/src/routes/ChatFinished/container.tsx b/packages/livechat/src/routes/ChatFinished/container.tsx index cc7f8e7e6fce5..b174cc07ea610 100644 --- a/packages/livechat/src/routes/ChatFinished/container.tsx +++ b/packages/livechat/src/routes/ChatFinished/container.tsx @@ -6,7 +6,7 @@ import { withTranslation } from 'react-i18next'; import ChatFinished from './component'; import { StoreContext } from '../../store'; -type ChatFinishedContainerProps = { +export type ChatFinishedContainerProps = { ref?: any; t: TFunction; path: string; diff --git a/packages/livechat/src/routes/GDPRAgreement/container.tsx b/packages/livechat/src/routes/GDPRAgreement/container.tsx index c2e5f178377ca..b3f25e76356cf 100644 --- a/packages/livechat/src/routes/GDPRAgreement/container.tsx +++ b/packages/livechat/src/routes/GDPRAgreement/container.tsx @@ -7,7 +7,7 @@ import { withTranslation } from 'react-i18next'; import GDPRAgreement from './component'; import { StoreContext } from '../../store'; -type GDPRContainerProps = { +export type GDPRContainerProps = { t: TFunction; ref?: Ref; }; diff --git a/packages/livechat/src/routes/LeaveMessage/index.tsx b/packages/livechat/src/routes/LeaveMessage/index.tsx index 2826da7540180..bdd6e4350781a 100644 --- a/packages/livechat/src/routes/LeaveMessage/index.tsx +++ b/packages/livechat/src/routes/LeaveMessage/index.tsx @@ -21,7 +21,7 @@ import { parentCall } from '../../lib/parentCall'; import { createToken } from '../../lib/random'; import { StoreContext } from '../../store'; -type LeaveMessageProps = { +export type LeaveMessageProps = { path: string; }; diff --git a/packages/livechat/src/routes/Register/index.tsx b/packages/livechat/src/routes/Register/index.tsx index b638ca368808e..f60b88889204f 100644 --- a/packages/livechat/src/routes/Register/index.tsx +++ b/packages/livechat/src/routes/Register/index.tsx @@ -25,7 +25,7 @@ type FormPayloadCustomField = { [key: string]: string }; export type RegisterFormValues = { name: string; email: string; department?: string; [key: string]: any }; -type RegisterProps = { +export type RegisterProps = { path: string; }; diff --git a/packages/livechat/src/routes/SwitchDepartment/index.tsx b/packages/livechat/src/routes/SwitchDepartment/index.tsx index 6d7701e6852cc..baa9bd3bfa1ef 100644 --- a/packages/livechat/src/routes/SwitchDepartment/index.tsx +++ b/packages/livechat/src/routes/SwitchDepartment/index.tsx @@ -18,7 +18,7 @@ import { StoreContext } from '../../store'; type SwitchDepartmentFormData = { department: string }; -type SwitchDepartmentProps = { +export type SwitchDepartmentProps = { path: string; }; diff --git a/packages/livechat/src/routes/TriggerMessage/container.tsx b/packages/livechat/src/routes/TriggerMessage/container.tsx index 7c9f0f8d4bd47..f0ad73a2b3994 100644 --- a/packages/livechat/src/routes/TriggerMessage/container.tsx +++ b/packages/livechat/src/routes/TriggerMessage/container.tsx @@ -9,7 +9,7 @@ import { formatAgent } from '../../helpers/formatAgent'; import { parentCall } from '../../lib/parentCall'; import { StoreContext } from '../../store'; -type TriggerMessageContainerProps = { +export type TriggerMessageContainerProps = { path: string; ref?: Ref; }; diff --git a/packages/mock-providers/src/MockedDeviceContext.tsx b/packages/mock-providers/src/MockedDeviceContext.tsx index adfb7bac50b83..a2afc8dd0d8cc 100644 --- a/packages/mock-providers/src/MockedDeviceContext.tsx +++ b/packages/mock-providers/src/MockedDeviceContext.tsx @@ -22,7 +22,7 @@ const mockDeviceContextValue: DeviceContextValue = { setAudioInputDevice: () => undefined, }; -type MockedDeviceContextProps = Partial & { +export type MockedDeviceContextProps = Partial & { children: ReactNode; }; diff --git a/packages/mock-providers/src/MockedModalContext.tsx b/packages/mock-providers/src/MockedModalContext.tsx index 734d0200b54ae..6ac8174327b6a 100644 --- a/packages/mock-providers/src/MockedModalContext.tsx +++ b/packages/mock-providers/src/MockedModalContext.tsx @@ -2,7 +2,9 @@ import { ModalContext } from '@rocket.chat/ui-contexts'; import type { ReactNode } from 'react'; import { useState } from 'react'; -export const MockedModalContext = ({ children }: { children: ReactNode }) => { +export type MockedModalContextProps = { children: ReactNode }; + +export const MockedModalContext = ({ children }: MockedModalContextProps) => { const [currentModal, setCurrentModal] = useState(null); return ( diff --git a/packages/mock-providers/src/MockedRouterContext.tsx b/packages/mock-providers/src/MockedRouterContext.tsx index 9cf81edea3251..6f81ab1f5eb7f 100644 --- a/packages/mock-providers/src/MockedRouterContext.tsx +++ b/packages/mock-providers/src/MockedRouterContext.tsx @@ -1,7 +1,9 @@ import { RouterContext } from '@rocket.chat/ui-contexts'; import type { ContextType, ReactNode } from 'react'; -export const MockedRouterContext = ({ children, router }: { children: ReactNode; router?: Partial> }) => { +export type MockedRouterContextProps = { children: ReactNode; router?: Partial> }; + +export const MockedRouterContext = ({ children, router }: MockedRouterContextProps) => { return ( }) => { +export type MockedSettingsContextProps = { children: ReactNode; settings?: Record }; + +export const MockedSettingsContext = ({ settings, children }: MockedSettingsContextProps) => { return {children}; }; diff --git a/packages/mock-providers/src/MockedUserContext.tsx b/packages/mock-providers/src/MockedUserContext.tsx index d8cd9d02eb8d3..75a58e2be3a26 100644 --- a/packages/mock-providers/src/MockedUserContext.tsx +++ b/packages/mock-providers/src/MockedUserContext.tsx @@ -32,6 +32,8 @@ const createUserContextValue = ({ userPreferences }: { userPreferences?: Record< }; }; -export const MockedUserContext = ({ userPreferences, children }: { children: ReactNode; userPreferences?: Record }) => { +export type MockedUserContextProps = { children: ReactNode; userPreferences?: Record }; + +export const MockedUserContext = ({ userPreferences, children }: MockedUserContextProps) => { return {children}; }; diff --git a/packages/ui-avatar/src/components/AppAvatar.tsx b/packages/ui-avatar/src/components/AppAvatar.tsx index 82a3e125a8c3c..4a22a82bbd412 100644 --- a/packages/ui-avatar/src/components/AppAvatar.tsx +++ b/packages/ui-avatar/src/components/AppAvatar.tsx @@ -1,7 +1,7 @@ import type { BaseAvatarProps } from './BaseAvatar'; import BaseAvatar from './BaseAvatar'; -type AppAvatarProps = Pick & { +export type AppAvatarProps = Pick & { iconFileContent: string; iconFileData: string; }; diff --git a/packages/ui-avatar/src/components/MessageAvatar.tsx b/packages/ui-avatar/src/components/MessageAvatar.tsx index bf71d50f17636..c053e2931412e 100644 --- a/packages/ui-avatar/src/components/MessageAvatar.tsx +++ b/packages/ui-avatar/src/components/MessageAvatar.tsx @@ -3,7 +3,7 @@ import type { ComponentProps, HTMLAttributes, ReactNode } from 'react'; import UserAvatar from './UserAvatar'; -type MessageAvatarProps = { +export type MessageAvatarProps = { emoji?: ReactNode; avatarUrl?: string; username: string; diff --git a/packages/ui-avatar/src/components/RoomAvatar.tsx b/packages/ui-avatar/src/components/RoomAvatar.tsx index 6c981daac2801..d813008539a1f 100644 --- a/packages/ui-avatar/src/components/RoomAvatar.tsx +++ b/packages/ui-avatar/src/components/RoomAvatar.tsx @@ -4,7 +4,7 @@ import { memo } from 'react'; import type { BaseAvatarProps } from './BaseAvatar'; import Avatar from './BaseAvatar'; -type RoomAvatarProps = Pick & { +export type RoomAvatarProps = Pick & { url?: string; room: { _id: string; diff --git a/packages/ui-avatar/src/components/UserAvatar.tsx b/packages/ui-avatar/src/components/UserAvatar.tsx index 961592d094955..31921ab72b6f5 100644 --- a/packages/ui-avatar/src/components/UserAvatar.tsx +++ b/packages/ui-avatar/src/components/UserAvatar.tsx @@ -14,7 +14,7 @@ type UserIdProp = { userId: string; username?: never; }; -type UserAvatarProps = Omit & { +export type UserAvatarProps = Omit & { etag?: string | null; url?: string; title?: string; diff --git a/packages/ui-client/src/components/AnnouncementBanner/AnnouncementBanner.tsx b/packages/ui-client/src/components/AnnouncementBanner/AnnouncementBanner.tsx index fcdd254f75853..45cd71d660c06 100644 --- a/packages/ui-client/src/components/AnnouncementBanner/AnnouncementBanner.tsx +++ b/packages/ui-client/src/components/AnnouncementBanner/AnnouncementBanner.tsx @@ -2,7 +2,7 @@ import { css } from '@rocket.chat/css-in-js'; import { Box, Palette } from '@rocket.chat/fuselage'; import type { AllHTMLAttributes, ReactNode, MouseEvent } from 'react'; -type AnnouncementBannerProps = { +export type AnnouncementBannerProps = { children: ReactNode; onClick?: (e: MouseEvent) => void; } & Omit, 'is'>; diff --git a/packages/ui-client/src/components/Contextualbar/ContextualbarBack.tsx b/packages/ui-client/src/components/Contextualbar/ContextualbarBack.tsx index 16aface5fd83e..13df5dd23d14f 100644 --- a/packages/ui-client/src/components/Contextualbar/ContextualbarBack.tsx +++ b/packages/ui-client/src/components/Contextualbar/ContextualbarBack.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import ContextualbarAction from './ContextualbarAction'; -type ContextualbarBackProps = Partial>; +export type ContextualbarBackProps = Partial>; const ContextualbarBack = (props: ContextualbarBackProps) => { const { t } = useTranslation(); diff --git a/packages/ui-client/src/components/Contextualbar/ContextualbarClose.tsx b/packages/ui-client/src/components/Contextualbar/ContextualbarClose.tsx index d06e901424bda..d671eb6042c8b 100644 --- a/packages/ui-client/src/components/Contextualbar/ContextualbarClose.tsx +++ b/packages/ui-client/src/components/Contextualbar/ContextualbarClose.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import ContextualbarAction from './ContextualbarAction'; -type ContextualbarCloseProps = Partial>; +export type ContextualbarCloseProps = Partial>; const ContextualbarClose = (props: ContextualbarCloseProps) => { const { t } = useTranslation(); diff --git a/packages/ui-client/src/components/Contextualbar/ContextualbarDialog.tsx b/packages/ui-client/src/components/Contextualbar/ContextualbarDialog.tsx index 36909e788be3e..503ef10e75218 100644 --- a/packages/ui-client/src/components/Contextualbar/ContextualbarDialog.tsx +++ b/packages/ui-client/src/components/Contextualbar/ContextualbarDialog.tsx @@ -8,7 +8,7 @@ import { useCallback, useRef } from 'react'; import Contextualbar from './Contextualbar'; import ContextualbarResizable from './ContextualbarResizable'; -type ContextualbarDialogProps = AriaDialogProps & ComponentProps & { onClose?: () => void }; +export type ContextualbarDialogProps = AriaDialogProps & ComponentProps & { onClose?: () => void }; /** * @prop onClose can be used to close contextualbar outside the room context with ESC key diff --git a/packages/ui-client/src/components/Contextualbar/ContextualbarResizable.tsx b/packages/ui-client/src/components/Contextualbar/ContextualbarResizable.tsx index 1680d1faff866..ec741494d3af5 100644 --- a/packages/ui-client/src/components/Contextualbar/ContextualbarResizable.tsx +++ b/packages/ui-client/src/components/Contextualbar/ContextualbarResizable.tsx @@ -4,7 +4,7 @@ import { useLocalStorage } from '@rocket.chat/fuselage-hooks'; import { Resizable } from 're-resizable'; import type { ComponentProps } from 'react'; -type ContextualbarResizableProps = { defaultWidth: string } & ComponentProps; +export type ContextualbarResizableProps = { defaultWidth: string } & ComponentProps; const ContextualbarResizable = ({ defaultWidth, children, ...props }: ContextualbarResizableProps) => { const [contextualbarWidth, setContextualbarWidth] = useLocalStorage('contextualbarWidth', defaultWidth); diff --git a/packages/ui-client/src/components/CustomScrollbars/CustomScrollbars.tsx b/packages/ui-client/src/components/CustomScrollbars/CustomScrollbars.tsx index 36eaec254ed36..4073158099135 100644 --- a/packages/ui-client/src/components/CustomScrollbars/CustomScrollbars.tsx +++ b/packages/ui-client/src/components/CustomScrollbars/CustomScrollbars.tsx @@ -5,7 +5,7 @@ import { useEffect, useRef, forwardRef, memo } from 'react'; import type { OverlayScrollbars } from '.'; import BaseScrollbars, { getScrollbarsOptions } from './BaseScrollbars'; -type CustomScrollbarsProps = { +export type CustomScrollbarsProps = { children: ReactNode; overflowX?: boolean; onScroll?: (args: OverlayScrollbars) => void; diff --git a/packages/ui-client/src/components/CustomScrollbars/CustomVirtuaScrollbars.tsx b/packages/ui-client/src/components/CustomScrollbars/CustomVirtuaScrollbars.tsx index 4e257d5cd24d1..9b3b3cb0da441 100644 --- a/packages/ui-client/src/components/CustomScrollbars/CustomVirtuaScrollbars.tsx +++ b/packages/ui-client/src/components/CustomScrollbars/CustomVirtuaScrollbars.tsx @@ -4,7 +4,7 @@ import { useEffect, memo, forwardRef, useRef } from 'react'; import BaseScrollbars from './BaseScrollbars'; -type CustomScrollbarsProps = { +export type CustomScrollbarsProps = { children: ReactNode; } & Omit, 'is' | 'onScroll'>; diff --git a/packages/ui-client/src/components/CustomScrollbars/VirtualizedScrollbars.tsx b/packages/ui-client/src/components/CustomScrollbars/VirtualizedScrollbars.tsx index 7b0cfada94c85..d94385f5984e6 100644 --- a/packages/ui-client/src/components/CustomScrollbars/VirtualizedScrollbars.tsx +++ b/packages/ui-client/src/components/CustomScrollbars/VirtualizedScrollbars.tsx @@ -4,7 +4,7 @@ import { useEffect, useState, useRef, cloneElement, forwardRef, memo } from 'rea import BaseScrollbars, { getScrollbarsOptions } from './BaseScrollbars'; -type VirtualizedScrollbarsProps = { +export type VirtualizedScrollbarsProps = { overflowX?: boolean; children: ReactElement; } & Omit, 'is'>; diff --git a/packages/ui-client/src/components/EmojiPicker/EmojiPickerPreview.tsx b/packages/ui-client/src/components/EmojiPicker/EmojiPickerPreview.tsx index 332f6c831f55e..80ddf555dc344 100644 --- a/packages/ui-client/src/components/EmojiPicker/EmojiPickerPreview.tsx +++ b/packages/ui-client/src/components/EmojiPicker/EmojiPickerPreview.tsx @@ -3,7 +3,9 @@ import { Box } from '@rocket.chat/fuselage'; import DOMPurify from 'dompurify'; import type { AllHTMLAttributes } from 'react'; -const EmojiPickerPreview = ({ emoji, name, ...props }: { emoji: string; name: string } & Omit, 'is'>) => { +export type EmojiPickerPreviewProps = { emoji: string; name: string } & Omit, 'is'>; + +const EmojiPickerPreview = ({ emoji, name, ...props }: EmojiPickerPreviewProps) => { const previewEmojiClass = css` span { width: 40px; diff --git a/packages/ui-client/src/components/ExternalLink.tsx b/packages/ui-client/src/components/ExternalLink.tsx index 65eb688085b15..f6cc8d0c98168 100644 --- a/packages/ui-client/src/components/ExternalLink.tsx +++ b/packages/ui-client/src/components/ExternalLink.tsx @@ -1,7 +1,7 @@ import { Box } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -type ExternalLinkProps = { +export type ExternalLinkProps = { to: string; } & ComponentPropsWithoutRef; diff --git a/packages/ui-client/src/components/FilePreviewIcon.tsx b/packages/ui-client/src/components/FilePreviewIcon.tsx index b15b14149b3a5..08ab602a6303a 100644 --- a/packages/ui-client/src/components/FilePreviewIcon.tsx +++ b/packages/ui-client/src/components/FilePreviewIcon.tsx @@ -1,6 +1,8 @@ import { Box, Icon } from '@rocket.chat/fuselage'; -const FilePreviewIcon = ({ format }: { format: string }) => { +export type FilePreviewIconProps = { format: string }; + +const FilePreviewIcon = ({ format }: FilePreviewIconProps) => { return ( , 'children'>; +export type GenericMenuProps = GenericMenuCommonProps & GenericMenuConditionalProps & Omit, 'children'>; const GenericMenu = ({ title, icon = 'menu', disabled, onAction, callbackAction, button, className, ...props }: GenericMenuProps) => { const { t, i18n } = useTranslation(); diff --git a/packages/ui-client/src/components/GenericTable/GenericTable.tsx b/packages/ui-client/src/components/GenericTable/GenericTable.tsx index 1f2e52f893442..a4857243652a6 100644 --- a/packages/ui-client/src/components/GenericTable/GenericTable.tsx +++ b/packages/ui-client/src/components/GenericTable/GenericTable.tsx @@ -4,7 +4,7 @@ import { forwardRef } from 'react'; import { CustomScrollbars } from '../CustomScrollbars'; -type GenericTableProps = { +export type GenericTableProps = { fixed?: boolean; children: ReactNode; } & ComponentProps; diff --git a/packages/ui-client/src/components/GenericTable/GenericTableBody.tsx b/packages/ui-client/src/components/GenericTable/GenericTableBody.tsx index 9196098f1bafa..d2909f447f0fd 100644 --- a/packages/ui-client/src/components/GenericTable/GenericTableBody.tsx +++ b/packages/ui-client/src/components/GenericTable/GenericTableBody.tsx @@ -1,6 +1,6 @@ import { TableBody } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -type GenericTableBodyProps = ComponentPropsWithoutRef; +export type GenericTableBodyProps = ComponentPropsWithoutRef; export const GenericTableBody = (props: GenericTableBodyProps) => ; diff --git a/packages/ui-client/src/components/GenericTable/GenericTableCell.tsx b/packages/ui-client/src/components/GenericTable/GenericTableCell.tsx index fb84763a41c92..36034f0ea51d1 100644 --- a/packages/ui-client/src/components/GenericTable/GenericTableCell.tsx +++ b/packages/ui-client/src/components/GenericTable/GenericTableCell.tsx @@ -1,6 +1,6 @@ import { TableCell } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -type GenericTableCellProps = ComponentPropsWithoutRef; +export type GenericTableCellProps = ComponentPropsWithoutRef; export const GenericTableCell = (props: GenericTableCellProps) => ; diff --git a/packages/ui-client/src/components/GenericTable/GenericTableHeader.tsx b/packages/ui-client/src/components/GenericTable/GenericTableHeader.tsx index 49f4b6815dd6d..183eccf83dbf0 100644 --- a/packages/ui-client/src/components/GenericTable/GenericTableHeader.tsx +++ b/packages/ui-client/src/components/GenericTable/GenericTableHeader.tsx @@ -3,7 +3,7 @@ import type { ComponentPropsWithoutRef } from 'react'; import { GenericTableRow } from './GenericTableRow'; -type GenericTableHeaderProps = ComponentPropsWithoutRef; +export type GenericTableHeaderProps = ComponentPropsWithoutRef; export const GenericTableHeader = ({ children, ...props }: GenericTableHeaderProps) => ( diff --git a/packages/ui-client/src/components/GenericTable/GenericTableLoadingRow.tsx b/packages/ui-client/src/components/GenericTable/GenericTableLoadingRow.tsx index 6642261115b61..b8f38d884c776 100644 --- a/packages/ui-client/src/components/GenericTable/GenericTableLoadingRow.tsx +++ b/packages/ui-client/src/components/GenericTable/GenericTableLoadingRow.tsx @@ -1,6 +1,8 @@ import { Box, Skeleton, TableRow, TableCell } from '@rocket.chat/fuselage'; -export const GenericTableLoadingRow = ({ cols }: { cols: number }) => ( +export type GenericTableLoadingRowProps = { cols: number }; + +export const GenericTableLoadingRow = ({ cols }: GenericTableLoadingRowProps) => ( diff --git a/packages/ui-client/src/components/GenericTable/GenericTableLoadingTable.tsx b/packages/ui-client/src/components/GenericTable/GenericTableLoadingTable.tsx index 55af6b268938d..e13cc3fd1a7af 100644 --- a/packages/ui-client/src/components/GenericTable/GenericTableLoadingTable.tsx +++ b/packages/ui-client/src/components/GenericTable/GenericTableLoadingTable.tsx @@ -1,6 +1,8 @@ import { GenericTableLoadingRow } from './GenericTableLoadingRow'; -export const GenericTableLoadingTable = ({ headerCells }: { headerCells: number }) => ( +export type GenericTableLoadingTableProps = { headerCells: number }; + +export const GenericTableLoadingTable = ({ headerCells }: GenericTableLoadingTableProps) => ( <> {Array.from({ length: 10 }, (_, i) => ( diff --git a/packages/ui-client/src/components/GenericTable/GenericTableRow.tsx b/packages/ui-client/src/components/GenericTable/GenericTableRow.tsx index 4e9c3bef974a0..f7763ef780d52 100644 --- a/packages/ui-client/src/components/GenericTable/GenericTableRow.tsx +++ b/packages/ui-client/src/components/GenericTable/GenericTableRow.tsx @@ -1,6 +1,6 @@ import { TableRow } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -type GenericTableRowProps = ComponentPropsWithoutRef; +export type GenericTableRowProps = ComponentPropsWithoutRef; export const GenericTableRow = (props: GenericTableRowProps) => ; diff --git a/packages/ui-client/src/components/GenericTable/SortIcon.tsx b/packages/ui-client/src/components/GenericTable/SortIcon.tsx index 4b9bc58a0e01e..7e3ad18d11d59 100644 --- a/packages/ui-client/src/components/GenericTable/SortIcon.tsx +++ b/packages/ui-client/src/components/GenericTable/SortIcon.tsx @@ -1,6 +1,6 @@ import { Box } from '@rocket.chat/fuselage'; -type SortIconProps = { +export type SortIconProps = { direction?: 'asc' | 'desc'; }; diff --git a/packages/ui-client/src/components/Header/Header.tsx b/packages/ui-client/src/components/Header/Header.tsx index fe36431541265..536cb827360c1 100644 --- a/packages/ui-client/src/components/Header/Header.tsx +++ b/packages/ui-client/src/components/Header/Header.tsx @@ -3,7 +3,7 @@ import type { ComponentPropsWithoutRef } from 'react'; import HeaderDivider from './HeaderDivider'; -type HeaderProps = ComponentPropsWithoutRef; +export type HeaderProps = ComponentPropsWithoutRef; const Header = (props: HeaderProps) => ( ; +export type HeaderAvatarProps = ComponentPropsWithoutRef; const HeaderAvatar = (props: HeaderAvatarProps) => ; diff --git a/packages/ui-client/src/components/Header/HeaderContent.tsx b/packages/ui-client/src/components/Header/HeaderContent.tsx index 2f8d75329493f..bd94ade6999bf 100644 --- a/packages/ui-client/src/components/Header/HeaderContent.tsx +++ b/packages/ui-client/src/components/Header/HeaderContent.tsx @@ -1,7 +1,7 @@ import { Box } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -type HeaderContentProps = ComponentPropsWithoutRef; +export type HeaderContentProps = ComponentPropsWithoutRef; const HeaderContent = (props: HeaderContentProps) => ( diff --git a/packages/ui-client/src/components/Header/HeaderContentRow.tsx b/packages/ui-client/src/components/Header/HeaderContentRow.tsx index 5b2ca14686678..c77a97da2f48d 100644 --- a/packages/ui-client/src/components/Header/HeaderContentRow.tsx +++ b/packages/ui-client/src/components/Header/HeaderContentRow.tsx @@ -1,7 +1,7 @@ import { Box } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -type HeaderContentRowProps = ComponentPropsWithoutRef; +export type HeaderContentRowProps = ComponentPropsWithoutRef; const HeaderContentRow = (props: HeaderContentRowProps) => ( diff --git a/packages/ui-client/src/components/Header/HeaderIcon.tsx b/packages/ui-client/src/components/Header/HeaderIcon.tsx index 767ee621027d1..3260cfa40b0de 100644 --- a/packages/ui-client/src/components/Header/HeaderIcon.tsx +++ b/packages/ui-client/src/components/Header/HeaderIcon.tsx @@ -2,7 +2,7 @@ import { Box, Icon } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef, ReactElement } from 'react'; import { isValidElement } from 'react'; -type HeaderIconProps = { icon: ReactElement | ComponentPropsWithoutRef | null }; +export type HeaderIconProps = { icon: ReactElement | ComponentPropsWithoutRef | null }; const HeaderIcon = ({ icon }: HeaderIconProps) => icon && ( diff --git a/packages/ui-client/src/components/Header/HeaderState.tsx b/packages/ui-client/src/components/Header/HeaderState.tsx index 7c7f64fe86cbb..0368175d08f7c 100644 --- a/packages/ui-client/src/components/Header/HeaderState.tsx +++ b/packages/ui-client/src/components/Header/HeaderState.tsx @@ -2,7 +2,7 @@ import { Icon, IconButton } from '@rocket.chat/fuselage'; import type { Keys as IconName } from '@rocket.chat/icons'; import type { AllHTMLAttributes, ComponentPropsWithoutRef, MouseEventHandler } from 'react'; -type HeaderStateProps = +export type HeaderStateProps = | (Pick, 'color' | 'title' | 'icon'> & { onClick: MouseEventHandler; } & Omit, 'is'>) diff --git a/packages/ui-client/src/components/Header/HeaderSubtitle.tsx b/packages/ui-client/src/components/Header/HeaderSubtitle.tsx index 4f3ef17492819..5a9cc063ae51f 100644 --- a/packages/ui-client/src/components/Header/HeaderSubtitle.tsx +++ b/packages/ui-client/src/components/Header/HeaderSubtitle.tsx @@ -1,7 +1,7 @@ import { Box } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -type HeaderSubtitleProps = ComponentPropsWithoutRef; +export type HeaderSubtitleProps = ComponentPropsWithoutRef; const HeaderSubtitle = (props: HeaderSubtitleProps) => ( diff --git a/packages/ui-client/src/components/Header/HeaderTag/HeaderTag.tsx b/packages/ui-client/src/components/Header/HeaderTag/HeaderTag.tsx index 8ea2d6895bfc1..2123e2c360c8d 100644 --- a/packages/ui-client/src/components/Header/HeaderTag/HeaderTag.tsx +++ b/packages/ui-client/src/components/Header/HeaderTag/HeaderTag.tsx @@ -1,7 +1,7 @@ import { Box, Tag } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -type HeaderTagProps = ComponentPropsWithoutRef; +export type HeaderTagProps = ComponentPropsWithoutRef; const HeaderTag = ({ children, ...props }: HeaderTagProps) => ( diff --git a/packages/ui-client/src/components/Header/HeaderTitle.tsx b/packages/ui-client/src/components/Header/HeaderTitle.tsx index 82c1233a41184..11886962ccc2e 100644 --- a/packages/ui-client/src/components/Header/HeaderTitle.tsx +++ b/packages/ui-client/src/components/Header/HeaderTitle.tsx @@ -1,7 +1,7 @@ import { Box } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -type HeaderTitleProps = ComponentPropsWithoutRef; +export type HeaderTitleProps = ComponentPropsWithoutRef; const HeaderTitle = (props: HeaderTitleProps) => ; diff --git a/packages/ui-client/src/components/Header/HeaderTitleButton.tsx b/packages/ui-client/src/components/Header/HeaderTitleButton.tsx index abc0dc447cab8..f44615af671d8 100644 --- a/packages/ui-client/src/components/Header/HeaderTitleButton.tsx +++ b/packages/ui-client/src/components/Header/HeaderTitleButton.tsx @@ -2,7 +2,7 @@ import { css } from '@rocket.chat/css-in-js'; import { Box, Palette } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -type HeaderTitleButtonProps = Omit, 'className'> & { className?: string }; +export type HeaderTitleButtonProps = Omit, 'className'> & { className?: string }; const HeaderTitleButton = ({ className, ...props }: HeaderTitleButtonProps) => { const customClass = css` diff --git a/packages/ui-client/src/components/TextSeparator.tsx b/packages/ui-client/src/components/TextSeparator.tsx index f4a2635570f84..f1ae4137cdf36 100644 --- a/packages/ui-client/src/components/TextSeparator.tsx +++ b/packages/ui-client/src/components/TextSeparator.tsx @@ -3,7 +3,7 @@ import type { ReactNode } from 'react'; import DotLeader from './DotLeader'; -type TextSeparatorProps = { +export type TextSeparatorProps = { label: ReactNode; value: ReactNode; }; diff --git a/packages/ui-client/src/components/TooltipComponent.tsx b/packages/ui-client/src/components/TooltipComponent.tsx index e65c95c063233..493046672a23d 100644 --- a/packages/ui-client/src/components/TooltipComponent.tsx +++ b/packages/ui-client/src/components/TooltipComponent.tsx @@ -2,7 +2,7 @@ import { Tooltip, PositionAnimated, AnimatedVisibility } from '@rocket.chat/fuse import type { ReactNode } from 'react'; import { useRef } from 'react'; -type TooltipComponentProps = { +export type TooltipComponentProps = { title: ReactNode; anchor: Element; };