@itfin/components 1.0.44 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
|
|
3
3
|
<div class="alert d-flex gap-2" :class="`alert-${type}`" role="alert">
|
|
4
|
-
<itf-icon :name="iconName" size="
|
|
4
|
+
<itf-icon :name="iconName" size="24" />
|
|
5
5
|
|
|
6
|
-
<
|
|
6
|
+
<slot>
|
|
7
|
+
<span v-html="message"></span>
|
|
8
|
+
</slot>
|
|
7
9
|
</div>
|
|
8
10
|
|
|
9
11
|
</template>
|
|
@@ -196,8 +196,8 @@
|
|
|
196
196
|
&__dropdown-menu {
|
|
197
197
|
background-color: $body-bg;
|
|
198
198
|
border: 2px solid $input-focus-border;
|
|
199
|
-
padding-left: 0.125rem;
|
|
200
|
-
padding-right: 0.125rem;
|
|
199
|
+
padding-left: 0.125rem !important;
|
|
200
|
+
padding-right: 0.125rem !important;
|
|
201
201
|
left: -2px;
|
|
202
202
|
right: -2px;
|
|
203
203
|
width: auto;
|
|
@@ -729,7 +729,7 @@ export default {
|
|
|
729
729
|
_value: [], // Internal value managed by Vue Select if no `value` prop is passed
|
|
730
730
|
}
|
|
731
731
|
},
|
|
732
|
-
inject: { itemLabel: { default: null } },
|
|
732
|
+
inject: { itemLabel: { default: null }, appendContext: { default: null } },
|
|
733
733
|
computed: {
|
|
734
734
|
/**
|
|
735
735
|
* Determine if the component needs to
|
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
inserted(el, bindings, { context }) {
|
|
3
3
|
if (context.appendToBody) {
|
|
4
|
-
|
|
4
|
+
let {
|
|
5
5
|
height,
|
|
6
6
|
top,
|
|
7
7
|
left,
|
|
8
8
|
width,
|
|
9
|
-
} = context.$refs.toggle.getBoundingClientRect()
|
|
9
|
+
} = context.$refs.toggle.getBoundingClientRect();
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const { calculatePosition } = context;
|
|
12
|
+
const { appendContext } = context;
|
|
13
|
+
const rootEl = appendContext && appendContext();
|
|
14
|
+
if (rootEl) {
|
|
15
|
+
let {
|
|
16
|
+
top: parentTop,
|
|
17
|
+
left: parentLeft
|
|
18
|
+
} = rootEl.getBoundingClientRect();
|
|
19
|
+
left -= parentLeft + rootEl.scrollLeft;
|
|
20
|
+
top -= parentTop + rootEl.scrollTop;
|
|
21
|
+
} else {
|
|
22
|
+
let scrollX = window.scrollX || window.pageXOffset
|
|
23
|
+
let scrollY = window.scrollY || window.pageYOffset
|
|
13
24
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
left += scrollX;
|
|
26
|
+
top += scrollY;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (calculatePosition) {
|
|
30
|
+
el.unbindPosition = calculatePosition(el, context, {
|
|
31
|
+
width: width + 'px',
|
|
32
|
+
left: left + 'px',
|
|
33
|
+
top: (top + height) + 'px',
|
|
34
|
+
});
|
|
35
|
+
}
|
|
19
36
|
|
|
20
|
-
document.body.appendChild(el)
|
|
37
|
+
(rootEl || document.body).appendChild(el)
|
|
21
38
|
}
|
|
22
39
|
},
|
|
23
40
|
|