@homebound/beam 2.382.0 → 2.383.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.
package/dist/index.cjs CHANGED
@@ -6874,7 +6874,7 @@ function NavLink(props) {
6874
6874
  const { buttonProps, isPressed } = (0, import_react_aria7.useButton)({ ...ariaProps, elementType: href ? "a" : "button" }, ref);
6875
6875
  const { hoverProps, isHovered } = (0, import_react_aria7.useHover)({ isDisabled });
6876
6876
  const { isFocusVisible, focusProps } = (0, import_react_aria7.useFocusRing)(ariaProps);
6877
- const { baseStyles: baseStyles4, activeStyles: activeStyles2, focusRingStyles: focusRingStyles2, hoverStyles: hoverStyles3, disabledStyles: disabledStyles3, pressedStyles: pressedStyles3 } = (0, import_react21.useMemo)(
6877
+ const { baseStyles: baseStyles4, activeStyles: activeStyles3, focusRingStyles: focusRingStyles2, hoverStyles: hoverStyles4, disabledStyles: disabledStyles3, pressedStyles: pressedStyles3 } = (0, import_react21.useMemo)(
6878
6878
  () => getNavLinkStyles(variant, contrast),
6879
6879
  [variant, contrast]
6880
6880
  );
@@ -6887,10 +6887,10 @@ function NavLink(props) {
6887
6887
  "aria-current": active ? "page" : void 0,
6888
6888
  css: {
6889
6889
  ...baseStyles4,
6890
- ...active && activeStyles2,
6890
+ ...active && activeStyles3,
6891
6891
  ...isDisabled && disabledStyles3,
6892
6892
  ...isFocusVisible && focusRingStyles2,
6893
- ...isHovered && hoverStyles3,
6893
+ ...isHovered && hoverStyles4,
6894
6894
  ...isPressed && pressedStyles3
6895
6895
  }
6896
6896
  };
@@ -7086,7 +7086,7 @@ function Button(props) {
7086
7086
  );
7087
7087
  const { isFocusVisible, focusProps } = (0, import_react_aria9.useFocusRing)(ariaProps);
7088
7088
  const { hoverProps, isHovered } = (0, import_react_aria9.useHover)(ariaProps);
7089
- const { baseStyles: baseStyles4, hoverStyles: hoverStyles3, disabledStyles: disabledStyles3, pressedStyles: pressedStyles3, focusStyles: focusStyles2 } = (0, import_react23.useMemo)(
7089
+ const { baseStyles: baseStyles4, hoverStyles: hoverStyles4, disabledStyles: disabledStyles3, pressedStyles: pressedStyles3, focusStyles: focusStyles2 } = (0, import_react23.useMemo)(
7090
7090
  () => getButtonStyles(variant, size, contrast),
7091
7091
  [variant, size, contrast]
7092
7092
  );
@@ -7104,7 +7104,7 @@ function Button(props) {
7104
7104
  css: {
7105
7105
  ...Css.buttonBase.tt("inherit").$,
7106
7106
  ...baseStyles4,
7107
- ...isHovered && !isPressed ? hoverStyles3 : {},
7107
+ ...isHovered && !isPressed ? hoverStyles4 : {},
7108
7108
  ...isPressed ? pressedStyles3 : {},
7109
7109
  ...isDisabled || asyncInProgress ? { ...disabledStyles3, ...Css.cursorNotAllowed.$ } : {},
7110
7110
  ...isFocusVisible || forceFocusStyles ? focusStyles2 : {}
@@ -11042,13 +11042,15 @@ function CheckboxGroup(props) {
11042
11042
  helperText,
11043
11043
  onBlur,
11044
11044
  onFocus,
11045
- columns = 1
11045
+ columns = 1,
11046
+ required
11046
11047
  } = props;
11047
11048
  const state = (0, import_react_stately10.useCheckboxGroupState)({ ...props, value: values });
11048
11049
  const { groupProps, labelProps } = (0, import_react_aria30.useCheckboxGroup)(props, state);
11049
11050
  const tid = useTestIds(props);
11051
+ const labelSuffix = useLabelSuffix(required, false);
11050
11052
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { ...groupProps, css: Css.if(labelStyle === "left").df.fdr.$, onBlur, onFocus, ...tid, children: [
11051
- labelStyle !== "hidden" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { css: Css.if(labelStyle === "left").w50.$, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Label, { label, ...labelProps, ...tid.label }) }),
11053
+ labelStyle !== "hidden" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { css: Css.if(labelStyle === "left").w50.$, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Label, { label, ...labelProps, ...tid.label, suffix: labelSuffix }) }),
11052
11054
  /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { css: Css.dg.gtc(`repeat(${columns}, auto)`).gap2.$, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
11053
11055
  CheckboxGroupItem,
11054
11056
  {
@@ -12363,12 +12365,22 @@ var import_jsx_runtime76 = require("@emotion/react/jsx-runtime");
12363
12365
  function ToggleChipGroup(props) {
12364
12366
  const { fieldProps } = usePresentationContext();
12365
12367
  const { labelLeftFieldWidth = "50%" } = fieldProps ?? {};
12366
- const { values, label, labelStyle = fieldProps?.labelStyle ?? "above", options, xss } = props;
12368
+ const { values, label, labelStyle = fieldProps?.labelStyle ?? "above", options, required, xss } = props;
12367
12369
  const state = (0, import_react_stately16.useCheckboxGroupState)({ ...props, value: values });
12368
12370
  const { groupProps, labelProps } = (0, import_react_aria39.useCheckboxGroup)(props, state);
12369
12371
  const tid = useTestIds(props, "toggleChip");
12372
+ const labelSuffix = useLabelSuffix(required, false);
12370
12373
  return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { ...groupProps, css: Css.relative.df.fdc.if(labelStyle === "left").fdr.gap2.maxw100.jcsb.$, children: [
12371
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Label, { label, ...labelProps, hidden: labelStyle === "hidden", inline: labelStyle !== "above" }),
12374
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
12375
+ Label,
12376
+ {
12377
+ label,
12378
+ ...labelProps,
12379
+ hidden: labelStyle === "hidden",
12380
+ inline: labelStyle !== "above",
12381
+ suffix: labelSuffix
12382
+ }
12383
+ ),
12372
12384
  /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
12373
12385
  "div",
12374
12386
  {
@@ -14028,7 +14040,7 @@ var variantStyles2 = {
14028
14040
 
14029
14041
  // src/components/BeamContext.tsx
14030
14042
  var import_react91 = require("react");
14031
- var import_react_aria43 = require("react-aria");
14043
+ var import_react_aria44 = require("react-aria");
14032
14044
 
14033
14045
  // src/components/Modal/Modal.tsx
14034
14046
  var import_utils71 = require("@react-aria/utils");
@@ -14362,8 +14374,9 @@ function SuperDrawer() {
14362
14374
  }
14363
14375
 
14364
14376
  // src/components/Layout/FormPageLayout.tsx
14365
- var import_mobx_react20 = require("mobx-react");
14377
+ var import_mobx_react21 = require("mobx-react");
14366
14378
  var import_react84 = __toESM(require("react"), 1);
14379
+ var import_react_aria43 = require("react-aria");
14367
14380
 
14368
14381
  // src/forms/BoundCheckboxField.tsx
14369
14382
  var import_mobx_react2 = require("mobx-react");
@@ -14429,6 +14442,7 @@ function BoundCheckboxGroupField(props) {
14429
14442
  CheckboxGroup,
14430
14443
  {
14431
14444
  label,
14445
+ required: field.required,
14432
14446
  values: field.value || [],
14433
14447
  onChange: (values) => {
14434
14448
  onChange(values);
@@ -15083,7 +15097,17 @@ var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
15083
15097
  function BoundToggleChipGroupField(props) {
15084
15098
  const { field, onChange = (value) => field.set(value), label = defaultLabel(field.key), ...others } = props;
15085
15099
  const testId = useTestIds(props, field.key);
15086
- return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_mobx_react18.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ToggleChipGroup, { label, values: field.value || [], onChange, ...testId, ...others }) });
15100
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_mobx_react18.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
15101
+ ToggleChipGroup,
15102
+ {
15103
+ label,
15104
+ required: field.required,
15105
+ values: field.value || [],
15106
+ onChange,
15107
+ ...testId,
15108
+ ...others
15109
+ }
15110
+ ) });
15087
15111
  }
15088
15112
 
15089
15113
  // src/forms/BoundTreeSelectField.tsx
@@ -15437,21 +15461,26 @@ function StaticField(props) {
15437
15461
  }
15438
15462
 
15439
15463
  // src/forms/SubmitButton.tsx
15464
+ var import_mobx_react20 = require("mobx-react");
15440
15465
  var import_jsx_runtime117 = require("@emotion/react/jsx-runtime");
15441
15466
  function SubmitButton(props) {
15442
15467
  const { form, disabled, onClick, label = "Submit", ...others } = props;
15443
15468
  if (typeof onClick === "string") {
15444
15469
  throw new Error("SubmitButton.onClick doesn't support strings yet");
15445
15470
  }
15446
- const dirty = useComputed(() => form.dirty, [form]);
15471
+ const state = (0, import_mobx_react20.useLocalObservable)(() => ({ clicked: false }));
15472
+ const canSubmit = useComputed(() => {
15473
+ return form.isNewEntity && !state.clicked ? true : form.dirty && form.valid;
15474
+ }, [form]);
15447
15475
  return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
15448
15476
  Button,
15449
15477
  {
15450
15478
  label,
15451
- disabled: disabled || !dirty,
15479
+ disabled: disabled || !canSubmit,
15452
15480
  onClick: (e) => {
15481
+ state.clicked = true;
15453
15482
  if (form.canSave()) {
15454
- void onClick(e);
15483
+ return onClick(e);
15455
15484
  }
15456
15485
  },
15457
15486
  ...others
@@ -15484,6 +15513,15 @@ var headerHeightPx = 120;
15484
15513
  function FormPageLayoutComponent(props) {
15485
15514
  const { formSections, formState } = props;
15486
15515
  const tids = useTestIds(props, "formPageLayout");
15516
+ const sectionsWithRefs = (0, import_react84.useMemo)(
15517
+ () => formSections.map((section, id) => ({
15518
+ section,
15519
+ ref: (0, import_react84.createRef)(),
15520
+ // Unique key for each section to use in the observer
15521
+ sectionKey: `section-${section.title ?? id}`
15522
+ })),
15523
+ [formSections]
15524
+ );
15487
15525
  const gridColumns = "minMax(0, auto) minMax(100px, 250px) minMax(350px, 1000px) minMax(min-content, 300px) minMax(0, auto)";
15488
15526
  return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
15489
15527
  "div",
@@ -15492,8 +15530,8 @@ function FormPageLayoutComponent(props) {
15492
15530
  ...tids,
15493
15531
  children: [
15494
15532
  /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(PageHeader, { ...props, ...tids.pageHeader }),
15495
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(LeftNav, { formSections, ...tids.nav }),
15496
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(FormSections, { formSections, formState, ...tids }),
15533
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(LeftNav, { sectionsWithRefs, ...tids }),
15534
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(FormSections, { sectionsWithRefs, formState, ...tids }),
15497
15535
  /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SidebarContent, {})
15498
15536
  ]
15499
15537
  }
@@ -15508,7 +15546,7 @@ function PageHeader(props) {
15508
15546
  breadCrumb && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(PageHeaderBreadcrumbs, { breadcrumb: breadCrumb }),
15509
15547
  /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("h1", { css: Css.xl3Sb.$, ...tids.pageTitle, children: pageTitle })
15510
15548
  ] }),
15511
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_mobx_react20.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { css: Css.df.gap1.$, children: [
15549
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_mobx_react21.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { css: Css.df.gap1.$, children: [
15512
15550
  tertiaryAction && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
15513
15551
  Button,
15514
15552
  {
@@ -15546,14 +15584,16 @@ function PageHeader(props) {
15546
15584
  ] }) });
15547
15585
  }
15548
15586
  function FormSections(props) {
15549
- const { formSections, formState } = props;
15587
+ const { sectionsWithRefs, formState } = props;
15550
15588
  const tids = useTestIds(props);
15551
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("article", { css: Css.gr(2).gc("3 / 4").$, children: formSections.map((section, i) => (
15589
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("article", { css: Css.gr(2).gc("3 / 4").$, children: sectionsWithRefs.map(({ section, ref, sectionKey }, i) => (
15552
15590
  // Subgrid here allows for icon placement to the left of the section content
15553
15591
  /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
15554
15592
  "section",
15555
15593
  {
15556
- css: Css.dg.gtc("50px 1fr").gtr("auto").mb3.$,
15594
+ id: sectionKey,
15595
+ ref,
15596
+ css: Css.dg.gtc("50px 1fr").gtr("auto").mb3.add("scrollMarginTop", `${headerHeightPx}px`).$,
15557
15597
  ...tids.formSection,
15558
15598
  children: [
15559
15599
  /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { css: Css.gc(1).$, children: section.icon && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Icon, { icon: section.icon, inc: 3.5 }) }),
@@ -15563,17 +15603,93 @@ function FormSections(props) {
15563
15603
  ] })
15564
15604
  ]
15565
15605
  },
15566
- `section-${section.title ?? i}`
15606
+ sectionKey
15567
15607
  )
15568
15608
  )) });
15569
15609
  }
15570
15610
  function LeftNav(props) {
15611
+ const { sectionsWithRefs } = props;
15612
+ const tids = useTestIds(props);
15613
+ const sectionWithTitles = (0, import_react84.useMemo)(
15614
+ () => sectionsWithRefs.filter(({ section }) => !!section.title),
15615
+ [sectionsWithRefs]
15616
+ );
15617
+ const activeSection = useActiveSection(sectionWithTitles);
15618
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("aside", { css: Css.gr(2).gc("2 / 3").sticky.topPx(headerHeightPx).px3.df.fdc.gap1.$, ...tids.nav, children: sectionWithTitles.map((sectionWithRef) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
15619
+ SectionNavLink,
15620
+ {
15621
+ sectionWithRef,
15622
+ activeSection,
15623
+ ...tids
15624
+ },
15625
+ `nav-${sectionWithRef.sectionKey}`
15626
+ )) });
15627
+ }
15628
+ var activeStyles = Css.smBd.boxShadow(`inset 3px 0px 0 0px ${"rgba(37, 99, 235, 1)" /* Blue600 */}`).$;
15629
+ var hoverStyles2 = Css.bgBlue50.smBd.blue900.boxShadow(`inset 3px 0px 0 0px ${"rgba(30, 58, 138, 1)" /* Blue900 */}`).$;
15630
+ var defaultFocusRingStyles = Css.relative.z2.bshFocus.$;
15631
+ function SectionNavLink(props) {
15632
+ const { sectionWithRef, activeSection } = props;
15633
+ const { section, ref: sectionRef } = sectionWithRef;
15634
+ const active = activeSection === sectionWithRef.sectionKey;
15635
+ const handleNavClick = (0, import_react84.useCallback)(() => {
15636
+ sectionRef.current?.scrollIntoView({ behavior: "smooth", block: "start" });
15637
+ }, [sectionRef]);
15571
15638
  const tids = useTestIds(props);
15572
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("aside", { css: Css.gr(2).gc("2 / 3").sticky.topPx(headerHeightPx).px3.df.fdc.gap1.$, ...tids });
15639
+ const buttonRef = (0, import_react84.useRef)(null);
15640
+ const { buttonProps, isPressed } = (0, import_react_aria43.useButton)({ onPress: handleNavClick }, buttonRef);
15641
+ const { isFocusVisible, focusProps } = (0, import_react_aria43.useFocusRing)();
15642
+ const { hoverProps, isHovered } = useHover({});
15643
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
15644
+ "button",
15645
+ {
15646
+ ref: buttonRef,
15647
+ ...buttonProps,
15648
+ ...focusProps,
15649
+ ...hoverProps,
15650
+ css: {
15651
+ ...Css.buttonBase.wsn.tal.smMd.blue600.px2.py1.br0.h100.$,
15652
+ ...isFocusVisible ? defaultFocusRingStyles : {},
15653
+ ...active ? activeStyles : {},
15654
+ ...isPressed ? activeStyles : isHovered ? hoverStyles2 : {}
15655
+ },
15656
+ ...tids.sectionNavLink,
15657
+ children: section.title
15658
+ }
15659
+ );
15573
15660
  }
15574
15661
  function SidebarContent() {
15575
15662
  return null;
15576
15663
  }
15664
+ function useActiveSection(sectionsWithRefs) {
15665
+ const [activeSection, setActiveSection] = (0, import_react84.useState)(null);
15666
+ (0, import_react84.useEffect)(() => {
15667
+ if (!("IntersectionObserver" in window)) return;
15668
+ const observer2 = new IntersectionObserver(
15669
+ (entries) => {
15670
+ const sectionsInView = entries.filter((entry) => entry.isIntersecting).sort((a, b) => b.intersectionRatio - a.intersectionRatio);
15671
+ if (sectionsInView[0]) {
15672
+ setActiveSection(sectionsInView[0].target.id);
15673
+ }
15674
+ },
15675
+ // Threshold defines when the observer callback should be triggered, we may need to refine this based on more real word layouts
15676
+ { rootMargin: `-${headerHeightPx}px 0px 0px 0px`, threshold: 0.4 }
15677
+ );
15678
+ sectionsWithRefs.forEach(({ ref }) => {
15679
+ if (ref.current) {
15680
+ observer2.observe(ref.current);
15681
+ }
15682
+ });
15683
+ return () => {
15684
+ sectionsWithRefs.forEach(({ ref }) => {
15685
+ if (ref.current) {
15686
+ observer2.unobserve(ref.current);
15687
+ }
15688
+ });
15689
+ };
15690
+ }, [sectionsWithRefs]);
15691
+ return activeSection;
15692
+ }
15577
15693
 
15578
15694
  // src/components/Layout/FullBleed.tsx
15579
15695
  var import_react86 = require("react");
@@ -15832,7 +15948,7 @@ function BeamProvider({ children, ...presentationProps }) {
15832
15948
  };
15833
15949
  }, [modalBodyDiv, modalFooterDiv, modalHeaderDiv, sdHeaderDiv]);
15834
15950
  return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(BeamContext.Provider, { value: { ...context }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(PresentationProvider, { ...presentationProps, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(RightPaneProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(AutoSaveStatusProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(SnackbarProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(ToastProvider, { children: [
15835
- /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_react_aria43.OverlayProvider, { children: [
15951
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_react_aria44.OverlayProvider, { children: [
15836
15952
  children,
15837
15953
  modalRef.current && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Modal, { ...modalRef.current })
15838
15954
  ] }),
@@ -15858,14 +15974,14 @@ function useBeamContext() {
15858
15974
 
15859
15975
  // src/components/ButtonDatePicker.tsx
15860
15976
  var import_react92 = require("react");
15861
- var import_react_aria44 = require("react-aria");
15977
+ var import_react_aria45 = require("react-aria");
15862
15978
  var import_react_stately17 = require("react-stately");
15863
15979
  var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
15864
15980
  function ButtonDatePicker(props) {
15865
15981
  const { defaultOpen, disabled, trigger, onSelect, ...datePickerProps } = props;
15866
15982
  const state = (0, import_react_stately17.useMenuTriggerState)({ isOpen: defaultOpen });
15867
15983
  const buttonRef = (0, import_react92.useRef)(null);
15868
- const { menuTriggerProps, menuProps } = (0, import_react_aria44.useMenuTrigger)({ isDisabled: !!disabled }, state, buttonRef);
15984
+ const { menuTriggerProps, menuProps } = (0, import_react_aria45.useMenuTrigger)({ isDisabled: !!disabled }, state, buttonRef);
15869
15985
  const tid = useTestIds(
15870
15986
  props,
15871
15987
  isTextButton(trigger) ? defaultTestId(labelOr(trigger, "buttonDatePicker")) : isNavLinkButton(trigger) ? defaultTestId(trigger.navLabel) : isIconButton(trigger) ? trigger.icon : trigger.name
@@ -15885,7 +16001,7 @@ function ButtonDatePicker(props) {
15885
16001
 
15886
16002
  // src/components/ButtonGroup.tsx
15887
16003
  var import_react93 = require("react");
15888
- var import_react_aria45 = require("react-aria");
16004
+ var import_react_aria46 = require("react-aria");
15889
16005
  var import_jsx_runtime128 = (
15890
16006
  // Disable the button if the ButtonGroup is disabled or if the current button is disabled.
15891
16007
  require("@emotion/react/jsx-runtime")
@@ -15902,9 +16018,9 @@ function GroupButton(props) {
15902
16018
  const { icon, iconInc, iconColor, text, active, onClick: onPress, disabled, size, tooltip, ...otherProps } = props;
15903
16019
  const ariaProps = { onPress, isDisabled: !!disabled, ...otherProps };
15904
16020
  const ref = (0, import_react93.useRef)(null);
15905
- const { buttonProps, isPressed } = (0, import_react_aria45.useButton)(ariaProps, ref);
15906
- const { isFocusVisible, focusProps } = (0, import_react_aria45.useFocusRing)();
15907
- const { hoverProps, isHovered } = (0, import_react_aria45.useHover)(ariaProps);
16021
+ const { buttonProps, isPressed } = (0, import_react_aria46.useButton)(ariaProps, ref);
16022
+ const { isFocusVisible, focusProps } = (0, import_react_aria46.useFocusRing)();
16023
+ const { hoverProps, isHovered } = (0, import_react_aria46.useHover)(ariaProps);
15908
16024
  const tid = useTestIds(props);
15909
16025
  return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { css: getButtonStyles2(), children: maybeTooltip({
15910
16026
  title: resolveTooltip(disabled, tooltip),
@@ -15919,9 +16035,9 @@ function GroupButton(props) {
15919
16035
  css: {
15920
16036
  ...Css.buttonBase.px2.br0.h100.$,
15921
16037
  "&:disabled": Css.gray400.cursorNotAllowed.bcGray300.$,
15922
- ...isFocusVisible ? defaultFocusRingStyles : {},
15923
- ...active ? activeStyles : {},
15924
- ...isPressed ? pressedStyles2 : isHovered ? hoverStyles2 : {},
16038
+ ...isFocusVisible ? defaultFocusRingStyles2 : {},
16039
+ ...active ? activeStyles2 : {},
16040
+ ...isPressed ? pressedStyles2 : isHovered ? hoverStyles3 : {},
15925
16041
  ...icon ? iconStyles2[size] : {}
15926
16042
  },
15927
16043
  ...tid[defaultTestId(typeof text === "string" && text || icon || "button")],
@@ -15934,9 +16050,9 @@ function GroupButton(props) {
15934
16050
  }) });
15935
16051
  }
15936
16052
  var pressedStyles2 = Css.bgGray200.$;
15937
- var activeStyles = Css.bgGray300.$;
15938
- var hoverStyles2 = Css.bgGray100.$;
15939
- var defaultFocusRingStyles = Css.relative.z2.bshFocus.$;
16053
+ var activeStyles2 = Css.bgGray300.$;
16054
+ var hoverStyles3 = Css.bgGray100.$;
16055
+ var defaultFocusRingStyles2 = Css.relative.z2.bshFocus.$;
15940
16056
  function getButtonStyles2() {
15941
16057
  return {
15942
16058
  ...Css.z1.bgWhite.bcGray300.bw1.ba.gray900.br0.oh.$,
@@ -15961,7 +16077,7 @@ var iconStyles2 = {
15961
16077
 
15962
16078
  // src/components/ButtonMenu.tsx
15963
16079
  var import_react94 = require("react");
15964
- var import_react_aria46 = require("react-aria");
16080
+ var import_react_aria47 = require("react-aria");
15965
16081
  var import_react_stately18 = require("react-stately");
15966
16082
  var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
15967
16083
  function ButtonMenu(props) {
@@ -15973,7 +16089,7 @@ function ButtonMenu(props) {
15973
16089
  }
15974
16090
  const state = (0, import_react_stately18.useMenuTriggerState)({ isOpen: defaultOpen });
15975
16091
  const buttonRef = (0, import_react94.useRef)(null);
15976
- const { menuTriggerProps, menuProps } = (0, import_react_aria46.useMenuTrigger)({ isDisabled: !!disabled }, state, buttonRef);
16092
+ const { menuTriggerProps, menuProps } = (0, import_react_aria47.useMenuTrigger)({ isDisabled: !!disabled }, state, buttonRef);
15977
16093
  const tid = useTestIds(
15978
16094
  props,
15979
16095
  isTextButton(trigger) ? labelOr(trigger, "buttonMenu") : isNavLinkButton(trigger) ? defaultTestId(trigger.navLabel) : isIconButton(trigger) ? trigger.icon : trigger.name
@@ -16234,12 +16350,12 @@ var gridCloneKey = "dndgrid-clone";
16234
16350
  var activeGridItemClass = "dndgrid-active";
16235
16351
 
16236
16352
  // src/components/DnDGrid/DnDGridItemHandle.tsx
16237
- var import_react_aria47 = require("react-aria");
16353
+ var import_react_aria48 = require("react-aria");
16238
16354
  var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
16239
16355
  function DnDGridItemHandle(props) {
16240
16356
  const { dragHandleProps, icon = "move", compact = false, color } = props;
16241
- const { focusProps, isFocusVisible } = (0, import_react_aria47.useFocusRing)();
16242
- const { hoverProps, isHovered } = (0, import_react_aria47.useHover)({});
16357
+ const { focusProps, isFocusVisible } = (0, import_react_aria48.useFocusRing)();
16358
+ const { hoverProps, isHovered } = (0, import_react_aria48.useHover)({});
16243
16359
  const tid = useTestIds(props, "dragHandle");
16244
16360
  const iconButtonNormal2 = Css.hPx(28).wPx(28).br8.bw2.$;
16245
16361
  const iconButtonCompact2 = Css.hPx(18).wPx(18).br4.bw1.$;
@@ -16251,7 +16367,7 @@ function DnDGridItemHandle(props) {
16251
16367
  ...Css.cursor("grab").bcTransparent.bss.bgTransparent.outline0.dif.aic.jcc.transition.if(isFocusVisible).bcBlue700.$,
16252
16368
  ...isHovered && Css.bgGray200.$
16253
16369
  },
16254
- ...(0, import_react_aria47.mergeProps)(dragHandleProps, focusProps, hoverProps),
16370
+ ...(0, import_react_aria48.mergeProps)(dragHandleProps, focusProps, hoverProps),
16255
16371
  ...tid,
16256
16372
  children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Icon, { icon, inc: compact ? 2 : void 0, color })
16257
16373
  }
@@ -17230,7 +17346,7 @@ var snackbarId = 1;
17230
17346
 
17231
17347
  // src/components/Stepper.tsx
17232
17348
  var import_react106 = require("react");
17233
- var import_react_aria48 = require("react-aria");
17349
+ var import_react_aria49 = require("react-aria");
17234
17350
  var import_jsx_runtime152 = require("@emotion/react/jsx-runtime");
17235
17351
  function Stepper(props) {
17236
17352
  const { steps, currentStep, onChange } = props;
@@ -17274,9 +17390,9 @@ function StepButton(props) {
17274
17390
  const { label, disabled, state, isCurrent, onClick } = props;
17275
17391
  const ariaProps = { onPress: onClick, isDisabled: disabled };
17276
17392
  const ref = (0, import_react106.useRef)(null);
17277
- const { buttonProps, isPressed } = (0, import_react_aria48.useButton)(ariaProps, ref);
17278
- const { isFocusVisible, focusProps } = (0, import_react_aria48.useFocusRing)();
17279
- const { hoverProps, isHovered } = (0, import_react_aria48.useHover)(ariaProps);
17393
+ const { buttonProps, isPressed } = (0, import_react_aria49.useButton)(ariaProps, ref);
17394
+ const { isFocusVisible, focusProps } = (0, import_react_aria49.useFocusRing)();
17395
+ const { hoverProps, isHovered } = (0, import_react_aria49.useHover)(ariaProps);
17280
17396
  const focusRingStyles2 = state === "error" ? Css.bshDanger.$ : Css.bshFocus.$;
17281
17397
  const tid = useTestIds(props, "stepButton");
17282
17398
  return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
@@ -17563,7 +17679,7 @@ var SuperDrawerContent = ({ children, actions }) => {
17563
17679
  // src/components/Tabs.tsx
17564
17680
  var import_change_case7 = require("change-case");
17565
17681
  var import_react108 = require("react");
17566
- var import_react_aria49 = require("react-aria");
17682
+ var import_react_aria50 = require("react-aria");
17567
17683
  var import_react_router2 = require("react-router");
17568
17684
  var import_react_router_dom5 = require("react-router-dom");
17569
17685
  var import_jsx_runtime157 = require("@emotion/react/jsx-runtime");
@@ -17606,7 +17722,7 @@ function Tabs(props) {
17606
17722
  const selected = isRouteTabs(props) ? uniqueTabValue(
17607
17723
  props.tabs.find((t) => !!(0, import_react_router2.matchPath)(location.pathname, { path: t.path, exact: true })) || props.tabs[0]
17608
17724
  ) : props.selected;
17609
- const { isFocusVisible, focusProps } = (0, import_react_aria49.useFocusRing)();
17725
+ const { isFocusVisible, focusProps } = (0, import_react_aria50.useFocusRing)();
17610
17726
  const tid = useTestIds(others, "tabs");
17611
17727
  const [active, setActive] = (0, import_react108.useState)(selected);
17612
17728
  const ref = (0, import_react108.useRef)(null);
@@ -17651,8 +17767,8 @@ function TabImpl(props) {
17651
17767
  const { tab, onClick, active, onKeyUp, onBlur, focusProps, isFocusVisible = false, ...others } = props;
17652
17768
  const { disabled = false, name: label, icon, endAdornment } = tab;
17653
17769
  const isDisabled = !!disabled;
17654
- const { hoverProps, isHovered } = (0, import_react_aria49.useHover)({ isDisabled });
17655
- const { baseStyles: baseStyles4, activeStyles: activeStyles2, focusRingStyles: focusRingStyles2, hoverStyles: hoverStyles3, disabledStyles: disabledStyles3, activeHoverStyles } = (0, import_react108.useMemo)(
17770
+ const { hoverProps, isHovered } = (0, import_react_aria50.useHover)({ isDisabled });
17771
+ const { baseStyles: baseStyles4, activeStyles: activeStyles3, focusRingStyles: focusRingStyles2, hoverStyles: hoverStyles4, disabledStyles: disabledStyles3, activeHoverStyles } = (0, import_react108.useMemo)(
17656
17772
  () => getTabStyles(),
17657
17773
  []
17658
17774
  );
@@ -17667,14 +17783,14 @@ function TabImpl(props) {
17667
17783
  ...others,
17668
17784
  css: {
17669
17785
  ...baseStyles4,
17670
- ...active && activeStyles2,
17786
+ ...active && activeStyles3,
17671
17787
  ...isDisabled && disabledStyles3,
17672
- ...isHovered && hoverStyles3,
17788
+ ...isHovered && hoverStyles4,
17673
17789
  ...isHovered && active && activeHoverStyles,
17674
17790
  ...isFocusVisible && active && focusRingStyles2
17675
17791
  }
17676
17792
  };
17677
- const interactiveProps = (0, import_react_aria49.mergeProps)(focusProps, hoverProps, {
17793
+ const interactiveProps = (0, import_react_aria50.mergeProps)(focusProps, hoverProps, {
17678
17794
  onKeyUp,
17679
17795
  onBlur,
17680
17796
  ...isRouteTab(tab) ? {} : { onClick: () => onClick(tab.value) }