Skip to content

Commit

Permalink
final adjustments to table column header styling (#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
heswell authored Oct 27, 2023
1 parent 2e450d9 commit 3cd0826
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import cx from "classnames";
import "./MeasuredContainer.css";

export interface MeasuredContainerProps extends HTMLAttributes<HTMLDivElement> {
/**
* A numeric value for height will result in a fixed height. To adapt to container
* use either a percentage height or 'auto'. Always use 'auto' when rendering
* within a column based flex container, together with a flex value (use the
* --vuuMeasuredContainer-flex CSS custom property))
*/
height?: number | string;
onResize?: (size: MeasuredSize) => void;
width?: number | string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@


.vuuColumnList {
--vuuMeasuredContainer-flex: 1 1 1px;
--vuu-svg-function: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><path d="M5.8625 10.5V9.625H6.72291L8.4875 7.59792L6.72291 5.54167H5.64375L4.60833 10.8792C4.53055 11.3167 4.36527 11.6545 4.1125 11.8927C3.85972 12.1309 3.53402 12.25 3.13541 12.25C2.7368 12.25 2.40382 12.1333 2.13645 11.9C1.86909 11.6667 1.73541 11.375 1.73541 11.025C1.73541 10.7625 1.80833 10.551 1.95416 10.3906C2.1 10.2302 2.28958 10.15 2.52291 10.15C2.72708 10.15 2.89479 10.2083 3.02604 10.325C3.15729 10.4417 3.22291 10.5972 3.22291 10.7917C3.22291 10.8986 3.20104 10.9983 3.15729 11.0906C3.11354 11.183 3.05277 11.2583 2.975 11.3167C3.01388 11.3361 3.0552 11.3507 3.09895 11.3604C3.1427 11.3701 3.18888 11.375 3.2375 11.375C3.36388 11.375 3.47083 11.3142 3.55833 11.1927C3.64583 11.0712 3.70902 10.9132 3.74791 10.7188L4.75416 5.54167H2.91666V4.66667H4.91458L5.22083 3.12083C5.30833 2.68333 5.48333 2.34549 5.74583 2.10729C6.00833 1.8691 6.33402 1.75 6.72291 1.75C7.12152 1.75 7.44965 1.86667 7.70729 2.1C7.96493 2.33333 8.09375 2.625 8.09375 2.975C8.09375 3.2375 8.02083 3.44896 7.875 3.60938C7.72916 3.76979 7.53958 3.85 7.30625 3.85C7.1118 3.85 6.94652 3.7941 6.81041 3.68229C6.6743 3.57049 6.60625 3.42222 6.60625 3.2375C6.60625 3.14028 6.62569 3.04549 6.66458 2.95312C6.70347 2.86076 6.75208 2.78542 6.81041 2.72708C6.79097 2.70764 6.7618 2.69063 6.72291 2.67604C6.68402 2.66146 6.64513 2.65417 6.60625 2.65417C6.47986 2.65417 6.37048 2.7125 6.27812 2.82917C6.18576 2.94583 6.12013 3.09653 6.08125 3.28125L5.81875 4.66667H8.575V5.54167H7.88958L9.1 6.94167L10.2375 5.54167H9.5375V4.66667H12.25V5.54167H11.4042L9.65416 7.59792L11.4042 9.625H12.25V10.5H9.5375V9.625H10.2375L9.07083 8.26875L7.875 9.625H8.575V10.5H5.8625Z"/></svg>');
--vuuList-borderStyle: none;
--vuuListItem-padding: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const ColumnList = ({
<List<ColumnItem, "none">
ListItem={ColumnListItem}
allowDragDrop
height="100%"
height="auto"
onChange={handleChange}
onClick={handleClick}
onMoveListItem={onMoveListItem}
Expand Down
2 changes: 1 addition & 1 deletion vuu-ui/packages/vuu-table/src/table-next/Row.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}

.vuuTableNextRow-selectionDecorator {
background-color: var(--vuu-selection-decorator-bg, inherit);
background-color: var(--vuu-selection-decorator-bg, white);
display: inline-block;
position: relative;
height: var(--row-height);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
--menu-item-icon-color: black;
--vuu-icon-color: white;
--vuu-icon-height: 12px;
--vuu-icon-width: 13px;
--vuu-icon-width: 12px;
align-items: center;
background: var(--salt-taggable-background-active);
color: white;
border-radius: 4px;
flex: var(--vuuColumnHeaderPill-flex, none);
font-size: 11px;
gap: 4px;
height: 16px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
border-radius: 4px;
cursor: pointer;
display: inline-block;
flex: 0 0 20px;
padding: 2px;
left: var(--column-menu-left, 0);
/* left: var(--column-menu-left, 0); */
margin: var(--vuuTable-columnMenu-margin, 0);
width: auto;
}

.vuuTable-columnMenu:hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
cursor: col-resize;
height: var(--header-height);
margin-left: var(--columnResizer-left, auto);
position: relative;
width: 2px;
position: absolute;
right: -5px;
width: 8px;
z-index:1;
}

.vuuColumnResizerNext:hover {
--columnResizer-color: var(--salt-color-blue-500);
--columnResizer-color: var(--vuu-color-purple-10);
}

.vuuColumnResizerNext:after {
Expand All @@ -17,7 +19,7 @@
content: '';
position: absolute;
top: 0;
right: 0px;
right: 3px;
height: var(--columnResizer-height, 0);
width: 2px;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.vuuTableNextHeaderCell {
--cell-align: 'flex-start';
--vuuColumnHeaderPill-margin: 0 0 0 3px;
--vuuColumnHeaderPill-margin: 0;
--vuuColumnHeaderPill-flex: 0 0 24px;

align-items: center;
background-color: var(--vuuTableNextHeaderCell-background, inherit);
Expand All @@ -11,7 +12,10 @@
box-sizing: border-box;
cursor: default;
display: inline-flex;
gap: 4px;
height: var(--header-height);
padding: 0 12px 0 4px;
position: relative;
vertical-align: top;
}

Expand All @@ -20,16 +24,20 @@
--vuuTable-columnMenu-margin: 0;
--vuuColumnHeaderPill-margin: 0 3px 0 0;
--column-menu-left: 2px;

justify-content: flex-end;
padding: 0 3px 0 12px;
}

.vuuTableNextHeaderCell .vuuColumnResizerNext:hover {
--columnResizer-color: var(--vuu-color-purple-10);
}

.vuuTableNextHeaderCell-label {
flex: 0 1 auto;
line-height: calc(var(--header-height) - 1px);
overflow: hidden;
text-overflow: ellipsis;
}

.vuuTableNextHeaderCell-right .vuuTableNextHeaderCell-label {
text-align: right;
}

.vuuTableNextHeaderCell-resizing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
display: inline-block;
height: 100%;
overflow:hidden;
padding: 0 8px;
padding: 0 11px 0 12px;
text-overflow: ellipsis;
vertical-align: top;
}
Expand Down

0 comments on commit 3cd0826

Please sign in to comment.