-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(badge): implementa definições do AnimaliaDS
definições do AnimaliaDS no componente `po-badge` Fixes DTHFUI-7933
- Loading branch information
Showing
18 changed files
with
590 additions
and
71 deletions.
There are no files selected for viewing
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
18 changes: 18 additions & 0 deletions
18
projects/ui/src/lib/components/po-badge/interfaces/po-badge-literals-default.ts
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export const PoBadgeLiteralsDefault = { | ||
en: { | ||
notification: 'new notification', | ||
notifications: 'new notifications' | ||
}, | ||
es: { | ||
notification: 'nueva notificación', | ||
notifications: 'nuevas notificaciones' | ||
}, | ||
pt: { | ||
notification: 'nova notificação', | ||
notifications: 'nova notificaçoes' | ||
}, | ||
ru: { | ||
notification: 'новое уведомление', | ||
notifications: 'новые уведомления' | ||
} | ||
}; |
14 changes: 14 additions & 0 deletions
14
projects/ui/src/lib/components/po-badge/interfaces/po-badge-literals.interface.ts
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* @usedBy PoBadgeComponent | ||
* | ||
* @description | ||
* | ||
* Interface para definição das literais usadas no `po-badge`. | ||
*/ | ||
export interface PoBadgeLiterals { | ||
/** Texto exibido na propriedade `aria-label` do `po-badge` ao ter somente uma notificação. */ | ||
notification: string; | ||
|
||
/** Texto exibido na propriedade `aria-label` do `po-badge` ao ter mais de uma notificação. */ | ||
notifications: string; | ||
} |
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
16 changes: 14 additions & 2 deletions
16
projects/ui/src/lib/components/po-badge/po-badge.component.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
<div class="po-badge po-{{ color }}"> | ||
<span class="po-badge-value">{{ badgeValue }}</span> | ||
<div | ||
class="po-badge po-badge-{{ size ? size : 'medium' }}" | ||
[class.po-badge-notification]="isNotification && !status" | ||
[class.po-badge-border]="showBorder" | ||
[ngClass]="getBadgeColor" | ||
[ngStyle]="customColor && !status ? { 'background-color': customColor } : {}" | ||
[ariaLabel]="notificationLabel" | ||
[attr.data-status]="status" | ||
> | ||
<po-icon | ||
*ngIf="!isNotification && size !== 'small' && showIcon && status !== 'disabled' && icon" | ||
[p-icon]="icon" | ||
></po-icon> | ||
<span *ngIf="showValue()" class="po-badge-value" aria-hidden="true">{{ badgeValue }}</span> | ||
</div> |
Oops, something went wrong.