@jobber/components 4.85.5-JOB-85892.3 → 4.85.5-test-eleme.3

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.
@@ -4,7 +4,7 @@ export interface PopoverProps {
4
4
  * Element the Popover will attach to and point at. A `useRef` must be attached to an html element
5
5
  * and passed as an attachTo prop in order for the Popover to function properly
6
6
  */
7
- readonly attachTo: Element | React.RefObject<Element | null>;
7
+ readonly attachTo: HTMLElement | React.RefObject<Element | null>;
8
8
  /**
9
9
  * Popover content.
10
10
  */
@@ -25,7 +25,7 @@ styleInject_es.styleInject(css_248z);
25
25
  function Popover({ onRequestClose, children, attachTo, open, preferredPlacement = "auto", }) {
26
26
  const [popperElement, setPopperElement] = React.useState();
27
27
  const [arrowElement, setArrowElement] = React.useState();
28
- const { styles: popperStyles, attributes } = reactPopper.usePopper(isHTMLElement(attachTo) ? attachTo : attachTo.current, popperElement, {
28
+ const { styles: popperStyles, attributes } = reactPopper.usePopper(attachTo instanceof HTMLElement ? attachTo : attachTo.current, popperElement, {
29
29
  modifiers: buildModifiers(arrowElement),
30
30
  placement: preferredPlacement,
31
31
  });
@@ -57,9 +57,5 @@ function buildModifiers(arrowElement) {
57
57
  ];
58
58
  return modifiers;
59
59
  }
60
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
61
- function isHTMLElement(el) {
62
- return (globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) && el instanceof Element;
63
- }
64
60
 
65
61
  exports.Popover = Popover;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "4.85.5-JOB-85892.3+e116bc12",
3
+ "version": "4.85.5-test-eleme.3+16f868d3",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,7 +19,7 @@
19
19
  "dist/*"
20
20
  ],
21
21
  "dependencies": {
22
- "@jobber/design": "^0.56.0",
22
+ "@jobber/design": "^0.55.2-test-eleme.7+16f868d3",
23
23
  "@jobber/formatters": "^0.2.2",
24
24
  "@jobber/hooks": "^2.9.1",
25
25
  "@popperjs/core": "^2.0.6",
@@ -80,5 +80,5 @@
80
80
  "> 1%",
81
81
  "IE 10"
82
82
  ],
83
- "gitHead": "e116bc122cce1e48339dc86392d3ff95e859931a"
83
+ "gitHead": "16f868d303a8f36d80fb9ae0ed83e3026eb66f35"
84
84
  }