@viasat/beam-react 2.20.0 → 2.21.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/lib/wip/Panel/Panel.Header.Heading.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.Heading.d.ts +1 -1
- package/lib/wip/Panel/Panel.Header.Heading.es.js +20 -12
- package/lib/wip/Panel/Panel.Header.Row.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.Row.es.js +17 -16
- package/lib/wip/Panel/Panel.Header.d.ts +1 -1
- package/lib/wip/Panel/Panel.Overlay.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Overlay.es.js +19 -18
- package/lib/wip/Panel/Panel.cjs.js +1 -1
- package/lib/wip/Panel/Panel.context.d.ts +5 -1
- package/lib/wip/Panel/Panel.d.ts +1 -1
- package/lib/wip/Panel/Panel.es.js +29 -29
- package/lib/wip/Panel/Panel.types.d.ts +14 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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.BX1x4FlX.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;
|
|
@@ -6,6 +6,6 @@ export interface PanelHeaderHeadingProps extends ComponentPropsWithoutRef<'div'>
|
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}
|
|
8
8
|
export declare const Heading: {
|
|
9
|
-
({ children, className: _className, ...props }: PanelHeaderHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
({ children, className: _className, id: _id, ...props }: PanelHeaderHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as r, useLayoutEffect as f } from "react";
|
|
3
|
+
import p from "clsx";
|
|
4
|
+
import { g as u } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
5
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import { B as g } from "../../../chunks/FloatingUI.context.Dl4Y1y1z.js";
|
|
7
|
+
import { PanelContext as x } from "./Panel.context.es.js";
|
|
8
|
+
import { useId as I } from "../../../utils/hooks/useId.es.js";
|
|
9
|
+
import { s as b } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
10
|
+
const { subElementClassPrefix: v } = u("panel"), y = `${v}header`, C = ({
|
|
11
|
+
children: a,
|
|
12
|
+
className: m,
|
|
13
|
+
id: n,
|
|
14
|
+
...i
|
|
10
15
|
}) => {
|
|
11
|
-
const
|
|
12
|
-
return
|
|
16
|
+
const d = I(), e = n ?? d, l = p(b[`${y}__heading`], m), o = r(x), t = r(g), s = (o == null ? void 0 : o.kind) === "overlay" ? t == null ? void 0 : t.setLabelId : void 0;
|
|
17
|
+
return f(() => {
|
|
18
|
+
if (!(!s || !e))
|
|
19
|
+
return s(e), () => s(void 0);
|
|
20
|
+
}, [e, s]), /* @__PURE__ */ c("div", { id: e, className: l, ...i, children: a });
|
|
13
21
|
};
|
|
14
|
-
|
|
22
|
+
C.displayName = "Panel.Header.Heading";
|
|
15
23
|
export {
|
|
16
|
-
|
|
24
|
+
C as Heading
|
|
17
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("clsx"),
|
|
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.BX1x4FlX.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,29 +1,30 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import p from "clsx";
|
|
3
3
|
import { g as d } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import { CloseButton as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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.BVm3KvDs.js";
|
|
9
|
+
const { subElementClassPrefix: x } = d("panel"), t = `${x}header`, C = ({
|
|
10
|
+
children: l,
|
|
11
|
+
className: r,
|
|
11
12
|
...a
|
|
12
13
|
}) => {
|
|
13
|
-
const { dismissible:
|
|
14
|
+
const { dismissible: m, closeButtonAriaLabel: s, requestClose: i } = b(), n = p(o[`${t}__row`], r);
|
|
14
15
|
return /* @__PURE__ */ c("div", { className: n, ...a, children: [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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,
|
|
18
19
|
{
|
|
19
|
-
"aria-label":
|
|
20
|
-
onClick: () =>
|
|
20
|
+
"aria-label": s,
|
|
21
|
+
onClick: () => i("closeButton"),
|
|
21
22
|
size: "lg"
|
|
22
23
|
}
|
|
23
|
-
) })
|
|
24
|
+
) }) })
|
|
24
25
|
] });
|
|
25
26
|
};
|
|
26
|
-
|
|
27
|
+
C.displayName = "Panel.Header.Row";
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
C as Row
|
|
29
30
|
};
|
|
@@ -22,7 +22,7 @@ export declare const Header: {
|
|
|
22
22
|
displayName: string;
|
|
23
23
|
};
|
|
24
24
|
Heading: {
|
|
25
|
-
({ children, className: _className, ...props }: import('./Panel.Header.Heading').PanelHeaderHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
({ children, className: _className, id: _id, ...props }: import('./Panel.Header.Heading').PanelHeaderHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
displayName: string;
|
|
27
27
|
};
|
|
28
28
|
Description: {
|
|
@@ -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"),q=require("clsx"),x=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const b=require("./Panel.context.cjs.js"),f=require("./Panel.helpers.cjs.js"),p=require("../../FloatingUI/FloatingUI.root.cjs.js"),y=require("../../FloatingUI/FloatingUI.content.cjs.js"),C=require("./Panel.Inline.cjs.js"),n=require("../../../chunks/panel.module.BX1x4FlX.js"),{baseClassNamePrefix:a}=x.getBEMClassNames("panel"),F=({contextValue:t,panelClassName:r,resolvedPosition:l,showDivider:o,modalType:e,closeOnOutsidePress:c,open:u,onOpenChange:_,transitionConfig:d,children:g,...v})=>{const s=e==="isModal"||e==="alert",m=f.getPanelDismissConfig(e,c),P=q(n.styles[`${a}__overlay-divider`],n.styles[`${a}__overlay-divider--${l}`]);return i.jsx(b.PanelContext.Provider,{value:t,children:i.jsx(p.FloatingUIRoot,{open:u,onOpenChange:_,portalled:!0,transitionConfig:d,dismiss:m,focusConfiguration:s?!0:{modal:!1,closeOnFocusOut:!1},children:i.jsxs(y.Content,{className:r,skipFloatingStyles:!0,overlay:s,...v,role:e==="alert"?"alertdialog":"dialog","aria-modal":s||void 0,"data-position":l,children:[g,o&&i.jsx(C.InlineDivider,{position:l,className:P})]})})})};exports.OverlayPanel=F;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s, jsxs as C } from "react/jsx-runtime";
|
|
2
2
|
import x from "clsx";
|
|
3
3
|
import { g as N } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
@@ -6,26 +6,26 @@ import { PanelContext as y } from "./Panel.context.es.js";
|
|
|
6
6
|
import { getPanelDismissConfig as _ } from "./Panel.helpers.es.js";
|
|
7
7
|
import { FloatingUIRoot as h } from "../../FloatingUI/FloatingUI.root.es.js";
|
|
8
8
|
import { Content as D } from "../../FloatingUI/FloatingUI.content.es.js";
|
|
9
|
-
import { InlineDivider as
|
|
10
|
-
import { s as
|
|
9
|
+
import { InlineDivider as F } from "./Panel.Inline.es.js";
|
|
10
|
+
import { s as a } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
11
11
|
const { baseClassNamePrefix: e } = N("panel"), R = ({
|
|
12
|
-
contextValue:
|
|
12
|
+
contextValue: t,
|
|
13
13
|
panelClassName: l,
|
|
14
|
-
resolvedPosition:
|
|
15
|
-
showDivider:
|
|
16
|
-
modalType:
|
|
17
|
-
closeOnOutsidePress:
|
|
14
|
+
resolvedPosition: r,
|
|
15
|
+
showDivider: m,
|
|
16
|
+
modalType: o,
|
|
17
|
+
closeOnOutsidePress: n,
|
|
18
18
|
open: f,
|
|
19
19
|
onOpenChange: c,
|
|
20
20
|
transitionConfig: d,
|
|
21
21
|
children: p,
|
|
22
22
|
...g
|
|
23
23
|
}) => {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const i = o === "isModal" || o === "alert", v = _(o, n), u = x(
|
|
25
|
+
a[`${e}__overlay-divider`],
|
|
26
|
+
a[`${e}__overlay-divider--${r}`]
|
|
27
27
|
);
|
|
28
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ s(y.Provider, { value: t, children: /* @__PURE__ */ s(
|
|
29
29
|
h,
|
|
30
30
|
{
|
|
31
31
|
open: f,
|
|
@@ -33,19 +33,20 @@ const { baseClassNamePrefix: e } = N("panel"), R = ({
|
|
|
33
33
|
portalled: !0,
|
|
34
34
|
transitionConfig: d,
|
|
35
35
|
dismiss: v,
|
|
36
|
-
focusConfiguration:
|
|
37
|
-
children: /* @__PURE__ */
|
|
36
|
+
focusConfiguration: i ? !0 : { modal: !1, closeOnFocusOut: !1 },
|
|
37
|
+
children: /* @__PURE__ */ C(
|
|
38
38
|
D,
|
|
39
39
|
{
|
|
40
40
|
className: l,
|
|
41
41
|
skipFloatingStyles: !0,
|
|
42
|
-
overlay:
|
|
42
|
+
overlay: i,
|
|
43
43
|
...g,
|
|
44
|
-
role:
|
|
45
|
-
"
|
|
44
|
+
role: o === "alert" ? "alertdialog" : "dialog",
|
|
45
|
+
"aria-modal": i || void 0,
|
|
46
|
+
"data-position": r,
|
|
46
47
|
children: [
|
|
47
48
|
p,
|
|
48
|
-
|
|
49
|
+
m && /* @__PURE__ */ s(F, { position: r, className: u })
|
|
49
50
|
]
|
|
50
51
|
}
|
|
51
52
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),f=require("clsx"),q=require("react"),S=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const j=require("./Panel.Header.cjs.js"),B=require("./Panel.Body.cjs.js"),F=require("./Panel.Footer.cjs.js"),i=require("./Panel.helpers.cjs.js"),H=require("./Panel.Inline.cjs.js"),T=require("./Panel.Overlay.cjs.js"),e=require("../../../chunks/panel.module.BX1x4FlX.js"),{baseClassNamePrefix:s}=S.getBEMClassNames("panel"),l=({children:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),f=require("clsx"),q=require("react"),S=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const j=require("./Panel.Header.cjs.js"),B=require("./Panel.Body.cjs.js"),F=require("./Panel.Footer.cjs.js"),i=require("./Panel.helpers.cjs.js"),H=require("./Panel.Inline.cjs.js"),T=require("./Panel.Overlay.cjs.js"),e=require("../../../chunks/panel.module.BX1x4FlX.js"),{baseClassNamePrefix:s}=S.getBEMClassNames("panel"),l=({children:u,className:b,padding:C="md",onOpenChange:g,open:_,size:o,dismissible:d=!0,closeButtonAriaLabel:P="Close panel",kind:r="inline",position:t,divider:$=!0,isAnimated:p=!0,onBeforeClose:h,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 N=n==="alert"?!1:d,a=i.getResolvedPanelPosition(t),v=f(e.styles[s],e.styles[`${s}--${r}`],o&&e.styles[`${s}--size-${o}`],e.styles[`${s}--padding-${C}`],e.styles[`${s}--position-${a}`],b),M=f(e.styles[`${s}__inline-wrapper`],o==="full"&&e.styles[`${s}__inline-wrapper--full`]),{requestClose:y,handleOverlayOpenChange:x}=i.usePanelClose(h,g),m=q.useMemo(()=>({kind:r,dismissible:N,closeButtonAriaLabel:P,position:t,requestClose:y}),[r,N,P,t,y]),{showDivider:D,dividerBefore:E,dividerInner:I,dividerAfter:R}=i.getPanelDividerState($,a),w=q.useMemo(()=>({duration:p?i.PANEL_TRANSITION_DURATION_MS:0}),[p]);return r==="inline"?O.jsx(H.InlinePanel,{contextValue:m,panelClassName:v,inlineWrapperClassName:M,resolvedPosition:a,dividerBefore:E,dividerInner:I,dividerAfter:R,open:_,transitionConfig:w,...c,children:u}):O.jsx(T.OverlayPanel,{contextValue:m,panelClassName:v,resolvedPosition:a,showDivider:D,modalType:n,open:_,onOpenChange:x,transitionConfig:w,...c,children:u})};l.displayName="Panel";l.Header=j.Header;l.Body=B.Body;l.Footer=F.Footer;exports.Panel=l;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { PanelCloseReason, PanelPosition } from './Panel.types';
|
|
1
|
+
import { PanelCloseReason, PanelKind, PanelPosition } from './Panel.types';
|
|
2
2
|
export interface PanelContextValue {
|
|
3
|
+
/**
|
|
4
|
+
* The panel kind — used by sub-components to vary behaviour per kind.
|
|
5
|
+
*/
|
|
6
|
+
kind: PanelKind;
|
|
3
7
|
/**
|
|
4
8
|
* Whether to show a dismissible button
|
|
5
9
|
*/
|
package/lib/wip/Panel/Panel.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const Panel: {
|
|
|
14
14
|
displayName: string;
|
|
15
15
|
};
|
|
16
16
|
Heading: {
|
|
17
|
-
({ children, className: _className, ...props }: import('./Panel.Header.Heading').PanelHeaderHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
({ children, className: _className, id: _id, ...props }: import('./Panel.Header.Heading').PanelHeaderHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
displayName: string;
|
|
19
19
|
};
|
|
20
20
|
Description: {
|
|
@@ -10,49 +10,49 @@ import { usePanelClose as F, getPanelDividerState as H, PANEL_TRANSITION_DURATIO
|
|
|
10
10
|
import { InlinePanel as q } from "./Panel.Inline.es.js";
|
|
11
11
|
import { OverlayPanel as U } from "./Panel.Overlay.es.js";
|
|
12
12
|
import { s as e } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
13
|
-
const { baseClassNamePrefix: o } = R("panel"),
|
|
14
|
-
children:
|
|
13
|
+
const { baseClassNamePrefix: o } = R("panel"), i = ({
|
|
14
|
+
children: m,
|
|
15
15
|
className: _,
|
|
16
16
|
padding: h = "md",
|
|
17
17
|
onOpenChange: w,
|
|
18
|
-
open:
|
|
19
|
-
size:
|
|
20
|
-
dismissible:
|
|
21
|
-
closeButtonAriaLabel:
|
|
22
|
-
kind:
|
|
23
|
-
position:
|
|
18
|
+
open: d,
|
|
19
|
+
size: t,
|
|
20
|
+
dismissible: f = !0,
|
|
21
|
+
closeButtonAriaLabel: p = "Close panel",
|
|
22
|
+
kind: r = "inline",
|
|
23
|
+
position: a,
|
|
24
24
|
divider: D = !0,
|
|
25
25
|
isAnimated: c = !0,
|
|
26
26
|
onBeforeClose: E,
|
|
27
27
|
modalType: s,
|
|
28
|
-
...
|
|
28
|
+
...l
|
|
29
29
|
}) => {
|
|
30
|
-
process.env.NODE_ENV !== "production" && s === "alert" &&
|
|
30
|
+
process.env.NODE_ENV !== "production" && s === "alert" && f && console.warn(
|
|
31
31
|
'Panel: `dismissible` is ignored when `modalType="alert"`. The close button is always hidden.'
|
|
32
|
-
), process.env.NODE_ENV !== "production" &&
|
|
32
|
+
), process.env.NODE_ENV !== "production" && l.closeOnOutsidePress && s !== "nonModal" && s !== void 0 && console.warn(
|
|
33
33
|
'Panel: `closeOnOutsidePress` has no effect when `modalType` is not `"nonModal"`.'
|
|
34
34
|
);
|
|
35
|
-
const u = s === "alert" ? !1 :
|
|
35
|
+
const u = s === "alert" ? !1 : f, n = j(a), N = $(
|
|
36
36
|
e[o],
|
|
37
|
-
e[`${o}--${
|
|
38
|
-
|
|
37
|
+
e[`${o}--${r}`],
|
|
38
|
+
t && e[`${o}--size-${t}`],
|
|
39
39
|
e[`${o}--padding-${h}`],
|
|
40
40
|
e[`${o}--position-${n}`],
|
|
41
41
|
_
|
|
42
42
|
), x = $(
|
|
43
43
|
e[`${o}__inline-wrapper`],
|
|
44
|
-
|
|
44
|
+
t === "full" && e[`${o}__inline-wrapper--full`]
|
|
45
45
|
), { requestClose: v, handleOverlayOpenChange: y } = F(
|
|
46
46
|
E,
|
|
47
47
|
w
|
|
48
48
|
), P = g(
|
|
49
|
-
() => ({ dismissible: u, closeButtonAriaLabel:
|
|
50
|
-
[u,
|
|
49
|
+
() => ({ kind: r, dismissible: u, closeButtonAriaLabel: p, position: a, requestClose: v }),
|
|
50
|
+
[r, u, p, a, v]
|
|
51
51
|
), { showDivider: I, dividerBefore: M, dividerInner: b, dividerAfter: B } = H(D, n), O = g(
|
|
52
52
|
() => ({ duration: c ? T : 0 }),
|
|
53
53
|
[c]
|
|
54
54
|
);
|
|
55
|
-
return
|
|
55
|
+
return r === "inline" ? /* @__PURE__ */ C(
|
|
56
56
|
q,
|
|
57
57
|
{
|
|
58
58
|
contextValue: P,
|
|
@@ -62,10 +62,10 @@ const { baseClassNamePrefix: o } = R("panel"), r = ({
|
|
|
62
62
|
dividerBefore: M,
|
|
63
63
|
dividerInner: b,
|
|
64
64
|
dividerAfter: B,
|
|
65
|
-
open:
|
|
65
|
+
open: d,
|
|
66
66
|
transitionConfig: O,
|
|
67
|
-
...
|
|
68
|
-
children:
|
|
67
|
+
...l,
|
|
68
|
+
children: m
|
|
69
69
|
}
|
|
70
70
|
) : /* @__PURE__ */ C(
|
|
71
71
|
U,
|
|
@@ -75,18 +75,18 @@ const { baseClassNamePrefix: o } = R("panel"), r = ({
|
|
|
75
75
|
resolvedPosition: n,
|
|
76
76
|
showDivider: I,
|
|
77
77
|
modalType: s,
|
|
78
|
-
open:
|
|
78
|
+
open: d,
|
|
79
79
|
onOpenChange: y,
|
|
80
80
|
transitionConfig: O,
|
|
81
|
-
...
|
|
82
|
-
children:
|
|
81
|
+
...l,
|
|
82
|
+
children: m
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
85
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
i.displayName = "Panel";
|
|
87
|
+
i.Header = S;
|
|
88
|
+
i.Body = V;
|
|
89
|
+
i.Footer = A;
|
|
90
90
|
export {
|
|
91
|
-
|
|
91
|
+
i as Panel
|
|
92
92
|
};
|
|
@@ -18,6 +18,18 @@ interface BasePanelProps extends ComponentPropsWithoutRef<'aside'> {
|
|
|
18
18
|
* Specify the content of the Panel
|
|
19
19
|
*/
|
|
20
20
|
children: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Accessible name for the panel dialog when `Panel.Header.Heading` is not rendered.
|
|
23
|
+
* When a heading is present, `aria-labelledby` is set automatically.
|
|
24
|
+
* Provide this prop whenever you build a panel without `Panel.Header.Heading` to satisfy
|
|
25
|
+
* the WCAG requirement that every `role="dialog"` element has an accessible name.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <Panel kind="overlay" aria-label="User settings" ... />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
'aria-label'?: string;
|
|
21
33
|
/**
|
|
22
34
|
* Controls the Panel's visibility. For inline panels, omitting this prop
|
|
23
35
|
* renders the panel as always-visible (uncontrolled).
|
|
@@ -44,7 +56,8 @@ interface BasePanelProps extends ComponentPropsWithoutRef<'aside'> {
|
|
|
44
56
|
*/
|
|
45
57
|
dismissible?: boolean;
|
|
46
58
|
/**
|
|
47
|
-
*
|
|
59
|
+
* Label for the close button. Used as both the button's `aria-label` (screen reader name)
|
|
60
|
+
* and the visible tooltip text. Provide a value that works in both contexts.
|
|
48
61
|
* @default 'Close panel'
|
|
49
62
|
*/
|
|
50
63
|
closeButtonAriaLabel?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viasat/beam-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.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.21.0",
|
|
63
|
+
"@viasat/beam-shared": "2.21.0",
|
|
64
|
+
"@viasat/beam-styles": "2.21.0",
|
|
65
|
+
"@viasat/beam-tokens": "2.21.0",
|
|
66
|
+
"@viasat/beam-icons": "2.21.0",
|
|
67
67
|
"clsx": "^1.2.1",
|
|
68
68
|
"@floating-ui/react": "^0.26.18",
|
|
69
69
|
"@stepperize/react": "^5.1.5",
|