diff --git a/api-generator/components/badge.js b/api-generator/components/badge.js index b1450d0d7..2eb0a0151 100644 --- a/api-generator/components/badge.js +++ b/api-generator/components/badge.js @@ -9,7 +9,7 @@ const BadgeProps = [ name: 'severity', type: 'string', 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', diff --git a/api-generator/components/badgedirective.js b/api-generator/components/badgedirective.js index b3f959bde..07dbe6d48 100644 --- a/api-generator/components/badgedirective.js +++ b/api-generator/components/badgedirective.js @@ -8,7 +8,7 @@ const BadgeDirectiveModifiers = [ description: 'Default color for severity levels' }, { - name: 'warning', + name: 'warn', description: 'Overrides default severity color' }, { diff --git a/api-generator/components/button.js b/api-generator/components/button.js index 486dbfcce..87f1b0437 100644 --- a/api-generator/components/button.js +++ b/api-generator/components/button.js @@ -57,7 +57,7 @@ const ButtonProps = [ name: 'severity', type: 'string', 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', diff --git a/api-generator/components/splitbutton.js b/api-generator/components/splitbutton.js index f12d64798..78f9333e5 100644 --- a/api-generator/components/splitbutton.js +++ b/api-generator/components/splitbutton.js @@ -63,7 +63,7 @@ const SplitButtonProps = [ name: 'severity', type: 'string', 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', diff --git a/api-generator/components/tag.js b/api-generator/components/tag.js index e476acea2..9487a9b2c 100644 --- a/api-generator/components/tag.js +++ b/api-generator/components/tag.js @@ -9,7 +9,7 @@ const TagProps = [ name: 'severity', type: 'string', 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', diff --git a/components/lib/badge/Badge.d.ts b/components/lib/badge/Badge.d.ts index 99e8373f2..1d399cc8f 100644 --- a/components/lib/badge/Badge.d.ts +++ b/components/lib/badge/Badge.d.ts @@ -70,7 +70,7 @@ export interface BadgeProps { /** * 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'. */ diff --git a/components/lib/badge/Badge.spec.js b/components/lib/badge/Badge.spec.js index 078d9e3dd..77c95b386 100644 --- a/components/lib/badge/Badge.spec.js +++ b/components/lib/badge/Badge.spec.js @@ -9,14 +9,14 @@ describe('Badge.vue', () => { wrapper = mount(Badge, { props: { value: '29', - severity: 'warning', + severity: 'warn', size: 'large' } }); }); it('should exist', () => { 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-no-gutter').exists()).toBe(false); diff --git a/components/lib/badgedirective/BadgeDirective.d.ts b/components/lib/badgedirective/BadgeDirective.d.ts index 0d0a2f667..2943deec2 100644 --- a/components/lib/badgedirective/BadgeDirective.d.ts +++ b/components/lib/badgedirective/BadgeDirective.d.ts @@ -95,10 +95,10 @@ export interface BadgeContext { */ success: boolean; /** - * Current warning state as a boolean. + * Current warn state as a boolean. * @defaultValue false */ - warning: boolean; + warn: boolean; /** * Current danger state as a boolean. * @defaultValue false @@ -129,10 +129,10 @@ export interface BadgeDirectiveModifiers { */ success?: boolean | undefined; /** - * Warning severity for Badge directive. + * warn severity for Badge directive. * @defaultValue false */ - warning?: boolean | undefined; + warn?: boolean | undefined; /** * Danger severity for Badge directive. * @defaultValue false diff --git a/components/lib/button/Button.d.ts b/components/lib/button/Button.d.ts index d4588a8d5..705bd1ec0 100755 --- a/components/lib/button/Button.d.ts +++ b/components/lib/button/Button.d.ts @@ -119,7 +119,7 @@ export interface ButtonProps extends ButtonHTMLAttributes { /** * 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. * @defaultValue false @@ -137,7 +137,7 @@ export interface ButtonProps extends ButtonHTMLAttributes { /** * 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. * @defaultValue false diff --git a/components/lib/fileupload/FileContent.vue b/components/lib/fileupload/FileContent.vue index cf7f27779..c5fdb9e21 100644 --- a/components/lib/fileupload/FileContent.vue +++ b/components/lib/fileupload/FileContent.vue @@ -35,7 +35,7 @@ export default { }, badgeSeverity: { type: String, - default: 'warning' + default: 'warn' }, badgeValue: { type: String, diff --git a/components/lib/splitbutton/SplitButton.d.ts b/components/lib/splitbutton/SplitButton.d.ts index 3fcb326bd..450871fa4 100755 --- a/components/lib/splitbutton/SplitButton.d.ts +++ b/components/lib/splitbutton/SplitButton.d.ts @@ -171,7 +171,7 @@ export interface SplitButtonProps { /** * 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. * @defaultValue false diff --git a/components/lib/tag/Tag.d.ts b/components/lib/tag/Tag.d.ts index 472d62f23..2cf783253 100644 --- a/components/lib/tag/Tag.d.ts +++ b/components/lib/tag/Tag.d.ts @@ -82,7 +82,7 @@ export interface TagProps { /** * 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. * @defaultValue false diff --git a/components/lib/tag/style/TagStyle.js b/components/lib/tag/style/TagStyle.js index f9cb57933..7d5e41dff 100644 --- a/components/lib/tag/style/TagStyle.js +++ b/components/lib/tag/style/TagStyle.js @@ -6,7 +6,7 @@ const classes = { { 'p-tag-info': props.severity === 'info', '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-secondary': props.severity === 'secondary', 'p-tag-contrast': props.severity === 'contrast', diff --git a/components/lib/themes/primeone/base/button/index.js b/components/lib/themes/primeone/base/button/index.js index 4915c6fa4..e0d0d0a52 100644 --- a/components/lib/themes/primeone/base/button/index.js +++ b/components/lib/themes/primeone/base/button/index.js @@ -175,25 +175,25 @@ export default { outline-color: ${dt('button.info.background')}; } -.p-button-warning { +.p-button-warn { background: ${dt('button.warn.background')}; border: 1px solid ${dt('button.warn.border.color')}; color: ${dt('button.warn.color')}; } -.p-button-warning:not(:disabled):hover { +.p-button-warn:not(:disabled):hover { background: ${dt('button.warn.hover.background')}; border: 1px solid ${dt('button.warn.hover.border.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')}; border: 1px solid ${dt('button.warn.active.border.color')}; color: ${dt('button.warn.active.color')}; } -.p-button-warning:focus-visible { +.p-button-warn:focus-visible { background: ${dt('button.warn.background')}; } @@ -334,18 +334,18 @@ export default { 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')}; 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')}; border-color: ${dt('button.outlined.warn.border.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')}; border-color: ${dt('button.outlined.warn.border.color')}; color: ${dt('button.outlined.warn.color')}; @@ -492,19 +492,19 @@ export default { color: ${dt('button.text.info.color')}; } -.p-button-text.p-button-warning { +.p-button-text.p-button-warn { background: transparent; border-color: transparent; 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')}; border-color: transparent; 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')}; border-color: transparent; color: ${dt('button.text.warn.color')};