@commercelayer/app-elements 0.0.79 → 0.0.80

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.
@@ -1,8 +1,8 @@
1
- import { L as de, H as le } from "./main-bd408fbe.js";
1
+ import { L as de, H as le } from "./main-dd440dc6.js";
2
2
  import * as ce from "react";
3
3
  import { useRef as F, useState as a, useEffect as x, useCallback as D, forwardRef as ve } from "react";
4
- import { _ as Oe, a as s, h as Se, b as g, u as me, S as _e, c as he, s as ge } from "./overrides-684ed062.js";
5
- import { d as ye } from "./unsupportedIterableToArray-a4407b22.js";
4
+ import { _ as Oe, a as s, h as Se, b as g, u as me, S as _e, c as he, s as ge } from "./overrides-0673bab0.js";
5
+ import { d as ye } from "./unsupportedIterableToArray-0f93b40f.js";
6
6
  import "react-dom";
7
7
  import "@commercelayer/sdk";
8
8
  import "react-hook-form";
@@ -1,7 +1,7 @@
1
- import { P as Ma, r as E, a as Rn, t as H, b as Mt, c as Ee, d as _, g as Cr, _ as Qt, s as je, e as cr, f as xa, h as ur, i as Ln, j as Sa, k as Oa, l as Ea, m as qr, n as _a, o as Kr, p as Pa, q as Ta, u as Na, v as An, w as ae, x as nt, y as pr, z as Hn, A as Ya, B as lr, C as Zr, D as Ia, E as Ra, F as La, G as At, H as Ke, I as Aa, J as Ha, K as Fa } from "./main-bd408fbe.js";
1
+ import { P as Ma, r as E, a as Rn, t as H, b as Mt, c as Ee, d as _, g as Cr, _ as Qt, s as je, e as cr, f as xa, h as ur, i as Ln, j as Sa, k as Oa, l as Ea, m as qr, n as _a, o as Kr, p as Pa, q as Ta, u as Na, v as An, w as ae, x as nt, y as pr, z as Hn, A as Ya, B as lr, C as Zr, D as Ia, E as Ra, F as La, G as At, H as Ke, I as Aa, J as Ha, K as Fa } from "./main-dd440dc6.js";
2
2
  import * as B from "react";
3
3
  import h, { forwardRef as Fn, createElement as ja, Component as Ua, createRef as Ba } from "react";
4
- import { _ as Wa, a as I, b as R, c as N, d as D, e as b, f as Y } from "./unsupportedIterableToArray-a4407b22.js";
4
+ import { _ as Wa, a as I, b as R, c as N, d as D, e as b, f as Y } from "./unsupportedIterableToArray-0f93b40f.js";
5
5
  import * as Va from "react-dom";
6
6
  import Qa, { findDOMNode as $a } from "react-dom";
7
7
  import "@commercelayer/sdk";
@@ -1,12 +1,12 @@
1
- import { H as n } from "./main-bd408fbe.js";
2
- import { u as s, S as m, c as p, s as i } from "./overrides-684ed062.js";
1
+ import { H as n } from "./main-dd440dc6.js";
2
+ import { u as s, S as m, c as p, s as i } from "./overrides-0673bab0.js";
3
3
  import * as c from "react";
4
4
  import { forwardRef as S } from "react";
5
5
  import "react-dom";
6
6
  import "@commercelayer/sdk";
7
7
  import "react-hook-form";
8
8
  import "query-string";
9
- import "./unsupportedIterableToArray-a4407b22.js";
9
+ import "./unsupportedIterableToArray-0f93b40f.js";
10
10
  var f = /* @__PURE__ */ S(function(e, t) {
11
11
  var o = s(e);
12
12
  return /* @__PURE__ */ c.createElement(m, p({
@@ -0,0 +1,36 @@
1
+ /// <reference types="react" />
2
+ interface OverlayProps {
3
+ /**
4
+ * The content of the overlay.
5
+ **/
6
+ children: React.ReactNode;
7
+ /**
8
+ * Footer element to be rendered at the bottom of the overlay.
9
+ **/
10
+ footer?: React.ReactNode;
11
+ }
12
+ interface OverlayOptions {
13
+ /**
14
+ * Optional query param to be used to control the overlay visibility.
15
+ * When set, the overlay will be opened when the query param is set to `true` (e.g. `?myOverlay=true`)
16
+ * and the `open` method will perform an history.push to add the query param as navigating to a new page.
17
+ * Otherwise, the overlay will be opened as a classic in-page modal.
18
+ **/
19
+ queryParam: string;
20
+ }
21
+ interface OverlayHook {
22
+ /**
23
+ * The overlay component.
24
+ **/
25
+ Overlay: React.FC<OverlayProps>;
26
+ /**
27
+ * Function to be used to open the overlay.
28
+ **/
29
+ open: () => void;
30
+ /**
31
+ * Function to be used to close the overlay.
32
+ **/
33
+ close: () => void;
34
+ }
35
+ export declare function useOverlay(options?: OverlayOptions): OverlayHook;
36
+ export {};