@dreamcommerce/aurora 0.4.12 → 0.4.15

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.
@@ -41,7 +41,7 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
41
41
  });
42
42
  const dropdownYOffset = 10;
43
43
  const dropdownArrowIconHeight = 14;
44
- const dropdownVerticalPadding = 14;
44
+ const dropdownVerticalPadding = 12;
45
45
  const windowHeightMinusYOffset = window.innerHeight - window.pageYOffset;
46
46
  const checkIfIsOutsideBottomViewport = (elem) => {
47
47
  const bounding = elem.getBoundingClientRect();
@@ -67,9 +67,10 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
67
67
  React.useEffect(() => {
68
68
  if (wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) {
69
69
  const { x, y, height } = wrapperRef.current.getBoundingClientRect();
70
+ const yOffset = 10;
70
71
  const { xModifier, yModifier } = utilities.getXYModifiersForNestedDropdowns(portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.current);
71
- const positionTop = height + y + dropdownYOffset - yModifier;
72
- const positionBottom = windowHeightMinusYOffset - y + dropdownYOffset;
72
+ const positionTop = height + y + yOffset - yModifier;
73
+ const positionBottom = windowHeightMinusYOffset - y + yOffset;
73
74
  const positionLeft = x - xModifier;
74
75
  const isInModal = utilities.isChildOfModal(wrapperRef);
75
76
  const zIndex = isInModal ? constants.DROPDOWN_ON_MODAL_Z_INDEX : constants.DROPDOWN_Z_INDEX;
@@ -79,7 +80,7 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
79
80
  ? setStyles({ left: `0px`, top: `0px`, bottom: 'auto', zIndex })
80
81
  : setStyles({ left: `${positionLeft}px`, top: topPositionValue, bottom: bottomPositionValue, zIndex });
81
82
  }
82
- }, [portalContainer, screenWidthName, wrapperRef, isOpen, windowHeightMinusYOffset, dropdownIsOutsideBottomViewport]);
83
+ }, [portalContainer, screenWidthName, wrapperRef, isOpen, dropdownIsOutsideBottomViewport, windowHeightMinusYOffset]);
83
84
  return reactDom.createPortal(React__default['default'].createElement(reactTransitionGroup.TransitionGroup, { component: null }, isOpen === true ? (React__default['default'].createElement(reactTransitionGroup.CSSTransition, { timeout: 200, classNames: {
84
85
  enter: main_module['default']['dropdown-enter'],
85
86
  enterActive: main_module['default']['dropdown-enter-active'],
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oEAAwE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oEAAwE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -33,7 +33,7 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
33
33
  });
34
34
  const dropdownYOffset = 10;
35
35
  const dropdownArrowIconHeight = 14;
36
- const dropdownVerticalPadding = 14;
36
+ const dropdownVerticalPadding = 12;
37
37
  const windowHeightMinusYOffset = window.innerHeight - window.pageYOffset;
38
38
  const checkIfIsOutsideBottomViewport = (elem) => {
39
39
  const bounding = elem.getBoundingClientRect();
@@ -59,9 +59,10 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
59
59
  useEffect(() => {
60
60
  if (wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) {
61
61
  const { x, y, height } = wrapperRef.current.getBoundingClientRect();
62
+ const yOffset = 10;
62
63
  const { xModifier, yModifier } = getXYModifiersForNestedDropdowns(portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.current);
63
- const positionTop = height + y + dropdownYOffset - yModifier;
64
- const positionBottom = windowHeightMinusYOffset - y + dropdownYOffset;
64
+ const positionTop = height + y + yOffset - yModifier;
65
+ const positionBottom = windowHeightMinusYOffset - y + yOffset;
65
66
  const positionLeft = x - xModifier;
66
67
  const isInModal = isChildOfModal(wrapperRef);
67
68
  const zIndex = isInModal ? DROPDOWN_ON_MODAL_Z_INDEX : DROPDOWN_Z_INDEX;
@@ -71,7 +72,7 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
71
72
  ? setStyles({ left: `0px`, top: `0px`, bottom: 'auto', zIndex })
72
73
  : setStyles({ left: `${positionLeft}px`, top: topPositionValue, bottom: bottomPositionValue, zIndex });
73
74
  }
74
- }, [portalContainer, screenWidthName, wrapperRef, isOpen, windowHeightMinusYOffset, dropdownIsOutsideBottomViewport]);
75
+ }, [portalContainer, screenWidthName, wrapperRef, isOpen, dropdownIsOutsideBottomViewport, windowHeightMinusYOffset]);
75
76
  return createPortal(React.createElement(TransitionGroup, { component: null }, isOpen === true ? (React.createElement(CSSTransition, { timeout: 200, classNames: {
76
77
  enter: cssClasses['dropdown-enter'],
77
78
  enterActive: cssClasses['dropdown-enter-active'],
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,oEAAwE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,oEAAwE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dreamcommerce/aurora",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "0.4.12",
5
+ "version": "0.4.15",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",