diff --git a/packages/ibm-products-styles/src/components/NotificationsPanel/_notifications-panel.scss b/packages/ibm-products-styles/src/components/NotificationsPanel/_notifications-panel.scss
index dc495495c23..a59afa4411b 100644
--- a/packages/ibm-products-styles/src/components/NotificationsPanel/_notifications-panel.scss
+++ b/packages/ibm-products-styles/src/components/NotificationsPanel/_notifications-panel.scss
@@ -145,14 +145,15 @@ $block-size: 38.5rem;
// stylelint-disable-next-line carbon/layout-use
inset-block-start: 3.0625rem;
}
- .#{$block-class}__notification:hover,
- .#{$block-class}__notification:focus {
+ .#{$block-class}__notification-content--wrapper:hover,
+ .#{$block-class}__notification-content--wrapper:focus {
background-color: $layer-accent-01;
- .#{$block-class}__dismiss-single-button {
+ + .#{c4p-settings.$carbon-prefix}--popover-container
+ .#{$block-class}__dismiss-single-button {
opacity: 1;
}
}
- .#{$block-class}__notification:focus {
+ .#{$block-class}__notification-content--wrapper:focus {
border-color: $focus;
box-shadow:
inset 0 0 0 2px $focus,
@@ -162,14 +163,8 @@ $block-size: 38.5rem;
.#{$block-class}__notification {
position: relative;
display: flex;
- align-items: flex-start;
- padding: $spacing-05;
border: 0;
background-color: $layer-01;
- cursor: pointer;
- inline-size: 100%;
- min-block-size: 6.25rem;
- text-align: start;
transition: background-color $duration-moderate-02 motion(standard);
.#{$block-class}__notification-title {
@include type.type-style('heading-01');
@@ -202,6 +197,19 @@ $block-size: 38.5rem;
fill: $support-info;
}
}
+ .#{$block-class}__notification-content--wrapper {
+ display: flex;
+ align-items: flex-start;
+ padding: $spacing-05;
+ inline-size: 100%;
+ min-block-size: 6.25rem;
+ text-align: start;
+ }
+ .#{$block-class}__notification-content--wrapper--clickable {
+ @extend .#{$block-class}__notification-content--wrapper;
+
+ cursor: pointer;
+ }
.#{$block-class}__notification-content {
.#{$block-class}__notification-time-label {
margin-block-end: $spacing-03;
@@ -282,7 +290,7 @@ $block-size: 38.5rem;
.#{$block-class}__notification-yesterday:not(:first-of-type):before,
.#{$block-class}__notification-previous:not(:first-of-type):before {
position: absolute;
- margin: 0 auto;
+ margin: 0 #{$spacing-05};
background-color: $border-subtle-01;
block-size: 1px;
content: '';
diff --git a/packages/ibm-products-web-components/src/components/notification-panel/notification-footer.ts b/packages/ibm-products-web-components/src/components/notification-panel/notification-footer.ts
index a3f3bc69481..17848e35780 100644
--- a/packages/ibm-products-web-components/src/components/notification-panel/notification-footer.ts
+++ b/packages/ibm-products-web-components/src/components/notification-panel/notification-footer.ts
@@ -50,14 +50,16 @@ class CDSNotificationFooter extends HostListenerMixin(LitElement) {
>
${viewAllLabel}
-
- ${dateTimeFormat.relative.format(timestamp as Date, { - locale: supportedLocale as string, - style: dateTimeStyle, - })} -
-+ ${dateTimeFormat.relative.format(timestamp as Date, { + locale: supportedLocale as string, + style: dateTimeStyle, + })} +
+- {/** - * If the new dateTimeLocale has been passed a value, - * then use the new dateTimeFormat.relative.format(), - * else use the deprecated timeAgo(). - */} - {dateTimeLocale - ? dateTimeFormat.relative.format(notification.timestamp, { - locale: supportedLocale as string, - style: dateTimeStyle, - }) - : timeAgo({ - previousTime: notification.timestamp, - secondsAgoText, - minuteAgoText, - minutesAgoText, - hoursAgoText, - hourAgoText, - daysAgoText, - yesterdayAtText, - monthsAgoText, - monthAgoText, - yearsAgoText, - yearAgoText, - nowText, - })} -
-+ {/** + * If the new dateTimeLocale has been passed a value, + * then use the new dateTimeFormat.relative.format(), + * else use the deprecated timeAgo(). + */} + {dateTimeLocale + ? dateTimeFormat.relative.format(notification.timestamp, { + locale: supportedLocale as string, + style: dateTimeStyle, + }) + : timeAgo({ + previousTime: notification.timestamp, + secondsAgoText, + minuteAgoText, + minutesAgoText, + hoursAgoText, + hourAgoText, + daysAgoText, + yesterdayAtText, + monthsAgoText, + monthAgoText, + yearsAgoText, + yearAgoText, + nowText, + })} +
+