import { MaskType } from "../_util/hooks/useMergedMask.js"; import { AnyObject, VueNode } from "../_util/type.js"; import "../_util/hooks/index.js"; import { WarningContextProps } from "../_util/warning.js"; import { SeedToken } from "../theme/interface/seeds.js"; import { MapToken } from "../theme/interface/maps/index.js"; import { AliasToken } from "../theme/interface/alias.js"; import { OverrideToken } from "../theme/interface/cssinjs-utils.js"; import "../theme/interface/index.js"; import { TooltipProps } from "../tooltip/index.js"; import { FormProps } from "../form/Form.js"; import { TimePickerProps } from "../time-picker/index.js"; import { DatePickerProps, RangePickerProps } from "../date-picker/index.js"; import { EmptyProps } from "../empty/index.js"; import { ModalProps } from "../modal/interface.js"; import { SelectProps } from "../select/index.js"; import { PaginationProps } from "../pagination/interface.js"; import { PopoverProps } from "../popover/index.js"; import { PopconfirmProps } from "../popconfirm/index.js"; import { SpinProps } from "../spin/index.js"; import { CheckboxProps } from "../checkbox/Checkbox.js"; import "../checkbox/index.js"; import { MenuProps } from "../menu/index.js"; import { DropdownProps } from "../dropdown/dropdown.js"; import "../dropdown/index.js"; import { TableProps } from "../table/InternalTable.js"; import "../table/index.js"; import { TourProps } from "../tour/index.js"; import { TransferProps } from "../transfer/interface.js"; import { ProgressProps } from "../progress/progress.js"; import "../progress/index.js"; import { UploadProps } from "../upload/interface.js"; import { Locale } from "../locale/index.js"; import { RenderEmptyHandler } from "./defaultRenderEmpty.js"; import { ConfigProviderProps } from "./index.js"; import { ShowWaveEffect } from "../_util/wave/interface.js"; import { AlertProps } from "../alert/Alert.js"; import "../alert/index.js"; import { AnchorProps } from "../anchor/Anchor.js"; import "../anchor/index.js"; import { RibbonProps } from "../badge/Ribbon.js"; import { BadgeProps } from "../badge/index.js"; import { BreadcrumbProps } from "../breadcrumb/Breadcrumb.js"; import { CalendarProps } from "../calendar/generateCalendar.js"; import "../calendar/index.js"; import { TabsProps } from "../tabs/index.js"; import { CardProps } from "../card/Card.js"; import { CardMetaProps } from "../card/CardMeta.js"; import { CascaderProps } from "../cascader/index.js"; import { CollapseProps } from "../collapse/Collapse.js"; import "../collapse/index.js"; import { ColorPickerProps } from "../color-picker/index.js"; import { DescriptionsProps } from "../descriptions/index.js"; import { DividerProps } from "../divider/index.js"; import { DrawerProps } from "../drawer/index.js"; import { FlexProps } from "../flex/interface.js"; import "../flex/index.js"; import { FloatButtonProps } from "../float-button/FloatButton.js"; import { FloatButtonGroupProps } from "../float-button/FloatButtonGroup.js"; import "../float-button/index.js"; import { ImageProps } from "../image/index.js"; import { InputNumberProps } from "../input-number/index.js"; import { InputProps } from "../input/Input.js"; import { OTPProps } from "../input/OTP/index.js"; import { SearchProps } from "../input/Search.js"; import { TextAreaProps } from "../input/TextArea.js"; import { MasonryProps } from "../masonry/Masonry.js"; import { ArgsProps } from "../notification/interface.js"; import "../notification/index.js"; import { QRCodeProps } from "../qrcode/index.js"; import { RadioProps } from "../radio/interface.js"; import { ResultProps } from "../result/index.js"; import { SegmentedProps } from "../segmented/index.js"; import { SkeletonProps } from "../skeleton/Skeleton.js"; import "../skeleton/index.js"; import { SliderProps } from "../slider/index.js"; import { SpaceProps } from "../space/index.js"; import { SplitterProps } from "../splitter/index.js"; import { StatisticProps } from "../statistic/index.js"; import { StepsProps } from "../steps/index.js"; import { SwitchProps } from "../switch/index.js"; import { TagProps } from "../tag/index.js"; import { TimelineProps } from "../timeline/Timeline.js"; import "../timeline/index.js"; import { TreeProps } from "../tree/Tree.js"; import { TreeSelectProps } from "../tree-select/index.js"; import { BlockProps } from "../typography/interface.js"; import { ButtonProps } from "../button/Button.js"; import "../button/index.js"; import * as vue487 from "vue"; import { CSSProperties, Ref } from "vue"; import { DerivativeFunc } from "@antdv-next/cssinjs"; //#region src/config-provider/context.d.ts declare const defaultPrefixCls = "ant"; declare const defaultIconPrefixCls = "anticon"; type GetClassNamesOrEmptyObject = Config extends { classes?: infer ClassNames; } ? ClassNames : object; type GetStylesOrEmptyObject = Config extends { styles?: infer Styles; } ? Styles : object; type ComponentReturnType = Omit, 'classes' | 'styles'> & { classes: GetClassNamesOrEmptyObject>; styles: GetStylesOrEmptyObject>; getPrefixCls: ConfigConsumerProps['getPrefixCls']; direction: ConfigConsumerProps['direction']; getPopupContainer: ConfigConsumerProps['getPopupContainer']; }; interface Theme { primaryColor?: string; infoColor?: string; successColor?: string; processingColor?: string; errorColor?: string; warningColor?: string; } interface CSPConfig { nonce?: string; } type DirectionType = 'ltr' | 'rtl' | undefined; type MappingAlgorithm = DerivativeFunc; interface ComponentBaseProps { rootClass?: string; prefixCls?: string; } type ComponentsConfig = { [key in keyof OverrideToken]?: OverrideToken[key] & { algorithm?: boolean | MappingAlgorithm | MappingAlgorithm[]; } }; interface ThemeConfig { /** * @descCN 用于修改 Design Token。 * @descEN Modify Design Token. */ token?: Partial; /** * @descCN 用于修改各个组件的 Component Token 以及覆盖该组件消费的 Alias Token。 * @descEN Modify Component Token and Alias Token applied to components. */ components?: ComponentsConfig; /** * @descCN 用于修改 Seed Token 到 Map Token 的算法。 * @descEN Modify the algorithms of theme. * @default defaultAlgorithm */ algorithm?: MappingAlgorithm | MappingAlgorithm[]; /** * @descCN 是否继承外层 `ConfigProvider` 中配置的主题。 * @descEN Whether to inherit the theme configured in the outer layer `ConfigProvider`. * @default true */ inherit?: boolean; /** * @descCN 是否开启 `hashed` 属性。如果你的应用中只存在一个版本的 antd,你可以设置为 `false` 来进一步减小样式体积。 * @descEN Whether to enable the `hashed` attribute. If there is only one version of antd in your application, you can set `false` to reduce the bundle size. * @default true * @since 5.0.0 */ hashed?: boolean; /** * @descCN 通过 `cssVar` 配置来开启 CSS 变量模式,这个配置会被继承。 * @descEN Enable CSS variable mode through `cssVar` configuration, This configuration will be inherited. * @default false * @since 5.12.0 */ cssVar?: { /** * @descCN css 变量的前缀 * @descEN Prefix for css variable. * @default ant */ prefix?: string; /** * @descCN 主题的唯一 key,版本低于 react@18 时需要手动设置。 * @descEN Unique key for theme, should be set manually < react@18. */ key?: string; }; /** * @descCN 开启零运行时模式,不会在运行时产生样式,需要手动引入 CSS 文件。 * @descEN Enable zero-runtime mode, which will not generate style at runtime, need to import additional CSS file. * @default true * @since 6.0.0 * @example * ```tsx * import { ConfigProvider } from 'antd'; * import 'antdv-next/dist/antd.css'; * * const Demo = () => ( * * * *); * ``` */ zeroRuntime?: boolean; } interface ComponentStyleConfig { class?: string; style?: CSSProperties; classes?: any; styles?: any; } type PopupOverflow = 'viewport' | 'scroll'; declare const Variants: readonly ["outlined", "borderless", "filled", "underlined"]; type Variant = (typeof Variants)[number]; interface WaveConfig { /** * @descCN 是否禁用水波纹效果。 * @descEN Whether to disable wave effect. * @default false */ disabled?: boolean; /** * @descCN 自定义水波纹效果。 * @descEN Customized wave effect. */ showEffect?: ShowWaveEffect; } type SpaceConfig = ComponentStyleConfig & Pick; type ButtonConfig = ComponentStyleConfig & Pick & { loadingIcon?: VueNode; }; type FlexConfig = ComponentStyleConfig & Pick; type AlertConfig = ComponentStyleConfig & Pick & { successIcon?: VueNode; infoIcon?: VueNode; warningIcon?: VueNode; errorIcon?: VueNode; }; type BadgeConfig = ComponentStyleConfig & Pick; type TagConfig = ComponentStyleConfig & Pick; type EmptyConfig = ComponentStyleConfig & Pick; type SpinConfig = ComponentStyleConfig & Pick; type DescriptionsConfig = ComponentStyleConfig & Pick; type CollapseConfig = ComponentStyleConfig & Pick; type QRcodeConfig = ComponentStyleConfig & Pick; type ResultConfig = ComponentStyleConfig & Pick; type AnchorStyleConfig = ComponentStyleConfig & Pick; type PaginationConfig = ComponentStyleConfig & Pick; type DividerConfig = ComponentStyleConfig & Pick; type SkeletonConfig = ComponentStyleConfig & Pick; type StatisticConfig = ComponentStyleConfig & Pick; type TypographyConfig = ComponentStyleConfig & Pick; type SplitterConfig = ComponentStyleConfig & Pick; type CalendarConfig = ComponentStyleConfig & Pick, 'classes' | 'styles'>; type FloatButtonConfig = ComponentStyleConfig & Pick & { backTopIcon?: VueNode; }; type FloatButtonGroupConfig = ComponentStyleConfig & Pick & { closeIcon?: VueNode; }; type TooltipConfig = ComponentStyleConfig & Pick & { /** * @descCN 是否开启 Tooltip 流畅过渡动画 * @descEN Whether to enable smooth transition for tooltips * @default false */ unique?: boolean; }; type PopoverConfig = ComponentStyleConfig & Pick; type PopconfirmConfig = ComponentStyleConfig & Pick; type SegmentedConfig = ComponentStyleConfig & Pick; type MenuConfig = ComponentStyleConfig & Pick; type TourConfig = ComponentStyleConfig & Pick; type NotificationConfig = ComponentStyleConfig & Pick; type BreadcrumbConfig = ComponentStyleConfig & Pick; type MasonryConfig = ComponentStyleConfig & Pick; type FormConfig = ComponentStyleConfig & Pick; type RadioConfig = ComponentStyleConfig & Pick; type CheckboxConfig = ComponentStyleConfig & Pick; type SwitchStyleConfig = ComponentStyleConfig & Pick; type TransferConfig = ComponentStyleConfig & Pick; type InputConfig = ComponentStyleConfig & Pick; type InputNumberConfig = ComponentStyleConfig & Pick; type TextAreaConfig = ComponentStyleConfig & Pick; type MentionsConfig = ComponentStyleConfig & Pick; type InputSearchConfig = ComponentStyleConfig & Pick; type OTPConfig = ComponentStyleConfig & Pick; type SliderConfig = ComponentStyleConfig & Pick; type TabsConfig = ComponentStyleConfig & Pick; type SelectConfig = ComponentStyleConfig & Pick; type CascaderConfig = ComponentStyleConfig & Pick; type CardMetaConfig = ComponentStyleConfig & Pick; type CardConfig = ComponentStyleConfig & Pick; type DrawerConfig = ComponentStyleConfig & Pick; type ModalConfig = ComponentStyleConfig & Pick; type StepsConfig = ComponentStyleConfig & Pick; type TimelineConfig = ComponentStyleConfig & Pick; type ImageConfig = ComponentStyleConfig & Pick & { preview?: Partial> & Pick & { mask?: MaskType; }; fallback?: string; }; type TreeConfig = ComponentStyleConfig & Pick; type TreeSelectConfig = ComponentStyleConfig & Pick; type UploadConfig = ComponentStyleConfig & Pick; type DatePickerConfig = ComponentStyleConfig & Pick; type RangePickerConfig = ComponentStyleConfig & Pick; type TimePickerConfig = ComponentStyleConfig & Pick; interface TableConfig extends ComponentStyleConfig { expandable?: { expandIcon?: NonNullable['expandIcon']; }; rowKey?: TableProps['rowKey']; classes?: TableProps['classes']; styles?: TableProps['styles']; scroll?: TableProps['scroll']; bodyCell?: TableProps['bodyCell']; headerCell?: TableProps['headerCell']; } type RibbonConfig = ComponentStyleConfig & Pick; type ColorPickerConfig = ComponentStyleConfig & Pick; type DropdownConfig = ComponentStyleConfig & Pick; type ProgressConfig = ComponentStyleConfig & Pick; interface ConfigComponentProps { input?: InputConfig; inputNumber?: InputNumberConfig; textArea?: TextAreaConfig; mentions?: MentionsConfig; pagination?: PaginationConfig; inputSearch?: InputSearchConfig; otp?: OTPConfig; space?: SpaceConfig; splitter?: SplitterConfig; form?: FormConfig; select?: SelectConfig; app?: ComponentStyleConfig; alert?: AlertConfig; anchor?: AnchorStyleConfig; button?: ButtonConfig; divider?: DividerConfig; drawer?: DrawerConfig; calendar?: CalendarConfig; carousel?: ComponentStyleConfig; cascader?: CascaderConfig; treeSelect?: TreeSelectConfig; collapse?: CollapseConfig; floatButton?: FloatButtonConfig; floatButtonGroup?: FloatButtonGroupConfig; typography?: TypographyConfig; skeleton?: SkeletonConfig; spin?: SpinConfig; segmented?: SegmentedConfig; steps?: StepsConfig; statistic?: StatisticConfig; image?: ImageConfig; layout?: ComponentStyleConfig; modal?: ModalConfig; progress?: ProgressConfig; result?: ResultConfig; slider?: SliderConfig; breadcrumb?: BreadcrumbConfig; masonry?: MasonryConfig; menu?: MenuConfig; checkbox?: CheckboxConfig; descriptions?: DescriptionsConfig; empty?: EmptyConfig; badge?: BadgeConfig; radio?: RadioConfig; rate?: ComponentStyleConfig; switch?: SwitchStyleConfig; transfer?: TransferConfig; avatar?: ComponentStyleConfig; message?: ComponentStyleConfig; tag?: TagConfig; table?: TableConfig; card?: CardConfig; cardMeta?: CardMetaConfig; tabs?: TabsConfig; timeline?: TimelineConfig; timePicker?: TimePickerConfig; tour?: TourConfig; tooltip?: TooltipConfig; popover?: PopoverConfig; popconfirm?: PopconfirmConfig; upload?: UploadConfig; notification?: NotificationConfig; tree?: TreeConfig; colorPicker?: ColorPickerConfig; datePicker?: DatePickerConfig; ribbon?: RibbonConfig; rangePicker?: RangePickerConfig; dropdown?: DropdownConfig; flex?: FlexConfig; qrcode?: QRcodeConfig; wave?: WaveConfig; } interface ConfigConsumerProps extends ConfigComponentProps { getTargetContainer?: () => HTMLElement; getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement; rootPrefixCls?: string; iconPrefixCls: string; getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string; renderEmpty?: RenderEmptyHandler; transformCellText?: ConfigProviderProps['transformCellText']; /** * @descCN 设置 [Content Security Policy](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CSP) 配置。 * @descEN Set the [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) config. */ csp?: CSPConfig; /** @deprecated Please use `{ button: { autoInsertSpace: boolean }}` instead */ autoInsertSpaceInButton?: boolean; variant?: Variant; virtual?: boolean; locale?: Locale; direction?: DirectionType; popupMatchSelectWidth?: boolean; popupOverflow?: PopupOverflow; theme?: ThemeConfig; warning?: WarningContextProps; wave?: WaveConfig; } declare function useConfigProvider(props: Ref): void; declare function useConfig(): Ref; /** * Utility type to convert ConfigConsumerProps to a reactive refs structure. * Functions remain as-is, other values are wrapped in Ref. */ type ConfigRefs = { [K in keyof R]?: R[K] extends ((...args: any[]) => any) ? R[K] : R[K] extends object | undefined ? Ref : Ref }; declare function useBaseConfig(suffixCls?: K, props?: ComponentBaseProps): { result: vue487.ComputedRef; modal: vue487.ComputedRef; timeline: vue487.ComputedRef; notification: vue487.ComputedRef; getPrefixCls: (suffixCls?: string, prefixCls?: string) => string; prefixCls: vue487.ComputedRef; direction: vue487.ComputedRef; getPopupContainer: ((triggerNode?: HTMLElement) => HTMLElement) | undefined; }; /** * Get ConfigProvider configured component props. * This help to reduce bundle size for saving `?.` operator. * Do not use as `useMemo` deps since we do not cache the object here. * * NOTE: not refactor this with `useMemo` since memo will cost another memory space, * which will waste both compare calculation & memory. */ declare function useComponentConfig(propName: T): vue487.ComputedRef>; declare function useComponentBaseConfig = keyof NonNullable>(propName: T, props?: ComponentBaseProps, keys?: readonly K[], suffixCls?: string): ({ classes?: any; styles?: any; } & ConfigComponentProps[T] extends infer T_1 ? { [Key in keyof T_1]-?: Ref } : never) & { direction: vue487.ComputedRef; prefixCls: vue487.ComputedRef; rootPrefixCls: vue487.ComputedRef; getPopupContainer: ((triggerNode?: HTMLElement) => HTMLElement) | undefined; getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string; getTargetContainer: (() => HTMLElement) | undefined; virtual: vue487.ComputedRef; renderEmpty: vue487.ComputedRef; popupMatchSelectWidth: vue487.ComputedRef; popupOverflow: vue487.ComputedRef; }; //#endregion export { AlertConfig, AnchorStyleConfig, BadgeConfig, BreadcrumbConfig, ButtonConfig, CSPConfig, CalendarConfig, CardConfig, CardMetaConfig, CascaderConfig, CheckboxConfig, CollapseConfig, ColorPickerConfig, ComponentBaseProps, ComponentStyleConfig, ConfigComponentProps, ConfigConsumerProps, ConfigRefs, DatePickerConfig, DescriptionsConfig, DirectionType, DividerConfig, DrawerConfig, DropdownConfig, EmptyConfig, FlexConfig, FloatButtonConfig, FloatButtonGroupConfig, FormConfig, ImageConfig, InputConfig, InputNumberConfig, InputSearchConfig, MappingAlgorithm, MasonryConfig, MentionsConfig, MenuConfig, ModalConfig, NotificationConfig, OTPConfig, PaginationConfig, PopconfirmConfig, PopoverConfig, PopupOverflow, ProgressConfig, QRcodeConfig, RadioConfig, RangePickerConfig, ResultConfig, RibbonConfig, SegmentedConfig, SelectConfig, SkeletonConfig, SliderConfig, SpaceConfig, SpinConfig, SplitterConfig, StatisticConfig, StepsConfig, SwitchStyleConfig, TableConfig, TabsConfig, TagConfig, TextAreaConfig, Theme, ThemeConfig, TimePickerConfig, TimelineConfig, TooltipConfig, TourConfig, TransferConfig, TreeConfig, TreeSelectConfig, TypographyConfig, UploadConfig, Variant, Variants, WaveConfig, defaultIconPrefixCls, defaultPrefixCls, useBaseConfig, useComponentBaseConfig, useComponentConfig, useConfig, useConfigProvider };