@webitel/ui-sdk 3.1.102 → 3.1.104

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "3.1.102",
3
+ "version": "3.1.104",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -29,7 +29,7 @@ import {
29
29
  ref, onMounted, onBeforeUnmount, watch,
30
30
  } from 'vue';
31
31
  import {
32
- useFloating, autoPlacement, shift, flip, offset,
32
+ useFloating, autoPlacement, shift, flip, offset, autoUpdate,
33
33
  } from '@floating-ui/vue';
34
34
 
35
35
  // https://github.com/Akryum/floating-vue/blob/main/packages/floating-vue/src/util/events.ts
@@ -138,9 +138,12 @@ const unsubscribeTriggers = () => {
138
138
  unsetEventListeners(floating.value, props.popperTriggers);
139
139
  };
140
140
 
141
+ // https://floating-ui.com/docs/misc#clipping
141
142
  const { floatingStyles } = useFloating(activator, floating, {
142
143
  placement: props.placement === 'auto' ? null : props.placement,
144
+ strategy: 'fixed', // https://floating-ui.com/docs/computeposition#strategy
143
145
  // https://floating-ui.com/docs/middleware
146
+ whileElementsMounted: autoUpdate, // https://floating-ui.com/docs/vue#anchoring
144
147
  middleware: [
145
148
  shift(), offset(8),
146
149
  props.placement === 'auto' ? autoPlacement() : flip(),