Fixed #5591 - warning property name changed as warn
parent
9bdabd8530
commit
f98feec612
|
@ -9,7 +9,7 @@ const BadgeProps = [
|
||||||
name: 'severity',
|
name: 'severity',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 'null',
|
default: 'null',
|
||||||
description: 'Severity type of the badge. Valid severities are "secondary", "success", "info", "warning", "danger" and "contrast".'
|
description: 'Severity type of the badge. Valid severities are "secondary", "success", "info", "warn", "danger" and "contrast".'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'size',
|
name: 'size',
|
||||||
|
|
|
@ -8,7 +8,7 @@ const BadgeDirectiveModifiers = [
|
||||||
description: 'Default color for severity levels'
|
description: 'Default color for severity levels'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'warning',
|
name: 'warn',
|
||||||
description: 'Overrides default severity color'
|
description: 'Overrides default severity color'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,7 +57,7 @@ const ButtonProps = [
|
||||||
name: 'severity',
|
name: 'severity',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 'null',
|
default: 'null',
|
||||||
description: 'Defines the style of the button, valid values are "secondary", "success", "info", "warning", "help", "danger", "contrast".'
|
description: 'Defines the style of the button, valid values are "secondary", "success", "info", "warn", "help", "danger", "contrast".'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'raised',
|
name: 'raised',
|
||||||
|
|
|
@ -63,7 +63,7 @@ const SplitButtonProps = [
|
||||||
name: 'severity',
|
name: 'severity',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 'null',
|
default: 'null',
|
||||||
description: 'Defines the style of the button, valid values are "secondary", "success", "info", "warning", "help", "danger", "contrast".'
|
description: 'Defines the style of the button, valid values are "secondary", "success", "info", "warn", "help", "danger", "contrast".'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'raised',
|
name: 'raised',
|
||||||
|
|
|
@ -9,7 +9,7 @@ const TagProps = [
|
||||||
name: 'severity',
|
name: 'severity',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 'null',
|
default: 'null',
|
||||||
description: 'Severity type of the tag. Valid severities are "secondary", "success", "info", "warning", "danger" and "contrast".'
|
description: 'Severity type of the tag. Valid severities are "secondary", "success", "info", "warn", "danger" and "contrast".'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'rounded',
|
name: 'rounded',
|
||||||
|
|
|
@ -70,7 +70,7 @@ export interface BadgeProps {
|
||||||
/**
|
/**
|
||||||
* Severity type of the badge.
|
* Severity type of the badge.
|
||||||
*/
|
*/
|
||||||
severity?: HintedString<'secondary' | 'info' | 'success' | 'warning' | 'danger' | 'contrast'> | null | undefined;
|
severity?: HintedString<'secondary' | 'info' | 'success' | 'warn' | 'danger' | 'contrast'> | null | undefined;
|
||||||
/**
|
/**
|
||||||
* Size of the badge, valid options are 'large' and 'xlarge'.
|
* Size of the badge, valid options are 'large' and 'xlarge'.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,14 +9,14 @@ describe('Badge.vue', () => {
|
||||||
wrapper = mount(Badge, {
|
wrapper = mount(Badge, {
|
||||||
props: {
|
props: {
|
||||||
value: '29',
|
value: '29',
|
||||||
severity: 'warning',
|
severity: 'warn',
|
||||||
size: 'large'
|
size: 'large'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('should exist', () => {
|
it('should exist', () => {
|
||||||
expect(wrapper.find('.p-badge.p-component').exists()).toBe(true);
|
expect(wrapper.find('.p-badge.p-component').exists()).toBe(true);
|
||||||
expect(wrapper.find('.p-badge-warning').exists()).toBe(true);
|
expect(wrapper.find('.p-badge-warn').exists()).toBe(true);
|
||||||
expect(wrapper.find('.p-badge-lg').exists()).toBe(true);
|
expect(wrapper.find('.p-badge-lg').exists()).toBe(true);
|
||||||
expect(wrapper.find('.p-badge-no-gutter').exists()).toBe(false);
|
expect(wrapper.find('.p-badge-no-gutter').exists()).toBe(false);
|
||||||
|
|
||||||
|
|
|
@ -95,10 +95,10 @@ export interface BadgeContext {
|
||||||
*/
|
*/
|
||||||
success: boolean;
|
success: boolean;
|
||||||
/**
|
/**
|
||||||
* Current warning state as a boolean.
|
* Current warn state as a boolean.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
warning: boolean;
|
warn: boolean;
|
||||||
/**
|
/**
|
||||||
* Current danger state as a boolean.
|
* Current danger state as a boolean.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
@ -129,10 +129,10 @@ export interface BadgeDirectiveModifiers {
|
||||||
*/
|
*/
|
||||||
success?: boolean | undefined;
|
success?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Warning severity for Badge directive.
|
* warn severity for Badge directive.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
warning?: boolean | undefined;
|
warn?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Danger severity for Badge directive.
|
* Danger severity for Badge directive.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -119,7 +119,7 @@ export interface ButtonProps extends ButtonHTMLAttributes {
|
||||||
/**
|
/**
|
||||||
* Severity type of the badge.
|
* Severity type of the badge.
|
||||||
*/
|
*/
|
||||||
badgeSeverity?: HintedString<'secondary' | 'info' | 'success' | 'warning' | 'danger' | 'contrast'> | null | undefined;
|
badgeSeverity?: HintedString<'secondary' | 'info' | 'success' | 'warn' | 'danger' | 'contrast'> | null | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether the button is in loading state.
|
* Whether the button is in loading state.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
@ -137,7 +137,7 @@ export interface ButtonProps extends ButtonHTMLAttributes {
|
||||||
/**
|
/**
|
||||||
* Defines the style of the button.
|
* Defines the style of the button.
|
||||||
*/
|
*/
|
||||||
severity?: HintedString<'secondary' | 'success' | 'info' | 'warning' | 'help' | 'danger' | 'contrast'> | undefined;
|
severity?: HintedString<'secondary' | 'success' | 'info' | 'warn' | 'help' | 'danger' | 'contrast'> | undefined;
|
||||||
/**
|
/**
|
||||||
* Add a shadow to indicate elevation.
|
* Add a shadow to indicate elevation.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -35,7 +35,7 @@ export default {
|
||||||
},
|
},
|
||||||
badgeSeverity: {
|
badgeSeverity: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'warning'
|
default: 'warn'
|
||||||
},
|
},
|
||||||
badgeValue: {
|
badgeValue: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
@ -171,7 +171,7 @@ export interface SplitButtonProps {
|
||||||
/**
|
/**
|
||||||
* Defines the style of the button.
|
* Defines the style of the button.
|
||||||
*/
|
*/
|
||||||
severity?: HintedString<'secondary' | 'success' | 'info' | 'warning' | 'help' | 'danger' | 'contrast'> | undefined;
|
severity?: HintedString<'secondary' | 'success' | 'info' | 'warn' | 'help' | 'danger' | 'contrast'> | undefined;
|
||||||
/**
|
/**
|
||||||
* Add a shadow to indicate elevation.
|
* Add a shadow to indicate elevation.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -82,7 +82,7 @@ export interface TagProps {
|
||||||
/**
|
/**
|
||||||
* Severity type of the tag.
|
* Severity type of the tag.
|
||||||
*/
|
*/
|
||||||
severity?: HintedString<'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'contrast'> | undefined;
|
severity?: HintedString<'secondary' | 'success' | 'info' | 'warn' | 'danger' | 'contrast'> | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether the corners of the tag are rounded.
|
* Whether the corners of the tag are rounded.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -6,7 +6,7 @@ const classes = {
|
||||||
{
|
{
|
||||||
'p-tag-info': props.severity === 'info',
|
'p-tag-info': props.severity === 'info',
|
||||||
'p-tag-success': props.severity === 'success',
|
'p-tag-success': props.severity === 'success',
|
||||||
'p-tag-warn': props.severity === 'warning',
|
'p-tag-warn': props.severity === 'warn',
|
||||||
'p-tag-danger': props.severity === 'danger',
|
'p-tag-danger': props.severity === 'danger',
|
||||||
'p-tag-secondary': props.severity === 'secondary',
|
'p-tag-secondary': props.severity === 'secondary',
|
||||||
'p-tag-contrast': props.severity === 'contrast',
|
'p-tag-contrast': props.severity === 'contrast',
|
||||||
|
|
|
@ -175,25 +175,25 @@ export default {
|
||||||
outline-color: ${dt('button.info.background')};
|
outline-color: ${dt('button.info.background')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-button-warning {
|
.p-button-warn {
|
||||||
background: ${dt('button.warn.background')};
|
background: ${dt('button.warn.background')};
|
||||||
border: 1px solid ${dt('button.warn.border.color')};
|
border: 1px solid ${dt('button.warn.border.color')};
|
||||||
color: ${dt('button.warn.color')};
|
color: ${dt('button.warn.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-button-warning:not(:disabled):hover {
|
.p-button-warn:not(:disabled):hover {
|
||||||
background: ${dt('button.warn.hover.background')};
|
background: ${dt('button.warn.hover.background')};
|
||||||
border: 1px solid ${dt('button.warn.hover.border.color')};
|
border: 1px solid ${dt('button.warn.hover.border.color')};
|
||||||
color: ${dt('button.warn.hover.color')};
|
color: ${dt('button.warn.hover.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-button-warning:not(:disabled):active {
|
.p-button-warn:not(:disabled):active {
|
||||||
background: ${dt('button.warn.active.background')};
|
background: ${dt('button.warn.active.background')};
|
||||||
border: 1px solid ${dt('button.warn.active.border.color')};
|
border: 1px solid ${dt('button.warn.active.border.color')};
|
||||||
color: ${dt('button.warn.active.color')};
|
color: ${dt('button.warn.active.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-button-warning:focus-visible {
|
.p-button-warn:focus-visible {
|
||||||
background: ${dt('button.warn.background')};
|
background: ${dt('button.warn.background')};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,18 +334,18 @@ export default {
|
||||||
color: ${dt('button.outlined.info.color')};
|
color: ${dt('button.outlined.info.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-button-outlined.p-button-warning {
|
.p-button-outlined.p-button-warn {
|
||||||
border-color: ${dt('button.outlined.warn.border.color')};
|
border-color: ${dt('button.outlined.warn.border.color')};
|
||||||
color: ${dt('button.outlined.warn.color')};
|
color: ${dt('button.outlined.warn.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-button-outlined.p-button-warning:not(:disabled):hover {
|
.p-button-outlined.p-button-warn:not(:disabled):hover {
|
||||||
background: ${dt('button.outlined.warn.hover.background')};
|
background: ${dt('button.outlined.warn.hover.background')};
|
||||||
border-color: ${dt('button.outlined.warn.border.color')};
|
border-color: ${dt('button.outlined.warn.border.color')};
|
||||||
color: ${dt('button.outlined.warn.color')};
|
color: ${dt('button.outlined.warn.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-button-outlined.p-button-warning:not(:disabled):active {
|
.p-button-outlined.p-button-warn:not(:disabled):active {
|
||||||
background: ${dt('button.outlined.warn.active.background')};
|
background: ${dt('button.outlined.warn.active.background')};
|
||||||
border-color: ${dt('button.outlined.warn.border.color')};
|
border-color: ${dt('button.outlined.warn.border.color')};
|
||||||
color: ${dt('button.outlined.warn.color')};
|
color: ${dt('button.outlined.warn.color')};
|
||||||
|
@ -492,19 +492,19 @@ export default {
|
||||||
color: ${dt('button.text.info.color')};
|
color: ${dt('button.text.info.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-button-text.p-button-warning {
|
.p-button-text.p-button-warn {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
color: ${dt('button.text.warn.color')};
|
color: ${dt('button.text.warn.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-button-text.p-button-warning:not(:disabled):hover {
|
.p-button-text.p-button-warn:not(:disabled):hover {
|
||||||
background: ${dt('button.text.warn.hover.background')};
|
background: ${dt('button.text.warn.hover.background')};
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
color: ${dt('button.text.warn.color')};
|
color: ${dt('button.text.warn.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-button-text.p-button-warning:not(:disabled):active {
|
.p-button-text.p-button-warn:not(:disabled):active {
|
||||||
background: ${dt('button.text.warn.active.background')};
|
background: ${dt('button.text.warn.active.background')};
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
color: ${dt('button.text.warn.color')};
|
color: ${dt('button.text.warn.color')};
|
||||||
|
|
Loading…
Reference in New Issue