repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/style/index.ts | components/masonry/style/index.ts | import type { CSSObject } from '@ant-design/cssinjs';
import type { FullToken, GenerateStyle } from '../../theme/internal';
import { genStyleHooks } from '../../theme/internal';
// biome-ignore lint/suspicious/noEmptyInterface: ComponentToken need to be empty by default
export interface ComponentToken {}
export inte... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/hooks/usePositions.ts | components/masonry/hooks/usePositions.ts | // Disabled the rule since `fill` is safe here
// but `Array.from` will increase bundle size.
/* eslint-disable unicorn/no-new-array */
import * as React from 'react';
import type { Key } from 'react';
export type ItemHeightData = [key: Key, height: number, column?: number];
export type ItemPositions = Map<
Key,
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/hooks/useDelay.ts | components/masonry/hooks/useDelay.ts | import * as React from 'react';
import { useEvent } from '@rc-component/util';
import raf from '@rc-component/util/lib/raf';
export default function useDelay(callback: VoidFunction) {
const idRef = React.useRef<number>(0);
const clearRaf = () => {
raf.cancel(idRef.current);
};
React.useEffect(() => clear... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/hooks/useRefs.ts | components/masonry/hooks/useRefs.ts | import * as React from 'react';
export default function useRefs() {
const refs = React.useRef<Map<React.Key, HTMLDivElement | null> | null>(null);
if (refs.current === null) {
refs.current = new Map();
}
const setRef = (key: React.Key, element: HTMLDivElement | null) => {
refs.current!.set(key, eleme... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/__tests__/index.test.tsx | components/masonry/__tests__/index.test.tsx | import React from 'react';
import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook';
import Masonry from '..';
import type { MasonryProps } from '..';
import { render, triggerResize, waitFakeTimer } from '../../../tests/utils';
const resizeMasonry = async () => {
triggerResize(document.body.queryS... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/__tests__/demo.test.ts | components/masonry/__tests__/demo.test.ts | import demoTest from '../../../tests/shared/demoTest';
demoTest('masonry', {
skip: ['dynamic.tsx'],
});
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/__tests__/demo-extend.test.ts | components/masonry/__tests__/demo-extend.test.ts | import { extendTest } from '../../../tests/shared/demoTest';
extendTest('masonry', {
skip: ['dynamic.tsx'],
});
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/__tests__/semantic.test.tsx | components/masonry/__tests__/semantic.test.tsx | import type { MasonryProps } from '..';
describe('Masonry.Semantic', () => {
it('should support classNames and styles props types', () => {
const customClassNames = {
root: 'custom-root-class',
item: 'custom-item-class',
};
const customStyles = {
root: {
border: '2px solid red'... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/demo/_semantic.tsx | components/masonry/demo/_semantic.tsx | import React from 'react';
import { Card, Masonry } from 'antd';
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
import useLocale from '../../../.dumi/hooks/useLocale';
const locales = {
cn: {
root: '根元素,设置相对定位、flex布局和瀑布流容器样式',
item: '条目元素,设置绝对定位、宽度计算、过渡动画和瀑布流项目样式',
},
en: {
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/demo/fresh.tsx | components/masonry/demo/fresh.tsx | import React from 'react';
import { Card, Masonry } from 'antd';
function RandomHeightCard(props: { index: number; defaultHeight: number }) {
const [height, setHeight] = React.useState(props.defaultHeight);
return (
<Card
size="small"
style={{ height, transition: 'height 0.3s' }}
onClick={()... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/demo/basic.tsx | components/masonry/demo/basic.tsx | import React from 'react';
import { Card, Masonry } from 'antd';
import type { MasonryItemType } from '../MasonryItem';
const heights = [150, 50, 90, 70, 110, 150, 130, 80, 50, 90, 100, 150, 60, 50, 80].map(
(height, index) => {
const item: MasonryItemType = {
key: `item-${index}`,
data: height,
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/demo/responsive.tsx | components/masonry/demo/responsive.tsx | import React from 'react';
import { Card, Masonry } from 'antd';
const heights = [120, 55, 85, 160, 95, 140, 75, 110, 65, 130, 90, 145, 55, 100, 80];
const App: React.FC = () => {
const items = heights.map((height, index) => ({
key: `item-${index}`,
data: height,
index,
}));
return (
<Masonry
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/demo/dynamic.tsx | components/masonry/demo/dynamic.tsx | import React, { useState } from 'react';
import { CloseOutlined } from '@ant-design/icons';
import { Button, Card, Flex, theme } from 'antd';
import Masonry from '../Masonry';
const heights = [150, 50, 90, 70, 110, 150, 130, 80, 50, 90, 100, 150, 70, 50, 80];
type ItemType = {
key: number;
column?: number;
dat... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/demo/image.tsx | components/masonry/demo/image.tsx | import React from 'react';
import { Masonry } from 'antd';
const imageList = [
'https://images.unsplash.com/photo-1510001618818-4b4e3d86bf0f',
'https://images.unsplash.com/photo-1507513319174-e556268bb244',
'https://images.unsplash.com/photo-1474181487882-5abf3f0ba6c2',
'https://images.unsplash.com/photo-14927... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/masonry/demo/style-class.tsx | components/masonry/demo/style-class.tsx | import React from 'react';
import { Card, Divider, Flex, Masonry, Typography } from 'antd';
import type { MasonryProps } from 'antd';
import { createStyles } from 'antd-style';
import type { MasonryItemType } from 'antd/es/masonry/MasonryItem';
const { Title } = Typography;
const useStyles = createStyles(() => ({
ro... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/PreviewGroup.tsx | components/image/PreviewGroup.tsx | import * as React from 'react';
import CloseOutlined from '@ant-design/icons/CloseOutlined';
import LeftOutlined from '@ant-design/icons/LeftOutlined';
import RightOutlined from '@ant-design/icons/RightOutlined';
import RotateLeftOutlined from '@ant-design/icons/RotateLeftOutlined';
import RotateRightOutlined from '@an... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/index.tsx | components/image/index.tsx | import * as React from 'react';
import RcImage from '@rc-component/image';
import type { ImageProps as RcImageProps } from '@rc-component/image';
import { clsx } from 'clsx';
import type {
MaskType,
SemanticClassNames,
SemanticClassNamesType,
SemanticStyles,
SemanticStylesType,
} from '../_util/hooks';
impor... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/style/index.ts | components/image/style/index.ts | import type { CSSObject } from '@ant-design/cssinjs';
import { unit } from '@ant-design/cssinjs';
import { FastColor } from '@ant-design/fast-color';
import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal';
import { genStyleHooks, mergeToken } from '../../theme/internal';
export interfac... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/hooks/usePreviewConfig.ts | components/image/hooks/usePreviewConfig.ts | import { isValidElement, useMemo } from 'react';
import type { PreviewConfig } from '..';
import type { MaskType } from '../../_util/hooks';
import { devUseWarning } from '../../_util/warning';
import type { GroupPreviewConfig } from '../PreviewGroup';
function normalizeMask(mask?: MaskType | React.ReactNode) {
if ... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/hooks/useMergedPreviewConfig.ts | components/image/hooks/useMergedPreviewConfig.ts | import React from 'react';
import { clsx } from 'clsx';
import type { PreviewConfig } from '..';
import { useMergedMask, useZIndex } from '../../_util/hooks';
import type { MaskType } from '../../_util/hooks';
import { getTransitionName } from '../../_util/motion';
import type { GroupPreviewConfig } from '../PreviewGr... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/__tests__/a11y.test.ts | components/image/__tests__/a11y.test.ts | import accessibilityDemoTest from '../../../tests/shared/accessibilityTest';
accessibilityDemoTest('image', { disabledRules: ['image-alt', 'label'] });
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/__tests__/index.test.tsx | components/image/__tests__/index.test.tsx | import React from 'react';
import { Modal } from 'antd';
import Image from '..';
import type { MaskType } from '../../_util/hooks';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
import { fireEvent, render } from '../../../tests/utils';
import ConfigProvid... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/__tests__/image.test.ts | components/image/__tests__/image.test.ts | import { imageDemoTest } from '../../../tests/shared/imageTest';
describe('Image image', () => {
imageDemoTest('image');
});
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/__tests__/demo.test.ts | components/image/__tests__/demo.test.ts | import demoTest from '../../../tests/shared/demoTest';
demoTest('image');
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/__tests__/deprecated.test.tsx | components/image/__tests__/deprecated.test.tsx | import React from 'react';
import Image from '..';
import { resetWarned } from '../../_util/warning';
import { fireEvent, render } from '../../../tests/utils';
describe('Image.Deprecated', () => {
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
beforeEach(() => {
resetWarned();
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/__tests__/demo-extend.test.ts | components/image/__tests__/demo-extend.test.ts | import { extendTest } from '../../../tests/shared/demoTest';
extendTest('image');
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/__tests__/semantic.test.tsx | components/image/__tests__/semantic.test.tsx | import React from 'react';
import Image from '..';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
import { render } from '../../../tests/utils';
import type { ImageProps } from '../index';
const src = 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVy... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/coverPlacement.tsx | components/image/demo/coverPlacement.tsx | import React from 'react';
import { ZoomInOutlined } from '@ant-design/icons';
import { Image, Space } from 'antd';
const App: React.FC = () => {
return (
<Space size={16}>
<Image
width={96}
alt="basic image"
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJ... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/preview-group.tsx | components/image/demo/preview-group.tsx | import React from 'react';
import { Image } from 'antd';
const App: React.FC = () => (
<Image.PreviewGroup
preview={{
onChange: (current, prev) => console.log(`current index: ${current}, prev index: ${prev}`),
}}
>
<Image
alt="svg image"
width={200}
src="https://gw.alipayobjects... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/_semantic.tsx | components/image/demo/_semantic.tsx | import React from 'react';
import { Flex, Image, theme } from 'antd';
import type { ImageProps } from 'antd';
import type { ImageProps as RcImageProps } from '@rc-component/image';
import { createStyles, css } from 'antd-style';
import { clsx } from 'clsx';
import useLocale from '../../../.dumi/hooks/useLocale';
impor... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/controlled-preview.tsx | components/image/demo/controlled-preview.tsx | import React, { useState } from 'react';
import { Button, Image, InputNumber } from 'antd';
const App: React.FC = () => {
const [open, setOpen] = useState(false);
const [scaleStep, setScaleStep] = useState(0.5);
return (
<>
<div>
scaleStep:{' '}
<InputNumber
min={0.1}
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/preview-mask.tsx | components/image/demo/preview-mask.tsx | import React from 'react';
import { ZoomInOutlined } from '@ant-design/icons';
import { Image, Space } from 'antd';
const App: React.FC = () => (
<Image
width={96}
alt="basic image"
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
classNames={{
popup: {
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/fallback.tsx | components/image/demo/fallback.tsx | import React from 'react';
import { Image } from 'antd';
const App: React.FC = () => (
<Image
alt="basic image"
width={200}
height={200}
src="error"
fallback="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDC... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/placeholder.tsx | components/image/demo/placeholder.tsx | import React, { useState } from 'react';
import { Button, Image, Space } from 'antd';
const App: React.FC = () => {
const [random, setRandom] = useState<number>(() => Date.now());
return (
<Space size={12}>
<Image
width={200}
alt="basic image"
src={`https://zos.alipayobjects.com/... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/imageRender.tsx | components/image/demo/imageRender.tsx | import React from 'react';
import { Image } from 'antd';
const App: React.FC = () => (
<Image
width={200}
alt="basic image"
preview={{
imageRender: () => (
<video
muted
width="100%"
controls
src="https://mdn.alipayobjects.com/huamei_iwk9zp/afts/file/A... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/preview-group-visible.tsx | components/image/demo/preview-group-visible.tsx | import React from 'react';
import { Image } from 'antd';
const App: React.FC = () => (
<Image.PreviewGroup
items={[
'https://gw.alipayobjects.com/zos/antfincdn/LlvErxo8H9/photo-1503185912284-5271ff81b9a8.webp',
'https://gw.alipayobjects.com/zos/antfincdn/cV16ZqzMjW/photo-1473091540282-9b846e7965e3.we... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/preview-group-top-progress.tsx | components/image/demo/preview-group-top-progress.tsx | import React from 'react';
import { Image } from 'antd';
const App: React.FC = () => (
<Image.PreviewGroup
preview={{ countRender: (current, total) => `当前 ${current} / 总计 ${total}` }}
>
<Image
alt="svg image"
width={150}
src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/previewSrc.tsx | components/image/demo/previewSrc.tsx | import React from 'react';
import { Image } from 'antd';
const App: React.FC = () => (
<Image
width={200}
alt="basic image"
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?x-oss-process=image/blur,r_50,s_50/quality,q_1/resize,m_mfit,h_200,w_200"
preview={{
src:... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/component-token.tsx | components/image/demo/component-token.tsx | import React from 'react';
import { ConfigProvider, Image } from 'antd';
const App: React.FC = () => (
<ConfigProvider
theme={{
components: {
Image: {
previewOperationSize: 20,
previewOperationColor: '#222',
previewOperationColorDisabled: '#b20000',
},
},... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/basic.tsx | components/image/demo/basic.tsx | import React from 'react';
import { Image } from 'antd';
const App: React.FC = () => (
<Image
width={200}
alt="basic"
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
/>
);
export default App;
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/nested.tsx | components/image/demo/nested.tsx | import React, { useState } from 'react';
import { Button, Divider, Image, Modal } from 'antd';
const App: React.FC = () => {
const [show1, setShow1] = useState(false);
const [show2, setShow2] = useState(false);
const [show3, setShow3] = useState(false);
return (
<>
<Button
onClick={() => {
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/preview-imgInfo.tsx | components/image/demo/preview-imgInfo.tsx | import React from 'react';
import { Image } from 'antd';
const src = 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png';
const App: React.FC = () => (
<Image
src={src}
width="200px"
height="200px"
alt="test"
preview={{
imageRender: (_, { image }) => <div>{JSON.s... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/mask.tsx | components/image/demo/mask.tsx | import React from 'react';
import { Image, Space } from 'antd';
const App: React.FC = () => {
return (
<Space>
<Image
width={100}
alt="Default blur"
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
preview={{
mask: true,
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/toolbarRender.tsx | components/image/demo/toolbarRender.tsx | import React from 'react';
import {
DownloadOutlined,
LeftOutlined,
RightOutlined,
RotateLeftOutlined,
RotateRightOutlined,
SwapOutlined,
UndoOutlined,
ZoomInOutlined,
ZoomOutOutlined,
} from '@ant-design/icons';
import { Image, Space } from 'antd';
const imageList = [
'https://gw.alipayobjects.com... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/image/demo/style-class.tsx | components/image/demo/style-class.tsx | import React from 'react';
import { Flex, Image } from 'antd';
import type { ImageProps } from 'antd';
import { createStyles } from 'antd-style';
const useStyles = createStyles(() => ({
root: {
padding: 4,
borderRadius: 8,
overflow: 'hidden',
},
}));
const styles: ImageProps['styles'] = {
image: {
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/BreadcrumbItem.tsx | components/breadcrumb/BreadcrumbItem.tsx | import * as React from 'react';
import DownOutlined from '@ant-design/icons/DownOutlined';
import clsx from 'clsx';
import isNonNullable from '../_util/isNonNullable';
import { ConfigContext } from '../config-provider';
import type { DropdownProps } from '../dropdown/dropdown';
import Dropdown from '../dropdown/dropdo... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/BreadcrumbContext.ts | components/breadcrumb/BreadcrumbContext.ts | import React from 'react';
import type { SemanticClassNames, SemanticStyles } from '../_util/hooks';
export type SemanticName = 'root' | 'item' | 'separator';
export interface BreadcrumbContextProps {
classNames?: SemanticClassNames<SemanticName>;
styles?: SemanticStyles<SemanticName>;
}
const BreadcrumbContext... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/index.tsx | components/breadcrumb/index.tsx | import Breadcrumb from './Breadcrumb';
export type { BreadcrumbProps } from './Breadcrumb';
export type { BreadcrumbItemProps, SeparatorType } from './BreadcrumbItem';
export default Breadcrumb;
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/useItems.ts | components/breadcrumb/useItems.ts | import { useMemo } from 'react';
import type { BreadcrumbItemType, BreadcrumbSeparatorType, ItemType } from './Breadcrumb';
type MergedType = BreadcrumbItemType & {
children?: ItemType['children'];
};
function route2item(route: ItemType): MergedType {
const { breadcrumbName, children, ...rest } = route;
const... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/useItemRender.tsx | components/breadcrumb/useItemRender.tsx | import * as React from 'react';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import { clsx } from 'clsx';
import isNonNullable from '../_util/isNonNullable';
import type { BreadcrumbProps, InternalRouteType, ItemType } from './Breadcrumb';
type AddParameters<TFunction extends (...args: any) => any, TPara... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/BreadcrumbSeparator.tsx | components/breadcrumb/BreadcrumbSeparator.tsx | import * as React from 'react';
import { clsx } from 'clsx';
import { ConfigContext } from '../config-provider';
import BreadcrumbContext from './BreadcrumbContext';
type CompoundedComponent = React.FC<React.PropsWithChildren> & {
/** @internal */
__ANT_BREADCRUMB_SEPARATOR: boolean;
};
const BreadcrumbSeparator... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/Breadcrumb.tsx | components/breadcrumb/Breadcrumb.tsx | import * as React from 'react';
import { toArray } from '@rc-component/util';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import { clsx } from 'clsx';
import { useMergeSemantic } from '../_util/hooks';
import type { SemanticClassNamesType, SemanticStylesType } from '../_util/hooks';
import { cloneElement... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/style/index.ts | components/breadcrumb/style/index.ts | import { unit } from '@ant-design/cssinjs';
import type { CSSObject } from '@ant-design/cssinjs';
import { genFocusStyle, resetComponent } from '../../style';
import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal';
import { genStyleHooks, mergeToken } from '../../theme/internal';
export... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/__tests__/Breadcrumb.test.tsx | components/breadcrumb/__tests__/Breadcrumb.test.tsx | import React from 'react';
import { accessibilityTest } from '../../../tests/shared/accessibilityTest';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
import { render } from '../../../tests/utils';
import ConfigProvider from '../../config-provider';
import... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/__tests__/a11y.test.ts | components/breadcrumb/__tests__/a11y.test.ts | import accessibilityDemoTest from '../../../tests/shared/accessibilityTest';
accessibilityDemoTest('breadcrumb');
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/__tests__/itemRender.test.tsx | components/breadcrumb/__tests__/itemRender.test.tsx | import React from 'react';
import { render } from '../../../tests/utils';
import Breadcrumb from '../index';
describe('Breadcrumb.ItemRender', () => {
it('render as expect', () => {
const { container } = render(
<Breadcrumb
items={[
{
path: '/',
title: 'Home',
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/__tests__/image.test.ts | components/breadcrumb/__tests__/image.test.ts | import { imageDemoTest } from '../../../tests/shared/imageTest';
describe('Breadcrumb image', () => {
imageDemoTest('breadcrumb', { skip: ['react-router.tsx'] });
});
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/__tests__/router.test.tsx | components/breadcrumb/__tests__/router.test.tsx | import React from 'react';
import { MemoryRouter, useLocation } from 'react-router-dom';
import type { Location as ReactRouterLocation } from 'react-router-dom';
import { render } from '../../../tests/utils';
import Breadcrumb from '../index';
describe('react router', () => {
beforeAll(() => {
jest.useFakeTimer... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/__tests__/demo.test.ts | components/breadcrumb/__tests__/demo.test.ts | import demoTest from '../../../tests/shared/demoTest';
demoTest('breadcrumb', { skip: ['react-router.tsx'] });
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/__tests__/demo-extend.test.ts | components/breadcrumb/__tests__/demo-extend.test.ts | import { extendTest } from '../../../tests/shared/demoTest';
extendTest('breadcrumb', { skip: ['react-router.tsx'] });
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/__tests__/semantic.test.tsx | components/breadcrumb/__tests__/semantic.test.tsx | import React from 'react';
import { render } from '../../../tests/utils';
import Breadcrumb from '..';
describe('Breadcrumb.Semantic', () => {
it('should support function classNames and styles', () => {
const classNamesFn: React.ComponentProps<typeof Breadcrumb>['classNames'] = (info) => {
const len = inf... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/design/behavior-pattern.tsx | components/breadcrumb/design/behavior-pattern.tsx | import React from 'react';
import useLocale from '../../../.dumi/hooks/useLocale';
import BehaviorMap from '../../../.dumi/theme/common/BehaviorMap';
const locales = {
cn: {
title: '了解当前所处页面的位置并向上导航',
determineLocation: '确定位置',
understandCurrentPageLocation: '了解当前页面的位置',
understandSystemHierarchy: '... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/demo/debug-routes.tsx | components/breadcrumb/demo/debug-routes.tsx | import React from 'react';
import { Breadcrumb } from 'antd';
export default () => (
<Breadcrumb
routes={[
{
path: '/home',
breadcrumbName: 'Home',
},
{
path: '/user',
breadcrumbName: 'User',
children: [
{
path: '/user1',
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/demo/_semantic.tsx | components/breadcrumb/demo/_semantic.tsx | import React from 'react';
import { HomeOutlined, UserOutlined } from '@ant-design/icons';
import { Breadcrumb } from 'antd';
import type { BreadcrumbProps } from 'antd';
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
import useLocale from '../../../.dumi/hooks/useLocale';
const locales = ... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/demo/withParams.tsx | components/breadcrumb/demo/withParams.tsx | import React from 'react';
import { Breadcrumb } from 'antd';
const App: React.FC = () => (
<Breadcrumb
items={[
{
title: 'Users',
},
{
title: ':id',
href: '',
},
]}
params={{ id: 1 }}
/>
);
export default App;
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/demo/separator.tsx | components/breadcrumb/demo/separator.tsx | import React from 'react';
import { Breadcrumb } from 'antd';
const App: React.FC = () => (
<Breadcrumb
separator=">"
items={[
{
title: 'Home',
},
{
title: 'Application Center',
href: '',
},
{
title: 'Application List',
href: '',
},
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/demo/withIcon.tsx | components/breadcrumb/demo/withIcon.tsx | import React from 'react';
import { HomeOutlined, UserOutlined } from '@ant-design/icons';
import { Breadcrumb } from 'antd';
const App: React.FC = () => (
<Breadcrumb
items={[
{
href: '',
title: <HomeOutlined />,
},
{
href: '',
title: (
<>
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/demo/component-token.tsx | components/breadcrumb/demo/component-token.tsx | import React from 'react';
import { HomeOutlined, UserOutlined } from '@ant-design/icons';
import { Breadcrumb, ConfigProvider } from 'antd';
const menuItems = [
{
key: '1',
label: (
<a target="_blank" rel="noopener noreferrer" href="http://www.alipay.com/">
General
</a>
),
},
{
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/demo/separator-component.tsx | components/breadcrumb/demo/separator-component.tsx | import React from 'react';
import { Breadcrumb } from 'antd';
const App: React.FC = () => (
<Breadcrumb
separator=""
items={[
{
title: 'Location',
},
{
type: 'separator',
separator: ':',
},
{
href: '',
title: 'Application Center',
},... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/demo/basic.tsx | components/breadcrumb/demo/basic.tsx | import React from 'react';
import { Breadcrumb } from 'antd';
const App: React.FC = () => {
return (
<Breadcrumb
items={[
{
title: 'Home',
},
{
title: <a href="">Application Center</a>,
},
{
title: <a href="">Application List</a>,
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/demo/overlay.tsx | components/breadcrumb/demo/overlay.tsx | import React from 'react';
import { Breadcrumb } from 'antd';
const menuItems = [
{
key: '1',
label: (
<a target="_blank" rel="noopener noreferrer" href="http://www.alipay.com/">
General
</a>
),
},
{
key: '2',
label: (
<a target="_blank" rel="noopener noreferrer" hre... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/breadcrumb/demo/style-class.tsx | components/breadcrumb/demo/style-class.tsx | import React from 'react';
import { Breadcrumb, Flex } from 'antd';
import type { BreadcrumbProps } from 'antd';
import { createStyles } from 'antd-style';
const useStyles = createStyles(() => ({
root: { padding: 8, borderRadius: 4 },
item: { color: '#1890ff' },
separator: { color: 'rgba(0, 0, 0, 0.45)' },
}));
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/index.tsx | components/carousel/index.tsx | import * as React from 'react';
import type { Settings } from '@ant-design/react-slick';
import SlickCarousel from '@ant-design/react-slick';
import { toArray } from '@rc-component/util';
import { clsx } from 'clsx';
import { devUseWarning } from '../_util/warning';
import { useComponentConfig } from '../config-provid... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/style/index.ts | components/carousel/style/index.ts | import { Keyframes, unit } from '@ant-design/cssinjs';
import { resetComponent } from '../../style';
import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal';
import { genStyleHooks } from '../../theme/internal';
export interface ComponentToken {
/**
* @desc 指示点宽度
* @descEN Width ... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/__tests__/a11y.test.ts | components/carousel/__tests__/a11y.test.ts | import accessibilityDemoTest from '../../../tests/shared/accessibilityTest';
accessibilityDemoTest('carousel');
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/__tests__/index.test.tsx | components/carousel/__tests__/index.test.tsx | import React from 'react';
import type { CarouselRef, DotPlacement } from '..';
import Carousel from '..';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
import { fireEvent, render, waitFakeTimer } from '../../../tests/utils';
import ConfigProvider from '.... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/__tests__/image.test.ts | components/carousel/__tests__/image.test.ts | import { imageDemoTest } from '../../../tests/shared/imageTest';
describe('Carousel image', () => {
imageDemoTest('carousel', {
ssr: true,
});
});
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/__tests__/demo.test.ts | components/carousel/__tests__/demo.test.ts | import demoTest from '../../../tests/shared/demoTest';
demoTest('carousel');
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/__tests__/demo-extend.test.ts | components/carousel/__tests__/demo-extend.test.ts | import { extendTest } from '../../../tests/shared/demoTest';
extendTest('carousel');
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/demo/arrows.tsx | components/carousel/demo/arrows.tsx | import React from 'react';
import { Carousel } from 'antd';
const contentStyle: React.CSSProperties = {
margin: 0,
height: '160px',
color: '#fff',
lineHeight: '160px',
textAlign: 'center',
background: '#364d79',
};
const App: React.FC = () => (
<>
<Carousel arrows infinite={false}>
<div>
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/demo/fade.tsx | components/carousel/demo/fade.tsx | import React from 'react';
import { Carousel } from 'antd';
const contentStyle: React.CSSProperties = {
margin: 0,
height: '160px',
color: '#fff',
lineHeight: '160px',
textAlign: 'center',
background: '#364d79',
};
const App: React.FC = () => (
<Carousel effect="fade">
<div>
<h3 style={content... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/demo/autoplay.tsx | components/carousel/demo/autoplay.tsx | import React from 'react';
import { Carousel } from 'antd';
const contentStyle: React.CSSProperties = {
margin: 0,
height: '160px',
color: '#fff',
lineHeight: '160px',
textAlign: 'center',
background: '#364d79',
};
const App: React.FC = () => (
<Carousel autoplay>
<div>
<h3 style={contentStyle... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/demo/component-token.tsx | components/carousel/demo/component-token.tsx | import React from 'react';
import { Carousel, ConfigProvider } from 'antd';
/** Test usage. Do not use in your production. */
const contentStyle: React.CSSProperties = {
margin: 0,
height: '160px',
color: '#fff',
lineHeight: '160px',
textAlign: 'center',
background: '#364d79',
};
export default () => (
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/demo/placement.tsx | components/carousel/demo/placement.tsx | import React, { useState } from 'react';
import type { CarouselProps, RadioChangeEvent } from 'antd';
import { Carousel, Radio } from 'antd';
type DotPlacement = CarouselProps['dotPlacement'];
const contentStyle: React.CSSProperties = {
margin: 0,
height: '160px',
color: '#fff',
lineHeight: '160px',
textAli... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/demo/basic.tsx | components/carousel/demo/basic.tsx | import React from 'react';
import { Carousel } from 'antd';
const contentStyle: React.CSSProperties = {
margin: 0,
height: '160px',
color: '#fff',
lineHeight: '160px',
textAlign: 'center',
background: '#364d79',
};
const App: React.FC = () => {
const onChange = (currentSlide: number) => {
console.lo... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/carousel/demo/dot-duration.tsx | components/carousel/demo/dot-duration.tsx | import React from 'react';
import { Carousel } from 'antd';
const contentStyle: React.CSSProperties = {
margin: 0,
height: '160px',
color: '#fff',
lineHeight: '160px',
textAlign: 'center',
background: '#364d79',
};
const App: React.FC = () => (
<Carousel autoplay={{ dotDuration: true }} autoplaySpeed={5... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/App.tsx | components/app/App.tsx | import type { ReactNode } from 'react';
import React, { useContext } from 'react';
import { clsx } from 'clsx';
import type { AnyObject, CustomComponent } from '../_util/type';
import { devUseWarning } from '../_util/warning';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigContext } from... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/index.tsx | components/app/index.tsx | import type { AppProps } from './App';
import App_ from './App';
import useApp from './useApp';
export type { AppProps };
type CompoundedComponent = typeof App_ & {
useApp: typeof useApp;
};
const App = App_ as CompoundedComponent;
App.useApp = useApp;
export default App;
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/useApp.ts | components/app/useApp.ts | import React from 'react';
import type { useAppProps } from './context';
import AppContext from './context';
const useApp = () => React.useContext<useAppProps>(AppContext);
export default useApp;
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/context.ts | components/app/context.ts | import React from 'react';
import type { ConfigOptions as MessageConfig, MessageInstance } from '../message/interface';
import type { HookAPI as ModalHookAPI } from '../modal/useModal';
import type { NotificationConfig, NotificationInstance } from '../notification/interface';
export interface AppConfig {
message?: ... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/style/index.ts | components/app/style/index.ts | import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal';
import { genStyleHooks } from '../../theme/internal';
// biome-ignore lint/suspicious/noEmptyInterface: ComponentToken need to be empty by default
export interface ComponentToken {}
interface AppToken extends FullToken<'App'> {}
/... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/__tests__/a11y.test.ts | components/app/__tests__/a11y.test.ts | import accessibilityDemoTest from '../../../tests/shared/accessibilityTest';
accessibilityDemoTest('app');
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/__tests__/index.test.tsx | components/app/__tests__/index.test.tsx | import React, { useEffect } from 'react';
import { SmileOutlined } from '@ant-design/icons';
import ConfigProvider from 'antd/es/config-provider';
import type { NotificationConfig } from 'antd/es/notification/interface';
import App from '..';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/__tests__/image.test.ts | components/app/__tests__/image.test.ts | import { imageDemoTest } from '../../../tests/shared/imageTest';
describe('app', () => {
imageDemoTest('app');
});
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/__tests__/demo.test.ts | components/app/__tests__/demo.test.ts | import demoTest from '../../../tests/shared/demoTest';
demoTest('app');
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/__tests__/demo-extend.test.ts | components/app/__tests__/demo-extend.test.ts | import { extendTest } from '../../../tests/shared/demoTest';
extendTest('app');
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/demo/basic.tsx | components/app/demo/basic.tsx | import React from 'react';
import { App, Button, Space } from 'antd';
// Sub page
const MyPage = () => {
const { message, modal, notification } = App.useApp();
const showMessage = () => {
message.success('Success!');
};
const showModal = () => {
modal.warning({
title: 'This is a warning message... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/app/demo/config.tsx | components/app/demo/config.tsx | import React from 'react';
import { App, Button, Space } from 'antd';
// Sub page
const MyPage = () => {
const { message, notification } = App.useApp();
const showMessage = () => {
message.success('Success!');
};
const showNotification = () => {
notification.info({
title: 'Notification',
... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/collapse/CollapsePanel.tsx | components/collapse/CollapsePanel.tsx | import * as React from 'react';
import RcCollapse from '@rc-component/collapse';
import { clsx } from 'clsx';
import { devUseWarning } from '../_util/warning';
import { ConfigContext } from '../config-provider';
export type CollapsibleType = 'header' | 'icon' | 'disabled';
export interface CollapsePanelProps {
key... | typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
ant-design/ant-design | https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/collapse/index.tsx | components/collapse/index.tsx | import Collapse from './Collapse';
export type {
CollapseClassNamesType,
CollapseProps,
CollapseSemanticName,
CollapseStylesType,
} from './Collapse';
export type { CollapsePanelProps } from './CollapsePanel';
export default Collapse;
| typescript | MIT | 283b2822e0c371d083a1eaf51cfb1120c5cc4ffe | 2026-01-04T15:25:31.760576Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.