diff --git a/packages/plasma-hope/src/components/Progress/Progress.tsx b/packages/plasma-hope/src/components/Progress/Progress.tsx deleted file mode 100644 index 1c30646da1..0000000000 --- a/packages/plasma-hope/src/components/Progress/Progress.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import React from 'react'; -import styled, { css } from 'styled-components'; -import { caption, tertiary, surfaceLiquid02, accent } from '@salutejs/plasma-core'; - -const statuses = { - success: css` - background-color: #09a552; - `, - warning: css` - background-color: #ee6820; - `, - error: css` - background-color: #df2638; - `, - accent: css` - background-color: ${accent}; - `, -}; - -export interface ProgressProps { - /** - * Значение прогресса в процентах. - */ - value: number; - /** - * Статус прогресса. - */ - status?: keyof typeof statuses; - /** - * Отображать числовое значение прогресса. - */ - displayValue?: boolean; -} - -const StyledRoot = styled.div` - display: flex; - align-items: center; -`; -const StyledTrack = styled.div` - width: 100%; - height: 0.25rem; - - background-color: ${surfaceLiquid02}; - border-radius: 0.125rem; -`; -const StyledProgress = styled.div>` - width: ${({ value }) => value}%; - height: 100%; - - ${({ status }) => status && statuses[status]} - - border-radius: 0.125rem; -`; -const StyledValue = styled.span` - ${caption}; - - margin-left: 0.5rem; - - color: ${tertiary}; -`; - -/** - * Компонент для отображения прогресса в процентах. - */ -export const Progress: React.FC = ({ value, status, displayValue = true }) => { - const min = 0; - const max = 100; - const normalizedValue = Math.max(Math.min(value, max), min); - - return ( - - - - - {displayValue && {normalizedValue}%} - - ); -}; diff --git a/packages/plasma-hope/src/components/Progress/index.ts b/packages/plasma-hope/src/components/Progress/index.ts deleted file mode 100644 index 387cdc396e..0000000000 --- a/packages/plasma-hope/src/components/Progress/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { Progress } from './Progress'; -export type { ProgressProps } from './Progress'; diff --git a/packages/plasma-hope/src/index.ts b/packages/plasma-hope/src/index.ts index c740276e4b..e66610fd6c 100644 --- a/packages/plasma-hope/src/index.ts +++ b/packages/plasma-hope/src/index.ts @@ -12,7 +12,6 @@ export * from './components/Modal'; export * from './components/PaginationDots'; export * from './components/Popup'; export * from './components/Price'; -export * from './components/Progress'; export * from './components/PreviewGallery'; export * from './components/Select'; export * from './components/Switch';