index.d.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. import type React from 'react';
  2. import type { AliasToken, FullToken, GenerateStyle, GenStyleFn, GlobalToken, TokenWithCommonCls } from '../../theme/internal';
  3. /** Component only token. Which will handle additional calculation of alias token */
  4. export interface ComponentToken {
  5. /**
  6. * @desc 顶部背景色
  7. * @descEN Background color of header
  8. */
  9. headerBg: string;
  10. /**
  11. * @desc 标题行高
  12. * @descEN Line height of title
  13. */
  14. titleLineHeight: number | string;
  15. /**
  16. * @desc 标题字体大小
  17. * @descEN Font size of title
  18. */
  19. titleFontSize: number;
  20. /**
  21. * @desc 标题字体颜色
  22. * @descEN Font color of title
  23. */
  24. titleColor: string;
  25. /**
  26. * @desc 内容区域背景色
  27. * @descEN Background color of content
  28. */
  29. contentBg: string;
  30. /**
  31. * @desc 底部区域背景色
  32. * @descEN Background color of footer
  33. */
  34. footerBg: string;
  35. }
  36. /**
  37. * @desc Modal 组件的 Token
  38. * @descEN Token for Modal component
  39. */
  40. export interface ModalToken extends FullToken<'Modal'> {
  41. /**
  42. * @desc 模态框头部高度
  43. * @descEN Height of modal header
  44. */
  45. modalHeaderHeight: number | string;
  46. /**
  47. * @desc 模态框底部边框颜色
  48. * @descEN Border color of modal footer
  49. */
  50. modalFooterBorderColorSplit: string;
  51. /**
  52. * @desc 模态框底部边框样式
  53. * @descEN Border style of modal footer
  54. */
  55. modalFooterBorderStyle: string;
  56. /**
  57. * @desc 模态框底部边框宽度
  58. * @descEN Border width of modal footer
  59. */
  60. modalFooterBorderWidth: number | string;
  61. /**
  62. * @desc 模态框关闭图标颜色
  63. * @descEN Color of modal close icon
  64. */
  65. modalCloseIconColor: string;
  66. /**
  67. * @desc 模态框关闭图标悬停颜色
  68. * @descEN Hover color of modal close icon
  69. */
  70. modalCloseIconHoverColor: string;
  71. /**
  72. * @desc 模态框关闭按钮尺寸
  73. * @descEN Size of modal close button
  74. */
  75. modalCloseBtnSize: number | string;
  76. /**
  77. * @desc 模态框确认图标尺寸
  78. * @descEN Size of modal confirm icon
  79. */
  80. modalConfirmIconSize: number | string;
  81. /**
  82. * @desc 模态框标题高度
  83. * @descEN Height of modal title
  84. */
  85. modalTitleHeight: number | string;
  86. }
  87. export declare const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>>;
  88. export declare const prepareToken: (token: Parameters<GenStyleFn<'Modal'>>[0]) => ModalToken;
  89. export declare const prepareComponentToken: (token: GlobalToken) => {
  90. footerBg: string;
  91. headerBg: string;
  92. titleLineHeight: number;
  93. titleFontSize: number;
  94. contentBg: string;
  95. titleColor: string;
  96. contentPadding: string | number;
  97. headerPadding: string | number;
  98. headerBorderBottom: string;
  99. headerMarginBottom: number;
  100. bodyPadding: number;
  101. footerPadding: string | number;
  102. footerBorderTop: string;
  103. footerBorderRadius: string | number;
  104. footerMarginTop: number;
  105. confirmBodyPadding: string | number;
  106. confirmIconMarginInlineEnd: number;
  107. confirmBtnsMarginTop: number;
  108. };
  109. declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
  110. export default _default;