mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 19:09:21 +08:00
Compare commits
56 Commits
6.2.0
...
select-sna
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
628e8c7ebd | ||
|
|
9df0d7656f | ||
|
|
dc8acf547d | ||
|
|
c880c2e806 | ||
|
|
58c5fc4625 | ||
|
|
250597ea0c | ||
|
|
3034888500 | ||
|
|
705c3642d3 | ||
|
|
fbe7864e10 | ||
|
|
2f6548209d | ||
|
|
6f90801861 | ||
|
|
b5b735a490 | ||
|
|
8bebba7af8 | ||
|
|
3ac1fc78e7 | ||
|
|
f091c1e01b | ||
|
|
acc11dfccb | ||
|
|
964eb9d9d5 | ||
|
|
3ee9ff0811 | ||
|
|
092e37861a | ||
|
|
01fdc86b39 | ||
|
|
a3dcbdfae4 | ||
|
|
d5b3409660 | ||
|
|
8b4235a53b | ||
|
|
c46ce7fb86 | ||
|
|
8574b941a7 | ||
|
|
edf65d3eeb | ||
|
|
c5e5ac7c3f | ||
|
|
937f5d0738 | ||
|
|
3848b6bb82 | ||
|
|
bb5642f90b | ||
|
|
60442f9d44 | ||
|
|
c8e79dda70 | ||
|
|
2389eb8731 | ||
|
|
b9d23a1d96 | ||
|
|
3eecc366bb | ||
|
|
fecb9a04f6 | ||
|
|
77f0f1a9fe | ||
|
|
aeff7cab63 | ||
|
|
5df2c59516 | ||
|
|
247c41c79b | ||
|
|
4dc35000b1 | ||
|
|
a9e9c04cbc | ||
|
|
4f61124be4 | ||
|
|
fccc092154 | ||
|
|
a680d84865 | ||
|
|
f7446f3f1f | ||
|
|
28d674445b | ||
|
|
07f0db2ddc | ||
|
|
2e51288638 | ||
|
|
258573ab93 | ||
|
|
3c9bb681e7 | ||
|
|
0b55335da9 | ||
|
|
40c0bd6bb1 | ||
|
|
8fd30ab4a2 | ||
|
|
e05aa23faa | ||
|
|
050d1dfa42 |
@@ -7,7 +7,6 @@ const isNumber = (value: any): value is number => {
|
||||
};
|
||||
|
||||
const fetcher = async (url: string): Promise<number> => {
|
||||
// eslint-disable-next-line compat/compat
|
||||
const res = await fetch(url, { headers: { Accept: 'application/vnd.github+json' } });
|
||||
const data = await res.json();
|
||||
const totalCount = isNumber(data?.total_count) ? data.total_count : 0;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import type { MenuProps } from 'antd';
|
||||
import { Flex, Tag, version } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
import { useFullSidebarData, useSidebarData } from 'dumi';
|
||||
|
||||
@@ -33,7 +33,7 @@ const getTagColor = (val?: string) => {
|
||||
}
|
||||
};
|
||||
|
||||
const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
link: css`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -62,7 +62,6 @@ interface MenuItemLabelProps {
|
||||
}
|
||||
|
||||
const MenuItemLabelWithTag: React.FC<MenuItemLabelProps> = (props) => {
|
||||
const { styles } = useStyle();
|
||||
const { before, after, link, title, subtitle, search, tag, className } = props;
|
||||
|
||||
const [locale] = useLocale(locales);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as React from 'react';
|
||||
import { Typography } from 'antd';
|
||||
import { createStyles, useTheme } from 'antd-style';
|
||||
import { createStaticStyles, useTheme } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
import SiteContext from '../../../theme/slots/SiteContext';
|
||||
import GroupMaskLayer from './GroupMaskLayer';
|
||||
|
||||
const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
box: css`
|
||||
position: relative;
|
||||
transition: all ${cssVar.motionDurationSlow};
|
||||
@@ -46,7 +46,6 @@ export interface GroupProps {
|
||||
const Group: React.FC<React.PropsWithChildren<GroupProps>> = (props) => {
|
||||
const { id, title, titleColor, description, children, decoration, background, collapse } = props;
|
||||
const token = useTheme();
|
||||
const { styles } = useStyle();
|
||||
const { isMobile } = React.use(SiteContext);
|
||||
return (
|
||||
<div style={{ backgroundColor: background }} className={styles.box}>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
const useStyle = createStyles(({ css }) => ({
|
||||
const classNames = createStaticStyles(({ css }) => ({
|
||||
siteMask: css`
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
@@ -19,11 +19,10 @@ export interface GroupMaskLayerProps {
|
||||
|
||||
const GroupMaskLayer: React.FC<React.PropsWithChildren<GroupMaskLayerProps>> = (props) => {
|
||||
const { children, className, style, onMouseMove, onMouseEnter, onMouseLeave } = props;
|
||||
const { styles } = useStyle();
|
||||
return (
|
||||
<div
|
||||
style={style}
|
||||
className={clsx(className, styles.siteMask)}
|
||||
className={clsx(className, classNames.siteMask)}
|
||||
onMouseMove={onMouseMove}
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
Switch,
|
||||
Tooltip,
|
||||
} from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
import useLocale from '../../../../hooks/useLocale';
|
||||
import Tilt from './Tilt';
|
||||
@@ -71,7 +71,7 @@ const locales = {
|
||||
},
|
||||
};
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => {
|
||||
const styles = createStaticStyles(({ cssVar, css }) => {
|
||||
const gap = cssVar.padding;
|
||||
return {
|
||||
holder: css`
|
||||
@@ -106,7 +106,6 @@ const useStyle = createStyles(({ cssVar, css }) => {
|
||||
|
||||
const ComponentsBlock: React.FC = () => {
|
||||
const [locale] = useLocale(locales);
|
||||
const { styles } = useStyle();
|
||||
|
||||
return (
|
||||
<Tilt options={{ max: 4, glare: false, scale: 0.98 }} className={styles.holder}>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { CSSMotionList } from '@rc-component/motion';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
import { COLOR_IMAGES, getClosetColor } from './colorUtil';
|
||||
@@ -10,7 +10,7 @@ export interface BackgroundImageProps {
|
||||
isLight?: boolean;
|
||||
}
|
||||
|
||||
const useStyle = createStyles(({ cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
image: css`
|
||||
transition: all ${cssVar.motionDurationSlow};
|
||||
position: absolute;
|
||||
@@ -29,7 +29,6 @@ const onHide = () => ({ opacity: 0 });
|
||||
|
||||
const BackgroundImage: React.FC<BackgroundImageProps> = ({ colorPrimary, isLight }) => {
|
||||
const activeColor = useMemo(() => getClosetColor(colorPrimary), [colorPrimary]);
|
||||
const { styles } = useStyle();
|
||||
|
||||
const [keyList, setKeyList] = useState<string[]>([]);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { ColorPicker, Flex, Input } from 'antd';
|
||||
import type { ColorPickerProps, GetProp } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { generateColor } from 'antd/es/color-picker/util';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { PRESET_COLORS } from './colorUtil';
|
||||
|
||||
type Color = Extract<GetProp<ColorPickerProps, 'value'>, string | { cleared: any }>;
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
const styles = createStaticStyles(({ cssVar, css }) => ({
|
||||
color: css`
|
||||
width: calc(${cssVar.controlHeightLG} / 2);
|
||||
height: calc(${cssVar.controlHeightLG} / 2);
|
||||
@@ -69,8 +69,6 @@ const DebouncedColorPicker: React.FC<React.PropsWithChildren<ThemeColorPickerPro
|
||||
};
|
||||
|
||||
const ThemeColorPicker: React.FC<ThemeColorPickerProps> = ({ value, onChange, id }) => {
|
||||
const { styles } = useStyle();
|
||||
|
||||
const matchColors = React.useMemo(() => {
|
||||
const valueStr = generateColor(value || '').toRgbString();
|
||||
const colors = PRESET_COLORS.map((color) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import { Flex } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
import useLocale from '../../../../hooks/useLocale';
|
||||
@@ -32,7 +32,7 @@ const locales = {
|
||||
},
|
||||
};
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
const styles = createStaticStyles(({ cssVar, css }) => ({
|
||||
themeCard: css`
|
||||
border-radius: ${cssVar.borderRadius};
|
||||
cursor: pointer;
|
||||
@@ -80,7 +80,6 @@ export interface ThemePickerProps {
|
||||
|
||||
const ThemePicker: React.FC<ThemePickerProps> = (props) => {
|
||||
const { value, id, onChange } = props;
|
||||
const { styles } = useStyle();
|
||||
const [locale] = useLocale(locales);
|
||||
return (
|
||||
<Flex gap="large" wrap>
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
theme,
|
||||
Typography,
|
||||
} from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { generateColor } from 'antd/es/color-picker/util';
|
||||
import { clsx } from 'clsx';
|
||||
import { useLocation } from 'dumi';
|
||||
@@ -92,7 +92,7 @@ const locales = {
|
||||
};
|
||||
|
||||
// ============================= Style =============================
|
||||
const useStyle = createStyles(({ cssVar, css, cx }) => {
|
||||
const styles = createStaticStyles(({ cssVar, css, cx }) => {
|
||||
const { carousel } = getCarouselStyle();
|
||||
const demo = css`
|
||||
overflow: hidden;
|
||||
@@ -345,7 +345,6 @@ function rgbToColorMatrix(color: string) {
|
||||
}
|
||||
|
||||
const Theme: React.FC = () => {
|
||||
const { styles } = useStyle();
|
||||
const [locale, lang] = useLocale(locales);
|
||||
const isZhCN = lang === 'cn';
|
||||
const { search } = useLocation();
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable compat/compat */
|
||||
import { css } from 'antd-style';
|
||||
import useSWR from 'swr';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { Suspense } from 'react';
|
||||
import { ConfigProvider, theme } from 'antd';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
import useLocale from '../../hooks/useLocale';
|
||||
import { DarkContext } from './../../hooks/useDark';
|
||||
@@ -12,7 +12,7 @@ const ComponentsList = React.lazy(() => import('./components/ComponentsList'));
|
||||
const DesignFramework = React.lazy(() => import('./components/DesignFramework'));
|
||||
const Theme = React.lazy(() => import('./components/Theme'));
|
||||
|
||||
const useStyle = createStyles(() => ({
|
||||
const classNames = createStaticStyles(({ css }) => ({
|
||||
image: css`
|
||||
position: absolute;
|
||||
inset-inline-start: 0;
|
||||
@@ -38,7 +38,6 @@ const locales = {
|
||||
|
||||
const Homepage: React.FC = () => {
|
||||
const [locale] = useLocale(locales);
|
||||
const { styles } = useStyle();
|
||||
const { token } = theme.useToken();
|
||||
|
||||
const isDark = React.use(DarkContext);
|
||||
@@ -78,7 +77,7 @@ const Homepage: React.FC = () => {
|
||||
decoration={
|
||||
<img
|
||||
draggable={false}
|
||||
className={styles.image}
|
||||
className={classNames.image}
|
||||
src="https://gw.alipayobjects.com/zos/bmw-prod/ba37a413-28e6-4be4-b1c5-01be1a0ebb1c.svg"
|
||||
alt="bg"
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { Suspense } from 'react';
|
||||
import { App, Button, ConfigProvider, Skeleton, version } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { enUS, zhCN } from 'antd-token-previewer';
|
||||
import type { ThemeConfig } from 'antd/es/config-provider/context';
|
||||
import { Helmet } from 'dumi';
|
||||
@@ -9,7 +9,7 @@ import useLocale from '../../hooks/useLocale';
|
||||
|
||||
const ThemeEditor = React.lazy(() => import('antd-token-previewer/lib/ThemeEditor'));
|
||||
|
||||
const useStyle = createStyles(({ css }) => ({
|
||||
const classNames = createStaticStyles(({ css }) => ({
|
||||
editor: css`
|
||||
svg,
|
||||
img {
|
||||
@@ -49,7 +49,6 @@ const ANT_DESIGN_V5_THEME_EDITOR_THEME = `ant-design-v${antdMajor}-theme-editor-
|
||||
const CustomTheme: React.FC = () => {
|
||||
const { message } = App.useApp();
|
||||
const [locale, lang] = useLocale(locales);
|
||||
const { styles } = useStyle();
|
||||
|
||||
const [theme, setTheme] = React.useState<ThemeConfig>(() => {
|
||||
try {
|
||||
@@ -78,7 +77,7 @@ const CustomTheme: React.FC = () => {
|
||||
hideAdvancedSwitcher
|
||||
theme={{ name: 'Custom Theme', key: 'test', config: theme }}
|
||||
style={{ height: 'calc(100vh - 64px)' }}
|
||||
className={styles.editor}
|
||||
className={classNames.editor}
|
||||
onThemeChange={(newTheme) => {
|
||||
setTheme(newTheme.config);
|
||||
}}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { SoundOutlined } from '@ant-design/icons';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
const useStyle = createStyles(({ css, cssVar }) => {
|
||||
const styles = createStaticStyles(({ css, cssVar }) => {
|
||||
return {
|
||||
playBtn: css`
|
||||
display: inline-flex;
|
||||
@@ -30,7 +30,6 @@ interface AudioProps {
|
||||
}
|
||||
|
||||
const AudioControl: React.FC<React.PropsWithChildren<AudioProps>> = ({ id, children }) => {
|
||||
const { styles } = useStyle();
|
||||
const onClick: React.MouseEventHandler<HTMLAnchorElement> = () => {
|
||||
const audio = document.querySelector<HTMLAudioElement>(`#${id}`);
|
||||
audio?.play();
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { memo, useMemo, useRef, useState } from 'react';
|
||||
import type { CSSProperties } from 'react';
|
||||
import { SearchOutlined } from '@ant-design/icons';
|
||||
import { Affix, Card, Col, Divider, Flex, Input, Row, Tag, Typography } from 'antd';
|
||||
import { createStyles, useTheme } from 'antd-style';
|
||||
import { createStaticStyles, useTheme } from 'antd-style';
|
||||
import { useIntl, useLocation, useSidebarData } from 'dumi';
|
||||
import debounce from 'lodash/debounce';
|
||||
import scrollIntoView from 'scroll-into-view-if-needed';
|
||||
@@ -12,7 +12,7 @@ import SiteContext from '../../slots/SiteContext';
|
||||
import type { Component } from './ProComponentsList';
|
||||
import proComponentsList from './ProComponentsList';
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
const styles = createStaticStyles(({ cssVar, css }) => ({
|
||||
componentsOverviewGroupTitle: css`
|
||||
margin-bottom: ${cssVar.marginLG} !important;
|
||||
`,
|
||||
@@ -78,7 +78,6 @@ const reportSearch = debounce<(value: string) => void>((value) => {
|
||||
const { Title } = Typography;
|
||||
|
||||
const Overview: React.FC = () => {
|
||||
const { styles } = useStyle();
|
||||
const { isDark } = React.use(SiteContext);
|
||||
|
||||
const data = useSidebarData();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { LinkOutlined, QuestionCircleOutlined, RightOutlined } from '@ant-design/icons';
|
||||
import { ConfigProvider, Flex, Popover, Table, Typography } from 'antd';
|
||||
import { createStyles, css, useTheme } from 'antd-style';
|
||||
import { createStaticStyles, css, useTheme } from 'antd-style';
|
||||
import { getDesignToken } from 'antd-token-previewer';
|
||||
import tokenMeta from 'antd/es/version/token-meta.json';
|
||||
import tokenData from 'antd/es/version/token.json';
|
||||
@@ -53,7 +53,7 @@ const locales = {
|
||||
},
|
||||
};
|
||||
|
||||
const useStyle = createStyles(({ cssVar }) => ({
|
||||
const styles = createStaticStyles(({ cssVar }) => ({
|
||||
tableTitle: css`
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
@@ -104,8 +104,6 @@ const SubTokenTable: React.FC<SubTokenTableProps> = (props) => {
|
||||
|
||||
const [open, setOpen] = useState<boolean>(defaultOpen ?? process.env.NODE_ENV !== 'production');
|
||||
|
||||
const { styles } = useStyle();
|
||||
|
||||
if (!tokens.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import * as React from 'react';
|
||||
import { App } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { useIntl } from 'dumi';
|
||||
|
||||
import CopyableIcon from './CopyableIcon';
|
||||
import type { CategoriesKeys } from './fields';
|
||||
import type { ThemeType } from './IconSearch';
|
||||
|
||||
const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
anticonsList: css`
|
||||
margin: ${cssVar.margin} 0;
|
||||
overflow: hidden;
|
||||
@@ -36,7 +36,6 @@ interface CategoryProps {
|
||||
const Category: React.FC<CategoryProps> = (props) => {
|
||||
const { message } = App.useApp();
|
||||
const { icons, title, newIcons, theme } = props;
|
||||
const { styles } = useStyle();
|
||||
const intl = useIntl();
|
||||
const [justCopied, setJustCopied] = React.useState<string | null>(null);
|
||||
const copyId = React.useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { CSSProperties } from 'react';
|
||||
import React, { useCallback, useMemo, useState } from 'react';
|
||||
import Icon, * as AntdIcons from '@ant-design/icons';
|
||||
import { Affix, Empty, Input, Segmented } from 'antd';
|
||||
import { createStyles, useTheme } from 'antd-style';
|
||||
import { createStaticStyles, useTheme } from 'antd-style';
|
||||
import type { SegmentedOptions } from 'antd/es/segmented';
|
||||
import { useIntl } from 'dumi';
|
||||
import debounce from 'lodash/debounce';
|
||||
@@ -22,7 +22,7 @@ export enum ThemeType {
|
||||
|
||||
const allIcons: { [key: string]: any } = AntdIcons;
|
||||
|
||||
const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
iconSearchAffix: css`
|
||||
display: flex;
|
||||
transition: all ${cssVar.motionDurationSlow};
|
||||
@@ -39,7 +39,6 @@ const NEW_ICON_NAMES: ReadonlyArray<string> = [];
|
||||
|
||||
const IconSearch: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const { styles } = useStyle();
|
||||
const [displayState, setDisplayState] = useState<IconSearchState>({
|
||||
searchKey: '',
|
||||
theme: ThemeType.Outlined,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React, { Suspense } from 'react';
|
||||
import { Skeleton } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
const IconSearch = React.lazy(() => import('./IconSearch'));
|
||||
|
||||
const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
searchWrapper: css`
|
||||
display: flex;
|
||||
gap: ${cssVar.padding};
|
||||
@@ -34,8 +34,6 @@ const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
}));
|
||||
|
||||
const IconSearchFallback: React.FC = () => {
|
||||
const { styles } = useStyle();
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={styles.searchWrapper}>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
interface IconProps {
|
||||
@@ -7,7 +7,7 @@ interface IconProps {
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
const useStyle = createStyles(() => ({
|
||||
const classNames = createStaticStyles(({ css }) => ({
|
||||
iconWrap: css`
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -19,9 +19,8 @@ const useStyle = createStyles(() => ({
|
||||
|
||||
const BunIcon: React.FC<IconProps> = (props) => {
|
||||
const { className, style } = props;
|
||||
const { styles } = useStyle();
|
||||
return (
|
||||
<span className={clsx(styles.iconWrap, className)} style={style}>
|
||||
<span className={clsx(classNames.iconWrap, className)} style={style}>
|
||||
<svg id="Bun" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 70" width="1em" height="1em">
|
||||
<title>Bun Logo</title>
|
||||
<path
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
interface IconProps {
|
||||
@@ -7,7 +7,7 @@ interface IconProps {
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
const useStyle = createStyles(() => ({
|
||||
const classNames = createStaticStyles(({ css }) => ({
|
||||
iconWrap: css`
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -19,9 +19,8 @@ const useStyle = createStyles(() => ({
|
||||
|
||||
const NpmIcon: React.FC<IconProps> = (props) => {
|
||||
const { className, style } = props;
|
||||
const { styles } = useStyle();
|
||||
return (
|
||||
<span className={clsx(styles.iconWrap, className)} style={style}>
|
||||
<span className={clsx(classNames.iconWrap, className)} style={style}>
|
||||
<svg
|
||||
fill="#E53E3E"
|
||||
focusable="false"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
interface IconProps {
|
||||
@@ -7,7 +7,7 @@ interface IconProps {
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
const useStyle = createStyles(() => ({
|
||||
const classNames = createStaticStyles(({ css }) => ({
|
||||
iconWrap: css`
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -19,9 +19,8 @@ const useStyle = createStyles(() => ({
|
||||
|
||||
const PnpmIcon: React.FC<IconProps> = (props) => {
|
||||
const { className, style } = props;
|
||||
const { styles } = useStyle();
|
||||
return (
|
||||
<span className={clsx(styles.iconWrap, className)} style={style}>
|
||||
<span className={clsx(classNames.iconWrap, className)} style={style}>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
fill="#F69220"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
interface IconProps {
|
||||
@@ -7,7 +7,7 @@ interface IconProps {
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
const useStyle = createStyles(() => ({
|
||||
const classNames = createStaticStyles(({ css }) => ({
|
||||
iconWrap: css`
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -19,9 +19,8 @@ const useStyle = createStyles(() => ({
|
||||
|
||||
const YarnIcon: React.FC<IconProps> = (props) => {
|
||||
const { className, style } = props;
|
||||
const { styles } = useStyle();
|
||||
return (
|
||||
<span className={clsx(styles.iconWrap, className)} style={style}>
|
||||
<span className={clsx(classNames.iconWrap, className)} style={style}>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
fill="#2C8EBB"
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { UpOutlined } from '@ant-design/icons';
|
||||
import type { MenuProps } from 'antd';
|
||||
import { Badge, Tag, Tooltip } from 'antd';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
import { FormattedMessage, useLiveDemo, useSiteData } from 'dumi';
|
||||
import { major, minVersion } from 'semver';
|
||||
@@ -17,7 +17,7 @@ import DemoContext from '../../slots/DemoContext';
|
||||
import { isOfficialHost } from '../../utils';
|
||||
import Actions from './Actions';
|
||||
|
||||
const useStyle = createStyles(({ cssVar }) => {
|
||||
const styles = createStaticStyles(({ cssVar, css }) => {
|
||||
return {
|
||||
codeHideBtn: css`
|
||||
position: sticky;
|
||||
@@ -68,7 +68,6 @@ const CodePreviewer: React.FC<AntdPreviewerProps> = (props) => {
|
||||
const { pkg } = useSiteData();
|
||||
|
||||
const location = useLocation();
|
||||
const { styles } = useStyle();
|
||||
|
||||
const entryName = 'index.tsx';
|
||||
const entryCode = asset.dependencies[entryName].value;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Skeleton } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
skeletonWrapper: css`
|
||||
width: 100% !important;
|
||||
height: 250px;
|
||||
@@ -12,7 +12,6 @@ const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
}));
|
||||
|
||||
const DemoFallback = () => {
|
||||
const { styles } = useStyle();
|
||||
return (
|
||||
<Skeleton.Node
|
||||
active
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { FC } from 'react';
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { CheckOutlined, SketchOutlined } from '@ant-design/icons';
|
||||
import { App } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import copy from '../../../../components/_util/copy';
|
||||
import { nodeToGroup } from 'html2sketch';
|
||||
|
||||
@@ -22,7 +22,7 @@ const locales = {
|
||||
},
|
||||
};
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
const styles = createStaticStyles(({ cssVar, css }) => ({
|
||||
wrapper: css`
|
||||
position: relative;
|
||||
border: 1px solid ${cssVar.colorBorderSecondary};
|
||||
@@ -72,7 +72,6 @@ const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
}));
|
||||
|
||||
const DesignPreviewer: FC<AntdPreviewerProps> = ({ children, title, description, tip, asset }) => {
|
||||
const { styles } = useStyle();
|
||||
const demoRef = useRef<HTMLDivElement>(null);
|
||||
const [copied, setCopied] = React.useState<boolean>(false);
|
||||
const { message } = App.useApp();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { BugOutlined } from '@ant-design/icons';
|
||||
import { Button, Flex, Popover, theme } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles, cx } from 'antd-style';
|
||||
import dayjs from 'dayjs';
|
||||
import type { Dayjs } from 'dayjs';
|
||||
|
||||
@@ -33,7 +33,7 @@ const locales = {
|
||||
},
|
||||
};
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
const styles = createStaticStyles(({ cssVar, css }) => ({
|
||||
container: css`
|
||||
margin-block: ${cssVar.margin};
|
||||
padding: ${cssVar.padding};
|
||||
@@ -49,8 +49,6 @@ const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
const RefinedChangelog: React.FC<React.PropsWithChildren<RefinedChangelogProps>> = (props) => {
|
||||
const { version, date, children } = props;
|
||||
|
||||
const { styles, cx } = useStyle();
|
||||
|
||||
const memoizedValue = React.useMemo<ContextProps>(() => {
|
||||
const realVersion = version || '0.0.0';
|
||||
const bugVersionInfo = matchDeprecated(realVersion);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { Suspense } from 'react';
|
||||
import type { SandpackSetup } from '@codesandbox/sandpack-react';
|
||||
import { Skeleton } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { useSearchParams } from 'dumi';
|
||||
|
||||
import { version } from '../../../../package.json';
|
||||
@@ -17,7 +17,7 @@ const root = createRoot(document.getElementById("root"));
|
||||
root.render(<App />);
|
||||
`;
|
||||
|
||||
const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
fallback: css`
|
||||
width: 100%;
|
||||
> * {
|
||||
@@ -32,7 +32,6 @@ const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
}));
|
||||
|
||||
const SandpackFallback: React.FC = () => {
|
||||
const { styles } = useStyle();
|
||||
return (
|
||||
<div className={styles.fallback}>
|
||||
<Skeleton.Node active style={{ height: 500, width: '100%' }}>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
import React from 'react';
|
||||
import { FastColor } from '@ant-design/fast-color';
|
||||
import { Flex, theme } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import tokenMeta from 'antd/es/version/token-meta.json';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
import useLocale from '../../../hooks/useLocale';
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => {
|
||||
const styles = createStaticStyles(({ cssVar, css }) => {
|
||||
const height = cssVar.controlHeightLG;
|
||||
const dotSize = height / 5;
|
||||
|
||||
@@ -63,7 +63,6 @@ interface ColorCircleProps {
|
||||
}
|
||||
|
||||
const ColorCircle: React.FC<ColorCircleProps> = ({ color }) => {
|
||||
const { styles } = useStyle();
|
||||
return (
|
||||
<Flex align="center" gap={4}>
|
||||
<div className={styles.dot} style={{ background: color }} />
|
||||
@@ -79,7 +78,6 @@ export interface TokenCompareProps {
|
||||
const TokenCompare: React.FC<TokenCompareProps> = (props) => {
|
||||
const { tokenNames = '' } = props;
|
||||
const [, lang] = useLocale();
|
||||
const { styles } = useStyle();
|
||||
|
||||
const tokenList = React.useMemo(() => {
|
||||
const list = tokenNames.split('|');
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { PauseCircleFilled, PlayCircleFilled } from '@ant-design/icons';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
const useStyles = createStyles(({ cx, cssVar }) => {
|
||||
const styles = createStaticStyles(({ css, cx, cssVar }) => {
|
||||
const play = css`
|
||||
position: absolute;
|
||||
inset-inline-end: ${cssVar.paddingLG};
|
||||
@@ -45,7 +45,6 @@ const VideoPlayer: React.FC<React.HtmlHTMLAttributes<HTMLVideoElement>> = ({
|
||||
className,
|
||||
...restProps
|
||||
}) => {
|
||||
const { styles } = useStyles();
|
||||
const videoRef = React.useRef<HTMLVideoElement>(null);
|
||||
const [playing, setPlaying] = React.useState(false);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { useRouteMeta } from 'dumi';
|
||||
|
||||
import useLocale from '../../../hooks/useLocale';
|
||||
@@ -17,7 +17,7 @@ export interface BehaviorMapProps {
|
||||
data: BehaviorMapItem;
|
||||
}
|
||||
|
||||
const useStyle = createStyles(({ cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
container: css`
|
||||
width: 100%;
|
||||
min-height: 600px;
|
||||
@@ -100,7 +100,6 @@ const locales = {
|
||||
|
||||
const BehaviorMap: React.FC<BehaviorMapProps> = ({ data }) => {
|
||||
const chartRef = useRef<HTMLDivElement>(null);
|
||||
const { styles } = useStyle();
|
||||
const [locale] = useLocale(locales);
|
||||
const meta = useRouteMeta();
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import type { FC } from 'react';
|
||||
import React, { Suspense } from 'react';
|
||||
import { Skeleton } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
import useLocale from '../../../hooks/useLocale';
|
||||
import type { BehaviorMapProps } from './BehaviorMap';
|
||||
|
||||
const InternalBehaviorMap = React.lazy(() => import('./BehaviorMap'));
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
const styles = createStaticStyles(({ cssVar, css }) => ({
|
||||
fallback: css`
|
||||
width: 100%;
|
||||
> * {
|
||||
@@ -32,7 +32,6 @@ const locales = {
|
||||
};
|
||||
|
||||
const BehaviorMapFallback: React.FC = () => {
|
||||
const { styles } = useStyle();
|
||||
const [locale] = useLocale(locales);
|
||||
return (
|
||||
<div className={styles.fallback}>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
const styles = createStaticStyles(({ cssVar, css }) => ({
|
||||
browserMockup: css`
|
||||
position: relative;
|
||||
border-top: 2em solid rgba(230, 230, 230, 0.7);
|
||||
@@ -49,7 +49,6 @@ const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
}));
|
||||
|
||||
const BrowserFrame: React.FC<React.PropsWithChildren> = ({ children }) => {
|
||||
const { styles } = useStyle();
|
||||
return <div className={styles.browserMockup}>{children}</div>;
|
||||
};
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ const useStyle = createStyles(({ cssVar, token, css }) => ({
|
||||
font-weight: 600;
|
||||
font-size: 20px;
|
||||
margin: 0 !important;
|
||||
padding: 0;
|
||||
`,
|
||||
versionTag: css`
|
||||
user-select: none;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { ComponentProps, FC } from 'react';
|
||||
import React from 'react';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import SourceCodeEditor from 'dumi/theme-default/slots/SourceCodeEditor';
|
||||
|
||||
import LiveError from '../slots/LiveError';
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => {
|
||||
const styles = createStaticStyles(({ cssVar, css }) => {
|
||||
return {
|
||||
editor: css`
|
||||
// override dumi editor styles
|
||||
@@ -54,7 +54,6 @@ const LiveCode: FC<
|
||||
error: Error | null;
|
||||
} & Pick<ComponentProps<typeof SourceCodeEditor>, 'lang' | 'initialValue' | 'onChange'>
|
||||
> = (props) => {
|
||||
const { styles } = useStyle();
|
||||
return (
|
||||
<div className={styles.editor}>
|
||||
<SourceCodeEditor
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import React from 'react';
|
||||
import { StyleProvider } from '@ant-design/cssinjs';
|
||||
import { ConfigProvider, Flex, Skeleton, Spin } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { useLocation } from 'dumi';
|
||||
|
||||
import { Common } from './styles';
|
||||
|
||||
const useStyle = createStyles(({ css, cssVar }) => {
|
||||
const styles = createStaticStyles(({ css, cssVar }) => {
|
||||
return {
|
||||
skeletonWrapper: css`
|
||||
width: 100%;
|
||||
@@ -27,8 +27,6 @@ const useStyle = createStyles(({ css, cssVar }) => {
|
||||
const Loading: React.FC = () => {
|
||||
const { pathname } = useLocation();
|
||||
|
||||
const { styles } = useStyle();
|
||||
|
||||
let loadingNode: React.ReactNode = null;
|
||||
|
||||
if (
|
||||
|
||||
@@ -67,11 +67,14 @@ const Block: React.FC<BlockProps> = ({
|
||||
...props
|
||||
}) => {
|
||||
const divRef = React.useRef<HTMLDivElement>(null);
|
||||
const [value, setValue] = React.useState(defaultValue);
|
||||
// 多选模式下,优先使用 multipleProps 中的 defaultValue
|
||||
const multipleDefaultValue = (multipleProps as any)?.defaultValue;
|
||||
const initialValue = mode === 'single' ? defaultValue : multipleDefaultValue;
|
||||
const [value, setValue] = React.useState(initialValue);
|
||||
|
||||
React.useEffect(() => {
|
||||
setValue(defaultValue);
|
||||
}, [mode]);
|
||||
setValue(mode === 'single' ? defaultValue : multipleDefaultValue);
|
||||
}, [mode, defaultValue, multipleDefaultValue]);
|
||||
|
||||
return (
|
||||
<Flex
|
||||
@@ -101,7 +104,7 @@ const Block: React.FC<BlockProps> = ({
|
||||
options={options}
|
||||
{...(mode === 'multiple' ? multipleProps : {})}
|
||||
styles={{ popup: { zIndex: 1 } }}
|
||||
maxTagCount="responsive"
|
||||
maxTagCount={process.env.NODE_ENV === 'test' ? 1 : 'responsive'}
|
||||
placeholder="Please select"
|
||||
allowClear
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { InfoCircleOutlined, PushpinOutlined } from '@ant-design/icons';
|
||||
import { get, set } from '@rc-component/util';
|
||||
import { Button, Col, ConfigProvider, Flex, Popover, Row, Tag, theme, Typography } from 'antd';
|
||||
import { createStyles, css } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
import Prism from 'prismjs';
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface SemanticPreviewInjectionProps {
|
||||
classNames?: Record<string, string>;
|
||||
}
|
||||
|
||||
const useStyle = createStyles(({ cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
container: css`
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
@@ -155,8 +155,6 @@ const SemanticPreview: React.FC<SemanticPreviewProps> = (props) => {
|
||||
|
||||
const mergedSemantic = pinSemantic || hoverSemantic;
|
||||
|
||||
const { styles } = useStyle();
|
||||
|
||||
const hoveredSemanticClassNames = React.useMemo(() => {
|
||||
if (!mergedSemantic) {
|
||||
return semanticClassNames;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
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';
|
||||
@@ -100,21 +99,16 @@ const PromptDrawer: React.FC<PromptDrawerProps> = ({ open, onClose, onThemeChang
|
||||
afterOpenChange={handleAfterOpenChange}
|
||||
>
|
||||
<Flex vertical style={{ height: '100%' }}>
|
||||
{/* 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>
|
||||
<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}
|
||||
/>
|
||||
</Flex>
|
||||
</Drawer>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable compat/compat */
|
||||
import { useRef, useState } from 'react';
|
||||
import { XStream } from '@ant-design/x-sdk';
|
||||
|
||||
|
||||
@@ -61,11 +61,14 @@ const Block: React.FC<BlockProps> = ({
|
||||
...props
|
||||
}) => {
|
||||
const divRef = React.useRef<HTMLDivElement>(null);
|
||||
const [value, setValue] = React.useState(defaultValue);
|
||||
// 多选模式下,优先使用 multipleProps 中的 defaultValue
|
||||
const multipleDefaultValue = (multipleProps as any)?.defaultValue;
|
||||
const initialValue = mode === 'single' ? defaultValue : multipleDefaultValue;
|
||||
const [value, setValue] = React.useState(initialValue);
|
||||
|
||||
React.useEffect(() => {
|
||||
setValue(defaultValue);
|
||||
}, [mode]);
|
||||
setValue(mode === 'single' ? defaultValue : multipleDefaultValue);
|
||||
}, [mode, defaultValue, multipleDefaultValue]);
|
||||
|
||||
return (
|
||||
<Flex
|
||||
@@ -93,7 +96,7 @@ const Block: React.FC<BlockProps> = ({
|
||||
treeData={treeData}
|
||||
{...(mode === 'multiple' ? multipleProps : {})}
|
||||
styles={{ popup: { zIndex: 1 } }}
|
||||
maxTagCount="responsive"
|
||||
maxTagCount={process.env.NODE_ENV === 'test' ? 1 : 'responsive'}
|
||||
placeholder="Please select"
|
||||
/>
|
||||
</Flex>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
import useLocale from '../../../hooks/useLocale';
|
||||
import EN from './en-US.md';
|
||||
@@ -7,7 +7,7 @@ import CN from './zh-CN.md';
|
||||
|
||||
const changeLog = { cn: CN, en: EN };
|
||||
|
||||
const useStyle = createStyles(({ css }) => ({
|
||||
const classNames = createStaticStyles(({ css }) => ({
|
||||
container: css`
|
||||
max-height: max(62vh, 500px);
|
||||
overflow-y: scroll;
|
||||
@@ -25,13 +25,11 @@ const useStyle = createStyles(({ css }) => ({
|
||||
const ChangeLog = () => {
|
||||
const [, lang] = useLocale();
|
||||
|
||||
const { styles } = useStyle();
|
||||
|
||||
const validatedLanguage = Object.keys(changeLog).includes(lang) ? lang : 'en';
|
||||
const C = changeLog[validatedLanguage];
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={classNames.container}>
|
||||
<C />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import React from 'react';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { useSearchParams } from 'dumi';
|
||||
|
||||
import CommonHelmet from '../../common/CommonHelmet';
|
||||
import Content from '../../slots/Content';
|
||||
import Sidebar from '../../slots/Sidebar';
|
||||
|
||||
const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
main: css`
|
||||
display: flex;
|
||||
margin-top: ${cssVar.marginXL};
|
||||
@@ -15,7 +15,6 @@ const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
}));
|
||||
|
||||
const SidebarLayout: React.FC<PropsWithChildren> = ({ children }) => {
|
||||
const { styles } = useStyle();
|
||||
const [searchParams] = useSearchParams();
|
||||
const hideLayout = searchParams.get('layout') === 'false';
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { RightOutlined, YuqueOutlined, ZhihuOutlined } from '@ant-design/icons';
|
||||
import { Button, Card, Divider } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
import useLocale from '../../../hooks/useLocale';
|
||||
@@ -10,7 +10,7 @@ import JuejinIcon from '../../../theme/icons/JuejinIcon';
|
||||
const ANTD_IMG_URL =
|
||||
'https://picx.zhimg.com/v2-3b2bca09c2771e7a82a81562e806be4d.jpg?source=d16d100b';
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
const styles = createStaticStyles(({ cssVar, css }) => ({
|
||||
card: css`
|
||||
width: 100%;
|
||||
margin: calc(${cssVar.marginMD} * 2) 0;
|
||||
@@ -113,19 +113,17 @@ interface Props {
|
||||
const ColumnCard: React.FC<Props> = ({ zhihuLink, yuqueLink, juejinLink }) => {
|
||||
const [locale] = useLocale(locales);
|
||||
const {
|
||||
styles: {
|
||||
card,
|
||||
bigTitle,
|
||||
cardBody,
|
||||
leftCard,
|
||||
title,
|
||||
subTitle,
|
||||
logo,
|
||||
arrowIcon,
|
||||
zlBtn,
|
||||
discussLogo,
|
||||
},
|
||||
} = useStyle();
|
||||
card,
|
||||
bigTitle,
|
||||
cardBody,
|
||||
leftCard,
|
||||
title,
|
||||
subTitle,
|
||||
logo,
|
||||
arrowIcon,
|
||||
zlBtn,
|
||||
discussLogo,
|
||||
} = styles;
|
||||
if (!zhihuLink && !yuqueLink && !juejinLink) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React, { Suspense } from 'react';
|
||||
import ContributorsList from '@qixian.cs/github-contributors-list';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
import { useIntl } from 'dumi';
|
||||
|
||||
import SiteContext from '../SiteContext';
|
||||
import ContributorAvatar from './ContributorAvatar';
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => ({
|
||||
const styles = createStaticStyles(({ cssVar, css }) => ({
|
||||
listMobile: css`
|
||||
margin: 1em 0 !important;
|
||||
`,
|
||||
@@ -48,7 +48,6 @@ const blockList = [
|
||||
|
||||
const Contributors: React.FC<ContributorsProps> = ({ filename }) => {
|
||||
const { formatMessage } = useIntl();
|
||||
const { styles } = useStyle();
|
||||
const { isMobile } = React.use(SiteContext);
|
||||
|
||||
if (!filename) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import { removeCSS, updateCSS } from '@rc-component/util/lib/Dom/dynamicCSS';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
import useLocale from '../../../hooks/useLocale';
|
||||
|
||||
@@ -20,7 +20,7 @@ const locales = {
|
||||
},
|
||||
};
|
||||
|
||||
const useStyle = createStyles(({ css, cssVar }) => ({
|
||||
const styles = createStaticStyles(({ css, cssVar }) => ({
|
||||
container: css`
|
||||
position: fixed;
|
||||
inset-inline-start: 0;
|
||||
@@ -80,8 +80,6 @@ const InfoNewVersion: React.FC = () => {
|
||||
removeCSS(whereCls);
|
||||
}, []);
|
||||
|
||||
const { styles } = useStyle();
|
||||
|
||||
if (supportWhere) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { omit } from '@rc-component/util';
|
||||
import { Button, Tooltip } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
export interface SwitchBtnProps {
|
||||
@@ -18,7 +18,7 @@ export interface SwitchBtnProps {
|
||||
|
||||
const BASE_SIZE = '1.2em';
|
||||
|
||||
const useStyle = createStyles(({ cssVar, css }) => {
|
||||
const styles = createStaticStyles(({ cssVar, css }) => {
|
||||
return {
|
||||
btn: css`
|
||||
width: ${cssVar.controlHeight};
|
||||
@@ -65,9 +65,7 @@ const useStyle = createStyles(({ cssVar, css }) => {
|
||||
const SwitchBtn: React.FC<SwitchBtnProps> = (props) => {
|
||||
const { label1, label2, tooltip1, tooltip2, value, pure, onClick, ...rest } = props;
|
||||
|
||||
const {
|
||||
styles: { btn, innerDiv, labelStyle, label1Style, label2Style },
|
||||
} = useStyle();
|
||||
const { btn, innerDiv, labelStyle, label1Style, label2Style } = styles;
|
||||
|
||||
const node = (
|
||||
<Button
|
||||
|
||||
@@ -159,7 +159,6 @@ interface VersionItem {
|
||||
}
|
||||
|
||||
const fetcher = (...args: Parameters<typeof fetch>) => {
|
||||
// eslint-disable-next-line compat/compat
|
||||
return fetch(...args).then((res) => res.json());
|
||||
};
|
||||
|
||||
|
||||
23
.dumirc.ts
23
.dumirc.ts
@@ -160,18 +160,27 @@ export default defineConfig({
|
||||
}
|
||||
|
||||
// 首页无视链接里面的语言设置 https://github.com/ant-design/ant-design/issues/4552
|
||||
if (pathname === '/' || pathname === '/index-cn') {
|
||||
const lang =
|
||||
(window.localStorage && localStorage.getItem('locale')) ||
|
||||
((navigator.language || navigator.browserLanguage).toLowerCase() === 'zh-cn'
|
||||
const normalizedPathname = pathname || '/';
|
||||
if (normalizedPathname === '/' || normalizedPathname === '/index-cn') {
|
||||
let lang;
|
||||
if (window.localStorage) {
|
||||
const antLocale = localStorage.getItem('ANT_LOCAL_TYPE_KEY');
|
||||
// 尝试解析 JSON,因为可能是被序列化后存储的 "en-US" / en-US https://github.com/ant-design/ant-design/issues/56606
|
||||
try {
|
||||
lang = antLocale ? JSON.parse(antLocale) : localStorage.getItem('locale');
|
||||
} catch (e) {
|
||||
lang = antLocale ? antLocale : localStorage.getItem('locale');
|
||||
}
|
||||
}
|
||||
lang = lang || ((navigator.language || navigator.browserLanguage).toLowerCase() === 'zh-cn'
|
||||
? 'zh-CN'
|
||||
: 'en-US');
|
||||
// safari is 'zh-cn', while other browser is 'zh-CN';
|
||||
if ((lang === 'zh-CN') !== isZhCN(pathname)) {
|
||||
location.pathname = getLocalizedPathname(pathname, lang === 'zh-CN');
|
||||
if ((lang === 'zh-CN') !== isZhCN(normalizedPathname)) {
|
||||
location.pathname = getLocalizedPathname(normalizedPathname, lang === 'zh-CN');
|
||||
}
|
||||
}
|
||||
document.documentElement.className += isZhCN(pathname) ? 'zh-cn' : 'en-us';
|
||||
document.documentElement.className += isZhCN(normalizedPathname) ? 'zh-cn' : 'en-us';
|
||||
})();
|
||||
`,
|
||||
],
|
||||
|
||||
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@@ -52,6 +52,15 @@ jobs:
|
||||
- run: ut
|
||||
- run: ut test:node
|
||||
|
||||
test-semantic:
|
||||
name: test-semantic
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: utooland/setup-utoo@v1
|
||||
- run: ut
|
||||
- run: ut test:semantic
|
||||
|
||||
test-react-latest:
|
||||
name: test-react-latest
|
||||
strategy:
|
||||
|
||||
10
.jest.js
10
.jest.js
@@ -48,7 +48,14 @@ module.exports = {
|
||||
'^antd/lib/(.*)$': '<rootDir>/components/$1',
|
||||
'^antd/locale/(.*)$': '<rootDir>/components/locale/$1',
|
||||
},
|
||||
testPathIgnorePatterns: ['/node_modules/', 'dekko', 'node', 'image.test.js', 'image.test.ts'],
|
||||
testPathIgnorePatterns: [
|
||||
'/node_modules/',
|
||||
'dekko',
|
||||
'node',
|
||||
'image.test.js',
|
||||
'image.test.ts',
|
||||
'demo-semantic.test',
|
||||
],
|
||||
transform: {
|
||||
'\\.tsx?$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
|
||||
'\\.(m?)js$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
|
||||
@@ -64,6 +71,7 @@ module.exports = {
|
||||
'!components/*/__tests__/type.test.tsx',
|
||||
'!components/**/*/interface.{ts,tsx}',
|
||||
'!components/*/__tests__/image.test.{ts,tsx}',
|
||||
'!components/*/__tests__/demo-semantic.test.tsx',
|
||||
'!components/__tests__/node.test.tsx',
|
||||
'!components/*/demo/*.tsx',
|
||||
'!components/*/design/**',
|
||||
|
||||
30
.jest.semantic.js
Normal file
30
.jest.semantic.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const { moduleNameMapper, transformIgnorePatterns } = require('./.jest');
|
||||
|
||||
// jest config for semantic demo snapshots
|
||||
// Semantic tests don't need to run in React 18, 19, lib, es, dist repeatedly
|
||||
module.exports = {
|
||||
verbose: true,
|
||||
testEnvironment: 'jsdom',
|
||||
setupFiles: ['./tests/setup.ts', 'jest-canvas-mock'],
|
||||
setupFilesAfterEnv: ['./tests/setupAfterEnv.ts'],
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'md'],
|
||||
modulePathIgnorePatterns: ['/_site/'],
|
||||
moduleNameMapper,
|
||||
testPathIgnorePatterns: ['/node_modules/'],
|
||||
transform: {
|
||||
'\\.tsx?$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
|
||||
'\\.(m?)js$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
|
||||
'\\.md$': './node_modules/@ant-design/tools/lib/jest/demoPreprocessor',
|
||||
},
|
||||
testRegex: 'demo-semantic\\.test\\.(j|t)sx?$',
|
||||
transformIgnorePatterns,
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsConfig: './tsconfig.test.json',
|
||||
},
|
||||
},
|
||||
testEnvironmentOptions: {
|
||||
url: 'http://localhost',
|
||||
},
|
||||
testTimeout: 10000,
|
||||
};
|
||||
@@ -15,6 +15,31 @@ tag: vVERSION
|
||||
|
||||
---
|
||||
|
||||
## 6.2.2
|
||||
|
||||
`2026-01-26`
|
||||
|
||||
- 🐞 Fix Button with href wrapped by Typography showing incorrect color and flickering outline on hover. [#56619](https://github.com/ant-design/ant-design/pull/56619) [@QdabuliuQ](https://github.com/QdabuliuQ)
|
||||
- 🐞 Fix component token not taking effect for Button with `type="text"`. [#56291](https://github.com/ant-design/ant-design/pull/56291) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 🐞 Fix where components within the Popover were affected by the state association with Form.Item. [#56728](https://github.com/ant-design/ant-design/pull/56728)
|
||||
- 🐞 Fix the placeholders displayed incorrectly when selecting multiple items in Select. [#56675](https://github.com/ant-design/ant-design/pull/56675)
|
||||
- 💄 Fix misaligned elements in Pagination when the global `fontSize` is increased. [#56715](https://github.com/ant-design/ant-design/pull/56715) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 💄 Fix incorrect Drawer dragger position in RTL mode. [#56693](https://github.com/ant-design/ant-design/pull/56693) [@QdabuliuQ](https://github.com/QdabuliuQ)
|
||||
|
||||
## 6.2.1
|
||||
|
||||
`2026-01-20`
|
||||
|
||||
- 🐞 Fix Button child element's `className` be cleared if it contains two Chinese characters. [#56593](https://github.com/ant-design/ant-design/pull/56593) [@QdabuliuQ](https://github.com/QdabuliuQ)
|
||||
- 🐞 Fix DatePicker DOM not updated bug after update `suffixIcon` as `null`. [#56637](https://github.com/ant-design/ant-design/pull/56637) [@AlanQtten](https://github.com/AlanQtten)
|
||||
- 🐞 Fix Table content area border radius when set border radius for container. [#56478](https://github.com/ant-design/ant-design/pull/56478) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 💄 Fix Card unexpected border radius for Body area. [#56653](https://github.com/ant-design/ant-design/pull/56653) [@ug-hero](https://github.com/ug-hero)
|
||||
- 💄 MISC: Fix unexpected `undefined` and `null` in the injected styles. [#56636](https://github.com/ant-design/ant-design/pull/56636) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 💄 MISC: Improve `background` transition to `background-color` for all components. [#56598](https://github.com/ant-design/ant-design/pull/56598) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 🛠 Improve Grid use `genCssVar` method to generate more stable CSS variable names. [#56635](https://github.com/ant-design/ant-design/pull/56635) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 🛠 Improve @ant-design/icons usage to avoid depend on full package since externals. [#56639](https://github.com/ant-design/ant-design/pull/56639) [@ShenHongFei](https://github.com/ShenHongFei)
|
||||
|
||||
|
||||
## 6.2.0
|
||||
|
||||
`2026-01-13`
|
||||
|
||||
@@ -15,6 +15,30 @@ tag: vVERSION
|
||||
|
||||
---
|
||||
|
||||
## 6.2.2
|
||||
|
||||
`2026-01-26`
|
||||
|
||||
- 🐞 修复被 Typography 包裹的带 href 的 Button 显示错误颜色和 hover 时 outline 闪烁的问题。[#56619](https://github.com/ant-design/ant-design/pull/56619) [@QdabuliuQ](https://github.com/QdabuliuQ)
|
||||
- 🐞 修复 Button `type="text"` 时组件 Token 不生效的问题。[#56291](https://github.com/ant-design/ant-design/pull/56291) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 🐞 修复 Popover 内组件被 Form.Item 状态关联影响的问题。[#56728](https://github.com/ant-design/ant-design/pull/56728)
|
||||
- 🐞 修复 Select 多选时占位符显示异常的问题。[#56675](https://github.com/ant-design/ant-design/pull/56675)
|
||||
- 💄 修复 Pagination 全局 `fontSize` 变大时各元素上下错位的问题。[#56715](https://github.com/ant-design/ant-design/pull/56715) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 💄 修复 Drawer 在 rtl 模式下 dragger 位置错误的样式问题。[#56693](https://github.com/ant-design/ant-design/pull/56693) [@QdabuliuQ](https://github.com/QdabuliuQ)
|
||||
|
||||
## 6.2.1
|
||||
|
||||
`2026-01-20`
|
||||
|
||||
- 🐞 修复 Button 子元素为包含两个中文字符的标签时,原有 `className` 被清空的问题。[#56593](https://github.com/ant-design/ant-design/pull/56593) [@QdabuliuQ](https://github.com/QdabuliuQ)
|
||||
- 🐞 修复 DatePicker 在设置 `suffixIcon` 为 `null` 后不会更新 DOM 的问题。[#56637](https://github.com/ant-design/ant-design/pull/56637) [@AlanQtten](https://github.com/AlanQtten)
|
||||
- 🐞 修复 Table 容器设置圆角时,内部内容区域圆角不一致的问题。[#56478](https://github.com/ant-design/ant-design/pull/56478) [@QDyanbing](https://github.com/QDyanbing)
|
||||
- 💄 修复 Card Body 区域有非预期圆角值的问题。[#56653](https://github.com/ant-design/ant-design/pull/56653) [@ug-hero](https://github.com/ug-hero)
|
||||
- 💄 杂项:修复 `undefined` 和 `null` 值被注入到 CSS 的问题。[#56636](https://github.com/ant-design/ant-design/pull/56636) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 💄 杂项:优化所有组件中的 `background` 过渡为 `background-color`。[#56598](https://github.com/ant-design/ant-design/pull/56598) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 🛠 优化 Grid 使用 `genCssVar` 方法以生成更加稳定的 CSS 变量名。[#56635](https://github.com/ant-design/ant-design/pull/56635) [@li-jia-nan](https://github.com/li-jia-nan)
|
||||
- 🛠 优化 @ant-design/icons 引入方式为独立图标引入,避免被 externals 增加前置依赖。[#56639](https://github.com/ant-design/ant-design/pull/56639) [@ShenHongFei](https://github.com/ShenHongFei)
|
||||
|
||||
## 6.2.0
|
||||
|
||||
`2026-01-13`
|
||||
|
||||
@@ -130,10 +130,10 @@ const items: MenuProps['items'] = [
|
||||
];
|
||||
|
||||
const consumerComponent: Partial<
|
||||
Record<ZIndexConsumer, React.FC<Readonly<{ rootClassName: string }>>>
|
||||
Record<ZIndexConsumer, React.FC<Readonly<{ rootClassName: string; ref?: React.Ref<any> }>>>
|
||||
> = {
|
||||
SelectLike: ({ rootClassName, ...props }) => (
|
||||
<>
|
||||
SelectLike: ({ rootClassName, ref, ...props }) => (
|
||||
<div ref={ref}>
|
||||
<Select
|
||||
{...props}
|
||||
rootClassName={`${rootClassName} comp-item comp-Select`}
|
||||
@@ -159,7 +159,7 @@ const consumerComponent: Partial<
|
||||
open
|
||||
/>
|
||||
<ColorPicker {...props} open rootClassName={`${rootClassName} comp-item comp-ColorPicker`} />
|
||||
</>
|
||||
</div>
|
||||
),
|
||||
Dropdown: (props) => (
|
||||
<Dropdown
|
||||
@@ -175,15 +175,15 @@ const consumerComponent: Partial<
|
||||
<button type="button">test</button>
|
||||
</Dropdown>
|
||||
),
|
||||
DatePicker: ({ rootClassName, ...props }) => (
|
||||
<>
|
||||
DatePicker: ({ rootClassName, ref, ...props }) => (
|
||||
<div ref={ref}>
|
||||
<DatePicker {...props} rootClassName={`${rootClassName} comp-item comp-DatePicker`} open />
|
||||
<DatePicker.TimePicker
|
||||
{...props}
|
||||
rootClassName={`${rootClassName} comp-item comp-TimePicker`}
|
||||
open
|
||||
/>
|
||||
</>
|
||||
</div>
|
||||
),
|
||||
Menu: (props) => <Menu {...props} items={items} defaultOpenKeys={['SubMenu']} />,
|
||||
ImagePreview: ({ rootClassName }: ImageProps) => (
|
||||
|
||||
@@ -0,0 +1,811 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`renders components/alert/demo/_semantic.tsx correctly 1`] = `
|
||||
<div
|
||||
class="acss-1ucck97"
|
||||
>
|
||||
<div
|
||||
class="ant-row css-var-test-id"
|
||||
>
|
||||
<div
|
||||
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
|
||||
>
|
||||
<div
|
||||
class="ant-alert ant-alert-info ant-alert-with-description semantic-mark-root css-var-test-id"
|
||||
data-show="true"
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
class="ant-alert-icon semantic-mark-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 semantic-mark-section"
|
||||
>
|
||||
<div
|
||||
class="ant-alert-title semantic-mark-title"
|
||||
>
|
||||
Info Text
|
||||
</div>
|
||||
<div
|
||||
class="ant-alert-description semantic-mark-description"
|
||||
>
|
||||
Info Description Info Description Info Description Info Description
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-alert-actions semantic-mark-actions"
|
||||
>
|
||||
<div
|
||||
class="ant-space ant-space-vertical ant-space-gap-row-small ant-space-gap-col-small css-var-test-id"
|
||||
>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
>
|
||||
<button
|
||||
class="ant-btn css-var-test-id ant-btn-primary ant-btn-color-primary ant-btn-variant-solid ant-btn-sm"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Accept
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
>
|
||||
<button
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-dangerous ant-btn-color-dangerous ant-btn-variant-outlined ant-btn-sm ant-btn-background-ghost"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Decline
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
class="ant-alert-close-icon semantic-mark-close"
|
||||
tabindex="0"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
aria-label="close"
|
||||
class="anticon anticon-close"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col ant-col-8 css-var-test-id"
|
||||
>
|
||||
<ul
|
||||
class="acss-1ry21g5"
|
||||
>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
root
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
根元素,包含边框、背景色、内边距、圆角、位置布局等警告提示框的基础样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
icon
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
图标元素,包含图标的颜色、行高、外边距等样式,支持不同类型的状态图标
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
section
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
内容元素,采用 flex 布局控制内容区域的排版和最小宽度
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
title
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
标题元素,包含标题文字的颜色、字体等样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
description
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
描述元素,包含描述文字的字体大小、行高等排版样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
actions
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
操作组元素,包含操作按钮的布局和间距样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
close
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.1.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
关闭按钮元素,包含按钮的基础样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
3
components/alert/__tests__/demo-semantic.test.tsx
Normal file
3
components/alert/__tests__/demo-semantic.test.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
import { semanticDemoTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
semanticDemoTest('alert');
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { Alert, Button, Flex } from 'antd';
|
||||
import type { AlertProps } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
const useStyle = createStyles(({ css }) => ({
|
||||
const classNames = createStaticStyles(({ css }) => ({
|
||||
root: css`
|
||||
border: 2px dashed #ccc;
|
||||
border-radius: 8px;
|
||||
@@ -40,12 +40,10 @@ const styleFn: AlertProps['styles'] = ({ props: { type } }) => {
|
||||
};
|
||||
|
||||
const App: React.FC = () => {
|
||||
const { styles } = useStyle();
|
||||
|
||||
const alertSharedProps: AlertProps = {
|
||||
showIcon: true,
|
||||
classNames: {
|
||||
root: styles.root,
|
||||
root: classNames.root,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,483 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`renders components/anchor/demo/_semantic.tsx correctly 1`] = `
|
||||
<div
|
||||
class="acss-1ucck97"
|
||||
>
|
||||
<div
|
||||
class="ant-row css-var-test-id"
|
||||
>
|
||||
<div
|
||||
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
|
||||
>
|
||||
<div
|
||||
class="css-var-test-id ant-anchor-css-var ant-anchor-wrapper semantic-mark-root"
|
||||
style="max-height: 100vh;"
|
||||
>
|
||||
<div
|
||||
class="ant-anchor ant-anchor-fixed"
|
||||
>
|
||||
<span
|
||||
class="ant-anchor-ink semantic-mark-indicator"
|
||||
/>
|
||||
<div
|
||||
class="ant-anchor-link semantic-mark-item"
|
||||
>
|
||||
<a
|
||||
class="ant-anchor-link-title semantic-mark-itemTitle"
|
||||
href="#api"
|
||||
title="API"
|
||||
>
|
||||
API
|
||||
</a>
|
||||
<div
|
||||
class="ant-anchor-link semantic-mark-item"
|
||||
>
|
||||
<a
|
||||
class="ant-anchor-link-title semantic-mark-itemTitle"
|
||||
href="#anchor-props"
|
||||
title="Anchor Props"
|
||||
>
|
||||
Anchor Props
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
class="ant-anchor-link semantic-mark-item"
|
||||
>
|
||||
<a
|
||||
class="ant-anchor-link-title semantic-mark-itemTitle"
|
||||
href="#link-props"
|
||||
title="Link Props"
|
||||
>
|
||||
Link Props
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-anchor-link semantic-mark-item"
|
||||
>
|
||||
<a
|
||||
class="ant-anchor-link-title semantic-mark-itemTitle"
|
||||
href="#anchor-demo-basic"
|
||||
title="Basic demo"
|
||||
>
|
||||
Basic demo
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
class="ant-anchor-link semantic-mark-item"
|
||||
>
|
||||
<a
|
||||
class="ant-anchor-link-title semantic-mark-itemTitle"
|
||||
href="#anchor-demo-static"
|
||||
title="Static demo"
|
||||
>
|
||||
Static demo
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col ant-col-8 css-var-test-id"
|
||||
>
|
||||
<ul
|
||||
class="acss-1ry21g5"
|
||||
>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
root
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
根元素,包含布局定位、内边距、边距、背景色等基础样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
item
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
链接项元素,包含内边距、文字颜色、悬停状态、过渡动画等样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
itemTitle
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
标题文字元素,包含字体样式、颜色变化、文本装饰、过渡效果等样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
indicator
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
指示器元素,包含宽度、高度、背景色、位置变化、过渡动画等样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
3
components/anchor/__tests__/demo-semantic.test.tsx
Normal file
3
components/anchor/__tests__/demo-semantic.test.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
import { semanticDemoTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
semanticDemoTest('anchor');
|
||||
@@ -100,10 +100,10 @@ exports[`renders components/auto-complete/demo/AutoComplete-and-Select.tsx exten
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -254,10 +254,10 @@ exports[`renders components/auto-complete/demo/AutoComplete-and-Select.tsx exten
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -408,10 +408,10 @@ exports[`renders components/auto-complete/demo/AutoComplete-and-Select.tsx exten
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -1221,10 +1221,10 @@ exports[`renders components/auto-complete/demo/form-debug.tsx extend context cor
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -1362,10 +1362,10 @@ exports[`renders components/auto-complete/demo/form-debug.tsx extend context cor
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -1631,10 +1631,10 @@ exports[`renders components/auto-complete/demo/form-debug.tsx extend context cor
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -1835,10 +1835,10 @@ exports[`renders components/auto-complete/demo/form-debug.tsx extend context cor
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -2044,10 +2044,10 @@ exports[`renders components/auto-complete/demo/form-debug.tsx extend context cor
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
|
||||
@@ -0,0 +1,987 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`renders components/auto-complete/demo/_semantic.tsx correctly 1`] = `
|
||||
<div
|
||||
class="acss-1ucck97"
|
||||
>
|
||||
<div
|
||||
class="ant-row css-var-test-id"
|
||||
>
|
||||
<div
|
||||
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
|
||||
style="align-items: flex-start;"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-middle ant-flex-vertical"
|
||||
style="position: absolute; margin-bottom: 80px;"
|
||||
>
|
||||
<div
|
||||
class="ant-select ant-select-outlined ant-select-auto-complete semantic-mark-root css-var-test-id ant-select-css-var ant-select-single ant-select-open ant-select-show-search"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<div
|
||||
class="ant-select-prefix semantic-mark-prefix"
|
||||
>
|
||||
prefix
|
||||
</div>
|
||||
<div
|
||||
class="ant-select-content semantic-mark-content"
|
||||
>
|
||||
<div
|
||||
class="ant-select-placeholder semantic-mark-placeholder"
|
||||
style="visibility: visible;"
|
||||
>
|
||||
Please select
|
||||
</div>
|
||||
<input
|
||||
aria-activedescendant="test-id_list_-1"
|
||||
aria-autocomplete="list"
|
||||
aria-controls="test-id_list"
|
||||
aria-expanded="true"
|
||||
aria-haspopup="listbox"
|
||||
aria-owns="test-id_list"
|
||||
autocomplete="off"
|
||||
class="ant-select-input semantic-mark-input"
|
||||
id="test-id"
|
||||
role="combobox"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-select-dropdown ant-slide-up-appear ant-slide-up-appear-prepare ant-slide-up semantic-mark-popup-root css-var-test-id ant-select-css-var ant-select-dropdown-placement-bottomLeft"
|
||||
style="--arrow-x: 0px; --arrow-y: 0px; left: -1000vw; top: -1000vh; right: auto; bottom: auto; box-sizing: border-box;"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
id="test-id_list"
|
||||
role="listbox"
|
||||
style="height: 0px; width: 0px; overflow: hidden;"
|
||||
>
|
||||
<div
|
||||
aria-label="aojunhao123"
|
||||
aria-selected="false"
|
||||
id="test-id_list_0"
|
||||
role="option"
|
||||
>
|
||||
aojunhao123
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="rc-virtual-list semantic-mark-popup-list"
|
||||
style="position: relative;"
|
||||
>
|
||||
<div
|
||||
class="rc-virtual-list-holder"
|
||||
style="max-height: 256px; overflow-y: auto; overflow-anchor: none;"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="rc-virtual-list-holder-inner"
|
||||
style="display: flex; flex-direction: column;"
|
||||
>
|
||||
<div
|
||||
class="ant-select-item ant-select-item-option semantic-mark-popup-listItem"
|
||||
title="aojunhao123"
|
||||
>
|
||||
<div
|
||||
class="ant-select-item-option-content"
|
||||
>
|
||||
aojunhao123
|
||||
</div>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
class="ant-select-item-option-state"
|
||||
style="user-select: none;"
|
||||
unselectable="on"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="ant-select-item ant-select-item-option semantic-mark-popup-listItem"
|
||||
title="thinkasany"
|
||||
>
|
||||
<div
|
||||
class="ant-select-item-option-content"
|
||||
>
|
||||
thinkasany
|
||||
</div>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
class="ant-select-item-option-state"
|
||||
style="user-select: none;"
|
||||
unselectable="on"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="ant-select-item ant-select-item-option semantic-mark-popup-listItem"
|
||||
title="meet-student"
|
||||
>
|
||||
<div
|
||||
class="ant-select-item-option-content"
|
||||
>
|
||||
meet-student
|
||||
</div>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
class="ant-select-item-option-state"
|
||||
style="user-select: none;"
|
||||
unselectable="on"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col ant-col-8 css-var-test-id"
|
||||
>
|
||||
<ul
|
||||
class="acss-1ry21g5"
|
||||
>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
root
|
||||
</h5>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
根元素,包含相对定位、行内 flex 布局、光标样式、过渡动画、边框等选择器容器的基础样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
prefix
|
||||
</h5>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
前缀元素,包含前缀内容的布局和样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
content
|
||||
</h5>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
多选容器,包含已选项的布局、间距、换行相关样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
placeholder
|
||||
</h5>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
占位符元素,包含占位符文本的字体样式和颜色
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
clear
|
||||
</h5>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
清除按钮元素,包含清除按钮的布局、样式和交互效果
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
input
|
||||
</h5>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
输入框元素,包含搜索输入框的样式、光标控制、字体继承等搜索相关样式,去除了边框样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
popup.root
|
||||
</h5>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
弹出菜单元素,包含弹出层的定位、层级、背景、边框、阴影等弹出容器样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
popup.list
|
||||
</h5>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
弹出菜单列表元素,包含选项列表的布局、滚动、最大高度等列表容器样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
popup.listItem
|
||||
</h5>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
弹出菜单条目元素,包含选项项的内边距、悬浮效果、选中状态、禁用状态等选项交互样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -0,0 +1,3 @@
|
||||
import { semanticDemoTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
semanticDemoTest('auto-complete');
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { AutoComplete, Flex } from 'antd';
|
||||
import type { AutoCompleteProps } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
const useStyle = createStyles(({ css }) => ({
|
||||
const classNames = createStaticStyles(({ css }) => ({
|
||||
root: css`
|
||||
border-radius: 4px;
|
||||
`,
|
||||
@@ -39,7 +39,6 @@ const options: AutoCompleteProps['options'] = [
|
||||
];
|
||||
|
||||
const App: React.FC = () => {
|
||||
const { styles: classNames } = useStyle();
|
||||
const sharedProps: AutoCompleteProps = {
|
||||
options,
|
||||
classNames: {
|
||||
|
||||
@@ -20,6 +20,7 @@ const PurePanel = genPurePanel(RefAutoComplete, 'popupAlign', (props: any) =>
|
||||
);
|
||||
|
||||
type CompoundedComponent = typeof RefAutoComplete & {
|
||||
/** @deprecated Please use `options` instead. */
|
||||
Option: typeof Option;
|
||||
_InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
|
||||
};
|
||||
|
||||
@@ -3083,7 +3083,7 @@ exports[`renders components/badge/demo/style-class.tsx extend context correctly
|
||||
/>
|
||||
</span>
|
||||
<sup
|
||||
class="ant-scroll-number acss-9c7r58 ant-badge-count ant-badge-count-sm"
|
||||
class="ant-scroll-number acss-1aprf71 ant-badge-count ant-badge-count-sm"
|
||||
data-show="true"
|
||||
title="5"
|
||||
>
|
||||
@@ -3113,7 +3113,7 @@ exports[`renders components/badge/demo/style-class.tsx extend context correctly
|
||||
/>
|
||||
</span>
|
||||
<sup
|
||||
class="ant-scroll-number acss-9c7r58 ant-badge-count"
|
||||
class="ant-scroll-number acss-1aprf71 ant-badge-count"
|
||||
data-show="true"
|
||||
style="font-size: 14px; background-color: rgb(105, 111, 199);"
|
||||
title="5"
|
||||
@@ -3141,7 +3141,7 @@ exports[`renders components/badge/demo/style-class.tsx extend context correctly
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-middle ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-ribbon-wrapper css-var-test-id acss-19a7de9"
|
||||
class="ant-ribbon-wrapper css-var-test-id acss-15qh5u5"
|
||||
>
|
||||
<div
|
||||
class="ant-card ant-card-bordered ant-card-small css-var-test-id"
|
||||
@@ -3180,7 +3180,7 @@ exports[`renders components/badge/demo/style-class.tsx extend context correctly
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-ribbon-wrapper css-var-test-id acss-19a7de9"
|
||||
class="ant-ribbon-wrapper css-var-test-id acss-15qh5u5"
|
||||
>
|
||||
<div
|
||||
class="ant-card ant-card-bordered ant-card-small css-var-test-id"
|
||||
|
||||
@@ -0,0 +1,609 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`renders components/badge/demo/_semantic.tsx correctly 1`] = `
|
||||
<div
|
||||
class="acss-1ucck97"
|
||||
>
|
||||
<div
|
||||
class="ant-row css-var-test-id"
|
||||
>
|
||||
<div
|
||||
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
|
||||
>
|
||||
<span
|
||||
class="ant-badge semantic-mark-root css-var-test-id"
|
||||
>
|
||||
<span
|
||||
class="ant-avatar ant-avatar-lg ant-avatar-square css-var-test-id ant-avatar-css-var"
|
||||
>
|
||||
<span
|
||||
class="ant-avatar-string"
|
||||
style="-webkit-transform: scale(1); transform: scale(1);"
|
||||
/>
|
||||
</span>
|
||||
<sup
|
||||
class="ant-scroll-number semantic-mark-indicator ant-badge-count"
|
||||
data-show="true"
|
||||
title="5"
|
||||
>
|
||||
<bdi>
|
||||
<span
|
||||
class="ant-scroll-number-only"
|
||||
style="transition: none;"
|
||||
>
|
||||
<span
|
||||
class="ant-scroll-number-only-unit current"
|
||||
>
|
||||
5
|
||||
</span>
|
||||
</span>
|
||||
</bdi>
|
||||
</sup>
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col ant-col-8 css-var-test-id"
|
||||
>
|
||||
<ul
|
||||
class="acss-1ry21g5"
|
||||
>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
root
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
5.7.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
根元素,包含相对定位、行内块布局、适应内容宽度等基础布局样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
indicator
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
5.7.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
指示器元素,包含定位、层级、尺寸、颜色、字体、文本对齐、背景、圆角、阴影、过渡动画等完整的徽标样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`renders components/badge/demo/_semantic_ribbon.tsx correctly 1`] = `
|
||||
<div
|
||||
class="acss-1ucck97"
|
||||
>
|
||||
<div
|
||||
class="ant-row css-var-test-id"
|
||||
>
|
||||
<div
|
||||
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
|
||||
>
|
||||
<div
|
||||
style="width: 100%;"
|
||||
>
|
||||
<div
|
||||
class="ant-ribbon-wrapper css-var-test-id semantic-mark-root"
|
||||
>
|
||||
<div
|
||||
class="ant-card ant-card-bordered ant-card-small css-var-test-id"
|
||||
>
|
||||
<div
|
||||
class="ant-card-head"
|
||||
>
|
||||
<div
|
||||
class="ant-card-head-wrapper"
|
||||
>
|
||||
<div
|
||||
class="ant-card-head-title"
|
||||
>
|
||||
Pushes open the window
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-card-body"
|
||||
>
|
||||
and raises the spyglass.
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-ribbon ant-ribbon-placement-end ant-ribbon-color-pink semantic-mark-indicator"
|
||||
>
|
||||
<span
|
||||
class="ant-ribbon-content semantic-mark-content"
|
||||
>
|
||||
Hippies
|
||||
</span>
|
||||
<div
|
||||
class="ant-ribbon-corner"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col ant-col-8 css-var-test-id"
|
||||
>
|
||||
<ul
|
||||
class="acss-1ry21g5"
|
||||
>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
root
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
根元素,设置相对定位和包装容器样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
indicator
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
指示器元素,设置绝对定位、内边距、背景色、圆角和缎带样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
content
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
文本元素,设置文本颜色和缎带内容显示样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -3053,7 +3053,7 @@ exports[`renders components/badge/demo/style-class.tsx correctly 1`] = `
|
||||
/>
|
||||
</span>
|
||||
<sup
|
||||
class="ant-scroll-number acss-9c7r58 ant-badge-count ant-badge-count-sm"
|
||||
class="ant-scroll-number acss-1aprf71 ant-badge-count ant-badge-count-sm"
|
||||
data-show="true"
|
||||
title="5"
|
||||
>
|
||||
@@ -3083,7 +3083,7 @@ exports[`renders components/badge/demo/style-class.tsx correctly 1`] = `
|
||||
/>
|
||||
</span>
|
||||
<sup
|
||||
class="ant-scroll-number acss-9c7r58 ant-badge-count"
|
||||
class="ant-scroll-number acss-1aprf71 ant-badge-count"
|
||||
data-show="true"
|
||||
style="font-size:14px;background-color:#696FC7"
|
||||
title="5"
|
||||
@@ -3111,7 +3111,7 @@ exports[`renders components/badge/demo/style-class.tsx correctly 1`] = `
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-middle ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-ribbon-wrapper css-var-test-id acss-19a7de9"
|
||||
class="ant-ribbon-wrapper css-var-test-id acss-15qh5u5"
|
||||
>
|
||||
<div
|
||||
class="ant-card ant-card-bordered ant-card-small css-var-test-id"
|
||||
@@ -3150,7 +3150,7 @@ exports[`renders components/badge/demo/style-class.tsx correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-ribbon-wrapper css-var-test-id acss-19a7de9"
|
||||
class="ant-ribbon-wrapper css-var-test-id acss-15qh5u5"
|
||||
>
|
||||
<div
|
||||
class="ant-card ant-card-bordered ant-card-small css-var-test-id"
|
||||
|
||||
3
components/badge/__tests__/demo-semantic.test.tsx
Normal file
3
components/badge/__tests__/demo-semantic.test.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
import { semanticDemoTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
semanticDemoTest('badge');
|
||||
@@ -1,21 +1,21 @@
|
||||
import React from 'react';
|
||||
import { Avatar, Badge, Card, Flex, Space } from 'antd';
|
||||
import type { BadgeProps } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
import type { RibbonProps } from 'antd/es/badge/Ribbon';
|
||||
|
||||
const useStylesBadge = createStyles(() => ({
|
||||
indicator: {
|
||||
fontSize: 10,
|
||||
},
|
||||
const badgeClassNames = createStaticStyles(({ css }) => ({
|
||||
indicator: css`
|
||||
font-size: 10px;
|
||||
`,
|
||||
}));
|
||||
|
||||
const useStylesRibbon = createStyles(() => ({
|
||||
root: {
|
||||
width: 400,
|
||||
border: '1px solid #d9d9d9',
|
||||
borderRadius: 10,
|
||||
},
|
||||
const ribbonClassNames = createStaticStyles(({ css }) => ({
|
||||
root: css`
|
||||
width: 400px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 10px;
|
||||
`,
|
||||
}));
|
||||
|
||||
const badgeStyles: BadgeProps['styles'] = {
|
||||
@@ -57,8 +57,6 @@ const ribbonStylesFn: RibbonProps['styles'] = (info) => {
|
||||
};
|
||||
|
||||
const App: React.FC = () => {
|
||||
const { styles: badgeClassNames } = useStylesBadge();
|
||||
const { styles: ribbonClassNames } = useStylesRibbon();
|
||||
return (
|
||||
<Space size="large" vertical>
|
||||
<Flex gap="middle">
|
||||
|
||||
@@ -192,7 +192,7 @@ const genSharedBadgeStyle: GenerateStyle<BadgeToken> = (token) => {
|
||||
background: token.badgeColor,
|
||||
borderRadius: calc(indicatorHeight).div(2).equal(),
|
||||
boxShadow: `0 0 0 ${unit(badgeShadowSize)} ${token.badgeShadowColor}`,
|
||||
transition: `background ${token.motionDurationMid}`,
|
||||
transition: `background-color ${token.motionDurationMid}`,
|
||||
|
||||
a: {
|
||||
color: token.badgeTextColor,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import DownOutlined from '@ant-design/icons/DownOutlined';
|
||||
import { toArray } from '@rc-component/util';
|
||||
import pickAttrs from '@rc-component/util/lib/pickAttrs';
|
||||
import { clsx } from 'clsx';
|
||||
|
||||
@@ -881,12 +881,12 @@ exports[`renders components/breadcrumb/demo/style-class.tsx extend context corre
|
||||
>
|
||||
<nav
|
||||
aria-label="Breadcrumb with Object"
|
||||
class="ant-breadcrumb acss-lz3q7n css-var-test-id"
|
||||
class="ant-breadcrumb acss-14g82y5 css-var-test-id"
|
||||
style="border: 1px solid rgb(240, 240, 240); padding: 8px; border-radius: 4px;"
|
||||
>
|
||||
<ol>
|
||||
<li
|
||||
class="ant-breadcrumb-item acss-3btzkp"
|
||||
class="ant-breadcrumb-item acss-11xwyle"
|
||||
style="color: rgb(24, 144, 255);"
|
||||
>
|
||||
<span
|
||||
@@ -897,13 +897,13 @@ exports[`renders components/breadcrumb/demo/style-class.tsx extend context corre
|
||||
</li>
|
||||
<li
|
||||
aria-hidden="true"
|
||||
class="ant-breadcrumb-separator acss-t9kin8"
|
||||
class="ant-breadcrumb-separator acss-1qxitnl"
|
||||
style="color: rgba(0, 0, 0, 0.45);"
|
||||
>
|
||||
/
|
||||
</li>
|
||||
<li
|
||||
class="ant-breadcrumb-item acss-3btzkp"
|
||||
class="ant-breadcrumb-item acss-11xwyle"
|
||||
style="color: rgb(24, 144, 255);"
|
||||
>
|
||||
<span
|
||||
@@ -920,12 +920,12 @@ exports[`renders components/breadcrumb/demo/style-class.tsx extend context corre
|
||||
</nav>
|
||||
<nav
|
||||
aria-label="Breadcrumb with Function"
|
||||
class="ant-breadcrumb acss-lz3q7n css-var-test-id"
|
||||
class="ant-breadcrumb acss-14g82y5 css-var-test-id"
|
||||
style="border: 1px solid rgb(245, 239, 255); padding: 8px; border-radius: 4px;"
|
||||
>
|
||||
<ol>
|
||||
<li
|
||||
class="ant-breadcrumb-item acss-3btzkp"
|
||||
class="ant-breadcrumb-item acss-11xwyle"
|
||||
style="color: rgb(143, 135, 241);"
|
||||
>
|
||||
<span
|
||||
@@ -936,12 +936,12 @@ exports[`renders components/breadcrumb/demo/style-class.tsx extend context corre
|
||||
</li>
|
||||
<li
|
||||
aria-hidden="true"
|
||||
class="ant-breadcrumb-separator acss-t9kin8"
|
||||
class="ant-breadcrumb-separator acss-1qxitnl"
|
||||
>
|
||||
/
|
||||
</li>
|
||||
<li
|
||||
class="ant-breadcrumb-item acss-3btzkp"
|
||||
class="ant-breadcrumb-item acss-11xwyle"
|
||||
style="color: rgb(143, 135, 241);"
|
||||
>
|
||||
<span
|
||||
@@ -956,12 +956,12 @@ exports[`renders components/breadcrumb/demo/style-class.tsx extend context corre
|
||||
</li>
|
||||
<li
|
||||
aria-hidden="true"
|
||||
class="ant-breadcrumb-separator acss-t9kin8"
|
||||
class="ant-breadcrumb-separator acss-1qxitnl"
|
||||
>
|
||||
/
|
||||
</li>
|
||||
<li
|
||||
class="ant-breadcrumb-item acss-3btzkp"
|
||||
class="ant-breadcrumb-item acss-11xwyle"
|
||||
style="color: rgb(143, 135, 241);"
|
||||
>
|
||||
<span
|
||||
|
||||
@@ -0,0 +1,404 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`renders components/breadcrumb/demo/_semantic.tsx correctly 1`] = `
|
||||
<div
|
||||
class="acss-1ucck97"
|
||||
>
|
||||
<div
|
||||
class="ant-row css-var-test-id"
|
||||
>
|
||||
<div
|
||||
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
|
||||
>
|
||||
<nav
|
||||
class="ant-breadcrumb semantic-mark-root css-var-test-id"
|
||||
>
|
||||
<ol>
|
||||
<li
|
||||
class="ant-breadcrumb-item semantic-mark-item"
|
||||
>
|
||||
<a
|
||||
class="ant-breadcrumb-link"
|
||||
href=""
|
||||
>
|
||||
<span
|
||||
aria-label="home"
|
||||
class="anticon anticon-home"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="home"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
aria-hidden="true"
|
||||
class="ant-breadcrumb-separator semantic-mark-separator"
|
||||
>
|
||||
/
|
||||
</li>
|
||||
<li
|
||||
class="ant-breadcrumb-item semantic-mark-item"
|
||||
>
|
||||
<a
|
||||
class="ant-breadcrumb-link"
|
||||
href=""
|
||||
>
|
||||
<span
|
||||
aria-label="user"
|
||||
class="anticon anticon-user"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="user"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span>
|
||||
Application List
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
aria-hidden="true"
|
||||
class="ant-breadcrumb-separator semantic-mark-separator"
|
||||
>
|
||||
/
|
||||
</li>
|
||||
<li
|
||||
class="ant-breadcrumb-item semantic-mark-item"
|
||||
>
|
||||
<span
|
||||
class="ant-breadcrumb-link"
|
||||
>
|
||||
Application
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col ant-col-8 css-var-test-id"
|
||||
>
|
||||
<ul
|
||||
class="acss-1ry21g5"
|
||||
>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
root
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
根元素,包含文字颜色、字体大小、图标尺寸等基础样式,内部使用 flex 布局的有序列表
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
item
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
Item 元素,包含文字颜色、链接的颜色变化、悬浮效果、内边距、圆角、高度、外边距等样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
separator
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
分隔符元素,包含分隔符的外边距和颜色样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -525,12 +525,12 @@ exports[`renders components/breadcrumb/demo/style-class.tsx correctly 1`] = `
|
||||
>
|
||||
<nav
|
||||
aria-label="Breadcrumb with Object"
|
||||
class="ant-breadcrumb acss-lz3q7n css-var-test-id"
|
||||
class="ant-breadcrumb acss-14g82y5 css-var-test-id"
|
||||
style="border:1px solid #f0f0f0;padding:8px;border-radius:4px"
|
||||
>
|
||||
<ol>
|
||||
<li
|
||||
class="ant-breadcrumb-item acss-3btzkp"
|
||||
class="ant-breadcrumb-item acss-11xwyle"
|
||||
style="color:#1890ff"
|
||||
>
|
||||
<span
|
||||
@@ -541,13 +541,13 @@ exports[`renders components/breadcrumb/demo/style-class.tsx correctly 1`] = `
|
||||
</li>
|
||||
<li
|
||||
aria-hidden="true"
|
||||
class="ant-breadcrumb-separator acss-t9kin8"
|
||||
class="ant-breadcrumb-separator acss-1qxitnl"
|
||||
style="color:rgba(0, 0, 0, 0.45)"
|
||||
>
|
||||
/
|
||||
</li>
|
||||
<li
|
||||
class="ant-breadcrumb-item acss-3btzkp"
|
||||
class="ant-breadcrumb-item acss-11xwyle"
|
||||
style="color:#1890ff"
|
||||
>
|
||||
<span
|
||||
@@ -564,12 +564,12 @@ exports[`renders components/breadcrumb/demo/style-class.tsx correctly 1`] = `
|
||||
</nav>
|
||||
<nav
|
||||
aria-label="Breadcrumb with Function"
|
||||
class="ant-breadcrumb acss-lz3q7n css-var-test-id"
|
||||
class="ant-breadcrumb acss-14g82y5 css-var-test-id"
|
||||
style="border:1px solid #F5EFFF;padding:8px;border-radius:4px"
|
||||
>
|
||||
<ol>
|
||||
<li
|
||||
class="ant-breadcrumb-item acss-3btzkp"
|
||||
class="ant-breadcrumb-item acss-11xwyle"
|
||||
style="color:#8F87F1"
|
||||
>
|
||||
<span
|
||||
@@ -580,12 +580,12 @@ exports[`renders components/breadcrumb/demo/style-class.tsx correctly 1`] = `
|
||||
</li>
|
||||
<li
|
||||
aria-hidden="true"
|
||||
class="ant-breadcrumb-separator acss-t9kin8"
|
||||
class="ant-breadcrumb-separator acss-1qxitnl"
|
||||
>
|
||||
/
|
||||
</li>
|
||||
<li
|
||||
class="ant-breadcrumb-item acss-3btzkp"
|
||||
class="ant-breadcrumb-item acss-11xwyle"
|
||||
style="color:#8F87F1"
|
||||
>
|
||||
<span
|
||||
@@ -600,12 +600,12 @@ exports[`renders components/breadcrumb/demo/style-class.tsx correctly 1`] = `
|
||||
</li>
|
||||
<li
|
||||
aria-hidden="true"
|
||||
class="ant-breadcrumb-separator acss-t9kin8"
|
||||
class="ant-breadcrumb-separator acss-1qxitnl"
|
||||
>
|
||||
/
|
||||
</li>
|
||||
<li
|
||||
class="ant-breadcrumb-item acss-3btzkp"
|
||||
class="ant-breadcrumb-item acss-11xwyle"
|
||||
style="color:#8F87F1"
|
||||
>
|
||||
<span
|
||||
|
||||
3
components/breadcrumb/__tests__/demo-semantic.test.tsx
Normal file
3
components/breadcrumb/__tests__/demo-semantic.test.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
import { semanticDemoTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
semanticDemoTest('breadcrumb');
|
||||
@@ -1,12 +1,19 @@
|
||||
import React from 'react';
|
||||
import { Breadcrumb, Flex } from 'antd';
|
||||
import type { BreadcrumbProps } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
const useStyles = createStyles(() => ({
|
||||
root: { padding: 8, borderRadius: 4 },
|
||||
item: { color: '#1890ff' },
|
||||
separator: { color: 'rgba(0, 0, 0, 0.45)' },
|
||||
const classNames = createStaticStyles(({ css }) => ({
|
||||
root: css`
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
`,
|
||||
item: css`
|
||||
color: #1890ff;
|
||||
`,
|
||||
separator: css`
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
`,
|
||||
}));
|
||||
|
||||
const styles: BreadcrumbProps['styles'] = {
|
||||
@@ -33,8 +40,6 @@ const items = [
|
||||
];
|
||||
|
||||
const App: React.FC = () => {
|
||||
const { styles: classNames } = useStyles();
|
||||
|
||||
return (
|
||||
<Flex vertical gap="middle">
|
||||
<Breadcrumb
|
||||
|
||||
@@ -11,7 +11,9 @@ export type {
|
||||
export type { BreadcrumbItemProps, SeparatorType } from './BreadcrumbItem';
|
||||
|
||||
type CompoundedComponent = typeof InternalBreadcrumb & {
|
||||
/** @deprecated Please use `items` instead. */
|
||||
Item: typeof BreadcrumbItem;
|
||||
/** @deprecated Please use `separator` instead. */
|
||||
Separator: typeof BreadcrumbSeparator;
|
||||
};
|
||||
|
||||
|
||||
@@ -968,6 +968,18 @@ exports[`renders components/button/demo/debug-color-variant.tsx extend context c
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-wrap-wrap ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
type="text" (Default)
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`renders components/button/demo/_semantic.tsx correctly 1`] = `
|
||||
<div
|
||||
class="acss-1ucck97"
|
||||
>
|
||||
<div
|
||||
class="ant-row css-var-test-id"
|
||||
>
|
||||
<div
|
||||
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
|
||||
>
|
||||
<button
|
||||
class="ant-btn css-var-test-id ant-btn-primary ant-btn-color-primary ant-btn-variant-solid semantic-mark-root"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon semantic-mark-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="ant-design"
|
||||
class="anticon anticon-ant-design"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="ant-design"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M716.3 313.8c19-18.9 19-49.7 0-68.6l-69.9-69.9.1.1c-18.5-18.5-50.3-50.3-95.3-95.2-21.2-20.7-55.5-20.5-76.5.5L80.9 474.2a53.84 53.84 0 000 76.4L474.6 944a54.14 54.14 0 0076.5 0l165.1-165c19-18.9 19-49.7 0-68.6a48.7 48.7 0 00-68.7 0l-125 125.2c-5.2 5.2-13.3 5.2-18.5 0L189.5 521.4c-5.2-5.2-5.2-13.3 0-18.5l314.4-314.2c.4-.4.9-.7 1.3-1.1 5.2-4.1 12.4-3.7 17.2 1.1l125.2 125.1c19 19 49.8 19 68.7 0zM408.6 514.4a106.3 106.2 0 10212.6 0 106.3 106.2 0 10-212.6 0zm536.2-38.6L821.9 353.5c-19-18.9-49.8-18.9-68.7.1a48.4 48.4 0 000 68.6l83 82.9c5.2 5.2 5.2 13.3 0 18.5l-81.8 81.7a48.4 48.4 0 000 68.6 48.7 48.7 0 0068.7 0l121.8-121.7a53.93 53.93 0 00-.1-76.4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
class="semantic-mark-content"
|
||||
>
|
||||
Ant Design
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col ant-col-8 css-var-test-id"
|
||||
>
|
||||
<ul
|
||||
class="acss-1ry21g5"
|
||||
>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
root
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
根元素,包含边框样式、背景色、内边距、圆角、阴影效果、过渡动画、光标样式、文字权重、对齐方式等完整的按钮外观样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
icon
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
5.5.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
图标元素,包含图标的字体大小、颜色继承、SVG 样式重置等图标显示相关样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="acss-1ehfz5v"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
|
||||
>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<h5
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px;"
|
||||
>
|
||||
content
|
||||
</h5>
|
||||
<span
|
||||
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
|
||||
>
|
||||
6.0.0
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="pushpin"
|
||||
class="anticon anticon-pushpin"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="pushpin"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
aria-hidden="true"
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
>
|
||||
<span
|
||||
aria-label="info-circle"
|
||||
class="anticon anticon-info-circle"
|
||||
role="img"
|
||||
>
|
||||
<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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-typography css-var-test-id"
|
||||
style="margin: 0px; font-size: 12px;"
|
||||
>
|
||||
内容元素,包装按钮文本内容,控制文本的不换行显示、居中对齐、中文字符间距优化等文本排版样式
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -952,6 +952,18 @@ exports[`renders components/button/demo/debug-color-variant.tsx correctly 1`] =
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex css-var-test-id ant-flex-wrap-wrap ant-flex-gap-small"
|
||||
>
|
||||
<button
|
||||
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
type="text" (Default)
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
||||
3
components/button/__tests__/demo-semantic.test.tsx
Normal file
3
components/button/__tests__/demo-semantic.test.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
import { semanticDemoTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
semanticDemoTest('button');
|
||||
@@ -1,5 +1,5 @@
|
||||
import { imageDemoTest } from '../../../tests/shared/imageTest';
|
||||
|
||||
describe('Button image', () => {
|
||||
imageDemoTest('button', { skip: ['loading.tsx'] });
|
||||
imageDemoTest('button', { skip: ['loading.tsx', 'chinese-chars-loading.tsx'] });
|
||||
});
|
||||
|
||||
@@ -115,6 +115,23 @@ describe('Button', () => {
|
||||
expect(container.querySelector('.ant-btn')).toHaveClass('ant-btn-two-chinese-chars');
|
||||
});
|
||||
|
||||
// https://github.com/ant-design/ant-design/issues/56591
|
||||
it('should preserve className when rendering two Chinese characters in child element', () => {
|
||||
const { container } = render(
|
||||
<Button>
|
||||
<span className="custom-class" style={{ color: 'rgb(255, 0, 0)' }}>
|
||||
按钮
|
||||
</span>
|
||||
</Button>,
|
||||
);
|
||||
|
||||
const span = container.querySelector('span.custom-class');
|
||||
expect(span).toBeTruthy();
|
||||
expect(span).toHaveClass('custom-class');
|
||||
expect(span).toHaveStyle({ color: 'rgb(255, 0, 0)' });
|
||||
expect(span).toHaveTextContent('按 钮');
|
||||
});
|
||||
|
||||
// https://github.com/ant-design/ant-design/issues/18118
|
||||
it('should not insert space to link or text button', () => {
|
||||
const wrapper1 = render(<Button type="link">按钮</Button>);
|
||||
|
||||
@@ -28,7 +28,7 @@ export function isUnBorderedButtonVariant(type?: ButtonVariantType) {
|
||||
}
|
||||
|
||||
function splitCNCharsBySpace(
|
||||
child: React.ReactElement | string | number,
|
||||
child: React.ReactElement<any> | string | number,
|
||||
needInserted: boolean,
|
||||
style?: React.CSSProperties,
|
||||
className?: string,
|
||||
@@ -43,20 +43,18 @@ function splitCNCharsBySpace(
|
||||
typeof child !== 'string' &&
|
||||
typeof child !== 'number' &&
|
||||
isString(child.type) &&
|
||||
isTwoCNChar(
|
||||
(
|
||||
child as React.ReactElement<{
|
||||
children: string;
|
||||
}>
|
||||
).props.children,
|
||||
)
|
||||
isTwoCNChar((child as React.ReactElement<{ children: string }>).props.children)
|
||||
) {
|
||||
return cloneElement(child, (oriProps) => ({
|
||||
...oriProps,
|
||||
children: oriProps.children.split('').join(SPACE),
|
||||
className,
|
||||
style,
|
||||
}));
|
||||
return cloneElement(child, (oriProps) => {
|
||||
const mergedCls = clsx(oriProps.className, className) || undefined;
|
||||
const mergedStyle: React.CSSProperties = { ...style, ...oriProps.style };
|
||||
return {
|
||||
...oriProps,
|
||||
children: oriProps.children.split('').join(SPACE),
|
||||
className: mergedCls,
|
||||
style: mergedStyle,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
if (isString(child)) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { Button, ConfigProvider, Flex } from 'antd';
|
||||
import type { ThemeConfig } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { createStaticStyles } from 'antd-style';
|
||||
|
||||
const useSpecStyle = createStyles(({ css }) => ({
|
||||
const specClassNames = createStaticStyles(({ css }) => ({
|
||||
primary: css`
|
||||
background: #5794f7;
|
||||
border-color: blue;
|
||||
@@ -27,7 +27,7 @@ const useSpecStyle = createStyles(({ css }) => ({
|
||||
`,
|
||||
}));
|
||||
|
||||
const useOriginalClsStyle = createStyles(({ css }) => ({
|
||||
const originalClsStyle = createStaticStyles(({ css }) => ({
|
||||
wrapper: css`
|
||||
.ant-btn-primary {
|
||||
color: #ec5b56;
|
||||
@@ -59,9 +59,6 @@ const theme: ThemeConfig = {
|
||||
};
|
||||
|
||||
const App: React.FC = () => {
|
||||
const { styles: specStyle } = useSpecStyle();
|
||||
const { styles: originalClsStyle } = useOriginalClsStyle();
|
||||
|
||||
return (
|
||||
<Flex vertical gap="small">
|
||||
{/* link color */}
|
||||
@@ -74,19 +71,19 @@ const App: React.FC = () => {
|
||||
|
||||
{/* css specificity */}
|
||||
<Flex gap="small" wrap>
|
||||
<Button type="primary" className={specStyle.primary}>
|
||||
<Button type="primary" className={specClassNames.primary}>
|
||||
Primary Button
|
||||
</Button>
|
||||
<Button type="default" className={specStyle.default}>
|
||||
<Button type="default" className={specClassNames.default}>
|
||||
Default Button
|
||||
</Button>
|
||||
<Button type="dashed" className={specStyle.dashed}>
|
||||
<Button type="dashed" className={specClassNames.dashed}>
|
||||
Dashed Button
|
||||
</Button>
|
||||
<Button type="text" className={specStyle.text}>
|
||||
<Button type="text" className={specClassNames.text}>
|
||||
Text Button
|
||||
</Button>
|
||||
<Button type="link" className={specStyle.link}>
|
||||
<Button type="link" className={specClassNames.link}>
|
||||
Link Button
|
||||
</Button>
|
||||
</Flex>
|
||||
@@ -117,6 +114,22 @@ const App: React.FC = () => {
|
||||
<Button type="dashed">Dashed</Button>
|
||||
</ConfigProvider>
|
||||
</Flex>
|
||||
<Flex gap="small" wrap>
|
||||
<ConfigProvider
|
||||
theme={{
|
||||
components: {
|
||||
Button: {
|
||||
textTextColor: '#f60',
|
||||
textTextHoverColor: '#722ed1',
|
||||
textTextActiveColor: '#0f0',
|
||||
textHoverBg: '#000',
|
||||
},
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Button type="text">type="text" (Default)</Button>
|
||||
</ConfigProvider>
|
||||
</Flex>
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -5,38 +5,67 @@ import { genCompactItemStyle } from '../../style/compact-item';
|
||||
import { genCompactItemVerticalStyle } from '../../style/compact-item-vertical';
|
||||
import type { GenerateStyle } from '../../theme/internal';
|
||||
import { genSubStyleComponent } from '../../theme/internal';
|
||||
import { genCssVar } from '../../theme/util/genStyleUtils';
|
||||
import type { ButtonToken } from './token';
|
||||
import { prepareComponentToken, prepareToken } from './token';
|
||||
|
||||
const genButtonCompactStyle: GenerateStyle<ButtonToken> = (token) => {
|
||||
const { componentCls, colorPrimaryHover, lineWidth, calc } = token;
|
||||
const { antCls, componentCls, lineWidth, calc, colorBgContainer } = token;
|
||||
|
||||
const solidSelector = `${componentCls}-variant-solid:not([disabled])`;
|
||||
const insetOffset = calc(lineWidth).mul(-1).equal();
|
||||
const getCompactBorderStyle = (vertical?: boolean) => {
|
||||
|
||||
const [varName, varRef] = genCssVar(antCls, 'btn');
|
||||
|
||||
const getCompactBorderStyle = (vertical?: boolean): CSSObject => {
|
||||
const itemCls = `${componentCls}-compact${vertical ? '-vertical' : ''}-item`;
|
||||
const selector = `${itemCls}${componentCls}-primary:not([disabled])`;
|
||||
|
||||
return {
|
||||
// TODO: Border color transition should be not cover when has color.
|
||||
[itemCls]: {
|
||||
transition: `none`,
|
||||
},
|
||||
[varName('compact-connect-border-color')]: varRef('bg-color-hover'),
|
||||
|
||||
[`${selector} + ${selector}::before`]: {
|
||||
position: 'absolute',
|
||||
top: vertical ? insetOffset : 0,
|
||||
insetInlineStart: vertical ? 0 : insetOffset,
|
||||
backgroundColor: colorPrimaryHover,
|
||||
content: '""',
|
||||
width: vertical ? '100%' : lineWidth,
|
||||
height: vertical ? lineWidth : '100%',
|
||||
} as CSSObject,
|
||||
[`&${solidSelector}`]: {
|
||||
transition: `none`,
|
||||
|
||||
[`& + ${solidSelector}:before`]: [
|
||||
{
|
||||
position: 'absolute',
|
||||
backgroundColor: varRef('compact-connect-border-color'),
|
||||
content: '""',
|
||||
},
|
||||
vertical
|
||||
? {
|
||||
top: insetOffset,
|
||||
insetInline: insetOffset,
|
||||
height: lineWidth,
|
||||
}
|
||||
: {
|
||||
insetBlock: insetOffset,
|
||||
insetInlineStart: insetOffset,
|
||||
width: lineWidth,
|
||||
},
|
||||
],
|
||||
|
||||
'&:hover:before': {
|
||||
display: 'none',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
// Special styles for Primary Button
|
||||
return {
|
||||
...getCompactBorderStyle(),
|
||||
...getCompactBorderStyle(true),
|
||||
};
|
||||
|
||||
// Special styles for solid Button
|
||||
return [
|
||||
getCompactBorderStyle(),
|
||||
getCompactBorderStyle(true),
|
||||
{
|
||||
[`${solidSelector}${componentCls}-color-default`]: {
|
||||
[varName('compact-connect-border-color')]:
|
||||
`color-mix(in srgb, ${varRef('bg-color-hover')} 75%, ${colorBgContainer})`,
|
||||
},
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
// ============================== Export ==============================
|
||||
|
||||
@@ -239,6 +239,13 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
|
||||
[varName('bg-color-active')]: token.defaultActiveBg,
|
||||
},
|
||||
|
||||
[`&${componentCls}-variant-text`]: {
|
||||
[varName('text-color')]: token.textTextColor,
|
||||
[varName('text-color-hover')]: token.textTextHoverColor,
|
||||
[varName('text-color-active')]: token.textTextActiveColor,
|
||||
[varName('bg-color-hover')]: token.textHoverBg,
|
||||
},
|
||||
|
||||
[`&${componentCls}-background-ghost`]: {
|
||||
[`&${componentCls}-variant-outlined, &${componentCls}-variant-dashed`]: {
|
||||
[varName('text-color')]: token.defaultGhostColor,
|
||||
|
||||
@@ -72,7 +72,7 @@ function YearSelect<DateType>(props: SharedProps<DateType>) {
|
||||
|
||||
onChange(newDate);
|
||||
}}
|
||||
getPopupContainer={() => divRef!.current!}
|
||||
getPopupContainer={() => divRef.current}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ function MonthSelect<DateType>(props: SharedProps<DateType>) {
|
||||
onChange={(newMonth) => {
|
||||
onChange(generateConfig.setMonth(value, newMonth));
|
||||
}}
|
||||
getPopupContainer={() => divRef!.current!}
|
||||
getPopupContainer={() => divRef.current}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ exports[`renders components/calendar/demo/basic.tsx extend context correctly 1`]
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -431,7 +430,6 @@ exports[`renders components/calendar/demo/basic.tsx extend context correctly 1`]
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -1555,7 +1553,6 @@ exports[`renders components/calendar/demo/card.tsx extend context correctly 1`]
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -1971,7 +1968,6 @@ exports[`renders components/calendar/demo/card.tsx extend context correctly 1`]
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -3094,7 +3090,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -3510,7 +3505,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -4627,7 +4621,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -5043,7 +5036,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -6227,7 +6219,6 @@ exports[`renders components/calendar/demo/customize-header.tsx extend context co
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -6683,7 +6674,6 @@ exports[`renders components/calendar/demo/customize-header.tsx extend context co
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -7772,7 +7762,6 @@ exports[`renders components/calendar/demo/notice-calendar.tsx extend context cor
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -8188,7 +8177,6 @@ exports[`renders components/calendar/demo/notice-calendar.tsx extend context cor
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -9722,7 +9710,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2017"
|
||||
>
|
||||
2017
|
||||
@@ -10138,7 +10125,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Jan"
|
||||
>
|
||||
Jan
|
||||
@@ -11264,7 +11250,6 @@ exports[`renders components/calendar/demo/style-class.tsx extend context correct
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -11680,7 +11665,6 @@ exports[`renders components/calendar/demo/style-class.tsx extend context correct
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -12797,7 +12781,6 @@ exports[`renders components/calendar/demo/style-class.tsx extend context correct
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -13213,7 +13196,6 @@ exports[`renders components/calendar/demo/style-class.tsx extend context correct
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -14336,7 +14318,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -14752,7 +14733,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -15930,7 +15910,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -16346,7 +16325,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,6 @@ exports[`renders components/calendar/demo/basic.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -65,7 +64,6 @@ exports[`renders components/calendar/demo/basic.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -949,7 +947,6 @@ exports[`renders components/calendar/demo/card.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -999,7 +996,6 @@ exports[`renders components/calendar/demo/card.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -1882,7 +1878,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -1932,7 +1927,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -2811,7 +2805,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -2861,7 +2854,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -3805,7 +3797,6 @@ exports[`renders components/calendar/demo/customize-header.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -3855,7 +3846,6 @@ exports[`renders components/calendar/demo/customize-header.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -4688,7 +4678,6 @@ exports[`renders components/calendar/demo/notice-calendar.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -4738,7 +4727,6 @@ exports[`renders components/calendar/demo/notice-calendar.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -6032,7 +6020,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="2017"
|
||||
>
|
||||
2017
|
||||
@@ -6082,7 +6069,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Jan"
|
||||
>
|
||||
Jan
|
||||
@@ -6968,7 +6954,6 @@ exports[`renders components/calendar/demo/style-class.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -7018,7 +7003,6 @@ exports[`renders components/calendar/demo/style-class.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -7897,7 +7881,6 @@ exports[`renders components/calendar/demo/style-class.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -7947,7 +7930,6 @@ exports[`renders components/calendar/demo/style-class.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -8830,7 +8812,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -8880,7 +8861,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
@@ -9820,7 +9800,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="2016"
|
||||
>
|
||||
2016
|
||||
@@ -9870,7 +9849,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Nov"
|
||||
>
|
||||
Nov
|
||||
|
||||
@@ -15,7 +15,6 @@ exports[`Calendar Calendar MonthSelect should display correct label 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2019"
|
||||
>
|
||||
2019
|
||||
@@ -65,7 +64,6 @@ exports[`Calendar Calendar MonthSelect should display correct label 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Jan"
|
||||
>
|
||||
Jan
|
||||
@@ -946,7 +944,6 @@ exports[`Calendar Calendar should support locale 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2018年"
|
||||
>
|
||||
2018年
|
||||
@@ -996,7 +993,6 @@ exports[`Calendar Calendar should support locale 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="10月"
|
||||
>
|
||||
10月
|
||||
@@ -1877,7 +1873,6 @@ exports[`Calendar rtl render component should be rendered correctly in RTL direc
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2000"
|
||||
>
|
||||
2000
|
||||
@@ -1927,7 +1922,6 @@ exports[`Calendar rtl render component should be rendered correctly in RTL direc
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Sep"
|
||||
>
|
||||
Sep
|
||||
@@ -2808,7 +2802,6 @@ exports[`Calendar support Calendar.generateCalendar 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="2000"
|
||||
>
|
||||
2000
|
||||
@@ -2858,7 +2851,6 @@ exports[`Calendar support Calendar.generateCalendar 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Jan"
|
||||
>
|
||||
Jan
|
||||
|
||||
3
components/calendar/__tests__/demo-semantic.test.tsx
Normal file
3
components/calendar/__tests__/demo-semantic.test.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
import { semanticDemoTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
semanticDemoTest('calendar');
|
||||
@@ -196,7 +196,7 @@ export const genCalendarStyles = (token: CalendarToken): CSSObject => {
|
||||
border: 0,
|
||||
borderTop: `${unit(token.lineWidthBold)} ${token.lineType} ${token.colorSplit}`,
|
||||
borderRadius: 0,
|
||||
transition: `background ${token.motionDurationSlow}`,
|
||||
transition: `background-color ${token.motionDurationSlow}`,
|
||||
'&-value': {
|
||||
lineHeight: unit(token.dateValueHeight),
|
||||
transition: `color ${token.motionDurationSlow}`,
|
||||
|
||||
1413
components/card/__tests__/__snapshots__/demo-semantic.test.tsx.snap
Normal file
1413
components/card/__tests__/__snapshots__/demo-semantic.test.tsx.snap
Normal file
File diff suppressed because it is too large
Load Diff
3
components/card/__tests__/demo-semantic.test.tsx
Normal file
3
components/card/__tests__/demo-semantic.test.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
import { semanticDemoTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
semanticDemoTest('card');
|
||||
@@ -342,6 +342,14 @@ const genCardStyle: GenerateStyle<CardToken> = (token): CSSObject => {
|
||||
[`${componentCls}-body`]: {
|
||||
padding: bodyPadding,
|
||||
borderRadius: `0 0 ${unit(token.borderRadiusLG)} ${unit(token.borderRadiusLG)}`,
|
||||
'&:first-child': {
|
||||
borderStartStartRadius: token.borderRadiusLG,
|
||||
borderStartEndRadius: token.borderRadiusLG,
|
||||
},
|
||||
'&:not(:last-child)': {
|
||||
borderEndStartRadius: 0,
|
||||
borderEndEndRadius: 0,
|
||||
},
|
||||
},
|
||||
|
||||
[`${componentCls}-grid`]: genCardGridStyle(token),
|
||||
|
||||
@@ -601,7 +601,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
>
|
||||
<span>
|
||||
Zhejiang /
|
||||
@@ -880,7 +879,6 @@ Array [
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility: visible;"
|
||||
title="Zhejiang / Hangzhou / West Lake"
|
||||
>
|
||||
Zhejiang / Hangzhou / West Lake
|
||||
@@ -2025,10 +2023,10 @@ exports[`renders components/cascader/demo/panel.tsx extend context correctly 1`]
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -3499,10 +3497,10 @@ exports[`renders components/cascader/demo/status.tsx extend context correctly 1`
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -3638,10 +3636,10 @@ exports[`renders components/cascader/demo/status.tsx extend context correctly 1`
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -4740,10 +4738,10 @@ exports[`renders components/cascader/demo/variant.tsx extend context correctly 1
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -4864,10 +4862,10 @@ exports[`renders components/cascader/demo/variant.tsx extend context correctly 1
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -4988,10 +4986,10 @@ exports[`renders components/cascader/demo/variant.tsx extend context correctly 1
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
@@ -5112,10 +5110,10 @@ exports[`renders components/cascader/demo/variant.tsx extend context correctly 1
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -216,7 +216,6 @@ exports[`renders components/cascader/demo/custom-render.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
>
|
||||
<span>
|
||||
Zhejiang
|
||||
@@ -320,7 +319,6 @@ exports[`renders components/cascader/demo/default-value.tsx correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-select-content-value"
|
||||
style="visibility:visible"
|
||||
title="Zhejiang / Hangzhou / West Lake"
|
||||
>
|
||||
Zhejiang / Hangzhou / West Lake
|
||||
@@ -899,10 +897,10 @@ exports[`renders components/cascader/demo/panel.tsx correctly 1`] = `
|
||||
stroke="#d9d9d9"
|
||||
>
|
||||
<path
|
||||
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
||||
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
|
||||
/>
|
||||
<path
|
||||
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
||||
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
|
||||
fill="#fafafa"
|
||||
/>
|
||||
</g>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user