mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 10:59:19 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a30aebb689 |
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { updateCSS } from '@rc-component/util/lib/Dom/dynamicCSS';
|
||||
import { theme as antdTheme, ConfigProvider } from 'antd';
|
||||
import type { ThemeConfig } from 'antd';
|
||||
import type { ThemeProviderProps } from 'antd-style';
|
||||
import { ThemeProvider } from 'antd-style';
|
||||
import { updateCSS } from '@rc-component/util/lib/Dom/dynamicCSS';
|
||||
|
||||
import SiteContext from './slots/SiteContext';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import type { Tab } from '@rc-component/tabs/lib/interface';
|
||||
import { ConfigProvider, Tabs } from 'antd';
|
||||
import SourceCode from 'dumi/theme-default/builtins/SourceCode';
|
||||
import type { Tab } from '@rc-component/tabs/lib/interface';
|
||||
|
||||
import BunLogo from './bun';
|
||||
import NpmLogo from './npm';
|
||||
|
||||
@@ -3,10 +3,10 @@ import React, { useEffect, useRef } from 'react';
|
||||
import { CheckOutlined, SketchOutlined } from '@ant-design/icons';
|
||||
import { App } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import copy from '../../../../components/_util/copy';
|
||||
import { nodeToGroup } from 'html2sketch';
|
||||
|
||||
import type { AntdPreviewerProps } from '.';
|
||||
import copy from '../../../../components/_util/copy';
|
||||
import useLocale from '../../../hooks/useLocale';
|
||||
|
||||
const locales = {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Button } from 'antd';
|
||||
import type { ButtonProps } from 'antd';
|
||||
|
||||
import Link from './Link';
|
||||
import type { LinkProps } from './Link';
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@ const GlobalDemoStyles: React.FC = () => {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&-codeblock {
|
||||
&-codeblock {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -11,12 +11,12 @@ import { Helmet, useOutlet, useSearchParams, useSiteData } from 'dumi';
|
||||
import useLocale from '../../../hooks/useLocale';
|
||||
import useLocation from '../../../hooks/useLocation';
|
||||
import GlobalStyles from '../../common/GlobalStyles';
|
||||
import VersionUpgrade from '../../common/VersionUpgrade';
|
||||
import Header from '../../slots/Header';
|
||||
import SiteContext from '../../slots/SiteContext';
|
||||
import IndexLayout from '../IndexLayout';
|
||||
import ResourceLayout from '../ResourceLayout';
|
||||
import SidebarLayout from '../SidebarLayout';
|
||||
import VersionUpgrade from '../../common/VersionUpgrade';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -4,9 +4,9 @@ import path from 'path';
|
||||
import createEmotionServer from '@emotion/server/create-instance';
|
||||
import type { IApi, IRoute } from 'dumi';
|
||||
import ReactTechStack from 'dumi/dist/techStacks/react';
|
||||
import tsToJs from './utils/tsToJs';
|
||||
|
||||
import { dependencies, devDependencies } from '../../package.json';
|
||||
import tsToJs from './utils/tsToJs';
|
||||
|
||||
function extractEmotionStyle(html: string) {
|
||||
// copy from emotion ssr
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { FC, ReactNode } from 'react';
|
||||
import React from 'react';
|
||||
import { CodeOutlined, SkinOutlined } from '@ant-design/icons';
|
||||
import type { TabsProps } from '@rc-component/tabs';
|
||||
import { Tabs } from 'antd';
|
||||
import { useRouteMeta } from 'dumi';
|
||||
import type { IContentTabsProps } from 'dumi/theme-default/slots/ContentTabs';
|
||||
import type { TabsProps } from '@rc-component/tabs';
|
||||
|
||||
import useLocale from '../../../hooks/useLocale';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineConfig } from 'father';
|
||||
import path from 'path';
|
||||
import { defineConfig } from 'father';
|
||||
|
||||
const externalsConfig = {
|
||||
react: {
|
||||
|
||||
@@ -26,15 +26,14 @@ export type CustomComponent<P = AnyObject> = React.ComponentType<P> | string;
|
||||
* ```
|
||||
* @since 5.13.0
|
||||
*/
|
||||
export type GetProps<T extends React.ComponentType<any> | object> = T extends React.Context<
|
||||
infer CP
|
||||
>
|
||||
? CP
|
||||
: T extends React.ComponentType<infer P>
|
||||
? P
|
||||
: T extends object
|
||||
? T
|
||||
: never;
|
||||
export type GetProps<T extends React.ComponentType<any> | object> =
|
||||
T extends React.Context<infer CP>
|
||||
? CP
|
||||
: T extends React.ComponentType<infer P>
|
||||
? P
|
||||
: T extends object
|
||||
? T
|
||||
: never;
|
||||
|
||||
/**
|
||||
* Get component props by component name
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { Anchor } from 'antd';
|
||||
import type { AnchorProps } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Avatar, Badge } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { Badge, Card } from 'antd';
|
||||
import type { RibbonProps } from 'antd/es/badge/Ribbon';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import { render } from '../../../tests/utils';
|
||||
import Breadcrumb from '..';
|
||||
import { render } from '../../../tests/utils';
|
||||
|
||||
describe('Breadcrumb.Semantic', () => {
|
||||
it('should support function classNames and styles', () => {
|
||||
|
||||
@@ -3,8 +3,8 @@ import { HomeOutlined, UserOutlined } from '@ant-design/icons';
|
||||
import { Breadcrumb } from 'antd';
|
||||
import type { BreadcrumbProps } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { AntDesignOutlined } from '@ant-design/icons';
|
||||
import { Button } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -4,9 +4,9 @@ import { unit } from '@ant-design/cssinjs';
|
||||
|
||||
import { AggregationColor } from '../../color-picker/color';
|
||||
import { isBright } from '../../color-picker/components/ColorPresets';
|
||||
import { PresetColors } from '../../theme/interface';
|
||||
import type { FullToken, GenStyleFn, GetDefaultToken, PresetColorKey } from '../../theme/internal';
|
||||
import { getLineHeight, mergeToken } from '../../theme/internal';
|
||||
import { PresetColors } from '../../theme/interface';
|
||||
import getAlphaColor from '../../theme/util/getAlphaColor';
|
||||
|
||||
/** Component only token. Which will handle additional calculation of alias token */
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Calendar } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Dayjs } from 'dayjs';
|
||||
import dayjsGenerateConfig from '@rc-component/picker/generate/dayjs';
|
||||
import type { Dayjs } from 'dayjs';
|
||||
|
||||
import type { CalendarMode, CalendarProps } from './generateCalendar';
|
||||
import generateCalendar from './generateCalendar';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Avatar, Card } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const { Meta } = Card;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Checkbox } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import type { ColorPickerProps } from 'antd';
|
||||
import { ColorPicker } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import RenderEmpty from '../defaultRenderEmpty';
|
||||
|
||||
import { render } from '../../../tests/utils';
|
||||
import RenderEmpty from '../defaultRenderEmpty';
|
||||
|
||||
describe('renderEmpty', () => {
|
||||
it.each([
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useId } from 'react';
|
||||
import useMemo from '@rc-component/util/lib/hooks/useMemo';
|
||||
import isEqual from '@rc-component/util/lib/isEqual';
|
||||
|
||||
import { devUseWarning } from '../../_util/warning';
|
||||
import type { OverrideToken } from '../../theme/interface';
|
||||
import { defaultConfig } from '../../theme/internal';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import type { InternalDescriptionsItemType } from '.';
|
||||
import Cell from './Cell';
|
||||
import type { DescriptionsContextProps } from './DescriptionsContext';
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React from 'react';
|
||||
import { render } from '../../../tests/utils';
|
||||
|
||||
import Descriptions from '..';
|
||||
import { resetWarned } from '../../_util/warning';
|
||||
import { render } from '../../../tests/utils';
|
||||
|
||||
describe('Descriptions.Item span property types', () => {
|
||||
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
|
||||
@@ -3,8 +3,8 @@ import type { DrawerProps as RcDrawerProps } from '@rc-component/drawer';
|
||||
import RcDrawer from '@rc-component/drawer';
|
||||
import type { Placement } from '@rc-component/drawer/lib/Drawer';
|
||||
import type { CSSMotionProps } from '@rc-component/motion';
|
||||
import { composeRef } from '@rc-component/util/lib/ref';
|
||||
import useId from '@rc-component/util/lib/hooks/useId';
|
||||
import { composeRef } from '@rc-component/util/lib/ref';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
import ContextIsolator from '../_util/ContextIsolator';
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import React from 'react';
|
||||
import type { MenuProps } from '../../menu';
|
||||
import Dropdown from '..';
|
||||
import { SaveOutlined } from '@ant-design/icons';
|
||||
|
||||
import Dropdown from '..';
|
||||
import { render } from '../../../tests/utils';
|
||||
import type { MenuProps } from '../../menu';
|
||||
|
||||
describe('Dropdown.Semantic', () => {
|
||||
it('support classNames and styles', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Button, Empty, Typography } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -2,8 +2,8 @@ import * as React from 'react';
|
||||
import { useMemo } from 'react';
|
||||
import { FastColor } from '@ant-design/fast-color';
|
||||
|
||||
import { useToken } from '../theme/internal';
|
||||
import { useLocale } from '../locale';
|
||||
import { useToken } from '../theme/internal';
|
||||
|
||||
const Simple: React.FC = () => {
|
||||
const [, token] = useToken();
|
||||
|
||||
@@ -10,8 +10,8 @@ import { devUseWarning } from '../_util/warning';
|
||||
import Badge from '../badge';
|
||||
import type { BadgeProps } from '../badge';
|
||||
import Button from '../button/Button';
|
||||
import type { ButtonHTMLType } from '../button/buttonHelpers';
|
||||
import type { ButtonSemanticName } from '../button/Button';
|
||||
import type { ButtonHTMLType } from '../button/buttonHelpers';
|
||||
import { ConfigContext } from '../config-provider';
|
||||
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
|
||||
import Tooltip from '../tooltip';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
|
||||
import Form from '..';
|
||||
import Input from '../../input';
|
||||
import { render } from '../../../tests/utils';
|
||||
import Input from '../../input';
|
||||
|
||||
describe('Form.Semantic', () => {
|
||||
it('support classNames and styles', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Form, Input } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Options } from 'scroll-into-view-if-needed';
|
||||
|
||||
export type {
|
||||
InternalNamePath,
|
||||
NamePath,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import type { ImageProps as RcImageProps } from '@rc-component/image';
|
||||
import { Flex, Image, theme } from 'antd';
|
||||
import type { ImageProps } from 'antd';
|
||||
import type { ImageProps as RcImageProps } from '@rc-component/image';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
|
||||
import { render } from '../../../tests/utils';
|
||||
import InputNumber from '../index';
|
||||
import type { InputNumberProps } from '../index';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import { LockOutlined } from '@ant-design/icons';
|
||||
|
||||
import type { InputRef } from '..';
|
||||
import Input from '..';
|
||||
@@ -7,7 +8,6 @@ import mountTest from '../../../tests/shared/mountTest';
|
||||
import rtlTest from '../../../tests/shared/rtlTest';
|
||||
import { fireEvent, render, waitFakeTimer } from '../../../tests/utils';
|
||||
import Password from '../Password';
|
||||
import { LockOutlined } from '@ant-design/icons';
|
||||
|
||||
describe('Input.Password', () => {
|
||||
focusTest(Input.Password, { refFocus: true });
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { ConfigProvider } from 'antd';
|
||||
|
||||
import type { InputProps, InputRef } from '..';
|
||||
import Input from '..';
|
||||
@@ -9,7 +10,6 @@ import rtlTest from '../../../tests/shared/rtlTest';
|
||||
import { fireEvent, render, waitFor } from '../../../tests/utils';
|
||||
import Form from '../../form';
|
||||
import { triggerFocus } from '../Input';
|
||||
import { ConfigProvider } from 'antd';
|
||||
|
||||
describe('Input', () => {
|
||||
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { EditOutlined, UserOutlined } from '@ant-design/icons';
|
||||
import { Input } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Input } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { EditOutlined, UserOutlined } from '@ant-design/icons';
|
||||
import { Input } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Input } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Avatar, List, message } from 'antd';
|
||||
import VirtualList from '@rc-component/virtual-list';
|
||||
import { Avatar, List, message } from 'antd';
|
||||
|
||||
interface UserItem {
|
||||
email: string;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Card, Masonry } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Card, Divider, Flex, Masonry, Typography } from 'antd';
|
||||
import type { MasonryProps } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import type { MasonryItemType } from 'antd/es/masonry/MasonryItem';
|
||||
|
||||
const { Title } = Typography;
|
||||
|
||||
const useStyles = createStyles(() => ({
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import { MailOutlined } from '@ant-design/icons';
|
||||
|
||||
import type { MenuProps } from '..';
|
||||
import Menu from '..';
|
||||
import { render } from '../../../tests/utils';
|
||||
|
||||
@@ -13,6 +13,7 @@ import Item from './MenuItem';
|
||||
import type { MenuItemProps } from './MenuItem';
|
||||
import SubMenu from './SubMenu';
|
||||
import type { SubMenuProps } from './SubMenu';
|
||||
|
||||
export type { MenuDividerProps } from './MenuDivider';
|
||||
|
||||
export type { MenuItemGroupProps } from '@rc-component/menu';
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import React from 'react';
|
||||
|
||||
import message, { actWrapper } from '..';
|
||||
import { act, render } from '../../../tests/utils';
|
||||
import { awaitPromise, triggerMotionEnd } from './util';
|
||||
|
||||
jest.mock('react-dom', () => {
|
||||
const realReactDOM = jest.requireActual('react-dom');
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { message } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const { _InternalPanelDoNotUseOrYouWillBeFired: InternalPanel } = message;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import KeyCode from '@rc-component/util/lib/KeyCode';
|
||||
import type { ModalFuncProps } from '..';
|
||||
import Modal from '..';
|
||||
import { act, fireEvent, render, waitFakeTimer } from '../../../tests/utils';
|
||||
import ConfigProvider, { defaultPrefixCls } from '../../config-provider';
|
||||
import App from '../../app';
|
||||
import ConfigProvider, { defaultPrefixCls } from '../../config-provider';
|
||||
import type { GlobalConfigProps } from '../../config-provider';
|
||||
import type { ModalFunc } from '../confirm';
|
||||
import destroyFns from '../destroyFns';
|
||||
|
||||
@@ -4,8 +4,8 @@ import { SmileOutlined } from '@ant-design/icons';
|
||||
import notification, { actWrapper } from '..';
|
||||
import { act, fireEvent, render } from '../../../tests/utils';
|
||||
import ConfigProvider from '../../config-provider';
|
||||
import { awaitPromise, triggerMotionEnd } from './util';
|
||||
import type { ArgsProps as NotificationArgsProps } from '../interface';
|
||||
import { awaitPromise, triggerMotionEnd } from './util';
|
||||
|
||||
// TODO: Remove this. Mock for React 19
|
||||
jest.mock('react-dom', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Button, notification } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const { _InternalPanelDoNotUseOrYouWillBeFired: InternalPanel } = notification;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
|
||||
import type { PaginationProps } from '..';
|
||||
import Pagination from '..';
|
||||
import mountTest from '../../../tests/shared/mountTest';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Pagination } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { Flex, Popover } from 'antd';
|
||||
import type { GetProp } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
|
||||
const useStyle = createStyles(() => ({
|
||||
item: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { QRCode } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Radio } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Button, Result } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -3,8 +3,8 @@ import CheckCircleFilled from '@ant-design/icons/CheckCircleFilled';
|
||||
import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
|
||||
import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
|
||||
import WarningFilled from '@ant-design/icons/WarningFilled';
|
||||
import { clsx } from 'clsx';
|
||||
import pickAttrs from '@rc-component/util/lib/pickAttrs';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
import type { HTMLAriaDataAttributes } from '../_util/aria-data-attrs';
|
||||
import { useMergeSemantic } from '../_util/hooks';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as React from 'react';
|
||||
import { useRef } from 'react';
|
||||
import type { SliderRef } from '@rc-component/slider/lib/Slider';
|
||||
import raf from '@rc-component/util/lib/raf';
|
||||
import { composeRef } from '@rc-component/util/lib/ref';
|
||||
import type { SliderRef } from '@rc-component/slider/lib/Slider';
|
||||
|
||||
import type { TooltipProps } from '../tooltip';
|
||||
import Tooltip from '../tooltip';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Slider } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -9,8 +9,8 @@ import isNonNullable from '../_util/isNonNullable';
|
||||
import { devUseWarning } from '../_util/warning';
|
||||
import { useComponentConfig } from '../config-provider/context';
|
||||
import type { SizeType } from '../config-provider/SizeContext';
|
||||
import Compact from './Compact';
|
||||
import Addon from './Addon';
|
||||
import Compact from './Compact';
|
||||
import { SpaceContextProvider } from './context';
|
||||
import type { SpaceContextType } from './context';
|
||||
import Item from './Item';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
|
||||
import { render } from '../../../tests/utils';
|
||||
import Spin from '..';
|
||||
import type { SpinProps } from '..';
|
||||
import { render } from '../../../tests/utils';
|
||||
|
||||
describe('Spin.Semantic', () => {
|
||||
it('supports object classNames and styles for default mode', () => {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { Spin } from 'antd';
|
||||
import type { SpinProps } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { Spin } from 'antd';
|
||||
import type { SpinProps } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { Splitter } from 'antd';
|
||||
import type { SplitterProps } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import { Desc } from './size';
|
||||
|
||||
const locales = {
|
||||
|
||||
@@ -2,8 +2,8 @@ import * as React from 'react';
|
||||
|
||||
import { devUseWarning } from '../_util/warning';
|
||||
import type { StatisticProps } from './Statistic';
|
||||
import type { valueType } from './utils';
|
||||
import StatisticTimer from './Timer';
|
||||
import type { valueType } from './utils';
|
||||
|
||||
export interface CountdownProps extends StatisticProps {
|
||||
format?: string;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React from 'react';
|
||||
|
||||
import Statistic from '..';
|
||||
import { render } from '../../../tests/utils';
|
||||
import type { StatisticProps } from '..';
|
||||
import { render } from '../../../tests/utils';
|
||||
|
||||
describe('Statistic.Semantic', () => {
|
||||
it('support function classNames and styles', () => {
|
||||
|
||||
@@ -3,8 +3,8 @@ import { ArrowUpOutlined } from '@ant-design/icons';
|
||||
import { Statistic } from 'antd';
|
||||
import type { StatisticProps } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Switch } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { Tabs } from 'antd';
|
||||
import type { TabsProps } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
|
||||
import { CheckCircleOutlined } from '@ant-design/icons';
|
||||
|
||||
import Tag from '..';
|
||||
import { render } from '../../../tests/utils';
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { AntDesignOutlined } from '@ant-design/icons';
|
||||
import { Tag } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Tag } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Flex, message, Tag } from 'antd';
|
||||
import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons';
|
||||
import { Flex, message, Tag } from 'antd';
|
||||
|
||||
const { CheckableTag } = Tag;
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ import type {
|
||||
import { PresetColors } from './interface';
|
||||
import { getLineHeight } from './themes/shared/genFontSizes';
|
||||
import useToken from './useToken';
|
||||
import { genComponentStyleHook, genStyleHooks, genSubStyleComponent } from './util/genStyleUtils';
|
||||
import genPresetColor from './util/genPresetColor';
|
||||
import { genComponentStyleHook, genStyleHooks, genSubStyleComponent } from './util/genStyleUtils';
|
||||
import useResetIconStyle from './util/useResetIconStyle';
|
||||
|
||||
export { defaultConfig, DesignTokenContext } from './context';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createTheme } from '@ant-design/cssinjs';
|
||||
|
||||
import defaultDerivative from './index';
|
||||
|
||||
const defaultTheme = createTheme(defaultDerivative);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Timeline } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { Button, Tour } from 'antd';
|
||||
import type { TourProps } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Button, message, Transfer } from 'antd';
|
||||
import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons';
|
||||
import { Button, message, Transfer } from 'antd';
|
||||
import type { TransferProps } from 'antd';
|
||||
|
||||
interface RecordType {
|
||||
|
||||
@@ -8,7 +8,7 @@ const useStyles = createStyles(({ token, css }) => ({
|
||||
header: { color: token.colorPrimary },
|
||||
actions: css`
|
||||
& button {
|
||||
background-color: rgba(255,242,232,0.6);
|
||||
background-color: rgba(255, 242, 232, 0.6);
|
||||
}
|
||||
`,
|
||||
}));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import { TreeSelect } from 'antd';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { TreeSelect } from 'antd';
|
||||
|
||||
const treeData = [
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import debounce from 'lodash/debounce';
|
||||
import type RcTree from '@rc-component/tree';
|
||||
import type { Key } from '@rc-component/tree/lib/interface';
|
||||
import debounce from 'lodash/debounce';
|
||||
|
||||
import mountTest from '../../../tests/shared/mountTest';
|
||||
import rtlTest from '../../../tests/shared/rtlTest';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { CSSObject } from '@ant-design/cssinjs';
|
||||
|
||||
import type { TreeToken } from '.';
|
||||
|
||||
// ============================ Directory =============================
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { isValidElement, useMemo } from 'react';
|
||||
|
||||
import type { TooltipProps } from '../../tooltip';
|
||||
|
||||
const useTooltipProps = (
|
||||
|
||||
@@ -3,8 +3,8 @@ import { UploadOutlined } from '@ant-design/icons';
|
||||
import type { UploadProps } from 'antd';
|
||||
import { Button, Upload } from 'antd';
|
||||
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
import useLocale from '../../../.dumi/hooks/useLocale';
|
||||
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
|
||||
@@ -68,7 +68,8 @@ After adding the brightness overlay, we get a blue color with brightness variati
|
||||
|
||||
```css
|
||||
background-color: rgb(0, 106, 255);
|
||||
background-image: linear-gradient(0deg, rgb(0, 0, 0), transparent),
|
||||
background-image:
|
||||
linear-gradient(0deg, rgb(0, 0, 0), transparent),
|
||||
linear-gradient(90deg, rgb(255, 255, 255), rgba(255, 255, 255, 0));
|
||||
```
|
||||
|
||||
|
||||
@@ -68,7 +68,8 @@ background-image: linear-gradient(0deg, rgb(0, 0, 0), transparent);
|
||||
|
||||
```css
|
||||
background-color: rgb(0, 106, 255);
|
||||
background-image: linear-gradient(0deg, rgb(0, 0, 0), transparent),
|
||||
background-image:
|
||||
linear-gradient(0deg, rgb(0, 0, 0), transparent),
|
||||
linear-gradient(90deg, rgb(255, 255, 255), rgba(255, 255, 255, 0));
|
||||
```
|
||||
|
||||
|
||||
@@ -151,7 +151,6 @@ title: 数据可视化页
|
||||
#### 串联分析思路
|
||||
|
||||
- 明确此类页面的使用者身份,以及分析目的,从而选择对应的页面类型. 划分用户。不同业务线间,关注的核心指标不同,常见的指标类型有:宏观的大盘数据,具体的业务指标。
|
||||
|
||||
- 针对决策者,可以选择描述型的指标结果页面;
|
||||
- 针对执行者,可以选择有更多分析功能的分析、详情页面。
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import path from 'path';
|
||||
import fg from 'fast-glob';
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import isPlainObject from 'lodash/isPlainObject';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import $ from 'dekko';
|
||||
import chalk from 'chalk';
|
||||
import $ from 'dekko';
|
||||
|
||||
$('dist')
|
||||
.isDirectory()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import $ from 'dekko';
|
||||
import chalk from 'chalk';
|
||||
import $ from 'dekko';
|
||||
|
||||
$('lib').isDirectory().hasFile('index.js').hasFile('index.d.ts');
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import $ from 'dekko';
|
||||
import chalk from 'chalk';
|
||||
import fs from 'node:fs';
|
||||
import chalk from 'chalk';
|
||||
import $ from 'dekko';
|
||||
|
||||
const includeUseClient = (filename: string) =>
|
||||
fs.readFileSync(filename).toString().includes('"use client"');
|
||||
|
||||
Reference in New Issue
Block a user