UNPKG

hongluan-ui

Version:
60 lines (57 loc) 1.7 kB
import { isNil } from 'lodash-unified'; import '../../../utils/index.mjs'; import '../../../constants/index.mjs'; import '../../tooltip/index.mjs'; import '../../../hooks/index.mjs'; import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs'; import { isValidComponentSize } from '../../../utils/vue/validator.mjs'; import { useTooltipContentProps } from '../../tooltip/src/content2.mjs'; import { useAriaProps } from '../../../hooks/use-aria/index.mjs'; import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs'; import { isString } from '@vue/shared'; const colorPickerProps = buildProps({ modelValue: String, id: String, showAlpha: Boolean, colorFormat: String, disabled: Boolean, size: { type: String, validator: isValidComponentSize }, popperClass: { type: String, default: "" }, popperOffset: { type: Number, default: 4 }, label: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, predefine: { type: definePropType(Array) }, teleported: useTooltipContentProps.teleported, validateEvent: { type: Boolean, default: true }, ...useAriaProps(["ariaLabel"]) }); const colorPickerEmits = { [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil(val), [CHANGE_EVENT]: (val) => isString(val) || isNil(val), activeChange: (val) => isString(val) || isNil(val), focus: (evt) => evt instanceof FocusEvent, blur: (evt) => evt instanceof FocusEvent }; const colorPickerContextKey = Symbol("colorPickerContextKey"); export { colorPickerContextKey, colorPickerEmits, colorPickerProps }; //# sourceMappingURL=color-picker2.mjs.map