mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-13 21:09:21 +08:00
Compare commits
142 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d90f8ed238 | ||
|
|
185398afdc | ||
|
|
b3adc9a69b | ||
|
|
fbd6fdafbe | ||
|
|
5b9b6f801a | ||
|
|
27826a8136 | ||
|
|
4f53033269 | ||
|
|
c235b1193b | ||
|
|
ff35ebb285 | ||
|
|
0d603d44fa | ||
|
|
2a8a811762 | ||
|
|
cb309acd4a | ||
|
|
e2ce447c47 | ||
|
|
f62d50533b | ||
|
|
e15b8defc9 | ||
|
|
e33444368e | ||
|
|
4a88f6a98a | ||
|
|
f324de2173 | ||
|
|
0362603ae5 | ||
|
|
8def94703b | ||
|
|
67a0e2fee7 | ||
|
|
584a7be26f | ||
|
|
3f5129ac44 | ||
|
|
d937a3930f | ||
|
|
c300c97a3e | ||
|
|
ec953cbffa | ||
|
|
caccb11d6f | ||
|
|
a863062f7b | ||
|
|
584923d35b | ||
|
|
75ddcdfd00 | ||
|
|
9b2054ffec | ||
|
|
b1bb15a753 | ||
|
|
c78056d0a4 | ||
|
|
ba47850fa0 | ||
|
|
ae98485a3e | ||
|
|
9bb27c4100 | ||
|
|
64f7963395 | ||
|
|
6fac5c24bf | ||
|
|
ee8cc27686 | ||
|
|
364bcc74d1 | ||
|
|
7130056493 | ||
|
|
8a4e89fc59 | ||
|
|
6893402469 | ||
|
|
957b027fa1 | ||
|
|
6c5036e285 | ||
|
|
4888842fc4 | ||
|
|
1463722eb5 | ||
|
|
c3710c0102 | ||
|
|
ae9fc640c6 | ||
|
|
1a3b29ec8f | ||
|
|
8ac5c5fde4 | ||
|
|
d7aac85735 | ||
|
|
0cdfaf578a | ||
|
|
c4b105c66a | ||
|
|
1e9b8a997c | ||
|
|
82622f14d5 | ||
|
|
f7a216aaa9 | ||
|
|
a6d83589db | ||
|
|
a01c1293cf | ||
|
|
1721a1af9b | ||
|
|
8e1bdc8121 | ||
|
|
283b2822e0 | ||
|
|
d353c2949c | ||
|
|
1ec7cd744d | ||
|
|
50dc6acbb2 | ||
|
|
cab5910713 | ||
|
|
fbe0a46857 | ||
|
|
8af72472fa | ||
|
|
8ec34d6204 | ||
|
|
7e2f8ce1f0 | ||
|
|
9123bbbfd7 | ||
|
|
24bd6fd311 | ||
|
|
d9eb4ccb4b | ||
|
|
da8e1ccde2 | ||
|
|
89fa656149 | ||
|
|
8399590542 | ||
|
|
e2f3cf6133 | ||
|
|
5471db8383 | ||
|
|
d188f03bb8 | ||
|
|
edb2bde901 | ||
|
|
8fbae86149 | ||
|
|
fba5f4f6cb | ||
|
|
2ccab1e984 | ||
|
|
acd131b7c4 | ||
|
|
353a94f43d | ||
|
|
09b1107c35 | ||
|
|
3abfb8c2dc | ||
|
|
38efd012a2 | ||
|
|
49c4f56100 | ||
|
|
8852b23742 | ||
|
|
f160384640 | ||
|
|
1c5b04e47b | ||
|
|
330c5be52e | ||
|
|
eac8dde1e5 | ||
|
|
3a78aacb3c | ||
|
|
2ff9d89b15 | ||
|
|
3d152a78fd | ||
|
|
0a89f9cf21 | ||
|
|
9af831fd92 | ||
|
|
3686df953a | ||
|
|
d08de4e1de | ||
|
|
ec0bdd2984 | ||
|
|
6ed7b0f045 | ||
|
|
44abdc4cda | ||
|
|
b8b365c2d1 | ||
|
|
0774e5a40a | ||
|
|
a3d31746e3 | ||
|
|
7326f7b119 | ||
|
|
886a1d19cd | ||
|
|
5235b4fe32 | ||
|
|
5c52fea0bf | ||
|
|
39b7edd337 | ||
|
|
dbf71b5059 | ||
|
|
60cd020a35 | ||
|
|
9108b85cf7 | ||
|
|
1341d29312 | ||
|
|
397cb98bd1 | ||
|
|
56ff32425e | ||
|
|
8f616c018e | ||
|
|
a2aadb3fa8 | ||
|
|
5b8fd49fba | ||
|
|
fb6d7405d0 | ||
|
|
0d0f88c71a | ||
|
|
9a62d148c7 | ||
|
|
5efbb093bc | ||
|
|
ea4d320241 | ||
|
|
2ffd8a7012 | ||
|
|
81e7f3fe98 | ||
|
|
dfd962d350 | ||
|
|
742ecee166 | ||
|
|
d680ea3d30 | ||
|
|
c0589e939d | ||
|
|
d1b47edff4 | ||
|
|
631ee77e5b | ||
|
|
c3f41c19ba | ||
|
|
60efb8e170 | ||
|
|
9f45cb32c2 | ||
|
|
97ef4e304e | ||
|
|
1004fa28ea | ||
|
|
af27ca20fb | ||
|
|
bc1db71a0d | ||
|
|
7a919eb971 |
@@ -12,23 +12,22 @@ import useLocation from './useLocation';
|
||||
const locales = {
|
||||
cn: {
|
||||
deprecated: '废弃',
|
||||
update: '更新',
|
||||
updated: '更新',
|
||||
new: '新增',
|
||||
},
|
||||
en: {
|
||||
deprecated: 'DEPRECATED',
|
||||
update: 'UPDATE',
|
||||
updated: 'UPDATED',
|
||||
new: 'NEW',
|
||||
},
|
||||
};
|
||||
|
||||
const getTagColor = (val?: string) => {
|
||||
switch (val?.toUpperCase()) {
|
||||
case 'UPDATE':
|
||||
case 'UPDATED':
|
||||
return 'processing';
|
||||
case 'DEPRECATED':
|
||||
return 'red';
|
||||
|
||||
default:
|
||||
return 'success';
|
||||
}
|
||||
@@ -47,7 +46,7 @@ const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
font-weight: normal;
|
||||
font-size: ${cssVar.fontSizeSM};
|
||||
opacity: 0.8;
|
||||
margin-left: 4px;
|
||||
margin-inline-start: ${cssVar.marginSM};
|
||||
`,
|
||||
}));
|
||||
|
||||
@@ -67,6 +66,7 @@ const MenuItemLabelWithTag: React.FC<MenuItemLabelProps> = (props) => {
|
||||
const { before, after, link, title, subtitle, search, tag, className } = props;
|
||||
|
||||
const [locale] = useLocale(locales);
|
||||
|
||||
const getLocale = (name: string) => {
|
||||
return (locale as any)[name.toLowerCase()] ?? name;
|
||||
};
|
||||
@@ -74,7 +74,7 @@ const MenuItemLabelWithTag: React.FC<MenuItemLabelProps> = (props) => {
|
||||
if (!before && !after) {
|
||||
return (
|
||||
<Link to={`${link}${search}`} className={clsx(className, { [styles.link]: tag })}>
|
||||
<Flex justify="flex-start" align="center" gap="small">
|
||||
<Flex justify="flex-start" align="center">
|
||||
<span>{title}</span>
|
||||
{subtitle && <span className={styles.subtitle}>{subtitle}</span>}
|
||||
</Flex>
|
||||
|
||||
@@ -3,10 +3,14 @@ import { removeCSS, updateCSS } from '@rc-component/util/lib/Dom/dynamicCSS';
|
||||
|
||||
import theme from '../../components/theme';
|
||||
|
||||
const duration = 0.5;
|
||||
const viewTransitionStyle = `
|
||||
@keyframes keepAlive {100% { z-index: -1 }}
|
||||
|
||||
::view-transition-old(root),
|
||||
::view-transition-new(root) {
|
||||
animation: none;
|
||||
animation: keepAlive ${duration}s linear;
|
||||
animation-fill-mode: forwards;
|
||||
mix-blend-mode: normal;
|
||||
}
|
||||
|
||||
@@ -50,7 +54,7 @@ const useThemeAnimation = () => {
|
||||
clipPath: isDark ? [...clipPath].reverse() : clipPath,
|
||||
},
|
||||
{
|
||||
duration: 500,
|
||||
duration: duration * 1000,
|
||||
easing: 'ease-in',
|
||||
pseudoElement: isDark ? '::view-transition-old(root)' : '::view-transition-new(root)',
|
||||
},
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React from 'react';
|
||||
import { CustomerServiceOutlined, QuestionCircleOutlined, SyncOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
Alert,
|
||||
Card,
|
||||
Carousel,
|
||||
DatePicker,
|
||||
Flex,
|
||||
FloatButton,
|
||||
Modal,
|
||||
Progress,
|
||||
Masonry,
|
||||
Splitter,
|
||||
Tag,
|
||||
Tour,
|
||||
Typography,
|
||||
@@ -21,7 +21,6 @@ import SiteContext from '../../../theme/slots/SiteContext';
|
||||
import { DarkContext } from './../../../hooks/useDark';
|
||||
import { getCarouselStyle } from './util';
|
||||
|
||||
const { _InternalPanelDoNotUseOrYouWillBeFired: ModalDoNotUseOrYouWillBeFired } = Modal;
|
||||
const { _InternalPanelDoNotUseOrYouWillBeFired: DatePickerDoNotUseOrYouWillBeFired } = DatePicker;
|
||||
const { _InternalPanelDoNotUseOrYouWillBeFired: TourDoNotUseOrYouWillBeFired } = Tour;
|
||||
const { _InternalPanelDoNotUseOrYouWillBeFired: FloatButtonDoNotUseOrYouWillBeFired } = FloatButton;
|
||||
@@ -148,24 +147,26 @@ const ComponentsList: React.FC = () => {
|
||||
const { styles } = useStyle();
|
||||
const [locale] = useLocale(locales);
|
||||
const { isMobile } = React.use(SiteContext);
|
||||
const isDark = React.use(DarkContext);
|
||||
const COMPONENTS = React.useMemo<Omit<ComponentItemProps, 'index'>[]>(
|
||||
() => [
|
||||
{
|
||||
title: 'Modal',
|
||||
type: 'update',
|
||||
node: (
|
||||
<ModalDoNotUseOrYouWillBeFired title="Ant Design" width={300}>
|
||||
{locale.sampleContent}
|
||||
</ModalDoNotUseOrYouWillBeFired>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// title: 'Modal',
|
||||
// type: 'update',
|
||||
// node: (
|
||||
// <ModalDoNotUseOrYouWillBeFired title="Ant Design" width={300}>
|
||||
// {locale.sampleContent}
|
||||
// </ModalDoNotUseOrYouWillBeFired>
|
||||
// ),
|
||||
// },
|
||||
|
||||
{
|
||||
title: 'DatePicker',
|
||||
type: 'update',
|
||||
node: (
|
||||
<DatePickerDoNotUseOrYouWillBeFired
|
||||
value={dayjs('2022-11-18 14:00:00')}
|
||||
value={dayjs('2025-11-22 00:00:00')}
|
||||
// defaultValue={dayjs('2025-11-22 00:00:00')}
|
||||
showToday={false}
|
||||
presets={
|
||||
isMobile
|
||||
@@ -180,30 +181,30 @@ const ComponentsList: React.FC = () => {
|
||||
/>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// title: 'Progress',
|
||||
// type: 'update',
|
||||
// node: (
|
||||
// <Flex gap="small" vertical>
|
||||
// <Flex gap="small" align="center">
|
||||
// <Progress type="circle" railColor="#e6f4ff" percent={60} size={14} />
|
||||
// {locale.inProgress}
|
||||
// </Flex>
|
||||
// <Flex gap="small" align="center">
|
||||
// <Progress type="circle" percent={100} size={14} />
|
||||
// {locale.success}
|
||||
// </Flex>
|
||||
// <Flex gap="small" align="center">
|
||||
// <Progress type="circle" status="exception" percent={88} size={14} />
|
||||
// {locale.taskFailed}
|
||||
// </Flex>
|
||||
// </Flex>
|
||||
// ),
|
||||
// },
|
||||
|
||||
{
|
||||
title: 'Progress',
|
||||
type: 'update',
|
||||
node: (
|
||||
<Flex gap="small" vertical>
|
||||
<Flex gap="small" align="center">
|
||||
<Progress type="circle" railColor="#e6f4ff" percent={60} size={14} />
|
||||
{locale.inProgress}
|
||||
</Flex>
|
||||
<Flex gap="small" align="center">
|
||||
<Progress type="circle" percent={100} size={14} />
|
||||
{locale.success}
|
||||
</Flex>
|
||||
<Flex gap="small" align="center">
|
||||
<Progress type="circle" status="exception" percent={88} size={14} />
|
||||
{locale.taskFailed}
|
||||
</Flex>
|
||||
</Flex>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Tour',
|
||||
type: 'new',
|
||||
type: 'update',
|
||||
node: (
|
||||
<TourDoNotUseOrYouWillBeFired
|
||||
title="Ant Design"
|
||||
@@ -214,9 +215,10 @@ const ComponentsList: React.FC = () => {
|
||||
/>
|
||||
),
|
||||
},
|
||||
|
||||
{
|
||||
title: 'FloatButton',
|
||||
type: 'new',
|
||||
type: 'update',
|
||||
node: (
|
||||
<Flex align="center" gap="large">
|
||||
<FloatButtonDoNotUseOrYouWillBeFired
|
||||
@@ -246,19 +248,83 @@ const ComponentsList: React.FC = () => {
|
||||
// },
|
||||
|
||||
{
|
||||
title: 'Alert',
|
||||
type: 'update',
|
||||
title: 'Splitter',
|
||||
type: 'new',
|
||||
node: (
|
||||
<Alert
|
||||
style={{ width: 400 }}
|
||||
title="Ant Design"
|
||||
description={locale.sampleContent}
|
||||
closable={{ closeIcon: true, disabled: true }}
|
||||
<Splitter
|
||||
orientation="vertical"
|
||||
style={{
|
||||
height: 320,
|
||||
width: 200,
|
||||
background: isDark ? '#1f1f1f' : '#ffffff',
|
||||
boxShadow: '0 0 10px rgba(0, 0, 0, 0.1)',
|
||||
}}
|
||||
>
|
||||
<Splitter.Panel defaultSize="40%" min="20%" max="70%">
|
||||
<Flex justify="center" align="center" style={{ height: '100%' }}>
|
||||
<Typography.Title type="secondary" level={5} style={{ whiteSpace: 'nowrap' }}>
|
||||
First
|
||||
</Typography.Title>
|
||||
</Flex>
|
||||
</Splitter.Panel>
|
||||
|
||||
<Splitter.Panel>
|
||||
<Flex justify="center" align="center" style={{ height: '100%' }}>
|
||||
<Typography.Title type="secondary" level={5} style={{ whiteSpace: 'nowrap' }}>
|
||||
Second
|
||||
</Typography.Title>
|
||||
</Flex>
|
||||
</Splitter.Panel>
|
||||
</Splitter>
|
||||
),
|
||||
},
|
||||
|
||||
{
|
||||
title: 'Masonry',
|
||||
type: 'new',
|
||||
node: (
|
||||
<Masonry
|
||||
columns={2}
|
||||
gutter={8}
|
||||
style={{
|
||||
width: 300,
|
||||
height: 320,
|
||||
}}
|
||||
items={[
|
||||
{ key: '1', data: 80 },
|
||||
{ key: '2', data: 60 },
|
||||
{ key: '3', data: 40 },
|
||||
{ key: '4', data: 120 },
|
||||
{ key: '5', data: 90 },
|
||||
{ key: '6', data: 40 },
|
||||
{ key: '7', data: 60 },
|
||||
{ key: '8', data: 70 },
|
||||
{ key: '9', data: 120 },
|
||||
]}
|
||||
itemRender={({ data, index }) => (
|
||||
<Card size="small" style={{ height: data }}>
|
||||
{index + 1}
|
||||
</Card>
|
||||
)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
|
||||
// {
|
||||
// title: 'Alert',
|
||||
// type: 'update',
|
||||
// node: (
|
||||
// <Alert
|
||||
// style={{ width: 400 }}
|
||||
// title="Ant Design"
|
||||
// description={locale.sampleContent}
|
||||
// closable={{ closeIcon: true, disabled: true }}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
],
|
||||
[
|
||||
isDark,
|
||||
isMobile,
|
||||
locale.inProgress,
|
||||
locale.lastMonth,
|
||||
|
||||
@@ -227,7 +227,7 @@ const Overview: React.FC = () => {
|
||||
src={
|
||||
isDark && component.coverDark ? component.coverDark : component.cover
|
||||
}
|
||||
alt={component.title}
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React, { Suspense, useRef } from 'react';
|
||||
import { LinkOutlined, ThunderboltOutlined } from '@ant-design/icons';
|
||||
import { BugOutlined, ThunderboltOutlined } from '@ant-design/icons';
|
||||
import stackblitzSdk from '@stackblitz/sdk';
|
||||
import { Flex, Tooltip } from 'antd';
|
||||
import type { MenuProps } from 'antd';
|
||||
import { Button, Dropdown, Flex, Tooltip } from 'antd';
|
||||
import { FormattedMessage, useSiteData } from 'dumi';
|
||||
import LZString from 'lz-string';
|
||||
|
||||
@@ -28,8 +29,6 @@ function compress(string: string): string {
|
||||
}
|
||||
|
||||
interface ActionsProps {
|
||||
showOnlineUrl: boolean;
|
||||
docsOnlineUrl?: string;
|
||||
assetId: string;
|
||||
title?: string;
|
||||
pkgDependencyList: Record<PropertyKey, string>;
|
||||
@@ -39,11 +38,10 @@ interface ActionsProps {
|
||||
onCodeExpand: () => void;
|
||||
entryCode: string;
|
||||
styleCode: string;
|
||||
debugOptions?: MenuProps['items'];
|
||||
}
|
||||
|
||||
const Actions: React.FC<ActionsProps> = ({
|
||||
showOnlineUrl,
|
||||
docsOnlineUrl,
|
||||
assetId,
|
||||
title,
|
||||
jsx,
|
||||
@@ -53,6 +51,7 @@ const Actions: React.FC<ActionsProps> = ({
|
||||
pkgDependencyList,
|
||||
entryCode,
|
||||
styleCode,
|
||||
debugOptions,
|
||||
}) => {
|
||||
const [, lang] = useLocale();
|
||||
const isZhCN = lang === 'cn';
|
||||
@@ -128,8 +127,8 @@ const Actions: React.FC<ActionsProps> = ({
|
||||
editors: '001',
|
||||
css: '',
|
||||
js_external: [
|
||||
'react@19/cjs/react.development.js',
|
||||
'react-dom@19/cjs/react-dom.development.js',
|
||||
'react@18/umd/react.production.min.js',
|
||||
'react-dom@18/umd/react-dom.production.min.js',
|
||||
'dayjs@1/dayjs.min.js',
|
||||
`antd@${pkg.version}/dist/antd-with-locales.min.js`,
|
||||
`@ant-design/icons/dist/index.umd.js`,
|
||||
@@ -213,21 +212,15 @@ createRoot(document.getElementById('container')).render(<Demo />);
|
||||
});
|
||||
|
||||
return (
|
||||
<Flex wrap gap="middle" className="code-box-actions">
|
||||
{/* 在线文档按钮 */}
|
||||
{showOnlineUrl && (
|
||||
<Tooltip title={<FormattedMessage id="app.demo.online" />}>
|
||||
<a
|
||||
className="code-box-code-action"
|
||||
aria-label="open in new tab"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
href={docsOnlineUrl || ''}
|
||||
>
|
||||
<LinkOutlined className="code-box-online" />
|
||||
</a>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Flex wrap gap="middle" className="code-box-actions" align="center">
|
||||
{
|
||||
// 调试选项
|
||||
debugOptions?.length ? (
|
||||
<Dropdown menu={{ items: debugOptions }} arrow={{ pointAtCenter: true }}>
|
||||
<Button icon={<BugOutlined />} color="purple" variant="filled" size="small" />
|
||||
</Dropdown>
|
||||
) : null
|
||||
}
|
||||
{/* CodeSandbox 按钮 */}
|
||||
<form
|
||||
className="code-box-code-action"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { UpOutlined } from '@ant-design/icons';
|
||||
import { Badge, Tooltip } from 'antd';
|
||||
import type { MenuProps } from 'antd';
|
||||
import { Badge, Tag, Tooltip } from 'antd';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
import { FormattedMessage, useLiveDemo } from 'dumi';
|
||||
|
||||
import { FormattedMessage, useLiveDemo, useSiteData } from 'dumi';
|
||||
import { major, minVersion } from 'semver';
|
||||
import type { AntdPreviewerProps } from '.';
|
||||
import useLocation from '../../../hooks/useLocation';
|
||||
import BrowserFrame from '../../common/BrowserFrame';
|
||||
@@ -12,6 +13,8 @@ import ClientOnly from '../../common/ClientOnly';
|
||||
import CodePreview from '../../common/CodePreview';
|
||||
import EditButton from '../../common/EditButton';
|
||||
import SiteContext from '../../slots/SiteContext';
|
||||
import DemoContext from '../../slots/DemoContext';
|
||||
import { isOfficialHost } from '../../utils';
|
||||
import Actions from './Actions';
|
||||
|
||||
const useStyle = createStyles(({ cssVar }) => {
|
||||
@@ -61,6 +64,9 @@ const CodePreviewer: React.FC<AntdPreviewerProps> = (props) => {
|
||||
clientOnly,
|
||||
pkgDependencyList,
|
||||
} = props;
|
||||
const { showDebug } = React.use(DemoContext);
|
||||
const { pkg } = useSiteData();
|
||||
|
||||
const location = useLocation();
|
||||
const { styles } = useStyle();
|
||||
|
||||
@@ -79,17 +85,15 @@ const CodePreviewer: React.FC<AntdPreviewerProps> = (props) => {
|
||||
const anchorRef = useRef<HTMLAnchorElement>(null);
|
||||
const [codeExpand, setCodeExpand] = useState<boolean>(false);
|
||||
const { isDark } = React.use(SiteContext);
|
||||
|
||||
const { hash, pathname, search } = location;
|
||||
const docsOnlineUrl = `https://ant.design${pathname ?? ''}${search ?? ''}#${asset.id}`;
|
||||
|
||||
const [showOnlineUrl, setShowOnlineUrl] = useState<boolean>(false);
|
||||
|
||||
/**
|
||||
* Record whether it is deployed on the official domain name.
|
||||
* Note that window.location.hostname is not available on the server side due to hydration issues
|
||||
*/
|
||||
const [deployedOnOfficialHost, setDeployedOnOfficialHost] = useState<boolean>(true);
|
||||
useEffect(() => {
|
||||
const regexp = /preview-(\d+)-ant-design/; // matching PR preview addresses
|
||||
setShowOnlineUrl(
|
||||
process.env.NODE_ENV === 'development' || regexp.test(window.location.hostname),
|
||||
);
|
||||
setDeployedOnOfficialHost(isOfficialHost(window.location.hostname));
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -102,6 +106,33 @@ const CodePreviewer: React.FC<AntdPreviewerProps> = (props) => {
|
||||
setCodeExpand(expand);
|
||||
}, [expand]);
|
||||
|
||||
const generateDocUrl = (domain = 'https://ant.design') =>
|
||||
`${domain}${pathname ?? ''}${search ?? ''}#${asset.id}`;
|
||||
|
||||
// Enable "Go Online Docs" only when deployed on non-official domains
|
||||
const enableDocsOnlineUrl = process.env.NODE_ENV === 'development' || !deployedOnOfficialHost;
|
||||
|
||||
// Previous version demos are only available during the maintenance window
|
||||
const [supportsPreviousVersionDemo, previousVersionDomain, previousVersion] = useMemo(() => {
|
||||
const maintenanceDeadline = new Date('2026/12/31');
|
||||
|
||||
if (new Date() > maintenanceDeadline) {
|
||||
return [false, undefined, -1] as const;
|
||||
}
|
||||
|
||||
const currentMajor = major(pkg.version);
|
||||
const previousMajor = Math.min(currentMajor - 1, 5);
|
||||
|
||||
let enabled = true;
|
||||
// If the demo specifies a version, perform an additional check;
|
||||
if (version) {
|
||||
const minVer = minVersion(version);
|
||||
enabled = minVer?.major ? minVer.major < currentMajor : true;
|
||||
}
|
||||
|
||||
return [enabled, `https://${previousMajor}x.ant.design`, previousMajor];
|
||||
}, [version, pkg.version]);
|
||||
|
||||
const mergedChildren = !iframe && clientOnly ? <ClientOnly>{children}</ClientOnly> : children;
|
||||
const demoUrlWithTheme = useMemo(() => {
|
||||
return `${demoUrl}${isDark ? '?theme=dark' : ''}`;
|
||||
@@ -143,6 +174,47 @@ const CodePreviewer: React.FC<AntdPreviewerProps> = (props) => {
|
||||
backgroundColor: background === 'grey' ? backgroundGrey : undefined,
|
||||
};
|
||||
|
||||
const debugOptions: MenuProps['items'] = [
|
||||
{
|
||||
key: 'online',
|
||||
label: (
|
||||
<a
|
||||
aria-label="Go to online documentation"
|
||||
href={generateDocUrl()}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<FormattedMessage id="app.demo.online" />
|
||||
</a>
|
||||
),
|
||||
icon: (
|
||||
<Tag variant="filled" color="blue">
|
||||
ant.design
|
||||
</Tag>
|
||||
),
|
||||
enabled: enableDocsOnlineUrl,
|
||||
},
|
||||
{
|
||||
key: 'previousVersion',
|
||||
label: (
|
||||
<a
|
||||
aria-label="Go to previous version documentation"
|
||||
href={generateDocUrl(previousVersionDomain)}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<FormattedMessage id="app.demo.previousVersion" values={{ version: previousVersion }} />
|
||||
</a>
|
||||
),
|
||||
icon: (
|
||||
<Tag variant="filled" color="purple">
|
||||
v{previousVersion}
|
||||
</Tag>
|
||||
),
|
||||
enabled: supportsPreviousVersionDemo,
|
||||
},
|
||||
].filter(({ enabled }) => showDebug && enabled);
|
||||
|
||||
const codeBox: React.ReactNode = (
|
||||
<section className={codeBoxClass} id={asset.id}>
|
||||
<section
|
||||
@@ -174,8 +246,7 @@ const CodePreviewer: React.FC<AntdPreviewerProps> = (props) => {
|
||||
/>
|
||||
)}
|
||||
<Actions
|
||||
showOnlineUrl={showOnlineUrl}
|
||||
docsOnlineUrl={docsOnlineUrl}
|
||||
debugOptions={debugOptions}
|
||||
entryCode={entryCode}
|
||||
styleCode={style}
|
||||
pkgDependencyList={pkgDependencyList}
|
||||
|
||||
@@ -83,6 +83,7 @@ const Sandpack: React.FC<React.PropsWithChildren<SandpackProps>> = (props) => {
|
||||
<OriginSandpack
|
||||
theme={searchParams.getAll('theme').includes('dark') ? 'dark' : undefined}
|
||||
customSetup={setup}
|
||||
template="vite-react-ts"
|
||||
options={options}
|
||||
files={{
|
||||
'index.tsx': indexContent,
|
||||
|
||||
@@ -22,7 +22,7 @@ const useStyle = createStyles(({ cssVar }) => ({
|
||||
width: 100%;
|
||||
min-height: 600px;
|
||||
height: fit-content;
|
||||
background-color: #f5f5f5;
|
||||
background-color: ${cssVar.colorBgLayout};
|
||||
border: 1px solid #e8e8e8;
|
||||
border-radius: ${cssVar.borderRadiusLG};
|
||||
overflow: hidden;
|
||||
@@ -54,7 +54,7 @@ const useStyle = createStyles(({ cssVar }) => ({
|
||||
inset-inline-end: 20px;
|
||||
z-index: 10;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
font-size: ${cssVar.fontSize};
|
||||
`,
|
||||
mvp: css`
|
||||
margin-inline-end: ${cssVar.marginMD};
|
||||
@@ -106,17 +106,22 @@ const BehaviorMap: React.FC<BehaviorMapProps> = ({ data }) => {
|
||||
|
||||
const mermaidCode = useMermaidCode(data);
|
||||
|
||||
const cancelledRef = useRef<boolean>(false);
|
||||
|
||||
useEffect(() => {
|
||||
let isCancelled = false;
|
||||
cancelledRef.current = false;
|
||||
|
||||
const renderChart = async () => {
|
||||
if (!chartRef.current || !mermaidCode) return;
|
||||
if (!chartRef.current || !mermaidCode) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const mermaidModule = await import('mermaid');
|
||||
const mermaid = mermaidModule.default;
|
||||
const mermaid = (await import('mermaid')).default;
|
||||
|
||||
if (isCancelled) return;
|
||||
if (cancelledRef.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
mermaid.initialize({
|
||||
startOnLoad: false,
|
||||
@@ -130,18 +135,15 @@ const BehaviorMap: React.FC<BehaviorMapProps> = ({ data }) => {
|
||||
},
|
||||
});
|
||||
|
||||
let mermaidChartCounter = 0;
|
||||
mermaidChartCounter += 1;
|
||||
const id = `mermaid-${Date.now()}-${mermaidChartCounter}`;
|
||||
const id = `mermaid-${Date.now()}`;
|
||||
|
||||
const { svg } = await mermaid.render(id, mermaidCode);
|
||||
|
||||
if (!isCancelled && chartRef.current) {
|
||||
if (!cancelledRef.current && chartRef.current) {
|
||||
chartRef.current.innerHTML = svg;
|
||||
}
|
||||
} catch (error) {
|
||||
if (!isCancelled && chartRef.current) {
|
||||
console.error('Mermaid render error:', error);
|
||||
} catch {
|
||||
if (!cancelledRef.current && chartRef.current) {
|
||||
chartRef.current.innerHTML = 'Render Error';
|
||||
}
|
||||
}
|
||||
@@ -150,7 +152,7 @@ const BehaviorMap: React.FC<BehaviorMapProps> = ({ data }) => {
|
||||
renderChart();
|
||||
|
||||
return () => {
|
||||
isCancelled = true;
|
||||
cancelledRef.current = true;
|
||||
};
|
||||
}, [mermaidCode]);
|
||||
|
||||
|
||||
@@ -2,50 +2,45 @@ import { useMemo } from 'react';
|
||||
|
||||
import type { BehaviorMapItem } from './BehaviorMap';
|
||||
|
||||
export const useMermaidCode = (data: BehaviorMapItem): string => {
|
||||
const generateMermaidCode = (root: BehaviorMapItem): string => {
|
||||
const lines: string[] = [];
|
||||
const generateMermaidCode = (root: BehaviorMapItem) => {
|
||||
const lines: string[] = [];
|
||||
|
||||
lines.push('graph LR');
|
||||
lines.push('graph LR');
|
||||
|
||||
lines.push(`classDef baseNode fill:#fff,stroke:none,stroke-width:0px,rx:5,ry:5,font-size:14px`);
|
||||
lines.push(`classDef baseNode fill:#fff,stroke:none,stroke-width:0px,rx:5,ry:5,font-size:14px`);
|
||||
|
||||
const traverse = (node: BehaviorMapItem, parentId?: string) => {
|
||||
const safeId = `node_${node.id.replace(/[^a-z0-9]/gi, '_')}`;
|
||||
let labelText = node.label.replace(/"/g, "'");
|
||||
const traverse = (node: BehaviorMapItem, parentId?: string) => {
|
||||
const safeId = `node_${node.id.replace(/[^a-z0-9]/gi, '_')}`;
|
||||
let labelText = node.label.replace(/"/g, "'");
|
||||
|
||||
if (!parentId) {
|
||||
lines.push(`style ${safeId} font-size:16px`);
|
||||
labelText = `**${labelText}**`;
|
||||
} else if (node.targetType === 'mvp') {
|
||||
const blueDot = `<span style="display:inline-block;width:8px;height:8px;background-color:rgb(22, 119, 255);border-radius:50%;margin-right:8px;vertical-align:middle;"></span>`;
|
||||
labelText = `${blueDot}${labelText}`;
|
||||
} else if (node.targetType === 'extension') {
|
||||
const grayDot = `<span style="display:inline-block;width:8px;height:8px;background-color:rgb(160, 160, 160);border-radius:50%;margin-right:8px;vertical-align:middle;"></span>`;
|
||||
labelText = `${grayDot}${labelText}`;
|
||||
}
|
||||
lines.push(`${safeId}["${labelText}"]:::baseNode`);
|
||||
if (!parentId) {
|
||||
lines.push(`style ${safeId} font-size:16px`);
|
||||
labelText = `**${labelText}**`;
|
||||
} else if (node.targetType === 'mvp') {
|
||||
const blueDot = `<span style="display:inline-block;width:8px;height:8px;background-color:rgb(22, 119, 255);border-radius:50%;margin-inline-end:8px;vertical-align:middle;"></span>`;
|
||||
labelText = `${blueDot}${labelText}`;
|
||||
} else if (node.targetType === 'extension') {
|
||||
const grayDot = `<span style="display:inline-block;width:8px;height:8px;background-color:rgb(160, 160, 160);border-radius:50%;margin-inline-end:8px;vertical-align:middle;"></span>`;
|
||||
labelText = `${grayDot}${labelText}`;
|
||||
}
|
||||
lines.push(`${safeId}["${labelText}"]:::baseNode`);
|
||||
|
||||
if (node.link) {
|
||||
lines.push(`click ${safeId} "#${node.link}"`);
|
||||
}
|
||||
if (node.link) {
|
||||
lines.push(`click ${safeId} "#${node.link}"`);
|
||||
}
|
||||
|
||||
if (parentId) {
|
||||
lines.push(`${parentId} --> ${safeId}`);
|
||||
}
|
||||
if (parentId) {
|
||||
lines.push(`${parentId} --> ${safeId}`);
|
||||
}
|
||||
|
||||
if (node.children && node.children.length > 0) {
|
||||
node.children.forEach((child) => traverse(child, safeId));
|
||||
}
|
||||
};
|
||||
|
||||
traverse(root);
|
||||
return lines.join('\n');
|
||||
if (node.children && node.children.length > 0) {
|
||||
node.children.forEach((child) => traverse(child, safeId));
|
||||
}
|
||||
};
|
||||
|
||||
const mermaidCode = useMemo(() => {
|
||||
return generateMermaidCode(data);
|
||||
}, [data]);
|
||||
|
||||
return mermaidCode;
|
||||
traverse(root);
|
||||
return lines.join('\n');
|
||||
};
|
||||
|
||||
export const useMermaidCode = (data: BehaviorMapItem) => {
|
||||
return useMemo(() => generateMermaidCode(data), [data]);
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ const locales = {
|
||||
},
|
||||
};
|
||||
|
||||
const BezierVisualizer = (props: BezierVisualizerProps) => {
|
||||
const BezierVisualizer: React.FC<BezierVisualizerProps> = (props) => {
|
||||
const { value } = props;
|
||||
const [locale] = useLocale(locales);
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import React, { useRef, useState } from 'react';
|
||||
import { StyleProvider } from '@ant-design/cssinjs';
|
||||
import { AntDesignOutlined, UserOutlined } from '@ant-design/icons';
|
||||
import { Bubble, Sender } from '@ant-design/x';
|
||||
import type { SenderRef } from '@ant-design/x/es/sender';
|
||||
import { Drawer, Flex, Typography } from 'antd';
|
||||
import type { GetProp } from 'antd';
|
||||
|
||||
@@ -28,7 +30,8 @@ export interface PromptDrawerProps {
|
||||
const PromptDrawer: React.FC<PromptDrawerProps> = ({ open, onClose, onThemeChange }) => {
|
||||
const [locale] = useLocale(locales);
|
||||
const [inputValue, setInputValue] = useState('');
|
||||
const senderRef = useRef<any>(null);
|
||||
|
||||
const senderRef = useRef<SenderRef>(null);
|
||||
|
||||
const [submitPrompt, loading, prompt, resText, cancelRequest] = usePromptTheme(onThemeChange);
|
||||
|
||||
@@ -51,17 +54,21 @@ const PromptDrawer: React.FC<PromptDrawerProps> = ({ open, onClose, onThemeChang
|
||||
|
||||
const nextItems: GetProp<typeof Bubble.List, 'items'> = [
|
||||
{
|
||||
key: 1,
|
||||
role: 'user',
|
||||
placement: 'end',
|
||||
content: prompt,
|
||||
avatar: { icon: <UserOutlined /> },
|
||||
avatar: <UserOutlined />,
|
||||
shape: 'corner',
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
role: 'system',
|
||||
placement: 'start',
|
||||
content: resText,
|
||||
avatar: { icon: <AntDesignOutlined /> },
|
||||
avatar: <AntDesignOutlined />,
|
||||
loading: !resText,
|
||||
messageRender: (content: string) => (
|
||||
contentRender: (content: string) => (
|
||||
<Typography>
|
||||
<pre style={{ margin: 0 }}>{content}</pre>
|
||||
</Typography>
|
||||
@@ -71,9 +78,11 @@ const PromptDrawer: React.FC<PromptDrawerProps> = ({ open, onClose, onThemeChang
|
||||
|
||||
if (!loading) {
|
||||
nextItems.push({
|
||||
key: 3,
|
||||
role: 'divider',
|
||||
placement: 'start',
|
||||
content: locale.finishTips,
|
||||
avatar: { icon: <AntDesignOutlined /> },
|
||||
avatar: <AntDesignOutlined />,
|
||||
shape: 'corner',
|
||||
});
|
||||
}
|
||||
@@ -91,16 +100,21 @@ const PromptDrawer: React.FC<PromptDrawerProps> = ({ open, onClose, onThemeChang
|
||||
afterOpenChange={handleAfterOpenChange}
|
||||
>
|
||||
<Flex vertical style={{ height: '100%' }}>
|
||||
<Bubble.List style={{ flex: 1, overflow: 'auto' }} items={items} />
|
||||
<Sender
|
||||
ref={senderRef}
|
||||
style={{ flex: 0 }}
|
||||
value={inputValue}
|
||||
onChange={setInputValue}
|
||||
onSubmit={handleSubmit}
|
||||
loading={loading}
|
||||
onCancel={cancelRequest}
|
||||
/>
|
||||
{/* Workaround for layer incompat between site `StyleProvider layer` and `@ant-design/x`.
|
||||
* See: https://github.com/ant-design/x/issues/1588
|
||||
*/}
|
||||
<StyleProvider layer={false}>
|
||||
<Bubble.List style={{ flex: 1, overflow: 'auto' }} items={items} />
|
||||
<Sender
|
||||
ref={senderRef}
|
||||
style={{ flex: 0 }}
|
||||
value={inputValue}
|
||||
onChange={setInputValue}
|
||||
onSubmit={handleSubmit}
|
||||
loading={loading}
|
||||
onCancel={cancelRequest}
|
||||
/>
|
||||
</StyleProvider>
|
||||
</Flex>
|
||||
</Drawer>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable compat/compat */
|
||||
import { useRef, useState } from 'react';
|
||||
import { XStream } from '@ant-design/x';
|
||||
import { XStream } from '@ant-design/x-sdk';
|
||||
|
||||
import type { SiteContextProps } from '../../../theme/slots/SiteContext';
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
"app.demo.stackblitz": "Open in Stackblitz",
|
||||
"app.demo.codeblock": "Open in Hitu (This feature is only available in the internal network environment)",
|
||||
"app.demo.separate": "Open in a new window",
|
||||
"app.demo.online": "Online Address",
|
||||
"app.demo.online": "Official demo",
|
||||
"app.demo.previousVersion": "Previous version",
|
||||
"app.home.introduce": "A design system for enterprise-level products. Create an efficient and enjoyable work experience.",
|
||||
"app.home.pr-welcome": "💡 It is an alpha version and still in progress. Contribution from community is welcome!",
|
||||
"app.home.recommend": "Recommended",
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
"app.demo.stackblitz": "在 Stackblitz 中打开",
|
||||
"app.demo.codeblock": "在海兔中打开(此功能仅在内网环境可用)",
|
||||
"app.demo.separate": "在新窗口打开",
|
||||
"app.demo.online": "线上地址",
|
||||
"app.demo.online": "官网示例",
|
||||
"app.demo.previousVersion": "历史版本",
|
||||
"app.home.introduce": "企业级产品设计体系,创造高效愉悦的工作体验",
|
||||
"app.home.pr-welcome": "💡 当前为 alpha 版本,仍在开发中。欢迎社区一起共建,让 Ant Design 变得更好!",
|
||||
"app.home.recommend": "精彩推荐",
|
||||
|
||||
@@ -2,11 +2,14 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { GithubOutlined, MenuOutlined } from '@ant-design/icons';
|
||||
import { Alert, Button, Col, ConfigProvider, Popover, Row, Select, Tooltip } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import type { DefaultOptionType } from 'antd/es/select';
|
||||
import { clsx } from 'clsx';
|
||||
import dayjs from 'dayjs';
|
||||
import { useLocation, useSiteData } from 'dumi';
|
||||
import DumiSearchBar from 'dumi/theme-default/slots/SearchBar';
|
||||
import useSWR from 'swr';
|
||||
|
||||
import versionsFile from '../../../../public/versions.json';
|
||||
import useLocale from '../../../hooks/useLocale';
|
||||
import useLocalStorage from '../../../hooks/useLocalStorage';
|
||||
import { getBannerData } from '../../../pages/index/components/util';
|
||||
@@ -14,7 +17,6 @@ import ThemeSwitch from '../../common/ThemeSwitch';
|
||||
import DirectionIcon from '../../icons/DirectionIcon';
|
||||
import { ANT_DESIGN_NOT_SHOW_BANNER } from '../../layouts/GlobalLayout';
|
||||
import * as utils from '../../utils';
|
||||
import { getThemeConfig } from '../../utils';
|
||||
import SiteContext from '../SiteContext';
|
||||
import type { SharedProps } from './interface';
|
||||
import Logo from './Logo';
|
||||
@@ -132,7 +134,8 @@ const useStyle = createStyles(({ cssVar, token, css }) => {
|
||||
}
|
||||
`,
|
||||
versionSelect: css`
|
||||
min-width: 90px;
|
||||
width: 112px;
|
||||
min-width: 112px; // 这个宽度需要和 Empty 状态的宽度保持一致
|
||||
.rc-virtual-list {
|
||||
.rc-virtual-list-holder {
|
||||
scrollbar-width: thin;
|
||||
@@ -149,19 +152,57 @@ interface HeaderState {
|
||||
searching: boolean;
|
||||
}
|
||||
|
||||
interface VersionItem {
|
||||
version: string;
|
||||
url: string;
|
||||
chineseMirrorUrl?: string;
|
||||
}
|
||||
|
||||
const fetcher = (...args: Parameters<typeof fetch>) => {
|
||||
// eslint-disable-next-line compat/compat
|
||||
return fetch(...args).then((res) => res.json());
|
||||
};
|
||||
|
||||
// ================================= Header =================================
|
||||
const Header: React.FC = () => {
|
||||
const [, lang] = useLocale();
|
||||
|
||||
const { pkg } = useSiteData();
|
||||
|
||||
const themeConfig = getThemeConfig();
|
||||
const isChineseMirror =
|
||||
typeof window !== 'undefined' && typeof window.location !== 'undefined'
|
||||
? window.location.hostname.includes('.antgroup.com')
|
||||
: false;
|
||||
|
||||
const { data: versions = [], isLoading } = useSWR<VersionItem[]>(
|
||||
process.env.NODE_ENV === 'production' && typeof window !== 'undefined'
|
||||
? `${window.location.origin}/versions.json`
|
||||
: null,
|
||||
fetcher,
|
||||
{
|
||||
fallbackData: versionsFile,
|
||||
errorRetryCount: 3,
|
||||
},
|
||||
);
|
||||
|
||||
const versionOptions = useMemo(() => {
|
||||
if (isLoading) {
|
||||
return [];
|
||||
}
|
||||
return versions.map<DefaultOptionType>((item) => {
|
||||
const isMatch = item.version.startsWith(pkg.version[0]);
|
||||
const label = isMatch ? pkg.version : item.version;
|
||||
const value = isChineseMirror && item.chineseMirrorUrl ? item.chineseMirrorUrl : item.url;
|
||||
return { value, label };
|
||||
});
|
||||
}, [versions, isLoading, pkg.version, isChineseMirror]);
|
||||
|
||||
const [headerState, setHeaderState] = useState<HeaderState>({
|
||||
menuVisible: false,
|
||||
windowWidth: 1400,
|
||||
searching: false,
|
||||
});
|
||||
|
||||
const { direction, isMobile, bannerVisible, updateSiteConfig } = React.use(SiteContext);
|
||||
const pingTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
const location = useLocation();
|
||||
@@ -258,14 +299,6 @@ const Header: React.FC = () => {
|
||||
);
|
||||
|
||||
const { menuVisible, windowWidth, searching } = headerState;
|
||||
const docVersions: Record<string, string> = {
|
||||
[pkg.version]: pkg.version,
|
||||
...themeConfig?.docVersions,
|
||||
};
|
||||
const versionOptions = Object.keys(docVersions).map((version) => ({
|
||||
value: docVersions[version],
|
||||
label: version,
|
||||
}));
|
||||
|
||||
const isHome = ['', 'index', 'index-cn'].includes(pathname);
|
||||
const isZhCN = lang === 'cn';
|
||||
@@ -308,6 +341,7 @@ const Header: React.FC = () => {
|
||||
key="version"
|
||||
size="small"
|
||||
variant="filled"
|
||||
loading={isLoading}
|
||||
className={styles.versionSelect}
|
||||
defaultValue={pkg.version}
|
||||
onChange={handleVersionChange}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
const chineseMirror =
|
||||
typeof location !== 'undefined' && location.hostname.includes('.antgroup.com');
|
||||
|
||||
export default {
|
||||
categoryOrder: {
|
||||
'Ant Design': 0,
|
||||
@@ -45,15 +42,4 @@ export default {
|
||||
模板文档: 3,
|
||||
'Template Document': 3,
|
||||
},
|
||||
docVersions: {
|
||||
'5.x': chineseMirror ? 'https://5x-ant-design.antgroup.com' : 'https://5x.ant.design',
|
||||
'4.x': chineseMirror ? 'https://4x-ant-design.antgroup.com' : 'https://4x.ant.design',
|
||||
'3.x': 'https://3x.ant.design',
|
||||
'2.x': 'https://2x.ant.design',
|
||||
'1.x': 'https://1x.ant.design',
|
||||
'0.12.x': 'https://012x.ant.design',
|
||||
'0.11.x': 'https://011x.ant.design',
|
||||
'0.10.x': 'https://010x.ant.design',
|
||||
'0.9.x': 'https://09x.ant.design',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3,7 +3,6 @@ import flattenDeep from 'lodash/flattenDeep';
|
||||
import semver from 'semver';
|
||||
|
||||
import deprecatedVersions from '../../../BUG_VERSIONS.json';
|
||||
import themeConfig from '../themeConfig';
|
||||
|
||||
interface Meta {
|
||||
skip?: boolean;
|
||||
@@ -206,4 +205,12 @@ export function matchDeprecated(v: string): MatchDeprecatedResult {
|
||||
};
|
||||
}
|
||||
|
||||
export const getThemeConfig = () => themeConfig;
|
||||
/**
|
||||
* Determine if a hostname is an official domain.
|
||||
* antd creates a temporary preview site for each PR for convenient preview and testing.
|
||||
* Usually on platforms like surge.sh or Cloudflare Pages.
|
||||
*/
|
||||
export function isOfficialHost(hostname: string) {
|
||||
const officialHostnames = ['ant.design', 'antgroup.com'];
|
||||
return officialHostnames.some((official) => hostname.includes(official));
|
||||
}
|
||||
|
||||
2
.github/workflows/discussion-open-check.yml
vendored
2
.github/workflows/discussion-open-check.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
discussion-create:
|
||||
permissions:
|
||||
contents: read # for visiky/dingtalk-release-notify to get latest release
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: send to dingtalk
|
||||
uses: visiky/dingtalk-release-notify@main
|
||||
|
||||
2
.github/workflows/issue-check-inactive.yml
vendored
2
.github/workflows/issue-check-inactive.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
permissions:
|
||||
issues: write # for actions-cool/issues-helper to update issues
|
||||
pull-requests: write # for actions-cool/issues-helper to update PRs
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v3
|
||||
|
||||
2
.github/workflows/issue-close-require.yml
vendored
2
.github/workflows/issue-close-require.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
permissions:
|
||||
issues: write # for actions-cool/issues-helper to update issues
|
||||
pull-requests: write # for actions-cool/issues-helper to update PRs
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: need reproduce
|
||||
uses: actions-cool/issues-helper@v3
|
||||
|
||||
@@ -9,7 +9,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
reminder_job:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: Send reminders for inactive issues
|
||||
uses: actions/github-script@v8
|
||||
|
||||
2
.github/workflows/issue-labeled.yml
vendored
2
.github/workflows/issue-labeled.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
permissions:
|
||||
issues: write # for actions-cool/issues-helper to update issues
|
||||
pull-requests: write # for actions-cool/issues-helper to update PRs
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: help wanted
|
||||
if: github.event.label.name == 'help wanted'
|
||||
|
||||
2
.github/workflows/issue-open-check.yml
vendored
2
.github/workflows/issue-open-check.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
contents: read # for visiky/dingtalk-release-notify to get latest release
|
||||
issues: write # for actions-cool/issues-helper to update issues
|
||||
pull-requests: write # for actions-cool/issues-helper to update PRs
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions-cool/check-user-permission@v2
|
||||
id: checkUser
|
||||
|
||||
2
.github/workflows/issue-remove-inactive.yml
vendored
2
.github/workflows/issue-remove-inactive.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
permissions:
|
||||
issues: write # for actions-cool/issues-helper to update issues
|
||||
pull-requests: write # for actions-cool/issues-helper to update PRs
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: remove inactive
|
||||
if: github.event.issue.state == 'open' && github.actor == github.event.issue.user.login
|
||||
|
||||
2
.github/workflows/issue-schedule.yml
vendored
2
.github/workflows/issue-schedule.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
|
||||
jobs:
|
||||
send-message:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: Send Unconfirmed Issues to DingTalk
|
||||
uses: actions/github-script@v8
|
||||
|
||||
2
.github/workflows/mock-project-build.yml
vendored
2
.github/workflows/mock-project-build.yml
vendored
@@ -14,7 +14,7 @@ concurrency:
|
||||
jobs:
|
||||
pr-check-ci:
|
||||
if: github.repository == 'ant-design/ant-design'
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
name: Build Project
|
||||
steps:
|
||||
- name: checkout
|
||||
|
||||
2
.github/workflows/pkg.pr.new.yml
vendored
2
.github/workflows/pkg.pr.new.yml
vendored
@@ -3,7 +3,7 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
||||
2
.github/workflows/pr-auto-merge.yml
vendored
2
.github/workflows/pr-auto-merge.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
contents: write # for actions-cool/check-pr-ci to merge PRs
|
||||
issues: write # for actions-cool/check-pr-ci to update issues
|
||||
pull-requests: write # for actions-cool/check-pr-ci to update PRs
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions-cool/check-pr-ci@v1
|
||||
with:
|
||||
|
||||
4
.github/workflows/pr-check-merge.yml
vendored
4
.github/workflows/pr-check-merge.yml
vendored
@@ -12,10 +12,10 @@ jobs:
|
||||
permissions:
|
||||
issues: write # for actions-cool/issues-helper to update issues
|
||||
pull-requests: write # for actions-cool/issues-helper to update PRs
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
if: (github.event.pull_request.head.ref == 'next' || github.event.pull_request.head.ref == 'feature' || github.event.pull_request.head.ref == 'master') && github.event.pull_request.head.user.login == 'ant-design'
|
||||
steps:
|
||||
- uses: actions-cool/issues-helper@d1d51fccf39469b5458203b1369060db0ff0c0db
|
||||
- uses: actions-cool/issues-helper@e2ff99831a4f13625d35064e2b3dfe65c07a0396
|
||||
with:
|
||||
actions: create-comment
|
||||
issue-number: ${{ github.event.number }}
|
||||
|
||||
2
.github/workflows/pr-contributor-welcome.yml
vendored
2
.github/workflows/pr-contributor-welcome.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
|
||||
pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
|
||||
if: github.event.pull_request.merged == true && github.repository == 'ant-design/ant-design'
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: get commit count
|
||||
id: get_commit_count
|
||||
|
||||
4
.github/workflows/pr-open-check.yml
vendored
4
.github/workflows/pr-open-check.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
permissions:
|
||||
issues: write # for actions-cool/pr-welcome to create, update & react on issues
|
||||
pull-requests: write # for actions-cool/pr-welcome to request reviewer
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions-cool/pr-welcome@4bd317d60ef3b40a3ccda39c22f66c3358010f92
|
||||
with:
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
check-changelog:
|
||||
permissions:
|
||||
pull-requests: write # for actions-cool/pr-check-fill to create or update PR comments
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: check fill
|
||||
uses: actions-cool/pr-check-fill@35194e32fd717c88c4fde15fbde9005933c2d452
|
||||
|
||||
2
.github/workflows/pr-open-notify.yml
vendored
2
.github/workflows/pr-open-notify.yml
vendored
@@ -9,7 +9,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
send-to-dingtalk:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: send to dingtalk
|
||||
uses: visiky/dingtalk-release-notify@64fcb0373782b6c2f6d9b9ea3c68af80ca189585
|
||||
|
||||
8
.github/workflows/preview-deploy.yml
vendored
8
.github/workflows/preview-deploy.yml
vendored
@@ -14,7 +14,7 @@ permissions:
|
||||
jobs:
|
||||
upstream-workflow-summary:
|
||||
name: upstream workflow summary
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
if: github.event.workflow_run.event == 'pull_request'
|
||||
outputs:
|
||||
jobs: ${{ steps.prep-summary.outputs.result }}
|
||||
@@ -57,13 +57,13 @@ jobs:
|
||||
actions: read # for dawidd6/action-download-artifact to query and download artifacts
|
||||
issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
|
||||
pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
needs: upstream-workflow-summary
|
||||
if: github.event.workflow_run.event == 'pull_request'
|
||||
steps:
|
||||
# We need get PR id first
|
||||
- name: download pr artifact
|
||||
uses: dawidd6/action-download-artifact@v11
|
||||
uses: dawidd6/action-download-artifact@v12
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
# Download site artifact
|
||||
- name: download site artifact
|
||||
if: ${{ fromJSON(needs.upstream-workflow-summary.outputs.build-success) }}
|
||||
uses: dawidd6/action-download-artifact@v11
|
||||
uses: dawidd6/action-download-artifact@v12
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
|
||||
2
.github/workflows/preview-start.yml
vendored
2
.github/workflows/preview-start.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
|
||||
pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
|
||||
name: start preview info
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: update status comment
|
||||
uses: actions-cool/maintain-one-comment@4b2dbf086015f892dcb5e8c1106f5fccd6c1476b
|
||||
|
||||
2
.github/workflows/release-dingtalk.yml
vendored
2
.github/workflows/release-dingtalk.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
permissions:
|
||||
contents: write # for actions-cool/release-helper to create releases
|
||||
if: github.event.ref_type == 'tag'
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: Send to Ant Design DingGroup
|
||||
uses: actions-cool/release-helper@v2
|
||||
|
||||
2
.github/workflows/release-x.yml
vendored
2
.github/workflows/release-x.yml
vendored
@@ -5,7 +5,7 @@ on:
|
||||
|
||||
jobs:
|
||||
tweet:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
if: ${{ github.event.ref_type == 'tag' && !contains(github.event.ref, 'alpha') }}
|
||||
steps:
|
||||
- name: Tweet
|
||||
|
||||
4
.github/workflows/site-deploy.yml
vendored
4
.github/workflows/site-deploy.yml
vendored
@@ -57,7 +57,7 @@ jobs:
|
||||
run: echo "VERSION=$(echo ${{ github.ref_name }} | sed 's/\./-/g')" >> $GITHUB_OUTPUT
|
||||
|
||||
deploy-to-pages:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
needs: build-site
|
||||
steps:
|
||||
- uses: utooland/setup-utoo@v1
|
||||
@@ -101,7 +101,7 @@ jobs:
|
||||
|
||||
# https://github.com/ant-design/ant-design/pull/49213/files#r1625446496
|
||||
upload-to-release:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
# 仅在 tag 的时候工作,因为我们要将内容发布到以 tag 为版本号的 release 里
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: build-site
|
||||
|
||||
6
.github/workflows/size-limit.yml
vendored
6
.github/workflows/size-limit.yml
vendored
@@ -13,16 +13,16 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- name: size-limit
|
||||
uses: ant-design/size-limit-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
package_manager: ut
|
||||
package_manager: bun
|
||||
build_script: dist
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
|
||||
2
.github/workflows/sync-gitee.yml
vendored
2
.github/workflows/sync-gitee.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
mirror:
|
||||
permissions:
|
||||
contents: none
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
if: github.repository == 'ant-design/ant-design'
|
||||
steps:
|
||||
- name: mirror
|
||||
|
||||
231
.github/workflows/test-v6.yml
vendored
231
.github/workflows/test-v6.yml
vendored
@@ -1,231 +0,0 @@
|
||||
# Origin Source
|
||||
# https://github.com/ant-design/ant-design/blob/79f566b7f8abb1012ef55b0d2793bfdf5595b85d/.github/workflows/test.yml
|
||||
name: ✅ test v6
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [next]
|
||||
pull_request:
|
||||
branches: [next]
|
||||
|
||||
# Cancel prev CI if new commit come
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
- run: ut install
|
||||
- run: ut lint
|
||||
|
||||
################################ Test ################################
|
||||
test-react-legacy:
|
||||
name: test-react-legacy
|
||||
strategy:
|
||||
matrix:
|
||||
react: ['18']
|
||||
shard: [1/2, 2/2]
|
||||
env:
|
||||
REACT: ${{ matrix.react }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
- run: ut
|
||||
- name: install react 18
|
||||
if: ${{ matrix.react == '18' }}
|
||||
run: ut ut-install-react-18
|
||||
# dom test
|
||||
- name: dom test
|
||||
run: ut test -- --maxWorkers=2 --shard=${{matrix.shard}}
|
||||
|
||||
test-node:
|
||||
name: test-node
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
- run: ut install
|
||||
- run: ut run test:node
|
||||
|
||||
test-react-latest:
|
||||
name: test-react-latest
|
||||
strategy:
|
||||
matrix:
|
||||
module: [dom]
|
||||
shard: [1/2, 2/2]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
- run: ut install --ignore-scripts
|
||||
|
||||
# dom test
|
||||
- name: dom test
|
||||
run: ut test -- --maxWorkers=2 --shard=${{matrix.shard}} --coverage
|
||||
|
||||
- name: persist coverages
|
||||
run: |
|
||||
mkdir persist-coverage
|
||||
mv coverage/coverage-final.json persist-coverage/react-test-${{matrix.module}}-${{strategy.job-index}}.json
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
name: upload coverages
|
||||
with:
|
||||
name: coverage-artifacts-${{ matrix.module }}-${{ strategy.job-index }}
|
||||
path: persist-coverage/
|
||||
|
||||
test-react-latest-dist:
|
||||
name: test-react-latest-dist
|
||||
strategy:
|
||||
matrix:
|
||||
module: [dist, dist-min]
|
||||
shard: [1/2, 2/2]
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
- run: ut
|
||||
|
||||
- name: restore cache from dist
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: dist
|
||||
key: dist-${{ github.sha }}
|
||||
|
||||
- name: dist-min test
|
||||
if: ${{ matrix.module == 'dist-min' }}
|
||||
run: ut test
|
||||
env:
|
||||
LIB_DIR: dist-min
|
||||
|
||||
- name: dist test
|
||||
if: ${{ matrix.module == 'dist' }}
|
||||
run: ut test
|
||||
env:
|
||||
LIB_DIR: dist
|
||||
|
||||
############################ Test Coverage ###########################
|
||||
upload-test-coverage:
|
||||
name: test-coverage
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-react-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
- uses: actions/download-artifact@v7
|
||||
with:
|
||||
pattern: coverage-artifacts-*
|
||||
merge-multiple: true
|
||||
path: persist-coverage
|
||||
- name: Merge Code Coverage
|
||||
run: |
|
||||
utx nyc merge persist-coverage/ coverage/coverage-final.json
|
||||
utx nyc report --reporter text -t coverage --report-dir coverage
|
||||
rm -rf persist-coverage
|
||||
- name: Upload coverage to codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
# use own token to upload coverage reports
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
########################### Compile & Test ###########################
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
- run: ut
|
||||
|
||||
- name: cache lib
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: lib
|
||||
key: lib-${{ github.sha }}
|
||||
|
||||
- name: cache es
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: es
|
||||
key: es-${{ github.sha }}
|
||||
|
||||
- name: compile
|
||||
run: ut compile
|
||||
|
||||
- name: cache dist
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: dist
|
||||
key: dist-${{ github.sha }}
|
||||
|
||||
- name: dist
|
||||
run: ut dist
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
CI: 1
|
||||
|
||||
- name: check build files
|
||||
run: ut test:dekko
|
||||
|
||||
# Artifact build files
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/next'
|
||||
with:
|
||||
name: build artifacts
|
||||
path: |
|
||||
dist
|
||||
locale
|
||||
es
|
||||
lib
|
||||
|
||||
- name: zip builds
|
||||
if: github.repository == 'ant-design/ant-design' && github.event_name == 'push' && github.ref == 'refs/heads/next'
|
||||
env:
|
||||
ALI_OSS_AK_ID: ${{ secrets.ALI_OSS_AK_ID }}
|
||||
ALI_OSS_AK_SECRET: ${{ secrets.ALI_OSS_AK_SECRET }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
zip -r oss-artifacts.zip dist locale es lib
|
||||
echo "🤖 Uploading"
|
||||
node scripts/visual-regression/upload.js ./oss-artifacts.zip --ref=$HEAD_SHA
|
||||
|
||||
test-lib-es:
|
||||
name: test lib/es module
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
module: [lib, es]
|
||||
shard: [1/2, 2/2]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
- run: ut
|
||||
|
||||
- name: restore cache from ${{ matrix.module }}
|
||||
# lib only run in master branch not in pull request
|
||||
if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }}
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ${{ matrix.module }}
|
||||
key: ${{ matrix.module }}-${{ github.sha }}
|
||||
|
||||
- name: compile
|
||||
# lib only run in master branch not in pull request
|
||||
if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }}
|
||||
run: ut compile
|
||||
|
||||
- name: test
|
||||
# lib only run in master branch not in pull request
|
||||
if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }}
|
||||
run: ut test -- --maxWorkers=2 --shard=${{matrix.shard}}
|
||||
env:
|
||||
LIB_DIR: ${{ matrix.module }}
|
||||
22
.github/workflows/test.yml
vendored
22
.github/workflows/test.yml
vendored
@@ -18,7 +18,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
@@ -34,24 +34,18 @@ jobs:
|
||||
shard: [1/2, 2/2]
|
||||
env:
|
||||
REACT: ${{ matrix.react }}
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
- run: ut
|
||||
- name: install react 16
|
||||
if: ${{ matrix.react == '16' }}
|
||||
run: ut bun-install-react-16
|
||||
- name: install react 17
|
||||
if: ${{ matrix.react == '17' }}
|
||||
run: ut bun-install-react-17
|
||||
# dom test
|
||||
- name: dom test
|
||||
run: ut test -- --maxWorkers=2 --shard=${{matrix.shard}} --coverage
|
||||
|
||||
test-node:
|
||||
name: test-node
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
@@ -64,7 +58,7 @@ jobs:
|
||||
matrix:
|
||||
module: [dom]
|
||||
shard: [1/2, 2/2]
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
@@ -91,7 +85,7 @@ jobs:
|
||||
matrix:
|
||||
module: [dist, dist-min]
|
||||
shard: [1/2, 2/2]
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
@@ -119,7 +113,7 @@ jobs:
|
||||
############################ Test Coverage ###########################
|
||||
upload-test-coverage:
|
||||
name: test-coverage
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
needs: test-react-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
@@ -144,7 +138,7 @@ jobs:
|
||||
|
||||
########################### Compile & Test ###########################
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
@@ -205,7 +199,7 @@ jobs:
|
||||
|
||||
test-lib-es:
|
||||
name: test lib/es module
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
strategy:
|
||||
matrix:
|
||||
module: [lib, es]
|
||||
|
||||
2
.github/workflows/upgrade-deps.yml
vendored
2
.github/workflows/upgrade-deps.yml
vendored
@@ -7,7 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
upgrade-deps:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
if: github.repository == 'ant-design/ant-design' && github.ref == 'refs/heads/master'
|
||||
permissions:
|
||||
pull-requests: write # for peter-evans/create-pull-request to create PRs
|
||||
|
||||
4
.github/workflows/verify-files-modify.yml
vendored
4
.github/workflows/verify-files-modify.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
if: github.event.pull_request.user.login != 'renovate[bot]' && github.event.pull_request.user.login != 'Copilot'
|
||||
permissions:
|
||||
pull-requests: write # for actions-cool/verify-files-modify to update status of PRs
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: verify-version
|
||||
uses: actions-cool/verify-files-modify@9f38a3b3d324d4d92c88c8a946001522e17ad554 # pin to latest verified commit
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
if: github.event.pull_request.user.login != 'renovate[bot]' && github.event.pull_request.user.login != 'Copilot'
|
||||
permissions:
|
||||
pull-requests: write # for actions-cool/verify-files-modify to update status of PRs
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: verify-readme
|
||||
uses: actions-cool/verify-files-modify@9f38a3b3d324d4d92c88c8a946001522e17ad554 # pin to latest verified commit
|
||||
|
||||
2
.github/workflows/verify-package-version.yml
vendored
2
.github/workflows/verify-package-version.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
permissions:
|
||||
contents: read # for actions/checkout to fetch code
|
||||
pull-requests: write # for actions-cool/verify-package-version to comment on PR
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
if: contains(github.event.pull_request.title, 'changelog') || contains(github.event.pull_request.title, 'release')
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
statuses: write # Allow to modfiy commit status
|
||||
name: Check Virtual Regression Approval
|
||||
if: github.event.issue.pull_request != ''
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
# Check all the comments if contains `VISUAL_DIFF_SUCCESS` or `VISUAL_DIFF_FAILED`
|
||||
# Check if member of repo comment `Pass Visual Diff`
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
shard: [1/2, 2/2]
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
############################### Diff Images ##############################
|
||||
visual-diff-report:
|
||||
name: visual-diff report
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
needs: visual-diff-snapshot
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
@@ -14,7 +14,7 @@ permissions:
|
||||
jobs:
|
||||
upstream-workflow-summary:
|
||||
name: upstream workflow summary
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
outputs:
|
||||
jobs: ${{ steps.visual_diff_build_job_status.outputs.result }}
|
||||
upstream-job-link: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/job/${{ steps.visual_diff_build_job_status.outputs.job-id }}
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
|
||||
pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
|
||||
statuses: write
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
needs: [upstream-workflow-summary]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
|
||||
# We need get persist-index first
|
||||
- name: download image snapshot artifact
|
||||
uses: dawidd6/action-download-artifact@v11
|
||||
uses: dawidd6/action-download-artifact@v12
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
@@ -92,7 +92,7 @@ jobs:
|
||||
- name: download report artifact
|
||||
id: download_report
|
||||
if: ${{ needs.upstream-workflow-summary.outputs.build-status == 'success' || needs.upstream-workflow-summary.outputs.build-status == 'failure' }}
|
||||
uses: dawidd6/action-download-artifact@v11
|
||||
uses: dawidd6/action-download-artifact@v12
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
|
||||
pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
|
||||
name: start visual-regression diff
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: update status comment
|
||||
uses: actions-cool/maintain-one-comment@4b2dbf086015f892dcb5e8c1106f5fccd6c1476b
|
||||
|
||||
@@ -14,7 +14,7 @@ permissions:
|
||||
jobs:
|
||||
upstream-workflow-summary:
|
||||
name: upstream workflow summary
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
outputs:
|
||||
jobs: ${{ steps.persist_start_job_status.outputs.result }}
|
||||
build-success: ${{ steps.persist_start_job_status.outputs.build-success }}
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
name: persist image-snapshots
|
||||
permissions:
|
||||
actions: read # for dawidd6/action-download-artifact to query and download artifacts
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
needs: [upstream-workflow-summary]
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
|
||||
# We need get persist key first
|
||||
- name: Download Visual Regression Ref
|
||||
uses: dawidd6/action-download-artifact@v11
|
||||
uses: dawidd6/action-download-artifact@v12
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
@@ -81,7 +81,7 @@ jobs:
|
||||
|
||||
- name: Download Visual-Regression Artifact
|
||||
if: ${{ fromJSON(needs.upstream-workflow-summary.outputs.build-success) }}
|
||||
uses: dawidd6/action-download-artifact@v11
|
||||
uses: dawidd6/action-download-artifact@v12
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
|
||||
@@ -15,7 +15,7 @@ permissions:
|
||||
jobs:
|
||||
test-image:
|
||||
name: test image
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
|
||||
1
.jest.js
1
.jest.js
@@ -9,6 +9,7 @@ const compileModules = [
|
||||
'@rc-component',
|
||||
// jsdom 27+ depends on ESM parse5, need transform
|
||||
'parse5',
|
||||
'@exodus',
|
||||
'jsdom',
|
||||
];
|
||||
|
||||
|
||||
118
AGENTS.md
118
AGENTS.md
@@ -5,7 +5,7 @@
|
||||
这是 ant-design/ant-design(antd)的源代码仓库,是一个 React 组件库,发布为 npm 包 antd。
|
||||
|
||||
- 使用 TypeScript 和 React 开发
|
||||
- 兼容 React 16 ~ 19 版本
|
||||
- 兼容 React 18 ~ 19 版本
|
||||
- 组件库设计精美,功能完善,广泛应用于企业级中后台产品
|
||||
- 遵循 Ant Design 设计规范
|
||||
- 支持国际化
|
||||
@@ -174,7 +174,7 @@ ComponentRef {
|
||||
### 动画效果
|
||||
|
||||
- 使用 CSS 过渡实现简单动画
|
||||
- 复杂动画使用 rc-motion 实现
|
||||
- 复杂动画使用 @rc-component/motion 实现
|
||||
- 尊重用户的减少动画设置(prefers-reduced-motion)
|
||||
- 动画时长和缓动函数应保持一致性
|
||||
- 动画不应干扰用户的操作和阅读体验
|
||||
@@ -294,11 +294,33 @@ export function TestComp(props) {
|
||||
- 描述用户的原始问题,而非解决方式
|
||||
- 尽量给出原始的 PR 链接,社区提交的 PR 改动加上提交者的链接
|
||||
|
||||
### Changelog Emoji 规范
|
||||
### 🎯 核心原则
|
||||
|
||||
- 🐞 Bug 修复
|
||||
- 有效性过滤:忽略用户无感知的改动(如文档网站改进、纯测试用例更新、内部重构、工具链优化等),除非其对开发者有直接影响。
|
||||
- 开发者视角:描述“用户的原始问题”和“对开发者的影响”,而非“具体的解决代码”。
|
||||
- ❌ 修复 Typography 的 DOM 结构问题。
|
||||
- ✅ Typography: 💄 重构并简化了 Typography 的 DOM 结构,修复了内容空格丢失的问题。
|
||||
- 版本与命名:
|
||||
- 新增属性必须符合 antd API 命名规则。
|
||||
- 新增属性建议在描述中暗示或明确声明可用版本号。
|
||||
- 双语输出:每次处理必须同时提供 **中文版** 和 **英文版**。
|
||||
|
||||
### 🎨 格式与结构规范
|
||||
|
||||
- 单条条目结构:`组件名称: 图标 描述内容 [#PR号](链接) [@贡献者]`。
|
||||
- 组件名\*需加粗,后接英文冒号和空格。
|
||||
- 分组逻辑:
|
||||
- 多项改动:同一组件有 2 条及以上改动时,使用 `- 组件名` 作为分类标题(不加粗),具体条目缩进排列。
|
||||
- 单项改动:直接编写单行条目,不设分类标题。
|
||||
- 文本细节:
|
||||
- 代码包裹:所有属性名、方法名、API、`role`/`aria` 属性必须使用反引号 ` ` 包裹。
|
||||
- 中英空格:中文与英文、数字、链接、`@` 用户名之间必须保留 **一个空格**。
|
||||
|
||||
### 🏷️ Emoji 规范 (严格执行)
|
||||
|
||||
- 🐞 修复 Bug
|
||||
- 💄 样式更新或 token 更新
|
||||
- 🆕 新增特性,新增属性
|
||||
- 🆕 新增特性 / 新增属性
|
||||
- 🔥 极其值得关注的新增特性
|
||||
- 🇺🇸🇨🇳🇬🇧 国际化改动
|
||||
- 📖 📝 文档或网站改进
|
||||
@@ -309,6 +331,90 @@ export function TestComp(props) {
|
||||
- 🛠 重构或工具链优化
|
||||
- ⚡️ 性能提升
|
||||
|
||||
---
|
||||
|
||||
### 💡 输出示例参考
|
||||
|
||||
```md
|
||||
#### 中文
|
||||
|
||||
- 🐞 Drawer: 修复 Drawer.PurePanel 无法响应鼠标交互的问题。[#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11)
|
||||
- 🐞 Select: 修复 Select options 属性透传至原生 DOM 导致 React 未知属性警告的问题。[#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163)
|
||||
|
||||
#### English
|
||||
|
||||
- 🐞 Drawer: Fix Drawer.PurePanel failing to respond to mouse interactions. [#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11)
|
||||
- 🐞 Select: Fix Select `options` props leaking to DOM elements and causing React unknown-prop warnings. [#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163)
|
||||
```
|
||||
|
||||
### 提示词
|
||||
|
||||
```md
|
||||
### 🤖 角色定义
|
||||
|
||||
你是一位 Ant Design 核心维护者,负责编写 `CHANGELOG.zh-CN.md` 和 `CHANGELOG.en-US.md`。你需要将原始 PR 列表转化为专业、简洁、面向开发者的发布日志。
|
||||
|
||||
### 🎯 核心原则
|
||||
|
||||
1. **有效性过滤**:忽略用户无感知的改动(如文档网站改进、纯测试用例更新、内部重构、工具链优化等),除非其对开发者有直接影响。
|
||||
2. **开发者视角**:描述“用户的原始问题”和“对开发者的影响”,而非“具体的解决代码”。
|
||||
|
||||
- ❌ 修复 Typography 的 DOM 结构问题。
|
||||
- ✅ Typography: 💄 重构并简化了 Typography 的 DOM 结构,修复了内容空格丢失的问题。
|
||||
|
||||
3. **版本与命名**:
|
||||
|
||||
- 新增属性必须符合 antd API 命名规则。
|
||||
- 新增属性建议在描述中暗示或明确声明可用版本号。
|
||||
|
||||
### 🎨 格式与结构规范
|
||||
|
||||
1. **单条条目结构**:`组件名称: 图标 描述内容 [#PR号](链接) [@贡献者]`。
|
||||
|
||||
- 组件名**无需加粗**,后接英文冒号和空格。
|
||||
|
||||
2. **分组逻辑**:
|
||||
|
||||
- **多项改动**:同一组件有 2 条及以上改动时,使用 `- 组件名` 作为分类标题(不加粗),具体条目缩进排列。
|
||||
- **单项改动**:直接编写单行条目,不设分类标题。
|
||||
|
||||
3. **文本细节**:
|
||||
|
||||
- **代码包裹**:所有属性名、方法名、API、`role`/`aria` 属性必须使用反引号 ` ` 包裹。
|
||||
- **中英空格**:中文与英文、数字、链接、`@` 用户名之间必须保留 **一个空格**。
|
||||
|
||||
### 🏷️ Emoji 规范 (严格执行)
|
||||
|
||||
- 🐞 修复 Bug
|
||||
- 💄 样式更新或 token 更新
|
||||
- 🆕 新增特性 / 新增属性
|
||||
- 🔥 极其值得关注的新增特性
|
||||
- 🇺🇸🇨🇳🇬🇧 国际化改动
|
||||
- 📖 📝 文档或网站改进
|
||||
- ✅ 新增或更新测试用例
|
||||
- 🛎 更新警告/提示信息
|
||||
- ⌨️ ♿ 可访问性增强
|
||||
- 🗑 废弃或移除
|
||||
- 🛠 重构或工具链优化
|
||||
- ⚡️ 性能提升
|
||||
|
||||
---
|
||||
|
||||
### 🏗️ 任务执行:请处理以下 PR 数据
|
||||
|
||||
#### 💡 输出示例参考:
|
||||
|
||||
**中文版:**
|
||||
|
||||
- 🐞 Drawer: 修复 Drawer.PurePanel 无法响应鼠标交互的问题。[#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11)
|
||||
- 🐞 Select: 修复 Select options 属性透传至原生 DOM 导致 React 未知属性警告的问题。[#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163)
|
||||
|
||||
**English Version:**
|
||||
|
||||
- 🐞 Drawer: Fix Drawer.PurePanel failing to respond to mouse interactions. [#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11)
|
||||
- 🐞 Select: Fix Select `options` props leaking to DOM elements and causing React unknown-prop warnings. [#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163)
|
||||
```
|
||||
|
||||
## Git 和 Pull Request 规范
|
||||
|
||||
### 分支管理
|
||||
@@ -422,7 +528,7 @@ export function TestComp(props) {
|
||||
|
||||
### 兼容性要求
|
||||
|
||||
- 支持 React 16 ~ 19 版本
|
||||
- 支持 React 18 ~ 19 版本
|
||||
- 兼容 Chrome 80+ 浏览器
|
||||
- 支持服务端渲染
|
||||
- 保持向下兼容,避免 breaking change
|
||||
|
||||
@@ -15,6 +15,70 @@ tag: vVERSION
|
||||
|
||||
---
|
||||
|
||||
## 6.2.0
|
||||
|
||||
`2026-01-13`
|
||||
|
||||
- 🛠 Button, Masonry, Mentions, Select, Space, Splitter, Steps and other components batch use `genCssVar` method to generate more stable CSS variable names. [#56562](https://github.com/ant-design/ant-design/pull/56562) [#56559](https://github.com/ant-design/ant-design/pull/56559) [#56557](https://github.com/ant-design/ant-design/pull/56557) [#56555](https://github.com/ant-design/ant-design/pull/56555) [#56550](https://github.com/ant-design/ant-design/pull/56550) [#56547](https://github.com/ant-design/ant-design/pull/56547) [#56546](https://github.com/ant-design/ant-design/pull/56546) [#56529](https://github.com/ant-design/ant-design/pull/56529) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 🆕 QRCode adds `marginSize` property for displaying QR code margin area. [#56569](https://github.com/ant-design/ant-design/pull/56569) [@afc163](https://github.com/afc163)
|
||||
- 🆕 Tour adds `keyboard` property to configure keyboard operations. [#56581](https://github.com/ant-design/ant-design/pull/56581) [@cactuser-Lu](https://github.com/cactuser-Lu)
|
||||
- Tooltip
|
||||
- 🆕 Tooltip adds `maxWidth` design token. [#56540](https://github.com/ant-design/ant-design/pull/56540) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- 🆕 Tooltip/Popover/Popconfirm can be closed with ESC by default. [#56492](https://github.com/ant-design/ant-design/pull/56492) [@aojunhao123](https://github.com/aojunhao123)
|
||||
- 🛠 Steps remove useless styles. [#56565](https://github.com/ant-design/ant-design/pull/56565) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 🆕 Form supports `tel` type validation. [#56533](https://github.com/ant-design/ant-design/pull/56533) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- 🐞 Fix Badge `ref` not working when using `text` property. [#56532](https://github.com/ant-design/ant-design/pull/56532) [@zombieJ](https://github.com/zombieJ)
|
||||
- 🆕 Calendar and DatePicker `locale` configuration now supports partial content filling. [#56376](https://github.com/ant-design/ant-design/pull/56376) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 🐞 Fix ConfigProvider `theme.cssVar` configuration not working for icons. [#56504](https://github.com/ant-design/ant-design/pull/56504) [@seanparmelee](https://github.com/seanparmelee)
|
||||
- 🐞 Fix Collapse `items` semantic properties not working. [#56517](https://github.com/ant-design/ant-design/pull/56517) [@zombieJ](https://github.com/zombieJ)
|
||||
- Modal
|
||||
- 🆕 Modal supports `focusable.trap` to configure whether to lock focus within the Modal. [#56500](https://github.com/ant-design/ant-design/pull/56500) [@zombieJ](https://github.com/zombieJ)
|
||||
- 🛠 Remove useless DOM structure from Modal and optimize focus capture to prevent accidental focus escape outside the Modal. [#56142](https://github.com/ant-design/ant-design/pull/56142) [@zombieJ](https://github.com/zombieJ)
|
||||
- ConfigProvider
|
||||
- 🆕 ConfigProvider supports `pagination` configuration for `totalBoundary` and `showSizeChanger` properties. [#56475](https://github.com/ant-design/ant-design/pull/56475) [@chiaweilee](https://github.com/chiaweilee)
|
||||
- 🆕 ConfigProvider supports configuring Alert global icons. [#56241](https://github.com/ant-design/ant-design/pull/56241) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- Drawer
|
||||
- 🆕 Drawer adds `focusable` to configure focus behavior after opening, supporting focus locking within the container and focus returning after closing. [#56463](https://github.com/ant-design/ant-design/pull/56463) [@zombieJ](https://github.com/zombieJ)
|
||||
- 🐞 Fix Drawer `size` definition not supporting string type. [#56358](https://github.com/ant-design/ant-design/pull/56358) [@ug-hero](https://github.com/ug-hero)
|
||||
- 🐞 Fix Image nested in Modal cannot be closed sequentially with Esc. [#56386](https://github.com/ant-design/ant-design/pull/56386) [@aojunhao123](https://github.com/aojunhao123)
|
||||
- 🆕 Pagination supports `size` property. [#56009](https://github.com/ant-design/ant-design/pull/56009) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- 🆕 Breadcrumb supports `dropdownIcon` customization. [#56250](https://github.com/ant-design/ant-design/pull/56250) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- 🆕 Checkbox.Group supports `role` configuration. [#56126](https://github.com/ant-design/ant-design/pull/56126) [@Pareder](https://github.com/Pareder)
|
||||
- 💄 Mentions fix invalid style `padding: undefined` in different sizes. [#56564](https://github.com/ant-design/ant-design/pull/56564) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 🐞 Fix Select clear button alignment issue when `size="small"`. [#56525](https://github.com/ant-design/ant-design/pull/56525) [@QDyanbing](https://github.com/QDyanbing)
|
||||
|
||||
## 6.1.4
|
||||
|
||||
`2026-01-05`
|
||||
|
||||
- 🐞 Fix Select with multiple `aria-` attributes in DOM. [#56451](https://github.com/ant-design/ant-design/pull/56451) [@zombieJ](https://github.com/zombieJ)
|
||||
- 🐞 Fix Table where hidden measure headers could mount interactive filter dropdowns and trigger unexpected close events when `scroll.y` is enabled. [#56425](https://github.com/ant-design/ant-design/pull/56425) [@QDyanbing](https://github.com/QDyanbing)
|
||||
|
||||
## 6.1.3
|
||||
|
||||
`2025-12-29`
|
||||
|
||||
- 🐞 Fix Drawer.PurePanel failing to respond to mouse interactions. [#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11)
|
||||
- 🐞 Fix Select `options` props leaking to DOM elements and causing React unknown-prop warnings. [#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163)
|
||||
|
||||
## 6.1.2
|
||||
|
||||
`2025-12-24`
|
||||
|
||||
- 🐞 Button fix missing wave effect and the issue where the component could not show Dropdown on hover immediately after clicking. [#56273](https://github.com/ant-design/ant-design/pull/56273) [@zombieJ](https://github.com/zombieJ)
|
||||
- 🐞 Fix Form.List with `useWatch` causing double rendering on item removal, with the first render showing an incorrect intermediate state. [#56319](https://github.com/ant-design/ant-design/pull/56319) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 💄 Breadcrumb fix style issue when using a custom `itemRender`. [#56253](https://github.com/ant-design/ant-design/pull/56253) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- Transfer
|
||||
- 💄 Remove Transfer className for the selected state when the component is `disabled`. [#56316](https://github.com/ant-design/ant-design/pull/56316) [@zenggpzqbx](https://github.com/zenggpzqbx)
|
||||
- 🐞 Transfer prioritize using the `disabled` property of the component. [#56280](https://github.com/ant-design/ant-design/pull/56280) [#56093](https://github.com/ant-design/ant-design/pull/56093) [@zenggpzqbx](https://github.com/zenggpzqbx)
|
||||
- Select
|
||||
- 🐞 Fix Select missing semantic DOM names. [#56322](https://github.com/ant-design/ant-design/pull/56322) [@seanparmelee](https://github.com/seanparmelee)
|
||||
- 🐞 Fix Select wrong hover cursor style when in search mode. [#56130](https://github.com/ant-design/ant-design/pull/56130) [@fpsqdb](https://github.com/fpsqdb)
|
||||
- 🐞 Fix Select cursor style when disabled with `showSearch` enabled. [#56340](https://github.com/ant-design/ant-design/pull/56340) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 💄 Card fix style issue where an unexpected border radius is displayed when using `Card.Grid` without a header. [#56214](https://github.com/ant-design/ant-design/pull/56214) [@DDDDD12138](https://github.com/DDDDD12138)
|
||||
- 💄 Tag deepen default background to improve borderless contrast. [#56326](https://github.com/ant-design/ant-design/pull/56326) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- ⌨ Segmented fix duplicate `role` and unnecessary `aria-` attributes on items. [#56278](https://github.com/ant-design/ant-design/pull/56278) [@aojunhao123](https://github.com/aojunhao123)
|
||||
|
||||
## 6.1.1
|
||||
|
||||
`2025-12-15`
|
||||
|
||||
@@ -15,6 +15,70 @@ tag: vVERSION
|
||||
|
||||
---
|
||||
|
||||
## 6.2.0
|
||||
|
||||
`2026-01-13`
|
||||
|
||||
- 🛠 Button、Masonry、Mentions、Select、Space、Splitter、Steps 等组件批量使用 `genCssVar` 方法以生成更加稳定的 css 变量名。[#56562](https://github.com/ant-design/ant-design/pull/56562) [#56559](https://github.com/ant-design/ant-design/pull/56559) [#56557](https://github.com/ant-design/ant-design/pull/56557) [#56555](https://github.com/ant-design/ant-design/pull/56555) [#56550](https://github.com/ant-design/ant-design/pull/56550) [#56547](https://github.com/ant-design/ant-design/pull/56547) [#56546](https://github.com/ant-design/ant-design/pull/56546) [#56529](https://github.com/ant-design/ant-design/pull/56529) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 🆕 QRCode 新增 `marginSize` 属性用于展示二维码留白区。[#56569](https://github.com/ant-design/ant-design/pull/56569) [@afc163](https://github.com/afc163)
|
||||
- 🆕 Tour 新增 `keyboard` 属性以配置键盘操作。[#56581](https://github.com/ant-design/ant-design/pull/56581) [@cactuser-Lu](https://github.com/cactuser-Lu)
|
||||
- Tooltip
|
||||
- 🆕 Tooltip 增加 `maxWidth` design token。[#56540](https://github.com/ant-design/ant-design/pull/56540) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- 🆕 Tooltip/Popover/Popconfirm 默认情况下可以通过 ESC 关闭。[#56492](https://github.com/ant-design/ant-design/pull/56492) [@aojunhao123](https://github.com/aojunhao123)
|
||||
- 🛠 Steps 移除无用的样式。[#56565](https://github.com/ant-design/ant-design/pull/56565) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 🆕 Form 支持 `tel` 类型校验。[#56533](https://github.com/ant-design/ant-design/pull/56533) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- 🐞 修复 Badge 在使用 `text` 属性时,`ref` 无效的问题。[#56532](https://github.com/ant-design/ant-design/pull/56532) [@zombieJ](https://github.com/zombieJ)
|
||||
- 🆕 Calendar 和 DatePicker 的 `locale` 配置现在支持只填充部分内容。[#56376](https://github.com/ant-design/ant-design/pull/56376) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 🐞 修复 ConfigProvider 配置 `theme.cssVar` 对图标无效的问题。[#56504](https://github.com/ant-design/ant-design/pull/56504) [@seanparmelee](https://github.com/seanparmelee)
|
||||
- 🐞 修复 Collapse `items` 语义化属性无效的问题。[#56517](https://github.com/ant-design/ant-design/pull/56517) [@zombieJ](https://github.com/zombieJ)
|
||||
- Modal
|
||||
- 🆕 Modal 支持 `focusable.trap` 以配置是否将焦点锁定在 Modal 内部。[#56500](https://github.com/ant-design/ant-design/pull/56500) [@zombieJ](https://github.com/zombieJ)
|
||||
- 🛠 移除 Modal 无用的 DOM 结构并且优化焦点捕获以防止意外的焦点逃逸到 Modal 外的情况。[#56142](https://github.com/ant-design/ant-design/pull/56142) [@zombieJ](https://github.com/zombieJ)
|
||||
- ConfigProvider
|
||||
- 🆕 ConfigProvider 支持 `pagination` 配置 `totalBoundary` 与 `showSizeChanger` 属性。[#56475](https://github.com/ant-design/ant-design/pull/56475) [@chiaweilee](https://github.com/chiaweilee)
|
||||
- 🆕 ConfigProvider 支持配置 Alert 全局图标。[#56241](https://github.com/ant-design/ant-design/pull/56241) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- Drawer
|
||||
- 🆕 Drawer 新增 `focusable` 以配置展开后的焦点行为,支持配置锁定焦点在框内、关闭后是否返回焦点。[#56463](https://github.com/ant-design/ant-design/pull/56463) [@zombieJ](https://github.com/zombieJ)
|
||||
- 🐞 修复 Drawer `size` 定义不支持 string 的问题。[#56358](https://github.com/ant-design/ant-design/pull/56358) [@ug-hero](https://github.com/ug-hero)
|
||||
- 🐞 修复 Image 嵌套在 Modal 内时,Esc无法顺序关闭。[#56386](https://github.com/ant-design/ant-design/pull/56386) [@aojunhao123](https://github.com/aojunhao123)
|
||||
- 🆕 Pagination 支持 `size` 属性。[#56009](https://github.com/ant-design/ant-design/pull/56009) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- 🆕 Breadcrumb 支持 `dropdownIcon` 自定义。[#56250](https://github.com/ant-design/ant-design/pull/56250) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- 🆕 Checkbox.Group 支持 `role` 配置。[#56126](https://github.com/ant-design/ant-design/pull/56126) [@Pareder](https://github.com/Pareder)
|
||||
- 💄 Mentions 修复不同尺寸下 `padding: undefined` 的无效样式。[#56564](https://github.com/ant-design/ant-design/pull/56564) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 🐞 修复 Select 在 `size="small"` 时,清除按钮位置对齐问题。[#56525](https://github.com/ant-design/ant-design/pull/56525) [@QDyanbing](https://github.com/QDyanbing)
|
||||
|
||||
## 6.1.4
|
||||
|
||||
`2026-01-05`
|
||||
|
||||
- 🐞 修复 Select 配置 `aria-` 属性时,会同时给多个 DOM 添加的问题。[#56451](https://github.com/ant-design/ant-design/pull/56451) [@zombieJ](https://github.com/zombieJ)
|
||||
- 🐞 修复 Table 配置 `scroll.y` 属性时,隐藏的测量表头挂载筛选下拉组件并参与事件判断,导致筛选下拉意外关闭的问题。 [#56425](https://github.com/ant-design/ant-design/pull/56425) [@QDyanbing](https://github.com/QDyanbing)
|
||||
|
||||
## 6.1.3
|
||||
|
||||
`2025-12-29`
|
||||
|
||||
- 🐞 修复 Drawer.PurePanel 无法响应鼠标交互的问题。[#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11)
|
||||
- 🐞 修复 Select options 属性透传至原生 DOM 导致 React 未知属性警告的问题。[#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163)
|
||||
|
||||
## 6.1.2
|
||||
|
||||
`2025-12-24`
|
||||
|
||||
- 🐞 修复 Wave 组件水波纹消失的问题,以及 Button 组件在配置 Dropdown 后,点击触发再次 `hover` 时无法立刻显示 Dropdown 的问题。[#56273](https://github.com/ant-design/ant-design/pull/56273) [@zombieJ](https://github.com/zombieJ)
|
||||
- 🐞 修复 Form.List 使用 `useWatch` 时,删除项会触发两次渲染,第一次为不正确的中间状态的问题。[#56319](https://github.com/ant-design/ant-design/pull/56319) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 💄 修复 Breadcrumb 组件自定义 `itemRender` 时的链接颜色异常的问题。[#56253](https://github.com/ant-design/ant-design/pull/56253) [@guoyunhe](https://github.com/guoyunhe)
|
||||
- Transfer
|
||||
- 💄 修复 Transfer 组件在禁用时不存在选择状态样式类的问题。[#56316](https://github.com/ant-design/ant-design/pull/56316) [@zenggpzqbx](https://github.com/zenggpzqbx)
|
||||
- 🐞 优化 Transfer 组件逻辑,确保优先使用 `disabled` 属性。[#56280](https://github.com/ant-design/ant-design/pull/56280) [#56093](https://github.com/ant-design/ant-design/pull/56093) [@zenggpzqbx](https://github.com/zenggpzqbx)
|
||||
- Select
|
||||
- 🐞 修复 Select 组件缺少语义化 DOM 名称的问题。[#56322](https://github.com/ant-design/ant-design/pull/56322) [@seanparmelee](https://github.com/seanparmelee)
|
||||
- 🐞 修复 Select 组件在搜索状态下鼠标手型样式不对的问题。[#56130](https://github.com/ant-design/ant-design/pull/56130) [@fpsqdb](https://github.com/fpsqdb)
|
||||
- 🐞 修复 Select 在同时设置 `showSearch` 和 `disabled` 时鼠标样式不为禁用的问题。[#56340](https://github.com/ant-design/ant-design/pull/56340) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 💄 修复 Card 组件在使用 Card.Grid 且未设置头部内容时,边框圆角显示异常的问题。[#56214](https://github.com/ant-design/ant-design/pull/56214) [@DDDDD12138](https://github.com/DDDDD12138)
|
||||
- 💄 Tag 加深默认背景,提升无边框状态的对比度。[#56326](https://github.com/ant-design/ant-design/pull/56326) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 🐞 修复 Segmented 组件中多余的 `role` 属性和 `aria` 属性。[#56278](https://github.com/ant-design/ant-design/pull/56278) [@aojunhao123](https://github.com/aojunhao123)
|
||||
|
||||
## 6.1.1
|
||||
|
||||
`2025-12-15`
|
||||
|
||||
@@ -4,11 +4,15 @@ import { clsx } from 'clsx';
|
||||
import mountTest from '../../../tests/shared/mountTest';
|
||||
import { act, fireEvent, getByText, render, waitFakeTimer } from '../../../tests/utils';
|
||||
import Checkbox from '../../checkbox';
|
||||
import { defaultPrefixCls } from '../../config-provider';
|
||||
import { genCssVar } from '../../theme/util/genStyleUtils';
|
||||
import Wave from '../wave';
|
||||
import { TARGET_CLS } from '../wave/interface';
|
||||
|
||||
(global as any).isVisible = true;
|
||||
|
||||
const [varName] = genCssVar(defaultPrefixCls, 'wave');
|
||||
|
||||
// TODO: Remove this. Mock for React 19
|
||||
jest.mock('react-dom', () => {
|
||||
const realReactDOM = jest.requireActual('react-dom');
|
||||
@@ -139,9 +143,8 @@ describe('Wave component', () => {
|
||||
|
||||
fireEvent.click(container.querySelector('button')!);
|
||||
waitRaf();
|
||||
|
||||
const style = getWaveStyle();
|
||||
expect(style['--wave-color']).toEqual(undefined);
|
||||
expect(style[varName('color')]).toBe(undefined);
|
||||
|
||||
unmount();
|
||||
});
|
||||
@@ -159,7 +162,7 @@ describe('Wave component', () => {
|
||||
waitRaf();
|
||||
|
||||
const style = getWaveStyle();
|
||||
expect(style['--wave-color']).toEqual('rgb(255, 0, 0)');
|
||||
expect(style[varName('color')]).toBe('rgb(255, 0, 0)');
|
||||
|
||||
unmount();
|
||||
});
|
||||
@@ -175,7 +178,7 @@ describe('Wave component', () => {
|
||||
waitRaf();
|
||||
|
||||
const style = getWaveStyle();
|
||||
expect(style['--wave-color']).toEqual('rgb(0, 0, 255)');
|
||||
expect(style[varName('color')]).toBe('rgb(0, 0, 255)');
|
||||
|
||||
unmount();
|
||||
});
|
||||
@@ -191,7 +194,7 @@ describe('Wave component', () => {
|
||||
waitRaf();
|
||||
|
||||
const style = getWaveStyle();
|
||||
expect(style['--wave-color']).toEqual('rgb(0, 128, 0)');
|
||||
expect(style[varName('color')]).toBe('rgb(0, 128, 0)');
|
||||
|
||||
unmount();
|
||||
});
|
||||
@@ -207,7 +210,7 @@ describe('Wave component', () => {
|
||||
waitRaf();
|
||||
|
||||
const style = getWaveStyle();
|
||||
expect(style['--wave-color']).toEqual('rgb(255, 255, 0)');
|
||||
expect(style[varName('color')]).toBe('rgb(255, 255, 0)');
|
||||
|
||||
unmount();
|
||||
});
|
||||
@@ -288,7 +291,7 @@ describe('Wave component', () => {
|
||||
waitRaf();
|
||||
|
||||
const style = getWaveStyle();
|
||||
expect(style['--wave-color']).toEqual('rgb(255, 0, 0)');
|
||||
expect(style[varName('color')]).toBe('rgb(255, 0, 0)');
|
||||
|
||||
unmount();
|
||||
});
|
||||
@@ -306,7 +309,7 @@ describe('Wave component', () => {
|
||||
waitRaf();
|
||||
|
||||
const style = getWaveStyle();
|
||||
expect(style['--wave-color']).toEqual('red');
|
||||
expect(style[varName('color')]).toBe('red');
|
||||
|
||||
unmount();
|
||||
});
|
||||
@@ -374,7 +377,7 @@ describe('Wave component', () => {
|
||||
expect(document.querySelector('.ant-wave')).toBeTruthy();
|
||||
|
||||
const style = getWaveStyle();
|
||||
expect(style['--wave-color']).toEqual('rgb(255, 0, 0)');
|
||||
expect(style[varName('color')]).toBe('rgb(255, 0, 0)');
|
||||
|
||||
unmount();
|
||||
});
|
||||
|
||||
@@ -7,23 +7,19 @@ export type SemanticSchema = { _default?: string } & {
|
||||
[key: `${ValidChar}${string}`]: SemanticSchema;
|
||||
};
|
||||
|
||||
export type SemanticClassNames<Name extends string> = Partial<Record<Name, string>>;
|
||||
|
||||
export type SemanticStyles<Name extends string> = Partial<Record<Name, React.CSSProperties>>;
|
||||
|
||||
export type Resolvable<T, P extends AnyObject> = T | ((info: { props: P }) => T);
|
||||
|
||||
export type SemanticClassNamesType<
|
||||
Props extends AnyObject,
|
||||
SemanticName extends string,
|
||||
SemanticClassNames extends Record<PropertyKey, string>,
|
||||
NestedStructure extends EmptyObject = EmptyObject,
|
||||
> = Resolvable<Readonly<SemanticClassNames<SemanticName>>, Props> & NestedStructure;
|
||||
> = Resolvable<Readonly<SemanticClassNames>, Props> & NestedStructure;
|
||||
|
||||
export type SemanticStylesType<
|
||||
Props extends AnyObject,
|
||||
SemanticName extends string,
|
||||
SemanticStyles extends Record<PropertyKey, React.CSSProperties>,
|
||||
NestedStructure extends EmptyObject = EmptyObject,
|
||||
> = Resolvable<Readonly<SemanticStyles<SemanticName>>, Props> & NestedStructure;
|
||||
> = Resolvable<Readonly<SemanticStyles>, Props> & NestedStructure;
|
||||
|
||||
// ========================= ClassNames =========================
|
||||
export const mergeClassNames = <
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,6 +6,8 @@ import { composeRef } from '@rc-component/util/lib/ref';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
import type { WaveProps } from '.';
|
||||
import { ConfigContext } from '../../config-provider';
|
||||
import { genCssVar } from '../../theme/util/genStyleUtils';
|
||||
import { TARGET_CLS } from './interface';
|
||||
import type { ShowWaveEffect } from './interface';
|
||||
import { getTargetWaveColor } from './util';
|
||||
@@ -21,10 +23,16 @@ export interface WaveEffectProps {
|
||||
colorSource?: WaveProps['colorSource'];
|
||||
}
|
||||
|
||||
const WaveEffect = (props: WaveEffectProps) => {
|
||||
const WaveEffect: React.FC<WaveEffectProps> = (props) => {
|
||||
const { className, target, component, colorSource } = props;
|
||||
const divRef = React.useRef<HTMLDivElement>(null);
|
||||
|
||||
const { getPrefixCls } = React.useContext(ConfigContext);
|
||||
|
||||
const rootPrefixCls = getPrefixCls();
|
||||
|
||||
const [varName] = genCssVar(rootPrefixCls, 'wave');
|
||||
|
||||
// ===================== Effect =====================
|
||||
const [color, setWaveColor] = React.useState<string | null>(null);
|
||||
const [borderRadius, setBorderRadius] = React.useState<number[]>([]);
|
||||
@@ -43,7 +51,7 @@ const WaveEffect = (props: WaveEffectProps) => {
|
||||
};
|
||||
|
||||
if (color) {
|
||||
waveStyle['--wave-color'] = color;
|
||||
waveStyle[varName('color')] = color;
|
||||
}
|
||||
|
||||
function syncPos() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { genComponentStyleHook } from '../../theme/internal';
|
||||
import type { FullToken, GenerateStyle } from '../../theme/internal';
|
||||
import { genCssVar } from '../../theme/util/genStyleUtils';
|
||||
|
||||
// biome-ignore lint/suspicious/noEmptyInterface: ComponentToken need to be empty by default
|
||||
export interface ComponentToken {}
|
||||
@@ -7,15 +8,15 @@ export interface ComponentToken {}
|
||||
export interface WaveToken extends FullToken<'Wave'> {}
|
||||
|
||||
const genWaveStyle: GenerateStyle<WaveToken> = (token) => {
|
||||
const { componentCls, colorPrimary } = token;
|
||||
const { componentCls, colorPrimary, antCls } = token;
|
||||
const [, varRef] = genCssVar(antCls, 'wave');
|
||||
return {
|
||||
[componentCls]: {
|
||||
position: 'absolute',
|
||||
background: 'transparent',
|
||||
pointerEvents: 'none',
|
||||
boxSizing: 'border-box',
|
||||
color: `var(--wave-color, ${colorPrimary})`,
|
||||
|
||||
color: varRef('color', colorPrimary),
|
||||
boxShadow: `0 0 0 0 currentcolor`,
|
||||
opacity: 0.2,
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { ReactElement } from 'react';
|
||||
import * as React from 'react';
|
||||
import CheckCircleFilled from '@ant-design/icons/CheckCircleFilled';
|
||||
import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
|
||||
@@ -13,7 +12,6 @@ import { clsx } from 'clsx';
|
||||
import type { ClosableType, SemanticClassNamesType, SemanticStylesType } from '../_util/hooks';
|
||||
import { useMergeSemantic } from '../_util/hooks';
|
||||
import isNonNullable from '../_util/isNonNullable';
|
||||
import { replaceElement } from '../_util/reactNode';
|
||||
import { devUseWarning } from '../_util/warning';
|
||||
import { useComponentConfig } from '../config-provider/context';
|
||||
import useStyle from './style';
|
||||
@@ -22,17 +20,31 @@ export interface AlertRef {
|
||||
nativeElement: HTMLDivElement;
|
||||
}
|
||||
|
||||
export type AlertSemanticName =
|
||||
| 'root'
|
||||
| 'icon'
|
||||
| 'section'
|
||||
| 'title'
|
||||
| 'description'
|
||||
| 'actions'
|
||||
| 'close';
|
||||
export type AlertSemanticName = keyof AlertSemanticClassNames & keyof AlertSemanticStyles;
|
||||
|
||||
export type AlertClassNamesType = SemanticClassNamesType<AlertProps, AlertSemanticName>;
|
||||
export type AlertStylesType = SemanticStylesType<AlertProps, AlertSemanticName>;
|
||||
export type AlertSemanticClassNames = {
|
||||
root?: string;
|
||||
icon?: string;
|
||||
section?: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
actions?: string;
|
||||
close?: string;
|
||||
};
|
||||
|
||||
export type AlertSemanticStyles = {
|
||||
root?: React.CSSProperties;
|
||||
icon?: React.CSSProperties;
|
||||
section?: React.CSSProperties;
|
||||
title?: React.CSSProperties;
|
||||
description?: React.CSSProperties;
|
||||
actions?: React.CSSProperties;
|
||||
close?: React.CSSProperties;
|
||||
};
|
||||
|
||||
export type AlertClassNamesType = SemanticClassNamesType<AlertProps, AlertSemanticClassNames>;
|
||||
|
||||
export type AlertStylesType = SemanticStylesType<AlertProps, AlertSemanticStyles>;
|
||||
|
||||
export interface AlertProps {
|
||||
/** Type of Alert styles, options:`success`, `info`, `warning`, `error` */
|
||||
@@ -90,13 +102,6 @@ export interface AlertProps {
|
||||
id?: string;
|
||||
}
|
||||
|
||||
const iconMapFilled = {
|
||||
success: CheckCircleFilled,
|
||||
info: InfoCircleFilled,
|
||||
error: CloseCircleFilled,
|
||||
warning: ExclamationCircleFilled,
|
||||
};
|
||||
|
||||
interface IconNodeProps {
|
||||
type: AlertProps['type'];
|
||||
icon: AlertProps['icon'];
|
||||
@@ -104,21 +109,25 @@ interface IconNodeProps {
|
||||
description: AlertProps['description'];
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
successIcon?: React.ReactNode;
|
||||
infoIcon?: React.ReactNode;
|
||||
warningIcon?: React.ReactNode;
|
||||
errorIcon?: React.ReactNode;
|
||||
}
|
||||
|
||||
const IconNode: React.FC<IconNodeProps> = (props) => {
|
||||
const { icon, prefixCls, type, className, style } = props;
|
||||
const iconType = iconMapFilled[type!] || null;
|
||||
if (icon) {
|
||||
return replaceElement(icon, <span className={`${prefixCls}-icon`}>{icon}</span>, () => ({
|
||||
className: clsx((icon as ReactElement<{ className?: string }>).props.className, className),
|
||||
style,
|
||||
})) as ReactElement;
|
||||
}
|
||||
return React.createElement(iconType, {
|
||||
className,
|
||||
style,
|
||||
});
|
||||
const { icon, type, className, style, successIcon, infoIcon, warningIcon, errorIcon } = props;
|
||||
const iconMapFilled = {
|
||||
success: successIcon ?? <CheckCircleFilled />,
|
||||
info: infoIcon ?? <InfoCircleFilled />,
|
||||
error: errorIcon ?? <CloseCircleFilled />,
|
||||
warning: warningIcon ?? <ExclamationCircleFilled />,
|
||||
};
|
||||
return (
|
||||
<span className={className} style={style}>
|
||||
{icon ?? iconMapFilled[type!]}
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
type CloseIconProps = {
|
||||
@@ -203,6 +212,10 @@ const Alert = React.forwardRef<AlertRef, AlertProps>((props, ref) => {
|
||||
style: contextStyle,
|
||||
classNames: contextClassNames,
|
||||
styles: contextStyles,
|
||||
successIcon,
|
||||
infoIcon,
|
||||
warningIcon,
|
||||
errorIcon,
|
||||
} = useComponentConfig('alert');
|
||||
|
||||
const prefixCls = getPrefixCls('alert', customizePrefixCls);
|
||||
@@ -342,6 +355,10 @@ const Alert = React.forwardRef<AlertRef, AlertProps>((props, ref) => {
|
||||
icon={props.icon}
|
||||
prefixCls={prefixCls}
|
||||
type={type}
|
||||
successIcon={successIcon}
|
||||
infoIcon={infoIcon}
|
||||
warningIcon={warningIcon}
|
||||
errorIcon={errorIcon}
|
||||
/>
|
||||
) : null}
|
||||
<div
|
||||
|
||||
@@ -8,23 +8,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -81,24 +85,28 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -281,23 +289,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -316,23 +328,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -393,24 +409,28 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -649,23 +669,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -684,23 +708,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -719,23 +747,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -754,23 +786,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -789,23 +825,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -829,23 +869,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -869,23 +913,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -909,23 +957,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1058,23 +1110,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1093,23 +1149,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1128,23 +1188,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1189,24 +1253,28 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1225,23 +1293,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1265,23 +1337,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1305,23 +1381,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1371,24 +1451,28 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1562,24 +1646,28 @@ exports[`renders components/alert/demo/style-class.tsx extend context correctly
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
style="font-size: 18px;"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1611,24 +1699,28 @@ exports[`renders components/alert/demo/style-class.tsx extend context correctly
|
||||
style="background-color: rgba(82, 196, 26, 0.1); border-color: rgb(183, 235, 143);"
|
||||
>
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
style="color: rgb(82, 196, 26);"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
|
||||
@@ -8,23 +8,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -81,24 +85,28 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -279,23 +287,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -314,23 +326,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -391,24 +407,28 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -641,23 +661,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -676,23 +700,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -711,23 +739,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -746,23 +778,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -781,23 +817,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -821,23 +861,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -861,23 +905,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -901,23 +949,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="smile"
|
||||
class="anticon anticon-smile"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="smile"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1044,23 +1096,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1079,23 +1135,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1114,23 +1174,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1175,24 +1239,28 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1211,23 +1279,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1251,23 +1323,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1291,23 +1367,27 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1357,24 +1437,28 @@ Array [
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="close-circle"
|
||||
class="anticon anticon-close-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close-circle"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1542,24 +1626,28 @@ exports[`renders components/alert/demo/style-class.tsx correctly 1`] = `
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
style="font-size:18px"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="info-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
@@ -1591,24 +1679,28 @@ exports[`renders components/alert/demo/style-class.tsx correctly 1`] = `
|
||||
style="background-color:rgba(82, 196, 26, 0.1);border-color:#b7eb8f"
|
||||
>
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
style="color:#52c41a"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
|
||||
@@ -7,23 +7,27 @@ exports[`Alert custom action 1`] = `
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle ant-alert-icon"
|
||||
role="img"
|
||||
class="ant-alert-icon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle"
|
||||
role="img"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-section"
|
||||
|
||||
@@ -10,6 +10,7 @@ import Button from '../../button';
|
||||
import Popconfirm from '../../popconfirm';
|
||||
import Tooltip from '../../tooltip';
|
||||
import type { AlertProps, AlertRef } from '../Alert';
|
||||
import ConfigProvider from 'antd/es/config-provider';
|
||||
|
||||
const { resetWarned } = warning;
|
||||
|
||||
@@ -288,4 +289,13 @@ describe('Alert', () => {
|
||||
expect(actionElement).toHaveStyle({ color: customStyles.actions?.color });
|
||||
expect(closeElement).toHaveStyle({ color: customStyles.close?.color });
|
||||
});
|
||||
|
||||
it('should support custom success icon', () => {
|
||||
render(
|
||||
<ConfigProvider alert={{ successIcon: 'foobar' }}>
|
||||
<Alert title="Success Tips" type="success" showIcon />
|
||||
</ConfigProvider>,
|
||||
);
|
||||
expect(screen.getByRole('alert')).toHaveTextContent(/foobar/i);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
import InternalAlert from './Alert';
|
||||
import ErrorBoundary from './ErrorBoundary';
|
||||
|
||||
export type { AlertProps } from './Alert';
|
||||
export type {
|
||||
AlertProps,
|
||||
AlertSemanticClassNames,
|
||||
AlertSemanticName,
|
||||
AlertSemanticStyles,
|
||||
} from './Alert';
|
||||
|
||||
export type { ErrorBoundaryProps } from './ErrorBoundary';
|
||||
|
||||
type CompoundedComponent = typeof InternalAlert & {
|
||||
|
||||
@@ -4,12 +4,7 @@ import { clsx } from 'clsx';
|
||||
import scrollIntoView from 'scroll-into-view-if-needed';
|
||||
|
||||
import getScroll from '../_util/getScroll';
|
||||
import type {
|
||||
SemanticClassNames,
|
||||
SemanticClassNamesType,
|
||||
SemanticStyles,
|
||||
SemanticStylesType,
|
||||
} from '../_util/hooks';
|
||||
import type { SemanticClassNamesType, SemanticStylesType } from '../_util/hooks';
|
||||
import { useMergeSemantic } from '../_util/hooks';
|
||||
import scrollTo from '../_util/scrollTo';
|
||||
import { devUseWarning } from '../_util/warning';
|
||||
@@ -42,7 +37,7 @@ function getOffsetTop(element: HTMLElement, container: AnchorContainer): number
|
||||
|
||||
if (rect.width || rect.height) {
|
||||
if (container === window) {
|
||||
return rect.top - element.ownerDocument!.documentElement!.clientTop;
|
||||
return rect.top - element.ownerDocument.documentElement!.clientTop;
|
||||
}
|
||||
return rect.top - (container as HTMLElement).getBoundingClientRect().top;
|
||||
}
|
||||
@@ -57,9 +52,26 @@ interface Section {
|
||||
top: number;
|
||||
}
|
||||
|
||||
type SemanticName = 'root' | 'item' | 'itemTitle' | 'indicator';
|
||||
export type AnchorClassNamesType = SemanticClassNamesType<AnchorProps, SemanticName>;
|
||||
export type AnchorStylesType = SemanticStylesType<AnchorProps, SemanticName>;
|
||||
export type AnchorSemanticName = keyof AnchorSemanticClassNames & keyof AnchorSemanticStyles;
|
||||
|
||||
export type AnchorSemanticClassNames = {
|
||||
root?: string;
|
||||
item?: string;
|
||||
itemTitle?: string;
|
||||
indicator?: string;
|
||||
};
|
||||
|
||||
export type AnchorSemanticStyles = {
|
||||
root?: React.CSSProperties;
|
||||
item?: React.CSSProperties;
|
||||
itemTitle?: React.CSSProperties;
|
||||
indicator?: React.CSSProperties;
|
||||
};
|
||||
|
||||
export type AnchorClassNamesType = SemanticClassNamesType<AnchorProps, AnchorSemanticClassNames>;
|
||||
|
||||
export type AnchorStylesType = SemanticStylesType<AnchorProps, AnchorSemanticStyles>;
|
||||
|
||||
export interface AnchorProps {
|
||||
prefixCls?: string;
|
||||
className?: string;
|
||||
@@ -114,8 +126,8 @@ export interface AntAnchor {
|
||||
link: { title: React.ReactNode; href: string },
|
||||
) => void;
|
||||
direction: AnchorDirection;
|
||||
classNames?: SemanticClassNames<SemanticName>;
|
||||
styles?: SemanticStyles<SemanticName>;
|
||||
classNames?: AnchorSemanticClassNames;
|
||||
styles?: AnchorSemanticStyles;
|
||||
}
|
||||
|
||||
const Anchor: React.FC<AnchorProps> = (props) => {
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import InternalAnchor from './Anchor';
|
||||
import AnchorLink from './AnchorLink';
|
||||
|
||||
export type { AnchorProps } from './Anchor';
|
||||
export type {
|
||||
AnchorProps,
|
||||
AnchorSemanticClassNames,
|
||||
AnchorSemanticName,
|
||||
AnchorSemanticStyles,
|
||||
} from './Anchor';
|
||||
export type { AnchorLinkProps } from './AnchorLink';
|
||||
|
||||
type InternalAnchorType = typeof InternalAnchor;
|
||||
@@ -13,4 +18,5 @@ type CompoundedComponent = InternalAnchorType & {
|
||||
const Anchor = InternalAnchor as CompoundedComponent;
|
||||
|
||||
Anchor.Link = AnchorLink;
|
||||
|
||||
export default Anchor;
|
||||
|
||||
@@ -7,7 +7,6 @@ cover: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*HJz8SZos2wgAAAAAAA
|
||||
coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*oC92TK44Ex8AAAAAAAAAAAAADrJ8AQ/original
|
||||
demo:
|
||||
cols: 2
|
||||
tag: 5.1.0
|
||||
---
|
||||
|
||||
## When To Use
|
||||
|
||||
@@ -8,7 +8,6 @@ cover: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*HJz8SZos2wgAAAAAAA
|
||||
coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*oC92TK44Ex8AAAAAAAAAAAAADrJ8AQ/original
|
||||
demo:
|
||||
cols: 2
|
||||
tag: 5.1.0
|
||||
---
|
||||
|
||||
## 何时使用 {#when-to-use}
|
||||
|
||||
@@ -3,12 +3,7 @@ import type { BaseSelectRef } from '@rc-component/select';
|
||||
import { omit, toArray } from '@rc-component/util';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
import type {
|
||||
SemanticClassNames,
|
||||
SemanticClassNamesType,
|
||||
SemanticStyles,
|
||||
SemanticStylesType,
|
||||
} from '../_util/hooks';
|
||||
import type { SemanticClassNamesType, SemanticStylesType } from '../_util/hooks';
|
||||
import { useMergeSemantic } from '../_util/hooks';
|
||||
import type { InputStatus } from '../_util/statusUtils';
|
||||
import { devUseWarning } from '../_util/warning';
|
||||
@@ -19,13 +14,30 @@ import type {
|
||||
DefaultOptionType,
|
||||
InternalSelectProps,
|
||||
RefSelectProps,
|
||||
SelectPopupSemanticClassNames,
|
||||
SelectPopupSemanticStyles,
|
||||
SelectProps,
|
||||
} from '../select';
|
||||
import Select from '../select';
|
||||
|
||||
export type AutoCompleteSemanticName = 'root' | 'prefix' | 'input' | 'placeholder' | 'content';
|
||||
export type AutoCompleteSemanticName = keyof AutoCompleteSemanticClassNames &
|
||||
keyof AutoCompleteSemanticStyles;
|
||||
|
||||
type PopupSemantic = 'root' | 'listItem' | 'list';
|
||||
export type AutoCompleteSemanticClassNames = {
|
||||
root?: string;
|
||||
prefix?: string;
|
||||
input?: string;
|
||||
placeholder?: string;
|
||||
content?: string;
|
||||
};
|
||||
|
||||
export type AutoCompleteSemanticStyles = {
|
||||
root?: React.CSSProperties;
|
||||
prefix?: React.CSSProperties;
|
||||
input?: React.CSSProperties;
|
||||
placeholder?: React.CSSProperties;
|
||||
content?: React.CSSProperties;
|
||||
};
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
@@ -38,14 +50,14 @@ export type DataSourceItemType = DataSourceItemObject | React.ReactNode;
|
||||
|
||||
export type AutoCompleteClassNamesType = SemanticClassNamesType<
|
||||
AutoCompleteProps,
|
||||
AutoCompleteSemanticName,
|
||||
{ popup?: SemanticClassNames<PopupSemantic> }
|
||||
AutoCompleteSemanticClassNames,
|
||||
{ popup?: SelectPopupSemanticClassNames }
|
||||
>;
|
||||
|
||||
export type AutoCompleteStylesType = SemanticStylesType<
|
||||
AutoCompleteProps,
|
||||
AutoCompleteSemanticName,
|
||||
{ popup?: SemanticStyles<PopupSemantic> }
|
||||
AutoCompleteSemanticStyles,
|
||||
{ popup?: SelectPopupSemanticStyles }
|
||||
>;
|
||||
|
||||
export interface AutoCompleteProps<
|
||||
|
||||
@@ -4,7 +4,12 @@ import genPurePanel from '../_util/PurePanel';
|
||||
import Select from '../select';
|
||||
import RefAutoComplete from './AutoComplete';
|
||||
|
||||
export type { AutoCompleteProps } from './AutoComplete';
|
||||
export type {
|
||||
AutoCompleteProps,
|
||||
AutoCompleteSemanticClassNames,
|
||||
AutoCompleteSemanticName,
|
||||
AutoCompleteSemanticStyles,
|
||||
} from './AutoComplete';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
|
||||
@@ -13,11 +13,7 @@ import type { AvatarContextType, AvatarSize } from './AvatarContext';
|
||||
import AvatarContext from './AvatarContext';
|
||||
import useStyle from './style';
|
||||
|
||||
interface ContextProps {
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
const AvatarContextProvider: React.FC<AvatarContextType & ContextProps> = (props) => {
|
||||
const AvatarContextProvider: React.FC<React.PropsWithChildren<AvatarContextType>> = (props) => {
|
||||
const { size, shape } = React.useContext<AvatarContextType>(AvatarContext);
|
||||
const avatarContextValue = React.useMemo<AvatarContextType>(
|
||||
() => ({ size: props.size || size, shape: props.shape || shape }),
|
||||
|
||||
@@ -25,6 +25,9 @@ export interface BackTopProps {
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Please use `FloatButton.BackTop` instead.
|
||||
*/
|
||||
const BackTop: React.FC<React.PropsWithChildren<BackTopProps>> = (props) => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
|
||||
@@ -15,10 +15,21 @@ import type { PresetColorKey } from '../theme/internal';
|
||||
import ScrollNumber from './ScrollNumber';
|
||||
import useStyle from './style';
|
||||
|
||||
type SemanticName = 'root' | 'indicator';
|
||||
export type BadgeSemanticName = keyof BadgeSemanticClassNames & keyof BadgeSemanticStyles;
|
||||
|
||||
export type BadgeClassNamesType = SemanticClassNamesType<BadgeProps, SemanticName>;
|
||||
export type BadgeStylesType = SemanticStylesType<BadgeProps, SemanticName>;
|
||||
export type BadgeSemanticClassNames = {
|
||||
root?: string;
|
||||
indicator?: string;
|
||||
};
|
||||
|
||||
export type BadgeSemanticStyles = {
|
||||
root?: React.CSSProperties;
|
||||
indicator?: React.CSSProperties;
|
||||
};
|
||||
|
||||
export type BadgeClassNamesType = SemanticClassNamesType<BadgeProps, BadgeSemanticClassNames>;
|
||||
|
||||
export type BadgeStylesType = SemanticStylesType<BadgeProps, BadgeSemanticStyles>;
|
||||
|
||||
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
||||
/** Number to show in badge */
|
||||
@@ -211,6 +222,7 @@ const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>((props, ref) => {
|
||||
const statusTextColor = mergedStyle.color;
|
||||
return (
|
||||
<span
|
||||
ref={ref}
|
||||
{...restProps}
|
||||
className={badgeClassName}
|
||||
style={{ ...mergedStyles.root, ...mergedStyle }}
|
||||
|
||||
@@ -11,10 +11,23 @@ import useStyle from './style/ribbon';
|
||||
|
||||
type RibbonPlacement = 'start' | 'end';
|
||||
|
||||
type SemanticName = 'root' | 'content' | 'indicator';
|
||||
export type RibbonSemanticName = keyof RibbonSemanticClassNames & keyof RibbonSemanticStyles;
|
||||
|
||||
export type RibbonClassNamesType = SemanticClassNamesType<RibbonProps, SemanticName>;
|
||||
export type RibbonStylesType = SemanticStylesType<RibbonProps, SemanticName>;
|
||||
export type RibbonSemanticClassNames = {
|
||||
root?: string;
|
||||
content?: string;
|
||||
indicator?: string;
|
||||
};
|
||||
|
||||
export type RibbonSemanticStyles = {
|
||||
root?: React.CSSProperties;
|
||||
content?: React.CSSProperties;
|
||||
indicator?: React.CSSProperties;
|
||||
};
|
||||
|
||||
export type RibbonClassNamesType = SemanticClassNamesType<RibbonProps, RibbonSemanticClassNames>;
|
||||
|
||||
export type RibbonStylesType = SemanticStylesType<RibbonProps, RibbonSemanticStyles>;
|
||||
|
||||
export interface RibbonProps {
|
||||
className?: string;
|
||||
|
||||
@@ -11,7 +11,7 @@ export interface ScrollNumberProps {
|
||||
motionClassName?: string;
|
||||
count?: string | number | null;
|
||||
children?: React.ReactElement;
|
||||
component?: React.ComponentType<any>;
|
||||
component?: React.ComponentType<React.HTMLAttributes<HTMLElement>>;
|
||||
style?: React.CSSProperties;
|
||||
title?: string | number | null;
|
||||
show: boolean;
|
||||
|
||||
@@ -240,4 +240,10 @@ describe('Badge', () => {
|
||||
rerender(<Badge count={0} showZero color="#ff0" />);
|
||||
expect(container.querySelectorAll('[title="0"]')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('should support ref when exist status & text', () => {
|
||||
const badgeRef = React.createRef<HTMLSpanElement>();
|
||||
const { container } = render(<Badge ref={badgeRef} status="success" text="Success" />);
|
||||
expect(badgeRef.current).toBe(container.querySelector('.ant-badge'));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,7 +1,21 @@
|
||||
import InternalBadge from './Badge';
|
||||
import Ribbon from './Ribbon';
|
||||
|
||||
export type { BadgeClassNamesType, BadgeProps, BadgeStylesType } from './Badge';
|
||||
export type {
|
||||
BadgeClassNamesType,
|
||||
BadgeProps,
|
||||
BadgeSemanticClassNames,
|
||||
BadgeSemanticName,
|
||||
BadgeSemanticStyles,
|
||||
BadgeStylesType,
|
||||
} from './Badge';
|
||||
|
||||
export type {
|
||||
RibbonProps,
|
||||
RibbonSemanticClassNames,
|
||||
RibbonSemanticName,
|
||||
RibbonSemanticStyles,
|
||||
} from './Ribbon';
|
||||
|
||||
export type { ScrollNumberProps } from './ScrollNumber';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { toArray } from '@rc-component/util';
|
||||
import pickAttrs from '@rc-component/util/lib/pickAttrs';
|
||||
import { clsx } from 'clsx';
|
||||
@@ -13,7 +14,7 @@ import type { DropdownProps } from '../dropdown';
|
||||
import type { BreadcrumbContextProps } from './BreadcrumbContext';
|
||||
import BreadcrumbContext from './BreadcrumbContext';
|
||||
import type { BreadcrumbItemProps } from './BreadcrumbItem';
|
||||
import BreadcrumbItem, { InternalBreadcrumbItem } from './BreadcrumbItem';
|
||||
import { InternalBreadcrumbItem } from './BreadcrumbItem';
|
||||
import BreadcrumbSeparator from './BreadcrumbSeparator';
|
||||
import useStyle from './style';
|
||||
import useItemRender from './useItemRender';
|
||||
@@ -52,22 +53,36 @@ export type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
|
||||
|
||||
export type InternalRouteType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
|
||||
|
||||
export type BreadcrumbSemanticName = 'root' | 'item' | 'separator';
|
||||
export type BreadcrumbSemanticName = keyof BreadcrumbSemanticClassNames &
|
||||
keyof BreadcrumbSemanticStyles;
|
||||
|
||||
export type BreadcrumbSemanticClassNames = {
|
||||
root?: string;
|
||||
item?: string;
|
||||
separator?: string;
|
||||
};
|
||||
|
||||
export type BreadcrumbSemanticStyles = {
|
||||
root?: React.CSSProperties;
|
||||
item?: React.CSSProperties;
|
||||
separator?: React.CSSProperties;
|
||||
};
|
||||
|
||||
export type BreadcrumbClassNamesType<T extends AnyObject = AnyObject> = SemanticClassNamesType<
|
||||
BreadcrumbProps<T>,
|
||||
BreadcrumbSemanticName
|
||||
BreadcrumbSemanticClassNames
|
||||
>;
|
||||
|
||||
export type BreadcrumbStylesType<T extends AnyObject = AnyObject> = SemanticStylesType<
|
||||
BreadcrumbProps<T>,
|
||||
BreadcrumbSemanticName
|
||||
BreadcrumbSemanticStyles
|
||||
>;
|
||||
|
||||
export interface BreadcrumbProps<T extends AnyObject = AnyObject> {
|
||||
prefixCls?: string;
|
||||
params?: T;
|
||||
separator?: React.ReactNode;
|
||||
dropdownIcon?: React.ReactNode;
|
||||
style?: React.CSSProperties;
|
||||
className?: string;
|
||||
rootClassName?: string;
|
||||
@@ -108,6 +123,7 @@ const Breadcrumb = <T extends AnyObject = AnyObject>(props: BreadcrumbProps<T>)
|
||||
params = {},
|
||||
classNames,
|
||||
styles,
|
||||
dropdownIcon,
|
||||
...restProps
|
||||
} = props;
|
||||
|
||||
@@ -119,9 +135,11 @@ const Breadcrumb = <T extends AnyObject = AnyObject>(props: BreadcrumbProps<T>)
|
||||
classNames: contextClassNames,
|
||||
styles: contextStyles,
|
||||
separator: contextSeparator,
|
||||
dropdownIcon: contextDropdownIcon,
|
||||
} = useComponentConfig('breadcrumb');
|
||||
|
||||
const mergedSeparator = separator ?? contextSeparator ?? '/';
|
||||
const mergedDropdownIcon = dropdownIcon ?? contextDropdownIcon ?? <DownOutlined />;
|
||||
|
||||
let crumbs: React.ReactNode;
|
||||
|
||||
@@ -227,6 +245,7 @@ const Breadcrumb = <T extends AnyObject = AnyObject>(props: BreadcrumbProps<T>)
|
||||
className={itemClassName}
|
||||
style={style}
|
||||
dropdownProps={dropdownProps}
|
||||
dropdownIcon={mergedDropdownIcon}
|
||||
href={href}
|
||||
separator={isLastItem ? '' : mergedSeparator}
|
||||
onClick={onClick}
|
||||
@@ -283,9 +302,6 @@ const Breadcrumb = <T extends AnyObject = AnyObject>(props: BreadcrumbProps<T>)
|
||||
);
|
||||
};
|
||||
|
||||
Breadcrumb.Item = BreadcrumbItem;
|
||||
Breadcrumb.Separator = BreadcrumbSeparator;
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
Breadcrumb.displayName = 'Breadcrumb';
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import React from 'react';
|
||||
|
||||
import type { SemanticClassNames, SemanticStyles } from '../_util/hooks';
|
||||
|
||||
export type SemanticName = 'root' | 'item' | 'separator';
|
||||
import type { BreadcrumbSemanticClassNames, BreadcrumbSemanticStyles } from './Breadcrumb';
|
||||
|
||||
export interface BreadcrumbContextProps {
|
||||
classNames?: SemanticClassNames<SemanticName>;
|
||||
styles?: SemanticStyles<SemanticName>;
|
||||
classNames?: BreadcrumbSemanticClassNames;
|
||||
styles?: BreadcrumbSemanticStyles;
|
||||
}
|
||||
|
||||
const BreadcrumbContext = React.createContext<BreadcrumbContextProps>({});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import DownOutlined from '@ant-design/icons/DownOutlined';
|
||||
import clsx from 'clsx';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
import isNonNullable from '../_util/isNonNullable';
|
||||
import { ConfigContext } from '../config-provider';
|
||||
@@ -17,6 +16,7 @@ export interface SeparatorType {
|
||||
}
|
||||
|
||||
type MenuType = NonNullable<DropdownProps['menu']>;
|
||||
|
||||
interface MenuItem {
|
||||
key?: React.Key;
|
||||
title?: React.ReactNode;
|
||||
@@ -32,6 +32,7 @@ export interface BreadcrumbItemProps extends SeparatorType {
|
||||
items?: MenuItem[];
|
||||
};
|
||||
dropdownProps?: DropdownProps;
|
||||
dropdownIcon?: React.ReactNode;
|
||||
onClick?: React.MouseEventHandler<HTMLAnchorElement | HTMLSpanElement>;
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
@@ -39,7 +40,7 @@ export interface BreadcrumbItemProps extends SeparatorType {
|
||||
}
|
||||
|
||||
export const InternalBreadcrumbItem: React.FC<BreadcrumbItemProps> = (props) => {
|
||||
const { prefixCls, separator = '/', children, menu, dropdownProps, href } = props;
|
||||
const { prefixCls, separator = '/', children, menu, dropdownProps, href, dropdownIcon } = props;
|
||||
const breadcrumbContext = React.useContext(BreadcrumbContext);
|
||||
const { classNames: mergedClassNames, styles: mergedStyles } = breadcrumbContext;
|
||||
/** If overlay is have Wrap a Dropdown */
|
||||
@@ -73,7 +74,7 @@ export const InternalBreadcrumbItem: React.FC<BreadcrumbItemProps> = (props) =>
|
||||
<Dropdown placement="bottom" {...mergeDropDownProps}>
|
||||
<span className={`${prefixCls}-overlay-link`}>
|
||||
{breadcrumbItem}
|
||||
<DownOutlined />
|
||||
{dropdownIcon}
|
||||
</span>
|
||||
</Dropdown>
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import { accessibilityTest } from '../../../tests/shared/accessibilityTest';
|
||||
import mountTest from '../../../tests/shared/mountTest';
|
||||
import rtlTest from '../../../tests/shared/rtlTest';
|
||||
import { render } from '../../../tests/utils';
|
||||
import { render, screen } from '../../../tests/utils';
|
||||
import ConfigProvider from '../../config-provider';
|
||||
import type { ItemType } from '../Breadcrumb';
|
||||
import Breadcrumb from '../index';
|
||||
@@ -311,6 +311,75 @@ describe('Breadcrumb', () => {
|
||||
expect(document.querySelector('.ant-dropdown')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should support custom dropdownIcon', () => {
|
||||
render(
|
||||
<Breadcrumb
|
||||
items={[
|
||||
{
|
||||
title: 'test',
|
||||
menu: {
|
||||
items: [
|
||||
{
|
||||
key: '1',
|
||||
label: 'label',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
]}
|
||||
dropdownIcon={<span>foobar</span>}
|
||||
/>,
|
||||
);
|
||||
expect(screen.getByText('foobar')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should support custom dropdownIcon in ConfigProvider', () => {
|
||||
render(
|
||||
<ConfigProvider breadcrumb={{ dropdownIcon: <span>foobar</span> }}>
|
||||
<Breadcrumb
|
||||
items={[
|
||||
{
|
||||
title: 'test',
|
||||
menu: {
|
||||
items: [
|
||||
{
|
||||
key: '1',
|
||||
label: 'label',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</ConfigProvider>,
|
||||
);
|
||||
expect(screen.getByText('foobar')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should prefer custom dropdownIcon prop than ConfigProvider', () => {
|
||||
render(
|
||||
<ConfigProvider breadcrumb={{ dropdownIcon: <span>foobar</span> }}>
|
||||
<Breadcrumb
|
||||
items={[
|
||||
{
|
||||
title: 'test',
|
||||
menu: {
|
||||
items: [
|
||||
{
|
||||
key: '1',
|
||||
label: 'label',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
]}
|
||||
dropdownIcon={<span>bamboo</span>}
|
||||
/>
|
||||
</ConfigProvider>,
|
||||
);
|
||||
expect(screen.getByText('bamboo')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('Breadcrumb params type test', () => {
|
||||
interface Params {
|
||||
key1?: number;
|
||||
|
||||
@@ -53,6 +53,7 @@ Common props ref:[Common props](/docs/react/common-props)
|
||||
| Property | Description | Type | Default | Version |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| classNames | Customize class for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), string> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), string> | - | |
|
||||
| dropdownIcon | Custom dropdown icon | ReactNode | `<DownOutlined />` | 6.2.0 |
|
||||
| itemRender | Custom item renderer | (route, params, routes, paths) => ReactNode | - | |
|
||||
| params | Routing parameters | object | - | |
|
||||
| items | The routing stack information of router | [ItemType\[\]](#itemtype) | - | 5.3.0 |
|
||||
|
||||
@@ -1,6 +1,23 @@
|
||||
import Breadcrumb from './Breadcrumb';
|
||||
import InternalBreadcrumb from './Breadcrumb';
|
||||
import BreadcrumbItem from './BreadcrumbItem';
|
||||
import BreadcrumbSeparator from './BreadcrumbSeparator';
|
||||
|
||||
export type { BreadcrumbProps } from './Breadcrumb';
|
||||
export type {
|
||||
BreadcrumbProps,
|
||||
BreadcrumbSemanticClassNames,
|
||||
BreadcrumbSemanticName,
|
||||
BreadcrumbSemanticStyles,
|
||||
} from './Breadcrumb';
|
||||
export type { BreadcrumbItemProps, SeparatorType } from './BreadcrumbItem';
|
||||
|
||||
type CompoundedComponent = typeof InternalBreadcrumb & {
|
||||
Item: typeof BreadcrumbItem;
|
||||
Separator: typeof BreadcrumbSeparator;
|
||||
};
|
||||
|
||||
const Breadcrumb = InternalBreadcrumb as CompoundedComponent;
|
||||
|
||||
Breadcrumb.Item = BreadcrumbItem;
|
||||
Breadcrumb.Separator = BreadcrumbSeparator;
|
||||
|
||||
export default Breadcrumb;
|
||||
|
||||
@@ -54,6 +54,7 @@ return <Breadcrumb routes={[{ breadcrumbName: 'sample' }]} />;
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| classNames | 用于自定义组件内部各语义化结构的 class,支持对象或函数 | Record<[SemanticDOM](#semantic-dom), string> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), string> | - | |
|
||||
| dropdownIcon | 自定义下拉图标 | ReactNode | `<DownOutlined />` | 6.2.0 |
|
||||
| itemRender | 自定义链接函数,和 react-router 配置使用 | (route, params, routes, paths) => ReactNode | - | |
|
||||
| params | 路由的参数 | object | - | |
|
||||
| items | 路由栈信息 | [items\[\]](#itemtype) | - | 5.3.0 |
|
||||
|
||||
@@ -29,11 +29,26 @@ import Compact from './style/compact';
|
||||
|
||||
export type LegacyButtonType = ButtonType | 'danger';
|
||||
|
||||
export type ButtonSemanticName = 'root' | 'icon' | 'content';
|
||||
export type ButtonSemanticName = keyof ButtonSemanticClassNames & keyof ButtonSemanticStyles;
|
||||
|
||||
export type ButtonClassNamesType = SemanticClassNamesType<BaseButtonProps, ButtonSemanticName>;
|
||||
export type ButtonSemanticClassNames = {
|
||||
root?: string;
|
||||
icon?: string;
|
||||
content?: string;
|
||||
};
|
||||
|
||||
export type ButtonStylesType = SemanticStylesType<BaseButtonProps, ButtonSemanticName>;
|
||||
export type ButtonSemanticStyles = {
|
||||
root?: React.CSSProperties;
|
||||
icon?: React.CSSProperties;
|
||||
content?: React.CSSProperties;
|
||||
};
|
||||
|
||||
export type ButtonClassNamesType = SemanticClassNamesType<
|
||||
BaseButtonProps,
|
||||
ButtonSemanticClassNames
|
||||
>;
|
||||
|
||||
export type ButtonStylesType = SemanticStylesType<BaseButtonProps, ButtonSemanticStyles>;
|
||||
|
||||
export interface BaseButtonProps {
|
||||
type?: ButtonType;
|
||||
@@ -105,7 +120,7 @@ const ButtonTypeMap: Partial<Record<ButtonType, ColorVariantPairType>> = {
|
||||
primary: ['primary', 'solid'],
|
||||
dashed: ['default', 'dashed'],
|
||||
// `link` is not a real color but we should compatible with it
|
||||
link: ['link' as any, 'link'],
|
||||
link: ['link' as ButtonColorType, 'link'],
|
||||
text: ['default', 'text'],
|
||||
};
|
||||
|
||||
|
||||
@@ -977,6 +977,7 @@ exports[`renders components/button/demo/debug-icon.tsx extend context correctly
|
||||
Array [
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -2780,6 +2781,7 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper css-var-test-id ant-radio-css-var"
|
||||
@@ -4100,6 +4102,7 @@ exports[`renders components/button/demo/size.tsx extend context correctly 1`] =
|
||||
Array [
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
|
||||
@@ -959,6 +959,7 @@ exports[`renders components/button/demo/debug-icon.tsx correctly 1`] = `
|
||||
Array [
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -2586,6 +2587,7 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper css-var-test-id ant-radio-css-var"
|
||||
@@ -3573,6 +3575,7 @@ exports[`renders components/button/demo/size.tsx correctly 1`] = `
|
||||
Array [
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
|
||||
@@ -7,6 +7,7 @@ import { PresetColors } from '../theme/interface';
|
||||
import type { BaseButtonProps, LegacyButtonType } from './Button';
|
||||
|
||||
const rxTwoCNChar = /^[\u4E00-\u9FA5]{2}$/;
|
||||
|
||||
export const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
|
||||
|
||||
export function convertLegacyProps(
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import Button from './Button';
|
||||
|
||||
export type { SizeType as ButtonSize } from '../config-provider/SizeContext';
|
||||
export type { ButtonProps } from './Button';
|
||||
export type {
|
||||
ButtonProps,
|
||||
ButtonSemanticClassNames,
|
||||
ButtonSemanticName,
|
||||
ButtonSemanticStyles,
|
||||
} from './Button';
|
||||
export type { ButtonGroupProps } from './ButtonGroup';
|
||||
|
||||
export * from './buttonHelpers';
|
||||
|
||||
@@ -6,8 +6,7 @@ import type { ButtonToken } from './token';
|
||||
const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
|
||||
const { componentCls, antCls } = token;
|
||||
|
||||
// Default: '--ant-btn-'
|
||||
const getCssVar = genCssVar(antCls, 'btn');
|
||||
const [varName, varRef] = genCssVar(antCls, 'btn');
|
||||
|
||||
return {
|
||||
[componentCls]: [
|
||||
@@ -16,54 +15,62 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
|
||||
// ==============================================================
|
||||
{
|
||||
// Border
|
||||
[getCssVar('border-width')]: '1px',
|
||||
[varName('border-width')]: '1px',
|
||||
|
||||
[getCssVar('border-color')]: '#000',
|
||||
[getCssVar('border-color-hover')]: `var(${getCssVar('border-color')})`,
|
||||
[getCssVar('border-color-active')]: `var(${getCssVar('border-color')})`,
|
||||
[getCssVar('border-color-disabled')]: `var(${getCssVar('border-color')})`,
|
||||
[varName('border-color')]: '#000',
|
||||
[varName('border-color-hover')]: varRef('border-color'),
|
||||
[varName('border-color-active')]: varRef('border-color'),
|
||||
[varName('border-color-disabled')]: varRef('border-color'),
|
||||
|
||||
[getCssVar('border-style')]: 'solid',
|
||||
[varName('border-style')]: 'solid',
|
||||
|
||||
// Text
|
||||
[getCssVar('text-color')]: '#000',
|
||||
[getCssVar('text-color-hover')]: `var(${getCssVar('text-color')})`,
|
||||
[getCssVar('text-color-active')]: `var(${getCssVar('text-color')})`,
|
||||
[getCssVar('text-color-disabled')]: `var(${getCssVar('text-color')})`,
|
||||
[varName('text-color')]: '#000',
|
||||
[varName('text-color-hover')]: varRef('text-color'),
|
||||
[varName('text-color-active')]: varRef('text-color'),
|
||||
[varName('text-color-disabled')]: varRef('text-color'),
|
||||
|
||||
// Background
|
||||
[getCssVar('bg-color')]: '#ddd',
|
||||
[getCssVar('bg-color-hover')]: `var(${getCssVar('bg-color')})`,
|
||||
[getCssVar('bg-color-active')]: `var(${getCssVar('bg-color')})`,
|
||||
[getCssVar('bg-color-disabled')]: token.colorBgContainerDisabled,
|
||||
[getCssVar('bg-color-container')]: token.colorBgContainer,
|
||||
[varName('bg-color')]: '#ddd',
|
||||
[varName('bg-color-hover')]: varRef('bg-color'),
|
||||
[varName('bg-color-active')]: varRef('bg-color'),
|
||||
[varName('bg-color-disabled')]: token.colorBgContainerDisabled,
|
||||
[varName('bg-color-container')]: token.colorBgContainer,
|
||||
|
||||
// Shadow
|
||||
[getCssVar('shadow')]: 'none',
|
||||
[varName('shadow')]: 'none',
|
||||
},
|
||||
// ==============================================================
|
||||
// == Template ==
|
||||
// ==============================================================
|
||||
{
|
||||
// Basic
|
||||
border: `var(${getCssVar('border-width')}) var(${getCssVar('border-style')}) var(${getCssVar('border-color')})`,
|
||||
color: `var(${getCssVar('text-color')})`,
|
||||
backgroundColor: `var(${getCssVar('bg-color')})`,
|
||||
border: [varRef('border-width'), varRef('border-style'), varRef('border-color')].join(' '),
|
||||
color: varRef('text-color'),
|
||||
backgroundColor: varRef('bg-color'),
|
||||
|
||||
// Status
|
||||
[`&:not(:disabled):not(${componentCls}-disabled)`]: {
|
||||
// Hover
|
||||
'&:hover': {
|
||||
border: `var(${getCssVar('border-width')}) var(${getCssVar('border-style')}) var(${getCssVar('border-color-hover')})`,
|
||||
color: `var(${getCssVar('text-color-hover')})`,
|
||||
backgroundColor: `var(${getCssVar('bg-color-hover')})`,
|
||||
border: [
|
||||
varRef('border-width'),
|
||||
varRef('border-style'),
|
||||
varRef('border-color-hover'),
|
||||
].join(' '),
|
||||
color: varRef('text-color-hover'),
|
||||
backgroundColor: varRef('bg-color-hover'),
|
||||
},
|
||||
|
||||
// Active
|
||||
'&:active': {
|
||||
border: `var(${getCssVar('border-width')}) var(${getCssVar('border-style')}) var(${getCssVar('border-color-active')})`,
|
||||
color: `var(${getCssVar('text-color-active')})`,
|
||||
backgroundColor: `var(${getCssVar('bg-color-active')})`,
|
||||
border: [
|
||||
varRef('border-width'),
|
||||
varRef('border-style'),
|
||||
varRef('border-color-active'),
|
||||
].join(' '),
|
||||
color: varRef('text-color-active'),
|
||||
backgroundColor: varRef('bg-color-active'),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -75,67 +82,65 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
|
||||
// >>>>> Solid
|
||||
[`&${componentCls}-variant-solid`]: {
|
||||
// Solid Variables
|
||||
[getCssVar('solid-bg-color')]: `var(${getCssVar('color-base')})`,
|
||||
[getCssVar('solid-bg-color-hover')]: `var(${getCssVar('color-hover')})`,
|
||||
[getCssVar('solid-bg-color-active')]: `var(${getCssVar('color-active')})`,
|
||||
[varName('solid-bg-color')]: varRef('color-base'),
|
||||
[varName('solid-bg-color-hover')]: varRef('color-hover'),
|
||||
[varName('solid-bg-color-active')]: varRef('color-active'),
|
||||
|
||||
// Variables
|
||||
[getCssVar('border-color')]: 'transparent',
|
||||
[varName('border-color')]: 'transparent',
|
||||
|
||||
[getCssVar('text-color')]: token.colorTextLightSolid,
|
||||
[varName('text-color')]: token.colorTextLightSolid,
|
||||
|
||||
[getCssVar('bg-color')]: `var(${getCssVar('solid-bg-color')})`,
|
||||
[getCssVar('bg-color-hover')]: `var(${getCssVar('solid-bg-color-hover')})`,
|
||||
[getCssVar('bg-color-active')]: `var(${getCssVar('solid-bg-color-active')})`,
|
||||
[varName('bg-color')]: varRef('solid-bg-color'),
|
||||
[varName('bg-color-hover')]: varRef('solid-bg-color-hover'),
|
||||
[varName('bg-color-active')]: varRef('solid-bg-color-active'),
|
||||
|
||||
// Box Shadow
|
||||
boxShadow: `var(${getCssVar('shadow')})`,
|
||||
boxShadow: varRef('shadow'),
|
||||
},
|
||||
|
||||
// >>>>> Outlined & Dashed
|
||||
[`&${componentCls}-variant-outlined, &${componentCls}-variant-dashed`]: {
|
||||
[getCssVar('border-color')]: `var(${getCssVar('color-base')})`,
|
||||
[getCssVar('border-color-hover')]: `var(${getCssVar('color-hover')})`,
|
||||
[getCssVar('border-color-active')]: `var(${getCssVar('color-active')})`,
|
||||
[varName('border-color')]: varRef('color-base'),
|
||||
[varName('border-color-hover')]: varRef('color-hover'),
|
||||
[varName('border-color-active')]: varRef('color-active'),
|
||||
|
||||
[getCssVar('bg-color')]: `var(${getCssVar('bg-color-container')})`,
|
||||
|
||||
[getCssVar('text-color')]: `var(${getCssVar('color-base')})`,
|
||||
[getCssVar('text-color-hover')]: `var(${getCssVar('color-hover')})`,
|
||||
[getCssVar('text-color-active')]: `var(${getCssVar('color-active')})`,
|
||||
[varName('bg-color')]: varRef('bg-color-container'),
|
||||
[varName('text-color')]: varRef('color-base'),
|
||||
[varName('text-color-hover')]: varRef('color-hover'),
|
||||
[varName('text-color-active')]: varRef('color-active'),
|
||||
|
||||
// Box Shadow
|
||||
boxShadow: `var(${getCssVar('shadow')})`,
|
||||
boxShadow: varRef('shadow'),
|
||||
},
|
||||
|
||||
// >>>>> Dashed
|
||||
[`&${componentCls}-variant-dashed`]: {
|
||||
[getCssVar('border-style')]: 'dashed',
|
||||
[getCssVar('bg-color-disabled')]: token.dashedBgDisabled,
|
||||
[varName('border-style')]: 'dashed',
|
||||
[varName('bg-color-disabled')]: token.dashedBgDisabled,
|
||||
},
|
||||
|
||||
// >>>>> Filled
|
||||
[`&${componentCls}-variant-filled`]: {
|
||||
[getCssVar('border-color')]: 'transparent',
|
||||
[varName('border-color')]: 'transparent',
|
||||
|
||||
[getCssVar('text-color')]: `var(${getCssVar('color-base')})`,
|
||||
[varName('text-color')]: varRef('color-base'),
|
||||
|
||||
[getCssVar('bg-color')]: `var(${getCssVar('color-light')})`,
|
||||
[getCssVar('bg-color-hover')]: `var(${getCssVar('color-light-hover')})`,
|
||||
[getCssVar('bg-color-active')]: `var(${getCssVar('color-light-active')})`,
|
||||
[varName('bg-color')]: varRef('color-light'),
|
||||
[varName('bg-color-hover')]: varRef('color-light-hover'),
|
||||
[varName('bg-color-active')]: varRef('color-light-active'),
|
||||
},
|
||||
|
||||
// >>>>> Text & Link
|
||||
[`&${componentCls}-variant-text, &${componentCls}-variant-link`]: {
|
||||
[getCssVar('border-color')]: 'transparent',
|
||||
[varName('border-color')]: 'transparent',
|
||||
|
||||
[getCssVar('text-color')]: `var(${getCssVar('color-base')})`,
|
||||
[getCssVar('text-color-hover')]: `var(${getCssVar('color-hover')})`,
|
||||
[getCssVar('text-color-active')]: `var(${getCssVar('color-active')})`,
|
||||
|
||||
[getCssVar('bg-color')]: 'transparent',
|
||||
[getCssVar('bg-color-hover')]: 'transparent',
|
||||
[getCssVar('bg-color-active')]: 'transparent',
|
||||
[varName('text-color')]: varRef('color-base'),
|
||||
[varName('text-color-hover')]: varRef('color-hover'),
|
||||
[varName('text-color-active')]: varRef('color-active'),
|
||||
[varName('bg-color')]: 'transparent',
|
||||
[varName('bg-color-hover')]: 'transparent',
|
||||
[varName('bg-color-active')]: 'transparent',
|
||||
|
||||
[`&:disabled, &${token.componentCls}-disabled`]: {
|
||||
background: 'transparent',
|
||||
@@ -145,8 +150,8 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
|
||||
|
||||
// >>>>> Text
|
||||
[`&${componentCls}-variant-text`]: {
|
||||
[getCssVar('bg-color-hover')]: `var(${getCssVar('color-light')})`,
|
||||
[getCssVar('bg-color-active')]: `var(${getCssVar('color-light-active')})`,
|
||||
[varName('bg-color-hover')]: varRef('color-light'),
|
||||
[varName('bg-color-active')]: varRef('color-light-active'),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -157,88 +162,87 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
|
||||
// ======================== By Default ========================
|
||||
// >>>>> Link
|
||||
[`&${componentCls}-variant-link`]: {
|
||||
[getCssVar('color-base')]: token.colorLink,
|
||||
[getCssVar('color-hover')]: token.colorLinkHover,
|
||||
[getCssVar('color-active')]: token.colorLinkActive,
|
||||
[varName('color-base')]: token.colorLink,
|
||||
[varName('color-hover')]: token.colorLinkHover,
|
||||
[varName('color-active')]: token.colorLinkActive,
|
||||
},
|
||||
|
||||
// ======================== Compatible ========================
|
||||
// >>>>> Primary
|
||||
[`&${componentCls}-color-primary`]: {
|
||||
[getCssVar('color-base')]: token.colorPrimary,
|
||||
[getCssVar('color-hover')]: token.colorPrimaryHover,
|
||||
[getCssVar('color-active')]: token.colorPrimaryActive,
|
||||
[getCssVar('color-light')]: token.colorPrimaryBg,
|
||||
[getCssVar('color-light-hover')]: token.colorPrimaryBgHover,
|
||||
[getCssVar('color-light-active')]: token.colorPrimaryBorder,
|
||||
[varName('color-base')]: token.colorPrimary,
|
||||
[varName('color-hover')]: token.colorPrimaryHover,
|
||||
[varName('color-active')]: token.colorPrimaryActive,
|
||||
[varName('color-light')]: token.colorPrimaryBg,
|
||||
[varName('color-light-hover')]: token.colorPrimaryBgHover,
|
||||
[varName('color-light-active')]: token.colorPrimaryBorder,
|
||||
|
||||
[getCssVar('shadow')]: token.primaryShadow,
|
||||
[varName('shadow')]: token.primaryShadow,
|
||||
|
||||
[`&${componentCls}-variant-solid`]: {
|
||||
[getCssVar('text-color')]: token.primaryColor,
|
||||
[getCssVar('text-color-hover')]: `var(${getCssVar('text-color')})`,
|
||||
[getCssVar('text-color-active')]: `var(${getCssVar('text-color')})`,
|
||||
[varName('text-color')]: token.primaryColor,
|
||||
[varName('text-color-hover')]: varRef('text-color'),
|
||||
[varName('text-color-active')]: varRef('text-color'),
|
||||
},
|
||||
},
|
||||
|
||||
// >>>>> Danger
|
||||
[`&${componentCls}-color-dangerous`]: {
|
||||
[getCssVar('color-base')]: token.colorError,
|
||||
[getCssVar('color-hover')]: token.colorErrorHover,
|
||||
[getCssVar('color-active')]: token.colorErrorActive,
|
||||
[getCssVar('color-light')]: token.colorErrorBg,
|
||||
[getCssVar('color-light-hover')]: token.colorErrorBgFilledHover,
|
||||
[getCssVar('color-light-active')]: token.colorErrorBgActive,
|
||||
[varName('color-base')]: token.colorError,
|
||||
[varName('color-hover')]: token.colorErrorHover,
|
||||
[varName('color-active')]: token.colorErrorActive,
|
||||
[varName('color-light')]: token.colorErrorBg,
|
||||
[varName('color-light-hover')]: token.colorErrorBgFilledHover,
|
||||
[varName('color-light-active')]: token.colorErrorBgActive,
|
||||
|
||||
[getCssVar('shadow')]: token.dangerShadow,
|
||||
[varName('shadow')]: token.dangerShadow,
|
||||
|
||||
[`&${componentCls}-variant-solid`]: {
|
||||
[getCssVar('text-color')]: token.dangerColor,
|
||||
[getCssVar('text-color-hover')]: `var(${getCssVar('text-color')})`,
|
||||
[getCssVar('text-color-active')]: `var(${getCssVar('text-color')})`,
|
||||
[varName('text-color')]: token.dangerColor,
|
||||
[varName('text-color-hover')]: varRef('text-color'),
|
||||
[varName('text-color-active')]: varRef('text-color'),
|
||||
},
|
||||
},
|
||||
|
||||
// >>>>> Default
|
||||
[`&${componentCls}-color-default`]: {
|
||||
[getCssVar('solid-bg-color')]: token.colorBgSolid,
|
||||
[getCssVar('solid-bg-color-hover')]: token.colorBgSolidHover,
|
||||
[getCssVar('solid-bg-color-active')]: token.colorBgSolidActive,
|
||||
[varName('solid-bg-color')]: token.colorBgSolid,
|
||||
[varName('solid-bg-color-hover')]: token.colorBgSolidHover,
|
||||
[varName('solid-bg-color-active')]: token.colorBgSolidActive,
|
||||
|
||||
[getCssVar('color-base')]: token.defaultBorderColor,
|
||||
[getCssVar('color-hover')]: token.defaultHoverBorderColor,
|
||||
[getCssVar('color-active')]: token.defaultActiveBorderColor,
|
||||
[varName('color-base')]: token.defaultBorderColor,
|
||||
[varName('color-hover')]: token.defaultHoverBorderColor,
|
||||
[varName('color-active')]: token.defaultActiveBorderColor,
|
||||
|
||||
[getCssVar('color-light')]: token.colorFillTertiary,
|
||||
[getCssVar('color-light-hover')]: token.colorFillSecondary,
|
||||
[getCssVar('color-light-active')]: token.colorFill,
|
||||
[varName('color-light')]: token.colorFillTertiary,
|
||||
[varName('color-light-hover')]: token.colorFillSecondary,
|
||||
[varName('color-light-active')]: token.colorFill,
|
||||
|
||||
[getCssVar('text-color')]: token.colorText,
|
||||
[getCssVar('text-color-hover')]: token.defaultHoverBorderColor,
|
||||
[getCssVar('text-color-active')]: token.defaultActiveBorderColor,
|
||||
|
||||
[getCssVar('shadow')]: token.defaultShadow,
|
||||
[varName('text-color')]: token.colorText,
|
||||
[varName('text-color-hover')]: token.defaultHoverBorderColor,
|
||||
[varName('text-color-active')]: token.defaultActiveBorderColor,
|
||||
[varName('shadow')]: token.defaultShadow,
|
||||
|
||||
[`&${componentCls}-variant-solid`]: {
|
||||
[getCssVar('text-color')]: token.solidTextColor,
|
||||
[getCssVar('text-color-hover')]: `var(${getCssVar('text-color')})`,
|
||||
[getCssVar('text-color-active')]: `var(${getCssVar('text-color')})`,
|
||||
[varName('text-color')]: token.solidTextColor,
|
||||
[varName('text-color-hover')]: varRef('text-color'),
|
||||
[varName('text-color-active')]: varRef('text-color'),
|
||||
},
|
||||
|
||||
[`&${componentCls}-variant-filled, &${componentCls}-variant-text`]: {
|
||||
[getCssVar('text-color-hover')]: `var(${getCssVar('text-color')})`,
|
||||
[getCssVar('text-color-active')]: `var(${getCssVar('text-color')})`,
|
||||
[varName('text-color-hover')]: varRef('text-color'),
|
||||
[varName('text-color-active')]: varRef('text-color'),
|
||||
},
|
||||
|
||||
[`&${componentCls}-variant-outlined, &${componentCls}-variant-dashed`]: {
|
||||
[getCssVar('bg-color-hover')]: token.defaultHoverBg,
|
||||
[getCssVar('bg-color-active')]: token.defaultActiveBg,
|
||||
[varName('bg-color-hover')]: token.defaultHoverBg,
|
||||
[varName('bg-color-active')]: token.defaultActiveBg,
|
||||
},
|
||||
|
||||
[`&${componentCls}-background-ghost`]: {
|
||||
[`&${componentCls}-variant-outlined, &${componentCls}-variant-dashed`]: {
|
||||
[getCssVar('text-color')]: token.defaultGhostColor,
|
||||
[getCssVar('border-color')]: token.defaultGhostBorderColor,
|
||||
[varName('text-color')]: token.defaultGhostColor,
|
||||
[varName('border-color')]: token.defaultGhostBorderColor,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -257,13 +261,13 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
|
||||
|
||||
return {
|
||||
[`&${componentCls}-color-${colorKey}`]: {
|
||||
[getCssVar('color-base')]: darkColor,
|
||||
[getCssVar('color-hover')]: hoverColor,
|
||||
[getCssVar('color-active')]: activeColor,
|
||||
[getCssVar('color-light')]: lightColor,
|
||||
[getCssVar('color-light-hover')]: lightHoverColor,
|
||||
[getCssVar('color-light-active')]: lightActiveColor,
|
||||
[getCssVar('shadow')]: shadowColor,
|
||||
[varName('color-base')]: darkColor,
|
||||
[varName('color-hover')]: hoverColor,
|
||||
[varName('color-active')]: activeColor,
|
||||
[varName('color-light')]: lightColor,
|
||||
[varName('color-light-hover')]: lightHoverColor,
|
||||
[varName('color-light-active')]: lightActiveColor,
|
||||
[varName('shadow')]: shadowColor,
|
||||
},
|
||||
};
|
||||
}),
|
||||
@@ -276,7 +280,7 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
|
||||
[`&:disabled, &${token.componentCls}-disabled`]: {
|
||||
cursor: 'not-allowed',
|
||||
borderColor: token.colorBorderDisabled,
|
||||
background: `var(${getCssVar('bg-color-disabled')})`,
|
||||
background: varRef('bg-color-disabled'),
|
||||
color: token.colorTextDisabled,
|
||||
boxShadow: 'none',
|
||||
},
|
||||
@@ -288,8 +292,8 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
|
||||
{
|
||||
// Ghost
|
||||
[`&${componentCls}-background-ghost`]: {
|
||||
[getCssVar('bg-color')]: 'transparent',
|
||||
[getCssVar('shadow')]: 'none',
|
||||
[varName('bg-color')]: 'transparent',
|
||||
[varName('shadow')]: 'none',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -713,6 +713,7 @@ exports[`renders components/calendar/demo/basic.tsx extend context correctly 1`]
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -2252,6 +2253,7 @@ exports[`renders components/calendar/demo/card.tsx extend context correctly 1`]
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-radio-group-small ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -3790,6 +3792,7 @@ Array [
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -5322,6 +5325,7 @@ Array [
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-radio-group-small ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -6167,6 +6171,7 @@ exports[`renders components/calendar/demo/customize-header.tsx extend context co
|
||||
>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-radio-group-small css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -8465,6 +8470,7 @@ exports[`renders components/calendar/demo/notice-calendar.tsx extend context cor
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -10414,6 +10420,7 @@ Array [
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -11955,6 +11962,7 @@ exports[`renders components/calendar/demo/style-class.tsx extend context correct
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-radio-group-small ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -13487,6 +13495,7 @@ exports[`renders components/calendar/demo/style-class.tsx extend context correct
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -15025,6 +15034,7 @@ Array [
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -16618,6 +16628,7 @@ Array [
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-radio-group-small ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
|
||||
@@ -109,6 +109,7 @@ exports[`renders components/calendar/demo/basic.tsx correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -1042,6 +1043,7 @@ exports[`renders components/calendar/demo/card.tsx correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-radio-group-small ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -1974,6 +1976,7 @@ Array [
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -2902,6 +2905,7 @@ Array [
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-radio-group-small ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -3745,6 +3749,7 @@ exports[`renders components/calendar/demo/customize-header.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-radio-group-small css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -4777,6 +4782,7 @@ exports[`renders components/calendar/demo/notice-calendar.tsx correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -6120,6 +6126,7 @@ Array [
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -7055,6 +7062,7 @@ exports[`renders components/calendar/demo/style-class.tsx correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-radio-group-small ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -7983,6 +7991,7 @@ exports[`renders components/calendar/demo/style-class.tsx correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -8915,6 +8924,7 @@ Array [
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
@@ -9904,6 +9914,7 @@ Array [
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-radio-group-small ant-picker-calendar-mode-switch css-var-test-id ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-test-id ant-radio-css-var"
|
||||
|
||||
@@ -109,6 +109,7 @@ exports[`Calendar Calendar MonthSelect should display correct label 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-root ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-root ant-radio-css-var"
|
||||
@@ -1039,6 +1040,7 @@ exports[`Calendar Calendar should support locale 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-root ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-root ant-radio-css-var"
|
||||
@@ -1969,6 +1971,7 @@ exports[`Calendar rtl render component should be rendered correctly in RTL direc
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-radio-group-rtl ant-picker-calendar-mode-switch css-var-root ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked ant-radio-button-wrapper-rtl css-var-root ant-radio-css-var"
|
||||
@@ -2899,6 +2902,7 @@ exports[`Calendar support Calendar.generateCalendar 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-radio-group ant-radio-group-outline ant-picker-calendar-mode-switch css-var-root ant-radio-css-var"
|
||||
role="radiogroup"
|
||||
>
|
||||
<label
|
||||
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked css-var-root ant-radio-css-var"
|
||||
|
||||
@@ -596,4 +596,24 @@ describe('Calendar', () => {
|
||||
expect(content).toHaveClass(customClassNames.content);
|
||||
expect(item).toHaveClass(customClassNames.item);
|
||||
});
|
||||
|
||||
it('should support deep merge locale with partial fields', () => {
|
||||
MockDate.set(Dayjs('2018-10-19').valueOf());
|
||||
|
||||
const { container } = render(
|
||||
<Calendar
|
||||
locale={{ lang: { shortWeekDays: ['一', '二', '三', '四', '五', '六', '日'] } } as any}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(container.querySelector('.ant-picker-content thead')).toHaveTextContent(
|
||||
'一二三四五六日',
|
||||
);
|
||||
|
||||
expect(container.querySelector('.ant-radio-group .ant-radio-button-label')).toHaveTextContent(
|
||||
'Month',
|
||||
);
|
||||
|
||||
MockDate.reset();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { BasePickerPanelProps as RcBasePickerPanelProps } from '@rc-compone
|
||||
import { PickerPanel as RCPickerPanel } from '@rc-component/picker';
|
||||
import type { GenerateConfig } from '@rc-component/picker/generate';
|
||||
import type { CellRenderInfo } from '@rc-component/picker/interface';
|
||||
import { useControlledState } from '@rc-component/util';
|
||||
import { merge, useControlledState } from '@rc-component/util';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
import { useMergeSemantic } from '../_util/hooks';
|
||||
@@ -17,6 +17,7 @@ import enUS from './locale/en_US';
|
||||
import useStyle from './style';
|
||||
|
||||
export type CalendarMode = 'year' | 'month';
|
||||
|
||||
export type HeaderRender<DateType> = (config: {
|
||||
value: DateType;
|
||||
type: CalendarMode;
|
||||
@@ -28,15 +29,32 @@ export interface SelectInfo {
|
||||
source: 'year' | 'month' | 'date' | 'customize';
|
||||
}
|
||||
|
||||
type SemanticName = 'root' | 'header' | 'body' | 'content' | 'item';
|
||||
export type CalendarSemanticName = keyof CalendarSemanticClassNames & keyof CalendarSemanticStyles;
|
||||
|
||||
export type CalendarSemanticClassNames = {
|
||||
root?: string;
|
||||
header?: string;
|
||||
body?: string;
|
||||
content?: string;
|
||||
item?: string;
|
||||
};
|
||||
|
||||
export type CalendarSemanticStyles = {
|
||||
root?: React.CSSProperties;
|
||||
header?: React.CSSProperties;
|
||||
body?: React.CSSProperties;
|
||||
content?: React.CSSProperties;
|
||||
item?: React.CSSProperties;
|
||||
};
|
||||
|
||||
export type CalendarClassNamesType<DateType> = SemanticClassNamesType<
|
||||
CalendarProps<DateType>,
|
||||
SemanticName
|
||||
CalendarSemanticClassNames
|
||||
>;
|
||||
|
||||
export type CalendarStylesType<DateType> = SemanticStylesType<
|
||||
CalendarProps<DateType>,
|
||||
SemanticName
|
||||
CalendarSemanticStyles
|
||||
>;
|
||||
|
||||
export interface CalendarProps<DateType> {
|
||||
@@ -310,7 +328,7 @@ const generateCalendar = <DateType extends AnyObject>(generateConfig: GenerateCo
|
||||
|
||||
const [contextLocale] = useLocale('Calendar', enUS);
|
||||
|
||||
const locale = { ...contextLocale, ...props.locale! };
|
||||
const locale = merge(contextLocale, props.locale || {});
|
||||
|
||||
const mergedCellRender: RcBasePickerPanelProps['cellRender'] = (current, info) => {
|
||||
if (info.type === 'date') {
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
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';
|
||||
|
||||
export type {
|
||||
CalendarMode,
|
||||
CalendarProps,
|
||||
CalendarSemanticClassNames,
|
||||
CalendarSemanticName,
|
||||
CalendarSemanticStyles,
|
||||
} from './generateCalendar';
|
||||
|
||||
const Calendar = generateCalendar<Dayjs>(dayjsGenerateConfig);
|
||||
|
||||
export type CalendarType = typeof Calendar & {
|
||||
@@ -12,5 +19,4 @@ export type CalendarType = typeof Calendar & {
|
||||
|
||||
(Calendar as CalendarType).generateCalendar = generateCalendar;
|
||||
|
||||
export type { CalendarMode, CalendarProps };
|
||||
export default Calendar as CalendarType;
|
||||
|
||||
@@ -26,10 +26,31 @@ export interface CardTabListType extends Omit<Tab, 'label'> {
|
||||
label?: React.ReactNode;
|
||||
}
|
||||
|
||||
type SemanticName = 'root' | 'header' | 'body' | 'extra' | 'title' | 'actions' | 'cover';
|
||||
export type CardSemanticName = keyof CardSemanticClassNames & keyof CardSemanticStyles;
|
||||
|
||||
export type CardClassNamesType = SemanticClassNamesType<CardProps, SemanticName>;
|
||||
export type CardStylesType = SemanticStylesType<CardProps, SemanticName>;
|
||||
export type CardSemanticClassNames = {
|
||||
root?: string;
|
||||
header?: string;
|
||||
body?: string;
|
||||
extra?: string;
|
||||
title?: string;
|
||||
actions?: string;
|
||||
cover?: string;
|
||||
};
|
||||
|
||||
export type CardSemanticStyles = {
|
||||
root?: React.CSSProperties;
|
||||
header?: React.CSSProperties;
|
||||
body?: React.CSSProperties;
|
||||
extra?: React.CSSProperties;
|
||||
title?: React.CSSProperties;
|
||||
actions?: React.CSSProperties;
|
||||
cover?: React.CSSProperties;
|
||||
};
|
||||
|
||||
export type CardClassNamesType = SemanticClassNamesType<CardProps, CardSemanticClassNames>;
|
||||
|
||||
export type CardStylesType = SemanticStylesType<CardProps, CardSemanticStyles>;
|
||||
|
||||
export interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
||||
prefixCls?: string;
|
||||
|
||||
@@ -11,18 +11,13 @@ export interface CardGridProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
const CardGrid: React.FC<CardGridProps> = ({
|
||||
prefixCls,
|
||||
className,
|
||||
hoverable = true,
|
||||
...props
|
||||
}) => {
|
||||
const CardGrid: React.FC<CardGridProps> = ({ prefixCls, className, hoverable = true, ...rest }) => {
|
||||
const { getPrefixCls } = React.useContext<ConfigConsumerProps>(ConfigContext);
|
||||
const prefix = getPrefixCls('card', prefixCls);
|
||||
const classString = clsx(`${prefix}-grid`, className, {
|
||||
[`${prefix}-grid-hoverable`]: hoverable,
|
||||
});
|
||||
return <div {...props} className={classString} />;
|
||||
return <div {...rest} className={classString} />;
|
||||
};
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
|
||||
@@ -5,9 +5,30 @@ import { useMergeSemantic } from '../_util/hooks';
|
||||
import type { SemanticClassNamesType, SemanticStylesType } from '../_util/hooks';
|
||||
import { useComponentConfig } from '../config-provider/context';
|
||||
|
||||
export type SemanticName = 'root' | 'section' | 'avatar' | 'title' | 'description';
|
||||
export type CardMetaClassNamesType = SemanticClassNamesType<CardMetaProps, SemanticName>;
|
||||
export type CardMetaStylesType = SemanticStylesType<CardMetaProps, SemanticName>;
|
||||
export type CardMetaSemanticName = keyof CardMetaSemanticClassNames & keyof CardMetaSemanticStyles;
|
||||
|
||||
export type CardMetaSemanticClassNames = {
|
||||
root?: string;
|
||||
section?: string;
|
||||
avatar?: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
};
|
||||
|
||||
export type CardMetaSemanticStyles = {
|
||||
root?: React.CSSProperties;
|
||||
section?: React.CSSProperties;
|
||||
avatar?: React.CSSProperties;
|
||||
title?: React.CSSProperties;
|
||||
description?: React.CSSProperties;
|
||||
};
|
||||
|
||||
export type CardMetaClassNamesType = SemanticClassNamesType<
|
||||
CardMetaProps,
|
||||
CardMetaSemanticClassNames
|
||||
>;
|
||||
|
||||
export type CardMetaStylesType = SemanticStylesType<CardMetaProps, CardMetaSemanticStyles>;
|
||||
|
||||
export interface CardMetaProps {
|
||||
prefixCls?: string;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user