index.d.ts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import type { CSSProperties } from 'react';
  2. import type { FullToken, GenStyleFn, GetDefaultToken } from '../../theme/internal';
  3. export interface ComponentToken {
  4. /**
  5. * @desc 必填项标记颜色
  6. * @descEN Required mark color
  7. */
  8. labelRequiredMarkColor: string;
  9. /**
  10. * @desc 标签颜色
  11. * @descEN Label color
  12. */
  13. labelColor: string;
  14. /**
  15. * @desc 标签字体大小
  16. * @descEN Label font size
  17. */
  18. labelFontSize: number;
  19. /**
  20. * @desc 标签高度
  21. * @descEN Label height
  22. */
  23. labelHeight: number | string;
  24. /**
  25. * @desc 标签冒号前间距
  26. * @descEN Label colon margin-inline-start
  27. */
  28. labelColonMarginInlineStart: number;
  29. /**
  30. * @desc 标签冒号后间距
  31. * @descEN Label colon margin-inline-end
  32. */
  33. labelColonMarginInlineEnd: number;
  34. /**
  35. * @desc 表单项间距
  36. * @descEN Form item margin bottom
  37. */
  38. itemMarginBottom: number;
  39. /**
  40. * @desc 行内布局表单项间距
  41. * @descEN Inline layout form item margin bottom
  42. */
  43. inlineItemMarginBottom: number;
  44. /**
  45. * @desc 垂直布局标签内边距
  46. * @descEN Vertical layout label padding
  47. */
  48. verticalLabelPadding: CSSProperties['padding'];
  49. /**
  50. * @desc 垂直布局标签外边距
  51. * @descEN Vertical layout label margin
  52. */
  53. verticalLabelMargin: CSSProperties['margin'];
  54. }
  55. /**
  56. * @desc Form 组件的 Token
  57. * @descEN Token for Form component
  58. */
  59. export interface FormToken extends FullToken<'Form'> {
  60. /**
  61. * @desc 表单项类名
  62. * @descEN Form item class name
  63. */
  64. formItemCls: string;
  65. /**
  66. * @desc 根前缀类名
  67. * @descEN Root prefix class name
  68. */
  69. rootPrefixCls: string;
  70. }
  71. export declare const prepareComponentToken: GetDefaultToken<'Form'>;
  72. export declare const prepareToken: (token: Parameters<GenStyleFn<'Form'>>[0], rootPrefixCls: string) => FormToken;
  73. declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
  74. export default _default;