Passwords match
} -{error}
} -- {item.description} -
- )} -- {message} -
- ); -} diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts index 31194781ac..3d4b7ce430 100644 --- a/packages/ui/src/index.ts +++ b/packages/ui/src/index.ts @@ -5,13 +5,10 @@ */ export * from "./avatar"; -export * from "./badge"; export * from "./breadcrumbs"; export * from "./button"; export * from "./card"; export * from "./collapsible"; -export * from "./color-picker"; -export * from "./constants"; export * from "./content-wrapper"; export * from "./control-link"; export * from "./drag-handle"; @@ -27,13 +24,10 @@ export * from "./modals"; export * from "./popovers"; export * from "./progress"; export * from "./row"; -export * from "./scroll-area"; export * from "./sortable"; export * from "./spinners"; export * from "./tables"; -export * from "./tabs"; export * from "./tag"; export * from "./tooltip"; -export * from "./typography"; export * from "./utils"; export * from "./oauth"; diff --git a/packages/ui/src/progress/index.ts b/packages/ui/src/progress/index.ts index 25dfa5a60b..70d29c6b8e 100644 --- a/packages/ui/src/progress/index.ts +++ b/packages/ui/src/progress/index.ts @@ -4,7 +4,5 @@ * See the LICENSE file for details. */ -export * from "./radial-progress"; -export * from "./progress-bar"; export * from "./linear-progress-indicator"; export * from "./circular-progress-indicator"; diff --git a/packages/ui/src/progress/progress-bar.tsx b/packages/ui/src/progress/progress-bar.tsx deleted file mode 100644 index e29f46e0df..0000000000 --- a/packages/ui/src/progress/progress-bar.tsx +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -import React from "react"; - -type Props = { - maxValue?: number; - value?: number; - radius?: number; - strokeWidth?: number; - activeStrokeColor?: string; - inactiveStrokeColor?: string; -}; - -export function ProgressBar({ - maxValue = 0, - value = 0, - radius = 8, - strokeWidth = 2, - activeStrokeColor = "#3e98c7", - inactiveStrokeColor = "#ddd", -}: Props) { - // PIE Calc Fn - const generatePie = (value: any) => { - const x = radius - Math.cos((2 * Math.PI) / (100 / value)) * radius; - const y = radius + Math.sin((2 * Math.PI) / (100 / value)) * radius; - const long = value <= 50 ? 0 : 1; - const d = `M${radius} ${radius} L${radius} ${0} A${radius} ${radius} 0 ${long} 1 ${y} ${x} Z`; - - return d; - }; - - // ---- PIE Area Calc -------- - const calculatePieValue = (numberOfBars: any) => { - const angle = 360 / numberOfBars; - const pieValue = Math.floor(angle / 4); - return pieValue < 1 ? 1 : Math.floor(angle / 4); - }; - - // ---- PIE Render Fn -------- - const renderPie = (i: any) => { - const DIRECTION = -1; - // Rotation Calc - const primaryRotationAngle = (maxValue - 1) * (360 / maxValue); - const rotationAngle = -1 * DIRECTION * primaryRotationAngle + i * DIRECTION * primaryRotationAngle; - const rotationTransformation = `rotate(${rotationAngle}, ${radius}, ${radius})`; - const pieValue = calculatePieValue(maxValue); - const dValue = generatePie(pieValue); - const fillColor = value > 0 && i <= value ? activeStrokeColor : inactiveStrokeColor; - - return ( -