diff --git a/packages/react-ui/.storybook/preview.tsx b/packages/react-ui/.storybook/preview.tsx index 9ec8016108b..c30805d9002 100644 --- a/packages/react-ui/.storybook/preview.tsx +++ b/packages/react-ui/.storybook/preview.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { setFilter } from '@skbkontur/react-props2attrs'; import { findAmongParents } from '@skbkontur/react-sorge/lib'; import { MINIMAL_VIEWPORTS } from '@storybook/addon-viewport'; -import { Meta } from '@storybook/react'; +import type { Meta } from '@storybook/react'; import { isTestEnv } from '../lib/currentEnvironment'; import { ThemeContext } from '../lib/theming/ThemeContext'; diff --git a/packages/react-ui/components/Autocomplete/Autocomplete.styles.ts b/packages/react-ui/components/Autocomplete/Autocomplete.styles.ts index de2c5f1f8a1..9d0ac7965b0 100644 --- a/packages/react-ui/components/Autocomplete/Autocomplete.styles.ts +++ b/packages/react-ui/components/Autocomplete/Autocomplete.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ root(t: Theme) { diff --git a/packages/react-ui/components/Autocomplete/Autocomplete.tsx b/packages/react-ui/components/Autocomplete/Autocomplete.tsx index 3f754414765..f344031978f 100644 --- a/packages/react-ui/components/Autocomplete/Autocomplete.tsx +++ b/packages/react-ui/components/Autocomplete/Autocomplete.tsx @@ -1,32 +1,37 @@ -import React, { AriaAttributes, KeyboardEvent } from 'react'; +import type { AriaAttributes, KeyboardEvent } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { MenuMessage } from '../../internal/MenuMessage'; import { locale } from '../../lib/locale/decorators'; import { getRandomID, isNullable } from '../../lib/utils'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { cx } from '../../lib/theming/Emotion'; import { isKeyArrowDown, isKeyArrowUp, isKeyEnter, isKeyEscape } from '../../lib/events/keyboard/identifiers'; -import { Input, InputProps } from '../Input'; +import type { InputProps } from '../Input'; +import { Input } from '../Input'; import { Menu } from '../../internal/Menu'; import { MenuItem } from '../MenuItem'; import { RenderLayer } from '../../internal/RenderLayer'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { Nullable, Override } from '../../typings/utility-types'; +import type { Nullable, Override } from '../../typings/utility-types'; import { fixClickFocusIE } from '../../lib/events/fixClickFocusIE'; -import { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { MobilePopup } from '../../internal/MobilePopup'; import { responsiveLayout } from '../ResponsiveLayout/decorator'; -import { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, rootNode } from '../../lib/rootNode'; import { getDOMRect } from '../../lib/dom/getDOMRect'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { Popup } from '../../internal/Popup'; import { getMenuPositions } from '../../lib/getMenuPositions'; import { ZIndex } from '../../internal/ZIndex'; import { styles } from './Autocomplete.styles'; -import { AutocompleteLocale, AutocompleteLocaleHelper } from './locale'; +import type { AutocompleteLocale } from './locale'; +import { AutocompleteLocaleHelper } from './locale'; import { getAutocompleteTheme } from './getAutocompleteTheme'; function match(pattern: string, items: string[]) { diff --git a/packages/react-ui/components/Autocomplete/__stories__/Autocomplete.stories.tsx b/packages/react-ui/components/Autocomplete/__stories__/Autocomplete.stories.tsx index b54a0512fa1..95ef3a37468 100644 --- a/packages/react-ui/components/Autocomplete/__stories__/Autocomplete.stories.tsx +++ b/packages/react-ui/components/Autocomplete/__stories__/Autocomplete.stories.tsx @@ -3,8 +3,8 @@ import { flatten } from 'lodash'; import { Gapped } from '../../Gapped'; import { Autocomplete } from '../Autocomplete'; -import { Meta, Story } from '../../../typings/stories'; -import { AutocompleteProps } from '..'; +import type { Meta, Story } from '../../../typings/stories'; +import type { AutocompleteProps } from '..'; import { LangCodes, LocaleContext } from '../../../lib/locale'; export default { diff --git a/packages/react-ui/components/Autocomplete/__tests__/Autocomplete-test.tsx b/packages/react-ui/components/Autocomplete/__tests__/Autocomplete-test.tsx index e7e44167424..191d789f2d7 100644 --- a/packages/react-ui/components/Autocomplete/__tests__/Autocomplete-test.tsx +++ b/packages/react-ui/components/Autocomplete/__tests__/Autocomplete-test.tsx @@ -5,7 +5,8 @@ import userEvent from '@testing-library/user-event'; import { mount } from 'enzyme'; import { InputDataTids } from '../../../components/Input'; -import { Autocomplete, AutocompleteProps, AutocompleteIds, AutocompleteDataTids } from '../Autocomplete'; +import type { AutocompleteProps } from '../Autocomplete'; +import { Autocomplete, AutocompleteIds, AutocompleteDataTids } from '../Autocomplete'; import { delay, clickOutside } from '../../../lib/utils'; describe('', () => { diff --git a/packages/react-ui/components/Autocomplete/getAutocompleteTheme.ts b/packages/react-ui/components/Autocomplete/getAutocompleteTheme.ts index 34c60c5e660..f7fbb31bd14 100644 --- a/packages/react-ui/components/Autocomplete/getAutocompleteTheme.ts +++ b/packages/react-ui/components/Autocomplete/getAutocompleteTheme.ts @@ -1,5 +1,5 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const getAutocompleteTheme = (theme: Theme): Theme => { return ThemeFactory.create( diff --git a/packages/react-ui/components/Autocomplete/locale/index.ts b/packages/react-ui/components/Autocomplete/locale/index.ts index 26288837847..256ac2d662c 100644 --- a/packages/react-ui/components/Autocomplete/locale/index.ts +++ b/packages/react-ui/components/Autocomplete/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { AutocompleteLocale } from './types'; +import type { AutocompleteLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/Autocomplete/locale/locales/en.ts b/packages/react-ui/components/Autocomplete/locale/locales/en.ts index 8321af947b3..9a2c759b960 100644 --- a/packages/react-ui/components/Autocomplete/locale/locales/en.ts +++ b/packages/react-ui/components/Autocomplete/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { AutocompleteLocale } from '../types'; +import type { AutocompleteLocale } from '../types'; export const componentsLocales: AutocompleteLocale = { enterValue: 'Start typing', diff --git a/packages/react-ui/components/Autocomplete/locale/locales/ru.ts b/packages/react-ui/components/Autocomplete/locale/locales/ru.ts index 6136c3a3e0c..3d3990cf5b0 100644 --- a/packages/react-ui/components/Autocomplete/locale/locales/ru.ts +++ b/packages/react-ui/components/Autocomplete/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { AutocompleteLocale } from '../types'; +import type { AutocompleteLocale } from '../types'; export const componentsLocales: AutocompleteLocale = { enterValue: 'Начните вводить значение', diff --git a/packages/react-ui/components/Button/Button.styles.ts b/packages/react-ui/components/Button/Button.styles.ts index e1ac8e9a71f..3e6d206fd90 100644 --- a/packages/react-ui/components/Button/Button.styles.ts +++ b/packages/react-ui/components/Button/Button.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle, prefix } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { resetButton, resetText } from '../../lib/styles/Mixins'; import { diff --git a/packages/react-ui/components/Button/Button.tsx b/packages/react-ui/components/Button/Button.tsx index 4722b68777d..216af0ab2e4 100644 --- a/packages/react-ui/components/Button/Button.tsx +++ b/packages/react-ui/components/Button/Button.tsx @@ -1,23 +1,27 @@ -import React, { HTMLAttributes } from 'react'; +import type { HTMLAttributes } from 'react'; +import React from 'react'; import { globalObject } from '@skbkontur/global-object'; -import { ButtonLinkAllowedValues } from '../../lib/types/button-link'; +import type { ButtonLinkAllowedValues } from '../../lib/types/button-link'; import { isKonturIcon, isReactUIComponent } from '../../lib/utils'; import { isIE11, isEdge, isSafari } from '../../lib/client'; import { keyListener } from '../../lib/events/keyListener'; -import { Theme, ThemeIn } from '../../lib/theming/Theme'; +import type { Theme, ThemeIn } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { CommonWrapper, CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { Link } from '../Link'; -import { SizeProp } from '../../lib/types/props'; -import { PolymorphicPropsWithoutRef } from '../../lib/types/polymorphic-component'; +import type { SizeProp } from '../../lib/types/props'; +import type { PolymorphicPropsWithoutRef } from '../../lib/types/polymorphic-component'; import { styles, activeStyles, globalClasses } from './Button.styles'; -import { ButtonIcon, ButtonIconProps, getButtonIconSizes } from './ButtonIcon'; +import type { ButtonIconProps } from './ButtonIcon'; +import { ButtonIcon, getButtonIconSizes } from './ButtonIcon'; import { useButtonArrow } from './ButtonArrow'; import { getInnerLinkTheme } from './getInnerLinkTheme'; import { LoadingButtonIcon } from './LoadingButtonIcon'; @@ -290,7 +294,6 @@ export class Button { it('has id attribute', () => { diff --git a/packages/react-ui/components/Button/getInnerLinkTheme.ts b/packages/react-ui/components/Button/getInnerLinkTheme.ts index 38a702a3f33..4441dca9e1d 100644 --- a/packages/react-ui/components/Button/getInnerLinkTheme.ts +++ b/packages/react-ui/components/Button/getInnerLinkTheme.ts @@ -1,5 +1,5 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const getInnerLinkTheme = (theme: Theme): Theme => { return ThemeFactory.create( diff --git a/packages/react-ui/components/Calendar/Calendar.styles.ts b/packages/react-ui/components/Calendar/Calendar.styles.ts index a4700654df6..f2c910ced0a 100644 --- a/packages/react-ui/components/Calendar/Calendar.styles.ts +++ b/packages/react-ui/components/Calendar/Calendar.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ root(t: Theme) { diff --git a/packages/react-ui/components/Calendar/Calendar.tsx b/packages/react-ui/components/Calendar/Calendar.tsx index d2fa01d6c4d..59c4ef6673c 100644 --- a/packages/react-ui/components/Calendar/Calendar.tsx +++ b/packages/react-ui/components/Calendar/Calendar.tsx @@ -2,16 +2,19 @@ import React from 'react'; import normalizeWheel from 'normalize-wheel'; import throttle from 'lodash.throttle'; import shallowEqual from 'shallowequal'; -import { globalObject, SafeTimer } from '@skbkontur/global-object'; +import type { SafeTimer } from '@skbkontur/global-object'; +import { globalObject } from '@skbkontur/global-object'; import { isInstanceOf } from '../../lib/isInstanceOf'; import { InternalDate } from '../../lib/date/InternalDate'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { cx } from '../../lib/theming/Emotion'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { MAX_DATE, MAX_MONTH, MAX_YEAR, MIN_DATE, MIN_MONTH, MIN_YEAR } from '../../lib/date/constants'; -import { Nullable, Range } from '../../typings/utility-types'; -import { Theme } from '../../lib/theming/Theme'; +import type { Nullable, Range } from '../../typings/utility-types'; +import type { Theme } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { animation } from '../../lib/animation'; import { isMobile } from '../../lib/client'; @@ -23,10 +26,13 @@ import { MonthViewModel } from './MonthViewModel'; import * as CalendarScrollEvents from './CalendarScrollEvents'; import { Month } from './Month'; import { styles } from './Calendar.styles'; -import { CalendarDateShape, create, isGreater, isLess } from './CalendarDateShape'; +import type { CalendarDateShape } from './CalendarDateShape'; +import { create, isGreater, isLess } from './CalendarDateShape'; import * as CalendarUtils from './CalendarUtils'; -import { CalendarContext, CalendarContextProps } from './CalendarContext'; -import { CalendarDay, CalendarDayProps } from './CalendarDay'; +import type { CalendarContextProps } from './CalendarContext'; +import { CalendarContext } from './CalendarContext'; +import type { CalendarDayProps } from './CalendarDay'; +import { CalendarDay } from './CalendarDay'; export interface CalendarProps extends CommonProps { /** diff --git a/packages/react-ui/components/Calendar/CalendarContext.ts b/packages/react-ui/components/Calendar/CalendarContext.ts index d6bdc24a975..158d0ec5639 100644 --- a/packages/react-ui/components/Calendar/CalendarContext.ts +++ b/packages/react-ui/components/Calendar/CalendarContext.ts @@ -1,7 +1,7 @@ import { createContext } from 'react'; -import { CalendarDateShape } from './CalendarDateShape'; -import { CalendarProps } from './Calendar'; +import type { CalendarDateShape } from './CalendarDateShape'; +import type { CalendarProps } from './Calendar'; export interface CalendarContextProps { renderDay?: CalendarProps['renderDay']; diff --git a/packages/react-ui/components/Calendar/CalendarDateShape.ts b/packages/react-ui/components/Calendar/CalendarDateShape.ts index f18b2d222a4..25189ebb87c 100644 --- a/packages/react-ui/components/Calendar/CalendarDateShape.ts +++ b/packages/react-ui/components/Calendar/CalendarDateShape.ts @@ -1,4 +1,4 @@ -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; export interface CalendarDateShape { year: number; diff --git a/packages/react-ui/components/Calendar/CalendarDay.tsx b/packages/react-ui/components/Calendar/CalendarDay.tsx index 8e491891ee5..6fc0fac5023 100644 --- a/packages/react-ui/components/Calendar/CalendarDay.tsx +++ b/packages/react-ui/components/Calendar/CalendarDay.tsx @@ -1,4 +1,5 @@ -import React, { PropsWithChildren, useContext, memo } from 'react'; +import type { PropsWithChildren } from 'react'; +import React, { useContext, memo } from 'react'; import { useLocaleForControl } from '../../lib/locale/useLocaleForControl'; import { ThemeContext } from '../../lib/theming/ThemeContext'; diff --git a/packages/react-ui/components/Calendar/CalendarUtils.ts b/packages/react-ui/components/Calendar/CalendarUtils.ts index 7579a65505e..9a9610ab6e9 100644 --- a/packages/react-ui/components/Calendar/CalendarUtils.ts +++ b/packages/react-ui/components/Calendar/CalendarUtils.ts @@ -1,10 +1,11 @@ -import { Nullable } from '../../typings/utility-types'; -import { Theme } from '../../lib/theming/Theme'; +import type { Nullable } from '../../typings/utility-types'; +import type { Theme } from '../../lib/theming/Theme'; import { themeConfig } from './config'; import { MonthViewModel } from './MonthViewModel'; -import { CalendarState } from './Calendar'; -import { CalendarDateShape, isGreater, isLess } from './CalendarDateShape'; +import type { CalendarState } from './Calendar'; +import type { CalendarDateShape } from './CalendarDateShape'; +import { isGreater, isLess } from './CalendarDateShape'; export const calculateScrollPosition = ( months: MonthViewModel[], diff --git a/packages/react-ui/components/Calendar/DayCellView.styles.ts b/packages/react-ui/components/Calendar/DayCellView.styles.ts index 71914ec1fbc..0315fe195e5 100644 --- a/packages/react-ui/components/Calendar/DayCellView.styles.ts +++ b/packages/react-ui/components/Calendar/DayCellView.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { resetButton } from '../../lib/styles/Mixins'; export const styles = memoizeStyle({ diff --git a/packages/react-ui/components/Calendar/DayCellView.tsx b/packages/react-ui/components/Calendar/DayCellView.tsx index 2a2b22efe32..9288390ce40 100644 --- a/packages/react-ui/components/Calendar/DayCellView.tsx +++ b/packages/react-ui/components/Calendar/DayCellView.tsx @@ -5,9 +5,10 @@ import { InternalDateTransformer } from '../../lib/date/InternalDateTransformer' import { styles } from './DayCellView.styles'; import { CalendarContext } from './CalendarContext'; -import { DayCellViewModel } from './DayCellViewModel'; +import type { DayCellViewModel } from './DayCellViewModel'; import * as CDS from './CalendarDateShape'; -import { CalendarDay, CalendarDayProps } from './CalendarDay'; +import type { CalendarDayProps } from './CalendarDay'; +import { CalendarDay } from './CalendarDay'; export interface DayCellViewProps { date: DayCellViewModel; diff --git a/packages/react-ui/components/Calendar/Month.tsx b/packages/react-ui/components/Calendar/Month.tsx index 293322ee42b..d134d8100db 100644 --- a/packages/react-ui/components/Calendar/Month.tsx +++ b/packages/react-ui/components/Calendar/Month.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { DateSelect } from '../../internal/DateSelect'; +import type { Theme } from '../../lib/theming/Theme'; +import type { DateSelect } from '../../internal/DateSelect'; -import { MonthViewModel } from './MonthViewModel'; -import { DayCellViewModel } from './DayCellViewModel'; +import type { MonthViewModel } from './MonthViewModel'; +import type { DayCellViewModel } from './DayCellViewModel'; import { MonthView } from './MonthView'; import { DayCellView } from './DayCellView'; import * as CalendarScrollEvents from './CalendarScrollEvents'; diff --git a/packages/react-ui/components/Calendar/MonthView.styles.ts b/packages/react-ui/components/Calendar/MonthView.styles.ts index 8f8a597e32b..cb10d5693ea 100644 --- a/packages/react-ui/components/Calendar/MonthView.styles.ts +++ b/packages/react-ui/components/Calendar/MonthView.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ headerMonth(t: Theme) { diff --git a/packages/react-ui/components/Calendar/MonthView.tsx b/packages/react-ui/components/Calendar/MonthView.tsx index dd12971f193..081dc15c4fd 100644 --- a/packages/react-ui/components/Calendar/MonthView.tsx +++ b/packages/react-ui/components/Calendar/MonthView.tsx @@ -4,7 +4,7 @@ import { ThemeContext } from '../../lib/theming/ThemeContext'; import * as ColorFunctions from '../../lib/styles/ColorFunctions'; import { cx } from '../../lib/theming/Emotion'; import { useResponsiveLayout } from '../../components/ResponsiveLayout'; -import { Nullable } from '../..//typings/utility-types'; +import type { Nullable } from '../..//typings/utility-types'; import { DateSelect } from '../../internal/DateSelect'; import { styles } from './MonthView.styles'; diff --git a/packages/react-ui/components/Calendar/MonthViewModel.ts b/packages/react-ui/components/Calendar/MonthViewModel.ts index d47ec2d3223..cb10ad3383f 100644 --- a/packages/react-ui/components/Calendar/MonthViewModel.ts +++ b/packages/react-ui/components/Calendar/MonthViewModel.ts @@ -1,5 +1,5 @@ import { memo } from '../../lib/memo'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { getMonthInHumanFormat } from './CalendarUtils'; import { themeConfig } from './config'; diff --git a/packages/react-ui/components/Calendar/__stories__/Calendar.stories.tsx b/packages/react-ui/components/Calendar/__stories__/Calendar.stories.tsx index 4021248b13c..3db5e03257d 100644 --- a/packages/react-ui/components/Calendar/__stories__/Calendar.stories.tsx +++ b/packages/react-ui/components/Calendar/__stories__/Calendar.stories.tsx @@ -1,8 +1,9 @@ import React, { useCallback, useContext, useState } from 'react'; import { action } from '@storybook/addon-actions'; -import { Calendar, CalendarDay, CalendarDayProps } from '../'; -import { Story } from '../../../typings/stories'; +import type { CalendarDayProps } from '../'; +import { Calendar, CalendarDay } from '../'; +import type { Story } from '../../../typings/stories'; import { Gapped } from '../../Gapped'; import { LocaleContext } from '../../../lib/locale'; import { InternalDateOrder, InternalDateSeparator } from '../../../lib/date/types'; diff --git a/packages/react-ui/components/Calendar/__tests__/Calendar.test.tsx b/packages/react-ui/components/Calendar/__tests__/Calendar.test.tsx index b9154370851..d570548f27d 100644 --- a/packages/react-ui/components/Calendar/__tests__/Calendar.test.tsx +++ b/packages/react-ui/components/Calendar/__tests__/Calendar.test.tsx @@ -9,7 +9,8 @@ import { SelectDataTids } from '../../Select'; import { LangCodes, LocaleContext } from '../../../lib/locale'; import { CalendarDataTids } from '..'; import { CalendarLocaleHelper } from '../locale'; -import { CalendarDay, CalendarDayProps } from '../CalendarDay'; +import type { CalendarDayProps } from '../CalendarDay'; +import { CalendarDay } from '../CalendarDay'; describe('Calendar', () => { it('renders', () => { diff --git a/packages/react-ui/components/Calendar/config.ts b/packages/react-ui/components/Calendar/config.ts index 27e99861f09..fe1f987b930 100644 --- a/packages/react-ui/components/Calendar/config.ts +++ b/packages/react-ui/components/Calendar/config.ts @@ -1,4 +1,4 @@ -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { memo } from '../../lib/memo'; const getConfig = memo( diff --git a/packages/react-ui/components/Calendar/locale/index.ts b/packages/react-ui/components/Calendar/locale/index.ts index c11addcfaef..8a6d5ba47e1 100644 --- a/packages/react-ui/components/Calendar/locale/index.ts +++ b/packages/react-ui/components/Calendar/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { CalendarLocale } from './types'; +import type { CalendarLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/Calendar/locale/locales/en.ts b/packages/react-ui/components/Calendar/locale/locales/en.ts index 5cf9151e730..454e8f604c0 100644 --- a/packages/react-ui/components/Calendar/locale/locales/en.ts +++ b/packages/react-ui/components/Calendar/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { CalendarLocale } from '../types'; +import type { CalendarLocale } from '../types'; export const componentsLocales: CalendarLocale = { months: [ diff --git a/packages/react-ui/components/Calendar/locale/locales/ru.ts b/packages/react-ui/components/Calendar/locale/locales/ru.ts index 450cdeaec7c..9edca6de567 100644 --- a/packages/react-ui/components/Calendar/locale/locales/ru.ts +++ b/packages/react-ui/components/Calendar/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { CalendarLocale } from '../types'; +import type { CalendarLocale } from '../types'; export const componentsLocales: CalendarLocale = { months: [ diff --git a/packages/react-ui/components/Center/Center.tsx b/packages/react-ui/components/Center/Center.tsx index b14701260ce..d8f5063a525 100644 --- a/packages/react-ui/components/Center/Center.tsx +++ b/packages/react-ui/components/Center/Center.tsx @@ -1,10 +1,13 @@ import React from 'react'; -import { Override } from '../../typings/utility-types'; -import { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import type { Override } from '../../typings/utility-types'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; -import { createPropsGetter, DefaultizedProps } from '../../lib/createPropsGetter'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; +import type { DefaultizedProps } from '../../lib/createPropsGetter'; +import { createPropsGetter } from '../../lib/createPropsGetter'; import { styles } from './Center.styles'; diff --git a/packages/react-ui/components/Checkbox/Checkbox.styles.ts b/packages/react-ui/components/Checkbox/Checkbox.styles.ts index eda5f0dc014..f2871101b37 100644 --- a/packages/react-ui/components/Checkbox/Checkbox.styles.ts +++ b/packages/react-ui/components/Checkbox/Checkbox.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle, prefix } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { boxWrapperSizeMixin, checkboxSizeMixin } from './Checkbox.mixins'; diff --git a/packages/react-ui/components/Checkbox/Checkbox.tsx b/packages/react-ui/components/Checkbox/Checkbox.tsx index 397ef7ca63d..7dca94de6de 100644 --- a/packages/react-ui/components/Checkbox/Checkbox.tsx +++ b/packages/react-ui/components/Checkbox/Checkbox.tsx @@ -1,18 +1,21 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { globalObject } from '@skbkontur/global-object'; -import { Override } from '../../typings/utility-types'; +import type { Override } from '../../typings/utility-types'; import { keyListener } from '../../lib/events/keyListener'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { isEdge, isIE11 } from '../../lib/client'; -import { CommonWrapper, CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { fixFirefoxModifiedClickOnLabel } from '../../lib/events/fixFirefoxModifiedClickOnLabel'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { FocusControlWrapper } from '../../internal/FocusControlWrapper'; import { styles, globalClasses } from './Checkbox.styles'; diff --git a/packages/react-ui/components/Checkbox/__stories__/Checkbox.stories.tsx b/packages/react-ui/components/Checkbox/__stories__/Checkbox.stories.tsx index 1c03d55c9f8..a312433097d 100644 --- a/packages/react-ui/components/Checkbox/__stories__/Checkbox.stories.tsx +++ b/packages/react-ui/components/Checkbox/__stories__/Checkbox.stories.tsx @@ -1,10 +1,10 @@ import React, { useState } from 'react'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { Checkbox } from '../Checkbox'; import { Gapped } from '../../Gapped'; -import { Nullable } from '../../../typings/utility-types'; -import { SizeProp } from '../../../lib/types/props'; +import type { Nullable } from '../../../typings/utility-types'; +import type { SizeProp } from '../../../lib/types/props'; interface PlainCheckboxState { checked: false; diff --git a/packages/react-ui/components/ComboBox/ComboBox.tsx b/packages/react-ui/components/ComboBox/ComboBox.tsx index 7dc22f120f5..3462fdf5996 100644 --- a/packages/react-ui/components/ComboBox/ComboBox.tsx +++ b/packages/react-ui/components/ComboBox/ComboBox.tsx @@ -1,13 +1,15 @@ -import React, { AriaAttributes, HTMLAttributes } from 'react'; +import type { AriaAttributes, HTMLAttributes } from 'react'; +import React from 'react'; import { CustomComboBox } from '../../internal/CustomComboBox'; -import { Nullable } from '../../typings/utility-types'; -import { MenuItemState } from '../MenuItem'; -import { InputIconType } from '../Input'; -import { CommonProps } from '../../internal/CommonWrapper'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { Nullable } from '../../typings/utility-types'; +import type { MenuItemState } from '../MenuItem'; +import type { InputIconType } from '../Input'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; export interface ComboBoxProps extends Pick, diff --git a/packages/react-ui/components/ComboBox/__stories__/Combobox.stories.tsx b/packages/react-ui/components/ComboBox/__stories__/Combobox.stories.tsx index 3655538f477..38a84c02f4a 100644 --- a/packages/react-ui/components/ComboBox/__stories__/Combobox.stories.tsx +++ b/packages/react-ui/components/ComboBox/__stories__/Combobox.stories.tsx @@ -5,18 +5,21 @@ import { action } from '@storybook/addon-actions'; import BabyIcon from '@skbkontur/react-icons/Baby'; import SearchIcon from '@skbkontur/react-icons/Search'; -import { Meta, Story } from '../../../typings/stories'; -import { ComboBox, ComboBoxProps } from '../ComboBox'; -import { MenuItem, MenuItemState } from '../../MenuItem'; +import type { Meta, Story } from '../../../typings/stories'; +import type { ComboBoxProps } from '../ComboBox'; +import { ComboBox } from '../ComboBox'; +import type { MenuItemState } from '../../MenuItem'; +import { MenuItem } from '../../MenuItem'; import { MenuSeparator } from '../../MenuSeparator'; -import { Nullable } from '../../../typings/utility-types'; +import type { Nullable } from '../../../typings/utility-types'; import { Toggle } from '../../Toggle'; import { Button } from '../../Button'; import { Gapped } from '../../Gapped'; import { MenuHeader } from '../../MenuHeader'; import { mergeRefs } from '../../../lib/utils'; import { Tooltip } from '../../Tooltip'; -import { rootNode, TSetRootNode } from '../../../lib/rootNode'; +import type { TSetRootNode } from '../../../lib/rootNode'; +import { rootNode } from '../../../lib/rootNode'; const { getCities } = require('../__mocks__/getCities.js'); diff --git a/packages/react-ui/components/ComboBox/__tests__/ComboBox-test.tsx b/packages/react-ui/components/ComboBox/__tests__/ComboBox-test.tsx index 3b7e40853ac..f36e0d2f5f9 100644 --- a/packages/react-ui/components/ComboBox/__tests__/ComboBox-test.tsx +++ b/packages/react-ui/components/ComboBox/__tests__/ComboBox-test.tsx @@ -6,11 +6,12 @@ import userEvent from '@testing-library/user-event'; import { MobilePopupDataTids } from '../../../internal/MobilePopup'; import { LIGHT_THEME } from '../../../lib/theming/themes/LightTheme'; -import { HTMLProps } from '../../../typings/html'; +import type { HTMLProps } from '../../../typings/html'; import { InputDataTids } from '../../Input'; import { MenuMessageDataTids } from '../../../internal/MenuMessage'; import { CustomComboBoxLocaleHelper } from '../../../internal/CustomComboBox/locale'; -import { LangCodes, LocaleContext, LocaleContextProps } from '../../../lib/locale'; +import type { LocaleContextProps } from '../../../lib/locale'; +import { LangCodes, LocaleContext } from '../../../lib/locale'; import { defaultLangCode } from '../../../lib/locale/constants'; import { ComboBox } from '../ComboBox'; import { InputLikeTextDataTids } from '../../../internal/InputLikeText'; @@ -20,7 +21,7 @@ import { clickOutside, delay } from '../../../lib/utils'; import { ComboBoxMenuDataTids, DELAY_BEFORE_SHOW_LOADER, LOADER_SHOW_TIME } from '../../../internal/CustomComboBox'; import { ComboBoxViewIds } from '../../../internal/CustomComboBox/ComboBoxView'; import { SpinnerDataTids } from '../../Spinner'; -import { ComboBoxItem } from '..'; +import type { ComboBoxItem } from '..'; import { ReactUIFeatureFlagsContext } from '../../../lib/featureFlagsContext'; function searchFactory(promise: Promise): [jest.Mock>, Promise] { diff --git a/packages/react-ui/components/CurrencyInput/CurrencyHelper.tsx b/packages/react-ui/components/CurrencyInput/CurrencyHelper.tsx index 1bb27236dc8..8e887f4ce61 100644 --- a/packages/react-ui/components/CurrencyInput/CurrencyHelper.tsx +++ b/packages/react-ui/components/CurrencyInput/CurrencyHelper.tsx @@ -1,9 +1,9 @@ import { isNonNullable, isNullable } from '../../lib/utils'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { isSafari } from '../../lib/client'; -import { DecimalOptions } from './CurrencyInputHelper'; -import { CursorMap } from './CursorHelper'; +import type { DecimalOptions } from './CurrencyInputHelper'; +import type { CursorMap } from './CursorHelper'; import { MAX_ALLOWED_CHARS, MAX_SAFE_DIGITS, MINUS_SIGN, SPACE, THIN_SPACE } from './constants'; export interface DecimalFormattingOptions { diff --git a/packages/react-ui/components/CurrencyInput/CurrencyInput.tsx b/packages/react-ui/components/CurrencyInput/CurrencyInput.tsx index e49b25201e0..28cb025d9cd 100644 --- a/packages/react-ui/components/CurrencyInput/CurrencyInput.tsx +++ b/packages/react-ui/components/CurrencyInput/CurrencyInput.tsx @@ -1,4 +1,5 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import warning from 'warning'; import debounce from 'lodash.debounce'; @@ -6,16 +7,20 @@ import { globalObject } from '@skbkontur/global-object'; import { isNonNullable, isNullable } from '../../lib/utils'; import { isIE11 } from '../../lib/client'; -import { Input, InputProps } from '../Input'; -import { Nullable, Override } from '../../typings/utility-types'; -import { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../internal/CommonWrapper'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { InputProps } from '../Input'; +import { Input } from '../Input'; +import type { Nullable, Override } from '../../typings/utility-types'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { isInstanceOf } from '../../lib/isInstanceOf'; import { FocusControlWrapper } from '../../internal/FocusControlWrapper'; import { MAX_SAFE_DIGITS } from './constants'; -import { Selection, SelectionDirection, SelectionHelper } from './SelectionHelper'; +import type { Selection, SelectionDirection } from './SelectionHelper'; +import { SelectionHelper } from './SelectionHelper'; import { CurrencyHelper } from './CurrencyHelper'; import { CurrencyInputHelper } from './CurrencyInputHelper'; import { CURRENCY_INPUT_ACTIONS, extractAction } from './CurrencyInputKeyboardActions'; diff --git a/packages/react-ui/components/CurrencyInput/CurrencyInputHelper.tsx b/packages/react-ui/components/CurrencyInput/CurrencyInputHelper.tsx index 7c20182bcdc..cd6f068b60e 100644 --- a/packages/react-ui/components/CurrencyInput/CurrencyInputHelper.tsx +++ b/packages/react-ui/components/CurrencyInput/CurrencyInputHelper.tsx @@ -1,6 +1,6 @@ -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; -import { Selection } from './SelectionHelper'; +import type { Selection } from './SelectionHelper'; import { CurrencyHelper } from './CurrencyHelper'; import { CursorHelper } from './CursorHelper'; diff --git a/packages/react-ui/components/CurrencyInput/CursorHelper.tsx b/packages/react-ui/components/CurrencyInput/CursorHelper.tsx index 50f40bf1190..6f5e8dc90b9 100644 --- a/packages/react-ui/components/CurrencyInput/CursorHelper.tsx +++ b/packages/react-ui/components/CurrencyInput/CursorHelper.tsx @@ -1,4 +1,4 @@ -import { Selection } from './SelectionHelper'; +import type { Selection } from './SelectionHelper'; export type CursorMap = number[]; diff --git a/packages/react-ui/components/CurrencyInput/__stories__/CurrencyInput.stories.tsx b/packages/react-ui/components/CurrencyInput/__stories__/CurrencyInput.stories.tsx index fbe1956b2e2..15060f6926d 100644 --- a/packages/react-ui/components/CurrencyInput/__stories__/CurrencyInput.stories.tsx +++ b/packages/react-ui/components/CurrencyInput/__stories__/CurrencyInput.stories.tsx @@ -3,12 +3,13 @@ import React from 'react'; import { isNullable } from '../../../lib/utils'; -import { Meta, Story } from '../../../typings/stories'; -import { CurrencyInput, CurrencyInputProps } from '../CurrencyInput'; +import type { Meta, Story } from '../../../typings/stories'; +import type { CurrencyInputProps } from '../CurrencyInput'; +import { CurrencyInput } from '../CurrencyInput'; import { Gapped } from '../../Gapped'; import { Button } from '../../Button'; import { Toggle } from '../../Toggle'; -import { Nullable } from '../../../typings/utility-types'; +import type { Nullable } from '../../../typings/utility-types'; interface CurrencyInputDemoProps { borderless?: boolean; diff --git a/packages/react-ui/components/CurrencyInput/__tests__/CurrencyInput-test.tsx b/packages/react-ui/components/CurrencyInput/__tests__/CurrencyInput-test.tsx index c7bd4454dd6..29b8793761d 100644 --- a/packages/react-ui/components/CurrencyInput/__tests__/CurrencyInput-test.tsx +++ b/packages/react-ui/components/CurrencyInput/__tests__/CurrencyInput-test.tsx @@ -3,7 +3,7 @@ import { act, fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { CurrencyInput } from '../CurrencyInput'; -import { Nullable } from '../../../typings/utility-types'; +import type { Nullable } from '../../../typings/utility-types'; const CurrencyInputWithValueProp = (props: { value: any }): JSX.Element => { const handleValueChange = jest.fn(); diff --git a/packages/react-ui/components/CurrencyInput/__tests__/CursorHelper-test.tsx b/packages/react-ui/components/CurrencyInput/__tests__/CursorHelper-test.tsx index 016d82373b2..d26d97f16df 100644 --- a/packages/react-ui/components/CurrencyInput/__tests__/CursorHelper-test.tsx +++ b/packages/react-ui/components/CurrencyInput/__tests__/CursorHelper-test.tsx @@ -1,5 +1,5 @@ import { CursorHelper } from '../CursorHelper'; -import { Selection } from '../SelectionHelper'; +import type { Selection } from '../SelectionHelper'; describe('CursorHelper', () => { describe('toRawPosition', () => { diff --git a/packages/react-ui/components/CurrencyLabel/CurrencyLabel.tsx b/packages/react-ui/components/CurrencyLabel/CurrencyLabel.tsx index 1f8401987f7..6dc75bc27b9 100644 --- a/packages/react-ui/components/CurrencyLabel/CurrencyLabel.tsx +++ b/packages/react-ui/components/CurrencyLabel/CurrencyLabel.tsx @@ -1,8 +1,10 @@ -import React, { HTMLAttributes } from 'react'; +import type { HTMLAttributes } from 'react'; +import React from 'react'; import { MAX_SAFE_DIGITS } from '../CurrencyInput/constants'; import { CurrencyHelper } from '../CurrencyInput/CurrencyHelper'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; export interface CurrencyLabelProps extends CommonProps, Pick, 'id'> { /** diff --git a/packages/react-ui/components/DateInput/DateFragmentsView.styles.ts b/packages/react-ui/components/DateInput/DateFragmentsView.styles.ts index 3fd529f9c49..31ad55a518c 100644 --- a/packages/react-ui/components/DateInput/DateFragmentsView.styles.ts +++ b/packages/react-ui/components/DateInput/DateFragmentsView.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ root() { diff --git a/packages/react-ui/components/DateInput/DateFragmentsView.tsx b/packages/react-ui/components/DateInput/DateFragmentsView.tsx index 0391f2010e9..806edf1c1a7 100644 --- a/packages/react-ui/components/DateInput/DateFragmentsView.tsx +++ b/packages/react-ui/components/DateInput/DateFragmentsView.tsx @@ -3,8 +3,9 @@ import { globalObject } from '@skbkontur/global-object'; import { MaskCharLowLine } from '../../internal/MaskCharLowLine'; import { InternalDateValidator } from '../../lib/date/InternalDateValidator'; -import { InternalDateComponentType, InternalDateFragment } from '../../lib/date/types'; -import { Theme } from '../../lib/theming/Theme'; +import type { InternalDateFragment } from '../../lib/date/types'; +import { InternalDateComponentType } from '../../lib/date/types'; +import type { Theme } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { cx } from '../../lib/theming/Emotion'; diff --git a/packages/react-ui/components/DateInput/DateInput.styles.ts b/packages/react-ui/components/DateInput/DateInput.styles.ts index a350d0544b3..f96b6b01968 100644 --- a/packages/react-ui/components/DateInput/DateInput.styles.ts +++ b/packages/react-ui/components/DateInput/DateInput.styles.ts @@ -1,5 +1,5 @@ import { css } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = { icon(t: Theme) { diff --git a/packages/react-ui/components/DateInput/DateInput.tsx b/packages/react-ui/components/DateInput/DateInput.tsx index dbdb3c808bf..9bd87768411 100644 --- a/packages/react-ui/components/DateInput/DateInput.tsx +++ b/packages/react-ui/components/DateInput/DateInput.tsx @@ -1,20 +1,24 @@ -import React, { HTMLAttributes } from 'react'; +import type { HTMLAttributes } from 'react'; +import React from 'react'; import ReactDOM from 'react-dom'; import { globalObject } from '@skbkontur/global-object'; import { ConditionalHandler } from '../../lib/ConditionalHandler'; import { LENGTH_FULLDATE, MAX_FULLDATE, MIN_FULLDATE } from '../../lib/date/constants'; import { InternalDateComponentType } from '../../lib/date/types'; -import { Theme } from '../../lib/theming/Theme'; -import { DatePickerLocale, DatePickerLocaleHelper } from '../DatePicker/locale'; +import type { Theme } from '../../lib/theming/Theme'; +import type { DatePickerLocale } from '../DatePicker/locale'; +import { DatePickerLocaleHelper } from '../DatePicker/locale'; import { InputLikeText } from '../../internal/InputLikeText'; import { locale } from '../../lib/locale/decorators'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { FocusControlWrapper } from '../../internal/FocusControlWrapper'; import { CalendarIcon } from './CalendarIcon'; diff --git a/packages/react-ui/components/DateInput/__stories__/DateInput.stories.tsx b/packages/react-ui/components/DateInput/__stories__/DateInput.stories.tsx index b428e38c7ba..25d0d2d53fc 100644 --- a/packages/react-ui/components/DateInput/__stories__/DateInput.stories.tsx +++ b/packages/react-ui/components/DateInput/__stories__/DateInput.stories.tsx @@ -1,11 +1,12 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { InternalDateOrder, InternalDateSeparator } from '../../../lib/date/types'; import { Gapped } from '../../Gapped'; import { Select } from '../../Select'; -import { DateInput, DateInputProps } from '../DateInput'; +import type { DateInputProps } from '../DateInput'; +import { DateInput } from '../DateInput'; import { LangCodes, LocaleContext } from '../../../lib/locale'; import { defaultLangCode } from '../../../lib/locale/constants'; import { InternalDateGetter } from '../../../lib/date/InternalDateGetter'; diff --git a/packages/react-ui/components/DateInput/__tests__/DateInput-test.tsx b/packages/react-ui/components/DateInput/__tests__/DateInput-test.tsx index b924d5c0488..874f714dcdc 100644 --- a/packages/react-ui/components/DateInput/__tests__/DateInput-test.tsx +++ b/packages/react-ui/components/DateInput/__tests__/DateInput-test.tsx @@ -4,10 +4,13 @@ import userEvent from '@testing-library/user-event'; import { InputLikeTextDataTids } from '../../../internal/InputLikeText'; import { MASK_CHAR_EXEMPLAR } from '../../../internal/MaskCharLowLine'; -import { DefaultizeProps, delay } from '../../../lib/utils'; +import type { DefaultizeProps } from '../../../lib/utils'; +import { delay } from '../../../lib/utils'; import { InternalDateOrder } from '../../../lib/date/types'; -import { DateInput, DateInputDataTids, DateInputProps } from '../DateInput'; -import { LocaleContext, LocaleContextProps } from '../../../lib/locale'; +import type { DateInputProps } from '../DateInput'; +import { DateInput, DateInputDataTids } from '../DateInput'; +import type { LocaleContextProps } from '../../../lib/locale'; +import { LocaleContext } from '../../../lib/locale'; type InitialDate = string; type PressedKeys = string[]; diff --git a/packages/react-ui/components/DateInput/helpers/DateInputKeyboardActions.tsx b/packages/react-ui/components/DateInput/helpers/DateInputKeyboardActions.tsx index edcfc0a6938..07bdf65a2d1 100644 --- a/packages/react-ui/components/DateInput/helpers/DateInputKeyboardActions.tsx +++ b/packages/react-ui/components/DateInput/helpers/DateInputKeyboardActions.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; import { SEPARATOR } from '../../../lib/date/constants'; import * as Keyboard from '../../../lib/events/keyboard/identifiers'; diff --git a/packages/react-ui/components/DateInput/helpers/InternalDateMediator.ts b/packages/react-ui/components/DateInput/helpers/InternalDateMediator.ts index 90835dfd80e..a96515b4c31 100644 --- a/packages/react-ui/components/DateInput/helpers/InternalDateMediator.ts +++ b/packages/react-ui/components/DateInput/helpers/InternalDateMediator.ts @@ -1,14 +1,10 @@ import { InternalDate } from '../../../lib/date/InternalDate'; import { InternalDateGetter } from '../../../lib/date/InternalDateGetter'; import { InternalDateTransformer } from '../../../lib/date/InternalDateTransformer'; -import { - InputKeyResult, - InternalDateComponentType, - InternalDateTypesOrder, - InternalDateValidateCheck, -} from '../../../lib/date/types'; -import { DatePickerLocale } from '../../DatePicker/locale'; -import { DateInputProps } from '../DateInput'; +import type { InputKeyResult, InternalDateTypesOrder } from '../../../lib/date/types'; +import { InternalDateComponentType, InternalDateValidateCheck } from '../../../lib/date/types'; +import type { DatePickerLocale } from '../../DatePicker/locale'; +import type { DateInputProps } from '../DateInput'; import { inputNumber } from './inputNumber'; diff --git a/packages/react-ui/components/DateInput/helpers/inputNumber.tsx b/packages/react-ui/components/DateInput/helpers/inputNumber.tsx index 9f6150ad18c..7a66311654d 100644 --- a/packages/react-ui/components/DateInput/helpers/inputNumber.tsx +++ b/packages/react-ui/components/DateInput/helpers/inputNumber.tsx @@ -1,5 +1,6 @@ import { LENGTH_DATE, LENGTH_MONTH, LENGTH_YEAR } from '../../../lib/date/constants'; -import { InternalDateComponentRaw, InternalDateComponentType } from '../../../lib/date/types'; +import type { InternalDateComponentRaw } from '../../../lib/date/types'; +import { InternalDateComponentType } from '../../../lib/date/types'; export const inputNumber = ( type: InternalDateComponentType | null, diff --git a/packages/react-ui/components/DatePicker/DatePicker.styles.ts b/packages/react-ui/components/DatePicker/DatePicker.styles.ts index 0f20d165ae2..e5d51dc4189 100644 --- a/packages/react-ui/components/DatePicker/DatePicker.styles.ts +++ b/packages/react-ui/components/DatePicker/DatePicker.styles.ts @@ -1,4 +1,4 @@ -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { css, memoizeStyle } from '../../lib/theming/Emotion'; export const styles = memoizeStyle({ diff --git a/packages/react-ui/components/DatePicker/DatePicker.tsx b/packages/react-ui/components/DatePicker/DatePicker.tsx index cd590ac11ee..616d685724c 100644 --- a/packages/react-ui/components/DatePicker/DatePicker.tsx +++ b/packages/react-ui/components/DatePicker/DatePicker.tsx @@ -1,5 +1,6 @@ import PropTypes from 'prop-types'; -import React, { HTMLAttributes } from 'react'; +import type { HTMLAttributes } from 'react'; +import React from 'react'; import { Popup } from '../../internal/Popup'; import { LocaleContext } from '../../lib/locale'; @@ -10,27 +11,31 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; import { InternalDate } from '../../lib/date/InternalDate'; import { MAX_FULLDATE, MIN_FULLDATE } from '../../lib/date/constants'; import { InternalDateOrder, InternalDateSeparator, InternalDateValidateCheck } from '../../lib/date/types'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { DateInput } from '../DateInput'; import { filterProps } from '../../lib/filterProps'; -import { CommonWrapper, CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { isMobile } from '../../lib/client'; import { NativeDateInput } from '../../internal/NativeDateInput'; -import { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, rootNode } from '../../lib/rootNode'; import { isNonNullable } from '../../lib/utils'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { Calendar, CalendarDateShape, CalendarProps } from '../Calendar'; +import type { CalendarDateShape, CalendarProps } from '../Calendar'; +import { Calendar } from '../Calendar'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { Button } from '../Button'; import { getTodayDate } from '../Calendar/CalendarUtils'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { responsiveLayout } from '../ResponsiveLayout/decorator'; import { getMenuPositions } from '../../lib/getMenuPositions'; import { ZIndex } from '../../internal/ZIndex'; import { styles } from './DatePicker.styles'; -import { DatePickerLocale, DatePickerLocaleHelper } from './locale'; +import type { DatePickerLocale } from './locale'; +import { DatePickerLocaleHelper } from './locale'; import { MobilePicker } from './MobilePicker'; const INPUT_PASS_PROPS = { diff --git a/packages/react-ui/components/DatePicker/DatePickerHelpers.tsx b/packages/react-ui/components/DatePicker/DatePickerHelpers.tsx index 04321bdf204..66be9cead50 100644 --- a/packages/react-ui/components/DatePicker/DatePickerHelpers.tsx +++ b/packages/react-ui/components/DatePicker/DatePickerHelpers.tsx @@ -1,4 +1,4 @@ -import { CalendarDateShape } from '../../components/Calendar/CalendarDateShape'; +import type { CalendarDateShape } from '../../components/Calendar/CalendarDateShape'; import { getMonthInHumanFormat } from '../Calendar/CalendarUtils'; export function formatDate({ date, month, year }: CalendarDateShape): string { diff --git a/packages/react-ui/components/DatePicker/MobilePicker.tsx b/packages/react-ui/components/DatePicker/MobilePicker.tsx index 347c3bd25ae..6fa57130daa 100644 --- a/packages/react-ui/components/DatePicker/MobilePicker.tsx +++ b/packages/react-ui/components/DatePicker/MobilePicker.tsx @@ -9,7 +9,7 @@ import { Button } from '../Button'; import { useLocaleForControl } from '../../lib/locale/useLocaleForControl'; import { useEffectWithoutInitCall } from '../../hooks/useEffectWithoutInitCall'; -import { DatePickerProps } from './DatePicker'; +import type { DatePickerProps } from './DatePicker'; import { DatePickerLocaleHelper } from './locale'; import { styles } from './MobilePicker.styles'; import { getMobilePickerTheme } from './getMobilePickerTheme'; diff --git a/packages/react-ui/components/DatePicker/__stories__/DatePicker.stories.tsx b/packages/react-ui/components/DatePicker/__stories__/DatePicker.stories.tsx index ff4b8b0535b..b84ff30ff96 100644 --- a/packages/react-ui/components/DatePicker/__stories__/DatePicker.stories.tsx +++ b/packages/react-ui/components/DatePicker/__stories__/DatePicker.stories.tsx @@ -3,8 +3,8 @@ import React, { useCallback, useState, useEffect } from 'react'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; import { LIGHT_THEME } from '../../../lib/theming/themes/LightTheme'; -import { Nullable } from '../../../typings/utility-types'; -import { Meta, Story } from '../../../typings/stories'; +import type { Nullable } from '../../../typings/utility-types'; +import type { Meta, Story } from '../../../typings/stories'; import { InternalDateOrder, InternalDateSeparator } from '../../../lib/date/types'; import { Button } from '../../Button'; import { Gapped } from '../../Gapped'; @@ -12,7 +12,7 @@ import { Tooltip } from '../../Tooltip'; import { DatePicker } from '../DatePicker'; import { LocaleContext, LangCodes } from '../../../lib/locale'; import { emptyHandler } from '../../../lib/utils'; -import { SizeProp } from '../../../lib/types/props'; +import type { SizeProp } from '../../../lib/types/props'; import { ThemeFactory } from '../../../lib/theming/ThemeFactory'; interface DatePickerWithErrorProps { diff --git a/packages/react-ui/components/DatePicker/__tests__/DatePicker-test.tsx b/packages/react-ui/components/DatePicker/__tests__/DatePicker-test.tsx index 004e563be33..e4c2d4fab9b 100644 --- a/packages/react-ui/components/DatePicker/__tests__/DatePicker-test.tsx +++ b/packages/react-ui/components/DatePicker/__tests__/DatePicker-test.tsx @@ -3,7 +3,8 @@ import { act, render, screen, waitFor, within, fireEvent } from '@testing-librar import userEvent from '@testing-library/user-event'; import { componentsLocales as DateSelectLocalesRu } from '../../../internal/DateSelect/locale/locales/ru'; -import { CalendarDataTids, CalendarDay, CalendarDayProps } from '../../Calendar'; +import type { CalendarDayProps } from '../../Calendar'; +import { CalendarDataTids, CalendarDay } from '../../Calendar'; import { MASK_CHAR_EXEMPLAR } from '../../../internal/MaskCharLowLine'; import { InputLikeTextDataTids } from '../../../internal/InputLikeText'; import { InternalDate } from '../../../lib/date/InternalDate'; diff --git a/packages/react-ui/components/DatePicker/getMobilePickerTheme.ts b/packages/react-ui/components/DatePicker/getMobilePickerTheme.ts index 1d42b14a43f..a83672dce69 100644 --- a/packages/react-ui/components/DatePicker/getMobilePickerTheme.ts +++ b/packages/react-ui/components/DatePicker/getMobilePickerTheme.ts @@ -1,5 +1,5 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const getMobilePickerTheme = (theme: Theme): Theme => { return ThemeFactory.create( diff --git a/packages/react-ui/components/DatePicker/locale/index.ts b/packages/react-ui/components/DatePicker/locale/index.ts index 6706b01e108..b8fd24bfe55 100644 --- a/packages/react-ui/components/DatePicker/locale/index.ts +++ b/packages/react-ui/components/DatePicker/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { DatePickerLocale } from './types'; +import type { DatePickerLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/DatePicker/locale/locales/en.ts b/packages/react-ui/components/DatePicker/locale/locales/en.ts index d64b02ede69..b6844bf3d68 100644 --- a/packages/react-ui/components/DatePicker/locale/locales/en.ts +++ b/packages/react-ui/components/DatePicker/locale/locales/en.ts @@ -1,6 +1,6 @@ import { internalDateLocale } from '../../../../lib/date/localeSets'; import { LangCodes } from '../../../../lib/locale'; -import { DatePickerLocale } from '../types'; +import type { DatePickerLocale } from '../types'; import { componentsLocales as CalendarLocales } from '../../../Calendar/locale/locales/en'; import { componentsLocales as DateSelectLocales } from '../../../../internal/DateSelect/locale/locales/en'; diff --git a/packages/react-ui/components/DatePicker/locale/locales/ru.ts b/packages/react-ui/components/DatePicker/locale/locales/ru.ts index 90f5ab3619e..cd4e90d5758 100644 --- a/packages/react-ui/components/DatePicker/locale/locales/ru.ts +++ b/packages/react-ui/components/DatePicker/locale/locales/ru.ts @@ -1,6 +1,6 @@ import { internalDateLocale } from '../../../../lib/date/localeSets'; import { LangCodes } from '../../../../lib/locale'; -import { DatePickerLocale } from '../types'; +import type { DatePickerLocale } from '../types'; import { componentsLocales as CalendarLocales } from '../../../Calendar/locale/locales/ru'; import { componentsLocales as DateSelectLocales } from '../../../../internal/DateSelect/locale/locales/ru'; diff --git a/packages/react-ui/components/DatePicker/locale/types.ts b/packages/react-ui/components/DatePicker/locale/types.ts index 15c19a1d337..479233f97ef 100644 --- a/packages/react-ui/components/DatePicker/locale/types.ts +++ b/packages/react-ui/components/DatePicker/locale/types.ts @@ -1,6 +1,6 @@ -import { DateSelectLocale } from '../../../internal/DateSelect/locale'; -import { InternalDateLocaleSet } from '../../../lib/date/types'; -import { CalendarLocale } from '../../Calendar/locale/types'; +import type { DateSelectLocale } from '../../../internal/DateSelect/locale'; +import type { InternalDateLocaleSet } from '../../../lib/date/types'; +import type { CalendarLocale } from '../../Calendar/locale/types'; export interface DatePickerLocale extends DateSelectLocale, CalendarLocale, InternalDateLocaleSet { today: string; diff --git a/packages/react-ui/components/Dropdown/Dropdown.tsx b/packages/react-ui/components/Dropdown/Dropdown.tsx index cb211c296e7..e48bd3847fd 100644 --- a/packages/react-ui/components/Dropdown/Dropdown.tsx +++ b/packages/react-ui/components/Dropdown/Dropdown.tsx @@ -1,4 +1,5 @@ -import React, { AriaAttributes, HTMLAttributes } from 'react'; +import type { AriaAttributes, HTMLAttributes } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { filterProps } from '../../lib/filterProps'; @@ -6,13 +7,15 @@ import { MenuHeader } from '../MenuHeader'; import { MenuItem } from '../MenuItem'; import { MenuSeparator } from '../MenuSeparator'; import { Select } from '../Select'; -import { Nullable } from '../../typings/utility-types'; -import { ButtonUse } from '../Button'; -import { CommonWrapper, CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { Nullable } from '../../typings/utility-types'; +import type { ButtonUse } from '../Button'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { SizeProp } from '../../lib/types/props'; +import type { Theme } from '../../lib/theming/Theme'; +import type { SizeProp } from '../../lib/types/props'; import { getDropdownTheme } from './getDropdownTheme'; diff --git a/packages/react-ui/components/Dropdown/__stories__/Dropdown.stories.tsx b/packages/react-ui/components/Dropdown/__stories__/Dropdown.stories.tsx index a4b07f9d462..14cbf6702e2 100644 --- a/packages/react-ui/components/Dropdown/__stories__/Dropdown.stories.tsx +++ b/packages/react-ui/components/Dropdown/__stories__/Dropdown.stories.tsx @@ -5,7 +5,7 @@ import BabyIcon from '@skbkontur/react-icons/Baby'; import { Button } from '../../Button'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; import { ThemeFactory } from '../../../lib/theming/ThemeFactory'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { Dropdown } from '../Dropdown'; import { MenuItem } from '../../MenuItem'; import { Gapped } from '../../Gapped'; diff --git a/packages/react-ui/components/Dropdown/getDropdownTheme.ts b/packages/react-ui/components/Dropdown/getDropdownTheme.ts index 146247a58ed..d2cc506b3db 100644 --- a/packages/react-ui/components/Dropdown/getDropdownTheme.ts +++ b/packages/react-ui/components/Dropdown/getDropdownTheme.ts @@ -1,5 +1,5 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const getDropdownTheme = (theme: Theme): Theme => { return ThemeFactory.create( diff --git a/packages/react-ui/components/DropdownMenu/DropdownMenu.tsx b/packages/react-ui/components/DropdownMenu/DropdownMenu.tsx index 01755252aaa..cc0e95710ff 100644 --- a/packages/react-ui/components/DropdownMenu/DropdownMenu.tsx +++ b/packages/react-ui/components/DropdownMenu/DropdownMenu.tsx @@ -1,12 +1,16 @@ -import React, { AriaAttributes, HTMLAttributes } from 'react'; +import type { AriaAttributes, HTMLAttributes } from 'react'; +import React from 'react'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Nullable } from '../../typings/utility-types'; -import { PopupMenu, PopupMenuProps } from '../../internal/PopupMenu'; +import type { Nullable } from '../../typings/utility-types'; +import type { PopupMenuProps } from '../../internal/PopupMenu'; +import { PopupMenu } from '../../internal/PopupMenu'; import { isProductionEnv, isTestEnv } from '../../lib/currentEnvironment'; -import { PopupPositionsType } from '../../internal/Popup'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { PopupPositionsType } from '../../internal/Popup'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { getDropdownMenuTheme } from './getDropdownMenuTheme'; diff --git a/packages/react-ui/components/DropdownMenu/__stories__/DropdownMenu.stories.tsx b/packages/react-ui/components/DropdownMenu/__stories__/DropdownMenu.stories.tsx index 64e06adfde6..ad00ed2f91e 100644 --- a/packages/react-ui/components/DropdownMenu/__stories__/DropdownMenu.stories.tsx +++ b/packages/react-ui/components/DropdownMenu/__stories__/DropdownMenu.stories.tsx @@ -5,11 +5,12 @@ import SearchIcon from '@skbkontur/react-icons/Search'; import AddIcon from '@skbkontur/react-icons/Add'; import DeleteIcon from '@skbkontur/react-icons/Delete'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { MenuItem } from '../../MenuItem'; import { MenuHeader } from '../../MenuHeader'; import { MenuSeparator } from '../../MenuSeparator'; -import { DropdownMenu, DropdownMenuProps } from '../DropdownMenu'; +import type { DropdownMenuProps } from '../DropdownMenu'; +import { DropdownMenu } from '../DropdownMenu'; import { Button } from '../../Button'; import { Toast } from '../../Toast'; import { Input } from '../../Input'; diff --git a/packages/react-ui/components/DropdownMenu/getDropdownMenuTheme.ts b/packages/react-ui/components/DropdownMenu/getDropdownMenuTheme.ts index 1864396d5a7..7c2a6831b33 100644 --- a/packages/react-ui/components/DropdownMenu/getDropdownMenuTheme.ts +++ b/packages/react-ui/components/DropdownMenu/getDropdownMenuTheme.ts @@ -1,5 +1,5 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const getDropdownMenuTheme = (theme: Theme): Theme => { return ThemeFactory.create( diff --git a/packages/react-ui/components/FileUploader/FileUploader.styles.ts b/packages/react-ui/components/FileUploader/FileUploader.styles.ts index 5e45e8daa9b..c3e21861824 100644 --- a/packages/react-ui/components/FileUploader/FileUploader.styles.ts +++ b/packages/react-ui/components/FileUploader/FileUploader.styles.ts @@ -1,5 +1,5 @@ import { css, keyframes, memoizeStyle, prefix } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import * as ColorFunctions from '../../lib/styles/ColorFunctions'; import { fileUploaderSizeMixin } from './FileUploader.mixins'; diff --git a/packages/react-ui/components/FileUploader/FileUploader.tsx b/packages/react-ui/components/FileUploader/FileUploader.tsx index 060692ecf08..5e6169eea61 100644 --- a/packages/react-ui/components/FileUploader/FileUploader.tsx +++ b/packages/react-ui/components/FileUploader/FileUploader.tsx @@ -1,25 +1,27 @@ import React, { useCallback, useContext, useEffect, useImperativeHandle, useRef, useState } from 'react'; import { globalObject, isBrowser } from '@skbkontur/global-object'; -import { FileUploaderAttachedFile, getAttachedFile } from '../../internal/FileUploaderControl/fileUtils'; +import type { FileUploaderAttachedFile } from '../../internal/FileUploaderControl/fileUtils'; +import { getAttachedFile } from '../../internal/FileUploaderControl/fileUtils'; import { cx } from '../../lib/theming/Emotion'; -import { InstanceWithRootNode } from '../../lib/rootNode'; +import type { InstanceWithRootNode } from '../../lib/rootNode'; import { useMemoObject } from '../../hooks/useMemoObject'; import { FileUploaderControlContext } from '../../internal/FileUploaderControl/FileUploaderControlContext'; import { useControlLocale } from '../../internal/FileUploaderControl/hooks/useControlLocale'; import { useUpload } from '../../internal/FileUploaderControl/hooks/useUpload'; import { useDrop } from '../../hooks/useDrop'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { FileUploaderControlProviderProps } from '../../internal/FileUploaderControl/FileUploaderControlProvider'; +import type { FileUploaderControlProviderProps } from '../../internal/FileUploaderControl/FileUploaderControlProvider'; import { withFileUploaderControlProvider } from '../../internal/FileUploaderControl/withFileUploaderControlProvider'; import { keyListener } from '../../lib/events/keyListener'; import { FileUploaderFile } from '../../internal/FileUploaderControl/FileUploaderFile/FileUploaderFile'; import { FileUploaderFileList } from '../../internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; -import { Nullable } from '../../typings/utility-types'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { Nullable } from '../../typings/utility-types'; import { FileUploaderFileValidationResult } from '../../internal/FileUploaderControl/FileUploaderFileValidationResult'; import { useFileUploaderSize } from '../../internal/FileUploaderControl/hooks/useFileUploaderSize'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { forwardRefAndName } from '../../lib/forwardRefAndName'; import { FocusControlWrapper } from '../../internal/FocusControlWrapper'; diff --git a/packages/react-ui/components/FileUploader/__stories__/FileUploader.stories.tsx b/packages/react-ui/components/FileUploader/__stories__/FileUploader.stories.tsx index 4f46fc62e31..a037bbefd27 100644 --- a/packages/react-ui/components/FileUploader/__stories__/FileUploader.stories.tsx +++ b/packages/react-ui/components/FileUploader/__stories__/FileUploader.stories.tsx @@ -2,7 +2,8 @@ import React, { cloneElement, useRef } from 'react'; import { Button } from '../../Button'; import { Gapped } from '../../Gapped'; -import { FileUploader, FileUploaderRef } from '../FileUploader'; +import type { FileUploaderRef } from '../FileUploader'; +import { FileUploader } from '../FileUploader'; export default { title: 'FileUploader', diff --git a/packages/react-ui/components/FileUploader/__tests__/FileUploader-test.tsx b/packages/react-ui/components/FileUploader/__tests__/FileUploader-test.tsx index bd610bf055c..3313bfc78f7 100644 --- a/packages/react-ui/components/FileUploader/__tests__/FileUploader-test.tsx +++ b/packages/react-ui/components/FileUploader/__tests__/FileUploader-test.tsx @@ -6,9 +6,10 @@ import userEvent from '@testing-library/user-event'; import { defaultLangCode } from '../../../lib/locale/constants'; import { LangCodes, LocaleContext } from '../../../lib/locale'; import { FileUploaderLocaleHelper } from '../locale'; -import { FileUploader, FileUploaderDataTids, FileUploaderProps, FileUploaderRef } from '../FileUploader'; +import type { FileUploaderProps, FileUploaderRef } from '../FileUploader'; +import { FileUploader, FileUploaderDataTids } from '../FileUploader'; import { delay } from '../../../lib/utils'; -import { FileUploaderAttachedFile } from '../../../internal/FileUploaderControl/fileUtils'; +import type { FileUploaderAttachedFile } from '../../../internal/FileUploaderControl/fileUtils'; import { FileUploaderFileDataTids } from '../../../internal/FileUploaderControl/FileUploaderFile/FileUploaderFile'; import { FileUploaderFileDataTids as FileUploaderFileListDataTids } from '../../../internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList'; diff --git a/packages/react-ui/components/FileUploader/index.tsx b/packages/react-ui/components/FileUploader/index.tsx index 701ab7621ad..9295fc7d501 100644 --- a/packages/react-ui/components/FileUploader/index.tsx +++ b/packages/react-ui/components/FileUploader/index.tsx @@ -1,4 +1,4 @@ -import { FileUploaderAttachedFile as Type } from '../../internal/FileUploaderControl/fileUtils'; +import type { FileUploaderAttachedFile as Type } from '../../internal/FileUploaderControl/fileUtils'; export { FileUploaderFileStatus } from '../../internal/FileUploaderControl/fileUtils'; export type FileUploaderAttachedFile = Type; export { FileUploaderFileValidationResult } from '../../internal/FileUploaderControl/FileUploaderFileValidationResult'; diff --git a/packages/react-ui/components/FileUploader/locale/index.ts b/packages/react-ui/components/FileUploader/locale/index.ts index 351ca56b2eb..75587856993 100644 --- a/packages/react-ui/components/FileUploader/locale/index.ts +++ b/packages/react-ui/components/FileUploader/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { FileUploaderLocale } from './types'; +import type { FileUploaderLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/FileUploader/locale/locales/en.ts b/packages/react-ui/components/FileUploader/locale/locales/en.ts index 6ef38f0c24c..ebbc6af2a07 100644 --- a/packages/react-ui/components/FileUploader/locale/locales/en.ts +++ b/packages/react-ui/components/FileUploader/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { FileUploaderLocale } from '../types'; +import type { FileUploaderLocale } from '../types'; export const componentsLocales: FileUploaderLocale = { chooseFile: 'Select a file', diff --git a/packages/react-ui/components/FileUploader/locale/locales/ru.ts b/packages/react-ui/components/FileUploader/locale/locales/ru.ts index 939cffa31cc..86a86168dea 100644 --- a/packages/react-ui/components/FileUploader/locale/locales/ru.ts +++ b/packages/react-ui/components/FileUploader/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { FileUploaderLocale } from '../types'; +import type { FileUploaderLocale } from '../types'; export const componentsLocales: FileUploaderLocale = { chooseFile: 'Выберите файл', diff --git a/packages/react-ui/components/FxInput/FxInput.tsx b/packages/react-ui/components/FxInput/FxInput.tsx index 55b161e6dfd..3881ed5bf9a 100644 --- a/packages/react-ui/components/FxInput/FxInput.tsx +++ b/packages/react-ui/components/FxInput/FxInput.tsx @@ -1,16 +1,22 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { Group } from '../Group'; -import { Input, InputProps } from '../Input'; -import { CurrencyInput, CurrencyInputProps } from '../CurrencyInput'; -import { createPropsGetter, DefaultizedProps } from '../../lib/createPropsGetter'; -import { Override } from '../../typings/utility-types'; -import { CommonWrapper, CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { InputProps } from '../Input'; +import { Input } from '../Input'; +import type { CurrencyInputProps } from '../CurrencyInput'; +import { CurrencyInput } from '../CurrencyInput'; +import type { DefaultizedProps } from '../../lib/createPropsGetter'; +import { createPropsGetter } from '../../lib/createPropsGetter'; +import type { Override } from '../../typings/utility-types'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { SizeProp } from '../../lib/types/props'; +import type { Theme } from '../../lib/theming/Theme'; +import type { SizeProp } from '../../lib/types/props'; import { MathFunctionIcon } from './MathFunctionIcon'; import { FxInputRestoreBtn } from './FxInputRestoreBtn'; diff --git a/packages/react-ui/components/FxInput/FxInputRestoreBtn.tsx b/packages/react-ui/components/FxInput/FxInputRestoreBtn.tsx index 307436d6efe..24bd433a557 100644 --- a/packages/react-ui/components/FxInput/FxInputRestoreBtn.tsx +++ b/packages/react-ui/components/FxInput/FxInputRestoreBtn.tsx @@ -1,12 +1,13 @@ -import React, { AriaAttributes, useContext } from 'react'; +import type { AriaAttributes } from 'react'; +import React, { useContext } from 'react'; import { Input } from '../Input'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { Button } from '../Button'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { UndoIcon } from './UndoIcon'; -import { FxInputProps } from './FxInput'; +import type { FxInputProps } from './FxInput'; interface FxInputRestoreBtnProps extends Pick, diff --git a/packages/react-ui/components/FxInput/__stories__/FxInput.stories.tsx b/packages/react-ui/components/FxInput/__stories__/FxInput.stories.tsx index 7ce187837b4..97911e0c7a4 100644 --- a/packages/react-ui/components/FxInput/__stories__/FxInput.stories.tsx +++ b/packages/react-ui/components/FxInput/__stories__/FxInput.stories.tsx @@ -1,13 +1,13 @@ import React from 'react'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { BGRuler } from '../../../internal/BGRuler'; import { FxInput } from '../FxInput'; import { Gapped } from '../../Gapped'; import { createPropsGetter } from '../../../lib/createPropsGetter'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; -import { FxInputProps } from '..'; -import { SizeProp } from '../../../lib/types/props'; +import type { FxInputProps } from '..'; +import type { SizeProp } from '../../../lib/types/props'; export default { title: 'FxInput' } as Meta; diff --git a/packages/react-ui/components/Gapped/Gapped.tsx b/packages/react-ui/components/Gapped/Gapped.tsx index 22173dc415a..a5a6534bfdc 100644 --- a/packages/react-ui/components/Gapped/Gapped.tsx +++ b/packages/react-ui/components/Gapped/Gapped.tsx @@ -2,8 +2,10 @@ import React from 'react'; import PropTypes from 'prop-types'; import { isNonNullable } from '../../lib/utils'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; export interface GappedProps extends CommonProps { diff --git a/packages/react-ui/components/Gapped/__stories__/Gapped.stories.tsx b/packages/react-ui/components/Gapped/__stories__/Gapped.stories.tsx index deb92c0886f..ac68e3d2fde 100644 --- a/packages/react-ui/components/Gapped/__stories__/Gapped.stories.tsx +++ b/packages/react-ui/components/Gapped/__stories__/Gapped.stories.tsx @@ -1,7 +1,8 @@ import React from 'react'; -import { Meta } from '../../../typings/stories'; -import { Gapped, GappedProps } from '../Gapped'; +import type { Meta } from '../../../typings/stories'; +import type { GappedProps } from '../Gapped'; +import { Gapped } from '../Gapped'; import { Button } from '../../Button'; export default { diff --git a/packages/react-ui/components/GlobalLoader/GlobalLoader.tsx b/packages/react-ui/components/GlobalLoader/GlobalLoader.tsx index de7df984c73..a8f83fde97b 100644 --- a/packages/react-ui/components/GlobalLoader/GlobalLoader.tsx +++ b/packages/react-ui/components/GlobalLoader/GlobalLoader.tsx @@ -3,10 +3,12 @@ import debounce from 'lodash.debounce'; import { isTestEnv } from '../../lib/currentEnvironment'; import { CommonWrapper } from '../../internal/CommonWrapper'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { GlobalLoaderView, GlobalLoaderViewProps } from './GlobalLoaderView'; +import type { GlobalLoaderViewProps } from './GlobalLoaderView'; +import { GlobalLoaderView } from './GlobalLoaderView'; export interface GlobalLoaderProps { /** diff --git a/packages/react-ui/components/GlobalLoader/GlobalLoaderView.styles.ts b/packages/react-ui/components/GlobalLoader/GlobalLoaderView.styles.ts index d805d27291a..a4e14c14f34 100644 --- a/packages/react-ui/components/GlobalLoader/GlobalLoaderView.styles.ts +++ b/packages/react-ui/components/GlobalLoader/GlobalLoaderView.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle, keyframes } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ outer(t: Theme) { diff --git a/packages/react-ui/components/GlobalLoader/GlobalLoaderView.tsx b/packages/react-ui/components/GlobalLoader/GlobalLoaderView.tsx index a9a56f03573..608ac03ff36 100644 --- a/packages/react-ui/components/GlobalLoader/GlobalLoaderView.tsx +++ b/packages/react-ui/components/GlobalLoader/GlobalLoaderView.tsx @@ -3,7 +3,8 @@ import React, { useContext, useRef } from 'react'; import { cx } from '../../lib/theming/Emotion'; import { ZIndex } from '../../internal/ZIndex'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { animations, styles } from './GlobalLoaderView.styles'; import { useGlobalLoaderPosition, useGlobalLoaderWidth } from './useParams'; diff --git a/packages/react-ui/components/GlobalLoader/__stories__/GlobalLoader.stories.tsx b/packages/react-ui/components/GlobalLoader/__stories__/GlobalLoader.stories.tsx index dd13f9adcea..1a1b003baaa 100644 --- a/packages/react-ui/components/GlobalLoader/__stories__/GlobalLoader.stories.tsx +++ b/packages/react-ui/components/GlobalLoader/__stories__/GlobalLoader.stories.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Select, Toast, GlobalLoader, Button } from '@skbkontur/react-ui'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; function GlobalLoaderWithProps() { const [error, setError] = React.useState(false); diff --git a/packages/react-ui/components/GlobalLoader/useParams.ts b/packages/react-ui/components/GlobalLoader/useParams.ts index 71b5476b321..a405e1a8f3c 100644 --- a/packages/react-ui/components/GlobalLoader/useParams.ts +++ b/packages/react-ui/components/GlobalLoader/useParams.ts @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'; import { getDOMRect } from '../../lib/dom/getDOMRect'; -import { GlobalLoaderViewProps, GlobalLoaderViewRef } from './GlobalLoaderView'; +import type { GlobalLoaderViewProps, GlobalLoaderViewRef } from './GlobalLoaderView'; /** * Вычисляет положение `GlobalLoader` diff --git a/packages/react-ui/components/Group/Group.tsx b/packages/react-ui/components/Group/Group.tsx index 0a415db1312..d0cf57bc3da 100644 --- a/packages/react-ui/components/Group/Group.tsx +++ b/packages/react-ui/components/Group/Group.tsx @@ -3,9 +3,11 @@ import PropTypes from 'prop-types'; import { isIE11, isEdge } from '../../lib/client'; import { isButton } from '../Button'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { isInputLike } from '../../lib/utils'; import { styles } from './Group.styles'; diff --git a/packages/react-ui/components/Group/__stories__/Group.stories.tsx b/packages/react-ui/components/Group/__stories__/Group.stories.tsx index ada7df427ac..3751ac8ca41 100644 --- a/packages/react-ui/components/Group/__stories__/Group.stories.tsx +++ b/packages/react-ui/components/Group/__stories__/Group.stories.tsx @@ -3,7 +3,7 @@ import UserIcon from '@skbkontur/react-icons/User'; import SearchIcon from '@skbkontur/react-icons/Search'; import DeleteIcon from '@skbkontur/react-icons/Delete'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { BGRuler } from '../../../internal/BGRuler'; import { Group } from '../Group'; import { Input } from '../../Input'; diff --git a/packages/react-ui/components/Hint/Hint.styles.ts b/packages/react-ui/components/Hint/Hint.styles.ts index 19b6ca82f54..888ba5d3fc2 100644 --- a/packages/react-ui/components/Hint/Hint.styles.ts +++ b/packages/react-ui/components/Hint/Hint.styles.ts @@ -1,4 +1,4 @@ -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { css, memoizeStyle } from '../../lib/theming/Emotion'; export const styles = memoizeStyle({ diff --git a/packages/react-ui/components/Hint/Hint.tsx b/packages/react-ui/components/Hint/Hint.tsx index 15ac1581b76..4a3437a4e70 100644 --- a/packages/react-ui/components/Hint/Hint.tsx +++ b/packages/react-ui/components/Hint/Hint.tsx @@ -1,17 +1,21 @@ import React from 'react'; -import { globalObject, SafeTimer } from '@skbkontur/global-object'; +import type { SafeTimer } from '@skbkontur/global-object'; +import { globalObject } from '@skbkontur/global-object'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme } from '../../lib/theming/Theme'; -import { DUMMY_LOCATION, Popup, PopupPinnablePositionsType, ShortPopupPositionsType } from '../../internal/Popup'; -import { Nullable } from '../../typings/utility-types'; -import { MouseEventType } from '../../typings/event-types'; +import type { Theme } from '../../lib/theming/Theme'; +import type { PopupPinnablePositionsType, ShortPopupPositionsType } from '../../internal/Popup'; +import { DUMMY_LOCATION, Popup } from '../../internal/Popup'; +import type { Nullable } from '../../typings/utility-types'; +import type { MouseEventType } from '../../typings/event-types'; import { isTestEnv } from '../../lib/currentEnvironment'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; -import { InstanceWithAnchorElement } from '../../lib/InstanceWithAnchorElement'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; +import type { InstanceWithAnchorElement } from '../../lib/InstanceWithAnchorElement'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { styles } from './Hint.styles'; diff --git a/packages/react-ui/components/Hint/__stories__/Hint.stories.tsx b/packages/react-ui/components/Hint/__stories__/Hint.stories.tsx index 5aa105ce38b..e261d1b0ced 100644 --- a/packages/react-ui/components/Hint/__stories__/Hint.stories.tsx +++ b/packages/react-ui/components/Hint/__stories__/Hint.stories.tsx @@ -1,12 +1,13 @@ import React from 'react'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { Hint } from '../Hint'; import { Gapped } from '../../Gapped'; import { Input } from '../../Input'; import { PopupPinnablePositions } from '../../../internal/Popup'; import { Textarea } from '../../Textarea'; -import { rootNode, TSetRootNode } from '../../../lib/rootNode'; +import type { TSetRootNode } from '../../../lib/rootNode'; +import { rootNode } from '../../../lib/rootNode'; import { Button } from '../../Button'; import { Tooltip } from '../../Tooltip'; diff --git a/packages/react-ui/components/Input/Input.styles.ts b/packages/react-ui/components/Input/Input.styles.ts index 129897fc8dd..92ecd42bd36 100644 --- a/packages/react-ui/components/Input/Input.styles.ts +++ b/packages/react-ui/components/Input/Input.styles.ts @@ -1,5 +1,5 @@ import { css, keyframes, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { shift } from '../../lib/styles/DimensionFunctions'; import { resetText } from '../../lib/styles/Mixins'; diff --git a/packages/react-ui/components/Input/Input.tsx b/packages/react-ui/components/Input/Input.tsx index 98f6d5d4dd7..d2b45c3db2e 100644 --- a/packages/react-ui/components/Input/Input.tsx +++ b/packages/react-ui/components/Input/Input.tsx @@ -1,24 +1,28 @@ // TODO: Enable this rule in functional components. import invariant from 'invariant'; -import React, { AriaAttributes, ClassAttributes, HTMLAttributes, ReactElement } from 'react'; +import type { AriaAttributes, ClassAttributes, HTMLAttributes, ReactElement } from 'react'; +import React from 'react'; import warning from 'warning'; -import { globalObject, SafeTimer } from '@skbkontur/global-object'; +import type { SafeTimer } from '@skbkontur/global-object'; +import { globalObject } from '@skbkontur/global-object'; import { isEdge, isIE11 } from '../../lib/client'; import { isKeyBackspace, isKeyDelete, someKeys } from '../../lib/events/keyboard/identifiers'; import { needsPolyfillPlaceholder } from '../../lib/needsPolyfillPlaceholder'; -import { Nullable, Override } from '../../typings/utility-types'; +import type { Nullable, Override } from '../../typings/utility-types'; import { InternalMaskedInput } from '../../internal/InternalMaskedInput'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { FocusControlWrapper } from '../../internal/FocusControlWrapper'; -import { InputElement, InputElementProps } from './Input.typings'; +import type { InputElement, InputElementProps } from './Input.typings'; import { styles } from './Input.styles'; import { InputLayout } from './InputLayout/InputLayout'; import { PolyfillPlaceholder } from './InputLayout/PolyfillPlaceholder'; diff --git a/packages/react-ui/components/Input/Input.typings.ts b/packages/react-ui/components/Input/Input.typings.ts index 50041b32e67..19832974d58 100644 --- a/packages/react-ui/components/Input/Input.typings.ts +++ b/packages/react-ui/components/Input/Input.typings.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; export type InputElement = (HTMLInputElement | { input: HTMLInputElement | null }) & { getRootNode: () => HTMLElement | null; diff --git a/packages/react-ui/components/Input/InputLayout/InputLayout.styles.ts b/packages/react-ui/components/Input/InputLayout/InputLayout.styles.ts index af4dfa2e45b..62f5d16a315 100644 --- a/packages/react-ui/components/Input/InputLayout/InputLayout.styles.ts +++ b/packages/react-ui/components/Input/InputLayout/InputLayout.styles.ts @@ -1,6 +1,6 @@ import { ZERO_WIDTH_SPACE_CSS } from '../../../lib/chars'; import { css, memoizeStyle } from '../../../lib/theming/Emotion'; -import { Theme } from '../../../lib/theming/Theme'; +import type { Theme } from '../../../lib/theming/Theme'; import { styles } from '../Input.styles'; export const stylesLayout = memoizeStyle({ diff --git a/packages/react-ui/components/Input/InputLayout/InputLayout.tsx b/packages/react-ui/components/Input/InputLayout/InputLayout.tsx index d0007ef5ff8..183039d6dda 100644 --- a/packages/react-ui/components/Input/InputLayout/InputLayout.tsx +++ b/packages/react-ui/components/Input/InputLayout/InputLayout.tsx @@ -1,11 +1,14 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { InputDataTids, InputProps } from '../Input'; -import { CommonProps, CommonWrapper } from '../../../internal/CommonWrapper'; +import type { InputProps } from '../Input'; +import { InputDataTids } from '../Input'; +import type { CommonProps } from '../../../internal/CommonWrapper'; +import { CommonWrapper } from '../../../internal/CommonWrapper'; import { InputLayoutAside } from './InputLayoutAside'; -import { InputLayoutContext, InputLayoutContextDefault, InputLayoutContextProps } from './InputLayoutContext'; +import type { InputLayoutContextProps } from './InputLayoutContext'; +import { InputLayoutContext, InputLayoutContextDefault } from './InputLayoutContext'; import { stylesLayout } from './InputLayout.styles'; type InputLayoutRootFromInputProps = Pick; diff --git a/packages/react-ui/components/Input/InputLayout/InputLayoutAside.tsx b/packages/react-ui/components/Input/InputLayout/InputLayoutAside.tsx index 0fe028bed25..0bbb527516a 100644 --- a/packages/react-ui/components/Input/InputLayout/InputLayoutAside.tsx +++ b/packages/react-ui/components/Input/InputLayout/InputLayoutAside.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { InputProps } from '../Input'; +import type { InputProps } from '../Input'; import { stylesLayout } from './InputLayout.styles'; import { InputLayoutAsideIcon } from './InputLayoutAsideIcon'; diff --git a/packages/react-ui/components/Input/InputLayout/InputLayoutAsideIcon.tsx b/packages/react-ui/components/Input/InputLayout/InputLayoutAsideIcon.tsx index 07314f99d3b..3fe7519abda 100644 --- a/packages/react-ui/components/Input/InputLayout/InputLayoutAsideIcon.tsx +++ b/packages/react-ui/components/Input/InputLayout/InputLayoutAsideIcon.tsx @@ -1,11 +1,12 @@ -import React, { ReactElement } from 'react'; +import type { ReactElement } from 'react'; +import React from 'react'; import { isElement } from 'react-is'; import { isKonturIcon } from '../../../lib/utils'; -import { InputProps } from '../Input'; +import type { InputProps } from '../Input'; import { cx } from '../../../lib/theming/Emotion'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; -import { SizeProp } from '../../../lib/types/props'; +import type { SizeProp } from '../../../lib/types/props'; import { InputLayoutContext } from './InputLayoutContext'; import { stylesLayout } from './InputLayout.styles'; diff --git a/packages/react-ui/components/Input/InputLayout/InputLayoutAsideText.tsx b/packages/react-ui/components/Input/InputLayout/InputLayoutAsideText.tsx index 14cefa87a5a..bbfa80beefe 100644 --- a/packages/react-ui/components/Input/InputLayout/InputLayoutAsideText.tsx +++ b/packages/react-ui/components/Input/InputLayout/InputLayoutAsideText.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { InputProps } from '../Input'; +import type { InputProps } from '../Input'; import { cx } from '../../../lib/theming/Emotion'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; diff --git a/packages/react-ui/components/Input/InputLayout/InputLayoutContext.tsx b/packages/react-ui/components/Input/InputLayout/InputLayoutContext.tsx index 3c8f5d04e32..8df304b4884 100644 --- a/packages/react-ui/components/Input/InputLayout/InputLayoutContext.tsx +++ b/packages/react-ui/components/Input/InputLayout/InputLayoutContext.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { SizeProp } from '../../../lib/types/props'; +import type { SizeProp } from '../../../lib/types/props'; export interface InputLayoutContextProps { focused: boolean; diff --git a/packages/react-ui/components/Input/InputLayout/PolyfillPlaceholder.tsx b/packages/react-ui/components/Input/InputLayout/PolyfillPlaceholder.tsx index 22e27c7a91f..0582a165032 100644 --- a/packages/react-ui/components/Input/InputLayout/PolyfillPlaceholder.tsx +++ b/packages/react-ui/components/Input/InputLayout/PolyfillPlaceholder.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { InputProps } from '../Input'; +import type { InputProps } from '../Input'; import { cx } from '../../../lib/theming/Emotion'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; import { styles } from '../Input.styles'; diff --git a/packages/react-ui/components/Input/__stories__/Input.stories.tsx b/packages/react-ui/components/Input/__stories__/Input.stories.tsx index a197bc9ca74..401e3860ae2 100644 --- a/packages/react-ui/components/Input/__stories__/Input.stories.tsx +++ b/packages/react-ui/components/Input/__stories__/Input.stories.tsx @@ -4,8 +4,9 @@ import React, { useState } from 'react'; import SearchIcon from '@skbkontur/react-icons/Search'; import { ComponentTable } from '../../../internal/ComponentTable'; -import { Meta, Story } from '../../../typings/stories'; -import { Input, InputProps } from '../Input'; +import type { Meta, Story } from '../../../typings/stories'; +import type { InputProps } from '../Input'; +import { Input } from '../Input'; import { Gapped } from '../../Gapped'; export default { diff --git a/packages/react-ui/components/Input/__tests__/Input-test.tsx b/packages/react-ui/components/Input/__tests__/Input-test.tsx index 38eeb31bee7..cf2397855e3 100644 --- a/packages/react-ui/components/Input/__tests__/Input-test.tsx +++ b/packages/react-ui/components/Input/__tests__/Input-test.tsx @@ -3,10 +3,9 @@ import { mount } from 'enzyme'; import { act, fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; +import type { InputProps, InputType } from '../Input'; import { Input, - InputProps, - InputType, inputTypes, maskErrorMessage, maskForbiddenTypes, diff --git a/packages/react-ui/components/Kebab/Kebab.styles.ts b/packages/react-ui/components/Kebab/Kebab.styles.ts index d396d160f09..4a789f02fc0 100644 --- a/packages/react-ui/components/Kebab/Kebab.styles.ts +++ b/packages/react-ui/components/Kebab/Kebab.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ kebab(t: Theme) { diff --git a/packages/react-ui/components/Kebab/Kebab.tsx b/packages/react-ui/components/Kebab/Kebab.tsx index 9dfcdb15b30..d66ffba53f3 100644 --- a/packages/react-ui/components/Kebab/Kebab.tsx +++ b/packages/react-ui/components/Kebab/Kebab.tsx @@ -1,4 +1,5 @@ -import React, { AriaAttributes, ReactElement, HTMLAttributes } from 'react'; +import type { AriaAttributes, ReactElement, HTMLAttributes } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { isElement } from 'react-is'; import { globalObject } from '@skbkontur/global-object'; @@ -7,18 +8,21 @@ import { isKonturIcon } from '../../lib/utils'; import { isKeyArrowVertical, isKeyEnter, isKeySpace, someKeys } from '../../lib/events/keyboard/identifiers'; import * as LayoutEvents from '../../lib/LayoutEvents'; import { keyListener } from '../../lib/events/keyListener'; -import { PopupMenu, PopupMenuCaptionProps, PopupMenuProps } from '../../internal/PopupMenu'; -import { Nullable } from '../../typings/utility-types'; -import { PopupPositionsType } from '../../internal/Popup'; +import type { PopupMenuCaptionProps, PopupMenuProps } from '../../internal/PopupMenu'; +import { PopupMenu } from '../../internal/PopupMenu'; +import type { Nullable } from '../../typings/utility-types'; +import type { PopupPositionsType } from '../../internal/Popup'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { isTestEnv } from '../../lib/currentEnvironment'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes'; import { styles } from './Kebab.styles'; diff --git a/packages/react-ui/components/Kebab/__stories__/Kebab.stories.tsx b/packages/react-ui/components/Kebab/__stories__/Kebab.stories.tsx index c4b4febfbb6..5da9d81eb8e 100644 --- a/packages/react-ui/components/Kebab/__stories__/Kebab.stories.tsx +++ b/packages/react-ui/components/Kebab/__stories__/Kebab.stories.tsx @@ -2,10 +2,10 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import OkIcon from '@skbkontur/react-icons/Ok'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { Kebab } from '../Kebab'; import { MenuItem } from '../../MenuItem'; -import { KebabProps } from '..'; +import type { KebabProps } from '..'; import { MenuHeader } from '../../MenuHeader'; import { defaultItemsList, manyItemsList } from './Kebab.items'; diff --git a/packages/react-ui/components/Link/Link.styles.ts b/packages/react-ui/components/Link/Link.styles.ts index 16d22c330ec..f0596533d5f 100644 --- a/packages/react-ui/components/Link/Link.styles.ts +++ b/packages/react-ui/components/Link/Link.styles.ts @@ -1,5 +1,5 @@ import { css, keyframes, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { linkDisabledMixin, linkUseColorsMixin } from './Link.mixins'; diff --git a/packages/react-ui/components/Link/Link.tsx b/packages/react-ui/components/Link/Link.tsx index 67db6c3abc5..f6123a60d2b 100644 --- a/packages/react-ui/components/Link/Link.tsx +++ b/packages/react-ui/components/Link/Link.tsx @@ -1,17 +1,20 @@ import React from 'react'; import { globalObject } from '@skbkontur/global-object'; -import { ButtonLinkAllowedValues } from '../../lib/types/button-link'; +import type { ButtonLinkAllowedValues } from '../../lib/types/button-link'; import { resetButton } from '../../lib/styles/Mixins'; -import { PolymorphicPropsWithoutRef } from '../../lib/types/polymorphic-component'; +import type { PolymorphicPropsWithoutRef } from '../../lib/types/polymorphic-component'; import { keyListener } from '../../lib/events/keyListener'; -import { Theme, ThemeIn } from '../../lib/theming/Theme'; +import type { Theme, ThemeIn } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { isExternalLink } from '../../lib/utils'; -import { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; -import { createPropsGetter, DefaultizedProps } from '../../lib/createPropsGetter'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; +import type { DefaultizedProps } from '../../lib/createPropsGetter'; +import { createPropsGetter } from '../../lib/createPropsGetter'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; import { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes'; diff --git a/packages/react-ui/components/Link/LinkIcon.tsx b/packages/react-ui/components/Link/LinkIcon.tsx index 36e1a77fd69..0235b5c8fb1 100644 --- a/packages/react-ui/components/Link/LinkIcon.tsx +++ b/packages/react-ui/components/Link/LinkIcon.tsx @@ -4,7 +4,7 @@ import { cx } from '../../lib/theming/Emotion'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { Spinner } from '../Spinner'; -import { LinkProps } from './Link'; +import type { LinkProps } from './Link'; import { styles } from './Link.styles'; export interface LinkIconProps extends Pick { diff --git a/packages/react-ui/components/Link/__stories__/Link.stories.tsx b/packages/react-ui/components/Link/__stories__/Link.stories.tsx index fd37e7d9a47..24eee5dac65 100644 --- a/packages/react-ui/components/Link/__stories__/Link.stories.tsx +++ b/packages/react-ui/components/Link/__stories__/Link.stories.tsx @@ -2,9 +2,10 @@ import React from 'react'; import OkIcon from '@skbkontur/react-icons/Ok'; import { CheckAIcon16Light } from '@skbkontur/icons/icons/CheckAIcon'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { ComponentTable } from '../../../internal/ComponentTable'; -import { Link, LinkProps } from '../Link'; +import type { LinkProps } from '../Link'; +import { Link } from '../Link'; import { Button } from '../../Button'; import { Toast } from '../../Toast'; import { Gapped } from '../../Gapped'; diff --git a/packages/react-ui/components/Link/__tests__/Link-test.tsx b/packages/react-ui/components/Link/__tests__/Link-test.tsx index e1150c7c679..3d7a8bd8d1c 100644 --- a/packages/react-ui/components/Link/__tests__/Link-test.tsx +++ b/packages/react-ui/components/Link/__tests__/Link-test.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { LinkProps } from '..'; +import type { LinkProps } from '..'; import { Link, LinkDataTids } from '../Link'; const renderRTL = (props?: LinkProps) => render(); diff --git a/packages/react-ui/components/Loader/Loader.styles.ts b/packages/react-ui/components/Loader/Loader.styles.ts index 5900bab01f8..ef3b8f69ee7 100644 --- a/packages/react-ui/components/Loader/Loader.styles.ts +++ b/packages/react-ui/components/Loader/Loader.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ active(t: Theme) { diff --git a/packages/react-ui/components/Loader/Loader.tsx b/packages/react-ui/components/Loader/Loader.tsx index 1da0a1f6f3b..4c80b4160b1 100644 --- a/packages/react-ui/components/Loader/Loader.tsx +++ b/packages/react-ui/components/Loader/Loader.tsx @@ -3,19 +3,22 @@ import PropTypes from 'prop-types'; import debounce from 'lodash.debounce'; import { globalObject, isBrowser } from '@skbkontur/global-object'; -import { AnyObject } from '../../lib/utils'; +import type { AnyObject } from '../../lib/utils'; import * as LayoutEvents from '../../lib/LayoutEvents'; -import { Spinner, SpinnerProps } from '../Spinner'; -import { Nullable } from '../../typings/utility-types'; +import type { SpinnerProps } from '../Spinner'; +import { Spinner } from '../Spinner'; +import type { Nullable } from '../../typings/utility-types'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { ZIndex } from '../../internal/ZIndex'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { isTestEnv } from '../../lib/currentEnvironment'; import { TaskWithDelayAndMinimalDuration } from '../../lib/taskWithDelayAndMinimalDuration'; import { getTabbableElements } from '../../lib/dom/tabbableHelpers'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { getDOMRect } from '../../lib/dom/getDOMRect'; import { createPropsGetter } from '../../lib/createPropsGetter'; diff --git a/packages/react-ui/components/Loader/__stories__/Loader.stories.tsx b/packages/react-ui/components/Loader/__stories__/Loader.stories.tsx index 23632e964ee..855e6425692 100644 --- a/packages/react-ui/components/Loader/__stories__/Loader.stories.tsx +++ b/packages/react-ui/components/Loader/__stories__/Loader.stories.tsx @@ -1,8 +1,9 @@ import React, { useState } from 'react'; -import { AnyObject } from '../../../lib/utils'; -import { Story } from '../../../typings/stories'; -import { Loader, LoaderProps } from '../Loader'; +import type { AnyObject } from '../../../lib/utils'; +import type { Story } from '../../../typings/stories'; +import type { LoaderProps } from '../Loader'; +import { Loader } from '../Loader'; import { css } from '../../../lib/theming/Emotion'; import { EyeOpenIcon16Light } from '../../../internal/icons2022/EyeOpenIcon/EyeOpenIcon16Light'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; diff --git a/packages/react-ui/components/Loader/__stories__/LoaderAndButton.tsx b/packages/react-ui/components/Loader/__stories__/LoaderAndButton.tsx index 441146a5b18..6e46236cb18 100644 --- a/packages/react-ui/components/Loader/__stories__/LoaderAndButton.tsx +++ b/packages/react-ui/components/Loader/__stories__/LoaderAndButton.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { Tooltip } from '../../Tooltip'; import { Button } from '../../Button'; import { Loader } from '../Loader'; -import { LoaderProps } from '..'; +import type { LoaderProps } from '..'; type LoaderAndButtonProps = Pick; interface LoaderAndButtonState { diff --git a/packages/react-ui/components/MaskedInput/ColorableInputElement/ColorableInputElement.tsx b/packages/react-ui/components/MaskedInput/ColorableInputElement/ColorableInputElement.tsx index 3f86c3f5a73..b61b6cf06b6 100644 --- a/packages/react-ui/components/MaskedInput/ColorableInputElement/ColorableInputElement.tsx +++ b/packages/react-ui/components/MaskedInput/ColorableInputElement/ColorableInputElement.tsx @@ -1,9 +1,10 @@ -import React, { ForwardedRef, useContext, useEffect, useImperativeHandle, useRef, useCallback, useState } from 'react'; +import type { ForwardedRef } from 'react'; +import React, { useContext, useEffect, useImperativeHandle, useRef, useCallback, useState } from 'react'; import { globalObject, isBrowser } from '@skbkontur/global-object'; import debounce from 'lodash.debounce'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; -import { InputElement, InputElementProps } from '../../Input'; +import type { InputElement, InputElementProps } from '../../Input'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; import { cx } from '../../../lib/theming/Emotion'; diff --git a/packages/react-ui/components/MaskedInput/FixedIMaskInput.tsx b/packages/react-ui/components/MaskedInput/FixedIMaskInput.tsx index c1830c229a6..a742d101022 100644 --- a/packages/react-ui/components/MaskedInput/FixedIMaskInput.tsx +++ b/packages/react-ui/components/MaskedInput/FixedIMaskInput.tsx @@ -1,6 +1,7 @@ import React, { useEffect, useImperativeHandle, useRef } from 'react'; -import { InputMask, MaskedPatternOptions } from 'imask'; -import { IMaskInput, IMaskInputProps } from 'react-imask'; +import type { InputMask, MaskedPatternOptions } from 'imask'; +import type { IMaskInputProps } from 'react-imask'; +import { IMaskInput } from 'react-imask'; import { forwardRefAndName } from '../../lib/forwardRefAndName'; import { diff --git a/packages/react-ui/components/MaskedInput/MaskedInput.helpers.ts b/packages/react-ui/components/MaskedInput/MaskedInput.helpers.ts index eb3c8275aeb..a07d24a7208 100644 --- a/packages/react-ui/components/MaskedInput/MaskedInput.helpers.ts +++ b/packages/react-ui/components/MaskedInput/MaskedInput.helpers.ts @@ -1,4 +1,4 @@ -import { Definitions } from 'imask'; +import type { Definitions } from 'imask'; import { isNonNullable } from '../../lib/utils'; diff --git a/packages/react-ui/components/MaskedInput/MaskedInput.tsx b/packages/react-ui/components/MaskedInput/MaskedInput.tsx index b0e8d8d8267..0603fcd64b4 100644 --- a/packages/react-ui/components/MaskedInput/MaskedInput.tsx +++ b/packages/react-ui/components/MaskedInput/MaskedInput.tsx @@ -1,10 +1,12 @@ -import React, { Ref, useImperativeHandle, useRef, useState, useEffect } from 'react'; -import { IMaskInputProps } from 'react-imask'; +import type { Ref } from 'react'; +import React, { useImperativeHandle, useRef, useState, useEffect } from 'react'; +import type { IMaskInputProps } from 'react-imask'; import { forwardRefAndName } from '../../lib/forwardRefAndName'; import { cx } from '../../lib/theming/Emotion'; import { uiFontGlobalClasses } from '../../lib/styles/UiFont'; -import { Input, InputProps, InputType } from '../Input'; +import type { InputProps, InputType } from '../Input'; +import { Input } from '../Input'; import { isKeyBackspace, isKeyDelete } from '../../lib/events/keyboard/identifiers'; import { globalClasses } from './MaskedInput.styles'; diff --git a/packages/react-ui/components/MaskedInput/__stories__/MaskedInput.stories.tsx b/packages/react-ui/components/MaskedInput/__stories__/MaskedInput.stories.tsx index 20cdc15e00c..23881424cb1 100644 --- a/packages/react-ui/components/MaskedInput/__stories__/MaskedInput.stories.tsx +++ b/packages/react-ui/components/MaskedInput/__stories__/MaskedInput.stories.tsx @@ -4,9 +4,11 @@ import React, { useState } from 'react'; import { ComponentTable } from '../../../internal/ComponentTable'; import { SearchLoupeIcon16Regular } from '../../../internal/icons2022/SearchLoupeIcon/SearchLoupeIcon16Regular'; -import { Meta, Story } from '../../../typings/stories'; -import { MaskedInput, MaskedInputProps } from '../MaskedInput'; -import { Input, InputProps } from '../../Input'; +import type { Meta, Story } from '../../../typings/stories'; +import type { MaskedInputProps } from '../MaskedInput'; +import { MaskedInput } from '../MaskedInput'; +import type { InputProps } from '../../Input'; +import { Input } from '../../Input'; export default { title: 'MaskedInput', diff --git a/packages/react-ui/components/MaskedInput/__tests__/MaskedInput-test.tsx b/packages/react-ui/components/MaskedInput/__tests__/MaskedInput-test.tsx index ba6dbf66ca1..5059f4f6c97 100644 --- a/packages/react-ui/components/MaskedInput/__tests__/MaskedInput-test.tsx +++ b/packages/react-ui/components/MaskedInput/__tests__/MaskedInput-test.tsx @@ -2,8 +2,10 @@ import React, { useState } from 'react'; import { fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { MaskedInput, MaskedInputProps } from '../MaskedInput'; -import { Input, InputProps } from '../../Input'; +import type { MaskedInputProps } from '../MaskedInput'; +import { MaskedInput } from '../MaskedInput'; +import type { InputProps } from '../../Input'; +import { Input } from '../../Input'; describe('MaskedInput', () => { it('renders without crash', () => { diff --git a/packages/react-ui/components/MenuFooter/MenuFooter.styles.ts b/packages/react-ui/components/MenuFooter/MenuFooter.styles.ts index 8855c0c419b..2772795e10d 100644 --- a/packages/react-ui/components/MenuFooter/MenuFooter.styles.ts +++ b/packages/react-ui/components/MenuFooter/MenuFooter.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { menuFooterSizeMixin, withIconSizeMixin } from './MenuFooter.mixins'; diff --git a/packages/react-ui/components/MenuFooter/MenuFooter.tsx b/packages/react-ui/components/MenuFooter/MenuFooter.tsx index 6db2445ace3..2f2bc77eedd 100644 --- a/packages/react-ui/components/MenuFooter/MenuFooter.tsx +++ b/packages/react-ui/components/MenuFooter/MenuFooter.tsx @@ -1,9 +1,11 @@ -import React, { HTMLAttributes, ReactNode, useContext } from 'react'; +import type { HTMLAttributes, ReactNode } from 'react'; +import React, { useContext } from 'react'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { styles } from './MenuFooter.styles'; diff --git a/packages/react-ui/components/MenuFooter/__stories__/MenuFooter.stories.tsx b/packages/react-ui/components/MenuFooter/__stories__/MenuFooter.stories.tsx index d4051634436..763c6d65c48 100644 --- a/packages/react-ui/components/MenuFooter/__stories__/MenuFooter.stories.tsx +++ b/packages/react-ui/components/MenuFooter/__stories__/MenuFooter.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Meta } from '../../../typings/stories'; +import type { Meta } from '../../../typings/stories'; import { MenuFooter } from '../MenuFooter'; import { Gapped } from '../../Gapped'; diff --git a/packages/react-ui/components/MenuHeader/MenuHeader.styles.ts b/packages/react-ui/components/MenuHeader/MenuHeader.styles.ts index 778672b8da3..ffe33a8824e 100644 --- a/packages/react-ui/components/MenuHeader/MenuHeader.styles.ts +++ b/packages/react-ui/components/MenuHeader/MenuHeader.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { menuHeaderSizeMixin, withIconSizeMixin } from './MenuHeader.mixins'; diff --git a/packages/react-ui/components/MenuHeader/MenuHeader.tsx b/packages/react-ui/components/MenuHeader/MenuHeader.tsx index f871b264c43..05e51a9bd70 100644 --- a/packages/react-ui/components/MenuHeader/MenuHeader.tsx +++ b/packages/react-ui/components/MenuHeader/MenuHeader.tsx @@ -1,9 +1,11 @@ -import React, { HTMLAttributes, ReactNode, useContext } from 'react'; +import type { HTMLAttributes, ReactNode } from 'react'; +import React, { useContext } from 'react'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { MenuContext } from '../../internal/Menu/MenuContext'; import { styles } from './MenuHeader.styles'; diff --git a/packages/react-ui/components/MenuHeader/__stories__/MenuHeader.stories.tsx b/packages/react-ui/components/MenuHeader/__stories__/MenuHeader.stories.tsx index 50b2173db57..45d2b5d3e5c 100644 --- a/packages/react-ui/components/MenuHeader/__stories__/MenuHeader.stories.tsx +++ b/packages/react-ui/components/MenuHeader/__stories__/MenuHeader.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Meta } from '../../../typings/stories'; +import type { Meta } from '../../../typings/stories'; import { MenuHeader } from '../MenuHeader'; import { Gapped } from '../../Gapped'; diff --git a/packages/react-ui/components/MenuItem/MenuItem.styles.ts b/packages/react-ui/components/MenuItem/MenuItem.styles.ts index e395fef588b..08e98985efd 100644 --- a/packages/react-ui/components/MenuItem/MenuItem.styles.ts +++ b/packages/react-ui/components/MenuItem/MenuItem.styles.ts @@ -1,4 +1,4 @@ -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { css, memoizeStyle } from '../../lib/theming/Emotion'; import { resetButton } from '../../lib/styles/Mixins'; diff --git a/packages/react-ui/components/MenuItem/MenuItem.tsx b/packages/react-ui/components/MenuItem/MenuItem.tsx index 6ac580de8cf..bb40326e490 100644 --- a/packages/react-ui/components/MenuItem/MenuItem.tsx +++ b/packages/react-ui/components/MenuItem/MenuItem.tsx @@ -1,16 +1,20 @@ -import React, { AriaAttributes, HTMLAttributes } from 'react'; +import type { AriaAttributes, HTMLAttributes } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { globalObject, isBrowser } from '@skbkontur/global-object'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { isExternalLink, isFunction, isNonNullable, isReactUIComponent } from '../../lib/utils'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; -import { SizeProp } from '../../lib/types/props'; -import { MenuContext, MenuContextType } from '../../internal/Menu/MenuContext'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; +import type { SizeProp } from '../../lib/types/props'; +import type { MenuContextType } from '../../internal/Menu/MenuContext'; +import { MenuContext } from '../../internal/Menu/MenuContext'; import { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes'; import { styles } from './MenuItem.styles'; diff --git a/packages/react-ui/components/MenuItem/__stories__/MenuItem.stories.tsx b/packages/react-ui/components/MenuItem/__stories__/MenuItem.stories.tsx index 98fcc011ea3..4cf673ebd8a 100644 --- a/packages/react-ui/components/MenuItem/__stories__/MenuItem.stories.tsx +++ b/packages/react-ui/components/MenuItem/__stories__/MenuItem.stories.tsx @@ -3,7 +3,7 @@ import OkIcon from '@skbkontur/react-icons/Ok'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; import { ThemeFactory } from '../../../lib/theming/ThemeFactory'; -import { Meta } from '../../../typings/stories'; +import type { Meta } from '../../../typings/stories'; import { MenuItem } from '../MenuItem'; import { Gapped } from '../../Gapped'; diff --git a/packages/react-ui/components/MenuSeparator/MenuSeparator.styles.ts b/packages/react-ui/components/MenuSeparator/MenuSeparator.styles.ts index bd1c1974b6f..ba2a89626aa 100644 --- a/packages/react-ui/components/MenuSeparator/MenuSeparator.styles.ts +++ b/packages/react-ui/components/MenuSeparator/MenuSeparator.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ root(t: Theme) { diff --git a/packages/react-ui/components/MenuSeparator/MenuSeparator.tsx b/packages/react-ui/components/MenuSeparator/MenuSeparator.tsx index f44c97202fd..948cca0e9e6 100644 --- a/packages/react-ui/components/MenuSeparator/MenuSeparator.tsx +++ b/packages/react-ui/components/MenuSeparator/MenuSeparator.tsx @@ -2,7 +2,8 @@ import React, { useContext } from 'react'; import { cx } from '../../lib/theming/Emotion'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { ResponsiveLayout } from '../ResponsiveLayout'; import { styles } from './MenuSeparator.styles'; diff --git a/packages/react-ui/components/MiniModal/MiniModal.styles.ts b/packages/react-ui/components/MiniModal/MiniModal.styles.ts index 423e234e2a5..d6ef849e048 100644 --- a/packages/react-ui/components/MiniModal/MiniModal.styles.ts +++ b/packages/react-ui/components/MiniModal/MiniModal.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { globalClasses as buttonGlobalClasses } from '../Button/Button.styles'; export const styles = memoizeStyle({ diff --git a/packages/react-ui/components/MiniModal/MiniModal.tsx b/packages/react-ui/components/MiniModal/MiniModal.tsx index e0132aeab18..5e6bd8b8c92 100644 --- a/packages/react-ui/components/MiniModal/MiniModal.tsx +++ b/packages/react-ui/components/MiniModal/MiniModal.tsx @@ -1,6 +1,7 @@ import React, { useContext } from 'react'; -import { Modal, ModalProps } from '../Modal'; +import type { ModalProps } from '../Modal'; +import { Modal } from '../Modal'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { forwardRefAndName } from '../../lib/forwardRefAndName'; diff --git a/packages/react-ui/components/MiniModal/MiniModalBody.tsx b/packages/react-ui/components/MiniModal/MiniModalBody.tsx index d6710653991..6f667be42b3 100644 --- a/packages/react-ui/components/MiniModal/MiniModalBody.tsx +++ b/packages/react-ui/components/MiniModal/MiniModalBody.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../lib/forwardRefAndName'; -import { Modal, ModalBodyProps } from '../Modal'; +import type { ModalBodyProps } from '../Modal'; +import { Modal } from '../Modal'; import { MiniModalDataTids } from './MiniModal'; import { styles } from './MiniModal.styles'; diff --git a/packages/react-ui/components/MiniModal/MiniModalFooter.tsx b/packages/react-ui/components/MiniModal/MiniModalFooter.tsx index 004c4266806..96faccfe500 100644 --- a/packages/react-ui/components/MiniModal/MiniModalFooter.tsx +++ b/packages/react-ui/components/MiniModal/MiniModalFooter.tsx @@ -1,6 +1,7 @@ import React, { useContext } from 'react'; -import { Modal, ModalFooterProps } from '../Modal'; +import type { ModalFooterProps } from '../Modal'; +import { Modal } from '../Modal'; import { forwardRefAndName } from '../../lib/forwardRefAndName'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { isIE11 } from '../../lib/client'; diff --git a/packages/react-ui/components/MiniModal/MiniModalHeader.tsx b/packages/react-ui/components/MiniModal/MiniModalHeader.tsx index 55578b20f16..53b898e2a60 100644 --- a/packages/react-ui/components/MiniModal/MiniModalHeader.tsx +++ b/packages/react-ui/components/MiniModal/MiniModalHeader.tsx @@ -1,6 +1,8 @@ -import React, { ReactNode, useContext } from 'react'; +import type { ReactNode } from 'react'; +import React, { useContext } from 'react'; -import { Modal, ModalHeaderProps } from '../Modal'; +import type { ModalHeaderProps } from '../Modal'; +import { Modal } from '../Modal'; import { forwardRefAndName } from '../../lib/forwardRefAndName'; import { InfoCircleIcon64Regular } from '../../internal/icons2022/InfoCircleIcon/InfoCircleIcon64Regular'; import { ThemeContext } from '../../lib/theming/ThemeContext'; diff --git a/packages/react-ui/components/MiniModal/__stories__/MiniModal.stories.tsx b/packages/react-ui/components/MiniModal/__stories__/MiniModal.stories.tsx index 33ec125d444..b06fb68a8ac 100644 --- a/packages/react-ui/components/MiniModal/__stories__/MiniModal.stories.tsx +++ b/packages/react-ui/components/MiniModal/__stories__/MiniModal.stories.tsx @@ -5,7 +5,7 @@ import { TechPhoneSmartIcon64Regular } from '@skbkontur/icons/TechPhoneSmartIcon import { MiniModal } from '../MiniModal'; import { Button } from '../../Button'; import { Modal } from '../../Modal'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; import { LIGHT_THEME } from '../../../lib/theming/themes/LightTheme'; import { ThemeFactory } from '../../../lib/theming/ThemeFactory'; diff --git a/packages/react-ui/components/MiniModal/getMiniModalTheme.ts b/packages/react-ui/components/MiniModal/getMiniModalTheme.ts index d0e18762e97..74848ca2354 100644 --- a/packages/react-ui/components/MiniModal/getMiniModalTheme.ts +++ b/packages/react-ui/components/MiniModal/getMiniModalTheme.ts @@ -1,5 +1,5 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme, ThemeIn } from '../../lib/theming/Theme'; +import type { Theme, ThemeIn } from '../../lib/theming/Theme'; export const getMiniModalTheme = (contextTheme: Theme, propsTheme: ThemeIn = {}) => { const theme = ThemeFactory.create(propsTheme, contextTheme); diff --git a/packages/react-ui/components/Modal/Modal.styles.ts b/packages/react-ui/components/Modal/Modal.styles.ts index 35a08426b1f..44e768cf4cb 100644 --- a/packages/react-ui/components/Modal/Modal.styles.ts +++ b/packages/react-ui/components/Modal/Modal.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle, prefix } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { resetButton } from '../../lib/styles/Mixins'; export const modalGlobalClasses = prefix('modal')({ diff --git a/packages/react-ui/components/Modal/Modal.tsx b/packages/react-ui/components/Modal/Modal.tsx index fe3f2755160..cbe834b0b4e 100644 --- a/packages/react-ui/components/Modal/Modal.tsx +++ b/packages/react-ui/components/Modal/Modal.tsx @@ -1,4 +1,5 @@ -import React, { AriaAttributes, HTMLAttributes } from 'react'; +import type { AriaAttributes, HTMLAttributes } from 'react'; +import React from 'react'; import FocusLock from 'react-focus-lock'; import throttle from 'lodash.throttle'; import { globalObject } from '@skbkontur/global-object'; @@ -10,17 +11,20 @@ import { RenderContainer } from '../../internal/RenderContainer'; import { ZIndex } from '../../internal/ZIndex'; import { stopPropagation } from '../../lib/events/stopPropagation'; import { HideBodyVerticalScroll } from '../../internal/HideBodyVerticalScroll'; -import { ModalStack, ModalStackSubscription } from '../../lib/ModalStack'; +import type { ModalStackSubscription } from '../../lib/ModalStack'; +import { ModalStack } from '../../lib/ModalStack'; import { ResizeDetector } from '../../internal/ResizeDetector'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme, ThemeIn } from '../../lib/theming/Theme'; +import type { Theme, ThemeIn } from '../../lib/theming/Theme'; import { isIE11 } from '../../lib/client'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { ResponsiveLayout } from '../ResponsiveLayout'; -import { ModalContext, ModalContextProps } from './ModalContext'; +import type { ModalContextProps } from './ModalContext'; +import { ModalContext } from './ModalContext'; import { ModalFooter } from './ModalFooter'; import { ModalHeader } from './ModalHeader'; import { ModalBody } from './ModalBody'; diff --git a/packages/react-ui/components/Modal/ModalBody.tsx b/packages/react-ui/components/Modal/ModalBody.tsx index 89c6f1c43d2..cb9743a7527 100644 --- a/packages/react-ui/components/Modal/ModalBody.tsx +++ b/packages/react-ui/components/Modal/ModalBody.tsx @@ -1,14 +1,16 @@ import React from 'react'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { ZIndex } from '../../internal/ZIndex'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { responsiveLayout } from '../ResponsiveLayout/decorator'; import * as LayoutEvents from '../../lib/LayoutEvents'; import { ResizeDetector } from '../../internal/ResizeDetector'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { ModalContext } from './ModalContext'; import { styles } from './Modal.styles'; diff --git a/packages/react-ui/components/Modal/ModalClose.tsx b/packages/react-ui/components/Modal/ModalClose.tsx index 5a168aef15e..c0dc1b74ffd 100644 --- a/packages/react-ui/components/Modal/ModalClose.tsx +++ b/packages/react-ui/components/Modal/ModalClose.tsx @@ -9,7 +9,7 @@ import { ResponsiveLayout } from '../ResponsiveLayout'; import { CommonWrapper } from '../../internal/CommonWrapper'; import { XIcon20Regular } from '../../internal/icons2022/XIcon/XIcon20Regular'; -import { CloseProps } from './ModalContext'; +import type { CloseProps } from './ModalContext'; import { styles } from './Modal.styles'; import { ModalDataTids } from './Modal'; import { ModalLocaleHelper } from './locale'; diff --git a/packages/react-ui/components/Modal/ModalContext.tsx b/packages/react-ui/components/Modal/ModalContext.tsx index 382ebef9f01..d45badea481 100644 --- a/packages/react-ui/components/Modal/ModalContext.tsx +++ b/packages/react-ui/components/Modal/ModalContext.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; export interface CloseProps extends CommonProps { disableClose?: boolean; diff --git a/packages/react-ui/components/Modal/ModalFooter.tsx b/packages/react-ui/components/Modal/ModalFooter.tsx index 318ccbdfde2..57dbac09854 100644 --- a/packages/react-ui/components/Modal/ModalFooter.tsx +++ b/packages/react-ui/components/Modal/ModalFooter.tsx @@ -1,12 +1,15 @@ -import React, { ReactNode, useContext, useLayoutEffect } from 'react'; +import type { ReactNode } from 'react'; +import React, { useContext, useLayoutEffect } from 'react'; import { getScrollWidth } from '../../lib/dom/getScrollWidth'; import { Sticky } from '../Sticky'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { useResponsiveLayout } from '../ResponsiveLayout'; -import { Gapped, GappedProps } from '../Gapped'; +import type { GappedProps } from '../Gapped'; +import { Gapped } from '../Gapped'; import { isNonNullable } from '../../lib/utils'; import { styles } from './Modal.styles'; diff --git a/packages/react-ui/components/Modal/ModalHeader.tsx b/packages/react-ui/components/Modal/ModalHeader.tsx index b6334385d35..48efaf0677c 100644 --- a/packages/react-ui/components/Modal/ModalHeader.tsx +++ b/packages/react-ui/components/Modal/ModalHeader.tsx @@ -1,8 +1,10 @@ -import React, { ReactNode, useContext, useLayoutEffect } from 'react'; +import type { ReactNode } from 'react'; +import React, { useContext, useLayoutEffect } from 'react'; import { Sticky } from '../Sticky'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { useResponsiveLayout } from '../ResponsiveLayout'; diff --git a/packages/react-ui/components/Modal/ModalSeparator.tsx b/packages/react-ui/components/Modal/ModalSeparator.tsx index 85f81a3733b..1df5771dc02 100644 --- a/packages/react-ui/components/Modal/ModalSeparator.tsx +++ b/packages/react-ui/components/Modal/ModalSeparator.tsx @@ -1,7 +1,7 @@ import React, { useContext } from 'react'; import { cx } from '../../lib/theming/Emotion'; -import { CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { styles } from './Modal.styles'; diff --git a/packages/react-ui/components/Modal/__stories__/Modal.stories.tsx b/packages/react-ui/components/Modal/__stories__/Modal.stories.tsx index 6106ec5824d..20c2abaffea 100644 --- a/packages/react-ui/components/Modal/__stories__/Modal.stories.tsx +++ b/packages/react-ui/components/Modal/__stories__/Modal.stories.tsx @@ -4,7 +4,7 @@ import React, { useState, useContext } from 'react'; import BorderAllIcon from '@skbkontur/react-icons/BorderAll'; import { ThemeFactory } from '../../../lib/theming/ThemeFactory'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { Modal } from '../Modal'; import { Button } from '../../Button'; import { Input } from '../../Input'; diff --git a/packages/react-ui/components/Modal/getModalBodyTheme.ts b/packages/react-ui/components/Modal/getModalBodyTheme.ts index f59d033c21e..bf36c282d3c 100644 --- a/packages/react-ui/components/Modal/getModalBodyTheme.ts +++ b/packages/react-ui/components/Modal/getModalBodyTheme.ts @@ -1,5 +1,5 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const getModalBodyTheme = (theme: Theme): Theme => { return ThemeFactory.create( diff --git a/packages/react-ui/components/Modal/getModalTheme.ts b/packages/react-ui/components/Modal/getModalTheme.ts index 10d0d23e4f0..2dcab8109db 100644 --- a/packages/react-ui/components/Modal/getModalTheme.ts +++ b/packages/react-ui/components/Modal/getModalTheme.ts @@ -1,5 +1,5 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme, ThemeIn } from '../../lib/theming/Theme'; +import type { Theme, ThemeIn } from '../../lib/theming/Theme'; export const getModalTheme = (contextTheme: Theme, propsTheme: ThemeIn = {}): Theme => { const theme = ThemeFactory.create(propsTheme, contextTheme); diff --git a/packages/react-ui/components/Modal/locale/index.ts b/packages/react-ui/components/Modal/locale/index.ts index 2c869cfc2ce..d9df424b530 100644 --- a/packages/react-ui/components/Modal/locale/index.ts +++ b/packages/react-ui/components/Modal/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { ModalLocale } from './types'; +import type { ModalLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/Modal/locale/locales/en.ts b/packages/react-ui/components/Modal/locale/locales/en.ts index d9f9faa0c7a..c84b26cb980 100644 --- a/packages/react-ui/components/Modal/locale/locales/en.ts +++ b/packages/react-ui/components/Modal/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { ModalLocale } from '../types'; +import type { ModalLocale } from '../types'; export const componentsLocales: ModalLocale = { closeButtonAriaLabel: 'Close modal window', diff --git a/packages/react-ui/components/Modal/locale/locales/ru.ts b/packages/react-ui/components/Modal/locale/locales/ru.ts index c389666b245..2069c00288f 100644 --- a/packages/react-ui/components/Modal/locale/locales/ru.ts +++ b/packages/react-ui/components/Modal/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { ModalLocale } from '../types'; +import type { ModalLocale } from '../types'; export const componentsLocales: ModalLocale = { closeButtonAriaLabel: 'Закрыть модальное окно', diff --git a/packages/react-ui/components/Paging/NavigationHelper.tsx b/packages/react-ui/components/Paging/NavigationHelper.tsx index 1d571ea7d92..d89eb2cf5b6 100644 --- a/packages/react-ui/components/Paging/NavigationHelper.tsx +++ b/packages/react-ui/components/Paging/NavigationHelper.tsx @@ -1,7 +1,7 @@ -import React from 'react'; +import type React from 'react'; import { isMac } from '../../lib/client'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; export interface KeyDescriptionType { name: string; diff --git a/packages/react-ui/components/Paging/Paging.styles.ts b/packages/react-ui/components/Paging/Paging.styles.ts index b26ccc9604b..f0514b1d626 100644 --- a/packages/react-ui/components/Paging/Paging.styles.ts +++ b/packages/react-ui/components/Paging/Paging.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ paging(t: Theme) { diff --git a/packages/react-ui/components/Paging/Paging.tsx b/packages/react-ui/components/Paging/Paging.tsx index d12519c9444..b4ac90b9d53 100644 --- a/packages/react-ui/components/Paging/Paging.tsx +++ b/packages/react-ui/components/Paging/Paging.tsx @@ -5,22 +5,25 @@ import { globalObject } from '@skbkontur/global-object'; import { isInstanceOf } from '../../lib/isInstanceOf'; import { isKeyArrowLeft, isKeyArrowRight, isKeyEnter } from '../../lib/events/keyboard/identifiers'; import { locale } from '../../lib/locale/decorators'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { keyListener } from '../../lib/events/keyListener'; import { emptyHandler } from '../../lib/utils'; import { isIE11 } from '../../lib/client'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes'; import { styles } from './Paging.styles'; import * as NavigationHelper from './NavigationHelper'; import { getItems } from './PagingHelper'; -import { PagingLocale, PagingLocaleHelper } from './locale'; +import type { PagingLocale } from './locale'; +import { PagingLocaleHelper } from './locale'; import { PagingDefaultComponent } from './PagingDefaultComponent'; import { ForwardIcon } from './ForwardIcon'; diff --git a/packages/react-ui/components/Paging/PagingDefaultComponent.tsx b/packages/react-ui/components/Paging/PagingDefaultComponent.tsx index 6945305a688..4a88548a471 100644 --- a/packages/react-ui/components/Paging/PagingDefaultComponent.tsx +++ b/packages/react-ui/components/Paging/PagingDefaultComponent.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { extractDataProps } from '../../lib/utils'; -import { CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; interface PagingDefaultComponentInterface { onClick: () => void; diff --git a/packages/react-ui/components/Paging/PagingHelper.tsx b/packages/react-ui/components/Paging/PagingHelper.tsx index 5ec729abca0..afb22a27e1f 100644 --- a/packages/react-ui/components/Paging/PagingHelper.tsx +++ b/packages/react-ui/components/Paging/PagingHelper.tsx @@ -1,4 +1,4 @@ -import { ItemType } from './Paging'; +import type { ItemType } from './Paging'; export function getItems(active: number, total: number): ItemType[] { const result: ItemType[] = []; diff --git a/packages/react-ui/components/Paging/__stories__/Paging.stories.tsx b/packages/react-ui/components/Paging/__stories__/Paging.stories.tsx index 8ab18917df6..5f61d8a82b2 100644 --- a/packages/react-ui/components/Paging/__stories__/Paging.stories.tsx +++ b/packages/react-ui/components/Paging/__stories__/Paging.stories.tsx @@ -1,11 +1,12 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import { ComponentStory } from '@storybook/react'; +import type { ComponentStory } from '@storybook/react'; -import { Meta, Story } from '../../../typings/stories'; -import { ItemComponentProps, Paging } from '../Paging'; +import type { Meta, Story } from '../../../typings/stories'; +import type { ItemComponentProps } from '../Paging'; +import { Paging } from '../Paging'; import { emptyHandler } from '../../../lib/utils'; -import { PagingProps } from '..'; +import type { PagingProps } from '..'; const lorem = `Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolores dignissimos labore expedita. Sapiente beatae eveniet sit, similique, diff --git a/packages/react-ui/components/Paging/locale/index.ts b/packages/react-ui/components/Paging/locale/index.ts index 0e378e07b26..351d2382dd5 100644 --- a/packages/react-ui/components/Paging/locale/index.ts +++ b/packages/react-ui/components/Paging/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { PagingLocale } from './types'; +import type { PagingLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/Paging/locale/locales/en.ts b/packages/react-ui/components/Paging/locale/locales/en.ts index 5560f70b069..53eb3956e00 100644 --- a/packages/react-ui/components/Paging/locale/locales/en.ts +++ b/packages/react-ui/components/Paging/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { PagingLocale } from '../types'; +import type { PagingLocale } from '../types'; export const componentsLocales: PagingLocale = { forward: 'Forward', diff --git a/packages/react-ui/components/Paging/locale/locales/ru.ts b/packages/react-ui/components/Paging/locale/locales/ru.ts index dccd1a9baf5..01654dfb26a 100644 --- a/packages/react-ui/components/Paging/locale/locales/ru.ts +++ b/packages/react-ui/components/Paging/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { PagingLocale } from '../types'; +import type { PagingLocale } from '../types'; export const componentsLocales: PagingLocale = { forward: 'Дальше', diff --git a/packages/react-ui/components/PasswordInput/PasswordInput.styles.ts b/packages/react-ui/components/PasswordInput/PasswordInput.styles.ts index 1cada00524a..4a617646bff 100644 --- a/packages/react-ui/components/PasswordInput/PasswordInput.styles.ts +++ b/packages/react-ui/components/PasswordInput/PasswordInput.styles.ts @@ -1,4 +1,4 @@ -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { css, memoizeStyle } from '../../lib/theming/Emotion'; export const styles = memoizeStyle({ diff --git a/packages/react-ui/components/PasswordInput/PasswordInput.tsx b/packages/react-ui/components/PasswordInput/PasswordInput.tsx index 70c4ebb427a..3971cf690bf 100644 --- a/packages/react-ui/components/PasswordInput/PasswordInput.tsx +++ b/packages/react-ui/components/PasswordInput/PasswordInput.tsx @@ -1,4 +1,5 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { globalObject, isBrowser } from '@skbkontur/global-object'; @@ -7,19 +8,23 @@ import { RenderLayer } from '../../internal/RenderLayer'; import { isNonNullable } from '../../lib/utils'; import { isKeyCapsLock } from '../../lib/events/keyboard/identifiers'; import { KeyboardEventCodes as Codes } from '../../lib/events/keyboard/KeyboardEventCodes'; -import { Input, InputProps } from '../Input'; -import { Nullable } from '../../typings/utility-types'; +import type { InputProps } from '../Input'; +import { Input } from '../Input'; +import type { Nullable } from '../../typings/utility-types'; import { isIE11 } from '../../lib/client'; -import { CommonWrapper, CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; -import { Theme } from '../../lib/theming/Theme'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { styles } from './PasswordInput.styles'; import { PasswordInputIcon } from './PasswordInputIcon'; -import { PasswordInputLocale, PasswordInputLocaleHelper } from './locale'; +import type { PasswordInputLocale } from './locale'; +import { PasswordInputLocaleHelper } from './locale'; export interface PasswordInputProps extends Pick, CommonProps, InputProps { detectCapsLock?: boolean; diff --git a/packages/react-ui/components/PasswordInput/PasswordInputIcon.tsx b/packages/react-ui/components/PasswordInput/PasswordInputIcon.tsx index 7cf678e13eb..0a73bd2dd7c 100644 --- a/packages/react-ui/components/PasswordInput/PasswordInputIcon.tsx +++ b/packages/react-ui/components/PasswordInput/PasswordInputIcon.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { PasswordInputProps, PasswordInputState } from './PasswordInput'; +import type { PasswordInputProps, PasswordInputState } from './PasswordInput'; import { ClosedIcon } from './ClosedIcon'; import { OpenedIcon } from './OpenedIcon'; diff --git a/packages/react-ui/components/PasswordInput/__stories__/PasswordInput.stories.tsx b/packages/react-ui/components/PasswordInput/__stories__/PasswordInput.stories.tsx index 59fe20c0e5a..f485912a499 100644 --- a/packages/react-ui/components/PasswordInput/__stories__/PasswordInput.stories.tsx +++ b/packages/react-ui/components/PasswordInput/__stories__/PasswordInput.stories.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { PasswordInput } from '../PasswordInput'; -import { Nullable } from '../../../typings/utility-types'; +import type { Nullable } from '../../../typings/utility-types'; interface ComponentProps { capsLockEnabled?: boolean; diff --git a/packages/react-ui/components/PasswordInput/locale/index.ts b/packages/react-ui/components/PasswordInput/locale/index.ts index 7f842e40778..830091740b0 100644 --- a/packages/react-ui/components/PasswordInput/locale/index.ts +++ b/packages/react-ui/components/PasswordInput/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { PasswordInputLocale } from './types'; +import type { PasswordInputLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/PasswordInput/locale/locales/en.ts b/packages/react-ui/components/PasswordInput/locale/locales/en.ts index f5612b1e720..e67683a720c 100644 --- a/packages/react-ui/components/PasswordInput/locale/locales/en.ts +++ b/packages/react-ui/components/PasswordInput/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { PasswordInputLocale } from '../types'; +import type { PasswordInputLocale } from '../types'; export const componentsLocales: PasswordInputLocale = { eyeOpenedAriaLabel: 'Hide password symbols', diff --git a/packages/react-ui/components/PasswordInput/locale/locales/ru.ts b/packages/react-ui/components/PasswordInput/locale/locales/ru.ts index 8cefe3748a9..3b41a5ac62a 100644 --- a/packages/react-ui/components/PasswordInput/locale/locales/ru.ts +++ b/packages/react-ui/components/PasswordInput/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { PasswordInputLocale } from '../types'; +import type { PasswordInputLocale } from '../types'; export const componentsLocales: PasswordInputLocale = { eyeOpenedAriaLabel: 'Скрыть символы пароля', diff --git a/packages/react-ui/components/Radio/Radio.styles.ts b/packages/react-ui/components/Radio/Radio.styles.ts index 4f72577fe32..ea382048aa5 100644 --- a/packages/react-ui/components/Radio/Radio.styles.ts +++ b/packages/react-ui/components/Radio/Radio.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle, prefix } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { afterOutlineMixin, diff --git a/packages/react-ui/components/Radio/Radio.tsx b/packages/react-ui/components/Radio/Radio.tsx index fe55e02db6c..13679e48c8c 100644 --- a/packages/react-ui/components/Radio/Radio.tsx +++ b/packages/react-ui/components/Radio/Radio.tsx @@ -1,18 +1,22 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import { globalObject } from '@skbkontur/global-object'; -import { Override } from '../../typings/utility-types'; +import type { Override } from '../../typings/utility-types'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonWrapper, CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { keyListener } from '../../lib/events/keyListener'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { fixFirefoxModifiedClickOnLabel } from '../../lib/events/fixFirefoxModifiedClickOnLabel'; import { isEdge, isIE11 } from '../../lib/client'; -import { RadioGroupContext, RadioGroupContextType } from '../RadioGroup/RadioGroupContext'; +import type { RadioGroupContextType } from '../RadioGroup/RadioGroupContext'; +import { RadioGroupContext } from '../RadioGroup/RadioGroupContext'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { FocusControlWrapper } from '../../internal/FocusControlWrapper'; import { styles, globalClasses } from './Radio.styles'; diff --git a/packages/react-ui/components/Radio/__stories__/Radio.stories.tsx b/packages/react-ui/components/Radio/__stories__/Radio.stories.tsx index 506d5506be0..7b6d72d513c 100644 --- a/packages/react-ui/components/Radio/__stories__/Radio.stories.tsx +++ b/packages/react-ui/components/Radio/__stories__/Radio.stories.tsx @@ -2,7 +2,7 @@ /* eslint-disable react/no-unstable-nested-components */ import React from 'react'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { Gapped } from '../../Gapped'; import { Radio } from '../Radio'; diff --git a/packages/react-ui/components/RadioGroup/RadioGroup.tsx b/packages/react-ui/components/RadioGroup/RadioGroup.tsx index 60888f0a359..61a74e2ac84 100644 --- a/packages/react-ui/components/RadioGroup/RadioGroup.tsx +++ b/packages/react-ui/components/RadioGroup/RadioGroup.tsx @@ -1,19 +1,23 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import invariant from 'invariant'; import { getRandomID, isNonNullable } from '../../lib/utils'; import { Radio } from '../Radio'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { FocusTrap } from '../../internal/FocusTrap'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes'; import { styles } from './RadioGroup.styles'; import { Prevent } from './Prevent'; -import { RadioGroupContext, RadioGroupContextType } from './RadioGroupContext'; +import type { RadioGroupContextType } from './RadioGroupContext'; +import { RadioGroupContext } from './RadioGroupContext'; export interface RadioGroupProps extends CommonProps { /** diff --git a/packages/react-ui/components/RadioGroup/__stories__/RadioGroup.stories.tsx b/packages/react-ui/components/RadioGroup/__stories__/RadioGroup.stories.tsx index cac414d5b4d..a693a268ff0 100644 --- a/packages/react-ui/components/RadioGroup/__stories__/RadioGroup.stories.tsx +++ b/packages/react-ui/components/RadioGroup/__stories__/RadioGroup.stories.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { RadioGroup } from '../RadioGroup'; import { Radio } from '../../Radio'; import { Gapped } from '../../Gapped'; import { Button } from '../../Button'; -import { Nullable } from '../../../typings/utility-types'; -import { RadioGroupProps } from '..'; +import type { Nullable } from '../../../typings/utility-types'; +import type { RadioGroupProps } from '..'; interface ComponentState { value: string; diff --git a/packages/react-ui/components/RadioGroup/__tests__/RadioGroup-test.tsx b/packages/react-ui/components/RadioGroup/__tests__/RadioGroup-test.tsx index c97c3a5288a..76367ba0f55 100644 --- a/packages/react-ui/components/RadioGroup/__tests__/RadioGroup-test.tsx +++ b/packages/react-ui/components/RadioGroup/__tests__/RadioGroup-test.tsx @@ -2,7 +2,8 @@ import React from 'react'; import { fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { RadioGroup, RadioGroupDataTids, RadioGroupProps } from '../RadioGroup'; +import type { RadioGroupProps } from '../RadioGroup'; +import { RadioGroup, RadioGroupDataTids } from '../RadioGroup'; import { Radio, RadioDataTids } from '../../Radio'; import { clickOutside } from '../../../lib/utils'; diff --git a/packages/react-ui/components/ResponsiveLayout/ResponsiveLayout.tsx b/packages/react-ui/components/ResponsiveLayout/ResponsiveLayout.tsx index 66cb46a48bc..7fef2c90a46 100644 --- a/packages/react-ui/components/ResponsiveLayout/ResponsiveLayout.tsx +++ b/packages/react-ui/components/ResponsiveLayout/ResponsiveLayout.tsx @@ -3,7 +3,7 @@ import React, { useEffect } from 'react'; import { isFunction } from '../../lib/utils'; import { CommonWrapper } from '../../internal/CommonWrapper'; -import { EmptyObject, MediaQueriesType, ResponsiveLayoutFlags } from './types'; +import type { EmptyObject, MediaQueriesType, ResponsiveLayoutFlags } from './types'; import { useResponsiveLayout } from './useResponsiveLayout'; interface ResponsiveLayoutProps { diff --git a/packages/react-ui/components/ResponsiveLayout/__tests__/ResponsiveLayout-test.tsx b/packages/react-ui/components/ResponsiveLayout/__tests__/ResponsiveLayout-test.tsx index ac7738d2656..f1bd2dc447a 100644 --- a/packages/react-ui/components/ResponsiveLayout/__tests__/ResponsiveLayout-test.tsx +++ b/packages/react-ui/components/ResponsiveLayout/__tests__/ResponsiveLayout-test.tsx @@ -1,4 +1,5 @@ -import { addResponsiveLayoutListener, eventListenersMap, listenerToken } from '../ResponsiveLayoutEvents'; +import type { listenerToken } from '../ResponsiveLayoutEvents'; +import { addResponsiveLayoutListener, eventListenersMap } from '../ResponsiveLayoutEvents'; describe('ResponsiveLayoutListeners', () => { it('test func', () => { diff --git a/packages/react-ui/components/ResponsiveLayout/__tests__/useResponsiveLayout-test.tsx b/packages/react-ui/components/ResponsiveLayout/__tests__/useResponsiveLayout-test.tsx index fae3bbb0851..aff2c4f23f2 100644 --- a/packages/react-ui/components/ResponsiveLayout/__tests__/useResponsiveLayout-test.tsx +++ b/packages/react-ui/components/ResponsiveLayout/__tests__/useResponsiveLayout-test.tsx @@ -3,7 +3,7 @@ import { render } from '@testing-library/react'; import { eventListenersMap } from '../ResponsiveLayoutEvents'; import { useResponsiveLayout as useResponsiveLayoutOrigin } from '../useResponsiveLayout'; -import { MediaQueriesType, ResponsiveLayoutFlags, ResponsiveLayoutOptions } from '../types'; +import type { MediaQueriesType, ResponsiveLayoutFlags, ResponsiveLayoutOptions } from '../types'; import { LIGHT_THEME } from '../../../lib/theming/themes/LightTheme'; function getUseResponsiveLayoutResult(options: ResponsiveLayoutOptions) { diff --git a/packages/react-ui/components/ResponsiveLayout/decorator.tsx b/packages/react-ui/components/ResponsiveLayout/decorator.tsx index cde21c75838..281e9633717 100644 --- a/packages/react-ui/components/ResponsiveLayout/decorator.tsx +++ b/packages/react-ui/components/ResponsiveLayout/decorator.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { ResponsiveLayout } from './ResponsiveLayout'; -import { ResponsiveLayoutFlags } from './types'; +import type { ResponsiveLayoutFlags } from './types'; export function responsiveLayout React.Component>(WrappedComp: T) { const ComponentWithLayout = class extends WrappedComp { diff --git a/packages/react-ui/components/ResponsiveLayout/useResponsiveLayout.ts b/packages/react-ui/components/ResponsiveLayout/useResponsiveLayout.ts index 381140016e1..b3d5b9b01d3 100644 --- a/packages/react-ui/components/ResponsiveLayout/useResponsiveLayout.ts +++ b/packages/react-ui/components/ResponsiveLayout/useResponsiveLayout.ts @@ -1,8 +1,9 @@ -import React, { createRef, useCallback, useContext, useEffect, useState } from 'react'; +import type React from 'react'; +import { createRef, useCallback, useContext, useEffect, useState } from 'react'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { EmptyObject, MediaQueriesType, ResponsiveLayoutFlags, ResponsiveLayoutOptions } from './types'; +import type { EmptyObject, MediaQueriesType, ResponsiveLayoutFlags, ResponsiveLayoutOptions } from './types'; import { addResponsiveLayoutListener, checkMatches } from './ResponsiveLayoutEvents'; export function useResponsiveLayout({ diff --git a/packages/react-ui/components/ScrollContainer/ScrollBar.tsx b/packages/react-ui/components/ScrollContainer/ScrollBar.tsx index 83f2c765440..c1f7cde159b 100644 --- a/packages/react-ui/components/ScrollContainer/ScrollBar.tsx +++ b/packages/react-ui/components/ScrollContainer/ScrollBar.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { globalObject } from '@skbkontur/global-object'; -import { Nullable } from '../../typings/utility-types'; -import { Theme } from '../../lib/theming/Theme'; +import type { Nullable } from '../../typings/utility-types'; +import type { Theme } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { cx } from '../../lib/theming/Emotion'; import { isInstanceOf } from '../../lib/isInstanceOf'; @@ -10,7 +10,7 @@ import { isInstanceOf } from '../../lib/isInstanceOf'; import { defaultScrollbarState, scrollSizeParametersNames } from './ScrollContainer.constants'; import { styles, globalClasses } from './ScrollContainer.styles'; import { getScrollSizeParams } from './ScrollContainer.helpers'; -import { ScrollContainerProps } from './ScrollContainer'; +import type { ScrollContainerProps } from './ScrollContainer'; export type ScrollAxis = 'x' | 'y'; export type ScrollBarScrollState = 'begin' | 'middle' | 'end'; diff --git a/packages/react-ui/components/ScrollContainer/ScrollContainer.constants.ts b/packages/react-ui/components/ScrollContainer/ScrollContainer.constants.ts index 00b8aa3f112..cb792271733 100644 --- a/packages/react-ui/components/ScrollContainer/ScrollContainer.constants.ts +++ b/packages/react-ui/components/ScrollContainer/ScrollContainer.constants.ts @@ -1,4 +1,4 @@ -import { ScrollBarState } from './ScrollBar'; +import type { ScrollBarState } from './ScrollBar'; export const MIN_SCROLL_SIZE = 20; diff --git a/packages/react-ui/components/ScrollContainer/ScrollContainer.helpers.ts b/packages/react-ui/components/ScrollContainer/ScrollContainer.helpers.ts index 9352f6dc359..eed25fb8c84 100644 --- a/packages/react-ui/components/ScrollContainer/ScrollContainer.helpers.ts +++ b/packages/react-ui/components/ScrollContainer/ScrollContainer.helpers.ts @@ -1,6 +1,6 @@ import { MIN_SCROLL_SIZE, scrollSizeParametersNames } from './ScrollContainer.constants'; -import { ScrollBarScrollState } from './ScrollBar'; -import { ScrollContainerScrollStateX, ScrollContainerScrollStateY } from './ScrollContainer'; +import type { ScrollBarScrollState } from './ScrollBar'; +import type { ScrollContainerScrollStateX, ScrollContainerScrollStateY } from './ScrollContainer'; export const getScrollSizeParams = (inner: HTMLElement, axis: 'x' | 'y') => { const { offset, size, pos } = scrollSizeParametersNames[axis]; diff --git a/packages/react-ui/components/ScrollContainer/ScrollContainer.styles.ts b/packages/react-ui/components/ScrollContainer/ScrollContainer.styles.ts index b813bed8d14..238cf3d80a2 100644 --- a/packages/react-ui/components/ScrollContainer/ScrollContainer.styles.ts +++ b/packages/react-ui/components/ScrollContainer/ScrollContainer.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle, prefix } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const globalClasses = prefix('scroll-container')({ scrollbarX: 'scrollbar-x', diff --git a/packages/react-ui/components/ScrollContainer/ScrollContainer.tsx b/packages/react-ui/components/ScrollContainer/ScrollContainer.tsx index 51de603f798..7598a611947 100644 --- a/packages/react-ui/components/ScrollContainer/ScrollContainer.tsx +++ b/packages/react-ui/components/ScrollContainer/ScrollContainer.tsx @@ -5,11 +5,13 @@ import debounce from 'lodash.debounce'; import { isInstanceOf } from '../../lib/isInstanceOf'; import * as LayoutEvents from '../../lib/LayoutEvents'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; -import { Nullable } from '../../typings/utility-types'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { Nullable } from '../../typings/utility-types'; import { cx } from '../../lib/theming/Emotion'; import { isIE11 } from '../../lib/client'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { getDOMRect } from '../../lib/dom/getDOMRect'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { isTestEnv } from '../../lib/currentEnvironment'; @@ -22,7 +24,8 @@ import { convertScrollbarXScrollState, convertScrollbarYScrollState, } from './ScrollContainer.helpers'; -import { ScrollAxis, ScrollBar, ScrollBarScrollState } from './ScrollBar'; +import type { ScrollAxis, ScrollBarScrollState } from './ScrollBar'; +import { ScrollBar } from './ScrollBar'; export type ScrollContainerScrollStateX = 'left' | 'scroll' | 'right'; export type ScrollContainerScrollStateY = 'top' | 'scroll' | 'bottom'; diff --git a/packages/react-ui/components/ScrollContainer/__stories__/ScrollContainer.stories.tsx b/packages/react-ui/components/ScrollContainer/__stories__/ScrollContainer.stories.tsx index aeab33b91b1..c3ca4f64268 100644 --- a/packages/react-ui/components/ScrollContainer/__stories__/ScrollContainer.stories.tsx +++ b/packages/react-ui/components/ScrollContainer/__stories__/ScrollContainer.stories.tsx @@ -1,14 +1,15 @@ // TODO: Rewrite stories and enable rule (in process of functional refactoring). /* eslint-disable react/no-unstable-nested-components */ -import React, { CSSProperties, useState } from 'react'; +import type { CSSProperties } from 'react'; +import React, { useState } from 'react'; -import { - ScrollContainer, +import type { ScrollContainerScrollState, ScrollContainerScrollStateX, ScrollContainerScrollStateY, } from '../ScrollContainer'; -import { Story } from '../../../typings/stories'; +import { ScrollContainer } from '../ScrollContainer'; +import type { Story } from '../../../typings/stories'; import { Gapped } from '../../Gapped'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; diff --git a/packages/react-ui/components/Select/Select.styles.ts b/packages/react-ui/components/Select/Select.styles.ts index 023b1257b13..e964ae1a5d2 100644 --- a/packages/react-ui/components/Select/Select.styles.ts +++ b/packages/react-ui/components/Select/Select.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ root() { diff --git a/packages/react-ui/components/Select/Select.tsx b/packages/react-ui/components/Select/Select.tsx index 5bd859108df..3da3df65bf5 100644 --- a/packages/react-ui/components/Select/Select.tsx +++ b/packages/react-ui/components/Select/Select.tsx @@ -1,4 +1,5 @@ -import React, { ReactNode, ReactPortal, AriaAttributes, HTMLAttributes } from 'react'; +import type { ReactNode, ReactPortal, AriaAttributes, HTMLAttributes } from 'react'; +import React from 'react'; import invariant from 'invariant'; import { globalObject } from '@skbkontur/global-object'; import debounce from 'lodash.debounce'; @@ -13,26 +14,30 @@ import { } from '../../lib/events/keyboard/identifiers'; import { locale } from '../../lib/locale/decorators'; import { reactGetTextContent } from '../../lib/reactGetTextContent'; -import { Button, ButtonProps, ButtonUse } from '../Button'; +import type { ButtonProps, ButtonUse } from '../Button'; +import { Button } from '../Button'; import { filterProps } from '../../lib/filterProps'; import { Input } from '../Input'; import { Menu } from '../../internal/Menu'; -import { MenuItem, MenuItemProps } from '../MenuItem'; +import type { MenuItemProps } from '../MenuItem'; +import { MenuItem } from '../MenuItem'; import { MenuSeparator } from '../MenuSeparator'; import { RenderLayer } from '../../internal/RenderLayer'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { getRandomID, isFunction, isNonNullable, isReactUINode } from '../../lib/utils'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme, ThemeIn } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme, ThemeIn } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { MobilePopup } from '../../internal/MobilePopup'; import { cx } from '../../lib/theming/Emotion'; import { responsiveLayout } from '../ResponsiveLayout/decorator'; -import { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, rootNode } from '../../lib/rootNode'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { MenuHeaderProps } from '../MenuHeader'; -import { SizeProp } from '../../lib/types/props'; +import type { MenuHeaderProps } from '../MenuHeader'; +import type { SizeProp } from '../../lib/types/props'; import { styles as linkStyles } from '../Link/Link.styles'; import { Popup } from '../../internal/Popup'; import { ZIndex } from '../../internal/ZIndex'; @@ -40,7 +45,8 @@ import { getMenuPositions } from '../../lib/getMenuPositions'; import { ArrowDownIcon } from './ArrowDownIcon'; import { Item } from './Item'; -import { SelectLocale, SelectLocaleHelper } from './locale'; +import type { SelectLocale } from './locale'; +import { SelectLocaleHelper } from './locale'; import { styles } from './Select.styles'; import { getSelectTheme } from './selectTheme'; diff --git a/packages/react-ui/components/Select/__stories__/Select.stories.tsx b/packages/react-ui/components/Select/__stories__/Select.stories.tsx index 6b9d8faebba..fc969a3a2d2 100644 --- a/packages/react-ui/components/Select/__stories__/Select.stories.tsx +++ b/packages/react-ui/components/Select/__stories__/Select.stories.tsx @@ -3,12 +3,13 @@ import React, { useState } from 'react'; import AddIcon from '@skbkontur/react-icons/Add'; import { action } from '@storybook/addon-actions'; -import { CSFStory } from 'creevey'; +import type { CSFStory } from 'creevey'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { isKeyEnter } from '../../../lib/events/keyboard/identifiers'; import { Button } from '../../Button'; -import { Select, SelectProps } from '../Select'; +import type { SelectProps } from '../Select'; +import { Select } from '../Select'; import { Gapped } from '../../Gapped'; import { ResponsiveLayout } from '../../ResponsiveLayout'; import { MenuItem } from '../../MenuItem'; diff --git a/packages/react-ui/components/Select/locale/index.ts b/packages/react-ui/components/Select/locale/index.ts index 9dfbf8da338..a7e57a62d61 100644 --- a/packages/react-ui/components/Select/locale/index.ts +++ b/packages/react-ui/components/Select/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { SelectLocale } from './types'; +import type { SelectLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/Select/locale/locales/en.ts b/packages/react-ui/components/Select/locale/locales/en.ts index 975d53c0df8..33461ae71d7 100644 --- a/packages/react-ui/components/Select/locale/locales/en.ts +++ b/packages/react-ui/components/Select/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { SelectLocale } from '../types'; +import type { SelectLocale } from '../types'; export const componentsLocales: SelectLocale = { placeholder: 'Nothing selected', diff --git a/packages/react-ui/components/Select/locale/locales/ru.ts b/packages/react-ui/components/Select/locale/locales/ru.ts index a313e8cdd88..987ef6988f7 100644 --- a/packages/react-ui/components/Select/locale/locales/ru.ts +++ b/packages/react-ui/components/Select/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { SelectLocale } from '../types'; +import type { SelectLocale } from '../types'; export const componentsLocales: SelectLocale = { placeholder: 'Ничего не выбрано', diff --git a/packages/react-ui/components/Select/locale/types.ts b/packages/react-ui/components/Select/locale/types.ts index 528c578e0ce..aed802894e1 100644 --- a/packages/react-ui/components/Select/locale/types.ts +++ b/packages/react-ui/components/Select/locale/types.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; export interface SelectLocale { placeholder: React.ReactNode; diff --git a/packages/react-ui/components/Select/selectTheme.ts b/packages/react-ui/components/Select/selectTheme.ts index 9a48cc4b484..8e5d68c634a 100644 --- a/packages/react-ui/components/Select/selectTheme.ts +++ b/packages/react-ui/components/Select/selectTheme.ts @@ -1,7 +1,7 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; -import { SelectProps } from './Select'; +import type { SelectProps } from './Select'; export const getSelectTheme = (theme: Theme, props: SelectProps): Theme => { const baseTheme = ThemeFactory.create( diff --git a/packages/react-ui/components/SidePage/SidePage.styles.ts b/packages/react-ui/components/SidePage/SidePage.styles.ts index 0292cca2db2..12bea5217e9 100644 --- a/packages/react-ui/components/SidePage/SidePage.styles.ts +++ b/packages/react-ui/components/SidePage/SidePage.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { resetButton } from '../../lib/styles/Mixins'; export const styles = memoizeStyle({ diff --git a/packages/react-ui/components/SidePage/SidePage.tsx b/packages/react-ui/components/SidePage/SidePage.tsx index 585e20ac697..c4bf8b0f2ba 100644 --- a/packages/react-ui/components/SidePage/SidePage.tsx +++ b/packages/react-ui/components/SidePage/SidePage.tsx @@ -1,4 +1,5 @@ -import React, { AriaAttributes, HTMLAttributes } from 'react'; +import type { AriaAttributes, HTMLAttributes } from 'react'; +import React from 'react'; import { CSSTransition } from 'react-transition-group'; import FocusLock from 'react-focus-lock'; import { globalObject } from '@skbkontur/global-object'; @@ -8,13 +9,15 @@ import { isKeyEscape } from '../../lib/events/keyboard/identifiers'; import * as LayoutEvents from '../../lib/LayoutEvents'; import { stopPropagation } from '../../lib/events/stopPropagation'; import { HideBodyVerticalScroll } from '../../internal/HideBodyVerticalScroll'; -import { ModalStack, ModalStackSubscription } from '../../lib/ModalStack'; +import type { ModalStackSubscription } from '../../lib/ModalStack'; +import { ModalStack } from '../../lib/ModalStack'; import { RenderContainer } from '../../internal/RenderContainer'; import { RenderLayer } from '../../internal/RenderLayer'; import { ZIndex } from '../../internal/ZIndex'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { isTestEnv } from '../../lib/currentEnvironment'; import { ResponsiveLayout } from '../ResponsiveLayout'; @@ -23,7 +26,8 @@ import { isInstanceOf } from '../../lib/isInstanceOf'; import { SidePageBody } from './SidePageBody'; import { SidePageContainer } from './SidePageContainer'; -import { SidePageContext, SidePageContextType } from './SidePageContext'; +import type { SidePageContextType } from './SidePageContext'; +import { SidePageContext } from './SidePageContext'; import { SidePageFooter } from './SidePageFooter'; import { SidePageHeader } from './SidePageHeader'; import { styles } from './SidePage.styles'; diff --git a/packages/react-ui/components/SidePage/SidePageBody.tsx b/packages/react-ui/components/SidePage/SidePageBody.tsx index 68549f8bd6a..fe8a366c497 100644 --- a/packages/react-ui/components/SidePage/SidePageBody.tsx +++ b/packages/react-ui/components/SidePage/SidePageBody.tsx @@ -1,13 +1,16 @@ import React from 'react'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { responsiveLayout } from '../ResponsiveLayout/decorator'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { styles } from './SidePage.styles'; -import { SidePageContext, SidePageContextType } from './SidePageContext'; +import type { SidePageContextType } from './SidePageContext'; +import { SidePageContext } from './SidePageContext'; export interface SidePageBodyProps extends CommonProps { children?: React.ReactNode; diff --git a/packages/react-ui/components/SidePage/SidePageContainer.tsx b/packages/react-ui/components/SidePage/SidePageContainer.tsx index 7dc0119df20..c62ca3ac511 100644 --- a/packages/react-ui/components/SidePage/SidePageContainer.tsx +++ b/packages/react-ui/components/SidePage/SidePageContainer.tsx @@ -1,11 +1,13 @@ import React from 'react'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; -import { Theme } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; import { cx } from '../../lib/theming/Emotion'; import { responsiveLayout } from '../ResponsiveLayout/decorator'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { styles } from './SidePage.styles'; import { SidePageContext } from './SidePageContext'; diff --git a/packages/react-ui/components/SidePage/SidePageContext.ts b/packages/react-ui/components/SidePage/SidePageContext.ts index 291eacce1e3..56b446c86da 100644 --- a/packages/react-ui/components/SidePage/SidePageContext.ts +++ b/packages/react-ui/components/SidePage/SidePageContext.ts @@ -1,7 +1,7 @@ import React from 'react'; -import { SidePageFooter } from './SidePageFooter'; -import { SidePageHeader } from './SidePageHeader'; +import type { SidePageFooter } from './SidePageFooter'; +import type { SidePageHeader } from './SidePageHeader'; export interface SidePageContextType { requestClose: () => void; diff --git a/packages/react-ui/components/SidePage/SidePageFooter.tsx b/packages/react-ui/components/SidePage/SidePageFooter.tsx index d8d14c4a305..ff37f7341e6 100644 --- a/packages/react-ui/components/SidePage/SidePageFooter.tsx +++ b/packages/react-ui/components/SidePage/SidePageFooter.tsx @@ -2,18 +2,22 @@ import React from 'react'; import * as LayoutEvents from '../../lib/LayoutEvents'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { responsiveLayout } from '../ResponsiveLayout/decorator'; -import { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, rootNode } from '../../lib/rootNode'; import { getDOMRect } from '../../lib/dom/getDOMRect'; -import { Gapped, GappedProps } from '../Gapped'; +import type { GappedProps } from '../Gapped'; +import { Gapped } from '../Gapped'; import { isNonNullable } from '../../lib/utils'; import { ModalSeparator } from '../Modal/ModalSeparator'; import { styles } from './SidePage.styles'; -import { SidePageContext, SidePageContextType } from './SidePageContext'; +import type { SidePageContextType } from './SidePageContext'; +import { SidePageContext } from './SidePageContext'; export interface SidePageFooterProps extends Omit { children?: React.ReactNode | ((fixed: boolean) => React.ReactNode); diff --git a/packages/react-ui/components/SidePage/SidePageHeader.tsx b/packages/react-ui/components/SidePage/SidePageHeader.tsx index 9e8f0369e79..07881b1d7d8 100644 --- a/packages/react-ui/components/SidePage/SidePageHeader.tsx +++ b/packages/react-ui/components/SidePage/SidePageHeader.tsx @@ -4,16 +4,19 @@ import { globalObject } from '@skbkontur/global-object'; import { Sticky } from '../Sticky'; import { isFunction } from '../../lib/utils'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { responsiveLayout } from '../ResponsiveLayout/decorator'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { getDOMRect } from '../../lib/dom/getDOMRect'; import { ModalSeparator } from '../Modal/ModalSeparator'; import { styles } from './SidePage.styles'; -import { SidePageContext, SidePageContextType } from './SidePageContext'; +import type { SidePageContextType } from './SidePageContext'; +import { SidePageContext } from './SidePageContext'; import { SidePageCloseButton } from './SidePageCloseButton'; export interface SidePageHeaderProps extends Omit { diff --git a/packages/react-ui/components/SidePage/__stories__/SidePage.stories.tsx b/packages/react-ui/components/SidePage/__stories__/SidePage.stories.tsx index bb22ed103ef..38fd09f556d 100644 --- a/packages/react-ui/components/SidePage/__stories__/SidePage.stories.tsx +++ b/packages/react-ui/components/SidePage/__stories__/SidePage.stories.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useState } from 'react'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { SidePage } from '../SidePage'; import { Button } from '../../Button'; import { Input } from '../../Input'; @@ -8,7 +8,7 @@ import { Textarea } from '../../Textarea'; import { Toggle } from '../../Toggle'; import { Modal } from '../../Modal'; import { Gapped } from '../../Gapped'; -import { Shape } from '../../../typings/utility-types'; +import type { Shape } from '../../../typings/utility-types'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; const textSample = ( diff --git a/packages/react-ui/components/SidePage/locale/index.ts b/packages/react-ui/components/SidePage/locale/index.ts index 5d219a6e574..afc96031e24 100644 --- a/packages/react-ui/components/SidePage/locale/index.ts +++ b/packages/react-ui/components/SidePage/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { SidePageLocale } from './types'; +import type { SidePageLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/SidePage/locale/locales/en.ts b/packages/react-ui/components/SidePage/locale/locales/en.ts index e753bcb701f..2948b01dffb 100644 --- a/packages/react-ui/components/SidePage/locale/locales/en.ts +++ b/packages/react-ui/components/SidePage/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { SidePageLocale } from '../types'; +import type { SidePageLocale } from '../types'; export const componentsLocales: SidePageLocale = { closeButtonAriaLabel: 'Close modal window', diff --git a/packages/react-ui/components/SidePage/locale/locales/ru.ts b/packages/react-ui/components/SidePage/locale/locales/ru.ts index c8c3a75d225..f02f9444ca0 100644 --- a/packages/react-ui/components/SidePage/locale/locales/ru.ts +++ b/packages/react-ui/components/SidePage/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { SidePageLocale } from '../types'; +import type { SidePageLocale } from '../types'; export const componentsLocales: SidePageLocale = { closeButtonAriaLabel: 'Закрыть модальное окно', diff --git a/packages/react-ui/components/SingleToast/SingleToast.tsx b/packages/react-ui/components/SingleToast/SingleToast.tsx index 8c83f17f6b9..fae4e193389 100644 --- a/packages/react-ui/components/SingleToast/SingleToast.tsx +++ b/packages/react-ui/components/SingleToast/SingleToast.tsx @@ -1,7 +1,8 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { Toast, ToastProps } from '../Toast/Toast'; +import type { ToastProps } from '../Toast/Toast'; +import { Toast } from '../Toast/Toast'; /** * Позволяет вызывать тосты с помощью статических методов. В отличие от статических методов из компонента `` - их можно кастомизировать и они работают с `React@18`. diff --git a/packages/react-ui/components/Spinner/Spinner.styles.ts b/packages/react-ui/components/Spinner/Spinner.styles.ts index 8afaf39688f..35f11788398 100644 --- a/packages/react-ui/components/Spinner/Spinner.styles.ts +++ b/packages/react-ui/components/Spinner/Spinner.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { AnimationKeyframes } from '../../lib/theming/AnimationKeyframes'; import { isIE11 } from '../../lib/client'; diff --git a/packages/react-ui/components/Spinner/Spinner.tsx b/packages/react-ui/components/Spinner/Spinner.tsx index c8353c02300..146304a4bb1 100644 --- a/packages/react-ui/components/Spinner/Spinner.tsx +++ b/packages/react-ui/components/Spinner/Spinner.tsx @@ -1,12 +1,14 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { SpinnerIcon } from '../../internal/SpinnerIcon/SpinnerIcon'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { styles } from './Spinner.styles'; diff --git a/packages/react-ui/components/Spinner/__stories__/Spinner.stories.tsx b/packages/react-ui/components/Spinner/__stories__/Spinner.stories.tsx index 33cf111c854..d3436be873b 100644 --- a/packages/react-ui/components/Spinner/__stories__/Spinner.stories.tsx +++ b/packages/react-ui/components/Spinner/__stories__/Spinner.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Meta } from '../../../typings/stories'; +import type { Meta } from '../../../typings/stories'; import { Spinner } from '../Spinner'; import { CheckAIcon16Regular } from '../../../internal/icons2022/CheckAIcon/CheckAIcon16Regular'; diff --git a/packages/react-ui/components/Sticky/Sticky.tsx b/packages/react-ui/components/Sticky/Sticky.tsx index d1556d86f13..0cd8169a422 100644 --- a/packages/react-ui/components/Sticky/Sticky.tsx +++ b/packages/react-ui/components/Sticky/Sticky.tsx @@ -4,12 +4,14 @@ import shallowEqual from 'shallowequal'; import { globalObject } from '@skbkontur/global-object'; import * as LayoutEvents from '../../lib/LayoutEvents'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { isFunction } from '../../lib/utils'; import { ZIndex } from '../../internal/ZIndex'; -import { CommonWrapper, CommonProps } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { getDOMRect } from '../../lib/dom/getDOMRect'; import { createPropsGetter } from '../../lib/createPropsGetter'; diff --git a/packages/react-ui/components/Sticky/__stories__/Sticky.stories.tsx b/packages/react-ui/components/Sticky/__stories__/Sticky.stories.tsx index 9538fcb3068..b73d00ff17b 100644 --- a/packages/react-ui/components/Sticky/__stories__/Sticky.stories.tsx +++ b/packages/react-ui/components/Sticky/__stories__/Sticky.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { Sticky } from '../Sticky'; const stickyContent = (fixed: boolean) => ( diff --git a/packages/react-ui/components/Switcher/Switcher.styles.ts b/packages/react-ui/components/Switcher/Switcher.styles.ts index ca48b2520d7..df4d7bf1930 100644 --- a/packages/react-ui/components/Switcher/Switcher.styles.ts +++ b/packages/react-ui/components/Switcher/Switcher.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ root() { diff --git a/packages/react-ui/components/Switcher/Switcher.tsx b/packages/react-ui/components/Switcher/Switcher.tsx index b410d1684d9..ac1b5d6370f 100644 --- a/packages/react-ui/components/Switcher/Switcher.tsx +++ b/packages/react-ui/components/Switcher/Switcher.tsx @@ -1,16 +1,20 @@ -import React, { HTMLAttributes } from 'react'; +import type { HTMLAttributes } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { isKeyArrowHorizontal, isKeyArrowLeft, isKeyEnter } from '../../lib/events/keyboard/identifiers'; import { getButtonCorners, Group } from '../Group'; -import { Button, ButtonProps } from '../Button'; -import { Nullable } from '../../typings/utility-types'; +import type { ButtonProps } from '../Button'; +import { Button } from '../Button'; +import type { Nullable } from '../../typings/utility-types'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; -import { SizeProp } from '../../lib/types/props'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; +import type { SizeProp } from '../../lib/types/props'; import { styles } from './Switcher.styles'; import { getSwitcherTheme } from './switcherTheme'; diff --git a/packages/react-ui/components/Switcher/__stories__/Switcher.stories.tsx b/packages/react-ui/components/Switcher/__stories__/Switcher.stories.tsx index 77d4a8d34c7..cd23e1933b6 100644 --- a/packages/react-ui/components/Switcher/__stories__/Switcher.stories.tsx +++ b/packages/react-ui/components/Switcher/__stories__/Switcher.stories.tsx @@ -1,11 +1,12 @@ import React from 'react'; -import { Story } from '../../../typings/stories'; -import { Switcher, SwitcherProps } from '../Switcher'; +import type { Story } from '../../../typings/stories'; +import type { SwitcherProps } from '../Switcher'; +import { Switcher } from '../Switcher'; import { Gapped } from '../../Gapped'; import { Hint } from '../../Hint'; import { Tooltip } from '../../Tooltip'; -import { ButtonProps } from '../../Button'; +import type { ButtonProps } from '../../Button'; interface ComponentState { value: string; diff --git a/packages/react-ui/components/Switcher/switcherTheme.ts b/packages/react-ui/components/Switcher/switcherTheme.ts index 261ffc428e2..49c61e21118 100644 --- a/packages/react-ui/components/Switcher/switcherTheme.ts +++ b/packages/react-ui/components/Switcher/switcherTheme.ts @@ -1,5 +1,5 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const getSwitcherTheme = (theme: Theme): Theme => { return ThemeFactory.create( diff --git a/packages/react-ui/components/Tabs/Indicator.styles.ts b/packages/react-ui/components/Tabs/Indicator.styles.ts index e510652a6b5..e44626374a0 100644 --- a/packages/react-ui/components/Tabs/Indicator.styles.ts +++ b/packages/react-ui/components/Tabs/Indicator.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ root(t: Theme) { diff --git a/packages/react-ui/components/Tabs/Indicator.tsx b/packages/react-ui/components/Tabs/Indicator.tsx index 51af8a98783..90bff7c3d14 100644 --- a/packages/react-ui/components/Tabs/Indicator.tsx +++ b/packages/react-ui/components/Tabs/Indicator.tsx @@ -4,16 +4,18 @@ import { globalObject } from '@skbkontur/global-object'; import { isInstanceOf } from '../../lib/isInstanceOf'; import * as LayoutEvents from '../../lib/LayoutEvents'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { cx } from '../../lib/theming/Emotion'; -import { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, rootNode } from '../../lib/rootNode'; import { getDOMRect } from '../../lib/dom/getDOMRect'; import { styles } from './Indicator.styles'; -import { TabsContext, TabsContextType } from './TabsContext'; -import { TabIndicators } from './Tab'; +import type { TabsContextType } from './TabsContext'; +import { TabsContext } from './TabsContext'; +import type { TabIndicators } from './Tab'; import { TabsDataTids } from './Tabs'; export interface IndicatorProps { diff --git a/packages/react-ui/components/Tabs/Tab.styles.ts b/packages/react-ui/components/Tabs/Tab.styles.ts index 97c64f52809..57f83728a6a 100644 --- a/packages/react-ui/components/Tabs/Tab.styles.ts +++ b/packages/react-ui/components/Tabs/Tab.styles.ts @@ -1,8 +1,8 @@ import { css, memoizeStyle, prefix } from '../../lib/theming/Emotion'; import { shift } from '../../lib/styles/DimensionFunctions'; import * as ColorFunctions from '../../lib/styles/ColorFunctions'; -import { Theme } from '../../lib/theming/Theme'; -import { SizeProp } from '../../lib/types/props'; +import type { Theme } from '../../lib/theming/Theme'; +import type { SizeProp } from '../../lib/types/props'; import { fontSize, lineHeight, paddingX, paddingY } from './helpers'; diff --git a/packages/react-ui/components/Tabs/Tab.tsx b/packages/react-ui/components/Tabs/Tab.tsx index 4234d92db20..bc4a3794ce3 100644 --- a/packages/react-ui/components/Tabs/Tab.tsx +++ b/packages/react-ui/components/Tabs/Tab.tsx @@ -1,21 +1,25 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import invariant from 'invariant'; import { globalObject } from '@skbkontur/global-object'; import { ResizeDetector } from '../../internal/ResizeDetector'; import { isKeyArrow, isKeyArrowLeft, isKeyArrowUp } from '../../lib/events/keyboard/identifiers'; import { keyListener } from '../../lib/events/keyListener'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { isFunctionalComponent } from '../../lib/utils'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes'; -import { TabsContext, TabsContextDefaultValue, TabsContextType } from './TabsContext'; +import type { TabsContextType } from './TabsContext'; +import { TabsContext, TabsContextDefaultValue } from './TabsContext'; import { globalClasses, horizontalStyles, styles, verticalStyles } from './Tab.styles'; export interface TabIndicators { diff --git a/packages/react-ui/components/Tabs/Tabs.styles.ts b/packages/react-ui/components/Tabs/Tabs.styles.ts index e8902f45a7d..700e804f7f8 100644 --- a/packages/react-ui/components/Tabs/Tabs.styles.ts +++ b/packages/react-ui/components/Tabs/Tabs.styles.ts @@ -1,6 +1,6 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; -import { SizeProp } from '../../lib/types/props'; +import type { Theme } from '../../lib/theming/Theme'; +import type { SizeProp } from '../../lib/types/props'; import { paddingX } from './helpers'; diff --git a/packages/react-ui/components/Tabs/Tabs.tsx b/packages/react-ui/components/Tabs/Tabs.tsx index 507be801d86..cadd02d6c87 100644 --- a/packages/react-ui/components/Tabs/Tabs.tsx +++ b/packages/react-ui/components/Tabs/Tabs.tsx @@ -1,20 +1,24 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import { globalObject } from '@skbkontur/global-object'; -import { emptyHandler } from '../../lib/utils'; +import type { emptyHandler } from '../../lib/utils'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { getRootNode } from '../../lib/rootNode/getRootNode'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { isInstanceOf } from '../../lib/isInstanceOf'; import { Indicator } from './Indicator'; import { styles } from './Tabs.styles'; -import { TabsContext, TabsContextType } from './TabsContext'; +import type { TabsContextType } from './TabsContext'; +import { TabsContext } from './TabsContext'; import { Tab } from './Tab'; type ValueBaseType = string; diff --git a/packages/react-ui/components/Tabs/TabsContext.ts b/packages/react-ui/components/Tabs/TabsContext.ts index c6a802a3647..0a26cd6e060 100644 --- a/packages/react-ui/components/Tabs/TabsContext.ts +++ b/packages/react-ui/components/Tabs/TabsContext.ts @@ -1,9 +1,9 @@ import React from 'react'; import { emptyHandler } from '../../lib/utils'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; -import { Tab } from './Tab'; +import type { Tab } from './Tab'; export interface TabsContextType { vertical: boolean; diff --git a/packages/react-ui/components/Tabs/__stories__/Tabs.stories.tsx b/packages/react-ui/components/Tabs/__stories__/Tabs.stories.tsx index cce6dd65e08..213fe55b583 100644 --- a/packages/react-ui/components/Tabs/__stories__/Tabs.stories.tsx +++ b/packages/react-ui/components/Tabs/__stories__/Tabs.stories.tsx @@ -3,14 +3,14 @@ import React, { useState } from 'react'; import { linkTo } from '@storybook/addon-links'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { ComponentTable } from '../../../internal/ComponentTable'; import { Tabs } from '../Tabs'; -import { TabProps } from '../Tab'; +import type { TabProps } from '../Tab'; import { Modal } from '../../Modal'; import { Button } from '../../Button'; -import { TabsProps } from '..'; -import { SizeProp } from '../../../lib/types/props'; +import type { TabsProps } from '..'; +import type { SizeProp } from '../../../lib/types/props'; const { Tab } = Tabs; const Img: React.FC<{ size: string }> = ({ size }) => ( diff --git a/packages/react-ui/components/Tabs/helpers.ts b/packages/react-ui/components/Tabs/helpers.ts index c39279540c6..5e97834240a 100644 --- a/packages/react-ui/components/Tabs/helpers.ts +++ b/packages/react-ui/components/Tabs/helpers.ts @@ -1,5 +1,5 @@ -import { Theme } from '../../lib/theming/Theme'; -import { SizeProp } from '../../lib/types/props'; +import type { Theme } from '../../lib/theming/Theme'; +import type { SizeProp } from '../../lib/types/props'; export function fontSize(t: Theme, size: SizeProp) { return mapSize(size, t.tabFontSizeSmall, t.tabFontSizeMedium, t.tabFontSizeLarge); diff --git a/packages/react-ui/components/Textarea/Textarea.styles.ts b/packages/react-ui/components/Textarea/Textarea.styles.ts index 1df6868ab75..cc20d66bee2 100644 --- a/packages/react-ui/components/Textarea/Textarea.styles.ts +++ b/packages/react-ui/components/Textarea/Textarea.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { counterSizeMixin, rootTextareaSizeMixin, textareaSizeMixin } from './Textarea.mixins'; diff --git a/packages/react-ui/components/Textarea/Textarea.tsx b/packages/react-ui/components/Textarea/Textarea.tsx index 17583b5f6e6..c6c33ab0d43 100644 --- a/packages/react-ui/components/Textarea/Textarea.tsx +++ b/packages/react-ui/components/Textarea/Textarea.tsx @@ -1,4 +1,5 @@ -import React, { AriaAttributes, ReactNode } from 'react'; +import type { AriaAttributes, ReactNode } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import throttle from 'lodash.throttle'; import { globalObject } from '@skbkontur/global-object'; @@ -6,22 +7,25 @@ import { globalObject } from '@skbkontur/global-object'; import { isKeyEnter } from '../../lib/events/keyboard/identifiers'; import { needsPolyfillPlaceholder } from '../../lib/needsPolyfillPlaceholder'; import * as LayoutEvents from '../../lib/LayoutEvents'; -import { Nullable, Override } from '../../typings/utility-types'; +import type { Nullable, Override } from '../../typings/utility-types'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { RenderLayer } from '../../internal/RenderLayer'; import { ResizeDetector } from '../../internal/ResizeDetector'; import { isIE11, isSafariWithTextareaBug } from '../../lib/client'; -import { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import type { CommonProps, CommonWrapperRestProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { isTestEnv } from '../../lib/currentEnvironment'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { getTextAreaHeight } from './TextareaHelpers'; import { styles } from './Textarea.styles'; -import { TextareaCounter, TextareaCounterRef } from './TextareaCounter'; +import type { TextareaCounterRef } from './TextareaCounter'; +import { TextareaCounter } from './TextareaCounter'; import { TextareaWithSafari17Workaround } from './TextareaWithSafari17Workaround'; const DEFAULT_WIDTH = 250; diff --git a/packages/react-ui/components/Textarea/TextareaCounter.tsx b/packages/react-ui/components/Textarea/TextareaCounter.tsx index 053ed9a5494..af8ee09b408 100644 --- a/packages/react-ui/components/Textarea/TextareaCounter.tsx +++ b/packages/react-ui/components/Textarea/TextareaCounter.tsx @@ -1,4 +1,5 @@ -import React, { SyntheticEvent, useContext, useCallback, useImperativeHandle, useState } from 'react'; +import type { SyntheticEvent } from 'react'; +import React, { useContext, useCallback, useImperativeHandle, useState } from 'react'; import propTypes from 'prop-types'; import { globalObject } from '@skbkontur/global-object'; @@ -9,9 +10,10 @@ import { isFunction } from '../../lib/utils'; import { Tooltip } from '../Tooltip'; import { cx } from '../../lib/theming/Emotion'; import { QuestionCircleIcon16Solid } from '../../internal/icons2022/QuestionCircleIcon/QuestionCircleIcon16Solid'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; -import { TextareaDataTids, TextareaProps } from './Textarea'; +import type { TextareaProps } from './Textarea'; +import { TextareaDataTids } from './Textarea'; import { styles } from './Textarea.styles'; export interface TextareaCounterProps { diff --git a/packages/react-ui/components/Textarea/__stories__/Textarea.stories.tsx b/packages/react-ui/components/Textarea/__stories__/Textarea.stories.tsx index 8cd44f2741a..82e2941fcd4 100644 --- a/packages/react-ui/components/Textarea/__stories__/Textarea.stories.tsx +++ b/packages/react-ui/components/Textarea/__stories__/Textarea.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { Textarea } from '../Textarea'; import { Button } from '../../Button'; import { Gapped } from '../../Gapped'; diff --git a/packages/react-ui/components/Toast/Toast.tsx b/packages/react-ui/components/Toast/Toast.tsx index b3ba683cbad..0731b457c74 100644 --- a/packages/react-ui/components/Toast/Toast.tsx +++ b/packages/react-ui/components/Toast/Toast.tsx @@ -1,18 +1,23 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import { CSSTransition, TransitionGroup } from 'react-transition-group'; -import { globalObject, SafeTimer } from '@skbkontur/global-object'; +import type { SafeTimer } from '@skbkontur/global-object'; +import { globalObject } from '@skbkontur/global-object'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme, ThemeIn } from '../../lib/theming/Theme'; +import type { Theme, ThemeIn } from '../../lib/theming/Theme'; import { RenderContainer } from '../../internal/RenderContainer'; -import { Nullable } from '../../typings/utility-types'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { Nullable } from '../../typings/utility-types'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { isTestEnv } from '../../lib/currentEnvironment'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { styles } from './Toast.styles'; -import { ToastView, ToastViewProps } from './ToastView'; +import type { ToastViewProps } from './ToastView'; +import { ToastView } from './ToastView'; import { ToastStatic } from './ToastStatic'; export interface Action { diff --git a/packages/react-ui/components/Toast/ToastStatic.tsx b/packages/react-ui/components/Toast/ToastStatic.tsx index 2b46a8df0d4..4d8062e6ea7 100644 --- a/packages/react-ui/components/Toast/ToastStatic.tsx +++ b/packages/react-ui/components/Toast/ToastStatic.tsx @@ -2,9 +2,10 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { globalObject } from '@skbkontur/global-object'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; -import { Toast, Action, ToastDataTids } from './Toast'; +import type { Action } from './Toast'; +import { Toast, ToastDataTids } from './Toast'; export class ToastStatic { public static push = (notification: string, action?: Nullable, showTime?: number) => { diff --git a/packages/react-ui/components/Toast/ToastView.styles.ts b/packages/react-ui/components/Toast/ToastView.styles.ts index 7624eec19c1..803d13d7df4 100644 --- a/packages/react-ui/components/Toast/ToastView.styles.ts +++ b/packages/react-ui/components/Toast/ToastView.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; const getVerticalPaddings = (theme: Theme) => { const { toastPaddingY } = theme; diff --git a/packages/react-ui/components/Toast/ToastView.tsx b/packages/react-ui/components/Toast/ToastView.tsx index 2886dbdebdf..9f83200c347 100644 --- a/packages/react-ui/components/Toast/ToastView.tsx +++ b/packages/react-ui/components/Toast/ToastView.tsx @@ -1,18 +1,23 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import { func, shape, string } from 'prop-types'; import { locale } from '../../lib/locale/decorators'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { ZIndex } from '../../internal/ZIndex'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { CloseButtonIcon } from '../../internal/CloseButtonIcon/CloseButtonIcon'; import { styles } from './ToastView.styles'; -import { Action, ToastDataTids } from './Toast'; -import { ToastLocale, ToastLocaleHelper } from './locale'; +import type { Action } from './Toast'; +import { ToastDataTids } from './Toast'; +import type { ToastLocale } from './locale'; +import { ToastLocaleHelper } from './locale'; export interface ToastViewProps extends Pick, CommonProps { /** diff --git a/packages/react-ui/components/Toast/__stories__/Toast.stories.tsx b/packages/react-ui/components/Toast/__stories__/Toast.stories.tsx index 201e22e6ca3..63c8bd5f18b 100644 --- a/packages/react-ui/components/Toast/__stories__/Toast.stories.tsx +++ b/packages/react-ui/components/Toast/__stories__/Toast.stories.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import { SingleToast } from '../../SingleToast'; -import { Meta } from '../../../typings/stories'; +import type { Meta } from '../../../typings/stories'; import { Toast } from '../Toast'; const TestNotifier = ({ complex }: { complex?: boolean }) => { diff --git a/packages/react-ui/components/Toast/locale/index.ts b/packages/react-ui/components/Toast/locale/index.ts index 19da3449481..a4255e91681 100644 --- a/packages/react-ui/components/Toast/locale/index.ts +++ b/packages/react-ui/components/Toast/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { ToastLocale } from './types'; +import type { ToastLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/Toast/locale/locales/en.ts b/packages/react-ui/components/Toast/locale/locales/en.ts index ed5d4626dc4..27eaa4b4490 100644 --- a/packages/react-ui/components/Toast/locale/locales/en.ts +++ b/packages/react-ui/components/Toast/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { ToastLocale } from '../types'; +import type { ToastLocale } from '../types'; export const componentsLocales: ToastLocale = { closeButtonAriaLabel: 'Close notification', diff --git a/packages/react-ui/components/Toast/locale/locales/ru.ts b/packages/react-ui/components/Toast/locale/locales/ru.ts index ac64dede296..d46b4c7f00a 100644 --- a/packages/react-ui/components/Toast/locale/locales/ru.ts +++ b/packages/react-ui/components/Toast/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { ToastLocale } from '../types'; +import type { ToastLocale } from '../types'; export const componentsLocales: ToastLocale = { closeButtonAriaLabel: 'Закрыть уведомление', diff --git a/packages/react-ui/components/Toggle/Toggle.styles.ts b/packages/react-ui/components/Toggle/Toggle.styles.ts index 4b1eb03cf57..2fe86efe7de 100644 --- a/packages/react-ui/components/Toggle/Toggle.styles.ts +++ b/packages/react-ui/components/Toggle/Toggle.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle, prefix } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { buttonSizeMixin, diff --git a/packages/react-ui/components/Toggle/Toggle.tsx b/packages/react-ui/components/Toggle/Toggle.tsx index e20345be16f..ebab994fbe6 100644 --- a/packages/react-ui/components/Toggle/Toggle.tsx +++ b/packages/react-ui/components/Toggle/Toggle.tsx @@ -1,15 +1,18 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { keyListener } from '../../lib/events/keyListener'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { isTestEnv } from '../../lib/currentEnvironment'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { FocusControlWrapper } from '../../internal/FocusControlWrapper'; import { styles, globalClasses } from './Toggle.styles'; diff --git a/packages/react-ui/components/Toggle/__stories__/Toggle.stories.tsx b/packages/react-ui/components/Toggle/__stories__/Toggle.stories.tsx index a177ea4c6cf..dedda737a9f 100644 --- a/packages/react-ui/components/Toggle/__stories__/Toggle.stories.tsx +++ b/packages/react-ui/components/Toggle/__stories__/Toggle.stories.tsx @@ -1,11 +1,12 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { Toggle } from '../Toggle'; import { Gapped } from '../../Gapped'; import { Button } from '../../Button'; -import { Checkbox, CheckboxProps } from '../../Checkbox'; +import type { CheckboxProps } from '../../Checkbox'; +import { Checkbox } from '../../Checkbox'; import { Tooltip } from '../../Tooltip'; interface PlaygroundState { diff --git a/packages/react-ui/components/Token/Token.styles.ts b/packages/react-ui/components/Token/Token.styles.ts index 77b0df093af..6eb7e4c1047 100644 --- a/packages/react-ui/components/Token/Token.styles.ts +++ b/packages/react-ui/components/Token/Token.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle, prefix } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { tokenSizeMixin } from './Token.mixins'; diff --git a/packages/react-ui/components/Token/Token.tsx b/packages/react-ui/components/Token/Token.tsx index 24013372738..f5697a73609 100644 --- a/packages/react-ui/components/Token/Token.tsx +++ b/packages/react-ui/components/Token/Token.tsx @@ -1,19 +1,23 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import { locale } from '../../lib/locale/decorators'; import { emptyHandler } from '../../lib/utils'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { CloseButtonIcon } from '../../internal/CloseButtonIcon/CloseButtonIcon'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { reactGetTextContent } from '../../lib/reactGetTextContent'; import { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes'; import { styles } from './Token.styles'; -import { TokenLocale, TokenLocaleHelper } from './locale'; +import type { TokenLocale } from './locale'; +import { TokenLocaleHelper } from './locale'; import { TokenView } from './TokenView'; export type TokenSize = SizeProp; diff --git a/packages/react-ui/components/Token/TokenView.tsx b/packages/react-ui/components/Token/TokenView.tsx index e49222ab906..834b6365a6b 100644 --- a/packages/react-ui/components/Token/TokenView.tsx +++ b/packages/react-ui/components/Token/TokenView.tsx @@ -1,10 +1,11 @@ -import React, { ReactNode, useContext } from 'react'; +import type { ReactNode } from 'react'; +import React, { useContext } from 'react'; import { CommonWrapper } from '../../internal/CommonWrapper'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { cx } from '../../lib/theming/Emotion'; -import { TokenSize } from './Token'; +import type { TokenSize } from './Token'; import { globalClasses, styles } from './Token.styles'; export interface TokenViewProps extends React.HTMLAttributes { diff --git a/packages/react-ui/components/Token/__stories__/Token.stories.tsx b/packages/react-ui/components/Token/__stories__/Token.stories.tsx index 80f11530ac8..94f1110c643 100644 --- a/packages/react-ui/components/Token/__stories__/Token.stories.tsx +++ b/packages/react-ui/components/Token/__stories__/Token.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Meta } from '../../../typings/stories'; +import type { Meta } from '../../../typings/stories'; import { Token } from '../Token'; import { Gapped } from '../../Gapped'; diff --git a/packages/react-ui/components/Token/locale/index.ts b/packages/react-ui/components/Token/locale/index.ts index 2cba8f7f540..67c062a9885 100644 --- a/packages/react-ui/components/Token/locale/index.ts +++ b/packages/react-ui/components/Token/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { TokenLocale } from './types'; +import type { TokenLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/Token/locale/locales/en.ts b/packages/react-ui/components/Token/locale/locales/en.ts index 5059d9e8a5c..d9bfe954ecc 100644 --- a/packages/react-ui/components/Token/locale/locales/en.ts +++ b/packages/react-ui/components/Token/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { TokenLocale } from '../types'; +import type { TokenLocale } from '../types'; export const componentsLocales: TokenLocale = { removeButtonAriaLabel: 'Remove token', diff --git a/packages/react-ui/components/Token/locale/locales/ru.ts b/packages/react-ui/components/Token/locale/locales/ru.ts index c7bb33258b4..f0a640c572a 100644 --- a/packages/react-ui/components/Token/locale/locales/ru.ts +++ b/packages/react-ui/components/Token/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { TokenLocale } from '../types'; +import type { TokenLocale } from '../types'; export const componentsLocales: TokenLocale = { removeButtonAriaLabel: 'Удалить токен', diff --git a/packages/react-ui/components/TokenInput/TextWidthHelper.tsx b/packages/react-ui/components/TokenInput/TextWidthHelper.tsx index 08fb6fa70e5..60e290d33ce 100644 --- a/packages/react-ui/components/TokenInput/TextWidthHelper.tsx +++ b/packages/react-ui/components/TokenInput/TextWidthHelper.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { cx } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { getDOMRect } from '../../lib/dom/getDOMRect'; import { TokenView } from '../Token/TokenView'; -import { TokenSize } from '../Token'; +import type { TokenSize } from '../Token'; import { styles } from '../Token/Token.styles'; // a thin character to preserve some space diff --git a/packages/react-ui/components/TokenInput/TokenInput.styles.ts b/packages/react-ui/components/TokenInput/TokenInput.styles.ts index d9c60378db1..66f14af276e 100644 --- a/packages/react-ui/components/TokenInput/TokenInput.styles.ts +++ b/packages/react-ui/components/TokenInput/TokenInput.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { labelSizeMixin, inputSizeMixin } from './TokenInput.mixins'; diff --git a/packages/react-ui/components/TokenInput/TokenInput.tsx b/packages/react-ui/components/TokenInput/TokenInput.tsx index de287834830..06b256cad65 100644 --- a/packages/react-ui/components/TokenInput/TokenInput.tsx +++ b/packages/react-ui/components/TokenInput/TokenInput.tsx @@ -1,4 +1,4 @@ -import React, { +import type { AriaAttributes, ChangeEvent, FocusEvent, @@ -8,6 +8,7 @@ import React, { MouseEventHandler, ReactNode, } from 'react'; +import React from 'react'; import isEqual from 'lodash.isequal'; import { globalObject } from '@skbkontur/global-object'; @@ -26,23 +27,30 @@ import { isShortcutSelectAll, } from '../../lib/events/keyboard/identifiers'; import * as LayoutEvents from '../../lib/LayoutEvents'; -import { Menu } from '../../internal/Menu'; -import { Token, TokenProps, TokenSize } from '../Token'; -import { MenuItemState, MenuItem } from '../MenuItem'; -import { AnyObject, emptyHandler, getRandomID } from '../../lib/utils'; +import type { Menu } from '../../internal/Menu'; +import type { TokenProps, TokenSize } from '../Token'; +import { Token } from '../Token'; +import type { MenuItemState } from '../MenuItem'; +import { MenuItem } from '../MenuItem'; +import type { AnyObject } from '../../lib/utils'; +import { emptyHandler, getRandomID } from '../../lib/utils'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { locale } from '../../lib/locale/decorators'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; -import { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { getUid } from '../../lib/uidUtils'; import { TokenView } from '../Token/TokenView'; -import { TokenInputLocale, TokenInputLocaleHelper } from './locale'; +import type { TokenInputLocale } from './locale'; +import { TokenInputLocaleHelper } from './locale'; import { styles } from './TokenInput.styles'; -import { TokenInputAction, tokenInputReducer } from './TokenInputReducer'; +import type { TokenInputAction } from './TokenInputReducer'; +import { tokenInputReducer } from './TokenInputReducer'; import { TokenInputMenu } from './TokenInputMenu'; import { TextWidthHelper } from './TextWidthHelper'; diff --git a/packages/react-ui/components/TokenInput/TokenInputMenu.tsx b/packages/react-ui/components/TokenInput/TokenInputMenu.tsx index 925e6cb3a42..cd45d0e72be 100644 --- a/packages/react-ui/components/TokenInput/TokenInputMenu.tsx +++ b/packages/react-ui/components/TokenInput/TokenInputMenu.tsx @@ -1,15 +1,18 @@ import React from 'react'; -import { HTMLProps } from '../../typings/html'; +import type { HTMLProps } from '../../typings/html'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Popup, PopupProps } from '../../internal/Popup'; -import { ComboBoxMenu, ComboBoxMenuProps } from '../../internal/CustomComboBox'; -import { Menu } from '../../internal/Menu'; -import { Theme } from '../../lib/theming/Theme'; +import type { PopupProps } from '../../internal/Popup'; +import { Popup } from '../../internal/Popup'; +import type { ComboBoxMenuProps } from '../../internal/CustomComboBox'; +import { ComboBoxMenu } from '../../internal/CustomComboBox'; +import type { Menu } from '../../internal/Menu'; +import type { Theme } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { TokenSize } from '../Token'; +import type { TokenSize } from '../Token'; -import { TokenInputDataTids, TokenInputMenuAlign, TokenInputProps } from './TokenInput'; +import type { TokenInputMenuAlign, TokenInputProps } from './TokenInput'; +import { TokenInputDataTids } from './TokenInput'; export interface TokenInputMenuProps extends ComboBoxMenuProps { anchorElement: PopupProps['anchorElement']; diff --git a/packages/react-ui/components/TokenInput/TokenInputReducer.ts b/packages/react-ui/components/TokenInput/TokenInputReducer.ts index 007c3ad5eec..050cf97b6b9 100644 --- a/packages/react-ui/components/TokenInput/TokenInputReducer.ts +++ b/packages/react-ui/components/TokenInput/TokenInputReducer.ts @@ -1,4 +1,5 @@ -import { TokenInputState, DefaultState } from './TokenInput'; +import type { TokenInputState } from './TokenInput'; +import { DefaultState } from './TokenInput'; export interface TokenInputAction { type: TokenInputActionType; diff --git a/packages/react-ui/components/TokenInput/__stories__/TokenInput.stories.tsx b/packages/react-ui/components/TokenInput/__stories__/TokenInput.stories.tsx index 9045904c67d..e539aa52d82 100644 --- a/packages/react-ui/components/TokenInput/__stories__/TokenInput.stories.tsx +++ b/packages/react-ui/components/TokenInput/__stories__/TokenInput.stories.tsx @@ -1,9 +1,10 @@ import React, { useState } from 'react'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { Gapped } from '../../Gapped'; import { Input } from '../../Input'; -import { TokenInput, TokenInputProps, TokenInputType } from '../TokenInput'; +import type { TokenInputProps } from '../TokenInput'; +import { TokenInput, TokenInputType } from '../TokenInput'; import { Token } from '../../Token'; import { delay } from '../../../lib/utils'; import { MenuItem } from '../../MenuItem'; diff --git a/packages/react-ui/components/TokenInput/__tests__/TokenInput-test.tsx b/packages/react-ui/components/TokenInput/__tests__/TokenInput-test.tsx index 55f14507d0d..8c1bfac5595 100644 --- a/packages/react-ui/components/TokenInput/__tests__/TokenInput-test.tsx +++ b/packages/react-ui/components/TokenInput/__tests__/TokenInput-test.tsx @@ -4,7 +4,8 @@ import userEvent from '@testing-library/user-event'; import { PopupIds } from '../../../internal/Popup'; import { defaultLangCode } from '../../../lib/locale/constants'; -import { LangCodes, LocaleContext, LocaleContextProps } from '../../../lib/locale'; +import type { LocaleContextProps } from '../../../lib/locale'; +import { LangCodes, LocaleContext } from '../../../lib/locale'; import { delay } from '../../../lib/utils'; import { TokenInputLocaleHelper } from '../locale'; import { TokenInput, TokenInputDataTids, TokenInputType } from '../TokenInput'; diff --git a/packages/react-ui/components/TokenInput/locale/index.ts b/packages/react-ui/components/TokenInput/locale/index.ts index 2ef16ae37a8..40b18bee712 100644 --- a/packages/react-ui/components/TokenInput/locale/index.ts +++ b/packages/react-ui/components/TokenInput/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { TokenInputLocale } from './types'; +import type { TokenInputLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/components/TokenInput/locale/locales/en.ts b/packages/react-ui/components/TokenInput/locale/locales/en.ts index b59602e739c..a111d860f4e 100644 --- a/packages/react-ui/components/TokenInput/locale/locales/en.ts +++ b/packages/react-ui/components/TokenInput/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { TokenInputLocale } from '../types'; +import type { TokenInputLocale } from '../types'; export const componentsLocales: TokenInputLocale = { addButtonComment: 'Type comma', diff --git a/packages/react-ui/components/TokenInput/locale/locales/ru.ts b/packages/react-ui/components/TokenInput/locale/locales/ru.ts index 3de306cd632..b2592d780d0 100644 --- a/packages/react-ui/components/TokenInput/locale/locales/ru.ts +++ b/packages/react-ui/components/TokenInput/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { TokenInputLocale } from '../types'; +import type { TokenInputLocale } from '../types'; export const componentsLocales: TokenInputLocale = { addButtonComment: 'Нажмите запятую', diff --git a/packages/react-ui/components/Tooltip/Tooltip.styles.ts b/packages/react-ui/components/Tooltip/Tooltip.styles.ts index 3cba6326ec8..311bf360382 100644 --- a/packages/react-ui/components/Tooltip/Tooltip.styles.ts +++ b/packages/react-ui/components/Tooltip/Tooltip.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ cross(t: Theme) { diff --git a/packages/react-ui/components/Tooltip/Tooltip.tsx b/packages/react-ui/components/Tooltip/Tooltip.tsx index db26496cfcf..585be042d6d 100644 --- a/packages/react-ui/components/Tooltip/Tooltip.tsx +++ b/packages/react-ui/components/Tooltip/Tooltip.tsx @@ -1,28 +1,30 @@ import React from 'react'; import warning from 'warning'; -import { globalObject, SafeTimer } from '@skbkontur/global-object'; +import type { SafeTimer } from '@skbkontur/global-object'; +import { globalObject } from '@skbkontur/global-object'; import { isNullable } from '../../lib/utils'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Popup, PopupProps, PopupPositionsType, ShortPopupPositionsType } from '../../internal/Popup'; -import { RenderLayer, RenderLayerProps } from '../../internal/RenderLayer'; -import { Nullable } from '../../typings/utility-types'; -import { MouseEventType } from '../../typings/event-types'; +import type { PopupProps, PopupPositionsType, ShortPopupPositionsType } from '../../internal/Popup'; +import { Popup } from '../../internal/Popup'; +import type { RenderLayerProps } from '../../internal/RenderLayer'; +import { RenderLayer } from '../../internal/RenderLayer'; +import type { Nullable } from '../../typings/utility-types'; +import type { MouseEventType } from '../../typings/event-types'; import { containsTargetOrRenderContainer } from '../../lib/listenFocusOutside'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { isTestEnv } from '../../lib/currentEnvironment'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; -import { InstanceWithAnchorElement } from '../../lib/InstanceWithAnchorElement'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; +import type { InstanceWithAnchorElement } from '../../lib/InstanceWithAnchorElement'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { CloseButtonIcon } from '../../internal/CloseButtonIcon/CloseButtonIcon'; import { isInstanceOf } from '../../lib/isInstanceOf'; -import { - getFullReactUIFlagsContext, - ReactUIFeatureFlags, - ReactUIFeatureFlagsContext, -} from '../../lib/featureFlagsContext'; +import type { ReactUIFeatureFlags } from '../../lib/featureFlagsContext'; +import { getFullReactUIFlagsContext, ReactUIFeatureFlagsContext } from '../../lib/featureFlagsContext'; import { styles } from './Tooltip.styles'; diff --git a/packages/react-ui/components/Tooltip/__stories__/Tooltip.stories.tsx b/packages/react-ui/components/Tooltip/__stories__/Tooltip.stories.tsx index 5388bc7997d..6df905d4c8d 100644 --- a/packages/react-ui/components/Tooltip/__stories__/Tooltip.stories.tsx +++ b/packages/react-ui/components/Tooltip/__stories__/Tooltip.stories.tsx @@ -1,13 +1,16 @@ // TODO: Rewrite stories and enable rule (in process of functional refactoring). /* eslint-disable react/no-unstable-nested-components */ -import React, { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; +import React from 'react'; import HelpDotIcon from '@skbkontur/react-icons/HelpDot'; -import { Nullable } from '../../../typings/utility-types'; -import { Story } from '../../../typings/stories'; -import { Tooltip, TooltipProps, TooltipTrigger } from '../Tooltip'; +import type { Nullable } from '../../../typings/utility-types'; +import type { Story } from '../../../typings/stories'; +import type { TooltipProps, TooltipTrigger } from '../Tooltip'; +import { Tooltip } from '../Tooltip'; import { Button } from '../../Button'; -import { PopupPositionsType, PopupPinnablePositions } from '../../../internal/Popup'; +import type { PopupPositionsType } from '../../../internal/Popup'; +import { PopupPinnablePositions } from '../../../internal/Popup'; import { createPropsGetter } from '../../../lib/createPropsGetter'; import { Textarea } from '../../Textarea'; import { Checkbox } from '../../Checkbox'; diff --git a/packages/react-ui/components/Tooltip/__tests__/Tooltip-test.tsx b/packages/react-ui/components/Tooltip/__tests__/Tooltip-test.tsx index cdcc1b874c0..46d9433bf74 100644 --- a/packages/react-ui/components/Tooltip/__tests__/Tooltip-test.tsx +++ b/packages/react-ui/components/Tooltip/__tests__/Tooltip-test.tsx @@ -4,7 +4,8 @@ import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { Button } from '../../Button'; -import { Tooltip, TooltipProps, TooltipDataTids } from '../Tooltip'; +import type { TooltipProps } from '../Tooltip'; +import { Tooltip, TooltipDataTids } from '../Tooltip'; import { delay, clickOutside } from '../../../lib/utils'; /** Wraps test and runs it twice with external and child anchor */ diff --git a/packages/react-ui/components/TooltipMenu/TooltipMenu.tsx b/packages/react-ui/components/TooltipMenu/TooltipMenu.tsx index 1e255121d76..41205ca284e 100644 --- a/packages/react-ui/components/TooltipMenu/TooltipMenu.tsx +++ b/packages/react-ui/components/TooltipMenu/TooltipMenu.tsx @@ -1,14 +1,18 @@ -import React, { AriaAttributes } from 'react'; +import type { AriaAttributes } from 'react'; +import React from 'react'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { PopupMenu, PopupMenuProps } from '../../internal/PopupMenu'; -import { MenuItemProps } from '../MenuItem'; +import type { PopupMenuProps } from '../../internal/PopupMenu'; +import { PopupMenu } from '../../internal/PopupMenu'; +import type { MenuItemProps } from '../MenuItem'; import { isProductionEnv, isTestEnv } from '../../lib/currentEnvironment'; -import { MenuHeaderProps } from '../MenuHeader'; -import { PopupPositionsType } from '../../internal/Popup'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { MenuHeaderProps } from '../MenuHeader'; +import type { PopupPositionsType } from '../../internal/Popup'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; export type TooltipMenuChildType = React.ReactElement; diff --git a/packages/react-ui/components/TooltipMenu/__stories__/TooltipMenu.stories.tsx b/packages/react-ui/components/TooltipMenu/__stories__/TooltipMenu.stories.tsx index 71f56194351..fedcb772c2d 100644 --- a/packages/react-ui/components/TooltipMenu/__stories__/TooltipMenu.stories.tsx +++ b/packages/react-ui/components/TooltipMenu/__stories__/TooltipMenu.stories.tsx @@ -2,7 +2,7 @@ import React from 'react'; import MenuIcon from '@skbkontur/react-icons/Menu'; import LightbulbIcon from '@skbkontur/react-icons/Lightbulb'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { MenuItem } from '../../MenuItem'; import { MenuHeader } from '../../MenuHeader'; import { MenuSeparator } from '../../MenuSeparator'; diff --git a/packages/react-ui/components/__stories__/baseline.stories.tsx b/packages/react-ui/components/__stories__/baseline.stories.tsx index 09ed50f49bc..f62a863a968 100644 --- a/packages/react-ui/components/__stories__/baseline.stories.tsx +++ b/packages/react-ui/components/__stories__/baseline.stories.tsx @@ -16,7 +16,7 @@ import { Gapped } from '../Gapped'; import { Group } from '../Group'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; export default { title: 'Baseline' }; diff --git a/packages/react-ui/components/__tests__/PropsForwarding-test.tsx b/packages/react-ui/components/__tests__/PropsForwarding-test.tsx index 22854b43392..9ccb6f6ffd0 100644 --- a/packages/react-ui/components/__tests__/PropsForwarding-test.tsx +++ b/packages/react-ui/components/__tests__/PropsForwarding-test.tsx @@ -1,8 +1,10 @@ import React from 'react'; -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import { act } from '@testing-library/react'; -import { AnyObject, delay } from '../../lib/utils'; +import type { AnyObject } from '../../lib/utils'; +import { delay } from '../../lib/utils'; import * as ReactUI from '../../index'; // all components that are available for import from the react-ui diff --git a/packages/react-ui/hooks/useDrop.ts b/packages/react-ui/hooks/useDrop.ts index b85885ec21c..ad9f37d40e1 100644 --- a/packages/react-ui/hooks/useDrop.ts +++ b/packages/react-ui/hooks/useDrop.ts @@ -1,5 +1,7 @@ -import { MutableRefObject, useCallback, useEffect, useRef, useState } from 'react'; -import { globalObject, SafeTimer } from '@skbkontur/global-object'; +import type { MutableRefObject } from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; +import type { SafeTimer } from '@skbkontur/global-object'; +import { globalObject } from '@skbkontur/global-object'; interface IUseDropProps { onDrop?: (event: DragEvent) => void; diff --git a/packages/react-ui/hooks/useEffectWithoutInitCall.ts b/packages/react-ui/hooks/useEffectWithoutInitCall.ts index c66dcf2ec63..a490dec604f 100644 --- a/packages/react-ui/hooks/useEffectWithoutInitCall.ts +++ b/packages/react-ui/hooks/useEffectWithoutInitCall.ts @@ -1,4 +1,5 @@ -import { useEffect, DependencyList, useRef } from 'react'; +import type { DependencyList } from 'react'; +import { useEffect, useRef } from 'react'; export const useEffectWithoutInitCall = (effect: () => void, deps: DependencyList) => { const isMountedRef = useRef(false); diff --git a/packages/react-ui/hooks/useMemoObject.ts b/packages/react-ui/hooks/useMemoObject.ts index 9f562ad0cba..e179319201a 100644 --- a/packages/react-ui/hooks/useMemoObject.ts +++ b/packages/react-ui/hooks/useMemoObject.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react'; -import { AnyObject } from '../lib/utils'; +import type { AnyObject } from '../lib/utils'; export const useMemoObject = (objectValue: TObject) => { return useMemo(() => objectValue, Object.values(objectValue)); diff --git a/packages/react-ui/internal/CloseButtonIcon/CloseButtonIcon.styles.tsx b/packages/react-ui/internal/CloseButtonIcon/CloseButtonIcon.styles.tsx index 34269847296..c0b1a3d1cc7 100644 --- a/packages/react-ui/internal/CloseButtonIcon/CloseButtonIcon.styles.tsx +++ b/packages/react-ui/internal/CloseButtonIcon/CloseButtonIcon.styles.tsx @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { resetButton } from '../../lib/styles/Mixins'; export const styles = memoizeStyle({ diff --git a/packages/react-ui/internal/CloseButtonIcon/CloseButtonIcon.tsx b/packages/react-ui/internal/CloseButtonIcon/CloseButtonIcon.tsx index 97e651c5121..3165290faad 100644 --- a/packages/react-ui/internal/CloseButtonIcon/CloseButtonIcon.tsx +++ b/packages/react-ui/internal/CloseButtonIcon/CloseButtonIcon.tsx @@ -1,4 +1,5 @@ -import React, { AriaAttributes, CSSProperties } from 'react'; +import type { AriaAttributes, CSSProperties } from 'react'; +import React from 'react'; import { globalObject } from '@skbkontur/global-object'; import { cx } from '../../lib/theming/Emotion'; @@ -6,7 +7,8 @@ import { keyListener } from '../../lib/events/keyListener'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { DEFAULT_ICON_SIZE } from '../icons2022/iconConstants'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { CommonWrapper, CommonProps } from '../CommonWrapper'; +import type { CommonProps } from '../CommonWrapper'; +import { CommonWrapper } from '../CommonWrapper'; import { styles } from './CloseButtonIcon.styles'; import { CrossIcon } from './CrossIcon'; diff --git a/packages/react-ui/internal/CloseButtonIcon/__stories__/CloseButtonIcon.stories.tsx b/packages/react-ui/internal/CloseButtonIcon/__stories__/CloseButtonIcon.stories.tsx index 22c9d48a345..2cf48822683 100644 --- a/packages/react-ui/internal/CloseButtonIcon/__stories__/CloseButtonIcon.stories.tsx +++ b/packages/react-ui/internal/CloseButtonIcon/__stories__/CloseButtonIcon.stories.tsx @@ -1,9 +1,10 @@ import React from 'react'; -import { CloseButtonIcon, CloseButtonIconProps } from '../CloseButtonIcon'; +import type { CloseButtonIconProps } from '../CloseButtonIcon'; +import { CloseButtonIcon } from '../CloseButtonIcon'; import { ComponentTable } from '../../ComponentTable'; import { Gapped } from '../../../components/Gapped'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { Input } from '../../../components/Input'; export default { diff --git a/packages/react-ui/internal/CommonWrapper/CommonWrapper.tsx b/packages/react-ui/internal/CommonWrapper/CommonWrapper.tsx index da61e323706..ff9679a2355 100644 --- a/packages/react-ui/internal/CommonWrapper/CommonWrapper.tsx +++ b/packages/react-ui/internal/CommonWrapper/CommonWrapper.tsx @@ -2,8 +2,9 @@ import React from 'react'; import { isFunction, isRefableElement } from '../../lib/utils'; import { cx } from '../../lib/theming/Emotion'; -import { Nullable } from '../../typings/utility-types'; -import { getRootNode, isInstanceWithRootNode, rootNode, TRootNodeSubscription, TSetRootNode } from '../../lib/rootNode'; +import type { Nullable } from '../../typings/utility-types'; +import type { TRootNodeSubscription, TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, isInstanceWithRootNode, rootNode } from '../../lib/rootNode'; import { callChildRef } from '../../lib/callChildRef/callChildRef'; import type { CommonProps, CommonPropsRootNodeRef, CommonWrapperProps } from './types'; diff --git a/packages/react-ui/internal/CommonWrapper/types.ts b/packages/react-ui/internal/CommonWrapper/types.ts index e710ef3f91f..43e21303283 100644 --- a/packages/react-ui/internal/CommonWrapper/types.ts +++ b/packages/react-ui/internal/CommonWrapper/types.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; import type { Nullable } from '../../typings/utility-types'; diff --git a/packages/react-ui/internal/CommonWrapper/utils/getCommonVisualStateDataAttributes.ts b/packages/react-ui/internal/CommonWrapper/utils/getCommonVisualStateDataAttributes.ts index d7ce5ec7926..714ad9a921b 100644 --- a/packages/react-ui/internal/CommonWrapper/utils/getCommonVisualStateDataAttributes.ts +++ b/packages/react-ui/internal/CommonWrapper/utils/getCommonVisualStateDataAttributes.ts @@ -1,4 +1,5 @@ -import { getVisualStateDataAttributes, VisualStateDataAttributesResultType } from './getVisualStateDataAttributes'; +import type { VisualStateDataAttributesResultType } from './getVisualStateDataAttributes'; +import { getVisualStateDataAttributes } from './getVisualStateDataAttributes'; import { tryGetBoolean } from './tryGetBoolean'; export function getCommonVisualStateDataAttributes( diff --git a/packages/react-ui/internal/CommonWrapper/utils/getVisualStateDataAttributes.ts b/packages/react-ui/internal/CommonWrapper/utils/getVisualStateDataAttributes.ts index fda0e06e1bc..6c26cb242d2 100644 --- a/packages/react-ui/internal/CommonWrapper/utils/getVisualStateDataAttributes.ts +++ b/packages/react-ui/internal/CommonWrapper/utils/getVisualStateDataAttributes.ts @@ -1,5 +1,5 @@ import { toKebabCase } from '../../../lib/toKebabCase'; -import { Nullable } from '../../../typings/utility-types'; +import type { Nullable } from '../../../typings/utility-types'; export type VisualStateDataAttributesResultType = Record; diff --git a/packages/react-ui/internal/ComponentCombinator.tsx b/packages/react-ui/internal/ComponentCombinator.tsx index ee22b30b457..d6a697e5c26 100644 --- a/packages/react-ui/internal/ComponentCombinator.tsx +++ b/packages/react-ui/internal/ComponentCombinator.tsx @@ -1,9 +1,10 @@ import React from 'react'; -import { DefaultizeProps } from '../lib/utils'; +import type { DefaultizeProps } from '../lib/utils'; import { createPropsGetter } from '../lib/createPropsGetter'; -import { ComponentTable, StatePropsCombinations, StateType } from './ComponentTable'; +import type { StatePropsCombinations, StateType } from './ComponentTable'; +import { ComponentTable } from './ComponentTable'; export interface ComponentCombinatorProps { combinations: Array>; diff --git a/packages/react-ui/internal/ComponentTable.tsx b/packages/react-ui/internal/ComponentTable.tsx index 94129edf9fc..864cfb05104 100644 --- a/packages/react-ui/internal/ComponentTable.tsx +++ b/packages/react-ui/internal/ComponentTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { isFunctionalComponent, DefaultizeProps } from '../lib/utils'; +import type { DefaultizeProps } from '../lib/utils'; +import { isFunctionalComponent } from '../lib/utils'; import { createPropsGetter } from '../lib/createPropsGetter'; // TODO We should output state too diff --git a/packages/react-ui/internal/CustomComboBox/ComboBoxMenu.tsx b/packages/react-ui/internal/CustomComboBox/ComboBoxMenu.tsx index f6d126da2f5..f38026227ee 100644 --- a/packages/react-ui/internal/CustomComboBox/ComboBoxMenu.tsx +++ b/packages/react-ui/internal/CustomComboBox/ComboBoxMenu.tsx @@ -3,20 +3,22 @@ import React from 'react'; import { isFunction, isNullable } from '../../lib/utils'; import { locale } from '../../lib/locale/decorators'; import { Menu } from '../Menu'; -import { isMenuItem, MenuItem, MenuItemState } from '../../components/MenuItem'; +import type { MenuItemState } from '../../components/MenuItem'; +import { isMenuItem, MenuItem } from '../../components/MenuItem'; import { Spinner } from '../../components/Spinner'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { MenuSeparator } from '../../components/MenuSeparator'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { MenuMessage } from '../MenuMessage'; -import { ComboBoxExtendedItem } from '../../components/ComboBox'; -import { Theme } from '../../lib/theming/Theme'; +import type { ComboBoxExtendedItem } from '../../components/ComboBox'; +import type { Theme } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { MenuFooter } from '../../components/MenuFooter'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { ComboBoxRequestStatus } from './CustomComboBoxTypes'; -import { ComboBoxLocale, CustomComboBoxLocaleHelper } from './locale'; +import type { ComboBoxLocale } from './locale'; +import { CustomComboBoxLocaleHelper } from './locale'; export interface ComboBoxMenuProps { opened?: boolean; diff --git a/packages/react-ui/internal/CustomComboBox/ComboBoxView.tsx b/packages/react-ui/internal/CustomComboBox/ComboBoxView.tsx index d8f4c32b0f3..6f6eca8c592 100644 --- a/packages/react-ui/internal/CustomComboBox/ComboBoxView.tsx +++ b/packages/react-ui/internal/CustomComboBox/ComboBoxView.tsx @@ -1,23 +1,27 @@ -import React, { AriaAttributes, HTMLAttributes } from 'react'; +import type { AriaAttributes, HTMLAttributes } from 'react'; +import React from 'react'; import { getRandomID, isNonNullable } from '../../lib/utils'; -import { Input, InputIconType, InputProps } from '../../components/Input'; +import type { InputIconType, InputProps } from '../../components/Input'; +import { Input } from '../../components/Input'; import { InputLikeText } from '../InputLikeText'; -import { Menu } from '../Menu'; -import { MenuItemState } from '../../components/MenuItem'; +import type { Menu } from '../Menu'; +import type { MenuItemState } from '../../components/MenuItem'; import { RenderLayer } from '../RenderLayer'; import { Spinner } from '../../components/Spinner'; -import { Nullable } from '../../typings/utility-types'; -import { CommonProps, CommonWrapper } from '../CommonWrapper'; +import type { Nullable } from '../../typings/utility-types'; +import type { CommonProps } from '../CommonWrapper'; +import { CommonWrapper } from '../CommonWrapper'; import { MobilePopup } from '../MobilePopup'; import { responsiveLayout } from '../../components/ResponsiveLayout/decorator'; -import { rootNode, getRootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode, getRootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { LoadingIcon } from '../icons2022/LoadingIcon'; -import { ComboBoxExtendedItem } from '../../components/ComboBox'; -import { SizeProp } from '../../lib/types/props'; +import type { ComboBoxExtendedItem } from '../../components/ComboBox'; +import type { SizeProp } from '../../lib/types/props'; import { Popup } from '../Popup'; import { getMenuPositions } from '../../lib/getMenuPositions'; import { ZIndex } from '../ZIndex'; diff --git a/packages/react-ui/internal/CustomComboBox/CustomComboBox.tsx b/packages/react-ui/internal/CustomComboBox/CustomComboBox.tsx index 03d898b42f0..2330998f234 100644 --- a/packages/react-ui/internal/CustomComboBox/CustomComboBox.tsx +++ b/packages/react-ui/internal/CustomComboBox/CustomComboBox.tsx @@ -1,27 +1,28 @@ -import React, { AriaAttributes, HTMLAttributes } from 'react'; +import type { AriaAttributes, HTMLAttributes } from 'react'; +import React from 'react'; import ReactDOM from 'react-dom'; import { globalObject } from '@skbkontur/global-object'; -import { Nullable } from '../../typings/utility-types'; -import { Input, InputIconType } from '../../components/Input'; -import { Menu } from '../Menu'; -import { InputLikeText } from '../InputLikeText'; -import { MenuItemState } from '../../components/MenuItem'; +import type { Nullable } from '../../typings/utility-types'; +import type { Input, InputIconType } from '../../components/Input'; +import type { Menu } from '../Menu'; +import type { InputLikeText } from '../InputLikeText'; +import type { MenuItemState } from '../../components/MenuItem'; import { CancelationError, taskWithDelay } from '../../lib/utils'; import { fixClickFocusIE } from '../../lib/events/fixClickFocusIE'; -import { CommonProps, CommonWrapper } from '../CommonWrapper'; +import type { CommonProps } from '../CommonWrapper'; +import { CommonWrapper } from '../CommonWrapper'; import { responsiveLayout } from '../../components/ResponsiveLayout/decorator'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; -import { ComboBoxExtendedItem } from '../../components/ComboBox'; -import { SizeProp } from '../../lib/types/props'; -import { - ReactUIFeatureFlags, - ReactUIFeatureFlagsContext, - getFullReactUIFlagsContext, -} from '../../lib/featureFlagsContext'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; +import type { ComboBoxExtendedItem } from '../../components/ComboBox'; +import type { SizeProp } from '../../lib/types/props'; +import type { ReactUIFeatureFlags } from '../../lib/featureFlagsContext'; +import { ReactUIFeatureFlagsContext, getFullReactUIFlagsContext } from '../../lib/featureFlagsContext'; import { ComboBoxRequestStatus } from './CustomComboBoxTypes'; -import { CustomComboBoxAction, CustomComboBoxEffect, reducer } from './CustomComboBoxReducer'; +import type { CustomComboBoxAction, CustomComboBoxEffect } from './CustomComboBoxReducer'; +import { reducer } from './CustomComboBoxReducer'; import { ComboBoxView } from './ComboBoxView'; export interface CustomComboBoxProps diff --git a/packages/react-ui/internal/CustomComboBox/CustomComboBoxReducer.tsx b/packages/react-ui/internal/CustomComboBox/CustomComboBoxReducer.tsx index 59903ae0597..69704844c76 100644 --- a/packages/react-ui/internal/CustomComboBox/CustomComboBoxReducer.tsx +++ b/packages/react-ui/internal/CustomComboBox/CustomComboBoxReducer.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; import debounce from 'lodash.debounce'; import isEqual from 'lodash.isequal'; import { globalObject } from '@skbkontur/global-object'; @@ -6,10 +6,11 @@ import { globalObject } from '@skbkontur/global-object'; import { isNonNullable } from '../../lib/utils'; import { isKeyArrowUp, isKeyArrowVertical, isKeyEnter, isKeyEscape } from '../../lib/events/keyboard/identifiers'; import * as LayoutEvents from '../../lib/LayoutEvents'; -import { Nullable } from '../../typings/utility-types'; -import { ComboBoxExtendedItem } from '../../components/ComboBox'; +import type { Nullable } from '../../typings/utility-types'; +import type { ComboBoxExtendedItem } from '../../components/ComboBox'; -import { CustomComboBox, CustomComboBoxProps, CustomComboBoxState, DefaultState } from './CustomComboBox'; +import type { CustomComboBox, CustomComboBoxProps, CustomComboBoxState } from './CustomComboBox'; +import { DefaultState } from './CustomComboBox'; import { ComboBoxRequestStatus } from './CustomComboBoxTypes'; export type CustomComboBoxAction = diff --git a/packages/react-ui/internal/CustomComboBox/__stories__/ComboBoxView.stories.tsx b/packages/react-ui/internal/CustomComboBox/__stories__/ComboBoxView.stories.tsx index ddba5970c35..fcb5eaf7488 100644 --- a/packages/react-ui/internal/CustomComboBox/__stories__/ComboBoxView.stories.tsx +++ b/packages/react-ui/internal/CustomComboBox/__stories__/ComboBoxView.stories.tsx @@ -1,7 +1,7 @@ import React from 'react'; import OkIcon from '@skbkontur/react-icons/'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { ComboBoxView } from '../ComboBoxView'; import { Gapped } from '../../../components/Gapped'; import { Modal } from '../../../components/Modal'; diff --git a/packages/react-ui/internal/CustomComboBox/__tests__/CustomComboBoxReducer-test.tsx b/packages/react-ui/internal/CustomComboBox/__tests__/CustomComboBoxReducer-test.tsx index a8213a86913..c8d5a3feb90 100644 --- a/packages/react-ui/internal/CustomComboBox/__tests__/CustomComboBoxReducer-test.tsx +++ b/packages/react-ui/internal/CustomComboBox/__tests__/CustomComboBoxReducer-test.tsx @@ -1,5 +1,5 @@ import { Effect } from '../CustomComboBoxReducer'; -import { CustomComboBoxProps } from '../CustomComboBox'; +import type { CustomComboBoxProps } from '../CustomComboBox'; interface ItemType { value: number; diff --git a/packages/react-ui/internal/CustomComboBox/getComboBoxTheme.ts b/packages/react-ui/internal/CustomComboBox/getComboBoxTheme.ts index 8726bf811d9..4ae755e7a20 100644 --- a/packages/react-ui/internal/CustomComboBox/getComboBoxTheme.ts +++ b/packages/react-ui/internal/CustomComboBox/getComboBoxTheme.ts @@ -1,5 +1,5 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const getComboBoxTheme = (theme: Theme): Theme => { return ThemeFactory.create( diff --git a/packages/react-ui/internal/CustomComboBox/locale/index.ts b/packages/react-ui/internal/CustomComboBox/locale/index.ts index 85d206e2bb0..a01c377efb2 100644 --- a/packages/react-ui/internal/CustomComboBox/locale/index.ts +++ b/packages/react-ui/internal/CustomComboBox/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { ComboBoxLocale } from './types'; +import type { ComboBoxLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/internal/CustomComboBox/locale/locales/en.ts b/packages/react-ui/internal/CustomComboBox/locale/locales/en.ts index 17148563784..f0231824bb6 100644 --- a/packages/react-ui/internal/CustomComboBox/locale/locales/en.ts +++ b/packages/react-ui/internal/CustomComboBox/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { ComboBoxLocale } from '../types'; +import type { ComboBoxLocale } from '../types'; export const componentsLocales: ComboBoxLocale = { notFound: 'Not found', diff --git a/packages/react-ui/internal/CustomComboBox/locale/locales/ru.ts b/packages/react-ui/internal/CustomComboBox/locale/locales/ru.ts index 9d37b4e51c4..ff8398ba9d7 100644 --- a/packages/react-ui/internal/CustomComboBox/locale/locales/ru.ts +++ b/packages/react-ui/internal/CustomComboBox/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { ComboBoxLocale } from '../types'; +import type { ComboBoxLocale } from '../types'; export const componentsLocales: ComboBoxLocale = { notFound: 'Не найдено', diff --git a/packages/react-ui/internal/DateSelect/DateSelect.styles.ts b/packages/react-ui/internal/DateSelect/DateSelect.styles.ts index 588545f65d5..293e69bc2be 100644 --- a/packages/react-ui/internal/DateSelect/DateSelect.styles.ts +++ b/packages/react-ui/internal/DateSelect/DateSelect.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle, prefix } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const globalClasses = prefix('select')({ arrow: 'arrow', diff --git a/packages/react-ui/internal/DateSelect/DateSelect.tsx b/packages/react-ui/internal/DateSelect/DateSelect.tsx index 93e4a3e9357..4054c0948c9 100644 --- a/packages/react-ui/internal/DateSelect/DateSelect.tsx +++ b/packages/react-ui/internal/DateSelect/DateSelect.tsx @@ -3,13 +3,15 @@ import PropTypes from 'prop-types'; import { responsiveLayout } from '../../components/ResponsiveLayout/decorator'; import { getRandomID, isNonNullable } from '../../lib/utils'; -import { DatePickerLocale, DatePickerLocaleHelper } from '../../components/DatePicker/locale'; +import type { DatePickerLocale } from '../../components/DatePicker/locale'; +import { DatePickerLocaleHelper } from '../../components/DatePicker/locale'; import { locale } from '../../lib/locale/decorators'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { cx } from '../../lib/theming/Emotion'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { ButtonParams, Select } from '../../components/Select'; +import type { ButtonParams } from '../../components/Select'; +import { Select } from '../../components/Select'; import { MenuItem } from '../../components/MenuItem'; import { ArrowCollapseCVOpenIcon16Regular } from '../icons2022/ArrowCollapseCVOpenIcon/ArrowCollapseCVOpenIcon16Regular'; diff --git a/packages/react-ui/internal/DateSelect/__tests__/DateSelect-test.tsx b/packages/react-ui/internal/DateSelect/__tests__/DateSelect-test.tsx index 0eca6cb37b5..1103d28f1c4 100644 --- a/packages/react-ui/internal/DateSelect/__tests__/DateSelect-test.tsx +++ b/packages/react-ui/internal/DateSelect/__tests__/DateSelect-test.tsx @@ -3,7 +3,8 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { DatePickerLocaleHelper } from '../../../components/DatePicker/locale'; -import { DateSelect, DateSelectProps } from '../DateSelect'; +import type { DateSelectProps } from '../DateSelect'; +import { DateSelect } from '../DateSelect'; const renderSelect = (props: DateSelectProps) => render(); diff --git a/packages/react-ui/internal/DateSelect/locale/index.ts b/packages/react-ui/internal/DateSelect/locale/index.ts index 2887912b822..81b5d4bd5ec 100644 --- a/packages/react-ui/internal/DateSelect/locale/index.ts +++ b/packages/react-ui/internal/DateSelect/locale/index.ts @@ -2,7 +2,7 @@ import { LocaleHelper } from '../../../lib/locale/LocaleHelper'; import { componentsLocales as en_GB } from './locales/en'; import { componentsLocales as ru_RU } from './locales/ru'; -import { DateSelectLocale } from './types'; +import type { DateSelectLocale } from './types'; export * from './types'; diff --git a/packages/react-ui/internal/DateSelect/locale/locales/en.ts b/packages/react-ui/internal/DateSelect/locale/locales/en.ts index da577bdc04a..e59e54feafa 100644 --- a/packages/react-ui/internal/DateSelect/locale/locales/en.ts +++ b/packages/react-ui/internal/DateSelect/locale/locales/en.ts @@ -1,4 +1,4 @@ -import { DateSelectLocale } from '../types'; +import type { DateSelectLocale } from '../types'; export const componentsLocales: DateSelectLocale = { selectMonthAriaLabel: 'month', diff --git a/packages/react-ui/internal/DateSelect/locale/locales/ru.ts b/packages/react-ui/internal/DateSelect/locale/locales/ru.ts index c2fcf17fb05..006f0e63c8a 100644 --- a/packages/react-ui/internal/DateSelect/locale/locales/ru.ts +++ b/packages/react-ui/internal/DateSelect/locale/locales/ru.ts @@ -1,4 +1,4 @@ -import { DateSelectLocale } from '../types'; +import type { DateSelectLocale } from '../types'; export const componentsLocales: DateSelectLocale = { selectMonthAriaLabel: 'месяц', diff --git a/packages/react-ui/internal/FileUploaderControl/FileUploaderControlContext.ts b/packages/react-ui/internal/FileUploaderControl/FileUploaderControlContext.ts index a9bcd0abb54..e1ab8086057 100644 --- a/packages/react-ui/internal/FileUploaderControl/FileUploaderControlContext.ts +++ b/packages/react-ui/internal/FileUploaderControl/FileUploaderControlContext.ts @@ -1,7 +1,7 @@ import React from 'react'; -import { FileUploaderAttachedFile, FileUploaderFileStatus } from './fileUtils'; -import { FileUploaderFileValidationResult } from './FileUploaderFileValidationResult'; +import type { FileUploaderAttachedFile, FileUploaderFileStatus } from './fileUtils'; +import type { FileUploaderFileValidationResult } from './FileUploaderFileValidationResult'; export interface FileUploaderControlContextProps { setFileStatus: (fileId: string, status: FileUploaderFileStatus) => void; diff --git a/packages/react-ui/internal/FileUploaderControl/FileUploaderControlProvider.tsx b/packages/react-ui/internal/FileUploaderControl/FileUploaderControlProvider.tsx index 7ff972a265f..61cc85d261f 100644 --- a/packages/react-ui/internal/FileUploaderControl/FileUploaderControlProvider.tsx +++ b/packages/react-ui/internal/FileUploaderControl/FileUploaderControlProvider.tsx @@ -1,9 +1,11 @@ -import React, { PropsWithChildren, useCallback, useState } from 'react'; +import type { PropsWithChildren } from 'react'; +import React, { useCallback, useState } from 'react'; import { useMemoObject } from '../../hooks/useMemoObject'; import { useEffectWithoutInitCall } from '../../hooks/useEffectWithoutInitCall'; -import { FileUploaderAttachedFile, FileUploaderFileStatus, getAttachedFile } from './fileUtils'; +import type { FileUploaderAttachedFile } from './fileUtils'; +import { FileUploaderFileStatus, getAttachedFile } from './fileUtils'; import { FileUploaderControlContext } from './FileUploaderControlContext'; import { useControlLocale } from './hooks/useControlLocale'; import { FileUploaderFileValidationResult } from './FileUploaderFileValidationResult'; diff --git a/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.styles.ts b/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.styles.ts index ddefd8f9846..69cc15c0828 100644 --- a/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.styles.ts +++ b/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../../lib/theming/Emotion'; -import { Theme } from '../../../lib/theming/Theme'; +import type { Theme } from '../../../lib/theming/Theme'; const styles = { root() { diff --git a/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.tsx b/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.tsx index 2bd53d5bb95..5e8dc5944e5 100644 --- a/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.tsx +++ b/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.tsx @@ -1,8 +1,9 @@ -import React, { ReactNode, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react'; +import type { ReactNode } from 'react'; +import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react'; import { globalObject } from '@skbkontur/global-object'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { FileUploaderAttachedFile } from '../fileUtils'; +import type { FileUploaderAttachedFile } from '../fileUtils'; import { formatBytes } from '../../../lib/utils'; import { TextWidthHelper } from '../../TextWidthHelper/TextWidthHelper'; import { truncate } from '../../../lib/stringUtils'; @@ -11,12 +12,12 @@ import { cx } from '../../../lib/theming/Emotion'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; import { keyListener } from '../../../lib/events/keyListener'; import { isKeyEnter } from '../../../lib/events/keyboard/identifiers'; -import { Nullable } from '../../../typings/utility-types'; +import type { Nullable } from '../../../typings/utility-types'; import { Hint } from '../../../components/Hint'; import { Tooltip } from '../../../components/Tooltip'; import { getDOMRect } from '../../../lib/dom/getDOMRect'; import { useFileUploaderSize } from '../hooks/useFileUploaderSize'; -import { SizeProp } from '../../../lib/types/props'; +import type { SizeProp } from '../../../lib/types/props'; import { jsStyles } from './FileUploaderFile.styles'; import { FileUploaderFileStatusIcon } from './FileUploaderFileStatusIcon'; diff --git a/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFileStatusIcon.tsx b/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFileStatusIcon.tsx index 2fb58328334..e93075bfdc7 100644 --- a/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFileStatusIcon.tsx +++ b/packages/react-ui/internal/FileUploaderControl/FileUploaderFile/FileUploaderFileStatusIcon.tsx @@ -3,7 +3,7 @@ import React, { useContext } from 'react'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; import { FileUploaderFileStatus } from '../fileUtils'; import { LoadingIcon } from '../../icons2022/LoadingIcon'; -import { SizeProp } from '../../../lib/types/props'; +import type { SizeProp } from '../../../lib/types/props'; import { DeleteIcon } from './DeleteIcon'; import { ErrorIcon } from './ErrorIcon'; diff --git a/packages/react-ui/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.styles.ts b/packages/react-ui/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.styles.ts index 4b3c295d969..7c12c57ce25 100644 --- a/packages/react-ui/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.styles.ts +++ b/packages/react-ui/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../../lib/theming/Emotion'; -import { Theme } from '../../../lib/theming/Theme'; +import type { Theme } from '../../../lib/theming/Theme'; const styles = { file() { diff --git a/packages/react-ui/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.tsx b/packages/react-ui/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.tsx index 77a9c1b2792..7ebc2e5a091 100644 --- a/packages/react-ui/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.tsx +++ b/packages/react-ui/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.tsx @@ -3,10 +3,10 @@ import React, { useContext } from 'react'; import { FileUploaderControlContext } from '../FileUploaderControlContext'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; import { FileUploaderFile } from '../FileUploaderFile/FileUploaderFile'; -import { FileUploaderAttachedFile } from '../fileUtils'; +import type { FileUploaderAttachedFile } from '../fileUtils'; import { cx } from '../../../lib/theming/Emotion'; import { useFileUploaderSize } from '../hooks/useFileUploaderSize'; -import { SizeProp } from '../../../lib/types/props'; +import type { SizeProp } from '../../../lib/types/props'; import { jsStyles } from './FileUploaderFileList.styles'; diff --git a/packages/react-ui/internal/FileUploaderControl/__stories__/FileUploaderFile.stories.tsx b/packages/react-ui/internal/FileUploaderControl/__stories__/FileUploaderFile.stories.tsx index c094cd68d69..d5eef1fd933 100644 --- a/packages/react-ui/internal/FileUploaderControl/__stories__/FileUploaderFile.stories.tsx +++ b/packages/react-ui/internal/FileUploaderControl/__stories__/FileUploaderFile.stories.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { FileUploaderFile } from '../FileUploaderFile/FileUploaderFile'; import { FileUploaderFileStatus } from '../fileUtils'; diff --git a/packages/react-ui/internal/FileUploaderControl/hooks/useFileUploaderSize.ts b/packages/react-ui/internal/FileUploaderControl/hooks/useFileUploaderSize.ts index 6eb5cfa3e59..ce9e6047dc0 100644 --- a/packages/react-ui/internal/FileUploaderControl/hooks/useFileUploaderSize.ts +++ b/packages/react-ui/internal/FileUploaderControl/hooks/useFileUploaderSize.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react'; -import { SizeProp } from '../../../lib/types/props'; +import type { SizeProp } from '../../../lib/types/props'; export function useFileUploaderSize(size: SizeProp, { small, medium, large }: Record) { return useMemo(() => { diff --git a/packages/react-ui/internal/FileUploaderControl/hooks/useUpload.ts b/packages/react-ui/internal/FileUploaderControl/hooks/useUpload.ts index 9529e55aadb..fe0674ca992 100644 --- a/packages/react-ui/internal/FileUploaderControl/hooks/useUpload.ts +++ b/packages/react-ui/internal/FileUploaderControl/hooks/useUpload.ts @@ -1,8 +1,9 @@ import { useCallback, useContext } from 'react'; import ReactDOM from 'react-dom'; -import { Nullable } from '../../../typings/utility-types'; -import { FileUploaderAttachedFile, FileUploaderFileStatus } from '../fileUtils'; +import type { Nullable } from '../../../typings/utility-types'; +import type { FileUploaderAttachedFile } from '../fileUtils'; +import { FileUploaderFileStatus } from '../fileUtils'; import { FileUploaderControlContext } from '../FileUploaderControlContext'; export const useUpload = ( diff --git a/packages/react-ui/internal/FileUploaderControl/withFileUploaderControlProvider.tsx b/packages/react-ui/internal/FileUploaderControl/withFileUploaderControlProvider.tsx index 52c96c7b8b4..f8d3de80d97 100644 --- a/packages/react-ui/internal/FileUploaderControl/withFileUploaderControlProvider.tsx +++ b/packages/react-ui/internal/FileUploaderControl/withFileUploaderControlProvider.tsx @@ -1,6 +1,8 @@ -import React, { ComponentType } from 'react'; +import type { ComponentType } from 'react'; +import React from 'react'; -import { FileUploaderControlProvider, FileUploaderControlProviderProps } from './FileUploaderControlProvider'; +import type { FileUploaderControlProviderProps } from './FileUploaderControlProvider'; +import { FileUploaderControlProvider } from './FileUploaderControlProvider'; export const withFileUploaderControlProvider = , TRef extends Record>( Component: ComponentType< diff --git a/packages/react-ui/internal/FocusControlWrapper/FocusControlWrapper.stories.tsx b/packages/react-ui/internal/FocusControlWrapper/FocusControlWrapper.stories.tsx index 1e7656650b2..e7ea86d10c2 100644 --- a/packages/react-ui/internal/FocusControlWrapper/FocusControlWrapper.stories.tsx +++ b/packages/react-ui/internal/FocusControlWrapper/FocusControlWrapper.stories.tsx @@ -1,4 +1,5 @@ -import React, { CSSProperties, FC, FormEvent, PropsWithChildren, useCallback, useState } from 'react'; +import type { CSSProperties, FC, FormEvent, PropsWithChildren } from 'react'; +import React, { useCallback, useState } from 'react'; import { globalObject } from '@skbkontur/global-object'; import type { Meta } from '@storybook/react'; diff --git a/packages/react-ui/internal/FocusControlWrapper/FocusControlWrapper.tsx b/packages/react-ui/internal/FocusControlWrapper/FocusControlWrapper.tsx index fcc93ecb4fb..2bf10dd9d44 100644 --- a/packages/react-ui/internal/FocusControlWrapper/FocusControlWrapper.tsx +++ b/packages/react-ui/internal/FocusControlWrapper/FocusControlWrapper.tsx @@ -1,4 +1,5 @@ -import React, { PropsWithChildren, isValidElement, cloneElement, ReactElement } from 'react'; +import type { PropsWithChildren, ReactElement } from 'react'; +import React, { isValidElement, cloneElement } from 'react'; import { CommonWrapper } from '../CommonWrapper'; diff --git a/packages/react-ui/internal/FocusControlWrapper/useFocusControl.tsx b/packages/react-ui/internal/FocusControlWrapper/useFocusControl.tsx index 7bde57f9a76..5377f979dca 100644 --- a/packages/react-ui/internal/FocusControlWrapper/useFocusControl.tsx +++ b/packages/react-ui/internal/FocusControlWrapper/useFocusControl.tsx @@ -1,4 +1,5 @@ -import React, { useEffect, useState } from 'react'; +import type React from 'react'; +import { useEffect, useState } from 'react'; interface Props { disabled?: boolean; diff --git a/packages/react-ui/internal/FocusTrap/FocusTrap.tsx b/packages/react-ui/internal/FocusTrap/FocusTrap.tsx index 3667f812d7d..110d4ceacea 100644 --- a/packages/react-ui/internal/FocusTrap/FocusTrap.tsx +++ b/packages/react-ui/internal/FocusTrap/FocusTrap.tsx @@ -1,9 +1,11 @@ import React from 'react'; import { globalObject } from '@skbkontur/global-object'; -import { CommonProps, CommonWrapper } from '../../internal/CommonWrapper'; +import type { CommonProps } from '../../internal/CommonWrapper'; +import { CommonWrapper } from '../../internal/CommonWrapper'; import { listen as listenFocusOutside, containsTargetOrRenderContainer } from '../../lib/listenFocusOutside'; -import { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, rootNode } from '../../lib/rootNode'; import { isInstanceOf } from '../../lib/isInstanceOf'; export interface FocusTrapProps extends CommonProps { diff --git a/packages/react-ui/internal/FocusTrap/__tests__/FocusTrap.test.tsx b/packages/react-ui/internal/FocusTrap/__tests__/FocusTrap.test.tsx index cee26c3a881..1aebbd9699c 100644 --- a/packages/react-ui/internal/FocusTrap/__tests__/FocusTrap.test.tsx +++ b/packages/react-ui/internal/FocusTrap/__tests__/FocusTrap.test.tsx @@ -1,8 +1,10 @@ -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import { clickOutside } from '../../../lib/utils'; -import { FocusTrap, FocusTrapProps } from '../FocusTrap'; +import type { FocusTrapProps } from '../FocusTrap'; +import { FocusTrap } from '../FocusTrap'; describe('', () => { let onBlur: jest.Mock>; diff --git a/packages/react-ui/internal/HideBodyVerticalScroll/__stories__/HideBodyVerticalScroll.stories.tsx b/packages/react-ui/internal/HideBodyVerticalScroll/__stories__/HideBodyVerticalScroll.stories.tsx index 426da101cd6..08672af309e 100644 --- a/packages/react-ui/internal/HideBodyVerticalScroll/__stories__/HideBodyVerticalScroll.stories.tsx +++ b/packages/react-ui/internal/HideBodyVerticalScroll/__stories__/HideBodyVerticalScroll.stories.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react'; import { HideBodyVerticalScroll } from '../HideBodyVerticalScroll'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; export default { title: 'HideBodyVerticalScroll', diff --git a/packages/react-ui/internal/IgnoreLayerClick/IgnoreLayerClick.tsx b/packages/react-ui/internal/IgnoreLayerClick/IgnoreLayerClick.tsx index 8a94902cc47..d43b20050e2 100644 --- a/packages/react-ui/internal/IgnoreLayerClick/IgnoreLayerClick.tsx +++ b/packages/react-ui/internal/IgnoreLayerClick/IgnoreLayerClick.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { globalObject } from '@skbkontur/global-object'; -import { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, rootNode } from '../../lib/rootNode'; import { isInstanceOf } from '../../lib/isInstanceOf'; import { CommonWrapper } from '../CommonWrapper'; diff --git a/packages/react-ui/internal/InputLikeText/InputLikeText.tsx b/packages/react-ui/internal/InputLikeText/InputLikeText.tsx index 2a1d7bc6f4b..9bd5c7a5810 100644 --- a/packages/react-ui/internal/InputLikeText/InputLikeText.tsx +++ b/packages/react-ui/internal/InputLikeText/InputLikeText.tsx @@ -1,21 +1,25 @@ import React from 'react'; import ReactDOM from 'react-dom'; import debounce from 'lodash.debounce'; -import { globalObject, SafeTimer } from '@skbkontur/global-object'; +import type { SafeTimer } from '@skbkontur/global-object'; +import { globalObject } from '@skbkontur/global-object'; import { isNonNullable } from '../../lib/utils'; import { isKeyTab, isShortcutPaste } from '../../lib/events/keyboard/identifiers'; -import { MouseDrag, MouseDragEventHandler } from '../../lib/events/MouseDrag'; +import type { MouseDragEventHandler } from '../../lib/events/MouseDrag'; +import { MouseDrag } from '../../lib/events/MouseDrag'; import { isEdge, isIE11, isMobile } from '../../lib/client'; import { removeAllSelections, selectNodeContents } from '../../lib/dom/selectionHelpers'; -import { InputProps, InputState } from '../../components/Input'; +import type { InputProps, InputState } from '../../components/Input'; import { styles as jsInputStyles } from '../../components/Input/Input.styles'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; -import { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../CommonWrapper'; +import type { Theme } from '../../lib/theming/Theme'; +import type { CommonProps, CommonWrapperRestProps } from '../CommonWrapper'; +import { CommonWrapper } from '../CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { findRenderContainer } from '../../lib/listenFocusOutside'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { InputLayoutAside } from '../../components/Input/InputLayout/InputLayoutAside'; import { InputLayoutContext, InputLayoutContextDefault } from '../../components/Input/InputLayout/InputLayoutContext'; diff --git a/packages/react-ui/internal/InternalMaskedInput/InternalMaskedInput.styles.ts b/packages/react-ui/internal/InternalMaskedInput/InternalMaskedInput.styles.ts index 42c5b8ed91f..545d968c5ee 100644 --- a/packages/react-ui/internal/InternalMaskedInput/InternalMaskedInput.styles.ts +++ b/packages/react-ui/internal/InternalMaskedInput/InternalMaskedInput.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ container() { diff --git a/packages/react-ui/internal/InternalMaskedInput/InternalMaskedInput.tsx b/packages/react-ui/internal/InternalMaskedInput/InternalMaskedInput.tsx index a24af5087b3..ccc8a04dc5e 100644 --- a/packages/react-ui/internal/InternalMaskedInput/InternalMaskedInput.tsx +++ b/packages/react-ui/internal/InternalMaskedInput/InternalMaskedInput.tsx @@ -1,9 +1,10 @@ import React from 'react'; -import ReactInputMask, { InputState } from 'react-input-mask'; +import type { InputState } from 'react-input-mask'; +import ReactInputMask from 'react-input-mask'; import { isNonNullable } from '../../lib/utils'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { MaskCharLowLine } from '../MaskCharLowLine'; import { cx } from '../../lib/theming/Emotion'; import { createPropsGetter } from '../../lib/createPropsGetter'; diff --git a/packages/react-ui/internal/InternalMaskedInput/__tests__/InternalMaskedInput-test.tsx b/packages/react-ui/internal/InternalMaskedInput/__tests__/InternalMaskedInput-test.tsx index 3986e100d65..ef017ca2657 100644 --- a/packages/react-ui/internal/InternalMaskedInput/__tests__/InternalMaskedInput-test.tsx +++ b/packages/react-ui/internal/InternalMaskedInput/__tests__/InternalMaskedInput-test.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { mount } from 'enzyme'; -import { InternalMaskedInput, InternalMaskedInputProps } from '../InternalMaskedInput'; +import type { InternalMaskedInputProps } from '../InternalMaskedInput'; +import { InternalMaskedInput } from '../InternalMaskedInput'; describe('MaskedInput', () => { it('Renders without crash', () => { diff --git a/packages/react-ui/internal/Menu/Menu.styles.ts b/packages/react-ui/internal/Menu/Menu.styles.ts index 8f8936b3445..ddb7d494719 100644 --- a/packages/react-ui/internal/Menu/Menu.styles.ts +++ b/packages/react-ui/internal/Menu/Menu.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ root(t: Theme) { diff --git a/packages/react-ui/internal/Menu/Menu.tsx b/packages/react-ui/internal/Menu/Menu.tsx index 154ba186435..8473f5a3c76 100644 --- a/packages/react-ui/internal/Menu/Menu.tsx +++ b/packages/react-ui/internal/Menu/Menu.tsx @@ -1,4 +1,5 @@ -import React, { CSSProperties, HTMLAttributes } from 'react'; +import type { CSSProperties, HTMLAttributes } from 'react'; +import React from 'react'; import { globalObject, isBrowser } from '@skbkontur/global-object'; import { isKeyArrowDown, isKeyArrowUp, isKeyEnter } from '../../lib/events/keyboard/identifiers'; @@ -7,13 +8,16 @@ import { ThemeFactory } from '../../lib/theming/ThemeFactory'; import { getDOMRect } from '../../lib/dom/getDOMRect'; import { responsiveLayout } from '../../components/ResponsiveLayout/decorator'; import { isNonNullable } from '../../lib/utils'; -import { ScrollContainer, ScrollContainerScrollState } from '../../components/ScrollContainer'; -import { MenuItem, MenuItemDataTids } from '../../components/MenuItem'; -import { Nullable } from '../../typings/utility-types'; +import type { ScrollContainerScrollState } from '../../components/ScrollContainer'; +import { ScrollContainer } from '../../components/ScrollContainer'; +import type { MenuItem } from '../../components/MenuItem'; +import { MenuItemDataTids } from '../../components/MenuItem'; +import type { Nullable } from '../../typings/utility-types'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { cx } from '../../lib/theming/Emotion'; -import { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, rootNode } from '../../lib/rootNode'; import { isIE11 } from '../../lib/client'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { isInstanceOf } from '../../lib/isInstanceOf'; diff --git a/packages/react-ui/internal/Menu/MenuContext.ts b/packages/react-ui/internal/Menu/MenuContext.ts index b297133d793..b4a8cb7f705 100644 --- a/packages/react-ui/internal/Menu/MenuContext.ts +++ b/packages/react-ui/internal/Menu/MenuContext.ts @@ -1,8 +1,8 @@ import React from 'react'; -import { MenuItem } from '../../components/MenuItem'; +import type { MenuItem } from '../../components/MenuItem'; -import { MenuNavigation } from './MenuNavigation'; +import type { MenuNavigation } from './MenuNavigation'; export interface MenuContextType { navigation: MenuNavigation | null; diff --git a/packages/react-ui/internal/Menu/MenuNavigation.tsx b/packages/react-ui/internal/Menu/MenuNavigation.tsx index d7bad9c8e5f..0bb9e161659 100644 --- a/packages/react-ui/internal/Menu/MenuNavigation.tsx +++ b/packages/react-ui/internal/Menu/MenuNavigation.tsx @@ -1,4 +1,5 @@ -import React, { RefObject } from 'react'; +import type { RefObject } from 'react'; +import type React from 'react'; interface Highlightable { highlight(): void; diff --git a/packages/react-ui/internal/Menu/__stories__/Menu.stories.tsx b/packages/react-ui/internal/Menu/__stories__/Menu.stories.tsx index 9565b41718b..c165a27b18d 100644 --- a/packages/react-ui/internal/Menu/__stories__/Menu.stories.tsx +++ b/packages/react-ui/internal/Menu/__stories__/Menu.stories.tsx @@ -1,9 +1,10 @@ import React from 'react'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { CheckAIcon16Regular } from '../../../internal/icons2022/CheckAIcon/CheckAIcon16Regular'; import { Menu } from '../Menu'; -import { MenuItem, MenuItemProps } from '../../../components/MenuItem'; +import type { MenuItemProps } from '../../../components/MenuItem'; +import { MenuItem } from '../../../components/MenuItem'; import { MenuHeader } from '../../../components/MenuHeader'; import { MenuSeparator } from '../../../components/MenuSeparator'; diff --git a/packages/react-ui/internal/Menu/isActiveElement.tsx b/packages/react-ui/internal/Menu/isActiveElement.tsx index fab06d5fe98..198f27d4353 100644 --- a/packages/react-ui/internal/Menu/isActiveElement.tsx +++ b/packages/react-ui/internal/Menu/isActiveElement.tsx @@ -1,6 +1,7 @@ -import React from 'react'; +import type React from 'react'; -import { MenuItem, MenuItemProps, isMenuItem } from '../../components/MenuItem'; +import type { MenuItem, MenuItemProps } from '../../components/MenuItem'; +import { isMenuItem } from '../../components/MenuItem'; export function isActiveElement(element: any): element is React.ComponentElement { return isMenuItem(element) && !element.props.disabled && !element.props.isNotSelectable; diff --git a/packages/react-ui/internal/MenuMessage/MenuMessage.styles.ts b/packages/react-ui/internal/MenuMessage/MenuMessage.styles.ts index 97ddff949e1..95694d9dbb5 100644 --- a/packages/react-ui/internal/MenuMessage/MenuMessage.styles.ts +++ b/packages/react-ui/internal/MenuMessage/MenuMessage.styles.ts @@ -1,4 +1,4 @@ -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { css, memoizeStyle } from '../../lib/theming/Emotion'; import { getMenuItemPaddings } from '../../components/MenuItem/MenuItem.styles'; diff --git a/packages/react-ui/internal/MenuMessage/MenuMessage.tsx b/packages/react-ui/internal/MenuMessage/MenuMessage.tsx index 070bd81571a..03c56e1040f 100644 --- a/packages/react-ui/internal/MenuMessage/MenuMessage.tsx +++ b/packages/react-ui/internal/MenuMessage/MenuMessage.tsx @@ -4,8 +4,8 @@ import { forwardRefAndName } from '../../lib/forwardRefAndName'; import { useResponsiveLayout } from '../../components/ResponsiveLayout'; import { cx } from '../../lib/theming/Emotion'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { CommonProps } from '../CommonWrapper'; -import { SizeProp } from '../../lib/types/props'; +import type { CommonProps } from '../CommonWrapper'; +import type { SizeProp } from '../../lib/types/props'; import { styles } from './MenuMessage.styles'; diff --git a/packages/react-ui/internal/MobilePopup/MobilePopup.styles.ts b/packages/react-ui/internal/MobilePopup/MobilePopup.styles.ts index c57924fb38b..a49ecce32f5 100644 --- a/packages/react-ui/internal/MobilePopup/MobilePopup.styles.ts +++ b/packages/react-ui/internal/MobilePopup/MobilePopup.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; const styles = { root(t: Theme) { diff --git a/packages/react-ui/internal/MobilePopup/MobilePopup.tsx b/packages/react-ui/internal/MobilePopup/MobilePopup.tsx index 197d2b5ec8c..9e51038028b 100644 --- a/packages/react-ui/internal/MobilePopup/MobilePopup.tsx +++ b/packages/react-ui/internal/MobilePopup/MobilePopup.tsx @@ -1,13 +1,15 @@ -import React, { HTMLAttributes } from 'react'; +import type { HTMLAttributes } from 'react'; +import React from 'react'; import { Transition } from 'react-transition-group'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { RenderContainer } from '../RenderContainer'; import { HideBodyVerticalScroll } from '../HideBodyVerticalScroll'; import { ZIndex } from '../ZIndex'; import { RenderLayer } from '../RenderLayer'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { jsStyles } from './MobilePopup.styles'; import { MobilePopupHeader } from './MobilePopupHeader'; diff --git a/packages/react-ui/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.ts b/packages/react-ui/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.ts index 5b1f68b42ac..50b47088783 100644 --- a/packages/react-ui/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.ts +++ b/packages/react-ui/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../../lib/theming/Emotion'; -import { Theme } from '../../../lib/theming/Theme'; +import type { Theme } from '../../../lib/theming/Theme'; const styles = { root(t: Theme) { diff --git a/packages/react-ui/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.tsx b/packages/react-ui/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.tsx index a953919f680..c395f78be69 100644 --- a/packages/react-ui/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.tsx +++ b/packages/react-ui/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Theme } from '../../../lib/theming/Theme'; +import type { Theme } from '../../../lib/theming/Theme'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; import { jsStyles } from './MobilePopupFooter.styles'; diff --git a/packages/react-ui/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.ts b/packages/react-ui/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.ts index f35a4c72752..141ce51c185 100644 --- a/packages/react-ui/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.ts +++ b/packages/react-ui/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../../lib/theming/Emotion'; -import { Theme } from '../../../lib/theming/Theme'; +import type { Theme } from '../../../lib/theming/Theme'; const styles = { root(t: Theme) { diff --git a/packages/react-ui/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.tsx b/packages/react-ui/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.tsx index c1eb238122d..d17f680232c 100644 --- a/packages/react-ui/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.tsx +++ b/packages/react-ui/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { isNonNullable } from '../../../lib/utils'; -import { Theme } from '../../../lib/theming/Theme'; +import type { Theme } from '../../../lib/theming/Theme'; import { cx } from '../../../lib/theming/Emotion'; import { ThemeContext } from '../../../lib/theming/ThemeContext'; diff --git a/packages/react-ui/internal/NativeDateInput/NativeDateInput.tsx b/packages/react-ui/internal/NativeDateInput/NativeDateInput.tsx index 83fa81b85c5..349556e5c42 100644 --- a/packages/react-ui/internal/NativeDateInput/NativeDateInput.tsx +++ b/packages/react-ui/internal/NativeDateInput/NativeDateInput.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { getDateForNative, getDateForComponent } from './utils'; import { jsStyles } from './NativeDateInput.styles'; diff --git a/packages/react-ui/internal/NativeDateInput/__tests__/NativeDateInput-test.tsx b/packages/react-ui/internal/NativeDateInput/__tests__/NativeDateInput-test.tsx index 5b6d0b87518..8cf8fa801b7 100644 --- a/packages/react-ui/internal/NativeDateInput/__tests__/NativeDateInput-test.tsx +++ b/packages/react-ui/internal/NativeDateInput/__tests__/NativeDateInput-test.tsx @@ -1,4 +1,4 @@ -import { CalendarDateShape } from '../../../components/Calendar/CalendarDateShape'; +import type { CalendarDateShape } from '../../../components/Calendar/CalendarDateShape'; import { getDateForNative, getDateForComponent, getNativeDateFromShape, getShapeFromNativeDate } from '../utils'; describe('NativeDatePikcer', () => { diff --git a/packages/react-ui/internal/NativeDateInput/utils.ts b/packages/react-ui/internal/NativeDateInput/utils.ts index a3d38ae8420..03c9c273fbf 100644 --- a/packages/react-ui/internal/NativeDateInput/utils.ts +++ b/packages/react-ui/internal/NativeDateInput/utils.ts @@ -1,6 +1,6 @@ import { getMonthInHumanFormat } from '../../components/Calendar/CalendarUtils'; -import { Nullable } from '../../typings/utility-types'; -import { CalendarDateShape } from '../../components/Calendar/CalendarDateShape'; +import type { Nullable } from '../../typings/utility-types'; +import type { CalendarDateShape } from '../../components/Calendar/CalendarDateShape'; export const getDateForNative = (componentDate: Nullable) => { if (!componentDate) { diff --git a/packages/react-ui/internal/PerformanceMetrics/PerformanceMetrics.tsx b/packages/react-ui/internal/PerformanceMetrics/PerformanceMetrics.tsx index d210aef5bd1..ac75a57a239 100644 --- a/packages/react-ui/internal/PerformanceMetrics/PerformanceMetrics.tsx +++ b/packages/react-ui/internal/PerformanceMetrics/PerformanceMetrics.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { createRoot } from 'react-dom/client'; import { Button } from '../../components/Button'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { Spinner } from '../../components/Spinner'; const PANEL_WRAPPER_STYLES = { width: '45%', display: 'inline-block', verticalAlign: 'top' }; diff --git a/packages/react-ui/internal/Popup/Popup.styles.ts b/packages/react-ui/internal/Popup/Popup.styles.ts index 3da6450595c..c7c6047a2a2 100644 --- a/packages/react-ui/internal/Popup/Popup.styles.ts +++ b/packages/react-ui/internal/Popup/Popup.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ popup(t: Theme) { diff --git a/packages/react-ui/internal/Popup/Popup.tsx b/packages/react-ui/internal/Popup/Popup.tsx index a04e4eb1576..69aa6136ed4 100644 --- a/packages/react-ui/internal/Popup/Popup.tsx +++ b/packages/react-ui/internal/Popup/Popup.tsx @@ -1,38 +1,40 @@ -import React, { HTMLAttributes, LegacyRef } from 'react'; +import type { HTMLAttributes, LegacyRef } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { Transition } from 'react-transition-group'; import warning from 'warning'; import { globalObject } from '@skbkontur/global-object'; import { getDOMRect } from '../../lib/dom/getDOMRect'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import * as LayoutEvents from '../../lib/LayoutEvents'; -import { Priority, ZIndex } from '../ZIndex'; +import type { Priority } from '../ZIndex'; +import { ZIndex } from '../ZIndex'; import { RenderContainer } from '../RenderContainer'; -import { FocusEventType, MouseEventType } from '../../typings/event-types'; +import type { FocusEventType, MouseEventType } from '../../typings/event-types'; import { getRandomID, isFunction, isNonNullable, isNullable, isRefableElement, mergeRefs } from '../../lib/utils'; import { isIE11, isEdge } from '../../lib/client'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { safePropTypesInstanceOf } from '../../lib/SSRSafe'; import { isTestEnv } from '../../lib/currentEnvironment'; -import { CommonProps, CommonWrapper } from '../CommonWrapper'; +import type { CommonProps } from '../CommonWrapper'; +import { CommonWrapper } from '../CommonWrapper'; import { cx } from '../../lib/theming/Emotion'; import { responsiveLayout } from '../../components/ResponsiveLayout/decorator'; import { MobilePopup } from '../MobilePopup'; -import { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, rootNode } from '../../lib/rootNode'; import { callChildRef } from '../../lib/callChildRef/callChildRef'; import { isInstanceWithAnchorElement } from '../../lib/InstanceWithAnchorElement'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { isInstanceOf } from '../../lib/isInstanceOf'; -import { - getFullReactUIFlagsContext, - ReactUIFeatureFlags, - ReactUIFeatureFlagsContext, -} from '../../lib/featureFlagsContext'; +import type { ReactUIFeatureFlags } from '../../lib/featureFlagsContext'; +import { getFullReactUIFlagsContext, ReactUIFeatureFlagsContext } from '../../lib/featureFlagsContext'; import { PopupPin } from './PopupPin'; -import { Offset, PopupHelper, PositionObject, Rect } from './PopupHelper'; +import type { Offset, PositionObject, Rect } from './PopupHelper'; +import { PopupHelper } from './PopupHelper'; import { styles } from './Popup.styles'; const POPUP_BORDER_DEFAULT_COLOR = 'transparent'; diff --git a/packages/react-ui/internal/Popup/PopupHelper.tsx b/packages/react-ui/internal/Popup/PopupHelper.tsx index 41fbce9b9ca..c959ffbcf13 100644 --- a/packages/react-ui/internal/Popup/PopupHelper.tsx +++ b/packages/react-ui/internal/Popup/PopupHelper.tsx @@ -2,7 +2,7 @@ import { globalObject } from '@skbkontur/global-object'; import { getDOMRect } from '../../lib/dom/getDOMRect'; -import { PopupPositionsType } from './Popup'; +import type { PopupPositionsType } from './Popup'; export interface Rect { top: number; diff --git a/packages/react-ui/internal/Popup/PopupPin.tsx b/packages/react-ui/internal/Popup/PopupPin.tsx index 2ef77b8c0f7..de931e26687 100644 --- a/packages/react-ui/internal/Popup/PopupPin.tsx +++ b/packages/react-ui/internal/Popup/PopupPin.tsx @@ -1,9 +1,10 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; -import { PopupHelper, PositionObject, Rect } from './PopupHelper'; +import type { PositionObject, Rect } from './PopupHelper'; +import { PopupHelper } from './PopupHelper'; import { styles } from './PopupPin.styles'; import { PopupDataTids } from './Popup'; diff --git a/packages/react-ui/internal/Popup/__stories__/Popup.stories.tsx b/packages/react-ui/internal/Popup/__stories__/Popup.stories.tsx index 32c2c65cf43..0f788adc415 100644 --- a/packages/react-ui/internal/Popup/__stories__/Popup.stories.tsx +++ b/packages/react-ui/internal/Popup/__stories__/Popup.stories.tsx @@ -1,8 +1,9 @@ import React from 'react'; -import { DropdownProps } from 'react-ui'; +import type { DropdownProps } from 'react-ui'; -import { Popup, PopupPositionsType, PopupProps } from '../Popup'; -import { Nullable } from '../../../typings/utility-types'; +import type { PopupPositionsType, PopupProps } from '../Popup'; +import { Popup } from '../Popup'; +import type { Nullable } from '../../../typings/utility-types'; import { Tooltip } from '../../../components/Tooltip'; import { ComboBox } from '../../../components/ComboBox'; import { Hint } from '../../../components/Hint'; diff --git a/packages/react-ui/internal/Popup/__tests__/Popup-test.tsx b/packages/react-ui/internal/Popup/__tests__/Popup-test.tsx index 95581d8375a..9263147b492 100644 --- a/packages/react-ui/internal/Popup/__tests__/Popup-test.tsx +++ b/packages/react-ui/internal/Popup/__tests__/Popup-test.tsx @@ -1,20 +1,22 @@ import React from 'react'; -import { ComponentClass, mount, ReactWrapper } from 'enzyme'; +import type { ComponentClass, ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import { Transition } from 'react-transition-group'; -import { ReactComponentLike } from 'prop-types'; +import type { ReactComponentLike } from 'prop-types'; import { render, screen } from '@testing-library/react'; import { PopupDataTids } from '..'; import { MobilePopupDataTids } from '../../MobilePopup'; -import { InstanceWithRootNode } from '../../../lib/rootNode'; -import { Popup, PopupProps, PopupState } from '../Popup'; +import type { InstanceWithRootNode } from '../../../lib/rootNode'; +import type { PopupProps, PopupState } from '../Popup'; +import { Popup } from '../Popup'; import { delay } from '../../../lib/utils'; import { RenderContainer } from '../../RenderContainer'; import { ZIndex } from '../../ZIndex'; import { CommonWrapper } from '../../CommonWrapper'; import { ResponsiveLayout } from '../../../components/ResponsiveLayout'; import { RenderInnerContainer, Portal } from '../../RenderContainer/RenderInnerContainer'; -import { Nullable } from '../../../typings/utility-types'; +import type { Nullable } from '../../../typings/utility-types'; import { LIGHT_THEME } from '../../../lib/theming/themes/LightTheme'; const openPopup = async (wrapper: ReactWrapper) => diff --git a/packages/react-ui/internal/Popup/types.ts b/packages/react-ui/internal/Popup/types.ts index 301b0497e93..19ce5b1db4f 100644 --- a/packages/react-ui/internal/Popup/types.ts +++ b/packages/react-ui/internal/Popup/types.ts @@ -1,3 +1,3 @@ // Public types to be used by the users -import { PopupPositionsType as Type } from './Popup'; +import type { PopupPositionsType as Type } from './Popup'; export type PopupPositionsType = Type; diff --git a/packages/react-ui/internal/PopupMenu/PopupMenu.tsx b/packages/react-ui/internal/PopupMenu/PopupMenu.tsx index c6e12f783b0..696271a994a 100644 --- a/packages/react-ui/internal/PopupMenu/PopupMenu.tsx +++ b/packages/react-ui/internal/PopupMenu/PopupMenu.tsx @@ -1,8 +1,9 @@ -import React, { AriaAttributes, HTMLAttributes } from 'react'; +import type { AriaAttributes, HTMLAttributes } from 'react'; +import React from 'react'; import { globalObject } from '@skbkontur/global-object'; import { getRandomID } from '../../lib/utils'; -import { HTMLProps } from '../../typings/html'; +import type { HTMLProps } from '../../typings/html'; import { isKeyArrowVertical, isKeyEnter, @@ -12,14 +13,18 @@ import { } from '../../lib/events/keyboard/identifiers'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Popup, PopupIds, PopupPositionsType } from '../Popup'; +import type { PopupPositionsType } from '../Popup'; +import { Popup, PopupIds } from '../Popup'; import { RenderLayer } from '../RenderLayer'; -import { Nullable } from '../../typings/utility-types'; -import { CommonProps, CommonWrapper } from '../CommonWrapper'; +import type { Nullable } from '../../typings/utility-types'; +import type { CommonProps } from '../CommonWrapper'; +import { CommonWrapper } from '../CommonWrapper'; import { responsiveLayout } from '../../components/ResponsiveLayout/decorator'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; -import { Menu, MenuProps } from '../Menu'; +import type { MenuProps } from '../Menu'; +import { Menu } from '../Menu'; import { isValidPositions } from './validatePositions'; import { styles } from './PopupMenu.styles'; diff --git a/packages/react-ui/internal/PopupMenu/__stories__/PopupMenu.creevey.stories.tsx b/packages/react-ui/internal/PopupMenu/__stories__/PopupMenu.creevey.stories.tsx index 8e9a5e42e85..41da01ce0c3 100644 --- a/packages/react-ui/internal/PopupMenu/__stories__/PopupMenu.creevey.stories.tsx +++ b/packages/react-ui/internal/PopupMenu/__stories__/PopupMenu.creevey.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Meta, Story } from '../../../typings/stories'; +import type { Meta, Story } from '../../../typings/stories'; import { CheckAIcon16Regular } from '../../../internal/icons2022/CheckAIcon/CheckAIcon16Regular'; import { PopupMenu } from '../PopupMenu'; import { MenuItem } from '../../../components/MenuItem'; diff --git a/packages/react-ui/internal/PopupMenu/__tests__/PopupMenu-test.tsx b/packages/react-ui/internal/PopupMenu/__tests__/PopupMenu-test.tsx index 0bf63270902..767830235ab 100644 --- a/packages/react-ui/internal/PopupMenu/__tests__/PopupMenu-test.tsx +++ b/packages/react-ui/internal/PopupMenu/__tests__/PopupMenu-test.tsx @@ -3,7 +3,8 @@ import userEvent from '@testing-library/user-event'; import { render, screen } from '@testing-library/react'; import { PopupDataTids, PopupIds } from '../../Popup'; -import { PopupMenu, PopupMenuCaptionProps } from '../PopupMenu'; +import type { PopupMenuCaptionProps } from '../PopupMenu'; +import { PopupMenu } from '../PopupMenu'; import { MenuItem } from '../../../components/MenuItem'; describe('PopupMenu', () => { diff --git a/packages/react-ui/internal/PopupMenu/validatePositions.ts b/packages/react-ui/internal/PopupMenu/validatePositions.ts index 13a6a1ddcd7..b8e9851d3d2 100644 --- a/packages/react-ui/internal/PopupMenu/validatePositions.ts +++ b/packages/react-ui/internal/PopupMenu/validatePositions.ts @@ -1,5 +1,6 @@ import { isProductionEnv } from '../../lib/currentEnvironment'; -import { PopupPositionsType, PopupPositions } from '../Popup'; +import type { PopupPositionsType } from '../Popup'; +import { PopupPositions } from '../Popup'; const isValidPosition = (position: PopupPositionsType): boolean => { return PopupPositions.includes(position); diff --git a/packages/react-ui/internal/RenderContainer/RenderContainer.tsx b/packages/react-ui/internal/RenderContainer/RenderContainer.tsx index e31402106a2..a00ee67c8b6 100644 --- a/packages/react-ui/internal/RenderContainer/RenderContainer.tsx +++ b/packages/react-ui/internal/RenderContainer/RenderContainer.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { globalObject } from '@skbkontur/global-object'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { getRandomID } from '../../lib/utils'; import { Upgrade } from '../../lib/Upgrades'; import { callChildRef } from '../../lib/callChildRef/callChildRef'; import { RenderInnerContainer } from './RenderInnerContainer'; -import { RenderContainerProps } from './RenderContainerTypes'; +import type { RenderContainerProps } from './RenderContainerTypes'; interface GlobalWithReactTesting { ReactTesting?: any; diff --git a/packages/react-ui/internal/RenderContainer/RenderContainerTypes.ts b/packages/react-ui/internal/RenderContainer/RenderContainerTypes.ts index e63de53fe14..9798064abf4 100644 --- a/packages/react-ui/internal/RenderContainer/RenderContainerTypes.ts +++ b/packages/react-ui/internal/RenderContainer/RenderContainerTypes.ts @@ -1,7 +1,7 @@ -import React from 'react'; +import type React from 'react'; -import { Nullable } from '../../typings/utility-types'; -import { CommonProps } from '../CommonWrapper'; +import type { Nullable } from '../../typings/utility-types'; +import type { CommonProps } from '../CommonWrapper'; export interface PortalProps { rt_rootID: string; diff --git a/packages/react-ui/internal/RenderContainer/RenderInnerContainer.tsx b/packages/react-ui/internal/RenderContainer/RenderInnerContainer.tsx index fb0315cb46a..16cce77ed6f 100644 --- a/packages/react-ui/internal/RenderContainer/RenderInnerContainer.tsx +++ b/packages/react-ui/internal/RenderContainer/RenderInnerContainer.tsx @@ -3,10 +3,10 @@ import ReactDOM from 'react-dom'; import propTypes from 'prop-types'; import { globalObject } from '@skbkontur/global-object'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { safePropTypesInstanceOf } from '../../lib/SSRSafe'; -import { PortalProps, RenderContainerProps } from './RenderContainerTypes'; +import type { PortalProps, RenderContainerProps } from './RenderContainerTypes'; import { PORTAL_INLET_ATTR } from './RenderContainer'; interface RenderInnerContainerProps extends RenderContainerProps { diff --git a/packages/react-ui/internal/RenderLayer/RenderLayer.tsx b/packages/react-ui/internal/RenderLayer/RenderLayer.tsx index 584ddd81157..911823f699f 100644 --- a/packages/react-ui/internal/RenderLayer/RenderLayer.tsx +++ b/packages/react-ui/internal/RenderLayer/RenderLayer.tsx @@ -2,9 +2,11 @@ import React from 'react'; import { globalObject } from '@skbkontur/global-object'; import { listen as listenFocusOutside, containsTargetOrRenderContainer } from '../../lib/listenFocusOutside'; -import { CommonProps, CommonWrapper } from '../CommonWrapper'; -import { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode'; -import { Nullable } from '../../typings/utility-types'; +import type { CommonProps } from '../CommonWrapper'; +import { CommonWrapper } from '../CommonWrapper'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { getRootNode, rootNode } from '../../lib/rootNode'; +import type { Nullable } from '../../typings/utility-types'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { isInstanceOf } from '../../lib/isInstanceOf'; diff --git a/packages/react-ui/internal/ThemePlayground/AnotherInputsPlayground.tsx b/packages/react-ui/internal/ThemePlayground/AnotherInputsPlayground.tsx index 53f9b30bc5c..8cc3c0dd56d 100644 --- a/packages/react-ui/internal/ThemePlayground/AnotherInputsPlayground.tsx +++ b/packages/react-ui/internal/ThemePlayground/AnotherInputsPlayground.tsx @@ -1,8 +1,9 @@ import React from 'react'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { Tooltip } from '../../components/Tooltip'; -import { DatePicker, DatePickerProps } from '../../components/DatePicker'; +import type { DatePickerProps } from '../../components/DatePicker'; +import { DatePicker } from '../../components/DatePicker'; interface DatePickerPlaygroundState { value: Nullable; diff --git a/packages/react-ui/internal/ThemePlayground/CheckboxPlayground.tsx b/packages/react-ui/internal/ThemePlayground/CheckboxPlayground.tsx index 96af9ac33ce..aef68a25bd7 100644 --- a/packages/react-ui/internal/ThemePlayground/CheckboxPlayground.tsx +++ b/packages/react-ui/internal/ThemePlayground/CheckboxPlayground.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { Gapped } from '../../components/Gapped'; -import { Checkbox, CheckboxProps } from '../../components/Checkbox'; +import type { CheckboxProps } from '../../components/Checkbox'; +import { Checkbox } from '../../components/Checkbox'; import { getComponentsFromPropsList } from './helpers'; diff --git a/packages/react-ui/internal/ThemePlayground/ComponentsGroup.tsx b/packages/react-ui/internal/ThemePlayground/ComponentsGroup.tsx index 88ebe143276..dc490f46c0c 100644 --- a/packages/react-ui/internal/ThemePlayground/ComponentsGroup.tsx +++ b/packages/react-ui/internal/ThemePlayground/ComponentsGroup.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Gapped } from '../../components/Gapped'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { styles } from './Playground.styles'; diff --git a/packages/react-ui/internal/ThemePlayground/CurrencyInputPlayground.tsx b/packages/react-ui/internal/ThemePlayground/CurrencyInputPlayground.tsx index 86dbc63cfd3..471e2f30e05 100644 --- a/packages/react-ui/internal/ThemePlayground/CurrencyInputPlayground.tsx +++ b/packages/react-ui/internal/ThemePlayground/CurrencyInputPlayground.tsx @@ -1,7 +1,8 @@ import React from 'react'; -import { Nullable } from '../../typings/utility-types'; -import { CurrencyInput, CurrencyInputProps } from '../../components/CurrencyInput'; +import type { Nullable } from '../../typings/utility-types'; +import type { CurrencyInputProps } from '../../components/CurrencyInput'; +import { CurrencyInput } from '../../components/CurrencyInput'; interface CurrencyInputPlaygroundState { value: Nullable; diff --git a/packages/react-ui/internal/ThemePlayground/Playground.styles.ts b/packages/react-ui/internal/ThemePlayground/Playground.styles.ts index e43cdddfd9e..d1ca60d4423 100644 --- a/packages/react-ui/internal/ThemePlayground/Playground.styles.ts +++ b/packages/react-ui/internal/ThemePlayground/Playground.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ playground() { diff --git a/packages/react-ui/internal/ThemePlayground/Playground.tsx b/packages/react-ui/internal/ThemePlayground/Playground.tsx index be6cf7a2022..c0c5136f1c1 100644 --- a/packages/react-ui/internal/ThemePlayground/Playground.tsx +++ b/packages/react-ui/internal/ThemePlayground/Playground.tsx @@ -6,15 +6,18 @@ import ErrorIcon from '@skbkontur/react-icons/Error'; import TrashIcon from '@skbkontur/react-icons/Trash'; import HelpDotIcon from '@skbkontur/react-icons/HelpDot'; -import { Button, ButtonProps } from '../../components/Button'; +import type { ButtonProps } from '../../components/Button'; +import { Button } from '../../components/Button'; import { Tabs } from '../../components/Tabs'; import { Gapped } from '../../components/Gapped'; -import { Link, LinkProps } from '../../components/Link'; -import { Input, InputProps } from '../../components/Input'; +import type { LinkProps } from '../../components/Link'; +import { Link } from '../../components/Link'; +import type { InputProps } from '../../components/Input'; +import { Input } from '../../components/Input'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { Tooltip } from '../../components/Tooltip'; import { Sticky } from '../../components/Sticky'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { isTestEnv } from '../../lib/currentEnvironment'; import { cx } from '../../lib/theming/Emotion'; import { FileUploader } from '../../components/FileUploader'; diff --git a/packages/react-ui/internal/ThemePlayground/RadioPlayground.tsx b/packages/react-ui/internal/ThemePlayground/RadioPlayground.tsx index 552531b94d6..4fa7db10494 100644 --- a/packages/react-ui/internal/ThemePlayground/RadioPlayground.tsx +++ b/packages/react-ui/internal/ThemePlayground/RadioPlayground.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { Gapped } from '../../components/Gapped'; -import { Radio, RadioProps } from '../../components/Radio'; +import type { RadioProps } from '../../components/Radio'; +import { Radio } from '../../components/Radio'; import { getComponentsFromPropsList } from './helpers'; diff --git a/packages/react-ui/internal/ThemePlayground/SelectPlayground.tsx b/packages/react-ui/internal/ThemePlayground/SelectPlayground.tsx index 66591d6337b..f1cc0fdf7a3 100644 --- a/packages/react-ui/internal/ThemePlayground/SelectPlayground.tsx +++ b/packages/react-ui/internal/ThemePlayground/SelectPlayground.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { Select, SelectProps } from '../../components/Select'; +import type { SelectProps } from '../../components/Select'; +import { Select } from '../../components/Select'; type SelectPlaygroundValue = string; type SelectPlaygroundItem = string; diff --git a/packages/react-ui/internal/ThemePlayground/SizesGroup.tsx b/packages/react-ui/internal/ThemePlayground/SizesGroup.tsx index 912ee179075..a1d7e36eced 100644 --- a/packages/react-ui/internal/ThemePlayground/SizesGroup.tsx +++ b/packages/react-ui/internal/ThemePlayground/SizesGroup.tsx @@ -5,7 +5,7 @@ import LinkIcon from '@skbkontur/react-icons/Link'; import { Input } from '../../components/Input'; import { Gapped } from '../../components/Gapped'; import { Button } from '../../components/Button'; -import { SizeProp } from '../../lib/types/props'; +import type { SizeProp } from '../../lib/types/props'; import { SelectPlayground } from './SelectPlayground'; diff --git a/packages/react-ui/internal/ThemePlayground/SwitcherPlayground.tsx b/packages/react-ui/internal/ThemePlayground/SwitcherPlayground.tsx index 727633d89c7..e38f3649c48 100644 --- a/packages/react-ui/internal/ThemePlayground/SwitcherPlayground.tsx +++ b/packages/react-ui/internal/ThemePlayground/SwitcherPlayground.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { Switcher, SwitcherProps } from '../../components/Switcher'; +import type { SwitcherProps } from '../../components/Switcher'; +import { Switcher } from '../../components/Switcher'; const defaultItems = ['Default', 'Error']; diff --git a/packages/react-ui/internal/ThemePlayground/ThemeContextPlayground.tsx b/packages/react-ui/internal/ThemePlayground/ThemeContextPlayground.tsx index 6a2a544a373..afed0bb1e5f 100644 --- a/packages/react-ui/internal/ThemePlayground/ThemeContextPlayground.tsx +++ b/packages/react-ui/internal/ThemePlayground/ThemeContextPlayground.tsx @@ -1,14 +1,15 @@ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { Theme, ThemeIn } from '../../lib/theming/Theme'; +import type { Theme, ThemeIn } from '../../lib/theming/Theme'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; import { SidePage } from '../../components/SidePage'; import { Gapped } from '../../components/Gapped'; import { ComboBox } from '../../components/ComboBox'; import { Link } from '../../components/Link'; import * as ColorFunctions from '../../lib/styles/ColorFunctions'; -import { Writeable } from '../../typings/utility-types'; +import type { Writeable } from '../../typings/utility-types'; import { findPropertyDescriptor } from '../../lib/theming/ThemeHelpers'; import { LIGHT_THEME } from '../../lib/theming/themes/LightTheme'; import { DARK_THEME } from '../../lib/theming/themes/DarkTheme'; diff --git a/packages/react-ui/internal/ThemePlayground/ThemeEditor.tsx b/packages/react-ui/internal/ThemePlayground/ThemeEditor.tsx index 4c5febf0bbd..57325b516bd 100644 --- a/packages/react-ui/internal/ThemePlayground/ThemeEditor.tsx +++ b/packages/react-ui/internal/ThemePlayground/ThemeEditor.tsx @@ -1,14 +1,14 @@ import React from 'react'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { Gapped } from '../../components/Gapped'; import { Loader } from '../../components/Loader'; import { isNonNullable } from '../../lib/utils'; import { VariableValue } from './VariableValue'; import { VARIABLES_GROUPS, DEPRECATED_VARIABLES } from './constants'; -import { ThemeErrorsType } from './ThemeContextPlayground'; +import type { ThemeErrorsType } from './ThemeContextPlayground'; import { styles } from './Playground.styles'; interface ThemeEditorProps { diff --git a/packages/react-ui/internal/ThemePlayground/UnlinkVarsPlayground.tsx b/packages/react-ui/internal/ThemePlayground/UnlinkVarsPlayground.tsx index 885bb12aa84..6ca397c31b4 100644 --- a/packages/react-ui/internal/ThemePlayground/UnlinkVarsPlayground.tsx +++ b/packages/react-ui/internal/ThemePlayground/UnlinkVarsPlayground.tsx @@ -2,7 +2,8 @@ import React, { useState } from 'react'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { ThemeFactory } from '../../lib/theming/ThemeFactory'; -import { Checkbox, CheckboxProps } from '../../components/Checkbox'; +import type { CheckboxProps } from '../../components/Checkbox'; +import { Checkbox } from '../../components/Checkbox'; import { Radio } from '../../components/Radio'; import { FileUploader } from '../../components/FileUploader'; import { Paging } from '../../components/Paging'; diff --git a/packages/react-ui/internal/ThemePlayground/VariableValue.tsx b/packages/react-ui/internal/ThemePlayground/VariableValue.tsx index e15acf539eb..4372c3d620e 100644 --- a/packages/react-ui/internal/ThemePlayground/VariableValue.tsx +++ b/packages/react-ui/internal/ThemePlayground/VariableValue.tsx @@ -6,7 +6,7 @@ import EventEmitter from 'eventemitter3'; import { isColor } from '../../lib/styles/ColorHelpers'; import { Input } from '../../components/Input'; import { Gapped } from '../../components/Gapped'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { Link } from '../../components/Link'; import { Hint } from '../../components/Hint'; import { isFunction } from '../../lib/utils'; diff --git a/packages/react-ui/internal/ThemePlayground/__stories__/ThemePlayground.stories.tsx b/packages/react-ui/internal/ThemePlayground/__stories__/ThemePlayground.stories.tsx index fe28525c4c2..55281ed3c7f 100644 --- a/packages/react-ui/internal/ThemePlayground/__stories__/ThemePlayground.stories.tsx +++ b/packages/react-ui/internal/ThemePlayground/__stories__/ThemePlayground.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { ThemeContextPlayground } from '../ThemeContextPlayground'; import { UnlinkVarsPlayground } from '../UnlinkVarsPlayground'; diff --git a/packages/react-ui/internal/ThemePlayground/constants.ts b/packages/react-ui/internal/ThemePlayground/constants.ts index 3861b3cf51b..4e3baf2c342 100644 --- a/packages/react-ui/internal/ThemePlayground/constants.ts +++ b/packages/react-ui/internal/ThemePlayground/constants.ts @@ -1,4 +1,4 @@ -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export enum ThemeType { LightTheme = 'lightTheme', diff --git a/packages/react-ui/internal/ThemeShowcase/ThemeShowcase.styles.ts b/packages/react-ui/internal/ThemeShowcase/ThemeShowcase.styles.ts index 4ff391b6896..ee0b50e9f02 100644 --- a/packages/react-ui/internal/ThemeShowcase/ThemeShowcase.styles.ts +++ b/packages/react-ui/internal/ThemeShowcase/ThemeShowcase.styles.ts @@ -1,5 +1,5 @@ import { css, memoizeStyle } from '../../lib/theming/Emotion'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; export const styles = memoizeStyle({ searchBar(t: Theme) { diff --git a/packages/react-ui/internal/ThemeShowcase/ThemeShowcase.tsx b/packages/react-ui/internal/ThemeShowcase/ThemeShowcase.tsx index e1ccaf6e8b7..27cdc1c1f1c 100644 --- a/packages/react-ui/internal/ThemeShowcase/ThemeShowcase.tsx +++ b/packages/react-ui/internal/ThemeShowcase/ThemeShowcase.tsx @@ -3,24 +3,24 @@ import React from 'react'; import { isColor } from '../../lib/styles/ColorHelpers'; import { LIGHT_THEME as lightVariables } from '../../lib/theming/themes/LightTheme'; import { DARK_THEME as darkVariables } from '../../lib/theming/themes/DarkTheme'; -import { ComboBox, ComboBoxItem } from '../../components/ComboBox'; +import type { ComboBoxItem } from '../../components/ComboBox'; +import { ComboBox } from '../../components/ComboBox'; import { Gapped } from '../../components/Gapped'; import { Link } from '../../components/Link'; import { Sticky } from '../../components/Sticky'; import * as ColorFunctions from '../../lib/styles/ColorFunctions'; import { Tooltip } from '../../components/Tooltip'; import { IS_PROXY_SUPPORTED } from '../../lib/Supports'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { cx } from '../../lib/theming/Emotion'; import { ThemeContext } from '../../lib/theming/ThemeContext'; +import type { ComponentDescriptionType, ComponentRowDescriptionType } from './VariablesCollector'; import { ALL_USED_VARIABLES, CALLS_COUNT, COMPONENT_DESCRIPTIONS, COMPONENT_DESCRIPTIONS_BY_VARIABLE, - ComponentDescriptionType, - ComponentRowDescriptionType, EXECUTION_TIME, } from './VariablesCollector'; import { styles } from './ThemeShowcase.styles'; diff --git a/packages/react-ui/internal/ThemeShowcase/VariablesCollector.ts b/packages/react-ui/internal/ThemeShowcase/VariablesCollector.ts index 3ccbef9040d..62091f66c70 100644 --- a/packages/react-ui/internal/ThemeShowcase/VariablesCollector.ts +++ b/packages/react-ui/internal/ThemeShowcase/VariablesCollector.ts @@ -1,6 +1,6 @@ import { globalObject } from '@skbkontur/global-object'; -import { Theme } from '../../lib/theming/Theme'; +import type { Theme } from '../../lib/theming/Theme'; import { LIGHT_THEME } from '../../lib/theming/themes/LightTheme'; import { DARK_THEME } from '../../lib/theming/themes/DarkTheme'; import { IS_PROXY_SUPPORTED } from '../../lib/Supports'; diff --git a/packages/react-ui/internal/ZIndex/ZIndex.tsx b/packages/react-ui/internal/ZIndex/ZIndex.tsx index b1a370e00c1..b5d40d6641c 100644 --- a/packages/react-ui/internal/ZIndex/ZIndex.tsx +++ b/packages/react-ui/internal/ZIndex/ZIndex.tsx @@ -2,13 +2,15 @@ import React from 'react'; import { globalObject, isBrowser } from '@skbkontur/global-object'; import { callChildRef } from '../../lib/callChildRef/callChildRef'; -import { rootNode, TSetRootNode } from '../../lib/rootNode'; +import type { TSetRootNode } from '../../lib/rootNode'; +import { rootNode } from '../../lib/rootNode'; import { createPropsGetter } from '../../lib/createPropsGetter'; import { isInstanceOf } from '../../lib/isInstanceOf'; import { LoaderDataTids } from '../../components/Loader'; import { PORTAL_INLET_ATTR, PORTAL_OUTLET_ATTR } from '../RenderContainer'; -import { incrementZIndex, removeZIndex, upperBorder, LayerComponentName, componentPriorities } from './ZIndexStorage'; +import type { LayerComponentName } from './ZIndexStorage'; +import { incrementZIndex, removeZIndex, upperBorder, componentPriorities } from './ZIndexStorage'; const DEFAULT_ZINDEX_CONTEXT = { parentLayerZIndex: 0, maxZIndex: Infinity }; diff --git a/packages/react-ui/internal/ZIndex/__stories__/ZIndex.stories.tsx b/packages/react-ui/internal/ZIndex/__stories__/ZIndex.stories.tsx index 1f70a24ee73..aeedce3e17c 100644 --- a/packages/react-ui/internal/ZIndex/__stories__/ZIndex.stories.tsx +++ b/packages/react-ui/internal/ZIndex/__stories__/ZIndex.stories.tsx @@ -2,7 +2,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { Dropdown } from '../../../components/Dropdown'; -import { Story } from '../../../typings/stories'; +import type { Story } from '../../../typings/stories'; import { Gapped } from '../../../components/Gapped'; import { Modal } from '../../../components/Modal'; import { Loader } from '../../../components/Loader'; @@ -10,12 +10,15 @@ import { Select } from '../../../components/Select'; import { Kebab } from '../../../components/Kebab'; import { MenuItem } from '../../../components/MenuItem'; import { Center } from '../../../components/Center'; -import { Hint, HintProps } from '../../../components/Hint'; -import { Tooltip, TooltipTrigger } from '../../../components/Tooltip'; +import type { HintProps } from '../../../components/Hint'; +import { Hint } from '../../../components/Hint'; +import type { TooltipTrigger } from '../../../components/Tooltip'; +import { Tooltip } from '../../../components/Tooltip'; import { ZIndex } from '../ZIndex'; import { Button } from '../../../components/Button'; import { Toggle } from '../../../components/Toggle'; -import { Popup, PopupPositionsType } from '../../Popup'; +import type { PopupPositionsType } from '../../Popup'; +import { Popup } from '../../Popup'; import { Toast } from '../../../components/Toast'; import { Input } from '../../../components/Input'; import { SidePage } from '../../../components/SidePage'; diff --git a/packages/react-ui/internal/ZIndex/__tests__/ZIndex-test.tsx b/packages/react-ui/internal/ZIndex/__tests__/ZIndex-test.tsx index 208d0d35a70..09d9c381592 100644 --- a/packages/react-ui/internal/ZIndex/__tests__/ZIndex-test.tsx +++ b/packages/react-ui/internal/ZIndex/__tests__/ZIndex-test.tsx @@ -5,7 +5,7 @@ import userEvent from '@testing-library/user-event'; import { globalObject } from '@skbkontur/global-object'; import { ZIndex } from '../ZIndex'; -import { GlobalWithRetailUiZIndexes } from '../ZIndexStorage'; +import type { GlobalWithRetailUiZIndexes } from '../ZIndexStorage'; describe('ZIndex', () => { it("shouldn't call unmoun/mount child component while switch `active` prop", () => { diff --git a/packages/react-ui/internal/ZIndex/__tests__/ZIndexStorage-test.ts b/packages/react-ui/internal/ZIndex/__tests__/ZIndexStorage-test.ts index 988beaddbe5..b32f5847b51 100644 --- a/packages/react-ui/internal/ZIndex/__tests__/ZIndexStorage-test.ts +++ b/packages/react-ui/internal/ZIndex/__tests__/ZIndexStorage-test.ts @@ -1,6 +1,7 @@ import { globalObject } from '@skbkontur/global-object'; -import { GlobalWithRetailUiZIndexes, incrementZIndex, removeZIndex } from '../ZIndexStorage'; +import type { GlobalWithRetailUiZIndexes } from '../ZIndexStorage'; +import { incrementZIndex, removeZIndex } from '../ZIndexStorage'; const globalWithRetailUiZIndexes = globalObject as GlobalWithRetailUiZIndexes; diff --git a/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon16Light.tsx b/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon16Light.tsx index 736ff0733c5..a6bd4428817 100644 --- a/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowALeftIcon16Light = forwardRefAndName( 'ArrowALeftIcon16Light', diff --git a/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon20Light.tsx b/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon20Light.tsx index d2bb7850b69..7bbb130e957 100644 --- a/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowALeftIcon20Light = forwardRefAndName( 'ArrowALeftIcon20Light', diff --git a/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon24Regular.tsx b/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon24Regular.tsx index 73a6623d79c..ac2531c5ef3 100644 --- a/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/ArrowALeftIcon/ArrowALeftIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowALeftIcon24Regular = forwardRefAndName( 'ArrowALeftIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon16Light.tsx b/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon16Light.tsx index 722c5d85b8a..e664a977daf 100644 --- a/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowARightIcon16Light = forwardRefAndName( 'ArrowARightIcon16Light', diff --git a/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon20Light.tsx b/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon20Light.tsx index 3f8f08cad47..c2f5baea479 100644 --- a/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowARightIcon20Light = forwardRefAndName( 'ArrowARightIcon20Light', diff --git a/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon24Regular.tsx b/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon24Regular.tsx index c603ff0f11c..e6aafa78330 100644 --- a/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/ArrowARightIcon/ArrowARightIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowARightIcon24Regular = forwardRefAndName( 'ArrowARightIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/ArrowAUpIcon/ArrowAUp16Light.tsx b/packages/react-ui/internal/icons2022/ArrowAUpIcon/ArrowAUp16Light.tsx index 9688e198573..e62f47a977e 100644 --- a/packages/react-ui/internal/icons2022/ArrowAUpIcon/ArrowAUp16Light.tsx +++ b/packages/react-ui/internal/icons2022/ArrowAUpIcon/ArrowAUp16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowAUpIcon16Light = forwardRefAndName('ArrowAUpIcon16Light', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon16Regular.tsx b/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon16Regular.tsx index 80e10ce5699..617c2a757df 100644 --- a/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon16Regular.tsx +++ b/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon16Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowCDownIcon16Regular = forwardRefAndName( 'ArrowCDownIcon16Regular', diff --git a/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon20Regular.tsx b/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon20Regular.tsx index 38bc5e2431d..db4a140ad51 100644 --- a/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon20Regular.tsx +++ b/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon20Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowCDownIcon20Regular = forwardRefAndName( 'ArrowCDownIcon20Regular', diff --git a/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon24Regular.tsx b/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon24Regular.tsx index 68a0a198368..bfa2fed0b7e 100644 --- a/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/ArrowCDownIcon/ArrowCDownIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowCDownIcon24Regular = forwardRefAndName( 'ArrowCDownIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon16Light.tsx b/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon16Light.tsx index 003becbbed2..fa7a279daaa 100644 --- a/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowCRightIcon16Light = forwardRefAndName( 'ArrowCRightIcon16Light', diff --git a/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon20Light.tsx b/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon20Light.tsx index 2170360789b..a3384a0c87e 100644 --- a/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowCRightIcon20Light = forwardRefAndName( 'ArrowCRightIcon20Light', diff --git a/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon24Regular.tsx b/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon24Regular.tsx index 6a2b88d1389..1d8f9e1667e 100644 --- a/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/ArrowCRightIcon/ArrowCRightIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowCRightIcon24Regular = forwardRefAndName( 'ArrowCRightIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/ArrowCUpIcon/ArrowCUpIcon16Regular.tsx b/packages/react-ui/internal/icons2022/ArrowCUpIcon/ArrowCUpIcon16Regular.tsx index 8e08dad1c11..0bd3e85bb4a 100644 --- a/packages/react-ui/internal/icons2022/ArrowCUpIcon/ArrowCUpIcon16Regular.tsx +++ b/packages/react-ui/internal/icons2022/ArrowCUpIcon/ArrowCUpIcon16Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowCUpIcon16Regular = forwardRefAndName( 'ArrowCUpIcon16Regular', diff --git a/packages/react-ui/internal/icons2022/ArrowCollapseCVOpenIcon/ArrowCollapseCVOpenIcon16Regular.tsx b/packages/react-ui/internal/icons2022/ArrowCollapseCVOpenIcon/ArrowCollapseCVOpenIcon16Regular.tsx index 72137e8dd3b..fd943fa2c01 100644 --- a/packages/react-ui/internal/icons2022/ArrowCollapseCVOpenIcon/ArrowCollapseCVOpenIcon16Regular.tsx +++ b/packages/react-ui/internal/icons2022/ArrowCollapseCVOpenIcon/ArrowCollapseCVOpenIcon16Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowCollapseCVOpenIcon16Regular = forwardRefAndName( 'ArrowCollapseCVOpenIcon16Regular', diff --git a/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon16Light.tsx b/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon16Light.tsx index 69ef8577119..db889adcf6a 100644 --- a/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowShapeDRadiusUpLeftIcon16Light = forwardRefAndName( 'ArrowShapeDRadiusUpLeftIcon16Light', diff --git a/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon20Light.tsx b/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon20Light.tsx index 57b01d2aa3e..eba63d0b7a7 100644 --- a/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowShapeDRadiusUpLeftIcon20Light = forwardRefAndName( 'ArrowShapeDRadiusUpLeftIcon20Light', diff --git a/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon24Regular.tsx b/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon24Regular.tsx index 8880ee58aaf..bc3d8de08db 100644 --- a/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/ArrowShapeDRadiusUpLeftIcon/ArrowShapeDRadiusUpLeftIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ArrowShapeDRadiusUpLeftIcon24Regular = forwardRefAndName( 'ArrowShapeDRadiusUpLeftIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/BaseIcon.tsx b/packages/react-ui/internal/icons2022/BaseIcon.tsx index c746c1a5319..d635c374a56 100644 --- a/packages/react-ui/internal/icons2022/BaseIcon.tsx +++ b/packages/react-ui/internal/icons2022/BaseIcon.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { forwardRefAndName, ReactUIComponentWithRef } from '../../lib/forwardRefAndName'; +import type { ReactUIComponentWithRef } from '../../lib/forwardRefAndName'; +import { forwardRefAndName } from '../../lib/forwardRefAndName'; import { styles } from './BaseIcon.styles'; diff --git a/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon16Light.tsx b/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon16Light.tsx index 8447f61d4a3..92381baeefb 100644 --- a/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const CalendarIcon16Light = forwardRefAndName('CalendarIcon16Light', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon20Light.tsx b/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon20Light.tsx index 4c418e7adad..207dd352405 100644 --- a/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const CalendarIcon20Light = forwardRefAndName('CalendarIcon20Light', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon24Regular.tsx b/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon24Regular.tsx index ad938ba9313..4c8b52522e2 100644 --- a/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/CalendarIcon/CalendarIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const CalendarIcon24Regular = forwardRefAndName( 'CalendarIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Light.tsx b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Light.tsx index f83b8345c03..6b979ec54ef 100644 --- a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const CheckAIcon16Light = forwardRefAndName('CheckAIcon16Light', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Regular.tsx b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Regular.tsx index 5cf10d234ce..6045ed666ef 100644 --- a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Regular.tsx +++ b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const CheckAIcon16Regular = forwardRefAndName('CheckAIcon16Regular', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Solid.tsx b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Solid.tsx index 461bcc8da9c..9e0dd68f22c 100644 --- a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Solid.tsx +++ b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon16Solid.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const CheckAIcon16Solid = forwardRefAndName('CheckAIcon16Solid', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon20Light.tsx b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon20Light.tsx index 79de73b3c8e..7fa9c84d7ee 100644 --- a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const CheckAIcon20Light = forwardRefAndName('CheckAIcon20Light', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon20Solid.tsx b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon20Solid.tsx index 7d8a008d950..dacfc29b090 100644 --- a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon20Solid.tsx +++ b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon20Solid.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const CheckAIcon20Solid = forwardRefAndName('CheckAIcon20Solid', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon24Regular.tsx b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon24Regular.tsx index de28030cf9b..8dcc100e824 100644 --- a/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/CheckAIcon/CheckAIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const CheckAIcon24Regular = forwardRefAndName('CheckAIcon24Regular', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon16Light.tsx b/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon16Light.tsx index 9dbfb59814c..509f96f950d 100644 --- a/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const EyeClosedIcon16Light = forwardRefAndName( 'EyeClosedIcon16Light', diff --git a/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon20Light.tsx b/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon20Light.tsx index 69b8e78012d..ba4af82e74a 100644 --- a/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const EyeClosedIcon20Light = forwardRefAndName( 'EyeClosedIcon20Light', diff --git a/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon24Regular.tsx b/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon24Regular.tsx index 6923525d226..e2e557a30ee 100644 --- a/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/EyeClosedIcon/EyeClosedIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const EyeClosedIcon24Regular = forwardRefAndName( 'EyeClosedIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon16Light.tsx b/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon16Light.tsx index cc9d2520771..dd14299286d 100644 --- a/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const EyeOpenIcon16Light = forwardRefAndName('EyeOpenIcon16Light', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon20Light.tsx b/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon20Light.tsx index 7b19214f667..d4e4c22a61d 100644 --- a/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const EyeOpenIcon20Light = forwardRefAndName('EyeOpenIcon20Light', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon24Regular.tsx b/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon24Regular.tsx index bf533afaa24..f34da386f3f 100644 --- a/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/EyeOpenIcon/EyeOpenIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const EyeOpenIcon24Regular = forwardRefAndName( 'EyeOpenIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/InfoCircleIcon/InfoCircleIcon64Regular.tsx b/packages/react-ui/internal/icons2022/InfoCircleIcon/InfoCircleIcon64Regular.tsx index 17934ab2742..02881c5804f 100644 --- a/packages/react-ui/internal/icons2022/InfoCircleIcon/InfoCircleIcon64Regular.tsx +++ b/packages/react-ui/internal/icons2022/InfoCircleIcon/InfoCircleIcon64Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndIconName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const InfoCircleIcon64Regular = forwardRefAndIconName( 'InfoCircleIcon64Regular', diff --git a/packages/react-ui/internal/icons2022/LoadingIcon.tsx b/packages/react-ui/internal/icons2022/LoadingIcon.tsx index dc43ae55541..87e0e2a7167 100644 --- a/packages/react-ui/internal/icons2022/LoadingIcon.tsx +++ b/packages/react-ui/internal/icons2022/LoadingIcon.tsx @@ -3,7 +3,8 @@ import React from 'react'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { styles } from '../../components/Spinner/Spinner.styles'; import { cx } from '../../lib/theming/Emotion'; -import { SpinnerIcon, SpinnerIconProps } from '../SpinnerIcon/SpinnerIcon'; +import type { SpinnerIconProps } from '../SpinnerIcon/SpinnerIcon'; +import { SpinnerIcon } from '../SpinnerIcon/SpinnerIcon'; import { iconSizer } from './iconSizer'; diff --git a/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon16Light.tsx b/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon16Light.tsx index 3533549d0a1..aea87a4470a 100644 --- a/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const MathFunctionIcon16Light = forwardRefAndName( 'MathFunctionIcon16Light', diff --git a/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon20Light.tsx b/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon20Light.tsx index ed6d989af43..3c08dbfac09 100644 --- a/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const MathFunctionIcon20Light = forwardRefAndName( 'MathFunctionIcon20Light', diff --git a/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon24Regular.tsx b/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon24Regular.tsx index fac8e292fd8..bdc188f0d58 100644 --- a/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/MathFunctionIcon/MathFunctionIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const MathFunctionIcon24Regular = forwardRefAndName( 'MathFunctionIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon16Light.tsx b/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon16Light.tsx index 1561f628bf1..167a49d28c6 100644 --- a/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const MinusCircleIcon16Light = forwardRefAndName( 'MinusCircleIcon16Light', diff --git a/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon16Regular.tsx b/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon16Regular.tsx index 620c11e2290..8eaa28c50d8 100644 --- a/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon16Regular.tsx +++ b/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon16Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const MinusCircleIcon16Regular = forwardRefAndName( 'MinusCircleIcon16Regular', diff --git a/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon20Light.tsx b/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon20Light.tsx index 8b4d3315895..0d8d8c80d14 100644 --- a/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const MinusCircleIcon20Light = forwardRefAndName( 'MinusCircleIcon20Light', diff --git a/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon24Regular.tsx b/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon24Regular.tsx index e113888dfdd..b204af001c7 100644 --- a/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/MinusCircleIcon/MinusCircleIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const MinusCircleIcon24Regular = forwardRefAndName( 'MinusCircleIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon16Light.tsx b/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon16Light.tsx index fc9104fbbb8..0f187761de7 100644 --- a/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const NetUploadIcon16Light = forwardRefAndName( 'NetUploadIcon16Light', diff --git a/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon20Light.tsx b/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon20Light.tsx index 6c01a3c488e..07b81271334 100644 --- a/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const NetUploadIcon20Light = forwardRefAndName( 'NetUploadIcon20Light', diff --git a/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon24Regular.tsx b/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon24Regular.tsx index 7f885b319af..1eb6c9c1915 100644 --- a/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/NetUploadIcon/NetUploadIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const NetUploadIcon24Regular = forwardRefAndName( 'NetUploadIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon16Solid.tsx b/packages/react-ui/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon16Solid.tsx index 967679c9e7d..6bb7cf91516 100644 --- a/packages/react-ui/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon16Solid.tsx +++ b/packages/react-ui/internal/icons2022/QuestionCircleIcon/QuestionCircleIcon16Solid.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const QuestionCircleIcon16Solid = forwardRefAndName( 'QuestionCircleIcon16Solid', diff --git a/packages/react-ui/internal/icons2022/SearchLoupeIcon/SearchLoupeIcon16Regular.tsx b/packages/react-ui/internal/icons2022/SearchLoupeIcon/SearchLoupeIcon16Regular.tsx index d564e378f15..78bef357cf5 100644 --- a/packages/react-ui/internal/icons2022/SearchLoupeIcon/SearchLoupeIcon16Regular.tsx +++ b/packages/react-ui/internal/icons2022/SearchLoupeIcon/SearchLoupeIcon16Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const SearchLoupeIcon16Regular = forwardRefAndName( 'SearchLoupeIcon16Regular', diff --git a/packages/react-ui/internal/icons2022/ShapeSquareIcon/ShapeSquareIcon16Solid.tsx b/packages/react-ui/internal/icons2022/ShapeSquareIcon/ShapeSquareIcon16Solid.tsx index 100e59e7dcc..6d98b61f6ae 100644 --- a/packages/react-ui/internal/icons2022/ShapeSquareIcon/ShapeSquareIcon16Solid.tsx +++ b/packages/react-ui/internal/icons2022/ShapeSquareIcon/ShapeSquareIcon16Solid.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const ShapeSquareIcon16Solid = forwardRefAndName( 'ShapeSquareIcon16Solid', diff --git a/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon16Light.tsx b/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon16Light.tsx index e44d39772ed..51df4a82f34 100644 --- a/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const UiMenuDotsThreeVIcon16Light = forwardRefAndName( 'UiMenuDotsThreeVIcon16Light', diff --git a/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon20Regular.tsx b/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon20Regular.tsx index 6e7b2751f2e..a73ce316735 100644 --- a/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon20Regular.tsx +++ b/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon20Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const UiMenuDotsThreeVIcon20Regular = forwardRefAndName( 'UiMenuDotsThreeVIcon20Regular', diff --git a/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon24Regular.tsx b/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon24Regular.tsx index 566e7546978..47f9fb89d00 100644 --- a/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/UiMenuDotsThreeVIcon/UiMenuDotsThreeVIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const UiMenuDotsThreeVIcon24Regular = forwardRefAndName( 'UiMenuDotsThreeVIcon24Regular', diff --git a/packages/react-ui/internal/icons2022/XIcon/XIcon16Light.tsx b/packages/react-ui/internal/icons2022/XIcon/XIcon16Light.tsx index 896c47e065d..bf0f5d58d4f 100644 --- a/packages/react-ui/internal/icons2022/XIcon/XIcon16Light.tsx +++ b/packages/react-ui/internal/icons2022/XIcon/XIcon16Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const XIcon16Light = forwardRefAndName('XIcon16Light', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/XIcon/XIcon16Regular.tsx b/packages/react-ui/internal/icons2022/XIcon/XIcon16Regular.tsx index 4011b4576c0..88543850358 100644 --- a/packages/react-ui/internal/icons2022/XIcon/XIcon16Regular.tsx +++ b/packages/react-ui/internal/icons2022/XIcon/XIcon16Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const XIcon16Regular = forwardRefAndName('XIcon16Regular', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/XIcon/XIcon20Light.tsx b/packages/react-ui/internal/icons2022/XIcon/XIcon20Light.tsx index acbf4a9de11..0eeff16ba43 100644 --- a/packages/react-ui/internal/icons2022/XIcon/XIcon20Light.tsx +++ b/packages/react-ui/internal/icons2022/XIcon/XIcon20Light.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const XIcon20Light = forwardRefAndName('XIcon20Light', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/XIcon/XIcon20Regular.tsx b/packages/react-ui/internal/icons2022/XIcon/XIcon20Regular.tsx index 5fb7f1ac0f0..ec7b5183823 100644 --- a/packages/react-ui/internal/icons2022/XIcon/XIcon20Regular.tsx +++ b/packages/react-ui/internal/icons2022/XIcon/XIcon20Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const XIcon20Regular = forwardRefAndName('XIcon20Regular', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/XIcon/XIcon24Regular.tsx b/packages/react-ui/internal/icons2022/XIcon/XIcon24Regular.tsx index cada252a9be..c62803dfb12 100644 --- a/packages/react-ui/internal/icons2022/XIcon/XIcon24Regular.tsx +++ b/packages/react-ui/internal/icons2022/XIcon/XIcon24Regular.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { forwardRefAndName } from '../../../lib/forwardRefAndName'; -import { BaseIcon, IconProps } from '../BaseIcon'; +import type { IconProps } from '../BaseIcon'; +import { BaseIcon } from '../BaseIcon'; export const XIcon24Regular = forwardRefAndName('XIcon24Regular', (props, ref) => { return ( diff --git a/packages/react-ui/internal/icons2022/iconSizer.tsx b/packages/react-ui/internal/icons2022/iconSizer.tsx index 50d48b2f65c..ebe543c6910 100644 --- a/packages/react-ui/internal/icons2022/iconSizer.tsx +++ b/packages/react-ui/internal/icons2022/iconSizer.tsx @@ -2,8 +2,9 @@ import React from 'react'; import { forwardRefAndIconName } from '../../lib/forwardRefAndName'; -import { IconProps as BaseIconProps } from './BaseIcon'; -import { ALIASES_TO_SIZES, DEFAULT_ICON_ALIAS, IconSizeAliases } from './iconConstants'; +import type { IconProps as BaseIconProps } from './BaseIcon'; +import type { IconSizeAliases } from './iconConstants'; +import { ALIASES_TO_SIZES, DEFAULT_ICON_ALIAS } from './iconConstants'; type Sizes = Record React.ReactElement>; diff --git a/packages/react-ui/lib/InstanceWithAnchorElement.ts b/packages/react-ui/lib/InstanceWithAnchorElement.ts index d284579918c..c2a757766c7 100644 --- a/packages/react-ui/lib/InstanceWithAnchorElement.ts +++ b/packages/react-ui/lib/InstanceWithAnchorElement.ts @@ -1,4 +1,4 @@ -import { Nullable } from '../typings/utility-types'; +import type { Nullable } from '../typings/utility-types'; export interface InstanceWithAnchorElement { getAnchorElement: () => Nullable; diff --git a/packages/react-ui/lib/ModalStack.ts b/packages/react-ui/lib/ModalStack.ts index 70e1373b703..a87c012ac03 100644 --- a/packages/react-ui/lib/ModalStack.ts +++ b/packages/react-ui/lib/ModalStack.ts @@ -1,9 +1,9 @@ -import React from 'react'; +import type React from 'react'; import EventEmitter from 'eventemitter3'; import { globalObject } from '@skbkontur/global-object'; -import { SidePageProps } from '../components/SidePage'; -import { ModalProps } from '../components/Modal'; +import type { SidePageProps } from '../components/SidePage'; +import type { ModalProps } from '../components/Modal'; interface StackInfo { emitter: EventEmitter; diff --git a/packages/react-ui/lib/callChildRef/callChildRef.ts b/packages/react-ui/lib/callChildRef/callChildRef.ts index fb8be03a377..0c99f7d41ee 100644 --- a/packages/react-ui/lib/callChildRef/callChildRef.ts +++ b/packages/react-ui/lib/callChildRef/callChildRef.ts @@ -1,6 +1,6 @@ -import React from 'react'; +import type React from 'react'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; export const callChildRef = ( componentRef: React.RefCallback | React.RefObject, diff --git a/packages/react-ui/lib/createPropsGetter.ts b/packages/react-ui/lib/createPropsGetter.ts index 6bc7198b7ab..822e23504b0 100644 --- a/packages/react-ui/lib/createPropsGetter.ts +++ b/packages/react-ui/lib/createPropsGetter.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; export type DefaultizedProps = P & DP; diff --git a/packages/react-ui/lib/date/InternalDate.ts b/packages/react-ui/lib/date/InternalDate.ts index ac76c38bd40..a534c3605d2 100644 --- a/packages/react-ui/lib/date/InternalDate.ts +++ b/packages/react-ui/lib/date/InternalDate.ts @@ -7,17 +7,19 @@ import { InternalDateSetter } from './InternalDateSetter'; import { InternalDateTransformer } from './InternalDateTransformer'; import { InternalDateValidator } from './InternalDateValidator'; import { internalDateLocale } from './localeSets'; -import { +import type { InternalDateChangeSettings, InternalDateComponentRaw, InternalDateComponentsNumber, InternalDateComponentsRaw, - InternalDateComponentType, InternalDateConstructorProps, InternalDateFragment, - InternalDateOrder, InternalDateSeparator, InternalDateToFragmentsSettings, +} from './types'; +import { + InternalDateComponentType, + InternalDateOrder, InternalDateValidateCheck, isInternalDateValidateCheck, } from './types'; diff --git a/packages/react-ui/lib/date/InternalDateCalculator.ts b/packages/react-ui/lib/date/InternalDateCalculator.ts index f63accbab7a..8f144786609 100644 --- a/packages/react-ui/lib/date/InternalDateCalculator.ts +++ b/packages/react-ui/lib/date/InternalDateCalculator.ts @@ -1,10 +1,6 @@ import { InternalDateGetter } from './InternalDateGetter'; -import { - InternalDateComponent, - InternalDateComponentRaw, - InternalDateComponents, - InternalDateComponentType, -} from './types'; +import type { InternalDateComponent, InternalDateComponentRaw, InternalDateComponents } from './types'; +import { InternalDateComponentType } from './types'; export class InternalDateCalculator { public static calcRangeStartDateComponent( diff --git a/packages/react-ui/lib/date/InternalDateGetter.ts b/packages/react-ui/lib/date/InternalDateGetter.ts index 4a9b4e624f2..0eae5f6da4f 100644 --- a/packages/react-ui/lib/date/InternalDateGetter.ts +++ b/packages/react-ui/lib/date/InternalDateGetter.ts @@ -1,11 +1,7 @@ import { MAX_DATE, MAX_MONTH, MAX_YEAR, MIN_DATE, MIN_MONTH, MIN_YEAR } from './constants'; -import { InternalDate } from './InternalDate'; -import { - InternalDateComponentType, - InternalDateComponentsRaw, - InternalDateComponentRaw, - InternalDateComponents, -} from './types'; +import type { InternalDate } from './InternalDate'; +import type { InternalDateComponentsRaw, InternalDateComponentRaw, InternalDateComponents } from './types'; +import { InternalDateComponentType } from './types'; const calculateMonth = (month: number) => { if (month <= 7) { diff --git a/packages/react-ui/lib/date/InternalDateSetter.ts b/packages/react-ui/lib/date/InternalDateSetter.ts index 13af4c9c9af..a2d6e89ebd5 100644 --- a/packages/react-ui/lib/date/InternalDateSetter.ts +++ b/packages/react-ui/lib/date/InternalDateSetter.ts @@ -1,10 +1,6 @@ -import { InternalDate } from './InternalDate'; -import { - InternalDateComponentType, - InternalDateComponentRaw, - InternalDateComponentsRaw, - InternalDateChangeSettings, -} from './types'; +import type { InternalDate } from './InternalDate'; +import type { InternalDateComponentRaw, InternalDateComponentsRaw, InternalDateChangeSettings } from './types'; +import { InternalDateComponentType } from './types'; export class InternalDateSetter { public static setValueDateComponent( diff --git a/packages/react-ui/lib/date/InternalDateTransformer.ts b/packages/react-ui/lib/date/InternalDateTransformer.ts index 20d6c61e112..a1d58224975 100644 --- a/packages/react-ui/lib/date/InternalDateTransformer.ts +++ b/packages/react-ui/lib/date/InternalDateTransformer.ts @@ -12,17 +12,15 @@ import { RE_ORDER_YMD, } from './constants'; import { InternalDateValidator } from './InternalDateValidator'; -import { +import type { InternalDateComponentRaw, InternalDateComponents, InternalDateComponentsNumber, InternalDateComponentsRaw, - InternalDateComponentType, InternalDateFragment, - InternalDateOrder, - InternalDateSeparator, InternalDateToFragmentsSettings, } from './types'; +import { InternalDateComponentType, InternalDateOrder, InternalDateSeparator } from './types'; export class InternalDateTransformer { public static padStart = (value: InternalDateComponentRaw, length: number, pad: string = CHAR_PAD): string => diff --git a/packages/react-ui/lib/date/InternalDateValidator.ts b/packages/react-ui/lib/date/InternalDateValidator.ts index dcecd071423..f4d11d2b8e2 100644 --- a/packages/react-ui/lib/date/InternalDateValidator.ts +++ b/packages/react-ui/lib/date/InternalDateValidator.ts @@ -1,11 +1,7 @@ -import { InternalDate } from './InternalDate'; +import type { InternalDate } from './InternalDate'; import { InternalDateGetter } from './InternalDateGetter'; -import { - InternalDateComponentRaw, - InternalDateComponentsNumber, - InternalDateComponentsRaw, - InternalDateComponentType, -} from './types'; +import type { InternalDateComponentRaw, InternalDateComponentsNumber, InternalDateComponentsRaw } from './types'; +import { InternalDateComponentType } from './types'; import { InternalDateTransformer } from './InternalDateTransformer'; const calculateStartDate = (startDate: number | null) => { diff --git a/packages/react-ui/lib/date/localeSets.ts b/packages/react-ui/lib/date/localeSets.ts index f4ae2161267..9c4cfef78cd 100644 --- a/packages/react-ui/lib/date/localeSets.ts +++ b/packages/react-ui/lib/date/localeSets.ts @@ -1,12 +1,7 @@ import { LangCodes } from '../locale'; -import { - InternalDateDayWeek, - InternalDateFirstDayWeek, - InternalDateLocaleSet, - InternalDateOrder, - InternalDateSeparator, -} from './types'; +import type { InternalDateLocaleSet } from './types'; +import { InternalDateDayWeek, InternalDateFirstDayWeek, InternalDateOrder, InternalDateSeparator } from './types'; const DateCustomSet_DMY_Dot_Monday_6_7: InternalDateLocaleSet = { order: InternalDateOrder.DMY, diff --git a/packages/react-ui/lib/date/types.ts b/packages/react-ui/lib/date/types.ts index 0870ebd4f00..0af397b754b 100644 --- a/packages/react-ui/lib/date/types.ts +++ b/packages/react-ui/lib/date/types.ts @@ -1,4 +1,4 @@ -import { LangCodes } from '../locale'; +import type { LangCodes } from '../locale'; export enum InternalDateOrder { DMY = 'DMY', diff --git a/packages/react-ui/lib/dom/getDOMRect.ts b/packages/react-ui/lib/dom/getDOMRect.ts index 2c4507e9af0..cbfda433ac0 100644 --- a/packages/react-ui/lib/dom/getDOMRect.ts +++ b/packages/react-ui/lib/dom/getDOMRect.ts @@ -1,4 +1,4 @@ -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; type DOMRectDefaultValues = Omit; /** * Возвращает размер элемента и его позицию относительно viewport diff --git a/packages/react-ui/lib/dom/tabbableHelpers.ts b/packages/react-ui/lib/dom/tabbableHelpers.ts index 580bb3d0d09..8d25e8adcf9 100644 --- a/packages/react-ui/lib/dom/tabbableHelpers.ts +++ b/packages/react-ui/lib/dom/tabbableHelpers.ts @@ -1,7 +1,8 @@ -import { tabbable, FocusableElement, isFocusable } from 'tabbable'; +import type { FocusableElement } from 'tabbable'; +import { tabbable, isFocusable } from 'tabbable'; import { globalObject } from '@skbkontur/global-object'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { isInstanceOf } from '../../lib/isInstanceOf'; /** diff --git a/packages/react-ui/lib/events/fixFirefoxModifiedClickOnLabel.ts b/packages/react-ui/lib/events/fixFirefoxModifiedClickOnLabel.ts index 78568944efb..5b67781d6fd 100644 --- a/packages/react-ui/lib/events/fixFirefoxModifiedClickOnLabel.ts +++ b/packages/react-ui/lib/events/fixFirefoxModifiedClickOnLabel.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; import { globalObject, isBrowser } from '@skbkontur/global-object'; import { isFirefox } from '../client'; diff --git a/packages/react-ui/lib/events/keyboard/extractCode.ts b/packages/react-ui/lib/events/keyboard/extractCode.ts index 13d1191fc6b..6c77bb421cb 100644 --- a/packages/react-ui/lib/events/keyboard/extractCode.ts +++ b/packages/react-ui/lib/events/keyboard/extractCode.ts @@ -1,7 +1,8 @@ -import { Entries } from '../../../typings/utility-types'; +import type { Entries } from '../../../typings/utility-types'; import { KeyboardEventCodes as Codes } from './KeyboardEventCodes'; -import { KeyboardKey, KeyboardMapKeys } from './KeyboardMapKeys'; +import type { KeyboardKey } from './KeyboardMapKeys'; +import { KeyboardMapKeys } from './KeyboardMapKeys'; export function extractCode(e: React.KeyboardEvent | KeyboardEvent): Codes { const event = (e as React.KeyboardEvent).nativeEvent || e; diff --git a/packages/react-ui/lib/extractKeyboardAction.ts b/packages/react-ui/lib/extractKeyboardAction.ts index 040c3f6b0f5..f76b86cc1c3 100644 --- a/packages/react-ui/lib/extractKeyboardAction.ts +++ b/packages/react-ui/lib/extractKeyboardAction.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; type ActionCheck = (x0: React.KeyboardEvent) => boolean; diff --git a/packages/react-ui/lib/featureFlagsContext/FeatureFlagsHelpers.tsx b/packages/react-ui/lib/featureFlagsContext/FeatureFlagsHelpers.tsx index d7840c33c31..b920410cf78 100644 --- a/packages/react-ui/lib/featureFlagsContext/FeatureFlagsHelpers.tsx +++ b/packages/react-ui/lib/featureFlagsContext/FeatureFlagsHelpers.tsx @@ -1,4 +1,5 @@ -import { reactUIFeatureFlagsDefault, ReactUIFeatureFlags } from './ReactUIFeatureFlagsContext'; +import type { ReactUIFeatureFlags } from './ReactUIFeatureFlagsContext'; +import { reactUIFeatureFlagsDefault } from './ReactUIFeatureFlagsContext'; export const getFullReactUIFlagsContext = (flags: ReactUIFeatureFlags) => { return { ...reactUIFeatureFlagsDefault, ...flags }; diff --git a/packages/react-ui/lib/getDisplayName.ts b/packages/react-ui/lib/getDisplayName.ts index 3ed93b9c510..c0545f1d256 100644 --- a/packages/react-ui/lib/getDisplayName.ts +++ b/packages/react-ui/lib/getDisplayName.ts @@ -1,6 +1,6 @@ -import React from 'react'; +import type React from 'react'; -import { ReactUIComponentWithRef } from './forwardRefAndName'; +import type { ReactUIComponentWithRef } from './forwardRefAndName'; export function getDisplayName

( RC: React.ComponentType

| React.FunctionComponent

| ReactUIComponentWithRef, diff --git a/packages/react-ui/lib/locale/LocaleContext.ts b/packages/react-ui/lib/locale/LocaleContext.ts index 7d622bbd3e2..4dce9c49a9b 100644 --- a/packages/react-ui/lib/locale/LocaleContext.ts +++ b/packages/react-ui/lib/locale/LocaleContext.ts @@ -1,6 +1,6 @@ import React from 'react'; -import { LangCodes, LocaleControls } from './types'; +import type { LangCodes, LocaleControls } from './types'; import { defaultLangCode } from './constants'; export interface LocaleContextProps { diff --git a/packages/react-ui/lib/locale/LocaleHelper.ts b/packages/react-ui/lib/locale/LocaleHelper.ts index f582ae03467..92cd5b9f8b5 100644 --- a/packages/react-ui/lib/locale/LocaleHelper.ts +++ b/packages/react-ui/lib/locale/LocaleHelper.ts @@ -1,5 +1,5 @@ import { defaultLangCode } from './constants'; -import { LangCodes } from './types'; +import type { LangCodes } from './types'; export class LocaleHelper { private readonly locales: { [key in LangCodes]?: C }; diff --git a/packages/react-ui/lib/locale/decorators.tsx b/packages/react-ui/lib/locale/decorators.tsx index ac9a3ea3638..d5c2bb838fc 100644 --- a/packages/react-ui/lib/locale/decorators.tsx +++ b/packages/react-ui/lib/locale/decorators.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import type React from 'react'; import { defaultLangCode } from './constants'; import { LocaleContext } from './LocaleContext'; -import { LocaleHelper } from './LocaleHelper'; -import { LangCodes, LocaleControls } from './types'; +import type { LocaleHelper } from './LocaleHelper'; +import type { LangCodes, LocaleControls } from './types'; export function locale(controlName: keyof LocaleControls, localeHelper: LocaleHelper) { return React.Component>(constructor: T) => { diff --git a/packages/react-ui/lib/locale/types.ts b/packages/react-ui/lib/locale/types.ts index 393e530d12d..7921899b32c 100644 --- a/packages/react-ui/lib/locale/types.ts +++ b/packages/react-ui/lib/locale/types.ts @@ -1,13 +1,13 @@ -import { TokenLocale } from '../../components/Token/locale'; -import { SidePageLocale } from '../../components/SidePage/locale'; -import { PasswordInputLocale } from '../../components/PasswordInput/locale'; -import { ComboBoxLocale } from '../../internal/CustomComboBox/locale'; -import { DatePickerLocale } from '../../components/DatePicker/locale'; -import { PagingLocale } from '../../components/Paging/locale'; -import { SelectLocale } from '../../components/Select/locale'; -import { TokenInputLocale } from '../../components/TokenInput/locale'; -import { FileUploaderLocale } from '../../components/FileUploader/locale'; -import { CalendarLocale } from '../../components/Calendar/locale/types'; +import type { TokenLocale } from '../../components/Token/locale'; +import type { SidePageLocale } from '../../components/SidePage/locale'; +import type { PasswordInputLocale } from '../../components/PasswordInput/locale'; +import type { ComboBoxLocale } from '../../internal/CustomComboBox/locale'; +import type { DatePickerLocale } from '../../components/DatePicker/locale'; +import type { PagingLocale } from '../../components/Paging/locale'; +import type { SelectLocale } from '../../components/Select/locale'; +import type { TokenInputLocale } from '../../components/TokenInput/locale'; +import type { FileUploaderLocale } from '../../components/FileUploader/locale'; +import type { CalendarLocale } from '../../components/Calendar/locale/types'; export interface LocaleControls { [key: string]: any; diff --git a/packages/react-ui/lib/locale/useLocaleForControl.ts b/packages/react-ui/lib/locale/useLocaleForControl.ts index 52797b4c226..3011e35159c 100644 --- a/packages/react-ui/lib/locale/useLocaleForControl.ts +++ b/packages/react-ui/lib/locale/useLocaleForControl.ts @@ -1,7 +1,7 @@ import { useContext, useMemo } from 'react'; -import { LocaleControls } from './types'; -import { LocaleHelper } from './LocaleHelper'; +import type { LocaleControls } from './types'; +import type { LocaleHelper } from './LocaleHelper'; import { LocaleContext } from './LocaleContext'; export const useLocaleForControl = >( diff --git a/packages/react-ui/lib/rootNode/__tests__/getRootNode-test.tsx b/packages/react-ui/lib/rootNode/__tests__/getRootNode-test.tsx index d452f2993b3..f44050f9ad8 100644 --- a/packages/react-ui/lib/rootNode/__tests__/getRootNode-test.tsx +++ b/packages/react-ui/lib/rootNode/__tests__/getRootNode-test.tsx @@ -2,10 +2,10 @@ import React from 'react'; import { findDOMNode } from 'react-dom'; import { render } from '@testing-library/react'; -import { Nullable } from '../../../typings/utility-types'; +import type { Nullable } from '../../../typings/utility-types'; import { callChildRef } from '../../../lib/callChildRef/callChildRef'; import { getRootNode } from '../getRootNode'; -import { InstanceWithRootNode } from '../rootNodeDecorator'; +import type { InstanceWithRootNode } from '../rootNodeDecorator'; const getInstance = (element: React.ReactElement): React.ReactInstance | null => { let ref: React.Component | Element | null = null; diff --git a/packages/react-ui/lib/rootNode/getRootNode.ts b/packages/react-ui/lib/rootNode/getRootNode.ts index e49c27a7ef5..cf23ff5a80b 100644 --- a/packages/react-ui/lib/rootNode/getRootNode.ts +++ b/packages/react-ui/lib/rootNode/getRootNode.ts @@ -1,10 +1,10 @@ import { findDOMNode } from 'react-dom'; -import React from 'react'; +import type React from 'react'; import warning from 'warning'; import { globalObject } from '@skbkontur/global-object'; import { isInstanceOf } from '../../lib/isInstanceOf'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { isInstanceWithRootNode } from './rootNodeDecorator'; diff --git a/packages/react-ui/lib/rootNode/rootNodeDecorator.tsx b/packages/react-ui/lib/rootNode/rootNodeDecorator.tsx index 7bad179678c..5daa0eb2463 100644 --- a/packages/react-ui/lib/rootNode/rootNodeDecorator.tsx +++ b/packages/react-ui/lib/rootNode/rootNodeDecorator.tsx @@ -1,7 +1,7 @@ -import React from 'react'; +import type React from 'react'; import EventEmitter from 'eventemitter3'; -import { Nullable } from '../../typings/utility-types'; +import type { Nullable } from '../../typings/utility-types'; import { getRootNode } from './getRootNode'; diff --git a/packages/react-ui/lib/styles/ColorFactory.ts b/packages/react-ui/lib/styles/ColorFactory.ts index 154b36f0326..3bed96ef4a4 100644 --- a/packages/react-ui/lib/styles/ColorFactory.ts +++ b/packages/react-ui/lib/styles/ColorFactory.ts @@ -2,7 +2,8 @@ import warning from 'warning'; import { clamp, extractColorParts, hue2rgb, parseHSLParts, parseRGBParts } from './ColorHelpers'; import { ColorKeywords } from './ColorKeywords'; -import { ColorKeywordsType, ColorObject, ColorType, RGBTuple } from './ColorObject'; +import type { ColorKeywordsType, ColorType, RGBTuple } from './ColorObject'; +import { ColorObject } from './ColorObject'; interface ColorFactoryCacheType { [key: string]: ColorObject; diff --git a/packages/react-ui/lib/styles/ColorFunctions.ts b/packages/react-ui/lib/styles/ColorFunctions.ts index 952f9164d7a..433ba5c2323 100644 --- a/packages/react-ui/lib/styles/ColorFunctions.ts +++ b/packages/react-ui/lib/styles/ColorFunctions.ts @@ -1,6 +1,6 @@ import { clamp, floatFromPercent } from './ColorHelpers'; import { ColorFactory } from './ColorFactory'; -import { ColorObject } from './ColorObject'; +import type { ColorObject } from './ColorObject'; type SignType = '+' | '-'; type MethodType = 'absolute' | 'relative'; diff --git a/packages/react-ui/lib/styles/ColorObject.ts b/packages/react-ui/lib/styles/ColorObject.ts index 8c08e610e4a..4127d8ef272 100644 --- a/packages/react-ui/lib/styles/ColorObject.ts +++ b/packages/react-ui/lib/styles/ColorObject.ts @@ -1,7 +1,7 @@ import warning from 'warning'; import { clamp, roundToPrecision } from './ColorHelpers'; -import { ColorKeywords } from './ColorKeywords'; +import type { ColorKeywords } from './ColorKeywords'; export type RGBTuple = [number, number, number]; export type ColorKeywordsType = keyof typeof ColorKeywords; diff --git a/packages/react-ui/lib/taskWithDelayAndMinimalDuration.ts b/packages/react-ui/lib/taskWithDelayAndMinimalDuration.ts index be6b5990488..fafbe3fc801 100644 --- a/packages/react-ui/lib/taskWithDelayAndMinimalDuration.ts +++ b/packages/react-ui/lib/taskWithDelayAndMinimalDuration.ts @@ -1,4 +1,5 @@ -import { globalObject, SafeTimer } from '@skbkontur/global-object'; +import type { SafeTimer } from '@skbkontur/global-object'; +import { globalObject } from '@skbkontur/global-object'; export interface TaskWithDelayAndMinimalDurationProps { delayBeforeTaskStart: number; diff --git a/packages/react-ui/lib/theming/AnimationKeyframes.ts b/packages/react-ui/lib/theming/AnimationKeyframes.ts index 38e4c396f9f..7d2f5d963d1 100644 --- a/packages/react-ui/lib/theming/AnimationKeyframes.ts +++ b/packages/react-ui/lib/theming/AnimationKeyframes.ts @@ -1,5 +1,5 @@ import { keyframes } from './Emotion'; -import { Theme } from './Theme'; +import type { Theme } from './Theme'; export const AnimationKeyframes = { spinnerCircleOffset() { diff --git a/packages/react-ui/lib/theming/Emotion.ts b/packages/react-ui/lib/theming/Emotion.ts index 8d66e3141d0..3c77a3a5092 100644 --- a/packages/react-ui/lib/theming/Emotion.ts +++ b/packages/react-ui/lib/theming/Emotion.ts @@ -3,9 +3,9 @@ import extraScopePlugin from 'stylis-plugin-extra-scope'; import { globalObject } from '@skbkontur/global-object'; import { Upgrade } from '../Upgrades'; -import { AnyObject, FunctionWithParams } from '../utils'; +import type { AnyObject, FunctionWithParams } from '../utils'; -import { Theme } from './Theme'; +import type { Theme } from './Theme'; const REACT_UI_PREFIX = Upgrade.getSpecificityClassName(); diff --git a/packages/react-ui/lib/theming/Theme.ts b/packages/react-ui/lib/theming/Theme.ts index edc85faf5d8..be7ca04acc5 100644 --- a/packages/react-ui/lib/theming/Theme.ts +++ b/packages/react-ui/lib/theming/Theme.ts @@ -1,4 +1,4 @@ -import { BasicLightTheme } from '../../internal/themes/BasicLightTheme'; +import type { BasicLightTheme } from '../../internal/themes/BasicLightTheme'; export type Theme = Readonly; export type ThemeIn = Partial; diff --git a/packages/react-ui/lib/theming/ThemeFactory.ts b/packages/react-ui/lib/theming/ThemeFactory.ts index f344c787beb..3a1845bdfa5 100644 --- a/packages/react-ui/lib/theming/ThemeFactory.ts +++ b/packages/react-ui/lib/theming/ThemeFactory.ts @@ -1,7 +1,8 @@ import { BasicLightTheme } from '../../internal/themes/BasicLightTheme'; -import { isNonNullable, NoInfer } from '../utils'; +import type { NoInfer } from '../utils'; +import { isNonNullable } from '../utils'; -import { Theme, ThemeIn } from './Theme'; +import type { Theme, ThemeIn } from './Theme'; import { findPropertyDescriptor, REACT_UI_THEME_MARKERS } from './ThemeHelpers'; export class ThemeFactory { diff --git a/packages/react-ui/lib/theming/ThemeHelpers.ts b/packages/react-ui/lib/theming/ThemeHelpers.ts index a1949a2b680..d10a3c36095 100644 --- a/packages/react-ui/lib/theming/ThemeHelpers.ts +++ b/packages/react-ui/lib/theming/ThemeHelpers.ts @@ -1,6 +1,6 @@ import { isNonNullable } from '../utils'; -import { Theme, ThemeIn } from './Theme'; +import type { Theme, ThemeIn } from './Theme'; export type Marker = (theme: Readonly) => Readonly; export type Markers = Marker[]; diff --git a/packages/react-ui/lib/theming/__tests__/Theming-test.tsx b/packages/react-ui/lib/theming/__tests__/Theming-test.tsx index 0041164b018..28349d8ccd7 100644 --- a/packages/react-ui/lib/theming/__tests__/Theming-test.tsx +++ b/packages/react-ui/lib/theming/__tests__/Theming-test.tsx @@ -2,11 +2,12 @@ import { render } from '@testing-library/react'; import React from 'react'; import { ThemeContext } from '../ThemeContext'; -import { applyMarkers, exposeGetters, Marker, REACT_UI_THEME_MARKERS } from '../ThemeHelpers'; +import type { Marker } from '../ThemeHelpers'; +import { applyMarkers, exposeGetters, REACT_UI_THEME_MARKERS } from '../ThemeHelpers'; import { ThemeFactory } from '../ThemeFactory'; -import { Theme } from '../Theme'; +import type { Theme } from '../Theme'; import { BasicLightThemeInternal, BasicLightTheme } from '../../../internal/themes/BasicLightTheme'; -import { AnyObject } from '../../utils'; +import type { AnyObject } from '../../utils'; const TEST_MARKERS = { test: { diff --git a/packages/react-ui/lib/types/polymorphic-component.ts b/packages/react-ui/lib/types/polymorphic-component.ts index fc8a5489580..e8800588f7a 100644 --- a/packages/react-ui/lib/types/polymorphic-component.ts +++ b/packages/react-ui/lib/types/polymorphic-component.ts @@ -1,6 +1,6 @@ -import React from 'react'; +import type React from 'react'; -import { Merge } from '../../typings/utility-types'; +import type { Merge } from '../../typings/utility-types'; type PropsWithComponent = P & { /** diff --git a/packages/react-ui/lib/utils.ts b/packages/react-ui/lib/utils.ts index f2fb265f1aa..8f49724f620 100644 --- a/packages/react-ui/lib/utils.ts +++ b/packages/react-ui/lib/utils.ts @@ -2,11 +2,11 @@ import React from 'react'; import { isForwardRef } from 'react-is'; import { globalObject, isBrowser } from '@skbkontur/global-object'; -import { CurrencyInputProps } from '../components/CurrencyInput'; -import { PasswordInputProps } from '../components/PasswordInput'; -import { InputProps } from '../components/Input'; -import { AutocompleteProps } from '../components/Autocomplete'; -import { FxInputProps } from '../components/FxInput'; +import type { CurrencyInputProps } from '../components/CurrencyInput'; +import type { PasswordInputProps } from '../components/PasswordInput'; +import type { InputProps } from '../components/Input'; +import type { AutocompleteProps } from '../components/Autocomplete'; +import type { FxInputProps } from '../components/FxInput'; // NOTE: Copy-paste from @types/react export type Defaultize = P extends any diff --git a/packages/react-ui/lib/withClassWrapper.tsx b/packages/react-ui/lib/withClassWrapper.tsx index 8751adaae0a..bd5a50f64c7 100644 --- a/packages/react-ui/lib/withClassWrapper.tsx +++ b/packages/react-ui/lib/withClassWrapper.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { ReactUIComponentWithRef } from './forwardRefAndName'; +import type { ReactUIComponentWithRef } from './forwardRefAndName'; import { getDisplayName } from './getDisplayName'; const removePostfix = (word: string, postfixRegex: RegExp) => {