| 
2 | 2 |   <k-pop  | 
3 | 3 |     class="fd-popover"  | 
4 | 4 |     ref="kpop"  | 
5 |  | -    arrowClass="fd-popover__arrow"  | 
6 |  | -    :portalId="$fdDefaultPortalId"  | 
7 |  | -    :bodyClass="fdBodyClass"  | 
 | 5 | +    arrow-class="fd-popover__arrow"  | 
 | 6 | +    :defaultBodyZIndex="defaultBodyZIndex"  | 
 | 7 | +    :portal-id="$fdDefaultPortalId"  | 
 | 8 | +    :body-class="fdBodyClass"  | 
8 | 9 |     :placement="placement"  | 
9 | 10 |     :with-arrow="withArrow"  | 
10 |  | -    :adjustsBodyWidth="adjustsBodyWidth"  | 
 | 11 | +    :body-size-mode="bodySizeMode"  | 
11 | 12 |     v-bind="$attrs"  | 
12 | 13 |     v-on="$listeners"  | 
13 | 14 |   >  | 
 | 
32 | 33 | import { Uid } from "./../../mixins";  | 
33 | 34 | import KPop from "@ckienle/k-pop";  | 
34 | 35 | import FdOnClickOutside from "./../$Support/on-click-outside.vue";  | 
 | 36 | +import * as BodySizeMode from "./body-size-mode";  | 
35 | 37 | 
  | 
 | 38 | +// The popover is a wrapping component that renders a control and can display a popover that is attached to the control.  | 
36 | 39 | export default {  | 
37 | 40 |   name: "FdPopover",  | 
38 | 41 |   components: { FdOnClickOutside, KPop },  | 
@@ -77,11 +80,42 @@ export default {  | 
77 | 80 |     }  | 
78 | 81 |   },  | 
79 | 82 |   props: {  | 
80 |  | -    adjustsBodyWidth: { type: Boolean, default: false },  | 
81 |  | -    ignoredElements: { type: Function, default: () => [] },  | 
82 |  | -    withArrow: Boolean,  | 
 | 83 | +    // Default z-index that should be used for the popover body.  | 
 | 84 | +    defaultBodyZIndex: {  | 
 | 85 | +      type: Number,  | 
 | 86 | +      // `1000`  | 
 | 87 | +      default: 1000  | 
 | 88 | +    },  | 
 | 89 | +    // Use a custom body size mode. For details please refer to the [K-Pop](https://christiankienle.github.io/k-pop/examples/#body-size-modes) documentation.  | 
 | 90 | +    bodySizeMode: {  | 
 | 91 | +      // Possible Values: `auto` / `equal-trigger` / `at-least-trigger`  | 
 | 92 | +      type: String,  | 
 | 93 | +      validator: BodySizeMode.isValid,  | 
 | 94 | +      // `auto`  | 
 | 95 | +      default: BodySizeMode.defaultMode  | 
 | 96 | +    },  | 
 | 97 | +    adjustsBodyWidth: {  | 
 | 98 | +      type: Boolean,  | 
 | 99 | +      default: false  | 
 | 100 | +    },  | 
 | 101 | +    // Customize elements that can be interacted with, without the popover being dismissed.  | 
 | 102 | +    ignoredElements: {  | 
 | 103 | +      // A function that returns an array of `Element`s that should be ignored:  | 
 | 104 | +      // Signature: `() => Element[]`  | 
 | 105 | +      type: Function,  | 
 | 106 | +      // By default no elements are ignored: `() => []`  | 
 | 107 | +      default: () => []  | 
 | 108 | +    },  | 
 | 109 | +    // Whether or not the popover body has an arrow pointing to the control.  | 
 | 110 | +    withArrow: {  | 
 | 111 | +      type: Boolean,  | 
 | 112 | +      // `false` – no arrow is created by default  | 
 | 113 | +      default: false  | 
 | 114 | +    },  | 
 | 115 | +    // Set the placement of the popover body. This is passed – as is – to Popper.js. This means that all [Popper.js placements](https://popper.js.org/popper-documentation.html#Popper.placements) can be used.  | 
83 | 116 |     placement: {  | 
84 | 117 |       type: String,  | 
 | 118 | +      // `bottom`  | 
85 | 119 |       default: "bottom"  | 
86 | 120 |     }  | 
87 | 121 |   }  | 
 | 
0 commit comments