feat: forced file naming format (#2270)

This commit is contained in:
Himself65
2023-05-09 06:37:07 +08:00
committed by GitHub
parent 95bc5cac49
commit 4f99ad2db4
132 changed files with 208 additions and 100 deletions

View File

@@ -13,7 +13,7 @@ import type { PropsWithChildren, ReactElement } from 'react';
import type { ReactNode } from 'react';
import { forwardRef, useCallback, useEffect } from 'react';
import { IconButton } from '../../ui/button/IconButton';
import { IconButton } from '../../ui/button/icon-button';
import {
floatingMaxWidth,
haloStyle,

View File

@@ -15,7 +15,7 @@ import {
RedditIcon,
TelegramIcon,
TwitterIcon,
} from './Icons';
} from './icons';
import {
StyledBigLink,
StyledLogo,

View File

@@ -1,5 +1,5 @@
export * from './CopyLink';
export * from './DisablePublicSharing';
export * from './Export';
export * from './copy-link';
export * from './disable-public-sharing';
export * from './export';
// export * from './MoveTo';
export * from './MoveToTrash';
export * from './move-to-trash';

View File

@@ -12,7 +12,7 @@ import {
menuItemStyle,
svgStyle,
} from './index.css';
import type { ShareMenuProps } from './ShareMenu';
import type { ShareMenuProps } from './share-menu';
export const Export: FC<ShareMenuProps> = props => {
const contentParserRef = useRef<ContentParser>();

View File

@@ -1,2 +1,2 @@
export * from './disable-public-link';
export * from './ShareMenu';
export * from './share-menu';

View File

@@ -7,10 +7,10 @@ import { useRef } from 'react';
import { useCallback, useState } from 'react';
import { Menu } from '../..';
import { Export } from './Export';
import { Export } from './export';
import { containerStyle, indicatorContainerStyle, tabStyle } from './index.css';
import { SharePage } from './SharePage';
import { ShareWorkspace } from './ShareWorkspace';
import { SharePage } from './share-page';
import { ShareWorkspace } from './share-workspace';
import { StyledIndicator, StyledShareButton, TabItem } from './styles';
type SharePanel = 'SharePage' | 'Export' | 'ShareWorkspace';
const MenuItems: Record<SharePanel, FC<ShareMenuProps>> = {

View File

@@ -15,7 +15,7 @@ import {
inputButtonRowStyle,
menuItemStyle,
} from './index.css';
import type { ShareMenuProps } from './ShareMenu';
import type { ShareMenuProps } from './share-menu';
import {
StyledButton,
StyledDisableButton,

View File

@@ -4,7 +4,7 @@ import { WorkspaceFlavour } from '@affine/workspace/type';
import type { FC } from 'react';
import { descriptionStyle, menuItemStyle } from './index.css';
import type { ShareMenuProps } from './ShareMenu';
import type { ShareMenuProps } from './share-menu';
import { StyledButton } from './styles';
const ShareLocalWorkspace: FC<ShareMenuProps<LocalWorkspace>> = props => {

View File

@@ -1 +1 @@
export * from './TourModal';
export * from './tour-modal';

View File

@@ -10,7 +10,7 @@ import { useBlockSuiteWorkspaceName } from '@toeverything/hooks/use-block-suite-
import clsx from 'clsx';
import type React from 'react';
import { DefaultAvatar } from './DefaultAvatar';
import { DefaultAvatar } from './default-avatar';
import { avatarImageStyle, avatarStyle } from './index.css';
export type WorkspaceAvatarProps = {

View File

@@ -1,4 +1,4 @@
export * from './components/ListSkeleton';
export * from './components/list-skeleton';
export * from './styles';
export * from './ui/breadcrumbs';
export * from './ui/button';
@@ -11,7 +11,7 @@ export * from './ui/menu';
export * from './ui/modal';
export * from './ui/mui';
export * from './ui/popper';
export * from './ui/shared/Container';
export * from './ui/shared/container';
export * from './ui/switch';
export * from './ui/table';
export * from './ui/toast';

View File

@@ -8,7 +8,7 @@ import type { StoryFn } from '@storybook/react';
import { useState } from 'react';
import { PublicLinkDisableModal } from '../components/share-menu/disable-public-link';
import { ShareMenu } from '../components/share-menu/ShareMenu';
import { ShareMenu } from '../components/share-menu/share-menu';
import { StyledDisableButton } from '../components/share-menu/styles';
import toast from '../ui/toast/toast';

View File

@@ -1,5 +1,5 @@
export * from './helper';
export * from './mui-theme';
export * from './MuiThemeProvider';
export * from './mui-theme-provider';
export * from './types';
export * from './utils';

View File

@@ -1,2 +1,2 @@
export * from './localStorageThemeHelper';
export * from './systemThemeHelper';
export * from './local-storage-theme-helper';
export * from './system-theme-helper';

View File

@@ -1,7 +1,7 @@
import { Children, cloneElement, forwardRef } from 'react';
import type { ButtonProps } from './interface';
import { Loading } from './Loading';
import { Loading } from './loading';
import { StyledButton } from './styles';
import { getSize } from './utils';
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(

View File

@@ -1,3 +1,3 @@
export * from './Button';
export * from './IconButton';
export * from './TextButton';
export * from './button';
export * from './icon-button';
export * from './text-button';

View File

@@ -1 +1 @@
export * from './Confirm';
export * from './confirm';

View File

@@ -1,7 +1,7 @@
import type { SvgIconProps } from '@mui/material/SvgIcon';
import SvgIcon from '@mui/material/SvgIcon';
export const EmptySVG = (_props: SvgIconProps) => {
export const EmptySvg = (_props: SvgIconProps) => {
return (
<SvgIcon
width="200"

View File

@@ -1,6 +1,6 @@
import type { CSSProperties } from 'react';
import { EmptySVG } from './EmptySVG';
import { EmptySvg } from './empty-svg';
import { StyledEmptyContainer } from './style';
export type EmptyContentProps = {
containerStyle?: CSSProperties;
@@ -15,7 +15,7 @@ export const Empty = ({
}: EmptyContentProps) => {
return (
<StyledEmptyContainer style={containerStyle}>
<EmptySVG />
<EmptySvg />
<p style={descriptionStyle}>{description}</p>
</StyledEmptyContainer>
);

View File

@@ -1 +1 @@
export * from './Empty';
export * from './empty';

View File

@@ -1,3 +1,3 @@
export * from './Input';
import { Input } from './Input';
export * from './input';
import { Input } from './input';
export default Input;

View File

@@ -1,2 +1,2 @@
export * from './Content';
export * from './Wrapper';
export * from './content';
export * from './wrapper';

View File

@@ -1,4 +1,4 @@
export * from './Menu';
export * from './menu';
// export { StyledMenuItem as MenuItem } from './styles';
export * from './MenuItem';
export * from './PureMenu';
export * from './menu-item';
export * from './pure-menu';

View File

@@ -1,7 +1,7 @@
import type { CSSProperties } from 'react';
import { displayFlex, styled, textEllipsis } from '../../styles';
import StyledPopperContainer from '../shared/Container';
import StyledPopperContainer from '../shared/container';
export const StyledMenuWrapper = styled(StyledPopperContainer)<{
width?: CSSProperties['width'];

View File

@@ -1,7 +1,7 @@
import Modal from './Modal';
import Modal from './modal';
export * from './Modal';
export * from './ModalCloseButton';
export * from './ModalWrapper';
export * from './modal';
export * from './modal-close-button';
export * from './modal-wrapper';
export default Modal;

View File

@@ -2,8 +2,8 @@ import { CloseIcon } from '@blocksuite/icons';
import type { HTMLAttributes } from 'react';
import { styled } from '../../styles';
import type { IconButtonProps } from '../button/IconButton';
import { IconButton } from '../button/IconButton';
import type { IconButtonProps } from '../button/icon-button';
import { IconButton } from '../button/icon-button';
export type ModalCloseButtonProps = {
top?: number;
right?: number;

View File

@@ -1,3 +1,3 @@
export * from './interface';
export * from './Popper';
export * from './PurePopper';
export * from './popper';
export * from './pure-popper';

View File

@@ -13,7 +13,7 @@ import {
import { styled } from '../../styles';
import type { PopperProps, VirtualElement } from './interface';
import { PopperArrow } from './PopoverArrow';
import { PopperArrow } from './popover-arrow';
export const Popper = ({
children,
content,

View File

@@ -3,8 +3,8 @@ import Grow from '@mui/material/Grow';
import type { CSSProperties, PropsWithChildren } from 'react';
import { useState } from 'react';
import { PopperArrow } from './PopoverArrow';
import { BasicStyledPopper } from './Popper';
import { PopperArrow } from './popover-arrow';
import { BasicStyledPopper } from './popper';
import { PopperWrapper } from './styles';
export type PurePopperProps = {

View File

@@ -1 +1 @@
export * from './Switch';
export * from './switch';

View File

@@ -1,4 +1,4 @@
// components/Switch.tsx
// components/switch.tsx
import { useState } from 'react';
import { styled } from '../../styles';

View File

@@ -6,8 +6,8 @@
//
export * from './interface';
export * from './Table';
export * from './TableBody';
export * from './TableCell';
export * from './TableHead';
export * from './TableRow';
export * from './table';
export * from './table-body';
export * from './table-cell';
export * from './table-head';
export * from './table-row';

View File

@@ -1,2 +1,2 @@
export * from './QuickSearch-tips';
export * from './Tooltip';
export * from './quick-search-tips';
export * from './tooltip';

View File

@@ -2,7 +2,7 @@ import type { TooltipProps } from '@mui/material';
import { css, displayFlex, styled } from '../../styles';
import { Popper, type PopperProps } from '../popper';
import StyledPopperContainer from '../shared/Container';
import StyledPopperContainer from '../shared/container';
const StyledTooltip = styled(StyledPopperContainer)(() => {
return {
width: '390px',

View File

@@ -2,7 +2,7 @@ import type { TooltipProps } from '@mui/material';
import { styled } from '../../styles';
import { Popper, type PopperProps } from '../popper';
import StyledPopperContainer from '../shared/Container';
import StyledPopperContainer from '../shared/container';
const StyledTooltip = styled(StyledPopperContainer)(() => {
return {
maxWidth: '320px',

View File

@@ -1,3 +1,3 @@
export * from './TreeNode';
export * from './TreeView';
export * from './tree-node';
export * from './tree-view';
export * from './types';

View File

@@ -6,7 +6,7 @@ import {
StyledTreeNodeContainer,
StyledTreeNodeWrapper,
} from './styles';
import { NodeLine, TreeNodeItem, TreeNodeItemWithDnd } from './TreeNodeInner';
import { NodeLine, TreeNodeItem, TreeNodeItemWithDnd } from './tree-node-inner';
import type { TreeNodeProps } from './types';
export const TreeNodeWithDnd = <RenderProps,>(
props: TreeNodeProps<RenderProps>

View File

@@ -9,9 +9,9 @@ import {
} from '@dnd-kit/core';
import { useCallback, useState } from 'react';
import useCollapsed from './hooks/useCollapsed';
import useSelectWithKeyboard from './hooks/useSelectWithKeyboard';
import { TreeNode, TreeNodeWithDnd } from './TreeNode';
import useCollapsed from './hooks/use-collapsed';
import useSelectWithKeyboard from './hooks/use-select-with-keyboard';
import { TreeNode, TreeNodeWithDnd } from './tree-node';
import type { TreeViewProps } from './types';
import { findNode } from './utils';
export const TreeView = <RenderProps,>({