{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/popper/src/content.ts"],"sourcesContent":["import { placements } from '@bigin/popperjs-es'\nimport { buildProps, definePropType } from '@bigin/utils'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Options, Placement } from '@bigin/popperjs-es'\nimport type { Measurable } from '@bigin/tokens'\nimport type Content from './content.vue'\n\ntype ClassObjectType = Record<string, boolean>\ntype ClassType = string | ClassObjectType | ClassType[]\n\nconst POSITIONING_STRATEGIES = ['fixed', 'absolute'] as const\n\nexport interface CreatePopperInstanceParams {\n  referenceEl: Measurable\n  popperContentEl: HTMLElement\n  arrowEl: HTMLElement | undefined\n}\n\nexport const popperCoreConfigProps = buildProps({\n  boundariesPadding: {\n    type: Number,\n    default: 0,\n  },\n  fallbackPlacements: {\n    type: definePropType<Placement[]>(Array),\n    default: undefined,\n  },\n  gpuAcceleration: {\n    type: Boolean,\n    default: true,\n  },\n  offset: {\n    type: Number,\n    default: 12,\n  },\n  placement: {\n    type: String,\n    values: placements,\n    default: 'bottom',\n  },\n  popperOptions: {\n    type: definePropType<Partial<Options>>(Object),\n    default: () => ({}),\n  },\n  strategy: {\n    type: String,\n    values: POSITIONING_STRATEGIES,\n    default: 'absolute',\n  },\n} as const)\nexport type PopperCoreConfigProps = ExtractPropTypes<\n  typeof popperCoreConfigProps\n>\n\nexport const popperContentProps = buildProps({\n  ...popperCoreConfigProps,\n  id: String,\n  style: {\n    type: definePropType<StyleValue>([String, Array, Object]),\n  },\n  className: {\n    type: definePropType<ClassType>([String, Array, Object]),\n  },\n  effect: {\n    type: String,\n    default: 'dark',\n  },\n  visible: Boolean,\n  enterable: {\n    type: Boolean,\n    default: true,\n  },\n  pure: Boolean,\n  focusOnShow: {\n    type: Boolean,\n    default: false,\n  },\n  trapping: {\n    type: Boolean,\n    default: false,\n  },\n  popperClass: {\n    type: definePropType<ClassType>([String, Array, Object]),\n  },\n  popperStyle: {\n    type: definePropType<StyleValue>([String, Array, Object]),\n  },\n  referenceEl: {\n    type: definePropType<HTMLElement>(Object),\n  },\n  triggerTargetEl: {\n    type: definePropType<HTMLElement>(Object),\n  },\n  stopPopperMouseEvent: {\n    type: Boolean,\n    default: true,\n  },\n  ariaLabel: {\n    type: String,\n    default: undefined,\n  },\n  virtualTriggering: Boolean,\n  zIndex: Number,\n} as const)\nexport type PopperContentProps = ExtractPropTypes<typeof popperContentProps>\n\nexport const popperContentEmits = {\n  mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n  mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n  focus: () => true,\n  blur: () => true,\n  close: () => true,\n}\nexport type PopperContentEmits = typeof popperContentEmits\n\nexport type PopperContentInstance = InstanceType<typeof Content>\n\n/** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport const usePopperCoreConfigProps = popperCoreConfigProps\n\n/** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */\nexport const usePopperContentProps = popperContentProps\n\n/** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */\nexport const usePopperContentEmits = popperContentEmits\n\n/** @deprecated use `PopperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperCoreConfigProps = PopperCoreConfigProps\n\n/** @deprecated use `PopperContentProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperContentProps = PopperContentProps\n\n/** @deprecated use `PopperContentInstance` instead, and it will be deprecated in the next major version */\nexport type BPopperArrowContent = PopperContentInstance\n"],"names":[],"mappings":";;;;AAWA,MAAM,sBAAA,GAAyB,CAAC,OAAA,EAAS,UAAU,CAAA,CAAA;AAQ5C,MAAM,wBAAwB,UAAW,CAAA;AAAA,EAC9C,iBAAmB,EAAA;AAAA,IACjB,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EACA,kBAAoB,EAAA;AAAA,IAClB,IAAA,EAAM,eAA4B,KAAK,CAAA;AAAA,IACvC,OAAS,EAAA,KAAA,CAAA;AA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