From e356f204511e4767783787afb887dbdd2edf8e90 Mon Sep 17 00:00:00 2001 From: Tyler Dane Date: Wed, 6 Nov 2024 06:52:09 -0600 Subject: [PATCH] chore: delete colors.ts and color.types.ts --- packages/core/src/constants/colors.ts | 54 ------------------- packages/core/src/types/color.types.ts | 49 ----------------- packages/web/src/components/Divider/types.ts | 3 -- packages/web/src/components/Textarea/types.ts | 2 - .../Grid/Columns/TimesColumn/styled.ts | 3 +- .../MonthSection/MonthSection.tsx | 3 +- 6 files changed, 2 insertions(+), 112 deletions(-) delete mode 100644 packages/core/src/constants/colors.ts delete mode 100644 packages/core/src/types/color.types.ts diff --git a/packages/core/src/constants/colors.ts b/packages/core/src/constants/colors.ts deleted file mode 100644 index ea574668..00000000 --- a/packages/core/src/constants/colors.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Priorities } from "@core/constants/core.constants"; -import { Colors, ColorNames } from "@core/types/color.types"; - -export type ColorHex = keyof typeof OLDcolors; - -export const BASE_COLORS = { - DEEP_BLUE: "#1C3142", - ONYX_GREY: "#1D2932", - SLATE_GREY: "#BDCFDC", - LIGHT_GREY: "#8293A1", -}; - -export const OLDcolors: Colors = { - [ColorNames.BLUE_1]: "#0E1821", - [ColorNames.BLUE_2]: BASE_COLORS.DEEP_BLUE, - [ColorNames.BLUE_3]: "#1E2A4B", - [ColorNames.BLUE_4]: "#3D5495", - [ColorNames.BLUE_5]: "#5A7ED9", - [ColorNames.BLUE_6]: "#7397B5", - [ColorNames.BLUE_7]: "#6796B8", - [ColorNames.BLUE_8]: "#94c5e9", - - [ColorNames.GREY_1]: BASE_COLORS.ONYX_GREY, - [ColorNames.GREY_2]: "#395264", - [ColorNames.GREY_3]: "#516371", - [ColorNames.GREY_4]: "#A3B1BB", - [ColorNames.GREY_5]: "#BDCFDC", - [ColorNames.GREY_6]: "#7A858D", - - [ColorNames.TEAL_1]: "#4b94a0", - [ColorNames.TEAL_2]: "#4c96b3", - [ColorNames.TEAL_3]: "#6cd7e9", - [ColorNames.TEAL_4]: "#86D2ED", - [ColorNames.TEAL_5]: "#ABE0F2", - - [ColorNames.WHITE_1]: "#D9D9D9", - [ColorNames.WHITE_2]: "#D5D5D5", - [ColorNames.WHITE_3]: "#FFFFFF", - [ColorNames.WHITE_4]: "#F3F2ED", - [ColorNames.WHITE_5]: "#F5F5F5", - - [ColorNames.YELLOW_1]: "#3F3C1F", - [ColorNames.YELLOW_2]: "#7D793E", - [ColorNames.YELLOW_3]: "#BCB55D", - [ColorNames.YELLOW_4]: "#FAF17C", - [ColorNames.YELLOW_5]: "#FCF8BD", -}; - -export const colorNameByPriority = { - [Priorities.UNASSIGNED]: ColorNames.GREY_4, - [Priorities.WORK]: ColorNames.BLUE_7, - [Priorities.SELF]: ColorNames.BLUE_5, - [Priorities.RELATIONS]: ColorNames.TEAL_2, -}; diff --git a/packages/core/src/types/color.types.ts b/packages/core/src/types/color.types.ts deleted file mode 100644 index da6c73d5..00000000 --- a/packages/core/src/types/color.types.ts +++ /dev/null @@ -1,49 +0,0 @@ -export type Colors = { - [key in ColorNames]: string; -}; - -export type ColorName = keyof typeof ColorNames; - -export enum ColorNames { - BLUE_1 = "blue_1", - BLUE_2 = "blue_2", - BLUE_3 = "blue_3", - BLUE_4 = "blue_4", - BLUE_5 = "blue_5", - BLUE_6 = "blue_6", - BLUE_7 = "blue_7", - BLUE_8 = "blue_8", - - GREY_1 = "grey_1", - GREY_2 = "grey_2", - GREY_3 = "grey_3", - GREY_4 = "grey_4", - GREY_5 = "grey_5", - GREY_6 = "grey_6", - - TEAL_1 = "teal_1", - TEAL_2 = "teal_2", - TEAL_3 = "teal_3", - TEAL_4 = "teal_4", - TEAL_5 = "teal_5", - - WHITE_1 = "white_1", - WHITE_2 = "white_2", - WHITE_3 = "white_3", - WHITE_4 = "white_4", - WHITE_5 = "white_5", - - YELLOW_1 = "yellow_1", - YELLOW_2 = "yellow_2", - YELLOW_3 = "yellow_3", - YELLOW_4 = "yellow_4", - YELLOW_5 = "yellow_5", -} - -export enum InvertedColorNames { - BLUE_3 = "blue_3", - GREY_3 = "grey_3", - GREY_4 = "grey_4", - TEAL_2 = "teal_2", - WHITE_1 = "white_1", -} diff --git a/packages/web/src/components/Divider/types.ts b/packages/web/src/components/Divider/types.ts index e89b92aa..e098d9a6 100644 --- a/packages/web/src/components/Divider/types.ts +++ b/packages/web/src/components/Divider/types.ts @@ -1,8 +1,5 @@ -import { ColorNames } from "@core/types/color.types"; - export interface Props { toggled?: boolean; width?: string; - colorName?: ColorNames; withAnimation?: boolean; } diff --git a/packages/web/src/components/Textarea/types.ts b/packages/web/src/components/Textarea/types.ts index e4c8888d..eb5f66a9 100644 --- a/packages/web/src/components/Textarea/types.ts +++ b/packages/web/src/components/Textarea/types.ts @@ -1,5 +1,4 @@ import { TextareaAutosizeProps } from "react-textarea-autosize"; -import { ColorNames } from "@core/types/color.types"; import { ClassNamedComponent, UnderlinedInput, @@ -9,6 +8,5 @@ export interface TextareaProps extends UnderlinedInput, ClassNamedComponent, TextareaAutosizeProps { - background?: ColorNames; heightFitsContent?: boolean; } diff --git a/packages/web/src/views/Calendar/components/Grid/Columns/TimesColumn/styled.ts b/packages/web/src/views/Calendar/components/Grid/Columns/TimesColumn/styled.ts index 87bc13cf..4ce6896b 100644 --- a/packages/web/src/views/Calendar/components/Grid/Columns/TimesColumn/styled.ts +++ b/packages/web/src/views/Calendar/components/Grid/Columns/TimesColumn/styled.ts @@ -1,9 +1,8 @@ import styled from "styled-components"; -import { Colors } from "@core/types/color.types"; import { ZIndex } from "@web/common/constants/web.constants"; interface Props { - color: Colors; + color: string; } export const StyledTimesLabel = styled.div` diff --git a/packages/web/src/views/Calendar/components/LeftSidebar/SomedaySection/MonthSection/MonthSection.tsx b/packages/web/src/views/Calendar/components/LeftSidebar/SomedaySection/MonthSection/MonthSection.tsx index 694666b7..c664138d 100644 --- a/packages/web/src/views/Calendar/components/LeftSidebar/SomedaySection/MonthSection/MonthSection.tsx +++ b/packages/web/src/views/Calendar/components/LeftSidebar/SomedaySection/MonthSection/MonthSection.tsx @@ -1,5 +1,4 @@ import React, { FC } from "react"; -import { ColorNames } from "@core/types/color.types"; import { Categories_Event } from "@core/types/event.types"; import { SomedayEventsProps } from "@web/views/Calendar/hooks/draft/sidebar/useSidebar"; import { DateCalcs } from "@web/views/Calendar/hooks/grid/useDateCalcs"; @@ -34,7 +33,7 @@ export const MonthSection: FC = ({ alignItems={AlignItems.CENTER} justifyContent={JustifyContent.SPACE_BETWEEN} > - + {monthLabel}
e.stopPropagation()}>