@viasat/beam-react 2.21.1 → 2.23.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.
Files changed (68) hide show
  1. package/assets/Search.css +1 -1
  2. package/assets/panel.css +1 -1
  3. package/chunks/Search.Results.BM9NkYBp.js +1 -0
  4. package/chunks/Search.Results.wKBufUSo.js +64 -0
  5. package/chunks/{panel.module.a_gaicKX.js → panel.module.DCpj0tSX.js} +1 -1
  6. package/lib/Alert/Alert.figma.d.ts +1 -0
  7. package/lib/Switch/Switch.figma.d.ts +1 -0
  8. package/lib/Tooltip/Tooltip.figma.d.ts +1 -0
  9. package/lib/wip/Panel/Panel.Body.cjs.js +1 -1
  10. package/lib/wip/Panel/Panel.Body.d.ts +6 -1
  11. package/lib/wip/Panel/Panel.Body.es.js +11 -9
  12. package/lib/wip/Panel/Panel.Divider.cjs.js +1 -0
  13. package/lib/wip/Panel/Panel.Divider.d.ts +6 -0
  14. package/lib/wip/Panel/Panel.Divider.es.js +18 -0
  15. package/lib/wip/Panel/Panel.Footer.Actions.cjs.js +1 -1
  16. package/lib/wip/Panel/Panel.Footer.Actions.es.js +1 -1
  17. package/lib/wip/Panel/Panel.Footer.cjs.js +1 -1
  18. package/lib/wip/Panel/Panel.Footer.d.ts +12 -1
  19. package/lib/wip/Panel/Panel.Footer.es.js +28 -15
  20. package/lib/wip/Panel/Panel.Header.ContentAfter.cjs.js +1 -1
  21. package/lib/wip/Panel/Panel.Header.ContentAfter.es.js +1 -1
  22. package/lib/wip/Panel/Panel.Header.ContentBefore.cjs.js +1 -1
  23. package/lib/wip/Panel/Panel.Header.ContentBefore.es.js +1 -1
  24. package/lib/wip/Panel/Panel.Header.Description.cjs.js +1 -1
  25. package/lib/wip/Panel/Panel.Header.Description.es.js +1 -1
  26. package/lib/wip/Panel/Panel.Header.Heading.cjs.js +1 -1
  27. package/lib/wip/Panel/Panel.Header.Heading.es.js +1 -1
  28. package/lib/wip/Panel/Panel.Header.Row.cjs.js +1 -1
  29. package/lib/wip/Panel/Panel.Header.Row.es.js +1 -1
  30. package/lib/wip/Panel/Panel.Header.Subheader.cjs.js +1 -1
  31. package/lib/wip/Panel/Panel.Header.Subheader.es.js +1 -1
  32. package/lib/wip/Panel/Panel.Header.cjs.js +1 -1
  33. package/lib/wip/Panel/Panel.Header.d.ts +12 -1
  34. package/lib/wip/Panel/Panel.Header.es.js +37 -24
  35. package/lib/wip/Panel/Panel.Inline.cjs.js +1 -1
  36. package/lib/wip/Panel/Panel.Inline.d.ts +3 -6
  37. package/lib/wip/Panel/Panel.Inline.es.js +62 -70
  38. package/lib/wip/Panel/Panel.Overlay.cjs.js +1 -1
  39. package/lib/wip/Panel/Panel.Overlay.d.ts +3 -2
  40. package/lib/wip/Panel/Panel.Overlay.es.js +23 -22
  41. package/lib/wip/Panel/Panel.cjs.js +1 -1
  42. package/lib/wip/Panel/Panel.d.ts +4 -4
  43. package/lib/wip/Panel/Panel.es.js +69 -60
  44. package/lib/wip/Panel/Panel.helpers.cjs.js +1 -1
  45. package/lib/wip/Panel/Panel.helpers.d.ts +2 -1
  46. package/lib/wip/Panel/Panel.helpers.es.js +8 -7
  47. package/lib/wip/Panel/Panel.types.cjs.js +1 -1
  48. package/lib/wip/Panel/Panel.types.d.ts +11 -1
  49. package/lib/wip/Panel/Panel.types.es.js +5 -1
  50. package/lib/wip/Search/Search.Results.Item.cjs.js +1 -1
  51. package/lib/wip/Search/Search.Results.Item.d.ts +6 -6
  52. package/lib/wip/Search/Search.Results.Item.es.js +5 -6
  53. package/lib/wip/Search/Search.Results.ViewAll.cjs.js +1 -1
  54. package/lib/wip/Search/Search.Results.ViewAll.d.ts +7 -7
  55. package/lib/wip/Search/Search.Results.ViewAll.es.js +2 -2
  56. package/lib/wip/Search/Search.Results.cjs.js +1 -1
  57. package/lib/wip/Search/Search.Results.es.js +3 -5
  58. package/lib/wip/Search/Search.cjs.js +1 -1
  59. package/lib/wip/Search/Search.d.ts +17 -8
  60. package/lib/wip/Search/Search.es.js +175 -157
  61. package/lib/wip/Search/SearchDropdown.cjs.js +1 -1
  62. package/lib/wip/Search/SearchDropdown.es.js +25 -24
  63. package/lib/wip/Search/index.d.ts +4 -1
  64. package/package.json +6 -6
  65. package/chunks/Search.Results.CFA_KEdP.js +0 -1
  66. package/chunks/Search.Results.DVf6WKnI.js +0 -68
  67. package/lib/wip/Search/Search.Results.d.ts +0 -15
  68. package/chunks/{panel.module.DGxSyRdA.js → panel.module.DJLJpnm_.js} +2 -2
@@ -1,46 +1,47 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { FloatingPortal as N } from "@floating-ui/react";
3
- import { Box as d } from "../../Box/Box.es.js";
4
- import g from "clsx";
5
- import { g as a } from "../../../chunks/classNames.BTJmrO_L.js";
6
- import { t as h } from "../../../chunks/constants.CKKGf1-i.js";
7
- import { ActionListContextProvider as P } from "../../ActionList/ActionList.context.es.js";
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
8
  import { useCallback as b } from "react";
9
+ import { R as o, s as y } from "../../../chunks/Search.Results.wKBufUSo.js";
9
10
  import { f as v } from "../../../chunks/floatingui.module.BcBFebz0.js";
10
- import { p as y } from "../../../chunks/popover.module.3dnl8y6-.js";
11
- import { a as e } from "../../../chunks/Search.Results.DVf6WKnI.js";
12
- const { baseClassNamePrefix: B } = a("floatingui"), { baseClassNamePrefix: S } = a("popover"), k = [e, e.Item, e.ViewAll], V = ({
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
13
  setOpen: r,
14
14
  isMounted: t,
15
15
  getFloatingProps: l,
16
16
  floatingStyles: m,
17
17
  labelsRef: i,
18
18
  elementsRef: f,
19
- getItemProps: p,
20
- setFloating: n,
21
- theme: s,
19
+ getItemProps: n,
20
+ setFloating: p,
21
+ theme: a,
22
22
  className: c,
23
23
  children: C,
24
24
  activeIndex: u
25
25
  }) => {
26
26
  const x = b(() => r(!1), [r]);
27
- return t ? /* @__PURE__ */ o(N, { children: /* @__PURE__ */ o(
28
- d,
27
+ return t ? /* @__PURE__ */ s(d, { children: /* @__PURE__ */ s(
28
+ N,
29
29
  {
30
- className: g(
31
- s && h(s),
30
+ className: P(
31
+ a && g(a),
32
32
  v[B],
33
- y[S],
33
+ w[k],
34
+ y[`${I}dropdown`],
34
35
  c
35
36
  ),
36
37
  ...l(),
37
38
  style: m,
38
- ref: n,
39
- children: /* @__PURE__ */ o(
40
- P,
39
+ ref: p,
40
+ children: /* @__PURE__ */ s(
41
+ h,
41
42
  {
42
- allowChildrenTypes: k,
43
- getItemProps: p,
43
+ allowChildrenTypes: S,
44
+ getItemProps: n,
44
45
  itemsFocusable: !1,
45
46
  onItemClick: x,
46
47
  labelsRef: i,
@@ -53,5 +54,5 @@ const { baseClassNamePrefix: B } = a("floatingui"), { baseClassNamePrefix: S } =
53
54
  ) }) : null;
54
55
  };
55
56
  export {
56
- V as SearchDropdown
57
+ q as SearchDropdown
57
58
  };
@@ -1 +1,4 @@
1
- export * from './Search';
1
+ export { Search, type SearchProps } from './Search';
2
+ export type { SearchResultsProps } from './Search.Results';
3
+ export type { SearchResultsItemProps } from './Search.Results.Item';
4
+ export type { SearchResultsViewAllProps } from './Search.Results.ViewAll';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viasat/beam-react",
3
- "version": "2.21.1",
3
+ "version": "2.23.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.21.1",
63
- "@viasat/beam-shared": "2.21.1",
64
- "@viasat/beam-styles": "2.21.1",
65
- "@viasat/beam-tokens": "2.21.1",
66
- "@viasat/beam-icons": "2.21.1",
62
+ "@viasat/beam-fonts": "2.23.0",
63
+ "@viasat/beam-shared": "2.23.0",
64
+ "@viasat/beam-styles": "2.23.0",
65
+ "@viasat/beam-tokens": "2.23.0",
66
+ "@viasat/beam-icons": "2.23.0",
67
67
  "clsx": "^1.2.1",
68
68
  "@floating-ui/react": "^0.26.18",
69
69
  "@stepperize/react": "^5.1.5",
@@ -1 +0,0 @@
1
- var L=require("../assets/Search.css");const c=require("react/jsx-runtime"),a=require("react"),u=require("./classNames.DAeKwerT.js");require("./constants.hwjHOsvT.js");const b=require("clsx"),x=require("../lib/wip/Search/Search.Results.Item.cjs.js"),h=require("../lib/ActionList/ActionList.cjs.js"),R=require("../lib/Icon/Icon.cjs.js");function w(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const _=w(a),d=e=>_.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.5 14H14.71L14.43 13.73C15.41 12.59 16 11.11 16 9.5C16 5.91 13.09 3 9.5 3C5.91 3 3 5.91 3 9.5C3 13.09 5.91 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5C5 7.01 7.01 5 9.5 5C11.99 5 14 7.01 14 9.5C14 11.99 11.99 14 9.5 14Z",fill:"currentColor"})),l={"bm-light":"bm-light","bm-dark":"bm-dark","bm-inverse":"bm-inverse","bm-enterprise":"bm-enterprise","bm-consumer":"bm-consumer","bm-search":"bm-search","bm-search--disabled":"bm-search--disabled","bm-search--fluid":"bm-search--fluid","bm-search__field":"bm-search__field","bm-search__field__input":"bm-search__field__input","bm-search--error":"bm-search--error","bm-search--read-only":"bm-search--read-only","bm-search__content":"bm-search__content","bm-search__results__view-all":"bm-search__results__view-all","bm-action-list__item__content-before":"bm-action-list__item__content-before","bm-search__results__view-all--group":"bm-search__results__view-all--group"},{baseClassNamePrefix:N,classModifierPrefix:j}=u.getBEMClassNames("search__results__view-all"),o=a.forwardRef(({children:e,onClick:t,variant:s,as:r="div",className:p,...v},C)=>{const g=a.useContext(i),m=s??(g?"group":"global"),S=b.clsx(l[N],l[`${j}${m}`],p);return c.jsx(h.ActionList.Item,{ref:C,className:S,onClick:t,contentBefore:m==="global"?c.jsx(R.Icon,{icon:d}):void 0,role:"option",as:r,...v,children:e})});o.displayName="Search.Results.ViewAll";const{baseClassNamePrefix:y}=u.getBEMClassNames("search"),i=a.createContext(!1),f=({children:e,...t})=>{const s=b.clsx(l[`${y}__results`]);return c.jsx(i.Provider,{value:!0,children:c.jsx(h.ActionList.Group,{className:s,...t,children:e})})},n=f;n.Item=x.SearchResultsItem;n.ViewAll=o;n.displayName="Search.Results";exports.SearchResults=n;exports.SearchResultsComponent=f;exports.SearchResultsContext=i;exports.SearchResultsViewAll=o;exports.SvgSearch=d;exports.styles=l;
@@ -1,68 +0,0 @@
1
- import "../assets/Search.css";
2
- import { jsx as s } from "react/jsx-runtime";
3
- import * as c from "react";
4
- import t from "react";
5
- import { g as i } from "./classNames.BTJmrO_L.js";
6
- import "./constants.CKKGf1-i.js";
7
- import { clsx as n } from "clsx";
8
- import { SearchResultsItem as w } from "../lib/wip/Search/Search.Results.Item.es.js";
9
- import { ActionList as _ } from "../lib/ActionList/ActionList.es.js";
10
- import { Icon as g } from "../lib/Icon/Icon.es.js";
11
- const x = (e) => /* @__PURE__ */ c.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ c.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.5 14H14.71L14.43 13.73C15.41 12.59 16 11.11 16 9.5C16 5.91 13.09 3 9.5 3C5.91 3 3 5.91 3 9.5C3 13.09 5.91 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5C5 7.01 7.01 5 9.5 5C11.99 5 14 7.01 14 9.5C14 11.99 11.99 14 9.5 14Z", fill: "currentColor" })), l = {
12
- "bm-light": "bm-light",
13
- "bm-dark": "bm-dark",
14
- "bm-inverse": "bm-inverse",
15
- "bm-enterprise": "bm-enterprise",
16
- "bm-consumer": "bm-consumer",
17
- "bm-search": "bm-search",
18
- "bm-search--disabled": "bm-search--disabled",
19
- "bm-search--fluid": "bm-search--fluid",
20
- "bm-search__field": "bm-search__field",
21
- "bm-search__field__input": "bm-search__field__input",
22
- "bm-search--error": "bm-search--error",
23
- "bm-search--read-only": "bm-search--read-only",
24
- "bm-search__content": "bm-search__content",
25
- "bm-search__results__view-all": "bm-search__results__view-all",
26
- "bm-action-list__item__content-before": "bm-action-list__item__content-before",
27
- "bm-search__results__view-all--group": "bm-search__results__view-all--group"
28
- }, { baseClassNamePrefix: R, classModifierPrefix: S } = i("search__results__view-all"), b = t.forwardRef(
29
- ({ children: e, onClick: r, variant: a, as: u = "div", className: d, ...f }, p) => {
30
- const v = t.useContext(h), m = a ?? (v ? "group" : "global"), C = n(
31
- l[R],
32
- l[`${S}${m}`],
33
- d
34
- );
35
- return /* @__PURE__ */ s(
36
- _.Item,
37
- {
38
- ref: p,
39
- className: C,
40
- onClick: r,
41
- contentBefore: m === "global" ? /* @__PURE__ */ s(g, { icon: x }) : void 0,
42
- role: "option",
43
- as: u,
44
- ...f,
45
- children: e
46
- }
47
- );
48
- }
49
- );
50
- b.displayName = "Search.Results.ViewAll";
51
- const { baseClassNamePrefix: N } = i("search"), h = t.createContext(!1), L = ({
52
- children: e,
53
- ...r
54
- }) => {
55
- const a = n(l[`${N}__results`]);
56
- return /* @__PURE__ */ s(h.Provider, { value: !0, children: /* @__PURE__ */ s(_.Group, { className: a, ...r, children: e }) });
57
- }, o = L;
58
- o.Item = w;
59
- o.ViewAll = b;
60
- o.displayName = "Search.Results";
61
- export {
62
- x as S,
63
- o as a,
64
- b,
65
- L as c,
66
- h as d,
67
- l as s
68
- };
@@ -1,15 +0,0 @@
1
- import { default as React } from 'react';
2
- import { SearchResultsItem } from './Search.Results.Item';
3
- import { SearchResultsViewAll } from './Search.Results.ViewAll';
4
- import { ActionListGroupProps } from '../../ActionList/ActionList.Group';
5
- export declare const SearchResultsContext: React.Context<boolean>;
6
- export interface SearchResultsProps extends ActionListGroupProps {
7
- children?: React.ReactNode;
8
- noResults?: React.ReactNode;
9
- }
10
- export declare const SearchResultsComponent: React.FC<SearchResultsProps>;
11
- export declare const SearchResults: typeof SearchResultsComponent & {
12
- Item: typeof SearchResultsItem;
13
- ViewAll: typeof SearchResultsViewAll;
14
- };
15
- export default SearchResults;
@@ -11,11 +11,11 @@ const n = {
11
11
  "bm-panel--position-start": "bm-panel--position-start",
12
12
  "bm-panel--position-end": "bm-panel--position-end",
13
13
  "bm-panel--position-bottom": "bm-panel--position-bottom",
14
- "bm-panel--position-full": "bm-panel--position-full",
15
14
  "bm-panel--size-full": "bm-panel--size-full",
15
+ "bm-panel--position-full": "bm-panel--position-full",
16
+ "bm-panel__body": "bm-panel__body",
16
17
  "bm-panel--padding-sm": "bm-panel--padding-sm",
17
18
  "bm-panel__header": "bm-panel__header",
18
- "bm-panel__body": "bm-panel__body",
19
19
  "bm-panel__footer": "bm-panel__footer",
20
20
  "bm-panel--padding-md": "bm-panel--padding-md",
21
21
  "bm-panel__header__row": "bm-panel__header__row",