-
Notifications
You must be signed in to change notification settings - Fork 3k
NIFI-15951 modularize customized angular material themed components #11262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
scottyaslan
wants to merge
1
commit into
apache:main
Choose a base branch
from
scottyaslan:NIFI-15951
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
568 changes: 10 additions & 558 deletions
568
nifi-frontend/src/main/frontend/libs/shared/src/assets/styles/_app.scss
Large diffs are not rendered by default.
Oops, something went wrong.
92 changes: 92 additions & 0 deletions
92
nifi-frontend/src/main/frontend/libs/shared/src/assets/themes/components/_button.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| /*! | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| @use '@angular/material' as mat; | ||
|
|
||
| @mixin generate-material-theme() { | ||
| :root { | ||
| @include mat.button-overrides( | ||
| ( | ||
| filled-container-shape: 4px, | ||
| filled-label-text-tracking: normal, | ||
| filled-label-text-weight: 400, | ||
| outlined-container-shape: 4px, | ||
| outlined-label-text-tracking: normal, | ||
| outlined-label-text-weight: 400, | ||
| outlined-horizontal-padding: 15px, | ||
| outlined-container-height: 32px, | ||
| text-container-shape: 4px, | ||
| text-label-text-tracking: normal, | ||
| text-label-text-weight: 400 | ||
| ) | ||
| ); | ||
|
|
||
| .mdc-button:disabled { | ||
| pointer-events: auto; | ||
| cursor: not-allowed; | ||
| } | ||
|
|
||
| @include mat.icon-button-overrides( | ||
| ( | ||
| state-layer-size: 36px, | ||
| icon-size: 14px | ||
| ) | ||
| ); | ||
|
|
||
| .mat-mdc-icon-button { | ||
| &.mat-mdc-button-base.mdc-icon-button { | ||
| padding: 0; | ||
| } | ||
| } | ||
|
|
||
| .primary-icon-button { | ||
| @include mat.icon-button-overrides( | ||
| ( | ||
| icon-color: var(--md-ref-palette-primary-40) | ||
| ) | ||
| ); | ||
| } | ||
|
|
||
| .error-button { | ||
| @include mat.button-overrides( | ||
| ( | ||
| filled-container-color: var(--md-ref-palette-error-40), | ||
| filled-label-text-color: var(--md-ref-palette-error-100) | ||
| ) | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| .darkMode { | ||
| .primary-icon-button { | ||
| @include mat.icon-button-overrides( | ||
| ( | ||
| icon-color: var(--md-ref-palette-primary-80) | ||
| ) | ||
| ); | ||
| } | ||
|
|
||
| .error-button { | ||
| @include mat.button-overrides( | ||
| ( | ||
| filled-container-color: var(--md-ref-palette-error-50), | ||
| filled-label-text-color: var(--md-ref-palette-error-100) | ||
| ) | ||
| ); | ||
| } | ||
| } | ||
| } |
38 changes: 38 additions & 0 deletions
38
nifi-frontend/src/main/frontend/libs/shared/src/assets/themes/components/_card.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /*! | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| @use '@angular/material' as mat; | ||
|
|
||
| @mixin generate-material-theme() { | ||
| :root { | ||
| @include mat.card-overrides( | ||
| ( | ||
| title-text-size: 16px, | ||
| title-text-line-height: 20px, | ||
| title-text-weight: 600, | ||
| subtitle-text-size: 14px, | ||
| subtitle-text-line-height: 20px, | ||
| subtitle-text-tracking: normal, | ||
| subtitle-text-weight: 400 | ||
| ) | ||
| ); | ||
|
|
||
| .mat-mdc-card-header-text { | ||
| width: 100%; | ||
| } | ||
| } | ||
| } |
40 changes: 40 additions & 0 deletions
40
nifi-frontend/src/main/frontend/libs/shared/src/assets/themes/components/_checkbox.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /*! | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| @use '@angular/material' as mat; | ||
|
|
||
| @mixin generate-material-theme() { | ||
| :root { | ||
| .tertiary-checkbox { | ||
| @include mat.checkbox-overrides( | ||
| ( | ||
| selected-icon-color: var(--md-ref-palette-tertiary-40) | ||
| ) | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| .darkMode { | ||
| .tertiary-checkbox { | ||
| @include mat.checkbox-overrides( | ||
| ( | ||
| selected-icon-color: var(--md-ref-palette-tertiary-70) | ||
| ) | ||
| ); | ||
| } | ||
| } | ||
| } |
33 changes: 33 additions & 0 deletions
33
nifi-frontend/src/main/frontend/libs/shared/src/assets/themes/components/_date-picker.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /*! | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| @use '@angular/material' as mat; | ||
|
|
||
| @mixin generate-material-theme() { | ||
| :root { | ||
| mat-datepicker-toggle .mat-mdc-icon-button.mat-mdc-button-base.mdc-icon-button { | ||
| padding: 11px; | ||
| } | ||
|
|
||
| .mat-datepicker-content { | ||
| box-shadow: | ||
| 0px 2px 4px -1px rgba(0, 0, 0, 0.2), | ||
| 0px 4px 5px 0px rgba(0, 0, 0, 0.14), | ||
| 0px 1px 10px 0px rgba(0, 0, 0, 0.12); | ||
| } | ||
| } | ||
| } | ||
39 changes: 39 additions & 0 deletions
39
nifi-frontend/src/main/frontend/libs/shared/src/assets/themes/components/_dialog.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /*! | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| @use '@angular/material' as mat; | ||
|
|
||
| @mixin generate-material-theme() { | ||
| :root { | ||
| @include mat.dialog-overrides( | ||
| ( | ||
| content-padding: 20px 24px, | ||
| headline-padding: 0 24px 9px, | ||
| container-shape: 6px | ||
| ) | ||
| ); | ||
|
|
||
| .dialog-tab-content, | ||
| .dialog-content { | ||
| height: 50vh; | ||
| } | ||
|
|
||
| .mat-mdc-dialog-actions { | ||
| border: none !important; | ||
| } | ||
| } | ||
| } |
107 changes: 107 additions & 0 deletions
107
nifi-frontend/src/main/frontend/libs/shared/src/assets/themes/components/_drag-and-drop.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| /*! | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| @use '@angular/material' as mat; | ||
|
|
||
| @mixin generate-material-theme() { | ||
| :root { | ||
| .cdk-drop-list { | ||
| background: var(--mat-sys-surface-container-low); | ||
| } | ||
|
|
||
| .cdk-drag { | ||
| color: var(--mat-sys-on-surface); | ||
| background: var(--mat-sys-surface); | ||
| } | ||
|
|
||
| .cdk-drag-disabled { | ||
| cursor: not-allowed !important; | ||
| color: var(--nf-disabled); | ||
| background: var(--mat-sys-background) !important; | ||
| } | ||
|
|
||
| .cdk-drag-placeholder { | ||
| opacity: 0; | ||
| } | ||
|
|
||
| .cdk-drop-list-dragging { | ||
| cursor: grabbing; | ||
| background-color: var(--mat-sys-secondary) !important; | ||
| } | ||
|
|
||
| .cdk-drag:hover { | ||
| cursor: grab; | ||
| } | ||
|
|
||
| .cdk-list { | ||
| min-height: 34px; | ||
| border-radius: 4px; | ||
| overflow: hidden; | ||
| display: block; | ||
| user-select: none; | ||
| } | ||
|
|
||
| span.grip { | ||
| width: 12px; | ||
| height: 36px; | ||
| display: block; | ||
| line-height: 6px; | ||
| letter-spacing: 1px; | ||
| color: var(--mat-sys-on-surface); | ||
| } | ||
|
|
||
| .cdk-drag:hover { | ||
| span.grip::after { | ||
| content: '.. .. .. .. ..'; | ||
| } | ||
| } | ||
|
|
||
| .cdk-drag-disabled { | ||
| font-style: italic; | ||
| } | ||
|
|
||
| .cdk-drag:hover { | ||
| span.grip::after { | ||
| content: '.. .. .. .. ..'; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .darkMode { | ||
| .cdk-drop-list-dragging { | ||
| background-color: var(--mat-sys-secondary) !important; | ||
| } | ||
|
|
||
| .cdk-drop-list { | ||
| background: var(--mat-sys-surface-container-low); | ||
| } | ||
|
|
||
| .cdk-drag { | ||
| color: var(--mat-sys-on-surface); | ||
| background: var(--mat-sys-surface); | ||
| } | ||
|
|
||
| .cdk-drag-disabled { | ||
| color: var(--nf-disabled); | ||
| background: var(--mat-sys-background) !important; | ||
| } | ||
|
|
||
| span.grip { | ||
| color: var(--mat-sys-on-surface); | ||
| } | ||
| } | ||
| } |
43 changes: 43 additions & 0 deletions
43
...frontend/src/main/frontend/libs/shared/src/assets/themes/components/_expansion-panel.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /*! | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| @use '@angular/material' as mat; | ||
|
|
||
| @mixin generate-material-theme() { | ||
| :root { | ||
| @include mat.expansion-overrides( | ||
| ( | ||
| container-shape: 6px, | ||
| header-expanded-state-height: 50px | ||
| ) | ||
| ); | ||
|
|
||
| .mat-expansion-panel-body { | ||
| overflow-y: auto; | ||
| } | ||
|
|
||
| .mat-expansion-panel-header.mat-expanded { | ||
| border-bottom-left-radius: 0; | ||
| border-bottom-right-radius: 0; | ||
| } | ||
|
|
||
| .mat-content.mat-content-hide-toggle { | ||
| margin-right: 0 !important; | ||
| height: 48px; | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original
_app.scsshad an inline comment explaining this magic number:padding: 11px; //center the mat-icon-button inside the date picker form field. That comment was dropped during the move — please restore it so11pxdoesn't read as an unexplained magic number.