= {
+ 'bottom left': cls.optionsBottomLeft,
+ 'bottom right': cls.optionsBottomRight,
+ 'top right': cls.optionsTopRight,
+ 'top left': cls.optionsTopLeft,
+};
diff --git a/src/shared/ui/redesigned/Popups/styles/popup.module.scss b/src/shared/ui/redesigned/Popups/styles/popup.module.scss
new file mode 100644
index 0000000..bf76f25
--- /dev/null
+++ b/src/shared/ui/redesigned/Popups/styles/popup.module.scss
@@ -0,0 +1,46 @@
+.popup {
+ position: relative;
+}
+
+.menu {
+ border-radius: 18px;
+ border: 1px solid var(--accent-redesigned);
+ overflow: hidden;
+}
+
+.trigger {
+ background: none;
+ outline: none;
+ margin: 0;
+ padding: 0;
+ border: none;
+ cursor: pointer;
+}
+
+.active {
+ background: var(--light-bg-redesigned);
+}
+
+.optionsBottomLeft {
+ top: 100%;
+ right: 0;
+}
+
+.optionsBottomRight {
+ top: 100%;
+ left: 0;
+}
+
+.optionsTopRight {
+ bottom: 100%;
+ left: 0;
+}
+
+.optionsTopLeft {
+ right: 0;
+ bottom: 100%;
+}
+
+.disabled {
+ opacity: 0.7;
+}
diff --git a/src/shared/ui/redesigned/Popups/ui/Dropdown/Dropdown.module.scss b/src/shared/ui/redesigned/Popups/ui/Dropdown/Dropdown.module.scss
new file mode 100644
index 0000000..b77f9e5
--- /dev/null
+++ b/src/shared/ui/redesigned/Popups/ui/Dropdown/Dropdown.module.scss
@@ -0,0 +1,17 @@
+.menu {
+ background: var(--dark-bg-redesigned);
+ position: absolute;
+ z-index: 10000;
+ flex-direction: column;
+ display: flex;
+}
+
+.item {
+ padding: 10px 25px;
+ width: 100%;
+ border: none;
+ background: none;
+ outline: none;
+ color: var(--text-redesigned);
+ cursor: pointer;
+}
diff --git a/src/shared/ui/redesigned/Popups/ui/Dropdown/Dropdown.stories.tsx b/src/shared/ui/redesigned/Popups/ui/Dropdown/Dropdown.stories.tsx
new file mode 100644
index 0000000..4c8f2ac
--- /dev/null
+++ b/src/shared/ui/redesigned/Popups/ui/Dropdown/Dropdown.stories.tsx
@@ -0,0 +1,36 @@
+import React from 'react';
+import { ComponentStory, ComponentMeta } from '@storybook/react';
+
+import { Button } from '../../../Button/Button';
+import { Dropdown } from './Dropdown';
+
+export default {
+ title: 'shared/Dropdown',
+ component: Dropdown,
+ argTypes: {
+ backgroundColor: { control: 'color' },
+ },
+} as ComponentMeta
;
+
+const Template: ComponentStory = (args) => (
+
+);
+
+export const Basic = Template.bind({});
+Basic.args = {
+ items: [
+ { content: 'Option 1', onClick: () => {} },
+ { content: 'Option 2', onClick: () => {} },
+ {
+ content: 'Option 3',
+ onClick: () => {},
+ disabled: true,
+ },
+ {
+ content: 'Option 4',
+ onClick: () => {},
+ href: 'https://google.com',
+ },
+ ],
+ trigger: ,
+};
diff --git a/src/shared/ui/redesigned/Popups/ui/Dropdown/Dropdown.tsx b/src/shared/ui/redesigned/Popups/ui/Dropdown/Dropdown.tsx
new file mode 100644
index 0000000..5918e87
--- /dev/null
+++ b/src/shared/ui/redesigned/Popups/ui/Dropdown/Dropdown.tsx
@@ -0,0 +1,79 @@
+import { Menu } from '@headlessui/react';
+import { Fragment, ReactNode } from 'react';
+import { classNames } from '@/shared/lib/classNames/classNames';
+import { DropDownDirection } from '@/shared/types/ui';
+import { mapDirectionClass } from '../../styles/consts';
+import { AppLink } from '../../../AppLink/AppLink';
+import cls from './Dropdown.module.scss';
+import popupCls from '../../styles/popup.module.scss';
+
+export interface DropdownItem {
+ disabled?: boolean;
+ content?: ReactNode;
+ onClick?: () => void;
+ href?: string;
+}
+
+interface DropdownProps {
+ className?: string;
+ items: DropdownItem[];
+ direction?: DropDownDirection;
+ trigger: ReactNode;
+}
+
+export function Dropdown(props: DropdownProps) {
+ const { className, trigger, items, direction = 'bottom right' } = props;
+
+ const menuClasses = [mapDirectionClass[direction], popupCls.menu];
+
+ return (
+
+ );
+}
diff --git a/src/shared/ui/redesigned/Popups/ui/ListBox/ListBox.module.scss b/src/shared/ui/redesigned/Popups/ui/ListBox/ListBox.module.scss
new file mode 100644
index 0000000..ca4d8a0
--- /dev/null
+++ b/src/shared/ui/redesigned/Popups/ui/ListBox/ListBox.module.scss
@@ -0,0 +1,19 @@
+.trigger {
+ background: none;
+ border: none;
+ outline: none;
+ padding: 0;
+ margin: 0;
+}
+
+.options {
+ background: var(--dark-bg-redesigned-bg);
+ position: absolute;
+ z-index: 10000;
+ border-radius: 12px;
+ box-shadow: 4px 4px 8px var(--dark-bg-redesigned);
+}
+
+.item {
+ padding: 10px 20px;
+}
diff --git a/src/shared/ui/redesigned/Popups/ui/ListBox/ListBox.stories.tsx b/src/shared/ui/redesigned/Popups/ui/ListBox/ListBox.stories.tsx
new file mode 100644
index 0000000..9b357cc
--- /dev/null
+++ b/src/shared/ui/redesigned/Popups/ui/ListBox/ListBox.stories.tsx
@@ -0,0 +1,75 @@
+import React from 'react';
+import { ComponentStory, ComponentMeta } from '@storybook/react';
+
+import { action } from '@storybook/addon-actions';
+// eslint-disable-next-line paths-fixes/layer-imports
+import { Country } from '@/entities/Country';
+import { ListBox } from './ListBox';
+
+export default {
+ title: 'shared/ListBox',
+ component: ListBox,
+ argTypes: {
+ backgroundColor: { control: 'color' },
+ },
+ decorators: [(story) => {story()}
],
+} as ComponentMeta;
+
+const Template: ComponentStory = (args) => (
+
+);
+
+const items = [
+ { value: Country.Armenia, content: Country.Armenia },
+ { value: Country.Ukraine, content: Country.Ukraine },
+ { value: Country.Belarus, content: Country.Belarus },
+ { value: Country.Kazakhstan, content: Country.Kazakhstan },
+ { value: Country.Russia, content: Country.Russia },
+];
+
+export const Default = Template.bind({});
+Default.args = {
+ items,
+ onChange: action('onChange'),
+ defaultValue: 'defaultValues',
+};
+
+export const ReadOnly = Template.bind({});
+ReadOnly.args = {
+ items,
+ value: 'item1',
+ onChange: action('onChange'),
+ readonly: true,
+};
+
+export const TopRightDirection = Template.bind({});
+TopRightDirection.args = {
+ items,
+ value: 'item1',
+ onChange: action('onChange'),
+ direction: 'top right',
+};
+
+export const TopLeftDirection = Template.bind({});
+TopLeftDirection.args = {
+ items,
+ value: 'item1',
+ onChange: action('onChange'),
+ direction: 'top left',
+};
+
+export const BottomLeftDirection = Template.bind({});
+BottomLeftDirection.args = {
+ items,
+ value: 'item1',
+ onChange: action('onChange'),
+ direction: 'bottom left',
+};
+
+export const BottomRightDirection = Template.bind({});
+BottomRightDirection.args = {
+ items,
+ value: 'item1',
+ onChange: action('onChange'),
+ direction: 'bottom right',
+};
diff --git a/src/shared/ui/redesigned/Popups/ui/ListBox/ListBox.tsx b/src/shared/ui/redesigned/Popups/ui/ListBox/ListBox.tsx
new file mode 100644
index 0000000..76f9259
--- /dev/null
+++ b/src/shared/ui/redesigned/Popups/ui/ListBox/ListBox.tsx
@@ -0,0 +1,88 @@
+import { Fragment, memo, ReactNode } from 'react';
+import { Listbox as HListBox } from '@headlessui/react';
+import { classNames } from '@/shared/lib/classNames/classNames';
+import { DropDownDirection } from '@/shared/types/ui';
+import popupCls from '../../styles/popup.module.scss';
+import { mapDirectionClass } from '../../styles/consts';
+import { Button } from '../../../Button/Button';
+import cls from './ListBox.module.scss';
+import { HStack } from '../../../../redesigned/Stack';
+
+export interface ListBoxItems {
+ value: string;
+ content: ReactNode;
+ disabled?: boolean;
+}
+
+interface ListBoxProps {
+ items: ListBoxItems[];
+ className?: string;
+ value?: string;
+ defaultValue?: string;
+ onChange: (value: T) => void;
+ readonly?: boolean;
+ direction?: DropDownDirection;
+ label?: string;
+}
+
+export const ListBox = memo((props: ListBoxProps) => {
+ const {
+ className,
+ items,
+ value,
+ onChange,
+ defaultValue,
+ readonly,
+ direction = 'bottom right',
+ label,
+ } = props;
+
+ const optionsClasses = [mapDirectionClass[direction], popupCls.menu];
+
+ return (
+
+ {label && {`${label}>`}}
+
+
+
+
+
+ {items.map((item) => (
+
+ {({ active, selected }) => (
+
+ {item.content}
+
+ )}
+
+ ))}
+
+
+
+ );
+});
diff --git a/src/shared/ui/redesigned/Popups/ui/Popover/Popover.module.scss b/src/shared/ui/redesigned/Popups/ui/Popover/Popover.module.scss
new file mode 100644
index 0000000..b34aabd
--- /dev/null
+++ b/src/shared/ui/redesigned/Popups/ui/Popover/Popover.module.scss
@@ -0,0 +1,7 @@
+.panel {
+ background: var(--dark-bg-redesigned);
+ position: absolute;
+ z-index: 10000;
+ border-radius: 8px;
+ padding: 15px;
+}
diff --git a/src/shared/ui/redesigned/Popups/ui/Popover/Popover.stories.tsx b/src/shared/ui/redesigned/Popups/ui/Popover/Popover.stories.tsx
new file mode 100644
index 0000000..e3c2a79
--- /dev/null
+++ b/src/shared/ui/redesigned/Popups/ui/Popover/Popover.stories.tsx
@@ -0,0 +1,22 @@
+import React from 'react';
+import { ComponentStory, ComponentMeta } from '@storybook/react';
+
+import { Popover } from './Popover';
+
+export default {
+ title: 'shared/Popover',
+ component: Popover,
+ argTypes: {
+ backgroundColor: { control: 'color' },
+ },
+} as ComponentMeta;
+
+const Template: ComponentStory = (args) => (
+
+);
+
+export const Normal = Template.bind({});
+Normal.args = {
+ trigger: ,
+ children: Popover content
,
+};
diff --git a/src/shared/ui/redesigned/Popups/ui/Popover/Popover.tsx b/src/shared/ui/redesigned/Popups/ui/Popover/Popover.tsx
new file mode 100644
index 0000000..d560e3d
--- /dev/null
+++ b/src/shared/ui/redesigned/Popups/ui/Popover/Popover.tsx
@@ -0,0 +1,34 @@
+import { memo, ReactNode } from 'react';
+import { Popover as HPopover } from '@headlessui/react';
+import { DropDownDirection } from '@/shared/types/ui';
+import { classNames } from '@/shared/lib/classNames/classNames';
+import { mapDirectionClass } from '../../styles/consts';
+import popupCls from '../../styles/popup.module.scss';
+import cls from './Popover.module.scss';
+
+interface PopoverProps {
+ className?: string;
+ direction?: DropDownDirection;
+ trigger: ReactNode;
+ children: ReactNode;
+}
+
+export const Popover = memo((props: PopoverProps) => {
+ const { className, trigger, direction = 'bottom right', children } = props;
+
+ const menuClasses = [mapDirectionClass[direction], popupCls.menu];
+
+ return (
+
+
+ {trigger}
+
+
+
+ {children}
+
+
+ );
+});
diff --git a/src/shared/ui/deprecated/Portal/Portal.tsx b/src/shared/ui/redesigned/Portal/Portal.tsx
similarity index 69%
rename from src/shared/ui/deprecated/Portal/Portal.tsx
rename to src/shared/ui/redesigned/Portal/Portal.tsx
index 59eb6ea..880506c 100644
--- a/src/shared/ui/deprecated/Portal/Portal.tsx
+++ b/src/shared/ui/redesigned/Portal/Portal.tsx
@@ -8,9 +8,6 @@ interface PortalProps {
export const Portal = (props: PortalProps) => {
const { children, element = document.body } = props;
- /**
- * Устарел, используем новые компоненты из папки redesigned
- * @deprecated
- */
+
return createPortal(children, element);
};
diff --git a/src/shared/ui/deprecated/Portal/index.ts b/src/shared/ui/redesigned/Portal/index.ts
similarity index 100%
rename from src/shared/ui/deprecated/Portal/index.ts
rename to src/shared/ui/redesigned/Portal/index.ts
diff --git a/src/shared/ui/redesigned/Skeleton/Skeleton.module.scss b/src/shared/ui/redesigned/Skeleton/Skeleton.module.scss
new file mode 100644
index 0000000..41d6076
--- /dev/null
+++ b/src/shared/ui/redesigned/Skeleton/Skeleton.module.scss
@@ -0,0 +1,29 @@
+.Skeleton {
+ width: 100%;
+ height: 50px;
+ position: relative;
+ box-shadow: 0 2px 10px 0 var(--skeleton-shadow);
+ overflow: hidden;
+
+ &::before {
+ content: "";
+ display: block;
+ position: absolute;
+ left: -150px;
+ top: 0;
+ height: 100%;
+ width: 80%;
+ background: linear-gradient(to right, transparent 0%, var(--skeleton-color) 50%, transparent 100%);
+ animation: load 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
+ }
+}
+
+@keyframes load {
+ from {
+ left: -150px;
+ }
+
+ to {
+ left: 100%;
+ }
+}
diff --git a/src/shared/ui/redesigned/Skeleton/Skeleton.stories.tsx b/src/shared/ui/redesigned/Skeleton/Skeleton.stories.tsx
new file mode 100644
index 0000000..df29654
--- /dev/null
+++ b/src/shared/ui/redesigned/Skeleton/Skeleton.stories.tsx
@@ -0,0 +1,43 @@
+import React from 'react';
+import { ComponentMeta, ComponentStory } from '@storybook/react';
+
+import { ThemeDecorator } from '@/shared/config/storybook/ThemeDecorator/ThemeDecorator';
+import { Skeleton } from './Skeleton';
+import { Theme } from '@/shared/const/theme';
+
+export default {
+ title: 'shared/Skeleton',
+ component: Skeleton,
+ argTypes: {
+ backgroundColor: { control: 'color' },
+ },
+} as ComponentMeta;
+
+const Template: ComponentStory = (args) => (
+
+);
+
+export const Normal = Template.bind({});
+Normal.args = {
+ width: '100%',
+ height: 200,
+};
+export const Circle = Template.bind({});
+Circle.args = {
+ border: '50%',
+ width: 100,
+ height: 100,
+};
+export const NormalDark = Template.bind({});
+NormalDark.args = {
+ width: '100%',
+ height: 200,
+};
+NormalDark.decorators = [ThemeDecorator(Theme.DARK)];
+export const CircleDark = Template.bind({});
+CircleDark.args = {
+ border: '50%',
+ width: 100,
+ height: 100,
+};
+CircleDark.decorators = [ThemeDecorator(Theme.DARK)];
diff --git a/src/shared/ui/redesigned/Skeleton/Skeleton.tsx b/src/shared/ui/redesigned/Skeleton/Skeleton.tsx
new file mode 100644
index 0000000..bddfddd
--- /dev/null
+++ b/src/shared/ui/redesigned/Skeleton/Skeleton.tsx
@@ -0,0 +1,27 @@
+import { CSSProperties, memo } from 'react';
+import { classNames } from '@/shared/lib/classNames/classNames';
+import cls from './Skeleton.module.scss';
+
+interface SkeletonProps {
+ className?: string;
+ height?: string | number;
+ width?: string | number;
+ border?: string;
+}
+
+export const Skeleton = memo((props: SkeletonProps) => {
+ const { border, height, width, className } = props;
+
+ const styles: CSSProperties = {
+ width,
+ height,
+ borderRadius: border,
+ };
+
+ return (
+
+ );
+});
diff --git a/src/shared/ui/redesigned/Skeleton/index.ts b/src/shared/ui/redesigned/Skeleton/index.ts
new file mode 100644
index 0000000..66bc08d
--- /dev/null
+++ b/src/shared/ui/redesigned/Skeleton/index.ts
@@ -0,0 +1 @@
+export * from './Skeleton';
diff --git a/src/shared/ui/deprecated/Stack/Flex/Flex.module.scss b/src/shared/ui/redesigned/Stack/Flex/Flex.module.scss
similarity index 100%
rename from src/shared/ui/deprecated/Stack/Flex/Flex.module.scss
rename to src/shared/ui/redesigned/Stack/Flex/Flex.module.scss
diff --git a/src/shared/ui/deprecated/Stack/Flex/Flex.stories.tsx b/src/shared/ui/redesigned/Stack/Flex/Flex.stories.tsx
similarity index 100%
rename from src/shared/ui/deprecated/Stack/Flex/Flex.stories.tsx
rename to src/shared/ui/redesigned/Stack/Flex/Flex.stories.tsx
diff --git a/src/shared/ui/deprecated/Stack/Flex/Flex.tsx b/src/shared/ui/redesigned/Stack/Flex/Flex.tsx
similarity index 93%
rename from src/shared/ui/deprecated/Stack/Flex/Flex.tsx
rename to src/shared/ui/redesigned/Stack/Flex/Flex.tsx
index bc4782e..31fd6a8 100644
--- a/src/shared/ui/deprecated/Stack/Flex/Flex.tsx
+++ b/src/shared/ui/redesigned/Stack/Flex/Flex.tsx
@@ -69,10 +69,7 @@ export const Flex = (props: FlexProps) => {
const mods: Mods = {
[cls.max]: max,
};
- /**
- * Устарел, используем новые компоненты из папки redesigned
- * @deprecated
- */
+
return (
{children}
diff --git a/src/shared/ui/deprecated/Stack/HStack/HStack.tsx b/src/shared/ui/redesigned/Stack/HStack/HStack.tsx
similarity index 64%
rename from src/shared/ui/deprecated/Stack/HStack/HStack.tsx
rename to src/shared/ui/redesigned/Stack/HStack/HStack.tsx
index 81e227f..e88045a 100644
--- a/src/shared/ui/deprecated/Stack/HStack/HStack.tsx
+++ b/src/shared/ui/redesigned/Stack/HStack/HStack.tsx
@@ -2,10 +2,7 @@ import { memo } from 'react';
import { Flex, FlexProps } from '../Flex/Flex';
type HStackProps = Omit
;
-/**
- * Устарел, используем новые компоненты из папки redesigned
- * @deprecated
- */
+
export const HStack = memo((props: HStackProps) => (
));
diff --git a/src/shared/ui/deprecated/Stack/VStack/VStack.tsx b/src/shared/ui/redesigned/Stack/VStack/VStack.tsx
similarity index 70%
rename from src/shared/ui/deprecated/Stack/VStack/VStack.tsx
rename to src/shared/ui/redesigned/Stack/VStack/VStack.tsx
index fbf2ddb..d7a3d9b 100644
--- a/src/shared/ui/deprecated/Stack/VStack/VStack.tsx
+++ b/src/shared/ui/redesigned/Stack/VStack/VStack.tsx
@@ -2,10 +2,7 @@ import { memo } from 'react';
import { Flex, FlexProps } from '../Flex/Flex';
type VStackProps = Omit;
-/**
- * Устарел, используем новые компоненты из папки redesigned
- * @deprecated
- */
+
export const VStack = memo((props: VStackProps) => {
const { align = 'start' } = props;
return ;
diff --git a/src/shared/ui/deprecated/Stack/index.ts b/src/shared/ui/redesigned/Stack/index.ts
similarity index 100%
rename from src/shared/ui/deprecated/Stack/index.ts
rename to src/shared/ui/redesigned/Stack/index.ts
diff --git a/src/shared/ui/redesigned/Text/Text.module.scss b/src/shared/ui/redesigned/Text/Text.module.scss
new file mode 100644
index 0000000..86d2bd8
--- /dev/null
+++ b/src/shared/ui/redesigned/Text/Text.module.scss
@@ -0,0 +1,69 @@
+.title {
+ color: var(--text-redesigned);
+}
+
+.text {
+ color: var(--text-redesigned);
+}
+
+.error {
+ .title {
+ color: var(--red-light);
+ }
+
+ .text {
+ color: var(--red-dark);
+ }
+}
+
+.accent {
+ .title {
+ color: var(--accent-redesigned);
+ }
+
+ .text {
+ color: var(--accent-redesigned);
+ }
+}
+
+.left {
+ text-align: left;
+}
+
+.right {
+ text-align: right;
+}
+
+.center {
+ text-align: center;
+}
+
+.size_s {
+ .title {
+ font: var(--font-m-redesigned);
+ }
+
+ .text {
+ font: var(--font-s-redesigned);
+ }
+}
+
+.size_m {
+ .title {
+ font: var(--font-l-redesigned);
+ }
+
+ .text {
+ font: var(--font-m-redesigned);
+ }
+}
+
+.size_l {
+ .title {
+ font: var(--font-xl-redesigned);
+ }
+
+ .text {
+ font: var(--font-l-redesigned);
+ }
+}
diff --git a/src/shared/ui/redesigned/Text/Text.stories.tsx b/src/shared/ui/redesigned/Text/Text.stories.tsx
new file mode 100644
index 0000000..712efbc
--- /dev/null
+++ b/src/shared/ui/redesigned/Text/Text.stories.tsx
@@ -0,0 +1,66 @@
+import React from 'react';
+import { ComponentMeta, ComponentStory } from '@storybook/react';
+import { ThemeDecorator } from '@/shared/config/storybook/ThemeDecorator/ThemeDecorator';
+import { Text, TextSize, TextTheme } from './Text';
+import { Theme } from '@/shared/const/theme';
+
+export default {
+ title: 'shared/Text',
+ component: Text,
+ argTypes: {
+ backgroundColor: { control: 'color' },
+ },
+} as ComponentMeta;
+
+const Template: ComponentStory = (args) => ;
+
+export const Primary = Template.bind({});
+Primary.args = {
+ title: 'title title title',
+ text: 'description description description',
+};
+
+export const PrimaryDark = Template.bind({});
+PrimaryDark.args = {
+ title: 'title title title',
+ text: 'description description description',
+};
+PrimaryDark.decorators = [ThemeDecorator(Theme.DARK)];
+
+export const onlyTitle = Template.bind({});
+onlyTitle.args = {
+ title: 'onlyTitle',
+};
+
+export const onlyDescription = Template.bind({});
+onlyDescription.args = {
+ text: 'onlyDescription',
+};
+
+export const Error = Template.bind({});
+Error.args = {
+ title: 'title title title',
+ text: 'description description description',
+ theme: TextTheme.ERROR,
+};
+
+export const sizeL = Template.bind({});
+sizeL.args = {
+ title: 'title title title',
+ text: 'description description description',
+ size: TextSize.L,
+};
+
+export const sizeM = Template.bind({});
+sizeM.args = {
+ title: 'title title title',
+ text: 'description description description',
+ size: TextSize.M,
+};
+
+export const sizeS = Template.bind({});
+sizeS.args = {
+ title: 'title title title',
+ text: 'description description description',
+ size: TextSize.S,
+};
diff --git a/src/shared/ui/redesigned/Text/Text.tsx b/src/shared/ui/redesigned/Text/Text.tsx
new file mode 100644
index 0000000..bbd5ae7
--- /dev/null
+++ b/src/shared/ui/redesigned/Text/Text.tsx
@@ -0,0 +1,69 @@
+import { memo } from 'react';
+import { classNames } from '@/shared/lib/classNames/classNames';
+import cls from './Text.module.scss';
+
+export type TextVariant = 'primary' | 'error' | 'accent';
+
+export type TextAlign = 'right' | 'left' | 'center';
+
+export type TextSize = 's' | 'm' | 'l';
+
+interface TextProps {
+ className?: string;
+ title?: string;
+ text?: string;
+ variant?: TextVariant;
+ align?: TextAlign;
+ size?: TextSize;
+
+ 'data-testid'?: string;
+}
+
+type HeaderTagType = 'h1' | 'h2' | 'h3';
+
+const mapSizeToClass: Record = {
+ s: 'size_s',
+ m: 'size_m',
+ l: 'size_l',
+};
+
+const mapSizeToHeaderTag: Record = {
+ s: 'h3',
+ m: 'h2',
+ l: 'h1',
+};
+
+export const Text = memo((props: TextProps) => {
+ const {
+ className,
+ text,
+ title,
+ variant = 'primary',
+ align = 'left',
+ size = 'm',
+ 'data-testid': dataTestId = 'Text',
+ } = props;
+
+ const HeaderTag = mapSizeToHeaderTag[size];
+ const sizeClass = mapSizeToClass[size];
+
+ const additionalClasses = [className, cls[variant], cls[align], sizeClass];
+
+ return (
+
+ {title && (
+
+ {title}
+
+ )}
+ {text && (
+
+ {text}
+
+ )}
+
+ );
+});
diff --git a/src/shared/ui/redesigned/Text/index.ts b/src/shared/ui/redesigned/Text/index.ts
new file mode 100644
index 0000000..b0c76af
--- /dev/null
+++ b/src/shared/ui/redesigned/Text/index.ts
@@ -0,0 +1 @@
+export * from './Text';
diff --git a/src/widgets/Navbar/ui/Navbar.tsx b/src/widgets/Navbar/ui/Navbar.tsx
index b071edf..bf2da6c 100644
--- a/src/widgets/Navbar/ui/Navbar.tsx
+++ b/src/widgets/Navbar/ui/Navbar.tsx
@@ -1,10 +1,10 @@
import React, { memo, useCallback, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
+import { HStack } from '@/shared/ui/redesigned/Stack';
import { Button, ButtonTheme } from '@/shared/ui/deprecated/Button';
import { AppLink, AppLinkTheme } from '@/shared/ui/deprecated/AppLink';
import { Text, TextTheme } from '@/shared/ui/deprecated/Text';
-import { HStack } from '@/shared/ui/deprecated/Stack';
import { classNames } from '@/shared/lib/classNames/classNames';
import { LoginModal } from '@/features/AuthByUsername';
import { NotificationButton } from '@/features/notificationButton';
diff --git a/src/widgets/Sidebar/ui/Sidebar/Sidebar.tsx b/src/widgets/Sidebar/ui/Sidebar/Sidebar.tsx
index c588100..03b50b5 100644
--- a/src/widgets/Sidebar/ui/Sidebar/Sidebar.tsx
+++ b/src/widgets/Sidebar/ui/Sidebar/Sidebar.tsx
@@ -1,7 +1,7 @@
import { memo, useMemo, useState } from 'react';
import { useSelector } from 'react-redux';
+import { VStack } from '@/shared/ui/redesigned/Stack';
import { Button, ButtonSize, ButtonTheme } from '@/shared/ui/deprecated/Button';
-import { VStack } from '@/shared/ui/deprecated/Stack';
import { classNames } from '@/shared/lib/classNames/classNames';
import { getSidebarItems } from '../../model/selectors/getSidebarItems';
import { SidebarItem } from '../SidebarItem/SidebarItem';