token.d.ts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. import type { CSSProperties } from 'react';
  2. import type { FullToken, GetDefaultToken } from 'antd/es/theme/internal';
  3. export interface MultipleSelectorToken {
  4. /**
  5. * @desc 多选标签背景色
  6. * @descEN Background color of multiple tag
  7. */
  8. multipleItemBg: string;
  9. /**
  10. * @desc 多选标签边框色
  11. * @descEN Border color of multiple tag
  12. */
  13. multipleItemBorderColor: string;
  14. /**
  15. * @desc 多选标签高度
  16. * @descEN Height of multiple tag
  17. */
  18. multipleItemHeight: number;
  19. /**
  20. * @desc 小号多选标签高度
  21. * @descEN Height of multiple tag with small size
  22. */
  23. multipleItemHeightSM: number;
  24. /**
  25. * @desc 大号多选标签高度
  26. * @descEN Height of multiple tag with large size
  27. */
  28. multipleItemHeightLG: number;
  29. /**
  30. * @desc 多选框禁用背景
  31. * @descEN Background color of multiple selector when disabled
  32. */
  33. multipleSelectorBgDisabled: string;
  34. /**
  35. * @desc 多选标签禁用文本颜色
  36. * @descEN Text color of multiple tag when disabled
  37. */
  38. multipleItemColorDisabled: string;
  39. /**
  40. * @desc 多选标签禁用边框色
  41. * @descEN Border color of multiple tag when disabled
  42. */
  43. multipleItemBorderColorDisabled: string;
  44. }
  45. export interface ComponentToken extends MultipleSelectorToken {
  46. /**
  47. * @desc 下拉菜单 z-index
  48. * @descEN z-index of dropdown
  49. */
  50. zIndexPopup: number;
  51. /**
  52. * @desc 选项选中时文本颜色
  53. * @descEN Text color when option is selected
  54. */
  55. optionSelectedColor: string;
  56. /**
  57. * @desc 选项选中时文本字重
  58. * @descEN Font weight when option is selected
  59. */
  60. optionSelectedFontWeight: CSSProperties['fontWeight'];
  61. /**
  62. * @desc 选项选中时背景色
  63. * @descEN Background color when option is selected
  64. */
  65. optionSelectedBg: string;
  66. /**
  67. * @desc 选项激活态时背景色
  68. * @descEN Background color when option is active
  69. */
  70. optionActiveBg: string;
  71. /**
  72. * @desc 选项内间距
  73. * @descEN Padding of option
  74. */
  75. optionPadding: CSSProperties['padding'];
  76. /**
  77. * @desc 选项字体大小
  78. * @descEN Font size of option
  79. */
  80. optionFontSize: number;
  81. /**
  82. * @desc 选项行高
  83. * @descEN Line height of option
  84. */
  85. optionLineHeight: CSSProperties['lineHeight'];
  86. /**
  87. * @desc 选项高度
  88. * @descEN Height of option
  89. */
  90. optionHeight: number;
  91. /**
  92. * @desc 选框背景色
  93. * @descEN Background color of selector
  94. */
  95. selectorBg: string;
  96. /**
  97. * @desc 清空按钮背景色
  98. * @descEN Background color of clear button
  99. */
  100. clearBg: string;
  101. /**
  102. * @desc 单选大号回填项高度
  103. * @descEN Height of single selected item with large size
  104. */
  105. singleItemHeightLG: number;
  106. /**
  107. * @desc 箭头的行末内边距
  108. * @descEN Inline end padding of arrow
  109. */
  110. showArrowPaddingInlineEnd: number;
  111. /**
  112. * @desc 悬浮态边框色
  113. * @descEN Hover border color
  114. */
  115. hoverBorderColor: string;
  116. /**
  117. * @desc 激活态边框色
  118. * @descEN Active border color
  119. */
  120. activeBorderColor: string;
  121. /**
  122. * @desc 激活态 outline 颜色
  123. * @descEN Active outline color
  124. */
  125. activeOutlineColor: string;
  126. }
  127. export interface SelectorToken {
  128. selectAffixPadding: number | string;
  129. inputPaddingHorizontalBase: number | string;
  130. multipleSelectItemHeight: number;
  131. selectHeight: number;
  132. }
  133. export interface SelectToken extends FullToken<'Select'>, SelectorToken {
  134. rootPrefixCls: string;
  135. /** @private Used for internal calculation */
  136. INTERNAL_FIXED_ITEM_MARGIN: number;
  137. }
  138. export declare const prepareComponentToken: GetDefaultToken<'Select'>;