multiple.d.ts 2.2 KB

1234567891011121314151617181920212223242526272829303132
  1. import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs';
  2. import type { SelectToken } from './token';
  3. /**
  4. * Get multiple selector needed style. The calculation:
  5. *
  6. * ContainerPadding = BasePadding - ItemMargin
  7. *
  8. * Border: ╔═══════════════════════════╗ ┬
  9. * ContainerPadding: ║ ║ │
  10. * ╟───────────────────────────╢ ┬ │
  11. * Item Margin: ║ ║ │ │
  12. * ║ ┌──────────┐ ║ │ │
  13. * Item(multipleItemHeight): ║ BasePadding │ Item │ ║ Overflow Container(ControlHeight)
  14. * ║ └──────────┘ ║ │ │
  15. * Item Margin: ║ ║ │ │
  16. * ╟───────────────────────────╢ ┴ │
  17. * ContainerPadding: ║ ║ │
  18. * Border: ╚═══════════════════════════╝ ┴
  19. */
  20. export declare const getMultipleSelectorUnit: (token: Pick<SelectToken, "max" | "calc" | "multipleSelectItemHeight" | "paddingXXS" | "lineWidth" | "INTERNAL_FIXED_ITEM_MARGIN">) => {
  21. basePadding: string | number;
  22. containerPadding: string | number;
  23. itemHeight: string;
  24. itemLineHeight: string;
  25. };
  26. /**
  27. * Get the `rc-overflow` needed style.
  28. * It's a share style which means not affected by `size`.
  29. */
  30. export declare const genOverflowStyle: (token: Pick<SelectToken, "calc" | "componentCls" | "iconCls" | "borderRadiusSM" | "motionDurationSlow" | "paddingXS" | "multipleItemColorDisabled" | "multipleItemBorderColorDisabled" | "colorIcon" | "colorIconHover" | "INTERNAL_FIXED_ITEM_MARGIN">) => CSSObject;
  31. declare const genMultipleStyle: (token: SelectToken) => CSSInterpolation;
  32. export default genMultipleStyle;