chore: Move animations and globals from shared directory (#2344)
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
// @flow
|
// @flow
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { bounceIn } from "shared/styles/animations";
|
import { bounceIn } from "styles/animations";
|
||||||
|
|
||||||
type Props = {|
|
type Props = {|
|
||||||
count: number,
|
count: number,
|
||||||
|
@ -4,13 +4,13 @@ import { Portal } from "react-portal";
|
|||||||
import { Menu } from "reakit/Menu";
|
import { Menu } from "reakit/Menu";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import breakpoint from "styled-components-breakpoint";
|
import breakpoint from "styled-components-breakpoint";
|
||||||
|
import usePrevious from "hooks/usePrevious";
|
||||||
import {
|
import {
|
||||||
fadeIn,
|
fadeIn,
|
||||||
fadeAndSlideUp,
|
fadeAndSlideUp,
|
||||||
fadeAndSlideDown,
|
fadeAndSlideDown,
|
||||||
mobileContextMenu,
|
mobileContextMenu,
|
||||||
} from "shared/styles/animations";
|
} from "styles/animations";
|
||||||
import usePrevious from "hooks/usePrevious";
|
|
||||||
|
|
||||||
type Props = {|
|
type Props = {|
|
||||||
"aria-label": string,
|
"aria-label": string,
|
||||||
|
@ -4,7 +4,7 @@ import * as React from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { withRouter, type RouterHistory } from "react-router-dom";
|
import { withRouter, type RouterHistory } from "react-router-dom";
|
||||||
import styled, { withTheme } from "styled-components";
|
import styled, { withTheme } from "styled-components";
|
||||||
import { light } from "shared/styles/theme";
|
import { light } from "shared/theme";
|
||||||
import UiStore from "stores/UiStore";
|
import UiStore from "stores/UiStore";
|
||||||
import ErrorBoundary from "components/ErrorBoundary";
|
import ErrorBoundary from "components/ErrorBoundary";
|
||||||
import Tooltip from "components/Tooltip";
|
import Tooltip from "components/Tooltip";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// @flow
|
// @flow
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { fadeIn } from "shared/styles/animations";
|
import { fadeIn } from "styles/animations";
|
||||||
|
|
||||||
const Fade = styled.span`
|
const Fade = styled.span`
|
||||||
animation: ${fadeIn} ${(props) => props.timing || "250ms"} ease-in-out;
|
animation: ${fadeIn} ${(props) => props.timing || "250ms"} ease-in-out;
|
||||||
|
@ -4,10 +4,10 @@ import { transparentize } from "polished";
|
|||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { Portal } from "react-portal";
|
import { Portal } from "react-portal";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { fadeAndSlideDown } from "shared/styles/animations";
|
|
||||||
import parseDocumentSlug from "shared/utils/parseDocumentSlug";
|
import parseDocumentSlug from "shared/utils/parseDocumentSlug";
|
||||||
import DocumentsStore from "stores/DocumentsStore";
|
import DocumentsStore from "stores/DocumentsStore";
|
||||||
import HoverPreviewDocument from "components/HoverPreviewDocument";
|
import HoverPreviewDocument from "components/HoverPreviewDocument";
|
||||||
|
import { fadeAndSlideDown } from "styles/animations";
|
||||||
import { isInternalUrl } from "utils/urls";
|
import { isInternalUrl } from "utils/urls";
|
||||||
|
|
||||||
const DELAY_OPEN = 300;
|
const DELAY_OPEN = 300;
|
||||||
|
@ -7,12 +7,12 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { Dialog, DialogBackdrop, useDialogState } from "reakit/Dialog";
|
import { Dialog, DialogBackdrop, useDialogState } from "reakit/Dialog";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import breakpoint from "styled-components-breakpoint";
|
import breakpoint from "styled-components-breakpoint";
|
||||||
import { fadeAndScaleIn } from "shared/styles/animations";
|
|
||||||
import Flex from "components/Flex";
|
import Flex from "components/Flex";
|
||||||
import NudeButton from "components/NudeButton";
|
import NudeButton from "components/NudeButton";
|
||||||
import Scrollable from "components/Scrollable";
|
import Scrollable from "components/Scrollable";
|
||||||
import usePrevious from "hooks/usePrevious";
|
import usePrevious from "hooks/usePrevious";
|
||||||
import useUnmount from "hooks/useUnmount";
|
import useUnmount from "hooks/useUnmount";
|
||||||
|
import { fadeAndScaleIn } from "styles/animations";
|
||||||
|
|
||||||
let openModals = 0;
|
let openModals = 0;
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { randomInteger } from "shared/random";
|
import { randomInteger } from "shared/random";
|
||||||
import { pulsate } from "shared/styles/animations";
|
|
||||||
import Flex from "components/Flex";
|
import Flex from "components/Flex";
|
||||||
|
import { pulsate } from "styles/animations";
|
||||||
|
|
||||||
type Props = {|
|
type Props = {|
|
||||||
header?: boolean,
|
header?: boolean,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { Popover as ReakitPopover } from "reakit/Popover";
|
import { Popover as ReakitPopover } from "reakit/Popover";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { fadeAndScaleIn } from "shared/styles/animations";
|
import { fadeAndScaleIn } from "styles/animations";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
children: React.Node,
|
children: React.Node,
|
||||||
|
@ -6,13 +6,13 @@ import { Portal } from "react-portal";
|
|||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
import styled, { useTheme } from "styled-components";
|
import styled, { useTheme } from "styled-components";
|
||||||
import breakpoint from "styled-components-breakpoint";
|
import breakpoint from "styled-components-breakpoint";
|
||||||
import { fadeIn } from "shared/styles/animations";
|
|
||||||
import Fade from "components/Fade";
|
import Fade from "components/Fade";
|
||||||
import Flex from "components/Flex";
|
import Flex from "components/Flex";
|
||||||
import ResizeBorder from "./components/ResizeBorder";
|
import ResizeBorder from "./components/ResizeBorder";
|
||||||
import Toggle, { ToggleButton, Positioner } from "./components/Toggle";
|
import Toggle, { ToggleButton, Positioner } from "./components/Toggle";
|
||||||
import usePrevious from "hooks/usePrevious";
|
import usePrevious from "hooks/usePrevious";
|
||||||
import useStores from "hooks/useStores";
|
import useStores from "hooks/useStores";
|
||||||
|
import { fadeIn } from "styles/animations";
|
||||||
|
|
||||||
let ANIMATION_MS = 250;
|
let ANIMATION_MS = 250;
|
||||||
let isFirstRender = true;
|
let isFirstRender = true;
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { ThemeProvider } from "styled-components";
|
import { ThemeProvider } from "styled-components";
|
||||||
import GlobalStyles from "shared/styles/globals";
|
import { dark, light, lightMobile, darkMobile } from "shared/theme";
|
||||||
import { dark, light, lightMobile, darkMobile } from "shared/styles/theme";
|
|
||||||
import useMediaQuery from "hooks/useMediaQuery";
|
import useMediaQuery from "hooks/useMediaQuery";
|
||||||
import useStores from "hooks/useStores";
|
import useStores from "hooks/useStores";
|
||||||
|
import GlobalStyles from "styles/globals";
|
||||||
|
|
||||||
const empty = {};
|
const empty = {};
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { CheckboxIcon, InfoIcon, WarningIcon } from "outline-icons";
|
|||||||
import { darken } from "polished";
|
import { darken } from "polished";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import styled, { css } from "styled-components";
|
import styled, { css } from "styled-components";
|
||||||
import { fadeAndScaleIn, pulse } from "shared/styles/animations";
|
import { fadeAndScaleIn, pulse } from "styles/animations";
|
||||||
import type { Toast as TToast } from "types";
|
import type { Toast as TToast } from "types";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
@ -7,7 +7,7 @@ import { type TFunction, withTranslation } from "react-i18next";
|
|||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import breakpoint from "styled-components-breakpoint";
|
import breakpoint from "styled-components-breakpoint";
|
||||||
import { MAX_TITLE_LENGTH } from "shared/constants";
|
import { MAX_TITLE_LENGTH } from "shared/constants";
|
||||||
import { light } from "shared/styles/theme";
|
import { light } from "shared/theme";
|
||||||
import parseTitle from "shared/utils/parseTitle";
|
import parseTitle from "shared/utils/parseTitle";
|
||||||
import Document from "models/Document";
|
import Document from "models/Document";
|
||||||
import ClickablePadding from "components/ClickablePadding";
|
import ClickablePadding from "components/ClickablePadding";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// @flow
|
// @flow
|
||||||
import { action, autorun, computed, observable } from "mobx";
|
import { action, autorun, computed, observable } from "mobx";
|
||||||
import { light as defaultTheme } from "shared/styles/theme";
|
import { light as defaultTheme } from "shared/theme";
|
||||||
import Collection from "models/Collection";
|
import Collection from "models/Collection";
|
||||||
import Document from "models/Document";
|
import Document from "models/Document";
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// @flow
|
// @flow
|
||||||
import { type Location } from "react-router-dom";
|
import { type Location } from "react-router-dom";
|
||||||
import theme from "shared/styles/theme";
|
import theme from "shared/theme";
|
||||||
import Document from "models/Document";
|
import Document from "models/Document";
|
||||||
|
|
||||||
export type Theme = typeof theme;
|
export type Theme = typeof theme;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// @flow
|
// @flow
|
||||||
import { Table, TBody, TR, TD } from "oy-vey";
|
import { Table, TBody, TR, TD } from "oy-vey";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import theme from "../../../shared/styles/theme";
|
import theme from "../../../shared/theme";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
children: React.Node,
|
children: React.Node,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// @flow
|
// @flow
|
||||||
import { Table, TBody, TR, TD } from "oy-vey";
|
import { Table, TBody, TR, TD } from "oy-vey";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import theme from "../../../shared/styles/theme";
|
import theme from "../../../shared/theme";
|
||||||
import { twitterUrl } from "../../../shared/utils/routeHelpers";
|
import { twitterUrl } from "../../../shared/utils/routeHelpers";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
Reference in New Issue
Block a user