@viasat/beam-react 2.44.0 → 2.45.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/panel.css +1 -1
- package/index.cjs.js +1 -1
- package/index.es.js +31 -29
- package/lib/Panel/Footer/Panel.Footer.Actions.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Footer/Panel.Footer.Actions.es.js +3 -3
- package/lib/Panel/Footer/Panel.Footer.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Footer/Panel.Footer.es.js +5 -5
- package/lib/Panel/Header/Panel.Header.ContentAfter.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Header/Panel.Header.ContentAfter.es.js +3 -3
- package/lib/Panel/Header/Panel.Header.ContentBefore.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Header/Panel.Header.ContentBefore.es.js +3 -3
- package/lib/Panel/Header/Panel.Header.Description.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Header/Panel.Header.Description.es.js +3 -3
- package/lib/Panel/Header/Panel.Header.Heading.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Header/Panel.Header.Heading.es.js +5 -5
- package/lib/Panel/Header/Panel.Header.Row.cjs.js +1 -0
- package/lib/Panel/Header/Panel.Header.Row.es.js +44 -0
- package/lib/Panel/Header/Panel.Header.Subheader.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Header/Panel.Header.Subheader.es.js +3 -3
- package/lib/Panel/Header/Panel.Header.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Header/Panel.Header.es.js +5 -5
- package/lib/Panel/Panel.Body.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Panel.Body.es.js +4 -4
- package/lib/Panel/Panel.Divider.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Panel.Divider.es.js +1 -1
- package/lib/Panel/Panel.Inline.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Panel.Inline.es.js +5 -5
- package/lib/Panel/Panel.Overlay.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Panel.Overlay.d.ts +1 -1
- package/lib/Panel/Panel.Overlay.es.js +150 -0
- package/lib/Panel/Panel.ResizeHandle.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Panel.ResizeHandle.es.js +3 -3
- package/lib/Panel/Panel.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Panel.es.js +37 -37
- package/lib/Panel/Panel.helpers.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Panel.helpers.d.ts +2 -2
- package/lib/{wip/Panel → Panel}/Panel.helpers.es.js +20 -20
- package/lib/Panel/Panel.types.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Panel.types.d.ts +6 -5
- package/lib/{wip/Panel → Panel}/Panel.types.es.js +1 -1
- package/lib/Panel/Panel.useResize.cjs.js +1 -0
- package/lib/{wip/Panel → Panel}/Panel.useResize.es.js +2 -2
- package/lib/index.cjs.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.es.js +19 -17
- package/lib/wip/index.cjs.js +1 -1
- package/lib/wip/index.d.ts +0 -1
- package/lib/wip/index.es.js +1 -3
- package/package.json +6 -6
- package/lib/wip/Panel/Footer/Panel.Footer.Actions.cjs.js +0 -1
- package/lib/wip/Panel/Footer/Panel.Footer.cjs.js +0 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentAfter.cjs.js +0 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentBefore.cjs.js +0 -1
- package/lib/wip/Panel/Header/Panel.Header.Description.cjs.js +0 -1
- package/lib/wip/Panel/Header/Panel.Header.Heading.cjs.js +0 -1
- package/lib/wip/Panel/Header/Panel.Header.Row.cjs.js +0 -1
- package/lib/wip/Panel/Header/Panel.Header.Row.es.js +0 -30
- package/lib/wip/Panel/Header/Panel.Header.Subheader.cjs.js +0 -1
- package/lib/wip/Panel/Header/Panel.Header.cjs.js +0 -1
- package/lib/wip/Panel/Panel.Body.cjs.js +0 -1
- package/lib/wip/Panel/Panel.Divider.cjs.js +0 -1
- package/lib/wip/Panel/Panel.Inline.cjs.js +0 -1
- package/lib/wip/Panel/Panel.Overlay.cjs.js +0 -1
- package/lib/wip/Panel/Panel.Overlay.es.js +0 -144
- package/lib/wip/Panel/Panel.ResizeHandle.cjs.js +0 -1
- package/lib/wip/Panel/Panel.cjs.js +0 -1
- package/lib/wip/Panel/Panel.helpers.cjs.js +0 -1
- package/lib/wip/Panel/Panel.types.cjs.js +0 -1
- package/lib/wip/Panel/Panel.useResize.cjs.js +0 -1
- /package/lib/{wip/Panel → Panel}/Footer/Panel.Footer.Actions.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Footer/Panel.Footer.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Header/Panel.Header.ContentAfter.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Header/Panel.Header.ContentBefore.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Header/Panel.Header.Description.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Header/Panel.Header.Heading.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Header/Panel.Header.Row.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Header/Panel.Header.Subheader.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Header/Panel.Header.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Panel.Body.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Panel.Divider.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Panel.Inline.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Panel.ResizeHandle.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Panel.context.cjs.js +0 -0
- /package/lib/{wip/Panel → Panel}/Panel.context.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Panel.context.es.js +0 -0
- /package/lib/{wip/Panel → Panel}/Panel.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/Panel.useResize.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/index.cjs.js +0 -0
- /package/lib/{wip/Panel → Panel}/index.d.ts +0 -0
- /package/lib/{wip/Panel → Panel}/index.es.js +0 -0
package/lib/wip/index.es.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viasat/beam-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.45.0",
|
|
4
4
|
"description": "React component library for the Beam design system",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Viasat",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@viasat/beam-fonts": "2.
|
|
63
|
-
"@viasat/beam-shared": "2.
|
|
64
|
-
"@viasat/beam-styles": "2.
|
|
65
|
-
"@viasat/beam-tokens": "2.
|
|
66
|
-
"@viasat/beam-icons": "2.
|
|
62
|
+
"@viasat/beam-fonts": "2.45.0",
|
|
63
|
+
"@viasat/beam-shared": "2.45.0",
|
|
64
|
+
"@viasat/beam-styles": "2.45.0",
|
|
65
|
+
"@viasat/beam-tokens": "2.45.0",
|
|
66
|
+
"@viasat/beam-icons": "2.45.0",
|
|
67
67
|
"clsx": "^1.2.1",
|
|
68
68
|
"@floating-ui/react": "^0.26.18",
|
|
69
69
|
"@stepperize/react": "^5.1.5",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),i=require("clsx"),u=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const e=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:m}=u.getBEMClassNames("panel"),t=({layout:n="end",children:o,className:a,...c})=>{const s=`${m}footer__actions`,r=i(e.styles[s],e.styles[`${s}--${n}`],a);return l.jsx("div",{className:r,...c,children:o})};t.displayName="Panel.Footer.Actions";exports.Actions=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("clsx"),b=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const C=require("../../../Divider/Divider.cjs.js"),P=require("../../../Box/Box.cjs.js"),m=require("../Panel.helpers.cjs.js"),q=require("../Panel.context.cjs.js"),v=require("./Panel.Footer.Actions.cjs.js"),g=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:p}=b.getBEMClassNames("panel"),D=`${p}footer`,o=({children:r,className:s,divider:t=!0,dividerColor:i,backgroundColor:n,...l})=>{const{backgroundColor:c,dividerColor:a}=q.usePanelContext(),_=i??a??m.DEFAULT_PANEL_DIVIDER_COLOR,u=n??c,d=x(g.styles[D],s);return e.jsxs(e.Fragment,{children:[t&&e.jsx(C.Divider,{borderColor:_}),e.jsx(P.Box,{as:"footer",className:d,backgroundColor:u,...l,children:r})]})};o.displayName="Panel.Footer";o.Actions=v.Actions;exports.Footer=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("clsx"),o=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const c=require("../../../../chunks/panel.module.BzLGa7GY.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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("clsx"),l=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const c=require("../../../../chunks/panel.module.BzLGa7GY.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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("clsx"),c=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const l=require("../../../../chunks/panel.module.BzLGa7GY.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;
|
|
@@ -1 +0,0 @@
|
|
|
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.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.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.BzLGa7GY.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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("clsx"),b=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const m=require("../../../CloseButton/CloseButton.cjs.js"),_=require("../../../Tooltip/Tooltip.cjs.js"),p=require("../Panel.context.cjs.js"),t=require("../../../../chunks/panel.module.BzLGa7GY.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;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import p from "clsx";
|
|
3
|
-
import { g as d } from "../../../../chunks/classNames.ZWNk1hey.js";
|
|
4
|
-
import "../../../../chunks/constants.Cruz2A1w.js";
|
|
5
|
-
import { CloseButton as f } from "../../../CloseButton/CloseButton.es.js";
|
|
6
|
-
import { Tooltip as u } from "../../../Tooltip/Tooltip.es.js";
|
|
7
|
-
import { usePanelContext as b } from "../Panel.context.es.js";
|
|
8
|
-
import { s as o } from "../../../../chunks/panel.module.CgFBtvbR.js";
|
|
9
|
-
const { subElementClassPrefix: x } = d("panel"), t = `${x}header`, C = ({
|
|
10
|
-
children: l,
|
|
11
|
-
className: r,
|
|
12
|
-
...a
|
|
13
|
-
}) => {
|
|
14
|
-
const { dismissible: m, closeButtonAriaLabel: s, requestClose: i } = b(), n = p(o[`${t}__row`], r);
|
|
15
|
-
return /* @__PURE__ */ c("div", { className: n, ...a, children: [
|
|
16
|
-
l,
|
|
17
|
-
m && /* @__PURE__ */ e("div", { className: o[`${t}__close-button`], children: /* @__PURE__ */ e(u, { text: s, placement: "bottom", portalled: !0, role: { enabled: !1 }, children: /* @__PURE__ */ e(
|
|
18
|
-
f,
|
|
19
|
-
{
|
|
20
|
-
"aria-label": s,
|
|
21
|
-
onClick: () => i("closeButton"),
|
|
22
|
-
size: "lg"
|
|
23
|
-
}
|
|
24
|
-
) }) })
|
|
25
|
-
] });
|
|
26
|
-
};
|
|
27
|
-
C.displayName = "Panel.Header.Row";
|
|
28
|
-
export {
|
|
29
|
-
C as Row
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("clsx"),u=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const c=require("../../../../chunks/panel.module.BzLGa7GY.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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),P=require("clsx"),b=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const H=require("../../../Divider/Divider.cjs.js"),C=require("../../../Box/Box.cjs.js"),p=require("../Panel.helpers.cjs.js"),q=require("../Panel.context.cjs.js"),x=require("./Panel.Header.Row.cjs.js"),g=require("./Panel.Header.ContentBefore.cjs.js"),w=require("./Panel.Header.Heading.cjs.js"),D=require("./Panel.Header.ContentAfter.cjs.js"),m=require("./Panel.Header.Description.cjs.js"),v=require("./Panel.Header.Subheader.cjs.js"),B=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:f}=b.getBEMClassNames("panel"),h=`${f}header`,e=({children:n,className:o,divider:a=!0,dividerColor:i,backgroundColor:t,...s})=>{const{backgroundColor:l,dividerColor:_}=q.usePanelContext(),d=i??_??p.DEFAULT_PANEL_DIVIDER_COLOR,c=t??l,u=P(B.styles[h],o);return r.jsxs(r.Fragment,{children:[r.jsx(C.Box,{as:"header",className:u,backgroundColor:c,...s,children:n}),a&&r.jsx(H.Divider,{borderColor:d})]})};e.displayName="Panel.Header";e.Row=x.Row;e.ContentBefore=g.ContentBefore;e.Heading=w.Heading;e.Description=m.Description;e.ContentAfter=D.ContentAfter;e.Subheader=v.Subheader;exports.Header=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),i=require("clsx"),d=require("../../../chunks/classNames.DC8Ra4sw.js");require("../../../chunks/constants.CgMu0_1M.js");const x=require("../../Box/Box.cjs.js"),b=require("./Panel.context.cjs.js"),m=require("../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:B}=d.getBEMClassNames("panel"),y=`${B}body`,e=({children:s,className:o,backgroundColor:t,tabIndex:n=0,...r})=>{const{backgroundColor:l}=b.usePanelContext(),a=t??l,c=i(m.styles[y],o);return u.jsx(x.Box,{className:c,backgroundColor:a,tabIndex:n,...r,children:s})};e.displayName="Panel.Body";exports.Body=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("../../Divider/Divider.cjs.js"),n=require("./Panel.helpers.cjs.js"),l=({position:e,className:i,dividerColor:r=n.DEFAULT_PANEL_DIVIDER_COLOR})=>o.jsx(t.Divider,{borderColor:r,orientation:e==="bottom"?"horizontal":"vertical",className:i});exports.InlineDivider=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("@floating-ui/react"),F=require("../../../chunks/classNames.DC8Ra4sw.js");require("../../../chunks/constants.CgMu0_1M.js");const R=require("./Panel.context.cjs.js"),h=require("../../FloatingUI/FloatingUI.root.cjs.js"),w=require("../../../chunks/FloatingUI.context.B15Tz_4h.js"),j=require("./Panel.Divider.cjs.js"),U=require("./Panel.ResizeHandle.cjs.js"),N=require("./Panel.useResize.cjs.js"),y=require("../../../chunks/panel.module.BzLGa7GY.js"),{baseClassNamePrefix:v}=F.getBEMClassNames("panel"),C=({children:a,panelClassName:l,inlineWrapperClassName:r,resolvedPosition:n,dividerBefore:o,dividerInner:c,dividerAfter:u,alwaysVisible:i,skipMountAnimation:_,dividerColor:t,resizeConfig:s,cssVarStyle:x,...d})=>{const{context:p,transitionConfig:g,refs:I}=w.useBmFloatingUIContext(),{isMounted:f,status:P}=b.useTransitionStatus(p,g),m=(i||_)&&P==="initial"?"open":P,{handleRef:q}=N.usePanelResize({resizeConfig:s,position:n,floatingRef:I.floating});return f?e.jsxs(e.Fragment,{children:[o&&e.jsx(j.InlineDivider,{position:n,dividerColor:t}),e.jsx("div",{ref:I.setFloating,className:r,"data-position":n,"data-status":m,style:x,children:e.jsxs("div",{className:y.styles[`${v}__inline-wrapper-content`],children:[c&&e.jsx(j.InlineDivider,{position:n,dividerColor:t}),e.jsxs("aside",{...d,className:l,children:[a,s&&e.jsx(U.PanelResizeHandle,{ref:q})]})]})}),u&&e.jsx(j.InlineDivider,{position:n,dividerColor:t})]}):null},D=({contextValue:a,panelClassName:l,inlineWrapperClassName:r,resolvedPosition:n,dividerBefore:o,dividerInner:c,dividerAfter:u,open:i,transitionConfig:_,dividerColor:t,children:s,resizeConfig:x,cssVarStyle:d,skipMountAnimation:p,...g})=>e.jsx(R.PanelContext.Provider,{value:a,children:e.jsx(h.FloatingUIRoot,{open:i??!0,portalled:!1,transitionConfig:_,children:e.jsx(C,{panelClassName:l,inlineWrapperClassName:r,resolvedPosition:n,dividerBefore:o,dividerInner:c,dividerAfter:u,dividerColor:t,alwaysVisible:i===void 0,skipMountAnimation:p,resizeConfig:x,cssVarStyle:d,...g,children:s})})});exports.InlinePanel=D;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),N=require("clsx"),I=require("react"),S=require("../../../chunks/classNames.DC8Ra4sw.js");require("../../../chunks/constants.CgMu0_1M.js");const h=require("./Panel.context.cjs.js"),w=require("./Panel.helpers.cjs.js"),k=require("../../FloatingUI/FloatingUI.root.cjs.js"),D=require("../../FloatingUI/FloatingUI.content.cjs.js"),z=require("../../../chunks/FloatingUI.context.B15Tz_4h.js"),$=require("./Panel.Divider.cjs.js"),A=require("./Panel.ResizeHandle.cjs.js"),B=require("./Panel.useResize.cjs.js"),f=require("../../../chunks/panel.module.BzLGa7GY.js"),{baseClassNamePrefix:g,variable:j}=S.getBEMClassNames("panel");function H(s,n,e){if(!(!s&&!n&&!e))return{...s,...n,...e?{[j("offset-x")]:e.x,[j("offset-y")]:e.y}:null}}const R=({children:s,panelClassName:n,resolvedPosition:e,showDivider:_,dividerColor:l,resizeConfig:o,floatingOffset:d,overlayDividerClassName:P,isBlocking:c,cssVarStyle:v,skipMountAnimation:x,container:r,style:q,...b})=>{const{refs:y}=z.useBmFloatingUIContext(),{handleRef:i}=B.usePanelResize({resizeConfig:o,position:e,floatingRef:y.floating,requireMount:!0,container:r}),t=H(q,v,d),m=I.useMemo(()=>c?r?{lockScroll:!1}:!0:{lockScroll:!1},[c,r]);return a.jsxs(D.Content,{className:n,skipFloatingStyles:!0,overlay:m,...b,style:t,"data-position":e,...x?{"data-status":"open"}:{},children:[s,_&&a.jsx($.InlineDivider,{position:e,className:P,dividerColor:l}),o&&a.jsx(A.PanelResizeHandle,{ref:i})]})},E=({contextValue:s,panelClassName:n,resolvedPosition:e,showDivider:_,modalType:l,closeOnOutsidePress:o,floatingOffset:d,open:P,onOpenChange:c,transitionConfig:v,dividerColor:x,children:r,resizeConfig:q,cssVarStyle:b,skipMountAnimation:y,container:i,triggerRef:t,...m})=>{const p=l==="isModal"||l==="alert",C=I.useCallback(u=>{const F=(t==null?void 0:t.current)??null;return!(F&&u.target instanceof Node&&F.contains(u.target))},[t]),U=I.useMemo(()=>{const u=w.getPanelDismissConfig(l,o);return!t||!(l==="isModal"||l!=="alert"&&(o??!0))?u:{...u??{},outsidePress:C}},[l,o,t,C]),M=N(f.styles[`${g}__overlay-divider`],f.styles[`${g}__overlay-divider--${e}`]);return a.jsx(h.PanelContext.Provider,{value:s,children:a.jsx(k.FloatingUIRoot,{open:P,onOpenChange:c,portalled:i?{root:i}:!0,transitionConfig:v,dismiss:U,focusConfiguration:p?!0:{modal:!1,closeOnFocusOut:!1},children:a.jsx(R,{panelClassName:n,resolvedPosition:e,showDivider:_,dividerColor:x,floatingOffset:d,overlayDividerClassName:M,isBlocking:p,resizeConfig:q,cssVarStyle:b,skipMountAnimation:y,container:i,...m,role:l==="alert"?"alertdialog":"dialog","aria-modal":p||void 0,children:r})})})};exports.OverlayPanel=E;
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { jsx as m, jsxs as D } from "react/jsx-runtime";
|
|
2
|
-
import $ from "clsx";
|
|
3
|
-
import { useCallback as j, useMemo as S } from "react";
|
|
4
|
-
import { g as A } from "../../../chunks/classNames.ZWNk1hey.js";
|
|
5
|
-
import "../../../chunks/constants.Cruz2A1w.js";
|
|
6
|
-
import { PanelContext as B } from "./Panel.context.es.js";
|
|
7
|
-
import { getPanelDismissConfig as U } from "./Panel.helpers.es.js";
|
|
8
|
-
import { FloatingUIRoot as g } from "../../FloatingUI/FloatingUI.root.es.js";
|
|
9
|
-
import { Content as q } from "../../FloatingUI/FloatingUI.content.es.js";
|
|
10
|
-
import { a as z } from "../../../chunks/FloatingUI.context.Dl4Y1y1z.js";
|
|
11
|
-
import { InlineDivider as E } from "./Panel.Divider.es.js";
|
|
12
|
-
import { PanelResizeHandle as H } from "./Panel.ResizeHandle.es.js";
|
|
13
|
-
import { usePanelResize as w } from "./Panel.useResize.es.js";
|
|
14
|
-
import { s as k } from "../../../chunks/panel.module.CgFBtvbR.js";
|
|
15
|
-
const { baseClassNamePrefix: F, variable: I } = A("panel");
|
|
16
|
-
function G(e, s, o) {
|
|
17
|
-
if (!(!e && !s && !o))
|
|
18
|
-
return {
|
|
19
|
-
...e,
|
|
20
|
-
...s,
|
|
21
|
-
...o ? {
|
|
22
|
-
[I("offset-x")]: o.x,
|
|
23
|
-
[I("offset-y")]: o.y
|
|
24
|
-
} : null
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
const J = ({
|
|
28
|
-
children: e,
|
|
29
|
-
panelClassName: s,
|
|
30
|
-
resolvedPosition: o,
|
|
31
|
-
showDivider: c,
|
|
32
|
-
dividerColor: t,
|
|
33
|
-
resizeConfig: l,
|
|
34
|
-
floatingOffset: f,
|
|
35
|
-
overlayDividerClassName: d,
|
|
36
|
-
isBlocking: u,
|
|
37
|
-
cssVarStyle: p,
|
|
38
|
-
skipMountAnimation: v,
|
|
39
|
-
container: a,
|
|
40
|
-
style: x,
|
|
41
|
-
...y
|
|
42
|
-
}) => {
|
|
43
|
-
const { refs: C } = z(), { handleRef: i } = w({
|
|
44
|
-
resizeConfig: l,
|
|
45
|
-
position: o,
|
|
46
|
-
floatingRef: C.floating,
|
|
47
|
-
requireMount: !0,
|
|
48
|
-
container: a
|
|
49
|
-
}), r = G(x, p, f), P = S(
|
|
50
|
-
() => u ? a ? { lockScroll: !1 } : !0 : { lockScroll: !1 },
|
|
51
|
-
[u, a]
|
|
52
|
-
);
|
|
53
|
-
return /* @__PURE__ */ D(
|
|
54
|
-
q,
|
|
55
|
-
{
|
|
56
|
-
className: s,
|
|
57
|
-
skipFloatingStyles: !0,
|
|
58
|
-
overlay: P,
|
|
59
|
-
...y,
|
|
60
|
-
style: r,
|
|
61
|
-
"data-position": o,
|
|
62
|
-
...v ? { "data-status": "open" } : {},
|
|
63
|
-
children: [
|
|
64
|
-
e,
|
|
65
|
-
c && /* @__PURE__ */ m(
|
|
66
|
-
E,
|
|
67
|
-
{
|
|
68
|
-
position: o,
|
|
69
|
-
className: d,
|
|
70
|
-
dividerColor: t
|
|
71
|
-
}
|
|
72
|
-
),
|
|
73
|
-
l && /* @__PURE__ */ m(H, { ref: i })
|
|
74
|
-
]
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}, eo = ({
|
|
78
|
-
contextValue: e,
|
|
79
|
-
panelClassName: s,
|
|
80
|
-
resolvedPosition: o,
|
|
81
|
-
showDivider: c,
|
|
82
|
-
modalType: t,
|
|
83
|
-
closeOnOutsidePress: l,
|
|
84
|
-
floatingOffset: f,
|
|
85
|
-
open: d,
|
|
86
|
-
onOpenChange: u,
|
|
87
|
-
transitionConfig: p,
|
|
88
|
-
dividerColor: v,
|
|
89
|
-
children: a,
|
|
90
|
-
resizeConfig: x,
|
|
91
|
-
cssVarStyle: y,
|
|
92
|
-
skipMountAnimation: C,
|
|
93
|
-
container: i,
|
|
94
|
-
triggerRef: r,
|
|
95
|
-
...P
|
|
96
|
-
}) => {
|
|
97
|
-
const N = t === "isModal" || t === "alert", h = j(
|
|
98
|
-
(n) => {
|
|
99
|
-
const M = (r == null ? void 0 : r.current) ?? null;
|
|
100
|
-
return !(M && n.target instanceof Node && M.contains(n.target));
|
|
101
|
-
},
|
|
102
|
-
[r]
|
|
103
|
-
), _ = S(() => {
|
|
104
|
-
const n = U(t, l);
|
|
105
|
-
return !r || !(t === "isModal" || t !== "alert" && (l ?? !0)) ? n : { ...n ?? {}, outsidePress: h };
|
|
106
|
-
}, [t, l, r, h]), b = $(
|
|
107
|
-
k[`${F}__overlay-divider`],
|
|
108
|
-
k[`${F}__overlay-divider--${o}`]
|
|
109
|
-
);
|
|
110
|
-
return /* @__PURE__ */ m(B.Provider, { value: e, children: /* @__PURE__ */ m(
|
|
111
|
-
g,
|
|
112
|
-
{
|
|
113
|
-
open: d,
|
|
114
|
-
onOpenChange: u,
|
|
115
|
-
portalled: i ? { root: i } : !0,
|
|
116
|
-
transitionConfig: p,
|
|
117
|
-
dismiss: _,
|
|
118
|
-
focusConfiguration: N ? !0 : { modal: !1, closeOnFocusOut: !1 },
|
|
119
|
-
children: /* @__PURE__ */ m(
|
|
120
|
-
J,
|
|
121
|
-
{
|
|
122
|
-
panelClassName: s,
|
|
123
|
-
resolvedPosition: o,
|
|
124
|
-
showDivider: c,
|
|
125
|
-
dividerColor: v,
|
|
126
|
-
floatingOffset: f,
|
|
127
|
-
overlayDividerClassName: b,
|
|
128
|
-
isBlocking: N,
|
|
129
|
-
resizeConfig: x,
|
|
130
|
-
cssVarStyle: y,
|
|
131
|
-
skipMountAnimation: C,
|
|
132
|
-
container: i,
|
|
133
|
-
...P,
|
|
134
|
-
role: t === "alert" ? "alertdialog" : "dialog",
|
|
135
|
-
"aria-modal": N || void 0,
|
|
136
|
-
children: a
|
|
137
|
-
}
|
|
138
|
-
)
|
|
139
|
-
}
|
|
140
|
-
) });
|
|
141
|
-
};
|
|
142
|
-
export {
|
|
143
|
-
eo as OverlayPanel
|
|
144
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("react"),n=require("../../../chunks/classNames.DC8Ra4sw.js");require("../../../chunks/constants.CgMu0_1M.js");const l=require("../../../chunks/panel.module.BzLGa7GY.js"),{baseClassNamePrefix:i}=n.getBEMClassNames("panel"),e=r.forwardRef((t,s)=>a.jsx("div",{ref:s,className:l.styles[`${i}__resize-handle`],"aria-hidden":!0,tabIndex:-1}));e.displayName="PanelResizeHandle";exports.PanelResizeHandle=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react/jsx-runtime"),F=require("clsx"),K=require("react"),re=require("../../../chunks/classNames.DC8Ra4sw.js");require("../../../chunks/constants.CgMu0_1M.js");const V=require("../../../utils/hooks/usePrevious.cjs.js"),ae=require("./Header/Panel.Header.cjs.js"),ce=require("./Panel.Body.cjs.js"),ue=require("./Footer/Panel.Footer.cjs.js"),c=require("./Panel.helpers.cjs.js"),de=require("./Panel.Inline.cjs.js"),ve=require("./Panel.Overlay.cjs.js"),n=require("../../../chunks/panel.module.BzLGa7GY.js"),fe=165,ye=100,_e=(e,i)=>{if(!e)return;const l=i==="bottom",u=typeof e=="object"?e:{},a=u.minSize??(l?ye:fe),_=u.maxSize??1/0,P=u.storageKey??"";return{minSize:a,maxSize:_,storageKey:P}},{baseClassNamePrefix:t,variable:L}=re.getBEMClassNames("panel");function Pe(e,i){const l={overlayWidthClass:void 0,inlineWidthClass:void 0,widthStyle:void 0};return i==="bottom"?l:c.isPresetWidth(e)?{overlayWidthClass:n.styles[`${t}--width-${e}`],inlineWidthClass:n.styles[`${t}__inline-wrapper--width-${e}`],widthStyle:void 0}:e!==void 0?{...l,widthStyle:{[L("width")]:e}}:l}function pe(e,i){if(!(i!=="bottom"||e===void 0))return{[L("height")]:e}}const f=({children:e,className:i,padding:l="md",onOpenChange:u,open:a,width:_,height:P,dismissible:g=!0,closeButtonAriaLabel:w="Close panel",kind:s="overlay",position:p,divider:G=!0,dividerColor:y,backgroundColor:b,isAnimated:N=!0,onBeforeClose:U,modalType:d,offset:O,resizable:X,id:S,...C})=>{const o=c.getResolvedPanelPosition(p),v=_e(X,o),Y=!!v,{container:q,triggerRef:J,...$}=C,r=s==="overlay"?q:void 0;if(process.env.NODE_ENV!=="production"){v&&!v.storageKey&&console.warn("Panel: provide a `storageKey` in the `resizable` config to persist panel size across sessions."),d==="alert"&&g&&console.warn('Panel: `dismissible` is ignored when `modalType="alert"`. The close button is always hidden.');const{closeOnOutsidePress:le}=C;if(le&&d!=="nonModal"&&d!==void 0&&console.warn('Panel: `closeOnOutsidePress` has no effect when `modalType` is not `"nonModal"`.'),q&&s==="inline"&&console.warn('Panel: `container` has no effect when `kind="inline"`.'),r)try{if(typeof getComputedStyle=="function"){const h=getComputedStyle(r);h.position==="static"&&console.warn("Panel: container element should have `position: relative` (or another non-static value) for proper scoping.");const m=o==="bottom"?h.overflowY:h.overflowX;(m==="visible"||m==="auto"||m==="scroll")&&console.warn("Panel: container element should use `overflow: hidden` (or `clip`) so the slide-in/out transform does not trigger a transient scrollbar.")}}catch{}}const I=d==="alert"?!1:g,{overlayWidthClass:Q,inlineWidthClass:Z,widthStyle:M}=Pe(_,o),W=pe(P,o),x=M||W?{...M,...W}:void 0,E=s==="overlay"&&O?c.resolveOffset(O):void 0,z=!!E,H=F(n.styles[t],n.styles[`${t}--${s}`],s==="overlay"&&Q,n.styles[`${t}--padding-${l}`],n.styles[`${t}--position-${o}`],z&&n.styles[`${t}--floating`],Y&&n.styles[`${t}--resizable`],s==="overlay"&&r&&n.styles[`${t}--contained`],i),k=F(n.styles[`${t}__inline-wrapper`],Z),{requestClose:B,handleOverlayOpenChange:ee}=c.usePanelClose(U,u),D=K.useMemo(()=>({kind:s,dismissible:I,closeButtonAriaLabel:w,position:p,requestClose:B,backgroundColor:b,dividerColor:y}),[s,I,w,p,B,b,y]),{showDivider:se,dividerBefore:ne,dividerInner:te,dividerAfter:oe}=c.getPanelDividerState(G&&!z,o),R=K.useMemo(()=>({duration:N?c.PANEL_TRANSITION_DURATION_MS:0}),[N]),T=V.usePrevious(s),ie=V.usePrevious(r),j=T!==void 0&&T!==s&&a===!0||ie===null&&r!=null&&a===!0;return r===null?null:s==="inline"?A.jsx(de.InlinePanel,{contextValue:D,panelClassName:H,inlineWrapperClassName:k,resolvedPosition:o,dividerBefore:ne,dividerInner:te,dividerAfter:oe,dividerColor:y,open:a,transitionConfig:R,resizeConfig:v,skipMountAnimation:j,cssVarStyle:x,id:S,...$,children:e}):A.jsx(ve.OverlayPanel,{contextValue:D,panelClassName:H,resolvedPosition:o,showDivider:se,dividerColor:y,modalType:d,floatingOffset:E,open:a,onOpenChange:ee,transitionConfig:R,resizeConfig:v,skipMountAnimation:j,cssVarStyle:x,id:S,...$,container:r,triggerRef:J,children:e})};f.displayName="Panel";f.Header=ae.Header;f.Body=ce.Body;f.Footer=ue.Footer;exports.Panel=f;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),o=e=>e==="sm"||e==="md"||e==="lg",a=400;function P(e){return e===!0?{x:"1rem",y:"1rem"}:typeof e=="string"?{x:e,y:e}:{x:e.x,y:e.y}}const d="01",f=e=>e||"start",D=(e,t)=>({showDivider:e,dividerBefore:e&&t!=="start"&&t!=="bottom",dividerInner:e&&t==="bottom",dividerAfter:e&&t==="start"}),_=(e,t)=>{if(e!=="isModal")return e==="alert"?{escapeKey:!1,outsidePress:!1}:{escapeKey:!0,outsidePress:t??!0}},v=e=>e==="escape-key"?"escapeKey":e==="outside-press"?"outsidePress":"programmatic",y=(e,t)=>{const i=c.useCallback(l=>{if(!e){t==null||t(!1);return}const r=e(l);r instanceof Promise?r.then(s=>{s&&(t==null||t(!1))}).catch(s=>{process.env.NODE_ENV!=="production"&&console.warn("Panel: `onBeforeClose` rejected; close cancelled (panel stays open). If this was not intentional, handle the error inside `onBeforeClose`.",s)}):r&&(t==null||t(!1))},[e,t]),u=c.useCallback((l,r,s)=>{l?t==null||t(!0):i(v(s))},[t,i]);return{requestClose:i,handleOverlayOpenChange:u}};exports.DEFAULT_PANEL_DIVIDER_COLOR=d;exports.PANEL_TRANSITION_DURATION_MS=a;exports.getPanelDismissConfig=_;exports.getPanelDividerState=D;exports.getResolvedPanelPosition=f;exports.isPresetWidth=o;exports.resolveOffset=P;exports.usePanelClose=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../chunks/constants.CgMu0_1M.js");const e=["00","00-alt","01","02","03"],o=e;exports.PanelDividerColors=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),R=require("../../../utils/hooks/useElementResize.cjs.js"),g=require("../../../utils/hooks/useLocalStorage.cjs.js"),x=({resizeConfig:i,position:s,floatingRef:o,requireMount:n=!1,container:r})=>{const l=!!i,{minSize:f=0,maxSize:S=0,storageKey:c=""}=i??{},m=t.useCallback(()=>{const e=r;return e?s==="bottom"?e.clientHeight*.9:e.clientWidth*.5:1/0},[r,s]),_=r&&S===1/0?m:S,d=t.useRef(null),[a,y]=t.useState(!1),k=t.useCallback(e=>{d.current=e,n&&y(!!e)},[n]),[b,z]=g.useLocalStorage(c||"__panel_no_key__","0",l&&!!c),u=l&&Number(b)>0?Number(b):0,h=t.useCallback(e=>{c&&z(e.toString())},[c,z]);return R.useElementResize(n?l&&a:l,o,d,f,_,u,s==="bottom"?"y":"x",s==="end",h),t.useEffect(()=>{if(!n||!a||!u||!o.current)return;const e=s==="bottom"?"blockSize":"inlineSize";o.current.style[e]=`${u}px`},[a]),{handleRef:k}};exports.usePanelResize=x;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|