diff --git a/packages/common/components/ColorTheme/ColorTheme.js b/packages/common/components/ColorTheme/ColorTheme.js deleted file mode 100644 index ea17bbd2ef..0000000000 --- a/packages/common/components/ColorTheme/ColorTheme.js +++ /dev/null @@ -1,308 +0,0 @@ -import React, { forwardRef } from "react"; -import { inject, observer } from "mobx-react"; - -import { - ButtonTheme, - MainButtonTheme, - CatalogItemTheme, - CalendarTheme, - BadgeTheme, - SubmenuTextTheme, - SubmenuItemLabelTheme, - ToggleButtonTheme, - TabsContainerTheme, - IconButtonTheme, - IconButtonPinTheme, - IndicatorFilterButtonTheme, - FilterBlockItemTagTheme, - IconWrapperTheme, - VersionBadgeTheme, - TextareaTheme, - InputBlockTheme, - TextInputTheme, - ComboButtonTheme, - LinkForgotPasswordTheme, - LoadingButtonTheme, - FloatingButtonTheme, - InfoPanelToggleTheme, - LinkTheme, - SliderTheme, - IndicatorLoaderTheme, - ProgressTheme, - MobileProgressBarTheme, -} from "./styled"; -import { ThemeType } from "./constants"; - -const ColorTheme = forwardRef( - ({ currentColorScheme, isVersion, themeId, hoverColor, ...props }, ref) => { - switch (themeId) { - case ThemeType.Button: { - return ( - - ); - } - case ThemeType.MainButton: { - return ( - - ); - } - case ThemeType.CatalogItem: { - return ( - - ); - } - case ThemeType.Badge: { - return ( - - ); - } - case ThemeType.SubmenuText: { - return ( - - ); - } - case ThemeType.SubmenuItemLabel: { - return ( - - ); - } - case ThemeType.ToggleButton: { - return ( - - ); - } - case ThemeType.TabsContainer: { - return ( - - ); - } - case ThemeType.IconButton: { - return ( - - ); - } - case ThemeType.IconButtonPin: { - return ( - - ); - } - case ThemeType.IndicatorFilterButton: { - return ( - - ); - } - case ThemeType.FilterBlockItemTag: { - return ( - - ); - } - case ThemeType.IconWrapper: { - return ( - - ); - } - case ThemeType.VersionBadge: { - return ( - - ); - } - case ThemeType.Textarea: { - return ( - - ); - } - case ThemeType.InputBlock: { - return ( - - ); - } - case ThemeType.TextInput: { - return ( - - ); - } - case ThemeType.Calendar: { - return ( - - ); - } - case ThemeType.ComboButton: { - return ( - - ); - } - case ThemeType.LinkForgotPassword: { - return ( - - ); - } - case ThemeType.LoadingButton: { - return ( - - ); - } - case ThemeType.FloatingButton: { - return ( - - ); - } - case ThemeType.InfoPanelToggle: { - return ( - - ); - } - case ThemeType.Link: { - return ( - - ); - } - case ThemeType.Slider: { - return ( - - ); - } - case ThemeType.IndicatorLoader: { - return ( - - ); - } - case ThemeType.Progress: { - return ( - - ); - } - case ThemeType.MobileProgressBar: { - return ( - - ); - } - } - } -); - -export default inject(({ auth, loginStore }) => { - if (loginStore) { - const { currentColorScheme } = loginStore; - return { currentColorScheme }; - } else { - if (!auth) return; - const { settingsStore } = auth; - const { currentColorScheme } = settingsStore; - return { - currentColorScheme: currentColorScheme || false, - }; - } -})(observer(ColorTheme)); diff --git a/packages/common/components/ColorTheme/constants.js b/packages/common/components/ColorTheme/constants.js deleted file mode 100644 index aece32c80b..0000000000 --- a/packages/common/components/ColorTheme/constants.js +++ /dev/null @@ -1,31 +0,0 @@ -export const ThemeType = { - Button: "button", - MainButton: "mainButton", - CatalogItem: "catalogItem", - Badge: "badge", - Calendar: 'calendar', - SubmenuText: "submenuText", - SubmenuItemLabel: "submenuItemLabel", - ToggleButton: "toggleButton", - TabsContainer: "tabsContainer", - IconButton: "iconButton", - IconButtonPin: "iconButtonPin", - IndicatorFilterButton: "indicatorFilterButton", - FilterBlockItemTag: "filterBlockItemTag", - IconWrapper: "iconWrapper", - Calendar: "calendar", - VersionBadge: "versionBadge", - Textarea: "textarea", - InputBlock: "inputBlock", - TextInput: "textInput", - ComboButton: "comboButton", - LinkForgotPassword: "linkForgotPassword", - LoadingButton: "loadingButton", - FloatingButton: "floatingButton", - InfoPanelToggle: "infoPanelToggle", - Link: "link", - Slider: "slider", - IndicatorLoader: "indicatorLoader", - Progress: "progress", - MobileProgressBar: "mobileProgressBar", -}; diff --git a/packages/common/components/ColorTheme/index.js b/packages/common/components/ColorTheme/index.js deleted file mode 100644 index 2afaa26eb1..0000000000 --- a/packages/common/components/ColorTheme/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { default as ColorTheme } from "./ColorTheme"; - -export { ThemeType } from "./constants"; diff --git a/packages/common/components/ColorTheme/styled/badge.js b/packages/common/components/ColorTheme/styled/badge.js deleted file mode 100644 index bd0bcbfd9e..0000000000 --- a/packages/common/components/ColorTheme/styled/badge.js +++ /dev/null @@ -1,56 +0,0 @@ -import styled, { css } from "styled-components"; -import { - StyledBadge, - StyledInner, - StyledText, -} from "@docspace/components/badge/styled-badge"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ - $currentColorScheme, - isVersionBadge, - backgroundColor, - color, - theme, - isPaidBadge, - isMutedBadge, -}) => - $currentColorScheme && - !isVersionBadge && - css` - ${StyledText} { - color: ${color - ? color - : isPaidBadge - ? theme.badge.color - : $currentColorScheme.text.accent} !important; - } - - ${StyledInner} { - background-color: ${isMutedBadge - ? theme.badge.disableBackgroundColor - : backgroundColor - ? backgroundColor - : $currentColorScheme.main.accent}; - - &:hover { - background-color: ${isMutedBadge - ? theme.badge.disableBackgroundColor - : backgroundColor - ? backgroundColor - : $currentColorScheme.main.accent}; - } - } - - &:hover { - border-color: ${isMutedBadge - ? theme.badge.disableBackgroundColor - : backgroundColor - ? backgroundColor - : $currentColorScheme.main.accent}; - } - `; - -StyledBadge.defaultProps = { theme: Base }; - -export default styled(StyledBadge)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/button.js b/packages/common/components/ColorTheme/styled/button.js deleted file mode 100644 index 672e7e726f..0000000000 --- a/packages/common/components/ColorTheme/styled/button.js +++ /dev/null @@ -1,84 +0,0 @@ -import styled, { css } from "styled-components"; -import StyledButton from "@docspace/components/button/styled-button"; -import Base from "@docspace/components/themes/base"; - -const activeCss = css` - border-color: ${(props) => props.$currentColorScheme.main?.buttons}; - - background: ${(props) => - props.primary && props.$currentColorScheme.main?.buttons}; - - opacity: ${(props) => !props.isDisabled && "1"}; - - filter: ${(props) => - props.primary && - (props.theme.isBase ? "brightness(90%)" : "brightness(82%)")}; - color: ${(props) => props.$currentColorScheme.text?.buttons}; -`; - -const hoverCss = css` - border-color: ${(props) => props.$currentColorScheme.main?.buttons}; - - background: ${(props) => - props.primary && props.$currentColorScheme.main?.buttons}; - - opacity: ${(props) => props.primary && !props.isDisabled && "0.85"}; - color: ${(props) => props.primary && props.$currentColorScheme.text?.buttons}; -`; - -const getDefaultStyles = ({ - primary, - $currentColorScheme, - isDisabled, - isLoading, - isClicked, - isHovered, - disableHover, - title, -}) => - $currentColorScheme && - !title && - css` - ${primary && - css` - background: ${$currentColorScheme.main?.buttons}; - opacity: ${isDisabled && "0.6"}; - border: ${`1px solid`} ${$currentColorScheme.main?.buttons}; - color: ${$currentColorScheme.text?.buttons}; - - .loader { - svg { - color: ${$currentColorScheme.text?.buttons}; - } - background-color: ${$currentColorScheme.main?.buttons}; - } - `} - - ${!isDisabled && - !isLoading && - (isHovered && primary - ? hoverCss - : !disableHover && - primary && - css` - &:hover, - &:focus { - ${hoverCss} - } - `)} - - ${!isDisabled && - !isLoading && - (isClicked - ? primary && activeCss - : primary && - css` - &:active { - ${activeCss} - } - `)} - `; - -StyledButton.defaultProps = { theme: Base }; - -export default styled(StyledButton)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/calendar.js b/packages/common/components/ColorTheme/styled/calendar.js deleted file mode 100644 index 60f3046d18..0000000000 --- a/packages/common/components/ColorTheme/styled/calendar.js +++ /dev/null @@ -1,49 +0,0 @@ -import styled, { css } from 'styled-components'; -import { - Container, - DateItem, - CurrentDateItem, - RoundButton, -} from '@docspace/components/calendar/styled-components'; - -const getDefaultStyles = ({ $currentColorScheme }) => - $currentColorScheme && - css` - ${CurrentDateItem} { - background: ${$currentColorScheme.main.accent}; - :hover { - background-color: ${$currentColorScheme.main.accent}; - } - - :focus { - background-color: ${$currentColorScheme.main.accent}; - } - } - ${DateItem} { - color: ${(props) => - props.disabled - ? props.theme.calendar.disabledColor - : props.focused - ? $currentColorScheme.main.accent - : props.theme.calendar.color}; - border-color: ${(props) => (props.focused ? $currentColorScheme.main.accent : 'transparent')}; - :focus { - color: ${$currentColorScheme.main.accent}; - border-color: ${$currentColorScheme.main.accent}; - } - } - ${RoundButton} { - :hover { - outline: ${(props) => - props.disabled - ? `1px solid ${props.theme.calendar.outlineColor}` - : `2px solid ${$currentColorScheme.main.accent}`}; - span { - border-color: ${(props) => - props.disabled ? props.theme.calendar.disabledArrow : $currentColorScheme.main.accent}; - } - } - } - `; - -export default styled(Container)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/catalogItem.js b/packages/common/components/ColorTheme/styled/catalogItem.js deleted file mode 100644 index 4e08ffed6a..0000000000 --- a/packages/common/components/ColorTheme/styled/catalogItem.js +++ /dev/null @@ -1,50 +0,0 @@ -import styled, { css } from "styled-components"; - -import { - StyledCatalogItemContainer, - StyledCatalogItemImg, - StyledCatalogItemText, -} from "@docspace/components/catalog-item/styled-catalog-item"; - -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, isActive, theme }) => - $currentColorScheme && - css` - ${StyledCatalogItemText} { - color: ${isActive && theme.isBase && $currentColorScheme.main.accent}; - - &:hover { - color: ${isActive && theme.isBase && $currentColorScheme.main.accent}; - } - } - - ${StyledCatalogItemImg} { - svg { - path { - fill: ${isActive && - theme.isBase && - $currentColorScheme.main.accent} !important; - } - circle { - fill: ${isActive && - theme.isBase && - $currentColorScheme.main.accent} !important; - } - } - - &:hover { - svg { - path { - fill: ${isActive && - theme.isBase && - $currentColorScheme.main.accent} !important; - } - } - } - } - `; - -StyledCatalogItemContainer.defaultProps = { theme: Base }; - -export default styled(StyledCatalogItemContainer)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/comboButton.js b/packages/common/components/ColorTheme/styled/comboButton.js deleted file mode 100644 index c5155567c1..0000000000 --- a/packages/common/components/ColorTheme/styled/comboButton.js +++ /dev/null @@ -1,16 +0,0 @@ -import styled, { css } from "styled-components"; -import { StyledComboButton } from "@docspace/components/combobox/sub-components/styled-combobutton"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, isOpen, theme }) => - $currentColorScheme && - theme.isBase && - css` - border-color: ${isOpen && $currentColorScheme.main.accent}; - - :focus { - border-color: ${isOpen && $currentColorScheme.main.accent}; - } - `; - -export default styled(StyledComboButton)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/filterBlockItemTag.js b/packages/common/components/ColorTheme/styled/filterBlockItemTag.js deleted file mode 100644 index 8658cfda91..0000000000 --- a/packages/common/components/ColorTheme/styled/filterBlockItemTag.js +++ /dev/null @@ -1,26 +0,0 @@ -import styled, { css } from "styled-components"; -import { StyledFilterBlockItemTag } from "@docspace/common/components/FilterInput/sub-components/StyledFilterBlock"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, isSelected, theme }) => - $currentColorScheme && - isSelected && - css` - background: ${$currentColorScheme.main.accent}; - border-color: ${$currentColorScheme.main.accent}; - - .filter-text { - color: ${$currentColorScheme.textColor}; - } - - &:hover { - background: ${$currentColorScheme.main.accent}; - border-color: ${$currentColorScheme.main.accent}; - } - `; - -StyledFilterBlockItemTag.defaultProps = { - theme: Base, -}; - -export default styled(StyledFilterBlockItemTag)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/floatingButton.js b/packages/common/components/ColorTheme/styled/floatingButton.js deleted file mode 100644 index b49666ade1..0000000000 --- a/packages/common/components/ColorTheme/styled/floatingButton.js +++ /dev/null @@ -1,38 +0,0 @@ -import styled, { css } from "styled-components"; -import { - StyledCircleWrap, - StyledFloatingButton, - IconBox, - StyledCircle, -} from "@docspace/common/components/FloatingButton/StyledFloatingButton"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, color, displayProgress }) => - $currentColorScheme && - css` - background: ${color || $currentColorScheme.main.accent} !important; - - ${StyledFloatingButton} { - background: ${color || $currentColorScheme.main.accent} !important; - } - - ${IconBox} { - svg { - path { - fill: ${$currentColorScheme.text.accent}; - } - } - } - - ${StyledCircle} { - .circle__mask .circle__fill { - background-color: ${!displayProgress - ? "transparent !important" - : $currentColorScheme.text.accent}; - } - } - `; - -StyledCircleWrap.defaultProps = { theme: Base }; - -export default styled(StyledCircleWrap)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/iconButton.js b/packages/common/components/ColorTheme/styled/iconButton.js deleted file mode 100644 index 18557e28e9..0000000000 --- a/packages/common/components/ColorTheme/styled/iconButton.js +++ /dev/null @@ -1,35 +0,0 @@ -import styled, { css } from "styled-components"; -import commonIconsStyles from "@docspace/components/utils/common-icons-style"; -import StyledIcon from "../../StyledIcon"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ - $currentColorScheme, - shared, - locked, - isFavorite, - isEditing, - theme, -}) => - $currentColorScheme && - css` - ${commonIconsStyles} - svg { - path { - fill: ${(shared || locked || isFavorite || isEditing) && - $currentColorScheme.main.accent}; - } - } - - &:hover { - svg { - path { - fill: ${$currentColorScheme.main.accent}; - } - } - } - `; - -StyledIcon.defaultProps = { theme: Base }; - -export default styled(StyledIcon)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/iconButtonPin.js b/packages/common/components/ColorTheme/styled/iconButtonPin.js deleted file mode 100644 index dd53381e94..0000000000 --- a/packages/common/components/ColorTheme/styled/iconButtonPin.js +++ /dev/null @@ -1,28 +0,0 @@ -import styled, { css } from "styled-components"; -import commonIconsStyles from "@docspace/components/utils/common-icons-style"; -import StyledPinIcon from "../../StyledPinIcon"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, theme }) => - $currentColorScheme && - css` - margin-top: 2px; - ${commonIconsStyles} - svg { - path { - fill: ${theme.isBase && $currentColorScheme.main.accent}; - } - } - - &:hover { - svg { - path { - fill: ${theme.isBase && $currentColorScheme.main.accent}; - } - } - } - `; - -StyledPinIcon.defaultProps = { theme: Base }; - -export default styled(StyledPinIcon)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/iconWrapper.js b/packages/common/components/ColorTheme/styled/iconWrapper.js deleted file mode 100644 index 158000d82e..0000000000 --- a/packages/common/components/ColorTheme/styled/iconWrapper.js +++ /dev/null @@ -1,17 +0,0 @@ -import styled, { css } from "styled-components"; -import StyledIconWrapper from "@docspace/common/components/Navigation/sub-components/StyledIconWrapper"; - -const getDefaultStyles = ({ $currentColorScheme }) => - $currentColorScheme && - css` - svg { - path:nth-child(2) { - fill: ${$currentColorScheme.main.accent}; - } - circle { - stroke: ${$currentColorScheme.main.accent}; - } - } - `; - -export default styled(StyledIconWrapper)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/index.js b/packages/common/components/ColorTheme/styled/index.js deleted file mode 100644 index 3d065ae8e8..0000000000 --- a/packages/common/components/ColorTheme/styled/index.js +++ /dev/null @@ -1,55 +0,0 @@ -export { default as ButtonTheme } from "./button"; - -export { default as MainButtonTheme } from "./mainButton"; - -export { default as CatalogItemTheme } from "./catalogItem"; - -export { default as BadgeTheme } from "./badge"; - -export { default as CalendarTheme } from './calendar' - -export { default as SubmenuTextTheme } from "./submenuText"; - -export { default as SubmenuItemLabelTheme } from "./submenuItemLabel"; - -export { default as ToggleButtonTheme } from "./toggleButton"; - -export { default as TabsContainerTheme } from "./tabsContainer"; - -export { default as IconButtonTheme } from "./iconButton"; - -export { default as IconButtonPinTheme } from "./iconButtonPin"; - -export { default as IndicatorFilterButtonTheme } from "./indicatorFilterButton"; - -export { default as FilterBlockItemTagTheme } from "./filterBlockItemTag"; - -export { default as IconWrapperTheme } from "./iconWrapper"; - -export { default as VersionBadgeTheme } from "./versionBadge"; - -export { default as TextareaTheme } from "./textarea"; - -export { default as InputBlockTheme } from "./inputBlock"; - -export { default as TextInputTheme } from "./textInput"; - -export { default as ComboButtonTheme } from "./comboButton"; - -export { default as LinkForgotPasswordTheme } from "./linkForgotPassword"; - -export { default as LoadingButtonTheme } from "./loadingButton"; - -export { default as FloatingButtonTheme } from "./floatingButton"; - -export { default as InfoPanelToggleTheme } from "./infoPanelToggle"; - -export { default as LinkTheme } from "./link"; - -export { default as SliderTheme } from "./slider"; - -export { default as IndicatorLoaderTheme } from "./indicatorLoader"; - -export { default as ProgressTheme } from "./progress"; - -export { default as MobileProgressBarTheme } from "./mobileProgressBar"; diff --git a/packages/common/components/ColorTheme/styled/indicatorFilterButton.js b/packages/common/components/ColorTheme/styled/indicatorFilterButton.js deleted file mode 100644 index 8d0d1adc70..0000000000 --- a/packages/common/components/ColorTheme/styled/indicatorFilterButton.js +++ /dev/null @@ -1,14 +0,0 @@ -import styled, { css } from "styled-components"; -import StyledIndicator from "@docspace/common/components/FilterInput/sub-components/StyledIndicator"; - -const getDefaultStyles = ({ $currentColorScheme }) => - $currentColorScheme && - css` - background: ${$currentColorScheme.main.accent}; - - &:hover { - background: ${$currentColorScheme.main.accent}; - } - `; - -export default styled(StyledIndicator)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/indicatorLoader.js b/packages/common/components/ColorTheme/styled/indicatorLoader.js deleted file mode 100644 index c2970faf1a..0000000000 --- a/packages/common/components/ColorTheme/styled/indicatorLoader.js +++ /dev/null @@ -1,21 +0,0 @@ -import styled, { css } from "styled-components"; -import StyledWrapper from "../../StyledWrapper"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, theme }) => - $currentColorScheme && - css` - #ipl-progress-indicator { - background-color: ${theme.isBase - ? $currentColorScheme.main.accent - : "#FFFFFF"}; - - &:hover { - background-color: ${theme.isBase - ? $currentColorScheme.main.accent - : "#FFFFFF"}; - } - } - `; -StyledWrapper.defaultProps = { theme: Base }; -export default styled(StyledWrapper)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/infoPanelToggle.js b/packages/common/components/ColorTheme/styled/infoPanelToggle.js deleted file mode 100644 index 81805a7917..0000000000 --- a/packages/common/components/ColorTheme/styled/infoPanelToggle.js +++ /dev/null @@ -1,22 +0,0 @@ -import styled, { css } from "styled-components"; -import StyledInfoPanelToggleWrapper from "../../StyledInfoPanelToggleWrapper"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, isInfoPanelVisible }) => - $currentColorScheme && isInfoPanelVisible && - css` - .info-panel-toggle-bg { - path { - fill: ${$currentColorScheme.main.accent}; - } - &:hover { - path { - fill: ${$currentColorScheme.main.accent}; - } - } - } - `; - -StyledInfoPanelToggleWrapper.defaultProps = { theme: Base }; - -export default styled(StyledInfoPanelToggleWrapper)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/inputBlock.js b/packages/common/components/ColorTheme/styled/inputBlock.js deleted file mode 100644 index da7ac72d40..0000000000 --- a/packages/common/components/ColorTheme/styled/inputBlock.js +++ /dev/null @@ -1,20 +0,0 @@ -import styled, { css } from "styled-components"; - -import { StyledInputGroup } from "@docspace/components/input-block/styled-input-block"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, hasError, theme }) => - $currentColorScheme && - theme.isBase && - css` - :focus-within { - border-color: ${(hasError && theme.input.focusErrorBorderColor) || - $currentColorScheme.main.accent}; - } - `; - -StyledInputGroup.defaultProps = { - theme: Base, -}; - -export default styled(StyledInputGroup)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/link.js b/packages/common/components/ColorTheme/styled/link.js deleted file mode 100644 index 31323241b5..0000000000 --- a/packages/common/components/ColorTheme/styled/link.js +++ /dev/null @@ -1,15 +0,0 @@ -import styled, { css } from "styled-components"; -import StyledText from "@docspace/components/link/styled-link"; - -const getDefaultStyles = ({ $currentColorScheme, noHover }) => - $currentColorScheme && - css` - color: ${$currentColorScheme.main.accent}; - - &:hover { - color: ${!noHover && $currentColorScheme.main.accent}; - text-decoration: underline; - } - `; - -export default styled(StyledText)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/linkForgotPassword.js b/packages/common/components/ColorTheme/styled/linkForgotPassword.js deleted file mode 100644 index e90e4d38b8..0000000000 --- a/packages/common/components/ColorTheme/styled/linkForgotPassword.js +++ /dev/null @@ -1,12 +0,0 @@ -import styled, { css } from "styled-components"; -import LoginContainer from "../../LoginContainer"; - -const getDefaultStyles = ({ $currentColorScheme }) => - $currentColorScheme && - css` - .login-link { - color: ${$currentColorScheme?.main?.accent}; - } - `; - -export default styled(LoginContainer)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/loadingButton.js b/packages/common/components/ColorTheme/styled/loadingButton.js deleted file mode 100644 index a6f8656334..0000000000 --- a/packages/common/components/ColorTheme/styled/loadingButton.js +++ /dev/null @@ -1,27 +0,0 @@ -import styled, { css } from "styled-components"; -import { - StyledCircle, - StyledLoadingButton, - StyledCircleWrap, -} from "../../StyledLoadingButton"; -import { Base } from "@docspace/components/themes"; - -const getDefaultStyles = ({ $currentColorScheme, theme }) => - $currentColorScheme && - css` - ${StyledCircle} { - .circle__mask .circle__fill { - background-color: ${$currentColorScheme.main.accent}; - } - } - - ${StyledLoadingButton} { - color: ${$currentColorScheme.main.accent}; - } - `; - -StyledCircleWrap.defaultProps = { - theme: Base, -}; - -export default styled(StyledCircleWrap)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/mainButton.js b/packages/common/components/ColorTheme/styled/mainButton.js deleted file mode 100644 index 18e0117e0f..0000000000 --- a/packages/common/components/ColorTheme/styled/mainButton.js +++ /dev/null @@ -1,54 +0,0 @@ -import styled, { css } from "styled-components"; -import { StyledMainButton } from "@docspace/components/main-button/styled-main-button"; -import Base from "@docspace/components/themes/base"; - -const disableStyles = css` - opacity: 0.6; - - &:hover { - opacity: 0.6; - cursor: default; - } - - &:active { - opacity: 0.6; - cursor: default; - filter: none; - } -`; - -const getDefaultStyles = ({ $currentColorScheme, isDisabled, theme }) => - $currentColorScheme && - css` - background-color: ${$currentColorScheme.main.accent}; - - &:hover { - background-color: ${$currentColorScheme.main.accent}; - opacity: 0.85; - cursor: pointer; - } - - &:active { - background-color: ${$currentColorScheme.main.accent}; - opacity: 1; - filter: ${theme.isBase ? "brightness(90%)" : "brightness(82%)"}; - cursor: pointer; - } - - .main-button_text { - color: ${$currentColorScheme.text.accent}; - } - - .main-button_img svg path { - fill: ${$currentColorScheme.text.accent}; - } - - ${isDisabled && - ` - ${disableStyles} - `} - `; - -StyledMainButton.defaultProps = { theme: Base }; - -export default styled(StyledMainButton)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/mobileProgressBar.js b/packages/common/components/ColorTheme/styled/mobileProgressBar.js deleted file mode 100644 index 34c0695d36..0000000000 --- a/packages/common/components/ColorTheme/styled/mobileProgressBar.js +++ /dev/null @@ -1,14 +0,0 @@ -import styled, { css } from "styled-components"; -import { StyledBar } from "@docspace/components/main-button-mobile/styled-main-button"; - -const getDefaultStyles = ({ $currentColorScheme, theme, error }) => - $currentColorScheme && - css` - background: ${error - ? theme.mainButtonMobile.bar.errorBackground - : theme.isBase - ? $currentColorScheme.main.accent - : "#FFFFFF"}; - `; - -export default styled(StyledBar)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/progress.js b/packages/common/components/ColorTheme/styled/progress.js deleted file mode 100644 index 7a3fd46d48..0000000000 --- a/packages/common/components/ColorTheme/styled/progress.js +++ /dev/null @@ -1,15 +0,0 @@ -import styled, { css } from "styled-components"; -import StyledPreparationPortalProgress from "../../StyledPreparationPortalProgress"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, theme }) => - $currentColorScheme && - css` - .preparation-portal_progress-line { - background: ${theme.isBase ? $currentColorScheme.main.accent : "#FFFFFF"}; - } - `; - -StyledPreparationPortalProgress.defaultProps = { theme: Base }; - -export default styled(StyledPreparationPortalProgress)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/slider.js b/packages/common/components/ColorTheme/styled/slider.js deleted file mode 100644 index ca1481f5b0..0000000000 --- a/packages/common/components/ColorTheme/styled/slider.js +++ /dev/null @@ -1,37 +0,0 @@ -import styled, { css } from "styled-components"; -import { StyledSlider } from "@docspace/components/slider/styled-slider"; - -const getDefaultStyles = ({ - $currentColorScheme, - withPouring, - theme, - isDisabled, -}) => - $currentColorScheme && - css` - background-image: ${withPouring && - ((theme.isBase && - `linear-gradient( ${$currentColorScheme.main.accent}, ${$currentColorScheme.main.accent})`) || - (!theme.isBase && `linear-gradient(#FFFFFF, #FFFFFF)`))}; - - &::-webkit-slider-thumb { - background: ${(theme.isBase && $currentColorScheme.main.accent) || - (!theme.isBase && "#FFFFFF")}; - box-shadow: ${!theme.isBase && - "0px 3px 12px rgba(0, 0, 0, 0.25); !important"}; - } - - &:hover { - background-image: ${withPouring && - ((theme.isBase && - `linear-gradient( ${$currentColorScheme.main.accent}, ${$currentColorScheme.main.accent})`) || - (!theme.isBase && `linear-gradient(#FFFFFF, #FFFFFF)`))}; - } - - ${isDisabled && - css` - opacity: 0.32; - `} - `; - -export default styled(StyledSlider)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/submenuItemLabel.js b/packages/common/components/ColorTheme/styled/submenuItemLabel.js deleted file mode 100644 index bddcafd477..0000000000 --- a/packages/common/components/ColorTheme/styled/submenuItemLabel.js +++ /dev/null @@ -1,15 +0,0 @@ -import styled, { css } from "styled-components"; - -import { StyledSubmenuItemLabel } from "@docspace/components/submenu/styled-submenu"; - -const getDefaultStyles = ({ $currentColorScheme, isActive }) => - $currentColorScheme && - css` - background-color: ${isActive ? $currentColorScheme.main.accent : "none"}; - - &:hover { - background-color: ${isActive && $currentColorScheme.main.accent}; - } - `; - -export default styled(StyledSubmenuItemLabel)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/submenuText.js b/packages/common/components/ColorTheme/styled/submenuText.js deleted file mode 100644 index 68bc56830d..0000000000 --- a/packages/common/components/ColorTheme/styled/submenuText.js +++ /dev/null @@ -1,21 +0,0 @@ -import styled, { css } from "styled-components"; -import StyledText from "@docspace/components/text/styled-text"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, isActive, theme }) => - $currentColorScheme && - css` - color: ${isActive && - theme.isBase && - $currentColorScheme.main.accent} !important; - - &:hover { - color: ${isActive && - theme.isBase && - $currentColorScheme.main.accent} !important; - } - `; - -StyledText.defaultProps = { theme: Base }; - -export default styled(StyledText)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/tabsContainer.js b/packages/common/components/ColorTheme/styled/tabsContainer.js deleted file mode 100644 index 5c5059c267..0000000000 --- a/packages/common/components/ColorTheme/styled/tabsContainer.js +++ /dev/null @@ -1,17 +0,0 @@ -import styled, { css } from "styled-components"; -import { Label } from "@docspace/components/tabs-container/styled-tabs-container"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, selected, theme }) => - $currentColorScheme && - css` - background-color: ${selected && $currentColorScheme.main.accent} !important; - - .title_style { - color: ${selected && $currentColorScheme.text.accent}; - } - `; - -Label.defaultProps = { theme: Base }; - -export default styled(Label)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/textInput.js b/packages/common/components/ColorTheme/styled/textInput.js deleted file mode 100644 index 7d533c1a73..0000000000 --- a/packages/common/components/ColorTheme/styled/textInput.js +++ /dev/null @@ -1,25 +0,0 @@ -import styled, { css } from "styled-components"; -import StyledTextInput from "@docspace/components/text-input/styled-text-input"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ - $currentColorScheme, - hasError, - hasWarning, - isDisabled, - theme, -}) => - $currentColorScheme && - theme.isBase && - css` - :focus { - border-color: ${(hasError && theme.input.focusErrorBorderColor) || - (hasWarning && theme.input.focusWarningBorderColor) || - (isDisabled && theme.input.focusDisabledBorderColor) || - $currentColorScheme.main.accent}; - } - `; - -StyledTextInput.defaultProps = { theme: Base }; - -export default styled(StyledTextInput)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/textarea.js b/packages/common/components/ColorTheme/styled/textarea.js deleted file mode 100644 index ed788a0884..0000000000 --- a/packages/common/components/ColorTheme/styled/textarea.js +++ /dev/null @@ -1,19 +0,0 @@ -import styled, { css } from "styled-components"; -import { StyledScrollbar } from "@docspace/components/textarea/styled-textarea"; -import Base from "@docspace/components/themes/base"; - -const getDefaultStyles = ({ $currentColorScheme, hasError, theme }) => - $currentColorScheme && - css` - :focus-within { - border-color: ${hasError - ? theme?.textArea.focusErrorBorderColor - : theme.textArea.focusBorderColor}; - } - `; - -StyledScrollbar.defaultProps = { - theme: Base, -}; - -export default styled(StyledScrollbar)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/toggleButton.js b/packages/common/components/ColorTheme/styled/toggleButton.js deleted file mode 100644 index 24e03282c5..0000000000 --- a/packages/common/components/ColorTheme/styled/toggleButton.js +++ /dev/null @@ -1,29 +0,0 @@ -import styled, { css } from "styled-components"; -import { - Container, - ToggleButtonContainer, -} from "@docspace/components/toggle-button/styled-toggle-button"; - -const getDefaultStyles = ({ - $currentColorScheme, - isDisabled, - isChecked, - theme, -}) => - $currentColorScheme && - css` - ${ToggleButtonContainer} { - svg { - rect { - fill: ${isChecked && $currentColorScheme.main.accent} !important; - } - - circle { - fill: ${(isChecked && isDisabled && theme.isBase && "#FFFFFF") || - (isChecked && $currentColorScheme.text.accent)}; - } - } - } - `; - -export default styled(Container)(getDefaultStyles); diff --git a/packages/common/components/ColorTheme/styled/versionBadge.js b/packages/common/components/ColorTheme/styled/versionBadge.js deleted file mode 100644 index 4adf8265e6..0000000000 --- a/packages/common/components/ColorTheme/styled/versionBadge.js +++ /dev/null @@ -1,28 +0,0 @@ -import styled, { css } from "styled-components"; -import Box from "@docspace/components/box"; -import VersionMarkIcon from "../../VersionMarkIcon"; -const getDefaultStyles = ({ $currentColorScheme, $isVersion, theme, index }) => - $currentColorScheme && - css` - ${VersionMarkIcon} { - path { - fill: ${!$isVersion - ? theme.filesVersionHistory.badge.defaultFill - : index === 0 - ? theme.filesVersionHistory.badge.fill - : $currentColorScheme.main.accent}; - - stroke: ${!$isVersion - ? theme.filesVersionHistory.badge.stroke - : index === 0 - ? theme.filesVersionHistory.badge.fill - : $currentColorScheme.main.accent}; - } - } - - .version_badge-text { - color: ${$isVersion && index !== 0 && $currentColorScheme.text.accent}; - } - `; - -export default styled(Box)(getDefaultStyles);