@viasat/beam-react 2.22.0 → 2.24.0
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/assets/Search.css +1 -1
- package/assets/panel.css +1 -1
- package/chunks/{FloatingUI.context.Dl4Y1y1z.js → FloatingUI.context.D3kSM-y1.js} +2 -2
- package/chunks/Search.Results.DqEXVJeE.js +1 -0
- package/chunks/Search.Results.XLqY_iES.js +73 -0
- package/chunks/{panel.module.a_gaicKX.js → panel.module.DCpj0tSX.js} +1 -1
- package/index.cjs.js +1 -1
- package/index.es.js +22 -20
- package/lib/Alert/Alert.figma.d.ts +1 -0
- package/lib/Dialog/Dialog.Header.es.js +1 -1
- package/lib/Dialog/Dialog.Trigger.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.content.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.context.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.root.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.trigger.close.es.js +7 -7
- package/lib/FloatingUI/FloatingUI.trigger.es.js +4 -4
- package/lib/Menu/ActionListContextWrapper.es.js +1 -1
- package/lib/Popover/Popover.content.es.js +1 -1
- package/lib/Popover/Popover.trigger.es.js +1 -1
- package/lib/Search/Search.Results.Item.cjs.js +1 -0
- package/lib/Search/Search.Results.Item.d.ts +11 -0
- package/lib/Search/Search.Results.Item.es.js +9 -0
- package/lib/Search/Search.Results.ViewAll.cjs.js +1 -0
- package/lib/{wip/Search → Search}/Search.Results.ViewAll.d.ts +11 -4
- package/lib/Search/Search.Results.ViewAll.es.js +11 -0
- package/lib/Search/Search.Results.cjs.js +1 -0
- package/lib/Search/Search.Results.es.js +12 -0
- package/lib/Search/Search.cjs.js +1 -0
- package/lib/{wip/Search → Search}/Search.d.ts +18 -9
- package/lib/Search/Search.es.js +179 -0
- package/lib/Search/SearchDropdown.cjs.js +1 -0
- package/lib/Search/SearchDropdown.es.js +58 -0
- package/lib/Search/index.d.ts +4 -0
- package/lib/Search/useSearchDropdown.cjs.js +1 -0
- package/lib/{wip/Search → Search}/useSearchDropdown.es.js +2 -2
- package/lib/Switch/Switch.figma.d.ts +1 -0
- package/lib/Tooltip/Tooltip.es.js +1 -1
- package/lib/Tooltip/Tooltip.figma.d.ts +1 -0
- package/lib/index.cjs.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.es.js +21 -19
- package/lib/wip/Panel/Panel.Body.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Body.d.ts +6 -1
- package/lib/wip/Panel/Panel.Body.es.js +11 -9
- package/lib/wip/Panel/Panel.Divider.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Divider.d.ts +6 -0
- package/lib/wip/Panel/Panel.Divider.es.js +18 -0
- package/lib/wip/Panel/Panel.Footer.Actions.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Footer.Actions.es.js +1 -1
- package/lib/wip/Panel/Panel.Footer.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Footer.d.ts +12 -1
- package/lib/wip/Panel/Panel.Footer.es.js +28 -15
- package/lib/wip/Panel/Panel.Header.ContentAfter.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.ContentAfter.es.js +1 -1
- package/lib/wip/Panel/Panel.Header.ContentBefore.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.ContentBefore.es.js +1 -1
- package/lib/wip/Panel/Panel.Header.Description.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.Description.es.js +1 -1
- package/lib/wip/Panel/Panel.Header.Heading.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.Heading.es.js +2 -2
- package/lib/wip/Panel/Panel.Header.Row.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.Row.es.js +1 -1
- package/lib/wip/Panel/Panel.Header.Subheader.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.Subheader.es.js +1 -1
- package/lib/wip/Panel/Panel.Header.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.d.ts +12 -1
- package/lib/wip/Panel/Panel.Header.es.js +37 -24
- package/lib/wip/Panel/Panel.Inline.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Inline.d.ts +3 -6
- package/lib/wip/Panel/Panel.Inline.es.js +58 -66
- package/lib/wip/Panel/Panel.Overlay.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Overlay.d.ts +3 -2
- package/lib/wip/Panel/Panel.Overlay.es.js +23 -22
- package/lib/wip/Panel/Panel.cjs.js +1 -1
- package/lib/wip/Panel/Panel.d.ts +4 -4
- package/lib/wip/Panel/Panel.es.js +69 -60
- package/lib/wip/Panel/Panel.helpers.cjs.js +1 -1
- package/lib/wip/Panel/Panel.helpers.d.ts +2 -1
- package/lib/wip/Panel/Panel.helpers.es.js +8 -7
- package/lib/wip/Panel/Panel.types.cjs.js +1 -1
- package/lib/wip/Panel/Panel.types.d.ts +11 -1
- package/lib/wip/Panel/Panel.types.es.js +5 -1
- package/lib/wip/index.cjs.js +1 -1
- package/lib/wip/index.d.ts +0 -1
- package/lib/wip/index.es.js +2 -4
- package/package.json +6 -6
- package/chunks/Search.Results.CFA_KEdP.js +0 -1
- package/chunks/Search.Results.DVf6WKnI.js +0 -68
- package/lib/wip/Search/Search.Results.Item.cjs.js +0 -1
- package/lib/wip/Search/Search.Results.Item.d.ts +0 -11
- package/lib/wip/Search/Search.Results.Item.es.js +0 -10
- package/lib/wip/Search/Search.Results.ViewAll.cjs.js +0 -1
- package/lib/wip/Search/Search.Results.ViewAll.es.js +0 -11
- package/lib/wip/Search/Search.Results.cjs.js +0 -1
- package/lib/wip/Search/Search.Results.d.ts +0 -15
- package/lib/wip/Search/Search.Results.es.js +0 -14
- package/lib/wip/Search/Search.cjs.js +0 -1
- package/lib/wip/Search/Search.es.js +0 -161
- package/lib/wip/Search/SearchDropdown.cjs.js +0 -1
- package/lib/wip/Search/SearchDropdown.es.js +0 -57
- package/lib/wip/Search/index.d.ts +0 -1
- package/lib/wip/Search/useSearchDropdown.cjs.js +0 -1
- package/chunks/{panel.module.DGxSyRdA.js → panel.module.DJLJpnm_.js} +2 -2
- /package/lib/{wip/Search → Search}/SearchDropdown.d.ts +0 -0
- /package/lib/{wip/Search → Search}/index.cjs.js +0 -0
- /package/lib/{wip/Search → Search}/index.es.js +0 -0
- /package/lib/{wip/Search → Search}/useSearchDropdown.d.ts +0 -0
|
@@ -1,24 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as n, Fragment as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import f from "clsx";
|
|
3
3
|
import { g as c } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import { Divider as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import { Divider as x } from "../../Divider/Divider.es.js";
|
|
6
|
+
import { Box as C } from "../../Box/Box.es.js";
|
|
7
|
+
import { DEFAULT_PANEL_DIVIDER_COLOR as E } from "./Panel.helpers.es.js";
|
|
8
|
+
import { Actions as N } from "./Panel.Footer.Actions.es.js";
|
|
9
|
+
import { s as d } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
10
|
+
const { subElementClassPrefix: A } = c("panel"), D = `${A}footer`, r = ({
|
|
11
|
+
children: s,
|
|
10
12
|
className: t,
|
|
11
13
|
divider: e = !0,
|
|
12
|
-
|
|
14
|
+
dividerColor: m = E,
|
|
15
|
+
backgroundColor: a,
|
|
16
|
+
...i
|
|
13
17
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
e && /* @__PURE__ */ o(
|
|
17
|
-
/* @__PURE__ */ o(
|
|
18
|
+
const l = f(d[D], t);
|
|
19
|
+
return /* @__PURE__ */ n(p, { children: [
|
|
20
|
+
e && /* @__PURE__ */ o(x, { borderColor: m }),
|
|
21
|
+
/* @__PURE__ */ o(
|
|
22
|
+
C,
|
|
23
|
+
{
|
|
24
|
+
as: "footer",
|
|
25
|
+
className: l,
|
|
26
|
+
backgroundColor: a,
|
|
27
|
+
...i,
|
|
28
|
+
children: s
|
|
29
|
+
}
|
|
30
|
+
)
|
|
18
31
|
] });
|
|
19
32
|
};
|
|
20
|
-
|
|
21
|
-
|
|
33
|
+
r.displayName = "Panel.Footer";
|
|
34
|
+
r.Actions = N;
|
|
22
35
|
export {
|
|
23
|
-
|
|
36
|
+
r as Footer
|
|
24
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("clsx"),o=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const c=require("../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("clsx"),o=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const c=require("../../../chunks/panel.module.DCpj0tSX.js"),{subElementClassPrefix:i}=o.getBEMClassNames("panel"),u=`${i}header`,e=({children:s,className:t,...n})=>{const r=l(c.styles[`${u}__content-after`],t);return a.jsx("div",{className:r,...n,children:s})};e.displayName="Panel.Header.ContentAfter";exports.ContentAfter=e;
|
|
@@ -2,7 +2,7 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import o from "clsx";
|
|
3
3
|
import { g as m } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import { s as n } from "../../../chunks/panel.module.
|
|
5
|
+
import { s as n } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
6
6
|
const { subElementClassPrefix: l } = m("panel"), c = `${l}header`, f = ({
|
|
7
7
|
children: s,
|
|
8
8
|
className: e,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("clsx"),l=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const c=require("../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("clsx"),l=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const c=require("../../../chunks/panel.module.DCpj0tSX.js"),{subElementClassPrefix:i}=l.getBEMClassNames("panel"),u=`${i}header`,e=({children:s,className:t,...n})=>{const r=a(c.styles[`${u}__content-before`],t);return o.jsx("div",{className:r,...n,children:s})};e.displayName="Panel.Header.ContentBefore";exports.ContentBefore=e;
|
|
@@ -2,7 +2,7 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import a from "clsx";
|
|
3
3
|
import { g as m } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import { s as n } from "../../../chunks/panel.module.
|
|
5
|
+
import { s as n } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
6
6
|
const { subElementClassPrefix: l } = m("panel"), c = `${l}header`, f = ({
|
|
7
7
|
children: e,
|
|
8
8
|
className: s,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("clsx"),c=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const l=require("../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("clsx"),c=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const l=require("../../../chunks/panel.module.DCpj0tSX.js"),{subElementClassPrefix:o}=c.getBEMClassNames("panel"),u=`${o}header`,e=({children:s,className:r,...t})=>{const a=n(l.styles[`${u}__description`],r);return i.jsx("div",{className:a,...t,children:s})};e.displayName="Panel.Header.Description";exports.Description=e;
|
|
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import t from "clsx";
|
|
3
3
|
import { g as i } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import { s as m } from "../../../chunks/panel.module.
|
|
5
|
+
import { s as m } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
6
6
|
const { subElementClassPrefix: l } = i("panel"), n = `${l}header`, p = ({
|
|
7
7
|
children: s,
|
|
8
8
|
className: e,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),o=require("react"),g=require("clsx"),m=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const q=require("../../../chunks/FloatingUI.context.B15Tz_4h.js"),b=require("./Panel.context.cjs.js"),x=require("../../../utils/hooks/useId.cjs.js"),I=require("../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),o=require("react"),g=require("clsx"),m=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const q=require("../../../chunks/FloatingUI.context.B15Tz_4h.js"),b=require("./Panel.context.cjs.js"),x=require("../../../utils/hooks/useId.cjs.js"),I=require("../../../chunks/panel.module.DCpj0tSX.js"),{subElementClassPrefix:y}=m.getBEMClassNames("panel"),P=`${y}header`,a=({children:r,className:i,id:c,...l})=>{const u=x.useId(),e=c??u,d=g(I.styles[`${P}__heading`],i),t=o.useContext(b.PanelContext),n=o.useContext(q.BmFloatingUIContext),s=(t==null?void 0:t.kind)==="overlay"?n==null?void 0:n.setLabelId:void 0;return o.useLayoutEffect(()=>{if(!(!s||!e))return s(e),()=>s(void 0)},[e,s]),_.jsx("div",{id:e,className:d,...l,children:r})};a.displayName="Panel.Header.Heading";exports.Heading=a;
|
|
@@ -3,10 +3,10 @@ import { useContext as r, useLayoutEffect as f } from "react";
|
|
|
3
3
|
import p from "clsx";
|
|
4
4
|
import { g as u } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
5
5
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
6
|
-
import { B as g } from "../../../chunks/FloatingUI.context.
|
|
6
|
+
import { B as g } from "../../../chunks/FloatingUI.context.D3kSM-y1.js";
|
|
7
7
|
import { PanelContext as x } from "./Panel.context.es.js";
|
|
8
8
|
import { useId as I } from "../../../utils/hooks/useId.es.js";
|
|
9
|
-
import { s as b } from "../../../chunks/panel.module.
|
|
9
|
+
import { s as b } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
10
10
|
const { subElementClassPrefix: v } = u("panel"), y = `${v}header`, C = ({
|
|
11
11
|
children: a,
|
|
12
12
|
className: m,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("clsx"),b=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const m=require("../../CloseButton/CloseButton.cjs.js"),_=require("../../Tooltip/Tooltip.cjs.js"),p=require("./Panel.context.cjs.js"),t=require("../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("clsx"),b=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const m=require("../../CloseButton/CloseButton.cjs.js"),_=require("../../Tooltip/Tooltip.cjs.js"),p=require("./Panel.context.cjs.js"),t=require("../../../chunks/panel.module.DCpj0tSX.js"),{subElementClassPrefix:x}=b.getBEMClassNames("panel"),l=`${x}header`,o=({children:n,className:r,...a})=>{const{dismissible:i,closeButtonAriaLabel:s,requestClose:c}=p.usePanelContext(),u=d(t.styles[`${l}__row`],r);return e.jsxs("div",{className:u,...a,children:[n,i&&e.jsx("div",{className:t.styles[`${l}__close-button`],children:e.jsx(_.Tooltip,{text:s,placement:"bottom",portalled:!0,role:{enabled:!1},children:e.jsx(m.CloseButton,{"aria-label":s,onClick:()=>c("closeButton"),size:"lg"})})})]})};o.displayName="Panel.Header.Row";exports.Row=o;
|
|
@@ -5,7 +5,7 @@ import "../../../chunks/constants.CKKGf1-i.js";
|
|
|
5
5
|
import { CloseButton as f } from "../../CloseButton/CloseButton.es.js";
|
|
6
6
|
import { Tooltip as u } from "../../Tooltip/Tooltip.es.js";
|
|
7
7
|
import { usePanelContext as b } from "./Panel.context.es.js";
|
|
8
|
-
import { s as o } from "../../../chunks/panel.module.
|
|
8
|
+
import { s as o } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
9
9
|
const { subElementClassPrefix: x } = d("panel"), t = `${x}header`, C = ({
|
|
10
10
|
children: l,
|
|
11
11
|
className: r,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("clsx"),u=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const c=require("../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("clsx"),u=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const c=require("../../../chunks/panel.module.DCpj0tSX.js"),{subElementClassPrefix:o}=u.getBEMClassNames("panel"),i=`${o}header`,e=({children:s,className:a,...r})=>{const t=n(c.styles[`${i}__subheader`],a);return l.jsx("div",{className:t,...r,children:s})};e.displayName="Panel.Header.Subheader";exports.Subheader=e;
|
|
@@ -2,7 +2,7 @@ import { jsx as m } from "react/jsx-runtime";
|
|
|
2
2
|
import o from "clsx";
|
|
3
3
|
import { g as t } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import { s as l } from "../../../chunks/panel.module.
|
|
5
|
+
import { s as l } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
6
6
|
const { subElementClassPrefix: i } = t("panel"), n = `${i}header`, p = ({
|
|
7
7
|
children: s,
|
|
8
8
|
className: e,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),_=require("clsx"),c=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const d=require("../../Divider/Divider.cjs.js"),u=require("../../Box/Box.cjs.js"),P=require("./Panel.helpers.cjs.js"),b=require("./Panel.Header.Row.cjs.js"),p=require("./Panel.Header.ContentBefore.cjs.js"),q=require("./Panel.Header.Heading.cjs.js"),H=require("./Panel.Header.ContentAfter.cjs.js"),C=require("./Panel.Header.Description.cjs.js"),m=require("./Panel.Header.Subheader.cjs.js"),w=require("../../../chunks/panel.module.DCpj0tSX.js"),{subElementClassPrefix:x}=c.getBEMClassNames("panel"),D=`${x}header`,e=({children:n,className:i,divider:a=!0,dividerColor:s=P.DEFAULT_PANEL_DIVIDER_COLOR,backgroundColor:t,...l})=>{const o=_(w.styles[D],i);return r.jsxs(r.Fragment,{children:[r.jsx(u.Box,{as:"header",className:o,backgroundColor:t,...l,children:n}),a&&r.jsx(d.Divider,{borderColor:s})]})};e.displayName="Panel.Header";e.Row=b.Row;e.ContentBefore=p.ContentBefore;e.Heading=q.Heading;e.Description=C.Description;e.ContentAfter=H.ContentAfter;e.Subheader=m.Subheader;exports.Header=e;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { BoxBackgroundColor } from '@viasat/beam-shared/components/box';
|
|
3
|
+
import { PanelDividerColor } from './Panel.types';
|
|
2
4
|
export interface PanelHeaderProps extends ComponentPropsWithoutRef<'header'> {
|
|
3
5
|
/**
|
|
4
6
|
* Specify the content for the panel header
|
|
@@ -9,9 +11,18 @@ export interface PanelHeaderProps extends ComponentPropsWithoutRef<'header'> {
|
|
|
9
11
|
* @default true
|
|
10
12
|
*/
|
|
11
13
|
divider?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Specify the border color of the header divider
|
|
16
|
+
* @default '01'
|
|
17
|
+
*/
|
|
18
|
+
dividerColor?: PanelDividerColor;
|
|
19
|
+
/**
|
|
20
|
+
* Specify the background color of the header surface
|
|
21
|
+
*/
|
|
22
|
+
backgroundColor?: BoxBackgroundColor;
|
|
12
23
|
}
|
|
13
24
|
export declare const Header: {
|
|
14
|
-
({ children, className: _className, divider, ...props }: PanelHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
({ children, className: _className, divider, dividerColor, backgroundColor, ...props }: PanelHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
26
|
displayName: string;
|
|
16
27
|
Row: {
|
|
17
28
|
({ children, className: _className, ...props }: import('./Panel.Header.Row').PanelHeaderRowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,34 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { g as
|
|
1
|
+
import { jsxs as p, Fragment as f, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import l from "clsx";
|
|
3
|
+
import { g as d } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import { Divider as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
import { Divider as c } from "../../Divider/Divider.es.js";
|
|
6
|
+
import { Box as C } from "../../Box/Box.es.js";
|
|
7
|
+
import { DEFAULT_PANEL_DIVIDER_COLOR as x } from "./Panel.helpers.es.js";
|
|
8
|
+
import { Row as D } from "./Panel.Header.Row.es.js";
|
|
9
|
+
import { ContentBefore as b } from "./Panel.Header.ContentBefore.es.js";
|
|
10
|
+
import { Heading as g } from "./Panel.Header.Heading.es.js";
|
|
11
|
+
import { ContentAfter as h } from "./Panel.Header.ContentAfter.es.js";
|
|
12
|
+
import { Description as u } from "./Panel.Header.Description.es.js";
|
|
13
|
+
import { Subheader as E } from "./Panel.Header.Subheader.es.js";
|
|
14
|
+
import { s as N } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
15
|
+
const { subElementClassPrefix: A } = d("panel"), B = `${A}header`, r = ({
|
|
16
|
+
children: e,
|
|
15
17
|
className: t,
|
|
16
18
|
divider: m = !0,
|
|
17
|
-
|
|
19
|
+
dividerColor: s = x,
|
|
20
|
+
backgroundColor: a,
|
|
21
|
+
...i
|
|
18
22
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
23
|
+
const n = l(N[B], t);
|
|
24
|
+
return /* @__PURE__ */ p(f, { children: [
|
|
25
|
+
/* @__PURE__ */ o(
|
|
26
|
+
C,
|
|
27
|
+
{
|
|
28
|
+
as: "header",
|
|
29
|
+
className: n,
|
|
30
|
+
backgroundColor: a,
|
|
31
|
+
...i,
|
|
32
|
+
children: e
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
m && /* @__PURE__ */ o(c, { borderColor: s })
|
|
23
36
|
] });
|
|
24
37
|
};
|
|
25
38
|
r.displayName = "Panel.Header";
|
|
26
|
-
r.Row =
|
|
27
|
-
r.ContentBefore =
|
|
28
|
-
r.Heading =
|
|
29
|
-
r.Description =
|
|
30
|
-
r.ContentAfter =
|
|
31
|
-
r.Subheader =
|
|
39
|
+
r.Row = D;
|
|
40
|
+
r.ContentBefore = b;
|
|
41
|
+
r.Heading = g;
|
|
42
|
+
r.Description = u;
|
|
43
|
+
r.ContentAfter = h;
|
|
44
|
+
r.Subheader = E;
|
|
32
45
|
export {
|
|
33
46
|
r as Header
|
|
34
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("@floating-ui/react"),q=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const b=require("./Panel.context.cjs.js"),f=require("../../FloatingUI/FloatingUI.root.cjs.js"),F=require("../../../chunks/FloatingUI.context.B15Tz_4h.js"),d=require("./Panel.Divider.cjs.js"),P=require("../../../chunks/panel.module.DCpj0tSX.js"),{baseClassNamePrefix:U}=q.getBEMClassNames("panel"),N=({children:s,panelClassName:a,inlineWrapperClassName:l,resolvedPosition:n,dividerBefore:r,dividerInner:o,dividerAfter:c,alwaysVisible:i,dividerColor:t,...u})=>{const{context:x,transitionConfig:_,refs:p}=F.useBmFloatingUIContext(),{isMounted:I,status:g}=m.useTransitionStatus(x,_),j=i&&g==="initial"?"open":g;return I?e.jsxs(e.Fragment,{children:[r&&e.jsx(d.InlineDivider,{position:n,dividerColor:t}),e.jsx("div",{ref:p.setFloating,className:l,"data-position":n,"data-status":j,children:e.jsxs("div",{className:P.styles[`${U}__inline-wrapper-content`],children:[o&&e.jsx(d.InlineDivider,{position:n,dividerColor:t}),e.jsx("aside",{...u,className:a,children:s})]})}),c&&e.jsx(d.InlineDivider,{position:n,dividerColor:t})]}):null},h=({contextValue:s,panelClassName:a,inlineWrapperClassName:l,resolvedPosition:n,dividerBefore:r,dividerInner:o,dividerAfter:c,open:i,transitionConfig:t,dividerColor:u,children:x,..._})=>e.jsx(b.PanelContext.Provider,{value:s,children:e.jsx(f.FloatingUIRoot,{open:i??!0,portalled:!1,transitionConfig:t,children:e.jsx(N,{panelClassName:a,inlineWrapperClassName:l,resolvedPosition:n,dividerBefore:r,dividerInner:o,dividerAfter:c,dividerColor:u,alwaysVisible:i===void 0,..._,children:x})})});exports.InlinePanel=h;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { UseTransitionStylesProps } from '@floating-ui/react';
|
|
2
|
-
import { PanelPosition } from './Panel.types';
|
|
2
|
+
import { PanelDividerColor, PanelPosition } from './Panel.types';
|
|
3
3
|
import { PanelContextValue } from './Panel.context';
|
|
4
|
-
export declare const InlineDivider: ({ position, className, }: {
|
|
5
|
-
position?: PanelPosition;
|
|
6
|
-
className?: string;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
4
|
type InlinePanelProps = {
|
|
9
5
|
contextValue: PanelContextValue;
|
|
10
6
|
panelClassName: string;
|
|
@@ -16,6 +12,7 @@ type InlinePanelProps = {
|
|
|
16
12
|
open?: boolean;
|
|
17
13
|
transitionConfig: UseTransitionStylesProps;
|
|
18
14
|
children: React.ReactNode;
|
|
15
|
+
dividerColor?: PanelDividerColor;
|
|
19
16
|
} & React.ComponentPropsWithoutRef<'aside'>;
|
|
20
|
-
export declare const InlinePanel: ({ contextValue, panelClassName, inlineWrapperClassName, resolvedPosition, dividerBefore, dividerInner, dividerAfter, open, transitionConfig, children, ...props }: InlinePanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const InlinePanel: ({ contextValue, panelClassName, inlineWrapperClassName, resolvedPosition, dividerBefore, dividerInner, dividerAfter, open, transitionConfig, dividerColor, children, ...props }: InlinePanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
18
|
export {};
|
|
@@ -1,93 +1,85 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useTransitionStatus as
|
|
3
|
-
import { g as
|
|
1
|
+
import { jsx as t, jsxs as g, Fragment as C } from "react/jsx-runtime";
|
|
2
|
+
import { useTransitionStatus as N } from "@floating-ui/react";
|
|
3
|
+
import { g as F } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import { PanelContext as
|
|
6
|
-
import { FloatingUIRoot as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { s as
|
|
10
|
-
const { baseClassNamePrefix:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
borderColor: "01",
|
|
17
|
-
orientation: n === "bottom" ? "horizontal" : "vertical",
|
|
18
|
-
className: i
|
|
19
|
-
}
|
|
20
|
-
), y = ({
|
|
21
|
-
children: n,
|
|
22
|
-
panelClassName: i,
|
|
23
|
-
inlineWrapperClassName: e,
|
|
24
|
-
resolvedPosition: o,
|
|
5
|
+
import { PanelContext as w } from "./Panel.context.es.js";
|
|
6
|
+
import { FloatingUIRoot as U } from "../../FloatingUI/FloatingUI.root.es.js";
|
|
7
|
+
import { u as b } from "../../../chunks/FloatingUI.context.D3kSM-y1.js";
|
|
8
|
+
import { InlineDivider as u } from "./Panel.Divider.es.js";
|
|
9
|
+
import { s as j } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
10
|
+
const { baseClassNamePrefix: y } = F("panel"), B = ({
|
|
11
|
+
children: i,
|
|
12
|
+
panelClassName: e,
|
|
13
|
+
inlineWrapperClassName: o,
|
|
14
|
+
resolvedPosition: n,
|
|
25
15
|
dividerBefore: r,
|
|
26
|
-
dividerInner:
|
|
27
|
-
dividerAfter:
|
|
16
|
+
dividerInner: l,
|
|
17
|
+
dividerAfter: m,
|
|
28
18
|
alwaysVisible: a,
|
|
29
|
-
|
|
19
|
+
dividerColor: s,
|
|
20
|
+
...p
|
|
30
21
|
}) => {
|
|
31
22
|
const {
|
|
32
|
-
context:
|
|
33
|
-
transitionConfig:
|
|
34
|
-
refs:
|
|
35
|
-
} =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
),
|
|
39
|
-
return
|
|
40
|
-
r && /* @__PURE__ */ t(
|
|
23
|
+
context: c,
|
|
24
|
+
transitionConfig: f,
|
|
25
|
+
refs: x
|
|
26
|
+
} = b(), { isMounted: I, status: d } = N(
|
|
27
|
+
c,
|
|
28
|
+
f
|
|
29
|
+
), h = a && d === "initial" ? "open" : d;
|
|
30
|
+
return I ? /* @__PURE__ */ g(C, { children: [
|
|
31
|
+
r && /* @__PURE__ */ t(u, { position: n, dividerColor: s }),
|
|
41
32
|
/* @__PURE__ */ t(
|
|
42
33
|
"div",
|
|
43
34
|
{
|
|
44
|
-
ref:
|
|
45
|
-
className:
|
|
46
|
-
"data-position":
|
|
47
|
-
"data-status":
|
|
48
|
-
children: /* @__PURE__ */
|
|
49
|
-
|
|
50
|
-
/* @__PURE__ */ t("aside", { ...
|
|
35
|
+
ref: x.setFloating,
|
|
36
|
+
className: o,
|
|
37
|
+
"data-position": n,
|
|
38
|
+
"data-status": h,
|
|
39
|
+
children: /* @__PURE__ */ g("div", { className: j[`${y}__inline-wrapper-content`], children: [
|
|
40
|
+
l && /* @__PURE__ */ t(u, { position: n, dividerColor: s }),
|
|
41
|
+
/* @__PURE__ */ t("aside", { ...p, className: e, children: i })
|
|
51
42
|
] })
|
|
52
43
|
}
|
|
53
44
|
),
|
|
54
|
-
|
|
45
|
+
m && /* @__PURE__ */ t(u, { position: n, dividerColor: s })
|
|
55
46
|
] }) : null;
|
|
56
|
-
},
|
|
57
|
-
contextValue:
|
|
58
|
-
panelClassName:
|
|
59
|
-
inlineWrapperClassName:
|
|
60
|
-
resolvedPosition:
|
|
47
|
+
}, V = ({
|
|
48
|
+
contextValue: i,
|
|
49
|
+
panelClassName: e,
|
|
50
|
+
inlineWrapperClassName: o,
|
|
51
|
+
resolvedPosition: n,
|
|
61
52
|
dividerBefore: r,
|
|
62
|
-
dividerInner:
|
|
63
|
-
dividerAfter:
|
|
53
|
+
dividerInner: l,
|
|
54
|
+
dividerAfter: m,
|
|
64
55
|
open: a,
|
|
65
|
-
transitionConfig:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
56
|
+
transitionConfig: s,
|
|
57
|
+
dividerColor: p,
|
|
58
|
+
children: c,
|
|
59
|
+
...f
|
|
60
|
+
}) => /* @__PURE__ */ t(w.Provider, { value: i, children: /* @__PURE__ */ t(
|
|
61
|
+
U,
|
|
70
62
|
{
|
|
71
63
|
open: a ?? !0,
|
|
72
64
|
portalled: !1,
|
|
73
|
-
transitionConfig:
|
|
65
|
+
transitionConfig: s,
|
|
74
66
|
children: /* @__PURE__ */ t(
|
|
75
|
-
|
|
67
|
+
B,
|
|
76
68
|
{
|
|
77
|
-
panelClassName:
|
|
78
|
-
inlineWrapperClassName:
|
|
79
|
-
resolvedPosition:
|
|
69
|
+
panelClassName: e,
|
|
70
|
+
inlineWrapperClassName: o,
|
|
71
|
+
resolvedPosition: n,
|
|
80
72
|
dividerBefore: r,
|
|
81
|
-
dividerInner:
|
|
82
|
-
dividerAfter:
|
|
73
|
+
dividerInner: l,
|
|
74
|
+
dividerAfter: m,
|
|
75
|
+
dividerColor: p,
|
|
83
76
|
alwaysVisible: a === void 0,
|
|
84
|
-
...
|
|
85
|
-
children:
|
|
77
|
+
...f,
|
|
78
|
+
children: c
|
|
86
79
|
}
|
|
87
80
|
)
|
|
88
81
|
}
|
|
89
82
|
) });
|
|
90
83
|
export {
|
|
91
|
-
|
|
92
|
-
T as InlinePanel
|
|
84
|
+
V as InlinePanel
|
|
93
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),x=require("clsx"),b=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const f=require("./Panel.context.cjs.js"),p=require("./Panel.helpers.cjs.js"),y=require("../../FloatingUI/FloatingUI.root.cjs.js"),C=require("../../FloatingUI/FloatingUI.content.cjs.js"),F=require("./Panel.Divider.cjs.js"),a=require("../../../chunks/panel.module.DCpj0tSX.js"),{baseClassNamePrefix:n}=b.getBEMClassNames("panel"),j=({contextValue:r,panelClassName:t,resolvedPosition:l,showDivider:o,modalType:e,closeOnOutsidePress:c,open:u,onOpenChange:_,transitionConfig:d,dividerColor:g,children:v,...m})=>{const s=e==="isModal"||e==="alert",P=p.getPanelDismissConfig(e,c),q=x(a.styles[`${n}__overlay-divider`],a.styles[`${n}__overlay-divider--${l}`]);return i.jsx(f.PanelContext.Provider,{value:r,children:i.jsx(y.FloatingUIRoot,{open:u,onOpenChange:_,portalled:!0,transitionConfig:d,dismiss:P,focusConfiguration:s?!0:{modal:!1,closeOnFocusOut:!1},children:i.jsxs(C.Content,{className:t,skipFloatingStyles:!0,overlay:s,...m,role:e==="alert"?"alertdialog":"dialog","aria-modal":s||void 0,"data-position":l,children:[v,o&&i.jsx(F.InlineDivider,{position:l,className:q,dividerColor:g})]})})})};exports.OverlayPanel=j;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseTransitionStylesProps } from '@floating-ui/react';
|
|
2
|
-
import { PanelModalType, PanelPosition } from './Panel.types';
|
|
2
|
+
import { PanelDividerColor, PanelModalType, PanelPosition } from './Panel.types';
|
|
3
3
|
import { PanelContextValue } from './Panel.context';
|
|
4
4
|
import { FloatingUIProps } from '../../FloatingUI/FloatingUI.context';
|
|
5
5
|
type OverlayPanelProps = {
|
|
@@ -13,6 +13,7 @@ type OverlayPanelProps = {
|
|
|
13
13
|
onOpenChange?: FloatingUIProps['onOpenChange'];
|
|
14
14
|
transitionConfig: UseTransitionStylesProps;
|
|
15
15
|
children: React.ReactNode;
|
|
16
|
+
dividerColor?: PanelDividerColor;
|
|
16
17
|
} & React.ComponentPropsWithoutRef<'aside'>;
|
|
17
|
-
export declare const OverlayPanel: ({ contextValue, panelClassName, resolvedPosition, showDivider, modalType, closeOnOutsidePress, open, onOpenChange, transitionConfig, children, ...props }: OverlayPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const OverlayPanel: ({ contextValue, panelClassName, resolvedPosition, showDivider, modalType, closeOnOutsidePress, open, onOpenChange, transitionConfig, dividerColor, children, ...props }: OverlayPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { g as
|
|
1
|
+
import { jsx as s, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import N from "clsx";
|
|
3
|
+
import { g as y } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import { PanelContext as
|
|
6
|
-
import { getPanelDismissConfig as
|
|
7
|
-
import { FloatingUIRoot as
|
|
8
|
-
import { Content as
|
|
9
|
-
import { InlineDivider as
|
|
10
|
-
import { s as a } from "../../../chunks/panel.module.
|
|
11
|
-
const { baseClassNamePrefix: e } =
|
|
5
|
+
import { PanelContext as _ } from "./Panel.context.es.js";
|
|
6
|
+
import { getPanelDismissConfig as h } from "./Panel.helpers.es.js";
|
|
7
|
+
import { FloatingUIRoot as D } from "../../FloatingUI/FloatingUI.root.es.js";
|
|
8
|
+
import { Content as F } from "../../FloatingUI/FloatingUI.content.es.js";
|
|
9
|
+
import { InlineDivider as O } from "./Panel.Divider.es.js";
|
|
10
|
+
import { s as a } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
11
|
+
const { baseClassNamePrefix: e } = y("panel"), S = ({
|
|
12
12
|
contextValue: t,
|
|
13
13
|
panelClassName: l,
|
|
14
14
|
resolvedPosition: r,
|
|
@@ -18,35 +18,36 @@ const { baseClassNamePrefix: e } = N("panel"), R = ({
|
|
|
18
18
|
open: f,
|
|
19
19
|
onOpenChange: c,
|
|
20
20
|
transitionConfig: d,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
dividerColor: p,
|
|
22
|
+
children: g,
|
|
23
|
+
...v
|
|
23
24
|
}) => {
|
|
24
|
-
const i = o === "isModal" || o === "alert",
|
|
25
|
+
const i = o === "isModal" || o === "alert", u = h(o, n), C = N(
|
|
25
26
|
a[`${e}__overlay-divider`],
|
|
26
27
|
a[`${e}__overlay-divider--${r}`]
|
|
27
28
|
);
|
|
28
|
-
return /* @__PURE__ */ s(
|
|
29
|
-
|
|
29
|
+
return /* @__PURE__ */ s(_.Provider, { value: t, children: /* @__PURE__ */ s(
|
|
30
|
+
D,
|
|
30
31
|
{
|
|
31
32
|
open: f,
|
|
32
33
|
onOpenChange: c,
|
|
33
34
|
portalled: !0,
|
|
34
35
|
transitionConfig: d,
|
|
35
|
-
dismiss:
|
|
36
|
+
dismiss: u,
|
|
36
37
|
focusConfiguration: i ? !0 : { modal: !1, closeOnFocusOut: !1 },
|
|
37
|
-
children: /* @__PURE__ */
|
|
38
|
-
|
|
38
|
+
children: /* @__PURE__ */ x(
|
|
39
|
+
F,
|
|
39
40
|
{
|
|
40
41
|
className: l,
|
|
41
42
|
skipFloatingStyles: !0,
|
|
42
43
|
overlay: i,
|
|
43
|
-
...
|
|
44
|
+
...v,
|
|
44
45
|
role: o === "alert" ? "alertdialog" : "dialog",
|
|
45
46
|
"aria-modal": i || void 0,
|
|
46
47
|
"data-position": r,
|
|
47
48
|
children: [
|
|
48
|
-
|
|
49
|
-
m && /* @__PURE__ */ s(
|
|
49
|
+
g,
|
|
50
|
+
m && /* @__PURE__ */ s(O, { position: r, className: C, dividerColor: p })
|
|
50
51
|
]
|
|
51
52
|
}
|
|
52
53
|
)
|
|
@@ -54,5 +55,5 @@ const { baseClassNamePrefix: e } = N("panel"), R = ({
|
|
|
54
55
|
) });
|
|
55
56
|
};
|
|
56
57
|
export {
|
|
57
|
-
|
|
58
|
+
S as OverlayPanel
|
|
58
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),q=require("clsx"),b=require("react"),B=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const A=require("./Panel.Header.cjs.js"),F=require("./Panel.Body.cjs.js"),H=require("./Panel.Footer.cjs.js"),i=require("./Panel.helpers.cjs.js"),T=require("./Panel.Inline.cjs.js"),V=require("./Panel.Overlay.cjs.js"),e=require("../../../chunks/panel.module.DCpj0tSX.js"),{baseClassNamePrefix:s}=B.getBEMClassNames("panel"),a=({children:u,className:C,padding:g="md",onOpenChange:h,open:_,size:r,dismissible:d=!0,closeButtonAriaLabel:P="Close panel",kind:o="inline",position:t,divider:$=!0,dividerColor:p,isAnimated:N=!0,onBeforeClose:M,modalType:n,...c})=>{process.env.NODE_ENV!=="production"&&n==="alert"&&d&&console.warn('Panel: `dismissible` is ignored when `modalType="alert"`. The close button is always hidden.'),process.env.NODE_ENV!=="production"&&c.closeOnOutsidePress&&n!=="nonModal"&&n!==void 0&&console.warn('Panel: `closeOnOutsidePress` has no effect when `modalType` is not `"nonModal"`.');const y=n==="alert"?!1:d,l=i.getResolvedPanelPosition(t),x=r&&(l!=="bottom"||r==="full"),m=q(e.styles[s],e.styles[`${s}--${o}`],x&&e.styles[`${s}--size-${r}`],e.styles[`${s}--padding-${g}`],e.styles[`${s}--position-${l}`],C),D=q(e.styles[`${s}__inline-wrapper`],r==="full"&&e.styles[`${s}__inline-wrapper--full`]),{requestClose:f,handleOverlayOpenChange:E}=i.usePanelClose(M,h),v=b.useMemo(()=>({kind:o,dismissible:y,closeButtonAriaLabel:P,position:t,requestClose:f}),[o,y,P,t,f]),{showDivider:I,dividerBefore:S,dividerInner:R,dividerAfter:j}=i.getPanelDividerState($,l),w=b.useMemo(()=>({duration:N?i.PANEL_TRANSITION_DURATION_MS:0}),[N]);return o==="inline"?O.jsx(T.InlinePanel,{contextValue:v,panelClassName:m,inlineWrapperClassName:D,resolvedPosition:l,dividerBefore:S,dividerInner:R,dividerAfter:j,dividerColor:p,open:_,transitionConfig:w,...c,children:u}):O.jsx(V.OverlayPanel,{contextValue:v,panelClassName:m,resolvedPosition:l,showDivider:I,dividerColor:p,modalType:n,open:_,onOpenChange:E,transitionConfig:w,...c,children:u})};a.displayName="Panel";a.Header=A.Header;a.Body=F.Body;a.Footer=H.Footer;exports.Panel=a;
|
package/lib/wip/Panel/Panel.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PanelProps } from './Panel.types';
|
|
2
2
|
export declare const Panel: {
|
|
3
|
-
({ children, className: _className, padding, onOpenChange, open, size, dismissible, closeButtonAriaLabel, kind, position, divider, isAnimated, onBeforeClose, modalType, ...panelProps }: PanelProps): JSX.Element;
|
|
3
|
+
({ children, className: _className, padding, onOpenChange, open, size, dismissible, closeButtonAriaLabel, kind, position, divider, dividerColor, isAnimated, onBeforeClose, modalType, ...panelProps }: PanelProps): JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
Header: {
|
|
6
|
-
({ children, className: _className, divider, ...props }: import('./Panel.Header').PanelHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
({ children, className: _className, divider, dividerColor, backgroundColor, ...props }: import('./Panel.Header').PanelHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
Row: {
|
|
9
9
|
({ children, className: _className, ...props }: import('./Panel.Header.Row').PanelHeaderRowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -31,11 +31,11 @@ export declare const Panel: {
|
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
Body: {
|
|
34
|
-
({ children, className: _className, ...props }: import('./Panel.Body').PanelBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
({ children, className: _className, backgroundColor, ...props }: import('./Panel.Body').PanelBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
displayName: string;
|
|
36
36
|
};
|
|
37
37
|
Footer: {
|
|
38
|
-
({ children, className: _className, divider, ...props }: import('./Panel.Footer').PanelFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
({ children, className: _className, divider, dividerColor, backgroundColor, ...props }: import('./Panel.Footer').PanelFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
displayName: string;
|
|
40
40
|
Actions: {
|
|
41
41
|
({ layout, children, className: _className, ...props }: import('./Panel.Footer.Actions').PanelFooterActionsProps): import("react/jsx-runtime").JSX.Element;
|