mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-28 11:02:59 +03:00
refactor: move component into a single package (#898)
This commit is contained in:
parent
0984c37cad
commit
cc605251a8
1
.gitignore
vendored
1
.gitignore
vendored
@ -48,6 +48,7 @@ Thumbs.db
|
|||||||
|
|
||||||
.next
|
.next
|
||||||
out/
|
out/
|
||||||
|
storybook-static
|
||||||
|
|
||||||
module-resolve.js
|
module-resolve.js
|
||||||
module-resolve.cjs
|
module-resolve.cjs
|
||||||
|
@ -47,6 +47,7 @@ const nextConfig = {
|
|||||||
COMMIT_HASH: getCommitHash(),
|
COMMIT_HASH: getCommitHash(),
|
||||||
EDITOR_VERSION,
|
EDITOR_VERSION,
|
||||||
},
|
},
|
||||||
|
transpilePackages: ['@affine/component'],
|
||||||
webpack: config => {
|
webpack: config => {
|
||||||
config.experiments = { ...config.experiments, topLevelAwait: true };
|
config.experiments = { ...config.experiments, topLevelAwait: true };
|
||||||
config.resolve.alias['yjs'] = require.resolve('yjs');
|
config.resolve.alias['yjs'] = require.resolve('yjs');
|
||||||
|
@ -9,21 +9,22 @@
|
|||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@affine/component": "workspace:*",
|
||||||
"@affine/datacenter": "workspace:*",
|
"@affine/datacenter": "workspace:*",
|
||||||
"@affine/i18n": "workspace:*",
|
"@affine/i18n": "workspace:*",
|
||||||
"@blocksuite/blocks": "0.4.0-alpha.2",
|
"@blocksuite/blocks": "0.4.0-alpha.2",
|
||||||
"@blocksuite/editor": "0.4.0-alpha.2",
|
"@blocksuite/editor": "0.4.0-alpha.2",
|
||||||
"@blocksuite/icons": "^2.0.2",
|
"@blocksuite/icons": "^2.0.2",
|
||||||
"@blocksuite/store": "0.4.0-alpha.2",
|
"@blocksuite/store": "0.4.0-alpha.2",
|
||||||
"@emotion/css": "^11.10.0",
|
"@emotion/css": "^11.10.5",
|
||||||
"@emotion/react": "^11.10.4",
|
"@emotion/react": "^11.10.5",
|
||||||
"@emotion/server": "^11.10.0",
|
"@emotion/server": "^11.10.0",
|
||||||
"@emotion/styled": "^11.10.4",
|
"@emotion/styled": "^11.10.5",
|
||||||
"@fontsource/poppins": "^4.5.10",
|
"@fontsource/poppins": "^4.5.10",
|
||||||
"@fontsource/space-mono": "^4.5.10",
|
"@fontsource/space-mono": "^4.5.10",
|
||||||
"@mui/base": "^5.0.0-alpha.87",
|
"@mui/base": "=5.0.0-alpha.101",
|
||||||
"@mui/icons-material": "^5.10.9",
|
"@mui/icons-material": "=5.10.9",
|
||||||
"@mui/material": "^5.8.6",
|
"@mui/material": "=5.8.6",
|
||||||
"@toeverything/pathfinder-logger": "workspace:@affine/logger@*",
|
"@toeverything/pathfinder-logger": "workspace:@affine/logger@*",
|
||||||
"cmdk": "^0.1.20",
|
"cmdk": "^0.1.20",
|
||||||
"css-spring": "^4.1.0",
|
"css-spring": "^4.1.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { NotFoundTitle, PageContainer } from './styles';
|
import { NotFoundTitle, PageContainer } from './styles';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
export const NotfoundPage = () => {
|
export const NotfoundPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
|
|
||||||
export const PageContainer = styled('div')(({ theme }) => {
|
export const PageContainer = styled('div')(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Modal, ModalCloseButton, ModalWrapper } from '@/ui/modal';
|
import { Modal, ModalCloseButton, ModalWrapper } from '@affine/component';
|
||||||
import {
|
import {
|
||||||
LogoIcon,
|
LogoIcon,
|
||||||
DocIcon,
|
DocIcon,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { absoluteCenter, displayFlex, styled } from '@/styles';
|
import { absoluteCenter, displayFlex, styled } from '@affine/component';
|
||||||
|
|
||||||
export const StyledBigLink = styled('a')(({ theme }) => {
|
export const StyledBigLink = styled('a')(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { Modal, ModalWrapper, ModalCloseButton } from '@/ui/modal';
|
import { Modal, ModalWrapper, ModalCloseButton } from '@affine/component';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import Input from '@/ui/input';
|
import { Input } from '@affine/component';
|
||||||
import { KeyboardEvent } from 'react';
|
import { KeyboardEvent } from 'react';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { useWorkspaceHelper } from '@/hooks/use-workspace-helper';
|
import { useWorkspaceHelper } from '@/hooks/use-workspace-helper';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { toast } from '@/ui/toast';
|
import { toast } from '@affine/component';
|
||||||
|
|
||||||
interface ModalProps {
|
interface ModalProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { Modal, ModalWrapper, ModalCloseButton } from '@/ui/modal';
|
import { Modal, ModalWrapper, ModalCloseButton } from '@affine/component';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import Input from '@/ui/input';
|
import { Input } from '@affine/component';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
interface LoginModalProps {
|
interface LoginModalProps {
|
||||||
|
@ -14,8 +14,8 @@ import {
|
|||||||
UndoIcon,
|
UndoIcon,
|
||||||
RedoIcon,
|
RedoIcon,
|
||||||
} from './Icons';
|
} from './Icons';
|
||||||
import { MuiSlide } from '@/ui/mui';
|
import { MuiSlide } from '@affine/component';
|
||||||
import { Tooltip } from '@/ui/tooltip';
|
import { Tooltip } from '@affine/component';
|
||||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import useHistoryUpdated from '@/hooks/use-history-update';
|
import useHistoryUpdated from '@/hooks/use-history-update';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { styled, displayFlex } from '@/styles';
|
import { styled, displayFlex } from '@affine/component';
|
||||||
|
|
||||||
export const StyledEdgelessToolbar = styled.div(({ theme }) => ({
|
export const StyledEdgelessToolbar = styled.div(({ theme }) => ({
|
||||||
height: '320px',
|
height: '320px',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { displayFlex, keyframes, styled } from '@/styles';
|
import { displayFlex, keyframes, styled } from '@affine/component';
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import spring, { toString } from 'css-spring';
|
import spring, { toString } from 'css-spring';
|
||||||
|
@ -3,7 +3,7 @@ import type { Page, Workspace } from '@blocksuite/store';
|
|||||||
import '@blocksuite/blocks';
|
import '@blocksuite/blocks';
|
||||||
import { EditorContainer } from '@blocksuite/editor';
|
import { EditorContainer } from '@blocksuite/editor';
|
||||||
import exampleMarkdown from '@/templates/Welcome-to-AFFiNE-Alpha-Downhills.md';
|
import exampleMarkdown from '@/templates/Welcome-to-AFFiNE-Alpha-Downhills.md';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
|
|
||||||
const StyledEditorContainer = styled('div')(() => {
|
const StyledEditorContainer = styled('div')(() => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { Modal, ModalWrapper } from '@/ui/modal';
|
import { Modal, ModalWrapper } from '@affine/component';
|
||||||
import { Button, IconButton } from '@/ui/button';
|
import { Button, IconButton } from '@affine/component';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import router from 'next/router';
|
import router from 'next/router';
|
||||||
import { toast } from '@/ui/toast';
|
import { toast } from '@affine/component';
|
||||||
import { CloseIcon } from '@blocksuite/icons';
|
import { CloseIcon } from '@blocksuite/icons';
|
||||||
interface EnableWorkspaceModalProps {
|
interface EnableWorkspaceModalProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { EnableWorkspaceModal } from './EnableWorkspaceModal';
|
import { EnableWorkspaceModal } from './EnableWorkspaceModal';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { FC, useRef, ChangeEvent, ReactElement } from 'react';
|
import { FC, useRef, ChangeEvent, ReactElement } from 'react';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
interface Props {
|
interface Props {
|
||||||
uploadType?: string;
|
uploadType?: string;
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
StyledTitle,
|
StyledTitle,
|
||||||
StyledTitleWrapper,
|
StyledTitleWrapper,
|
||||||
} from './styles';
|
} from './styles';
|
||||||
import { Content } from '@/ui/layout';
|
import { Content } from '@affine/component';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import EditorModeSwitch from '@/components/editor-mode-switch';
|
import EditorModeSwitch from '@/components/editor-mode-switch';
|
||||||
import QuickSearchButton from './QuickSearchButton';
|
import QuickSearchButton from './QuickSearchButton';
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { IconButton, IconButtonProps } from '@/ui/button';
|
import { IconButton, IconButtonProps } from '@affine/component';
|
||||||
import { ArrowDownIcon } from '@blocksuite/icons';
|
import { ArrowDownIcon } from '@blocksuite/icons';
|
||||||
import { useModal } from '@/providers/GlobalModalProvider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
|
|
||||||
const StyledIconButtonWithAnimate = styled(IconButton)(({ theme }) => {
|
const StyledIconButtonWithAnimate = styled(IconButton)(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Menu, MenuItem } from '@/ui/menu';
|
import { Menu, MenuItem } from '@affine/component';
|
||||||
import { IconButton } from '@/ui/button';
|
import { IconButton } from '@affine/component';
|
||||||
import {
|
import {
|
||||||
EdgelessIcon,
|
EdgelessIcon,
|
||||||
ExportIcon,
|
ExportIcon,
|
||||||
@ -15,7 +15,7 @@ import { useAppState } from '@/providers/app-state-provider';
|
|||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useConfirm } from '@/providers/ConfirmProvider';
|
import { useConfirm } from '@/providers/ConfirmProvider';
|
||||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||||
import { toast } from '@/ui/toast';
|
import { toast } from '@affine/component';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
const PopoverContent = () => {
|
const PopoverContent = () => {
|
||||||
const { editor } = useAppState();
|
const { editor } = useAppState();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { CloudUnsyncedIcon } from '@blocksuite/icons';
|
import { CloudUnsyncedIcon } from '@blocksuite/icons';
|
||||||
import { useModal } from '@/providers/GlobalModalProvider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { IconButton } from '@/ui/button';
|
import { IconButton } from '@affine/component';
|
||||||
|
|
||||||
// Temporary solution to use this component, since the @blocksuite/icons has not been published yet
|
// Temporary solution to use this component, since the @blocksuite/icons has not been published yet
|
||||||
const DefaultSyncIcon = () => {
|
const DefaultSyncIcon = () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { useConfirm } from '@/providers/ConfirmProvider';
|
import { useConfirm } from '@/providers/ConfirmProvider';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { displayFlex, keyframes, styled } from '@/styles';
|
import { displayFlex, keyframes, styled } from '@affine/component';
|
||||||
import { CSSProperties } from 'react';
|
import { CSSProperties } from 'react';
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { displayFlex, styled } from '@/styles';
|
import { displayFlex, styled } from '@affine/component';
|
||||||
|
|
||||||
export const StyledHeaderContainer = styled.div<{ hasWarning: boolean }>(
|
export const StyledHeaderContainer = styled.div<{ hasWarning: boolean }>(
|
||||||
({ hasWarning }) => {
|
({ hasWarning }) => {
|
||||||
|
@ -6,8 +6,8 @@ import {
|
|||||||
StyledTransformIcon,
|
StyledTransformIcon,
|
||||||
} from './style';
|
} from './style';
|
||||||
import { CloseIcon, ContactIcon, HelpIcon, KeyboardIcon } from './Icons';
|
import { CloseIcon, ContactIcon, HelpIcon, KeyboardIcon } from './Icons';
|
||||||
import { MuiGrow } from '@/ui/mui';
|
import { MuiGrow } from '@affine/component';
|
||||||
import { Tooltip } from '@/ui/tooltip';
|
import { Tooltip } from '@affine/component';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { useModal } from '@/providers/GlobalModalProvider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { useTheme } from '@/providers/ThemeProvider';
|
import { useTheme } from '@/providers/ThemeProvider';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { displayFlex, styled } from '@/styles';
|
import { displayFlex, styled } from '@affine/component';
|
||||||
|
|
||||||
export const StyledIsland = styled('div')(({ theme }) => {
|
export const StyledIsland = styled('div')(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { Modal, ModalWrapper, ModalCloseButton } from '@/ui/modal';
|
import { Modal, ModalWrapper, ModalCloseButton } from '@affine/component';
|
||||||
import { StyledButtonWrapper, StyledTitle } from './styles';
|
import { StyledButtonWrapper, StyledTitle } from './styles';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { Content, FlexWrapper } from '@/ui/layout';
|
import { Content, FlexWrapper } from '@affine/component';
|
||||||
import Loading from '@/components/loading';
|
import Loading from '@/components/loading';
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
// import { Tooltip } from '@/ui/tooltip';
|
// import { Tooltip } from '@affine/component';
|
||||||
type ImportModalProps = {
|
type ImportModalProps = {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
|
|
||||||
export const StyledTitle = styled.div(({ theme }) => {
|
export const StyledTitle = styled.div(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import Loading from './Loading';
|
import Loading from './Loading';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
|
|
||||||
// Inspired by https://codepen.io/graphilla/pen/rNvBMYY
|
// Inspired by https://codepen.io/graphilla/pen/rNvBMYY
|
||||||
export const StyledLoadingWrapper = styled('div', {
|
export const StyledLoadingWrapper = styled('div', {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { positionAbsolute, styled } from '@/styles';
|
import { positionAbsolute, styled } from '@affine/component';
|
||||||
import { Modal, ModalWrapper, ModalCloseButton } from '@/ui/modal';
|
import { Modal, ModalWrapper, ModalCloseButton } from '@affine/component';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { GoogleIcon } from './GoogleIcon';
|
import { GoogleIcon } from './GoogleIcon';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { Modal, ModalWrapper, ModalCloseButton } from '@/ui/modal';
|
import { Modal, ModalWrapper, ModalCloseButton } from '@affine/component';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { Check, UnCheck } from './icon';
|
import { Check, UnCheck } from './icon';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import Modal, { ModalCloseButton, ModalWrapper } from '@/ui/modal';
|
import { Modal, ModalCloseButton, ModalWrapper } from '@affine/component';
|
||||||
import getIsMobile from '@/utils/get-is-mobile';
|
import getIsMobile from '@/utils/get-is-mobile';
|
||||||
import { StyledButton, StyledContent, StyledTitle } from './styles';
|
import { StyledButton, StyledContent, StyledTitle } from './styles';
|
||||||
import bg from './bg.png';
|
import bg from './bg.png';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { displayFlex, styled } from '@/styles';
|
import { displayFlex, styled } from '@affine/component';
|
||||||
|
|
||||||
export const StyledTitle = styled.div(() => {
|
export const StyledTitle = styled.div(() => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import localizedFormat from 'dayjs/plugin/localizedFormat';
|
import localizedFormat from 'dayjs/plugin/localizedFormat';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { PageMeta } from '@/providers/app-state-provider';
|
import { PageMeta } from '@/providers/app-state-provider';
|
||||||
import { TableCell } from '@/ui/table';
|
import { TableCell } from '@affine/component';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
dayjs.extend(localizedFormat);
|
dayjs.extend(localizedFormat);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Empty } from '@/ui/empty';
|
import { Empty } from '@affine/component';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
export const PageListEmpty = (props: { listType?: string }) => {
|
export const PageListEmpty = (props: { listType?: string }) => {
|
||||||
const { listType } = props;
|
const { listType } = props;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { useConfirm } from '@/providers/ConfirmProvider';
|
import { useConfirm } from '@/providers/ConfirmProvider';
|
||||||
import { PageMeta } from '@/providers/app-state-provider';
|
import { PageMeta } from '@/providers/app-state-provider';
|
||||||
import { Menu, MenuItem } from '@/ui/menu';
|
import { Menu, MenuItem } from '@affine/component';
|
||||||
import { FlexWrapper } from '@/ui/layout';
|
import { FlexWrapper } from '@affine/component';
|
||||||
import { IconButton } from '@/ui/button';
|
import { IconButton } from '@affine/component';
|
||||||
import {
|
import {
|
||||||
MoreVerticalIcon,
|
MoreVerticalIcon,
|
||||||
RestoreIcon,
|
RestoreIcon,
|
||||||
@ -12,7 +12,7 @@ import {
|
|||||||
OpenInNewIcon,
|
OpenInNewIcon,
|
||||||
TrashIcon,
|
TrashIcon,
|
||||||
} from '@blocksuite/icons';
|
} from '@blocksuite/icons';
|
||||||
import { toast } from '@/ui/toast';
|
import { toast } from '@affine/component';
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
export const OperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => {
|
export const OperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => {
|
||||||
|
@ -11,17 +11,23 @@ import {
|
|||||||
StyledTitleLink,
|
StyledTitleLink,
|
||||||
StyledTitleWrapper,
|
StyledTitleWrapper,
|
||||||
} from './styles';
|
} from './styles';
|
||||||
import { Table, TableBody, TableCell, TableHead, TableRow } from '@/ui/table';
|
import {
|
||||||
|
Table,
|
||||||
|
TableBody,
|
||||||
|
TableCell,
|
||||||
|
TableHead,
|
||||||
|
TableRow,
|
||||||
|
} from '@affine/component';
|
||||||
import { OperationCell, TrashOperationCell } from './OperationCell';
|
import { OperationCell, TrashOperationCell } from './OperationCell';
|
||||||
import Empty from './Empty';
|
import Empty from './Empty';
|
||||||
import { Content } from '@/ui/layout';
|
import { Content } from '@affine/component';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import DateCell from '@/components/page-list/DateCell';
|
import DateCell from '@/components/page-list/DateCell';
|
||||||
import { IconButton } from '@/ui/button';
|
import { IconButton } from '@affine/component';
|
||||||
import { Tooltip } from '@/ui/tooltip';
|
import { Tooltip } from '@affine/component';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { toast } from '@/ui/toast';
|
import { toast } from '@affine/component';
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useTheme } from '@/providers/ThemeProvider';
|
import { useTheme } from '@/providers/ThemeProvider';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { displayFlex, styled } from '@/styles';
|
import { displayFlex, styled } from '@affine/component';
|
||||||
import { TableRow } from '@/ui/table';
|
import { TableRow } from '@affine/component';
|
||||||
|
|
||||||
export const StyledTableContainer = styled.div(() => {
|
export const StyledTableContainer = styled.div(() => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Modal, ModalWrapper } from '@/ui/modal';
|
import { Modal, ModalWrapper } from '@affine/component';
|
||||||
import {
|
import {
|
||||||
StyledContent,
|
StyledContent,
|
||||||
StyledModalHeader,
|
StyledModalHeader,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { displayFlex, styled } from '@/styles';
|
import { displayFlex, styled } from '@affine/component';
|
||||||
|
|
||||||
export const StyledContent = styled('div')(({ theme }) => {
|
export const StyledContent = styled('div')(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -13,8 +13,8 @@ import {
|
|||||||
useWindowsKeyboardShortcuts,
|
useWindowsKeyboardShortcuts,
|
||||||
useWinMarkdownShortcuts,
|
useWinMarkdownShortcuts,
|
||||||
} from '@/components/shortcuts-modal/config';
|
} from '@/components/shortcuts-modal/config';
|
||||||
import { MuiSlide } from '@/ui/mui';
|
import { MuiSlide } from '@affine/component';
|
||||||
import { ModalCloseButton } from '@/ui/modal';
|
import { ModalCloseButton } from '@affine/component';
|
||||||
import { getUaHelper } from '@/utils';
|
import { getUaHelper } from '@/utils';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
type ModalProps = {
|
type ModalProps = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { displayFlex, styled } from '@/styles';
|
import { displayFlex, styled } from '@affine/component';
|
||||||
|
|
||||||
export const StyledShortcutsModal = styled.div(({ theme }) => ({
|
export const StyledShortcutsModal = styled.div(({ theme }) => ({
|
||||||
width: '288px',
|
width: '288px',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
|
|
||||||
export const StyledPage = styled('div')(({ theme }) => {
|
export const StyledPage = styled('div')(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { CloudInsyncIcon, LogOutIcon } from '@blocksuite/icons';
|
import { CloudInsyncIcon, LogOutIcon } from '@blocksuite/icons';
|
||||||
import { FlexWrapper } from '@/ui/layout';
|
import { FlexWrapper } from '@affine/component';
|
||||||
import { WorkspaceAvatar } from '@/components/workspace-avatar';
|
import { WorkspaceAvatar } from '@/components/workspace-avatar';
|
||||||
import { IconButton } from '@/ui/button';
|
import { IconButton } from '@affine/component';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { StyledFooter, StyleUserInfo, StyledSignInButton } from './styles';
|
import { StyledFooter, StyleUserInfo, StyledSignInButton } from './styles';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { Tooltip } from '@/ui/tooltip';
|
import { Tooltip } from '@affine/component';
|
||||||
export const Footer = ({
|
export const Footer = ({
|
||||||
onLogin,
|
onLogin,
|
||||||
onLogout,
|
onLogout,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { LOCALES } from '@affine/i18n';
|
import { LOCALES } from '@affine/i18n';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { ArrowDownIcon } from '@blocksuite/icons';
|
import { ArrowDownIcon } from '@blocksuite/icons';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { Menu, MenuItem } from '@/ui/menu';
|
import { Menu, MenuItem } from '@affine/component';
|
||||||
|
|
||||||
const LanguageMenuContent = () => {
|
const LanguageMenuContent = () => {
|
||||||
const { i18n } = useTranslation();
|
const { i18n } = useTranslation();
|
||||||
|
@ -10,7 +10,7 @@ import { WorkspaceUnit } from '@affine/datacenter';
|
|||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { StyleWorkspaceInfo, StyleWorkspaceTitle, StyledCard } from './styles';
|
import { StyleWorkspaceInfo, StyleWorkspaceTitle, StyledCard } from './styles';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { FlexWrapper } from '@/ui/layout';
|
import { FlexWrapper } from '@affine/component';
|
||||||
|
|
||||||
const WorkspaceType = ({ workspaceData }: { workspaceData: WorkspaceUnit }) => {
|
const WorkspaceType = ({ workspaceData }: { workspaceData: WorkspaceUnit }) => {
|
||||||
const { user } = useAppState();
|
const { user } = useAppState();
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Modal, ModalWrapper, ModalCloseButton } from '@/ui/modal';
|
import { Modal, ModalWrapper, ModalCloseButton } from '@affine/component';
|
||||||
import { FlexWrapper } from '@/ui/layout';
|
import { FlexWrapper } from '@affine/component';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { CreateWorkspaceModal } from '../create-workspace';
|
import { CreateWorkspaceModal } from '../create-workspace';
|
||||||
|
|
||||||
import { Tooltip } from '@/ui/tooltip';
|
import { Tooltip } from '@affine/component';
|
||||||
|
|
||||||
import { AddIcon, HelpCenterIcon } from '@blocksuite/icons';
|
import { AddIcon, HelpCenterIcon } from '@blocksuite/icons';
|
||||||
|
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
import { displayFlex, displayInlineFlex, styled, textEllipsis } from '@/styles';
|
import {
|
||||||
import { Button } from '@/ui/button';
|
displayFlex,
|
||||||
|
displayInlineFlex,
|
||||||
|
styled,
|
||||||
|
textEllipsis,
|
||||||
|
} from '@affine/component';
|
||||||
|
import { Button } from '@affine/component';
|
||||||
|
|
||||||
export const StyledSplitLine = styled.div(({ theme }) => {
|
export const StyledSplitLine = styled.div(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { WorkspaceUnit } from '@affine/datacenter';
|
import { WorkspaceUnit } from '@affine/datacenter';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { Wrapper } from '@/ui/layout';
|
import { Wrapper } from '@affine/component';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
export const ExportPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
export const ExportPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
console.log(workspace);
|
console.log(workspace);
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import Input from '@/ui/input';
|
import { Input } from '@affine/component';
|
||||||
import { toast } from '@/ui/toast';
|
import { toast } from '@affine/component';
|
||||||
import { WorkspaceUnit } from '@affine/datacenter';
|
import { WorkspaceUnit } from '@affine/datacenter';
|
||||||
import { useWorkspaceHelper } from '@/hooks/use-workspace-helper';
|
import { useWorkspaceHelper } from '@/hooks/use-workspace-helper';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { EnableWorkspaceButton } from '../enable-workspace';
|
import { EnableWorkspaceButton } from '../enable-workspace';
|
||||||
import { Wrapper, Content, FlexWrapper } from '@/ui/layout';
|
import { Wrapper, Content, FlexWrapper } from '@affine/component';
|
||||||
export const PublishPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
export const PublishPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
||||||
const shareUrl = window.location.host + '/public-workspace/' + workspace.id;
|
const shareUrl = window.location.host + '/public-workspace/' + workspace.id;
|
||||||
const { publishWorkspace } = useWorkspaceHelper();
|
const { publishWorkspace } = useWorkspaceHelper();
|
||||||
|
@ -9,7 +9,7 @@ import { useTranslation, Trans } from '@affine/i18n';
|
|||||||
import { WorkspaceUnitAvatar } from '@/components/workspace-avatar';
|
import { WorkspaceUnitAvatar } from '@/components/workspace-avatar';
|
||||||
import { EnableWorkspaceButton } from '../enable-workspace';
|
import { EnableWorkspaceButton } from '../enable-workspace';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { FlexWrapper, Content, Wrapper } from '@/ui/layout';
|
import { FlexWrapper, Content, Wrapper } from '@affine/component';
|
||||||
|
|
||||||
// // FIXME: Temporary solution, since the @blocksuite/icons is broken
|
// // FIXME: Temporary solution, since the @blocksuite/icons is broken
|
||||||
// const ActiveIcon = () => {
|
// const ActiveIcon = () => {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { StyledInput, StyledProviderInfo, StyledAvatar } from './style';
|
import { StyledInput, StyledProviderInfo, StyledAvatar } from './style';
|
||||||
import { StyledSettingKey, StyledRow } from '../style';
|
import { StyledSettingKey, StyledRow } from '../style';
|
||||||
import { FlexWrapper, Content } from '@/ui/layout';
|
import { FlexWrapper, Content } from '@affine/component';
|
||||||
|
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { WorkspaceDelete } from './delete';
|
import { WorkspaceDelete } from './delete';
|
||||||
import { WorkspaceLeave } from './leave';
|
import { WorkspaceLeave } from './leave';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import Modal from '@/ui/modal';
|
import { Modal } from '@affine/component';
|
||||||
import Input from '@/ui/input';
|
import { Input } from '@affine/component';
|
||||||
import {
|
import {
|
||||||
StyledModalHeader,
|
StyledModalHeader,
|
||||||
StyledTextContent,
|
StyledTextContent,
|
||||||
@ -10,8 +10,8 @@ import {
|
|||||||
StyledWorkspaceName,
|
StyledWorkspaceName,
|
||||||
} from './style';
|
} from './style';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { ModalCloseButton } from '@/ui/modal';
|
import { ModalCloseButton } from '@affine/component';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
|
|
||||||
import { WorkspaceUnit } from '@affine/datacenter';
|
import { WorkspaceUnit } from '@affine/datacenter';
|
||||||
import { Trans, useTranslation } from '@affine/i18n';
|
import { Trans, useTranslation } from '@affine/i18n';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
|
|
||||||
export const StyledModalWrapper = styled('div')(({ theme }) => {
|
export const StyledModalWrapper = styled('div')(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import Modal from '@/ui/modal';
|
import { Modal } from '@affine/component';
|
||||||
import {
|
import {
|
||||||
StyledModalHeader,
|
StyledModalHeader,
|
||||||
StyledTextContent,
|
StyledTextContent,
|
||||||
StyledModalWrapper,
|
StyledModalWrapper,
|
||||||
StyledButtonContent,
|
StyledButtonContent,
|
||||||
} from './style';
|
} from './style';
|
||||||
import { ModalCloseButton } from '@/ui/modal';
|
import { ModalCloseButton } from '@affine/component';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { useWorkspaceHelper } from '@/hooks/use-workspace-helper';
|
import { useWorkspaceHelper } from '@/hooks/use-workspace-helper';
|
||||||
// import { getDataCenter } from '@affine/datacenter';
|
// import { getDataCenter } from '@affine/datacenter';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
|
|
||||||
export const StyledModalWrapper = styled('div')(({ theme }) => {
|
export const StyledModalWrapper = styled('div')(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import Input from '@/ui/input';
|
import { Input } from '@affine/component';
|
||||||
|
|
||||||
export const StyledInput = styled(Input)(({ theme }) => {
|
export const StyledInput = styled(Input)(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { EmailIcon } from '@blocksuite/icons';
|
import { EmailIcon } from '@blocksuite/icons';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { Modal, ModalWrapper, ModalCloseButton } from '@/ui/modal';
|
import { Modal, ModalWrapper, ModalCloseButton } from '@affine/component';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import Input from '@/ui/input';
|
import { Input } from '@affine/component';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { MuiAvatar } from '@/ui/mui';
|
import { MuiAvatar } from '@affine/component';
|
||||||
import useMembers from '@/hooks/use-members';
|
import useMembers from '@/hooks/use-members';
|
||||||
import { User } from '@affine/datacenter';
|
import { User } from '@affine/datacenter';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
|
@ -12,19 +12,19 @@ import {
|
|||||||
StyledMoreVerticalButton,
|
StyledMoreVerticalButton,
|
||||||
StyledMemberContainer,
|
StyledMemberContainer,
|
||||||
} from './style';
|
} from './style';
|
||||||
import { Wrapper } from '@/ui/layout';
|
import { Wrapper } from '@affine/component';
|
||||||
import { MoreVerticalIcon, EmailIcon, TrashIcon } from '@blocksuite/icons';
|
import { MoreVerticalIcon, EmailIcon, TrashIcon } from '@blocksuite/icons';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Button, IconButton } from '@/ui/button';
|
import { Button, IconButton } from '@affine/component';
|
||||||
import { InviteMemberModal } from './InviteMemberModal';
|
import { InviteMemberModal } from './InviteMemberModal';
|
||||||
import { Menu, MenuItem } from '@/ui/menu';
|
import { Menu, MenuItem } from '@affine/component';
|
||||||
import { Empty } from '@/ui/empty';
|
import { Empty } from '@affine/component';
|
||||||
import { WorkspaceUnit } from '@affine/datacenter';
|
import { WorkspaceUnit } from '@affine/datacenter';
|
||||||
import { useConfirm } from '@/providers/ConfirmProvider';
|
import { useConfirm } from '@/providers/ConfirmProvider';
|
||||||
import { toast } from '@/ui/toast';
|
import { toast } from '@affine/component';
|
||||||
import useMembers from '@/hooks/use-members';
|
import useMembers from '@/hooks/use-members';
|
||||||
import Loading from '@/components/loading';
|
import Loading from '@/components/loading';
|
||||||
import { FlexWrapper } from '@/ui/layout';
|
import { FlexWrapper } from '@affine/component';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
import { EnableWorkspaceButton } from '@/components/enable-workspace';
|
import { EnableWorkspaceButton } from '@/components/enable-workspace';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { MuiAvatar } from '@/ui/mui';
|
import { MuiAvatar } from '@affine/component';
|
||||||
|
|
||||||
export const StyledMemberTitleContainer = styled('li')(() => {
|
export const StyledMemberTitleContainer = styled('li')(() => {
|
||||||
return {
|
return {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { FlexWrapper } from '@/ui/layout';
|
import { FlexWrapper } from '@affine/component';
|
||||||
export const StyledSettingContainer = styled('div')(() => {
|
export const StyledSettingContainer = styled('div')(() => {
|
||||||
return {
|
return {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { ReactNode } from 'react';
|
import type { ReactNode } from 'react';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { WorkspaceItemWrapper, WorkspaceItemContent } from './styles';
|
import { WorkspaceItemWrapper, WorkspaceItemContent } from './styles';
|
||||||
|
|
||||||
interface ListItemProps {
|
interface ListItemProps {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { useModal } from '@/providers/GlobalModalProvider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { AffineIcon } from '../../icons/Icons';
|
import { AffineIcon } from '../../icons/Icons';
|
||||||
import {
|
import {
|
||||||
WorkspaceItemAvatar,
|
WorkspaceItemAvatar,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { MuiAvatar } from '@/ui/mui';
|
import { MuiAvatar } from '@affine/component';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
|
|
||||||
export const WorkspaceItemWrapper = styled('div')(({ theme }) => ({
|
export const WorkspaceItemWrapper = styled('div')(({ theme }) => ({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { MuiAvatar } from '@/ui/mui';
|
import { MuiAvatar } from '@affine/component';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { StyledPopperContainer } from '@/ui/shared/Container';
|
import { StyledPopperContainer } from '@affine/component';
|
||||||
|
|
||||||
export const SelectorWrapper = styled('div')({
|
export const SelectorWrapper = styled('div')({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
|
@ -21,11 +21,11 @@ import {
|
|||||||
SettingsIcon,
|
SettingsIcon,
|
||||||
} from '@blocksuite/icons';
|
} from '@blocksuite/icons';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { MuiCollapse } from '@/ui/mui';
|
import { MuiCollapse } from '@affine/component';
|
||||||
import { Tooltip } from '@/ui/tooltip';
|
import { Tooltip } from '@affine/component';
|
||||||
import { useModal } from '@/providers/GlobalModalProvider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { IconButton } from '@/ui/button';
|
import { IconButton } from '@affine/component';
|
||||||
import useLocalStorage from '@/hooks/use-local-storage';
|
import useLocalStorage from '@/hooks/use-local-storage';
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { displayFlex, styled, textEllipsis } from '@/styles';
|
import { displayFlex, styled, textEllipsis } from '@affine/component';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
export const StyledSliderBar = styled.div<{ show: boolean }>(
|
export const StyledSliderBar = styled.div<{ show: boolean }>(
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { displayFlex, styled } from '@/styles';
|
import { displayFlex, styled } from '@affine/component';
|
||||||
import Loading from '@/components/loading';
|
import Loading from '@/components/loading';
|
||||||
import Modal from '@/ui/modal';
|
import { Modal } from '@affine/component';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
import { FavouritedIcon } from '@blocksuite/icons';
|
import { FavouritedIcon } from '@blocksuite/icons';
|
||||||
import { toast } from '@/ui/toast';
|
import { toast } from '@affine/component';
|
||||||
export const StyledHeader = styled('div')({
|
export const StyledHeader = styled('div')({
|
||||||
height: '60px',
|
height: '60px',
|
||||||
width: '100vw',
|
width: '100vw',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useWorkspaceHelper } from '@/hooks/use-workspace-helper';
|
import { useWorkspaceHelper } from '@/hooks/use-workspace-helper';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
import { Empty } from '@/ui/empty';
|
import { Empty } from '@affine/component';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { PageLoading } from '@/components/loading';
|
import { PageLoading } from '@/components/loading';
|
||||||
|
@ -5,7 +5,7 @@ import exampleMarkdown2 from '@/templates/AFFiNE-Docs.md';
|
|||||||
|
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
interface Template {
|
interface Template {
|
||||||
name: string;
|
name: string;
|
||||||
source: string;
|
source: string;
|
||||||
@ -21,7 +21,7 @@ const TemplateItemContainer = styled('div')(() => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
const TEMPLATES: Template[] = [
|
const TEMPLATES: Template[] = [
|
||||||
{
|
{
|
||||||
name: 'Welcome-to-the-AFFiNE-Alpha.md',
|
name: 'Welcome-to-the-AFFiNE-Alpha.md',
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { ReactElement, useEffect, useState } from 'react';
|
import { ReactElement, useEffect, useState } from 'react';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import type { NextPageWithLayout } from '../..//_app';
|
import type { NextPageWithLayout } from '../..//_app';
|
||||||
import { displayFlex, styled } from '@/styles';
|
import { displayFlex, styled } from '@affine/component';
|
||||||
import dynamic from 'next/dynamic';
|
import dynamic from 'next/dynamic';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { Page as PageStore, Workspace } from '@blocksuite/store';
|
import { Page as PageStore, Workspace } from '@blocksuite/store';
|
||||||
import { PageLoading } from '@/components/loading';
|
import { PageLoading } from '@/components/loading';
|
||||||
import { Breadcrumbs } from '@/ui/breadcrumbs';
|
import { Breadcrumbs } from '@affine/component';
|
||||||
import { IconButton } from '@/ui/button';
|
import { IconButton } from '@affine/component';
|
||||||
import NextLink from 'next/link';
|
import NextLink from 'next/link';
|
||||||
import { PaperIcon, SearchIcon } from '@blocksuite/icons';
|
import { PaperIcon, SearchIcon } from '@blocksuite/icons';
|
||||||
import { WorkspaceUnitAvatar } from '@/components/workspace-avatar';
|
import { WorkspaceUnitAvatar } from '@/components/workspace-avatar';
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
StyledBreadcrumbs,
|
StyledBreadcrumbs,
|
||||||
SearchButton,
|
SearchButton,
|
||||||
} from './[pageId]';
|
} from './[pageId]';
|
||||||
import { Breadcrumbs } from '@/ui/breadcrumbs';
|
import { Breadcrumbs } from '@affine/component';
|
||||||
import { WorkspaceUnitAvatar } from '@/components/workspace-avatar';
|
import { WorkspaceUnitAvatar } from '@/components/workspace-avatar';
|
||||||
import { SearchIcon } from '@blocksuite/icons';
|
import { SearchIcon } from '@blocksuite/icons';
|
||||||
import { useModal } from '@/providers/GlobalModalProvider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@affine/component';
|
||||||
|
|
||||||
import { ReactElement, ReactNode } from 'react';
|
import { ReactElement, ReactNode } from 'react';
|
||||||
import WorkspaceLayout from '@/components/workspace-layout';
|
import WorkspaceLayout from '@/components/workspace-layout';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@affine/component';
|
||||||
|
|
||||||
export const FeatureCardDiv = styled('section')({
|
export const FeatureCardDiv = styled('section')({
|
||||||
width: '800px',
|
width: '800px',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { createContext, useContext, useState, ReactNode } from 'react';
|
import { createContext, useContext, useState, ReactNode } from 'react';
|
||||||
import type { PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
import { Confirm, ConfirmProps } from '@/ui/confirm';
|
import { Confirm, ConfirmProps } from '@affine/component';
|
||||||
|
|
||||||
type ConfirmContextValue = {
|
type ConfirmContextValue = {
|
||||||
confirm: (props: ConfirmProps) => Promise<boolean>;
|
confirm: (props: ConfirmProps) => Promise<boolean>;
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
import { createContext, useContext, useEffect, useState } from 'react';
|
import { createContext, useContext, useEffect, useState } from 'react';
|
||||||
import {
|
import { Global, css } from '@emotion/react';
|
||||||
ThemeProvider as EmotionThemeProvider,
|
|
||||||
Global,
|
|
||||||
css,
|
|
||||||
} from '@emotion/react';
|
|
||||||
import {
|
import {
|
||||||
ThemeProvider as MuiThemeProvider,
|
ThemeProvider as MuiThemeProvider,
|
||||||
createTheme as MuiCreateTheme,
|
createTheme as MuiCreateTheme,
|
||||||
@ -14,13 +10,14 @@ import {
|
|||||||
ThemeMode,
|
ThemeMode,
|
||||||
ThemeProviderProps,
|
ThemeProviderProps,
|
||||||
ThemeProviderValue,
|
ThemeProviderValue,
|
||||||
} from '@/styles/types';
|
} from '@affine/component';
|
||||||
import {
|
import {
|
||||||
getLightTheme,
|
getLightTheme,
|
||||||
getDarkTheme,
|
getDarkTheme,
|
||||||
globalThemeVariables,
|
globalThemeVariables,
|
||||||
} from '@/styles/theme';
|
ThemeProvider as ComponentThemeProvider,
|
||||||
import { SystemThemeHelper, localStorageThemeHelper } from '@/styles/utils';
|
} from '@affine/component';
|
||||||
|
import { SystemThemeHelper, localStorageThemeHelper } from '@affine/component';
|
||||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||||
|
|
||||||
export const ThemeContext = createContext<ThemeProviderValue>({
|
export const ThemeContext = createContext<ThemeProviderValue>({
|
||||||
@ -106,9 +103,9 @@ export const ThemeProvider = ({
|
|||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
/>
|
/>
|
||||||
<EmotionThemeProvider theme={themeStyle}>
|
<ComponentThemeProvider theme={themeStyle}>
|
||||||
{children}
|
{children}
|
||||||
</EmotionThemeProvider>
|
</ComponentThemeProvider>
|
||||||
</ThemeContext.Provider>
|
</ThemeContext.Provider>
|
||||||
</MuiThemeProvider>
|
</MuiThemeProvider>
|
||||||
);
|
);
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
import emotionStyled from '@emotion/styled';
|
|
||||||
export { css, keyframes } from '@emotion/react';
|
|
||||||
export const styled = emotionStyled;
|
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2020",
|
"target": "ES2020",
|
||||||
"lib": ["dom", "dom.iterable", "esnext"],
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
@ -17,7 +18,8 @@
|
|||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/*"]
|
"@/*": ["src/*"],
|
||||||
|
"@affine/component": ["../component/src/index"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||||
|
44
packages/component/.storybook/main.js
Normal file
44
packages/component/.storybook/main.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
const path = require('node:path');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
||||||
|
staticDirs: ['../../app/public'],
|
||||||
|
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
|
||||||
|
core: {
|
||||||
|
builder: '@storybook/builder-webpack5',
|
||||||
|
},
|
||||||
|
webpackFinal: config => {
|
||||||
|
const transpile = config.module.rules.find(x =>
|
||||||
|
x.test.toString().includes('tsx')
|
||||||
|
).use;
|
||||||
|
transpile.push({
|
||||||
|
loader: require.resolve('swc-loader'),
|
||||||
|
options: {
|
||||||
|
parseMap: true,
|
||||||
|
jsc: {
|
||||||
|
parser: {
|
||||||
|
syntax: 'typescript',
|
||||||
|
dynamicImport: true,
|
||||||
|
tsx: true,
|
||||||
|
},
|
||||||
|
target: 'es2022',
|
||||||
|
transform: {
|
||||||
|
react: {
|
||||||
|
runtime: 'automatic',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
config.resolve.alias = {
|
||||||
|
...config.resolve.alias,
|
||||||
|
'@': path.resolve(__dirname, '..', 'src'),
|
||||||
|
'@affine/i18n': path.resolve(__dirname, '..', '..', 'i18n', 'src'),
|
||||||
|
};
|
||||||
|
return config;
|
||||||
|
},
|
||||||
|
reactOptions: {
|
||||||
|
fastRefresh: true,
|
||||||
|
},
|
||||||
|
};
|
9
packages/component/.storybook/preview.js
Normal file
9
packages/component/.storybook/preview.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
export const parameters = {
|
||||||
|
actions: { argTypesRegex: '^on[A-Z].*' },
|
||||||
|
controls: {
|
||||||
|
matchers: {
|
||||||
|
color: /(background|color)$/i,
|
||||||
|
date: /Date$/,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
36
packages/component/package.json
Normal file
36
packages/component/package.json
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"name": "@affine/component",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.3.1",
|
||||||
|
"scripts": {
|
||||||
|
"storybook": "start-storybook -p 6006",
|
||||||
|
"build-storybook": "build-storybook"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@affine/i18n": "workspace:*",
|
||||||
|
"@blocksuite/editor": "0.4.0-alpha.2",
|
||||||
|
"@blocksuite/icons": "^2.0.2",
|
||||||
|
"@emotion/react": "^11.10.5",
|
||||||
|
"@emotion/styled": "^11.10.5",
|
||||||
|
"@mui/base": "=5.0.0-alpha.101",
|
||||||
|
"@mui/icons-material": "=5.10.9",
|
||||||
|
"@mui/material": "=5.8.6",
|
||||||
|
"lit": "^2.6.1",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dom": "^18.2.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@storybook/addon-actions": "^6.5.16",
|
||||||
|
"@storybook/addon-essentials": "^6.5.16",
|
||||||
|
"@storybook/addon-links": "^6.5.16",
|
||||||
|
"@storybook/builder-webpack5": "^6.5.16",
|
||||||
|
"@storybook/manager-webpack5": "^6.5.16",
|
||||||
|
"@storybook/react": "^6.5.16",
|
||||||
|
"@types/react": "^18.0.27",
|
||||||
|
"@types/react-dom": "18.0.10",
|
||||||
|
"swc": "^1.0.11",
|
||||||
|
"swc-loader": "^0.2.3",
|
||||||
|
"typescript": "^4.9.5",
|
||||||
|
"webpack": "^5.75.0"
|
||||||
|
}
|
||||||
|
}
|
16
packages/component/src/index.ts
Normal file
16
packages/component/src/index.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
export * from './ui/breadcrumbs';
|
||||||
|
export * from './ui/button';
|
||||||
|
export * from './ui/confirm';
|
||||||
|
export * from './ui/divider';
|
||||||
|
export * from './ui/empty';
|
||||||
|
export * from './ui/input';
|
||||||
|
export * from './ui/layout';
|
||||||
|
export * from './ui/menu';
|
||||||
|
export * from './ui/modal';
|
||||||
|
export * from './ui/popper';
|
||||||
|
export * from './ui/shared/Container';
|
||||||
|
export * from './ui/table';
|
||||||
|
export * from './ui/toast';
|
||||||
|
export * from './ui/tooltip';
|
||||||
|
export * from './ui/mui';
|
||||||
|
export * from './styles';
|
19
packages/component/src/stories/Breadcrumbs.stories.tsx
Normal file
19
packages/component/src/stories/Breadcrumbs.stories.tsx
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import React, { useMemo } from 'react';
|
||||||
|
import { Meta, Story } from '@storybook/react';
|
||||||
|
import { Breadcrumbs, getLightTheme, ThemeProvider } from '..';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'AFFiNE/Breadcrumbs',
|
||||||
|
component: Breadcrumbs,
|
||||||
|
} as Meta;
|
||||||
|
|
||||||
|
const Template: Story = args => (
|
||||||
|
<ThemeProvider theme={useMemo(() => getLightTheme('page'), [])}>
|
||||||
|
<Breadcrumbs {...args} />
|
||||||
|
</ThemeProvider>
|
||||||
|
);
|
||||||
|
|
||||||
|
export const Primary = Template.bind({});
|
||||||
|
Primary.args = {
|
||||||
|
children: [<span>1</span>, <span>2</span>, <span>3</span>],
|
||||||
|
};
|
20
packages/component/src/stories/Button.stories.tsx
Normal file
20
packages/component/src/stories/Button.stories.tsx
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import React, { useMemo } from 'react';
|
||||||
|
import { Meta, Story } from '@storybook/react';
|
||||||
|
import { Button, getLightTheme, ThemeProvider } from '..';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'AFFiNE/Button',
|
||||||
|
component: Button,
|
||||||
|
} as Meta;
|
||||||
|
|
||||||
|
const Template: Story = args => (
|
||||||
|
<ThemeProvider theme={useMemo(() => getLightTheme('page'), [])}>
|
||||||
|
<Button {...args} />
|
||||||
|
</ThemeProvider>
|
||||||
|
);
|
||||||
|
|
||||||
|
export const Primary = Template.bind({});
|
||||||
|
Primary.args = {
|
||||||
|
type: 'primary',
|
||||||
|
children: 'This is a button',
|
||||||
|
};
|
@ -1,5 +1,5 @@
|
|||||||
export type { ThemeMode, ThemeProviderProps, AffineTheme } from './types';
|
|
||||||
|
|
||||||
export * from './styled';
|
export * from './styled';
|
||||||
export * from './theme';
|
export * from './theme';
|
||||||
export * from './helper';
|
export * from './helper';
|
||||||
|
export * from './types';
|
||||||
|
export * from './utils';
|
15
packages/component/src/styles/styled.tsx
Normal file
15
packages/component/src/styles/styled.tsx
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { ThemeProvider as EmotionThemeProvider } from '@emotion/react';
|
||||||
|
import emotionStyled from '@emotion/styled';
|
||||||
|
import type { PropsWithChildren } from 'react';
|
||||||
|
import { AffineTheme } from './types';
|
||||||
|
export { css, keyframes } from '@emotion/react';
|
||||||
|
export const styled = emotionStyled;
|
||||||
|
|
||||||
|
export const ThemeProvider = ({
|
||||||
|
theme,
|
||||||
|
children,
|
||||||
|
}: PropsWithChildren<{
|
||||||
|
theme: AffineTheme;
|
||||||
|
}>) => {
|
||||||
|
return <EmotionThemeProvider theme={theme}>{children}</EmotionThemeProvider>;
|
||||||
|
};
|
@ -1,6 +1,6 @@
|
|||||||
import '@emotion/react';
|
import '@emotion/react';
|
||||||
import { AffineTheme, AffineThemeCSSVariables, ThemeMode } from './types';
|
import { AffineTheme, AffineThemeCSSVariables, ThemeMode } from './types';
|
||||||
import { EditorContainer } from '@blocksuite/editor';
|
import type { EditorContainer } from '@blocksuite/editor';
|
||||||
|
|
||||||
const basicFontFamily =
|
const basicFontFamily =
|
||||||
'apple-system, BlinkMacSystemFont,Helvetica Neue, Tahoma, PingFang SC, Microsoft Yahei, Arial,Hiragino Sans GB, sans-serif, Apple Color Emoji, Segoe UI Emoji,Segoe UI Symbol, Noto Color Emoji';
|
'apple-system, BlinkMacSystemFont,Helvetica Neue, Tahoma, PingFang SC, Microsoft Yahei, Arial,Hiragino Sans GB, sans-serif, Apple Color Emoji, Segoe UI Emoji,Segoe UI Symbol, Noto Color Emoji';
|
@ -1,5 +1,5 @@
|
|||||||
import MuiBreadcrumbs from '@mui/material/Breadcrumbs';
|
import MuiBreadcrumbs from '@mui/material/Breadcrumbs';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '../../styles';
|
||||||
|
|
||||||
export const Breadcrumbs = styled(MuiBreadcrumbs)(({ theme }) => {
|
export const Breadcrumbs = styled(MuiBreadcrumbs)(({ theme }) => {
|
||||||
return {
|
return {
|
@ -1,4 +1,4 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '../../styles';
|
||||||
import { ButtonProps } from './interface';
|
import { ButtonProps } from './interface';
|
||||||
import { getButtonColors } from './utils';
|
import { getButtonColors } from './utils';
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
import { absoluteCenter, displayInlineFlex, styled } from '@/styles';
|
import { absoluteCenter, displayInlineFlex, styled } from '../../styles';
|
||||||
import { CSSProperties } from 'react';
|
import { CSSProperties } from 'react';
|
||||||
import { ButtonProps } from '@/ui/button/interface';
|
import { ButtonProps } from './interface';
|
||||||
import { getSize, getButtonColors } from './utils';
|
import { getSize, getButtonColors } from './utils';
|
||||||
|
|
||||||
export const StyledIconButton = styled('button', {
|
export const StyledIconButton = styled('button', {
|
||||||
@ -213,7 +213,7 @@ export const StyledButton = styled('button', {
|
|||||||
},
|
},
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
...getButtonColors(theme, type, disabled, {
|
...getButtonColors(theme, type, {
|
||||||
hoverBackground,
|
hoverBackground,
|
||||||
hoverColor,
|
hoverColor,
|
||||||
hoverStyle,
|
hoverStyle,
|
@ -1,4 +1,4 @@
|
|||||||
import { AffineTheme } from '@/styles';
|
import { AffineTheme } from '../../styles';
|
||||||
import {
|
import {
|
||||||
SIZE_SMALL,
|
SIZE_SMALL,
|
||||||
SIZE_MIDDLE,
|
SIZE_MIDDLE,
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user