diff --git a/components/lib/listbox/BaseListbox.vue b/components/lib/listbox/BaseListbox.vue index 5b51eabfa..938966729 100644 --- a/components/lib/listbox/BaseListbox.vue +++ b/components/lib/listbox/BaseListbox.vue @@ -82,6 +82,10 @@ export default { type: String, default: undefined }, + stripedRows: { + type: Boolean, + default: false + }, tabindex: { type: Number, default: 0 diff --git a/components/lib/listbox/Listbox.d.ts b/components/lib/listbox/Listbox.d.ts index 4f1ce215c..b95c37d76 100755 --- a/components/lib/listbox/Listbox.d.ts +++ b/components/lib/listbox/Listbox.d.ts @@ -363,6 +363,11 @@ export interface ListboxProps { * @defaultValue No results found */ emptyMessage?: string | undefined; + /** + * Whether to displays rows with alternating colors. + * @defaultValue false + */ + stripedRows?: boolean | undefined; /** * Index of the element in tabbing order. */ diff --git a/components/lib/orderlist/BaseOrderList.vue b/components/lib/orderlist/BaseOrderList.vue index 9d6bcae67..4ace4a6df 100644 --- a/components/lib/orderlist/BaseOrderList.vue +++ b/components/lib/orderlist/BaseOrderList.vue @@ -54,6 +54,10 @@ export default { type: Number, default: 0 }, + disabled: { + type: Boolean, + default: false + }, ariaLabelledby: { type: String, default: null diff --git a/components/lib/orderlist/OrderList.d.ts b/components/lib/orderlist/OrderList.d.ts index f83a4402e..704a4bb87 100755 --- a/components/lib/orderlist/OrderList.d.ts +++ b/components/lib/orderlist/OrderList.d.ts @@ -223,6 +223,7 @@ export interface OrderListProps { breakpoint?: string | undefined; /** * Whether to displays rows with alternating colors. + * @defaultValue false */ stripedRows?: boolean | undefined; /** diff --git a/components/lib/orderlist/OrderList.vue b/components/lib/orderlist/OrderList.vue index 018993ad8..49c54432b 100755 --- a/components/lib/orderlist/OrderList.vue +++ b/components/lib/orderlist/OrderList.vue @@ -44,6 +44,7 @@ :dataKey="dataKey" :autoOptionFocus="autoOptionFocus" :focusOnHover="focusOnHover" + :disabled="disabled" :ariaLabel="ariaLabel" :ariaLabelledby="ariaLabelledby" :pt="ptm('list')" @@ -293,9 +294,7 @@ export default { } }, moveDisabled() { - if (!this.d_selection || !this.d_selection.length) { - return true; - } + return this.disabled ? true : !this.d_selection || !this.d_selection.length ? true : false; } }, computed: { diff --git a/components/lib/picklist/BasePickList.vue b/components/lib/picklist/BasePickList.vue index 9a5f22317..610b0f80d 100644 --- a/components/lib/picklist/BasePickList.vue +++ b/components/lib/picklist/BasePickList.vue @@ -61,6 +61,10 @@ export default { tabindex: { type: Number, default: 0 + }, + disabled: { + type: Boolean, + default: false } }, style: PickListStyle, diff --git a/components/lib/picklist/PickList.d.ts b/components/lib/picklist/PickList.d.ts index befed7ed0..ffd69dc46 100755 --- a/components/lib/picklist/PickList.d.ts +++ b/components/lib/picklist/PickList.d.ts @@ -7,7 +7,7 @@ * @module picklist * */ -import { ButtonHTMLAttributes, HTMLAttributes, TransitionProps, VNode } from 'vue'; +import { TransitionProps, VNode } from 'vue'; import { ComponentHooks } from '../basecomponent'; import { ButtonPassThroughOptions } from '../button'; import { PassThroughOptions } from '../passthrough'; @@ -279,16 +279,6 @@ export interface PickListState { * Current id state as a string. */ d_selection: any[]; - /** - * Current focused state as a boolean. - * @defaultValue [false, false] - */ - focused: boolean; - /** - * Current focused item index as a number. - * @defaultvalue -1 - */ - focusedOptionIndex: number; /** * Current view change state as a boolean. * @defaultValue false @@ -378,46 +368,6 @@ export interface PickListProps { * Index of the list element in tabbing order. */ tabindex?: number | string | undefined; - /** - * Used to pass all properties of the HTMLAttributes to the target list element. - */ - targetListProps?: HTMLAttributes | undefined; - /** - * Used to pass all properties of the HTMLAttributes to the source list element. - */ - sourceListProps?: HTMLAttributes | undefined; - /** - * Used to pass all properties of the HTMLButtonElement to the move up button inside the component. - */ - moveUpButtonProps?: ButtonHTMLAttributes | undefined; - /** - * Used to pass all properties of the HTMLButtonElement to the move top button inside the component. - */ - moveTopButtonProps?: ButtonHTMLAttributes | undefined; - /** - * Used to pass all properties of the HTMLButtonElement to the move down button inside the component. - */ - moveDownButtonProps?: ButtonHTMLAttributes | undefined; - /** - * Used to pass all properties of the HTMLButtonElement to the move bottom button inside the component. - */ - moveBottomButtonProps?: ButtonHTMLAttributes | undefined; - /** - * Used to pass all properties of the HTMLButtonElement to the move to target button inside the component. - */ - moveToTargetProps?: ButtonHTMLAttributes | undefined; - /** - * Used to pass all properties of the HTMLButtonElement to the move all to target button inside the component. - */ - moveAllToTargetProps?: ButtonHTMLAttributes | undefined; - /** - * Used to pass all properties of the HTMLButtonElement to the move to source button inside the component. - */ - moveToSourceProps?: ButtonHTMLAttributes | undefined; - /** - * Used to pass all properties of the HTMLButtonElement to the move all to source button inside the component. - */ - moveAllToSourceProps?: ButtonHTMLAttributes | undefined; /** * Used to pass attributes to DOM elements inside the component. * @type {PickListPassThroughOptions} diff --git a/components/lib/picklist/PickList.vue b/components/lib/picklist/PickList.vue index 5f2376e43..453ddddf9 100755 --- a/components/lib/picklist/PickList.vue +++ b/components/lib/picklist/PickList.vue @@ -45,6 +45,7 @@ :dataKey="dataKey" :autoOptionFocus="autoOptionFocus" :focusOnHover="focusOnHover" + :disabled="disabled" :pt="ptm('list')" :unstyled="unstyled" @focus="onListFocus($event, 'sourceList')" @@ -108,6 +109,7 @@ :dataKey="dataKey" :autoOptionFocus="autoOptionFocus" :focusOnHover="focusOnHover" + :disabled="disabled" :pt="ptm('list')" :unstyled="unstyled" @focus="onListFocus($event, 'targetList')" @@ -594,12 +596,10 @@ export default { } }, moveDisabled(index) { - if (this.d_selection && (!this.d_selection[index] || !this.d_selection[index].length)) { - return true; - } + return this.disabled ? true : this.d_selection && (!this.d_selection[index] || !this.d_selection[index].length) ? true : false; }, moveAllDisabled(list) { - return ObjectUtils.isEmpty(this[list]); + return this.disabled ? true : ObjectUtils.isEmpty(this[list]); } }, computed: {