@vchasno/ui-kit 0.3.12 → 0.3.13

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.
@@ -3143,12 +3143,21 @@ const createCoords = v => ({
3143
3143
  y: v
3144
3144
  });
3145
3145
  function rectToClientRect(rect) {
3146
+ const {
3147
+ x,
3148
+ y,
3149
+ width,
3150
+ height
3151
+ } = rect;
3146
3152
  return {
3147
- ...rect,
3148
- top: rect.y,
3149
- left: rect.x,
3150
- right: rect.x + rect.width,
3151
- bottom: rect.y + rect.height
3153
+ width,
3154
+ height,
3155
+ top: y,
3156
+ left: x,
3157
+ right: x + width,
3158
+ bottom: y + height,
3159
+ x,
3160
+ y
3152
3161
  };
3153
3162
  }
3154
3163
 
@@ -3241,10 +3250,14 @@ function getOverflowAncestors(node, list, traverseIframes) {
3241
3250
  const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
3242
3251
  const win = getWindow(scrollableAncestor);
3243
3252
  if (isBody) {
3244
- return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
3253
+ const frameElement = getFrameElement(win);
3254
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
3245
3255
  }
3246
3256
  return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
3247
3257
  }
3258
+ function getFrameElement(win) {
3259
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
3260
+ }
3248
3261
 
3249
3262
  function getCssDimensions(element) {
3250
3263
  const css = getComputedStyle$1(element);