-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(various): use CDK FocusMonitor for keyboard focus style (#143)
* feat(notification-panel): use CDK FocusMonitor for keyboard focus style * feat(file-uploader): use CDK FocusMonitor for keyboard focus style * feat(popover): use CDK FocusMonitor for keyboard focus style * docs(popover): use CDK FocusMonitor in examples * refactor(progress-indicator): add todo comment about navigation + focus
- Loading branch information
1 parent
f068094
commit 587d86d
Showing
14 changed files
with
175 additions
and
78 deletions.
There are no files selected for viewing
7 changes: 1 addition & 6 deletions
7
projects/ng-aquila/documentation/examples/popover/popover-hover/popover-hover-example.css
This file contains 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 |
---|---|---|
@@ -1,8 +1,3 @@ | ||
.btn-spacing{ | ||
margin-right: 10px; | ||
} | ||
|
||
:host-context([data-whatinput="mouse"]) nx-icon:focus { | ||
nx-icon.cdk-mouse-focused { | ||
outline: none; | ||
} | ||
|
12 changes: 10 additions & 2 deletions
12
projects/ng-aquila/documentation/examples/popover/popover-hover/popover-hover-example.html
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
100 changes: 54 additions & 46 deletions
100
projects/ng-aquila/src/notification-panel/notification-item/notification-item.component.scss
This file contains 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 |
---|---|---|
@@ -1,62 +1,70 @@ | ||
@import "../../shared-styles/index"; | ||
|
||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
background-color: var(--notification-panel-item-unread-background-color); | ||
padding: 16px 24px; | ||
margin: 0 -24px; | ||
&.nx-notification-item--read { | ||
background-color: var(--notification-panel-item-read-background-color); | ||
} | ||
&:focus { | ||
outline: none; | ||
} | ||
} | ||
display: flex; | ||
flex-direction: column; | ||
background-color: var(--notification-panel-item-unread-background-color); | ||
padding: 16px 24px; | ||
margin: 0 -24px; | ||
|
||
:host-context([data-whatinput="keyboard"]):focus { | ||
&.nx-notification-item--read { | ||
background-color: var(--notification-panel-item-read-background-color); | ||
} | ||
|
||
&:focus { | ||
outline: none; | ||
} | ||
|
||
&.cdk-keyboard-focused { | ||
@include focus-style-inset; | ||
} | ||
} | ||
|
||
::ng-deep { | ||
nx-notification-item-metadata { | ||
font-size: 14px; | ||
font-weight: 400; | ||
line-height: 20px; | ||
letter-spacing: 0.2px; | ||
margin-bottom: 4px; | ||
display: flex; | ||
align-items: center; | ||
} | ||
nx-notification-item-content { | ||
font-size: 16px; | ||
font-weight: 400; | ||
line-height: 24px; | ||
} | ||
nx-notification-item-actions { | ||
font-size: 16px; | ||
font-weight: 400; | ||
line-height: 24px; | ||
display: flex; | ||
justify-content: space-between; | ||
padding-top: 8px; | ||
} | ||
nx-notification-item-metadata { | ||
font-size: 14px; | ||
font-weight: 400; | ||
line-height: 20px; | ||
letter-spacing: 0.2px; | ||
margin-bottom: 4px; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
nx-notification-item-content { | ||
font-size: 16px; | ||
font-weight: 400; | ||
line-height: 24px; | ||
} | ||
|
||
nx-notification-item-actions { | ||
font-size: 16px; | ||
font-weight: 400; | ||
line-height: 24px; | ||
display: flex; | ||
justify-content: space-between; | ||
padding-top: 8px; | ||
} | ||
} | ||
|
||
// Hover and active styles for clickable item | ||
:host(.nx-notification-item--clickable) { | ||
cursor: pointer; | ||
cursor: pointer; | ||
&:hover { | ||
background-color: var(--notification-panel-item-unread-hover-background-color); | ||
} | ||
|
||
&:active { | ||
background-color: var(--notification-panel-item-unread-active-background-color); | ||
} | ||
|
||
&.nx-notification-item--read { | ||
&:hover { | ||
background-color: var(--notification-panel-item-unread-hover-background-color); | ||
background-color: var(--notification-panel-item-read-hover-background-color); | ||
} | ||
|
||
&:active { | ||
background-color: var(--notification-panel-item-unread-active-background-color); | ||
} | ||
&.nx-notification-item--read { | ||
&:hover { | ||
background-color: var(--notification-panel-item-read-hover-background-color); | ||
} | ||
&:active { | ||
background-color: var(-notification-panel-item-read-active-background-color); | ||
} | ||
background-color: var(-notification-panel-item-read-active-background-color); | ||
} | ||
} | ||
} |
This file contains 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
Oops, something went wrong.