60f7bb7864cd9ec0fc9c2b15369a705dba8f05e9ed9bbf0e64bfc470969642f4a480e28256c695921b503f11542b62714c1fd7aa89d3f6bca74140fb77a66f 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { isNil } from 'lodash-unified';
  2. import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
  3. import { useSizeProp } from '../../../hooks/use-size/index.mjs';
  4. import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
  5. import { useEmptyValuesProps } from '../../../hooks/use-empty-values/index.mjs';
  6. import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
  7. import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
  8. import { isString } from '@vue/shared';
  9. const colorPickerProps = buildProps({
  10. persistent: {
  11. type: Boolean,
  12. default: true
  13. },
  14. modelValue: {
  15. type: definePropType(String),
  16. default: void 0
  17. },
  18. id: String,
  19. showAlpha: Boolean,
  20. colorFormat: String,
  21. disabled: Boolean,
  22. size: useSizeProp,
  23. popperClass: {
  24. type: String,
  25. default: ""
  26. },
  27. tabindex: {
  28. type: [String, Number],
  29. default: 0
  30. },
  31. teleported: useTooltipContentProps.teleported,
  32. appendTo: useTooltipContentProps.appendTo,
  33. predefine: {
  34. type: definePropType(Array)
  35. },
  36. validateEvent: {
  37. type: Boolean,
  38. default: true
  39. },
  40. ...useEmptyValuesProps,
  41. ...useAriaProps(["ariaLabel"])
  42. });
  43. const colorPickerEmits = {
  44. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil(val),
  45. [CHANGE_EVENT]: (val) => isString(val) || isNil(val),
  46. activeChange: (val) => isString(val) || isNil(val),
  47. focus: (evt) => evt instanceof FocusEvent,
  48. blur: (evt) => evt instanceof FocusEvent
  49. };
  50. export { colorPickerEmits, colorPickerProps };
  51. //# sourceMappingURL=color-picker.mjs.map