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/locale/tr_TR.ts
components/locale/tr_TR.ts
import Pagination from '@rc-component/pagination/lib/locale/tr_TR'; import type { Locale } from '.'; import Calendar from '../calendar/locale/tr_TR'; import DatePicker from '../date-picker/locale/tr_TR'; import TimePicker from '../time-picker/locale/tr_TR'; const typeTemplate = '${label} geçerli bir ${type} değil'; ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/sk_SK.ts
components/locale/sk_SK.ts
import Pagination from '@rc-component/pagination/lib/locale/sk_SK'; import type { Locale } from '.'; import Calendar from '../calendar/locale/sk_SK'; import DatePicker from '../date-picker/locale/sk_SK'; import TimePicker from '../time-picker/locale/sk_SK'; const typeTemplate = '${label} nie je platný ${type}'; 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/locale/index.tsx
components/locale/index.tsx
import * as React from 'react'; import type { ValidateMessages } from '@rc-component/form/lib/interface'; import { devUseWarning } from '../_util/warning'; import type { PickerLocale as DatePickerLocale } from '../date-picker/generatePicker'; import type { TransferLocale as TransferLocaleForEmpty } from '../empty'; im...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/by_BY.ts
components/locale/by_BY.ts
import Pagination from '@rc-component/pagination/lib/locale/by_BY'; import type { Locale } from '.'; import Calendar from '../calendar/locale/by_BY'; import DatePicker from '../date-picker/locale/by_BY'; import TimePicker from '../time-picker/locale/by_BY'; const typeTemplate: string = "${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/locale/az_AZ.ts
components/locale/az_AZ.ts
import Pagination from '@rc-component/pagination/lib/locale/az_AZ'; import type { Locale } from '.'; import Calendar from '../calendar/locale/az_AZ'; import DatePicker from '../date-picker/locale/az_AZ'; import TimePicker from '../time-picker/locale/az_AZ'; const typeTemplate = '${label} Hökmlü deyil ${type}'; const...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/sl_SI.ts
components/locale/sl_SI.ts
import Pagination from '@rc-component/pagination/lib/locale/sl_SI'; import type { Locale } from '.'; import Calendar from '../calendar/locale/sl_SI'; import DatePicker from '../date-picker/locale/sl_SI'; import TimePicker from '../time-picker/locale/sl_SI'; const localeValues: Locale = { locale: 'sl', Pagination,...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/uk_UA.ts
components/locale/uk_UA.ts
import Pagination from '@rc-component/pagination/lib/locale/uk_UA'; import type { Locale } from '.'; import Calendar from '../calendar/locale/uk_UA'; import DatePicker from '../date-picker/locale/uk_UA'; import TimePicker from '../time-picker/locale/uk_UA'; const typeTemplate: string = '${label} не є типом ${type}'; ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/ta_IN.ts
components/locale/ta_IN.ts
import Pagination from '@rc-component/pagination/lib/locale/ta_IN'; import type { Locale } from '.'; import Calendar from '../calendar/locale/ta_IN'; import DatePicker from '../date-picker/locale/ta_IN'; import TimePicker from '../time-picker/locale/ta_IN'; const typeTemplate = '${label} is not a valid ${type}'; con...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/pl_PL.ts
components/locale/pl_PL.ts
import Pagination from '@rc-component/pagination/lib/locale/pl_PL'; import type { Locale } from '.'; import Calendar from '../calendar/locale/pl_PL'; import DatePicker from '../date-picker/locale/pl_PL'; import TimePicker from '../time-picker/locale/pl_PL'; const typeTemplate = '${label} nie posiada poprawnej wartoś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/locale/si_LK.ts
components/locale/si_LK.ts
import Pagination from '@rc-component/pagination/lib/locale/si_LK'; import type { Locale } from '.'; import Calendar from '../calendar/locale/si_LK'; import DatePicker from '../date-picker/locale/si_LK'; import TimePicker from '../time-picker/locale/si_LK'; const typeTemplate = '${label} වලංගු ${type} ක් නොවේ'; 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/locale/useLocale.ts
components/locale/useLocale.ts
import * as React from 'react'; import type { Locale } from '.'; import type { LocaleContextProps } from './context'; import LocaleContext from './context'; import defaultLocaleData from './en_US'; export type LocaleComponentName = Exclude<keyof Locale, 'locale'>; const useLocale = <C extends LocaleComponentName = L...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/zh_HK.ts
components/locale/zh_HK.ts
import Pagination from '@rc-component/pagination/lib/locale/zh_TW'; import type { Locale } from '.'; import Calendar from '../calendar/locale/zh_TW'; import DatePicker from '../date-picker/locale/zh_TW'; import TimePicker from '../time-picker/locale/zh_TW'; const typeTemplate = '${label}不是一個有效的${type}'; const locale...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/zh_CN.ts
components/locale/zh_CN.ts
import Pagination from '@rc-component/pagination/lib/locale/zh_CN'; import type { Locale } from '.'; import Calendar from '../calendar/locale/zh_CN'; import DatePicker from '../date-picker/locale/zh_CN'; import TimePicker from '../time-picker/locale/zh_CN'; const typeTemplate = '${label}不是一个有效的${type}'; const locale...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/fa_IR.ts
components/locale/fa_IR.ts
import Pagination from '@rc-component/pagination/lib/locale/fa_IR'; import type { Locale } from '.'; import Calendar from '../calendar/locale/fa_IR'; import DatePicker from '../date-picker/locale/fa_IR'; import TimePicker from '../time-picker/locale/fa_IR'; const typeTemplate = '${label} از نوع ${type} معتبر نیست'; ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/tk_TK.ts
components/locale/tk_TK.ts
import Pagination from '@rc-component/pagination/lib/locale/tk_TK'; import type { Locale } from '.'; import Calendar from '../calendar/locale/tk_TK'; import DatePicker from '../date-picker/locale/tk_TK'; import TimePicker from '../time-picker/locale/tk_TK'; const typeTemplate: string = '${label} ${type} görnüşinde dä...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/ka_GE.ts
components/locale/ka_GE.ts
import Pagination from '@rc-component/pagination/lib/locale/ka_GE'; import type { Locale } from '.'; import Calendar from '../calendar/locale/ka_GE'; import DatePicker from '../date-picker/locale/ka_GE'; import TimePicker from '../time-picker/locale/ka_GE'; const typeTemplate = '${label} არ არის სწორი ${type}'; 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/locale/ne_NP.ts
components/locale/ne_NP.ts
import Pagination from '@rc-component/pagination/lib/locale/en_US'; import type { Locale } from '.'; import Calendar from '../calendar/locale/en_US'; import DatePicker from '../date-picker/locale/en_US'; import TimePicker from '../time-picker/locale/en_US'; const typeTemplate = '${label} यो एक मान्य ${type} होइन'; 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/locale/fr_FR.ts
components/locale/fr_FR.ts
import Pagination from '@rc-component/pagination/lib/locale/fr_FR'; import type { Locale } from '.'; import Calendar from '../calendar/locale/fr_FR'; import DatePicker from '../date-picker/locale/fr_FR'; import TimePicker from '../time-picker/locale/fr_FR'; const typeTemplate = "La valeur du champ ${label} n'est pas ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/fr_CA.ts
components/locale/fr_CA.ts
import Pagination from '@rc-component/pagination/lib/locale/fr_CA'; import type { Locale } from '.'; import Calendar from '../calendar/locale/fr_CA'; import DatePicker from '../date-picker/locale/fr_CA'; import TimePicker from '../time-picker/locale/fr_CA'; const typeTemplate = "La valeur du champ ${label} n'est pas ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/fi_FI.ts
components/locale/fi_FI.ts
import Pagination from '@rc-component/pagination/lib/locale/fi_FI'; import type { Locale } from '.'; import Calendar from '../calendar/locale/fi_FI'; import DatePicker from '../date-picker/locale/fi_FI'; import TimePicker from '../time-picker/locale/fi_FI'; const localeValues: Locale = { locale: 'fi', Pagination,...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/hy_AM.ts
components/locale/hy_AM.ts
import type { Locale } from '.'; import type { PickerLocale } from '../date-picker/generatePicker'; const datePickerLocale: PickerLocale = { lang: { locale: 'hy-am', placeholder: 'Ընտրեք ամսաթիվը', rangePlaceholder: ['Մեկնարկի ամսաթիվ', 'Ավարտի ամսաթիվը'], today: 'Այսօր', now: 'Հիմա', backToT...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/he_IL.ts
components/locale/he_IL.ts
import Pagination from '@rc-component/pagination/lib/locale/he_IL'; import type { Locale } from '.'; import Calendar from '../calendar/locale/he_IL'; import DatePicker from '../date-picker/locale/he_IL'; import TimePicker from '../time-picker/locale/he_IL'; const typeTemplate = '${label} הוא לא ${type} תקין'; const ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/bg_BG.ts
components/locale/bg_BG.ts
import Pagination from '@rc-component/pagination/lib/locale/bg_BG'; import type { Locale } from '.'; import Calendar from '../calendar/locale/bg_BG'; import DatePicker from '../date-picker/locale/bg_BG'; import TimePicker from '../time-picker/locale/bg_BG'; const typeTemplate = '${label} не е валиден ${type}'; const...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/nl_BE.ts
components/locale/nl_BE.ts
import Pagination from '@rc-component/pagination/lib/locale/nl_BE'; import type { Locale } from '.'; import Calendar from '../calendar/locale/nl_BE'; import DatePicker from '../date-picker/locale/nl_BE'; import TimePicker from '../time-picker/locale/nl_BE'; const typeTemplate = '${label} is geen geldige ${type}'; co...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/context.ts
components/locale/context.ts
import { createContext } from 'react'; import type { Locale } from '.'; export type LocaleContextProps = Locale & { exist?: boolean }; const LocaleContext = createContext<LocaleContextProps | undefined>(undefined); export default LocaleContext;
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/bn_BD.ts
components/locale/bn_BD.ts
import Pagination from '@rc-component/pagination/lib/locale/bn_BD'; import type { Locale } from '.'; import Calendar from '../calendar/locale/bn_BD'; import DatePicker from '../date-picker/locale/bn_BD'; import TimePicker from '../time-picker/locale/bn_BD'; const typeTemplate = '${label} টি সঠিক ${type} নয়।'; const ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/is_IS.ts
components/locale/is_IS.ts
import Pagination from '@rc-component/pagination/lib/locale/is_IS'; import type { Locale } from '.'; import Calendar from '../calendar/locale/is_IS'; import DatePicker from '../date-picker/locale/is_IS'; import TimePicker from '../time-picker/locale/is_IS'; const typeTemplate = '${label} er ekki gilt ${type}'; const...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/en_US.ts
components/locale/en_US.ts
import Pagination from '@rc-component/pagination/lib/locale/en_US'; import type { Locale } from '.'; import Calendar from '../calendar/locale/en_US'; import DatePicker from '../date-picker/locale/en_US'; import TimePicker from '../time-picker/locale/en_US'; const typeTemplate = '${label} is not a valid ${type}'; con...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/gl_ES.ts
components/locale/gl_ES.ts
import Pagination from '@rc-component/pagination/lib/locale/gl_ES'; import type { Locale } from '.'; import Calendar from '../calendar/locale/gl_ES'; import DatePicker from '../date-picker/locale/gl_ES'; import TimePicker from '../time-picker/locale/gl_ES'; const typeTemplate = '${label} non é un ${type} válido'; co...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/ur_PK.ts
components/locale/ur_PK.ts
import Pagination from '@rc-component/pagination/lib/locale/ur_PK'; import type { Locale } from '.'; import Calendar from '../calendar/locale/ur_PK'; import DatePicker from '../date-picker/locale/ur_PK'; import TimePicker from '../time-picker/locale/ur_PK'; const typeTemplate = '${label} درست نہیں ہے ${type}'; const...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/pt_PT.ts
components/locale/pt_PT.ts
import Pagination from '@rc-component/pagination/lib/locale/pt_PT'; import type { Locale } from '.'; import Calendar from '../calendar/locale/pt_PT'; import DatePicker from '../date-picker/locale/pt_PT'; import TimePicker from '../time-picker/locale/pt_PT'; const typeTemplate = '${label} não é um(a) ${type} válido(a)...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/lt_LT.ts
components/locale/lt_LT.ts
import Pagination from '@rc-component/pagination/lib/locale/lt_LT'; import type { Locale } from '.'; import Calendar from '../calendar/locale/lt_LT'; import DatePicker from '../date-picker/locale/lt_LT'; import TimePicker from '../time-picker/locale/lt_LT'; const typeTemplate: string = '${label} neatitinka tipo ${typ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/mn_MN.ts
components/locale/mn_MN.ts
import Pagination from '@rc-component/pagination/lib/locale/mn_MN'; import type { Locale } from '.'; import Calendar from '../calendar/locale/mn_MN'; import DatePicker from '../date-picker/locale/mn_MN'; import TimePicker from '../time-picker/locale/mn_MN'; const typeTemplate = '${label} нь хүчинтэй ${type} биш'; co...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/eu_ES.ts
components/locale/eu_ES.ts
import Pagination from '@rc-component/pagination/lib/locale/eu_ES'; import type { Locale } from '.'; import Calendar from '../calendar/locale/eu_ES'; import DatePicker from '../date-picker/locale/eu_ES'; import TimePicker from '../time-picker/locale/eu_ES'; const typeTemplate = '${label} ez da ${type} balioduna'; co...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/es_ES.ts
components/locale/es_ES.ts
import Pagination from '@rc-component/pagination/lib/locale/es_ES'; import type { Locale } from '.'; import Calendar from '../calendar/locale/es_ES'; import DatePicker from '../date-picker/locale/es_ES'; import TimePicker from '../time-picker/locale/es_ES'; const typeTemplate = '${label} no es un ${type} válido'; co...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/ga_IE.ts
components/locale/ga_IE.ts
import Pagination from '@rc-component/pagination/lib/locale/ga_IE'; import type { Locale } from '.'; import Calendar from '../calendar/locale/ga_IE'; import DatePicker from '../date-picker/locale/ga_IE'; import TimePicker from '../time-picker/locale/ga_IE'; const typeTemplate = '${label} is not a valid ${type}'; con...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/ru_RU.ts
components/locale/ru_RU.ts
import Pagination from '@rc-component/pagination/lib/locale/ru_RU'; import type { Locale } from '.'; import Calendar from '../calendar/locale/ru_RU'; import DatePicker from '../date-picker/locale/ru_RU'; import TimePicker from '../time-picker/locale/ru_RU'; const typeTemplate: string = '${label} не является типом ${t...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/lv_LV.ts
components/locale/lv_LV.ts
import Pagination from '@rc-component/pagination/lib/locale/lv_LV'; import type { Locale } from '.'; import Calendar from '../calendar/locale/lv_LV'; import DatePicker from '../date-picker/locale/lv_LV'; import TimePicker from '../time-picker/locale/lv_LV'; const localeValues: Locale = { locale: 'lv', Pagination,...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/hu_HU.ts
components/locale/hu_HU.ts
import Pagination from '@rc-component/pagination/lib/locale/hu_HU'; import type { Locale } from '.'; import Calendar from '../calendar/locale/hu_HU'; import DatePicker from '../date-picker/locale/hu_HU'; import TimePicker from '../time-picker/locale/hu_HU'; const localeValues: Locale = { locale: 'hu', Pagination,...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/__tests__/cached-context.test.tsx
components/locale/__tests__/cached-context.test.tsx
import React, { memo, useContext } from 'react'; import LocaleProvider from '..'; import { fireEvent, pureRender } from '../../../tests/utils'; import LocaleContext from '../context'; let innerCount = 0; let outerCount = 0; const handleClick = () => { outerCount++; }; // we use'memo' here in order to only render ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/__tests__/index.test.tsx
components/locale/__tests__/index.test.tsx
import dayjs from 'dayjs'; import 'dayjs/locale/ar'; import 'dayjs/locale/az'; import 'dayjs/locale/be'; import 'dayjs/locale/bg'; import 'dayjs/locale/bn-bd'; import 'dayjs/locale/ca'; import 'dayjs/locale/cs'; import 'dayjs/locale/da'; import 'dayjs/locale/de'; import 'dayjs/locale/el'; import 'dayjs/locale/en'; imp...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/locale/__tests__/config.test.tsx
components/locale/__tests__/config.test.tsx
import React, { useEffect } from 'react'; import { Modal } from '../..'; import { fireEvent, render, waitFakeTimer } from '../../../tests/utils'; import ConfigProvider from '../../config-provider'; import zhCN from '../zh_CN'; const Demo: React.FC<{ type: string }> = ({ type }) => { useEffect(() => { if (type =...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/layout.tsx
components/layout/layout.tsx
import * as React from 'react'; import { omit } from '@rc-component/util'; import { clsx } from 'clsx'; import { ConfigContext } from '../config-provider'; import { useComponentConfig } from '../config-provider/context'; import { LayoutContext } from './context'; import useHasSider from './hooks/useHasSider'; import u...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/index.tsx
components/layout/index.tsx
import InternalLayout, { Content, Footer, Header } from './layout'; import Sider, { SiderContext } from './Sider'; export type { BasicProps as LayoutProps } from './layout'; export type { SiderProps } from './Sider'; type InternalLayoutType = typeof InternalLayout; type CompoundedComponent = InternalLayoutType & { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/Sider.tsx
components/layout/Sider.tsx
import * as React from 'react'; import { useContext, useEffect, useRef, useState } from 'react'; import BarsOutlined from '@ant-design/icons/BarsOutlined'; import LeftOutlined from '@ant-design/icons/LeftOutlined'; import RightOutlined from '@ant-design/icons/RightOutlined'; import { omit } from '@rc-component/util'; i...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/context.ts
components/layout/context.ts
import * as React from 'react'; export interface LayoutContextProps { siderHook: { addSider: (id: string) => void; removeSider: (id: string) => void; }; } export const LayoutContext = React.createContext<LayoutContextProps>({ siderHook: { addSider: () => null, removeSider: () => null, }, });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/style/sider.ts
components/layout/style/sider.ts
import { unit } from '@ant-design/cssinjs'; import type { CSSObject } from '@ant-design/cssinjs'; import { DEPRECATED_TOKENS, prepareComponentToken } from '.'; import type { LayoutToken } from '.'; import type { GenerateStyle } from '../../theme/interface'; import { genStyleHooks } from '../../theme/internal'; const ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/style/index.ts
components/layout/style/index.ts
import type { CSSProperties } from 'react'; import { unit } from '@ant-design/cssinjs'; import type { CSSObject } from '@ant-design/cssinjs'; import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal'; import { genStyleHooks } from '../../theme/internal'; export interface ComponentToken { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/hooks/useHasSider.ts
components/layout/hooks/useHasSider.ts
import type * as React from 'react'; import { toArray } from '@rc-component/util'; import Sider from '../Sider'; export default function useHasSider( siders: string[], children?: React.ReactNode, hasSider?: boolean, ) { if (typeof hasSider === 'boolean') { return hasSider; } if (siders.length) { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/__tests__/a11y.test.ts
components/layout/__tests__/a11y.test.ts
import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; accessibilityDemoTest('layout', { // we can ignore it skip: ['basic.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/layout/__tests__/token.test.tsx
components/layout/__tests__/token.test.tsx
import React from 'react'; import Layout from '..'; import { render } from '../../../tests/utils'; import ConfigProvider from '../../config-provider'; import Menu from '../../menu'; const { Header } = Layout; describe('Layout.Token', () => { it('legacy theme should work', () => { const { container } = render( ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/__tests__/warning.test.tsx
components/layout/__tests__/warning.test.tsx
import React from 'react'; import Layout from '..'; import { render } from '../../../tests/utils'; const { Sider, Footer, Header } = Layout; describe('Layout.Warning', () => { (['Layout', 'Header', 'Footer', 'Sider'] as const).forEach((tag) => { const ComponentMap = { Layout, Header, Footer, Sider }; // S...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/__tests__/index.test.tsx
components/layout/__tests__/index.test.tsx
import React, { useState } from 'react'; import { UserOutlined } from '@ant-design/icons'; import { renderToString } from 'react-dom/server'; import Layout from '..'; import mountTest from '../../../tests/shared/mountTest'; import rtlTest from '../../../tests/shared/rtlTest'; import { act, fireEvent, render } from '.....
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/__tests__/image.test.ts
components/layout/__tests__/image.test.ts
import { imageDemoTest } from '../../../tests/shared/imageTest'; describe('Layout image', () => { imageDemoTest('layout', { skip: ['fixed-sider.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/layout/__tests__/demo.test.ts
components/layout/__tests__/demo.test.ts
import demoTest from '../../../tests/shared/demoTest'; demoTest('layout', { skip: ['custom-trigger-debug.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/layout/__tests__/demo-extend.test.ts
components/layout/__tests__/demo-extend.test.ts
import { extendTest } from '../../../tests/shared/demoTest'; extendTest('layout', { skip: ['custom-trigger-debug.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/layout/__tests__/dynamic-breakpoint.test.tsx
components/layout/__tests__/dynamic-breakpoint.test.tsx
import React, { useState } from 'react'; import type { Breakpoint } from '../..'; import { fireEvent, render } from '../../../tests/utils'; import Sider from '../Sider'; const Content = () => { const [breakpoint, setBreakpoint] = useState<Breakpoint>('sm'); const toggleBreakpoint = () => { if (breakpoint === ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/demo/fixed-sider.tsx
components/layout/demo/fixed-sider.tsx
import React from 'react'; import { AppstoreOutlined, BarChartOutlined, CloudOutlined, ShopOutlined, TeamOutlined, UploadOutlined, UserOutlined, VideoCameraOutlined, } from '@ant-design/icons'; import type { MenuProps } from 'antd'; import { Layout, Menu, theme } from 'antd'; const { Header, Content, 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/layout/demo/fixed.tsx
components/layout/demo/fixed.tsx
import React from 'react'; import { Breadcrumb, Layout, Menu, theme } from 'antd'; const { Header, Content, Footer } = Layout; const items = Array.from({ length: 3 }).map((_, index) => ({ key: String(index + 1), label: `nav ${index + 1}`, })); const App: React.FC = () => { const { token: { colorBgContainer...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/demo/side.tsx
components/layout/demo/side.tsx
import React, { useState } from 'react'; import { DesktopOutlined, FileOutlined, PieChartOutlined, TeamOutlined, UserOutlined, } from '@ant-design/icons'; import type { MenuProps } from 'antd'; import { Breadcrumb, Layout, Menu, theme } from 'antd'; const { Header, Content, Footer, Sider } = Layout; type Me...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/demo/component-token.tsx
components/layout/demo/component-token.tsx
import React from 'react'; import { LaptopOutlined, NotificationOutlined, UserOutlined } from '@ant-design/icons'; import type { MenuProps } from 'antd'; import { Breadcrumb, ConfigProvider, Layout, Menu, theme } from 'antd'; const { Header, Content, Sider } = Layout; const items2: MenuProps['items'] = [UserOutlined,...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/demo/basic.tsx
components/layout/demo/basic.tsx
import React from 'react'; import { Flex, Layout } from 'antd'; const { Header, Footer, Sider, Content } = Layout; const headerStyle: React.CSSProperties = { textAlign: 'center', color: '#fff', height: 64, paddingInline: 48, lineHeight: '64px', backgroundColor: '#4096ff', }; const contentStyle: React.CSS...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/demo/top-side-2.tsx
components/layout/demo/top-side-2.tsx
import React from 'react'; import { LaptopOutlined, NotificationOutlined, UserOutlined } from '@ant-design/icons'; import type { MenuProps } from 'antd'; import { Breadcrumb, Layout, Menu, theme } from 'antd'; const { Header, Content, Sider } = Layout; const items1: MenuProps['items'] = ['1', '2', '3'].map((key) => (...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/demo/responsive.tsx
components/layout/demo/responsive.tsx
import React from 'react'; import { UploadOutlined, UserOutlined, VideoCameraOutlined } from '@ant-design/icons'; import { Layout, Menu, theme } from 'antd'; const { Header, Content, Footer, Sider } = Layout; const items = [UserOutlined, VideoCameraOutlined, UploadOutlined, UserOutlined].map( (icon, index) => ({ ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/demo/top-side.tsx
components/layout/demo/top-side.tsx
import React from 'react'; import { LaptopOutlined, NotificationOutlined, UserOutlined } from '@ant-design/icons'; import type { MenuProps } from 'antd'; import { Breadcrumb, Layout, Menu, theme } from 'antd'; const { Header, Content, Footer, Sider } = Layout; const items1: MenuProps['items'] = ['1', '2', '3'].map((k...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/demo/custom-trigger-debug.tsx
components/layout/demo/custom-trigger-debug.tsx
import React, { useState } from 'react'; import { DesktopOutlined, FileOutlined, MenuFoldOutlined, MenuUnfoldOutlined, PieChartOutlined, TeamOutlined, UserOutlined, } from '@ant-design/icons'; import type { MenuProps } from 'antd'; import { Button, Layout, Menu, theme } from 'antd'; const { Header, Sider...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/demo/custom-trigger.tsx
components/layout/demo/custom-trigger.tsx
import React, { useState } from 'react'; import { MenuFoldOutlined, MenuUnfoldOutlined, UploadOutlined, UserOutlined, VideoCameraOutlined, } from '@ant-design/icons'; import { Button, Layout, Menu, theme } from 'antd'; const { Header, Sider, Content } = Layout; const App: React.FC = () => { const [collaps...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/layout/demo/top.tsx
components/layout/demo/top.tsx
import React from 'react'; import { Breadcrumb, Layout, Menu, theme } from 'antd'; const { Header, Content, Footer } = Layout; const items = Array.from({ length: 15 }).map((_, index) => ({ key: index + 1, label: `nav ${index + 1}`, })); const App: React.FC = () => { const { token: { colorBgContainer, borde...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/DefaultLoadingIcon.tsx
components/button/DefaultLoadingIcon.tsx
import React, { forwardRef } from 'react'; import LoadingOutlined from '@ant-design/icons/LoadingOutlined'; import CSSMotion from '@rc-component/motion'; import { clsx } from 'clsx'; import IconWrapper from './IconWrapper'; type InnerLoadingIconProps = { prefixCls: string; className?: string; style?: React.CSSP...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/ButtonGroup.tsx
components/button/ButtonGroup.tsx
import * as React from 'react'; import { clsx } from 'clsx'; import { devUseWarning } from '../_util/warning'; import { ConfigContext } from '../config-provider'; import type { SizeType } from '../config-provider/SizeContext'; import { useToken } from '../theme/internal'; export interface ButtonGroupProps { size?: ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/buttonHelpers.tsx
components/button/buttonHelpers.tsx
import React from 'react'; import { clsx } from 'clsx'; import isNonNullable from '../_util/isNonNullable'; import { cloneElement, isFragment } from '../_util/reactNode'; import { PresetColors } from '../theme/interface'; import type { BaseButtonProps, LegacyButtonType } from './Button'; const rxTwoCNChar = /^[\u4E00...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/index.tsx
components/button/index.tsx
import Button from './Button'; export type { SizeType as ButtonSize } from '../config-provider/SizeContext'; export type { ButtonProps } from './Button'; export type { ButtonGroupProps } from './ButtonGroup'; export * from './buttonHelpers'; export default Button;
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/IconWrapper.tsx
components/button/IconWrapper.tsx
import React, { forwardRef } from 'react'; import { clsx } from 'clsx'; export type IconWrapperProps = { prefixCls: string; className?: string; style?: React.CSSProperties; children?: React.ReactNode; }; const IconWrapper = forwardRef<HTMLSpanElement, IconWrapperProps>((props, ref) => { const { className, s...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/Button.tsx
components/button/Button.tsx
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react'; import { omit, toArray, useComposeRef } from '@rc-component/util'; import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect'; import { clsx } from 'clsx'; import { useMergeSemantic } from '../_util/hooks'; import type { S...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/style/variant.ts
components/button/style/variant.ts
import { PresetColors } from '../../theme/interface'; import type { GenerateStyle } from '../../theme/interface'; import { genCssVar } from '../../theme/util/genStyleUtils'; import type { ButtonToken } from './token'; const genVariantStyle: GenerateStyle<ButtonToken> = (token) => { const { componentCls, antCls } = t...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/style/group.ts
components/button/style/group.ts
import type { GenerateStyle } from '../../theme/internal'; import type { ButtonToken } from './token'; const genButtonBorderStyle = (buttonTypeCls: string, borderColor: string) => ({ // Border [`> span, > ${buttonTypeCls}`]: { '&:not(:last-child)': { [`&, & > ${buttonTypeCls}`]: { '&:not(: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/button/style/compact.ts
components/button/style/compact.ts
// Style as inline component import type { CSSObject } from '@ant-design/cssinjs'; import { genCompactItemStyle } from '../../style/compact-item'; import { genCompactItemVerticalStyle } from '../../style/compact-item-vertical'; import type { GenerateStyle } from '../../theme/internal'; import { genSubStyleComponent } ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/style/token.ts
components/button/style/token.ts
import type { CSSProperties } from 'react'; import type { CSSObject } from '@ant-design/cssinjs'; import { unit } from '@ant-design/cssinjs'; import { AggregationColor } from '../../color-picker/color'; import { isBright } from '../../color-picker/components/ColorPresets'; import type { FullToken, GenStyleFn, GetDefau...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/style/index.ts
components/button/style/index.ts
import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs'; import { unit } from '@ant-design/cssinjs'; import { genFocusStyle, resetIcon } from '../../style'; import type { GenerateStyle } from '../../theme/internal'; import { genStyleHooks, mergeToken } from '../../theme/internal'; import genGroupStyle 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/button/__tests__/a11y.test.ts
components/button/__tests__/a11y.test.ts
import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; accessibilityDemoTest('button');
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/__tests__/index.test.tsx
components/button/__tests__/index.test.tsx
import React, { Suspense, useRef, useState } from 'react'; import { SearchOutlined } from '@ant-design/icons'; import { warning } from '@rc-component/util'; import Button, { _ButtonVariantTypes } from '..'; import type { GetRef } from '../../_util/type'; import mountTest from '../../../tests/shared/mountTest'; import ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/__tests__/image.test.ts
components/button/__tests__/image.test.ts
import { imageDemoTest } from '../../../tests/shared/imageTest'; describe('Button image', () => { imageDemoTest('button', { skip: ['loading.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/button/__tests__/wave.test.tsx
components/button/__tests__/wave.test.tsx
import React from 'react'; import userEvent from '@testing-library/user-event'; import Button from '..'; import { act, fireEvent, render } from '../../../tests/utils'; // TODO: Remove this. Mock for React 19 jest.mock('react-dom', () => { const realReactDOM = jest.requireActual('react-dom'); if (realReactDOM.ver...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/__tests__/demo.test.ts
components/button/__tests__/demo.test.ts
import demoTest from '../../../tests/shared/demoTest'; demoTest('button', { 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/button/__tests__/delay-timer.test.tsx
components/button/__tests__/delay-timer.test.tsx
import React, { useState } from 'react'; import { act, fireEvent, render } from '../../../tests/utils'; import Button from '../Button'; const specialDelay = 9529; const Content = () => { const [loading, setLoading] = useState(false); const toggleLoading = () => { setLoading(!loading); }; const [visible, ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/__tests__/demo-extend.test.ts
components/button/__tests__/demo-extend.test.ts
import { extendTest } from '../../../tests/shared/demoTest'; extendTest('button', { 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/button/__tests__/semantic.test.tsx
components/button/__tests__/semantic.test.tsx
import React from 'react'; import Button from '..'; import type { ButtonProps } from '..'; import { render } from '../../../tests/utils'; describe('Button.Semantic', () => { it('should apply dynamic classNames and styles from props function', () => { const classNames: ButtonProps['classNames'] = (info) => { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/demo/block.tsx
components/button/demo/block.tsx
import React from 'react'; import { Button, Flex } from 'antd'; const App: React.FC = () => ( <Flex vertical gap="small" style={{ width: '100%' }}> <Button type="primary" block> Primary </Button> <Button block>Default</Button> <Button type="dashed" block> Dashed </Button> <Button ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/demo/multiple.tsx
components/button/demo/multiple.tsx
import React from 'react'; import { EllipsisOutlined } from '@ant-design/icons'; import type { MenuProps } from 'antd'; import { Button, Dropdown, Flex, Space } from 'antd'; const onMenuClick: MenuProps['onClick'] = (e) => { console.log('click', e); }; const items = [ { key: '1', label: '1st item', }, ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/demo/_semantic.tsx
components/button/demo/_semantic.tsx
import React from 'react'; import { AntDesignOutlined } from '@ant-design/icons'; import { Button } from 'antd'; import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview'; import useLocale from '../../../.dumi/hooks/useLocale'; 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/button/demo/chinese-chars-loading.tsx
components/button/demo/chinese-chars-loading.tsx
import React from 'react'; import { PoweroffOutlined } from '@ant-design/icons'; import { Button, Flex } from 'antd'; const Text1 = () => <>部署</>; const Text2 = () => <span>部署</span>; const Text3 = () => <>Submit</>; const App: React.FC = () => ( <Flex wrap gap="small"> <Button> <span> <span>部署</s...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/demo/icon-placement.tsx
components/button/demo/icon-placement.tsx
import React, { useState } from 'react'; import { SearchOutlined } from '@ant-design/icons'; import { Button, Divider, Flex, Radio, Space, Tooltip } from 'antd'; const App: React.FC = () => { const [position, setPosition] = useState<'start' | 'end'>('end'); return ( <> <Space> <Radio.Group 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/button/demo/disabled.tsx
components/button/demo/disabled.tsx
import React from 'react'; import { Button, Flex } from 'antd'; const App: React.FC = () => ( <Flex gap="small" align="flex-start" vertical> <Flex gap="small"> <Button type="primary">Primary</Button> <Button type="primary" disabled> Primary(disabled) </Button> </Flex> <Flex gap=...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/demo/danger.tsx
components/button/demo/danger.tsx
import React from 'react'; import { Button, Flex } from 'antd'; const App: React.FC = () => ( <Flex wrap gap="small"> <Button type="primary" danger> Primary </Button> <Button danger>Default</Button> <Button type="dashed" danger> Dashed </Button> <Button type="text" danger> T...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/demo/linear-gradient.tsx
components/button/demo/linear-gradient.tsx
import React from 'react'; import { AntDesignOutlined } from '@ant-design/icons'; import { Button, ConfigProvider, Space } from 'antd'; import { createStyles } from 'antd-style'; const useStyle = createStyles(({ prefixCls, css }) => ({ linearGradientButton: css` &.${prefixCls}-btn-primary:not([disabled]):not(.${...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/demo/debug-block.tsx
components/button/demo/debug-block.tsx
import React from 'react'; import { DownloadOutlined } from '@ant-design/icons'; import { Button, Form } from 'antd'; const App: React.FC = () => ( <Form> <Form.Item> <Button size="large" shape="round" block style={{ marginBottom: 12 }}> Submit </Button> <Button size="large" shape="roun...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/demo/custom-disabled-bg.tsx
components/button/demo/custom-disabled-bg.tsx
import React from 'react'; import { Button, ConfigProvider, Flex } from 'antd'; const App: React.FC = () => ( <Flex gap="small" wrap> <ConfigProvider theme={{ components: { Button: { defaultBgDisabled: 'rgba(0,0,0,0.1)', dashedBgDisabled: 'rgba(0,0,0,0.4)', ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/demo/color-variant.tsx
components/button/demo/color-variant.tsx
import React from 'react'; import { Button, ConfigProvider, Flex } from 'antd'; import { useResponsive } from 'antd-style'; const App: React.FC = () => { const { xxl } = useResponsive(); return ( <ConfigProvider componentSize={xxl ? 'middle' : 'small'}> <Flex vertical gap="small"> <Flex gap="sma...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/demo/debug-color-variant.tsx
components/button/demo/debug-color-variant.tsx
import React from 'react'; import { Button, ConfigProvider, Flex } from 'antd'; import type { ThemeConfig } from 'antd'; import { createStyles } from 'antd-style'; const useSpecStyle = createStyles(({ css }) => ({ primary: css` background: #5794f7; border-color: blue; color: wheat; `, default: css` ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/button/demo/component-token.tsx
components/button/demo/component-token.tsx
import React from 'react'; import { Button, ConfigProvider, Flex } from 'antd'; const App: React.FC = () => ( <Flex gap="small" vertical> <ConfigProvider theme={{ components: { Button: { algorithm: true, colorPrimary: '#1976d2', controlHeight: 36, ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false