diff --git a/apps/app/components/account/email-code-form.tsx b/apps/app/components/account/email-code-form.tsx index 5e4c49b1af6..389153d60ce 100644 --- a/apps/app/components/account/email-code-form.tsx +++ b/apps/app/components/account/email-code-form.tsx @@ -141,7 +141,7 @@ export const EmailCodeForm = ({ onSuccess }: any) => { diff --git a/apps/app/components/auth-screens/not-authorized-view.tsx b/apps/app/components/auth-screens/not-authorized-view.tsx index 37c07e8def9..054e5bfa353 100644 --- a/apps/app/components/auth-screens/not-authorized-view.tsx +++ b/apps/app/components/auth-screens/not-authorized-view.tsx @@ -36,16 +36,16 @@ export const NotAuthorizedView: React.FC = ({ actionButton, type }) => { alt="ProjectSettingImg" /> -

+

Oops! You are not authorized to view this page

-
+
{user ? (

You have signed in as {user.email}.
- Sign in + Sign in {" "} with different account that has access to this page.

@@ -53,7 +53,7 @@ export const NotAuthorizedView: React.FC = ({ actionButton, type }) => {

You need to{" "} - Sign in + Sign in {" "} with an account that has access to this page.

diff --git a/apps/app/components/breadcrumbs/index.tsx b/apps/app/components/breadcrumbs/index.tsx index 0a2d36e1f31..98944fe37ec 100644 --- a/apps/app/components/breadcrumbs/index.tsx +++ b/apps/app/components/breadcrumbs/index.tsx @@ -16,7 +16,7 @@ const Breadcrumbs = ({ children }: BreadcrumbsProps) => {
-
- +
+ = ({ isOpen, setIsOpen }) => {
-

{shortcut.description}

+

{shortcut.description}

{shortcut.keys.split(",").map((key, index) => ( {key === "Ctrl" ? ( - + ) : ( - + {key === "Ctrl" ? : key} )} @@ -145,7 +145,7 @@ export const ShortcutsModal: React.FC = ({ isOpen, setIsOpen }) => { )) ) : (
-

+

No shortcuts found for{" "} {`"`} @@ -162,16 +162,16 @@ export const ShortcutsModal: React.FC = ({ isOpen, setIsOpen }) => {

{shortcuts.map(({ keys, description }, index) => (
-

{description}

+

{description}

{keys.split(",").map((key, index) => ( {key === "Ctrl" ? ( - + ) : ( - + {key === "Ctrl" ? : key} )} diff --git a/apps/app/components/core/board-view/all-boards.tsx b/apps/app/components/core/board-view/all-boards.tsx index f476b76a5ce..19d0e7636f2 100644 --- a/apps/app/components/core/board-view/all-boards.tsx +++ b/apps/app/components/core/board-view/all-boards.tsx @@ -81,7 +81,7 @@ export const AllBoards: React.FC = ({ return (
{currentState && @@ -92,7 +92,7 @@ export const AllBoards: React.FC = ({ : addSpaceIfCamelCase(singleGroup)}
- 0 + 0
); })} diff --git a/apps/app/components/core/board-view/board-header.tsx b/apps/app/components/core/board-view/board-header.tsx index f209ba6e235..93443d99c81 100644 --- a/apps/app/components/core/board-view/board-header.tsx +++ b/apps/app/components/core/board-view/board-header.tsx @@ -124,7 +124,7 @@ export const BoardHeader: React.FC = ({ return (
@@ -145,7 +145,7 @@ export const BoardHeader: React.FC = ({ {groupedByIssues?.[groupTitle].length ?? 0} @@ -155,7 +155,7 @@ export const BoardHeader: React.FC = ({
))}
-
+
{monthOptions.map((month) => (
-
+

Show weekends

+
+
+
+
+ Cancel + + {status + ? isSubmitting + ? "Updating Theme..." + : "Update Theme" + : isSubmitting + ? "Creating Theme..." + : "Set Theme"} + +
+ + ); +}; diff --git a/apps/app/components/core/custom-theme-modal.tsx b/apps/app/components/core/custom-theme-modal.tsx new file mode 100644 index 00000000000..d46d17d2822 --- /dev/null +++ b/apps/app/components/core/custom-theme-modal.tsx @@ -0,0 +1,65 @@ +import React from "react"; + +// headless ui +import { Dialog, Transition } from "@headlessui/react"; +// components +import { ThemeForm } from "./custom-theme-form"; +// helpers +import { applyTheme } from "helpers/theme.helper"; +// fetch-keys + +type Props = { + isOpen: boolean; + handleClose: () => void; +}; + +export const CustomThemeModal: React.FC = ({ isOpen, handleClose }) => { + const onClose = () => { + handleClose(); + }; + + const handleFormSubmit = async (formData: any) => { + applyTheme(formData.palette, formData.darkPalette); + onClose(); + }; + + return ( + + + +
+ + +
+
+ + + + + +
+
+
+
+ ); +}; diff --git a/apps/app/components/core/existing-issues-list-modal.tsx b/apps/app/components/core/existing-issues-list-modal.tsx index 2e255ae1963..2d5ac37dca1 100644 --- a/apps/app/components/core/existing-issues-list-modal.tsx +++ b/apps/app/components/core/existing-issues-list-modal.tsx @@ -130,7 +130,7 @@ export const ExistingIssuesListModal: React.FC = ({ leaveFrom="opacity-100 scale-100" leaveTo="opacity-0 scale-95" > - +
= ({
)} - +
-

+

Commented {timeAgo(activity.created_at)}

@@ -244,7 +244,7 @@ export const Feeds: React.FC = ({ activities }) => ( editable={false} onBlur={() => ({})} noBorder - customClassName="text-xs bg-gray-100" + customClassName="text-xs bg-brand-surface-1" />
@@ -259,7 +259,7 @@ export const Feeds: React.FC = ({ activities }) => (
{activities.length > 1 && activityIdx !== activities.length - 1 ? (
-
+
{activity.field ? ( activityDetails[activity.field as keyof typeof activityDetails]?.icon ) : activity.actor_detail.avatar && @@ -292,7 +292,7 @@ export const Feeds: React.FC = ({ activities }) => (
-
+
{activity.actor_detail.first_name} {activity.actor_detail.is_bot @@ -300,7 +300,7 @@ export const Feeds: React.FC = ({ activities }) => ( : " " + activity.actor_detail.last_name} {action} - {value} + {value} {timeAgo(activity.created_at)}
diff --git a/apps/app/components/core/filter-list.tsx b/apps/app/components/core/filter-list.tsx index 08d1e806213..c42b7501bd8 100644 --- a/apps/app/components/core/filter-list.tsx +++ b/apps/app/components/core/filter-list.tsx @@ -57,9 +57,9 @@ export const FilterList: React.FC = ({ filters, setFilters }) => { return (
- + {replaceUnderscoreIfSnakeCase(key)}: {filters[key as keyof IIssueFilterOptions] === null || @@ -131,7 +131,7 @@ export const FilterList: React.FC = ({ filters, setFilters }) => { ? "bg-yellow-100 text-yellow-500 hover:bg-yellow-100" : priority === "low" ? "bg-green-100 text-green-500 hover:bg-green-100" - : "bg-gray-100 text-gray-700 hover:bg-gray-100" + : "bg-brand-surface-1 text-gray-700 hover:bg-brand-surface-1" }`} > {getPriorityIcon(priority)} @@ -339,7 +339,7 @@ export const FilterList: React.FC = ({ filters, setFilters }) => { created_by: null, }) } - className="flex items-center gap-x-1 rounded-full border bg-white px-3 py-1.5 text-xs" + className="flex items-center gap-x-1 rounded-full border border-brand-base bg-brand-surface-2 px-3 py-1.5 text-xs" > Clear all filters diff --git a/apps/app/components/core/gpt-assistant-modal.tsx b/apps/app/components/core/gpt-assistant-modal.tsx index b50b1e0f8e7..37104e30f8b 100644 --- a/apps/app/components/core/gpt-assistant-modal.tsx +++ b/apps/app/components/core/gpt-assistant-modal.tsx @@ -121,7 +121,7 @@ export const GptAssistantModal: React.FC = ({ return (
diff --git a/apps/app/components/core/image-picker-popover.tsx b/apps/app/components/core/image-picker-popover.tsx index a6f2efb72bf..9a3d5ff2f30 100644 --- a/apps/app/components/core/image-picker-popover.tsx +++ b/apps/app/components/core/image-picker-popover.tsx @@ -65,7 +65,7 @@ export const ImagePickerPopover: React.FC = ({ label, value, onChange }) return ( setIsOpen((prev) => !prev)} > {label} @@ -79,16 +79,16 @@ export const ImagePickerPopover: React.FC = ({ label, value, onChange }) leaveFrom="transform opacity-100 scale-100" leaveTo="transform opacity-0 scale-95" > - -
+ +
- + {tabOptions.map((tab) => ( `rounded py-1 px-4 text-center text-sm outline-none transition-colors ${ - selected ? "bg-theme text-white" : "text-black" + selected ? "bg-brand-accent text-white" : "text-brand-base" }` } > diff --git a/apps/app/components/core/image-upload-modal.tsx b/apps/app/components/core/image-upload-modal.tsx index 28ff260d47f..ba41f3efad0 100644 --- a/apps/app/components/core/image-upload-modal.tsx +++ b/apps/app/components/core/image-upload-modal.tsx @@ -110,7 +110,7 @@ export const ImageUploadModal: React.FC = ({ leaveFrom="opacity-100" leaveTo="opacity-0" > -
+
@@ -124,9 +124,9 @@ export const ImageUploadModal: React.FC = ({ leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - +
- + Upload Image
@@ -135,7 +135,7 @@ export const ImageUploadModal: React.FC = ({ {...getRootProps()} className={`relative block h-80 w-full rounded-lg p-12 text-center focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 ${ (image === null && isDragActive) || !value - ? "border-2 border-dashed border-gray-300 hover:border-gray-400" + ? "border-2 border-dashed border-brand-base hover:border-gray-400" : "" }`} > @@ -143,7 +143,7 @@ export const ImageUploadModal: React.FC = ({ <> @@ -157,7 +157,7 @@ export const ImageUploadModal: React.FC = ({ ) : ( <> - + {isDragActive ? "Drop image here to upload" : "Drag & drop image here"} diff --git a/apps/app/components/core/index.ts b/apps/app/components/core/index.ts index 41a71d96523..eb547578c47 100644 --- a/apps/app/components/core/index.ts +++ b/apps/app/components/core/index.ts @@ -11,3 +11,4 @@ export * from "./link-modal"; export * from "./image-picker-popover"; export * from "./filter-list"; export * from "./feeds"; +export * from "./theme-switch"; diff --git a/apps/app/components/core/issues-view-filter.tsx b/apps/app/components/core/issues-view-filter.tsx index 4b4d15e0946..0df8e8f1b2b 100644 --- a/apps/app/components/core/issues-view-filter.tsx +++ b/apps/app/components/core/issues-view-filter.tsx @@ -12,8 +12,7 @@ import { SelectFilters } from "components/views"; // ui import { CustomMenu } from "components/ui"; // icons -import { ChevronDownIcon, ListBulletIcon, CalendarDaysIcon } from "@heroicons/react/24/outline"; -import { Squares2X2Icon } from "@heroicons/react/20/solid"; +import { ChevronDownIcon, ListBulletIcon, Squares2X2Icon, CalendarDaysIcon } from "@heroicons/react/24/outline"; // helpers import { replaceUnderscoreIfSnakeCase } from "helpers/string.helper"; // types @@ -53,30 +52,30 @@ export const IssuesFilterView: React.FC = () => {
{ {({ open }) => ( <> View @@ -130,11 +129,11 @@ export const IssuesFilterView: React.FC = () => { leaveFrom="opacity-100 translate-y-0" leaveTo="opacity-0 translate-y-1" > - -
+ +
-

Group by

+

Group by

option.key === groupByProperty)?.name ?? @@ -155,7 +154,7 @@ export const IssuesFilterView: React.FC = () => {
-

Order by

+

Order by

option.key === orderBy)?.name ?? @@ -178,7 +177,7 @@ export const IssuesFilterView: React.FC = () => {
-

Issue type

+

Issue type

option.key === filters.type) @@ -201,11 +200,11 @@ export const IssuesFilterView: React.FC = () => {
-

Show empty states

+

Show empty states

-

Display Properties

+

Display Properties

{Object.keys(properties).map((key) => { if (key === "estimate" && !isEstimateActive) return null; diff --git a/apps/app/components/core/issues-view.tsx b/apps/app/components/core/issues-view.tsx index 22261de06cd..18e685866a0 100644 --- a/apps/app/components/core/issues-view.tsx +++ b/apps/app/components/core/issues-view.tsx @@ -502,8 +502,8 @@ export const IssuesView: React.FC = ({ title="Create a new issue" description={ - Use
C
shortcut to - create a new issue + Use
C
{" "} + shortcut to create a new issue
} Icon={PlusIcon} diff --git a/apps/app/components/core/link-modal.tsx b/apps/app/components/core/link-modal.tsx index 7fd19dc8af8..3c22c2b1baf 100644 --- a/apps/app/components/core/link-modal.tsx +++ b/apps/app/components/core/link-modal.tsx @@ -56,7 +56,7 @@ export const LinkModal: React.FC = ({ isOpen, handleClose, onFormSubmit } leaveFrom="opacity-100" leaveTo="opacity-0" > -
+
@@ -70,11 +70,11 @@ export const LinkModal: React.FC = ({ isOpen, handleClose, onFormSubmit } leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - +
- + Add Link
diff --git a/apps/app/components/core/list-view/single-issue.tsx b/apps/app/components/core/list-view/single-issue.tsx index 4fa51876988..a728c3a750a 100644 --- a/apps/app/components/core/list-view/single-issue.tsx +++ b/apps/app/components/core/list-view/single-issue.tsx @@ -217,7 +217,7 @@ export const SingleListIssue: React.FC = ({
{ e.preventDefault(); setContextMenu(true); diff --git a/apps/app/components/core/list-view/single-list.tsx b/apps/app/components/core/list-view/single-list.tsx index 32880a1a63c..bfd8acdabdf 100644 --- a/apps/app/components/core/list-view/single-list.tsx +++ b/apps/app/components/core/list-view/single-list.tsx @@ -132,10 +132,10 @@ export const SingleList: React.FC = ({ return ( {({ open }) => ( -
+
@@ -144,21 +144,21 @@ export const SingleList: React.FC = ({
{getGroupIcon()}
)} {selectedGroup !== null ? ( -

+

{getGroupTitle()}

) : (

All Issues

)} - - {groupedByIssues?.[groupTitle].length ?? 0} + + {groupedByIssues[groupTitle as keyof IIssue].length}
{type === "issue" ? (
)} - +
{link.title}
-

+

Added {timeAgo(link.created_at)}
by{" "} diff --git a/apps/app/components/core/sidebar/sidebar-progress-stats.tsx b/apps/app/components/core/sidebar/sidebar-progress-stats.tsx index fad29ddaa92..84b79e4df3f 100644 --- a/apps/app/components/core/sidebar/sidebar-progress-stats.tsx +++ b/apps/app/components/core/sidebar/sidebar-progress-stats.tsx @@ -100,13 +100,13 @@ export const SidebarProgressStats: React.FC = ({ > - `w-full rounded px-3 py-1 text-gray-900 ${ - selected ? " bg-theme text-white" : " hover:bg-hover-gray" + `w-full rounded px-3 py-1 text-brand-base ${ + selected ? " bg-brand-accent text-white" : " hover:bg-brand-surface-2" }` } > @@ -114,8 +114,8 @@ export const SidebarProgressStats: React.FC = ({ - `w-full rounded px-3 py-1 text-gray-900 ${ - selected ? " bg-theme text-white" : " hover:bg-hover-gray" + `w-full rounded px-3 py-1 text-brand-base ${ + selected ? " bg-brand-accent text-white" : " hover:bg-brand-surface-2" }` } > @@ -123,8 +123,8 @@ export const SidebarProgressStats: React.FC = ({ - `w-full rounded px-3 py-1 text-gray-900 ${ - selected ? " bg-theme text-white" : " hover:bg-hover-gray" + `w-full rounded px-3 py-1 text-brand-base ${ + selected ? " bg-brand-accent text-white" : " hover:bg-brand-surface-2" }` } > @@ -166,7 +166,7 @@ export const SidebarProgressStats: React.FC = ({ -

+
= ({ }) => (
{title}
diff --git a/apps/app/components/core/theme-switch.tsx b/apps/app/components/core/theme-switch.tsx new file mode 100644 index 00000000000..f93b1998e90 --- /dev/null +++ b/apps/app/components/core/theme-switch.tsx @@ -0,0 +1,60 @@ +import { useState, useEffect, ChangeEvent } from "react"; +import { useTheme } from "next-themes"; +import { THEMES_OBJ } from "constants/themes"; +import { CustomSelect } from "components/ui"; +import { CustomThemeModal } from "./custom-theme-modal"; + +export const ThemeSwitch = () => { + const [mounted, setMounted] = useState(false); + const [customThemeModal, setCustomThemeModal] = useState(false); + const { theme, setTheme } = useTheme(); + + // useEffect only runs on the client, so now we can safely show the UI + useEffect(() => { + setMounted(true); + }, []); + + if (!mounted) { + return null; + } + + return ( + <> + t.value === theme)?.label : "Select your theme"} + onChange={({ value, type }: { value: string; type: string }) => { + if (value === "custom") { + if (!customThemeModal) setCustomThemeModal(true); + } else { + const cssVars = [ + "--color-bg-base", + "--color-bg-surface-1", + "--color-bg-surface-2", + + "--color-border", + "--color-bg-sidebar", + "--color-accent", + + "--color-text-base", + "--color-text-secondary", + ]; + cssVars.forEach((cssVar) => document.documentElement.style.removeProperty(cssVar)); + } + document.documentElement.style.setProperty("color-scheme", type); + setTheme(value); + }} + input + width="w-full" + position="right" + > + {THEMES_OBJ.map(({ value, label, type }) => ( + + {label} + + ))} + + {/* setCustomThemeModal(false)} /> */} + + ); +}; diff --git a/apps/app/components/cycles/completed-cycles-list.tsx b/apps/app/components/cycles/completed-cycles-list.tsx index cb8bb43d7f5..bf1971368c3 100644 --- a/apps/app/components/cycles/completed-cycles-list.tsx +++ b/apps/app/components/cycles/completed-cycles-list.tsx @@ -64,7 +64,7 @@ export const CompletedCyclesList: React.FC = ({ {completedCycles ? ( completedCycles.completed_cycles.length > 0 ? (
-
+
Completed cycles are not editable.
diff --git a/apps/app/components/cycles/cycles-list.tsx b/apps/app/components/cycles/cycles-list.tsx index 28cd171d07d..68592b05120 100644 --- a/apps/app/components/cycles/cycles-list.tsx +++ b/apps/app/components/cycles/cycles-list.tsx @@ -62,8 +62,8 @@ export const CyclesList: React.FC = ({
) : type === "current" ? ( showNoCurrentCycleMessage && ( -
-

No current cycle is present.

+
+

No current cycle is present.

diff --git a/apps/app/components/cycles/delete-cycle-modal.tsx b/apps/app/components/cycles/delete-cycle-modal.tsx index c43d34d689c..b69537cdc47 100644 --- a/apps/app/components/cycles/delete-cycle-modal.tsx +++ b/apps/app/components/cycles/delete-cycle-modal.tsx @@ -139,7 +139,7 @@ export const DeleteCycleModal: React.FC = ({ leaveFrom="opacity-100" leaveTo="opacity-0" > -
+
@@ -153,8 +153,8 @@ export const DeleteCycleModal: React.FC = ({ leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - -
+ +
= ({ />
- + Delete Cycle
-

+

Are you sure you want to delete cycle-{" "} {data?.name}? All of the data related to the cycle will be permanently removed. This action cannot be undone. diff --git a/apps/app/components/cycles/empty-cycle.tsx b/apps/app/components/cycles/empty-cycle.tsx index dfefa401129..af2f12a1111 100644 --- a/apps/app/components/cycles/empty-cycle.tsx +++ b/apps/app/components/cycles/empty-cycle.tsx @@ -37,30 +37,30 @@ export const EmptyCycle = () => { return (

-
+
- Cycle Name + Cycle Name
- - + +
-
+
-
+
- Cycle Name + Cycle Name
- - + +
-
+
@@ -68,7 +68,7 @@ export const EmptyCycle = () => {

Create New Cycle

-

+

Sprint more effectively with Cycles by confining your project
to a fixed amount of time. Create new cycle now.

diff --git a/apps/app/components/cycles/form.tsx b/apps/app/components/cycles/form.tsx index 99e55ce7ace..168f4f2cd18 100644 --- a/apps/app/components/cycles/form.tsx +++ b/apps/app/components/cycles/form.tsx @@ -94,7 +94,7 @@ export const CycleForm: React.FC = ({ handleFormSubmit, handleClose, stat return (
-

+

{status ? "Update" : "Create"} Cycle

@@ -196,7 +196,7 @@ export const CycleForm: React.FC = ({ handleFormSubmit, handleClose, stat
-
+
Cancel = ({ leaveFrom="opacity-100" leaveTo="opacity-0" > -
+
@@ -164,7 +164,7 @@ export const CreateUpdateCycleModal: React.FC = ({ leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - + = ({ {({ open }) => ( <> - +
{cycles?.find((c) => c.id === value)?.name ?? "Cycles"}
@@ -75,7 +75,7 @@ export const CycleSelect: React.FC = ({ leaveTo="opacity-0" >
{options ? ( @@ -93,7 +93,7 @@ export const CycleSelect: React.FC = ({ : "" } ${ active ? "bg-indigo-50" : "" - } relative cursor-pointer select-none p-2 text-gray-900` + } relative cursor-pointer select-none p-2 text-brand-base` } value={option.value} > @@ -103,14 +103,14 @@ export const CycleSelect: React.FC = ({ )) ) : ( -

No options

+

No options

) ) : ( -

Loading...

+

Loading...

)}
-
- +
+ = ({ isOpen, handleClose }) => filteredOptions.map((option: ICycle) => (
diff --git a/apps/app/components/cycles/transfer-issues.tsx b/apps/app/components/cycles/transfer-issues.tsx index 979e87b93aa..59a10a4d8a5 100644 --- a/apps/app/components/cycles/transfer-issues.tsx +++ b/apps/app/components/cycles/transfer-issues.tsx @@ -38,7 +38,7 @@ export const TransferIssues: React.FC = ({ handleClick }) => { : 0; return (
-
+
Completed cycles are not editable.
diff --git a/apps/app/components/emoji-icon-picker/index.tsx b/apps/app/components/emoji-icon-picker/index.tsx index 6c3d3842b0d..6cb3b84f9b8 100644 --- a/apps/app/components/emoji-icon-picker/index.tsx +++ b/apps/app/components/emoji-icon-picker/index.tsx @@ -55,7 +55,7 @@ const EmojiIconPicker: React.FC = ({ return ( setIsOpen((prev) => !prev)} > {label} @@ -69,8 +69,8 @@ const EmojiIconPicker: React.FC = ({ leaveFrom="transform opacity-100 scale-100" leaveTo="transform opacity-0 scale-95" > - -
+ +
{tabOptions.map((tab) => ( @@ -100,7 +100,7 @@ const EmojiIconPicker: React.FC = ({ {recentEmojis.map((emoji) => ( +
diff --git a/apps/app/components/issues/comment/comment-card.tsx b/apps/app/components/issues/comment/comment-card.tsx index 9cab65531e4..4691ad70564 100644 --- a/apps/app/components/issues/comment/comment-card.tsx +++ b/apps/app/components/issues/comment/comment-card.tsx @@ -67,7 +67,7 @@ export const CommentCard: React.FC = ({ comment, onSubmit, handleCommentD
)} - +
@@ -77,7 +77,7 @@ export const CommentCard: React.FC = ({ comment, onSubmit, handleCommentD {comment.actor_detail.first_name} {comment.actor_detail.is_bot ? "Bot" : " " + comment.actor_detail.last_name}
-

Commented {timeAgo(comment.created_at)}

+

Commented {timeAgo(comment.created_at)}

{isEditing ? ( @@ -117,7 +117,7 @@ export const CommentCard: React.FC = ({ comment, onSubmit, handleCommentD editable={false} onBlur={() => ({})} noBorder - customClassName="text-xs bg-gray-100" + customClassName="text-xs bg-brand-surface-1" /> )}
diff --git a/apps/app/components/issues/delete-issue-modal.tsx b/apps/app/components/issues/delete-issue-modal.tsx index e161e52a1fd..4fb5f92eaca 100644 --- a/apps/app/components/issues/delete-issue-modal.tsx +++ b/apps/app/components/issues/delete-issue-modal.tsx @@ -88,7 +88,7 @@ export const DeleteIssueModal: React.FC = ({ isOpen, handleClose, data }) leaveFrom="opacity-100" leaveTo="opacity-0" > -
+
@@ -102,7 +102,7 @@ export const DeleteIssueModal: React.FC = ({ isOpen, handleClose, data }) leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - +
@@ -116,7 +116,7 @@ export const DeleteIssueModal: React.FC = ({ isOpen, handleClose, data })
-

+

Are you sure you want to delete issue{" "} {data?.project_detail.identifier}-{data?.sequence_id} diff --git a/apps/app/components/issues/description-form.tsx b/apps/app/components/issues/description-form.tsx index 95962b92919..b568fb0160b 100644 --- a/apps/app/components/issues/description-form.tsx +++ b/apps/app/components/issues/description-form.tsx @@ -115,7 +115,7 @@ export const IssueDescriptionForm: FC = ({ issue, handleFormS role="textbox" /> {characterLimit && ( -

+
255 ? "text-red-500" : "" @@ -158,7 +158,7 @@ export const IssueDescriptionForm: FC = ({ issue, handleFormS )} />
diff --git a/apps/app/components/issues/form.tsx b/apps/app/components/issues/form.tsx index 257a6a4e185..8556c255174 100644 --- a/apps/app/components/issues/form.tsx +++ b/apps/app/components/issues/form.tsx @@ -216,12 +216,12 @@ export const IssueForm: FC = ({ /> )} /> -

+

{status ? "Update" : "Create"} Issue

{watch("parent") && watch("parent") !== "" ? ( -
+
= ({ /> {mostSimilarIssue && (
-

+

@@ -283,7 +283,7 @@ export const IssueForm: FC = ({

-
+
setCreateMore((prevData) => !prevData)} @@ -453,7 +453,7 @@ export const IssueForm: FC = ({
diff --git a/apps/app/components/issues/modal.tsx b/apps/app/components/issues/modal.tsx index 47fe6e87147..1b74664b14f 100644 --- a/apps/app/components/issues/modal.tsx +++ b/apps/app/components/issues/modal.tsx @@ -219,7 +219,7 @@ export const CreateUpdateIssueModal: React.FC = ({ leaveFrom="opacity-100" leaveTo="opacity-0" > -
+
@@ -233,7 +233,7 @@ export const CreateUpdateIssueModal: React.FC = ({ leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - + = ({ issue, properties, projectId const isNotAllowed = false; return ( -
+
@@ -97,7 +97,7 @@ export const MyIssuesListItem: React.FC = ({ issue, properties, projectId )} - + {truncateText(issue.name, 50)} @@ -127,7 +127,7 @@ export const MyIssuesListItem: React.FC = ({ issue, properties, projectId /> )} {properties.sub_issue_count && ( -
+
{issue?.sub_issues_count} {issue?.sub_issues_count === 1 ? "sub-issue" : "sub-issues"}
)} @@ -136,7 +136,7 @@ export const MyIssuesListItem: React.FC = ({ issue, properties, projectId {issue.label_details.map((label) => ( = ({ leaveFrom="opacity-100 scale-100" leaveTo="opacity-0 scale-95" > - + {multiple ? ( <> ({})} multiple>
  • {query === "" && ( -

    +

    {title}

    )} @@ -182,7 +182,7 @@ export const ParentIssuesListModal: React.FC = ({ value={issue.id} className={({ active }) => `flex cursor-pointer select-none items-center gap-2 rounded-md px-3 py-2 ${ - active ? "bg-gray-900 bg-opacity-5 text-gray-900" : "" + active ? "bg-gray-900 bg-opacity-5 text-brand-base" : "" }` } onClick={() => handleClose()} @@ -194,7 +194,7 @@ export const ParentIssuesListModal: React.FC = ({ backgroundColor: issue.state_detail.color, }} /> - + {issue.project_detail?.identifier}-{issue.sequence_id} {" "} {issue.name} @@ -206,9 +206,9 @@ export const ParentIssuesListModal: React.FC = ({ ) : (
    -

    +

    No issues found. Create a new issue with{" "} -
    C
    . +
    C
    .

    )} diff --git a/apps/app/components/issues/select/assignee.tsx b/apps/app/components/issues/select/assignee.tsx index 1d06f3f0ec6..5c1d7c1b428 100644 --- a/apps/app/components/issues/select/assignee.tsx +++ b/apps/app/components/issues/select/assignee.tsx @@ -54,15 +54,15 @@ export const IssueAssigneeSelect: React.FC = ({ projectId, value = [], on onChange={onChange} options={options} label={ -
    +
    {value && value.length > 0 && Array.isArray(value) ? (
    ) : (
    - - Assignee + + Assignee
    )}
    diff --git a/apps/app/components/issues/select/date.tsx b/apps/app/components/issues/select/date.tsx index 438291a2d64..3bb8c1bed02 100644 --- a/apps/app/components/issues/select/date.tsx +++ b/apps/app/components/issues/select/date.tsx @@ -18,11 +18,11 @@ export const IssueDateSelect: React.FC = ({ value, onChange }) => ( <> - `flex cursor-pointer items-center rounded-md border text-xs shadow-sm duration-200 + `flex cursor-pointer items-center rounded-md border border-brand-base text-xs shadow-sm duration-200 ${ open - ? "border-theme bg-theme/5 outline-none ring-1 ring-theme " - : "hover:bg-theme/5 " + ? "border-brand-accent bg-brand-accent/5 outline-none ring-1 ring-brand-accent " + : "hover:bg-brand-accent/5 " }` } > diff --git a/apps/app/components/issues/select/label.tsx b/apps/app/components/issues/select/label.tsx index 2adeaa222d2..f5b023280df 100644 --- a/apps/app/components/issues/select/label.tsx +++ b/apps/app/components/issues/select/label.tsx @@ -60,11 +60,11 @@ export const IssueLabelSelect: React.FC = ({ setIsOpen, value, onChange, <> - `flex cursor-pointer items-center rounded-md border text-xs shadow-sm duration-200 + `flex cursor-pointer items-center rounded-md border border-brand-base text-xs shadow-sm duration-200 ${ open - ? "border-theme bg-theme/5 outline-none ring-1 ring-theme " - : "hover:bg-theme/5 " + ? "border-brand-accent bg-brand-accent/5 outline-none ring-1 ring-brand-accent " + : "hover:bg-brand-accent/5 " }` } > @@ -78,8 +78,8 @@ export const IssueLabelSelect: React.FC = ({ setIsOpen, value, onChange, ) : ( - - Label + + Label )} @@ -96,12 +96,12 @@ export const IssueLabelSelect: React.FC = ({ setIsOpen, value, onChange, > -
    - +
    + setQuery(event.target.value)} placeholder="Search for label..." displayValue={(assigned: any) => assigned?.name} @@ -120,7 +120,7 @@ export const IssueLabelSelect: React.FC = ({ setIsOpen, value, onChange, key={label.id} className={({ active }) => `${ - active ? "bg-gray-200" : "" + active ? "bg-brand-surface-2" : "" } group flex min-w-[14rem] cursor-pointer select-none items-center gap-2 truncate rounded px-1 py-1.5 text-gray-600` } value={label.id} @@ -150,8 +150,8 @@ export const IssueLabelSelect: React.FC = ({ setIsOpen, value, onChange, ); } else return ( -
    -
    +
    +
    {label.name}
    @@ -160,7 +160,7 @@ export const IssueLabelSelect: React.FC = ({ setIsOpen, value, onChange, key={child.id} className={({ active }) => `${ - active ? "bg-gray-200" : "" + active ? "bg-brand-surface-2" : "" } group flex min-w-[14rem] cursor-pointer select-none items-center gap-2 truncate rounded px-1 py-1.5 text-gray-600` } value={child.id} @@ -192,14 +192,14 @@ export const IssueLabelSelect: React.FC = ({ setIsOpen, value, onChange, ); }) ) : ( -

    No labels found

    +

    No labels found

    ) ) : ( -

    Loading...

    +

    Loading...

    )}
    -
    +
    = ({ issueDetail?.parent_detail ? ( ) : ( -
    +
    No parent selected
    ) @@ -395,7 +395,7 @@ export const IssueDetailsSidebar: React.FC = ({ return ( { const updatedLabels = watchIssue("labels_list")?.filter( (l) => l !== labelId @@ -435,8 +435,8 @@ export const IssueDetailsSidebar: React.FC = ({ className={`flex ${ isNotAllowed ? "cursor-not-allowed" - : "cursor-pointer hover:bg-gray-100" - } items-center gap-2 rounded-2xl border px-2 py-0.5 text-xs`} + : "cursor-pointer hover:bg-brand-surface-1" + } items-center gap-2 rounded-2xl border border-brand-base px-2 py-0.5 text-xs`} > Select Label @@ -448,7 +448,7 @@ export const IssueDetailsSidebar: React.FC = ({ leaveFrom="opacity-100" leaveTo="opacity-0" > - +
    {issueLabels ? ( issueLabels.length > 0 ? ( @@ -463,9 +463,9 @@ export const IssueDetailsSidebar: React.FC = ({ - `${active || selected ? "bg-indigo-50" : ""} ${ + `${active || selected ? "bg-brand-surface-1" : ""} ${ selected ? "font-medium" : "" - } flex cursor-pointer select-none items-center gap-2 truncate p-2 text-gray-900` + } flex cursor-pointer select-none items-center gap-2 truncate p-2 text-brand-base` } value={label.id} > @@ -483,8 +483,8 @@ export const IssueDetailsSidebar: React.FC = ({ ); } else return ( -
    -
    +
    +
    {" "} {label.name}
    @@ -495,7 +495,7 @@ export const IssueDetailsSidebar: React.FC = ({ className={({ active, selected }) => `${active || selected ? "bg-indigo-50" : ""} ${ selected ? "font-medium" : "" - } flex cursor-pointer select-none items-center gap-2 truncate p-2 text-gray-900` + } flex cursor-pointer select-none items-center gap-2 truncate p-2 text-brand-base` } value={child.id} > @@ -530,8 +530,8 @@ export const IssueDetailsSidebar: React.FC = ({ )} diff --git a/apps/app/components/issues/view-select/assignee.tsx b/apps/app/components/issues/view-select/assignee.tsx index 1429555d999..64199b901c3 100644 --- a/apps/app/components/issues/view-select/assignee.tsx +++ b/apps/app/components/issues/view-select/assignee.tsx @@ -103,17 +103,17 @@ export const ViewAssigneeSelect: React.FC = ({
    {issue.assignees && issue.assignees.length > 0 && Array.isArray(issue.assignees) ? (
    - {issue.assignees.length} Assignees + {issue.assignees.length} Assignees
    ) : (
    - - Assignee + + Assignee
    )}
    diff --git a/apps/app/components/issues/view-select/state.tsx b/apps/app/components/issues/view-select/state.tsx index 34ce8c82c5d..4a6482cdef4 100644 --- a/apps/app/components/issues/view-select/state.tsx +++ b/apps/app/components/issues/view-select/state.tsx @@ -97,7 +97,7 @@ export const ViewStateSelect: React.FC = ({ tooltipHeading="State" tooltipContent={addSpaceIfCamelCase(selectedOption?.name ?? "")} > -
    +
    {selectedOption && getStateGroupIcon(selectedOption.group, "16", "16", selectedOption.color)} {selectedOption?.name ?? "State"} diff --git a/apps/app/components/labels/create-label-modal.tsx b/apps/app/components/labels/create-label-modal.tsx index e07de48f568..c186cbd7cd7 100644 --- a/apps/app/components/labels/create-label-modal.tsx +++ b/apps/app/components/labels/create-label-modal.tsx @@ -84,7 +84,7 @@ export const CreateLabelModal: React.FC = ({ isOpen, projectId, handleClo leaveFrom="opacity-100" leaveTo="opacity-0" > -
    +
    @@ -98,10 +98,10 @@ export const CreateLabelModal: React.FC = ({ isOpen, projectId, handleClo leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - +
    - + Create Label
    @@ -109,8 +109,8 @@ export const CreateLabelModal: React.FC = ({ isOpen, projectId, handleClo {({ open, close }) => ( <> {watch("color") && watch("color") !== "" && ( @@ -122,7 +122,7 @@ export const CreateLabelModal: React.FC = ({ isOpen, projectId, handleClo /> )}
  • {query === "" && ( -

    +

    Labels

    )} @@ -132,7 +132,7 @@ export const LabelsListModal: React.FC = ({ isOpen, handleClose, parent } }} className={({ active }) => `flex cursor-pointer select-none items-center gap-2 rounded-md px-3 py-2 ${ - active ? "bg-gray-900 bg-opacity-5 text-gray-900" : "" + active ? "bg-gray-900 bg-opacity-5 text-brand-base" : "" }` } onClick={() => { @@ -159,10 +159,10 @@ export const LabelsListModal: React.FC = ({ isOpen, handleClose, parent } {query !== "" && filteredLabels.length === 0 && (
    diff --git a/apps/app/components/labels/single-label-group.tsx b/apps/app/components/labels/single-label-group.tsx index d41b8508e36..c5e5f91dba5 100644 --- a/apps/app/components/labels/single-label-group.tsx +++ b/apps/app/components/labels/single-label-group.tsx @@ -66,7 +66,7 @@ export const SingleLabelGroup: React.FC = ({ }; return ( - + {({ open }) => ( <>
    @@ -74,7 +74,7 @@ export const SingleLabelGroup: React.FC = ({ -
    {label.name}
    +
    {label.name}
    @@ -100,7 +100,7 @@ export const SingleLabelGroup: React.FC = ({ @@ -120,9 +120,9 @@ export const SingleLabelGroup: React.FC = ({ {labelChildren.map((child) => (
    -
    +
    = ({ editLabel, handleLabelDelete, }) => ( -
    +
    = ({ backgroundColor: label.color && label.color !== "" ? label.color : "#000", }} /> -
    {label.name}
    +
    {label.name}
    addLabelToGroup(label)}> diff --git a/apps/app/components/modules/delete-module-modal.tsx b/apps/app/components/modules/delete-module-modal.tsx index 70fca1916e8..77ed8dd4c29 100644 --- a/apps/app/components/modules/delete-module-modal.tsx +++ b/apps/app/components/modules/delete-module-modal.tsx @@ -77,7 +77,7 @@ export const DeleteModuleModal: React.FC = ({ isOpen, setIsOpen, data }) leaveFrom="opacity-100" leaveTo="opacity-0" > -
    +
    @@ -91,8 +91,8 @@ export const DeleteModuleModal: React.FC = ({ isOpen, setIsOpen, data }) leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - -
    + +
    = ({ isOpen, setIsOpen, data }) />
    - + Delete Module
    -

    +

    Are you sure you want to delete module-{" "} {data?.name}? All of the data related to the module will be permanently removed. This action cannot be undone. diff --git a/apps/app/components/modules/form.tsx b/apps/app/components/modules/form.tsx index b1e56ce9052..fe1e557b70c 100644 --- a/apps/app/components/modules/form.tsx +++ b/apps/app/components/modules/form.tsx @@ -66,7 +66,7 @@ export const ModuleForm: React.FC = ({ handleFormSubmit, handleClose, sta return (

    -

    +

    {status ? "Update" : "Create"} Module

    @@ -170,7 +170,7 @@ export const ModuleForm: React.FC = ({ handleFormSubmit, handleClose, sta
    -
    +
    Cancel {status diff --git a/apps/app/components/modules/modal.tsx b/apps/app/components/modules/modal.tsx index b611f415b1c..d42a09ee783 100644 --- a/apps/app/components/modules/modal.tsx +++ b/apps/app/components/modules/modal.tsx @@ -125,7 +125,7 @@ export const CreateUpdateModuleModal: React.FC = ({ isOpen, setIsOpen, da leaveFrom="opacity-100" leaveTo="opacity-0" > -
    +
    @@ -139,7 +139,7 @@ export const CreateUpdateModuleModal: React.FC = ({ isOpen, setIsOpen, da leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - + = ({ value, onChange }) => { options={options} value={value} label={ -
    +
    {selectedOption ? ( ) : ( -
    +
    No user
    )} diff --git a/apps/app/components/modules/select/select-members.tsx b/apps/app/components/modules/select/select-members.tsx index 439753a9171..8d407f36a0a 100644 --- a/apps/app/components/modules/select/select-members.tsx +++ b/apps/app/components/modules/select/select-members.tsx @@ -51,16 +51,16 @@ export const ModuleMembersSelect: React.FC = ({ value, onChange }) => { +
    {value && value.length > 0 && Array.isArray(value) ? (
    - {value.length} Assignees + {value.length} Assignees
    ) : (
    - - Assignee + + Assignee
    )}
    diff --git a/apps/app/components/modules/sidebar-select/select-lead.tsx b/apps/app/components/modules/sidebar-select/select-lead.tsx index bf45f614ef5..795d0f75c21 100644 --- a/apps/app/components/modules/sidebar-select/select-lead.tsx +++ b/apps/app/components/modules/sidebar-select/select-lead.tsx @@ -62,11 +62,11 @@ export const SidebarLeadSelect: React.FC = ({ value, onChange }) => { +
    {selectedOption ? ( ) : ( -
    +
    = ({ value, onChange }) => { +
    {value && value.length > 0 && Array.isArray(value) ? (
    - {value.length} Assignees + {value.length} Assignees
    ) : ( "No members" diff --git a/apps/app/components/modules/sidebar-select/select-status.tsx b/apps/app/components/modules/sidebar-select/select-status.tsx index 2156b4357e3..5d5ac946468 100644 --- a/apps/app/components/modules/sidebar-select/select-status.tsx +++ b/apps/app/components/modules/sidebar-select/select-status.tsx @@ -33,7 +33,7 @@ export const SidebarStatusSelect: React.FC = ({ control, submitChanges, w label={ = ({ issues, module, isOpen,
    {module ? ( <> @@ -199,7 +199,7 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen, {capitalizeFirstLetter(`${watch("status")}`)} @@ -218,13 +218,13 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen, )} />
    -
    +
    {({ open }) => ( <> @@ -271,8 +271,8 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen, {({ open }) => ( <> @@ -319,7 +319,7 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen,
    -

    {module.name}

    +

    {module.name}

    setModuleDeleteModal(true)}> @@ -336,7 +336,7 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen,
    - + {module.description}
    @@ -373,7 +373,7 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen, Progress
    -
    +
    = ({ issues, module, isOpen,
    -
    - +
    + {({ open }) => (
    - Progress + Progress {!open && moduleIssues && progressPercentage ? ( {progressPercentage ? `${progressPercentage}%` : ""} @@ -415,7 +415,7 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen, ) : (
    - + Invalid date. Please enter valid date.
    @@ -428,7 +428,7 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen,
    - + Pending Issues -{" "} @@ -437,7 +437,7 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen,
    -
    +
    Ideal @@ -466,15 +466,15 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen,
    -
    - +
    + {({ open }) => (
    - Other Information + Other Information
    {module.total_issues > 0 ? ( @@ -487,7 +487,7 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen, ) : (
    - + No issues found. Please add issue.
    @@ -522,11 +522,11 @@ export const ModuleDetailsSidebar: React.FC = ({ issues, module, isOpen,
    -
    +
    -

    Links

    +

    Links

    diff --git a/apps/app/components/rich-text-editor/toolbar/link.tsx b/apps/app/components/rich-text-editor/toolbar/link.tsx index 458a5017171..a47c45c1a5b 100644 --- a/apps/app/components/rich-text-editor/toolbar/link.tsx +++ b/apps/app/components/rich-text-editor/toolbar/link.tsx @@ -173,12 +173,12 @@ export const FloatingLinkToolbar = () => { return ( <> {!isEditing && ( - + {linkEditButtons} )} {!isEditing && empty && ( - + {linkEditButtons} )} diff --git a/apps/app/components/rich-text-editor/toolbar/table-controls.tsx b/apps/app/components/rich-text-editor/toolbar/table-controls.tsx index 3ad28524535..d8f8e24e2a0 100644 --- a/apps/app/components/rich-text-editor/toolbar/table-controls.tsx +++ b/apps/app/components/rich-text-editor/toolbar/table-controls.tsx @@ -8,7 +8,7 @@ export const TableControls = () => {
    diff --git a/apps/app/components/states/create-state-modal.tsx b/apps/app/components/states/create-state-modal.tsx index ca19cd752c5..769ca68219b 100644 --- a/apps/app/components/states/create-state-modal.tsx +++ b/apps/app/components/states/create-state-modal.tsx @@ -102,7 +102,7 @@ export const CreateStateModal: React.FC = ({ isOpen, projectId, handleClo leaveFrom="opacity-100" leaveTo="opacity-0" > -
    +
    @@ -116,10 +116,10 @@ export const CreateStateModal: React.FC = ({ isOpen, projectId, handleClo leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - +
    - + Create State
    @@ -165,8 +165,8 @@ export const CreateStateModal: React.FC = ({ isOpen, projectId, handleClo {({ open }) => ( <> Color @@ -179,7 +179,7 @@ export const CreateStateModal: React.FC = ({ isOpen, projectId, handleClo /> )}
    diff --git a/apps/app/components/states/delete-state-modal.tsx b/apps/app/components/states/delete-state-modal.tsx index d1eca3a9325..362ff9353e8 100644 --- a/apps/app/components/states/delete-state-modal.tsx +++ b/apps/app/components/states/delete-state-modal.tsx @@ -90,7 +90,7 @@ export const DeleteStateModal: React.FC = ({ isOpen, onClose, data }) => leaveFrom="opacity-100" leaveTo="opacity-0" > -
    +
    @@ -104,8 +104,8 @@ export const DeleteStateModal: React.FC = ({ isOpen, onClose, data }) => leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - -
    + +
    = ({ isOpen, onClose, data }) => />
    - + Delete State
    -

    +

    Are you sure you want to delete state-{" "} {data?.name}? All of the data related to the state will be permanently removed. This action cannot be undone. diff --git a/apps/app/components/states/single-state.tsx b/apps/app/components/states/single-state.tsx index f4383b37681..2a65a1674e2 100644 --- a/apps/app/components/states/single-state.tsx +++ b/apps/app/components/states/single-state.tsx @@ -135,12 +135,12 @@ export const SingleState: React.FC = ({ return (

    {getStateGroupIcon(state.group, "20", "20", state.color)}
    -
    {addSpaceIfCamelCase(state.name)}
    +
    {addSpaceIfCamelCase(state.name)}

    {state.description}

    @@ -148,7 +148,7 @@ export const SingleState: React.FC = ({ {index !== 0 && ( diff --git a/apps/app/components/ui/multi-level-select.tsx b/apps/app/components/ui/multi-level-select.tsx index 1662c58a846..a063ee45f2a 100644 --- a/apps/app/components/ui/multi-level-select.tsx +++ b/apps/app/components/ui/multi-level-select.tsx @@ -48,7 +48,7 @@ export const MultiLevelSelect: React.FC = ({
    setOpenChildFor(null)} - className="relative w-full cursor-default rounded-lg bg-white py-2 pl-3 pr-10 text-left shadow-md sm:text-sm" + className="relative w-full cursor-default rounded-lg bg-brand-surface-2 py-2 pl-3 pr-10 text-left shadow-md sm:text-sm" > {selected?.label ?? label} @@ -64,13 +64,13 @@ export const MultiLevelSelect: React.FC = ({ > {options.map((option) => ( { if (option.children !== null) { @@ -88,7 +88,7 @@ export const MultiLevelSelect: React.FC = ({ <> {openChildFor?.id === option.id && (
    = ({ = ({ ))}
    ( theme === "primary" ? `${ disabled ? "opacity-70" : "" - } border border-theme text-white shadow-sm hover:bg-theme focus:outline-none` + } border border-brand-accent text-white shadow-sm hover:bg-brand-accent focus:outline-none` : theme === "secondary" - ? "border bg-transparent hover:bg-gray-100" + ? "border bg-transparent hover:bg-brand-surface-1" : theme === "success" ? `${ disabled ? "opacity-70" : "" diff --git a/apps/app/components/ui/text-area/index.tsx b/apps/app/components/ui/text-area/index.tsx index 8cda2907786..be4938699ef 100644 --- a/apps/app/components/ui/text-area/index.tsx +++ b/apps/app/components/ui/text-area/index.tsx @@ -44,7 +44,7 @@ export const TextArea: React.FC = ({ return ( <> {label && ( -
    -
    +

    Pending issues

    {data ? ( @@ -52,7 +52,7 @@ export const IssuesStats: React.FC = ({ data }) => ( )}
    -
    +

    Issues due by this week

    {data ? ( diff --git a/apps/app/components/workspace/send-workspace-invitation-modal.tsx b/apps/app/components/workspace/send-workspace-invitation-modal.tsx index b81023c2ae2..f58269b89f8 100644 --- a/apps/app/components/workspace/send-workspace-invitation-modal.tsx +++ b/apps/app/components/workspace/send-workspace-invitation-modal.tsx @@ -83,7 +83,7 @@ const SendWorkspaceInvitationModal: React.FC = ({ leaveFrom="opacity-100" leaveTo="opacity-0" > -
    +
    @@ -97,14 +97,14 @@ const SendWorkspaceInvitationModal: React.FC = ({ leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - +
    - + Members -

    +

    Invite members to work on your workspace.

    diff --git a/apps/app/components/workspace/sidebar-dropdown.tsx b/apps/app/components/workspace/sidebar-dropdown.tsx index 93be576fe08..ac5ee7f7a64 100644 --- a/apps/app/components/workspace/sidebar-dropdown.tsx +++ b/apps/app/components/workspace/sidebar-dropdown.tsx @@ -84,13 +84,13 @@ export const WorkspaceSidebarDropdown = () => {
    - +
    -
    +
    {activeWorkspace?.logo && activeWorkspace.logo !== "" ? ( { >
    -
    {user?.email}
    - Workspace +
    {user?.email}
    + Workspace {workspaces ? (
    {workspaces.length > 0 ? ( @@ -148,7 +148,7 @@ export const WorkspaceSidebarDropdown = () => {
    )}
    -
    +
    {userLinks(workspaceSlug as string).map((link, index) => ( {link.name} @@ -217,11 +217,11 @@ export const WorkspaceSidebarDropdown = () => { ))}
    -
    diff --git a/apps/app/constants/themes.ts b/apps/app/constants/themes.ts new file mode 100644 index 00000000000..8ac745b824b --- /dev/null +++ b/apps/app/constants/themes.ts @@ -0,0 +1,35 @@ +export const THEMES = [ + "light", + "dark", + "light-contrast", + "dark-contrast", + // "custom" +]; + +export const THEMES_OBJ = [ + { + value: "light", + label: "Light", + type: "light", + }, + { + value: "dark", + label: "Dark", + type: "dark", + }, + { + value: "light-contrast", + label: "Light High Contrast", + type: "light", + }, + { + value: "dark-contrast", + label: "Dark High Contrast", + type: "dark", + }, + // { + // value: "custom", + // label: "Custom", + // type: "light", + // }, +]; diff --git a/apps/app/helpers/theme.helper.ts b/apps/app/helpers/theme.helper.ts new file mode 100644 index 00000000000..d3d76f3e538 --- /dev/null +++ b/apps/app/helpers/theme.helper.ts @@ -0,0 +1,35 @@ +export const hexToRgb = (hex: string) => { + hex = hex.toLowerCase(); + var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + return result + ? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)].join(",") + : null; +}; + +export const applyTheme = (palette: string, isDarkPalette: boolean) => { + const values: string[] = []; + palette.split(",").map((color: string) => { + const cssVarColor = hexToRgb(color); + if (cssVarColor) values.push(cssVarColor); + }); + + const cssVars = [ + "--color-bg-base", + "--color-bg-surface-1", + "--color-bg-surface-2", + "--color-border", + "--color-bg-sidebar", + "--color-accent", + "--color-text-base", + "--color-text-secondary", + "color-scheme", + ]; + + values.push(isDarkPalette ? "dark" : "light"); + + cssVars.forEach((cssVar, i) => + document + .querySelector("[data-theme='custom']") + ?.style.setProperty(cssVar, values[i]) + ); +}; diff --git a/apps/app/layouts/app-layout/app-header.tsx b/apps/app/layouts/app-layout/app-header.tsx index 13106f480cf..81ec5dbf0c4 100644 --- a/apps/app/layouts/app-layout/app-header.tsx +++ b/apps/app/layouts/app-layout/app-header.tsx @@ -9,12 +9,12 @@ type Props = { }; const Header: React.FC = ({ breadcrumbs, left, right, setToggleSidebar }) => ( -
    +
    @@ -375,7 +375,7 @@ const SinglePage: NextPage = () => { customButton={ {/*
    -
    +

    Modules

    -

    +

    Modules are enabled for all the projects in this workspace. Access it from the navigation bar.

    @@ -146,7 +146,7 @@ const FeaturesSettings: NextPage = () => {
    -
    +

    Views

    -

    +

    Views are enabled for all the projects in this workspace. Access it from the navigation bar.

    @@ -187,7 +187,7 @@ const FeaturesSettings: NextPage = () => {
    -
    +

    Pages

    -

    +

    Pages are enabled for all the projects in this workspace. Access them from the navigation bar.

    @@ -228,7 +228,7 @@ const FeaturesSettings: NextPage = () => {
    -
    +
    {key === activeGroup && ( { diff --git a/apps/app/pages/[workspaceSlug]/projects/[projectId]/views/index.tsx b/apps/app/pages/[workspaceSlug]/projects/[projectId]/views/index.tsx index 7c8f7ff64ea..e6a7eb10a13 100644 --- a/apps/app/pages/[workspaceSlug]/projects/[projectId]/views/index.tsx +++ b/apps/app/pages/[workspaceSlug]/projects/[projectId]/views/index.tsx @@ -79,7 +79,7 @@ const ProjectViews: NextPage = () => { document.dispatchEvent(e); }} > - + Create View
    @@ -98,8 +98,8 @@ const ProjectViews: NextPage = () => { {views ? ( views.length > 0 ? (
    -

    Views

    -
      +

      Views

      +
      {views.map((view) => ( { handleDeleteView={() => handleDeleteView(view)} /> ))} -
    +
    ) : ( {

    Logo

    -

    +

    Max file size is 5MB. Supported file types are .jpg and .png.

    @@ -228,7 +228,7 @@ const WorkspaceSettings: NextPage = () => {

    URL

    -

    Your workspace URL.

    +

    Your workspace URL.

    {

    Name

    -

    Give a name to your workspace.

    +

    Give a name to your workspace.

    {

    Company Size

    -

    How big is your company?

    +

    How big is your company?

    {

    Danger Zone

    -

    +

    The danger zone of the workspace delete page is a critical area that requires careful consideration and attention. When deleting a workspace, all of the data and resources within that workspace will be permanently removed and cannot be recovered. diff --git a/apps/app/pages/[workspaceSlug]/settings/members.tsx b/apps/app/pages/[workspaceSlug]/settings/members.tsx index a85c00cf30e..f993c2ff9ad 100644 --- a/apps/app/pages/[workspaceSlug]/settings/members.tsx +++ b/apps/app/pages/[workspaceSlug]/settings/members.tsx @@ -142,7 +142,7 @@ const MembersSettings: NextPage = () => {

    Members