Skip to content

Commit

Permalink
feat(angular-material): review kd-theme
Browse files Browse the repository at this point in the history
upgrade angular-material to 16

BREAKING CHANGE: ⛵upgrade angular-material to 16
  • Loading branch information
romdhanisam committed Oct 18, 2023
1 parent 29bd6a7 commit 36994ea
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 35 deletions.
60 changes: 29 additions & 31 deletions modules/web/src/_theming.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,10 @@

// Global style overrides.

// Angular Material 15/16 Density
@include mat.form-field-density(-4);
@include mat.icon-button-density(-3);

.kd-namespace-select-form-field {
mat-form-field {
width: 100%;
}

.mdc-notched-outline {
.mdc-notched-outline__leading {
display: none !important;
}

.mdc-notched-outline__trailing {
border: 1px solid $border !important;
border-radius: 2px !important;
}
}
}

mat-card-title,
mat-card-footer {
color: map.get($foreground-palette, text);
}

.kd-card-content {
color: map.get($foreground-palette, text);
}

.kd-create-from-file-info,
.kd-create-from-input-info {
color: map.get($foreground-palette, text);
}

a {
color: map.get($colors, primary);

Expand Down Expand Up @@ -363,4 +333,32 @@
}
}
}

.kd-namespace-select-form-field {
mat-form-field {
width: 100%;
}

.mdc-notched-outline {
.mdc-notched-outline__leading {
display: none;
}

.mdc-notched-outline__trailing {
border: 1px solid $border !important;
border-radius: 2px;
}
}
}

.mat-mdc-card-title,
.mat-mdc-card-content,
.mat-mdc-card-footer {
color: map.get($foreground-palette, text);
}

.kd-create-from-file-info,
.kd-create-from-input-info {
color: map.get($foreground-palette, text);
}
}
6 changes: 3 additions & 3 deletions modules/web/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ router-outlet::after {
z-index: 1;
}

/* MDC MAT chips */
/* Angular Material 15/16 chips */
.mat-mdc-chip.mat-mdc-standard-chip {
box-shadow: none !important;
font-size: $body-font-size-base;
Expand Down Expand Up @@ -312,10 +312,9 @@ router-outlet::after {
}

.mat-mdc-chip-focus-overlay {
background: none !important;
display: none !important;
}

/* MDC MAT chips end */

.kd-chips-show-button {
cursor: pointer;
Expand Down Expand Up @@ -394,6 +393,7 @@ kd-logs {
}
}

// Angular Material 15/16 standard appearance in form field
.kd-standard-form-field {
mat-form-field {
width: 100%;
Expand Down
10 changes: 9 additions & 1 deletion modules/web/src/logs/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ const i18n = {
selector: 'kd-logs',
templateUrl: './template.html',
styleUrls: ['./style.scss'],
providers: [{provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: {appearance: 'fill', subscriptSizing: 'dynamic'}}],
providers: [
{
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
useValue: {
appearance: 'outline',
subscriptSizing: 'dynamic',
},
},
],
})
export class LogsComponent implements OnDestroy {
@ViewChild('logViewContainer', {static: true}) logViewContainer_: ElementRef;
Expand Down

0 comments on commit 36994ea

Please sign in to comment.