Skip to content

Commit

Permalink
Merge pull request #131 from primefaces/issue-130
Browse files Browse the repository at this point in the history
Fixed #130 - Add severity options
  • Loading branch information
cetincakiroglu authored May 7, 2024
2 parents 18c6bf2 + 7266936 commit 91eb4a1
Show file tree
Hide file tree
Showing 9 changed files with 139 additions and 0 deletions.
34 changes: 34 additions & 0 deletions theme-base/components/messages/_message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,38 @@
.p-message-detail {
margin-left: $inlineSpacing;
}

@if variable-exists(secondaryMessageBg) {
&.p-message-secondary {
background: $secondaryMessageBg;
border: $secondaryMessageBorder;
border-width: $messageBorderWidth;
color: $secondaryMessageTextColor;

.p-message-icon {
color: $secondaryMessageIconColor;
}

.p-message-close {
color: $secondaryMessageIconColor;
}
}
}

@if variable-exists(contrastMessageBg) {
&.p-message-contrast {
background: $contrastMessageBg;
border: $contrastMessageBorder;
border-width: $messageBorderWidth;
color: $contrastMessageTextColor;

.p-message-icon {
color: $contrastMessageIconColor;
}

.p-message-close {
color: $contrastMessageIconColor;
}
}
}
}
27 changes: 27 additions & 0 deletions theme-base/components/messages/_toast.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,32 @@
}
}

@if variable-exists(secondaryMessageBg) {
&.p-toast-message-secondary {
background: $secondaryMessageBg;
border: $secondaryMessageBorder;
border-width: $messageBorderWidth;
color: $secondaryMessageTextColor;

.p-toast-message-icon,
.p-toast-icon-close {
color: $secondaryMessageIconColor;
}
}
}

@if variable-exists(contrastMessageBg) {
&.p-toast-message-contrast {
background: $contrastMessageBg;
border: $contrastMessageBorder;
border-width: $messageBorderWidth;
color: $contrastMessageTextColor;

.p-toast-message-icon,
.p-toast-icon-close {
color: $contrastMessageIconColor;
}
}
}
}
}
12 changes: 12 additions & 0 deletions theme-base/components/misc/_tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,16 @@
width: $badgeFontSize;
height: $badgeFontSize;
}

@if variable-exists(secondaryMessageBg) {
&.p-tag-secondary {
background-color: $secondaryButtonBg;
color: $secondaryButtonTextColor;
}

&.p-tag-contrast {
background-color: $contrastButtonBg;
color: $contrastButtonTextColor;
}
}
}
11 changes: 11 additions & 0 deletions themes/bootstrap4/bootstrap4-dark/_variables_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,17 @@ $dangerButtonTextActiveColor: #151515 !default;
$dangerButtonActiveBorderColor: #fd464e !default;
$dangerButtonFocusShadow: 0 0 0 1px #ffd0d9 !default;

$contrastButtonBg:#ffffff !default;
$contrastButtonTextColor:$shade900 !default;
$contrastButtonBorder:1px solid $contrastButtonBg !default;
$contrastButtonHoverBg:#d2d4d5 !default;
$contrastButtonTextHoverColor:$contrastButtonTextColor !default;
$contrastButtonHoverBorderColor:#d2d4d5 !default;
$contrastButtonActiveBg:#bcbec0 !default;
$contrastButtonTextActiveColor:$contrastButtonTextColor !default;
$contrastButtonActiveBorderColor:#bcbec0 !default;
$contrastButtonFocusShadow:none !default;

$linkButtonColor: $primaryColor !default;
$linkButtonHoverColor: $primaryDarkColor !default;
$linkButtonTextHoverDecoration: underline !default;
Expand Down
11 changes: 11 additions & 0 deletions themes/bootstrap4/bootstrap4-light/_variables_light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,17 @@ $dangerButtonTextActiveColor: #ffffff !default;
$dangerButtonActiveBorderColor: #b21f2d !default;
$dangerButtonFocusShadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5) !default;

$contrastButtonBg:$shade900 !default;
$contrastButtonTextColor:#ffffff !default;
$contrastButtonBorder:1px solid $contrastButtonBg !default;
$contrastButtonHoverBg:$shade800 !default;
$contrastButtonTextHoverColor:$contrastButtonTextColor !default;
$contrastButtonHoverBorderColor:$shade800 !default;
$contrastButtonActiveBg:$shade700 !default;
$contrastButtonTextActiveColor:$contrastButtonTextColor !default;
$contrastButtonActiveBorderColor:$shade700 !default;
$contrastButtonFocusShadow:none !default;

$linkButtonColor: $primaryColor !default;
$linkButtonHoverColor: $primaryDarkColor !default;
$linkButtonTextHoverDecoration: underline !default;
Expand Down
9 changes: 9 additions & 0 deletions themes/lara/lara-dark/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,15 @@ $errorMessageBorder: solid #ef4444 !default;
$errorMessageTextColor: #fca5a5 !default;
$errorMessageIconColor: #fca5a5 !default;

$secondaryMessageBg: $secondaryButtonBg !default;
$secondaryMessageBorder: solid $secondaryButtonBg !default;
$secondaryMessageTextColor: $secondaryButtonTextColor !default;
$secondaryMessageIconColor: $secondaryButtonTextColor !default;
$contrastMessageBg: $contrastButtonBg !default;
$contrastMessageBorder: solid $contrastButtonBg !default;
$contrastMessageTextColor: $contrastButtonTextColor !default;
$contrastMessageIconColor: $contrastButtonTextColor !default;

//overlays
$overlayContentBorder: 1px solid $shade600 !default;
$overlayContentBg: $panelContentBg !default;
Expand Down
19 changes: 19 additions & 0 deletions themes/lara/lara-light/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,17 @@ $dangerButtonTextActiveColor: $dangerButtonTextColor !default;
$dangerButtonActiveBorderColor: #b91c1c !default;
$dangerButtonFocusShadow: 0 0 0 0.2rem #fecaca !default;

$contrastButtonBg:$shade900 !default;
$contrastButtonTextColor:#ffffff !default;
$contrastButtonBorder:1px solid $contrastButtonBg !default;
$contrastButtonHoverBg:$shade800 !default;
$contrastButtonTextHoverColor:$contrastButtonTextColor !default;
$contrastButtonHoverBorderColor:$shade800 !default;
$contrastButtonActiveBg:$shade700 !default;
$contrastButtonTextActiveColor:$contrastButtonTextColor !default;
$contrastButtonActiveBorderColor:$shade700 !default;
$contrastButtonFocusShadow:none !default;

$linkButtonColor: $primaryDarkerColor !default;
$linkButtonHoverColor: $primaryDarkerColor !default;
$linkButtonTextHoverDecoration: underline !default;
Expand Down Expand Up @@ -595,6 +606,14 @@ $errorMessageBg: rgba(255, 231, 230, 0.7) !default;
$errorMessageBorder: solid #ff5757 !default;
$errorMessageTextColor: #ff5757 !default;
$errorMessageIconColor: #ff5757 !default;
$secondaryMessageBg:$secondaryButtonBg !default;
$secondaryMessageBorder: solid $secondaryButtonBg !default;
$secondaryMessageTextColor: $secondaryButtonTextColor !default;
$secondaryMessageIconColor: $secondaryButtonTextColor !default;
$contrastMessageBg: $contrastButtonBg !default;
$contrastMessageBorder: solid $contrastButtonBg !default;
$contrastMessageTextColor: $contrastButtonTextColor !default;
$contrastMessageIconColor: $contrastButtonTextColor !default;

//overlays
$overlayContentBorder: 0 none !default;
Expand Down
8 changes: 8 additions & 0 deletions themes/material/material-dark/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,14 @@ $errorMessageBg: #ffcdd2 !default;
$errorMessageBorder: solid transparent !default;
$errorMessageTextColor: #b71c1c !default;
$errorMessageIconColor: #b71c1c !default;
$secondaryMessageBg: $secondaryButtonBg !default;
$secondaryMessageBorder: solid transparent !default;
$secondaryMessageTextColor: $secondaryButtonTextColor !default;
$secondaryMessageIconColor: $secondaryButtonTextColor !default;
$contrastMessageBg: $contrastButtonBg !default;
$contrastMessageBorder: solid transparent !default;
$contrastMessageTextColor: $contrastButtonTextColor !default;
$contrastMessageIconColor: $contrastButtonTextColor !default;

//overlays
$overlayContentBorder: 0 none !default;
Expand Down
8 changes: 8 additions & 0 deletions themes/material/material-light/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,14 @@ $errorMessageBg: #ffcdd2 !default;
$errorMessageBorder: solid transparent !default;
$errorMessageTextColor: #b71c1c !default;
$errorMessageIconColor: #b71c1c !default;
$secondaryMessageBg: $secondaryButtonBg !default;
$secondaryMessageBorder: solid transparent !default;
$secondaryMessageTextColor: $secondaryButtonTextColor !default;
$secondaryMessageIconColor: $secondaryButtonTextColor !default;
$contrastMessageBg: $contrastButtonBg !default;
$contrastMessageBorder: solid transparent !default;
$contrastMessageTextColor: $contrastButtonTextColor !default;
$contrastMessageIconColor: $contrastButtonTextColor !default;

//overlays
$overlayContentBorder: 0 none !default;
Expand Down

0 comments on commit 91eb4a1

Please sign in to comment.