diff --git a/components/lib/basecomponent/style/BaseComponentStyle.js b/components/lib/basecomponent/style/BaseComponentStyle.js index 632553a1bb..665db5fe32 100644 --- a/components/lib/basecomponent/style/BaseComponentStyle.js +++ b/components/lib/basecomponent/style/BaseComponentStyle.js @@ -71,26 +71,6 @@ const buttonCSS = ` } `; -const checkboxCSS = ` -.p-checkbox { - display: inline-flex; - cursor: pointer; - user-select: none; - vertical-align: bottom; - position: relative; -} - -.p-checkbox.p-checkbox-disabled { - cursor: default; -} - -.p-checkbox-box { - display: flex; - justify-content: center; - align-items: center; -} -`; - const inputTextCSS = ` .p-fluid .p-inputtext { width: 100%; @@ -193,39 +173,6 @@ const inputTextCSS = ` } `; -const radioButtonCSS = ` -.p-radiobutton { - position: relative; - display: inline-flex; - cursor: pointer; - user-select: none; - vertical-align: bottom; -} - -.p-radiobutton.p-radiobutton-disabled { - cursor: default; -} - -.p-radiobutton-box { - display: flex; - justify-content: center; - align-items: center; -} - -.p-radiobutton-icon { - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - transform: translateZ(0) scale(.1); - border-radius: 50%; - visibility: hidden; -} - -.p-radiobutton-box.p-highlight .p-radiobutton-icon { - transform: translateZ(0) scale(1.0, 1.0); - visibility: visible; -} -`; - const css = ` @layer primevue { .p-component, .p-component * { @@ -348,9 +295,7 @@ const css = ` transition: max-height 1s ease-in-out; } ${buttonCSS} -${checkboxCSS} ${inputTextCSS} -${radioButtonCSS} } `; diff --git a/components/lib/checkbox/BaseCheckbox.vue b/components/lib/checkbox/BaseCheckbox.vue index afd9241153..939f7a9af1 100644 --- a/components/lib/checkbox/BaseCheckbox.vue +++ b/components/lib/checkbox/BaseCheckbox.vue @@ -49,10 +49,6 @@ export default { type: Object, default: null }, - inputProps: { - type: null, - default: null - }, ariaLabelledby: { type: String, default: null diff --git a/components/lib/checkbox/Checkbox.d.ts b/components/lib/checkbox/Checkbox.d.ts index cf3c1bce12..31356a51bc 100755 --- a/components/lib/checkbox/Checkbox.d.ts +++ b/components/lib/checkbox/Checkbox.d.ts @@ -7,7 +7,7 @@ * @module checkbox * */ -import { InputHTMLAttributes, VNode } from 'vue'; +import { VNode } from 'vue'; import { ComponentHooks } from '../basecomponent'; import { PassThroughOptions } from '../passthrough'; import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers'; @@ -91,11 +91,7 @@ export interface CheckboxPassThroughAttributes { * Defines current inline state in Checkbox component. */ export interface CheckboxState { - /** - * Current focus state as a boolean. - * @defaultValue false - */ - focused: boolean; + [key: string]: any; } /** @@ -160,10 +156,6 @@ export interface CheckboxProps { * Inline style of the input field. */ inputStyle?: string | object | undefined; - /** - * Used to pass all properties of the HTMLInputElement to the focusable input element inside the component. - */ - inputProps?: InputHTMLAttributes | undefined; /** * Establishes relationships between the component and label(s) where its value should be one or more element IDs. */ @@ -198,11 +190,6 @@ export interface CheckboxContext { * @defaultValue false */ checked: boolean; - /** - * Current focus state of the item as a boolean. - * @defaultValue false - */ - focused: boolean; /** * Current disabled state of the item as a boolean. * @defaultValue false @@ -239,21 +226,21 @@ export interface CheckboxEmits { * @param {*} value - New page value. */ 'update:page'(value: any): void; - /** - * Callback to invoke on value click. - * @param {MouseEvent} event - Browser event. - */ - click(event: MouseEvent): void; /** * Callback to invoke on value change. * @param {Event} event - Browser event. */ change(event: Event): void; /** - * Callback to invoke on value change. - * @param {boolean} value - New value. + * Callback to invoke when the component receives focus. + * @param {Event} event - Browser event. + */ + focus(event: Event): void; + /** + * Callback to invoke when the component loses focus. + * @param {Event} event - Browser event. */ - input(value: boolean): void; + blur(event: Event): void; } /** diff --git a/components/lib/checkbox/Checkbox.vue b/components/lib/checkbox/Checkbox.vue index e58c059cce..6ca78f82ec 100755 --- a/components/lib/checkbox/Checkbox.vue +++ b/components/lib/checkbox/Checkbox.vue @@ -1,25 +1,25 @@