Skip to content

Commit

Permalink
feature(stark-ui): add show/hide functionality to tables
Browse files Browse the repository at this point in the history
  - refactor minimap component

 CLOSES: NationalBankBelgium#522
  • Loading branch information
carlo-nomes committed Feb 19, 2019
1 parent b56c285 commit 67ee1b7
Show file tree
Hide file tree
Showing 15 changed files with 181 additions and 737 deletions.
1 change: 1 addition & 0 deletions packages/stark-ui/assets/stark-ui-bundle.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* Stark styles */
@import "../assets/styles/base";
@import "../assets/styles/material-fixes";
@import "../assets/theming/base-theme";
@import "../assets/styles/components/button";
@import "../assets/styles/components/button-theme";
Expand Down
9 changes: 9 additions & 0 deletions packages/stark-ui/assets/styles/_material-fixes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
line-height: initial;
}

// Causes checkbox trigger to take up entire width/height of menu item
.mat-menu-content div.mat-menu-item {
padding: 0;
& > mat-checkbox label {
padding: 0 16px;
display: block;
}
}

// FIXME: Remove after https://github.com/angular/material2/pull/11801 is merged
// See: https://github.com/angular/material2/issues/11609
/** IE 11 fixes */
Expand Down
127 changes: 4 additions & 123 deletions packages/stark-ui/src/modules/minimap/components/_minimap-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,136 +3,17 @@
/* ============================================================================== */
/* stark-ui: src/modules/minimap/components/minimap-theme.scss */

.compact-minimap {
& .stark-minimap-dots {
& i {
.stark-minimap {
.stark-minimap-dots {
i {
background-color: $secondary-dark-text-color;
opacity: 0.2;
}

& li.selected i {
.selected i {
opacity: 1;
}
}

& .stark-minimap-dropdown-toggle {
& .stark-minimap-dropdown-toggle-menu {
box-shadow: $elevation-4;

& mat-checkbox.mat-checked .mat-icon {
background-color: $md-accent;
}
}

& .mat-button.mat-icon-button {
& svg {
fill: #000;
}

border: 1px solid mat-color($grey-palette, 300);
background-color: $md-primary-alpha-05;
}

& mat-icon {
fill: $md-primary;
}

& .stark-minimap-dropdown-toggle-menu {
border-color: mat-color($grey-palette, 500);
box-shadow: 0 1px 2px mat-color($grey-palette, 300);
background-color: #fff;

& mat-checkbox {
&:hover {
background: $md-primary-alpha-05;
}

& ._mat-icon {
&::after {
border-color: mat-color($grey-palette, 50);
}
}

& .stark-minimap-dropdown {
& mat-checkbox.stark-minimap-column-checkbox {
&.mat-checked ._mat-icon {
background-color: $md-primary-200-alpha-38;
}
}
}
}
}
}
}

.full-minimap {
& .stark-minimap-dots {
& i {
background-color: $secondary-dark-text-color;
opacity: 0.2;
}

& li.selected i {
opacity: 1;
}
}

& .stark-minimap-dropdown-toggle {
& .stark-minimap-dropdown-toggle-menu {
box-shadow: $elevation-4;

& mat-checkbox.mat-checked .mat-icon {
background-color: $md-accent;
}
}

& .mat-button.mat-icon-button {
& svg {
fill: #000;
}

border: 1px solid mat-color($grey-palette, 300);
background-color: $md-primary-alpha-05;
}

& mat-icon {
fill: $md-primary;
}

& .stark-minimap-dropdown-toggle-menu {
border-color: mat-color($grey-palette, 500);
box-shadow: 0 1px 2px mat-color($grey-palette, 300);
background-color: #fff;

& mat-checkbox {
&:hover {
background: $md-primary-alpha-05;
}

& ._mat-icon {
&::after {
border-color: mat-color($grey-palette, 50);
}
}

& .stark-minimap-dropdown {
& mat-checkbox.stark-minimap-column-checkbox {
&.mat-checked ._mat-icon {
background-color: $md-primary-200-alpha-38;
}
}
}
}
}
}
}

.stark-table {
& .stark-minimap {
& .stark-minimap-dropdown-toggle .stark-minimap-dropdown-toggle-menu {
box-shadow: $elevation-2;
}
}
}

/* End stark-ui: src/modules/minimap/components/minimap-theme.scss */
Loading

0 comments on commit 67ee1b7

Please sign in to comment.