@viasat/beam-react 2.19.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/Card/Card.cjs.js +1 -1
- package/lib/Card/Card.es.js +153 -147
- package/lib/Card/CardContext.d.ts +4 -0
- package/lib/Card/CardGroup.cjs.js +1 -1
- package/lib/Card/CardGroup.d.ts +20 -8
- package/lib/Card/CardGroup.es.js +81 -49
- package/lib/Card/useCardGroup.cjs.js +1 -1
- package/lib/Card/useCardGroup.es.js +16 -16
- package/lib/Card/useCardGroupValue.cjs.js +1 -1
- package/lib/Card/useCardGroupValue.d.ts +2 -1
- package/lib/Card/useCardGroupValue.es.js +33 -21
- 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
package/lib/Card/Card.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),d=require("react"),T=require("clsx"),ue=require("../../chunks/classNames.DAeKwerT.js");require("../../chunks/constants.hwjHOsvT.js");const be=require("../Box/Box.cjs.js");require("../../chunks/CSSLookup.DESAWWRT.js");require("../../utils/hooks/useId.cjs.js");const fe=require("../../utils/hooks/useInteractiveProps.cjs.js"),t=require("../../chunks/card.module.8KnCe1uR.js"),_e=require("../../chunks/form.context.B26th8Od.js");require("../Form/contexts/label.context.cjs.js");require("../Form/contexts/helperText.context.cjs.js");const ye=require("../Box/utils.cjs.js"),Ce=require("./Card.MediaAbove.cjs.js"),me=require("./Card.Header.cjs.js"),qe=require("./Card.MediaBelow.cjs.js"),ve=require("./Card.Body.cjs.js"),xe=require("./Card.Content.cjs.js"),he=require("./Card.Footer.cjs.js"),pe=require("./CardContext.cjs.js"),Ie=require("./useCardGroup.cjs.js"),$e=require("../StateLayer/StateLayer.cjs.js"),{baseClassNamePrefix:u,classModifierPrefix:c,subElementClassPrefix:b}=ue.getBEMClassNames("card"),ge='button, a, input:not([data-card-input]), select, textarea, [role="button"], [role="link"], [tabindex]:not([tabindex="-1"])',o=({children:P,className:k,density:g="md",borderColor:N,borderRadius:m,backgroundColor:E,shadow:B,type:S,as:L,disabled:O=!1,href:M,target:A,rel:H,onClick:i,selectionMode:j="single",showIndicator:F=!1,selected:V,defaultSelected:K=!1,onSelect:U,name:W,value:X,style:q,...f})=>{const a=pe.useCardGroupContext(),z=!!a,{ctxDisabled:G}=d.useContext(_e.FormContext),J=O||(z?!1:G);process.env.NODE_ENV!=="production"&&a&&S==="clickable"&&console.warn('Card: type="clickable" is ignored when Card is inside a CardGroup; treating as selectable instead.');const v=a?"selectable":S,x=!!v,r=v==="clickable",l=v==="selectable",{selected:h,handleChange:Q,resolvedValue:Y,isSelectionEligible:p,resolvedDisabled:s,resolvedName:Z,resolvedShowIndicator:ee,inputType:w}=Ie.useCardGroup({cardGroup:a,selected:V,defaultSelected:K,value:X,id:f.id,disabled:J,name:W,selectionMode:j,showIndicator:F,onSelect:U}),I=d.useRef(null),_=L??(r&&M?"a":"div"),te=d.useMemo(()=>m?{...q,"--bm-card-radius-outer":ye.BOX_BORDER_RADIUS_TO_CSS_VAR[m]}:q,[m,q]),y=d.useCallback(e=>{if(!e||!(e instanceof Element))return!1;const $=e.closest(ge);if(!$)return!1;const n=e.closest(`.${t.styles[u]}`);return $!==n},[]),D=a==null?void 0:a.readOnly,ae=d.useCallback(e=>{if(s||D)return;if(y(e.target)){if(r&&_==="a"){const n=e.target,R=n==null?void 0:n.closest('a, [role="link"]');(!R||R===e.currentTarget)&&e.preventDefault()}return}if(r&&(i==null||i(e)),l){if(!p)return;const n=e.target;if(n.tagName==="INPUT"&&n.hasAttribute("data-card-input"))return;I.current&&I.current.click()}},[r,l,p,y,_,i,s,D]),re=d.useCallback(e=>{s||e.key!=="Enter"&&e.key!==" "||y(e.target)||(e.preventDefault(),r&&(i==null||i(e)))},[r,y,i,s]),se=T(t.styles[u],!E&&t.styles[`${u}--default-background`],!B&&t.styles[`${u}--default-shadow`],!N&&t.styles[`${u}--default-border`],x&&t.styles[`${c}interactive`],r&&t.styles[`${c}clickable`],l&&t.styles[`${c}selectable`],l&&h&&t.styles[`${c}selected`],s&&t.styles[`${c}disabled`],g&&t.styles[`${c}density-${g}`],k),ie=fe.useInteractiveProps({isInteractive:x,disabled:s,isClickable:r,elementType:_,href:r?M:void 0,target:r?A:void 0,rel:r?H:void 0,onClick:ae,onKeyDown:re}),le=()=>!l||!p?null:C.jsx("input",{ref:I,type:w,className:t.styles[`${b}hidden-input`],checked:h,disabled:s,name:Z,value:Y,onChange:Q,"aria-label":f["aria-label"],"aria-labelledby":f["aria-labelledby"],"aria-invalid":(a==null?void 0:a.isInvalid)||void 0,"aria-errormessage":a==null?void 0:a.validationErrorsId,"data-card-input":""}),ne=()=>{if(!l||!ee)return null;const e=T(t.styles[`${b}selection-indicator`],t.styles[`${b}selection-indicator--${w}`],h&&t.styles[`${b}selection-indicator--checked`],s&&t.styles[`${b}selection-indicator--disabled`]);return C.jsx("span",{className:e,"aria-hidden":"true"})},{"aria-label":oe,"aria-labelledby":de,...ce}=f;return C.jsxs(be.Box,{as:_,className:se,borderColor:N,borderWidth:"md",backgroundColor:E,shadow:B,style:te,...ie,...ce,"aria-label":l?void 0:oe,"aria-labelledby":l?void 0:de,children:[le(),ne(),x&&!s&&C.jsx($e.StateLayer,{}),P]})};o.displayName="Card";o.MediaAbove=Ce.MediaAbove;o.MediaBelow=qe.MediaBelow;o.Header=me.Header;o.Body=ve.Body;o.Content=xe.Content;o.Footer=he.Footer;exports.Card=o;
|
package/lib/Card/Card.es.js
CHANGED
|
@@ -1,197 +1,203 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import { g as
|
|
1
|
+
import { jsxs as me, jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import fe, { useRef as ue, useMemo as be, useCallback as E } from "react";
|
|
3
|
+
import P from "clsx";
|
|
4
|
+
import { g as pe } from "../../chunks/classNames.BTJmrO_L.js";
|
|
5
5
|
import "../../chunks/constants.CKKGf1-i.js";
|
|
6
|
-
import { Box as
|
|
6
|
+
import { Box as he } from "../Box/Box.es.js";
|
|
7
7
|
import "../../chunks/CSSLookup.DOOy1rxJ.js";
|
|
8
8
|
import "../../utils/hooks/useId.es.js";
|
|
9
|
-
import { useInteractiveProps as
|
|
9
|
+
import { useInteractiveProps as ve } from "../../utils/hooks/useInteractiveProps.es.js";
|
|
10
10
|
import { s as t } from "../../chunks/card.module.ByBYpexJ.js";
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
11
|
+
import { F as ye } from "../../chunks/form.context.BhylRiG2.js";
|
|
12
|
+
import "../Form/contexts/label.context.es.js";
|
|
13
|
+
import "../Form/contexts/helperText.context.es.js";
|
|
14
|
+
import { BOX_BORDER_RADIUS_TO_CSS_VAR as Ie } from "../Box/utils.es.js";
|
|
15
|
+
import { MediaAbove as $e } from "./Card.MediaAbove.es.js";
|
|
16
|
+
import { Header as Ce } from "./Card.Header.es.js";
|
|
17
|
+
import { MediaBelow as ge } from "./Card.MediaBelow.es.js";
|
|
18
|
+
import { Body as xe } from "./Card.Body.es.js";
|
|
19
|
+
import { Content as Ee } from "./Card.Content.es.js";
|
|
20
|
+
import { Footer as Ne } from "./Card.Footer.es.js";
|
|
21
|
+
import { useCardGroupContext as De } from "./CardContext.es.js";
|
|
22
|
+
import { useCardGroup as we } from "./useCardGroup.es.js";
|
|
23
|
+
import { StateLayer as Se } from "../StateLayer/StateLayer.es.js";
|
|
24
|
+
const { baseClassNamePrefix: c, classModifierPrefix: d, subElementClassPrefix: m } = pe("card"), _e = 'button, a, input:not([data-card-input]), select, textarea, [role="button"], [role="link"], [tabindex]:not([tabindex="-1"])', n = ({
|
|
22
25
|
children: T,
|
|
23
26
|
className: A,
|
|
24
|
-
density:
|
|
25
|
-
borderColor:
|
|
26
|
-
borderRadius:
|
|
27
|
-
backgroundColor:
|
|
28
|
-
shadow:
|
|
29
|
-
type:
|
|
27
|
+
density: N = "md",
|
|
28
|
+
borderColor: D,
|
|
29
|
+
borderRadius: p,
|
|
30
|
+
backgroundColor: w,
|
|
31
|
+
shadow: S,
|
|
32
|
+
type: _,
|
|
30
33
|
as: L,
|
|
31
34
|
disabled: k = !1,
|
|
32
|
-
href:
|
|
33
|
-
target:
|
|
34
|
-
rel:
|
|
35
|
-
onClick:
|
|
36
|
-
selectionMode:
|
|
37
|
-
showIndicator:
|
|
38
|
-
selected:
|
|
39
|
-
defaultSelected:
|
|
40
|
-
onSelect:
|
|
41
|
-
name:
|
|
42
|
-
value:
|
|
43
|
-
style:
|
|
44
|
-
...
|
|
35
|
+
href: B,
|
|
36
|
+
target: F,
|
|
37
|
+
rel: H,
|
|
38
|
+
onClick: s,
|
|
39
|
+
selectionMode: V = "single",
|
|
40
|
+
showIndicator: j = !1,
|
|
41
|
+
selected: K,
|
|
42
|
+
defaultSelected: U = !1,
|
|
43
|
+
onSelect: W,
|
|
44
|
+
name: X,
|
|
45
|
+
value: q,
|
|
46
|
+
style: h,
|
|
47
|
+
...f
|
|
45
48
|
}) => {
|
|
46
|
-
const
|
|
47
|
-
process.env.NODE_ENV !== "production" &&
|
|
49
|
+
const a = De(), z = !!a, { ctxDisabled: J } = fe.useContext(ye), Q = k || (z ? !1 : J);
|
|
50
|
+
process.env.NODE_ENV !== "production" && a && _ === "clickable" && console.warn(
|
|
48
51
|
'Card: type="clickable" is ignored when Card is inside a CardGroup; treating as selectable instead.'
|
|
49
52
|
);
|
|
50
|
-
const
|
|
53
|
+
const v = a ? "selectable" : _, y = !!v, r = v === "clickable", o = v === "selectable", {
|
|
51
54
|
selected: I,
|
|
52
|
-
handleChange:
|
|
53
|
-
resolvedValue:
|
|
54
|
-
isSelectionEligible:
|
|
55
|
-
resolvedDisabled:
|
|
56
|
-
resolvedName:
|
|
57
|
-
resolvedShowIndicator:
|
|
58
|
-
inputType:
|
|
59
|
-
} =
|
|
60
|
-
cardGroup:
|
|
61
|
-
selected:
|
|
62
|
-
defaultSelected:
|
|
63
|
-
value:
|
|
64
|
-
id:
|
|
65
|
-
disabled:
|
|
66
|
-
name:
|
|
67
|
-
selectionMode:
|
|
68
|
-
showIndicator:
|
|
69
|
-
onSelect:
|
|
70
|
-
}),
|
|
71
|
-
...
|
|
72
|
-
"--bm-card-radius-outer":
|
|
73
|
-
} :
|
|
55
|
+
handleChange: Y,
|
|
56
|
+
resolvedValue: Z,
|
|
57
|
+
isSelectionEligible: $,
|
|
58
|
+
resolvedDisabled: i,
|
|
59
|
+
resolvedName: G,
|
|
60
|
+
resolvedShowIndicator: ee,
|
|
61
|
+
inputType: M
|
|
62
|
+
} = we({
|
|
63
|
+
cardGroup: a,
|
|
64
|
+
selected: K,
|
|
65
|
+
defaultSelected: U,
|
|
66
|
+
value: q,
|
|
67
|
+
id: f.id,
|
|
68
|
+
disabled: Q,
|
|
69
|
+
name: X,
|
|
70
|
+
selectionMode: V,
|
|
71
|
+
showIndicator: j,
|
|
72
|
+
onSelect: W
|
|
73
|
+
}), C = ue(null), u = L ?? (r && B ? "a" : "div"), te = be(() => p ? {
|
|
74
|
+
...h,
|
|
75
|
+
"--bm-card-radius-outer": Ie[p]
|
|
76
|
+
} : h, [p, h]), b = E(
|
|
74
77
|
(e) => {
|
|
75
78
|
if (!e || !(e instanceof Element)) return !1;
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
78
|
-
const
|
|
79
|
-
return
|
|
79
|
+
const g = e.closest(_e);
|
|
80
|
+
if (!g) return !1;
|
|
81
|
+
const l = e.closest(`.${t[c]}`);
|
|
82
|
+
return g !== l;
|
|
80
83
|
},
|
|
81
84
|
[]
|
|
82
|
-
),
|
|
85
|
+
), R = a == null ? void 0 : a.readOnly, ae = E(
|
|
83
86
|
(e) => {
|
|
84
|
-
if (
|
|
85
|
-
if (
|
|
86
|
-
if (r &&
|
|
87
|
-
const
|
|
88
|
-
(!
|
|
87
|
+
if (i || R) return;
|
|
88
|
+
if (b(e.target)) {
|
|
89
|
+
if (r && u === "a") {
|
|
90
|
+
const l = e.target, O = l == null ? void 0 : l.closest('a, [role="link"]');
|
|
91
|
+
(!O || O === e.currentTarget) && e.preventDefault();
|
|
89
92
|
}
|
|
90
93
|
return;
|
|
91
94
|
}
|
|
92
|
-
if (r && (
|
|
93
|
-
if (
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
95
|
+
if (r && (s == null || s(e)), o) {
|
|
96
|
+
if (!$) return;
|
|
97
|
+
const l = e.target;
|
|
98
|
+
if (l.tagName === "INPUT" && l.hasAttribute("data-card-input"))
|
|
96
99
|
return;
|
|
97
|
-
|
|
100
|
+
C.current && C.current.click();
|
|
98
101
|
}
|
|
99
102
|
},
|
|
100
103
|
[
|
|
101
104
|
r,
|
|
102
105
|
o,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
$,
|
|
107
|
+
b,
|
|
108
|
+
u,
|
|
109
|
+
s,
|
|
106
110
|
i,
|
|
107
|
-
|
|
111
|
+
R
|
|
108
112
|
]
|
|
109
|
-
),
|
|
113
|
+
), re = E(
|
|
110
114
|
(e) => {
|
|
111
|
-
|
|
115
|
+
i || e.key !== "Enter" && e.key !== " " || b(e.target) || (e.preventDefault(), r && (s == null || s(e)));
|
|
112
116
|
},
|
|
113
|
-
[r,
|
|
114
|
-
),
|
|
115
|
-
t[
|
|
116
|
-
!
|
|
117
|
-
!
|
|
118
|
-
!
|
|
119
|
-
|
|
120
|
-
r && t[`${
|
|
121
|
-
o && t[`${
|
|
122
|
-
o && I && t[`${
|
|
123
|
-
|
|
124
|
-
|
|
117
|
+
[r, b, s, i]
|
|
118
|
+
), ie = P(
|
|
119
|
+
t[c],
|
|
120
|
+
!w && t[`${c}--default-background`],
|
|
121
|
+
!S && t[`${c}--default-shadow`],
|
|
122
|
+
!D && t[`${c}--default-border`],
|
|
123
|
+
y && t[`${d}interactive`],
|
|
124
|
+
r && t[`${d}clickable`],
|
|
125
|
+
o && t[`${d}selectable`],
|
|
126
|
+
o && I && t[`${d}selected`],
|
|
127
|
+
i && t[`${d}disabled`],
|
|
128
|
+
N && t[`${d}density-${N}`],
|
|
125
129
|
A
|
|
126
|
-
),
|
|
127
|
-
isInteractive:
|
|
128
|
-
disabled:
|
|
130
|
+
), se = ve({
|
|
131
|
+
isInteractive: y,
|
|
132
|
+
disabled: i,
|
|
129
133
|
isClickable: r,
|
|
130
|
-
elementType:
|
|
131
|
-
href: r ?
|
|
132
|
-
target: r ?
|
|
133
|
-
rel: r ?
|
|
134
|
-
onClick:
|
|
135
|
-
onKeyDown:
|
|
136
|
-
}),
|
|
134
|
+
elementType: u,
|
|
135
|
+
href: r ? B : void 0,
|
|
136
|
+
target: r ? F : void 0,
|
|
137
|
+
rel: r ? H : void 0,
|
|
138
|
+
onClick: ae,
|
|
139
|
+
onKeyDown: re
|
|
140
|
+
}), oe = () => !o || !$ ? null : /* @__PURE__ */ x(
|
|
137
141
|
"input",
|
|
138
142
|
{
|
|
139
|
-
ref:
|
|
140
|
-
type:
|
|
141
|
-
className: t[`${
|
|
143
|
+
ref: C,
|
|
144
|
+
type: M,
|
|
145
|
+
className: t[`${m}hidden-input`],
|
|
142
146
|
checked: I,
|
|
143
|
-
disabled:
|
|
144
|
-
name:
|
|
145
|
-
value:
|
|
146
|
-
onChange:
|
|
147
|
-
"aria-label":
|
|
148
|
-
"aria-labelledby":
|
|
147
|
+
disabled: i,
|
|
148
|
+
name: G,
|
|
149
|
+
value: Z,
|
|
150
|
+
onChange: Y,
|
|
151
|
+
"aria-label": f["aria-label"],
|
|
152
|
+
"aria-labelledby": f["aria-labelledby"],
|
|
153
|
+
"aria-invalid": (a == null ? void 0 : a.isInvalid) || void 0,
|
|
154
|
+
"aria-errormessage": a == null ? void 0 : a.validationErrorsId,
|
|
149
155
|
"data-card-input": ""
|
|
150
156
|
}
|
|
151
|
-
),
|
|
152
|
-
if (!o || !
|
|
153
|
-
const e =
|
|
154
|
-
t[`${
|
|
155
|
-
t[`${
|
|
156
|
-
I && t[`${
|
|
157
|
-
|
|
157
|
+
), le = () => {
|
|
158
|
+
if (!o || !ee) return null;
|
|
159
|
+
const e = P(
|
|
160
|
+
t[`${m}selection-indicator`],
|
|
161
|
+
t[`${m}selection-indicator--${M}`],
|
|
162
|
+
I && t[`${m}selection-indicator--checked`],
|
|
163
|
+
i && t[`${m}selection-indicator--disabled`]
|
|
158
164
|
);
|
|
159
|
-
return /* @__PURE__ */
|
|
165
|
+
return /* @__PURE__ */ x("span", { className: e, "aria-hidden": "true" });
|
|
160
166
|
}, {
|
|
161
|
-
"aria-label":
|
|
162
|
-
"aria-labelledby":
|
|
163
|
-
...
|
|
164
|
-
} =
|
|
165
|
-
return /* @__PURE__ */
|
|
166
|
-
|
|
167
|
+
"aria-label": ne,
|
|
168
|
+
"aria-labelledby": de,
|
|
169
|
+
...ce
|
|
170
|
+
} = f;
|
|
171
|
+
return /* @__PURE__ */ me(
|
|
172
|
+
he,
|
|
167
173
|
{
|
|
168
|
-
as:
|
|
169
|
-
className:
|
|
170
|
-
borderColor:
|
|
174
|
+
as: u,
|
|
175
|
+
className: ie,
|
|
176
|
+
borderColor: D,
|
|
171
177
|
borderWidth: "md",
|
|
172
|
-
backgroundColor:
|
|
173
|
-
shadow:
|
|
174
|
-
style:
|
|
175
|
-
...te,
|
|
178
|
+
backgroundColor: w,
|
|
179
|
+
shadow: S,
|
|
180
|
+
style: te,
|
|
176
181
|
...se,
|
|
177
|
-
|
|
178
|
-
"aria-
|
|
182
|
+
...ce,
|
|
183
|
+
"aria-label": o ? void 0 : ne,
|
|
184
|
+
"aria-labelledby": o ? void 0 : de,
|
|
179
185
|
children: [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
186
|
+
oe(),
|
|
187
|
+
le(),
|
|
188
|
+
y && !i && /* @__PURE__ */ x(Se, {}),
|
|
183
189
|
T
|
|
184
190
|
]
|
|
185
191
|
}
|
|
186
192
|
);
|
|
187
193
|
};
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
194
|
+
n.displayName = "Card";
|
|
195
|
+
n.MediaAbove = $e;
|
|
196
|
+
n.MediaBelow = ge;
|
|
197
|
+
n.Header = Ce;
|
|
198
|
+
n.Body = xe;
|
|
199
|
+
n.Content = Ee;
|
|
200
|
+
n.Footer = Ne;
|
|
195
201
|
export {
|
|
196
|
-
|
|
202
|
+
n as Card
|
|
197
203
|
};
|
|
@@ -5,8 +5,12 @@ export interface CardGroupContextValue {
|
|
|
5
5
|
showIndicator?: boolean;
|
|
6
6
|
name?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
readOnly?: boolean;
|
|
8
10
|
value?: string | string[];
|
|
9
11
|
onItemSelect?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
validationErrorsId?: string;
|
|
13
|
+
isInvalid?: boolean;
|
|
10
14
|
}
|
|
11
15
|
export declare const CardGroupProvider: ({ children, value, }: {
|
|
12
16
|
children: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),u=require("react"),E=require("../../utils/functions.cjs.js"),k=require("clsx"),F=require("../../chunks/classNames.DAeKwerT.js");require("../../chunks/constants.hwjHOsvT.js");const T=require("../../chunks/card.module.8KnCe1uR.js");require("../../chunks/CSSLookup.DESAWWRT.js");const A=require("../../utils/hooks/useId.cjs.js"),B=require("../Form/hooks/useAccessibleId.hook.cjs.js"),H=require("../../chunks/form.context.B26th8Od.js");require("../Form/contexts/label.context.cjs.js");require("../Form/contexts/helperText.context.cjs.js");const L=require("./CardContext.cjs.js"),$=require("./useCardGroupValue.cjs.js"),{classModifierPrefix:z}=F.getBEMClassNames("card"),q=u.forwardRef((v,_)=>{const{children:f,className:p,disabled:y=!1,required:C=!1,readOnly:g=!1,validationRules:h=[],selectionMode:e="single",showIndicator:n=!1,name:I,value:x,defaultValue:N,onChange:R,"aria-label":G,"aria-labelledby":P,...M}=v,O=A.useId(),{id:r}=B.useAccessibleId(),o=I??O,{showErrors:S,isInvalid:i,errorShown:l,disabled:a,readOnly:s,required:d}=H.useFormField({name:o,validationRules:h,disabledProp:y,readOnlyProp:g,requiredProp:C}),t=u.useRef(null),{currentValue:c,handleItemSelect:b}=$.useCardGroupValue({value:x,defaultValue:N,selectionMode:e,onChange:R,rootRef:t}),V=k(a&&T.styles[`${z}disabled`],p),j=e==="single"?"radiogroup":"group",w=u.useMemo(()=>({selectionMode:e,showIndicator:n,name:o,disabled:a,required:d,readOnly:s,value:c,onItemSelect:b,validationErrorsId:l?r:void 0,isInvalid:i}),[e,n,o,a,d,s,c,b,l,r,i]);return m.jsxs("div",{ref:E.mergeRefs(t,_),role:j,"aria-disabled":a||s||void 0,"aria-readonly":s||void 0,"aria-required":d||void 0,"aria-invalid":i||void 0,"aria-errormessage":l?r:void 0,"aria-label":G,"aria-labelledby":P,className:V,...M,children:[m.jsx(L.CardGroupProvider,{value:w,children:f}),S(r)]})});q.displayName="CardGroup";exports.CardGroup=q;
|
package/lib/Card/CardGroup.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { CardGroupSelectionMode } from '@viasat/beam-shared/components/card';
|
|
3
|
-
|
|
3
|
+
import { FormValidator } from '@viasat/beam-shared/components/form';
|
|
4
|
+
export interface CardGroupProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
|
|
4
5
|
/**
|
|
5
6
|
* The Cards that belong to this CardGroup
|
|
6
7
|
*/
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
+
'children'?: React.ReactNode;
|
|
8
9
|
/**
|
|
9
10
|
* Accessible group label
|
|
10
11
|
*/
|
|
@@ -48,8 +49,19 @@ export type CardGroupProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'onChan
|
|
|
48
49
|
* Callback invoked when the group selection changes
|
|
49
50
|
*/
|
|
50
51
|
'onChange'?: (value: string | string[] | undefined, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Specify if the group is a required field
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
'required'?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Specify if the group displays in a read-only state
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
'readOnly'?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Specify form validation rules for the group
|
|
64
|
+
*/
|
|
65
|
+
'validationRules'?: FormValidator[];
|
|
66
|
+
}
|
|
67
|
+
export declare const CardGroup: React.ForwardRefExoticComponent<CardGroupProps & React.RefAttributes<HTMLDivElement>>;
|
package/lib/Card/CardGroup.es.js
CHANGED
|
@@ -1,67 +1,99 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as O, jsx as V } from "react/jsx-runtime";
|
|
2
|
+
import S, { forwardRef as j, useMemo as B } from "react";
|
|
3
|
+
import { mergeRefs as F } from "../../utils/functions.es.js";
|
|
4
|
+
import L from "clsx";
|
|
5
|
+
import { g as A } from "../../chunks/classNames.BTJmrO_L.js";
|
|
5
6
|
import "../../chunks/constants.CKKGf1-i.js";
|
|
6
|
-
import { s as
|
|
7
|
+
import { s as $ } from "../../chunks/card.module.ByBYpexJ.js";
|
|
7
8
|
import "../../chunks/CSSLookup.DOOy1rxJ.js";
|
|
8
|
-
import { useId as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
9
|
+
import { useId as k } from "../../utils/hooks/useId.es.js";
|
|
10
|
+
import { useAccessibleId as z } from "../Form/hooks/useAccessibleId.hook.es.js";
|
|
11
|
+
import { b as D } from "../../chunks/form.context.BhylRiG2.js";
|
|
12
|
+
import "../Form/contexts/label.context.es.js";
|
|
13
|
+
import "../Form/contexts/helperText.context.es.js";
|
|
14
|
+
import { CardGroupProvider as H } from "./CardContext.es.js";
|
|
15
|
+
import { useCardGroupValue as J } from "./useCardGroupValue.es.js";
|
|
16
|
+
const { classModifierPrefix: K } = A("card"), Q = j((c, p) => {
|
|
12
17
|
const {
|
|
13
|
-
children:
|
|
14
|
-
className:
|
|
15
|
-
disabled:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
children: f,
|
|
19
|
+
className: v,
|
|
20
|
+
disabled: b = !1,
|
|
21
|
+
required: y = !1,
|
|
22
|
+
readOnly: g = !1,
|
|
23
|
+
validationRules: I = [],
|
|
24
|
+
selectionMode: e = "single",
|
|
25
|
+
showIndicator: t = !1,
|
|
26
|
+
name: h,
|
|
27
|
+
value: N,
|
|
28
|
+
defaultValue: x,
|
|
29
|
+
onChange: C,
|
|
30
|
+
"aria-label": R,
|
|
31
|
+
"aria-labelledby": _,
|
|
32
|
+
...q
|
|
33
|
+
} = c, P = k(), { id: r } = z(), i = h ?? P, { showErrors: w, isInvalid: s, errorShown: l, disabled: a, readOnly: o, required: d } = D({
|
|
34
|
+
name: i,
|
|
35
|
+
validationRules: I,
|
|
36
|
+
disabledProp: b,
|
|
37
|
+
readOnlyProp: g,
|
|
38
|
+
requiredProp: y
|
|
39
|
+
}), m = S.useRef(null), { currentValue: n, handleItemSelect: u } = J({
|
|
40
|
+
value: N,
|
|
41
|
+
defaultValue: x,
|
|
42
|
+
selectionMode: e,
|
|
43
|
+
onChange: C,
|
|
44
|
+
rootRef: m
|
|
45
|
+
}), E = L(
|
|
46
|
+
a && $[`${K}disabled`],
|
|
47
|
+
v
|
|
48
|
+
), G = e === "single" ? "radiogroup" : "group", M = B(
|
|
34
49
|
() => ({
|
|
35
|
-
selectionMode:
|
|
36
|
-
showIndicator:
|
|
37
|
-
name:
|
|
38
|
-
disabled:
|
|
39
|
-
|
|
40
|
-
|
|
50
|
+
selectionMode: e,
|
|
51
|
+
showIndicator: t,
|
|
52
|
+
name: i,
|
|
53
|
+
disabled: a,
|
|
54
|
+
required: d,
|
|
55
|
+
readOnly: o,
|
|
56
|
+
value: n,
|
|
57
|
+
onItemSelect: u,
|
|
58
|
+
validationErrorsId: l ? r : void 0,
|
|
59
|
+
isInvalid: s
|
|
41
60
|
}),
|
|
42
61
|
[
|
|
62
|
+
e,
|
|
63
|
+
t,
|
|
64
|
+
i,
|
|
43
65
|
a,
|
|
44
|
-
|
|
66
|
+
d,
|
|
45
67
|
o,
|
|
46
|
-
|
|
68
|
+
n,
|
|
69
|
+
u,
|
|
47
70
|
l,
|
|
71
|
+
r,
|
|
48
72
|
s
|
|
49
73
|
]
|
|
50
74
|
);
|
|
51
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ O(
|
|
52
76
|
"div",
|
|
53
77
|
{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"aria-
|
|
57
|
-
"aria-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
78
|
+
ref: F(m, p),
|
|
79
|
+
role: G,
|
|
80
|
+
"aria-disabled": a || o || void 0,
|
|
81
|
+
"aria-readonly": o || void 0,
|
|
82
|
+
"aria-required": d || void 0,
|
|
83
|
+
"aria-invalid": s || void 0,
|
|
84
|
+
"aria-errormessage": l ? r : void 0,
|
|
85
|
+
"aria-label": R,
|
|
86
|
+
"aria-labelledby": _,
|
|
87
|
+
className: E,
|
|
88
|
+
...q,
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ V(H, { value: M, children: f }),
|
|
91
|
+
w(r)
|
|
92
|
+
]
|
|
61
93
|
}
|
|
62
94
|
);
|
|
63
|
-
};
|
|
64
|
-
|
|
95
|
+
});
|
|
96
|
+
Q.displayName = "CardGroup";
|
|
65
97
|
export {
|
|
66
|
-
|
|
98
|
+
Q as CardGroup
|
|
67
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),D=require("./card.utils.cjs.js");function a({cardGroup:e,selected:C,defaultSelected:S,value:b,id:m,disabled:y,name:I,selectionMode:M,showIndicator:h,onSelect:n}){const t=!!e,s=b??m,o=!t||!!s;i.useEffect(()=>{process.env.NODE_ENV!=="production"&&t&&!s&&console.warn("Card: A Card inside a CardGroup is missing a `value` or `id` prop. It will not participate in group selection.")},[]);const f=y||(e==null?void 0:e.disabled)||!1,w=(e==null?void 0:e.name)??I,E=(e==null?void 0:e.showIndicator)??h,_=(e==null?void 0:e.selectionMode)??M??"single",A=D.getInputType(_),[N,O]=i.useState(()=>t?!1:S),T=C!==void 0?C:N,l=e==null?void 0:e.value,v=(e==null?void 0:e.selectionMode)??"single",V=i.useMemo(()=>!t||!s?null:v==="single"?l===s:Array.isArray(l)?l.includes(s):!1,[l,v,t,s]),k=t?V??!1:T,q=i.useCallback(g=>{f||e!=null&&e.readOnly||!o||(e!=null&&e.onItemSelect&&s?e.onItemSelect(s,g):O(g.target.checked),n==null||n(g))},[f,o,e,s,n]);return{selected:k,handleChange:q,resolvedValue:s,isSelectionEligible:o,resolvedDisabled:f,resolvedName:w,resolvedShowIndicator:E,inputType:A}}exports.useCardGroup=a;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect as
|
|
1
|
+
import { useEffect as x, useState as _, useMemo as j, useCallback as q } from "react";
|
|
2
2
|
import { getInputType as z } from "./card.utils.es.js";
|
|
3
3
|
function J({
|
|
4
4
|
cardGroup: e,
|
|
@@ -8,32 +8,32 @@ function J({
|
|
|
8
8
|
id: I,
|
|
9
9
|
disabled: S,
|
|
10
10
|
name: h,
|
|
11
|
-
selectionMode:
|
|
12
|
-
showIndicator:
|
|
11
|
+
selectionMode: y,
|
|
12
|
+
showIndicator: M,
|
|
13
13
|
onSelect: n
|
|
14
14
|
}) {
|
|
15
|
-
const t = !!e, s = v ?? I,
|
|
16
|
-
|
|
15
|
+
const t = !!e, s = v ?? I, i = !t || !!s;
|
|
16
|
+
x(() => {
|
|
17
17
|
process.env.NODE_ENV !== "production" && t && !s && console.warn(
|
|
18
18
|
"Card: A Card inside a CardGroup is missing a `value` or `id` prop. It will not participate in group selection."
|
|
19
19
|
);
|
|
20
20
|
}, []);
|
|
21
|
-
const
|
|
21
|
+
const f = S || (e == null ? void 0 : e.disabled) || !1, b = (e == null ? void 0 : e.name) ?? h, w = (e == null ? void 0 : e.showIndicator) ?? M, E = (e == null ? void 0 : e.selectionMode) ?? y ?? "single", A = z(E), [N, V] = _(
|
|
22
22
|
() => t ? !1 : C
|
|
23
|
-
), k = g !== void 0 ? g : N,
|
|
24
|
-
(
|
|
25
|
-
|
|
23
|
+
), k = g !== void 0 ? g : N, l = e == null ? void 0 : e.value, m = (e == null ? void 0 : e.selectionMode) ?? "single", D = j(() => !t || !s ? null : m === "single" ? l === s : Array.isArray(l) ? l.includes(s) : !1, [l, m, t, s]), O = t ? D ?? !1 : k, T = q(
|
|
24
|
+
(o) => {
|
|
25
|
+
f || e != null && e.readOnly || !i || (e != null && e.onItemSelect && s ? e.onItemSelect(s, o) : V(o.target.checked), n == null || n(o));
|
|
26
26
|
},
|
|
27
|
-
[
|
|
27
|
+
[f, i, e, s, n]
|
|
28
28
|
);
|
|
29
29
|
return {
|
|
30
|
-
selected:
|
|
31
|
-
handleChange:
|
|
30
|
+
selected: O,
|
|
31
|
+
handleChange: T,
|
|
32
32
|
resolvedValue: s,
|
|
33
|
-
isSelectionEligible:
|
|
34
|
-
resolvedDisabled:
|
|
35
|
-
resolvedName:
|
|
36
|
-
resolvedShowIndicator:
|
|
33
|
+
isSelectionEligible: i,
|
|
34
|
+
resolvedDisabled: f,
|
|
35
|
+
resolvedName: b,
|
|
36
|
+
resolvedShowIndicator: w,
|
|
37
37
|
inputType: A
|
|
38
38
|
};
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),l=require("./card.utils.cjs.js");function A({value:f,defaultValue:m,selectionMode:u,onChange:e,rootRef:c}){const t=f!==void 0,y=i.useRef(u==="single"?l.normalizeToSingle(m):l.normalizeToArray(m)),[T,a]=i.useState(()=>y.current);i.useEffect(()=>{var s;if(t)return;const r=(s=c==null?void 0:c.current)==null?void 0:s.closest("form");if(!r)return;const n=()=>a(y.current);return r.addEventListener("reset",n),()=>r.removeEventListener("reset",n)},[t,c]);const o=t?f:T,d=i.useMemo(()=>u==="single"?l.normalizeToSingle(o):l.normalizeToArray(o),[o,u]),z=i.useCallback((r,n)=>{if(u==="single"){t||a(r),e==null||e(r,n);return}const s=l.normalizeToArray(d),S=s.includes(r)?s.filter(b=>b!==r):[...s,r];t||a(S),e==null||e(S,n)},[u,d,t,e]);return{currentValue:d,handleItemSelect:z}}exports.useCardGroupValue=A;
|
|
@@ -5,10 +5,11 @@ interface UseCardGroupValueParams {
|
|
|
5
5
|
defaultValue: string | string[] | undefined;
|
|
6
6
|
selectionMode: CardGroupSelectionMode;
|
|
7
7
|
onChange?: (value: string | string[] | undefined, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
rootRef?: React.RefObject<HTMLDivElement>;
|
|
8
9
|
}
|
|
9
10
|
interface UseCardGroupValueReturn {
|
|
10
11
|
currentValue: string | string[] | undefined;
|
|
11
12
|
handleItemSelect: (itemValue: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
13
|
}
|
|
13
|
-
export declare function useCardGroupValue({ value, defaultValue, selectionMode, onChange, }: UseCardGroupValueParams): UseCardGroupValueReturn;
|
|
14
|
+
export declare function useCardGroupValue({ value, defaultValue, selectionMode, onChange, rootRef, }: UseCardGroupValueParams): UseCardGroupValueReturn;
|
|
14
15
|
export {};
|
|
@@ -1,29 +1,41 @@
|
|
|
1
|
-
import { useState as I, useMemo as
|
|
2
|
-
import { normalizeToSingle as
|
|
3
|
-
function
|
|
4
|
-
value:
|
|
5
|
-
defaultValue:
|
|
6
|
-
selectionMode:
|
|
7
|
-
onChange:
|
|
1
|
+
import { useRef as z, useState as A, useEffect as I, useMemo as L, useCallback as T } from "react";
|
|
2
|
+
import { normalizeToSingle as S, normalizeToArray as m } from "./card.utils.es.js";
|
|
3
|
+
function k({
|
|
4
|
+
value: a,
|
|
5
|
+
defaultValue: p,
|
|
6
|
+
selectionMode: u,
|
|
7
|
+
onChange: t,
|
|
8
|
+
rootRef: n
|
|
8
9
|
}) {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
),
|
|
12
|
-
() =>
|
|
13
|
-
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
const s = a !== void 0, d = z(
|
|
11
|
+
u === "single" ? S(p) : m(p)
|
|
12
|
+
), [v, i] = A(
|
|
13
|
+
() => d.current
|
|
14
|
+
);
|
|
15
|
+
I(() => {
|
|
16
|
+
var e;
|
|
17
|
+
if (s) return;
|
|
18
|
+
const r = (e = n == null ? void 0 : n.current) == null ? void 0 : e.closest("form");
|
|
19
|
+
if (!r) return;
|
|
20
|
+
const c = () => i(d.current);
|
|
21
|
+
return r.addEventListener("reset", c), () => r.removeEventListener("reset", c);
|
|
22
|
+
}, [s, n]);
|
|
23
|
+
const l = s ? a : v, f = L(
|
|
24
|
+
() => u === "single" ? S(l) : m(l),
|
|
25
|
+
[l, u]
|
|
26
|
+
), x = T(
|
|
27
|
+
(r, c) => {
|
|
28
|
+
if (u === "single") {
|
|
29
|
+
s || i(r), t == null || t(r, c);
|
|
18
30
|
return;
|
|
19
31
|
}
|
|
20
|
-
const
|
|
21
|
-
|
|
32
|
+
const e = m(f), E = e.includes(r) ? e.filter((y) => y !== r) : [...e, r];
|
|
33
|
+
s || i(E), t == null || t(E, c);
|
|
22
34
|
},
|
|
23
|
-
[
|
|
35
|
+
[u, f, s, t]
|
|
24
36
|
);
|
|
25
|
-
return { currentValue:
|
|
37
|
+
return { currentValue: f, handleItemSelect: x };
|
|
26
38
|
}
|
|
27
39
|
export {
|
|
28
|
-
|
|
40
|
+
k as useCardGroupValue
|
|
29
41
|
};
|
|
@@ -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",
|