@paperless/core 2.22.0-alpha.27 → 2.22.0-alpha.29

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.
Files changed (213) hide show
  1. package/dist/build/index.esm.js +1 -1
  2. package/dist/{paperless/p-84c43a3d.entry.js → build/p-1c17ee9b.entry.js} +1 -1
  3. package/dist/build/p-25961586.entry.js +1 -0
  4. package/dist/{paperless/p-9f51b9dc.entry.js → build/p-260a97c9.entry.js} +1 -1
  5. package/dist/build/{p-44da0b12.entry.js → p-2a37b400.entry.js} +1 -1
  6. package/dist/build/{p-fff6fa7a.entry.js → p-31399606.entry.js} +1 -1
  7. package/dist/build/{p-fa519af0.js → p-5f422b65.js} +1 -1
  8. package/dist/build/p-60923e39.entry.js +1 -0
  9. package/dist/{paperless/p-d24f045f.entry.js → build/p-6aa93bf9.entry.js} +1 -1
  10. package/dist/build/{p-e51c1cd6.entry.js → p-70974f53.entry.js} +1 -1
  11. package/dist/build/p-75ba802e.entry.js +3 -0
  12. package/dist/build/{p-b781e8db.entry.js → p-8c1bf7ea.entry.js} +1 -1
  13. package/dist/{paperless/p-7d018d4d.entry.js → build/p-9e06356b.entry.js} +1 -1
  14. package/dist/build/p-B_lDCj8j.js +1 -0
  15. package/dist/build/p-CeBIrPPx.js +1 -0
  16. package/dist/build/{p-78b15121.entry.js → p-a6369294.entry.js} +1 -1
  17. package/dist/build/p-a9c0aab3.entry.js +1 -0
  18. package/dist/build/p-b85ee4b7.entry.js +1 -0
  19. package/dist/build/{p-76f83633.entry.js → p-ba7ccf80.entry.js} +1 -1
  20. package/dist/build/{p-524eb1cb.entry.js → p-c16870f5.entry.js} +1 -1
  21. package/dist/build/{p-17e598ac.entry.js → p-cf436a7d.entry.js} +1 -1
  22. package/dist/build/{p-0d6f3aa3.entry.js → p-cfbd02e6.entry.js} +1 -1
  23. package/dist/build/{p-cbeb58ba.entry.js → p-e907c9d3.entry.js} +1 -1
  24. package/dist/build/{p-d9b3ace4.entry.js → p-ee7858e4.entry.js} +1 -1
  25. package/dist/build/{p-23cc6b6b.entry.js → p-f1c6f25b.entry.js} +1 -1
  26. package/dist/{paperless/p-5abcc8d2.entry.js → build/p-f5be155f.entry.js} +1 -1
  27. package/dist/build/p-xs4N_Y-0.js +1 -0
  28. package/dist/build/paperless.esm.js +1 -1
  29. package/dist/cjs/{cn-BGmLaIp8.js → cn-Cd68UVBT.js} +30 -274
  30. package/dist/cjs/{floating-ui.dom-33QlkSyu.js → floating-ui.dom-DEq7yeQK.js} +91 -50
  31. package/dist/cjs/index.cjs.js +1 -1
  32. package/dist/cjs/locale-BIZDGOk_.js +75117 -0
  33. package/dist/cjs/p-accordion.cjs.entry.js +1 -1
  34. package/dist/cjs/p-attachment.cjs.entry.js +1 -1
  35. package/dist/cjs/p-badge_3.cjs.entry.js +1 -1
  36. package/dist/cjs/p-button_3.cjs.entry.js +6 -6
  37. package/dist/cjs/p-calendar.cjs.entry.js +75 -302
  38. package/dist/cjs/p-card-container.cjs.entry.js +1 -1
  39. package/dist/cjs/p-checkbox_3.cjs.entry.js +2 -2
  40. package/dist/cjs/p-content-slider.cjs.entry.js +1 -1
  41. package/dist/cjs/p-cropper.cjs.entry.js +88 -32
  42. package/dist/cjs/p-datepicker.cjs.entry.js +41 -2891
  43. package/dist/cjs/p-divider.cjs.entry.js +1 -1
  44. package/dist/cjs/p-dropdown-menu-item_2.cjs.entry.js +1 -1
  45. package/dist/cjs/p-empty-state_8.cjs.entry.js +12 -18
  46. package/dist/cjs/p-field_3.cjs.entry.js +1 -1
  47. package/dist/cjs/p-illustration.cjs.entry.js +1 -1
  48. package/dist/cjs/p-label.cjs.entry.js +1 -1
  49. package/dist/cjs/p-listing.cjs.entry.js +1 -1
  50. package/dist/cjs/p-navigation-item.cjs.entry.js +1 -1
  51. package/dist/cjs/p-pagination_3.cjs.entry.js +2 -2
  52. package/dist/cjs/p-select.cjs.entry.js +1 -1
  53. package/dist/cjs/p-table.cjs.entry.js +1 -1
  54. package/dist/cjs/p-tooltip.cjs.entry.js +1 -1
  55. package/dist/collection/components/atoms/loader/loader.component.js +1 -1
  56. package/dist/collection/components/molecules/button/button.component.js +8 -7
  57. package/dist/collection/components/molecules/calendar/calendar.component.js +1 -2
  58. package/dist/collection/components/molecules/datepicker/datepicker.component.js +2 -2
  59. package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js +1 -1
  60. package/dist/components/index.js +1 -1
  61. package/dist/components/{p-BtuWYjfq.js → p--JDhF4GL.js} +1 -1
  62. package/dist/components/{p-DW-MndqD.js → p-0y7dmBHx.js} +1 -1
  63. package/dist/components/{p-DxmwiGc9.js → p-B4tCVctO.js} +1 -1
  64. package/dist/components/{p-LfH4pSix.js → p-BA1QFuzs.js} +1 -1
  65. package/dist/components/{p-Bno5n2sV.js → p-BBmuctek.js} +1 -1
  66. package/dist/components/p-BE2DRulM.js +1 -0
  67. package/dist/components/{p-Dbt4VuQm.js → p-BPP8ZYwN.js} +1 -1
  68. package/dist/components/{p-BeiMfpUZ.js → p-BV-h5ALt.js} +1 -1
  69. package/dist/components/{p-C_dax2wr.js → p-BX8yg_1a.js} +1 -1
  70. package/dist/components/{p-CjI4hMLv.js → p-BaXKEl7X.js} +1 -1
  71. package/dist/components/{p-BfJQbKrn.js → p-CCvROjOe.js} +1 -1
  72. package/dist/components/p-CHydrUrt.js +1 -0
  73. package/dist/components/{p-Bi6PK1YV.js → p-CccN0jY7.js} +1 -1
  74. package/dist/components/p-CeBIrPPx.js +1 -0
  75. package/dist/components/{p-BMb-TnTI.js → p-Coxruux_.js} +1 -1
  76. package/dist/components/{p-B9n8mzrj.js → p-DAuzJ_qL.js} +1 -1
  77. package/dist/components/{p-BAIZ48ms.js → p-DZjr9R4d.js} +1 -1
  78. package/dist/components/{p-BBNOzE00.js → p-Djf2rBRX.js} +1 -1
  79. package/dist/components/p-Dl4hxOHI.js +1 -0
  80. package/dist/components/{p-BIQLsxW1.js → p-DuYGcgJi.js} +1 -1
  81. package/dist/components/{p-CFu8cH3m.js → p-DxNTB_Qq.js} +1 -1
  82. package/dist/components/{p-CgOKCXab.js → p-JhZXmipA.js} +1 -1
  83. package/dist/components/{p-ChfXIxTQ.js → p-KuL1SNit.js} +1 -1
  84. package/dist/components/p-accordion.js +1 -1
  85. package/dist/components/p-attachment.js +1 -1
  86. package/dist/components/p-button.js +1 -1
  87. package/dist/components/p-calendar.js +1 -1
  88. package/dist/components/p-card-container.js +1 -1
  89. package/dist/components/p-card-header.js +1 -1
  90. package/dist/components/p-content-slider.js +1 -1
  91. package/dist/components/p-cropper.js +2 -2
  92. package/dist/components/p-datepicker.js +1 -1
  93. package/dist/components/p-divider.js +1 -1
  94. package/dist/components/p-drawer-header.js +1 -1
  95. package/dist/components/p-drawer.js +1 -1
  96. package/dist/components/p-dropdown-menu-item.js +1 -1
  97. package/dist/components/p-dropdown.js +1 -1
  98. package/dist/components/p-empty-state.js +1 -1
  99. package/dist/components/p-field-container.js +1 -1
  100. package/dist/components/p-field.js +1 -1
  101. package/dist/components/p-floating-menu-container.js +1 -1
  102. package/dist/components/p-helper.js +1 -1
  103. package/dist/components/p-illustration.js +1 -1
  104. package/dist/components/p-label.js +1 -1
  105. package/dist/components/p-listing.js +1 -1
  106. package/dist/components/p-modal-footer.js +1 -1
  107. package/dist/components/p-modal-header.js +1 -1
  108. package/dist/components/p-modal.js +1 -1
  109. package/dist/components/p-navbar.js +1 -1
  110. package/dist/components/p-navigation-item.js +1 -1
  111. package/dist/components/p-pagination-pages.js +1 -1
  112. package/dist/components/p-pagination-size.js +1 -1
  113. package/dist/components/p-pagination.js +1 -1
  114. package/dist/components/{p-PFAC3Kay.js → p-prb4IQlb.js} +1 -1
  115. package/dist/components/p-profile.js +1 -1
  116. package/dist/components/p-segment-item.js +1 -1
  117. package/dist/components/p-select.js +1 -1
  118. package/dist/components/{p-CCOwunss.js → p-swqKzLDH.js} +1 -1
  119. package/dist/components/p-tab-container.js +1 -1
  120. package/dist/components/p-table-cell.js +1 -1
  121. package/dist/components/p-table-footer.js +1 -1
  122. package/dist/components/p-table-header.js +1 -1
  123. package/dist/components/p-table-row-actions-container.js +1 -1
  124. package/dist/components/p-table-row.js +1 -1
  125. package/dist/components/p-table.js +1 -1
  126. package/dist/components/p-tooltip.js +1 -1
  127. package/dist/components/p-xs4N_Y-0.js +1 -0
  128. package/dist/esm/{cn-BniKgfyU.js → cn-CsNqHcjL.js} +30 -274
  129. package/dist/esm/{floating-ui.dom-DGLCmOXW.js → floating-ui.dom-CeBIrPPx.js} +91 -50
  130. package/dist/esm/index.js +1 -1
  131. package/dist/esm/locale-B_lDCj8j.js +75114 -0
  132. package/dist/esm/p-accordion.entry.js +1 -1
  133. package/dist/esm/p-attachment.entry.js +1 -1
  134. package/dist/esm/p-badge_3.entry.js +1 -1
  135. package/dist/esm/p-button_3.entry.js +6 -6
  136. package/dist/esm/p-calendar.entry.js +63 -290
  137. package/dist/esm/p-card-container.entry.js +1 -1
  138. package/dist/esm/p-checkbox_3.entry.js +2 -2
  139. package/dist/esm/p-content-slider.entry.js +1 -1
  140. package/dist/esm/p-cropper.entry.js +88 -32
  141. package/dist/esm/p-datepicker.entry.js +37 -2887
  142. package/dist/esm/p-divider.entry.js +1 -1
  143. package/dist/esm/p-dropdown-menu-item_2.entry.js +1 -1
  144. package/dist/esm/p-empty-state_8.entry.js +12 -18
  145. package/dist/esm/p-field_3.entry.js +1 -1
  146. package/dist/esm/p-illustration.entry.js +1 -1
  147. package/dist/esm/p-label.entry.js +1 -1
  148. package/dist/esm/p-listing.entry.js +1 -1
  149. package/dist/esm/p-navigation-item.entry.js +1 -1
  150. package/dist/esm/p-pagination_3.entry.js +2 -2
  151. package/dist/esm/p-select.entry.js +1 -1
  152. package/dist/esm/p-table.entry.js +1 -1
  153. package/dist/esm/p-tooltip.entry.js +1 -1
  154. package/dist/index.html +1 -1
  155. package/dist/paperless/index.esm.js +1 -1
  156. package/dist/{build/p-84c43a3d.entry.js → paperless/p-1c17ee9b.entry.js} +1 -1
  157. package/dist/paperless/p-25961586.entry.js +1 -0
  158. package/dist/{build/p-9f51b9dc.entry.js → paperless/p-260a97c9.entry.js} +1 -1
  159. package/dist/paperless/{p-44da0b12.entry.js → p-2a37b400.entry.js} +1 -1
  160. package/dist/paperless/{p-fff6fa7a.entry.js → p-31399606.entry.js} +1 -1
  161. package/dist/paperless/p-60923e39.entry.js +1 -0
  162. package/dist/{build/p-d24f045f.entry.js → paperless/p-6aa93bf9.entry.js} +1 -1
  163. package/dist/paperless/{p-e51c1cd6.entry.js → p-70974f53.entry.js} +1 -1
  164. package/dist/paperless/p-75ba802e.entry.js +3 -0
  165. package/dist/paperless/{p-b781e8db.entry.js → p-8c1bf7ea.entry.js} +1 -1
  166. package/dist/{build/p-7d018d4d.entry.js → paperless/p-9e06356b.entry.js} +1 -1
  167. package/dist/paperless/p-B_lDCj8j.js +1 -0
  168. package/dist/paperless/p-CeBIrPPx.js +1 -0
  169. package/dist/paperless/{p-78b15121.entry.js → p-a6369294.entry.js} +1 -1
  170. package/dist/paperless/p-a9c0aab3.entry.js +1 -0
  171. package/dist/paperless/p-b85ee4b7.entry.js +1 -0
  172. package/dist/paperless/{p-76f83633.entry.js → p-ba7ccf80.entry.js} +1 -1
  173. package/dist/paperless/{p-524eb1cb.entry.js → p-c16870f5.entry.js} +1 -1
  174. package/dist/paperless/{p-17e598ac.entry.js → p-cf436a7d.entry.js} +1 -1
  175. package/dist/paperless/{p-0d6f3aa3.entry.js → p-cfbd02e6.entry.js} +1 -1
  176. package/dist/paperless/{p-cbeb58ba.entry.js → p-e907c9d3.entry.js} +1 -1
  177. package/dist/paperless/{p-d9b3ace4.entry.js → p-ee7858e4.entry.js} +1 -1
  178. package/dist/paperless/{p-23cc6b6b.entry.js → p-f1c6f25b.entry.js} +1 -1
  179. package/dist/{build/p-5abcc8d2.entry.js → paperless/p-f5be155f.entry.js} +1 -1
  180. package/dist/paperless/p-xs4N_Y-0.js +1 -0
  181. package/dist/paperless/paperless.esm.js +1 -1
  182. package/dist/sw.js +1 -1
  183. package/dist/sw.js.map +1 -1
  184. package/dist/types/components/molecules/button/button.component.d.ts +1 -1
  185. package/dist/types/components.d.ts +3 -1
  186. package/dist/workbox-d13932f0.js +1 -1
  187. package/dist/workbox-d13932f0.js.map +1 -1
  188. package/hydrate/index.js +75313 -6268
  189. package/hydrate/index.mjs +75313 -6268
  190. package/package.json +10 -11
  191. package/dist/build/p-1f7ab568.entry.js +0 -1
  192. package/dist/build/p-20077155.entry.js +0 -1
  193. package/dist/build/p-3452b2f5.entry.js +0 -3
  194. package/dist/build/p-CT54OXR2.js +0 -1
  195. package/dist/build/p-DGLCmOXW.js +0 -1
  196. package/dist/build/p-KEbntKvf.js +0 -1
  197. package/dist/build/p-b090e928.entry.js +0 -1
  198. package/dist/build/p-bafe9297.entry.js +0 -1
  199. package/dist/cjs/index-DG6V15XP.js +0 -2871
  200. package/dist/components/p-CPpl-J0y.js +0 -1
  201. package/dist/components/p-CT54OXR2.js +0 -1
  202. package/dist/components/p-D4bALv5t.js +0 -1
  203. package/dist/components/p-DGLCmOXW.js +0 -1
  204. package/dist/components/p-DeSgaQxj.js +0 -1
  205. package/dist/esm/index-KEbntKvf.js +0 -2839
  206. package/dist/paperless/p-1f7ab568.entry.js +0 -1
  207. package/dist/paperless/p-20077155.entry.js +0 -1
  208. package/dist/paperless/p-3452b2f5.entry.js +0 -3
  209. package/dist/paperless/p-CT54OXR2.js +0 -1
  210. package/dist/paperless/p-DGLCmOXW.js +0 -1
  211. package/dist/paperless/p-KEbntKvf.js +0 -1
  212. package/dist/paperless/p-b090e928.entry.js +0 -1
  213. package/dist/paperless/p-bafe9297.entry.js +0 -1
@@ -39,8 +39,9 @@ function getOppositeAxis(axis) {
39
39
  function getAxisLength(axis) {
40
40
  return axis === 'y' ? 'height' : 'width';
41
41
  }
42
+ const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
42
43
  function getSideAxis(placement) {
43
- return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
44
+ return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
44
45
  }
45
46
  function getAlignmentAxis(placement) {
46
47
  return getOppositeAxis(getSideAxis(placement));
@@ -65,19 +66,19 @@ function getExpandedPlacements(placement) {
65
66
  function getOppositeAlignmentPlacement(placement) {
66
67
  return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
67
68
  }
69
+ const lrPlacement = ['left', 'right'];
70
+ const rlPlacement = ['right', 'left'];
71
+ const tbPlacement = ['top', 'bottom'];
72
+ const btPlacement = ['bottom', 'top'];
68
73
  function getSideList(side, isStart, rtl) {
69
- const lr = ['left', 'right'];
70
- const rl = ['right', 'left'];
71
- const tb = ['top', 'bottom'];
72
- const bt = ['bottom', 'top'];
73
74
  switch (side) {
74
75
  case 'top':
75
76
  case 'bottom':
76
- if (rtl) return isStart ? rl : lr;
77
- return isStart ? lr : rl;
77
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
78
+ return isStart ? lrPlacement : rlPlacement;
78
79
  case 'left':
79
80
  case 'right':
80
- return isStart ? tb : bt;
81
+ return isStart ? tbPlacement : btPlacement;
81
82
  default:
82
83
  return [];
83
84
  }
@@ -415,16 +416,22 @@ const flip$1 = function (options) {
415
416
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
416
417
  const nextPlacement = placements[nextIndex];
417
418
  if (nextPlacement) {
418
- // Try next placement and re-run the lifecycle.
419
- return {
420
- data: {
421
- index: nextIndex,
422
- overflows: overflowsData
423
- },
424
- reset: {
425
- placement: nextPlacement
426
- }
427
- };
419
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
420
+ if (!ignoreCrossAxisOverflow ||
421
+ // We leave the current main axis only if every placement on that axis
422
+ // overflows the main axis.
423
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
424
+ // Try next placement and re-run the lifecycle.
425
+ return {
426
+ data: {
427
+ index: nextIndex,
428
+ overflows: overflowsData
429
+ },
430
+ reset: {
431
+ placement: nextPlacement
432
+ }
433
+ };
434
+ }
428
435
  }
429
436
 
430
437
  // First, find the candidates that fit on the mainAxis side of overflow,
@@ -470,6 +477,8 @@ const flip$1 = function (options) {
470
477
  };
471
478
  };
472
479
 
480
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
481
+
473
482
  // For type backwards-compatibility, the `OffsetOptions` type was also
474
483
  // Derivable.
475
484
 
@@ -483,7 +492,7 @@ async function convertValueToCoords(state, options) {
483
492
  const side = getSide(placement);
484
493
  const alignment = getAlignment(placement);
485
494
  const isVertical = getSideAxis(placement) === 'y';
486
- const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
495
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
487
496
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
488
497
  const rawValue = evaluate(options, state);
489
498
 
@@ -676,34 +685,40 @@ function isShadowRoot(value) {
676
685
  }
677
686
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
678
687
  }
688
+ const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
679
689
  function isOverflowElement(element) {
680
690
  const {
681
691
  overflow,
682
692
  overflowX,
683
693
  overflowY,
684
694
  display
685
- } = getComputedStyle(element);
686
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
695
+ } = getComputedStyle$1(element);
696
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
687
697
  }
698
+ const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
688
699
  function isTableElement(element) {
689
- return ['table', 'td', 'th'].includes(getNodeName(element));
700
+ return tableElements.has(getNodeName(element));
690
701
  }
702
+ const topLayerSelectors = [':popover-open', ':modal'];
691
703
  function isTopLayer(element) {
692
- return [':popover-open', ':modal'].some(selector => {
704
+ return topLayerSelectors.some(selector => {
693
705
  try {
694
706
  return element.matches(selector);
695
- } catch (e) {
707
+ } catch (_e) {
696
708
  return false;
697
709
  }
698
710
  });
699
711
  }
712
+ const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
713
+ const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
714
+ const containValues = ['paint', 'layout', 'strict', 'content'];
700
715
  function isContainingBlock(elementOrCss) {
701
716
  const webkit = isWebKit();
702
- const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
717
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
703
718
 
704
719
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
705
720
  // https://drafts.csswg.org/css-transforms-2/#individual-transforms
706
- return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
721
+ return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
707
722
  }
708
723
  function getContainingBlock(element) {
709
724
  let currentNode = getParentNode(element);
@@ -721,10 +736,11 @@ function isWebKit() {
721
736
  if (typeof CSS === 'undefined' || !CSS.supports) return false;
722
737
  return CSS.supports('-webkit-backdrop-filter', 'none');
723
738
  }
739
+ const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
724
740
  function isLastTraversableNode(node) {
725
- return ['html', 'body', '#document'].includes(getNodeName(node));
741
+ return lastTraversableNodeNames.has(getNodeName(node));
726
742
  }
727
- function getComputedStyle(element) {
743
+ function getComputedStyle$1(element) {
728
744
  return getWindow(element).getComputedStyle(element);
729
745
  }
730
746
  function getNodeScroll(element) {
@@ -786,7 +802,7 @@ function getFrameElement(win) {
786
802
  }
787
803
 
788
804
  function getCssDimensions(element) {
789
- const css = getComputedStyle(element);
805
+ const css = getComputedStyle$1(element);
790
806
  // In testing environments, the `width` and `height` properties are empty
791
807
  // strings for SVG elements, returning NaN. Fallback to `0` in this case.
792
808
  let width = parseFloat(css.width) || 0;
@@ -891,7 +907,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
891
907
  while (currentIFrame && offsetParent && offsetWin !== currentWin) {
892
908
  const iframeScale = getScale(currentIFrame);
893
909
  const iframeRect = currentIFrame.getBoundingClientRect();
894
- const css = getComputedStyle(currentIFrame);
910
+ const css = getComputedStyle$1(currentIFrame);
895
911
  const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
896
912
  const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
897
913
  x *= iframeScale.x;
@@ -922,14 +938,9 @@ function getWindowScrollBarX(element, rect) {
922
938
  return rect.left + leftScroll;
923
939
  }
924
940
 
925
- function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
926
- if (ignoreScrollbarX === void 0) {
927
- ignoreScrollbarX = false;
928
- }
941
+ function getHTMLOffset(documentElement, scroll) {
929
942
  const htmlRect = documentElement.getBoundingClientRect();
930
- const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
931
- // RTL <body> scrollbar.
932
- getWindowScrollBarX(documentElement, htmlRect));
943
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
933
944
  const y = htmlRect.top + scroll.scrollTop;
934
945
  return {
935
946
  x,
@@ -968,7 +979,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
968
979
  offsets.y = offsetRect.y + offsetParent.clientTop;
969
980
  }
970
981
  }
971
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
982
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
972
983
  return {
973
984
  width: rect.width * scale.x,
974
985
  height: rect.height * scale.y,
@@ -991,7 +1002,7 @@ function getDocumentRect(element) {
991
1002
  const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
992
1003
  let x = -scroll.scrollLeft + getWindowScrollBarX(element);
993
1004
  const y = -scroll.scrollTop;
994
- if (getComputedStyle(body).direction === 'rtl') {
1005
+ if (getComputedStyle$1(body).direction === 'rtl') {
995
1006
  x += max(html.clientWidth, body.clientWidth) - width;
996
1007
  }
997
1008
  return {
@@ -1002,6 +1013,10 @@ function getDocumentRect(element) {
1002
1013
  };
1003
1014
  }
1004
1015
 
1016
+ // Safety check: ensure the scrollbar space is reasonable in case this
1017
+ // calculation is affected by unusual styles.
1018
+ // Most scrollbars leave 15-18px of space.
1019
+ const SCROLLBAR_MAX = 25;
1005
1020
  function getViewportRect(element, strategy) {
1006
1021
  const win = getWindow(element);
1007
1022
  const html = getDocumentElement(element);
@@ -1019,6 +1034,24 @@ function getViewportRect(element, strategy) {
1019
1034
  y = visualViewport.offsetTop;
1020
1035
  }
1021
1036
  }
1037
+ const windowScrollbarX = getWindowScrollBarX(html);
1038
+ // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
1039
+ // visual width of the <html> but this is not considered in the size
1040
+ // of `html.clientWidth`.
1041
+ if (windowScrollbarX <= 0) {
1042
+ const doc = html.ownerDocument;
1043
+ const body = doc.body;
1044
+ const bodyStyles = getComputedStyle(body);
1045
+ const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
1046
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
1047
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
1048
+ width -= clippingStableScrollbarWidth;
1049
+ }
1050
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
1051
+ // If the <body> scrollbar is on the left, the width needs to be extended
1052
+ // by the scrollbar amount so there isn't extra space on the right.
1053
+ width += windowScrollbarX;
1054
+ }
1022
1055
  return {
1023
1056
  width,
1024
1057
  height,
@@ -1027,6 +1060,7 @@ function getViewportRect(element, strategy) {
1027
1060
  };
1028
1061
  }
1029
1062
 
1063
+ const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
1030
1064
  // Returns the inner client rect, subtracting scrollbars if present.
1031
1065
  function getInnerBoundingClientRect(element, strategy) {
1032
1066
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
@@ -1068,7 +1102,7 @@ function hasFixedPositionAncestor(element, stopNode) {
1068
1102
  if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1069
1103
  return false;
1070
1104
  }
1071
- return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1105
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1072
1106
  }
1073
1107
 
1074
1108
  // A "clipping ancestor" is an `overflow` element with the characteristic of
@@ -1081,17 +1115,17 @@ function getClippingElementAncestors(element, cache) {
1081
1115
  }
1082
1116
  let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
1083
1117
  let currentContainingBlockComputedStyle = null;
1084
- const elementIsFixed = getComputedStyle(element).position === 'fixed';
1118
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1085
1119
  let currentNode = elementIsFixed ? getParentNode(element) : element;
1086
1120
 
1087
1121
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1088
1122
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1089
- const computedStyle = getComputedStyle(currentNode);
1123
+ const computedStyle = getComputedStyle$1(currentNode);
1090
1124
  const currentNodeIsContaining = isContainingBlock(currentNode);
1091
1125
  if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
1092
1126
  currentContainingBlockComputedStyle = null;
1093
1127
  }
1094
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1128
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1095
1129
  if (shouldDropCurrentNode) {
1096
1130
  // Drop non-containing blocks.
1097
1131
  result = result.filter(ancestor => ancestor !== currentNode);
@@ -1154,6 +1188,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1154
1188
  scrollTop: 0
1155
1189
  };
1156
1190
  const offsets = createCoords(0);
1191
+
1192
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1193
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1194
+ function setLeftRTLScrollbarOffset() {
1195
+ offsets.x = getWindowScrollBarX(documentElement);
1196
+ }
1157
1197
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1158
1198
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1159
1199
  scroll = getNodeScroll(offsetParent);
@@ -1163,11 +1203,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1163
1203
  offsets.x = offsetRect.x + offsetParent.clientLeft;
1164
1204
  offsets.y = offsetRect.y + offsetParent.clientTop;
1165
1205
  } else if (documentElement) {
1166
- // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1167
- // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1168
- offsets.x = getWindowScrollBarX(documentElement);
1206
+ setLeftRTLScrollbarOffset();
1169
1207
  }
1170
1208
  }
1209
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
1210
+ setLeftRTLScrollbarOffset();
1211
+ }
1171
1212
  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1172
1213
  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1173
1214
  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
@@ -1180,11 +1221,11 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1180
1221
  }
1181
1222
 
1182
1223
  function isStaticPositioned(element) {
1183
- return getComputedStyle(element).position === 'static';
1224
+ return getComputedStyle$1(element).position === 'static';
1184
1225
  }
1185
1226
 
1186
1227
  function getTrueOffsetParent(element, polyfill) {
1187
- if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
1228
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
1188
1229
  return null;
1189
1230
  }
1190
1231
  if (polyfill) {
@@ -1245,7 +1286,7 @@ const getElementRects = async function (data) {
1245
1286
  };
1246
1287
 
1247
1288
  function isRTL(element) {
1248
- return getComputedStyle(element).direction === 'rtl';
1289
+ return getComputedStyle$1(element).direction === 'rtl';
1249
1290
  }
1250
1291
 
1251
1292
  const platform = {
@@ -1344,7 +1385,7 @@ function observeMove(element, onMove) {
1344
1385
  // Handle <iframe>s
1345
1386
  root: root.ownerDocument
1346
1387
  });
1347
- } catch (e) {
1388
+ } catch (_e) {
1348
1389
  io = new IntersectionObserver(handleObserve, options);
1349
1390
  }
1350
1391
  io.observe(element);
package/dist/esm/index.js CHANGED
@@ -7,7 +7,7 @@ export { f as formatTranslation, g as getLocaleComponentStrings } from './locali
7
7
  export { f as floatingMenuContainerClass, g as getTableCellColumnClasses, a as getTableCellSizes } from './table-helpers-DA1PfY6l.js';
8
8
  export { o as objectGetByPath } from './object-get-by-path-CLLU0oUD.js';
9
9
  export { i as isMobileBrowser } from './is-mobile-browser-DPc49L2n.js';
10
- export { c as cn } from './cn-BniKgfyU.js';
10
+ export { c as cn } from './cn-CsNqHcjL.js';
11
11
  export { P as PAGINATION_DEFAULT_PAGE_SIZE, a as PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS, S as SELECT_DEFAULT_MAX_DISPLAYED_ITEMS, T as TABLE_COLUMN_SIZES } from './constants-CEaB2BT0.js';
12
12
  import './index-BDccsg1s.js';
13
13
  import './index-CO0T2jO4.js';