@homebound/beam 2.416.2 → 2.416.3

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/dist/index.js CHANGED
@@ -14115,7 +14115,7 @@ function ToggleChips(props) {
14115
14115
 
14116
14116
  // src/components/Accordion.tsx
14117
14117
  import { useId, useResizeObserver as useResizeObserver2 } from "@react-aria/utils";
14118
- import { useCallback as useCallback17, useEffect as useEffect19, useMemo as useMemo26, useRef as useRef40, useState as useState29 } from "react";
14118
+ import { useCallback as useCallback17, useEffect as useEffect19, useMemo as useMemo26, useState as useState29 } from "react";
14119
14119
  import { useFocusRing as useFocusRing10 } from "react-aria";
14120
14120
  import { jsx as jsx84, jsxs as jsxs48 } from "@emotion/react/jsx-runtime";
14121
14121
  function Accordion(props) {
@@ -14139,19 +14139,20 @@ function Accordion(props) {
14139
14139
  const id = useId();
14140
14140
  const [expanded, setExpanded] = useState29(defaultExpanded && !disabled);
14141
14141
  const { isFocusVisible, focusProps } = useFocusRing10();
14142
- const contentRef = useRef40(null);
14142
+ const [contentEl, setContentEl] = useState29(null);
14143
+ const contentRef = useMemo26(() => ({ current: contentEl }), [contentEl]);
14143
14144
  const [contentHeight, setContentHeight] = useState29(expanded ? "auto" : "0");
14144
14145
  useEffect19(() => {
14145
14146
  setExpanded(defaultExpanded && !disabled);
14146
14147
  }, [defaultExpanded, disabled]);
14147
14148
  useEffect19(() => {
14148
- setContentHeight(expanded && contentRef.current ? `${contentRef.current.scrollHeight}px` : "0");
14149
- }, [expanded]);
14149
+ setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
14150
+ }, [expanded, contentEl]);
14150
14151
  const onResize = useCallback17(() => {
14151
- if (contentRef.current && expanded) {
14152
- setContentHeight(`${contentRef.current.scrollHeight}px`);
14152
+ if (contentEl && expanded) {
14153
+ setContentHeight(`${contentEl.scrollHeight}px`);
14153
14154
  }
14154
- }, [expanded, setContentHeight]);
14155
+ }, [expanded, contentEl, setContentHeight]);
14155
14156
  useResizeObserver2({ ref: contentRef, onResize });
14156
14157
  const toggle = useCallback17(() => {
14157
14158
  setExpanded((prev) => !prev);
@@ -14213,7 +14214,7 @@ function Accordion(props) {
14213
14214
  id,
14214
14215
  "aria-hidden": !expanded,
14215
14216
  css: Css.oh.h(contentHeight).add("transition", "height 250ms ease-in-out").$,
14216
- children: expanded && /* @__PURE__ */ jsx84("div", { css: Css.px2.pb2.pt1.if(omitPadding).p0.$, ref: contentRef, ...tid.content, children })
14217
+ children: expanded && /* @__PURE__ */ jsx84("div", { css: Css.px2.pb2.pt1.if(omitPadding).p0.$, ref: setContentEl, ...tid.content, children })
14217
14218
  }
14218
14219
  )
14219
14220
  ]
@@ -14340,17 +14341,17 @@ var variantStyles2 = {
14340
14341
  };
14341
14342
 
14342
14343
  // src/components/BeamContext.tsx
14343
- import { createContext as createContext6, useContext as useContext16, useMemo as useMemo40, useReducer, useRef as useRef46 } from "react";
14344
+ import { createContext as createContext6, useContext as useContext16, useMemo as useMemo40, useReducer, useRef as useRef45 } from "react";
14344
14345
  import { OverlayProvider } from "react-aria";
14345
14346
 
14346
14347
  // src/components/Modal/Modal.tsx
14347
14348
  import { useResizeObserver as useResizeObserver3 } from "@react-aria/utils";
14348
- import { useCallback as useCallback18, useEffect as useEffect22, useRef as useRef42, useState as useState31 } from "react";
14349
+ import { useCallback as useCallback18, useEffect as useEffect22, useRef as useRef41, useState as useState31 } from "react";
14349
14350
  import { FocusScope as FocusScope4, OverlayContainer as OverlayContainer2, useDialog, useModal as useModal2, useOverlay as useOverlay2, usePreventScroll } from "react-aria";
14350
14351
  import { createPortal as createPortal2 } from "react-dom";
14351
14352
 
14352
14353
  // src/components/Modal/useModal.tsx
14353
- import { useEffect as useEffect21, useMemo as useMemo28, useRef as useRef41 } from "react";
14354
+ import { useEffect as useEffect21, useMemo as useMemo28, useRef as useRef40 } from "react";
14354
14355
 
14355
14356
  // src/components/Modal/ModalContext.tsx
14356
14357
  import { createContext as createContext3, useContext as useContext12, useMemo as useMemo27 } from "react";
@@ -14368,8 +14369,8 @@ function useModalContext() {
14368
14369
  function useModal() {
14369
14370
  const { modalState, modalCanCloseChecks } = useBeamContext();
14370
14371
  const { inModal } = useModalContext();
14371
- const lastCanClose = useRef41();
14372
- const api = useRef41();
14372
+ const lastCanClose = useRef40();
14373
+ const api = useRef40();
14373
14374
  useEffect21(() => {
14374
14375
  return () => {
14375
14376
  modalCanCloseChecks.current = modalCanCloseChecks.current.filter((c) => c !== lastCanClose.current);
@@ -14414,7 +14415,7 @@ import { Fragment as Fragment20, jsx as jsx89, jsxs as jsxs51 } from "@emotion/r
14414
14415
  function Modal(props) {
14415
14416
  const { size = "md", content, forceScrolling, api, drawHeaderBorder = false, allowClosing = true } = props;
14416
14417
  const isFixedHeight = typeof size !== "string";
14417
- const ref = useRef42(null);
14418
+ const ref = useRef41(null);
14418
14419
  const { modalBodyDiv, modalFooterDiv, modalHeaderDiv } = useBeamContext();
14419
14420
  const { closeModal } = useModal();
14420
14421
  const { overlayProps, underlayProps } = useOverlay2(
@@ -14432,9 +14433,9 @@ function Modal(props) {
14432
14433
  const { modalProps } = useModal2();
14433
14434
  const { dialogProps, titleProps } = useDialog({ role: "dialog" }, ref);
14434
14435
  const [[width2, height], setSize] = useState31(getSize(size));
14435
- const modalBodyRef = useRef42(null);
14436
- const modalFooterRef = useRef42(null);
14437
- const modalHeaderRef = useRef42(null);
14436
+ const modalBodyRef = useRef41(null);
14437
+ const modalFooterRef = useRef41(null);
14438
+ const modalHeaderRef = useRef41(null);
14438
14439
  const testId = useTestIds({}, testIdPrefix);
14439
14440
  usePreventScroll();
14440
14441
  const { sm } = useBreakpoint();
@@ -14603,7 +14604,7 @@ function useSnackbarContext() {
14603
14604
  // src/components/SuperDrawer/SuperDrawer.tsx
14604
14605
  import { Global as Global3 } from "@emotion/react";
14605
14606
  import { AnimatePresence, motion } from "framer-motion";
14606
- import { useEffect as useEffect23, useRef as useRef43 } from "react";
14607
+ import { useEffect as useEffect23, useRef as useRef42 } from "react";
14607
14608
  import { createPortal as createPortal3 } from "react-dom";
14608
14609
 
14609
14610
  // src/components/SuperDrawer/utils.ts
@@ -14619,7 +14620,7 @@ import { createElement as createElement2 } from "@emotion/react";
14619
14620
  function SuperDrawer() {
14620
14621
  const { drawerContentStack: contentStack, sdHeaderDiv } = useBeamContext();
14621
14622
  const { closeDrawer } = useSuperDrawer();
14622
- const headerRef = useRef43(null);
14623
+ const headerRef = useRef42(null);
14623
14624
  const testId = useTestIds({}, "superDrawer");
14624
14625
  const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
14625
14626
  const { content } = currentContent ?? {};
@@ -14675,7 +14676,7 @@ function SuperDrawer() {
14675
14676
  }
14676
14677
 
14677
14678
  // src/components/Layout/FormPageLayout.tsx
14678
- import React16, { createRef, useCallback as useCallback22, useEffect as useEffect24, useMemo as useMemo34, useRef as useRef44, useState as useState37 } from "react";
14679
+ import React16, { createRef, useCallback as useCallback22, useEffect as useEffect24, useMemo as useMemo34, useRef as useRef43, useState as useState37 } from "react";
14679
14680
  import { useButton as useButton9, useFocusRing as useFocusRing11 } from "react-aria";
14680
14681
 
14681
14682
  // src/forms/BoundCheckboxField.tsx
@@ -16128,7 +16129,7 @@ function SectionNavLink(props) {
16128
16129
  sectionRef.current?.scrollIntoView({ behavior: "smooth", block: "start" });
16129
16130
  }, [sectionRef]);
16130
16131
  const tids = useTestIds(props);
16131
- const buttonRef = useRef44(null);
16132
+ const buttonRef = useRef43(null);
16132
16133
  const { buttonProps, isPressed } = useButton9({ onPress: handleNavClick }, buttonRef);
16133
16134
  const { isFocusVisible, focusProps } = useFocusRing11();
16134
16135
  const { hoverProps, isHovered } = useHover({});
@@ -16211,7 +16212,7 @@ function FullBleed({ children, omitPadding = false }) {
16211
16212
  import React17, { useEffect as useEffect27, useMemo as useMemo38, useState as useState40 } from "react";
16212
16213
 
16213
16214
  // src/components/ButtonMenu.tsx
16214
- import { useRef as useRef45 } from "react";
16215
+ import { useRef as useRef44 } from "react";
16215
16216
  import { useMenuTrigger as useMenuTrigger3 } from "react-aria";
16216
16217
  import { useMenuTriggerState as useMenuTriggerState3 } from "react-stately";
16217
16218
  import { jsx as jsx126 } from "@emotion/react/jsx-runtime";
@@ -16223,7 +16224,7 @@ function ButtonMenu(props) {
16223
16224
  onChange = props.onChange;
16224
16225
  }
16225
16226
  const state = useMenuTriggerState3({ isOpen: defaultOpen });
16226
- const buttonRef = useRef45(null);
16227
+ const buttonRef = useRef44(null);
16227
16228
  const { menuTriggerProps, menuProps } = useMenuTrigger3({ isDisabled: !!disabled }, state, buttonRef);
16228
16229
  const tid = useTestIds(
16229
16230
  props,
@@ -17441,18 +17442,18 @@ var BeamContext = createContext6({
17441
17442
  });
17442
17443
  function BeamProvider({ children, ...presentationProps }) {
17443
17444
  const [, tick] = useReducer((prev) => prev + 1, 0);
17444
- const modalRef = useRef46();
17445
+ const modalRef = useRef45();
17445
17446
  const modalHeaderDiv = useMemo40(() => document.createElement("div"), []);
17446
17447
  const modalBodyDiv = useMemo40(() => {
17447
17448
  const el = document.createElement("div");
17448
17449
  el.style.height = "100%";
17449
17450
  return el;
17450
17451
  }, []);
17451
- const modalCanCloseChecksRef = useRef46([]);
17452
+ const modalCanCloseChecksRef = useRef45([]);
17452
17453
  const modalFooterDiv = useMemo40(() => document.createElement("div"), []);
17453
- const drawerContentStackRef = useRef46([]);
17454
- const drawerCanCloseChecks = useRef46([]);
17455
- const drawerCanCloseDetailsChecks = useRef46([]);
17454
+ const drawerContentStackRef = useRef45([]);
17455
+ const drawerCanCloseChecks = useRef45([]);
17456
+ const drawerCanCloseDetailsChecks = useRef45([]);
17456
17457
  const sdHeaderDiv = useMemo40(() => document.createElement("div"), []);
17457
17458
  const context = useMemo40(() => {
17458
17459
  return {
@@ -17495,14 +17496,14 @@ function useBeamContext() {
17495
17496
  }
17496
17497
 
17497
17498
  // src/components/ButtonDatePicker.tsx
17498
- import { useRef as useRef47 } from "react";
17499
+ import { useRef as useRef46 } from "react";
17499
17500
  import { useMenuTrigger as useMenuTrigger4 } from "react-aria";
17500
17501
  import { useMenuTriggerState as useMenuTriggerState4 } from "react-stately";
17501
17502
  import { jsx as jsx151 } from "@emotion/react/jsx-runtime";
17502
17503
  function ButtonDatePicker(props) {
17503
17504
  const { defaultOpen, disabled, trigger, onSelect, ...datePickerProps } = props;
17504
17505
  const state = useMenuTriggerState4({ isOpen: defaultOpen });
17505
- const buttonRef = useRef47(null);
17506
+ const buttonRef = useRef46(null);
17506
17507
  const {
17507
17508
  menuTriggerProps,
17508
17509
  menuProps: { autoFocus: _af, ...menuProps }
@@ -17525,7 +17526,7 @@ function ButtonDatePicker(props) {
17525
17526
  }
17526
17527
 
17527
17528
  // src/components/ButtonGroup.tsx
17528
- import { useRef as useRef48 } from "react";
17529
+ import { useRef as useRef47 } from "react";
17529
17530
  import { useButton as useButton10, useFocusRing as useFocusRing12, useHover as useHover15 } from "react-aria";
17530
17531
  import { jsx as jsx152, jsxs as jsxs75 } from "@emotion/react/jsx-runtime";
17531
17532
  function ButtonGroup(props) {
@@ -17542,7 +17543,7 @@ function ButtonGroup(props) {
17542
17543
  function GroupButton(props) {
17543
17544
  const { icon, iconInc, iconColor, text, active, onClick: onPress, disabled, size, tooltip, ...otherProps } = props;
17544
17545
  const ariaProps = { onPress, isDisabled: !!disabled, ...otherProps };
17545
- const ref = useRef48(null);
17546
+ const ref = useRef47(null);
17546
17547
  const { buttonProps, isPressed } = useButton10(ariaProps, ref);
17547
17548
  const { isFocusVisible, focusProps } = useFocusRing12();
17548
17549
  const { hoverProps, isHovered } = useHover15(ariaProps);
@@ -17606,14 +17607,14 @@ import { useHover as useHover16 } from "react-aria";
17606
17607
 
17607
17608
  // src/components/Tag.tsx
17608
17609
  import { useResizeObserver as useResizeObserver4 } from "@react-aria/utils";
17609
- import { useRef as useRef49, useState as useState42 } from "react";
17610
+ import { useRef as useRef48, useState as useState42 } from "react";
17610
17611
  import { jsx as jsx153, jsxs as jsxs76 } from "@emotion/react/jsx-runtime";
17611
17612
  function Tag(props) {
17612
17613
  const { text, type, xss, preventTooltip = false, ...otherProps } = props;
17613
17614
  const typeStyles2 = getStyles(type);
17614
17615
  const tid = useTestIds(otherProps);
17615
17616
  const [showTooltip, setShowTooltip] = useState42(false);
17616
- const ref = useRef49(null);
17617
+ const ref = useRef48(null);
17617
17618
  useResizeObserver4({
17618
17619
  ref,
17619
17620
  onResize: () => {
@@ -17727,7 +17728,7 @@ function Copy(props) {
17727
17728
 
17728
17729
  // src/components/DnDGrid/DnDGrid.tsx
17729
17730
  import equal2 from "fast-deep-equal";
17730
- import { useCallback as useCallback24, useRef as useRef50 } from "react";
17731
+ import { useCallback as useCallback24, useRef as useRef49 } from "react";
17731
17732
 
17732
17733
  // src/components/DnDGrid/DnDGridContext.tsx
17733
17734
  import { createContext as createContext7, useContext as useContext17 } from "react";
@@ -17744,12 +17745,12 @@ function useDnDGridContext() {
17744
17745
  import { jsx as jsx156 } from "@emotion/react/jsx-runtime";
17745
17746
  function DnDGrid(props) {
17746
17747
  const { children, gridStyles, onReorder, activeItemStyles } = props;
17747
- const gridEl = useRef50(null);
17748
- const dragEl = useRef50();
17749
- const cloneEl = useRef50();
17750
- const initialOrder = useRef50();
17751
- const reorderViaKeyboard = useRef50(false);
17752
- const transformFrom = useRef50({ x: 0, y: 0 });
17748
+ const gridEl = useRef49(null);
17749
+ const dragEl = useRef49();
17750
+ const cloneEl = useRef49();
17751
+ const initialOrder = useRef49();
17752
+ const reorderViaKeyboard = useRef49(false);
17753
+ const transformFrom = useRef49({ x: 0, y: 0 });
17753
17754
  const tid = useTestIds(props, "dndGrid");
17754
17755
  const getGridItems = useCallback24(() => {
17755
17756
  return gridEl.current ? Array.from(gridEl.current.querySelectorAll(`[${gridItemIdKey}]`)) : [];
@@ -18117,10 +18118,10 @@ function HbSpinnerProvider({ quips = [], children }) {
18117
18118
 
18118
18119
  // src/components/MaxLines.tsx
18119
18120
  import { useLayoutEffect as useLayoutEffect2, useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
18120
- import { useCallback as useCallback25, useEffect as useEffect29, useRef as useRef51, useState as useState43 } from "react";
18121
+ import { useCallback as useCallback25, useEffect as useEffect29, useRef as useRef50, useState as useState43 } from "react";
18121
18122
  import { jsx as jsx161, jsxs as jsxs79 } from "@emotion/react/jsx-runtime";
18122
18123
  function MaxLines({ maxLines, children }) {
18123
- const elRef = useRef51(null);
18124
+ const elRef = useRef50(null);
18124
18125
  const [hasMore, setHasMore] = useState43(false);
18125
18126
  const [expanded, setExpanded] = useState43(false);
18126
18127
  useLayoutEffect2(() => {
@@ -18143,7 +18144,7 @@ function MaxLines({ maxLines, children }) {
18143
18144
 
18144
18145
  // src/components/ScrollShadows.tsx
18145
18146
  import { useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
18146
- import { useCallback as useCallback26, useMemo as useMemo45, useRef as useRef52, useState as useState44 } from "react";
18147
+ import { useCallback as useCallback26, useMemo as useMemo45, useRef as useRef51, useState as useState44 } from "react";
18147
18148
  import { jsx as jsx162, jsxs as jsxs80 } from "@emotion/react/jsx-runtime";
18148
18149
  function ScrollShadows(props) {
18149
18150
  const { children, xss, horizontal = false, bgColor = "rgba(255,255,255,1)" /* White */ } = props;
@@ -18154,7 +18155,7 @@ function ScrollShadows(props) {
18154
18155
  }
18155
18156
  const [showStartShadow, setShowStartShadow] = useState44(false);
18156
18157
  const [showEndShadow, setShowEndShadow] = useState44(false);
18157
- const scrollRef = useRef52(null);
18158
+ const scrollRef = useRef51(null);
18158
18159
  const [startShadowStyles, endShadowStyles] = useMemo45(() => {
18159
18160
  const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
18160
18161
  const commonStyles = Css.absolute.z3.add({ pointerEvents: "none" }).$;
@@ -18265,7 +18266,7 @@ function useSnackbar() {
18265
18266
  var snackbarId = 1;
18266
18267
 
18267
18268
  // src/components/Stepper.tsx
18268
- import { useRef as useRef53 } from "react";
18269
+ import { useRef as useRef52 } from "react";
18269
18270
  import { useButton as useButton11, useFocusRing as useFocusRing14, useHover as useHover18 } from "react-aria";
18270
18271
  import { jsx as jsx163, jsxs as jsxs81 } from "@emotion/react/jsx-runtime";
18271
18272
  function Stepper(props) {
@@ -18309,7 +18310,7 @@ function Stepper(props) {
18309
18310
  function StepButton(props) {
18310
18311
  const { label, disabled, state, isCurrent, onClick } = props;
18311
18312
  const ariaProps = { onPress: onClick, isDisabled: disabled };
18312
- const ref = useRef53(null);
18313
+ const ref = useRef52(null);
18313
18314
  const { buttonProps, isPressed } = useButton11(ariaProps, ref);
18314
18315
  const { isFocusVisible, focusProps } = useFocusRing14();
18315
18316
  const { hoverProps, isHovered } = useHover18(ariaProps);
@@ -18598,7 +18599,7 @@ var SuperDrawerContent = ({ children, actions }) => {
18598
18599
 
18599
18600
  // src/components/Tabs.tsx
18600
18601
  import { camelCase as camelCase5 } from "change-case";
18601
- import { useEffect as useEffect31, useMemo as useMemo47, useRef as useRef54, useState as useState45 } from "react";
18602
+ import { useEffect as useEffect31, useMemo as useMemo47, useRef as useRef53, useState as useState45 } from "react";
18602
18603
  import { mergeProps as mergeProps13, useFocusRing as useFocusRing15, useHover as useHover19 } from "react-aria";
18603
18604
  import { matchPath, Route } from "react-router";
18604
18605
  import { Link as Link5, useLocation } from "react-router-dom";
@@ -18645,7 +18646,7 @@ function Tabs(props) {
18645
18646
  const { isFocusVisible, focusProps } = useFocusRing15();
18646
18647
  const tid = useTestIds(others, "tabs");
18647
18648
  const [active, setActive] = useState45(selected);
18648
- const ref = useRef54(null);
18649
+ const ref = useRef53(null);
18649
18650
  useEffect31(() => setActive(selected), [selected]);
18650
18651
  function onKeyUp(e) {
18651
18652
  if (e.key === "ArrowLeft" || e.key === "ArrowRight") {