UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 1.61 kB
{"version":3,"file":"use-popper-options.mjs","sources":["../../../../../packages/hooks/use-popper/use-popper-options.ts"],"sourcesContent":["import type { PropType } from 'vue'\nimport type { Options } from '@popperjs/core'\n\nexport const DEFAULT_FALLBACK_PLACEMENTS = []\n\nexport const defaultModifiers = [\n {\n name: 'offset',\n options: {\n offset: [0, 12],\n },\n },\n {\n name: 'preventOverflow',\n options: {\n padding: {\n top: 2,\n bottom: 2,\n left: 5,\n right: 5,\n },\n },\n },\n {\n name: 'flip',\n options: {\n padding: 5,\n fallbackPlacements: [],\n },\n },\n {\n name: 'computeStyles',\n options: {\n gpuAcceleration: true,\n adaptive: true,\n },\n },\n]\n\nexport const defaultPopperOptions = {\n type: Object as PropType<Partial<Options>>,\n default: () => {\n return {\n fallbackPlacements: DEFAULT_FALLBACK_PLACEMENTS,\n strategy: 'fixed',\n modifiers: defaultModifiers,\n } as Partial<Options>\n },\n}\n"],"names":[],"mappings":"MAGa,8BAA8B;MAE9B,mBAAmB;AAAA,EAC9B;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,MACP,QAAQ,CAAC,GAAG;AAAA;AAAA;AAAA,EAGhB;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,MACP,SAAS;AAAA,QACP,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,OAAO;AAAA;AAAA;AAAA;AAAA,EAIb;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,MACP,SAAS;AAAA,MACT,oBAAoB;AAAA;AAAA;AAAA,EAGxB;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,MACP,iBAAiB;AAAA,MACjB,UAAU;AAAA;AAAA;AAAA;MAKH,uBAAuB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS,MAAM;AACb,WAAO;AAAA,MACL,oBAAoB;AAAA,MACpB,UAAU;AAAA,MACV,WAAW;AAAA;AAAA;AAAA;;;;"}