-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 Style: Update Colors and Typography (#154)
* feat(web): create styled-components theme * style(web): update login page colors * style(web): update login card box-shadow on hover * style: remove TodayButton border * style: update Calendar background color * style: Dedication * style: bg color * style: Logout page * test(web): add ThemeProvider to custom RTL render * style: left sidebar * style: scrollbar in left sidebar * style: divider in left sidebar * style: sidebar heading text * style: tooltip * style: linear gradient, hover colors * style: Button border * style: Button border & input * style: TimePicker * style: SomedayEventForm - Repeat Section * chore(web): remove 2+3 week recurrences & fix typing * deps(web): install tinycolor2 * style: RepeatDialog * style: SaveSection * deps: move tinycolor to @core * refactor: use brighten() in RepeatDialog * style: SomedayEventForm: box shadow * style: Priority Buttons * refactor: rename text styles to light/dark * style: NewSomedayEvent * style: SaveSection (EventForm) * style: use theme's animation * style: Textarea * style: Text * style: LeftSidebar * style: add text placeholder color * style: Event * fix: GridEvent memo include isPlaceholder prop in comparison * style: DatePicker Input * style: DatePicker * style: Event drop-shadow * style: add margin to form Description * refactor: extract DayLabels from Header * style: DayLabels * refactor: separate theme from theme utils * style: TextField gradient underline * style: set default gradient to gray * style: RightSidebar * style: GridEventPreview * style: hour labels * style: ArrowLineLeftIcon * style: lined arrow icons * style: Command * style: List * style: TimePicker * style: grid lines * style: scrollbar * style: MontWidget * style: Login, CmdPalette * chore: remove getColor and getInvertedColor utils * chore: remove getNeighbourKey util * style: NotFound * chore(backend): remove color from priority schema * chore: delete colors.ts and color.types.ts * feat: update colors replace with pastel-style colors * feat: change font-family to Rubik * feat: update font sizes * feat: add font weight and size to theme * chore: cleanup font size type * style: Timepicker font size * chore: cleanup DayLabel import
- Loading branch information
1 parent
05a2837
commit ce28026
Showing
97 changed files
with
906 additions
and
933 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
export interface PriorityReq { | ||
color: string; | ||
name: string; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,9 @@ | ||
import { Priorities } from "@core/constants/core.constants"; | ||
import { ColorHex, colors, invertedColors } from "@core/constants/colors"; | ||
import { ColorNames, InvertedColorNames } from "@core/types/color.types"; | ||
import tinycolor from "tinycolor2"; | ||
|
||
export const getAlphaColor = (colorName: ColorNames, opacity: number) => { | ||
const _opacity = Math.round(Math.min(Math.max(opacity || 1, 0), 1) * 255); | ||
return getColor(colorName) + _opacity.toString(16).toUpperCase(); | ||
export const brighten = (color: string, amount?: number) => { | ||
return tinycolor(color).brighten(amount).toString(); | ||
}; | ||
|
||
export const getBrighterColor = (colorName: ColorNames) => { | ||
// assumes that the higher the numbers are, the brighter the colors | ||
//@ts-ignore | ||
return colors[getNeighbourKey(colorName, colors, 1)] as string; | ||
}; | ||
|
||
export const getColor = (colorName: ColorNames) => | ||
colors[colorName] as ColorHex; | ||
|
||
export const getDarkerColor = (colorName: ColorNames) => { | ||
return colors[getNeighbourKey(colorName, colors, -1) as ColorNames]; | ||
}; | ||
|
||
export const getInvertedColor = (colorName: InvertedColorNames) => { | ||
//@ts-ignore | ||
return invertedColors[colorName] as string; | ||
}; | ||
|
||
export const getNeighbourKey = (key = "", obj = {}, diff = 1) => { | ||
const splitKeys = key.split("_"); | ||
if (splitKeys === undefined || splitKeys.length < 1) { | ||
throw new Error( | ||
'You should provide object with keys "ANYTHING_KEY_NUMBER" where NUMBER is number' | ||
); | ||
} | ||
|
||
const prev = splitKeys.length - 1; | ||
//@ts-ignore | ||
const index = +splitKeys[prev]; | ||
const propName = splitKeys.filter((value) => value !== `${index}`).join("_"); | ||
|
||
const neighbourIndex = index + diff; | ||
const neighbourKey = `${propName}_${neighbourIndex}`; | ||
|
||
return Object.keys(obj).find((_key) => _key === neighbourKey) || key; | ||
}; | ||
|
||
export const hoverColorsByPriority = { | ||
[Priorities.UNASSIGNED]: "#F0FFFF", | ||
[Priorities.WORK]: "#80B8E1", | ||
[Priorities.RELATIONS]: "#86D2ED", | ||
[Priorities.SELF]: "#8EB1FF", | ||
export const darken = (color: string, amount?: number) => { | ||
return tinycolor(color).darken(amount).toString(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.