-
+
@@ -170,7 +171,7 @@
-
+
{{ selectedMessageText }}
@@ -199,7 +200,7 @@ export default {
name: 'AutoComplete',
extends: BaseAutoComplete,
inheritAttrs: false,
- emits: ['update:modelValue', 'change', 'focus', 'blur', 'item-select', 'item-unselect', 'option-select', 'option-unselect', 'dropdown-click', 'clear', 'complete', 'before-show', 'before-hide', 'show', 'hide'],
+ emits: ['change', 'focus', 'blur', 'item-select', 'item-unselect', 'option-select', 'option-unselect', 'dropdown-click', 'clear', 'complete', 'before-show', 'before-hide', 'show', 'hide'],
inject: {
$pcFluid: { default: null }
},
@@ -342,6 +343,7 @@ export default {
this.focused = false;
this.focusedOptionIndex = -1;
this.$emit('blur', event);
+ this.formField.onBlur?.();
},
onKeyDown(event) {
if (this.disabled) {
@@ -533,7 +535,7 @@ export default {
this.$refs.focusInput.value = '';
if (!this.isSelected(option)) {
- this.updateModel(event, [...(this.modelValue || []), value]);
+ this.updateModel(event, [...(this.d_value || []), value]);
}
} else {
this.updateModel(event, value);
@@ -602,9 +604,9 @@ export default {
this.focusedOptionIndex = -1;
if (this.multiple) {
- if (isEmpty(target.value) && this.hasSelectedOption) {
+ if (isEmpty(target.value) && this.$filled) {
focus(this.$refs.multiContainer);
- this.focusedMultipleOptionIndex = this.modelValue.length;
+ this.focusedMultipleOptionIndex = this.d_value.length;
} else {
event.stopPropagation(); // To prevent onArrowLeftKeyOnMultiple method
}
@@ -644,7 +646,7 @@ export default {
onEnterKey(event) {
if (!this.typeahead) {
if (this.multiple) {
- this.updateModel(event, [...(this.modelValue || []), event.target.value]);
+ this.updateModel(event, [...(this.d_value || []), event.target.value]);
this.$refs.focusInput.value = '';
}
} else {
@@ -673,11 +675,11 @@ export default {
},
onBackspaceKey(event) {
if (this.multiple) {
- if (isNotEmpty(this.modelValue) && !this.$refs.focusInput.value) {
- const removedValue = this.modelValue[this.modelValue.length - 1];
- const newValue = this.modelValue.slice(0, -1);
+ if (isNotEmpty(this.d_value) && !this.$refs.focusInput.value) {
+ const removedValue = this.d_value[this.d_value.length - 1];
+ const newValue = this.d_value.slice(0, -1);
- this.$emit('update:modelValue', newValue);
+ this.writeValue(newValue, event);
this.$emit('item-unselect', { originalEvent: event, value: removedValue });
this.$emit('option-unselect', { originalEvent: event, value: removedValue });
}
@@ -691,7 +693,7 @@ export default {
onArrowRightKeyOnMultiple() {
this.focusedMultipleOptionIndex++;
- if (this.focusedMultipleOptionIndex > this.modelValue.length - 1) {
+ if (this.focusedMultipleOptionIndex > this.d_value.length - 1) {
this.focusedMultipleOptionIndex = -1;
focus(this.$refs.focusInput);
}
@@ -810,7 +812,7 @@ export default {
isSelected(option) {
const optionValue = this.getOptionValue(option);
- return this.multiple ? (this.modelValue || []).some((value) => this.isEquals(value, optionValue)) : this.isEquals(this.modelValue, this.getOptionValue(option));
+ return this.multiple ? (this.d_value || []).some((value) => this.isEquals(value, optionValue)) : this.isEquals(this.d_value, this.getOptionValue(option));
},
findFirstOptionIndex() {
return this.visibleOptions.findIndex((option) => this.isValidOption(option));
@@ -829,7 +831,7 @@ export default {
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
},
findSelectedOptionIndex() {
- return this.hasSelectedOption ? this.visibleOptions.findIndex((option) => this.isValidSelectedOption(option)) : -1;
+ return this.$filled ? this.visibleOptions.findIndex((option) => this.isValidSelectedOption(option)) : -1;
},
findFirstFocusedOptionIndex() {
const selectedIndex = this.findSelectedOptionIndex();
@@ -856,8 +858,8 @@ export default {
this.$emit('complete', { originalEvent: event, query });
},
removeOption(event, index) {
- const removedOption = this.modelValue[index];
- const value = this.modelValue.filter((_, i) => i !== index).map((option) => this.getOptionValue(option));
+ const removedOption = this.d_value[index];
+ const value = this.d_value.filter((_, i) => i !== index).map((option) => this.getOptionValue(option));
this.updateModel(event, value);
this.$emit('item-unselect', { originalEvent: event, value: removedOption });
@@ -888,13 +890,13 @@ export default {
});
},
autoUpdateModel() {
- if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption) {
+ if (this.selectOnFocus && this.autoOptionFocus && !this.$filled) {
this.focusedOptionIndex = this.findFirstFocusedOptionIndex();
this.onOptionSelect(null, this.visibleOptions[this.focusedOptionIndex], false);
}
},
updateModel(event, value) {
- this.$emit('update:modelValue', value);
+ this.updateValue(value, event);
this.$emit('change', { originalEvent: event, value });
},
flatOptions(options) {
@@ -924,23 +926,25 @@ export default {
return this.optionGroupLabel ? this.flatOptions(this.suggestions) : this.suggestions || [];
},
inputValue() {
- if (isNotEmpty(this.modelValue)) {
- if (typeof this.modelValue === 'object') {
- const label = this.getOptionLabel(this.modelValue);
+ if (this.$filled) {
+ if (typeof this.d_value === 'object') {
+ const label = this.getOptionLabel(this.d_value);
- return label != null ? label : this.modelValue;
+ return label != null ? label : this.d_value;
} else {
- return this.modelValue;
+ return this.d_value;
}
} else {
return '';
}
},
+ // @deprecated use $filled instead.
hasSelectedOption() {
- return isNotEmpty(this.modelValue);
+ return this.$filled;
},
equalityKey() {
- return this.dataKey; // TODO: The 'optionValue' properties can be added.
+ // @todo: The 'optionValue' properties can be added.
+ return this.dataKey;
},
searchResultMessageText() {
return isNotEmpty(this.visibleOptions) && this.overlayVisible ? this.searchMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptySearchMessageText;
@@ -958,7 +962,7 @@ export default {
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || '';
},
selectedMessageText() {
- return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;
+ return this.$filled ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.d_value.length : '1') : this.emptySelectionMessageText;
},
listAriaLabel() {
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.listLabel : undefined;
@@ -977,9 +981,6 @@ export default {
},
panelId() {
return this.id + '_panel';
- },
- hasFluid() {
- return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;
}
},
components: {
diff --git a/packages/primevue/src/autocomplete/BaseAutoComplete.vue b/packages/primevue/src/autocomplete/BaseAutoComplete.vue
index 66df8f7e4..eb17c46f7 100644
--- a/packages/primevue/src/autocomplete/BaseAutoComplete.vue
+++ b/packages/primevue/src/autocomplete/BaseAutoComplete.vue
@@ -1,12 +1,11 @@
diff --git a/packages/primevue/src/checkboxgroup/CheckboxGroup.d.ts b/packages/primevue/src/checkboxgroup/CheckboxGroup.d.ts
new file mode 100644
index 000000000..b56a881eb
--- /dev/null
+++ b/packages/primevue/src/checkboxgroup/CheckboxGroup.d.ts
@@ -0,0 +1,160 @@
+/**
+ *
+ * CheckboxGroup is a component that groups multiple checkboxes, allowing users to select one or more options.
+ *
+ * [Live Demo](https://www.primevue.org/checkbox/)
+ *
+ * @module checkboxgroup
+ *
+ */
+import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
+import type { ComponentHooks } from '@primevue/core/basecomponent';
+import type { PassThroughOptions } from 'primevue/passthrough';
+import { VNode } from 'vue';
+
+export declare type CheckboxGroupPassThroughOptionType = CheckboxGroupPassThroughAttributes | ((options: CheckboxGroupPassThroughMethodOptions) => CheckboxGroupPassThroughAttributes | string) | string | null | undefined;
+
+/**
+ * Custom passthrough(pt) option method.
+ */
+export interface CheckboxGroupPassThroughMethodOptions {
+ /**
+ * Defines instance.
+ */
+ instance: any;
+ /**
+ * Defines valid properties.
+ */
+ props: CheckboxGroupProps;
+ /**
+ * Defines valid attributes.
+ */
+ attrs: any;
+ /**
+ * Defines parent options.
+ */
+ parent: any;
+ /**
+ * Defines passthrough(pt) options in global config.
+ */
+ global: object | undefined;
+}
+
+/**
+ * Custom passthrough(pt) options.
+ * @see {@link FloatLabelProps.pt}
+ */
+export interface CheckboxGroupPassThroughOptions {
+ /**
+ * Used to pass attributes to the root's DOM element.
+ */
+ root?: CheckboxGroupPassThroughOptionType;
+ /**
+ * Used to manage all lifecycle hooks.
+ * @see {@link BaseComponent.ComponentHooks}
+ */
+ hooks?: ComponentHooks;
+}
+
+/**
+ * Custom passthrough attributes for each DOM elements
+ */
+export interface CheckboxGroupPassThroughAttributes {
+ [key: string]: any;
+}
+
+/**
+ * Defines valid properties in CheckboxGroup component.
+ */
+export interface CheckboxGroupProps {
+ /**
+ * Value binding of the checkboxes.
+ */
+ modelValue?: any;
+ /**
+ * Default values of the checkboxes in uncontrolled mode.
+ */
+ defaultValue?: any;
+ /**
+ * Name of the input elements.
+ */
+ name?: string | undefined;
+ /**
+ * When present, it specifies that the component should have invalid state style.
+ * @defaultValue false
+ */
+ invalid?: boolean | undefined;
+ /**
+ * Used to set form control options.
+ */
+ formControl?: any;
+ /**
+ * It generates scoped CSS variables using design tokens for the component.
+ */
+ dt?: DesignToken
;
+ /**
+ * Used to pass attributes to DOM elements inside the component.
+ * @type {CheckboxGroupPassThroughOptions}
+ */
+ pt?: PassThrough;
+ /**
+ * Used to configure passthrough(pt) options of the component.
+ * @type {PassThroughOptions}
+ */
+ ptOptions?: PassThroughOptions;
+ /**
+ * When enabled, it removes component related styles in the core.
+ * @defaultValue false
+ */
+ unstyled?: boolean;
+}
+
+/**
+ * Defines valid slots in CheckboxGroup component.
+ */
+export interface CheckboxGroupSlots {
+ /**
+ * Default content slot.
+ */
+ default: () => VNode[];
+}
+
+/**
+ * Defines valid emits in CheckboxGroup component.
+ */
+export interface CheckboxGroupEmitsOptions {
+ /**
+ * Emitted when the value changes.
+ * @param {*} value - New value.
+ */
+ 'update:modelValue'(value: any): void;
+ /**
+ * Emitted when the value changes in uncontrolled mode.
+ * @param {*} value - New value.
+ */
+ 'value-change'(value: any): void;
+}
+
+export declare type CheckboxGroupEmits = EmitFn;
+
+/**
+ * **PrimeVue - CheckboxGroup**
+ *
+ * _CheckboxGroup is a component that groups multiple checkboxes, allowing users to select one or more options._
+ *
+ * [Live Demo](https://www.primevue.org/checkbox/)
+ * --- ---
+ * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
+ *
+ * @group Component
+ *
+ */
+declare const CheckboxGroup: DefineComponent;
+
+declare module 'vue' {
+ export interface GlobalComponents {
+ CheckboxGroup: DefineComponent;
+ }
+}
+
+export default CheckboxGroup;
diff --git a/packages/primevue/src/checkboxgroup/CheckboxGroup.vue b/packages/primevue/src/checkboxgroup/CheckboxGroup.vue
new file mode 100644
index 000000000..be33e992c
--- /dev/null
+++ b/packages/primevue/src/checkboxgroup/CheckboxGroup.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
diff --git a/packages/primevue/src/checkboxgroup/package.json b/packages/primevue/src/checkboxgroup/package.json
new file mode 100644
index 000000000..c4971e702
--- /dev/null
+++ b/packages/primevue/src/checkboxgroup/package.json
@@ -0,0 +1,11 @@
+{
+ "main": "./CheckboxGroup.vue",
+ "module": "./CheckboxGroup.vue",
+ "types": "./CheckboxGroup.d.ts",
+ "browser": {
+ "./sfc": "./CheckboxGroup.vue"
+ },
+ "sideEffects": [
+ "*.vue"
+ ]
+}
diff --git a/packages/primevue/src/checkboxgroup/style/CheckboxGroupStyle.d.ts b/packages/primevue/src/checkboxgroup/style/CheckboxGroupStyle.d.ts
new file mode 100644
index 000000000..408d4d0ab
--- /dev/null
+++ b/packages/primevue/src/checkboxgroup/style/CheckboxGroupStyle.d.ts
@@ -0,0 +1,19 @@
+/**
+ *
+ * CheckboxGroup is a component that groups multiple checkboxes, allowing users to select one or more options.
+ *
+ * [Live Demo](https://www.primevue.org/checkbox/)
+ *
+ * @module checkboxgroupstyle
+ *
+ */
+import type { BaseStyle } from '@primevue/core/base/style';
+
+export enum CheckboxGroupClasses {
+ /**
+ * Class name of the root element
+ */
+ root = 'p-checkbox-group'
+}
+
+export interface CheckboxGroupStyle extends BaseStyle {}
diff --git a/packages/primevue/src/checkboxgroup/style/CheckboxGroupStyle.js b/packages/primevue/src/checkboxgroup/style/CheckboxGroupStyle.js
new file mode 100644
index 000000000..7abe7cf72
--- /dev/null
+++ b/packages/primevue/src/checkboxgroup/style/CheckboxGroupStyle.js
@@ -0,0 +1,17 @@
+import BaseStyle from '@primevue/core/base/style';
+
+const theme = ({ dt }) => `
+.p-checkbox-group {
+ display: inline-flex;
+}
+`;
+
+const classes = {
+ root: 'p-checkbox-group p-component'
+};
+
+export default BaseStyle.extend({
+ name: 'checkboxgroup',
+ theme,
+ classes
+});
diff --git a/packages/primevue/src/checkboxgroup/style/package.json b/packages/primevue/src/checkboxgroup/style/package.json
new file mode 100644
index 000000000..ec0af1abf
--- /dev/null
+++ b/packages/primevue/src/checkboxgroup/style/package.json
@@ -0,0 +1,6 @@
+{
+ "main": "./CheckboxGroupStyle.js",
+ "module": "./CheckboxGroupStyle.js",
+ "types": "./CheckboxGroupStyle.d.ts",
+ "sideEffects": false
+}
diff --git a/packages/primevue/src/colorpicker/BaseColorPicker.vue b/packages/primevue/src/colorpicker/BaseColorPicker.vue
index d03f9e73c..9624e5963 100644
--- a/packages/primevue/src/colorpicker/BaseColorPicker.vue
+++ b/packages/primevue/src/colorpicker/BaseColorPicker.vue
@@ -1,15 +1,11 @@
diff --git a/packages/primevue/src/password/style/PasswordStyle.js b/packages/primevue/src/password/style/PasswordStyle.js
index cfbc9d919..85ea0a144 100644
--- a/packages/primevue/src/password/style/PasswordStyle.js
+++ b/packages/primevue/src/password/style/PasswordStyle.js
@@ -86,9 +86,9 @@ const classes = {
root: ({ instance }) => [
'p-password p-component p-inputwrapper',
{
- 'p-inputwrapper-filled': instance.filled,
+ 'p-inputwrapper-filled': instance.$filled,
'p-inputwrapper-focus': instance.focused,
- 'p-password-fluid': instance.hasFluid
+ 'p-password-fluid': instance.$fluid
}
],
pcInputText: 'p-password-input',
diff --git a/packages/primevue/src/primevue.js b/packages/primevue/src/primevue.js
index d3cbf584e..d78a9be96 100644
--- a/packages/primevue/src/primevue.js
+++ b/packages/primevue/src/primevue.js
@@ -146,6 +146,12 @@ export { default as Checkbox } from './checkbox/Checkbox.vue';
export * from './checkbox/style/CheckboxStyle.js';
export { default as CheckboxStyle } from './checkbox/style/CheckboxStyle.js';
+// CheckboxGroup
+export * from './checkboxgroup/CheckboxGroup.vue';
+export { default as CheckboxGroup } from './checkboxgroup/CheckboxGroup.vue';
+export * from './checkboxgroup/style/CheckboxGroupStyle.js';
+export { default as CheckboxGroupStyle } from './checkboxgroup/style/CheckboxGroupStyle.js';
+
// Chip
export * from './chip/Chip.vue';
export { default as Chip } from './chip/Chip.vue';
@@ -548,6 +554,12 @@ export { default as RadioButton } from './radiobutton/RadioButton.vue';
export * from './radiobutton/style/RadioButtonStyle.js';
export { default as RadioButtonStyle } from './radiobutton/style/RadioButtonStyle.js';
+// RadioButtonGroup
+export * from './radiobuttongroup/RadioButtonGroup.vue';
+export { default as RadioButtonGroup } from './radiobuttongroup/RadioButtonGroup.vue';
+export * from './radiobuttongroup/style/RadioButtonGroupStyle.js';
+export { default as RadioButtonGroupStyle } from './radiobuttongroup/style/RadioButtonGroupStyle.js';
+
// Rating
export * from './rating/Rating.vue';
export { default as Rating } from './rating/Rating.vue';
diff --git a/packages/primevue/src/radiobutton/BaseRadioButton.vue b/packages/primevue/src/radiobutton/BaseRadioButton.vue
index 2e531259d..0c030dc62 100644
--- a/packages/primevue/src/radiobutton/BaseRadioButton.vue
+++ b/packages/primevue/src/radiobutton/BaseRadioButton.vue
@@ -1,30 +1,13 @@
diff --git a/packages/primevue/src/radiobuttongroup/RadioButtonGroup.d.ts b/packages/primevue/src/radiobuttongroup/RadioButtonGroup.d.ts
new file mode 100644
index 000000000..8409a048c
--- /dev/null
+++ b/packages/primevue/src/radiobuttongroup/RadioButtonGroup.d.ts
@@ -0,0 +1,160 @@
+/**
+ *
+ * RadioButtonGroup is a component that groups multiple radio buttons, allowing users to select only one option from the group.
+ *
+ * [Live Demo](https://www.primevue.org/radiobutton/)
+ *
+ * @module radiobuttongroup
+ *
+ */
+import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
+import type { ComponentHooks } from '@primevue/core/basecomponent';
+import type { PassThroughOptions } from 'primevue/passthrough';
+import { VNode } from 'vue';
+
+export declare type RadioButtonGroupPassThroughOptionType = RadioButtonGroupPassThroughAttributes | ((options: RadioButtonGroupPassThroughMethodOptions) => RadioButtonGroupPassThroughAttributes | string) | string | null | undefined;
+
+/**
+ * Custom passthrough(pt) option method.
+ */
+export interface RadioButtonGroupPassThroughMethodOptions {
+ /**
+ * Defines instance.
+ */
+ instance: any;
+ /**
+ * Defines valid properties.
+ */
+ props: RadioButtonGroupProps;
+ /**
+ * Defines valid attributes.
+ */
+ attrs: any;
+ /**
+ * Defines parent options.
+ */
+ parent: any;
+ /**
+ * Defines passthrough(pt) options in global config.
+ */
+ global: object | undefined;
+}
+
+/**
+ * Custom passthrough(pt) options.
+ * @see {@link RadioButtonGroupProps.pt}
+ */
+export interface RadioButtonGroupPassThroughOptions {
+ /**
+ * Used to pass attributes to the root's DOM element.
+ */
+ root?: RadioButtonGroupPassThroughOptionType;
+ /**
+ * Used to manage all lifecycle hooks.
+ * @see {@link BaseComponent.ComponentHooks}
+ */
+ hooks?: ComponentHooks;
+}
+
+/**
+ * Custom passthrough attributes for each DOM elements
+ */
+export interface RadioButtonGroupPassThroughAttributes {
+ [key: string]: any;
+}
+
+/**
+ * Defines valid properties in RadioButtonGroup component.
+ */
+export interface RadioButtonGroupProps {
+ /**
+ * Value binding of the radiobuttons.
+ */
+ modelValue?: any;
+ /**
+ * Default values of the radiobuttons in uncontrolled mode.
+ */
+ defaultValue?: any;
+ /**
+ * Name of the input elements.
+ */
+ name?: string | undefined;
+ /**
+ * When present, it specifies that the component should have invalid state style.
+ * @defaultValue false
+ */
+ invalid?: boolean | undefined;
+ /**
+ * Used to set form control options.
+ */
+ formControl?: any;
+ /**
+ * It generates scoped CSS variables using design tokens for the component.
+ */
+ dt?: DesignToken;
+ /**
+ * Used to pass attributes to DOM elements inside the component.
+ * @type {RadioButtonGroupPassThroughOptions}
+ */
+ pt?: PassThrough;
+ /**
+ * Used to configure passthrough(pt) options of the component.
+ * @type {PassThroughOptions}
+ */
+ ptOptions?: PassThroughOptions;
+ /**
+ * When enabled, it removes component related styles in the core.
+ * @defaultValue false
+ */
+ unstyled?: boolean;
+}
+
+/**
+ * Defines valid slots in RadioButtonGroup component.
+ */
+export interface RadioButtonGroupSlots {
+ /**
+ * Default content slot.
+ */
+ default: () => VNode[];
+}
+
+/**
+ * Defines valid emits in RadioButtonGroup component.
+ */
+export interface RadioButtonGroupEmitsOptions {
+ /**
+ * Emitted when the value changes.
+ * @param {*} value - New value.
+ */
+ 'update:modelValue'(value: any): void;
+ /**
+ * Emitted when the value changes in uncontrolled mode.
+ * @param {*} value - New value.
+ */
+ 'value-change'(value: any): void;
+}
+
+export declare type RadioButtonGroupEmits = EmitFn;
+
+/**
+ * **PrimeVue - RadioButtonGroup**
+ *
+ * _RadioButtonGroup is a component that groups multiple radio buttons, allowing users to select only one option from the group._
+ *
+ * [Live Demo](https://www.primevue.org/radiobutton/)
+ * --- ---
+ * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
+ *
+ * @group Component
+ *
+ */
+declare const RadioButtonGroup: DefineComponent;
+
+declare module 'vue' {
+ export interface GlobalComponents {
+ RadioButtonGroup: DefineComponent;
+ }
+}
+
+export default RadioButtonGroup;
diff --git a/packages/primevue/src/radiobuttongroup/RadioButtonGroup.vue b/packages/primevue/src/radiobuttongroup/RadioButtonGroup.vue
new file mode 100644
index 000000000..66120108b
--- /dev/null
+++ b/packages/primevue/src/radiobuttongroup/RadioButtonGroup.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
diff --git a/packages/primevue/src/radiobuttongroup/package.json b/packages/primevue/src/radiobuttongroup/package.json
new file mode 100644
index 000000000..436c3ef18
--- /dev/null
+++ b/packages/primevue/src/radiobuttongroup/package.json
@@ -0,0 +1,11 @@
+{
+ "main": "./RadioButtonGroup.vue",
+ "module": "./RadioButtonGroup.vue",
+ "types": "./RadioButtonGroup.d.ts",
+ "browser": {
+ "./sfc": "./RadioButtonGroup.vue"
+ },
+ "sideEffects": [
+ "*.vue"
+ ]
+}
diff --git a/packages/primevue/src/radiobuttongroup/style/RadioButtonGroupStyle.d.ts b/packages/primevue/src/radiobuttongroup/style/RadioButtonGroupStyle.d.ts
new file mode 100644
index 000000000..d5bb89ad2
--- /dev/null
+++ b/packages/primevue/src/radiobuttongroup/style/RadioButtonGroupStyle.d.ts
@@ -0,0 +1,19 @@
+/**
+ *
+ * RadioButtonGroup is a component that groups multiple radio buttons, allowing users to select only one option from the group.
+ *
+ * [Live Demo](https://www.primevue.org/radiobuttongroup/)
+ *
+ * @module radiobuttongroupstyle
+ *
+ */
+import type { BaseStyle } from '@primevue/core/base/style';
+
+export enum RadioButtonGroupClasses {
+ /**
+ * Class name of the root element
+ */
+ root = 'p-radiobutton-group'
+}
+
+export interface RadioButtonGroupStyle extends BaseStyle {}
diff --git a/packages/primevue/src/radiobuttongroup/style/RadioButtonGroupStyle.js b/packages/primevue/src/radiobuttongroup/style/RadioButtonGroupStyle.js
new file mode 100644
index 000000000..ef01f4ca6
--- /dev/null
+++ b/packages/primevue/src/radiobuttongroup/style/RadioButtonGroupStyle.js
@@ -0,0 +1,17 @@
+import BaseStyle from '@primevue/core/base/style';
+
+const theme = ({ dt }) => `
+.p-radiobutton-group {
+ display: inline-flex;
+}
+`;
+
+const classes = {
+ root: 'p-radiobutton-group p-component'
+};
+
+export default BaseStyle.extend({
+ name: 'radiobuttongroup',
+ theme,
+ classes
+});
diff --git a/packages/primevue/src/radiobuttongroup/style/package.json b/packages/primevue/src/radiobuttongroup/style/package.json
new file mode 100644
index 000000000..9553818fe
--- /dev/null
+++ b/packages/primevue/src/radiobuttongroup/style/package.json
@@ -0,0 +1,6 @@
+{
+ "main": "./RadioButtonGroupStyle.js",
+ "module": "./RadioButtonGroupStyle.js",
+ "types": "./RadioButtonGroupStyle.d.ts",
+ "sideEffects": false
+}
diff --git a/packages/primevue/src/rating/BaseRating.vue b/packages/primevue/src/rating/BaseRating.vue
index b2ac1890d..09e822ea5 100644
--- a/packages/primevue/src/rating/BaseRating.vue
+++ b/packages/primevue/src/rating/BaseRating.vue
@@ -1,19 +1,11 @@
diff --git a/packages/primevue/src/rating/style/RatingStyle.js b/packages/primevue/src/rating/style/RatingStyle.js
index 21497887c..5a7ced729 100644
--- a/packages/primevue/src/rating/style/RatingStyle.js
+++ b/packages/primevue/src/rating/style/RatingStyle.js
@@ -43,6 +43,10 @@ const theme = ({ dt }) => `
.p-rating-option-active .p-rating-icon {
color: ${dt('rating.icon.active.color')};
}
+
+.p-rating-icon.p-invalid { /* @todo */
+ stroke: ${dt('rating.invalid.icon.color')};
+}
`;
const classes = {
@@ -53,15 +57,25 @@ const classes = {
'p-disabled': props.disabled
}
],
- option: ({ instance, props, value }) => [
+ option: ({ instance, value }) => [
'p-rating-option',
{
- 'p-rating-option-active': value <= props.modelValue,
+ 'p-rating-option-active': value <= instance.d_value,
'p-focus-visible': value === instance.focusedOptionIndex && instance.isFocusVisibleItem
}
],
- onIcon: 'p-rating-icon p-rating-on-icon',
- offIcon: 'p-rating-icon p-rating-off-icon'
+ onIcon: ({ instance }) => [
+ 'p-rating-icon p-rating-on-icon',
+ {
+ 'p-invalid': instance.$invalid
+ }
+ ],
+ offIcon: ({ instance }) => [
+ 'p-rating-icon p-rating-off-icon',
+ {
+ 'p-invalid': instance.$invalid
+ }
+ ]
};
export default BaseStyle.extend({
diff --git a/packages/primevue/src/select/BaseSelect.vue b/packages/primevue/src/select/BaseSelect.vue
index 9d7a4c4be..4e70e4f53 100644
--- a/packages/primevue/src/select/BaseSelect.vue
+++ b/packages/primevue/src/select/BaseSelect.vue
@@ -1,12 +1,11 @@