diff --git a/packages/client/src/components/Article/MainButton/index.js b/packages/client/src/components/Article/MainButton/index.js index f4eb63c4b1..b41c36fa83 100644 --- a/packages/client/src/components/Article/MainButton/index.js +++ b/packages/client/src/components/Article/MainButton/index.js @@ -69,6 +69,7 @@ import styled, { css } from "styled-components"; import { resendInvitesAgain } from "@docspace/shared/api/people"; import { ArticleButtonLoader } from "@docspace/shared/skeletons/article"; import { isMobile, isTablet } from "react-device-detect"; +import { globalColors } from "@docspace/shared/themes"; const StyledButton = styled(Button)` font-weight: 700; @@ -120,7 +121,7 @@ const StyledButton = styled(Button)` border-radius: 3px; user-select: none; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; } `; diff --git a/packages/client/src/components/Badges.js b/packages/client/src/components/Badges.js index ed867031fe..241e6db045 100644 --- a/packages/client/src/components/Badges.js +++ b/packages/client/src/components/Badges.js @@ -44,7 +44,7 @@ import { Badge } from "@docspace/shared/components/badge"; import { ColorTheme, ThemeId } from "@docspace/shared/components/color-theme"; import { RoomsType, ShareAccessRights } from "@docspace/shared/enums"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import { isTablet, isDesktop, size, classNames } from "@docspace/shared/utils"; @@ -56,7 +56,7 @@ const StyledWrapper = styled.div` background: ${(props) => props.theme.filesBadges.backgroundColor}; padding: 6px; border-radius: 4px; - box-shadow: 0px 2px 4px rgba(4, 15, 27, 0.16); + box-shadow: 0px 2px 4px ${globalColors.badgeShadow}; `; StyledWrapper.defaultProps = { theme: Base }; @@ -306,7 +306,6 @@ const Badges = ({ {/* {isForm && ( isDisabled && "background-color: #fff"} + ${({ isDisabled }) => + isDisabled && + `background-color: ${(props) => props.theme.filesEditingWrapper.disabledBackground}`} } .edit-button { diff --git a/packages/client/src/components/EmptyContainer/EmptyContainer.js b/packages/client/src/components/EmptyContainer/EmptyContainer.js index 980f358462..61eb9469d6 100644 --- a/packages/client/src/components/EmptyContainer/EmptyContainer.js +++ b/packages/client/src/components/EmptyContainer/EmptyContainer.js @@ -57,6 +57,10 @@ const EmptyFolderWrapper = styled.div` .second-description { margin: 32px 0 24px; text-align: center; + + & > span { + color: ${(props) => props.theme.filesEmptyContainer.descriptionColor}; + } } .empty-folder_container-image { diff --git a/packages/client/src/components/EmptyContainer/sub-components/CommonButtons.js b/packages/client/src/components/EmptyContainer/sub-components/CommonButtons.js index 596efcd6f5..7237e2b117 100644 --- a/packages/client/src/components/EmptyContainer/sub-components/CommonButtons.js +++ b/packages/client/src/components/EmptyContainer/sub-components/CommonButtons.js @@ -97,7 +97,7 @@ const InviteUsersComponent = (props) => { return ( <>
- + {t("AddMembersDescription")}
diff --git a/packages/client/src/components/GlobalEvents/ChangeUserTypeEvent.js b/packages/client/src/components/GlobalEvents/ChangeUserTypeEvent.js index f06686be51..8c3182abfc 100644 --- a/packages/client/src/components/GlobalEvents/ChangeUserTypeEvent.js +++ b/packages/client/src/components/GlobalEvents/ChangeUserTypeEvent.js @@ -34,6 +34,7 @@ import { toastr } from "@docspace/shared/components/toast"; import { Link } from "@docspace/shared/components/link"; import { Text } from "@docspace/shared/components/text"; import { combineUrl } from "@docspace/shared/utils/combineUrl"; +import { globalColors } from "@docspace/shared/themes"; const ChangeUserTypeEvent = ({ setVisible, @@ -105,7 +106,11 @@ const ChangeUserTypeEvent = ({ <> {t("Common:QuotaPaidUserLimitError")} {!isRoomAdmin && ( - + {t("Common:PaymentsTitle")} )} diff --git a/packages/client/src/components/NavMenu/sub-components/header-catalog-burger.js b/packages/client/src/components/NavMenu/sub-components/header-catalog-burger.js index c2f2b6a45a..b64fb2be6b 100644 --- a/packages/client/src/components/NavMenu/sub-components/header-catalog-burger.js +++ b/packages/client/src/components/NavMenu/sub-components/header-catalog-burger.js @@ -30,7 +30,7 @@ import PropTypes from "prop-types"; import MenuIcon from "PUBLIC_DIR/images/menu.react.svg"; import { mobile } from "@docspace/shared/utils"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; const StyledIconBox = styled.div` display: none; @@ -42,7 +42,7 @@ const StyledIconBox = styled.div` align-items: center; padding-inline-start: 16px; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; `; const StyledMenuIcon = styled(MenuIcon)` diff --git a/packages/client/src/components/NavMenu/sub-components/header-nav.js b/packages/client/src/components/NavMenu/sub-components/header-nav.js index 6daad2280d..5cce4f8b69 100644 --- a/packages/client/src/components/NavMenu/sub-components/header-nav.js +++ b/packages/client/src/components/NavMenu/sub-components/header-nav.js @@ -31,6 +31,7 @@ import ProfileActions from "./profile-actions"; import { useTranslation } from "react-i18next"; import { mobile, tablet } from "@docspace/shared/utils"; import { inject, observer } from "mobx-react"; +import { globalColors } from "@docspace/shared/themes"; const StyledNav = styled.nav` display: flex; @@ -57,7 +58,7 @@ const StyledNav = styled.nav` } .icon-profile-menu { cursor: pointer; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; z-index: 300; } `; diff --git a/packages/client/src/components/NavMenu/sub-components/header-unauth.js b/packages/client/src/components/NavMenu/sub-components/header-unauth.js index 1460533f7a..5475f08a39 100644 --- a/packages/client/src/components/NavMenu/sub-components/header-unauth.js +++ b/packages/client/src/components/NavMenu/sub-components/header-unauth.js @@ -29,7 +29,7 @@ import PropTypes from "prop-types"; import styled from "styled-components"; import { Box } from "@docspace/shared/components/box"; import { inject, observer } from "mobx-react"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import { mobile, getLogoUrl } from "@docspace/shared/utils"; import { WhiteLabelLogoType } from "@docspace/shared/enums"; import { LanguageCombobox } from "@docspace/shared/components/language-combobox"; @@ -58,7 +58,7 @@ const Header = styled.header` } .header-logo-wrapper { - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; } .header-logo-min_icon { diff --git a/packages/client/src/components/NavMenu/sub-components/header.js b/packages/client/src/components/NavMenu/sub-components/header.js index dd4577c982..04f0f4ef89 100644 --- a/packages/client/src/components/NavMenu/sub-components/header.js +++ b/packages/client/src/components/NavMenu/sub-components/header.js @@ -42,7 +42,7 @@ import { import { WhiteLabelLogoType } from "@docspace/shared/enums"; import { combineUrl } from "@docspace/shared/utils/combineUrl"; import HeaderCatalogBurger from "./header-catalog-burger"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; const Header = styled.header` display: flex; @@ -59,7 +59,7 @@ const Header = styled.header` display: flex; align-items: center; justify-items: center; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; ${NoUserSelect} } diff --git a/packages/client/src/components/NavMenu/sub-components/nav-item.js b/packages/client/src/components/NavMenu/sub-components/nav-item.js index 37dd1f4d13..ad08c3be63 100644 --- a/packages/client/src/components/NavMenu/sub-components/nav-item.js +++ b/packages/client/src/components/NavMenu/sub-components/nav-item.js @@ -35,7 +35,7 @@ import { Text } from "@docspace/shared/components/text"; import { commonIconsStyles, tablet } from "@docspace/shared/utils"; import MenuIcon from "PUBLIC_DIR/images/menu.react.svg"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; const NavItemSeparator = styled.div` border-bottom: 1px ${(props) => (props.dashed ? "dashed" : "solid")} @@ -123,9 +123,9 @@ const NavItemBadge = styled(Badge)` `; const VersionBadge = styled.div` - background-color: #3cb55b; + background-color: ${globalColors.lightStatusPositive}; border-radius: 5px; - color: #ffffff; + color: ${globalColors.white}; display: inline-block; font-size: 10px; line-height: 8px; diff --git a/packages/client/src/components/NavMenu/sub-components/nav-logo-item.js b/packages/client/src/components/NavMenu/sub-components/nav-logo-item.js index 4087180820..18b80c09fc 100644 --- a/packages/client/src/components/NavMenu/sub-components/nav-logo-item.js +++ b/packages/client/src/components/NavMenu/sub-components/nav-logo-item.js @@ -31,6 +31,7 @@ import styled from "styled-components"; import { inject, observer } from "mobx-react"; import { NoUserSelect, getLogoUrl } from "@docspace/shared/utils"; import { WhiteLabelLogoType } from "@docspace/shared/enums"; +import { globalColors } from "@docspace/shared/themes"; const LogoItem = styled.div` display: flex; @@ -41,7 +42,7 @@ const LogoItem = styled.div` cursor: pointer; .nav-logo-wrapper { - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; ${NoUserSelect} } diff --git a/packages/client/src/components/NavMenu/sub-components/nav.js b/packages/client/src/components/NavMenu/sub-components/nav.js index 2de047f6b2..309e8d6842 100644 --- a/packages/client/src/components/NavMenu/sub-components/nav.js +++ b/packages/client/src/components/NavMenu/sub-components/nav.js @@ -29,7 +29,7 @@ import PropTypes from "prop-types"; import styled from "styled-components"; import { Scrollbar } from "@docspace/shared/components/scrollbar"; import { isMobileOnly, isMobile } from "react-device-detect"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; const StyledNav = styled.nav` background-color: ${(props) => props.theme.nav.backgroundColor}; @@ -43,7 +43,7 @@ const StyledNav = styled.nav` transition: width 0.3s ease-in-out; width: ${(props) => (props.opened ? "240px" : "0")}; z-index: 200; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; .version-box { position: absolute; diff --git a/packages/client/src/components/TariffBar/helpers.js b/packages/client/src/components/TariffBar/helpers.js index 92af9bb53f..2c27d3d080 100644 --- a/packages/client/src/components/TariffBar/helpers.js +++ b/packages/client/src/components/TariffBar/helpers.js @@ -24,8 +24,10 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -const ORANGE = "#F97A0B"; -const RED = "#F2665A"; +import { globalColors } from "@docspace/shared/themes"; + +const ORANGE = globalColors.mainOrange; +const RED = globalColors.mainRed; export const getSaasBar = ( t, diff --git a/packages/client/src/components/dialogs/BackupCodesDialog/index.js b/packages/client/src/components/dialogs/BackupCodesDialog/index.js index 81daf2ea42..76d0402edb 100644 --- a/packages/client/src/components/dialogs/BackupCodesDialog/index.js +++ b/packages/client/src/components/dialogs/BackupCodesDialog/index.js @@ -43,6 +43,7 @@ import { isDesktop } from "@docspace/shared/utils"; const StyledModal = styled(ModalDialogContainer)` .backup-codes-counter { margin-top: 16px; + color: ${(props) => props.theme.client.settings.security.tfa.textColor}; } .backup-codes-print-link-wrapper { @@ -107,11 +108,7 @@ class BackupCodesDialogComponent extends React.Component { {t("BackupCodesSecondDescription")} - + {backupCodesCount} {t("CodesCounter")} diff --git a/packages/client/src/components/dialogs/ChangeUserStatusDialog/index.js b/packages/client/src/components/dialogs/ChangeUserStatusDialog/index.js index fba64709eb..678370f0a8 100644 --- a/packages/client/src/components/dialogs/ChangeUserStatusDialog/index.js +++ b/packages/client/src/components/dialogs/ChangeUserStatusDialog/index.js @@ -40,6 +40,7 @@ import { withTranslation } from "react-i18next"; import { EmployeeStatus } from "@docspace/shared/enums"; import ModalDialogContainer from "../ModalDialogContainer"; import { inject, observer } from "mobx-react"; +import { globalColors } from "@docspace/shared/themes"; class ChangeUserStatusDialogComponent extends React.Component { constructor(props) { @@ -87,7 +88,7 @@ class ChangeUserStatusDialogComponent extends React.Component { <> {t("Common:QuotaPaidUserLimitError")} diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMemberRow/index.styled.ts b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMemberRow/index.styled.ts index db50b2dd6c..65da3f3320 100644 --- a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMemberRow/index.styled.ts +++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMemberRow/index.styled.ts @@ -76,7 +76,7 @@ export const GroupMemberRow = styled.div<{}>` svg { path { - fill: #a3a9ae; + fill: ${(props) => props.theme.createEditGroupDialog.iconFill}; } } } diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/index.styled.ts b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/index.styled.ts index 62b0645524..eb1b807ef5 100644 --- a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/index.styled.ts +++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/index.styled.ts @@ -30,7 +30,8 @@ export const Header = styled.div` width: 100%; padding: 8px 0 12px; - color: #a3a9ae; + color: ${(props) => + props.theme.createEditRoomDialog.commonParam.descriptionColor}; font-size: 14px; font-weight: 600; line-height: 16px; @@ -50,6 +51,6 @@ export const SelectGroupManager = styled.div<{}>` font-size: 13px; font-weight: 600; line-height: 20px; - color: #a3a9ae; + color: ${(props) => props.theme.createEditGroupDialog.textColor}; } `; diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.styled.ts b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.styled.ts index 73cc9d889a..d7095c5a35 100644 --- a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.styled.ts +++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.styled.ts @@ -30,7 +30,8 @@ export const Header = styled.div` width: 100%; padding: 8px 0 12px; - color: #a3a9ae; + color: ${(props) => + props.theme.createEditRoomDialog.commonParam.descriptionColor}; font-size: 14px; font-weight: 600; line-height: 16px; @@ -50,6 +51,6 @@ export const AddMembersButton = styled.div<{}>` font-size: 13px; font-weight: 600; line-height: 20px; - color: #a3a9ae; + color: ${(props) => props.theme.createEditGroupDialog.textColor}; } `; diff --git a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomTypeDropdown/DropdownDesktop.js b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomTypeDropdown/DropdownDesktop.js index 167f33bb44..223a1eb556 100644 --- a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomTypeDropdown/DropdownDesktop.js +++ b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomTypeDropdown/DropdownDesktop.js @@ -28,7 +28,7 @@ import React from "react"; import styled from "styled-components"; import RoomType from "@docspace/shared/components/room-type"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import { RoomsTypeValues } from "@docspace/shared/utils/common"; const StyledDropdownDesktop = styled.div` @@ -55,7 +55,7 @@ const StyledDropdownDesktop = styled.div` display: flex; flex-direction: column; padding: 6px 0; - box-shadow: 0px 12px 40px rgba(4, 15, 27, 0.12); + box-shadow: 0px 12px 40px ${globalColors.popupShadow}; border-radius: 6px; } `; diff --git a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomTypeDropdown/DropdownMobile.js b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomTypeDropdown/DropdownMobile.js index 1c3e6e446a..ae7bd7fb32 100644 --- a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomTypeDropdown/DropdownMobile.js +++ b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomTypeDropdown/DropdownMobile.js @@ -32,7 +32,7 @@ import { RoomsTypeValues } from "@docspace/shared/utils/common"; import { Backdrop } from "@docspace/shared/components/backdrop"; import { Portal } from "@docspace/shared/components/portal"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; const StyledDropdownMobile = styled.div` visibility: ${(props) => (props.isOpen ? "visible" : "hidden")}; @@ -40,8 +40,7 @@ const StyledDropdownMobile = styled.div` bottom: 0; z-index: 500; padding-top: 6px; - - box-shadow: 0px -4px 60px rgba(4, 15, 27, 0.12); + box-shadow: 0px -4px 60px ${globalColors.popupShadow}; border-radius: 6px 6px 0px 0px; background: ${(props) => props.theme.createEditRoomDialog.roomTypeDropdown.mobile.background}; diff --git a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SecondaryInfoButton.js b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SecondaryInfoButton.js index cbcd711c5f..b89659a693 100644 --- a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SecondaryInfoButton.js +++ b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/SecondaryInfoButton.js @@ -32,10 +32,11 @@ import { HelpButton } from "@docspace/shared/components/help-button"; const StyledHelpButton = styled(HelpButton)` border-radius: 50%; - background-color: #a3a9ae; + background-color: ${(props) => + props.theme.createEditRoomDialog.helpButton.background}; circle, rect { - fill: #ffffff; + fill: ${(props) => props.theme.createEditRoomDialog.helpButton.fill}; } `; diff --git a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/StyledDropdown.js b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/StyledDropdown.js index 4dd829fe6b..53dc7a3b25 100644 --- a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/StyledDropdown.js +++ b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/StyledDropdown.js @@ -29,7 +29,7 @@ import styled from "styled-components"; import { mobile } from "@docspace/shared/utils"; import { DropDown } from "@docspace/shared/components/drop-down"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; const StyledDropDownWrapper = styled.div` width: 100%; @@ -43,7 +43,7 @@ const StyledDropDown = styled(DropDown)` props.theme.createEditRoomDialog.dropdown.background}; border: 1px solid ${(props) => props.theme.createEditRoomDialog.dropdown.borderColor}; - box-shadow: 0px 12px 40px rgba(4, 15, 27, 0.12); + box-shadow: 0px 12px 40px ${globalColors.popupShadow}; border-radius: 3px; overflow: hidden; ${(props) => !props.hasItems && "visibility: hidden"}; diff --git a/packages/client/src/components/dialogs/DataReassignmentDialog/sub-components/Body/AccountInfo.js b/packages/client/src/components/dialogs/DataReassignmentDialog/sub-components/Body/AccountInfo.js index 1632c4a5e2..544cc86c5c 100644 --- a/packages/client/src/components/dialogs/DataReassignmentDialog/sub-components/Body/AccountInfo.js +++ b/packages/client/src/components/dialogs/DataReassignmentDialog/sub-components/Body/AccountInfo.js @@ -36,7 +36,7 @@ import { capitalize } from "lodash"; const StyledCatalogSpamIcon = styled(CatalogSpamIcon)` ${commonIconsStyles} path { - fill: #f21c0e; + fill: ${(props) => props.theme.dialogs.errorText}; } padding-inline-start: 8px; `; diff --git a/packages/client/src/components/dialogs/DataReassignmentDialog/sub-components/Body/Progress.js b/packages/client/src/components/dialogs/DataReassignmentDialog/sub-components/Body/Progress.js index 9863dfc0ed..1faa30b8b1 100644 --- a/packages/client/src/components/dialogs/DataReassignmentDialog/sub-components/Body/Progress.js +++ b/packages/client/src/components/dialogs/DataReassignmentDialog/sub-components/Body/Progress.js @@ -32,13 +32,13 @@ import styled from "styled-components"; import CheckIcon from "PUBLIC_DIR/images/check.edit.react.svg"; import InterruptIcon from "PUBLIC_DIR/images/interrupt.icon.react.svg"; import { commonIconsStyles } from "@docspace/shared/utils"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import { withTranslation, Trans } from "react-i18next"; const StyledCheckIcon = styled(CheckIcon)` ${commonIconsStyles} path { - fill: rgba(53, 173, 23, 1) !important; + fill: ${globalColors.lightStatusPositive} !important; } `; diff --git a/packages/client/src/components/dialogs/DeleteProfileEverDialog/index.js b/packages/client/src/components/dialogs/DeleteProfileEverDialog/index.js index 0c597931c3..d2cad67e5d 100644 --- a/packages/client/src/components/dialogs/DeleteProfileEverDialog/index.js +++ b/packages/client/src/components/dialogs/DeleteProfileEverDialog/index.js @@ -69,7 +69,7 @@ const StyledModalDialogContainer = styled(ModalDialogContainer)` } .text-warning { - color: #f24724; + color: ${(props) => props.theme.peopleDialogs.deleteUser.textColor}; font-size: 16px; font-weight: 700; line-height: 22px; diff --git a/packages/client/src/components/dialogs/DownloadDialog/StyledDownloadDialog.js b/packages/client/src/components/dialogs/DownloadDialog/StyledDownloadDialog.js index 5958b5a5b5..5762c1def3 100644 --- a/packages/client/src/components/dialogs/DownloadDialog/StyledDownloadDialog.js +++ b/packages/client/src/components/dialogs/DownloadDialog/StyledDownloadDialog.js @@ -67,7 +67,7 @@ const StyledDownloadContent = styled.div` isOpen ? "rotate(270deg)" : "rotate(90deg)"}; svg { path { - fill: #333; + fill: ${(props) => props.theme.downloadDialog.iconFill}; } } } @@ -124,7 +124,7 @@ const StyledDownloadContent = styled.div` } .download-dialog-other-text { text-align: end; - color: #a3a9ae; + color: ${(props) => props.theme.downloadDialog.textColor}; } } } diff --git a/packages/client/src/components/panels/AddUsersPanel/index.tsx b/packages/client/src/components/panels/AddUsersPanel/index.tsx index 8ae26aa7b2..b8a989a3c9 100644 --- a/packages/client/src/components/panels/AddUsersPanel/index.tsx +++ b/packages/client/src/components/panels/AddUsersPanel/index.tsx @@ -448,7 +448,7 @@ const AddUsersPanel = ({ fontSize="12px" noSelect truncate - color="#A3A9AE" + color={theme.filesPanels.addUsers.textColor} dir="auto" > {`${userType} | ${email}`} diff --git a/packages/client/src/components/panels/EditLinkPanel/LinkBlock.js b/packages/client/src/components/panels/EditLinkPanel/LinkBlock.js index 9fd03df8a2..5910d1d40a 100644 --- a/packages/client/src/components/panels/EditLinkPanel/LinkBlock.js +++ b/packages/client/src/components/panels/EditLinkPanel/LinkBlock.js @@ -51,9 +51,7 @@ const LinkBlock = (props) => { {t("LinkName")} - - * - + * props.theme.editLink.requiredColor}; margin-inline-start: 2px; } diff --git a/packages/client/src/components/panels/EmbeddingPanel/StyledEmbeddingPanel.js b/packages/client/src/components/panels/EmbeddingPanel/StyledEmbeddingPanel.js index edc97bdc31..480ea9c623 100644 --- a/packages/client/src/components/panels/EmbeddingPanel/StyledEmbeddingPanel.js +++ b/packages/client/src/components/panels/EmbeddingPanel/StyledEmbeddingPanel.js @@ -26,6 +26,7 @@ import styled, { css } from "styled-components"; import { ModalDialog } from "@docspace/shared/components/modal-dialog"; +import { globalColors } from "@docspace/shared/themes"; const StyledModalDialog = styled(ModalDialog)` .modal-header { @@ -116,7 +117,7 @@ const StyledBody = styled.div` .embedding-panel_code-container { margin-top: 16px; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; } .embedding-panel_text { diff --git a/packages/client/src/components/panels/InvitePanel/StyledInvitePanel.js b/packages/client/src/components/panels/InvitePanel/StyledInvitePanel.js index 2fc21b0c3d..cfaf7d7c74 100644 --- a/packages/client/src/components/panels/InvitePanel/StyledInvitePanel.js +++ b/packages/client/src/components/panels/InvitePanel/StyledInvitePanel.js @@ -112,6 +112,10 @@ const StyledInviteUserBody = styled.div` display: flex; flex-direction: column; overflow: auto; + + .about-label { + color: ${(props) => props.theme.filesPanels.invite.textColor}; + } `; const StyledHeading = styled(Heading)` @@ -201,7 +205,7 @@ const StyledInviteInput = styled.div` } display: flex; - border: 1px solid rgb(208, 213, 218); + border: ${(props) => props.theme.filesPanels.invite.border}; border-radius: 3px; .copy-link-icon { @@ -329,7 +333,7 @@ const StyledDropDown = styled(DropDown)` gap: 4px; p { - color: #4781d1; + color: ${(props) => props.theme.filesPanels.invite.addButtonColor}; } svg { @@ -337,7 +341,7 @@ const StyledDropDown = styled(DropDown)` theme.interfaceDirection === "rtl" && "transform: scaleX(-1);"}; path { - fill: #4781d1; + fill: ${(props) => props.theme.filesPanels.invite.addButtonColor}; } } } diff --git a/packages/client/src/components/panels/InvitePanel/sub-components/ExternalLinks.js b/packages/client/src/components/panels/InvitePanel/sub-components/ExternalLinks.js index 3157df9554..880549992b 100644 --- a/packages/client/src/components/panels/InvitePanel/sub-components/ExternalLinks.js +++ b/packages/client/src/components/panels/InvitePanel/sub-components/ExternalLinks.js @@ -49,6 +49,7 @@ import { StyledToggleButton, StyledDescription, } from "../StyledInvitePanel"; +import { globalColors } from "@docspace/shared/themes"; const ExternalLinks = ({ t, @@ -197,8 +198,8 @@ const ExternalLinks = ({ props.theme.infoBar.background}; - color: #333; + color: ${(props) => props.theme.infoBar.textColor}; font-size: 12px; padding: 12px 16px; border-radius: 6px; @@ -55,7 +55,7 @@ const StyledInfoBar = styled.div` .header-icon { svg { path { - fill: #ed7309; + fill: ${(props) => props.theme.infoBar.iconFill}; } } } diff --git a/packages/client/src/components/panels/InvitePanel/sub-components/Item.js b/packages/client/src/components/panels/InvitePanel/sub-components/Item.js index 1bccecb7b6..166401fc6a 100644 --- a/packages/client/src/components/panels/InvitePanel/sub-components/Item.js +++ b/packages/client/src/components/panels/InvitePanel/sub-components/Item.js @@ -196,11 +196,10 @@ const Item = ({ {!isGroup && ( {`${typeLabel} | ${email}`} diff --git a/packages/client/src/components/panels/InvitePanel/utils/index.js b/packages/client/src/components/panels/InvitePanel/utils/index.js index 951954fe6b..a08e7d37a4 100644 --- a/packages/client/src/components/panels/InvitePanel/utils/index.js +++ b/packages/client/src/components/panels/InvitePanel/utils/index.js @@ -29,6 +29,7 @@ import { RoomsType, EmployeeType, } from "@docspace/shared/enums"; +import { globalColors } from "@docspace/shared/themes"; import { checkIfAccessPaid } from "SRC_DIR/helpers"; /** @@ -92,7 +93,7 @@ export const getAccessOptions = ( productName: t("Common:ProductName"), }), ...(!standalone && { quota: t("Common:Paid") }), - color: "#EDC409", + color: globalColors.favoritesStatus, access: roomType === -1 ? EmployeeType.Admin : ShareAccessRights.FullAccess, type: "admin", @@ -102,7 +103,7 @@ export const getAccessOptions = ( label: t("Common:RoomAdmin"), description: getRoomAdminDescription(roomType, t), ...(!standalone && { quota: t("Common:Paid") }), - color: "#EDC409", + color: globalColors.favoritesStatus, access: roomType === -1 ? EmployeeType.User : ShareAccessRights.RoomManager, type: "manager", @@ -112,7 +113,7 @@ export const getAccessOptions = ( label: t("Common:PowerUser"), description: getPowerUserDescription(roomType, t), ...(!standalone && { quota: t("Common:Paid") }), - color: "#EDC409", + color: globalColors.favoritesStatus, access: roomType === -1 ? EmployeeType.Collaborator diff --git a/packages/client/src/components/panels/StyledPanels.js b/packages/client/src/components/panels/StyledPanels.js index 47ee244044..9370da04e7 100644 --- a/packages/client/src/components/panels/StyledPanels.js +++ b/packages/client/src/components/panels/StyledPanels.js @@ -29,7 +29,7 @@ import { Scrollbar } from "@docspace/shared/components/scrollbar"; import { Link } from "@docspace/shared/components/link"; import { desktop, mobile, tablet } from "@docspace/shared/utils"; import { isMobile } from "react-device-detect"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; const PanelStyles = css` .panel_combo-box { @@ -378,7 +378,7 @@ const StyledLinkRow = styled.div` .row_content { display: grid; grid-template-columns: 1fr 28px; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; } .combo-button { @@ -452,7 +452,7 @@ const StyledModalRowContainer = styled.div` } .embedding-panel_code-container { - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; } .embedding-panel_text { @@ -472,7 +472,7 @@ const StyledModalRowContainer = styled.div` .embedding-panel_link { margin-inline-end: 8px; - border: 1px solid #eceef1; + border: ${(props) => props.theme.filesPanels.embedding.border}; border-radius: 16px; line-height: 30px; padding: 4px 15px; @@ -489,7 +489,7 @@ const StyledModalRowContainer = styled.div` } .embedding-panel_code-container { - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; } .embedding-panel_text { diff --git a/packages/client/src/components/panels/UploadPanel/FileRow.js b/packages/client/src/components/panels/UploadPanel/FileRow.js index da64cefb7f..befc595f47 100644 --- a/packages/client/src/components/panels/UploadPanel/FileRow.js +++ b/packages/client/src/components/panels/UploadPanel/FileRow.js @@ -121,6 +121,7 @@ const StyledFileRow = styled(Row)` } .enter-password { + color: ${(props) => props.theme.filesPanels.upload.color}; margin-inline-end: 8px; text-decoration: underline dashed; cursor: pointer; @@ -132,6 +133,7 @@ const StyledFileRow = styled(Row)` } .convert_icon { + color: ${(props) => props.theme.filesPanels.upload.iconFill}; padding-inline-end: 12px; } @@ -145,6 +147,18 @@ const StyledFileRow = styled(Row)` cursor: pointer; } } + + .upload-panel-file-error_text { + ${(props) => + props.isError && + css` + color: ${props.theme.filesPanels.upload.color}; + `} + } + + .file-exst { + color: ${(props) => props.theme.filesPanels.upload.color}; + } `; class FileRow extends Component { constructor(props) { @@ -269,7 +283,7 @@ class FileRow extends Component { const { showPasswordInput, password, passwordValid } = this.state; const fileExtension = ext ? ( - + {ext} ) : ( @@ -295,14 +309,14 @@ class FileRow extends Component { isMediaActive={isMediaActive} showPasswordInput={showPasswordInput} withoutBorder + isError={item.error} > <> {item.fileId ? ( isMedia || (isPlugin && onPluginClick) ? ( @@ -312,11 +326,11 @@ class FileRow extends Component { ) : (
onFileClick(item.fileInfo ? item.fileInfo.webUrl : "") } fontWeight="600" - color={item.error && "#A3A9AE"} truncate // href={item.fileInfo ? item.fileInfo.webUrl : ""} // target={downloadInCurrentTab ? "_self" : "_blank"} @@ -328,7 +342,11 @@ class FileRow extends Component { ) ) : (
- + {name} {fileExtension} diff --git a/packages/client/src/components/panels/UploadPanel/SubComponents/ActionsUploadedFile.js b/packages/client/src/components/panels/UploadPanel/SubComponents/ActionsUploadedFile.js index 2791ece878..17e1a7220c 100644 --- a/packages/client/src/components/panels/UploadPanel/SubComponents/ActionsUploadedFile.js +++ b/packages/client/src/components/panels/UploadPanel/SubComponents/ActionsUploadedFile.js @@ -55,7 +55,6 @@ const ActionsUploadedFile = ({ item, onCancelCurrentUpload }) => { className="convert_icon" size="medium" isfill={true} - color="#A3A9AE" />
)} diff --git a/packages/client/src/components/panels/UploadPanel/SubComponents/ErrorFileUpload.js b/packages/client/src/components/panels/UploadPanel/SubComponents/ErrorFileUpload.js index 7cc9d6e3f8..4a58ce998b 100644 --- a/packages/client/src/components/panels/UploadPanel/SubComponents/ErrorFileUpload.js +++ b/packages/client/src/components/panels/UploadPanel/SubComponents/ErrorFileUpload.js @@ -70,7 +70,6 @@ const ErrorFileUpload = ({ {showPasswordInput ? t("HideInput") : t("EnterPassword")} diff --git a/packages/client/src/helpers/plugins/components/Plugin.js b/packages/client/src/helpers/plugins/components/Plugin.js index 115bc54e38..9860d559d8 100644 --- a/packages/client/src/helpers/plugins/components/Plugin.js +++ b/packages/client/src/helpers/plugins/components/Plugin.js @@ -44,7 +44,7 @@ const StyledPlugin = styled.div` height: 1px; width: 100%; - background-color: #858585; + background-color: ${(props) => props.theme.plugins.color}; } `; diff --git a/packages/client/src/helpers/plugins/components/PluginInfo.js b/packages/client/src/helpers/plugins/components/PluginInfo.js index 57a1251598..5eb4d4ea93 100644 --- a/packages/client/src/helpers/plugins/components/PluginInfo.js +++ b/packages/client/src/helpers/plugins/components/PluginInfo.js @@ -58,7 +58,7 @@ const StyledInfo = styled.div` gap: 16px; .row-name { - color: #858585; + color: ${(props) => props.theme.plugins.color}; } } `; diff --git a/packages/client/src/pages/Confirm/sub-components/StyledCreateUser.js b/packages/client/src/pages/Confirm/sub-components/StyledCreateUser.js index a770f522f9..698f27bfd5 100644 --- a/packages/client/src/pages/Confirm/sub-components/StyledCreateUser.js +++ b/packages/client/src/pages/Confirm/sub-components/StyledCreateUser.js @@ -82,6 +82,7 @@ export const RegisterContainer = styled.div` width: 100%; .or-label { + color: ${(props) => props.theme.invitePage.textColor}; margin: 0 8px; } @@ -90,7 +91,7 @@ export const RegisterContainer = styled.div` display: flex; width: 100%; align-items: center; - color: ${(props) => props.theme.invitePage.borderColor};; + color: ${(props) => props.theme.invitePage.borderColor}; padding-top: 35px; margin-bottom: 32px; } diff --git a/packages/client/src/pages/Confirm/sub-components/createUser.js b/packages/client/src/pages/Confirm/sub-components/createUser.js index 5e5578ae9f..a4f89aa6d4 100644 --- a/packages/client/src/pages/Confirm/sub-components/createUser.js +++ b/packages/client/src/pages/Confirm/sub-components/createUser.js @@ -709,9 +709,7 @@ const CreateUserForm = (props) => { {!emailFromLink && (oauthDataExists() || ssoExists()) && ( <>
- - {t("Common:orContinueWith")} - + {t("Common:orContinueWith")}
props.theme.dialogs.borderColor}; --color-border-muted: hsla(210, 18%, 87%, 1); .modal-footer { @@ -53,7 +53,7 @@ const StyledModalDialog = styled(ModalDialog)` } a { - color: #4781d1; + color: ${(props) => props.theme.dialogs.linkColor}; } .debug-info-body, diff --git a/packages/client/src/pages/FormGallery/TilesView/StyledTileView.js b/packages/client/src/pages/FormGallery/TilesView/StyledTileView.js index cedd687cea..eff9cb82b3 100644 --- a/packages/client/src/pages/FormGallery/TilesView/StyledTileView.js +++ b/packages/client/src/pages/FormGallery/TilesView/StyledTileView.js @@ -25,7 +25,7 @@ // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode import styled, { css } from "styled-components"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import TileContent from "./sub-components/TileContent"; import { ContextMenu } from "@docspace/shared/components/context-menu"; @@ -51,14 +51,17 @@ const StyledTile = styled.div` width: 100%; border: ${(props) => props.theme.filesSection.tilesView.tile.border}; border-radius: 6px; - ${(props) => props.showHotkeyBorder && "border-color: #2DA7DB"}; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + ${(props) => + props.showHotkeyBorder && `border-color: ${globalColors.lightSecondMain}`}; + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; ${(props) => props.isSelected && checkedStyle} &:before, &:after { - ${(props) => props.showHotkeyBorder && "border-color: #2DA7DB"}; + ${(props) => + props.showHotkeyBorder && + `border-color: ${globalColors.lightSecondMain}`}; } &:before, diff --git a/packages/client/src/pages/Home/InfoPanel/Body/styles/gallery.js b/packages/client/src/pages/Home/InfoPanel/Body/styles/gallery.js index f697199a47..075027296e 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/styles/gallery.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/styles/gallery.js @@ -26,14 +26,14 @@ import styled from "styled-components"; import { isMobileOnly } from "react-device-detect"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; const StyledGalleryThumbnail = styled.div` box-sizing: border-box; width: 100%; overflow: hidden; border-radius: 6px; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; height: ${isMobileOnly ? "335px" : "346px"}; border: ${(props) => `solid 1px ${props.theme.infoPanel.gallery.borderColor}`}; diff --git a/packages/client/src/pages/Home/InfoPanel/Body/styles/groups.styled.ts b/packages/client/src/pages/Home/InfoPanel/Body/styles/groups.styled.ts index 33d9065c2d..e642791e66 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/styles/groups.styled.ts +++ b/packages/client/src/pages/Home/InfoPanel/Body/styles/groups.styled.ts @@ -65,7 +65,7 @@ export const GroupsContent = styled.div<{}>` .email { max-width: 180px; - color: #a3a9ae; + color: ${(props) => props.theme.infoPanel.groups.textColor}; font-size: 12px; line-height: 16px; font-style: normal; @@ -83,7 +83,7 @@ export const GroupsContent = styled.div<{}>` margin-inline-start: auto; .group-manager-tag { white-space: nowrap; - color: #d0d5da; + color: ${(props) => props.theme.infoPanel.groups.tagColor}; font-size: 12px; font-weight: 600; line-height: 16px; diff --git a/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/AccountsItemTitle.js b/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/AccountsItemTitle.js index 890ecb92e8..6f60b742fe 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/AccountsItemTitle.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/AccountsItemTitle.js @@ -38,6 +38,7 @@ import Badges from "@docspace/client/src/pages/Home/Section/AccountsBody/Badges" import { StyledAccountsItemTitle } from "../../styles/accounts"; import { decode } from "he"; +import { globalColors } from "@docspace/shared/themes"; const AccountsItemTitle = ({ t, @@ -114,8 +115,12 @@ const AccountsItemTitle = ({ id="sso-badge-info-panel" className="sso-badge" label={t("Common:SSO")} - color={"#FFFFFF"} - backgroundColor={theme.isBase ? "#22C386" : "#2E5E4C"} + color={globalColors.white} + backgroundColor={ + theme.isBase + ? globalColors.secondGreen + : globalColors.secondGreenDark + } fontSize={"9px"} fontWeight={800} noHover @@ -133,8 +138,12 @@ const AccountsItemTitle = ({ id="ldap-badge-info-panel" className="ldap-badge" label={t("Common:LDAP")} - color={"#FFFFFF"} - backgroundColor={theme.isBase ? "#8570BD" : "#544C6A"} + color={globalColors.white} + backgroundColor={ + theme.isBase + ? globalColors.secondPurple + : globalColors.secondPurpleDark + } fontSize={"9px"} fontWeight={800} noHover diff --git a/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/GroupsItemTitle.js b/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/GroupsItemTitle.js index bef8cb18a9..28c3cb61dc 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/GroupsItemTitle.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/GroupsItemTitle.js @@ -36,6 +36,7 @@ import { inject, observer } from "mobx-react"; import { decode } from "he"; import { Badge } from "@docspace/shared/components/badge"; import { Tooltip } from "@docspace/shared/components/tooltip"; +import { globalColors } from "@docspace/shared/themes"; const GroupsItemTitle = ({ t, @@ -95,8 +96,8 @@ const GroupsItemTitle = ({ id="ldap-badge-info-panel" className="ldap-badge" label={t("Common:LDAP")} - color={"#FFFFFF"} - backgroundColor={theme.isBase ? "#8570BD" : "#544C6A"} + color={globalColors.white} + backgroundColor={globalColors.secondPurple} fontSize={"9px"} fontWeight={800} noHover diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/Members/User.js b/packages/client/src/pages/Home/InfoPanel/Body/views/Members/User.js index d54dcc0ea3..2ea0f53231 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/views/Members/User.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/views/Members/User.js @@ -26,6 +26,8 @@ import { useState } from "react"; import { inject, observer } from "mobx-react"; +import { useTheme } from "styled-components"; + import AtReactSvgUrl from "PUBLIC_DIR/images/@.react.svg?url"; import { StyledUser } from "../../styles/members"; import { Avatar } from "@docspace/shared/components/avatar"; @@ -68,6 +70,8 @@ const User = ({ if (!infoPanelSelection) return null; if (!user.displayName && !user.name && !user.email) return null; + const theme = useTheme(); + const security = infoPanelSelection ? infoPanelSelection.security : {}; const isExpect = user.isExpect; const canInviteUserInRoomAbility = security?.EditAccess; @@ -263,7 +267,7 @@ const User = ({ fontSize="12px" noSelect truncate - color="#A3A9AE !important" + color={theme.infoPanel.members.subtitleColor} dir="auto" > {`${typeLabel} | ${user.email}`} @@ -356,7 +360,7 @@ const User = ({ fontSize="12px" noSelect truncate - color="#A3A9AE" + color={theme.infoPanel.members.subtitleColor} dir="auto" > {`${typeLabel} | ${user.email}`} diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/Members/sub-components/Styled.js b/packages/client/src/pages/Home/InfoPanel/Body/views/Members/sub-components/Styled.js index 10498a56fa..f51982c7cb 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/views/Members/sub-components/Styled.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/views/Members/sub-components/Styled.js @@ -25,26 +25,8 @@ // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode import styled, { css } from "styled-components"; - -import CrossReactSvg from "PUBLIC_DIR/images/cross.react.svg"; - -import { commonIconsStyles } from "@docspace/shared/utils"; import { Base } from "@docspace/shared/themes"; -const StyledCrossIcon = styled(CrossReactSvg)` - ${commonIconsStyles} - - g { - path { - fill: #657077; - } - } - - path { - fill: #999976; - } -`; - const LinksBlock = styled.div` display: flex; height: 100%; @@ -158,4 +140,4 @@ export const StyledPublicRoomBarContainer = styled.div` StyledLinkRow.defaultProps = { theme: Base }; -export { StyledCrossIcon, LinksBlock, StyledLinkRow }; +export { LinksBlock, StyledLinkRow }; diff --git a/packages/client/src/pages/Home/Section/AccountsBody/Badges.js b/packages/client/src/pages/Home/Section/AccountsBody/Badges.js index 806723528c..97dbc751bf 100644 --- a/packages/client/src/pages/Home/Section/AccountsBody/Badges.js +++ b/packages/client/src/pages/Home/Section/AccountsBody/Badges.js @@ -31,7 +31,7 @@ import { withTranslation } from "react-i18next"; import { useNavigate, useLocation } from "react-router-dom"; import { PaymentsType, AccountLoginType } from "@docspace/shared/enums"; - +import { globalColors } from "@docspace/shared/themes"; import { Badge } from "@docspace/shared/components/badge"; import { commonIconsStyles } from "@docspace/shared/utils"; @@ -61,13 +61,13 @@ const StyledPaidBadge = styled(Badge)` const StyledSendClockIcon = styled(SendClockIcon)` ${commonIconsStyles} path { - fill: #a3a9ae; + fill: ${(props) => props.theme.accountsBadges.pendingColor}; } `; const StyledCatalogSpamIcon = styled(CatalogSpamIcon)` ${commonIconsStyles} path { - fill: #f21c0e; + fill: ${(props) => props.theme.accountsBadges.disabledColor}; } `; @@ -116,8 +116,12 @@ const Badges = ({ + props.theme.filesSection.tableView.row.backgroundGroup}; + color: ${(props) => props.theme.filesSection.tableView.row.color}; border-radius: 50%; } `; diff --git a/packages/client/src/pages/Home/Section/AccountsBody/Groups/TableView/GroupsTableItem.js b/packages/client/src/pages/Home/Section/AccountsBody/Groups/TableView/GroupsTableItem.js index be0209ee8f..6923f688a6 100644 --- a/packages/client/src/pages/Home/Section/AccountsBody/Groups/TableView/GroupsTableItem.js +++ b/packages/client/src/pages/Home/Section/AccountsBody/Groups/TableView/GroupsTableItem.js @@ -34,6 +34,7 @@ import * as Styled from "./index.styled"; import { Text } from "@docspace/shared/components/text"; import { Avatar } from "@docspace/shared/components/avatar"; import Badges from "../../Badges"; +import { globalColors } from "@docspace/shared/themes"; const GroupsTableItem = ({ t, @@ -147,7 +148,7 @@ const GroupsTableItem = ({ fontSize="13px" isTextOverflow className="table-cell_group-manager" - color={"#A3A9AE"} + color={globalColors.gray} dir="auto" > {item.manager?.displayName} diff --git a/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/RowView/SimpleUserRow.js b/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/RowView/SimpleUserRow.js index 02fac9c2bf..9cd23a86b9 100644 --- a/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/RowView/SimpleUserRow.js +++ b/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/RowView/SimpleUserRow.js @@ -29,7 +29,7 @@ import styled, { css } from "styled-components"; import { isMobile } from "react-device-detect"; import { Row } from "@docspace/shared/components/row"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import withContent from "SRC_DIR/HOCs/withPeopleContent"; @@ -112,7 +112,7 @@ const StyledSimpleUserRow = styled(Row)` `} position: unset; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; .styled-element { height: 32px; diff --git a/packages/client/src/pages/Home/Section/AccountsBody/People/RowView/SimpleUserRow.js b/packages/client/src/pages/Home/Section/AccountsBody/People/RowView/SimpleUserRow.js index 2b69becf40..394daad855 100644 --- a/packages/client/src/pages/Home/Section/AccountsBody/People/RowView/SimpleUserRow.js +++ b/packages/client/src/pages/Home/Section/AccountsBody/People/RowView/SimpleUserRow.js @@ -29,7 +29,7 @@ import styled, { css } from "styled-components"; import { isMobile } from "react-device-detect"; import { Row } from "@docspace/shared/components/row"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import withContent from "SRC_DIR/HOCs/withPeopleContent"; @@ -112,8 +112,7 @@ const StyledSimpleUserRow = styled(Row)` `} position: unset; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; .styled-element { height: 32px; margin-inline-end: 12px; diff --git a/packages/client/src/pages/Home/Section/Body/RowsView/SimpleFilesRow.js b/packages/client/src/pages/Home/Section/Body/RowsView/SimpleFilesRow.js index 6cc8580602..1dd8f5e70e 100644 --- a/packages/client/src/pages/Home/Section/Body/RowsView/SimpleFilesRow.js +++ b/packages/client/src/pages/Home/Section/Body/RowsView/SimpleFilesRow.js @@ -44,7 +44,7 @@ import withQuickButtons from "../../../../../HOCs/withQuickButtons"; import withBadges from "../../../../../HOCs/withBadges"; import ItemIcon from "../../../../../components/ItemIcon"; import marginStyles from "./CommonStyles"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import CursorPalmReactSvgUrl from "PUBLIC_DIR/images/cursor.palm.react.svg?url"; @@ -89,7 +89,7 @@ const StyledWrapper = styled.div` ${(props) => props.showHotkeyBorder && css` - border-color: #2da7db !important; + border-color: ${globalColors.lightSecondMain} !important; z-index: 1; position: relative; @@ -142,7 +142,7 @@ const StyledSimpleFilesRow = styled(Row)` } `} - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; .styled-element { height: 32px; diff --git a/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js b/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js index e1d424da6b..d2744e19b8 100644 --- a/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js +++ b/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js @@ -25,14 +25,18 @@ // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode import styled, { css } from "styled-components"; -import Base from "@docspace/shared/themes/base"; +import { Base, globalColors } from "@docspace/shared/themes"; import { TableRow } from "@docspace/shared/components/table"; import DragAndDrop from "@docspace/shared/components/drag-and-drop/DragAndDrop"; import CursorPalmSvgUrl from "PUBLIC_DIR/images/cursor.palm.react.svg?url"; const hotkeyBorderStyle = css` border-image-slice: 1; - border-image-source: linear-gradient(to left, #2da7db 24px, #2da7db 24px); + border-image-source: linear-gradient( + to left, + ${globalColors.lightSecondMain} 24px, + ${globalColors.lightSecondMain} 24px + ); `; const rowCheckboxDraggingStyle = css` @@ -128,7 +132,7 @@ const StyledTableRow = styled(TableRow)` props.showHotkeyBorder && css` z-index: 1; - border-color: #2da7db !important; + border-color: ${globalColors.lightSecondMain} !important; `} } @@ -334,7 +338,7 @@ const StyledQuickButtonsContainer = styled.div` fill: ${(props) => props.theme.filesSection.tableView.row.shareHoverColor}; } - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; } `; diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomCell.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomCell.js index 7990a2733b..13f9de8259 100644 --- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomCell.js +++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomCell.js @@ -31,6 +31,7 @@ import React, { useState } from "react"; import { StyledText } from "./CellStyles"; import { getFolderPath } from "@docspace/shared/api/files"; import { CategoryType } from "@docspace/client/src/helpers/constants"; +import { globalColors } from "@docspace/shared/themes"; const RoomCell = ({ sideColor, item }) => { const { originRoomTitle, originId, originTitle } = item; @@ -78,7 +79,7 @@ const RoomCell = ({ sideColor, item }) => { getContent={() => ( {isTooltipLoading ? ( - + ) : ( path.map((pathPart, i) => ( diff --git a/packages/client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js b/packages/client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js index a1ef6bcbe3..f7229deb52 100644 --- a/packages/client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js +++ b/packages/client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js @@ -36,7 +36,7 @@ import { isMobile } from "react-device-detect"; import { withTheme } from "styled-components"; import { Link } from "@docspace/shared/components/link"; import { Loader } from "@docspace/shared/components/loader"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import { Tags } from "@docspace/shared/components/tags"; import { Tag } from "@docspace/shared/components/tag"; import { getRoomTypeName } from "SRC_DIR/helpers/filesUtils"; @@ -154,10 +154,11 @@ const StyledTile = styled.div` isRooms ? theme.filesSection.tilesView.tile.roomsBorderRadius : theme.filesSection.tilesView.tile.borderRadius}; - ${(props) => props.showHotkeyBorder && "border-color: #2DA7DB"}; + ${(props) => + props.showHotkeyBorder && `border-color: ${globalColors.lightSecondMain}`}; ${(props) => props.isFolder && !props.isRooms && "border-start-start-radius: 6px;"} - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; ${(props) => props.isFolder && (props.isRoom ? roomsStyles : FlexBoxStyles)}; ${(props) => (props.isFolder ? FolderStyles : FileStyles)}; @@ -200,7 +201,9 @@ const StyledTile = styled.div` &:before, &:after { - ${(props) => props.showHotkeyBorder && "border-color: #2DA7DB"}; + ${(props) => + props.showHotkeyBorder && + `border-color: ${globalColors.lightSecondMain}`}; } &:before, @@ -468,7 +471,7 @@ const StyledIcons = styled.div` background: ${(props) => props.theme.filesSection.tilesView.tile.backgroundBadgeColor}; border-radius: 4px; - box-shadow: 0px 2px 4px rgba(4, 15, 27, 0.16); + box-shadow: 0px 2px 4px ${globalColors.badgeShadow}; } `; diff --git a/packages/client/src/pages/Home/Section/Header/index.js b/packages/client/src/pages/Home/Section/Header/index.js index 5da84d1df1..4442ac43e5 100644 --- a/packages/client/src/pages/Home/Section/Header/index.js +++ b/packages/client/src/pages/Home/Section/Header/index.js @@ -50,6 +50,7 @@ import { getCategoryUrl, } from "SRC_DIR/helpers/utils"; import TariffBar from "SRC_DIR/components/TariffBar"; +import { globalColors } from "@docspace/shared/themes"; const StyledContainer = styled.div` width: 100%; @@ -58,7 +59,7 @@ const StyledContainer = styled.div` .table-container_group-menu { margin-block: 0; margin-inline: -20px 0; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; width: calc(100% + 40px); height: 68px; diff --git a/packages/client/src/pages/PortalSettings/Layout/Section/Header/index.js b/packages/client/src/pages/PortalSettings/Layout/Section/Header/index.js index ae82bbf023..7ec9e58b9e 100644 --- a/packages/client/src/pages/PortalSettings/Layout/Section/Header/index.js +++ b/packages/client/src/pages/PortalSettings/Layout/Section/Header/index.js @@ -40,6 +40,7 @@ import LoaderSectionHeader from "../loaderSectionHeader"; import { mobile, tablet, desktop, isMobile } from "@docspace/shared/utils"; import withLoading from "SRC_DIR/HOCs/withLoading"; import { Badge } from "@docspace/shared/components/badge"; +import { globalColors } from "@docspace/shared/themes"; import { getKeyByLink, settingsTree, @@ -349,7 +350,11 @@ const SectionHeaderContent = (props) => {
{translatedHeader}
{isNeedPaidIcon ? ( (props.theme.isBase ? "#eceef1" : "#474747")} + background: ${(props) => + props.theme.client.settings.common.appearance.themeAddBackground} url(${PlusThemeSvgUrl}) no-repeat center; } .add-theme { - background: #d0d5da; + background: ${(props) => + props.theme.client.settings.common.appearance.addThemeBackground}; padding-top: 16px; padding-inline-start: 16px; box-sizing: border-box; diff --git a/packages/client/src/pages/PortalSettings/categories/common/Appearance/StyledPreview.js b/packages/client/src/pages/PortalSettings/categories/common/Appearance/StyledPreview.js index 14bbb639f3..d1f5418253 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/Appearance/StyledPreview.js +++ b/packages/client/src/pages/PortalSettings/categories/common/Appearance/StyledPreview.js @@ -25,7 +25,7 @@ // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode import styled, { css } from "styled-components"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; const StyledComponent = styled.div` display: inline-flex; @@ -40,7 +40,9 @@ const StyledComponent = styled.div` height: 100%; background: ${(props) => - props.themePreview === "Light" ? "#f8f9f9" : "#292929"}; + props.themePreview === "Light" + ? globalColors.grayLight + : globalColors.darkGrayLight}; ${(props) => props.withBorder && css` @@ -63,7 +65,9 @@ const StyledComponent = styled.div` width: 20px; height: 1px; background: ${(props) => - props.themePreview === "Light" ? "#eceef1" : "#474747"}; + props.themePreview === "Light" + ? globalColors.grayLightMid + : globalColors.grayDarkStrong}; margin: 0 20px 31px; } @@ -75,7 +79,8 @@ const StyledComponent = styled.div` circle { fill: ${(props) => props.colorPreview}; - stroke: ${(props) => props.themePreview === "Dark" && "#292929"}; + stroke: ${(props) => + props.themePreview === "Dark" && globalColors.darkGrayLight}; } } @@ -115,7 +120,7 @@ const StyledComponent = styled.div` border-inline-start-style: none; `} background: ${(props) => - props.themePreview === "Light" ? "#FFFFFF" : "#333333"}; + props.themePreview === "Light" ? globalColors.white : globalColors.black}; } .section-header { @@ -169,7 +174,7 @@ const StyledComponent = styled.div` .color-badge rect { fill: ${(props) => props.themePreview === "Dark" && props.selectThemeId === 7 - ? "#FFFFFF" + ? globalColors.white : props.colorPreview} !important; } @@ -177,7 +182,7 @@ const StyledComponent = styled.div` fill: ${(props) => props.themePreview === "Light" ? `${props.colorPreview} !important` - : `#FFFFFF !important`}; + : `${globalColors.white} !important`}; } .menu-section { @@ -193,7 +198,9 @@ const StyledComponent = styled.div` .loaders-theme { background-color: ${(props) => - props.themePreview === "Light" ? "#FFF" : "#858585"}; + props.themePreview === "Light" + ? globalColors.white + : globalColors.grayDark}; border-radius: 3px; } @@ -227,7 +234,7 @@ const StyledComponent = styled.div` padding-top: 9px; padding-bottom: 9px !important; background: ${(props) => - props.themePreview === "Light" ? "#f0f0f0" : "#333333"}; + props.themePreview === "Light" ? globalColors.white : globalColors.black}; } .section-tile { @@ -237,7 +244,9 @@ const StyledComponent = styled.div` .border-color { border-color: ${(props) => - props.themePreview === "Light" ? "#d0d5da" : "#474747"}; + props.themePreview === "Light" + ? globalColors.grayStrong + : globalColors.grayDarkStrong}; } .tile { @@ -250,7 +259,9 @@ const StyledComponent = styled.div` .background { background: ${(props) => - props.themePreview === "Light" ? "#FFF" : "#292929"}; + props.themePreview === "Light" + ? globalColors.white + : globalColors.darkGrayLight}; } .tile-name { @@ -314,7 +325,7 @@ const StyledComponent = styled.div` fill: ${(props) => props.themePreview === "Light" ? `${props.colorPreview} !important` - : `#FFFFFF !important`}; + : `${globalColors.white} !important`}; } } @@ -323,7 +334,7 @@ const StyledComponent = styled.div` } .main-button_text { - color: #ffffff !important; + color: ${globalColors.white} !important; } `; @@ -339,7 +350,7 @@ const StyledFloatingButton = styled.div` display: flex; align-items: center; justify-content: center; - box-shadow: 0px 12px 40px rgba(4, 15, 27, 0.12); + box-shadow: 0px 12px 40px ${globalColors.popupShadow}; `; StyledFloatingButton.defaultProps = { theme: Base }; @@ -361,10 +372,12 @@ const StyledMobilePreview = styled.div` border-radius: 16px; padding: 0px 16px; background: ${({ themePreview }) => - themePreview === "Light" ? "#FFFFFF" : "#333333"}; + themePreview === "Light" ? globalColors.white : globalColors.black}; border: ${({ themePreview }) => - themePreview === "Light" ? "1px solid #d0d5da" : "1px solid #474747"}; + themePreview === "Light" + ? `1px solid ${globalColors.grayStrong}` + : `1px solid ${globalColors.grayDarkStrong}`}; .section-search { height: 30px; @@ -390,7 +403,7 @@ const StyledMobilePreview = styled.div` .color-badge rect { fill: ${(props) => props.themePreview === "Dark" && props.selectThemeId === 7 - ? "#FFFFFF" + ? globalColors.white : props.colorPreview} !important; } @@ -398,7 +411,7 @@ const StyledMobilePreview = styled.div` fill: ${(props) => props.themePreview === "Light" ? `${props.colorPreview} !important` - : `#FFFFFF !important`}; + : `${globalColors.white} !important`}; } .menu-section { @@ -409,33 +422,41 @@ const StyledMobilePreview = styled.div` .loaders-theme { background-color: ${(props) => - props.themePreview === "Light" ? "#FFF" : "#545454"}; + props.themePreview === "Light" + ? globalColors.white + : globalColors.grayDark}; border-radius: 3px; } .loaders-tile-theme { background: ${(props) => - props.themePreview === "Light" ? "#F1F1F1" : "#333333"}; + props.themePreview === "Light" ? globalColors.white : globalColors.black}; border-radius: 3px; } .loaders-tile-text-theme { background: ${(props) => - props.themePreview === "Light" ? "#D0D5DA" : "#858585"}; + props.themePreview === "Light" + ? globalColors.grayStrong + : globalColors.grayDark}; border-radius: 3px; } .loaders-theme-avatar { background-color: ${(props) => - props.themePreview === "Light" ? "#FFF" : "#545454"}; + props.themePreview === "Light" + ? globalColors.white + : globalColors.grayDark}; border-radius: 50px; } .border-color { border-color: ${(props) => - props.themePreview === "Light" ? "#d0d5da" : "#474747"}; + props.themePreview === "Light" + ? globalColors.grayStrong + : globalColors.grayDarkStrong}; } .tile { @@ -448,7 +469,9 @@ const StyledMobilePreview = styled.div` .background { background: ${(props) => - props.themePreview === "Light" ? "#FFF" : "#292929"}; + props.themePreview === "Light" + ? globalColors.white + : globalColors.darkGrayLight}; } .tile-name { @@ -504,7 +527,7 @@ const StyledMobilePreview = styled.div` fill: ${(props) => props.themePreview === "Light" ? `${props.colorPreview} !important` - : `#FFFFFF !important`}; + : `${globalColors.white} !important`}; } } @@ -523,7 +546,9 @@ const StyledMobilePreview = styled.div` padding: 0 16px; background: ${({ themePreview }) => - themePreview === "Light" ? "#FFFFFF" : "#282828"}; + themePreview === "Light" + ? globalColors.white + : globalColors.darkGrayLight}; border-radius: 16px 16px 0px 0px; } @@ -541,7 +566,7 @@ const StyledMobilePreview = styled.div` .color-badge rect { fill: ${({ themePreview, selectThemeId, colorPreview }) => themePreview === "Dark" && selectThemeId === 7 - ? "#FFFFFF" + ? globalColors.white : colorPreview} !important; } .section-badge { @@ -562,7 +587,8 @@ const StyledMobilePreview = styled.div` .icon-button_svg { svg { path { - fill: #a3a9ae; + fill: ${(props) => + props.theme.client.settings.common.appearance.iconFill}; } } } diff --git a/packages/client/src/pages/PortalSettings/categories/common/Appearance/preview.js b/packages/client/src/pages/PortalSettings/categories/common/Appearance/preview.js index c32ce0948b..2eb983623a 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/Appearance/preview.js +++ b/packages/client/src/pages/PortalSettings/categories/common/Appearance/preview.js @@ -40,6 +40,7 @@ import ButtonPlusIcon from "PUBLIC_DIR/images/actions.button.plus.react.svg"; import { saveToSessionStorage, getFromSessionStorage } from "../../../utils"; import { isMobile, isTablet } from "@docspace/shared/utils"; +import { globalColors } from "@docspace/shared/themes"; const Preview = (props) => { const { @@ -366,8 +367,21 @@ const Preview = (props) => { fill="none" xmlns="http://www.w3.org/2000/svg" > - - + + diff --git a/packages/client/src/pages/PortalSettings/categories/common/Branding/companyInfoSettings.js b/packages/client/src/pages/PortalSettings/categories/common/Branding/companyInfoSettings.js index 336c5a956e..4eebc91f82 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/Branding/companyInfoSettings.js +++ b/packages/client/src/pages/PortalSettings/categories/common/Branding/companyInfoSettings.js @@ -49,13 +49,18 @@ import { saveToSessionStorage, getFromSessionStorage } from "../../../utils"; const StyledComponent = styled.div` .link { font-weight: 600; - border-bottom: 1px dashed #333333; - border-color: ${(props) => !props.isSettingPaid && "#A3A9AE"}; + border-bottom: ${(props) => + props.theme.client.settings.common.companyInfo.border}; + border-color: ${(props) => + !props.isSettingPaid && + props.theme.client.settings.common.companyInfo.color}; } .description, .link { - color: ${(props) => !props.isSettingPaid && "#A3A9AE"}; + color: ${(props) => + !props.isSettingPaid && + props.theme.client.settings.common.companyInfo.color}; } .text-input { diff --git a/packages/client/src/pages/PortalSettings/categories/common/Branding/whitelabel.js b/packages/client/src/pages/PortalSettings/categories/common/Branding/whitelabel.js index 2f76e333c4..c600ec5de4 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/Branding/whitelabel.js +++ b/packages/client/src/pages/PortalSettings/categories/common/Branding/whitelabel.js @@ -39,7 +39,7 @@ import { SaveCancelButtons } from "@docspace/shared/components/save-cancel-butto import { toastr } from "@docspace/shared/components/toast"; import { isManagement } from "@docspace/shared/utils/common"; import { size } from "@docspace/shared/utils"; - +import { globalColors } from "@docspace/shared/themes"; import { saveToSessionStorage, getFromSessionStorage } from "../../../utils"; import WhiteLabelWrapper from "./StyledWhitelabel"; import LoaderWhiteLabel from "../sub-components/loaderWhiteLabel"; @@ -177,7 +177,7 @@ const WhiteLabelComponent = (props) => { options.height, options.text, options.fontSize, - isDocsEditorName ? "#fff" : "#000", + isDocsEditorName ? globalColors.white : globalColors.darkBlack, options.alignCenter, options.isEditor, ); @@ -186,7 +186,7 @@ const WhiteLabelComponent = (props) => { options.height, options.text, options.fontSize, - "#fff", + globalColors.white, options.alignCenter, options.isEditor, ); @@ -289,7 +289,11 @@ const WhiteLabelComponent = (props) => { diff --git a/packages/client/src/pages/PortalSettings/categories/common/Customization/StyledSettings.js b/packages/client/src/pages/PortalSettings/categories/common/Customization/StyledSettings.js index d2a8e0f87c..1857c29fed 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/Customization/StyledSettings.js +++ b/packages/client/src/pages/PortalSettings/categories/common/Customization/StyledSettings.js @@ -79,6 +79,10 @@ const StyledSettingsComponent = styled.div` ${(props) => props.standalone && "margin-top: 14px"}; } + .dns-error-text { + color: ${(props) => props.theme.client.settings.common.dns.errorColor}; + } + .combo-button-label { max-width: 100%; font-weight: 400; @@ -92,7 +96,7 @@ const StyledSettingsComponent = styled.div` .errorText { position: absolute; font-size: 10px; - color: #f21c0e; + color: ${(props) => props.theme.client.settings.common.dns.errorColor}; } .settings-block__wrapper-language { diff --git a/packages/client/src/pages/PortalSettings/categories/common/Customization/dns-settings.js b/packages/client/src/pages/PortalSettings/categories/common/Customization/dns-settings.js index 45cf5c7913..f1a4cc1cc8 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/Customization/dns-settings.js +++ b/packages/client/src/pages/PortalSettings/categories/common/Customization/dns-settings.js @@ -48,6 +48,7 @@ import { Text } from "@docspace/shared/components/text"; import { Link } from "@docspace/shared/components/link"; import { DeviceType } from "@docspace/shared/enums"; import { parseDomain } from "@docspace/shared/utils/common"; +import { globalColors } from "@docspace/shared/themes"; const toggleStyle = { position: "static", @@ -213,10 +214,10 @@ const DNSSettingsComponent = (props) => { {errorText && errorText.map((err, index) => ( {err} @@ -227,7 +228,7 @@ const DNSSettingsComponent = (props) => { key="dns-hint" fontSize="12px" fontWeight="400" - color="#A3A9AE" + color={globalColors.gray} > {`${t("Settings:DNSSettingsHint")}${domainExampleText}`}
@@ -290,7 +291,11 @@ const DNSSettingsComponent = (props) => { diff --git a/packages/client/src/pages/PortalSettings/categories/common/appearance.js b/packages/client/src/pages/PortalSettings/categories/common/appearance.js index 519710dc2a..cafd95d1bb 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/appearance.js +++ b/packages/client/src/pages/PortalSettings/categories/common/appearance.js @@ -54,6 +54,7 @@ import { isMobile } from "@docspace/shared/utils"; import { DeviceType } from "@docspace/shared/enums"; import { ModalDialog } from "@docspace/shared/components/modal-dialog"; import { ColorPicker } from "@docspace/shared/components/color-picker"; +import { globalColors } from "@docspace/shared/themes"; const Appearance = (props) => { const { @@ -469,8 +470,8 @@ const Appearance = (props) => { ]); const getTextColor = (color) => { - const black = "#333333"; - const white = "#FFFFFF"; + const black = globalColors.black; + const white = globalColors.white; const rgba = hexRgb(color); diff --git a/packages/client/src/pages/PortalSettings/categories/common/sub-components/colorSchemeDialog.js b/packages/client/src/pages/PortalSettings/categories/common/sub-components/colorSchemeDialog.js index 7d3b536d05..73a032da76 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/sub-components/colorSchemeDialog.js +++ b/packages/client/src/pages/PortalSettings/categories/common/sub-components/colorSchemeDialog.js @@ -32,6 +32,7 @@ import { Button } from "@docspace/shared/components/button"; import { withTranslation } from "react-i18next"; import { isMobileOnly } from "react-device-detect"; import { isMobile } from "@docspace/shared/utils"; +import { globalColors } from "@docspace/shared/themes"; const StyledComponent = styled(ModalDialog)` .modal-dialog-aside-footer { @@ -39,7 +40,7 @@ const StyledComponent = styled(ModalDialog)` bottom: 0 !important; inset-inline-start: 0; padding: 16px; - box-shadow: 0px 12px 40px rgba(4, 15, 27, 0.12); + box-shadow: 0px 12px 40px ${globalColors.popupShadow}; } .new-colors-container { @@ -54,10 +55,12 @@ const StyledComponent = styled(ModalDialog)` padding-bottom: 20px; } - ${!isMobile() && - css` - max-width: 448px; - `} + ${ + !isMobile() && + css` + max-width: 448px; + ` + } } .name-color { @@ -74,19 +77,13 @@ const StyledComponent = styled(ModalDialog)` background: ${(props) => props.currentColorAccent ? props.currentColorAccent - : props.theme.isBase - ? `#eceef1 url(${PlusThemeSvgUrl}) no-repeat center` - : `#474747 url(${PlusThemeSvgUrl}) no-repeat center`}; - } + : `${props.theme.client.settings.common.appearance.accentBoxBackground} url(${PlusThemeSvgUrl}) no-repeat center`} .buttons-box { background: ${(props) => props.currentColorButtons ? props.currentColorButtons - : props.theme.isBase - ? `#eceef1 url(${PlusThemeSvgUrl}) no-repeat center` - : `#474747 url(${PlusThemeSvgUrl}) no-repeat center`}; - } + : `${props.theme.client.settings.common.appearance.buttonBoxBackground} url(${PlusThemeSvgUrl}) no-repeat center`} .modal-add-theme { width: 46px; @@ -96,34 +93,40 @@ const StyledComponent = styled(ModalDialog)` } .drop-down-container-hex { - ${isMobileOnly && - css` - width: 100%; - `} + ${ + isMobileOnly && + css` + width: 100%; + ` + } } .drop-down-item-hex { - ${isMobileOnly && - css` - width: calc(100vw - 32px); - `} + ${ + isMobileOnly && + css` + width: calc(100vw - 32px); + ` + } :hover { background-color: unset; } - ${!isMobile() && - css` - max-width: 227px; + ${ + !isMobile() && + css` + max-width: 227px; - .hex-color-picker { - max-width: 195px; - } + .hex-color-picker { + max-width: 195px; + } - .react-colorful__interactive { - max-width: 183px; - } - `} + .react-colorful__interactive { + max-width: 183px; + } + ` + } } `; diff --git a/packages/client/src/pages/PortalSettings/categories/data-import/StyledDataImport.ts b/packages/client/src/pages/PortalSettings/categories/data-import/StyledDataImport.ts index 3f4537e536..284b2ce0a0 100644 --- a/packages/client/src/pages/PortalSettings/categories/data-import/StyledDataImport.ts +++ b/packages/client/src/pages/PortalSettings/categories/data-import/StyledDataImport.ts @@ -28,7 +28,7 @@ import styled from "styled-components"; import { tablet, mobile } from "@docspace/shared/utils/device"; import { TableContainer } from "@docspace/shared/components/table"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; export const WorkspacesContainer = styled.div` max-width: 700px; @@ -78,7 +78,7 @@ export const WorkspacesContainer = styled.div` cursor: pointer; &:hover { - border-color: #4781d1; + border-color: ${globalColors.lightBlueMain}; } &:active { @@ -153,7 +153,7 @@ export const UsersInfoBlock = styled.div` display: flex; align-items: center; max-width: 660px; - background: #f8f9f9; + background: ${(props) => props.theme.client.settings.migration.background}; padding: 12px 16px; border-radius: 6px; margin: 16px 0; diff --git a/packages/client/src/pages/PortalSettings/categories/data-import/components/AddEmailsStep/AccountsTable/RowView/UsersRowContent.tsx b/packages/client/src/pages/PortalSettings/categories/data-import/components/AddEmailsStep/AccountsTable/RowView/UsersRowContent.tsx index 04e083cc73..e8e20a10d9 100644 --- a/packages/client/src/pages/PortalSettings/categories/data-import/components/AddEmailsStep/AccountsTable/RowView/UsersRowContent.tsx +++ b/packages/client/src/pages/PortalSettings/categories/data-import/components/AddEmailsStep/AccountsTable/RowView/UsersRowContent.tsx @@ -43,7 +43,7 @@ import EditSvg from "PUBLIC_DIR/images/access.edit.react.svg"; import CrossSvg from "PUBLIC_DIR/images/cross.edit.react.svg"; import CheckSvg from "PUBLIC_DIR/images/check.edit.react.svg"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import EmailChangeDialog from "SRC_DIR/components/dialogs/EmailChangeDialog"; import { @@ -188,7 +188,12 @@ const UsersRowContent = (props: AddEmailRowContentProps) => { {displayName} - + {prevEmail === "" ? t("Settings:NoEmail") : prevEmail}
diff --git a/packages/client/src/pages/PortalSettings/categories/data-import/components/AddEmailsStep/AccountsTable/TableView/UsersTableRow.tsx b/packages/client/src/pages/PortalSettings/categories/data-import/components/AddEmailsStep/AccountsTable/TableView/UsersTableRow.tsx index f21dafd6d6..d95c9507d0 100644 --- a/packages/client/src/pages/PortalSettings/categories/data-import/components/AddEmailsStep/AccountsTable/TableView/UsersTableRow.tsx +++ b/packages/client/src/pages/PortalSettings/categories/data-import/components/AddEmailsStep/AccountsTable/TableView/UsersTableRow.tsx @@ -40,7 +40,7 @@ import EditSvg from "PUBLIC_DIR/images/access.edit.react.svg"; import CrossSvg from "PUBLIC_DIR/images/cross.edit.react.svg"; import CheckSvg from "PUBLIC_DIR/images/check.edit.react.svg"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import { InputType } from "@docspace/shared/components/text-input"; import { TValidate } from "@docspace/shared/components/email-input/EmailInput.types"; @@ -232,7 +232,7 @@ const UsersTableRow = (props: AddEmailTableRowProps) => { ) : ( - + {prevEmail !== "" ? prevEmail : t("Settings:NoEmail")} diff --git a/packages/client/src/pages/PortalSettings/categories/data-import/components/Providers.tsx b/packages/client/src/pages/PortalSettings/categories/data-import/components/Providers.tsx index 6ec00900d7..ebfcca7ec7 100644 --- a/packages/client/src/pages/PortalSettings/categories/data-import/components/Providers.tsx +++ b/packages/client/src/pages/PortalSettings/categories/data-import/components/Providers.tsx @@ -100,9 +100,9 @@ const Providers = (props: ProvidersProps) => { > diff --git a/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersStep/AccountsTable/RowView/index.tsx b/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersStep/AccountsTable/RowView/index.tsx index 332596d400..1043b6150d 100644 --- a/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersStep/AccountsTable/RowView/index.tsx +++ b/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersStep/AccountsTable/RowView/index.tsx @@ -38,6 +38,7 @@ import { Row } from "@docspace/shared/components/row"; import { Text } from "@docspace/shared/components/text"; import EmptyScreenUserReactSvgUrl from "PUBLIC_DIR/images/empty_screen_user.react.svg?url"; import ClearEmptyFilterSvgUrl from "PUBLIC_DIR/images/clear.empty.filter.svg?url"; +import { globalColors } from "@docspace/shared/themes"; import { TEnhancedMigrationUser } from "@docspace/shared/api/settings/types"; import UsersRow from "./UsersRow"; import { InjectedRowViewProps, RowViewProps } from "../../../../types"; @@ -45,6 +46,56 @@ import { InjectedRowViewProps, RowViewProps } from "../../../../types"; const StyledRowContainer = styled(RowContainer)` margin: 0 0 20px; + .table-group-menu { + height: 61px; + position: sticky; + z-index: 201; + ${(props) => + props.theme.interfaceDirection === "rtl" + ? css` + margin-right: -16px; + ` + : css` + margin-left: -16px; + `} + width: 100%; + + margin-top: 20px; + top: 61px; + margin-bottom: -29.5px; + + .table-container_group-menu { + padding: 0px 16px; + border-image-slice: 0; + box-shadow: ${globalColors.menuShadow} 0px 15px 20px; + } + + .table-container_group-menu-checkbox { + ${(props) => + props.theme.interfaceDirection === "rtl" + ? css` + margin-right: 8px; + ` + : css` + margin-left: 8px; + `} + } + + .table-container_group-menu-separator { + margin: 0 16px; + } + } + + .header-container-text { + font-size: 12px; + color: ${(props) => + props.theme.client.settings.migration.tableRowTextColor}; + } + + .table-container_header { + position: absolute; + } + .clear-icon { margin-inline-end: 8px; } diff --git a/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersTypeStep/AccountsTable/RowView/index.tsx b/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersTypeStep/AccountsTable/RowView/index.tsx index df67bc9b59..10a1ee8c1c 100644 --- a/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersTypeStep/AccountsTable/RowView/index.tsx +++ b/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersTypeStep/AccountsTable/RowView/index.tsx @@ -39,6 +39,7 @@ import { Text } from "@docspace/shared/components/text"; import ChangeTypeReactSvgUrl from "PUBLIC_DIR/images/change.type.react.svg?url"; import EmptyScreenUserReactSvgUrl from "PUBLIC_DIR/images/empty_screen_user.react.svg?url"; import ClearEmptyFilterSvgUrl from "PUBLIC_DIR/images/clear.empty.filter.svg?url"; +import { globalColors } from "@docspace/shared/themes"; import UsersRow from "./UsersRow"; import { InjectedTypeSelectRowViewProps, @@ -62,7 +63,7 @@ const StyledRowContainer = styled(RowContainer)` .table-container_group-menu { padding: 0px 16px; border-image-slice: 0; - box-shadow: rgba(4, 15, 27, 0.07) 0px 15px 20px; + box-shadow: ${globalColors.menuShadow} 0px 15px 20px; } .table-container_group-menu-checkbox { diff --git a/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersTypeStep/AccountsTable/TableView/index.tsx b/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersTypeStep/AccountsTable/TableView/index.tsx index 768b290694..314bbe43ed 100644 --- a/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersTypeStep/AccountsTable/TableView/index.tsx +++ b/packages/client/src/pages/PortalSettings/categories/data-import/components/SelectUsersTypeStep/AccountsTable/TableView/index.tsx @@ -26,7 +26,7 @@ import { useRef } from "react"; import { inject, observer } from "mobx-react"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import styled from "styled-components"; import { EmptyScreenContainer } from "@docspace/shared/components/empty-screen-container"; @@ -67,7 +67,7 @@ const UserSelectTableContainer = styled(StyledTableContainer)` border-image-source: none; border-bottom: ${(props) => props.theme.client.settings.migration.workspaceBorder}; - box-shadow: rgba(4, 15, 27, 0.07) 0px 15px 20px; + box-shadow: ${globalColors.menuShadow} 0px 15px 20px; padding: 0px; } diff --git a/packages/client/src/pages/PortalSettings/categories/data-import/sub-components/DataImportLoader.tsx b/packages/client/src/pages/PortalSettings/categories/data-import/sub-components/DataImportLoader.tsx index 8bc0581ba0..97c7bee48f 100644 --- a/packages/client/src/pages/PortalSettings/categories/data-import/sub-components/DataImportLoader.tsx +++ b/packages/client/src/pages/PortalSettings/categories/data-import/sub-components/DataImportLoader.tsx @@ -65,6 +65,35 @@ const StyledLoader = styled.div` justify-content: flex-start; flex-wrap: wrap; gap: 20px; + + .link { + color: ${(props) => props.theme.client.settings.migration.linkColor}; + } + } + + .workspace-item { + background: ${(props) => + props.theme.client.settings.migration.workspaceBackground}; + border: ${(props) => props.theme.client.settings.migration.workspaceBorder}; + border-radius: 6px; + width: 340px; + height: 64px; + box-sizing: border-box; + padding: 12px 20px; + display: flex; + align-items: center; + justify-content: space-between; + cursor: pointer; + + &:hover { + border-color: ${(props) => + props.theme.client.settings.migration.workspaceHover}; + } + + &:active { + background-color: ${(props) => + props.theme.client.settings.migration.workspaceBackground}; + } max-width: 700px; @media ${tablet} { diff --git a/packages/client/src/pages/PortalSettings/categories/data-management/backup/StyledBackup.js b/packages/client/src/pages/PortalSettings/categories/data-management/backup/StyledBackup.js index cb03b791e9..11f634d1a2 100644 --- a/packages/client/src/pages/PortalSettings/categories/data-management/backup/StyledBackup.js +++ b/packages/client/src/pages/PortalSettings/categories/data-management/backup/StyledBackup.js @@ -31,6 +31,7 @@ import { } from "../../../utils/commonSettingsStyles"; import { tablet, mobile } from "@docspace/shared/utils"; +import { globalColors } from "@docspace/shared/themes"; const INPUT_LENGTH = "350px"; const TEXT_LENGTH = "700px"; @@ -111,7 +112,7 @@ const commonStyles = css` max-width: fit-content; font-size: 12px; line-height: 15px; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: ${globalColors.tapHighlight}; } `; @@ -345,7 +346,7 @@ const StyledRestoreBackup = styled.div` const StyledModules = styled.div` margin-bottom: 24px; .backup-description { - ${(props) => props.isDisabled && `color: #A3A9AE`}; + ${(props) => props.isDisabled && `color: ${globalColors.gray};`}; margin-inline-start: 25px; max-width: 700px; } @@ -523,7 +524,7 @@ const StyledBackupList = styled.div` margin-top: -3px; grid-area: trash; path { - fill: #a3a9ae; + fill: ${globalColors.gray}; } } .backup-list_icon { @@ -537,7 +538,7 @@ const StyledBackupList = styled.div` white-space: nowrap; } .backup-list_file-exst { - color: #a3a9ae; + color: ${globalColors.gray}; grid-area: ext; } .backup-list_radio-button { @@ -591,7 +592,7 @@ const StyledSettingsHeader = styled.div` -ms-transition: top 0.3s cubic-bezier(0, 0, 0.8, 1); -webkit-transition: top 0.3s cubic-bezier(0, 0, 0.8, 1); -o-transition: top 0.3s cubic-bezier(0, 0, 0.8, 1); - background-color: #fff; + background-color: ${globalColors.white}; z-index: 149; width: 100%; height: 50px; diff --git a/packages/client/src/pages/PortalSettings/categories/data-management/backup/auto-backup/index.js b/packages/client/src/pages/PortalSettings/categories/data-management/backup/auto-backup/index.js index fc74725cc3..ab44ce983d 100644 --- a/packages/client/src/pages/PortalSettings/categories/data-management/backup/auto-backup/index.js +++ b/packages/client/src/pages/PortalSettings/categories/data-management/backup/auto-backup/index.js @@ -59,6 +59,7 @@ import { Link } from "@docspace/shared/components/link"; import { getSettingsThirdParty } from "@docspace/shared/api/files"; import { setDocumentTitle } from "SRC_DIR/helpers/utils"; import { isManagement } from "@docspace/shared/utils/common"; +import { globalColors } from "@docspace/shared/themes"; const { DocumentModuleType, ResourcesModuleType, StorageModuleType } = BackupStorageType; @@ -505,7 +506,11 @@ class AutomaticBackup extends React.PureComponent {
{!isEnableAuto && ( props.theme.client.settings.deleteData.borderTop}; } `; diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/presets/StyledPresets.js b/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/presets/StyledPresets.js index 44b9789957..3458f2fe06 100644 --- a/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/presets/StyledPresets.js +++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/presets/StyledPresets.js @@ -46,7 +46,7 @@ export const SDKContainer = styled(Box)` .linkHelp { display: inline; - color: "#657077"; + color: ${(props) => props.theme.sdkPresets.linkHelpColor}; } `; @@ -273,6 +273,10 @@ export const Preview = styled(Box)` min-width: 660px; flex-direction: row; + .preview-description { + color: ${(props) => props.theme.sdkPresets.secondaryColor}; + } + @media ${tablet} { margin-top: 0; min-width: 0; diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/sub-components/CodeBlock.js b/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/sub-components/CodeBlock.js index 0f651cdbcf..5a76fec3df 100644 --- a/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/sub-components/CodeBlock.js +++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/sub-components/CodeBlock.js @@ -30,7 +30,7 @@ import styled from "styled-components"; import CodeMirror from "@uiw/react-codemirror"; import { javascript } from "@codemirror/lang-javascript"; import { githubLightInit, githubDarkInit } from "@uiw/codemirror-theme-github"; -import { Base } from "@docspace/shared/themes"; +import { Base, globalColors } from "@docspace/shared/themes"; import { SDK_SCRIPT_URL } from "@docspace/shared/constants"; const StyledContainer = styled.div` @@ -51,23 +51,23 @@ const CodeBlock = ({ config }) => { const baseTheme = githubLightInit({ settings: { - background: "#FFFFFF", - caret: "#000000", - lineHighlight: "#F3F4F4", - gutterBorder: "#F8F9F9", - gutterBackground: "#F8F9F9", - gutterForeground: "#333333", + background: globalColors.white, + caret: globalColors.darkBlack, + lineHighlight: globalColors.lightGrayHover, + gutterBorder: globalColors.grayLight, + gutterBackground: globalColors.grayLight, + gutterForeground: globalColors.black, }, }); const darkTheme = githubDarkInit({ settings: { - background: "#282828", - caret: "#FFFFFF", - lineHighlight: "#3D3D3D", - gutterBorder: "#242424", - gutterBackground: "#242424", - gutterForeground: "#ADADAD", + background: globalColors.darkGrayLight, + caret: globalColors.white, + lineHighlight: globalColors.lightDarkGrayHover, + gutterBorder: globalColors.grayDarkMid, + gutterBackground: globalColors.grayDarkMid, + gutterForeground: globalColors.darkGrayDark, }, }); diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/sub-components/CodeToInsert.js b/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/sub-components/CodeToInsert.js index 86cbbb4dfe..5260de48ba 100644 --- a/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/sub-components/CodeToInsert.js +++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/JavascriptSDK/sub-components/CodeToInsert.js @@ -30,19 +30,19 @@ import CodeBlock from "../sub-components/CodeBlock"; import { CategorySubHeader, CodeWrapper } from "../presets/StyledPresets"; -export const CodeToInsert = ({ t, theme, codeBlock, config }) => ( +export const CodeToInsert = ({ t, codeBlock, config }) => ( {`HTML ${t("CodeTitle")}`} - + {t("HtmlCodeDescription", { productName: t("Common:ProductName") })}