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/card/demo/simple.tsx
components/card/demo/simple.tsx
import React from 'react'; import { Card } from 'antd'; const App: React.FC = () => ( <Card style={{ width: 300 }}> <p>Card content</p> <p>Card content</p> <p>Card content</p> </Card> ); 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/card/demo/meta.tsx
components/card/demo/meta.tsx
import React from 'react'; import { EditOutlined, EllipsisOutlined, SettingOutlined } from '@ant-design/icons'; import { Avatar, Card } from 'antd'; const { Meta } = Card; const App: React.FC = () => ( <Card style={{ width: 300 }} cover={ <img draggable={false} alt="example" sr...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/card/demo/loading.tsx
components/card/demo/loading.tsx
import React, { useState } from 'react'; import { EditOutlined, EllipsisOutlined, SettingOutlined } from '@ant-design/icons'; import { Avatar, Card, Flex, Switch } from 'antd'; const actions: React.ReactNode[] = [ <EditOutlined key="edit" />, <SettingOutlined key="setting" />, <EllipsisOutlined key="ellipsis" />...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/card/demo/in-column.tsx
components/card/demo/in-column.tsx
import React from 'react'; import { Card, Col, Row } from 'antd'; const App: React.FC = () => ( <Row gutter={16}> <Col span={8}> <Card title="Card title" variant="borderless"> Card content </Card> </Col> <Col span={8}> <Card title="Card title" variant="borderless"> Card ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/card/demo/style-class.tsx
components/card/demo/style-class.tsx
import React from 'react'; import { EditOutlined, HeartOutlined, ShareAltOutlined } from '@ant-design/icons'; import { Avatar, Button, Card, Flex } from 'antd'; import type { CardMetaProps, CardProps } from 'antd'; import { createStyles } from 'antd-style'; const { Meta } = Card; const useStyles = createStyles(({ tok...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/Row.tsx
components/descriptions/Row.tsx
import * as React from 'react'; import type { InternalDescriptionsItemType } from '.'; import Cell from './Cell'; import type { DescriptionsContextProps } from './DescriptionsContext'; import DescriptionsContext from './DescriptionsContext'; interface CellConfig { component: string | [string, string]; type: '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/descriptions/Cell.tsx
components/descriptions/Cell.tsx
import * as React from 'react'; import type { JSX } from 'react'; import { clsx } from 'clsx'; import type { DescriptionsClassNamesType, DescriptionsStylesType } from '.'; import { useMergeSemantic } from '../_util/hooks'; import type { SemanticClassNames, SemanticStyles } from '../_util/hooks'; import isNonNullable f...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/constant.ts
components/descriptions/constant.ts
import type { Breakpoint } from '../_util/responsiveObserver'; const DEFAULT_COLUMN_MAP: Record<Breakpoint, number> = { xxl: 3, xl: 3, lg: 3, md: 3, sm: 2, xs: 1, }; export default DEFAULT_COLUMN_MAP;
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/index.tsx
components/descriptions/index.tsx
/* eslint-disable react/no-array-index-key */ import * as React from 'react'; import { clsx } from 'clsx'; import { useMergeSemantic } from '../_util/hooks'; import type { SemanticClassNamesType, SemanticStylesType } from '../_util/hooks'; import type { Breakpoint } from '../_util/responsiveObserver'; import { matchSc...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/DescriptionsContext.ts
components/descriptions/DescriptionsContext.ts
import React from 'react'; import type { SemanticClassNames, SemanticStyles } from '../_util/hooks'; export type SemanticName = 'label' | 'content'; export interface DescriptionsContextProps { /** @deprecated Please use `styles.label` instead */ labelStyle?: React.CSSProperties; /** @deprecated Please use `sty...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/Item.ts
components/descriptions/Item.ts
import type * as React from 'react'; import type { SemanticClassNames, SemanticStyles } from '../_util/hooks'; import type { Breakpoint } from '../_util/responsiveObserver'; type SemanticName = 'label' | 'content'; export interface DescriptionsItemProps { prefixCls?: string; className?: string; style?: React.C...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/style/index.ts
components/descriptions/style/index.ts
import { unit } from '@ant-design/cssinjs'; import type { CSSObject } from '@ant-design/cssinjs'; import { resetComponent, textEllipsis } from '../../style'; import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal'; import { genStyleHooks, mergeToken } from '../../theme/internal'; /** 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/descriptions/hooks/useItems.ts
components/descriptions/hooks/useItems.ts
import * as React from 'react'; import { toArray } from '@rc-component/util'; import type { DescriptionsItemType, InternalDescriptionsItemType } from '..'; import { matchScreen } from '../../_util/responsiveObserver'; import type { ScreenMap } from '../../_util/responsiveObserver'; // Convert children into items cons...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/hooks/useRow.ts
components/descriptions/hooks/useRow.ts
import { useMemo } from 'react'; import type { InternalDescriptionsItemType } from '..'; import { devUseWarning } from '../../_util/warning'; // Calculate the sum of span in a row function getCalcRows( rowItems: InternalDescriptionsItemType[], mergedColumn: number, ): [rows: InternalDescriptionsItemType[][], exce...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/__tests__/a11y.test.ts
components/descriptions/__tests__/a11y.test.ts
import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; accessibilityDemoTest('descriptions');
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/__tests__/index.test.tsx
components/descriptions/__tests__/index.test.tsx
import React from 'react'; import MockDate from 'mockdate'; import Descriptions from '..'; import { resetWarned } from '../../_util/warning'; import mountTest from '../../../tests/shared/mountTest'; import { render } from '../../../tests/utils'; import ConfigProvider from '../../config-provider'; describe('Descriptio...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/__tests__/type.test.tsx
components/descriptions/__tests__/type.test.tsx
import React from 'react'; import { render } from '../../../tests/utils'; import Descriptions from '..'; import { resetWarned } from '../../_util/warning'; describe('Descriptions.Item span property types', () => { const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); afterEach(() => { er...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/__tests__/image.test.ts
components/descriptions/__tests__/image.test.ts
import { imageDemoTest } from '../../../tests/shared/imageTest'; describe('Descriptions image', () => { imageDemoTest('descriptions'); });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/__tests__/demo.test.ts
components/descriptions/__tests__/demo.test.ts
import demoTest from '../../../tests/shared/demoTest'; demoTest('descriptions');
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/__tests__/hooks.test.tsx
components/descriptions/__tests__/hooks.test.tsx
import React from 'react'; import Descriptions from '..'; import { render } from '../../../tests/utils'; import useBreakpoint from '../../grid/hooks/useBreakpoint'; import useItems from '../hooks/useItems'; describe('Descriptions.Hooks', () => { it('Should Descriptions not throw react key prop error in jsx mode', (...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/__tests__/demo-extend.test.ts
components/descriptions/__tests__/demo-extend.test.ts
import { extendTest } from '../../../tests/shared/demoTest'; extendTest('descriptions');
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/__tests__/semantic.test.tsx
components/descriptions/__tests__/semantic.test.tsx
import React from 'react'; import Descriptions from '..'; import type { DescriptionsProps } from '..'; import { render } from '../../../tests/utils'; describe('Descriptions.Semantic', () => { it('should apply custom styles to Descriptions', () => { const customClassNames = { root: 'custom-root', hea...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/block.tsx
components/descriptions/demo/block.tsx
import React from 'react'; import { Descriptions } from 'antd'; import type { DescriptionsProps } from 'antd'; const items: DescriptionsProps['items'] = [ { label: 'UserName', children: 'Zhou Maomao', }, { label: 'Live', span: 'filled', // span = 2 children: 'Hangzhou, Zhejiang', }, { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/border.tsx
components/descriptions/demo/border.tsx
import React from 'react'; import { Badge, Descriptions } from 'antd'; import type { DescriptionsProps } from 'antd'; const items: DescriptionsProps['items'] = [ { key: '1', label: 'Product', children: 'Cloud Database', }, { key: '2', label: 'Billing Mode', children: 'Prepaid', }, { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/text.tsx
components/descriptions/demo/text.tsx
import React from 'react'; import { Badge, Descriptions, Table } from 'antd'; import type { DescriptionsProps, TableProps } from 'antd'; interface DataType { key: React.Key; name: string; age: number; address: string; } const dataSource: DataType[] = [ { key: '1', name: '胡彦斌', age: 32, addre...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/_semantic.tsx
components/descriptions/demo/_semantic.tsx
import React from 'react'; import { Button, Descriptions, Divider, Switch } from 'antd'; import type { DescriptionsProps } from 'antd'; import useLocale from '../../../.dumi/hooks/useLocale'; import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview'; const locales = { cn: { root: '根元素,包含描述列表容器的基...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/jsx.tsx
components/descriptions/demo/jsx.tsx
import React from 'react'; import { Descriptions } from 'antd'; const App: React.FC = () => ( <Descriptions title="User Info"> <Descriptions.Item label="UserName">Zhou Maomao</Descriptions.Item> <Descriptions.Item label="Telephone">1810000000</Descriptions.Item> <Descriptions.Item label="Live">Hangzhou, ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/component-token.tsx
components/descriptions/demo/component-token.tsx
import React, { useState } from 'react'; import type { DescriptionsProps, RadioChangeEvent } from 'antd'; import { Button, ConfigProvider, Descriptions, Radio } from 'antd'; const borderedItems: DescriptionsProps['items'] = [ { key: '1', label: 'Product', children: 'Cloud Database', }, { key: '2'...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/basic.tsx
components/descriptions/demo/basic.tsx
import React from 'react'; import { Descriptions } from 'antd'; import type { DescriptionsProps } from 'antd'; const items: DescriptionsProps['items'] = [ { key: '1', label: 'UserName', children: 'Zhou Maomao', }, { key: '2', label: 'Telephone', children: '1810000000', }, { 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/descriptions/demo/padding.tsx
components/descriptions/demo/padding.tsx
import React from 'react'; import { Descriptions, Flex } from 'antd'; import type { DescriptionsProps } from 'antd'; const items: DescriptionsProps['items'] = [ { key: '1', label: 'long', children: 'loooooooooooooooooooooooooooooooooooooooooooooooong', }, { key: '2', label: 'long', childr...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/responsive.tsx
components/descriptions/demo/responsive.tsx
import React from 'react'; import { Descriptions } from 'antd'; import type { DescriptionsProps } from 'antd'; const items: DescriptionsProps['items'] = [ { label: 'Product', children: 'Cloud Database', }, { label: 'Billing', children: 'Prepaid', }, { label: 'Time', children: '18:00:0...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/size.tsx
components/descriptions/demo/size.tsx
import React, { useState } from 'react'; import { Button, Descriptions, Radio } from 'antd'; import type { DescriptionsProps, RadioChangeEvent } from 'antd'; const borderedItems: DescriptionsProps['items'] = [ { key: '1', label: 'Product', children: 'Cloud Database', }, { key: '2', label: 'Bi...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/vertical-border.tsx
components/descriptions/demo/vertical-border.tsx
import React from 'react'; import { Badge, Descriptions } from 'antd'; import type { DescriptionsProps } from 'antd'; const items: DescriptionsProps['items'] = [ { key: '1', label: 'Product', children: 'Cloud Database', }, { key: '2', label: 'Billing Mode', children: 'Prepaid', }, { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/style.tsx
components/descriptions/demo/style.tsx
import React, { useState } from 'react'; import { Descriptions, Divider, Radio, Switch } from 'antd'; import type { DescriptionsProps } from 'antd'; const labelStyle: React.CSSProperties = { background: 'red' }; const contentStyle: React.CSSProperties = { background: 'green' }; type LayoutType = 'horizontal' | 'verti...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/descriptions/demo/vertical.tsx
components/descriptions/demo/vertical.tsx
import React from 'react'; import { Descriptions } from 'antd'; import type { DescriptionsProps } from 'antd'; const items: DescriptionsProps['items'] = [ { key: '1', label: 'UserName', children: 'Zhou Maomao', }, { key: '2', label: 'Telephone', children: '1810000000', }, { 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/descriptions/demo/style-class.tsx
components/descriptions/demo/style-class.tsx
import React from 'react'; import { Descriptions, Flex } from 'antd'; import type { DescriptionsProps } from 'antd'; import { createStyles } from 'antd-style'; const useStyle = createStyles(() => ({ root: { padding: 10, }, })); const items: DescriptionsProps['items'] = [ { key: '1', label: 'Product'...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/progress.tsx
components/progress/progress.tsx
import * as React from 'react'; import { FastColor } from '@ant-design/fast-color'; import CheckCircleFilled from '@ant-design/icons/CheckCircleFilled'; import CheckOutlined from '@ant-design/icons/CheckOutlined'; import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled'; import CloseOutlined from '@ant-desig...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/utils.ts
components/progress/utils.ts
import { presetPrimaryColors } from '@ant-design/colors'; import type { CircleProps } from './Circle'; import type { ProgressProps } from './progress'; export function validProgress(progress?: number) { if (!progress || progress < 0) { return 0; } if (progress > 100) { return 100; } return progress;...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/index.tsx
components/progress/index.tsx
import Progress from './progress'; export type { ProgressAriaProps, ProgressProps } from './progress'; export default Progress;
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/Circle.tsx
components/progress/Circle.tsx
import * as React from 'react'; import type { ProgressProps as RcProgressProps } from '@rc-component/progress'; import { Circle as RCCircle } from '@rc-component/progress'; import { omit } from '@rc-component/util'; import { clsx } from 'clsx'; import type { SemanticClassNames, SemanticStyles } from '../_util/hooks'; ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/Steps.tsx
components/progress/Steps.tsx
import * as React from 'react'; import { clsx } from 'clsx'; import type { SemanticClassNames, SemanticStyles } from '../_util/hooks'; import type { ProgressProps, SemanticName } from './progress'; import { getSize } from './utils'; interface ProgressStepsProps extends Omit<ProgressProps, 'classNames' | 'styles'> { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/Line.tsx
components/progress/Line.tsx
import * as React from 'react'; import { presetPrimaryColors } from '@ant-design/colors'; import { clsx } from 'clsx'; import type { SemanticClassNames, SemanticStyles } from '../_util/hooks'; import { devUseWarning } from '../_util/warning'; import type { DirectionType } from '../config-provider'; import type { Per...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/style/index.ts
components/progress/style/index.ts
import type { CSSObject } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; import { resetComponent } from '../../style'; import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal'; import { genStyleHooks, mergeToken } from '../../theme/internal'; export interface...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/__tests__/placement.test.tsx
components/progress/__tests__/placement.test.tsx
import React from 'react'; import { Circle } from '@rc-component/progress'; import { ConfigProvider } from 'antd'; import { render } from '../../../tests/utils'; import Progress from '../progress'; import type { GapPlacement, GapPosition } from '../progress'; jest.mock('@rc-component/progress', () => { const Actual...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/__tests__/a11y.test.ts
components/progress/__tests__/a11y.test.ts
import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; accessibilityDemoTest('progress', { // we can set aria attribute to fix it disabledRules: ['aria-progressbar-name'], // we can set aria attribute to fix it skip: ['circle-steps.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/progress/__tests__/index.test.tsx
components/progress/__tests__/index.test.tsx
import React, { useState } from 'react'; import { Tooltip } from 'antd'; import type { ProgressProps } from '..'; import Progress from '..'; import { resetWarned } from '../../_util/warning'; import mountTest from '../../../tests/shared/mountTest'; import rtlTest from '../../../tests/shared/rtlTest'; import { fireEven...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/__tests__/image.test.ts
components/progress/__tests__/image.test.ts
import { imageDemoTest } from '../../../tests/shared/imageTest'; describe('Progress image', () => { imageDemoTest('progress', { 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/progress/__tests__/demo.test.ts
components/progress/__tests__/demo.test.ts
import demoTest from '../../../tests/shared/demoTest'; demoTest('progress');
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/__tests__/demo-extend.test.ts
components/progress/__tests__/demo-extend.test.ts
import { extendTest } from '../../../tests/shared/demoTest'; extendTest('progress');
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/__tests__/semantic.test.tsx
components/progress/__tests__/semantic.test.tsx
import React from 'react'; import Progress from '..'; import type { ProgressProps } from '..'; import { render } from '../../../tests/utils'; const classNames: ProgressProps['classNames'] = (info) => { return info.props.percent === 100 ? { root: 'progress-root-full', body: 'progress-body-full', ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/design/behavior-pattern.tsx
components/progress/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: '了解任务的进度', viewTaskCompletion: '查看任务的完成程度', understandTaskProgress: '了解任务进度', understandTaskStatus: '了解任务状态', viewP...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/design/demo/progress.tsx
components/progress/design/demo/progress.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; const Demo = () => ( <Flex vertical gap="middle"> <Progress type="line" percent={50} showInfo={false} style={{ width: 320 }} /> <Progress percent={50} showInfo={false} size="small" style={{ width: 100 }} /> </Flex> ); export default Demo;
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/design/demo/info.tsx
components/progress/design/demo/info.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; import useLocale from '../../../../.dumi/hooks/useLocale'; const locales = { cn: { loading: '加载中', }, en: { loading: 'Loading', }, }; const Demo: React.FC = () => { const [locale] = useLocale(locales); return ( <Flex vertical g...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/design/demo/status.tsx
components/progress/design/demo/status.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; import useLocale from '../../../../.dumi/hooks/useLocale'; const locales = { cn: { taskInProgress: '任务进行中', taskCompleted: '任务完成', taskFailed: '任务失败', }, en: { taskInProgress: 'Task In Progress', taskCompleted: 'Task Completed...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/design/demo/circle.tsx
components/progress/design/demo/circle.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; const Demo = () => ( <Flex gap="middle" align="center"> <Progress type="circle" percent={68} /> <Progress type="circle" percent={100} status="success" /> <Progress type="circle" percent={68} status="exception" /> <Progress type="circle...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/design/demo/content.tsx
components/progress/design/demo/content.tsx
import React from 'react'; import { Flex, Progress, theme } from 'antd'; const Demo = () => { const { token } = theme.useToken(); return ( <Flex gap="large"> <Flex gap="small" align="center"> <Progress size={16} type="circle" percent={68} railColor={token.colorPrimaryBg} /> <div>进行中</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/progress/demo/dashboard.tsx
components/progress/demo/dashboard.tsx
import React, { useState } from 'react'; import { Flex, Progress, Segmented } from 'antd'; import type { GapPlacement } from '../progress'; const App: React.FC = () => { const [gapPlacement, setGapPlacement] = useState<GapPlacement>('bottom'); const [gapDegree, setGapDegree] = useState<number>(50); return ( ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/segment.tsx
components/progress/demo/segment.tsx
import React from 'react'; import { Flex, Progress, Tooltip } from 'antd'; const App: React.FC = () => ( <Flex gap="small" vertical> <Tooltip title="3 done / 3 in progress / 4 to do"> <Progress percent={60} success={{ percent: 30 }} /> </Tooltip> <Flex gap="small" wrap> <Tooltip title="3 done...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/_semantic.tsx
components/progress/demo/_semantic.tsx
import React from 'react'; import { Flex, Progress, Segmented, Switch } from 'antd'; import type { ProgressProps } from 'antd'; import useLocale from '../../../.dumi/hooks/useLocale'; import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview'; const locales = { cn: { root: '根元素,设置相对定位和基础容器样式', ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/linecap.tsx
components/progress/demo/linecap.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; const App: React.FC = () => ( <Flex vertical gap="small"> <Progress strokeLinecap="butt" percent={75} /> <Flex wrap gap="small"> <Progress strokeLinecap="butt" type="circle" percent={75} /> <Progress strokeLinecap="butt" type="dash...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/circle-micro.tsx
components/progress/demo/circle-micro.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; const App: React.FC = () => ( <Flex align="center" gap="small"> <Progress type="circle" railColor="#e6f4ff" percent={60} strokeWidth={20} size={14} format={(number) => `进行中,已完成${number}%`} /> <span>代码发布<...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/line.tsx
components/progress/demo/line.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; const App: React.FC = () => ( <Flex gap="small" vertical> <Progress percent={30} /> <Progress percent={50} status="active" /> <Progress percent={70} status="exception" /> <Progress percent={100} /> <Progress percent={50} showInfo={...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/circle-mini.tsx
components/progress/demo/circle-mini.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; const App: React.FC = () => ( <Flex wrap gap="small"> <Progress type="circle" percent={30} size={80} /> <Progress type="circle" percent={70} size={80} status="exception" /> <Progress type="circle" percent={100} size={80} /> </Flex> ); e...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/component-token.tsx
components/progress/demo/component-token.tsx
import React from 'react'; import { ConfigProvider, Progress, Space } from 'antd'; const App: React.FC = () => ( <ConfigProvider theme={{ token: { marginXXS: 20, fontSizeSM: 24 }, components: { Progress: { defaultColor: '#bae0ff', remainingColor: '#f5222d', color...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/format.tsx
components/progress/demo/format.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; const App: React.FC = () => ( <Flex gap="small" wrap> <Progress type="circle" percent={75} format={(percent) => `${percent} Days`} /> <Progress type="circle" percent={100} format={() => 'Done'} /> </Flex> ); 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/progress/demo/gradient-line.tsx
components/progress/demo/gradient-line.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; import type { ProgressProps } from 'antd'; const twoColors: ProgressProps['strokeColor'] = { '0%': '#108ee9', '100%': '#87d068', }; const conicColors: ProgressProps['strokeColor'] = { '0%': '#87d068', '50%': '#ffe58f', '100%': '#ffccc7', }; ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/circle-steps.tsx
components/progress/demo/circle-steps.tsx
import React from 'react'; import { Flex, Progress, Slider, Typography } from 'antd'; const App: React.FC = () => { const [stepsCount, setStepsCount] = React.useState<number>(5); const [stepsGap, setStepsGap] = React.useState<number>(7); return ( <> <Typography.Title level={5}>Custom count:</Typography...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/circle.tsx
components/progress/demo/circle.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; const App: React.FC = () => ( <Flex gap="small" wrap> <Progress type="circle" percent={75} /> <Progress type="circle" percent={70} status="exception" /> <Progress type="circle" percent={100} /> </Flex> ); 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/progress/demo/size.tsx
components/progress/demo/size.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; const App: React.FC = () => ( <Flex vertical gap="middle"> <Flex vertical gap="small" style={{ width: 300 }}> <Progress percent={50} /> <Progress percent={50} size="small" /> <Progress percent={50} size={[300, 20]} /> </Flex>...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/line-mini.tsx
components/progress/demo/line-mini.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; const App: React.FC = () => ( <Flex vertical gap="small" style={{ width: 180 }}> <Progress percent={30} size="small" /> <Progress percent={50} size="small" status="active" /> <Progress percent={70} size="small" status="exception" /> <P...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/dynamic.tsx
components/progress/demo/dynamic.tsx
import React, { useState } from 'react'; import { MinusOutlined, PlusOutlined } from '@ant-design/icons'; import { Button, Flex, Progress, Space } from 'antd'; const App: React.FC = () => { const [percent, setPercent] = useState<number>(0); const increase = () => { setPercent((prevPercent) => { const ne...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/info-position.tsx
components/progress/demo/info-position.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; const App: React.FC = () => ( <Flex gap="small" vertical> <Progress percent={0} percentPosition={{ align: 'center', type: 'inner' }} size={[200, 20]} strokeColor="#E6F4FF" /> <Progress percent={10} percentPosition={...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/steps.tsx
components/progress/demo/steps.tsx
import React from 'react'; import { green, red } from '@ant-design/colors'; import { Flex, Progress } from 'antd'; const App: React.FC = () => ( <Flex gap="small" vertical> <Progress percent={50} steps={3} /> <Progress percent={30} steps={5} /> <Progress percent={100} steps={5} size="small" strokeColor={...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/progress/demo/style-class.tsx
components/progress/demo/style-class.tsx
import React from 'react'; import { Flex, Progress } from 'antd'; import type { ProgressProps } from 'antd'; const classNames: ProgressProps['classNames'] = { root: 'demo-progress-root', rail: 'demo-progress-rail', track: 'demo-progress-track', }; const stylesFn: ProgressProps['styles'] = (info) => { const pe...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/index.tsx
components/tree-select/index.tsx
import * as React from 'react'; import type { BaseSelectRef } from '@rc-component/select'; import type { Placement } from '@rc-component/select/lib/BaseSelect'; import type { TreeSelectProps as RcTreeSelectProps } from '@rc-component/tree-select'; import RcTreeSelect, { SHOW_ALL, SHOW_CHILD, SHOW_PARENT, TreeNo...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/style/index.ts
components/tree-select/style/index.ts
import { unit } from '@ant-design/cssinjs'; import { getStyle as getCheckboxStyle } from '../../checkbox/style'; import type { AliasToken, CSSUtil, FullToken, GenerateStyle, GetDefaultToken, } from '../../theme/internal'; import { genStyleHooks, mergeToken } from '../../theme/internal'; import type { TreeSha...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/__tests__/a11y.test.ts
components/tree-select/__tests__/a11y.test.ts
import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; accessibilityDemoTest('tree-select', { // we can set aria attributes to fix it disabledRules: ['label'], // skip internal debug demo skip: ['render-panel.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/tree-select/__tests__/index.test.tsx
components/tree-select/__tests__/index.test.tsx
import React from 'react'; import { SmileOutlined } from '@ant-design/icons'; import { Button, ConfigProvider, Input, Space } from 'antd'; import type { TreeNodeProps } from 'antd'; import TreeSelect, { TreeNode } from '..'; import { resetWarned } from '../../_util/warning'; import focusTest from '../../../tests/share...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/__tests__/image.test.ts
components/tree-select/__tests__/image.test.ts
import { imageDemoTest } from '../../../tests/shared/imageTest'; describe('TreeSelect image', () => { imageDemoTest('tree-select'); });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/__tests__/demo-extend.test.ts
components/tree-select/__tests__/demo-extend.test.ts
import { extendTest } from '../../../tests/shared/demoTest'; extendTest('tree-select', { skip: ['component-token.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/tree-select/__tests__/demo.test.tsx
components/tree-select/__tests__/demo.test.tsx
import * as React from 'react'; import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest'; demoTest('tree-select', { testRootProps: false, skip: ['component-token.tsx'], }); rootPropsTest('tree-select', (TreeSelect, props) => <TreeSelect {...props} />, { findRootElements: () => document.querySel...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/__tests__/semantic.test.tsx
components/tree-select/__tests__/semantic.test.tsx
import React from 'react'; import TreeSelect from '..'; import { render } from '../../../tests/utils'; describe('TreeSelect.Semantic', () => { it('support classNames and styles as functions', () => { const treeData = [ { value: 'parent 1', title: 'parent 1', children: [ {...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/async.tsx
components/tree-select/demo/async.tsx
import React, { useState } from 'react'; import type { GetProp, TreeSelectProps } from 'antd'; import { TreeSelect } from 'antd'; type DefaultOptionType = GetProp<TreeSelectProps, 'treeData'>[number]; const App: React.FC = () => { const [value, setValue] = useState<string>(); const [treeData, setTreeData] = useSt...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/multiple.tsx
components/tree-select/demo/multiple.tsx
import React, { useState } from 'react'; import { TreeSelect } from 'antd'; const treeData = [ { value: 'parent 1', title: 'parent 1', children: [ { value: 'parent 1-0', title: 'parent 1-0', children: [ { value: 'leaf1', title: 'my leaf', ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/_semantic.tsx
components/tree-select/demo/_semantic.tsx
import React from 'react'; import { TreeSelect } from 'antd'; import TreeSelectSemanticTemplate from '../../../.dumi/theme/common/TreeSelectSemanticTemplate'; const App: React.FC = () => { const treeData = [ { value: 'contributors', title: 'contributors', children: [ { value:...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/render-panel.tsx
components/tree-select/demo/render-panel.tsx
import React from 'react'; import { TreeSelect } from 'antd'; const { _InternalPanelDoNotUseOrYouWillBeFired: InternalTreeSelect } = TreeSelect; const treeData = [ { title: 'Node1', value: '0-0', children: [ { title: 'Child Node1', value: '0-0-1', }, { title: 'C...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/variant.tsx
components/tree-select/demo/variant.tsx
import React from 'react'; import { Flex, TreeSelect } from 'antd'; const style: React.CSSProperties = { width: '100%', maxWidth: '100%', }; const App: React.FC = () => { return ( <Flex vertical gap="middle"> <TreeSelect style={style} placeholder="Please select" variant="borderless" /> <TreeSele...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/status.tsx
components/tree-select/demo/status.tsx
import React from 'react'; import { Space, TreeSelect } from 'antd'; const App: React.FC = () => ( <Space vertical style={{ width: '100%' }}> <TreeSelect status="error" style={{ width: '100%' }} placeholder="Error" /> <TreeSelect status="warning" style={{ width: '100%' }} multiple pla...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/maxCount.tsx
components/tree-select/demo/maxCount.tsx
import React from 'react'; import { DownOutlined } from '@ant-design/icons'; import { TreeSelect } from 'antd'; const MAX_COUNT = 3; const treeData = [ { title: 'Parent 1', value: 'parent1', children: [ { title: 'Child 1-1', value: 'child1-1', }, { title: 'Child...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/component-token.tsx
components/tree-select/demo/component-token.tsx
import React, { useState } from 'react'; import { ConfigProvider, TreeSelect } from 'antd'; const treeData = [ { value: 'parent 1', title: 'parent 1', children: [ { value: 'parent 1-0', title: 'parent 1-0', children: [ { value: 'leaf1', titl...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/placement.tsx
components/tree-select/demo/placement.tsx
import React, { useState } from 'react'; import type { GetProp, RadioChangeEvent, TreeSelectProps } from 'antd'; import { Radio, TreeSelect } from 'antd'; type SelectCommonPlacement = GetProp<TreeSelectProps, 'placement'>; const treeData = [ { value: 'parent 1', title: 'parent 1', children: [ { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/basic.tsx
components/tree-select/demo/basic.tsx
import React, { useState } from 'react'; import { TreeSelect } from 'antd'; import type { TreeSelectProps } from 'antd'; const treeData = [ { value: 'parent 1', title: 'parent 1', children: [ { value: 'parent 1-0', title: 'parent 1-0', children: [ { val...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/treeLine.tsx
components/tree-select/demo/treeLine.tsx
import React, { useState } from 'react'; import { CarryOutOutlined } from '@ant-design/icons'; import { Space, Switch, TreeSelect } from 'antd'; const treeData = [ { value: 'parent 1', title: 'parent 1', icon: <CarryOutOutlined />, children: [ { value: 'parent 1-0', title: 'pare...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/suffix.tsx
components/tree-select/demo/suffix.tsx
import React, { useState } from 'react'; import { SmileOutlined } from '@ant-design/icons'; import { TreeSelect } from 'antd'; const icon = <SmileOutlined />; const treeData = [ { value: 'parent 1', title: 'parent 1', children: [ { value: 'parent 1-0', title: 'parent 1-0', c...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/treeData.tsx
components/tree-select/demo/treeData.tsx
import React, { useState } from 'react'; import { TreeSelect } from 'antd'; const treeData = [ { title: 'Node1', value: '0-0', children: [ { title: 'Child Node1', value: '0-0-1', }, { title: 'Child Node2', value: '0-0-2', }, ], }, { titl...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/checkable.tsx
components/tree-select/demo/checkable.tsx
import React, { useState } from 'react'; import { TreeSelect } from 'antd'; const { SHOW_PARENT } = TreeSelect; const treeData = [ { title: 'Node1', value: '0-0', key: '0-0', children: [ { title: 'Child Node1', value: '0-0-0', key: '0-0-0', }, ], }, { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/tree-select/demo/maxCountNoEffect.tsx
components/tree-select/demo/maxCountNoEffect.tsx
import React, { useState } from 'react'; import { TreeSelect } from 'antd'; import { DownOutlined } from '@ant-design/icons'; const treeData = [ { title: 'Node1', value: '0-0', key: '0-0', children: [ { title: 'Child Node1', value: '0-0-1', key: '0-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/tree-select/demo/style-class.tsx
components/tree-select/demo/style-class.tsx
import React from 'react'; import { Flex, TreeSelect } from 'antd'; import type { TreeSelectProps } from 'antd'; import { createStyles } from 'antd-style'; const useStyles = createStyles(({ token }) => ({ root: { width: 300, borderRadius: token.borderRadius, }, })); const styleObject: TreeSelectProps['sty...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/_util/statusUtils.ts
components/_util/statusUtils.ts
import { clsx } from 'clsx'; import type { ValidateStatus } from '../form/FormItem'; const _InputStatuses = ['warning', 'error', '', 'success', 'validating'] as const; export type InputStatus = (typeof _InputStatuses)[number]; export const getStatusClassNames = ( prefixCls: string, status?: ValidateStatus, ha...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/_util/getAllowClear.tsx
components/_util/getAllowClear.tsx
import React from 'react'; import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled'; import type { BaseInputProps } from '@rc-component/input/lib/interface'; export type AllowClear = BaseInputProps['allowClear']; const getAllowClear = (allowClear: AllowClear): AllowClear => { let mergedAllowClear: AllowC...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false