From a433a31eed1d9ba94cf99fa52d0068383fff89f9 Mon Sep 17 00:00:00 2001 From: vpsmolina Date: Mon, 20 Jan 2025 10:09:20 +0300 Subject: [PATCH] fix: update Typography --- .../components/PanelSpinner/PanelSpinner.tsx | 2 +- .../progress/components/Spinner/Loader.tsx | 2 +- .../progress/components/Spinner/Spinner.tsx | 2 +- src/shared/ui/BlockView.tsx | 4 ++-- src/shared/ui/Header.tsx | 6 ++---- src/widgets/Chart/ui/RenderHeader.tsx | 4 ++-- src/widgets/Chart/ui/RenderSectionItem.tsx | 4 ++-- .../Core/Controls/ui/ControlListWidget.tsx | 19 +++++++++---------- src/widgets/Core/Controls/ui/SliderWidget.tsx | 15 +++++++-------- src/widgets/Core/Controls/ui/SwipeWidget.tsx | 4 ++-- src/widgets/Core/Other/ui/AvatarWidget.tsx | 14 +++++++------- src/widgets/Core/Other/ui/BadgeWidget.tsx | 6 +++--- src/widgets/Core/Other/ui/CarouselWidget.tsx | 10 +++++----- .../Core/Other/ui/CollapsibleWidget.tsx | 6 +++--- src/widgets/Core/Other/ui/DotsWidget.tsx | 10 +++++----- src/widgets/Core/Other/ui/StatusWidget.tsx | 6 +++--- .../Core/Popup/ui/ActionSheetWidget.tsx | 6 ++---- src/widgets/Core/Popup/ui/ModalsWidget.tsx | 4 ++-- src/widgets/Core/Popup/ui/PopupBaseWidget.tsx | 4 ++-- src/widgets/Core/Popup/ui/SnackbarWidget.tsx | 4 ++-- src/widgets/Core/Popup/ui/TooltipWidget.tsx | 7 ++++--- .../Core/Progress/ui/IndicatorWidget.tsx | 14 ++++++++++---- .../Core/Progress/ui/PanelSpinnerWidget.tsx | 19 ++++++------------- src/widgets/Core/Styles/ui/ShadowWidget.tsx | 8 ++++---- .../Core/Styles/ui/SimpleIconWidget.tsx | 4 ++-- src/widgets/KeyboardAware/Bottom.tsx | 10 ++-------- 26 files changed, 91 insertions(+), 103 deletions(-) diff --git a/packages/core/src/progress/components/PanelSpinner/PanelSpinner.tsx b/packages/core/src/progress/components/PanelSpinner/PanelSpinner.tsx index ca5bec8fe..838c0b8f1 100644 --- a/packages/core/src/progress/components/PanelSpinner/PanelSpinner.tsx +++ b/packages/core/src/progress/components/PanelSpinner/PanelSpinner.tsx @@ -33,7 +33,7 @@ const PanelSpinner: FC = props => { ); diff --git a/packages/core/src/progress/components/Spinner/Loader.tsx b/packages/core/src/progress/components/Spinner/Loader.tsx index 96f6d663f..bf40b27d7 100644 --- a/packages/core/src/progress/components/Spinner/Loader.tsx +++ b/packages/core/src/progress/components/Spinner/Loader.tsx @@ -35,7 +35,7 @@ const Loader: FC = props => { } }; - return getSize(fill || colors.ElementBase); + return getSize(fill || colors.ElementAccent); }; export default Loader; diff --git a/packages/core/src/progress/components/Spinner/Spinner.tsx b/packages/core/src/progress/components/Spinner/Spinner.tsx index b0408f18a..3d0e61886 100644 --- a/packages/core/src/progress/components/Spinner/Spinner.tsx +++ b/packages/core/src/progress/components/Spinner/Spinner.tsx @@ -34,7 +34,7 @@ const Spinner: FC = props => { return ( - + ); }; diff --git a/src/shared/ui/BlockView.tsx b/src/shared/ui/BlockView.tsx index 1a0b32954..be927c525 100644 --- a/src/shared/ui/BlockView.tsx +++ b/src/shared/ui/BlockView.tsx @@ -1,4 +1,4 @@ -import {createStyles, TypographyLegacy, useStyles, View} from '@/shared/ui'; +import {createStyles, Typography, useStyles, View} from '@/shared/ui'; export const BlockView = ({ item, @@ -23,7 +23,7 @@ export const BlockView = ({ backgroundColor: backgroundColor || colors.BgAccent, }, ]}> - {item} + {item} ); }; diff --git a/src/shared/ui/Header.tsx b/src/shared/ui/Header.tsx index 6fc7b567b..297e92967 100644 --- a/src/shared/ui/Header.tsx +++ b/src/shared/ui/Header.tsx @@ -1,11 +1,9 @@ import {FC} from 'react'; -import {TypographyLegacy} from '@/shared/ui'; +import {Title} from '@/shared/ui'; const Header: FC<{title: string}> = ({title}) => { - return ( - {title} - ); + return {title}; }; export default Header; diff --git a/src/widgets/Chart/ui/RenderHeader.tsx b/src/widgets/Chart/ui/RenderHeader.tsx index 57f949051..6c1c33bad 100644 --- a/src/widgets/Chart/ui/RenderHeader.tsx +++ b/src/widgets/Chart/ui/RenderHeader.tsx @@ -1,7 +1,7 @@ import Animated, {useAnimatedProps} from 'react-native-reanimated'; import {TextInput} from 'react-native'; -import {IRenderHeader, TypographyLegacy, useFontBody, View} from '@/shared/ui'; +import {IRenderHeader, Typography, useFontBody, View} from '@/shared/ui'; interface IRenderHeaderProps { header: Parameters[number]; @@ -36,7 +36,7 @@ const RenderHeader = ({header}: IRenderHeaderProps) => { underlineColorAndroid="transparent" style={fontStyle} /> - Last record + Last record { return ( - {period} + {period} ); }; diff --git a/src/widgets/Core/Controls/ui/ControlListWidget.tsx b/src/widgets/Core/Controls/ui/ControlListWidget.tsx index 82e90c10b..4348c8f3d 100644 --- a/src/widgets/Core/Controls/ui/ControlListWidget.tsx +++ b/src/widgets/Core/Controls/ui/ControlListWidget.tsx @@ -5,7 +5,8 @@ import { ControlsList, createStyles, Radio, - TypographyLegacy, + Title, + Typography, useStyles, View, } from '@/shared/ui'; @@ -18,36 +19,34 @@ export const ControlListWidget = () => { return ( - - ControlsList - + ControlsList - checkbox + checkbox - option one + option one - option two + option two - radio + radio - option one + option one - option two + option two diff --git a/src/widgets/Core/Controls/ui/SliderWidget.tsx b/src/widgets/Core/Controls/ui/SliderWidget.tsx index b5af916b4..91fe7a632 100644 --- a/src/widgets/Core/Controls/ui/SliderWidget.tsx +++ b/src/widgets/Core/Controls/ui/SliderWidget.tsx @@ -3,7 +3,8 @@ import {useState} from 'react'; import { createStyles, Slider, - TypographyLegacy, + Title, + Typography, useStyles, View, } from '@/shared/ui'; @@ -15,9 +16,9 @@ export const SliderWidget = () => { const [low, setLow] = useState(0); return ( - Slider + Slider - default + default { setRange({low, high}); }} /> - {`Low: ${range.low} High: ${range.high} Step: ${5}`} + {`Low: ${range.low} High: ${range.high} Step: ${5}`} - - disableRange - + disableRange { setLow(low); }} /> - {`Low: ${low} Step: ${1}`} + {`Low: ${low} Step: ${1}`} ); diff --git a/src/widgets/Core/Controls/ui/SwipeWidget.tsx b/src/widgets/Core/Controls/ui/SwipeWidget.tsx index e8ecb280f..437007631 100644 --- a/src/widgets/Core/Controls/ui/SwipeWidget.tsx +++ b/src/widgets/Core/Controls/ui/SwipeWidget.tsx @@ -1,12 +1,12 @@ import {useState} from 'react'; -import {Swipe, TypographyLegacy, View} from '@/shared/ui'; +import {Swipe, Title, View} from '@/shared/ui'; export const SwipeWidget = () => { const [active, setActive] = useState(false); return ( - Swipe + Swipe ); diff --git a/src/widgets/Core/Other/ui/AvatarWidget.tsx b/src/widgets/Core/Other/ui/AvatarWidget.tsx index a83508fa5..349ec4bbf 100644 --- a/src/widgets/Core/Other/ui/AvatarWidget.tsx +++ b/src/widgets/Core/Other/ui/AvatarWidget.tsx @@ -8,7 +8,7 @@ import { ICounterTypes, IIndicatorTypes, IStatusTypes, - TypographyLegacy, + Typography, useStyles, View, } from '@/shared/ui'; @@ -28,13 +28,13 @@ export const AvatarWidget = () => {
- {'Content'} + {'Content'} - {'State'} + {'State'} { disabled={true} /> - {'Size'} + {'Size'} - {'Badge'} + {'Badge'} { }} /> - {'Badge counter'} + {'Badge counter'} { }} /> - {'Group'} + {'Group'} {
- {'BadgeIndicator'} + {'BadgeIndicator'} - {'Counter'} + {'Counter'} { return (
- Carousel + Carousel } @@ -29,14 +29,14 @@ export const CarouselWidget = () => { sideMargin={2} keyExtractor={item => item.toString()} /> - LoopCarousel + LoopCarousel } itemWidth={ITEM_WIDTH} sideMargin={2} /> - AutoCarousel + AutoCarousel } @@ -44,7 +44,7 @@ export const CarouselWidget = () => { sideMargin={2} keyExtractor={item => item.toString()} /> - AutoLoopCarousel + AutoLoopCarousel } diff --git a/src/widgets/Core/Other/ui/CollapsibleWidget.tsx b/src/widgets/Core/Other/ui/CollapsibleWidget.tsx index fd23be94b..4bd3d8e5a 100644 --- a/src/widgets/Core/Other/ui/CollapsibleWidget.tsx +++ b/src/widgets/Core/Other/ui/CollapsibleWidget.tsx @@ -1,7 +1,7 @@ import { Collapsible, createStyles, - TypographyLegacy, + Typography, useStyles, View, } from '@/shared/ui'; @@ -15,10 +15,10 @@ export const CollapsibleWidget = () => {
- + Component to wrap content in Collapsible element with trigger to open and close - + diff --git a/src/widgets/Core/Other/ui/DotsWidget.tsx b/src/widgets/Core/Other/ui/DotsWidget.tsx index 92f2ca175..47956e5e4 100644 --- a/src/widgets/Core/Other/ui/DotsWidget.tsx +++ b/src/widgets/Core/Other/ui/DotsWidget.tsx @@ -4,7 +4,7 @@ import { createStyles, Dots, TouchableOpacity, - TypographyLegacy, + Typography, useStyles, View, } from '@/shared/ui'; @@ -32,15 +32,15 @@ export const DotsWidget = () => {
- + Press me to decrease dot - + - + Press me to increase dot - + diff --git a/src/widgets/Core/Other/ui/StatusWidget.tsx b/src/widgets/Core/Other/ui/StatusWidget.tsx index d54335bbd..aca0518a7 100644 --- a/src/widgets/Core/Other/ui/StatusWidget.tsx +++ b/src/widgets/Core/Other/ui/StatusWidget.tsx @@ -3,7 +3,7 @@ import { IStatusState, IStatusType, Status, - TypographyLegacy, + Typography, useStyles, View, } from '@/shared/ui'; @@ -16,7 +16,7 @@ export const StatusWidget = () => {
- Dot + Dot @@ -24,7 +24,7 @@ export const StatusWidget = () => { - Tag + Tag { const {openPopup} = usePopups(); return ( - - ActionSheet - + ActionSheet