@homebound/beam 2.271.1 → 2.272.1

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.
@@ -15,6 +15,8 @@ export interface AccordionProps {
15
15
  */
16
16
  index?: number;
17
17
  setExpandedIndex?: Dispatch<SetStateAction<number | undefined>>;
18
+ /** Used by Accordion list. Sets default padding to 0 for nested accordions */
19
+ omitPadding?: boolean;
18
20
  }
19
21
  export declare function Accordion(props: AccordionProps): import("@emotion/react/jsx-runtime").JSX.Element;
20
22
  export type AccordionSize = "xs" | "sm" | "md" | "lg";
@@ -9,7 +9,7 @@ const Icon_1 = require("./Icon");
9
9
  const Css_1 = require("../Css");
10
10
  const utils_2 = require("../utils");
11
11
  function Accordion(props) {
12
- const { title, children, size, disabled = false, defaultExpanded = false, topBorder = true, bottomBorder = false, index, setExpandedIndex, } = props;
12
+ const { title, children, size, disabled = false, defaultExpanded = false, topBorder = true, bottomBorder = false, index, setExpandedIndex, omitPadding = false, } = props;
13
13
  const testIds = (0, utils_2.useTestIds)(props, "accordion");
14
14
  const id = (0, utils_1.useId)();
15
15
  const [expanded, setExpanded] = (0, react_1.useState)(defaultExpanded && !disabled);
@@ -50,7 +50,7 @@ function Accordion(props) {
50
50
  }, children: [(0, jsx_runtime_1.jsx)("span", { children: title }), (0, jsx_runtime_1.jsx)("span", { css: {
51
51
  transition: "transform 250ms linear",
52
52
  transform: expanded ? "rotate(180deg)" : "rotate(0deg)",
53
- }, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: "chevronDown" }) })] }), (0, jsx_runtime_1.jsx)("div", { ...testIds.details, id: id, "aria-hidden": !expanded, css: Css_1.Css.overflowHidden.h(contentHeight).add("transition", "height 250ms ease-in-out").$, children: expanded && ((0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.px2.pb2.pt1.$, ref: contentRef, ...testIds.content, children: children })) })] }));
53
+ }, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: "chevronDown" }) })] }), (0, jsx_runtime_1.jsx)("div", { ...testIds.details, id: id, "aria-hidden": !expanded, css: Css_1.Css.overflowHidden.h(contentHeight).add("transition", "height 250ms ease-in-out").$, children: expanded && ((0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.px2.pb2.pt1.if(omitPadding).p0.$, ref: contentRef, ...testIds.content, children: children })) })] }));
54
54
  }
55
55
  exports.Accordion = Accordion;
56
56
  const accordionSizes = {
@@ -109,11 +109,11 @@ exports.Icons = {
109
109
  commentItem: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M5.33333 7.18518C5.33333 6.57153 5.75973 6.07407 6.28571 6.07407H17.7143C18.2403 6.07407 18.6667 6.57153 18.6667 7.18518C18.6667 7.79883 18.2403 8.29629 17.7143 8.29629H6.28571C5.75973 8.29629 5.33333 7.79883 5.33333 7.18518Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M5.33333 10.8889C5.33333 10.2752 5.75973 9.77777 6.28571 9.77777H17.7143C18.2403 9.77777 18.6667 10.2752 18.6667 10.8889C18.6667 11.5025 18.2403 12 17.7143 12H6.28571C5.75973 12 5.33333 11.5025 5.33333 10.8889Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M3.11111 2C2.81643 2 2.53381 2.11706 2.32544 2.32544C2.11706 2.53381 2 2.81643 2 3.11111V15.7037C2 16.3173 2.49746 16.8148 3.11111 16.8148H11.5825L17.1942 21.7251C17.5223 22.0122 17.988 22.0808 18.385 21.9007C18.7821 21.7205 19.037 21.3248 19.037 20.8889V16.8148H20.8889C21.5025 16.8148 22 16.3173 22 15.7037V3.11111C22 2.49746 21.5025 2 20.8889 2H3.11111ZM4.22222 14.5926V4.22222H19.7778V14.5926H17.9259C17.3123 14.5926 16.8148 15.09 16.8148 15.7037V18.4402L12.7317 14.8675C12.5291 14.6903 12.2691 14.5926 12 14.5926H4.22222Z" })] })),
110
110
  todo: ((0, jsx_runtime_1.jsx)("path", { d: "M4.696 7.267L3.4 5.996L2 7.426L4.704 10.073L9.403 5.422L7.997 4L4.696 7.267ZM6 12H4V14H6V12ZM6 17H4V19H6V17ZM8 12H20V14H8V12ZM20 17H8V19H20V17ZM20 7H10V9H20V7Z" })),
111
111
  projectItem: ((0, jsx_runtime_1.jsx)("path", { d: "M14.1818 4C14.1818 3.44772 14.6295 3 15.1818 3H19C19.5523 3 20 3.44772 20 4V7.64286C20 8.19514 19.5523 8.64286 19 8.64286H15.1818C14.6295 8.64286 14.1818 8.19514 14.1818 7.64286V6.82143H6V11.5H12.2727V10.6786C12.2727 10.1263 12.7204 9.67857 13.2727 9.67857H17.0909C17.6432 9.67857 18.0909 10.1263 18.0909 10.6786V14.3214C18.0909 14.8737 17.6432 15.3214 17.0909 15.3214H13.2727C12.7204 15.3214 12.2727 14.8737 12.2727 14.3214V13.5H6V18.1786H10.3636V17.3571C10.3636 16.8049 10.8114 16.3571 11.3636 16.3571H15.1818C15.7341 16.3571 16.1818 16.8049 16.1818 17.3571V21C16.1818 21.5523 15.7341 22 15.1818 22H11.3636C10.8114 22 10.3636 21.5523 10.3636 21V20.1786H5C4.44772 20.1786 4 19.7309 4 19.1786V5.82143C4 5.26914 4.44772 4.82143 5 4.82143H14.1818V4ZM16.1818 6.64286V5H18V6.64286H16.1818ZM12.3636 20H14.1818V18.3571H12.3636V20ZM14.2727 13.3214H16.0909V11.6786H14.2727V13.3214Z" })),
112
- bill: ((0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20 11V19.5V21C20 21.3688 19.797 21.7077 19.4719 21.8817C19.1467 22.0557 18.7522 22.0366 18.4453 21.8321L17.25 21.0352L16.0547 21.8321C15.7188 22.056 15.2812 22.056 14.9453 21.8321L13.75 21.0352L12.5547 21.8321C12.2188 22.056 11.7812 22.056 11.4453 21.8321L10.25 21.0352L9.0547 21.8321C8.7188 22.056 8.2812 22.056 7.9453 21.8321L6.75 21.0352L5.5547 21.8321C5.24784 22.0366 4.8533 22.0557 4.52814 21.8817C4.20298 21.7077 4 21.3688 4 21V19.5V11V5C4 3.897 4.897 3 6 3H18C19.103 3 20 3.897 20 5L20 11ZM18 11V19.1315L17.8047 19.0013C17.4688 18.7773 17.0312 18.7773 16.6953 19.0013L15.5 19.7981L14.3047 19.0013C13.9688 18.7773 13.5312 18.7773 13.1953 19.0013L12 19.7981L10.8047 19.0013C10.4688 18.7773 10.0312 18.7773 9.6953 19.0013L8.5 19.7981L7.3047 19.0013C6.9688 18.7773 6.5312 18.7773 6.1953 19.0013L6 19.1315V11H5.99873L5.998 5L18 5L18 11ZM12 11.1608C10.5 11.1608 10.5 10.6386 10.5 10.3267C10.5 9.92292 11.0258 9.49249 12 9.49249C12.8888 9.49249 13.0395 10.0247 13.05 10.3417L13.8 10.3267H14.55C14.55 9.4708 14.0505 8.2671 12.75 7.92509V7H11.25V7.89506C9.77175 8.17117 9 9.25225 9 10.3267C9 11.2609 9.39 12.8292 12 12.8292C13.5 12.8292 13.5 13.3931 13.5 13.6633C13.5 14.0095 13.035 14.4975 12 14.4975C10.6193 14.4975 10.5083 13.7826 10.5 13.6633H9C9 14.4291 9.49575 15.793 11.25 16.0991V17H12.75V16.0949C14.2283 15.8188 15 14.7377 15 13.6633C15 12.7291 14.61 11.1608 12 11.1608Z" })),
112
+ bill: ((0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M20 11V19.5V21C20 21.3688 19.797 21.7077 19.4719 21.8817C19.1467 22.0557 18.7522 22.0366 18.4453 21.8321L17.25 21.0352L16.0547 21.8321C15.7188 22.056 15.2812 22.056 14.9453 21.8321L13.75 21.0352L12.5547 21.8321C12.2188 22.056 11.7812 22.056 11.4453 21.8321L10.25 21.0352L9.0547 21.8321C8.7188 22.056 8.2812 22.056 7.9453 21.8321L6.75 21.0352L5.5547 21.8321C5.24784 22.0366 4.8533 22.0557 4.52814 21.8817C4.20298 21.7077 4 21.3688 4 21V19.5V11V5C4 3.897 4.897 3 6 3H18C19.103 3 20 3.897 20 5L20 11ZM18 11V19.1315L17.8047 19.0013C17.4688 18.7773 17.0312 18.7773 16.6953 19.0013L15.5 19.7981L14.3047 19.0013C13.9688 18.7773 13.5312 18.7773 13.1953 19.0013L12 19.7981L10.8047 19.0013C10.4688 18.7773 10.0312 18.7773 9.6953 19.0013L8.5 19.7981L7.3047 19.0013C6.9688 18.7773 6.5312 18.7773 6.1953 19.0013L6 19.1315V11H5.99873L5.998 5L18 5L18 11ZM12 11.1608C10.5 11.1608 10.5 10.6386 10.5 10.3267C10.5 9.92292 11.0258 9.49249 12 9.49249C12.8888 9.49249 13.0395 10.0247 13.05 10.3417L13.8 10.3267H14.55C14.55 9.4708 14.0505 8.2671 12.75 7.92509V7H11.25V7.89506C9.77175 8.17117 9 9.25225 9 10.3267C9 11.2609 9.39 12.8292 12 12.8292C13.5 12.8292 13.5 13.3931 13.5 13.6633C13.5 14.0095 13.035 14.4975 12 14.4975C10.6193 14.4975 10.5083 13.7826 10.5 13.6633H9C9 14.4291 9.49575 15.793 11.25 16.0991V17H12.75V16.0949C14.2283 15.8188 15 14.7377 15 13.6633C15 12.7291 14.61 11.1608 12 11.1608Z" })),
113
113
  commitment: ((0, jsx_runtime_1.jsx)("path", { d: "M20.937 8.68L20.9276 8.65196L20.9276 8.65186C20.9203 8.62967 20.9132 8.60784 20.904 8.586C20.855 8.48 20.794 8.379 20.708 8.293L14.708 2.293C14.622 2.207 14.521 2.146 14.415 2.097C14.3943 2.08736 14.3727 2.08057 14.3509 2.07368L14.3508 2.07367C14.3409 2.07056 14.331 2.06742 14.321 2.064C14.237 2.036 14.151 2.018 14.062 2.013C14.0519 2.01208 14.0424 2.00925 14.033 2.00647L14.033 2.00647C14.0221 2.0032 14.0113 2 14 2H7C5.897 2 5 2.897 5 4V8H7V4H13V9C13 9.553 13.447 10 14 10H19L19.002 20H7V18H5V20C5 21.103 5.897 22 7 22H19C20.103 22 21 21.103 21 20V9C21 8.98867 20.9968 8.97792 20.9935 8.96697L20.9935 8.96694C20.9907 8.95761 20.9879 8.94812 20.987 8.938C20.982 8.85 20.965 8.764 20.937 8.68ZM17.586 8H15V5.414L17.586 8ZM11 10V12H3V10H11ZM9 14V16H1V14H9Z" })),
114
- document: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M6.97355 12C6.47678 12 6.07407 12.4975 6.07407 13.1111C6.07407 13.7248 6.47678 14.2222 6.97355 14.2222H17.1852C17.6819 14.2222 18.0847 13.7248 18.0847 13.1111C18.0847 12.4975 17.6819 12 17.1852 12H6.97355Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M6.97355 15.7037C6.47678 15.7037 6.07407 16.2012 6.07407 16.8148C6.07407 17.4285 6.47678 17.9259 6.97355 17.9259H17.1852C17.6819 17.9259 18.0847 17.4285 18.0847 16.8148C18.0847 16.2012 17.6819 15.7037 17.1852 15.7037H6.97355Z" }), (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M2 3.11111C2 2.49746 2.49746 2 3.11111 2H16.4444C16.7391 2 17.0217 2.11706 17.2301 2.32544L21.6746 6.76988C21.8829 6.97825 22 7.26087 22 7.55556V20.8889C22 21.5025 21.5025 22 20.8889 22H3.11111C2.49746 22 2 21.5025 2 20.8889V3.11111ZM19.6879 7.92593L16.0741 4.31209V7.92593H19.6879ZM13.8519 4.22222V9.03704C13.8519 9.65069 14.3493 10.1481 14.963 10.1481H19.7778V19.7778H4.22222V4.22222H13.8519Z" })] })),
114
+ document: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M6.97355 12C6.47678 12 6.07407 12.4975 6.07407 13.1111C6.07407 13.7248 6.47678 14.2222 6.97355 14.2222H17.1852C17.6819 14.2222 18.0847 13.7248 18.0847 13.1111C18.0847 12.4975 17.6819 12 17.1852 12H6.97355Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M6.97355 15.7037C6.47678 15.7037 6.07407 16.2012 6.07407 16.8148C6.07407 17.4285 6.47678 17.9259 6.97355 17.9259H17.1852C17.6819 17.9259 18.0847 17.4285 18.0847 16.8148C18.0847 16.2012 17.6819 15.7037 17.1852 15.7037H6.97355Z" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2 3.11111C2 2.49746 2.49746 2 3.11111 2H16.4444C16.7391 2 17.0217 2.11706 17.2301 2.32544L21.6746 6.76988C21.8829 6.97825 22 7.26087 22 7.55556V20.8889C22 21.5025 21.5025 22 20.8889 22H3.11111C2.49746 22 2 21.5025 2 20.8889V3.11111ZM19.6879 7.92593L16.0741 4.31209V7.92593H19.6879ZM13.8519 4.22222V9.03704C13.8519 9.65069 14.3493 10.1481 14.963 10.1481H19.7778V19.7778H4.22222V4.22222H13.8519Z" })] })),
115
115
  budgetReallocation: ((0, jsx_runtime_1.jsx)("path", { d: "M19.1121 9.51212L21.6 12L18.9107 14.6893L20.1107 15.8893L24 12L20.3121 8.31212L19.1121 9.51212ZM12 21.6L14.7107 18.8893L15.9107 20.0893L12 24L7.86653 19.8665L9.06653 18.6665L12 21.6ZM4.86653 14.4665L2.4 12L4.6651 9.73489L3.46511 8.53489L0 12L3.66653 15.6665L4.86653 14.4665ZM12 2.4L8.8651 5.53489L7.6651 4.33489L12 0L16.1121 4.11212L14.9121 5.31212L12 2.4ZM10 9.99996C10 10.374 10 11 12 11C15.48 11 16 12.88 16 14C16 15.288 14.971 16.584 13 16.915V18H11V16.92C8.661 16.553 8 14.918 8 14H10C10.011 14.143 10.159 15 12 15C13.38 15 14 14.415 14 14C14 13.676 14 13 12 13C8.52 13 8 11.12 8 9.99996C8 8.71196 9.029 7.41596 11 7.08496V6.01196H13V7.12096C14.734 7.53096 15.4 8.97396 15.4 9.99996H14.4L13.4 10.018C13.386 9.63796 13.185 8.99996 12 8.99996C10.701 8.99996 10 9.51596 10 9.99996Z" })),
116
- cog: ((0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M3.845 17.866L2.845 16.136C2.293 15.181 2.621 13.955 3.576 13.403L4.081 13.111C4.027 12.742 4 12.371 4 12C4 11.629 4.027 11.257 4.081 10.888L3.576 10.596C2.621 10.045 2.293 8.819 2.845 7.864L3.844 6.135C4.375 5.216 5.651 4.872 6.575 5.403L7.104 5.709C7.686 5.253 8.325 4.878 9 4.598V4C9 2.897 9.897 2 11 2H13C14.103 2 15 2.897 15 4V4.598C15.675 4.878 16.314 5.253 16.896 5.71L17.425 5.404C18.348 4.871 19.625 5.216 20.156 6.136L21.155 7.865C21.707 8.82 21.379 10.045 20.424 10.597L19.919 10.889C19.973 11.257 20 11.629 20 12C20 12.371 19.973 12.742 19.919 13.113L20.424 13.405C21.379 13.956 21.707 15.182 21.155 16.137L20.156 17.866C19.623 18.785 18.348 19.127 17.425 18.597L16.896 18.291C16.314 18.747 15.675 19.122 15 19.402V20C15 21.103 14.103 22 13 22H11C9.897 22 9 21.103 9 20V19.402C8.325 19.122 7.686 18.747 7.104 18.29L6.575 18.596C5.654 19.127 4.376 18.783 3.845 17.866ZM6 12C6 12.461 6.058 12.925 6.171 13.378C6.278 13.811 6.087 14.263 5.7 14.486L4.576 15.137L5.576 16.866L6.72 16.204C6.876 16.114 7.048 16.07 7.22 16.07C7.47 16.07 7.718 16.163 7.908 16.345C8.591 16.992 9.415 17.475 10.292 17.744C10.713 17.872 11 18.261 11 18.7V20H13.002L13 18.7C13 18.261 13.287 17.872 13.708 17.744C14.585 17.476 15.409 16.992 16.092 16.345C16.413 16.037 16.897 15.982 17.28 16.203L18.425 16.864L19.423 15.135L18.3 14.486C17.913 14.263 17.722 13.811 17.829 13.378C17.942 12.925 18 12.461 18 12C18 11.538 17.942 11.074 17.83 10.622C17.722 10.19 17.913 9.738 18.3 9.514L19.424 8.865L18.424 7.136L17.28 7.797C16.898 8.017 16.413 7.962 16.092 7.655C15.409 7.008 14.585 6.525 13.708 6.256C13.287 6.128 13 5.739 13 5.3V4H11V5.3C11 5.739 10.713 6.128 10.292 6.256C9.415 6.524 8.591 7.008 7.908 7.655C7.587 7.962 7.104 8.018 6.72 7.797L5.575 7.135L4.577 8.864L5.7 9.514C6.087 9.737 6.278 10.189 6.17 10.622C6.058 11.074 6 11.538 6 12ZM16 12C16 14.206 14.206 16 12 16C9.794 16 8 14.206 8 12C8 9.794 9.794 8 12 8C14.206 8 16 9.794 16 12ZM14 12C14 10.916 13.084 10 12 10C10.916 10 10 10.916 10 12C10 13.084 10.916 14 12 14C13.084 14 14 13.084 14 12Z" })),
116
+ cog: ((0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.845 17.866L2.845 16.136C2.293 15.181 2.621 13.955 3.576 13.403L4.081 13.111C4.027 12.742 4 12.371 4 12C4 11.629 4.027 11.257 4.081 10.888L3.576 10.596C2.621 10.045 2.293 8.819 2.845 7.864L3.844 6.135C4.375 5.216 5.651 4.872 6.575 5.403L7.104 5.709C7.686 5.253 8.325 4.878 9 4.598V4C9 2.897 9.897 2 11 2H13C14.103 2 15 2.897 15 4V4.598C15.675 4.878 16.314 5.253 16.896 5.71L17.425 5.404C18.348 4.871 19.625 5.216 20.156 6.136L21.155 7.865C21.707 8.82 21.379 10.045 20.424 10.597L19.919 10.889C19.973 11.257 20 11.629 20 12C20 12.371 19.973 12.742 19.919 13.113L20.424 13.405C21.379 13.956 21.707 15.182 21.155 16.137L20.156 17.866C19.623 18.785 18.348 19.127 17.425 18.597L16.896 18.291C16.314 18.747 15.675 19.122 15 19.402V20C15 21.103 14.103 22 13 22H11C9.897 22 9 21.103 9 20V19.402C8.325 19.122 7.686 18.747 7.104 18.29L6.575 18.596C5.654 19.127 4.376 18.783 3.845 17.866ZM6 12C6 12.461 6.058 12.925 6.171 13.378C6.278 13.811 6.087 14.263 5.7 14.486L4.576 15.137L5.576 16.866L6.72 16.204C6.876 16.114 7.048 16.07 7.22 16.07C7.47 16.07 7.718 16.163 7.908 16.345C8.591 16.992 9.415 17.475 10.292 17.744C10.713 17.872 11 18.261 11 18.7V20H13.002L13 18.7C13 18.261 13.287 17.872 13.708 17.744C14.585 17.476 15.409 16.992 16.092 16.345C16.413 16.037 16.897 15.982 17.28 16.203L18.425 16.864L19.423 15.135L18.3 14.486C17.913 14.263 17.722 13.811 17.829 13.378C17.942 12.925 18 12.461 18 12C18 11.538 17.942 11.074 17.83 10.622C17.722 10.19 17.913 9.738 18.3 9.514L19.424 8.865L18.424 7.136L17.28 7.797C16.898 8.017 16.413 7.962 16.092 7.655C15.409 7.008 14.585 6.525 13.708 6.256C13.287 6.128 13 5.739 13 5.3V4H11V5.3C11 5.739 10.713 6.128 10.292 6.256C9.415 6.524 8.591 7.008 7.908 7.655C7.587 7.962 7.104 8.018 6.72 7.797L5.575 7.135L4.577 8.864L5.7 9.514C6.087 9.737 6.278 10.189 6.17 10.622C6.058 11.074 6 11.538 6 12ZM16 12C16 14.206 14.206 16 12 16C9.794 16 8 14.206 8 12C8 9.794 9.794 8 12 8C14.206 8 16 9.794 16 12ZM14 12C14 10.916 13.084 10 12 10C10.916 10 10 10.916 10 12C10 13.084 10.916 14 12 14C13.084 14 14 13.084 14 12Z" })),
117
117
  abacus: ((0, jsx_runtime_1.jsx)("path", { d: "M2 3H4V21H2V3ZM20 3H22V21H20V3ZM5 13H7V14H9V13H11V14H13V13H17V14H19V13V11V10H17V11H13V10H11V11H9V10H7V11H5V13ZM5 4V5V7V8H7V7H15V8H17V7H19V5H17V4H15V5H7V4H5ZM5 17V19V20H7V19H9V20H11V19H19V17H11V16H9V17H7V16H5V17Z" })),
118
118
  hardHat: ((0, jsx_runtime_1.jsx)("path", { d: "M21 15C21.0005 14.3922 20.9402 13.7858 20.82 13.19C20.7025 12.6098 20.5248 12.0434 20.29 11.5C20.0673 10.972 19.7891 10.4692 19.46 10C19.1382 9.52142 18.7697 9.07591 18.36 8.67C17.9484 8.24581 17.4924 7.86698 17 7.54C16.5214 7.20905 16.0084 6.93077 15.47 6.71L15 6.52V5C15 4.73478 14.8946 4.48043 14.7071 4.29289C14.5196 4.10536 14.2652 4 14 4H10C9.73478 4 9.48043 4.10536 9.29289 4.29289C9.10536 4.48043 9 4.73478 9 5V6.52L8.5 6.71C7.97198 6.93269 7.46915 7.21092 7 7.54C6.51951 7.85928 6.07375 8.22795 5.67 8.64C5.24581 9.05165 4.86698 9.50759 4.54 10C4.20905 10.4786 3.93077 10.9916 3.71 11.53C3.4782 12.0745 3.30067 12.6406 3.18 13.22C3.06174 13.806 3.00145 14.4022 3 15V18H2V20H22V18H21V15ZM5 15C5.00102 14.5266 5.04791 14.0544 5.14 13.59C5.23104 13.1403 5.36844 12.7013 5.55 12.28C5.72529 11.864 5.93958 11.4656 6.19 11.09C6.69757 10.3423 7.34228 9.69757 8.09 9.19C8.38084 8.9986 8.68494 8.82817 9 8.68V15H11V6H13V15H15V8.68C15.3139 8.83035 15.6179 9.00069 15.91 9.19C16.2693 9.44497 16.6041 9.73288 16.91 10.05C17.2266 10.3535 17.5115 10.6886 17.76 11.05C18.0209 11.4208 18.239 11.82 18.41 12.24C18.5885 12.6625 18.7258 13.1012 18.82 13.55C18.9281 14.0261 18.9884 14.5119 19 15V18H5V15Z" })),
119
119
  task: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M20.0848 2.23047C20.5712 2.60462 20.6622 3.30222 20.288 3.78861L12.8806 13.4182C12.6857 13.6716 12.391 13.8288 12.072 13.8495C11.7529 13.8702 11.4404 13.7525 11.2143 13.5264L7.5106 9.82273C7.07668 9.38882 7.07668 8.6853 7.5106 8.25139C7.94451 7.81748 8.64802 7.81748 9.08194 8.25139L11.8908 11.0603L18.5266 2.43371C18.9008 1.94732 19.5984 1.85632 20.0848 2.23047Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M2 3.11117C2 2.49752 2.49746 2.00006 3.11111 2.00006H12.7407C13.3543 2.00006 13.8518 2.49752 13.8518 3.11117C13.8518 3.72481 13.3543 4.22227 12.7407 4.22227H4.22221V19.7778H19.7777V10.5185C19.7777 9.90489 20.2752 9.40744 20.8888 9.40744C21.5025 9.40744 21.9999 9.90489 21.9999 10.5185V20.8889C21.9999 21.5025 21.5025 22 20.8888 22H3.11111C2.49746 22 2 21.5025 2 20.8889V3.11117Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M6.97353 16.4445C6.47677 16.4445 6.07407 16.9419 6.07407 17.5556C6.07407 18.1692 6.47677 18.6667 6.97353 18.6667H17.7671C18.2639 18.6667 18.6666 18.1692 18.6666 17.5556C18.6666 16.9419 18.2639 16.4445 17.7671 16.4445H6.97353Z" })] })),
@@ -22,14 +22,19 @@ function VirtualizedOptions(props) {
22
22
  virtuosoRef.current.scrollToIndex({ index: focusedItem.index, align: "center" });
23
23
  }
24
24
  }, [focusedItem]);
25
- return ((0, jsx_runtime_1.jsx)(react_virtuoso_1.Virtuoso, { ref: virtuosoRef, totalListHeightChanged: onListHeightChange, totalCount: items.length,
26
- // Ensure the selected item is visible when the list renders
27
- initialTopMostItemIndex: selectedItem ? selectedItem.index : 0, ...(process.env.NODE_ENV === "test"
25
+ return ((0, jsx_runtime_1.jsx)(react_virtuoso_1.Virtuoso, { ref: virtuosoRef, totalListHeightChanged: onListHeightChange, totalCount: items.length, ...(process.env.NODE_ENV === "test"
28
26
  ? {
27
+ // We don't really need to set this, but it's handy for tests, which would
28
+ // otherwise render just 1 row. A better way to do this would be to jest.mock
29
+ // out Virtuoso with an impl that just rendered everything, but doing this for now.
29
30
  initialItemCount: items.length,
30
31
  key: items.length,
31
32
  }
32
- : {}), itemContent: (idx) => {
33
+ : {
34
+ // Ensure the selected item is visible when the list renders
35
+ // This seems to break tests, so only add in the non-test environment.
36
+ initialTopMostItemIndex: selectedItem ? selectedItem.index : 0,
37
+ }), itemContent: (idx) => {
33
38
  var _a;
34
39
  const item = items[idx];
35
40
  if (item) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.271.1",
3
+ "version": "2.272.1",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -21,12 +21,12 @@
21
21
  "start": "yarn storybook",
22
22
  "build": "yarn copy && ttsc",
23
23
  "build:truss": "truss",
24
- "build-storybook": "NODE_OPTIONS=--openssl-legacy-provider build-storybook",
24
+ "build-storybook": "NODE_OPTIONS=--openssl-legacy-provider storybook build",
25
25
  "test": "jest --maxWorkers 4",
26
26
  "test:watch": "jest --watch",
27
27
  "lint": "eslint --ext js,ts,tsx src",
28
28
  "lint:fix": "eslint --ext js,ts,tsx --fix src",
29
- "storybook": "NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 9000",
29
+ "storybook": "NODE_OPTIONS=--openssl-legacy-provider storybook dev -p 9000",
30
30
  "chromatic": "chromatic --project-token=074248da7284 --exit-once-uploaded --only-changed",
31
31
  "copy": "npx copyfiles -u 1 \"./src/**/*.css\" \"./dist/\"",
32
32
  "copy-to-internal-frontend": "cp -r dist/* ~/homebound/internal-frontend/node_modules/@homebound/beam/dist/",
@@ -49,7 +49,7 @@
49
49
  "react-router": "^5.3.4",
50
50
  "react-router-dom": "^5.3.4",
51
51
  "react-stately": "^3.22.0",
52
- "react-virtuoso": "2.10.2",
52
+ "react-virtuoso": "^4.2.2",
53
53
  "tributejs": "^5.1.3",
54
54
  "trix": "^1.3.1",
55
55
  "use-debounce": "^7.0.1",
@@ -81,15 +81,16 @@
81
81
  "@homebound/tsconfig": "^1.0.3",
82
82
  "@semantic-release/exec": "^6.0.3",
83
83
  "@semantic-release/git": "^10.0.1",
84
- "@storybook/addon-docs": "^6.5.10",
85
- "@storybook/addon-essentials": "^6.5.10",
86
- "@storybook/addon-interactions": "^6.5.10",
87
- "@storybook/addon-links": "^6.5.10",
88
- "@storybook/addons": "^6.5.10",
89
- "@storybook/builder-vite": "^0.4.2",
90
- "@storybook/mdx2-csf": "1.0.0-next.0",
91
- "@storybook/react": "^6.5.16",
92
- "@storybook/testing-library": "^0.0.13",
84
+ "@storybook/addon-docs": "^7.0.6",
85
+ "@storybook/addon-essentials": "^7.0.6",
86
+ "@storybook/addon-interactions": "^7.0.6",
87
+ "@storybook/addon-links": "^7.0.6",
88
+ "@storybook/addon-mdx-gfm": "^7.0.6",
89
+ "@storybook/addons": "^7.0.6",
90
+ "@storybook/mdx2-csf": "1.0.0",
91
+ "@storybook/react": "^7.0.6",
92
+ "@storybook/react-vite": "^7.0.6",
93
+ "@storybook/testing-library": "^0.1.0",
93
94
  "@testing-library/jest-dom": "^5.16.5",
94
95
  "@tsconfig/recommended": "^1.0.2",
95
96
  "@types/dompurify": "^2.2.3",
@@ -105,7 +106,7 @@
105
106
  "chromatic": "^6.17.0",
106
107
  "conventional-changelog-conventionalcommits": "^5.0.0",
107
108
  "eslint": "^8.12.0",
108
- "eslint-plugin-storybook": "^0.6.4",
109
+ "eslint-plugin-storybook": "^0.6.11",
109
110
  "husky": "^5.1.1",
110
111
  "identity-obj-proxy": "^3.0.0",
111
112
  "jest": "^29.4.3",
@@ -120,8 +121,9 @@
120
121
  "react-beautiful-dnd": "^13.1.1",
121
122
  "react-dom": "^18.2.0",
122
123
  "semantic-release": "^20.1.0",
124
+ "storybook": "^7.0.6",
123
125
  "storybook-addon-designs": "^6.3.1",
124
- "storybook-addon-performance": "^0.16.1",
126
+ "storybook-addon-performance": "^0.17.1",
125
127
  "ts-jest": "^29.0.5",
126
128
  "ts-node": "^10.9.1",
127
129
  "tslib": "^2.1.0",