From 7fd8b4d03a0b96b8ed8234ae1fcf1843dcd1a9cf Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 15 Jan 2025 17:13:03 +0530 Subject: [PATCH] feat: update colors for v4 (#10660) Porting changes from https://github.com/chatwoot/chatwoot/pull/10552 --------- Co-authored-by: Pranav Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: Vishnu Narayanan Co-authored-by: Sojan Co-authored-by: iamsivin Co-authored-by: Pranav --- .../assets/scss/plugins/_dropdown.scss | 4 +- .../assets/scss/widgets/_buttons.scss | 92 ++++---------- .../dashboard/assets/scss/widgets/_tabs.scss | 12 +- .../NewConversation/ComposeConversation.vue | 5 +- .../components-next/avatar/Avatar.vue | 2 +- .../components-next/button/Button.vue | 23 +++- .../components-next/button/constants.js | 2 + .../components-next/dialog/Dialog.vue | 2 +- .../components-next/message/Message.vue | 6 +- .../message/bubbles/BaseAttachment.vue | 7 +- .../message/bubbles/Email/Index.vue | 2 +- .../components-next/message/chips/Audio.vue | 2 +- .../sidebar/SidebarProfileMenu.vue | 3 +- .../components/Accordion/AccordionItem.vue | 17 ++- .../dashboard/components/ChatList.vue | 2 +- .../dashboard/components/ChatListHeader.vue | 5 +- app/javascript/dashboard/components/Code.vue | 119 ++++++++++-------- .../dashboard/components/CustomAttribute.vue | 14 +-- app/javascript/dashboard/components/Modal.vue | 13 +- .../components/buttons/ResolveAction.vue | 100 +++++++-------- .../dashboard/components/ui/Banner.vue | 10 +- .../dashboard/components/ui/TimeAgo.vue | 4 +- .../components/widgets/InboxName.vue | 2 +- .../components/widgets/SettingIntroBanner.vue | 4 +- .../components/widgets/WootWriter/Editor.vue | 2 +- .../widgets/WootWriter/EditorModeToggle.vue | 8 +- .../widgets/WootWriter/ReplyBottomPanel.vue | 2 +- .../widgets/conversation/ConversationBox.vue | 5 +- .../widgets/conversation/ConversationCard.vue | 48 +++---- .../conversation/ConversationHeader.vue | 13 +- .../conversation/ConversationSidebar.vue | 2 +- .../EmptyState/FeaturePlaceholder.vue | 8 +- .../widgets/conversation/MessagesView.vue | 19 ++- .../widgets/conversation/MoreActions.vue | 30 +++-- .../widgets/conversation/PriorityMark.vue | 6 +- .../widgets/conversation/ReplyBox.vue | 10 +- .../widgets/conversation/ReplyEmailHead.vue | 24 ++-- .../widgets/conversation/TagAgents.vue | 21 ++-- .../conversation/components/SLACardLabel.vue | 14 ++- .../widgets/mentions/MentionBox.vue | 16 +-- .../dashboard/constants/localStorage.js | 1 - .../components/MessageContextMenu.vue | 2 +- .../search/components/MessageContent.vue | 15 +-- .../modules/search/components/ReadMore.vue | 72 ++++------- .../search/components/SearchHeader.vue | 54 +++----- .../components/SearchResultContactItem.vue | 90 +++++++------ .../components/SearchResultContactsList.vue | 2 +- .../SearchResultConversationItem.vue | 88 ++++++------- .../SearchResultConversationsList.vue | 2 +- .../components/SearchResultMessagesList.vue | 2 +- .../search/components/SearchResultSection.vue | 90 +++++-------- .../modules/search/components/SearchView.vue | 71 ++++------- .../dashboard/conversation/ContactPanel.vue | 7 +- .../conversation/Macros/MacroPreview.vue | 10 +- .../conversation/contact/ContactInfo.vue | 95 ++++++-------- .../conversation/contact/ContactInfoRow.vue | 19 ++- .../customAttributes/CustomAttributes.vue | 10 +- .../components/ArticleSearch/Header.vue | 2 +- .../routes/dashboard/inbox/InboxList.vue | 4 +- .../inbox/components/InboxItemHeader.vue | 6 +- .../inbox/components/InboxListHeader.vue | 10 +- .../inbox/components/PaginationButton.vue | 4 +- .../routes/dashboard/inbox/routes.js | 4 +- .../dashboard/settings/SettingsHeader.vue | 2 +- .../dashboard/settings/SettingsWrapper.vue | 2 +- .../routes/dashboard/settings/Wrapper.vue | 2 +- .../dashboard/settings/agents/Index.vue | 4 +- .../settings/attributes/CustomAttribute.vue | 2 +- .../dashboard/settings/auditlogs/Index.vue | 6 +- .../dashboard/settings/automation/Index.vue | 6 +- .../dashboard/settings/canned/Index.vue | 6 +- .../components/BaseSettingsHeader.vue | 31 ++--- .../component/CustomRoleTableBody.vue | 4 +- .../settings/integrations/Webhooks/Index.vue | 2 +- .../dashboard/settings/macros/Index.vue | 6 +- .../settings/macros/MacroProperties.vue | 2 +- .../components/ui/MultiselectDropdown.vue | 19 ++- .../ui/MultiselectDropdownItems.vue | 16 +-- .../mixins/keyboardEventListenerMixins.js | 5 +- 79 files changed, 660 insertions(+), 795 deletions(-) diff --git a/app/javascript/dashboard/assets/scss/plugins/_dropdown.scss b/app/javascript/dashboard/assets/scss/plugins/_dropdown.scss index e08099ae6..9ab51d12a 100644 --- a/app/javascript/dashboard/assets/scss/plugins/_dropdown.scss +++ b/app/javascript/dashboard/assets/scss/plugins/_dropdown.scss @@ -1,7 +1,7 @@ .dropdown-pane { - @apply border rounded-lg hidden relative invisible shadow-lg border-slate-25 dark:border-slate-700 box-content p-2 w-fit z-[9999]; + @apply border rounded-lg hidden relative invisible shadow-lg border-n-strong dark:border-n-strong box-content p-2 w-fit z-[9999]; &.dropdown-pane--open { - @apply bg-white absolute dark:bg-slate-800 block visible; + @apply bg-n-alpha-3 backdrop-blur-[100px] absolute block visible; } } diff --git a/app/javascript/dashboard/assets/scss/widgets/_buttons.scss b/app/javascript/dashboard/assets/scss/widgets/_buttons.scss index 640e1395f..729e10368 100644 --- a/app/javascript/dashboard/assets/scss/widgets/_buttons.scss +++ b/app/javascript/dashboard/assets/scss/widgets/_buttons.scss @@ -31,7 +31,7 @@ button { } .button { - @apply items-center bg-woot-500 dark:bg-woot-500 px-2.5 text-white dark:text-white inline-flex h-10 mb-0 gap-2 font-medium; + @apply items-center bg-n-brand px-2.5 text-white dark:text-white inline-flex h-10 mb-0 gap-2 font-medium; .button__content { @apply w-full whitespace-nowrap overflow-hidden text-ellipsis; @@ -42,8 +42,8 @@ button { } } - &:hover { - @apply bg-woot-600 dark:bg-woot-600; + &:hover:not(.secondary):not(.success):not(.alert):not(.warning):not(.clear) { + @apply bg-n-brand/80 dark:bg-n-brand/80; } &:disabled, @@ -52,23 +52,23 @@ button { } &.success { - @apply bg-[#44ce4b] dark:bg-[#44ce4b] text-white dark:text-white; + @apply bg-n-teal-9 text-white dark:text-white; } &.secondary { - @apply bg-slate-700 dark:bg-slate-600 text-white dark:text-white; + @apply bg-n-solid-3 text-white dark:text-white; } &.primary { - @apply bg-woot-500 dark:bg-woot-500 text-white dark:text-white; + @apply bg-n-brand text-white dark:text-white; } &.clear { - @apply text-woot-500 dark:text-woot-500 bg-transparent dark:bg-transparent; + @apply text-n-blue-text dark:text-n-blue-text bg-transparent dark:bg-transparent; } &.alert { - @apply bg-red-500 dark:bg-red-500 text-white dark:text-white; + @apply bg-n-ruby-9 text-white dark:text-white; &.clear { @apply bg-transparent dark:bg-transparent; @@ -76,7 +76,7 @@ button { } &.warning { - @apply bg-[#ffc532] dark:bg-[#ffc532] text-white dark:text-white; + @apply bg-n-amber-9 text-white dark:text-white; &.clear { @apply bg-transparent dark:bg-transparent; @@ -115,114 +115,74 @@ button { } &.hollow { - @apply border border-woot-500 bg-transparent dark:bg-transparent dark:border-woot-500 text-woot-500 dark:text-woot-500 hover:bg-woot-50 dark:hover:bg-woot-900; + @apply border border-n-brand/40 bg-transparent text-n-blue-text hover:bg-n-brand/20; &.secondary { - @apply text-slate-700 border-slate-100 dark:border-slate-800 dark:text-slate-100 hover:bg-slate-50 dark:hover:bg-slate-700; + @apply text-n-slate-12 border-n-slate-5 hover:bg-n-slate-5; } &.success { - @apply text-green-700 dark:text-green-400 border-green-100 dark:border-green-600 hover:bg-green-50 dark:hover:bg-green-800; + @apply text-n-teal-9 border-n-teal-8 hover:bg-n-teal-5; } &.alert { - @apply text-red-700 dark:text-red-400 border-red-100 dark:border-red-600 hover:bg-red-50 dark:hover:bg-red-800; + @apply text-n-ruby-9 border-n-ruby-8 hover:bg-n-ruby-5; } &.warning { - @apply text-yellow-600 dark:text-yellow-600 border-yellow-600 dark:border-yellow-700 hover:bg-yellow-50 dark:hover:bg-yellow-800; - } - - &:hover { - @apply bg-woot-75 dark:bg-woot-800 border-slate-100 dark:border-woot-600 dark:text-woot-400; - - &.secondary { - @apply border-slate-100 dark:border-slate-700 text-slate-800 dark:text-slate-100; - } - - &.success { - @apply border-slate-100 dark:border-slate-700 text-green-800 dark:text-green-100; - } - - &.alert { - @apply border-slate-100 dark:border-slate-700 text-red-700 dark:text-red-100; - } - - &.warning { - @apply border-slate-100 dark:border-slate-700 text-yellow-700 dark:text-yellow-500; - } + @apply text-n-amber-9 border-n-amber-8 hover:bg-n-amber-5; } } // Smooth style &.smooth { - @apply bg-woot-50 dark:bg-woot-800 text-woot-700 dark:text-woot-100 hover:text-woot-700 dark:hover:text-woot-700 hover:bg-woot-100 dark:hover:bg-woot-900; + @apply bg-n-brand/10 dark:bg-n-brand/30 text-n-blue-text hover:bg-n-brand/20 dark:hover:bg-n-brand/40; &.secondary { - @apply bg-slate-50 dark:bg-slate-700 text-slate-700 dark:text-slate-100 hover:bg-slate-100 dark:hover:bg-slate-800; + @apply bg-n-slate-4 text-n-slate-11 hover:text-n-slate-11 hover:bg-n-slate-5; } &.success { - @apply bg-green-50 dark:bg-green-700 text-green-700 dark:text-green-100 hover:bg-green-100 dark:hover:bg-green-800 hover:text-green-800 dark:hover:text-green-100; + @apply bg-n-teal-4 text-n-teal-11 hover:text-n-teal-11 hover:bg-n-teal-5; } &.alert { - @apply bg-red-50 dark:bg-red-700 dark:bg-opacity-50 text-red-700 dark:text-red-100 hover:bg-red-100 dark:hover:bg-red-800 dark:hover:bg-opacity-30; + @apply bg-n-ruby-4 text-n-ruby-11 hover:text-n-ruby-11 hover:bg-n-ruby-5; } &.warning { - @apply bg-yellow-100 dark:bg-yellow-100 text-yellow-700 dark:text-yellow-700 hover:bg-yellow-200 dark:hover:bg-yellow-200; + @apply bg-n-amber-4 text-n-amber-11 hover:text-n-amber-11 hover:bg-n-amber-5; } } &.clear { - @apply text-woot-500 dark:text-woot-500; + @apply text-n-blue-text hover:bg-n-brand/10 dark:hover:bg-n-brand/30; &.secondary { - @apply text-slate-700 dark:text-slate-100; + @apply text-n-slate-12 hover:bg-n-slate-4; } &.success { - @apply text-green-700 dark:text-green-100; + @apply text-n-teal-10 hover:bg-n-teal-4; } &.alert { - @apply text-red-700 dark:text-red-100; + @apply text-n-ruby-11 hover:bg-n-ruby-4; } &.warning { - @apply text-yellow-700 dark:text-yellow-600; - } - - &:hover { - @apply hover:bg-woot-50 dark:hover:bg-woot-900/50 hover:text-woot-500 dark:hover:text-woot-100; - - &.secondary { - @apply hover:bg-slate-50 dark:hover:bg-slate-700 hover:text-slate-800 dark:hover:text-slate-100; - } - - &.success { - @apply hover:bg-green-50 dark:hover:bg-green-800 hover:text-green-800 dark:hover:text-green-100; - } - - &.alert { - @apply hover:bg-red-50 dark:hover:bg-red-800 hover:text-red-700 dark:hover:text-red-100; - } - - &.warning { - @apply hover:bg-yellow-100 dark:hover:bg-yellow-800 hover:text-yellow-700 dark:hover:text-yellow-600; - } + @apply text-n-amber-11 hover:bg-n-amber-4; } &:active { &.secondary { - @apply active:bg-slate-100 dark:active:bg-slate-900; + @apply active:bg-n-slate-3 dark:active:bg-n-slate-7; } } &:focus { &.secondary { - @apply focus:bg-slate-50 dark:focus:bg-slate-700; + @apply focus:bg-n-slate-4 dark:focus:bg-n-slate-6; } } } diff --git a/app/javascript/dashboard/assets/scss/widgets/_tabs.scss b/app/javascript/dashboard/assets/scss/widgets/_tabs.scss index 01ccaf671..72a2e6be8 100644 --- a/app/javascript/dashboard/assets/scss/widgets/_tabs.scss +++ b/app/javascript/dashboard/assets/scss/widgets/_tabs.scss @@ -3,7 +3,7 @@ } .tabs--container--with-border { - @apply border-b border-slate-50 dark:border-slate-800/50; + @apply border-b border-n-weak; } .tabs--container--compact.tab--chat-type { @@ -42,7 +42,7 @@ @apply flex-shrink-0 my-0 mx-2; .badge { - @apply bg-slate-50 dark:bg-slate-800 rounded-md text-slate-600 dark:text-slate-100 h-5 flex items-center justify-center text-xxs font-semibold my-0 mx-1 px-1 py-0; + @apply bg-n-alpha-black2 dark:bg-n-solid-3 rounded-md text-n-slate-11 h-5 flex items-center justify-center text-xxs font-semibold my-0 mx-1 px-1 py-0; } &:first-child { @@ -56,22 +56,22 @@ &:hover, &:focus { a { - @apply text-slate-800 dark:text-slate-100; + @apply text-n-slate-12; } } a { - @apply flex items-center flex-row border-b py-2.5 select-none cursor-pointer border-transparent text-slate-500 dark:text-slate-200 text-sm top-[1px] relative; + @apply flex items-center flex-row border-b py-2.5 select-none cursor-pointer border-transparent text-n-slate-11 text-sm top-[1px] relative; transition: border-color 0.15s $swift-ease-out-function; } &.is-active { a { - @apply border-b border-woot-500 text-woot-500 dark:text-woot-500; + @apply border-b border-n-brand text-n-blue-text; } .badge { - @apply bg-woot-50 dark:bg-woot-500 text-woot-500 dark:text-woot-50 dark:bg-opacity-40; + @apply bg-n-brand/10 dark:bg-n-brand/20 text-n-blue-text; } } } diff --git a/app/javascript/dashboard/components-next/NewConversation/ComposeConversation.vue b/app/javascript/dashboard/components-next/NewConversation/ComposeConversation.vue index 44ab54393..f5b2cb228 100644 --- a/app/javascript/dashboard/components-next/NewConversation/ComposeConversation.vue +++ b/app/javascript/dashboard/components-next/NewConversation/ComposeConversation.vue @@ -189,7 +189,10 @@ useKeyboardEvents(keyboardEvents);