mautourco-components 0.2.106 → 0.2.107

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/dist/lib/utils.js CHANGED
@@ -21,7 +21,7 @@ export function cn() {
21
21
  export function scrollIntoViewOnOpen(elementRef, isOpen, scrollOnOpen, offset) {
22
22
  if (offset === void 0) { offset = 20; }
23
23
  if (isOpen && scrollOnOpen && elementRef.current) {
24
- var bodyBottom_1 = document.body.clientHeight;
24
+ var viewPortHeight_1 = window.innerHeight;
25
25
  // Use setTimeout to ensure the dropdown is rendered before scrolling
26
26
  setTimeout(function () {
27
27
  if (elementRef.current) {
@@ -29,7 +29,7 @@ export function scrollIntoViewOnOpen(elementRef, isOpen, scrollOnOpen, offset) {
29
29
  var elementBottom = elementRef.current.getBoundingClientRect().bottom;
30
30
  var realBottom = elementBottom + window.scrollY;
31
31
  // Scroll to show the element with some padding from the top
32
- if (realBottom > bodyBottom_1) {
32
+ if (realBottom > viewPortHeight_1) {
33
33
  window.scrollTo({
34
34
  top: elementTop - offset,
35
35
  behavior: 'smooth',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mautourco-components",
3
- "version": "0.2.106",
3
+ "version": "0.2.107",
4
4
  "private": false,
5
5
  "description": "Bibliothèque de composants Mautourco pour le redesign",
6
6
  "main": "dist/index.js",