@@ -73,6 +73,8 @@ export const useMainStyles = createStyles(({ css, cx, token, prefixCls, iconPref
7373 bodyFontWeight,
7474 bodyFontColor,
7575 freezeHeaders,
76+ actionIconSize,
77+ actionIconColor,
7678} : {
7779 rowBackgroundColor ?: string ;
7880 rowAlternateBackgroundColor ?: string ;
@@ -104,9 +106,11 @@ export const useMainStyles = createStyles(({ css, cx, token, prefixCls, iconPref
104106 rowDividers ?: boolean ;
105107 bodyFontFamily ?: string ;
106108 bodyFontSize ?: string ;
107- bodyFontWeight ?: string ;
109+ bodyFontWeight ?: number & { } | string ;
108110 bodyFontColor ?: string ;
109111 freezeHeaders ?: boolean ;
112+ actionIconSize ?: string | number ;
113+ actionIconColor ?: string ;
110114} ) => {
111115 const {
112116 shaTable,
@@ -312,6 +316,12 @@ export const useMainStyles = createStyles(({ css, cx, token, prefixCls, iconPref
312316 /* Apply text alignment to header cells */
313317 .${ th } {
314318 ${ headerTextAlign ? `text-align: ${ headerTextAlign } !important;` : '' }
319+
320+ /* Map headerTextAlign to justify-content for flex containers */
321+ ${ headerTextAlign === 'left' ? 'justify-content: flex-start !important;' : '' }
322+ ${ headerTextAlign === 'right' ? 'justify-content: flex-end !important;' : '' }
323+ ${ headerTextAlign === 'center' ? 'justify-content: center !important;' : '' }
324+ ${ headerTextAlign === 'justify' ? 'justify-content: space-between !important;' : '' }
315325 }
316326
317327 /* Apply header background to relative columns within headers */
@@ -322,6 +332,10 @@ export const useMainStyles = createStyles(({ css, cx, token, prefixCls, iconPref
322332
323333 & .${ trBody } {
324334 ${ rowHeight ? `height: ${ rowHeight } ;` : 'height: auto;' }
335+ /* Row must be positioned and use flex for separators to work */
336+ position : relative;
337+ display : flex;
338+ align-items : stretch;
325339 ${ ( ( ) => {
326340 // Prefer rowBorderStyle over rowBorder for full border control
327341 if ( rowBorderStyle ) {
@@ -353,7 +367,6 @@ export const useMainStyles = createStyles(({ css, cx, token, prefixCls, iconPref
353367 ${ bodyFontWeight ? `font-weight: ${ bodyFontWeight } !important;` : '' }
354368 ${ bodyFontColor ? `color: ${ bodyFontColor } !important;` : '' }
355369 ${ bodyTextAlign ? `text-align: ${ bodyTextAlign } !important;` : '' }
356-
357370 }
358371
359372 /* Apply body font styles to form component content */
@@ -433,6 +446,24 @@ export const useMainStyles = createStyles(({ css, cx, token, prefixCls, iconPref
433446 vertical-align : middle;
434447 ${ cellBorders && cellBorderColor ? `border: 1px solid ${ cellBorderColor } ;` : '' }
435448 ${ Object . entries ( cellBorderStyles ) . map ( ( [ key , value ] ) => `${ key . replace ( / ( [ A - Z ] ) / g, '-$1' ) . toLowerCase ( ) } : ${ value } ;` ) . join ( ' ' ) }
449+
450+ /* Action icons styling for all table cells */
451+ .sha-link {
452+ /* Always center icons regardless of cell text-align */
453+ display : inline-flex;
454+ align-items : center;
455+ justify-content : center;
456+ width : 100% ;
457+
458+ .${ iconPrefixCls } {
459+ font-size : ${ actionIconSize || bodyFontSize || '16px' } ;
460+ width : ${ actionIconSize || bodyFontSize || '16px' } ;
461+ height : ${ actionIconSize || bodyFontSize || '16px' } ;
462+ min-width : ${ actionIconSize || bodyFontSize || '16px' } ;
463+ min-height : ${ actionIconSize || bodyFontSize || '16px' } ;
464+ ${ actionIconColor ? `color: ${ actionIconColor } ;` : '' }
465+ }
466+ }
436467 }
437468
438469 .${ th } {
@@ -459,11 +490,12 @@ export const useMainStyles = createStyles(({ css, cx, token, prefixCls, iconPref
459490 height : auto;
460491
461492 .${ iconPrefixCls } {
462- font-size : ${ bodyFontSize || '16px' } ;
463- width : ${ bodyFontSize || '16px' } ;
464- height : ${ bodyFontSize || '16px' } ;
465- min-width : ${ bodyFontSize || '16px' } ;
466- min-height : ${ bodyFontSize || '16px' } ;
493+ font-size : ${ actionIconSize || bodyFontSize || '16px' } ;
494+ width : ${ actionIconSize || bodyFontSize || '16px' } ;
495+ height : ${ actionIconSize || bodyFontSize || '16px' } ;
496+ min-width : ${ actionIconSize || bodyFontSize || '16px' } ;
497+ min-height : ${ actionIconSize || bodyFontSize || '16px' } ;
498+ ${ actionIconColor ? `color: ${ actionIconColor } ;` : '' }
467499 display : inline-flex;
468500 align-items : center;
469501 justify-content : center;
@@ -476,11 +508,12 @@ export const useMainStyles = createStyles(({ css, cx, token, prefixCls, iconPref
476508 align-items : center;
477509
478510 .${ iconPrefixCls } {
479- font-size : ${ bodyFontSize || '16px' } ;
480- width : ${ bodyFontSize || '16px' } ;
481- height : ${ bodyFontSize || '16px' } ;
482- min-width : ${ bodyFontSize || '16px' } ;
483- min-height : ${ bodyFontSize || '16px' } ;
511+ font-size : ${ actionIconSize || bodyFontSize || '16px' } ;
512+ width : ${ actionIconSize || bodyFontSize || '16px' } ;
513+ height : ${ actionIconSize || bodyFontSize || '16px' } ;
514+ min-width : ${ actionIconSize || bodyFontSize || '16px' } ;
515+ min-height : ${ actionIconSize || bodyFontSize || '16px' } ;
516+ ${ actionIconColor ? `color: ${ actionIconColor } ;` : '' }
484517 display : inline-flex;
485518 align-items : center;
486519 justify-content : center;
@@ -712,14 +745,33 @@ export const useMainStyles = createStyles(({ css, cx, token, prefixCls, iconPref
712745 overflow : hidden;
713746 text-overflow : ellipsis;
714747 margin : 0 ;
715- border-right : 1px solid rgba (0 , 0 , 0 , 0.05 );
716748 padding : 0.5rem ; /* Default padding for all cells */
717749
750+ /* Add vertical separator using pseudo-element that stretches full height */
751+ & ::after {
752+ content : '' ;
753+ position : absolute;
754+ right : 0 ;
755+ top : 0 ;
756+ bottom : 0px ;
757+ width : 1px ;
758+ background-color : rgba (0 , 0 , 0 , 0.05 );
759+ pointer-events : none;
760+ }
761+
718762 /* Only apply minimum height when rowHeight is auto to prevent empty cell collapse */
719763 ${ ! rowHeight || rowHeight === 'auto' ? `
720- height: 44px;
721- vertical-align: middle;
722- line-height: normal;
764+ /* Force cells to stretch to row height - !important overrides React Table inline styles */
765+ min-height: 44px !important;
766+ height: auto !important;
767+ align-self: stretch !important;
768+ display: flex !important;
769+ justify-content: ${ bodyTextAlign === 'right'
770+ ? 'flex-end'
771+ : bodyTextAlign === 'center'
772+ ? 'center'
773+ : 'flex-start' } !important;
774+ align-items: center !important;
723775
724776 /* Force empty cells to maintain height */
725777 &:empty::before {
0 commit comments