{"version":3,"file":"color-preset-picker.mjs","sources":["../../../../../../packages/components/color-preset-picker/src/color-preset-picker.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\r\n\r\nimport { SizeType } from 'ant-design-vue/es/config-provider'\r\nimport type { ExtractPropTypes } from 'vue'\r\n\r\nimport type ColorPresetPicker from './color-preset-picker.vue'\r\n\r\n// 定义组件props\r\nexport const colorPresetPickerProps = buildProps({\r\n  colors: {\r\n    type: definePropType<string[] | null>([Array, null]),\r\n    default: () => null,\r\n  },\r\n  //\r\n  value: {\r\n    type: definePropType<string[] | string>([Array, String]),\r\n    default: undefined,\r\n  },\r\n  // 多选\r\n  multiple: {\r\n    type: Boolean,\r\n    default: false,\r\n  },\r\n  // 多选最多选中数量\r\n  maxCount: {\r\n    type: Number,\r\n    default: 0,\r\n  },\r\n  // 形状\r\n  shape: {\r\n    type: definePropType<'square' | 'round'>(String),\r\n    default: 'square',\r\n  },\r\n  // 间距\r\n  gap: {\r\n    type: Number,\r\n    default: 10,\r\n  },\r\n  // 尺寸\r\n  size: {\r\n    type: String as () => SizeType,\r\n  },\r\n  // 只读\r\n  readonly: {\r\n    type: Boolean,\r\n    default: false,\r\n  },\r\n} as const)\r\n\r\nexport const colorPresetPickerEmits = {\r\n  change: (value: string | string[] | undefined) =>\r\n    value === undefined ||\r\n    typeof value === 'string' ||\r\n    typeof value === 'object',\r\n\r\n  'update:value': (value: string | string[] | undefined) =>\r\n    value === undefined ||\r\n    typeof value === 'string' ||\r\n    typeof value === 'object',\r\n} as const\r\n\r\n// props\r\nexport type ColorPresetPickerProps = ExtractPropTypes<\r\n  typeof colorPresetPickerProps\r\n>\r\n\r\n// emits\r\nexport type ColorPresetPickerEmits = typeof colorPresetPickerEmits\r\n\r\n// instance\r\nexport type ColorPresetPickerInstance = InstanceType<typeof ColorPresetPicker>\r\n"],"names":[],"mappings":";;;;AAQO,MAAM,yBAAyB,UAAA,CAAW;AAAA,EAC/C,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,cAAA,CAAgC,CAAC,KAAA,EAAO,IAAI,CAAC,CAAA;AAAA,IACnD,SAAS,MAAM;AAAA,GACjB;AAAA;AAAA,EAEA,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,cAAA,CAAkC,CAAC,KAAA,EAAO,MAAM,CAAC,CAAA;AAAA,IACvD,OAAA,EAAS,KAAA;AAAA,GACX;AAAA;AAAA,EAEA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,eAAmC,MAAM,CAAA;AAAA,IAC/C,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,GAAA,EAAK;AAAA,IACH,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM;AAAA,GACR;AAAA;AAAA,EAEA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb,CAAU;AAEH,MAAM,sBAAA,GAAyB;AAAA,EACpC,MAAA,EAAQ,CAAC,KAAA,KACP,KAAA,KAAU,UACV,OAAO,KAAA,KAAU,QAAA,IACjB,OAAO,KAAA,KAAU,QAAA;AAAA,EAEnB,cAAA,EAAgB,CAAC,KAAA,KACf,KAAA,KAAU,UACV,OAAO,KAAA,KAAU,QAAA,IACjB,OAAO,KAAA,KAAU;AACrB;;;;"}