index.d.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import type { CSSObject } from '@ant-design/cssinjs';
  2. import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal';
  3. export interface ComponentToken {
  4. /**
  5. * @desc 预览浮层 z-index
  6. * @descEN z-index of preview popup
  7. */
  8. zIndexPopup: number;
  9. /**
  10. * @desc 预览操作图标大小
  11. * @descEN Size of preview operation icon
  12. */
  13. previewOperationSize: number;
  14. /**
  15. * @desc 预览操作图标颜色
  16. * @descEN Color of preview operation icon
  17. */
  18. previewOperationColor: string;
  19. /**
  20. * @desc 预览操作图标悬浮颜色
  21. * @descEN Color of hovered preview operation icon
  22. */
  23. previewOperationHoverColor: string;
  24. /**
  25. * @desc 预览操作图标禁用颜色
  26. * @descEN Disabled color of preview operation icon
  27. */
  28. previewOperationColorDisabled: string;
  29. }
  30. /**
  31. * @desc Image 组件的 Token
  32. * @descEN Token for Image component
  33. */
  34. export interface ImageToken extends FullToken<'Image'> {
  35. /**
  36. * @desc 预览类名
  37. * @descEN Preview class name
  38. */
  39. previewCls: string;
  40. /**
  41. * @desc 模态框遮罩背景色
  42. * @descEN Background color of modal mask
  43. */
  44. modalMaskBg: string;
  45. /**
  46. * @desc 预览切换按钮尺寸
  47. * @descEN Size of preview switch button
  48. */
  49. imagePreviewSwitchSize: number;
  50. }
  51. export type PositionType = 'static' | 'relative' | 'fixed' | 'absolute' | 'sticky' | undefined;
  52. export declare const genBoxStyle: (position?: PositionType) => CSSObject;
  53. export declare const genImageMaskStyle: (token: ImageToken) => CSSObject;
  54. export declare const genPreviewOperationsStyle: (token: ImageToken) => CSSObject;
  55. export declare const genPreviewSwitchStyle: (token: ImageToken) => CSSObject;
  56. export declare const genImagePreviewStyle: GenerateStyle<ImageToken>;
  57. export declare const prepareComponentToken: GetDefaultToken<'Image'>;
  58. declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
  59. export default _default;