diff --git a/.changeset/some-seas-prove.md b/.changeset/some-seas-prove.md new file mode 100644 index 0000000000..f3bb72a157 --- /dev/null +++ b/.changeset/some-seas-prove.md @@ -0,0 +1,7 @@ +--- +'@rocket.chat/onboarding-ui': minor +'@rocket.chat/fuselage': minor +'@rocket.chat/layout': minor +--- + +feat(fuselage): Remove deprecated `InputBox.*` component namespace diff --git a/packages/fuselage/src/components/AutoComplete/AutoComplete.tsx b/packages/fuselage/src/components/AutoComplete/AutoComplete.tsx index af9d4bb8aa..7b1daf3d0f 100644 --- a/packages/fuselage/src/components/AutoComplete/AutoComplete.tsx +++ b/packages/fuselage/src/components/AutoComplete/AutoComplete.tsx @@ -15,7 +15,7 @@ import AnimatedVisibility from '../AnimatedVisibility'; import Box from '../Box'; import Chip from '../Chip'; import { Icon } from '../Icon'; -import { InputBox } from '../InputBox'; +import { Input } from '../InputBox'; import Margins from '../Margins'; import type { OptionType } from '../Options'; import { useCursor, Options } from '../Options'; @@ -91,7 +91,7 @@ export function AutoComplete({ onBlur: onBlurAction = () => {}, ...props }: AutoCompleteProps): ReactElement { - const ref = useRef(); + const ref = useRef(null); const { ref: containerRef, borderBoxSize } = useResizeObserver(); const [selected, setSelected] = useState( @@ -185,7 +185,7 @@ export function AutoComplete({ role='group' > - ) => setFilter?.(e.currentTarget.value), diff --git a/packages/fuselage/src/components/Contextualbar/Contextualbar.stories.tsx b/packages/fuselage/src/components/Contextualbar/Contextualbar.stories.tsx index 87676d91e0..c5c8649c0f 100644 --- a/packages/fuselage/src/components/Contextualbar/Contextualbar.stories.tsx +++ b/packages/fuselage/src/components/Contextualbar/Contextualbar.stories.tsx @@ -6,7 +6,7 @@ import Box from '../Box'; import Button, { IconButton } from '../Button'; import { ButtonGroup } from '../ButtonGroup'; import { Icon } from '../Icon'; -import InputBox from '../InputBox'; +import { InputBox } from '../InputBox'; import Contextualbar from './Contextualbar'; import ContextualbarAction from './ContextualbarAction'; diff --git a/packages/fuselage/src/components/ContextualbarV2/Contextualbar.stories.tsx b/packages/fuselage/src/components/ContextualbarV2/Contextualbar.stories.tsx index cdfe92f54c..35a051beba 100644 --- a/packages/fuselage/src/components/ContextualbarV2/Contextualbar.stories.tsx +++ b/packages/fuselage/src/components/ContextualbarV2/Contextualbar.stories.tsx @@ -6,7 +6,7 @@ import Box from '../Box'; import Button, { IconButton } from '../Button'; import { ButtonGroup } from '../ButtonGroup'; import { Icon } from '../Icon'; -import InputBox from '../InputBox'; +import { InputBox } from '../InputBox'; import { ContextualbarV2, diff --git a/packages/fuselage/src/components/EmailInput/EmailInput.tsx b/packages/fuselage/src/components/EmailInput/EmailInput.tsx index a90e76fb30..914b95d352 100644 --- a/packages/fuselage/src/components/EmailInput/EmailInput.tsx +++ b/packages/fuselage/src/components/EmailInput/EmailInput.tsx @@ -1,9 +1,9 @@ -import type { ComponentProps, ReactNode, Ref } from 'react'; +import type { ReactNode, Ref } from 'react'; import { forwardRef } from 'react'; -import { InputBox } from '../InputBox'; +import { InputBox, type InputBoxProps } from '../InputBox'; -type EmailInputProps = Omit, 'type'> & { +type EmailInputProps = Omit & { addon?: ReactNode; error?: string; }; diff --git a/packages/fuselage/src/components/FieldGroup/FieldGroup.stories.tsx b/packages/fuselage/src/components/FieldGroup/FieldGroup.stories.tsx index b45e4ad441..bb57ee549d 100644 --- a/packages/fuselage/src/components/FieldGroup/FieldGroup.stories.tsx +++ b/packages/fuselage/src/components/FieldGroup/FieldGroup.stories.tsx @@ -1,7 +1,7 @@ import type { StoryFn, Meta } from '@storybook/react-webpack5'; import { Field, FieldHint, FieldLabel, FieldRow } from '../Field'; -import InputBox from '../InputBox'; +import { InputBoxSkeleton } from '../InputBox'; import { FieldGroup } from './FieldGroup'; @@ -15,20 +15,20 @@ export const Default: StoryFn = () => ( Field #1 - + Field #2 - + Help text Field #3 - + diff --git a/packages/fuselage/src/components/Icon/Icon.stories.tsx b/packages/fuselage/src/components/Icon/Icon.stories.tsx index 6bc567e97b..3f6566b6a0 100644 --- a/packages/fuselage/src/components/Icon/Icon.stories.tsx +++ b/packages/fuselage/src/components/Icon/Icon.stories.tsx @@ -5,7 +5,7 @@ import { useState } from 'react'; import Box from '../Box'; import { Divider } from '../Divider'; -import InputBox from '../InputBox'; +import { InputBox } from '../InputBox'; import { Icon } from './Icon'; diff --git a/packages/fuselage/src/components/InputBox/Addon.tsx b/packages/fuselage/src/components/InputBox/Addon.tsx deleted file mode 100644 index bd3acc662a..0000000000 --- a/packages/fuselage/src/components/InputBox/Addon.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type { ComponentProps, Ref } from 'react'; -import { forwardRef } from 'react'; - -import Box from '../Box'; - -type AddonProps = ComponentProps; - -export const Addon = forwardRef(function Addon( - props: AddonProps, - ref: Ref, -) { - return ; -}); diff --git a/packages/fuselage/src/components/InputBox/Input.tsx b/packages/fuselage/src/components/InputBox/Input.tsx index 2d257cd5c2..416ae48913 100644 --- a/packages/fuselage/src/components/InputBox/Input.tsx +++ b/packages/fuselage/src/components/InputBox/Input.tsx @@ -1,13 +1,15 @@ -import type { ComponentProps, Ref } from 'react'; +import type { Ref } from 'react'; import { forwardRef } from 'react'; -import Box from '../Box'; +import Box, { type BoxProps } from '../Box'; -type InputProps = ComponentProps; +export type InputProps = BoxProps; -export const Input = forwardRef(function Input( +const Input = forwardRef(function Input( props: InputProps, ref: Ref, ) { return ; }); + +export default Input; diff --git a/packages/fuselage/src/components/InputBox/InputBox.stories.tsx b/packages/fuselage/src/components/InputBox/InputBox.stories.tsx index bd41ed96f3..667703ff71 100644 --- a/packages/fuselage/src/components/InputBox/InputBox.stories.tsx +++ b/packages/fuselage/src/components/InputBox/InputBox.stories.tsx @@ -4,11 +4,15 @@ import { action } from 'storybook/actions'; import Box from '../Box'; import { Icon } from '../Icon'; -import { InputBox } from './InputBox'; +import { Input, InputBox, InputBoxSkeleton } from '.'; export default { title: 'Inputs/InputBox', component: InputBox, + subcomponents: { + InputBoxSkeleton, + Input, + }, } satisfies Meta; const Template: StoryFn = (args) => ( @@ -59,8 +63,8 @@ WithPlaceholder.args = { placeholder: 'Placeholder', onChange: action('change'), }; -export const Skeleton: StoryFn = () => ; -Skeleton.storyName = 'InputBox.Skeleton'; +export const Skeleton: StoryFn = () => ; +Skeleton.storyName = 'InputBoxSkeleton'; export const SmallVariants: StoryFn = () => ( & { +export type InputBoxProps = BoxProps & { addon?: ReactNode; input?: ReactNode; multiple?: boolean; @@ -61,7 +52,7 @@ type InputBoxProps = ComponentProps & { * components over this one because it works as a construction block for them. */ // eslint-disable-next-line complexity -export const InputBox = forwardRef(function InputBox( +const InputBox = forwardRef(function InputBox( { className, addon, @@ -75,7 +66,7 @@ export const InputBox = forwardRef(function InputBox( onChange, ...props }: InputBoxProps, - ref: Ref | null, + ref: Ref, ) { const innerRef = useRef< HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement @@ -150,7 +141,7 @@ export const InputBox = forwardRef(function InputBox( } return ( - - - + + ); -}) as unknown as ForwardRefExoticComponent & { - Input: ForwardRefExoticComponent>; - Skeleton: ForwardRefExoticComponent>; - Option: ForwardRefExoticComponent>; - Placeholder: ForwardRefExoticComponent>; -}; +}); + +export default InputBox; diff --git a/packages/fuselage/src/components/InputBox/InputBoxAddon.tsx b/packages/fuselage/src/components/InputBox/InputBoxAddon.tsx new file mode 100644 index 0000000000..9b529f2ded --- /dev/null +++ b/packages/fuselage/src/components/InputBox/InputBoxAddon.tsx @@ -0,0 +1,15 @@ +import type { Ref } from 'react'; +import { forwardRef } from 'react'; + +import Box, { type BoxProps } from '../Box'; + +export type InputBoxAddonProps = BoxProps; + +const InputBoxAddon = forwardRef(function InputBoxAddon( + props: InputBoxAddonProps, + ref: Ref, +) { + return ; +}); + +export default InputBoxAddon; diff --git a/packages/fuselage/src/components/InputBox/InputBoxSkeleton.tsx b/packages/fuselage/src/components/InputBox/InputBoxSkeleton.tsx index 21e1810867..2bfa61cb41 100644 --- a/packages/fuselage/src/components/InputBox/InputBoxSkeleton.tsx +++ b/packages/fuselage/src/components/InputBox/InputBoxSkeleton.tsx @@ -1,12 +1,12 @@ -import type { ComponentProps } from 'react'; - -import Box from '../Box'; +import Box, { type BoxProps } from '../Box'; import { Skeleton } from '../Skeleton'; -type InputBoxSkeletonProps = ComponentProps; +export type InputBoxSkeletonProps = BoxProps; -export const InputBoxSkeleton = (props: InputBoxSkeletonProps) => ( +const InputBoxSkeleton = (props: InputBoxSkeletonProps) => ( ); + +export default InputBoxSkeleton; diff --git a/packages/fuselage/src/components/InputBox/InputBoxWrapper.tsx b/packages/fuselage/src/components/InputBox/InputBoxWrapper.tsx new file mode 100644 index 0000000000..2873476ff6 --- /dev/null +++ b/packages/fuselage/src/components/InputBox/InputBoxWrapper.tsx @@ -0,0 +1,10 @@ +import Box, { type BoxProps } from '../Box'; +import { Label } from '../Label'; + +export type InputBoxWrapperProps = BoxProps; + +const InputBoxWrapper = (props: InputBoxWrapperProps) => ( + +); + +export default InputBoxWrapper; diff --git a/packages/fuselage/src/components/InputBox/Option.tsx b/packages/fuselage/src/components/InputBox/Option.tsx deleted file mode 100644 index 363160c96f..0000000000 --- a/packages/fuselage/src/components/InputBox/Option.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type { ComponentProps, Ref } from 'react'; -import { forwardRef } from 'react'; - -import Box from '../Box'; - -type OptionProps = ComponentProps; - -export const Option = forwardRef(function Option( - props: OptionProps, - ref: Ref, -) { - return ; -}); diff --git a/packages/fuselage/src/components/InputBox/Placeholder.tsx b/packages/fuselage/src/components/InputBox/Placeholder.tsx deleted file mode 100644 index 754cc4788e..0000000000 --- a/packages/fuselage/src/components/InputBox/Placeholder.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type { ComponentProps, Ref } from 'react'; -import { forwardRef } from 'react'; - -import Box from '../Box'; - -type PlaceholderProps = ComponentProps; - -export const Placeholder = forwardRef(function Placeholder( - props: PlaceholderProps, - ref: Ref, -) { - return ; -}); diff --git a/packages/fuselage/src/components/InputBox/Wrapper.tsx b/packages/fuselage/src/components/InputBox/Wrapper.tsx deleted file mode 100644 index 097711ddac..0000000000 --- a/packages/fuselage/src/components/InputBox/Wrapper.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import type { ComponentProps } from 'react'; - -import Box from '../Box'; -import { Label } from '../Label'; - -export const Wrapper = (props: ComponentProps) => ( - -); diff --git a/packages/fuselage/src/components/InputBox/index.ts b/packages/fuselage/src/components/InputBox/index.ts index 8e01e24a5b..3ea835229c 100644 --- a/packages/fuselage/src/components/InputBox/index.ts +++ b/packages/fuselage/src/components/InputBox/index.ts @@ -1,21 +1,6 @@ -import { Addon } from './Addon'; -import { Input } from './Input'; -import { InputBox } from './InputBox'; -import { InputBoxSkeleton } from './InputBoxSkeleton'; -import { Option } from './Option'; -import { Placeholder } from './Placeholder'; -import { Wrapper } from './Wrapper'; - -export * from './Input'; -export * from './InputBox'; -export * from './InputBoxSkeleton'; -export * from './Wrapper'; - -export default Object.assign(InputBox, { - Input, - Skeleton: InputBoxSkeleton, - Wrapper, - Addon, - Placeholder, - Option, -}); +export { default as Input, type InputProps } from './Input'; +export { default as InputBox, type InputBoxProps } from './InputBox'; +export { + default as InputBoxSkeleton, + type InputBoxSkeletonProps, +} from './InputBoxSkeleton'; diff --git a/packages/fuselage/src/components/MultiSelect/MultiSelectAnchorParams.ts b/packages/fuselage/src/components/MultiSelect/MultiSelectAnchorParams.ts index ea3d87bff3..f2cd4666ec 100644 --- a/packages/fuselage/src/components/MultiSelect/MultiSelectAnchorParams.ts +++ b/packages/fuselage/src/components/MultiSelect/MultiSelectAnchorParams.ts @@ -7,7 +7,7 @@ import type { } from 'react'; export type MultiSelectAnchorParams = { - ref: Ref; + ref: Ref; children: ReactNode; disabled: boolean; onClick: MouseEventHandler; diff --git a/packages/fuselage/src/components/MultiSelect/MultiSelectFilteredAnchor.tsx b/packages/fuselage/src/components/MultiSelect/MultiSelectFilteredAnchor.tsx index f0fbaadfa9..61a5f374a8 100644 --- a/packages/fuselage/src/components/MultiSelect/MultiSelectFilteredAnchor.tsx +++ b/packages/fuselage/src/components/MultiSelect/MultiSelectFilteredAnchor.tsx @@ -9,7 +9,7 @@ import type { import { forwardRef } from 'react'; import Flex from '../Flex'; -import { InputBox } from '../InputBox'; +import { Input } from '../InputBox'; type MultiSelectFilteredAnchorProps = { children: ReactNode; @@ -31,11 +31,11 @@ const MultiSelectFilteredAnchor = forwardRef(function MultiSelectFilteredAnchor( placeholder, ...props }: MultiSelectFilteredAnchorProps, - ref: Ref, + ref: Ref, ) { return ( - , 'type'>; +type NumberInputProps = Omit; /** * An input for numbers. diff --git a/packages/fuselage/src/components/PaginatedSelect/PaginatedMultiSelectFiltered.tsx b/packages/fuselage/src/components/PaginatedSelect/PaginatedMultiSelectFiltered.tsx index 3bfb1e29c4..09d0a13266 100644 --- a/packages/fuselage/src/components/PaginatedSelect/PaginatedMultiSelectFiltered.tsx +++ b/packages/fuselage/src/components/PaginatedSelect/PaginatedMultiSelectFiltered.tsx @@ -2,7 +2,7 @@ import type { ComponentProps, Ref, FormEvent } from 'react'; import { useCallback, forwardRef } from 'react'; import Flex from '../Flex'; -import { InputBox } from '../InputBox'; +import { Input, type InputProps } from '../InputBox'; import PaginatedMultiSelect from './PaginatedMultiSelect'; @@ -21,15 +21,11 @@ export const PaginatedMultiSelectFiltered = ({ const anchor = useCallback( forwardRef( ( - { - children: _children, - filter, - ...props - }: ComponentProps, + { children: _children, filter, ...props }: InputProps, ref: Ref, ) => ( - , ) => ( - , 'type'>; +type PasswordInputProps = Omit; const PasswordInput = forwardRef(function PasswordInput( props: PasswordInputProps, diff --git a/packages/fuselage/src/components/SearchInput/SearchInput.tsx b/packages/fuselage/src/components/SearchInput/SearchInput.tsx index ea0f3fd3dc..b67fc0c594 100644 --- a/packages/fuselage/src/components/SearchInput/SearchInput.tsx +++ b/packages/fuselage/src/components/SearchInput/SearchInput.tsx @@ -1,9 +1,9 @@ -import type { ComponentProps, ReactNode, Ref } from 'react'; +import type { ReactNode, Ref } from 'react'; import { forwardRef } from 'react'; -import { InputBox } from '../InputBox'; +import { InputBox, type InputBoxProps } from '../InputBox'; -type SearchInputProps = Omit, 'type'> & { +type SearchInputProps = Omit & { addon?: ReactNode; error?: string; }; diff --git a/packages/fuselage/src/components/Select/SelectAnchorParams.ts b/packages/fuselage/src/components/Select/SelectAnchorParams.ts index 5556e27d74..17b3e9cdd0 100644 --- a/packages/fuselage/src/components/Select/SelectAnchorParams.ts +++ b/packages/fuselage/src/components/Select/SelectAnchorParams.ts @@ -7,7 +7,7 @@ import type { } from 'react'; export type SelectAnchorParams = { - ref: Ref; + ref: Ref; children: ReactNode; disabled: boolean; onClick: MouseEventHandler; diff --git a/packages/fuselage/src/components/Select/SelectFilteredAnchor.tsx b/packages/fuselage/src/components/Select/SelectFilteredAnchor.tsx index 19daed280f..d7922aac5b 100644 --- a/packages/fuselage/src/components/Select/SelectFilteredAnchor.tsx +++ b/packages/fuselage/src/components/Select/SelectFilteredAnchor.tsx @@ -8,7 +8,7 @@ import type { } from 'react'; import { forwardRef } from 'react'; -import { InputBox } from '../InputBox'; +import { Input } from '../InputBox'; type SelectFilteredAnchorProps = { children: ReactNode; @@ -30,10 +30,10 @@ const SelectFilteredAnchor = forwardRef(function SelectFilteredAnchor( placeholder, ...props }: SelectFilteredAnchorProps, - ref: Ref, + ref: Ref, ) { return ( - , 'type'> & { +export type SelectInputProps = Omit & { error?: string; options?: SelectInputOptions; htmlSize?: number; @@ -16,7 +18,7 @@ type SelectInputProps = Omit, 'type'> & { /** * An input for selection of options. */ -export const SelectInput = forwardRef(function SelectInput( +const SelectInput = forwardRef(function SelectInput( { children, multiple, placeholder, onChange, ...props }: SelectInputProps, ref: Ref, ) { @@ -53,9 +55,11 @@ export const SelectInput = forwardRef(function SelectInput( onChange={handleChange} > {placeholder && ( - {placeholder} + {placeholder} )} {children} ); }); + +export default SelectInput; diff --git a/packages/fuselage/src/components/SelectInput/SelectInputOption.tsx b/packages/fuselage/src/components/SelectInput/SelectInputOption.tsx new file mode 100644 index 0000000000..fee4626701 --- /dev/null +++ b/packages/fuselage/src/components/SelectInput/SelectInputOption.tsx @@ -0,0 +1,15 @@ +import type { Ref } from 'react'; +import { forwardRef } from 'react'; + +import Box, { type BoxProps } from '../Box'; + +export type SelectInputOptionProps = BoxProps; + +const SelectInputOption = forwardRef(function SelectInputOption( + props: SelectInputOptionProps, + ref: Ref, +) { + return ; +}); + +export default SelectInputOption; diff --git a/packages/fuselage/src/components/SelectInput/SelectInputPlaceholder.tsx b/packages/fuselage/src/components/SelectInput/SelectInputPlaceholder.tsx new file mode 100644 index 0000000000..55c4e5550b --- /dev/null +++ b/packages/fuselage/src/components/SelectInput/SelectInputPlaceholder.tsx @@ -0,0 +1,15 @@ +import type { Ref } from 'react'; +import { forwardRef } from 'react'; + +import Box, { type BoxProps } from '../Box'; + +export type SelectInputPlaceholderProps = BoxProps; + +const SelectInputPlaceholder = forwardRef(function Placeholder( + props: SelectInputPlaceholderProps, + ref: Ref, +) { + return ; +}); + +export default SelectInputPlaceholder; diff --git a/packages/fuselage/src/components/SelectInput/index.ts b/packages/fuselage/src/components/SelectInput/index.ts index 8f65901d32..05b94827e7 100644 --- a/packages/fuselage/src/components/SelectInput/index.ts +++ b/packages/fuselage/src/components/SelectInput/index.ts @@ -1,5 +1,5 @@ -import { Option } from '../InputBox/Option'; - -export * from './SelectInput'; - -export const SelectInputOption = Option; +export { default as SelectInput, type SelectInputProps } from './SelectInput'; +export { + default as SelectInputOption, + type SelectInputOptionProps, +} from './SelectInputOption'; diff --git a/packages/fuselage/src/components/TelephoneInput/TelephoneInput.tsx b/packages/fuselage/src/components/TelephoneInput/TelephoneInput.tsx index 9abd832500..5f7e002234 100644 --- a/packages/fuselage/src/components/TelephoneInput/TelephoneInput.tsx +++ b/packages/fuselage/src/components/TelephoneInput/TelephoneInput.tsx @@ -1,9 +1,9 @@ -import type { ComponentProps, ReactNode, Ref } from 'react'; +import type { ReactNode, Ref } from 'react'; import { forwardRef } from 'react'; -import { InputBox } from '../InputBox'; +import { InputBox, type InputBoxProps } from '../InputBox'; -type TelephoneInputProps = Omit, 'type'> & { +type TelephoneInputProps = Omit & { addon?: ReactNode; input?: ReactNode; error?: string; diff --git a/packages/fuselage/src/components/TextAreaInput/TextAreaInput.tsx b/packages/fuselage/src/components/TextAreaInput/TextAreaInput.tsx index a7280a5797..4034d71559 100644 --- a/packages/fuselage/src/components/TextAreaInput/TextAreaInput.tsx +++ b/packages/fuselage/src/components/TextAreaInput/TextAreaInput.tsx @@ -1,9 +1,9 @@ -import type { ComponentProps, ReactNode, Ref } from 'react'; +import type { ReactNode, Ref } from 'react'; import { forwardRef } from 'react'; -import { InputBox } from '../InputBox'; +import { InputBox, type InputBoxProps } from '../InputBox'; -type TextAreaInputProps = Omit, 'type'> & { +type TextAreaInputProps = Omit & { addon?: ReactNode; error?: string; }; diff --git a/packages/fuselage/src/components/TextInput/TextInput.tsx b/packages/fuselage/src/components/TextInput/TextInput.tsx index 71aa94ce8a..d94839b88f 100644 --- a/packages/fuselage/src/components/TextInput/TextInput.tsx +++ b/packages/fuselage/src/components/TextInput/TextInput.tsx @@ -1,9 +1,9 @@ -import type { ComponentProps, ReactNode, Ref } from 'react'; +import type { ReactNode, Ref } from 'react'; import { forwardRef } from 'react'; -import { InputBox } from '../InputBox'; +import { InputBox, type InputBoxProps } from '../InputBox'; -export type TextInputProps = Omit, 'type'> & { +export type TextInputProps = Omit & { addon?: ReactNode; error?: string; }; diff --git a/packages/fuselage/src/components/UrlInput/UrlInput.tsx b/packages/fuselage/src/components/UrlInput/UrlInput.tsx index e35f27d4cf..65a3980f81 100644 --- a/packages/fuselage/src/components/UrlInput/UrlInput.tsx +++ b/packages/fuselage/src/components/UrlInput/UrlInput.tsx @@ -1,9 +1,9 @@ -import type { ComponentProps, Ref } from 'react'; +import type { Ref } from 'react'; import { forwardRef } from 'react'; -import { InputBox } from '../InputBox'; +import { InputBox, type InputBoxProps } from '../InputBox'; -type UrlInputProps = Omit, 'type'>; +type UrlInputProps = Omit; const UrlInput = forwardRef(function UrlInput( props: UrlInputProps, diff --git a/packages/layout/src/layouts/HorizontalWizardLayout/HorizontalWizardLayout.stories.tsx b/packages/layout/src/layouts/HorizontalWizardLayout/HorizontalWizardLayout.stories.tsx index bab70e8591..3279b6e376 100644 --- a/packages/layout/src/layouts/HorizontalWizardLayout/HorizontalWizardLayout.stories.tsx +++ b/packages/layout/src/layouts/HorizontalWizardLayout/HorizontalWizardLayout.stories.tsx @@ -5,7 +5,7 @@ import { FieldHint, FieldLabel, FieldRow, - InputBox, + InputBoxSkeleton, } from '@rocket.chat/fuselage'; import type { Meta, StoryFn } from '@storybook/react-webpack5'; @@ -63,7 +63,7 @@ export const Default: StoryFn = (props) => ( Label Description - + Error Hint @@ -98,7 +98,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint @@ -107,7 +107,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint @@ -116,7 +116,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint @@ -125,7 +125,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint @@ -134,7 +134,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint @@ -143,7 +143,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint @@ -152,7 +152,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint @@ -161,7 +161,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint @@ -170,7 +170,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint @@ -179,7 +179,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint @@ -188,7 +188,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint @@ -197,7 +197,7 @@ export const WithScroll: StoryFn = (props) => ( Label Description - + Error Hint diff --git a/packages/layout/src/layouts/VerticalWizardLayout/VerticalWizardLayout.stories.tsx b/packages/layout/src/layouts/VerticalWizardLayout/VerticalWizardLayout.stories.tsx index 11d1b48058..08a63d9a2b 100644 --- a/packages/layout/src/layouts/VerticalWizardLayout/VerticalWizardLayout.stories.tsx +++ b/packages/layout/src/layouts/VerticalWizardLayout/VerticalWizardLayout.stories.tsx @@ -5,7 +5,7 @@ import { FieldHint, FieldLabel, FieldRow, - InputBox, + InputBoxSkeleton, } from '@rocket.chat/fuselage'; import type { Meta, StoryFn } from '@storybook/react-webpack5'; @@ -42,7 +42,7 @@ export const Default: StoryFn = () => ( Label Description - + Error Hint @@ -71,7 +71,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -80,7 +80,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -89,7 +89,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -98,7 +98,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -107,7 +107,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -116,7 +116,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -125,7 +125,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -134,7 +134,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -143,7 +143,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -152,7 +152,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -161,7 +161,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -170,7 +170,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint @@ -179,7 +179,7 @@ export const WithScroll: StoryFn = () => ( Label Description - + Error Hint diff --git a/packages/onboarding-ui/src/forms/CreateCloudWorkspaceForm/WorkspaceUrlInput.tsx b/packages/onboarding-ui/src/forms/CreateCloudWorkspaceForm/WorkspaceUrlInput.tsx index 9d0005633d..b46914a339 100644 --- a/packages/onboarding-ui/src/forms/CreateCloudWorkspaceForm/WorkspaceUrlInput.tsx +++ b/packages/onboarding-ui/src/forms/CreateCloudWorkspaceForm/WorkspaceUrlInput.tsx @@ -1,8 +1,9 @@ +import type { InputBoxProps } from '@rocket.chat/fuselage'; import { Box, InputBox } from '@rocket.chat/fuselage'; -import type { ComponentProps, ReactNode, Ref } from 'react'; +import type { ReactNode, Ref } from 'react'; import { forwardRef } from 'react'; -type WorkspaceUrlInputProps = Omit, 'type'> & { +type WorkspaceUrlInputProps = Omit & { addon?: ReactNode; error?: string | undefined; domain: string;