mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #5176 - invalid property added
This commit is contained in:
parent
b42c9eb7ee
commit
a9a254915c
54 changed files with 198 additions and 12 deletions
|
@ -350,6 +350,11 @@ export interface AutoCompleteProps {
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
loading?: boolean | undefined;
|
loading?: boolean | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the component should be disabled.
|
* When present, it specifies that the component should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -45,6 +45,10 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
|
@ -110,6 +110,7 @@ const classes = {
|
||||||
'p-autocomplete p-component p-inputwrapper',
|
'p-autocomplete p-component p-inputwrapper',
|
||||||
{
|
{
|
||||||
'p-disabled': props.disabled,
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid,
|
||||||
'p-focus': instance.focused,
|
'p-focus': instance.focused,
|
||||||
'p-autocomplete-dd': props.dropdown,
|
'p-autocomplete-dd': props.dropdown,
|
||||||
'p-autocomplete-multiple': props.multiple,
|
'p-autocomplete-multiple': props.multiple,
|
||||||
|
|
|
@ -176,6 +176,10 @@ export default {
|
||||||
type: [String, Object],
|
type: [String, Object],
|
||||||
default: 'body'
|
default: 'body'
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
5
components/lib/calendar/Calendar.d.ts
vendored
5
components/lib/calendar/Calendar.d.ts
vendored
|
@ -711,6 +711,11 @@ export interface CalendarProps {
|
||||||
* @defaultValue true
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
manualInput?: boolean | undefined;
|
manualInput?: boolean | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the component should be disabled.
|
* When present, it specifies that the component should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -166,6 +166,7 @@ const classes = {
|
||||||
'p-input-icon-right': props.showIcon && props.iconDisplay === 'input',
|
'p-input-icon-right': props.showIcon && props.iconDisplay === 'input',
|
||||||
'p-calendar-timeonly': props.timeOnly,
|
'p-calendar-timeonly': props.timeOnly,
|
||||||
'p-calendar-disabled': props.disabled,
|
'p-calendar-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid,
|
||||||
'p-inputwrapper-filled': props.modelValue,
|
'p-inputwrapper-filled': props.modelValue,
|
||||||
'p-inputwrapper-focus': state.focused,
|
'p-inputwrapper-focus': state.focused,
|
||||||
'p-focus': state.focused || state.overlayVisible
|
'p-focus': state.focused || state.overlayVisible
|
||||||
|
|
|
@ -14,6 +14,10 @@ export default {
|
||||||
optionGroupLabel: null,
|
optionGroupLabel: null,
|
||||||
optionGroupChildren: null,
|
optionGroupChildren: null,
|
||||||
placeholder: String,
|
placeholder: String,
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
dataKey: null,
|
dataKey: null,
|
||||||
inputId: {
|
inputId: {
|
||||||
|
|
|
@ -271,6 +271,11 @@ export interface CascadeSelectProps {
|
||||||
* Default text to display when no option is selected.
|
* Default text to display when no option is selected.
|
||||||
*/
|
*/
|
||||||
placeholder?: string | undefined;
|
placeholder?: string | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the component should be disabled.
|
* When present, it specifies that the component should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -103,6 +103,7 @@ const classes = {
|
||||||
'p-cascadeselect p-component p-inputwrapper',
|
'p-cascadeselect p-component p-inputwrapper',
|
||||||
{
|
{
|
||||||
'p-disabled': props.disabled,
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid,
|
||||||
'p-focus': instance.focused,
|
'p-focus': instance.focused,
|
||||||
'p-inputwrapper-filled': props.modelValue,
|
'p-inputwrapper-filled': props.modelValue,
|
||||||
'p-inputwrapper-focus': instance.focused || instance.overlayVisible,
|
'p-inputwrapper-focus': instance.focused || instance.overlayVisible,
|
||||||
|
|
|
@ -21,6 +21,10 @@ export default {
|
||||||
type: null,
|
type: null,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
5
components/lib/checkbox/Checkbox.d.ts
vendored
5
components/lib/checkbox/Checkbox.d.ts
vendored
|
@ -111,6 +111,11 @@ export interface CheckboxProps {
|
||||||
* @default false
|
* @default false
|
||||||
*/
|
*/
|
||||||
binary?: boolean;
|
binary?: boolean;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the element should be disabled.
|
* When present, it specifies that the element should be disabled.
|
||||||
* @default false
|
* @default false
|
||||||
|
|
|
@ -26,7 +26,8 @@ const classes = {
|
||||||
'p-checkbox p-component',
|
'p-checkbox p-component',
|
||||||
{
|
{
|
||||||
'p-highlight': instance.checked,
|
'p-highlight': instance.checked,
|
||||||
'p-disabled': props.disabled
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
box: 'p-checkbox-box',
|
box: 'p-checkbox-box',
|
||||||
|
|
|
@ -30,6 +30,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
6
components/lib/chips/Chips.d.ts
vendored
6
components/lib/chips/Chips.d.ts
vendored
|
@ -184,8 +184,14 @@ export interface ChipsProps {
|
||||||
* @deprecated since v3.27.0. Use 'removetokenicon' slot.
|
* @deprecated since v3.27.0. Use 'removetokenicon' slot.
|
||||||
*/
|
*/
|
||||||
removeTokenIcon?: string | undefined;
|
removeTokenIcon?: string | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the element should be disabled.
|
* When present, it specifies that the element should be disabled.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
disabled?: boolean | undefined;
|
disabled?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -55,6 +55,7 @@ const classes = {
|
||||||
'p-chips p-component p-inputwrapper',
|
'p-chips p-component p-inputwrapper',
|
||||||
{
|
{
|
||||||
'p-disabled': props.disabled,
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid,
|
||||||
'p-focus': instance.focused,
|
'p-focus': instance.focused,
|
||||||
'p-inputwrapper-filled': (props.modelValue && props.modelValue.length) || (instance.inputValue && instance.inputValue.length),
|
'p-inputwrapper-filled': (props.modelValue && props.modelValue.length) || (instance.inputValue && instance.inputValue.length),
|
||||||
'p-inputwrapper-focus': instance.focused
|
'p-inputwrapper-focus': instance.focused
|
||||||
|
|
|
@ -33,6 +33,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
5
components/lib/dropdown/Dropdown.d.ts
vendored
5
components/lib/dropdown/Dropdown.d.ts
vendored
|
@ -319,6 +319,11 @@ export interface DropdownProps {
|
||||||
* Default text to display when no option is selected.
|
* Default text to display when no option is selected.
|
||||||
*/
|
*/
|
||||||
placeholder?: string | undefined;
|
placeholder?: string | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the component should be disabled.
|
* When present, it specifies that the component should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -104,6 +104,7 @@ const classes = {
|
||||||
'p-dropdown p-component p-inputwrapper',
|
'p-dropdown p-component p-inputwrapper',
|
||||||
{
|
{
|
||||||
'p-disabled': props.disabled,
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid,
|
||||||
'p-dropdown-clearable': props.showClear,
|
'p-dropdown-clearable': props.showClear,
|
||||||
'p-focus': state.focused,
|
'p-focus': state.focused,
|
||||||
'p-inputwrapper-filled': instance.hasSelectedOption,
|
'p-inputwrapper-filled': instance.hasSelectedOption,
|
||||||
|
|
|
@ -109,6 +109,10 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
5
components/lib/inputnumber/InputNumber.d.ts
vendored
5
components/lib/inputnumber/InputNumber.d.ts
vendored
|
@ -262,6 +262,11 @@ export interface InputNumberProps {
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
highlightOnFocus?: boolean | undefined;
|
highlightOnFocus?: boolean | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the component should be disabled.
|
* When present, it specifies that the component should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -113,7 +113,8 @@ const classes = {
|
||||||
'p-inputwrapper-focus': instance.focused,
|
'p-inputwrapper-focus': instance.focused,
|
||||||
'p-inputnumber-buttons-stacked': props.showButtons && props.buttonLayout === 'stacked',
|
'p-inputnumber-buttons-stacked': props.showButtons && props.buttonLayout === 'stacked',
|
||||||
'p-inputnumber-buttons-horizontal': props.showButtons && props.buttonLayout === 'horizontal',
|
'p-inputnumber-buttons-horizontal': props.showButtons && props.buttonLayout === 'horizontal',
|
||||||
'p-inputnumber-buttons-vertical': props.showButtons && props.buttonLayout === 'vertical'
|
'p-inputnumber-buttons-vertical': props.showButtons && props.buttonLayout === 'vertical',
|
||||||
|
'p-invalid': props.invalid
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
input: 'p-inputnumber-input',
|
input: 'p-inputnumber-input',
|
||||||
|
|
|
@ -18,6 +18,10 @@ export default {
|
||||||
type: null,
|
type: null,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
5
components/lib/inputswitch/InputSwitch.d.ts
vendored
5
components/lib/inputswitch/InputSwitch.d.ts
vendored
|
@ -105,6 +105,11 @@ export interface InputSwitchProps {
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
falseValue?: any;
|
falseValue?: any;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the component should be disabled.
|
* When present, it specifies that the component should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -37,7 +37,8 @@ const classes = {
|
||||||
'p-inputswitch p-component',
|
'p-inputswitch p-component',
|
||||||
{
|
{
|
||||||
'p-highlight': instance.checked,
|
'p-highlight': instance.checked,
|
||||||
'p-disabled': props.disabled
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
input: 'p-inputswitch-input',
|
input: 'p-inputswitch-input',
|
||||||
|
|
|
@ -10,6 +10,10 @@ export default {
|
||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
style: InputTextStyle,
|
style: InputTextStyle,
|
||||||
|
|
5
components/lib/inputtext/InputText.d.ts
vendored
5
components/lib/inputtext/InputText.d.ts
vendored
|
@ -91,6 +91,11 @@ export interface InputTextProps extends InputHTMLAttributes {
|
||||||
* Defines the size of the component.
|
* Defines the size of the component.
|
||||||
*/
|
*/
|
||||||
size?: 'small' | 'large' | undefined;
|
size?: 'small' | 'large' | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Used to pass attributes to DOM elements inside the component.
|
* Used to pass attributes to DOM elements inside the component.
|
||||||
* @type {InputTextPassThroughOptions}
|
* @type {InputTextPassThroughOptions}
|
||||||
|
|
|
@ -6,7 +6,8 @@ const classes = {
|
||||||
{
|
{
|
||||||
'p-filled': instance.filled,
|
'p-filled': instance.filled,
|
||||||
'p-inputtext-sm': props.size === 'small',
|
'p-inputtext-sm': props.size === 'small',
|
||||||
'p-inputtext-lg': props.size === 'large'
|
'p-inputtext-lg': props.size === 'large',
|
||||||
|
'p-invalid': props.invalid
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,6 +14,10 @@ export default {
|
||||||
optionGroupLabel: null,
|
optionGroupLabel: null,
|
||||||
optionGroupChildren: null,
|
optionGroupChildren: null,
|
||||||
listStyle: null,
|
listStyle: null,
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
5
components/lib/listbox/Listbox.d.ts
vendored
5
components/lib/listbox/Listbox.d.ts
vendored
|
@ -240,6 +240,11 @@ export interface ListboxProps {
|
||||||
* Inline style of inner list element.
|
* Inline style of inner list element.
|
||||||
*/
|
*/
|
||||||
listStyle?: string | undefined;
|
listStyle?: string | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When specified, disables the component.
|
* When specified, disables the component.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -42,7 +42,8 @@ const classes = {
|
||||||
root: ({ instance, props }) => [
|
root: ({ instance, props }) => [
|
||||||
'p-listbox p-component',
|
'p-listbox p-component',
|
||||||
{
|
{
|
||||||
'p-disabled': props.disabled
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
header: 'p-listbox-header',
|
header: 'p-listbox-header',
|
||||||
|
|
|
@ -18,6 +18,10 @@ export default {
|
||||||
default: '200px'
|
default: '200px'
|
||||||
},
|
},
|
||||||
placeholder: String,
|
placeholder: String,
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
inputId: {
|
inputId: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
5
components/lib/multiselect/MultiSelect.d.ts
vendored
5
components/lib/multiselect/MultiSelect.d.ts
vendored
|
@ -331,6 +331,11 @@ export interface MultiSelectProps {
|
||||||
* Label to display when there are no selections.
|
* Label to display when there are no selections.
|
||||||
*/
|
*/
|
||||||
placeholder?: string | undefined;
|
placeholder?: string | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the component should be disabled.
|
* When present, it specifies that the component should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -120,6 +120,7 @@ const classes = {
|
||||||
{
|
{
|
||||||
'p-multiselect-chip': props.display === 'chip',
|
'p-multiselect-chip': props.display === 'chip',
|
||||||
'p-disabled': props.disabled,
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid,
|
||||||
'p-focus': instance.focused,
|
'p-focus': instance.focused,
|
||||||
'p-inputwrapper-filled': props.modelValue && props.modelValue.length,
|
'p-inputwrapper-filled': props.modelValue && props.modelValue.length,
|
||||||
'p-inputwrapper-focus': instance.focused || instance.overlayVisible,
|
'p-inputwrapper-focus': instance.focused || instance.overlayVisible,
|
||||||
|
|
|
@ -51,6 +51,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: undefined
|
default: undefined
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
5
components/lib/password/Password.d.ts
vendored
5
components/lib/password/Password.d.ts
vendored
|
@ -221,6 +221,11 @@ export interface PasswordProps extends InputHTMLAttributes {
|
||||||
* @deprecated since v3.27.0. Use 'showicon' slot.
|
* @deprecated since v3.27.0. Use 'showicon' slot.
|
||||||
*/
|
*/
|
||||||
showIcon?: string | undefined;
|
showIcon?: string | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the component should be disabled.
|
* When present, it specifies that the component should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -41,7 +41,8 @@ const classes = {
|
||||||
{
|
{
|
||||||
'p-inputwrapper-filled': instance.filled,
|
'p-inputwrapper-filled': instance.filled,
|
||||||
'p-inputwrapper-focus': instance.focused,
|
'p-inputwrapper-focus': instance.focused,
|
||||||
'p-input-icon-right': props.toggleMask
|
'p-input-icon-right': props.toggleMask,
|
||||||
|
'p-invalid': props.invalid
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
input: ({ props }) => [
|
input: ({ props }) => [
|
||||||
|
|
|
@ -13,6 +13,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
5
components/lib/radiobutton/RadioButton.d.ts
vendored
5
components/lib/radiobutton/RadioButton.d.ts
vendored
|
@ -110,6 +110,11 @@ export interface RadioButtonProps {
|
||||||
* @default false
|
* @default false
|
||||||
*/
|
*/
|
||||||
binary?: boolean;
|
binary?: boolean;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the component should be disabled.
|
* When present, it specifies that the component should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -39,7 +39,8 @@ const classes = {
|
||||||
'p-radiobutton p-component',
|
'p-radiobutton p-component',
|
||||||
{
|
{
|
||||||
'p-highlight': instance.checked,
|
'p-highlight': instance.checked,
|
||||||
'p-disabled': props.disabled
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
box: 'p-radiobutton-box',
|
box: 'p-radiobutton-box',
|
||||||
|
|
|
@ -20,6 +20,10 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
dataKey: null,
|
dataKey: null,
|
||||||
ariaLabelledby: {
|
ariaLabelledby: {
|
||||||
|
|
|
@ -153,6 +153,11 @@ export interface SelectButtonProps {
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
multiple?: boolean | undefined;
|
multiple?: boolean | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the element should be disabled.
|
* When present, it specifies that the element should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
import BaseStyle from 'primevue/base/style';
|
import BaseStyle from 'primevue/base/style';
|
||||||
|
|
||||||
const classes = {
|
const classes = {
|
||||||
root: ({ props }) => ['p-selectbutton p-buttonset p-component', { 'p-disabled': props.disabled }],
|
root: ({ props }) => [
|
||||||
|
'p-selectbutton p-buttonset p-component',
|
||||||
|
{
|
||||||
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid
|
||||||
|
}
|
||||||
|
],
|
||||||
button: ({ instance, option }) => [
|
button: ({ instance, option }) => [
|
||||||
'p-button p-component',
|
'p-button p-component',
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,11 @@ export default {
|
||||||
extends: BaseComponent,
|
extends: BaseComponent,
|
||||||
props: {
|
props: {
|
||||||
modelValue: null,
|
modelValue: null,
|
||||||
autoResize: Boolean
|
autoResize: Boolean,
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
style: TextareaStyle,
|
style: TextareaStyle,
|
||||||
provide() {
|
provide() {
|
||||||
|
|
5
components/lib/textarea/Textarea.d.ts
vendored
5
components/lib/textarea/Textarea.d.ts
vendored
|
@ -97,6 +97,11 @@ export interface TextareaProps extends TextareaHTMLAttributes {
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
autoResize?: boolean | undefined;
|
autoResize?: boolean | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Used to pass attributes to DOM elements inside the component.
|
* Used to pass attributes to DOM elements inside the component.
|
||||||
* @type {TextareaPassThroughOptions}
|
* @type {TextareaPassThroughOptions}
|
||||||
|
|
|
@ -18,7 +18,8 @@ const classes = {
|
||||||
'p-inputtextarea p-inputtext p-component',
|
'p-inputtextarea p-inputtext p-component',
|
||||||
{
|
{
|
||||||
'p-filled': instance.filled,
|
'p-filled': instance.filled,
|
||||||
'p-inputtextarea-resizable ': props.autoResize
|
'p-inputtextarea-resizable ': props.autoResize,
|
||||||
|
'p-invalid': props.invalid
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,6 +21,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'left'
|
default: 'left'
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
|
@ -144,6 +144,11 @@ export interface ToggleButtonProps {
|
||||||
* @defaultValue left
|
* @defaultValue left
|
||||||
*/
|
*/
|
||||||
iconPos?: 'left' | 'right' | undefined;
|
iconPos?: 'left' | 'right' | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the element should be disabled.
|
* When present, it specifies that the element should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -24,7 +24,8 @@ const classes = {
|
||||||
'p-togglebutton p-component',
|
'p-togglebutton p-component',
|
||||||
{
|
{
|
||||||
'p-disabled': props.disabled,
|
'p-disabled': props.disabled,
|
||||||
'p-highlight': instance.active
|
'p-highlight': instance.active,
|
||||||
|
'p-invalid': props.invalid
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
input: 'p-togglebutton-input',
|
input: 'p-togglebutton-input',
|
||||||
|
|
|
@ -16,6 +16,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
5
components/lib/treeselect/TreeSelect.d.ts
vendored
5
components/lib/treeselect/TreeSelect.d.ts
vendored
|
@ -179,6 +179,11 @@ export interface TreeSelectProps {
|
||||||
* Label to display when there are no selections.
|
* Label to display when there are no selections.
|
||||||
*/
|
*/
|
||||||
placeholder?: string | undefined;
|
placeholder?: string | undefined;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the component should be disabled.
|
* When present, it specifies that the component should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -65,6 +65,7 @@ const classes = {
|
||||||
{
|
{
|
||||||
'p-treeselect-chip': props.display === 'chip',
|
'p-treeselect-chip': props.display === 'chip',
|
||||||
'p-disabled': props.disabled,
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid,
|
||||||
'p-focus': instance.focused,
|
'p-focus': instance.focused,
|
||||||
'p-inputwrapper-filled': !instance.emptyValue,
|
'p-inputwrapper-filled': !instance.emptyValue,
|
||||||
'p-inputwrapper-focus': instance.focused || instance.overlayVisible
|
'p-inputwrapper-focus': instance.focused || instance.overlayVisible
|
||||||
|
|
|
@ -7,6 +7,10 @@ export default {
|
||||||
extends: BaseComponent,
|
extends: BaseComponent,
|
||||||
props: {
|
props: {
|
||||||
modelValue: null,
|
modelValue: null,
|
||||||
|
invalid: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|
|
@ -127,6 +127,11 @@ export interface TriStateCheckboxProps {
|
||||||
* @defaultValue null
|
* @defaultValue null
|
||||||
*/
|
*/
|
||||||
modelValue?: Nullable<boolean>;
|
modelValue?: Nullable<boolean>;
|
||||||
|
/**
|
||||||
|
* When present, it specifies that the component should have invalid state style.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
invalid?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When present, it specifies that the component should be disabled.
|
* When present, it specifies that the component should be disabled.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -26,7 +26,8 @@ const classes = {
|
||||||
'p-tristatecheckbox p-checkbox p-component',
|
'p-tristatecheckbox p-checkbox p-component',
|
||||||
{
|
{
|
||||||
'p-highlight': instance.active,
|
'p-highlight': instance.active,
|
||||||
'p-disabled': props.disabled
|
'p-disabled': props.disabled,
|
||||||
|
'p-invalid': props.invalid
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
box: 'p-checkbox-box',
|
box: 'p-checkbox-box',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue