@pismo/marola 1.0.0-beta.42 → 1.0.0-beta.43
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.
|
@@ -15,9 +15,11 @@ export type PopoverProps = {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
/** Id to be applied as `data-testid` on the root element */
|
|
17
17
|
'data-testid'?: string;
|
|
18
|
+
/** Callback fired when a "click away" event is detected. */
|
|
19
|
+
onClickAway?: (event: MouseEvent | TouchEvent) => void;
|
|
18
20
|
};
|
|
19
21
|
export declare const Popover: {
|
|
20
|
-
({ anchorRef, open, children, placement, className, offset, "data-testid": dataTestId, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
({ anchorRef, open, children, placement, className, offset, "data-testid": dataTestId, onClickAway, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
Header: ({ children }: {
|
|
22
24
|
children: import('react').ReactNode;
|
|
23
25
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { s as
|
|
4
|
-
import { PopoverBody as
|
|
5
|
-
import { PopoverFooter as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as f } from "../../clsx-DB4S2d7J.js";
|
|
3
|
+
import { s as v } from "../../Popover.module-B4boCutS.js";
|
|
4
|
+
import { PopoverBody as l } from "./PopoverBody.js";
|
|
5
|
+
import { PopoverFooter as n } from "./PopoverFooter.js";
|
|
6
6
|
import { PopoverHeader as P } from "./PopoverHeader.js";
|
|
7
|
-
import { P as
|
|
8
|
-
|
|
7
|
+
import { P as y } from "../../Popup-Ck3XlWMq.js";
|
|
8
|
+
import { C as h } from "../../ClickAwayListener-DbEYZpyh.js";
|
|
9
|
+
const r = ({
|
|
9
10
|
anchorRef: t,
|
|
10
|
-
open:
|
|
11
|
+
open: m,
|
|
11
12
|
children: p,
|
|
12
|
-
placement:
|
|
13
|
+
placement: i,
|
|
13
14
|
className: s,
|
|
14
15
|
offset: a,
|
|
15
|
-
"data-testid":
|
|
16
|
-
|
|
17
|
-
o.
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
"data-testid": d,
|
|
17
|
+
onClickAway: e
|
|
18
|
+
}) => /* @__PURE__ */ o(h, { onClickAway: (c) => e ? e(c) : void 0, children: /* @__PURE__ */ o(y, { offset: a, placement: i, open: m, anchor: t, children: /* @__PURE__ */ o("div", { "data-testid": d, className: f(v.popover, s), children: p }) }) });
|
|
19
|
+
r.Header = P;
|
|
20
|
+
r.Footer = n;
|
|
21
|
+
r.Body = l;
|
|
20
22
|
export {
|
|
21
|
-
|
|
23
|
+
r as Popover
|
|
22
24
|
};
|
|
@@ -4,7 +4,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: {
|
|
7
|
-
({ anchorRef, open, children, placement, className, offset, "data-testid": dataTestId, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
({ anchorRef, open, children, placement, className, offset, "data-testid": dataTestId, onClickAway, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
Header: ({ children }: {
|
|
9
9
|
children: import('react').ReactNode;
|
|
10
10
|
}) => import("react/jsx-runtime").JSX.Element;
|