@viasat/beam-react 2.22.0 → 2.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/Search.css +1 -1
- package/assets/panel.css +1 -1
- package/chunks/{FloatingUI.context.Dl4Y1y1z.js → FloatingUI.context.D3kSM-y1.js} +2 -2
- package/chunks/Search.Results.DqEXVJeE.js +1 -0
- package/chunks/Search.Results.XLqY_iES.js +73 -0
- package/chunks/{panel.module.a_gaicKX.js → panel.module.DCpj0tSX.js} +1 -1
- package/index.cjs.js +1 -1
- package/index.es.js +22 -20
- package/lib/Alert/Alert.figma.d.ts +1 -0
- package/lib/Dialog/Dialog.Header.es.js +1 -1
- package/lib/Dialog/Dialog.Trigger.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.content.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.context.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.root.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.trigger.close.es.js +7 -7
- package/lib/FloatingUI/FloatingUI.trigger.es.js +4 -4
- package/lib/Menu/ActionListContextWrapper.es.js +1 -1
- package/lib/Popover/Popover.content.es.js +1 -1
- package/lib/Popover/Popover.trigger.es.js +1 -1
- package/lib/Search/Search.Results.Item.cjs.js +1 -0
- package/lib/Search/Search.Results.Item.d.ts +11 -0
- package/lib/Search/Search.Results.Item.es.js +9 -0
- package/lib/Search/Search.Results.ViewAll.cjs.js +1 -0
- package/lib/{wip/Search → Search}/Search.Results.ViewAll.d.ts +11 -4
- package/lib/Search/Search.Results.ViewAll.es.js +11 -0
- package/lib/Search/Search.Results.cjs.js +1 -0
- package/lib/Search/Search.Results.es.js +12 -0
- package/lib/Search/Search.cjs.js +1 -0
- package/lib/{wip/Search → Search}/Search.d.ts +18 -9
- package/lib/Search/Search.es.js +179 -0
- package/lib/Search/SearchDropdown.cjs.js +1 -0
- package/lib/Search/SearchDropdown.es.js +58 -0
- package/lib/Search/index.d.ts +4 -0
- package/lib/Search/useSearchDropdown.cjs.js +1 -0
- package/lib/{wip/Search → Search}/useSearchDropdown.es.js +2 -2
- package/lib/Switch/Switch.figma.d.ts +1 -0
- package/lib/Tooltip/Tooltip.es.js +1 -1
- package/lib/Tooltip/Tooltip.figma.d.ts +1 -0
- package/lib/index.cjs.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.es.js +21 -19
- package/lib/wip/Panel/Panel.Body.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Body.d.ts +6 -1
- package/lib/wip/Panel/Panel.Body.es.js +11 -9
- package/lib/wip/Panel/Panel.Divider.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Divider.d.ts +6 -0
- package/lib/wip/Panel/Panel.Divider.es.js +18 -0
- package/lib/wip/Panel/Panel.Footer.Actions.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Footer.Actions.es.js +1 -1
- package/lib/wip/Panel/Panel.Footer.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Footer.d.ts +12 -1
- package/lib/wip/Panel/Panel.Footer.es.js +28 -15
- package/lib/wip/Panel/Panel.Header.ContentAfter.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.ContentAfter.es.js +1 -1
- package/lib/wip/Panel/Panel.Header.ContentBefore.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.ContentBefore.es.js +1 -1
- package/lib/wip/Panel/Panel.Header.Description.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.Description.es.js +1 -1
- package/lib/wip/Panel/Panel.Header.Heading.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.Heading.es.js +2 -2
- package/lib/wip/Panel/Panel.Header.Row.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.Row.es.js +1 -1
- package/lib/wip/Panel/Panel.Header.Subheader.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.Subheader.es.js +1 -1
- package/lib/wip/Panel/Panel.Header.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Header.d.ts +12 -1
- package/lib/wip/Panel/Panel.Header.es.js +37 -24
- package/lib/wip/Panel/Panel.Inline.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Inline.d.ts +3 -6
- package/lib/wip/Panel/Panel.Inline.es.js +58 -66
- package/lib/wip/Panel/Panel.Overlay.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Overlay.d.ts +3 -2
- package/lib/wip/Panel/Panel.Overlay.es.js +23 -22
- package/lib/wip/Panel/Panel.cjs.js +1 -1
- package/lib/wip/Panel/Panel.d.ts +4 -4
- package/lib/wip/Panel/Panel.es.js +69 -60
- package/lib/wip/Panel/Panel.helpers.cjs.js +1 -1
- package/lib/wip/Panel/Panel.helpers.d.ts +2 -1
- package/lib/wip/Panel/Panel.helpers.es.js +8 -7
- package/lib/wip/Panel/Panel.types.cjs.js +1 -1
- package/lib/wip/Panel/Panel.types.d.ts +11 -1
- package/lib/wip/Panel/Panel.types.es.js +5 -1
- package/lib/wip/index.cjs.js +1 -1
- package/lib/wip/index.d.ts +0 -1
- package/lib/wip/index.es.js +2 -4
- package/package.json +6 -6
- package/chunks/Search.Results.CFA_KEdP.js +0 -1
- package/chunks/Search.Results.DVf6WKnI.js +0 -68
- package/lib/wip/Search/Search.Results.Item.cjs.js +0 -1
- package/lib/wip/Search/Search.Results.Item.d.ts +0 -11
- package/lib/wip/Search/Search.Results.Item.es.js +0 -10
- package/lib/wip/Search/Search.Results.ViewAll.cjs.js +0 -1
- package/lib/wip/Search/Search.Results.ViewAll.es.js +0 -11
- package/lib/wip/Search/Search.Results.cjs.js +0 -1
- package/lib/wip/Search/Search.Results.d.ts +0 -15
- package/lib/wip/Search/Search.Results.es.js +0 -14
- package/lib/wip/Search/Search.cjs.js +0 -1
- package/lib/wip/Search/Search.es.js +0 -161
- package/lib/wip/Search/SearchDropdown.cjs.js +0 -1
- package/lib/wip/Search/SearchDropdown.es.js +0 -57
- package/lib/wip/Search/index.d.ts +0 -1
- package/lib/wip/Search/useSearchDropdown.cjs.js +0 -1
- package/chunks/{panel.module.DGxSyRdA.js → panel.module.DJLJpnm_.js} +2 -2
- /package/lib/{wip/Search → Search}/SearchDropdown.d.ts +0 -0
- /package/lib/{wip/Search → Search}/index.cjs.js +0 -0
- /package/lib/{wip/Search → Search}/index.es.js +0 -0
- /package/lib/{wip/Search → Search}/useSearchDropdown.d.ts +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ThemeTypes } from '@viasat/beam-shared/utils';
|
|
2
2
|
import { Nullable } from '@viasat/beam-shared/utils/types';
|
|
3
|
-
import { default as React } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import { IconComponentType } from '
|
|
3
|
+
import { default as React, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
|
|
4
|
+
import { Results } from './Search.Results';
|
|
5
|
+
import { IconComponentType } from '../../utils/types';
|
|
6
6
|
export interface SearchProps extends React.ComponentPropsWithRef<'input'> {
|
|
7
7
|
/**
|
|
8
|
-
* Specify a callback called whenever a search is conducted
|
|
8
|
+
* Specify a callback that gets called whenever a search is conducted
|
|
9
9
|
*/
|
|
10
10
|
onSearch: (query: string) => void;
|
|
11
11
|
/**
|
|
@@ -72,17 +72,26 @@ export interface SearchProps extends React.ComponentPropsWithRef<'input'> {
|
|
|
72
72
|
noResults?: string;
|
|
73
73
|
/**
|
|
74
74
|
* Aria label for the clear button
|
|
75
|
-
* @default
|
|
75
|
+
* @default Clear search
|
|
76
76
|
*/
|
|
77
77
|
clearButtonAriaLabel?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Specify if Search displays in a disabled state
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
disabled?: boolean;
|
|
78
83
|
/**
|
|
79
84
|
* Specify the theme of the Search. By default it inherits the theme from the parent
|
|
80
85
|
*/
|
|
81
86
|
theme?: ThemeTypes;
|
|
87
|
+
/**
|
|
88
|
+
* Specify the Search results to display in the Search dropdown
|
|
89
|
+
* (see Search.Results)
|
|
90
|
+
*/
|
|
82
91
|
children?: React.ReactNode;
|
|
83
92
|
}
|
|
84
|
-
|
|
85
|
-
export declare const Search: typeof SearchComponent & {
|
|
93
|
+
interface SearchComponent extends ForwardRefExoticComponent<PropsWithoutRef<SearchProps> & RefAttributes<HTMLInputElement>> {
|
|
86
94
|
Results: typeof Results;
|
|
87
|
-
}
|
|
88
|
-
export
|
|
95
|
+
}
|
|
96
|
+
export declare const Search: SearchComponent;
|
|
97
|
+
export {};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { jsxs as S, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { g as ue } from "../../chunks/classNames.BTJmrO_L.js";
|
|
3
|
+
import { t as fe } from "../../chunks/constants.CKKGf1-i.js";
|
|
4
|
+
import pe, { forwardRef as be, useCallback as he } from "react";
|
|
5
|
+
import { s as r, S as xe, R as Ie } from "../../chunks/Search.Results.XLqY_iES.js";
|
|
6
|
+
import q from "clsx";
|
|
7
|
+
import { H as ye } from "../../chunks/form.context.D7b4066_.js";
|
|
8
|
+
import { LabelProvider as Se } from "../Form/contexts/label.context.es.js";
|
|
9
|
+
import { HelperTextProvider as Ne } from "../Form/contexts/helperText.context.es.js";
|
|
10
|
+
import { useUniversalRef as Re } from "../Form/hooks/useUniversalRef.hook.es.js";
|
|
11
|
+
import { useAccessibleId as f } from "../Form/hooks/useAccessibleId.hook.es.js";
|
|
12
|
+
import { Icon as Pe } from "../Icon/Icon.es.js";
|
|
13
|
+
import { useSearchDropdown as ve } from "./useSearchDropdown.es.js";
|
|
14
|
+
import { SearchDropdown as De } from "./SearchDropdown.es.js";
|
|
15
|
+
import { ActionList as $e } from "../ActionList/ActionList.es.js";
|
|
16
|
+
import { useDebounced as ge } from "../../utils/hooks/useDebounced.es.js";
|
|
17
|
+
import { useEffectAfterMount as _e } from "../../utils/hooks/useEffectAfterMount.es.js";
|
|
18
|
+
import { Spinner as we } from "../Spinner/Spinner.es.js";
|
|
19
|
+
import { CloseButton as Ee } from "../CloseButton/CloseButton.es.js";
|
|
20
|
+
const { baseClassNamePrefix: ke, subElementClassPrefix: o, classModifierPrefix: p } = ue("search"), n = be(
|
|
21
|
+
({
|
|
22
|
+
id: z,
|
|
23
|
+
defaultValue: C = "",
|
|
24
|
+
value: N,
|
|
25
|
+
onChange: a,
|
|
26
|
+
onSearch: U,
|
|
27
|
+
loading: R = !1,
|
|
28
|
+
debounce: W = 200,
|
|
29
|
+
onKeyDown: b,
|
|
30
|
+
label: P,
|
|
31
|
+
contentAfter: v,
|
|
32
|
+
contentBefore: D,
|
|
33
|
+
helperText: $,
|
|
34
|
+
fluid: G,
|
|
35
|
+
width: J,
|
|
36
|
+
theme: g,
|
|
37
|
+
disabled: s,
|
|
38
|
+
hideIcon: Q,
|
|
39
|
+
icon: X = xe,
|
|
40
|
+
error: i,
|
|
41
|
+
readOnly: d,
|
|
42
|
+
clearable: _ = !0,
|
|
43
|
+
noResults: w,
|
|
44
|
+
clearButtonAriaLabel: Y = "Clear search",
|
|
45
|
+
className: Z,
|
|
46
|
+
children: E,
|
|
47
|
+
"aria-describedby": K,
|
|
48
|
+
"aria-labelledby": O,
|
|
49
|
+
"aria-label": k,
|
|
50
|
+
...h
|
|
51
|
+
}, ee) => {
|
|
52
|
+
const { refFn: te, ref: re } = Re(ee), [ae, A] = pe.useState(String(C)), m = N !== void 0, c = m ? String(N) : ae, se = (e) => {
|
|
53
|
+
m || A(e.target.value), a == null || a(e);
|
|
54
|
+
}, { immediate: x, debounced: H } = ge(U, W), ie = (e) => {
|
|
55
|
+
if (b == null || b(e), e.key === "Enter") {
|
|
56
|
+
if (e.isDefaultPrevented() || e.isPropagationStopped())
|
|
57
|
+
return;
|
|
58
|
+
const { activeIndex: l, elementsRef: me } = I, y = l !== null ? me.current[l] : null;
|
|
59
|
+
y && y.getAttribute("aria-disabled") !== "true" ? (e.preventDefault(), y.click()) : l === null && x(c);
|
|
60
|
+
}
|
|
61
|
+
e.key === "Escape" && (!_ || I.open) && e.preventDefault();
|
|
62
|
+
}, { id: u } = f(), { id: M } = f(), { id: V } = f(), { id: B } = f(), F = !!(i != null && i.length), L = !!E || !!w, T = q(
|
|
63
|
+
$ && B,
|
|
64
|
+
F && V,
|
|
65
|
+
K
|
|
66
|
+
), j = O ?? (P ? M : void 0), { dropdownProps: I, getFieldProps: le, getInputProps: oe } = ve({
|
|
67
|
+
enabled: L,
|
|
68
|
+
disabled: !!s,
|
|
69
|
+
readOnly: !!d
|
|
70
|
+
});
|
|
71
|
+
_e(() => {
|
|
72
|
+
H(c);
|
|
73
|
+
}, [c, H]);
|
|
74
|
+
const ce = q(
|
|
75
|
+
r[ke],
|
|
76
|
+
g && fe(g),
|
|
77
|
+
G && r[`${p}fluid`],
|
|
78
|
+
s && r[`${p}disabled`],
|
|
79
|
+
d && r[`${p}read-only`],
|
|
80
|
+
i && r[`${p}error`],
|
|
81
|
+
Z
|
|
82
|
+
), ne = (e) => {
|
|
83
|
+
var l;
|
|
84
|
+
s || e.target instanceof HTMLInputElement || e.target.closest(
|
|
85
|
+
'button,[role="button"],a,[role="link"]'
|
|
86
|
+
) || (e.preventDefault(), e.stopPropagation(), (l = re.current) == null || l.focus());
|
|
87
|
+
}, de = he(() => {
|
|
88
|
+
m ? a == null || a({
|
|
89
|
+
target: {
|
|
90
|
+
value: "",
|
|
91
|
+
name: h.name,
|
|
92
|
+
id: u,
|
|
93
|
+
type: "search"
|
|
94
|
+
}
|
|
95
|
+
}) : A(""), x("");
|
|
96
|
+
}, [u, m, a, x, h.name]);
|
|
97
|
+
return /* @__PURE__ */ S(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
id: z,
|
|
101
|
+
className: ce,
|
|
102
|
+
role: "search",
|
|
103
|
+
style: { maxWidth: J },
|
|
104
|
+
"aria-labelledby": j,
|
|
105
|
+
"aria-label": k,
|
|
106
|
+
"aria-describedby": T,
|
|
107
|
+
"aria-busy": R,
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ t(
|
|
110
|
+
Se,
|
|
111
|
+
{
|
|
112
|
+
ctxDisabled: !!s,
|
|
113
|
+
ctxRequired: !1,
|
|
114
|
+
ctxHtmlFor: u,
|
|
115
|
+
ctxId: M,
|
|
116
|
+
children: P
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ S(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
className: r[`${o}field`],
|
|
123
|
+
...le({ onPointerDown: ne }),
|
|
124
|
+
children: [
|
|
125
|
+
!Q && /* @__PURE__ */ t(Pe, { icon: X, "aria-hidden": !0 }),
|
|
126
|
+
D && /* @__PURE__ */ t("div", { className: r[`${o}content`], children: D }),
|
|
127
|
+
/* @__PURE__ */ t(
|
|
128
|
+
"input",
|
|
129
|
+
{
|
|
130
|
+
id: u,
|
|
131
|
+
type: "search",
|
|
132
|
+
className: r[`${o}field__input`],
|
|
133
|
+
value: c,
|
|
134
|
+
disabled: s,
|
|
135
|
+
readOnly: d,
|
|
136
|
+
"aria-invalid": !!i,
|
|
137
|
+
"aria-labelledby": j,
|
|
138
|
+
"aria-label": k,
|
|
139
|
+
"aria-describedby": T,
|
|
140
|
+
...oe({
|
|
141
|
+
...h,
|
|
142
|
+
onChange: se,
|
|
143
|
+
onKeyDown: ie
|
|
144
|
+
}),
|
|
145
|
+
ref: te
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
R && /* @__PURE__ */ t("div", { className: r[`${o}field__spinner`], children: /* @__PURE__ */ t(we, { size: "xxs" }) }),
|
|
149
|
+
_ && c && !s && !d && /* @__PURE__ */ t(
|
|
150
|
+
Ee,
|
|
151
|
+
{
|
|
152
|
+
onClick: de,
|
|
153
|
+
className: `${o}field__clear-button`,
|
|
154
|
+
size: "sm",
|
|
155
|
+
"aria-label": Y
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
v && /* @__PURE__ */ t("div", { className: r[`${o}content`], children: v })
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ S(Ne, { ctxId: B, ctxDisabled: !!s, children: [
|
|
163
|
+
$,
|
|
164
|
+
F && /* @__PURE__ */ t(ye, { id: V, appearance: "negative", children: i })
|
|
165
|
+
] }),
|
|
166
|
+
L && /* @__PURE__ */ t(De, { ...I, children: /* @__PURE__ */ t($e, { role: "listbox", noResults: w, children: E }) })
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
n.displayName = "Search";
|
|
173
|
+
n.Results = Ie;
|
|
174
|
+
n.Results.displayName = "Search.Results";
|
|
175
|
+
n.Results.Item.displayName = "Search.Results.Item";
|
|
176
|
+
n.Results.ViewAll.displayName = "Search.Results.ViewAll";
|
|
177
|
+
export {
|
|
178
|
+
n as Search
|
|
179
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("@floating-ui/react"),q=require("../Box/Box.cjs.js"),N=require("clsx"),t=require("../../chunks/classNames.DAeKwerT.js"),_=require("../../chunks/constants.hwjHOsvT.js"),b=require("../ActionList/ActionList.context.cjs.js"),g=require("react"),e=require("../../chunks/Search.Results.DqEXVJeE.js"),h=require("../../chunks/floatingui.module.D3Aw_aYe.js"),B=require("../../chunks/popover.module.DGUJIXrP.js"),{baseClassNamePrefix:P}=t.getBEMClassNames("floatingui"),{baseClassNamePrefix:S}=t.getBEMClassNames("popover"),{subElementClassPrefix:y}=t.getBEMClassNames("search"),v=[e.Results,e.Results.Item,e.Results.ViewAll],w=({setOpen:o,isMounted:r,getFloatingProps:a,floatingStyles:i,labelsRef:n,elementsRef:c,getItemProps:u,setFloating:m,theme:l,className:x,children:f,activeIndex:C})=>{const d=g.useCallback(()=>o(!1),[o]);return r?s.jsx(p.FloatingPortal,{children:s.jsx(q.Box,{className:N(l&&_.themeClassName(l),h.floatinguiStyles[P],B.popoverStyles[S],e.styles[`${y}dropdown`],x),...a(),style:i,ref:m,children:s.jsx(b.ActionListContextProvider,{allowChildrenTypes:v,getItemProps:u,itemsFocusable:!1,onItemClick:d,labelsRef:n,elementsRef:c,activeIndex:C,children:f})})}):null};exports.SearchDropdown=w;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { FloatingPortal as d } from "@floating-ui/react";
|
|
3
|
+
import { Box as N } from "../Box/Box.es.js";
|
|
4
|
+
import P from "clsx";
|
|
5
|
+
import { g as e } from "../../chunks/classNames.BTJmrO_L.js";
|
|
6
|
+
import { t as g } from "../../chunks/constants.CKKGf1-i.js";
|
|
7
|
+
import { ActionListContextProvider as h } from "../ActionList/ActionList.context.es.js";
|
|
8
|
+
import { useCallback as b } from "react";
|
|
9
|
+
import { R as o, s as y } from "../../chunks/Search.Results.XLqY_iES.js";
|
|
10
|
+
import { f as v } from "../../chunks/floatingui.module.BcBFebz0.js";
|
|
11
|
+
import { p as w } from "../../chunks/popover.module.3dnl8y6-.js";
|
|
12
|
+
const { baseClassNamePrefix: B } = e("floatingui"), { baseClassNamePrefix: k } = e("popover"), { subElementClassPrefix: I } = e("search"), S = [o, o.Item, o.ViewAll], q = ({
|
|
13
|
+
setOpen: r,
|
|
14
|
+
isMounted: t,
|
|
15
|
+
getFloatingProps: l,
|
|
16
|
+
floatingStyles: m,
|
|
17
|
+
labelsRef: i,
|
|
18
|
+
elementsRef: f,
|
|
19
|
+
getItemProps: n,
|
|
20
|
+
setFloating: p,
|
|
21
|
+
theme: a,
|
|
22
|
+
className: c,
|
|
23
|
+
children: C,
|
|
24
|
+
activeIndex: u
|
|
25
|
+
}) => {
|
|
26
|
+
const x = b(() => r(!1), [r]);
|
|
27
|
+
return t ? /* @__PURE__ */ s(d, { children: /* @__PURE__ */ s(
|
|
28
|
+
N,
|
|
29
|
+
{
|
|
30
|
+
className: P(
|
|
31
|
+
a && g(a),
|
|
32
|
+
v[B],
|
|
33
|
+
w[k],
|
|
34
|
+
y[`${I}dropdown`],
|
|
35
|
+
c
|
|
36
|
+
),
|
|
37
|
+
...l(),
|
|
38
|
+
style: m,
|
|
39
|
+
ref: p,
|
|
40
|
+
children: /* @__PURE__ */ s(
|
|
41
|
+
h,
|
|
42
|
+
{
|
|
43
|
+
allowChildrenTypes: S,
|
|
44
|
+
getItemProps: n,
|
|
45
|
+
itemsFocusable: !1,
|
|
46
|
+
onItemClick: x,
|
|
47
|
+
labelsRef: i,
|
|
48
|
+
elementsRef: f,
|
|
49
|
+
activeIndex: u,
|
|
50
|
+
children: C
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
) }) : null;
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
q as SearchDropdown
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@floating-ui/react"),o=require("react"),H=require("../FloatingUI/useTyping.cjs.js"),_=require("../FloatingUI/useBlur.cjs.js"),N=h=>{const{disabled:r,readOnly:l,enabled:e=!0}=h,[n,i]=o.useState(!1),d=o.useRef(n);d.current=n;const[f,g]=o.useState(null);o.useEffect(()=>n?void 0:g(null),[n]);const{context:c,refs:a,floatingStyles:p}=s.useFloating({placement:"bottom-start",middleware:[s.flip(),s.size({apply({elements:t,rects:u,availableHeight:S}){Object.assign(t.floating.style,{width:`${u.reference.width}px`}),S<t.floating.scrollHeight?Object.assign(t.floating.style,{maxHeight:`${S}px`,overflowY:"auto"}):Object.assign(t.floating.style,{maxHeight:""})}})],whileElementsMounted:s.autoUpdate,open:n,onOpenChange:i}),b=o.useRef([]),x=o.useRef([]),k=s.useClick(c,{enabled:!n&&e&&!r&&!l,toggle:!1,stickIfOpen:!1,keyboardHandlers:!1}),E=s.useRole(c,{enabled:e,role:"listbox"}),M=H.default(c,{enabled:!n&&e&&!r&&!l,event:"keyboard"}),j=s.useFocus(c,{enabled:!n&&e&&!r&&!l,visibleOnly:!0}),q=s.useDismiss(c,{enabled:n&&e&&!r&&!l,escapeKey:!0,outsidePress:!0,referencePress:!1}),C=_.useBlur(c,{enabled:e&&!r&&!l}),D=s.useListNavigation(c,{enabled:e&&!r&&!l,listRef:b,activeIndex:f,onNavigate:g,focusItemOnHover:!1,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,nested:!1,loop:!0,virtual:!0,scrollItemIntoView:!0}),{getReferenceProps:m,getFloatingProps:y,getItemProps:R}=s.useInteractions([E,M,D]),{getReferenceProps:I}=s.useInteractions([k,j,q,C]),{isMounted:v,styles:O}=s.useTransitionStyles(c,{duration:50});o.useEffect(()=>{if(!e||r||l||d.current)return;const t=a.domReference.current,u=document.activeElement;t&&u&&t.contains(u)&&i(!0)},[e,r,l,i,a.domReference]);const P=o.useCallback((t={})=>e?m(t):t,[m,e]),w=o.useCallback((t={})=>e?{ref:a.setReference,...I(t)}:t,[e,a.setReference,I]),F=o.useMemo(()=>({isMounted:v,getFloatingProps:y,getItemProps:R,floatingStyles:{...p,...O},setOpen:i,labelsRef:x,elementsRef:b,setFloating:a.setFloating,activeIndex:f,open:n}),[v,y,R,p,O,a.setFloating,f,n]);return o.useMemo(()=>({getFieldProps:w,getInputProps:P,dropdownProps:F,refs:a}),[F,w,P,a])};exports.useSearchDropdown=N;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFloating as $, autoUpdate as z, flip as B, size as L, useClick as U, useRole as V, useFocus as Y, useDismiss as q, useListNavigation as G, useInteractions as F, useTransitionStyles as J } from "@floating-ui/react";
|
|
2
2
|
import { useState as h, useRef as u, useEffect as k, useCallback as S, useMemo as E } from "react";
|
|
3
|
-
import Q from "
|
|
4
|
-
import { useBlur as W } from "
|
|
3
|
+
import Q from "../FloatingUI/useTyping.es.js";
|
|
4
|
+
import { useBlur as W } from "../FloatingUI/useBlur.es.js";
|
|
5
5
|
const te = (H) => {
|
|
6
6
|
const { disabled: n, readOnly: o, enabled: e = !0 } = H, [s, i] = h(!1), f = u(s);
|
|
7
7
|
f.current = s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { jsx as t, jsxs as w } from "react/jsx-runtime";
|
|
|
3
3
|
import { createContext as h, forwardRef as T, useContext as S, useMemo as N } from "react";
|
|
4
4
|
import { FloatingUIRoot as P } from "../FloatingUI/FloatingUI.root.es.js";
|
|
5
5
|
import { Trigger as _ } from "../FloatingUI/FloatingUI.trigger.es.js";
|
|
6
|
-
import "../../chunks/FloatingUI.context.
|
|
6
|
+
import "../../chunks/FloatingUI.context.D3kSM-y1.js";
|
|
7
7
|
import { Content as k } from "../FloatingUI/FloatingUI.content.es.js";
|
|
8
8
|
import { j as v, k as O } from "../../chunks/tokens.BD_71qmL.js";
|
|
9
9
|
import { g as $ } from "../../chunks/classNames.BTJmrO_L.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./Accordion/Accordion.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./Accordion/Accordion.cjs.js"),c=require("./Accordion/AccordionGroup.cjs.js"),l=require("./Alert/Alert.cjs.js"),s=require("./Autocomplete/Autocomplete.cjs.js"),d=require("./Avatar/index.cjs.js"),b=require("./CloseButton/CloseButton.cjs.js"),r=require("./Button/Button.cjs.js"),p=require("./Dialog/Dialog.cjs.js"),S=require("./Breadcrumbs/Breadcrumbs.cjs.js"),q=require("../chunks/BreadcrumbsItem.DM3uQ5rs.js"),A=require("./EmptyState/EmptyState.cjs.js"),T=require("./Badge/Badge.cjs.js"),C=require("./BadgeDot/BadgeDot.cjs.js"),B=require("./Box/Box.cjs.js"),g=require("./Checkbox/Checkbox.cjs.js"),P=require("./Chips/Chip.cjs.js"),v=require("./Chips/ChipGroup.cjs.js"),L=require("./Divider/Divider.cjs.js"),x=require("./FileUpload/FileUpload.cjs.js"),h=require("./Flag/Flag.cjs.js"),N=require("./Form/Form.cjs.js"),m=require("../chunks/form.context.hesWPMlU.js"),H=require("./Icon/Icon.cjs.js"),G=require("./InputChoiceGroup/SwitchGroup/SwitchGroup.cjs.js"),R=require("./InputChoiceGroup/CheckboxGroup/CheckboxGroup.cjs.js"),D=require("./InputChoiceGroup/RadioButtonGroup/RadioButtonGroup.cjs.js"),I=require("./Label/Label.cjs.js"),O=require("./Link/Link.cjs.js"),y=require("./List/List.cjs.js"),E=require("./ActionList/ActionList.cjs.js"),F=require("./Logo/Logo.cjs.js"),k=require("./Menu/Menu.cjs.js"),M=require("./Menu/Menu.context.cjs.js"),U=require("./NativeSelect/NativeSelect.cjs.js"),w=require("./Pagination/Pagination.cjs.js"),Y=require("./ProgressBar/ProgressBar.cjs.js"),W=require("./RadioButton/RadioButton.cjs.js"),e=require("./SideNav/SideNav.cjs.js"),o=require("./SideNav/SideNavContext.cjs.js"),V=require("./SegmentedControl/SegmentedControl.cjs.js"),K=require("./Select/Select.cjs.js"),f=require("./Spinner/Spinner.cjs.js"),Q=require("./StateLayer/StateLayer.cjs.js"),j=require("./Stepper/Stepper.cjs.js"),t=require("./Stepper/useBeamStepper.cjs.js"),z=require("./Switch/Switch.cjs.js"),J=require("./Tabs/Tabs.cjs.js"),X=require("./Text/Text.cjs.js"),Z=require("./TextArea/TextArea.cjs.js"),$=require("./TextField/TextField.cjs.js"),ee=require("./Toasts/Toast.cjs.js"),i=require("../chunks/ToastContext.BJK1U8nL.js"),re=require("./Toasts/ToastContainer.cjs.js"),a=require("./Tooltip/Tooltip.cjs.js"),n=require("./Header/Header.cjs.js"),oe=require("./Header/HeaderMasthead.cjs.js"),te=require("./Header/HeaderActionGroup.cjs.js"),ie=require("./Header/HeaderNavigation.cjs.js"),_=require("./PortalProvider/PortalContext.cjs.js"),ae=require("./PortalProvider/PortalProvider.cjs.js"),ne=require("./Popover/Popover.cjs.js"),_e=require("./PageHeader/PageHeader.cjs.js"),ue=require("./PageLayout/PageLayout.cjs.js"),ce=require("./Slider/Slider.cjs.js"),le=require("./Card/Card.cjs.js"),se=require("./Card/CardGroup.cjs.js"),de=require("./Search/Search.cjs.js"),be=require("../chunks/useFormValidator.hook.BtP4A6XY.js");exports.Accordion=u.Accordion;exports.AccordionGroup=c.AccordionGroup;exports.Alert=l.Alert;exports.Autocomplete=s.Autocomplete;exports.Avatar=d.Avatar;exports.CloseButton=b.CloseButton;exports.Button=r.Button;exports.ButtonIconWrap=r.ButtonIconWrap;exports.Dialog=p.Dialog;exports.Breadcrumb=S.Breadcrumb;exports.BreadcrumbItem=q.BreadcrumbItem;exports.EmptyState=A.EmptyState;exports.Badge=T.Badge;exports.BadgeDot=C.BadgeDot;exports.Box=B.Box;exports.Checkbox=g.Checkbox;exports.Chip=P.Chip;exports.ChipGroup=v.ChipGroup;exports.Divider=L.Divider;exports.FileUpload=x.default;exports.Flag=h.Flag;exports.Form=N.Form;exports.HelperText=m.HelperText;exports.Icon=H.Icon;exports.SwitchGroup=G.SwitchGroup;exports.CheckboxGroup=R.CheckboxGroup;exports.RadioButtonGroup=D.RadioButtonGroup;exports.Label=I.Label;exports.Link=O.Link;exports.List=y.List;exports.ActionList=E.ActionList;exports.Logo=F.Logo;exports.Menu=k.Menu;exports.useMenuContext=M.useMenuContext;exports.NativeSelect=U.NativeSelect;exports.Pagination=w.Pagination;exports.ProgressBar=Y.ProgressBar;exports.RadioButton=W.RadioButton;exports.DRAWER_LAYOUT=e.DRAWER_LAYOUT;exports.HIDDEN_LAYOUT=e.HIDDEN_LAYOUT;exports.LOCAL_STORAGE_SIDE_NAV_WIDTH_VAR_NAME=e.LOCAL_STORAGE_SIDE_NAV_WIDTH_VAR_NAME;exports.NO_LAYOUT=e.NO_LAYOUT;exports.OPAQUE_BACKDROP=e.OPAQUE_BACKDROP;exports.RAIL_LAYOUT=e.RAIL_LAYOUT;exports.Root=e.Root;exports.SideNav=e.SideNav;exports.SideNavBackdrops=e.SideNavBackdrops;exports.SideNavClosedLayouts=e.SideNavClosedLayouts;exports.SideNavOpenLayouts=e.SideNavOpenLayouts;exports.TRANSPARENT_BACKDROP=e.TRANSPARENT_BACKDROP;exports.SideNavProvider=o.SideNavProvider;exports.useSideNavContext=o.useSideNavContext;exports.SegmentedControl=V.SegmentedControl;exports.Select=K.Select;exports.Spinner=f.Spinner;exports.StateLayer=Q.StateLayer;exports.Stepper=j.Stepper;exports.processMetadata=t.processMetadata;exports.useBeamStepper=t.useBeamStepper;exports.Switch=z.Switch;exports.Tabs=J.Tabs;exports.Text=X.Text;exports.TextArea=Z.TextArea;exports.TextField=$.TextField;exports.Toast=ee.Toast;exports.ToastProvider=i.ToastProvider;exports.useToast=i.useToast;exports.ToastContainer=re.ToastContainer;exports.Tooltip=a.Tooltip;exports.TooltipIconTrigger=a.TooltipIconTrigger;exports.Header=n.Header;exports.InternalHeader=n.InternalHeader;exports.HeaderMasthead=oe.HeaderMasthead;exports.HeaderActionGroup=te.HeaderActionGroup;exports.HeaderNavigation=ie.HeaderNavigation;exports.PortalContext=_.PortalContext;exports.usePortal=_.usePortal;exports.PortalProvider=ae.PortalProvider;exports.Popover=ne.Popover;exports.PageHeader=_e.PageHeader;exports.PageLayout=ue.PageLayout;exports.Slider=ce.Slider;exports.Card=le.Card;exports.CardGroup=se.CardGroup;exports.Search=de.Search;exports.validators=be.validators;
|
package/lib/index.d.ts
CHANGED
package/lib/index.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Autocomplete as f } from "./Autocomplete/Autocomplete.es.js";
|
|
|
5
5
|
import { Avatar as d } from "./Avatar/index.es.js";
|
|
6
6
|
import { CloseButton as s } from "./CloseButton/CloseButton.es.js";
|
|
7
7
|
import { Button as A, ButtonIconWrap as l } from "./Button/Button.es.js";
|
|
8
|
-
import { Dialog as
|
|
8
|
+
import { Dialog as S } from "./Dialog/Dialog.es.js";
|
|
9
9
|
import { Breadcrumb as v } from "./Breadcrumbs/Breadcrumbs.es.js";
|
|
10
10
|
import { B as C } from "../chunks/BreadcrumbsItem.6c7NEqgi.js";
|
|
11
11
|
import { EmptyState as P } from "./EmptyState/EmptyState.es.js";
|
|
@@ -13,7 +13,7 @@ import { Badge as g } from "./Badge/Badge.es.js";
|
|
|
13
13
|
import { BadgeDot as _ } from "./BadgeDot/BadgeDot.es.js";
|
|
14
14
|
import { Box as D } from "./Box/Box.es.js";
|
|
15
15
|
import { Checkbox as I } from "./Checkbox/Checkbox.es.js";
|
|
16
|
-
import { Chip as
|
|
16
|
+
import { Chip as E } from "./Chips/Chip.es.js";
|
|
17
17
|
import { ChipGroup as b } from "./Chips/ChipGroup.es.js";
|
|
18
18
|
import { Divider as y } from "./Divider/Divider.es.js";
|
|
19
19
|
import { default as k } from "./FileUpload/FileUpload.es.js";
|
|
@@ -31,11 +31,11 @@ import { ActionList as ao } from "./ActionList/ActionList.es.js";
|
|
|
31
31
|
import { Logo as io } from "./Logo/Logo.es.js";
|
|
32
32
|
import { Menu as so } from "./Menu/Menu.es.js";
|
|
33
33
|
import { useMenuContext as Ao } from "./Menu/Menu.context.es.js";
|
|
34
|
-
import { NativeSelect as
|
|
35
|
-
import { Pagination as
|
|
34
|
+
import { NativeSelect as co } from "./NativeSelect/NativeSelect.es.js";
|
|
35
|
+
import { Pagination as To } from "./Pagination/Pagination.es.js";
|
|
36
36
|
import { ProgressBar as Bo } from "./ProgressBar/ProgressBar.es.js";
|
|
37
37
|
import { RadioButton as Lo } from "./RadioButton/RadioButton.es.js";
|
|
38
|
-
import { DRAWER_LAYOUT as No, HIDDEN_LAYOUT as go, LOCAL_STORAGE_SIDE_NAV_WIDTH_VAR_NAME as Ro, NO_LAYOUT as _o, OPAQUE_BACKDROP as Oo, RAIL_LAYOUT as Do, Root as Ho, SideNav as Io, SideNavBackdrops as
|
|
38
|
+
import { DRAWER_LAYOUT as No, HIDDEN_LAYOUT as go, LOCAL_STORAGE_SIDE_NAV_WIDTH_VAR_NAME as Ro, NO_LAYOUT as _o, OPAQUE_BACKDROP as Oo, RAIL_LAYOUT as Do, Root as Ho, SideNav as Io, SideNavBackdrops as ho, SideNavClosedLayouts as Eo, SideNavOpenLayouts as Go, TRANSPARENT_BACKDROP as bo } from "./SideNav/SideNav.es.js";
|
|
39
39
|
import { SideNavProvider as yo, useSideNavContext as Mo } from "./SideNav/SideNavContext.es.js";
|
|
40
40
|
import { SegmentedControl as Fo } from "./SegmentedControl/SegmentedControl.es.js";
|
|
41
41
|
import { Select as Wo } from "./Select/Select.es.js";
|
|
@@ -51,20 +51,21 @@ import { TextField as ar } from "./TextField/TextField.es.js";
|
|
|
51
51
|
import { Toast as ir } from "./Toasts/Toast.es.js";
|
|
52
52
|
import { T as nr, u as sr } from "../chunks/ToastContext.CYGy7l7R.js";
|
|
53
53
|
import { ToastContainer as Ar } from "./Toasts/ToastContainer.es.js";
|
|
54
|
-
import { Tooltip as
|
|
54
|
+
import { Tooltip as cr, TooltipIconTrigger as Sr } from "./Tooltip/Tooltip.es.js";
|
|
55
55
|
import { Header as vr, InternalHeader as Br } from "./Header/Header.es.js";
|
|
56
56
|
import { HeaderMasthead as Lr } from "./Header/HeaderMasthead.es.js";
|
|
57
57
|
import { HeaderActionGroup as Nr } from "./Header/HeaderActionGroup.es.js";
|
|
58
58
|
import { HeaderNavigation as Rr } from "./Header/HeaderNavigation.es.js";
|
|
59
59
|
import { PortalContext as Or, usePortal as Dr } from "./PortalProvider/PortalContext.es.js";
|
|
60
60
|
import { PortalProvider as Ir } from "./PortalProvider/PortalProvider.es.js";
|
|
61
|
-
import { Popover as
|
|
61
|
+
import { Popover as Er } from "./Popover/Popover.es.js";
|
|
62
62
|
import { PageHeader as br } from "./PageHeader/PageHeader.es.js";
|
|
63
63
|
import { PageLayout as yr } from "./PageLayout/PageLayout.es.js";
|
|
64
64
|
import { Slider as kr } from "./Slider/Slider.es.js";
|
|
65
65
|
import { Card as Yr } from "./Card/Card.es.js";
|
|
66
66
|
import { CardGroup as wr } from "./Card/CardGroup.es.js";
|
|
67
|
-
import {
|
|
67
|
+
import { Search as Vr } from "./Search/Search.es.js";
|
|
68
|
+
import { v as jr } from "../chunks/useFormValidator.hook.CSmddwEt.js";
|
|
68
69
|
export {
|
|
69
70
|
e as Accordion,
|
|
70
71
|
p as AccordionGroup,
|
|
@@ -83,11 +84,11 @@ export {
|
|
|
83
84
|
wr as CardGroup,
|
|
84
85
|
I as Checkbox,
|
|
85
86
|
X as CheckboxGroup,
|
|
86
|
-
|
|
87
|
+
E as Chip,
|
|
87
88
|
b as ChipGroup,
|
|
88
89
|
s as CloseButton,
|
|
89
90
|
No as DRAWER_LAYOUT,
|
|
90
|
-
|
|
91
|
+
S as Dialog,
|
|
91
92
|
y as Divider,
|
|
92
93
|
P as EmptyState,
|
|
93
94
|
k as FileUpload,
|
|
@@ -108,12 +109,12 @@ export {
|
|
|
108
109
|
io as Logo,
|
|
109
110
|
so as Menu,
|
|
110
111
|
_o as NO_LAYOUT,
|
|
111
|
-
|
|
112
|
+
co as NativeSelect,
|
|
112
113
|
Oo as OPAQUE_BACKDROP,
|
|
113
114
|
br as PageHeader,
|
|
114
115
|
yr as PageLayout,
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
To as Pagination,
|
|
117
|
+
Er as Popover,
|
|
117
118
|
Or as PortalContext,
|
|
118
119
|
Ir as PortalProvider,
|
|
119
120
|
Bo as ProgressBar,
|
|
@@ -121,12 +122,13 @@ export {
|
|
|
121
122
|
Lo as RadioButton,
|
|
122
123
|
$ as RadioButtonGroup,
|
|
123
124
|
Ho as Root,
|
|
125
|
+
Vr as Search,
|
|
124
126
|
Fo as SegmentedControl,
|
|
125
127
|
Wo as Select,
|
|
126
128
|
Io as SideNav,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
ho as SideNavBackdrops,
|
|
130
|
+
Eo as SideNavClosedLayouts,
|
|
131
|
+
Go as SideNavOpenLayouts,
|
|
130
132
|
yo as SideNavProvider,
|
|
131
133
|
kr as Slider,
|
|
132
134
|
Ko as Spinner,
|
|
@@ -142,13 +144,13 @@ export {
|
|
|
142
144
|
ir as Toast,
|
|
143
145
|
Ar as ToastContainer,
|
|
144
146
|
nr as ToastProvider,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
cr as Tooltip,
|
|
148
|
+
Sr as TooltipIconTrigger,
|
|
147
149
|
Jo as processMetadata,
|
|
148
150
|
Xo as useBeamStepper,
|
|
149
151
|
Ao as useMenuContext,
|
|
150
152
|
Dr as usePortal,
|
|
151
153
|
Mo as useSideNavContext,
|
|
152
154
|
sr as useToast,
|
|
153
|
-
|
|
155
|
+
jr as validators
|
|
154
156
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("clsx"),c=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const i=require("../../Box/Box.cjs.js"),u=require("../../../chunks/panel.module.DCpj0tSX.js"),{subElementClassPrefix:m}=c.getBEMClassNames("panel"),d=`${m}body`,e=({children:s,className:o,backgroundColor:t,...r})=>{const a=n(u.styles[d],o);return l.jsx(i.Box,{className:a,backgroundColor:t,...r,children:s})};e.displayName="Panel.Body";exports.Body=e;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { BoxBackgroundColor } from '@viasat/beam-shared/components/box';
|
|
2
3
|
export interface PanelBodyProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
4
|
/**
|
|
4
5
|
* Specify the content for the Panel body
|
|
5
6
|
*/
|
|
6
7
|
children?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Specify the background color of the body surface
|
|
10
|
+
*/
|
|
11
|
+
backgroundColor?: BoxBackgroundColor;
|
|
7
12
|
}
|
|
8
13
|
export declare const Body: {
|
|
9
|
-
({ children, className: _className, ...props }: PanelBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
({ children, className: _className, backgroundColor, ...props }: PanelBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
10
15
|
displayName: string;
|
|
11
16
|
};
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { g as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import e from "clsx";
|
|
3
|
+
import { g as l } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { Box as p } from "../../Box/Box.es.js";
|
|
6
|
+
import { s as i } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
7
|
+
const { subElementClassPrefix: n } = l("panel"), c = `${n}body`, f = ({
|
|
7
8
|
children: s,
|
|
8
9
|
className: o,
|
|
10
|
+
backgroundColor: m,
|
|
9
11
|
...a
|
|
10
12
|
}) => {
|
|
11
|
-
const
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
+
const r = e(i[c], o);
|
|
14
|
+
return /* @__PURE__ */ t(p, { className: r, backgroundColor: m, ...a, children: s });
|
|
13
15
|
};
|
|
14
|
-
|
|
16
|
+
f.displayName = "Panel.Body";
|
|
15
17
|
export {
|
|
16
|
-
|
|
18
|
+
f as Body
|
|
17
19
|
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PanelDividerColor, PanelPosition } from './Panel.types';
|
|
2
|
+
export declare const InlineDivider: ({ position, className, dividerColor, }: {
|
|
3
|
+
position?: PanelPosition;
|
|
4
|
+
className?: string;
|
|
5
|
+
dividerColor?: PanelDividerColor;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Divider as e } from "../../Divider/Divider.es.js";
|
|
3
|
+
import { DEFAULT_PANEL_DIVIDER_COLOR as m } from "./Panel.helpers.es.js";
|
|
4
|
+
const p = ({
|
|
5
|
+
position: o,
|
|
6
|
+
className: r,
|
|
7
|
+
dividerColor: i = m
|
|
8
|
+
}) => /* @__PURE__ */ t(
|
|
9
|
+
e,
|
|
10
|
+
{
|
|
11
|
+
borderColor: i,
|
|
12
|
+
orientation: o === "bottom" ? "horizontal" : "vertical",
|
|
13
|
+
className: r
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
p as InlineDivider
|
|
18
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),i=require("clsx"),u=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const e=require("../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),i=require("clsx"),u=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const e=require("../../../chunks/panel.module.DCpj0tSX.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;
|
|
@@ -2,7 +2,7 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import i from "clsx";
|
|
3
3
|
import { g as c } from "../../../chunks/classNames.BTJmrO_L.js";
|
|
4
4
|
import "../../../chunks/constants.CKKGf1-i.js";
|
|
5
|
-
import { s as o } from "../../../chunks/panel.module.
|
|
5
|
+
import { s as o } from "../../../chunks/panel.module.DJLJpnm_.js";
|
|
6
6
|
const { subElementClassPrefix: l } = c("panel"), p = ({
|
|
7
7
|
layout: t = "end",
|
|
8
8
|
children: a,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("clsx"),u=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const _=require("../../Divider/Divider.cjs.js"),m=require("../../Box/Box.cjs.js"),b=require("./Panel.helpers.cjs.js"),d=require("./Panel.Footer.Actions.cjs.js"),q=require("../../../chunks/panel.module.DCpj0tSX.js"),{subElementClassPrefix:x}=u.getBEMClassNames("panel"),P=`${x}footer`,s=({children:r,className:o,divider:t=!0,dividerColor:i=b.DEFAULT_PANEL_DIVIDER_COLOR,backgroundColor:n,...l})=>{const a=c(q.styles[P],o);return e.jsxs(e.Fragment,{children:[t&&e.jsx(_.Divider,{borderColor:i}),e.jsx(m.Box,{as:"footer",className:a,backgroundColor:n,...l,children:r})]})};s.displayName="Panel.Footer";s.Actions=d.Actions;exports.Footer=s;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { BoxBackgroundColor } from '@viasat/beam-shared/components/box';
|
|
3
|
+
import { PanelDividerColor } from './Panel.types';
|
|
2
4
|
export interface PanelFooterProps extends ComponentPropsWithoutRef<'footer'> {
|
|
3
5
|
/**
|
|
4
6
|
* Specify the content for the Panel footer
|
|
@@ -9,9 +11,18 @@ export interface PanelFooterProps extends ComponentPropsWithoutRef<'footer'> {
|
|
|
9
11
|
* @default true
|
|
10
12
|
*/
|
|
11
13
|
divider?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Specify the border color of the footer divider
|
|
16
|
+
* @default '01'
|
|
17
|
+
*/
|
|
18
|
+
dividerColor?: PanelDividerColor;
|
|
19
|
+
/**
|
|
20
|
+
* Specify the background color of the footer surface
|
|
21
|
+
*/
|
|
22
|
+
backgroundColor?: BoxBackgroundColor;
|
|
12
23
|
}
|
|
13
24
|
export declare const Footer: {
|
|
14
|
-
({ children, className: _className, divider, ...props }: PanelFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
({ children, className: _className, divider, dividerColor, backgroundColor, ...props }: PanelFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
15
26
|
displayName: string;
|
|
16
27
|
Actions: {
|
|
17
28
|
({ layout, children, className: _className, ...props }: import('./Panel.Footer.Actions').PanelFooterActionsProps): import("react/jsx-runtime").JSX.Element;
|