1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
| 'use strict';
|
| Object.defineProperty(exports, '__esModule', { value: true });
|
| var core = require('@vueuse/core');
| require('../../../utils/index.js');
|
| const buildPopperOptions = (props, modifiers = []) => {
| const { placement, strategy, popperOptions } = props;
| const options = {
| placement,
| strategy,
| ...popperOptions,
| modifiers: [...genModifiers(props), ...modifiers]
| };
| deriveExtraModifiers(options, popperOptions == null ? void 0 : popperOptions.modifiers);
| return options;
| };
| const unwrapMeasurableEl = ($el) => {
| if (!core.isClient)
| return;
| return core.unrefElement($el);
| };
| function genModifiers(options) {
| const { offset, gpuAcceleration, fallbackPlacements } = options;
| return [
| {
| name: "offset",
| options: {
| offset: [0, offset != null ? offset : 12]
| }
| },
| {
| name: "preventOverflow",
| options: {
| padding: {
| top: 2,
| bottom: 2,
| left: 5,
| right: 5
| }
| }
| },
| {
| name: "flip",
| options: {
| padding: 5,
| fallbackPlacements
| }
| },
| {
| name: "computeStyles",
| options: {
| gpuAcceleration
| }
| }
| ];
| }
| function deriveExtraModifiers(options, modifiers) {
| if (modifiers) {
| options.modifiers = [...options.modifiers, ...modifiers != null ? modifiers : []];
| }
| }
|
| exports.buildPopperOptions = buildPopperOptions;
| exports.unwrapMeasurableEl = unwrapMeasurableEl;
| //# sourceMappingURL=utils.js.map
|
|