-
Message Content
+
+ Success Message
+ Info Message
+ Warn Message
+ Error Message
+ Secondary Message
+ Contrast Message
diff --git a/apps/showcase/doc/message/PlainDoc.vue b/apps/showcase/doc/message/PlainDoc.vue
new file mode 100644
index 000000000..1bc7852c5
--- /dev/null
+++ b/apps/showcase/doc/message/PlainDoc.vue
@@ -0,0 +1,63 @@
+
+
+ Configure the variant value as plain for messages without borders and backgrounds.
+
+
+ Success Message
+ Info Message
+ Warn Message
+ Error Message
+ Secondary Message
+ Contrast Message
+
+
+
+
+
diff --git a/apps/showcase/doc/message/TextDoc.vue b/apps/showcase/doc/message/TextDoc.vue
deleted file mode 100644
index 21e576d38..000000000
--- a/apps/showcase/doc/message/TextDoc.vue
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
- Message provides small and large sizes as alternatives to the base.
-
-
- Small Message
- Normal Message
- Large Message
-
-
-
-
-
diff --git a/apps/showcase/pages/message/index.vue b/apps/showcase/pages/message/index.vue
index d50ae8cbd..e73abec63 100755
--- a/apps/showcase/pages/message/index.vue
+++ b/apps/showcase/pages/message/index.vue
@@ -12,10 +12,10 @@ import IconDoc from '@/doc/message/IconDoc.vue';
import ImportDoc from '@/doc/message/ImportDoc.vue';
import LifeDoc from '@/doc/message/LifeDoc.vue';
import OutlinedDoc from '@/doc/message/OutlinedDoc.vue';
+import PlainDoc from '@/doc/message/PlainDoc.vue';
+import PTComponent from '@/doc/message/pt/index.vue';
import SeverityDoc from '@/doc/message/SeverityDoc.vue';
import SizesDoc from '@/doc/message/SizesDoc.vue';
-import TextDoc from '@/doc/message/TextDoc.vue';
-import PTComponent from '@/doc/message/pt/index.vue';
import ThemingDoc from '@/doc/message/theming/index.vue';
export default {
@@ -48,9 +48,9 @@ export default {
component: OutlinedDoc
},
{
- id: 'text',
- label: 'Text',
- component: TextDoc
+ id: 'plain',
+ label: 'Plain',
+ component: PlainDoc
},
{
id: 'sizes',
diff --git a/packages/primevue/src/message/style/MessageStyle.js b/packages/primevue/src/message/style/MessageStyle.js
index 1ece597df..0fd52bb55 100644
--- a/packages/primevue/src/message/style/MessageStyle.js
+++ b/packages/primevue/src/message/style/MessageStyle.js
@@ -68,6 +68,15 @@ const theme = ({ dt }) => `
background: ${dt('message.info.close.button.hover.background')};
}
+.p-message-info.p-message-variant-outlined {
+ color: ${dt('message.info.outlined.color')};
+ outline-color: ${dt('message.info.outlined.border.color')};
+}
+
+.p-message-info.p-message-variant-plain {
+ color: ${dt('message.info.plain.color')};
+}
+
.p-message-success {
background: ${dt('message.success.background')};
outline-color: ${dt('message.success.border.color')};
@@ -84,6 +93,15 @@ const theme = ({ dt }) => `
background: ${dt('message.success.close.button.hover.background')};
}
+.p-message-success.p-message-variant-outlined {
+ color: ${dt('message.success.outlined.color')};
+ outline-color: ${dt('message.success.outlined.border.color')};
+}
+
+.p-message-success.p-message-variant-plain {
+ color: ${dt('message.success.plain.color')};
+}
+
.p-message-warn {
background: ${dt('message.warn.background')};
outline-color: ${dt('message.warn.border.color')};
@@ -100,6 +118,15 @@ const theme = ({ dt }) => `
background: ${dt('message.warn.close.button.hover.background')};
}
+.p-message-warn.p-message-variant-outlined {
+ color: ${dt('message.warn.outlined.color')};
+ outline-color: ${dt('message.warn.outlined.border.color')};
+}
+
+.p-message-warn.p-message-variant-plain {
+ color: ${dt('message.warn.plain.color')};
+}
+
.p-message-error {
background: ${dt('message.error.background')};
outline-color: ${dt('message.error.border.color')};
@@ -116,6 +143,15 @@ const theme = ({ dt }) => `
background: ${dt('message.error.close.button.hover.background')};
}
+.p-message-error.p-message-variant-outlined {
+ color: ${dt('message.error.outlined.color')};
+ outline-color: ${dt('message.error.outlined.border.color')};
+}
+
+.p-message-error.p-message-variant-plain {
+ color: ${dt('message.error.plain.color')};
+}
+
.p-message-secondary {
background: ${dt('message.secondary.background')};
outline-color: ${dt('message.secondary.border.color')};
@@ -132,6 +168,15 @@ const theme = ({ dt }) => `
background: ${dt('message.secondary.close.button.hover.background')};
}
+.p-message-secondary.p-message-variant-outlined {
+ color: ${dt('message.secondary.outlined.color')};
+ outline-color: ${dt('message.secondary.outlined.border.color')};
+}
+
+.p-message-secondary.p-message-variant-plain {
+ color: ${dt('message.secondary.plain.color')};
+}
+
.p-message-contrast {
background: ${dt('message.contrast.background')};
outline-color: ${dt('message.contrast.border.color')};
@@ -148,6 +193,15 @@ const theme = ({ dt }) => `
background: ${dt('message.contrast.close.button.hover.background')};
}
+.p-message-contrast.p-message-variant-outlined {
+ color: ${dt('message.contrast.outlined.color')};
+ outline-color: ${dt('message.contrast.outlined.border.color')};
+}
+
+.p-message-contrast.p-message-variant-plain {
+ color: ${dt('message.contrast.plain.color')};
+}
+
.p-message-text {
font-size: ${dt('message.text.font.size')};
font-weight: ${dt('message.text.font.weight')};
@@ -225,6 +279,22 @@ const theme = ({ dt }) => `
width: ${dt('message.close.icon.lg.size')};
height: ${dt('message.close.icon.lg.size')};
}
+
+.p-message-variant-outlined {
+ background: transparent;
+ outline-width: ${dt('message.outlined.border.width')};
+}
+
+.p-message-variant-plain {
+ background: transparent;
+ outline-color: transparent;
+ box-shadow: none;
+}
+
+.p-message-variant-outlined .p-message-close-button:hover,
+.p-message-variant-plain .p-message-close-button:hover {
+ background: transparent;
+}
`;
const classes = {
@@ -232,7 +302,7 @@ const classes = {
'p-message p-component p-message-' + props.severity,
{
'p-message-variant-outlined': props.variant === 'outlined',
- 'p-message-variant-text': props.variant === 'text',
+ 'p-message-variant-plain': props.variant === 'plain',
'p-message-sm': props.size === 'small',
'p-message-lg': props.size === 'large'
}
diff --git a/packages/themes/src/presets/aura/message/index.js b/packages/themes/src/presets/aura/message/index.js
index 75ca6a68f..0426e4c6a 100644
--- a/packages/themes/src/presets/aura/message/index.js
+++ b/packages/themes/src/presets/aura/message/index.js
@@ -52,6 +52,11 @@ export default {
size: '1.125rem'
}
},
+ outlined: {
+ root: {
+ borderWidth: '1px'
+ }
+ },
colorScheme: {
light: {
info: {
@@ -65,6 +70,13 @@ export default {
color: '{blue.600}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{blue.600}',
+ borderColor: '{blue.600}'
+ },
+ plain: {
+ color: '{blue.600}'
}
},
success: {
@@ -78,6 +90,13 @@ export default {
color: '{green.600}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{green.600}',
+ borderColor: '{green.600}'
+ },
+ plain: {
+ color: '{green.600}'
}
},
warn: {
@@ -91,6 +110,13 @@ export default {
color: '{yellow.600}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{yellow.600}',
+ borderColor: '{yellow.600}'
+ },
+ plain: {
+ color: '{yellow.600}'
}
},
error: {
@@ -104,6 +130,13 @@ export default {
color: '{red.600}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{red.600}',
+ borderColor: '{red.600}'
+ },
+ plain: {
+ color: '{red.600}'
}
},
secondary: {
@@ -117,6 +150,13 @@ export default {
color: '{surface.600}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.500}',
+ borderColor: '{surface.500}'
+ },
+ plain: {
+ color: '{surface.500}'
}
},
contrast: {
@@ -130,6 +170,13 @@ export default {
color: '{surface.50}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.950}',
+ borderColor: '{surface.950}'
+ },
+ plain: {
+ color: '{surface.950}'
}
}
},
@@ -145,6 +192,13 @@ export default {
color: '{blue.500}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{blue.500}',
+ borderColor: '{blue.500}'
+ },
+ plain: {
+ color: '{blue.500}'
}
},
success: {
@@ -158,6 +212,13 @@ export default {
color: '{green.500}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{green.500}',
+ borderColor: '{green.500}'
+ },
+ plain: {
+ color: '{green.500}'
}
},
warn: {
@@ -171,6 +232,13 @@ export default {
color: '{yellow.500}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{yellow.500}',
+ borderColor: '{yellow.500}'
+ },
+ plain: {
+ color: '{yellow.500}'
}
},
error: {
@@ -184,6 +252,13 @@ export default {
color: '{red.500}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{red.500}',
+ borderColor: '{red.500}'
+ },
+ plain: {
+ color: '{red.500}'
}
},
secondary: {
@@ -197,6 +272,13 @@ export default {
color: '{surface.300}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.400}',
+ borderColor: '{surface.400}'
+ },
+ plain: {
+ color: '{surface.400}'
}
},
contrast: {
@@ -210,6 +292,13 @@ export default {
color: '{surface.950}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.0}',
+ borderColor: '{surface.0}'
+ },
+ plain: {
+ color: '{surface.0}'
}
}
}
diff --git a/packages/themes/src/presets/lara/message/index.js b/packages/themes/src/presets/lara/message/index.js
index dbc49d4b0..991f5c768 100644
--- a/packages/themes/src/presets/lara/message/index.js
+++ b/packages/themes/src/presets/lara/message/index.js
@@ -52,6 +52,11 @@ export default {
fontSize: '1.125rem'
}
},
+ outlined: {
+ root: {
+ borderWidth: '1px'
+ }
+ },
colorScheme: {
light: {
info: {
@@ -65,6 +70,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem {blue.200}'
}
+ },
+ outlined: {
+ color: '{blue.600}',
+ borderColor: '{blue.600}'
+ },
+ plain: {
+ color: '{blue.600}'
}
},
success: {
@@ -78,6 +90,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem {green.200}'
}
+ },
+ outlined: {
+ color: '{green.600}',
+ borderColor: '{green.600}'
+ },
+ plain: {
+ color: '{green.600}'
}
},
warn: {
@@ -91,6 +110,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem {yellow.200}'
}
+ },
+ outlined: {
+ color: '{yellow.600}',
+ borderColor: '{yellow.600}'
+ },
+ plain: {
+ color: '{yellow.600}'
}
},
error: {
@@ -104,6 +130,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem {red.200}'
}
+ },
+ outlined: {
+ color: '{red.600}',
+ borderColor: '{red.600}'
+ },
+ plain: {
+ color: '{red.600}'
}
},
secondary: {
@@ -117,6 +150,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem {surface.200}'
}
+ },
+ outlined: {
+ color: '{surface.500}',
+ borderColor: '{surface.500}'
+ },
+ plain: {
+ color: '{surface.500}'
}
},
contrast: {
@@ -130,6 +170,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem {surface.400}'
}
+ },
+ outlined: {
+ color: '{surface.900}',
+ borderColor: '{surface.900}'
+ },
+ plain: {
+ color: '{surface.900}'
}
}
},
@@ -145,6 +192,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem color-mix(in srgb, {blue.500}, transparent 80%)'
}
+ },
+ outlined: {
+ color: '{blue.500}',
+ borderColor: '{blue.500}'
+ },
+ plain: {
+ color: '{blue.500}'
}
},
success: {
@@ -158,6 +212,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem color-mix(in srgb, {green.500}, transparent 80%)'
}
+ },
+ outlined: {
+ color: '{green.500}',
+ borderColor: '{green.500}'
+ },
+ plain: {
+ color: '{green.500}'
}
},
warn: {
@@ -171,6 +232,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem color-mix(in srgb, {yellow.500}, transparent 80%)'
}
+ },
+ outlined: {
+ color: '{yellow.500}',
+ borderColor: '{yellow.500}'
+ },
+ plain: {
+ color: '{yellow.500}'
}
},
error: {
@@ -184,6 +252,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem color-mix(in srgb, {red.500}, transparent 80%)'
}
+ },
+ outlined: {
+ color: '{red.500}',
+ borderColor: '{red.500}'
+ },
+ plain: {
+ color: '{red.500}'
}
},
secondary: {
@@ -197,6 +272,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem color-mix(in srgb, {surface.300}, transparent 80%)'
}
+ },
+ outlined: {
+ color: '{surface.400}',
+ borderColor: '{surface.400}'
+ },
+ plain: {
+ color: '{surface.400}'
}
},
contrast: {
@@ -210,6 +292,13 @@ export default {
color: '{focus.ring.color}',
shadow: '0 0 0 0.2rem color-mix(in srgb, {surface.950}, transparent 80%)'
}
+ },
+ outlined: {
+ color: '{surface.0}',
+ borderColor: '{surface.0}'
+ },
+ plain: {
+ color: '{surface.0}'
}
}
}
diff --git a/packages/themes/src/presets/material/message/index.js b/packages/themes/src/presets/material/message/index.js
index d88a48db9..d474e982b 100644
--- a/packages/themes/src/presets/material/message/index.js
+++ b/packages/themes/src/presets/material/message/index.js
@@ -52,6 +52,11 @@ export default {
fontSize: '1.125rem'
}
},
+ outlined: {
+ root: {
+ borderWidth: '1px'
+ }
+ },
colorScheme: {
light: {
info: {
@@ -65,6 +70,13 @@ export default {
color: '{blue.600}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{blue.600}',
+ borderColor: '{blue.600}'
+ },
+ plain: {
+ color: '{blue.600}'
}
},
success: {
@@ -78,6 +90,13 @@ export default {
color: '{green.600}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{green.600}',
+ borderColor: '{green.600}'
+ },
+ plain: {
+ color: '{green.600}'
}
},
warn: {
@@ -91,6 +110,13 @@ export default {
color: '{yellow.600}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{yellow.900}',
+ borderColor: '{yellow.900}'
+ },
+ plain: {
+ color: '{yellow.900}'
}
},
error: {
@@ -104,6 +130,13 @@ export default {
color: '{red.600}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{red.600}',
+ borderColor: '{red.600}'
+ },
+ plain: {
+ color: '{red.600}'
}
},
secondary: {
@@ -117,6 +150,13 @@ export default {
color: '{surface.600}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.600}',
+ borderColor: '{surface.600}'
+ },
+ plain: {
+ color: '{surface.600}'
}
},
contrast: {
@@ -130,6 +170,13 @@ export default {
color: '{surface.50}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.950}',
+ borderColor: '{surface.950}'
+ },
+ plain: {
+ color: '{surface.950}'
}
}
},
@@ -145,6 +192,13 @@ export default {
color: '{blue.500}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{blue.500}',
+ borderColor: '{blue.500}'
+ },
+ plain: {
+ color: '{blue.500}'
}
},
success: {
@@ -158,6 +212,13 @@ export default {
color: '{green.500}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{green.500}',
+ borderColor: '{green.500}'
+ },
+ plain: {
+ color: '{green.500}'
}
},
warn: {
@@ -171,6 +232,13 @@ export default {
color: '{yellow.500}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{yellow.500}',
+ borderColor: '{yellow.500}'
+ },
+ plain: {
+ color: '{yellow.500}'
}
},
error: {
@@ -184,6 +252,13 @@ export default {
color: '{red.500}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{red.500}',
+ borderColor: '{red.500}'
+ },
+ plain: {
+ color: '{red.500}'
}
},
secondary: {
@@ -197,6 +272,13 @@ export default {
color: '{surface.300}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.400}',
+ borderColor: '{surface.400}'
+ },
+ plain: {
+ color: '{surface.400}'
}
},
contrast: {
@@ -210,6 +292,13 @@ export default {
color: '{surface.950}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.0}',
+ borderColor: '{surface.0}'
+ },
+ plain: {
+ color: '{surface.0}'
}
}
}
diff --git a/packages/themes/src/presets/nora/message/index.js b/packages/themes/src/presets/nora/message/index.js
index 52a55ec1e..a1d4acc5a 100644
--- a/packages/themes/src/presets/nora/message/index.js
+++ b/packages/themes/src/presets/nora/message/index.js
@@ -52,6 +52,11 @@ export default {
size: '1.125rem'
}
},
+ outlined: {
+ root: {
+ borderWidth: '1px'
+ }
+ },
colorScheme: {
light: {
info: {
@@ -65,6 +70,13 @@ export default {
color: '{blue.50}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{blue.800}',
+ borderColor: '{blue.800}'
+ },
+ plain: {
+ color: '{blue.800}'
}
},
success: {
@@ -78,6 +90,13 @@ export default {
color: '{green.50}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{green.800}',
+ borderColor: '{green.800}'
+ },
+ plain: {
+ color: '{green.800}'
}
},
warn: {
@@ -91,6 +110,13 @@ export default {
color: '{yellow.50}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{yellow.600}',
+ borderColor: '{yellow.600}'
+ },
+ plain: {
+ color: '{yellow.600}'
}
},
error: {
@@ -104,6 +130,13 @@ export default {
color: '{red.50}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{red.800}',
+ borderColor: '{red.800}'
+ },
+ plain: {
+ color: '{red.800}'
}
},
secondary: {
@@ -117,6 +150,13 @@ export default {
color: '{surface.700}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.600}',
+ borderColor: '{surface.600}'
+ },
+ plain: {
+ color: '{surface.600}'
}
},
contrast: {
@@ -130,6 +170,13 @@ export default {
color: '{surface.50}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.900}',
+ borderColor: '{surface.900}'
+ },
+ plain: {
+ color: '{surface.900}'
}
}
},
@@ -145,6 +192,13 @@ export default {
color: '{blue.950}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{blue.200}',
+ borderColor: '{blue.200}'
+ },
+ plain: {
+ color: '{blue.200}'
}
},
success: {
@@ -158,6 +212,13 @@ export default {
color: '{green.950}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{green.200}',
+ borderColor: '{green.200}'
+ },
+ plain: {
+ color: '{green.200}'
}
},
warn: {
@@ -171,6 +232,13 @@ export default {
color: '{yellow.950}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{yellow.200}',
+ borderColor: '{yellow.200}'
+ },
+ plain: {
+ color: '{yellow.200}'
}
},
error: {
@@ -184,6 +252,13 @@ export default {
color: '{red.950}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{red.200}',
+ borderColor: '{red.200}'
+ },
+ plain: {
+ color: '{red.200}'
}
},
secondary: {
@@ -197,6 +272,13 @@ export default {
color: '{surface.200}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.400}',
+ borderColor: '{surface.400}'
+ },
+ plain: {
+ color: '{surface.400}'
}
},
contrast: {
@@ -210,6 +292,13 @@ export default {
color: '{surface.950}',
shadow: 'none'
}
+ },
+ outlined: {
+ color: '{surface.0}',
+ borderColor: '{surface.0}'
+ },
+ plain: {
+ color: '{surface.0}'
}
}
}