From 9fc6529b50174d17a89488e098e1dc6f03d13693 Mon Sep 17 00:00:00 2001 From: Gururaj J <89023023+Gururajj77@users.noreply.github.com> Date: Wed, 22 May 2024 01:16:04 +0530 Subject: [PATCH] feat: exporting typescript props for various components - 2 (#16448) * feat: exported props for various components * refactor: exported textinput skeleton and tab props --- packages/react/src/components/Tab/index.tsx | 3 ++- packages/react/src/components/TextArea/index.ts | 4 ++-- packages/react/src/components/TextInput/index.ts | 6 ++++-- packages/react/src/components/TileGroup/index.ts | 4 ++-- packages/react/src/components/Tooltip/index.ts | 4 ++-- .../react/src/components/UnorderedList/UnorderedList.tsx | 2 +- packages/react/src/components/UnorderedList/index.ts | 1 + 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/react/src/components/Tab/index.tsx b/packages/react/src/components/Tab/index.tsx index 7d1f571d72c1..723d15e4232e 100644 --- a/packages/react/src/components/Tab/index.tsx +++ b/packages/react/src/components/Tab/index.tsx @@ -6,6 +6,7 @@ */ import { Tab } from '../Tabs/Tabs'; +import { type TabProps } from '../Tabs/Tabs'; export default Tab; -export { Tab }; +export { Tab, type TabProps }; diff --git a/packages/react/src/components/TextArea/index.ts b/packages/react/src/components/TextArea/index.ts index a03705286148..b39f5a15350e 100644 --- a/packages/react/src/components/TextArea/index.ts +++ b/packages/react/src/components/TextArea/index.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import TextArea from './TextArea'; +import TextArea, { type TextAreaProps } from './TextArea'; export { default as TextAreaSkeleton } from './TextArea.Skeleton'; export default TextArea; -export { TextArea }; +export { TextArea, type TextAreaProps }; diff --git a/packages/react/src/components/TextInput/index.ts b/packages/react/src/components/TextInput/index.ts index b8c584b2a623..84913d1b6908 100644 --- a/packages/react/src/components/TextInput/index.ts +++ b/packages/react/src/components/TextInput/index.ts @@ -8,7 +8,8 @@ import { deprecateFieldOnObject } from '../../internal/deprecateFieldOnObject'; import ControlledPasswordInput from './ControlledPasswordInput'; import PasswordInput from './PasswordInput'; -import TextInput from './TextInput'; +import TextInput, { type TextInputProps } from './TextInput'; +import { type TextInputSkeletonProps } from './TextInput.Skeleton'; if (__DEV__) { deprecateFieldOnObject( @@ -21,4 +22,5 @@ if (__DEV__) { export { default as TextInputSkeleton } from './TextInput.Skeleton'; export default TextInput; -export { TextInput }; +export { type TextInputSkeletonProps }; +export { TextInput, type TextInputProps }; diff --git a/packages/react/src/components/TileGroup/index.ts b/packages/react/src/components/TileGroup/index.ts index 248b9d8efcb6..3709ddc7a062 100644 --- a/packages/react/src/components/TileGroup/index.ts +++ b/packages/react/src/components/TileGroup/index.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import TileGroup from './TileGroup'; +import TileGroup, { type TileGroupProps } from './TileGroup'; export default TileGroup; -export { TileGroup }; +export { TileGroup, type TileGroupProps }; diff --git a/packages/react/src/components/Tooltip/index.ts b/packages/react/src/components/Tooltip/index.ts index c657bc7b73e8..2f8fd829652b 100644 --- a/packages/react/src/components/Tooltip/index.ts +++ b/packages/react/src/components/Tooltip/index.ts @@ -6,6 +6,6 @@ */ import { DefinitionTooltip } from './DefinitionTooltip'; -import { Tooltip } from './Tooltip'; +import { Tooltip, type TooltipProps } from './Tooltip'; -export { DefinitionTooltip, Tooltip }; +export { DefinitionTooltip, Tooltip, type TooltipProps }; diff --git a/packages/react/src/components/UnorderedList/UnorderedList.tsx b/packages/react/src/components/UnorderedList/UnorderedList.tsx index 5e852f14353d..8badc8b9f254 100644 --- a/packages/react/src/components/UnorderedList/UnorderedList.tsx +++ b/packages/react/src/components/UnorderedList/UnorderedList.tsx @@ -10,7 +10,7 @@ import React, { type ComponentProps } from 'react'; import classnames from 'classnames'; import { usePrefix } from '../../internal/usePrefix'; -interface UnorderedListProps extends ComponentProps<'ul'> { +export interface UnorderedListProps extends ComponentProps<'ul'> { nested?: boolean | undefined; isExpressive?: boolean | undefined; } diff --git a/packages/react/src/components/UnorderedList/index.ts b/packages/react/src/components/UnorderedList/index.ts index 889c5a6e4c78..5b406ecfb156 100644 --- a/packages/react/src/components/UnorderedList/index.ts +++ b/packages/react/src/components/UnorderedList/index.ts @@ -6,3 +6,4 @@ */ export { default, default as UnorderedList } from './UnorderedList'; +export { type UnorderedListProps } from './UnorderedList';