selection.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. const genSelectionStyle = token => {
  7. const {
  8. componentCls,
  9. antCls,
  10. iconCls,
  11. fontSizeIcon,
  12. paddingXS,
  13. tableHeaderIconColor,
  14. tableHeaderIconColorHover
  15. } = token;
  16. return {
  17. [`${componentCls}-wrapper`]: {
  18. // ========================== Selections ==========================
  19. [`${componentCls}-selection-col`]: {
  20. width: token.tableSelectionColumnWidth
  21. },
  22. [`${componentCls}-bordered ${componentCls}-selection-col`]: {
  23. width: token.tableSelectionColumnWidth + paddingXS * 2
  24. },
  25. [`
  26. table tr th${componentCls}-selection-column,
  27. table tr td${componentCls}-selection-column
  28. `]: {
  29. paddingInlineEnd: token.paddingXS,
  30. paddingInlineStart: token.paddingXS,
  31. textAlign: 'center',
  32. [`${antCls}-radio-wrapper`]: {
  33. marginInlineEnd: 0
  34. }
  35. },
  36. [`table tr th${componentCls}-selection-column${componentCls}-cell-fix-left`]: {
  37. zIndex: token.zIndexTableFixed + 1
  38. },
  39. [`table tr th${componentCls}-selection-column::after`]: {
  40. backgroundColor: 'transparent !important'
  41. },
  42. [`${componentCls}-selection`]: {
  43. position: 'relative',
  44. display: 'inline-flex',
  45. flexDirection: 'column'
  46. },
  47. [`${componentCls}-selection-extra`]: {
  48. position: 'absolute',
  49. top: 0,
  50. zIndex: 1,
  51. cursor: 'pointer',
  52. transition: `all ${token.motionDurationSlow}`,
  53. marginInlineStart: '100%',
  54. paddingInlineStart: `${token.tablePaddingHorizontal / 4}px`,
  55. [iconCls]: {
  56. color: tableHeaderIconColor,
  57. fontSize: fontSizeIcon,
  58. verticalAlign: 'baseline',
  59. '&:hover': {
  60. color: tableHeaderIconColorHover
  61. }
  62. }
  63. }
  64. }
  65. };
  66. };
  67. var _default = exports.default = genSelectionStyle;