@viasat/beam-react 2.29.0 → 2.30.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/Autocomplete/Autocomplete.cjs.js +1 -1
- package/lib/Autocomplete/Autocomplete.d.ts +6 -0
- package/lib/Autocomplete/Autocomplete.es.js +108 -106
- package/lib/Autocomplete/AutocompleteField.cjs.js +1 -1
- package/lib/Autocomplete/AutocompleteField.d.ts +1 -0
- package/lib/Autocomplete/AutocompleteField.es.js +24 -23
- package/lib/_Options/useSelectValue.cjs.js +1 -1
- package/lib/_Options/useSelectValue.es.js +84 -70
- package/lib/wip/Panel/Panel.Inline.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Inline.d.ts +3 -1
- package/lib/wip/Panel/Panel.Inline.es.js +45 -42
- package/lib/wip/Panel/Panel.Overlay.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Overlay.d.ts +3 -1
- package/lib/wip/Panel/Panel.Overlay.es.js +61 -50
- package/lib/wip/Panel/Panel.cjs.js +1 -1
- package/lib/wip/Panel/Panel.es.js +91 -83
- package/package.json +6 -6
|
@@ -1,116 +1,124 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { g as
|
|
1
|
+
import { jsx as S } from "react/jsx-runtime";
|
|
2
|
+
import z from "clsx";
|
|
3
|
+
import { useMemo as x, useRef as W } from "react";
|
|
4
|
+
import { g as q } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
5
5
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
6
|
-
import { Header as
|
|
7
|
-
import { Body as
|
|
8
|
-
import { Footer as
|
|
9
|
-
import { resolveOffset as
|
|
10
|
-
import { InlinePanel as
|
|
11
|
-
import { OverlayPanel as
|
|
6
|
+
import { Header as G } from "./Header/Panel.Header.es.js";
|
|
7
|
+
import { Body as U } from "./Panel.Body.es.js";
|
|
8
|
+
import { Footer as Q } from "./Footer/Panel.Footer.es.js";
|
|
9
|
+
import { resolveOffset as X, usePanelClose as Y, getPanelDividerState as Z, PANEL_TRANSITION_DURATION_MS as k, getResolvedPanelPosition as ee } from "./Panel.helpers.es.js";
|
|
10
|
+
import { InlinePanel as oe } from "./Panel.Inline.es.js";
|
|
11
|
+
import { OverlayPanel as se } from "./Panel.Overlay.es.js";
|
|
12
12
|
import { s as e } from "../../../chunks/panel.module.BblnuBjO.js";
|
|
13
|
-
const
|
|
14
|
-
if (!
|
|
15
|
-
const p = m === "bottom",
|
|
16
|
-
return { minSize:
|
|
17
|
-
}, { baseClassNamePrefix: o } =
|
|
18
|
-
children:
|
|
13
|
+
const ne = 165, te = 100, re = (n, m) => {
|
|
14
|
+
if (!n || m === "full") return;
|
|
15
|
+
const p = m === "bottom", i = typeof n == "object" ? n : {}, a = i.minSize ?? (p ? te : ne), t = i.maxSize ?? 1 / 0, f = i.storageKey ?? "";
|
|
16
|
+
return { minSize: a, maxSize: t, storageKey: f };
|
|
17
|
+
}, { baseClassNamePrefix: o } = q("panel"), d = ({
|
|
18
|
+
children: n,
|
|
19
19
|
className: m,
|
|
20
20
|
padding: p = "md",
|
|
21
|
-
onOpenChange:
|
|
22
|
-
open:
|
|
23
|
-
size:
|
|
21
|
+
onOpenChange: i,
|
|
22
|
+
open: a,
|
|
23
|
+
size: t = "md",
|
|
24
24
|
dismissible: f = !0,
|
|
25
25
|
closeButtonAriaLabel: N = "Close panel",
|
|
26
|
-
kind:
|
|
27
|
-
position:
|
|
28
|
-
divider:
|
|
29
|
-
dividerColor:
|
|
30
|
-
isAnimated:
|
|
31
|
-
onBeforeClose:
|
|
32
|
-
modalType:
|
|
33
|
-
offset:
|
|
34
|
-
resizable:
|
|
26
|
+
kind: s = "inline",
|
|
27
|
+
position: u,
|
|
28
|
+
divider: D = !0,
|
|
29
|
+
dividerColor: P,
|
|
30
|
+
isAnimated: O = !0,
|
|
31
|
+
onBeforeClose: A,
|
|
32
|
+
modalType: l,
|
|
33
|
+
offset: C,
|
|
34
|
+
resizable: B,
|
|
35
35
|
id: _,
|
|
36
|
-
...
|
|
36
|
+
...g
|
|
37
37
|
}) => {
|
|
38
|
-
const
|
|
38
|
+
const r = ee(u), c = re(B, r), R = !!c;
|
|
39
39
|
if (process.env.NODE_ENV !== "production") {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
c && !c.storageKey && console.warn(
|
|
41
|
+
"Panel: provide a `storageKey` in the `resizable` config to persist panel size across sessions."
|
|
42
|
+
), l === "alert" && f && console.warn(
|
|
43
|
+
'Panel: `dismissible` is ignored when `modalType="alert"`. The close button is always hidden.'
|
|
44
|
+
);
|
|
45
|
+
const { closeOnOutsidePress: V } = g;
|
|
46
|
+
V && l !== "nonModal" && l !== void 0 && console.warn(
|
|
47
|
+
'Panel: `closeOnOutsidePress` has no effect when `modalType` is not `"nonModal"`.'
|
|
48
|
+
);
|
|
43
49
|
}
|
|
44
|
-
const y =
|
|
50
|
+
const y = l === "alert" ? !1 : f, T = t && (r !== "bottom" || t === "full"), $ = s === "overlay" && C ? X(C) : void 0, h = !!$, I = z(
|
|
45
51
|
e[o],
|
|
46
|
-
e[`${o}--${
|
|
47
|
-
T && e[`${o}--size-${
|
|
52
|
+
e[`${o}--${s}`],
|
|
53
|
+
T && e[`${o}--size-${t}`],
|
|
48
54
|
e[`${o}--padding-${p}`],
|
|
49
|
-
e[`${o}--position-${
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
e[`${o}--position-${r}`],
|
|
56
|
+
h && e[`${o}--floating`],
|
|
57
|
+
R && e[`${o}--resizable`],
|
|
52
58
|
m
|
|
53
|
-
),
|
|
59
|
+
), H = z(
|
|
54
60
|
e[`${o}__inline-wrapper`],
|
|
55
|
-
e[`${o}__inline-wrapper--size-${
|
|
56
|
-
), { requestClose:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
),
|
|
61
|
+
e[`${o}__inline-wrapper--size-${t}`]
|
|
62
|
+
), { requestClose: b, handleOverlayOpenChange: K } = Y(
|
|
63
|
+
A,
|
|
64
|
+
i
|
|
65
|
+
), w = x(
|
|
60
66
|
() => ({
|
|
61
|
-
kind:
|
|
67
|
+
kind: s,
|
|
62
68
|
dismissible: y,
|
|
63
69
|
closeButtonAriaLabel: N,
|
|
64
|
-
position:
|
|
65
|
-
requestClose:
|
|
70
|
+
position: u,
|
|
71
|
+
requestClose: b
|
|
66
72
|
}),
|
|
67
|
-
[
|
|
68
|
-
), { showDivider:
|
|
69
|
-
() => ({ duration:
|
|
70
|
-
[
|
|
71
|
-
);
|
|
72
|
-
return
|
|
73
|
-
|
|
73
|
+
[s, y, N, u, b]
|
|
74
|
+
), { showDivider: F, dividerBefore: j, dividerInner: J, dividerAfter: L } = Z(D && !h, r), E = x(
|
|
75
|
+
() => ({ duration: O ? k : 0 }),
|
|
76
|
+
[O]
|
|
77
|
+
), v = W(void 0), M = v.current !== void 0 && v.current !== s && a === !0;
|
|
78
|
+
return v.current = s, s === "inline" ? /* @__PURE__ */ S(
|
|
79
|
+
oe,
|
|
74
80
|
{
|
|
75
|
-
contextValue:
|
|
81
|
+
contextValue: w,
|
|
76
82
|
panelClassName: I,
|
|
77
|
-
inlineWrapperClassName:
|
|
78
|
-
resolvedPosition:
|
|
79
|
-
dividerBefore:
|
|
80
|
-
dividerInner:
|
|
81
|
-
dividerAfter:
|
|
82
|
-
dividerColor:
|
|
83
|
-
open:
|
|
84
|
-
transitionConfig:
|
|
85
|
-
resizeConfig:
|
|
83
|
+
inlineWrapperClassName: H,
|
|
84
|
+
resolvedPosition: r,
|
|
85
|
+
dividerBefore: j,
|
|
86
|
+
dividerInner: J,
|
|
87
|
+
dividerAfter: L,
|
|
88
|
+
dividerColor: P,
|
|
89
|
+
open: a,
|
|
90
|
+
transitionConfig: E,
|
|
91
|
+
resizeConfig: c,
|
|
92
|
+
skipMountAnimation: M,
|
|
86
93
|
id: _,
|
|
87
|
-
...
|
|
88
|
-
children:
|
|
94
|
+
...g,
|
|
95
|
+
children: n
|
|
89
96
|
}
|
|
90
|
-
) : /* @__PURE__ */
|
|
91
|
-
|
|
97
|
+
) : /* @__PURE__ */ S(
|
|
98
|
+
se,
|
|
92
99
|
{
|
|
93
|
-
contextValue:
|
|
100
|
+
contextValue: w,
|
|
94
101
|
panelClassName: I,
|
|
95
|
-
resolvedPosition:
|
|
96
|
-
showDivider:
|
|
97
|
-
dividerColor:
|
|
98
|
-
modalType:
|
|
102
|
+
resolvedPosition: r,
|
|
103
|
+
showDivider: F,
|
|
104
|
+
dividerColor: P,
|
|
105
|
+
modalType: l,
|
|
99
106
|
floatingOffset: $,
|
|
100
|
-
open:
|
|
101
|
-
onOpenChange:
|
|
102
|
-
transitionConfig:
|
|
103
|
-
resizeConfig:
|
|
107
|
+
open: a,
|
|
108
|
+
onOpenChange: K,
|
|
109
|
+
transitionConfig: E,
|
|
110
|
+
resizeConfig: c,
|
|
111
|
+
skipMountAnimation: M,
|
|
104
112
|
id: _,
|
|
105
|
-
...
|
|
106
|
-
children:
|
|
113
|
+
...g,
|
|
114
|
+
children: n
|
|
107
115
|
}
|
|
108
116
|
);
|
|
109
117
|
};
|
|
110
118
|
d.displayName = "Panel";
|
|
111
|
-
d.Header =
|
|
112
|
-
d.Body =
|
|
113
|
-
d.Footer =
|
|
119
|
+
d.Header = G;
|
|
120
|
+
d.Body = U;
|
|
121
|
+
d.Footer = Q;
|
|
114
122
|
export {
|
|
115
123
|
d as Panel
|
|
116
124
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viasat/beam-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.30.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.30.0",
|
|
63
|
+
"@viasat/beam-shared": "2.30.0",
|
|
64
|
+
"@viasat/beam-styles": "2.30.0",
|
|
65
|
+
"@viasat/beam-tokens": "2.30.0",
|
|
66
|
+
"@viasat/beam-icons": "2.30.0",
|
|
67
67
|
"clsx": "^1.2.1",
|
|
68
68
|
"@floating-ui/react": "^0.26.18",
|
|
69
69
|
"@stepperize/react": "^5.1.5",
|