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
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/playwright-webkit/index.d.ts
packages/playwright-webkit/index.d.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/uiUtils.ts
packages/web/src/uiUtils.ts
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/renderUtils.tsx
packages/web/src/renderUtils.tsx
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/ansi2html.ts
packages/web/src/ansi2html.ts
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/theme.ts
packages/web/src/theme.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/sourceChooser.tsx
packages/web/src/components/sourceChooser.tsx
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/listView.tsx
packages/web/src/components/listView.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/gridView.tsx
packages/web/src/components/gridView.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the 'License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/dialogToolbarButton.tsx
packages/web/src/components/dialogToolbarButton.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/xtermWrapper.tsx
packages/web/src/components/xtermWrapper.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/codeMirrorWrapper.tsx
packages/web/src/components/codeMirrorWrapper.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/splitView.tsx
packages/web/src/components/splitView.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the 'License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/errorMessage.tsx
packages/web/src/components/errorMessage.tsx
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/toolbarButton.tsx
packages/web/src/components/toolbarButton.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/toolbar.tsx
packages/web/src/components/toolbar.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the 'License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/expandable.tsx
packages/web/src/components/expandable.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/tabbedPane.tsx
packages/web/src/components/tabbedPane.tsx
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/treeView.tsx
packages/web/src/components/treeView.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/codeMirrorModule.tsx
packages/web/src/components/codeMirrorModule.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/components/xtermModule.tsx
packages/web/src/components/xtermModule.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/shared/glassPane.tsx
packages/web/src/shared/glassPane.tsx
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/shared/dialog.tsx
packages/web/src/shared/dialog.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/shared/prompts.ts
packages/web/src/shared/prompts.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/shared/imageDiffView.tsx
packages/web/src/shared/imageDiffView.tsx
/* Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/web/src/shared/resizeView.tsx
packages/web/src/shared/resizeView.tsx
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/protocol/src/callMetadata.d.ts
packages/protocol/src/callMetadata.d.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/protocol/src/channels.d.ts
packages/protocol/src/channels.d.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
true
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/packages/protocol/src/progress.d.ts
packages/protocol/src/progress.d.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/.dumirc.ts
.dumirc.ts
import os from 'node:os'; import path from 'path'; import { defineConfig } from 'dumi'; import * as fs from 'fs-extra'; import rehypeAntd from './.dumi/rehypeAntd'; import rehypeChangelog from './.dumi/rehypeChangelog'; import remarkAnchor from './.dumi/remarkAnchor'; import remarkAntd from './.dumi/remarkAntd'; impor...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/.fatherrc.ts
.fatherrc.ts
import { defineConfig } from 'father'; import path from 'path'; const externalsConfig = { react: { root: 'React', commonjs: 'react', commonjs2: 'react', }, dayjs: { root: 'dayjs', commonjs: 'dayjs', commonjs2: 'dayjs', }, 'react-dom': { root: 'ReactDOM', commonjs: 'react-dom',...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/collect-token-statistic.ts
scripts/collect-token-statistic.ts
import React from 'react'; import chalk from 'chalk'; import cliProgress from 'cli-progress'; import fs from 'fs-extra'; import ReactDOMServer from 'react-dom/server'; import { DesignTokenContext, statistic } from '../components/theme/internal'; import seedToken from '../components/theme/themes/seed'; import { generat...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/set-node-options.ts
scripts/set-node-options.ts
import os from 'os'; const childProcess = require('child_process'); const totalMemory = Math.floor(os.totalmem() / (1024 * 1024)); if (totalMemory <= 8192) { // setting NODE_OPTIONS process.env.NODE_OPTIONS = '--max-old-space-size=4096'; } // Execute project startup command const args: string[] = process.argv.sl...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/generate-component-changelog.ts
scripts/generate-component-changelog.ts
// Collect from `changelog.md` to get all components changelog import path from 'path'; import fs from 'fs-extra'; import { globSync } from 'glob'; const output = '.dumi/preset'; // Collect components const componentNames = globSync( path .join(process.cwd(), 'components/!(version|icon|col|row)/index?(.legacy)....
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/generate-authors.ts
scripts/generate-authors.ts
import fs from 'fs'; import path from 'path'; import sortBy from 'lodash/sortBy'; import unionBy from 'lodash/unionBy'; import simpleGit from 'simple-git'; const cwd = process.cwd(); const git = simpleGit(cwd); const excludes = [ 'users.noreply.github.com', 'gitter.im', '.local', 'alibaba-inc.com', 'alipay...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/print-changelog.ts
scripts/print-changelog.ts
import { spawn } from 'child_process'; import path from 'path'; import { input, select } from '@inquirer/prompts'; import chalk from 'chalk'; import fs from 'fs-extra'; import fetch from 'isomorphic-fetch'; import jQuery from 'jquery'; import jsdom from 'jsdom'; import openWindow from 'open'; import simpleGit from 'sim...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/generate-llms-semantic.ts
scripts/generate-llms-semantic.ts
// Note: Generated By Copilot import path from 'path'; import fs from 'fs-extra'; import { glob } from 'glob'; // 特殊组件名转换映射 const ConvertMap: Record<string, string> = { 'badge:ribbon': 'ribbon', 'floatButton:group': 'floatButtonGroup', 'input:input': 'input', 'input:otp': 'otp', 'input:search': 'inputSearch...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/pre-publish.ts
scripts/pre-publish.ts
/** * Pre-publish script for Ant Design * * Environment Variables: * - SKIP_CI_CHECK: Set to any truthy value to skip remote CI status check * Usage: SKIP_CI_CHECK=1 npm run prepublishOnly */ import fs from 'node:fs'; import runScript from '@npmcli/run-script'; import { Octokit } from '@octokit/rest'; import A...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/prepare-examples.ts
scripts/prepare-examples.ts
import fg from 'fast-glob'; import fs from 'fs-extra'; import path from 'path'; import cloneDeep from 'lodash/cloneDeep'; import isPlainObject from 'lodash/isPlainObject'; import rootPkg from '../package.json'; const examples = fg.sync(['examples/examples/**/package.json'], { cwd: process.cwd(), onlyFiles: true, ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/check-version-md.ts
scripts/check-version-md.ts
import fs from 'fs'; import { join } from 'path'; import chalk from 'chalk'; import dayjs from 'dayjs'; import isBetween from 'dayjs/plugin/isBetween'; import { version } from '../package.json'; dayjs.extend(isBetween); const getChangelogByVersion = (content: string, vers: string) => { const lines = content.split(...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/generate-token-meta.ts
scripts/generate-token-meta.ts
import fs from 'fs-extra'; import type { DeclarationReflection } from 'typedoc'; import { Application, TSConfigReader, TypeDocReader } from 'typedoc'; interface TokenMeta { seed: ReturnType<typeof getTokenList>; map: ReturnType<typeof getTokenList>; alias: ReturnType<typeof getTokenList>; components: Record<st...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/check-cssinjs.tsx
scripts/check-cssinjs.tsx
import path from 'path'; import React from 'react'; import { createCache, extractStyle, legacyNotSelectorLinter, logicalPropertiesLinter, NaNLinter, parentSelectorLinter, StyleProvider, } from '@ant-design/cssinjs'; import chalk from 'chalk'; import { parse } from 'css-tree'; import type { SyntaxParseErro...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/check-site.ts
scripts/check-site.ts
/* eslint-disable unicorn/prefer-dom-node-text-content */ import type http from 'http'; import type https from 'https'; import { join } from 'path'; import { DOMParser } from 'domparser-rs'; import { globSync } from 'glob'; import { createServer } from 'http-server'; import fetch from 'isomorphic-fetch'; import uniq f...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/generate-llms.ts
scripts/generate-llms.ts
import path from 'path'; import fs from 'fs-extra'; import { glob } from 'glob'; async function generateLLms() { const cwd = process.cwd(); const siteDir = path.resolve(cwd, '_site'); const docsDir = ['components', 'docs']; const matchSuffix = '.en-US.md'; // Ensure siteDir await fs.ensureDir(siteDir); ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/generate-cssinjs.ts
scripts/generate-cssinjs.ts
import url from 'node:url'; import path from 'path'; import React from 'react'; import { globSync } from 'glob'; type StyleFn = (prefix?: string) => void; interface GenCssinjsOptions { key: string; render?: (Component: React.FC, filepath: string) => void; beforeRender?: (componentName: string) => void; } expor...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/build-style.tsx
scripts/build-style.tsx
import path from 'path'; import React from 'react'; import { createCache, extractStyle as extStyle, StyleProvider } from '@ant-design/cssinjs'; import fs from 'fs-extra'; import { renderToString } from 'react-dom/server'; import * as antd from '../components'; const output = path.join(__dirname, '../components/style/...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/check-repo.ts
scripts/check-repo.ts
import chalk from 'chalk'; import fetch from 'isomorphic-fetch'; import ora from 'ora'; import simpleGit from 'simple-git'; import type { StatusResult } from 'simple-git'; import { version } from '../package.json'; const cwd = process.cwd(); const git = simpleGit(cwd); const spinner = ora('Loading unicorns').start('开...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/generate-version.ts
scripts/generate-version.ts
import fs from 'fs'; import path from 'path'; import { version } from '../package.json'; fs.writeFileSync( path.join(__dirname, '..', 'components', 'version', 'version.ts'), `export default '${version}';`, 'utf8', );
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/post-publish.ts
scripts/post-publish.ts
import { execSync, spawnSync } from 'child_process'; import { confirm, select } from '@inquirer/prompts'; import chalk from 'chalk'; import dayjs from 'dayjs'; import relativeTime from 'dayjs/plugin/relativeTime'; import fetch from 'isomorphic-fetch'; import ora from 'ora'; import semver from 'semver'; import deprecat...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/visual-regression/local.ts
scripts/visual-regression/local.ts
import { spawnSync } from 'child_process'; import path from 'path'; import { Readable } from 'stream'; import { finished } from 'stream/promises'; import { checkbox, confirm, input, select } from '@inquirer/prompts'; import { Octokit } from '@octokit/rest'; import envPaths from 'env-paths'; import fg from 'fast-glob'; ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/visual-regression/build.ts
scripts/visual-regression/build.ts
import { assert } from 'console'; import fs from 'fs'; import os from 'os'; import path from 'path'; import { Readable } from 'stream'; import { finished } from 'stream/promises'; import blazediff from '@blazediff/core'; import chalk from 'chalk'; import fse from 'fs-extra'; import difference from 'lodash/difference'; ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/visual-regression/reportAdapter.ts
scripts/visual-regression/reportAdapter.ts
import path from 'path'; // locked to v2.2.0 import { getReportHtmlAfterPopulatingData, getReportJsonWithTotalStats, } from 'cypress-image-diff-html-report/dist/common/utils'; import fg from 'fast-glob'; import fs from 'fs-extra'; import { PNG } from 'pngjs'; import type { IBadCase } from './build'; const ROOT = ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/scripts/visual-regression/convert.ts
scripts/visual-regression/convert.ts
import rehypeFigure from '@microflash/rehype-figure'; import rehypeStringify from 'rehype-stringify'; import { remark } from 'remark'; import remarkGfm from 'remark-gfm'; import remarkRehype from 'remark-rehype'; export default function markdown2Html(content: string) { return remark() .use(remarkGfm) .use(re...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/index.test.ts
tests/index.test.ts
import { version as packageVersion } from '../package.json'; const testDist = process.env.LIB_DIR === 'dist'; const testDistMin = process.env.LIB_DIR === 'dist-min'; describe('antd dist files', () => { // https://github.com/ant-design/ant-design/issues/1638 // https://github.com/ant-design/ant-design/issues/1968 ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/changelog.test.ts
tests/changelog.test.ts
import path from 'path'; const testDist = process.env.LIB_DIR === 'dist' || process.env.CHANGELOG_TEST; // This test is used to ensure changelog includes related component describe('component changelog match snapshot', () => { const testFn = testDist ? it : it.skip; testFn('misc changelog snapshot', () => { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/setupAfterEnv.ts
tests/setupAfterEnv.ts
import '@testing-library/jest-dom'; import { toHaveNoViolations } from 'jest-axe'; import jsdom from 'jsdom'; import format, { plugins } from 'pretty-format'; import { defaultConfig } from '../components/theme/internal'; // Not use dynamic hashed for test env since version will change hash dynamically. defaultConfig...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/setup.ts
tests/setup.ts
import util from 'util'; import React from 'react'; import type { DOMWindow } from 'jsdom'; console.log('Current React Version:', React.version); const originConsoleErr = console.error; const ignoreWarns = [ 'validateDOMNesting', 'on an unmounted component', 'not wrapped in act', 'You called act', ]; // Hac...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/utils.tsx
tests/utils.tsx
import type { ReactElement } from 'react'; import React, { createRef, StrictMode } from 'react'; import { _rs as onEsResize } from '@rc-component/resize-observer/es/utils/observerUtil'; import { _rs as onLibResize } from '@rc-component/resize-observer/lib/utils/observerUtil'; import type { RenderOptions } from '@testin...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/dekko/index.test.ts
tests/dekko/index.test.ts
import './dist.test'; import './lib-es.test'; import './use-client.test';
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/dekko/dist.test.ts
tests/dekko/dist.test.ts
import $ from 'dekko'; import chalk from 'chalk'; $('dist') .isDirectory() .hasFile('antd-with-locales.js') .hasFile('antd-with-locales.js.map') .hasFile('antd-with-locales.min.js') .hasFile('antd-with-locales.min.js.map') .hasFile('antd.js') .hasFile('antd.js.map') .hasFile('antd.min.js') .hasFile('...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/dekko/use-client.test.ts
tests/dekko/use-client.test.ts
import $ from 'dekko'; import chalk from 'chalk'; import fs from 'node:fs'; const includeUseClient = (filename: string) => fs.readFileSync(filename).toString().includes('"use client"'); $('dist/*') .isFile() .assert("doesn't contain use client", (filename: string) => !includeUseClient(filename)); $('{es,lib}/in...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/dekko/lib-es.test.ts
tests/dekko/lib-es.test.ts
import $ from 'dekko'; import chalk from 'chalk'; $('lib').isDirectory().hasFile('index.js').hasFile('index.d.ts'); $('lib/*') .filter( (filename: string) => !['index.js', 'index.d.ts', '.map'].some((ext) => filename.endsWith(ext)), ) .isDirectory() .filter((filename: string) => !['style', '_util', 'local...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/shared/rootPropsTest.tsx
tests/shared/rootPropsTest.tsx
/* eslint-disable jest/no-export */ import React from 'react'; import ConfigProvider from '../../components/config-provider'; import { render, waitFakeTimer } from '../utils'; import { TriggerMockContext } from './demoTestContext'; export interface Options { name?: string; findRootElements?: ( container: HTML...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/shared/rtlTest.tsx
tests/shared/rtlTest.tsx
import React from 'react'; import dayjs from 'dayjs'; import MockDate from 'mockdate'; import ConfigProvider from '../../components/config-provider'; import { render } from '../utils'; const rtlTest = (Component: React.ComponentType, mockDate = false) => { describe('rtl render', () => { it('component should be ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/shared/accessibilityTest.tsx
tests/shared/accessibilityTest.tsx
import React from 'react'; import { render } from '@testing-library/react'; import { globSync } from 'glob'; import { axe } from 'jest-axe'; class AxeQueueManager { private queue: Promise<any> = Promise.resolve(); private isProcessing = false; async enqueue<T>(task: () => Promise<T>): Promise<T> { const cur...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/shared/demoTest.tsx
tests/shared/demoTest.tsx
import path from 'path'; import * as React from 'react'; import { createCache, StyleProvider } from '@ant-design/cssinjs'; import { ConfigProvider } from 'antd'; import { globSync } from 'glob'; import kebabCase from 'lodash/kebabCase'; import { renderToString } from 'react-dom/server'; import { resetWarned } from '.....
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/shared/imageTest.tsx
tests/shared/imageTest.tsx
import path from 'path'; import React from 'react'; // Reference: https://github.com/ant-design/ant-design/pull/24003#discussion_r427267386 import { createCache, extractStyle, StyleProvider } from '@ant-design/cssinjs'; import { warning as rcWarning } from '@rc-component/util'; import { extractStaticStyle } from 'antd-...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/shared/demoTestContext.ts
tests/shared/demoTestContext.ts
import * as React from 'react'; import type { TriggerProps } from '@rc-component/trigger'; // We export context here is to avoid testing-lib inject `afterEach` in `tests/index.test.js` // Which breaks the circle deps export const TriggerMockContext = React.createContext< | (Partial<TriggerProps> & { mock?: boo...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/shared/excludeWarning.ts
tests/shared/excludeWarning.ts
const originError = console.error; export function isSafeWarning(message: boolean, all = false) { const list = ['useLayoutEffect does nothing on the server']; if (all) { list.push('is deprecated in StrictMode'); } return list.some((msg) => String(message).includes(msg)); } /** This function will remove ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/shared/mountTest.tsx
tests/shared/mountTest.tsx
import React from 'react'; import { render } from '../utils'; // eslint-disable-next-line jest/no-export export default function mountTest(Component: React.ComponentType) { describe(`mount and unmount`, () => { // https://github.com/ant-design/ant-design/pull/18441 it(`component could be updated and unmount...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/shared/focusTest.tsx
tests/shared/focusTest.tsx
import React from 'react'; import { fireEvent, render, sleep } from '../utils'; const focusTest = ( Component: React.ComponentType<any>, { refFocus = false, blurDelay = 0 } = {}, ) => { describe('focus and blur', () => { let focused = false; let blurred = false; const mockFocus = jest.spyOn(HTMLElem...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/__mocks__/copy-to-clipboard.ts
tests/__mocks__/copy-to-clipboard.ts
const copy: ((str?: string, options?: object) => void) & { lastStr?: string; lastOptions?: object; } = (str = '', options = {}) => { copy.lastStr = str; copy.lastOptions = options; }; export default copy;
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/__mocks__/@rc-component/virtual-list.ts
tests/__mocks__/@rc-component/virtual-list.ts
import List from '@rc-component/virtual-list/lib/mock'; export default List;
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/__mocks__/@rc-component/trigger.tsx
tests/__mocks__/@rc-component/trigger.tsx
import * as React from 'react'; import type { TriggerProps, TriggerRef } from '@rc-component/trigger'; import MockTrigger from '@rc-component/trigger/lib/mock'; import { TriggerMockContext } from '../../shared/demoTestContext'; let OriginTrigger = jest.requireActual('@rc-component/trigger'); OriginTrigger = OriginTri...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/__mocks__/rc-util/lib/Portal.tsx
tests/__mocks__/rc-util/lib/Portal.tsx
import React from 'react'; import type { PortalProps, PortalRef } from '@rc-component/util/lib/Portal'; import { TriggerMockContext } from '../../../shared/demoTestContext'; const OriginPortalModule = jest.requireActual('@rc-component/util/lib/Portal'); const OriginPortal = OriginPortalModule.default ?? OriginPortalM...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/tests/__mocks__/rc-util/lib/Dom/dynamicCSS.ts
tests/__mocks__/rc-util/lib/Dom/dynamicCSS.ts
import { injectCSS, updateCSS, clearContainerCache, removeCSS, } from '@rc-component/util/lib/Dom/dynamicCSS'; const fixCSS = (css: string) => { return css.replace(/@container\s+[^)]*\)/g, '@supports (display: not-exist)'); }; const mockInjectCSS: typeof injectCSS = (css, ...rest) => { return injectCSS(fi...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/index.ts
components/index.ts
import getReactMajorVersion from './_util/getReactMajorVersionCanDelMe'; import warning from './_util/warning'; export type { Breakpoint } from './_util/responsiveObserver'; export type { GetProp, GetProps, GetRef } from './_util/type'; export { default as Affix } from './affix'; export type { AffixProps, AffixRef } 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/slider/index.tsx
components/slider/index.tsx
import React from 'react'; import type { SliderProps as RcSliderProps } from '@rc-component/slider'; import RcSlider from '@rc-component/slider'; import type { SliderRef } from '@rc-component/slider/lib/Slider'; import raf from '@rc-component/util/lib/raf'; import { clsx } from 'clsx'; import { useMergeSemantic, useOr...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/useRafLock.ts
components/slider/useRafLock.ts
import * as React from 'react'; import raf from '@rc-component/util/lib/raf'; export default function useRafLock(): [state: boolean, setState: (nextState: boolean) => void] { const [state, setState] = React.useState(false); const rafRef = React.useRef<number>(null); const cleanup = () => { raf.cancel(rafRef...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/SliderTooltip.tsx
components/slider/SliderTooltip.tsx
import * as React from 'react'; import { useRef } from 'react'; import raf from '@rc-component/util/lib/raf'; import { composeRef } from '@rc-component/util/lib/ref'; import type { SliderRef } from '@rc-component/slider/lib/Slider'; import type { TooltipProps } from '../tooltip'; import Tooltip from '../tooltip'; exp...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/Context.ts
components/slider/Context.ts
import { createContext } from 'react'; import type { SliderProps as RcSliderProps } from '@rc-component/slider'; import type { DirectionType } from '../config-provider'; export interface SliderInternalContextProps { handleRender?: RcSliderProps['handleRender']; direction?: DirectionType; } /** @private Internal ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/style/index.ts
components/slider/style/index.ts
import type * as React from 'react'; import type { CSSObject } from '@ant-design/cssinjs'; import { unit } from '@ant-design/cssinjs'; import { FastColor } from '@ant-design/fast-color'; import { resetComponent } from '../../style'; import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal';...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/__tests__/a11y.test.ts
components/slider/__tests__/a11y.test.ts
import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; accessibilityDemoTest('slider', { // we can set aria attribute to fix it disabledRules: ['aria-input-field-name', 'label', 'button-name'], });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/__tests__/SliderTooltip.test.tsx
components/slider/__tests__/SliderTooltip.test.tsx
import React from 'react'; import { render } from '../../../tests/utils'; import SliderTooltip from '../SliderTooltip'; let mockForceAlign: jest.Mock; jest.mock('../../tooltip', () => { const ReactReal: typeof React = jest.requireActual('react'); return { __esModule: true, default: ReactReal.forwardRef((...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/__tests__/index.test.tsx
components/slider/__tests__/index.test.tsx
import React from 'react'; import Slider from '..'; import focusTest from '../../../tests/shared/focusTest'; import mountTest from '../../../tests/shared/mountTest'; import rtlTest from '../../../tests/shared/rtlTest'; import { act, fireEvent, render, waitFakeTimer } from '../../../tests/utils'; import ConfigProvider ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/__tests__/type.test.tsx
components/slider/__tests__/type.test.tsx
import * as React from 'react'; import type { SliderRangeProps } from '..'; import Slider from '..'; describe('Slider.typescript', () => { it('single value', () => { const value = 0; const onChange = (v: number) => v; const result = ( <Slider defaultValue={value} value={value} onChange={onChange} ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/__tests__/image.test.ts
components/slider/__tests__/image.test.ts
import { imageDemoTest } from '../../../tests/shared/imageTest'; describe('Slider image', () => { imageDemoTest('slider'); });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/__tests__/demo.test.ts
components/slider/__tests__/demo.test.ts
import demoTest from '../../../tests/shared/demoTest'; demoTest('slider', { skip: ['show-tooltip.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/slider/__tests__/demo-extend.test.ts
components/slider/__tests__/demo-extend.test.ts
import { extendTest } from '../../../tests/shared/demoTest'; extendTest('slider');
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/__tests__/tooltip.test.tsx
components/slider/__tests__/tooltip.test.tsx
import React from 'react'; import Slider from '..'; import { fireEvent, render, waitFakeTimer } from '../../../tests/utils'; import type { TooltipProps, TooltipRef } from '../../tooltip'; function tooltipProps(): TooltipProps { return (global as any).tooltipProps; } jest.mock('../../tooltip', () => { const React...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/__tests__/semantic.test.tsx
components/slider/__tests__/semantic.test.tsx
import React from 'react'; import Slider from '..'; import { render } from '../../../tests/utils'; describe('Slider.Semantic', () => { it('should support classNames and styles as functions', () => { const classNamesFn = (info: { props: any }) => { if (info.props.disabled) { return { root: 'disable...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/demo/multiple.tsx
components/slider/demo/multiple.tsx
import React from 'react'; import { Slider } from 'antd'; function getGradientColor(percentage: number) { const startColor = [135, 208, 104]; const endColor = [255, 204, 199]; const midColor = startColor.map((start, i) => { const end = endColor[i]; const delta = end - start; return (start + delta * ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/demo/editable.tsx
components/slider/demo/editable.tsx
import React from 'react'; import { Slider } from 'antd'; const App: React.FC = () => { const [value, setValue] = React.useState([20, 80]); return ( <Slider range={{ editable: true, minCount: 1, maxCount: 5 }} value={value} onChange={setValue} /> ); }; 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/slider/demo/_semantic.tsx
components/slider/demo/_semantic.tsx
import React from 'react'; import { Slider } from 'antd'; import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview'; import useLocale from '../../../.dumi/hooks/useLocale'; const locales = { cn: { root: '根元素,设置相对定位、高度、边距、内边距、光标样式和触摸事件控制', track: '轨道选取条元素,设置绝对定位、背景色、圆角和过渡动画样式', tracks: '多...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/demo/input-number.tsx
components/slider/demo/input-number.tsx
import React, { useState } from 'react'; import type { InputNumberProps } from 'antd'; import { Col, InputNumber, Row, Slider, Space } from 'antd'; const IntegerStep: React.FC = () => { const [inputValue, setInputValue] = useState(1); const onChange: InputNumberProps['onChange'] = (newValue) => { setInputValu...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/demo/mark.tsx
components/slider/demo/mark.tsx
import React from 'react'; import { Slider } from 'antd'; import type { SliderSingleProps } from 'antd'; const marks: SliderSingleProps['marks'] = { 0: '0°C', 26: '26°C', 37: '37°C', 100: { style: { color: '#f50', }, label: <strong>100°C</strong>, }, }; const App: React.FC = () => ( <> ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/demo/draggableTrack.tsx
components/slider/demo/draggableTrack.tsx
import React from 'react'; import { Slider } from 'antd'; const App: React.FC = () => <Slider range={{ draggableTrack: true }} defaultValue={[20, 50]} />; 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/slider/demo/show-tooltip.tsx
components/slider/demo/show-tooltip.tsx
import React from 'react'; import { Slider } from 'antd'; const App: React.FC = () => <Slider defaultValue={30} tooltip={{ open: true }} />; 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/slider/demo/event.tsx
components/slider/demo/event.tsx
import React from 'react'; import { Slider } from 'antd'; const onChange = (value: number | number[]) => { console.log('onChange: ', value); }; const onChangeComplete = (value: number | number[]) => { console.log('onChangeComplete: ', value); }; const App: React.FC = () => ( <> <Slider defaultValue={30} on...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/demo/component-token.tsx
components/slider/demo/component-token.tsx
import React from 'react'; import { ConfigProvider, Slider } from 'antd'; const style: React.CSSProperties = { display: 'inline-block', height: 300, marginInlineStart: 70, }; const marks = { 0: '0°C', 26: '26°C', 37: '37°C', 100: { style: { color: '#f50' }, label: <strong>100°C</strong>, }, };...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/slider/demo/basic.tsx
components/slider/demo/basic.tsx
import React, { useState } from 'react'; import { Slider, Switch } from 'antd'; const App: React.FC = () => { const [disabled, setDisabled] = useState(false); const onChange = (checked: boolean) => { setDisabled(checked); }; return ( <> <Slider defaultValue={30} disabled={disabled} /> <Sl...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false