Refactor #4231 - For ColorPicker

pull/4239/head
mertsincan 2023-08-02 15:00:09 +03:00
parent 3f233cb3e0
commit 01d65820fe
2 changed files with 5 additions and 1 deletions

View File

@ -82,6 +82,10 @@ export interface ColorPickerPassThroughOptions {
* @see {@link BaseComponent.ComponentHooks}
*/
hooks?: ComponentHooks;
/**
* Used to control Vue Transition API.
*/
transition?: any;
}
/**

View File

@ -2,7 +2,7 @@
<div ref="container" :class="cx('root')" v-bind="ptm('root')">
<input v-if="!inline" ref="input" type="text" :class="cx('input')" readonly="readonly" :tabindex="tabindex" :disabled="disabled" @click="onInputClick" @keydown="onInputKeydown" v-bind="ptm('input')" />
<Portal :appendTo="appendTo" :disabled="inline">
<transition name="p-connected-overlay" @enter="onOverlayEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave">
<transition name="p-connected-overlay" @enter="onOverlayEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave" v-bind="ptm('transition')">
<div v-if="inline ? true : overlayVisible" :ref="pickerRef" :class="[cx('panel'), panelClass]" @click="onOverlayClick" v-bind="ptm('panel')">
<div :class="cx('panel')" v-bind="ptm('content')">
<div :ref="colorSelectorRef" :class="cx('selector')" @mousedown="onColorMousedown($event)" @touchstart="onColorDragStart($event)" @touchmove="onDrag($event)" @touchend="onDragEnd()" v-bind="ptm('selector')">