@homebound/beam 3.53.0 → 3.54.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/dist/index.js CHANGED
@@ -23625,326 +23625,8 @@ function NavbarUserMenu({
23625
23625
  }, placement: "right", ...tid }) });
23626
23626
  }
23627
23627
 
23628
- // src/components/Tabs.tsx
23629
- import { camelCase as camelCase7 } from "change-case";
23630
- import { useEffect as useEffect35, useMemo as useMemo52, useRef as useRef59, useState as useState54 } from "react";
23631
- import { mergeProps as mergeProps30, useFocusRing as useFocusRing17, useHover as useHover21 } from "react-aria";
23632
- import { matchPath } from "react-router";
23633
- import { Link as Link7, useLocation as useLocation2 } from "react-router-dom";
23634
- import { trussProps as trussProps100, maybeCssVar as maybeCssVar53 } from "@homebound/truss/runtime";
23635
- import { Fragment as Fragment44, jsx as jsx190, jsxs as jsxs94 } from "react/jsx-runtime";
23636
- function TabsWithContent(props) {
23637
- const styles = hideTabs(props) ? {} : {
23638
- paddingTop: "pt3"
23639
- };
23640
- return /* @__PURE__ */ jsxs94(Fragment44, { children: [
23641
- /* @__PURE__ */ jsx190(Tabs, { ...props }),
23642
- /* @__PURE__ */ jsx190(TabContent, { ...props, contentXss: {
23643
- ...styles,
23644
- ...props.contentXss
23645
- } })
23646
- ] });
23647
- }
23648
- function TabContent(props) {
23649
- const tid = useTestIds(props, "tab");
23650
- const {
23651
- tabs,
23652
- contentXss = {},
23653
- omitFullBleedPadding = false
23654
- } = props;
23655
- const location = useLocation2();
23656
- const selectedTab = isRouteTabs(props) ? props.tabs.find((t) => {
23657
- const paths = Array.isArray(t.path) ? t.path : [t.path];
23658
- return paths.some((p) => !!matchPath({
23659
- path: p,
23660
- end: true
23661
- }, location.pathname));
23662
- }) || tabs[0] : props.tabs.find((tab) => tab.value === props.selected) || tabs[0];
23663
- const uniqueValue = uniqueTabValue(selectedTab);
23664
- return (
23665
- // Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
23666
- // Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
23667
- /* @__PURE__ */ jsx190(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ jsx190("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...trussProps100(contentXss), children: selectedTab.render() }) })
23668
- );
23669
- }
23670
- function Tabs(props) {
23671
- const {
23672
- ariaLabel,
23673
- tabs,
23674
- includeBottomBorder,
23675
- right,
23676
- ...others
23677
- } = props;
23678
- const location = useLocation2();
23679
- const selected = isRouteTabs(props) ? uniqueTabValue(props.tabs.find((t) => {
23680
- const paths = Array.isArray(t.path) ? t.path : [t.path];
23681
- return paths.some((p) => !!matchPath({
23682
- path: p,
23683
- end: true
23684
- }, location.pathname));
23685
- }) || props.tabs[0]) : props.selected;
23686
- const {
23687
- isFocusVisible,
23688
- focusProps
23689
- } = useFocusRing17();
23690
- const tid = useTestIds(others, "tabs");
23691
- const [active, setActive] = useState54(selected);
23692
- const ref = useRef59(null);
23693
- useEffect35(() => setActive(selected), [selected]);
23694
- function onKeyUp(e) {
23695
- if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
23696
- const nextTabValue = getNextTabValue(active, e.key, tabs);
23697
- setActive(nextTabValue);
23698
- document.getElementById(`${nextTabValue}-tab`)?.focus();
23699
- }
23700
- }
23701
- function onClick(value) {
23702
- !isRouteTabs(props) && props.onChange(value);
23703
- }
23704
- function onBlur(e) {
23705
- if (!(ref.current && ref.current.contains(e.relatedTarget))) {
23706
- setActive(selected);
23707
- }
23708
- }
23709
- return /* @__PURE__ */ jsxs94("div", { ...trussProps100({
23710
- ...{
23711
- display: "df",
23712
- alignItems: "aic",
23713
- overflow: "oa",
23714
- whiteSpace: "wsnw",
23715
- gap: "gap1"
23716
- },
23717
- ...includeBottomBorder ? {
23718
- ...{
23719
- borderBottomStyle: "bbs_solid",
23720
- borderBottomWidth: "bbw_1px",
23721
- borderColor: "bcGray200"
23722
- }
23723
- } : {}
23724
- }), children: [
23725
- !hideTabs(props) && /* @__PURE__ */ jsx190("div", { ref, className: "dif gap1 asfe", "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
23726
- const uniqueValue = uniqueTabValue(tab);
23727
- return /* @__PURE__ */ jsx190(TabImpl, { active: active === uniqueValue, focusProps, isFocusVisible, onClick, onKeyUp, onBlur, tab, ...tid[defaultTestId(uniqueValue)] }, uniqueValue);
23728
- }) }),
23729
- right && /* @__PURE__ */ jsx190("div", { className: "mla df aic gap1 pb1", children: right })
23730
- ] });
23731
- }
23732
- function TabImpl(props) {
23733
- const {
23734
- tab,
23735
- onClick,
23736
- active,
23737
- onKeyUp,
23738
- onBlur,
23739
- focusProps,
23740
- isFocusVisible = false,
23741
- ...others
23742
- } = props;
23743
- const {
23744
- disabled = false,
23745
- name: label,
23746
- icon,
23747
- endAdornment
23748
- } = tab;
23749
- const isDisabled = !!disabled;
23750
- const {
23751
- hoverProps,
23752
- isHovered
23753
- } = useHover21({
23754
- isDisabled
23755
- });
23756
- const {
23757
- baseStyles: baseStyles4,
23758
- activeStyles: activeStyles3,
23759
- focusRingStyles: focusRingStyles2,
23760
- hoverStyles: hoverStyles4,
23761
- disabledStyles: disabledStyles3,
23762
- activeHoverStyles
23763
- } = useMemo52(() => getTabStyles(), []);
23764
- const uniqueValue = uniqueTabValue(tab);
23765
- const tabProps = {
23766
- "aria-controls": `${uniqueValue}-tabPanel`,
23767
- "aria-selected": active,
23768
- "aria-disabled": isDisabled || void 0,
23769
- id: `${uniqueValue}-tab`,
23770
- role: "tab",
23771
- tabIndex: active ? 0 : -1,
23772
- ...others,
23773
- ...trussProps100({
23774
- ...baseStyles4,
23775
- ...active && activeStyles3,
23776
- ...isDisabled && disabledStyles3,
23777
- ...isHovered && hoverStyles4,
23778
- ...isHovered && active && activeHoverStyles,
23779
- ...isFocusVisible && active && focusRingStyles2
23780
- })
23781
- };
23782
- const interactiveProps = mergeProps30(focusProps, hoverProps, {
23783
- onKeyUp,
23784
- onBlur,
23785
- ...isRouteTab(tab) ? {} : {
23786
- onClick: () => onClick(tab.value)
23787
- }
23788
- });
23789
- const tabLabel = /* @__PURE__ */ jsxs94(Fragment44, { children: [
23790
- label,
23791
- (icon || endAdornment) && /* @__PURE__ */ jsx190("span", { className: "ml1", children: icon ? /* @__PURE__ */ jsx190(Icon, { icon }) : endAdornment })
23792
- ] });
23793
- return isDisabled ? maybeTooltip({
23794
- title: resolveTooltip(disabled),
23795
- placement: "top",
23796
- children: /* @__PURE__ */ jsx190("div", { ...tabProps, children: tabLabel })
23797
- }) : isRouteTab(tab) ? /* @__PURE__ */ jsx190(Link7, { ...mergeProps30(tabProps, interactiveProps, {
23798
- className: "navLink"
23799
- }), to: tab.href, children: tabLabel }) : /* @__PURE__ */ jsx190("button", { ...{
23800
- ...tabProps,
23801
- ...interactiveProps
23802
- }, children: tabLabel });
23803
- }
23804
- function getTabStyles() {
23805
- const borderBottomWidthPx = 4;
23806
- const verticalPaddingPx = 6;
23807
- const borderBottomStyles = {
23808
- borderBottomStyle: "bbs_solid",
23809
- borderBottomWidth: ["borderBottomWidth_var", {
23810
- "--borderBottomWidth": maybeCssVar53(`${borderBottomWidthPx}px`)
23811
- }],
23812
- paddingBottom: ["pb_var", {
23813
- "--paddingBottom": `${verticalPaddingPx - borderBottomWidthPx}px`
23814
- }]
23815
- };
23816
- return {
23817
- baseStyles: {
23818
- display: "df",
23819
- alignItems: "aic",
23820
- height: "h_32px",
23821
- paddingTop: ["py_var", {
23822
- "--paddingTop": `${verticalPaddingPx}px`
23823
- }],
23824
- paddingBottom: ["py_var", {
23825
- "--paddingBottom": `${verticalPaddingPx}px`
23826
- }],
23827
- paddingLeft: "pl1",
23828
- paddingRight: "pr1",
23829
- outline: "outline0",
23830
- color: "gray700",
23831
- width: "width_fit_content",
23832
- cursor: "cursorPointer",
23833
- fontWeight: "fw4",
23834
- fontSize: "fz_14px",
23835
- lineHeight: "lh_20px"
23836
- },
23837
- activeStyles: {
23838
- ...{
23839
- borderColor: "bcBlue700",
23840
- fontWeight: "fw6",
23841
- fontSize: "fz_14px",
23842
- lineHeight: "lh_20px",
23843
- color: "gray900"
23844
- },
23845
- ...borderBottomStyles
23846
- },
23847
- disabledStyles: {
23848
- color: "gray400",
23849
- cursor: "cursorNotAllowed"
23850
- },
23851
- focusRingStyles: {
23852
- backgroundColor: "bgBlue50",
23853
- boxShadow: "bshFocus"
23854
- },
23855
- hoverStyles: {
23856
- ...{
23857
- borderColor: "bcGray400"
23858
- },
23859
- ...borderBottomStyles
23860
- },
23861
- activeHoverStyles: {
23862
- ...{
23863
- backgroundColor: "bgBlue50",
23864
- borderColor: "bcBlue700"
23865
- },
23866
- ...borderBottomStyles
23867
- }
23868
- };
23869
- }
23870
- function getNextTabValue(selected, key, tabs) {
23871
- const enabledTabs = tabs.filter((tab) => tab.disabled !== true);
23872
- const tabsToScan = key === "ArrowRight" ? enabledTabs : enabledTabs.reverse();
23873
- const currentIndex = tabsToScan.findIndex((tab) => uniqueTabValue(tab) === selected);
23874
- const nextIndex = currentIndex === tabsToScan.length - 1 ? 0 : currentIndex + 1;
23875
- return uniqueTabValue(tabsToScan[nextIndex]);
23876
- }
23877
- function isRouteTabs(props) {
23878
- const {
23879
- tabs
23880
- } = props;
23881
- return tabs.length > 0 && isRouteTab(tabs[0]);
23882
- }
23883
- function isRouteTab(tab) {
23884
- return "path" in tab;
23885
- }
23886
- function uniqueTabValue(tab) {
23887
- return isRouteTab(tab) ? camelCase7(tab.name) : tab.value;
23888
- }
23889
- function hideTabs(props) {
23890
- return props.alwaysShowAllTabs ? false : props.tabs.filter((t) => !t.disabled).length === 1;
23891
- }
23892
-
23893
- // src/components/PageHeader.tsx
23894
- import { trussProps as trussProps101 } from "@homebound/truss/runtime";
23895
- import { jsx as jsx191, jsxs as jsxs95 } from "react/jsx-runtime";
23896
- function PageHeader2(props) {
23897
- const {
23898
- title,
23899
- documentTitleSuffix,
23900
- rightSlot,
23901
- tabs,
23902
- breadcrumbs,
23903
- ...otherProps
23904
- } = props;
23905
- const tid = useTestIds(otherProps, "pageHeader");
23906
- useDocumentTitle(title, documentTitleSuffix);
23907
- return /* @__PURE__ */ jsxs95("header", { ...tid, ...trussProps101({
23908
- display: "df",
23909
- flexDirection: "fdc",
23910
- paddingTop: "pt3",
23911
- paddingLeft: "pl3",
23912
- paddingRight: "pr3",
23913
- borderBottomStyle: "bbs_solid",
23914
- borderBottomWidth: "bbw_1px",
23915
- gap: "gap2",
23916
- borderColor: ["bc_var", {
23917
- "--borderColor": "var(--b-surface-separator)"
23918
- }],
23919
- backgroundColor: ["bgColor_var", {
23920
- "--backgroundColor": "var(--b-surface)"
23921
- }]
23922
- }), children: [
23923
- /* @__PURE__ */ jsxs95("div", { ...trussProps101({
23924
- ...{
23925
- display: "df",
23926
- justifyContent: "jcsb",
23927
- width: "w100",
23928
- gap: "gap1"
23929
- },
23930
- ...{
23931
- ...!tabs ? {
23932
- marginBottom: "mb2"
23933
- } : {}
23934
- }
23935
- }), children: [
23936
- /* @__PURE__ */ jsxs95("div", { className: "mw0", children: [
23937
- breadcrumbs && /* @__PURE__ */ jsx191(Breadcrumbs, { ...breadcrumbs }),
23938
- /* @__PURE__ */ jsx191("h1", { ...tid.title, className: "fw6 fz_20px lh_28px", children: title })
23939
- ] }),
23940
- /* @__PURE__ */ jsx191("div", { className: "fs0", children: rightSlot })
23941
- ] }),
23942
- tabs && /* @__PURE__ */ jsx191(Tabs, { ...tabs })
23943
- ] });
23944
- }
23945
-
23946
23628
  // src/components/Pagination.tsx
23947
- import { jsx as jsx192, jsxs as jsxs96 } from "react/jsx-runtime";
23629
+ import { jsx as jsx190, jsxs as jsxs94 } from "react/jsx-runtime";
23948
23630
  var defaultPage = {
23949
23631
  offset: 0,
23950
23632
  limit: 100
@@ -23976,25 +23658,25 @@ function Pagination(props) {
23976
23658
  }
23977
23659
  }
23978
23660
  const tid = useTestIds(props, "pagination");
23979
- return /* @__PURE__ */ jsxs96("div", { className: "df bcGray200 bts_solid btw_1px fw4 fz_12px lh_16px gray500 pl2 pr2 pt2", ...tid, children: [
23980
- /* @__PURE__ */ jsx192("div", { className: "df mta mba mr2", ...tid.pageSizeLabel, children: "Page size:" }),
23981
- /* @__PURE__ */ jsx192("div", { className: "w_78px", children: /* @__PURE__ */ jsx192(SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: pageOptions, value: pageSize, onSelect: (val) => set({
23661
+ return /* @__PURE__ */ jsxs94("div", { className: "df bcGray200 bts_solid btw_1px fw4 fz_12px lh_16px gray500 pl2 pr2 pt2", ...tid, children: [
23662
+ /* @__PURE__ */ jsx190("div", { className: "df mta mba mr2", ...tid.pageSizeLabel, children: "Page size:" }),
23663
+ /* @__PURE__ */ jsx190("div", { className: "w_78px", children: /* @__PURE__ */ jsx190(SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: pageOptions, value: pageSize, onSelect: (val) => set({
23982
23664
  pageNumber: 1,
23983
23665
  pageSize: val
23984
23666
  }), autoSort: false, ...tid.pageSize }) }),
23985
- /* @__PURE__ */ jsxs96("div", { className: "mla mta mba df", children: [
23986
- /* @__PURE__ */ jsxs96("div", { className: "df mta mba mr2", ...tid.pageInfoLabel, children: [
23667
+ /* @__PURE__ */ jsxs94("div", { className: "mla mta mba df", children: [
23668
+ /* @__PURE__ */ jsxs94("div", { className: "df mta mba mr2", ...tid.pageInfoLabel, children: [
23987
23669
  first,
23988
23670
  " ",
23989
23671
  showLast ? `- ${last}` : "",
23990
23672
  " of ",
23991
23673
  totalCount
23992
23674
  ] }),
23993
- /* @__PURE__ */ jsx192(IconButton, { icon: "chevronLeft", color: hasPrevPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
23675
+ /* @__PURE__ */ jsx190(IconButton, { icon: "chevronLeft", color: hasPrevPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
23994
23676
  pageNumber: pageNumber - 1,
23995
23677
  pageSize
23996
23678
  }), disabled: !hasPrevPage, ...tid.previousIcon }),
23997
- /* @__PURE__ */ jsx192(IconButton, { icon: "chevronRight", color: hasNextPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
23679
+ /* @__PURE__ */ jsx190(IconButton, { icon: "chevronRight", color: hasNextPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
23998
23680
  pageNumber: pageNumber + 1,
23999
23681
  pageSize
24000
23682
  }), disabled: !hasNextPage, ...tid.nextIcon })
@@ -24017,9 +23699,9 @@ function toPageNumberSize(page) {
24017
23699
 
24018
23700
  // src/components/ScrollShadows.tsx
24019
23701
  import { useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
24020
- import { useCallback as useCallback34, useMemo as useMemo53, useRef as useRef60, useState as useState55 } from "react";
24021
- import { trussProps as trussProps102, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
24022
- import { jsx as jsx193, jsxs as jsxs97 } from "react/jsx-runtime";
23702
+ import { useCallback as useCallback34, useMemo as useMemo52, useRef as useRef59, useState as useState54 } from "react";
23703
+ import { trussProps as trussProps100, maybeCssVar as maybeCssVar53 } from "@homebound/truss/runtime";
23704
+ import { jsx as jsx191, jsxs as jsxs95 } from "react/jsx-runtime";
24023
23705
  function ScrollShadows(props) {
24024
23706
  const {
24025
23707
  children,
@@ -24035,15 +23717,15 @@ function ScrollShadows(props) {
24035
23717
  if (!bgColor.includes("rgba")) {
24036
23718
  throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
24037
23719
  }
24038
- const [showStartShadow, setShowStartShadow] = useState55(false);
24039
- const [showEndShadow, setShowEndShadow] = useState55(false);
24040
- const scrollRef = useRef60(null);
24041
- const [startShadowStyles, endShadowStyles] = useMemo53(() => {
23720
+ const [showStartShadow, setShowStartShadow] = useState54(false);
23721
+ const [showEndShadow, setShowEndShadow] = useState54(false);
23722
+ const scrollRef = useRef59(null);
23723
+ const [startShadowStyles, endShadowStyles] = useMemo52(() => {
24042
23724
  const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
24043
23725
  const commonStyles = {
24044
23726
  position: "absolute",
24045
23727
  zIndex: ["z_var", {
24046
- "--zIndex": maybeCssVar54(zIndices.scrollShadow)
23728
+ "--zIndex": maybeCssVar53(zIndices.scrollShadow)
24047
23729
  }],
24048
23730
  pointerEvents: "pointerEvents_none"
24049
23731
  };
@@ -24076,7 +23758,7 @@ function ScrollShadows(props) {
24076
23758
  ...startShadowStyles2,
24077
23759
  ...{
24078
23760
  background: ["background_var", {
24079
- "--background": maybeCssVar54(startGradient)
23761
+ "--background": maybeCssVar53(startGradient)
24080
23762
  }]
24081
23763
  }
24082
23764
  }, {
@@ -24084,7 +23766,7 @@ function ScrollShadows(props) {
24084
23766
  ...endShadowStyles2,
24085
23767
  ...{
24086
23768
  background: ["background_var", {
24087
- "--background": maybeCssVar54(endGradient)
23769
+ "--background": maybeCssVar53(endGradient)
24088
23770
  }]
24089
23771
  }
24090
23772
  }];
@@ -24109,10 +23791,10 @@ function ScrollShadows(props) {
24109
23791
  ref: scrollRef,
24110
23792
  onResize
24111
23793
  });
24112
- return /* @__PURE__ */ jsxs97("div", { ...trussProps102({
23794
+ return /* @__PURE__ */ jsxs95("div", { ...trussProps100({
24113
23795
  display: "df",
24114
23796
  flexDirection: ["fd_var", {
24115
- "--flexDirection": maybeCssVar54(!horizontal ? "column" : "row")
23797
+ "--flexDirection": maybeCssVar53(!horizontal ? "column" : "row")
24116
23798
  }],
24117
23799
  position: "relative",
24118
23800
  overflow: "oh",
@@ -24125,23 +23807,23 @@ function ScrollShadows(props) {
24125
23807
  width: width2
24126
23808
  }
24127
23809
  }), ...tid, children: [
24128
- /* @__PURE__ */ jsx193("div", { ...trussProps102({
23810
+ /* @__PURE__ */ jsx191("div", { ...trussProps100({
24129
23811
  ...startShadowStyles,
24130
23812
  ...{
24131
23813
  opacity: ["o_var", {
24132
- "--opacity": maybeCssVar54(showStartShadow ? 1 : 0)
23814
+ "--opacity": maybeCssVar53(showStartShadow ? 1 : 0)
24133
23815
  }]
24134
23816
  }
24135
23817
  }), "data-chromatic": "ignore" }),
24136
- /* @__PURE__ */ jsx193("div", { ...trussProps102({
23818
+ /* @__PURE__ */ jsx191("div", { ...trussProps100({
24137
23819
  ...endShadowStyles,
24138
23820
  ...{
24139
23821
  opacity: ["o_var", {
24140
- "--opacity": maybeCssVar54(showEndShadow ? 1 : 0)
23822
+ "--opacity": maybeCssVar53(showEndShadow ? 1 : 0)
24141
23823
  }]
24142
23824
  }
24143
23825
  }), "data-chromatic": "ignore" }),
24144
- /* @__PURE__ */ jsx193("div", { ...trussProps102({
23826
+ /* @__PURE__ */ jsx191("div", { ...trussProps100({
24145
23827
  ...xss,
24146
23828
  ...{
24147
23829
  overflow: "oa",
@@ -24157,12 +23839,12 @@ import {
24157
23839
  createContext as createContext14,
24158
23840
  useCallback as useCallback35,
24159
23841
  useContext as useContext26,
24160
- useEffect as useEffect36,
24161
- useMemo as useMemo54,
24162
- useRef as useRef61,
24163
- useState as useState56
23842
+ useEffect as useEffect35,
23843
+ useMemo as useMemo53,
23844
+ useRef as useRef60,
23845
+ useState as useState55
24164
23846
  } from "react";
24165
- import { jsx as jsx194 } from "react/jsx-runtime";
23847
+ import { jsx as jsx192 } from "react/jsx-runtime";
24166
23848
  var SIDE_NAV_LAYOUT_STATE_STORAGE_KEY = "beam.sideNavLayout.navState";
24167
23849
  function loadStoredNavState() {
24168
23850
  try {
@@ -24186,12 +23868,12 @@ function resolveInitialNavState(defaultNavState) {
24186
23868
  }
24187
23869
  var SideNavLayoutContext = createContext14(void 0);
24188
23870
  function SideNavLayoutProvider(props) {
24189
- const [navState, setNavStateInternal] = useState56(
23871
+ const [navState, setNavStateInternal] = useState55(
24190
23872
  () => resolveInitialNavState(props.defaultNavState)
24191
23873
  );
24192
23874
  const bp = useBreakpoint();
24193
- const prevMdAndUp = useRef61(bp.mdAndUp);
24194
- useEffect36(() => {
23875
+ const prevMdAndUp = useRef60(bp.mdAndUp);
23876
+ useEffect35(() => {
24195
23877
  if (prevMdAndUp.current && !bp.mdAndUp) {
24196
23878
  setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
24197
23879
  }
@@ -24209,8 +23891,8 @@ function SideNavLayoutProvider(props) {
24209
23891
  return next;
24210
23892
  });
24211
23893
  }, []);
24212
- const value = useMemo54(() => ({ navState, setNavState }), [navState, setNavState]);
24213
- return /* @__PURE__ */ jsx194(SideNavLayoutContext.Provider, { value, children: props.children });
23894
+ const value = useMemo53(() => ({ navState, setNavState }), [navState, setNavState]);
23895
+ return /* @__PURE__ */ jsx192(SideNavLayoutContext.Provider, { value, children: props.children });
24214
23896
  }
24215
23897
  function useSideNavLayoutContext() {
24216
23898
  return useContext26(SideNavLayoutContext) ?? { navState: "expanded", setNavState: () => {
@@ -24221,8 +23903,8 @@ function useHasSideNavLayoutProvider() {
24221
23903
  }
24222
23904
 
24223
23905
  // src/components/SideNav/SideNav.tsx
24224
- import { trussProps as trussProps103 } from "@homebound/truss/runtime";
24225
- import { jsx as jsx195, jsxs as jsxs98 } from "react/jsx-runtime";
23906
+ import { trussProps as trussProps101 } from "@homebound/truss/runtime";
23907
+ import { jsx as jsx193, jsxs as jsxs96 } from "react/jsx-runtime";
24226
23908
  function SideNav(props) {
24227
23909
  const {
24228
23910
  top,
@@ -24235,8 +23917,8 @@ function SideNav(props) {
24235
23917
  const tid = useTestIds(props, "sideNav");
24236
23918
  const panelCollapsed = navState === "collapse";
24237
23919
  const hideOnCollapse = panelCollapsed && !allItemsHaveIcons(items);
24238
- return /* @__PURE__ */ jsxs98("nav", { className: "df fdc h100 fs0", ...tid, children: [
24239
- top !== void 0 && /* @__PURE__ */ jsx195("div", { ...trussProps103({
23920
+ return /* @__PURE__ */ jsxs96("nav", { className: "df fdc h100 fs0", ...tid, children: [
23921
+ top !== void 0 && /* @__PURE__ */ jsx193("div", { ...trussProps101({
24240
23922
  flexShrink: "fs0",
24241
23923
  paddingLeft: "pl2",
24242
23924
  paddingRight: "pr2",
@@ -24247,7 +23929,7 @@ function SideNav(props) {
24247
23929
  paddingBottom: "pb4"
24248
23930
  } : {}
24249
23931
  }), ...tid.top, children: top }),
24250
- /* @__PURE__ */ jsx195("div", { ...trussProps103({
23932
+ /* @__PURE__ */ jsx193("div", { ...trussProps101({
24251
23933
  flexGrow: "fg1",
24252
23934
  overflowY: "oya",
24253
23935
  display: "df",
@@ -24259,8 +23941,8 @@ function SideNav(props) {
24259
23941
  ...top === void 0 ? {
24260
23942
  paddingTop: "pt5"
24261
23943
  } : {}
24262
- }), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ jsx195(AppNavItems, { items, panelCollapsed }) }),
24263
- footer !== void 0 && /* @__PURE__ */ jsx195("div", { ...trussProps103({
23944
+ }), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ jsx193(AppNavItems, { items, panelCollapsed }) }),
23945
+ footer !== void 0 && /* @__PURE__ */ jsx193("div", { ...trussProps101({
24264
23946
  flexShrink: "fs0",
24265
23947
  paddingLeft: "pl2",
24266
23948
  paddingRight: "pr2",
@@ -24276,7 +23958,7 @@ function SideNav(props) {
24276
23958
  }
24277
23959
 
24278
23960
  // src/components/Snackbar/useSnackbar.tsx
24279
- import { useCallback as useCallback36, useEffect as useEffect37 } from "react";
23961
+ import { useCallback as useCallback36, useEffect as useEffect36 } from "react";
24280
23962
  function useSnackbar() {
24281
23963
  const { setNotices, setOffset } = useSnackbarContext();
24282
23964
  const onClose = useCallback36(
@@ -24326,7 +24008,7 @@ function useSnackbar() {
24326
24008
  [onClose, setNotices]
24327
24009
  );
24328
24010
  const closeNotice = useCallback36((id) => onClose(id), [onClose]);
24329
- const useSnackbarOffset = ({ bottom }) => useEffect37(() => {
24011
+ const useSnackbarOffset = ({ bottom }) => useEffect36(() => {
24330
24012
  setOffset({ bottom });
24331
24013
  return () => setOffset({});
24332
24014
  }, [bottom]);
@@ -24335,10 +24017,10 @@ function useSnackbar() {
24335
24017
  var snackbarId = 1;
24336
24018
 
24337
24019
  // src/components/Stepper.tsx
24338
- import { useRef as useRef62 } from "react";
24339
- import { useButton as useButton12, useFocusRing as useFocusRing18, useHover as useHover22 } from "react-aria";
24340
- import { trussProps as trussProps104, maybeCssVar as maybeCssVar55 } from "@homebound/truss/runtime";
24341
- import { jsx as jsx196, jsxs as jsxs99 } from "react/jsx-runtime";
24020
+ import { useRef as useRef61 } from "react";
24021
+ import { useButton as useButton12, useFocusRing as useFocusRing17, useHover as useHover21 } from "react-aria";
24022
+ import { trussProps as trussProps102, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
24023
+ import { jsx as jsx194, jsxs as jsxs97 } from "react/jsx-runtime";
24342
24024
  import { createElement as createElement5 } from "react";
24343
24025
  var __maybeInc20 = (inc) => {
24344
24026
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
@@ -24357,8 +24039,8 @@ function Stepper(props) {
24357
24039
  const maxStepWidth = 200;
24358
24040
  const minStepWidth = 100;
24359
24041
  const gap = 8;
24360
- return /* @__PURE__ */ jsxs99("nav", { "aria-label": "steps", className: "df fdc w100", ...tid, children: [
24361
- /* @__PURE__ */ jsx196("ol", { ...trussProps104({
24042
+ return /* @__PURE__ */ jsxs97("nav", { "aria-label": "steps", className: "df fdc w100", ...tid, children: [
24043
+ /* @__PURE__ */ jsx194("ol", { ...trussProps102({
24362
24044
  padding: "p_0",
24363
24045
  margin: "m_0",
24364
24046
  listStyle: "lis_none",
@@ -24368,7 +24050,7 @@ function Stepper(props) {
24368
24050
  }]
24369
24051
  }), children: steps.map((step) => {
24370
24052
  const isCurrent = currentStep === step.value;
24371
- return /* @__PURE__ */ createElement5("li", { ...trussProps104({
24053
+ return /* @__PURE__ */ createElement5("li", { ...trussProps102({
24372
24054
  display: "df",
24373
24055
  flexGrow: "fg1",
24374
24056
  flexDirection: "fdc",
@@ -24378,9 +24060,9 @@ function Stepper(props) {
24378
24060
  minWidth: ["mw_var", {
24379
24061
  "--minWidth": `${minStepWidth}px`
24380
24062
  }]
24381
- }), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx196(StepButton, { ...step, onClick: () => onChange(step.value), isCurrent, ...tid.stepButton }));
24063
+ }), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx194(StepButton, { ...step, onClick: () => onChange(step.value), isCurrent, ...tid.stepButton }));
24382
24064
  }) }),
24383
- /* @__PURE__ */ jsx196("div", { ...trussProps104({
24065
+ /* @__PURE__ */ jsx194("div", { ...trussProps102({
24384
24066
  marginTop: "mt1",
24385
24067
  backgroundColor: "bgGray300",
24386
24068
  height: "h_4px",
@@ -24391,12 +24073,12 @@ function Stepper(props) {
24391
24073
  "--minWidth": `${steps.length * minStepWidth + (steps.length - 1) * gap}px`
24392
24074
  }],
24393
24075
  width: "w100"
24394
- }), children: /* @__PURE__ */ jsx196("div", { ...trussProps104({
24076
+ }), children: /* @__PURE__ */ jsx194("div", { ...trussProps102({
24395
24077
  backgroundColor: "bgBlue600",
24396
24078
  transition: "transition_width_200ms",
24397
24079
  height: "h100",
24398
24080
  width: ["w_var", {
24399
- "--width": maybeCssVar55(__maybeInc20(`${(lastCompletedStep + 1) / steps.length * 100}%`))
24081
+ "--width": maybeCssVar54(__maybeInc20(`${(lastCompletedStep + 1) / steps.length * 100}%`))
24400
24082
  }]
24401
24083
  }) }) })
24402
24084
  ] });
@@ -24413,7 +24095,7 @@ function StepButton(props) {
24413
24095
  onPress: onClick,
24414
24096
  isDisabled: disabled
24415
24097
  };
24416
- const ref = useRef62(null);
24098
+ const ref = useRef61(null);
24417
24099
  const {
24418
24100
  buttonProps,
24419
24101
  isPressed
@@ -24421,18 +24103,18 @@ function StepButton(props) {
24421
24103
  const {
24422
24104
  isFocusVisible,
24423
24105
  focusProps
24424
- } = useFocusRing18();
24106
+ } = useFocusRing17();
24425
24107
  const {
24426
24108
  hoverProps,
24427
24109
  isHovered
24428
- } = useHover22(ariaProps);
24110
+ } = useHover21(ariaProps);
24429
24111
  const focusRingStyles2 = state === "error" ? {
24430
24112
  boxShadow: "bshDanger"
24431
24113
  } : {
24432
24114
  boxShadow: "bshFocus"
24433
24115
  };
24434
24116
  const tid = useTestIds(props, "stepButton");
24435
- return /* @__PURE__ */ jsxs99("button", { ref, ...buttonProps, ...focusProps, ...hoverProps, ...trussProps104({
24117
+ return /* @__PURE__ */ jsxs97("button", { ref, ...buttonProps, ...focusProps, ...hoverProps, ...trussProps102({
24436
24118
  ...{
24437
24119
  fontWeight: "fw6",
24438
24120
  fontSize: "fz_14px",
@@ -24484,7 +24166,7 @@ function StepButton(props) {
24484
24166
  } : {},
24485
24167
  ...isFocusVisible ? focusRingStyles2 : {}
24486
24168
  }), ...tid[defaultTestId(label)], children: [
24487
- /* @__PURE__ */ jsx196("span", { className: "fs0 mr_4px", children: /* @__PURE__ */ jsx196(StepIcon, { state, isHovered, isPressed, isCurrent }) }),
24169
+ /* @__PURE__ */ jsx194("span", { className: "fs0 mr_4px", children: /* @__PURE__ */ jsx194(StepIcon, { state, isHovered, isPressed, isCurrent }) }),
24488
24170
  label
24489
24171
  ] });
24490
24172
  }
@@ -24495,12 +24177,12 @@ function StepIcon({
24495
24177
  isCurrent = false
24496
24178
  }) {
24497
24179
  if (state === "error") {
24498
- return /* @__PURE__ */ jsx196(Icon, { icon: "errorCircle" });
24180
+ return /* @__PURE__ */ jsx194(Icon, { icon: "errorCircle" });
24499
24181
  }
24500
24182
  if (state === "complete") {
24501
- return /* @__PURE__ */ jsx196(Icon, { icon: "check" });
24183
+ return /* @__PURE__ */ jsx194(Icon, { icon: "check" });
24502
24184
  }
24503
- return /* @__PURE__ */ jsx196("div", { className: "w_24px h_24px df aic jcc", children: /* @__PURE__ */ jsx196("div", { ...trussProps104({
24185
+ return /* @__PURE__ */ jsx194("div", { className: "w_24px h_24px df aic jcc", children: /* @__PURE__ */ jsx194("div", { ...trussProps102({
24504
24186
  width: "w_10px",
24505
24187
  height: "h_10px",
24506
24188
  borderStyle: "bss",
@@ -24514,10 +24196,10 @@ function StepIcon({
24514
24196
  }
24515
24197
 
24516
24198
  // src/components/StepperTabs/StepperTab.tsx
24517
- import { useRef as useRef63 } from "react";
24518
- import { mergeProps as mergeProps31, useButton as useButton13, useFocusRing as useFocusRing19, useHover as useHover23, VisuallyHidden as VisuallyHidden10 } from "react-aria";
24519
- import { trussProps as trussProps105, maybeCssVar as maybeCssVar56 } from "@homebound/truss/runtime";
24520
- import { jsx as jsx197, jsxs as jsxs100 } from "react/jsx-runtime";
24199
+ import { useRef as useRef62 } from "react";
24200
+ import { mergeProps as mergeProps30, useButton as useButton13, useFocusRing as useFocusRing18, useHover as useHover22, VisuallyHidden as VisuallyHidden10 } from "react-aria";
24201
+ import { trussProps as trussProps103, maybeCssVar as maybeCssVar55 } from "@homebound/truss/runtime";
24202
+ import { jsx as jsx195, jsxs as jsxs98 } from "react/jsx-runtime";
24521
24203
  function StepperTab(props) {
24522
24204
  const {
24523
24205
  label,
@@ -24532,20 +24214,20 @@ function StepperTab(props) {
24532
24214
  onPress: () => onClick(value),
24533
24215
  isDisabled: disabled || collapsed
24534
24216
  };
24535
- const ref = useRef63(null);
24217
+ const ref = useRef62(null);
24536
24218
  const {
24537
24219
  buttonProps
24538
24220
  } = useButton13(ariaProps, ref);
24539
24221
  const {
24540
24222
  isFocusVisible,
24541
24223
  focusProps
24542
- } = useFocusRing19();
24224
+ } = useFocusRing18();
24543
24225
  const {
24544
24226
  hoverProps,
24545
24227
  isHovered
24546
- } = useHover23(ariaProps);
24228
+ } = useHover22(ariaProps);
24547
24229
  const tid = useTestIds(props, "stepperTab");
24548
- return /* @__PURE__ */ jsxs100("button", { ref, ...mergeProps31(buttonProps, focusProps, hoverProps), "aria-label": label, ...trussProps105({
24230
+ return /* @__PURE__ */ jsxs98("button", { ref, ...mergeProps30(buttonProps, focusProps, hoverProps), "aria-label": label, ...trussProps103({
24549
24231
  ...stepperTabStyles.baseStyles,
24550
24232
  ...getStateStyles(active, completed),
24551
24233
  ...isHovered && !disabled ? stepperTabStyles.hoverStyles : {},
@@ -24553,9 +24235,9 @@ function StepperTab(props) {
24553
24235
  ...disabled ? stepperTabStyles.disabledStyles : {},
24554
24236
  ...isFocusVisible ? stepperTabStyles.focusRingStyles : {}
24555
24237
  }), ...tid[defaultTestId(value)], children: [
24556
- /* @__PURE__ */ jsx197("span", { className: "oh d_negwebkit_box wbo_vertical to_ellipsis wlc_1", children: label }),
24557
- completed && /* @__PURE__ */ jsx197("span", { className: "fs0 ml1", children: /* @__PURE__ */ jsx197(Icon, { icon: "check", inc: 2.5, ...tid.check }) }),
24558
- /* @__PURE__ */ jsx197(VisuallyHidden10, { children: completed ? "Complete" : "Not Complete" })
24238
+ /* @__PURE__ */ jsx195("span", { className: "oh d_negwebkit_box wbo_vertical to_ellipsis wlc_1", children: label }),
24239
+ completed && /* @__PURE__ */ jsx195("span", { className: "fs0 ml1", children: /* @__PURE__ */ jsx195(Icon, { icon: "check", inc: 2.5, ...tid.check }) }),
24240
+ /* @__PURE__ */ jsx195(VisuallyHidden10, { children: completed ? "Complete" : "Not Complete" })
24559
24241
  ] });
24560
24242
  }
24561
24243
  function withBorderBottom(color) {
@@ -24563,7 +24245,7 @@ function withBorderBottom(color) {
24563
24245
  ...{
24564
24246
  borderBottomStyle: "bbs_solid",
24565
24247
  borderBottomWidth: ["borderBottomWidth_var", {
24566
- "--borderBottomWidth": maybeCssVar56(`3px`)
24248
+ "--borderBottomWidth": maybeCssVar55(`3px`)
24567
24249
  }]
24568
24250
  },
24569
24251
  ...color
@@ -24635,8 +24317,8 @@ var stepperTabStyles = {
24635
24317
  };
24636
24318
 
24637
24319
  // src/components/StepperTabs/StepperTabs.tsx
24638
- import { trussProps as trussProps106 } from "@homebound/truss/runtime";
24639
- import { jsx as jsx198 } from "react/jsx-runtime";
24320
+ import { trussProps as trussProps104 } from "@homebound/truss/runtime";
24321
+ import { jsx as jsx196 } from "react/jsx-runtime";
24640
24322
  import { createElement as createElement6 } from "react";
24641
24323
  function StepperTabs(props) {
24642
24324
  const {
@@ -24649,7 +24331,7 @@ function StepperTabs(props) {
24649
24331
  sm: collapsed
24650
24332
  } = useBreakpoint();
24651
24333
  const capWidth = steps.length <= 3;
24652
- return /* @__PURE__ */ jsx198("nav", { "aria-label": "steps", className: "w100", ...tid, children: /* @__PURE__ */ jsx198("ol", { ...trussProps106({
24334
+ return /* @__PURE__ */ jsx196("nav", { "aria-label": "steps", className: "w100", ...tid, children: /* @__PURE__ */ jsx196("ol", { ...trussProps104({
24653
24335
  padding: "p_0",
24654
24336
  margin: "m_0",
24655
24337
  listStyle: "lis_none",
@@ -24663,7 +24345,7 @@ function StepperTabs(props) {
24663
24345
  borderColor: "bcGray400"
24664
24346
  }), children: steps.map((step) => {
24665
24347
  const isCurrent = step.value === currentStep;
24666
- return /* @__PURE__ */ createElement6("li", { ...trussProps106({
24348
+ return /* @__PURE__ */ createElement6("li", { ...trussProps104({
24667
24349
  display: "df",
24668
24350
  flexGrow: "fg1",
24669
24351
  flexBasis: "fb_0",
@@ -24675,7 +24357,7 @@ function StepperTabs(props) {
24675
24357
  "--maxWidth": `${maxStepWidthPx}px`
24676
24358
  }]
24677
24359
  } : {}
24678
- }), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx198(StepperTab, { label: step.label, value: step.value, active: isCurrent, completed: step.completed, disabled: step.disabled, collapsed, onClick: onChange, ...tid.tab }));
24360
+ }), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx196(StepperTab, { label: step.label, value: step.value, active: isCurrent, completed: step.completed, disabled: step.disabled, collapsed, onClick: onChange, ...tid.tab }));
24679
24361
  }) }) });
24680
24362
  }
24681
24363
  var maxStepWidthPx = 280;
@@ -24683,8 +24365,8 @@ var gapPx = 6;
24683
24365
 
24684
24366
  // src/components/SuperDrawer/components/SuperDrawerHeader.tsx
24685
24367
  import { createPortal as createPortal7 } from "react-dom";
24686
- import { trussProps as trussProps107 } from "@homebound/truss/runtime";
24687
- import { jsx as jsx199, jsxs as jsxs101 } from "react/jsx-runtime";
24368
+ import { trussProps as trussProps105 } from "@homebound/truss/runtime";
24369
+ import { jsx as jsx197, jsxs as jsxs99 } from "react/jsx-runtime";
24688
24370
  function SuperDrawerHeader(props) {
24689
24371
  const {
24690
24372
  hideControls
@@ -24701,20 +24383,20 @@ function SuperDrawerHeader(props) {
24701
24383
  const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
24702
24384
  const isDetail = currentContent !== firstContent;
24703
24385
  const tid = useTestIds({}, "superDrawerHeader");
24704
- return createPortal7(/* @__PURE__ */ jsxs101("div", { className: "df aic jcsb gap3", ...tid, children: [
24705
- isStructuredProps(props) ? /* @__PURE__ */ jsxs101("div", { className: "df jcsb aic gap2 fg1", children: [
24706
- /* @__PURE__ */ jsxs101("div", { className: "fg1 df aic gap2", children: [
24707
- /* @__PURE__ */ jsx199("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
24386
+ return createPortal7(/* @__PURE__ */ jsxs99("div", { className: "df aic jcsb gap3", ...tid, children: [
24387
+ isStructuredProps(props) ? /* @__PURE__ */ jsxs99("div", { className: "df jcsb aic gap2 fg1", children: [
24388
+ /* @__PURE__ */ jsxs99("div", { className: "fg1 df aic gap2", children: [
24389
+ /* @__PURE__ */ jsx197("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
24708
24390
  props.left
24709
24391
  ] }),
24710
- props.right && /* @__PURE__ */ jsx199("div", { className: "fs0", children: props.right })
24711
- ] }) : /* @__PURE__ */ jsx199("div", { className: "fg1", children: props.children }),
24712
- !hideControls && /* @__PURE__ */ jsx199("div", { ...trussProps107({
24392
+ props.right && /* @__PURE__ */ jsx197("div", { className: "fs0", children: props.right })
24393
+ ] }) : /* @__PURE__ */ jsx197("div", { className: "fg1", children: props.children }),
24394
+ !hideControls && /* @__PURE__ */ jsx197("div", { ...trussProps105({
24713
24395
  flexShrink: "fs0",
24714
24396
  ...isDetail ? {
24715
24397
  visibility: "vh"
24716
24398
  } : {}
24717
- }), children: /* @__PURE__ */ jsx199(ButtonGroup, { buttons: [{
24399
+ }), children: /* @__PURE__ */ jsx197(ButtonGroup, { buttons: [{
24718
24400
  icon: "chevronLeft",
24719
24401
  onClick: () => onPrevClick && onPrevClick(),
24720
24402
  disabled: !onPrevClick
@@ -24730,18 +24412,18 @@ function isStructuredProps(props) {
24730
24412
  }
24731
24413
 
24732
24414
  // src/components/SuperDrawer/ConfirmCloseModal.tsx
24733
- import { Fragment as Fragment45, jsx as jsx200, jsxs as jsxs102 } from "react/jsx-runtime";
24415
+ import { Fragment as Fragment44, jsx as jsx198, jsxs as jsxs100 } from "react/jsx-runtime";
24734
24416
  function ConfirmCloseModal(props) {
24735
24417
  const { onClose, discardText = "Discard Changes", continueText = "Continue Editing" } = props;
24736
24418
  const { modalState } = useBeamContext();
24737
24419
  function closeModal() {
24738
24420
  modalState.current = void 0;
24739
24421
  }
24740
- return /* @__PURE__ */ jsxs102(Fragment45, { children: [
24741
- /* @__PURE__ */ jsx200(ModalHeader, { children: "Are you sure you want to cancel?" }),
24742
- /* @__PURE__ */ jsx200(ModalBody, { children: /* @__PURE__ */ jsx200("p", { children: "Any changes you've made so far will be lost." }) }),
24743
- /* @__PURE__ */ jsxs102(ModalFooter, { children: [
24744
- /* @__PURE__ */ jsx200(
24422
+ return /* @__PURE__ */ jsxs100(Fragment44, { children: [
24423
+ /* @__PURE__ */ jsx198(ModalHeader, { children: "Are you sure you want to cancel?" }),
24424
+ /* @__PURE__ */ jsx198(ModalBody, { children: /* @__PURE__ */ jsx198("p", { children: "Any changes you've made so far will be lost." }) }),
24425
+ /* @__PURE__ */ jsxs100(ModalFooter, { children: [
24426
+ /* @__PURE__ */ jsx198(
24745
24427
  Button,
24746
24428
  {
24747
24429
  variant: "quaternary",
@@ -24752,7 +24434,7 @@ function ConfirmCloseModal(props) {
24752
24434
  }
24753
24435
  }
24754
24436
  ),
24755
- /* @__PURE__ */ jsx200(Button, { label: continueText, onClick: closeModal })
24437
+ /* @__PURE__ */ jsx198(Button, { label: continueText, onClick: closeModal })
24756
24438
  ] })
24757
24439
  ] });
24758
24440
  }
@@ -24761,8 +24443,8 @@ function ConfirmCloseModal(props) {
24761
24443
  import { motion as motion6 } from "framer-motion";
24762
24444
 
24763
24445
  // src/components/SuperDrawer/useSuperDrawer.tsx
24764
- import { useMemo as useMemo55 } from "react";
24765
- import { jsx as jsx201 } from "react/jsx-runtime";
24446
+ import { useMemo as useMemo54 } from "react";
24447
+ import { jsx as jsx199 } from "react/jsx-runtime";
24766
24448
  function useSuperDrawer() {
24767
24449
  const {
24768
24450
  drawerContentStack: contentStack,
@@ -24774,7 +24456,7 @@ function useSuperDrawer() {
24774
24456
  function canCloseDrawerDetails(i, doChange) {
24775
24457
  for (const canCloseDrawerDetail of canCloseDetailsChecks.current[i] ?? []) {
24776
24458
  if (!canClose(canCloseDrawerDetail)) {
24777
- openModal({ content: /* @__PURE__ */ jsx201(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
24459
+ openModal({ content: /* @__PURE__ */ jsx199(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
24778
24460
  return false;
24779
24461
  }
24780
24462
  }
@@ -24794,14 +24476,14 @@ function useSuperDrawer() {
24794
24476
  for (const canCloseDrawer of canCloseChecks.current) {
24795
24477
  if (!canClose(canCloseDrawer)) {
24796
24478
  openModal({
24797
- content: /* @__PURE__ */ jsx201(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
24479
+ content: /* @__PURE__ */ jsx199(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
24798
24480
  });
24799
24481
  return;
24800
24482
  }
24801
24483
  }
24802
24484
  doChange();
24803
24485
  }
24804
- const closeActions = useMemo55(
24486
+ const closeActions = useMemo54(
24805
24487
  () => {
24806
24488
  return {
24807
24489
  /** Attempts to close the drawer. If any checks fail, a confirmation modal will appear */
@@ -24836,7 +24518,7 @@ function useSuperDrawer() {
24836
24518
  // eslint-disable-next-line react-hooks/exhaustive-deps
24837
24519
  [canCloseChecks, canCloseDetailsChecks, contentStack, modalState, openModal]
24838
24520
  );
24839
- const actions = useMemo55(
24521
+ const actions = useMemo54(
24840
24522
  () => {
24841
24523
  return {
24842
24524
  // TODO: Maybe we should rename to openDrawer as a breaking change (to match openDrawerDetail)
@@ -24889,8 +24571,8 @@ function canClose(canCloseCheck) {
24889
24571
  }
24890
24572
 
24891
24573
  // src/components/SuperDrawer/SuperDrawerContent.tsx
24892
- import { mergeProps as mergeProps32 } from "@homebound/truss/runtime";
24893
- import { Fragment as Fragment46, jsx as jsx202, jsxs as jsxs103 } from "react/jsx-runtime";
24574
+ import { mergeProps as mergeProps31 } from "@homebound/truss/runtime";
24575
+ import { Fragment as Fragment45, jsx as jsx200, jsxs as jsxs101 } from "react/jsx-runtime";
24894
24576
  var SuperDrawerContent = ({
24895
24577
  children,
24896
24578
  actions
@@ -24899,102 +24581,367 @@ var SuperDrawerContent = ({
24899
24581
  closeDrawerDetail
24900
24582
  } = useSuperDrawer();
24901
24583
  const {
24902
- drawerContentStack: contentStack
24903
- } = useBeamContext();
24584
+ drawerContentStack: contentStack
24585
+ } = useBeamContext();
24586
+ const {
24587
+ kind
24588
+ } = contentStack.current[contentStack.current.length - 1] ?? {};
24589
+ const firstContent = contentStack.current[0]?.opts;
24590
+ const {
24591
+ width: width2 = 1040 /* Normal */
24592
+ } = firstContent ?? {};
24593
+ function wrapWithMotionAndMaybeBack(children2) {
24594
+ if (kind === "open") {
24595
+ return /* @__PURE__ */ jsx200(motion6.div, { className: "pt3 pb3 pr3 pl3 fg1 oa", children: children2 }, "content");
24596
+ } else if (kind === "detail") {
24597
+ return /* @__PURE__ */ jsxs101(motion6.div, { className: "pl3 pr3 pt2 pb3 fg1", animate: {
24598
+ overflow: "auto"
24599
+ }, transition: {
24600
+ overflow: {
24601
+ delay: 0.3
24602
+ }
24603
+ }, children: [
24604
+ /* @__PURE__ */ jsx200(Button, { label: "Back", icon: "chevronLeft", variant: "tertiary", onClick: closeDrawerDetail }),
24605
+ /* @__PURE__ */ jsx200(motion6.div, { initial: {
24606
+ x: width2,
24607
+ opacity: 0
24608
+ }, animate: {
24609
+ x: 0,
24610
+ opacity: 1
24611
+ }, transition: {
24612
+ ease: "linear",
24613
+ duration: 0.3,
24614
+ opacity: {
24615
+ delay: 0.15
24616
+ }
24617
+ }, exit: {
24618
+ x: width2,
24619
+ opacity: 0
24620
+ }, className: "pt2", children: children2 })
24621
+ ] }, "content");
24622
+ } else {
24623
+ return /* @__PURE__ */ jsx200(motion6.div, { ...mergeProps31(void 0, {
24624
+ overflow: "auto"
24625
+ }, {
24626
+ paddingTop: "pt3",
24627
+ paddingBottom: "pb3",
24628
+ paddingRight: "pr3",
24629
+ paddingLeft: "pl3",
24630
+ flexGrow: "fg1"
24631
+ }) }, "content");
24632
+ }
24633
+ }
24634
+ return /* @__PURE__ */ jsxs101(Fragment45, { children: [
24635
+ wrapWithMotionAndMaybeBack(children),
24636
+ actions && /* @__PURE__ */ jsx200("footer", { className: "bts_solid btw_1px bcGray200 pt3 pb3 pr3 pl3 df aic jcfe", children: /* @__PURE__ */ jsx200("div", { className: "df gap1", children: actions.map((buttonProps, i) => /* @__PURE__ */ jsx200(Button, { ...buttonProps }, i)) }) })
24637
+ ] });
24638
+ };
24639
+
24640
+ // src/components/Table/cardSlots.ts
24641
+ function cardTitleSlot(text) {
24642
+ return { kind: "title", text };
24643
+ }
24644
+ function cardEyebrowSlot(text) {
24645
+ return { kind: "eyebrow", text };
24646
+ }
24647
+ function cardBadgeSlot(text, tags) {
24648
+ return { kind: "badge", text, tags };
24649
+ }
24650
+ function cardStatusSlot(tag) {
24651
+ return { kind: "status", tag };
24652
+ }
24653
+ function cardDataBlockSlot(props) {
24654
+ return { kind: "dataBlock", ...props };
24655
+ }
24656
+ function cardProgressSlot(value) {
24657
+ return { kind: "progress", value };
24658
+ }
24659
+
24660
+ // src/components/Table/utils/simpleHelpers.ts
24661
+ var simpleHeader = { kind: "header", id: "header", data: void 0 };
24662
+ function simpleDataRows(data = []) {
24663
+ return [simpleHeader, ...data.map((data2) => ({ kind: "data", data: data2, id: data2.id }))];
24664
+ }
24665
+
24666
+ // src/components/Table/utils/visitor.ts
24667
+ function visit(rows, fn) {
24668
+ const todo = [...rows];
24669
+ while (todo.length > 0) {
24670
+ const row = todo.pop();
24671
+ fn(row);
24672
+ if (row.children) {
24673
+ todo.push(...row.children);
24674
+ }
24675
+ }
24676
+ }
24677
+
24678
+ // src/components/Tabs.tsx
24679
+ import { camelCase as camelCase7 } from "change-case";
24680
+ import { useEffect as useEffect37, useMemo as useMemo55, useRef as useRef63, useState as useState56 } from "react";
24681
+ import { mergeProps as mergeProps32, useFocusRing as useFocusRing19, useHover as useHover23 } from "react-aria";
24682
+ import { matchPath } from "react-router";
24683
+ import { Link as Link7, useLocation as useLocation2 } from "react-router-dom";
24684
+ import { trussProps as trussProps106, maybeCssVar as maybeCssVar56 } from "@homebound/truss/runtime";
24685
+ import { Fragment as Fragment46, jsx as jsx201, jsxs as jsxs102 } from "react/jsx-runtime";
24686
+ function TabsWithContent(props) {
24687
+ const styles = hideTabs(props) ? {} : {
24688
+ paddingTop: "pt3"
24689
+ };
24690
+ return /* @__PURE__ */ jsxs102(Fragment46, { children: [
24691
+ /* @__PURE__ */ jsx201(Tabs, { ...props }),
24692
+ /* @__PURE__ */ jsx201(TabContent, { ...props, contentXss: {
24693
+ ...styles,
24694
+ ...props.contentXss
24695
+ } })
24696
+ ] });
24697
+ }
24698
+ function TabContent(props) {
24699
+ const tid = useTestIds(props, "tab");
24700
+ const {
24701
+ tabs,
24702
+ contentXss = {},
24703
+ omitFullBleedPadding = false
24704
+ } = props;
24705
+ const location = useLocation2();
24706
+ const selectedTab = isRouteTabs(props) ? props.tabs.find((t) => {
24707
+ const paths = Array.isArray(t.path) ? t.path : [t.path];
24708
+ return paths.some((p) => !!matchPath({
24709
+ path: p,
24710
+ end: true
24711
+ }, location.pathname));
24712
+ }) || tabs[0] : props.tabs.find((tab) => tab.value === props.selected) || tabs[0];
24713
+ const uniqueValue = uniqueTabValue(selectedTab);
24714
+ return (
24715
+ // Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
24716
+ // Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
24717
+ /* @__PURE__ */ jsx201(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ jsx201("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...trussProps106(contentXss), children: selectedTab.render() }) })
24718
+ );
24719
+ }
24720
+ function Tabs(props) {
24721
+ const {
24722
+ ariaLabel,
24723
+ tabs,
24724
+ includeBottomBorder,
24725
+ right,
24726
+ ...others
24727
+ } = props;
24728
+ const location = useLocation2();
24729
+ const selected = isRouteTabs(props) ? uniqueTabValue(props.tabs.find((t) => {
24730
+ const paths = Array.isArray(t.path) ? t.path : [t.path];
24731
+ return paths.some((p) => !!matchPath({
24732
+ path: p,
24733
+ end: true
24734
+ }, location.pathname));
24735
+ }) || props.tabs[0]) : props.selected;
24736
+ const {
24737
+ isFocusVisible,
24738
+ focusProps
24739
+ } = useFocusRing19();
24740
+ const tid = useTestIds(others, "tabs");
24741
+ const [active, setActive] = useState56(selected);
24742
+ const ref = useRef63(null);
24743
+ useEffect37(() => setActive(selected), [selected]);
24744
+ function onKeyUp(e) {
24745
+ if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
24746
+ const nextTabValue = getNextTabValue(active, e.key, tabs);
24747
+ setActive(nextTabValue);
24748
+ document.getElementById(`${nextTabValue}-tab`)?.focus();
24749
+ }
24750
+ }
24751
+ function onClick(value) {
24752
+ !isRouteTabs(props) && props.onChange(value);
24753
+ }
24754
+ function onBlur(e) {
24755
+ if (!(ref.current && ref.current.contains(e.relatedTarget))) {
24756
+ setActive(selected);
24757
+ }
24758
+ }
24759
+ return /* @__PURE__ */ jsxs102("div", { ...trussProps106({
24760
+ ...{
24761
+ display: "df",
24762
+ alignItems: "aic",
24763
+ overflow: "oa",
24764
+ whiteSpace: "wsnw",
24765
+ gap: "gap1"
24766
+ },
24767
+ ...includeBottomBorder ? {
24768
+ ...{
24769
+ borderBottomStyle: "bbs_solid",
24770
+ borderBottomWidth: "bbw_1px",
24771
+ borderColor: "bcGray200"
24772
+ }
24773
+ } : {}
24774
+ }), children: [
24775
+ !hideTabs(props) && /* @__PURE__ */ jsx201("div", { ref, className: "dif gap1 asfe", "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
24776
+ const uniqueValue = uniqueTabValue(tab);
24777
+ return /* @__PURE__ */ jsx201(TabImpl, { active: active === uniqueValue, focusProps, isFocusVisible, onClick, onKeyUp, onBlur, tab, ...tid[defaultTestId(uniqueValue)] }, uniqueValue);
24778
+ }) }),
24779
+ right && /* @__PURE__ */ jsx201("div", { className: "mla df aic gap1 pb1", children: right })
24780
+ ] });
24781
+ }
24782
+ function TabImpl(props) {
24783
+ const {
24784
+ tab,
24785
+ onClick,
24786
+ active,
24787
+ onKeyUp,
24788
+ onBlur,
24789
+ focusProps,
24790
+ isFocusVisible = false,
24791
+ ...others
24792
+ } = props;
24793
+ const {
24794
+ disabled = false,
24795
+ name: label,
24796
+ icon,
24797
+ endAdornment
24798
+ } = tab;
24799
+ const isDisabled = !!disabled;
24904
24800
  const {
24905
- kind
24906
- } = contentStack.current[contentStack.current.length - 1] ?? {};
24907
- const firstContent = contentStack.current[0]?.opts;
24801
+ hoverProps,
24802
+ isHovered
24803
+ } = useHover23({
24804
+ isDisabled
24805
+ });
24908
24806
  const {
24909
- width: width2 = 1040 /* Normal */
24910
- } = firstContent ?? {};
24911
- function wrapWithMotionAndMaybeBack(children2) {
24912
- if (kind === "open") {
24913
- return /* @__PURE__ */ jsx202(motion6.div, { className: "pt3 pb3 pr3 pl3 fg1 oa", children: children2 }, "content");
24914
- } else if (kind === "detail") {
24915
- return /* @__PURE__ */ jsxs103(motion6.div, { className: "pl3 pr3 pt2 pb3 fg1", animate: {
24916
- overflow: "auto"
24917
- }, transition: {
24918
- overflow: {
24919
- delay: 0.3
24920
- }
24921
- }, children: [
24922
- /* @__PURE__ */ jsx202(Button, { label: "Back", icon: "chevronLeft", variant: "tertiary", onClick: closeDrawerDetail }),
24923
- /* @__PURE__ */ jsx202(motion6.div, { initial: {
24924
- x: width2,
24925
- opacity: 0
24926
- }, animate: {
24927
- x: 0,
24928
- opacity: 1
24929
- }, transition: {
24930
- ease: "linear",
24931
- duration: 0.3,
24932
- opacity: {
24933
- delay: 0.15
24934
- }
24935
- }, exit: {
24936
- x: width2,
24937
- opacity: 0
24938
- }, className: "pt2", children: children2 })
24939
- ] }, "content");
24940
- } else {
24941
- return /* @__PURE__ */ jsx202(motion6.div, { ...mergeProps32(void 0, {
24942
- overflow: "auto"
24943
- }, {
24944
- paddingTop: "pt3",
24945
- paddingBottom: "pb3",
24946
- paddingRight: "pr3",
24947
- paddingLeft: "pl3",
24948
- flexGrow: "fg1"
24949
- }) }, "content");
24807
+ baseStyles: baseStyles4,
24808
+ activeStyles: activeStyles3,
24809
+ focusRingStyles: focusRingStyles2,
24810
+ hoverStyles: hoverStyles4,
24811
+ disabledStyles: disabledStyles3,
24812
+ activeHoverStyles
24813
+ } = useMemo55(() => getTabStyles(), []);
24814
+ const uniqueValue = uniqueTabValue(tab);
24815
+ const tabProps = {
24816
+ "aria-controls": `${uniqueValue}-tabPanel`,
24817
+ "aria-selected": active,
24818
+ "aria-disabled": isDisabled || void 0,
24819
+ id: `${uniqueValue}-tab`,
24820
+ role: "tab",
24821
+ tabIndex: active ? 0 : -1,
24822
+ ...others,
24823
+ ...trussProps106({
24824
+ ...baseStyles4,
24825
+ ...active && activeStyles3,
24826
+ ...isDisabled && disabledStyles3,
24827
+ ...isHovered && hoverStyles4,
24828
+ ...isHovered && active && activeHoverStyles,
24829
+ ...isFocusVisible && active && focusRingStyles2
24830
+ })
24831
+ };
24832
+ const interactiveProps = mergeProps32(focusProps, hoverProps, {
24833
+ onKeyUp,
24834
+ onBlur,
24835
+ ...isRouteTab(tab) ? {} : {
24836
+ onClick: () => onClick(tab.value)
24950
24837
  }
24951
- }
24952
- return /* @__PURE__ */ jsxs103(Fragment46, { children: [
24953
- wrapWithMotionAndMaybeBack(children),
24954
- actions && /* @__PURE__ */ jsx202("footer", { className: "bts_solid btw_1px bcGray200 pt3 pb3 pr3 pl3 df aic jcfe", children: /* @__PURE__ */ jsx202("div", { className: "df gap1", children: actions.map((buttonProps, i) => /* @__PURE__ */ jsx202(Button, { ...buttonProps }, i)) }) })
24838
+ });
24839
+ const tabLabel = /* @__PURE__ */ jsxs102(Fragment46, { children: [
24840
+ label,
24841
+ (icon || endAdornment) && /* @__PURE__ */ jsx201("span", { className: "ml1", children: icon ? /* @__PURE__ */ jsx201(Icon, { icon }) : endAdornment })
24955
24842
  ] });
24956
- };
24957
-
24958
- // src/components/Table/cardSlots.ts
24959
- function cardTitleSlot(text) {
24960
- return { kind: "title", text };
24961
- }
24962
- function cardEyebrowSlot(text) {
24963
- return { kind: "eyebrow", text };
24843
+ return isDisabled ? maybeTooltip({
24844
+ title: resolveTooltip(disabled),
24845
+ placement: "top",
24846
+ children: /* @__PURE__ */ jsx201("div", { ...tabProps, children: tabLabel })
24847
+ }) : isRouteTab(tab) ? /* @__PURE__ */ jsx201(Link7, { ...mergeProps32(tabProps, interactiveProps, {
24848
+ className: "navLink"
24849
+ }), to: tab.href, children: tabLabel }) : /* @__PURE__ */ jsx201("button", { ...{
24850
+ ...tabProps,
24851
+ ...interactiveProps
24852
+ }, children: tabLabel });
24964
24853
  }
24965
- function cardBadgeSlot(text, tags) {
24966
- return { kind: "badge", text, tags };
24854
+ function getTabStyles() {
24855
+ const borderBottomWidthPx = 4;
24856
+ const verticalPaddingPx = 6;
24857
+ const borderBottomStyles = {
24858
+ borderBottomStyle: "bbs_solid",
24859
+ borderBottomWidth: ["borderBottomWidth_var", {
24860
+ "--borderBottomWidth": maybeCssVar56(`${borderBottomWidthPx}px`)
24861
+ }],
24862
+ paddingBottom: ["pb_var", {
24863
+ "--paddingBottom": `${verticalPaddingPx - borderBottomWidthPx}px`
24864
+ }]
24865
+ };
24866
+ return {
24867
+ baseStyles: {
24868
+ display: "df",
24869
+ alignItems: "aic",
24870
+ height: "h_32px",
24871
+ paddingTop: ["py_var", {
24872
+ "--paddingTop": `${verticalPaddingPx}px`
24873
+ }],
24874
+ paddingBottom: ["py_var", {
24875
+ "--paddingBottom": `${verticalPaddingPx}px`
24876
+ }],
24877
+ paddingLeft: "pl1",
24878
+ paddingRight: "pr1",
24879
+ outline: "outline0",
24880
+ color: "gray700",
24881
+ width: "width_fit_content",
24882
+ cursor: "cursorPointer",
24883
+ fontWeight: "fw4",
24884
+ fontSize: "fz_14px",
24885
+ lineHeight: "lh_20px"
24886
+ },
24887
+ activeStyles: {
24888
+ ...{
24889
+ borderColor: "bcBlue700",
24890
+ fontWeight: "fw6",
24891
+ fontSize: "fz_14px",
24892
+ lineHeight: "lh_20px",
24893
+ color: "gray900"
24894
+ },
24895
+ ...borderBottomStyles
24896
+ },
24897
+ disabledStyles: {
24898
+ color: "gray400",
24899
+ cursor: "cursorNotAllowed"
24900
+ },
24901
+ focusRingStyles: {
24902
+ backgroundColor: "bgBlue50",
24903
+ boxShadow: "bshFocus"
24904
+ },
24905
+ hoverStyles: {
24906
+ ...{
24907
+ borderColor: "bcGray400"
24908
+ },
24909
+ ...borderBottomStyles
24910
+ },
24911
+ activeHoverStyles: {
24912
+ ...{
24913
+ backgroundColor: "bgBlue50",
24914
+ borderColor: "bcBlue700"
24915
+ },
24916
+ ...borderBottomStyles
24917
+ }
24918
+ };
24967
24919
  }
24968
- function cardStatusSlot(tag) {
24969
- return { kind: "status", tag };
24920
+ function getNextTabValue(selected, key, tabs) {
24921
+ const enabledTabs = tabs.filter((tab) => tab.disabled !== true);
24922
+ const tabsToScan = key === "ArrowRight" ? enabledTabs : enabledTabs.reverse();
24923
+ const currentIndex = tabsToScan.findIndex((tab) => uniqueTabValue(tab) === selected);
24924
+ const nextIndex = currentIndex === tabsToScan.length - 1 ? 0 : currentIndex + 1;
24925
+ return uniqueTabValue(tabsToScan[nextIndex]);
24970
24926
  }
24971
- function cardDataBlockSlot(props) {
24972
- return { kind: "dataBlock", ...props };
24927
+ function isRouteTabs(props) {
24928
+ const {
24929
+ tabs
24930
+ } = props;
24931
+ return tabs.length > 0 && isRouteTab(tabs[0]);
24973
24932
  }
24974
- function cardProgressSlot(value) {
24975
- return { kind: "progress", value };
24933
+ function isRouteTab(tab) {
24934
+ return "path" in tab;
24976
24935
  }
24977
-
24978
- // src/components/Table/utils/simpleHelpers.ts
24979
- var simpleHeader = { kind: "header", id: "header", data: void 0 };
24980
- function simpleDataRows(data = []) {
24981
- return [simpleHeader, ...data.map((data2) => ({ kind: "data", data: data2, id: data2.id }))];
24936
+ function uniqueTabValue(tab) {
24937
+ return isRouteTab(tab) ? camelCase7(tab.name) : tab.value;
24982
24938
  }
24983
-
24984
- // src/components/Table/utils/visitor.ts
24985
- function visit(rows, fn) {
24986
- const todo = [...rows];
24987
- while (todo.length > 0) {
24988
- const row = todo.pop();
24989
- fn(row);
24990
- if (row.children) {
24991
- todo.push(...row.children);
24992
- }
24993
- }
24939
+ function hideTabs(props) {
24940
+ return props.alwaysShowAllTabs ? false : props.tabs.filter((t) => !t.disabled).length === 1;
24994
24941
  }
24995
24942
 
24996
24943
  // src/components/TagGroup.tsx
24997
- import { jsx as jsx203, jsxs as jsxs104 } from "react/jsx-runtime";
24944
+ import { jsx as jsx202, jsxs as jsxs103 } from "react/jsx-runtime";
24998
24945
  function TagGroup(props) {
24999
24946
  const {
25000
24947
  tags,
@@ -25002,9 +24949,9 @@ function TagGroup(props) {
25002
24949
  ...otherProps
25003
24950
  } = props;
25004
24951
  const tid = useTestIds(otherProps, "tagGroup");
25005
- return /* @__PURE__ */ jsxs104("div", { ...tid, className: "df aic fww gap1", children: [
25006
- tags.map((tag) => /* @__PURE__ */ jsx203(Tag, { ...tag, variant: "secondary" }, tag.text)),
25007
- onEdit && /* @__PURE__ */ jsx203("span", { className: "ml1 fw4 fz_14px lh_20px", children: /* @__PURE__ */ jsx203(Button, { label: "Edit", variant: "text", onClick: onEdit, ...tid.edit }) })
24952
+ return /* @__PURE__ */ jsxs103("div", { ...tid, className: "df aic fww gap1", children: [
24953
+ tags.map((tag) => /* @__PURE__ */ jsx202(Tag, { ...tag, variant: "secondary" }, tag.text)),
24954
+ onEdit && /* @__PURE__ */ jsx202("span", { className: "ml1 fw4 fz_14px lh_20px", children: /* @__PURE__ */ jsx202(Button, { label: "Edit", variant: "text", onClick: onEdit, ...tid.edit }) })
25008
24955
  ] });
25009
24956
  }
25010
24957
 
@@ -25017,15 +24964,15 @@ function useToast() {
25017
24964
  }
25018
24965
 
25019
24966
  // src/layouts/SideNavLayout/SideNavLayout.tsx
25020
- import { trussProps as trussProps108, mergeProps as mergeProps33, maybeCssVar as maybeCssVar57 } from "@homebound/truss/runtime";
25021
- import { jsx as jsx204, jsxs as jsxs105 } from "react/jsx-runtime";
24967
+ import { trussProps as trussProps107, mergeProps as mergeProps33, maybeCssVar as maybeCssVar57 } from "@homebound/truss/runtime";
24968
+ import { jsx as jsx203, jsxs as jsxs104 } from "react/jsx-runtime";
25022
24969
  var __maybeInc21 = (inc) => {
25023
24970
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
25024
24971
  };
25025
24972
  function SideNavLayout(props) {
25026
24973
  const hasProvider = useHasSideNavLayoutProvider();
25027
- if (hasProvider) return /* @__PURE__ */ jsx204(SideNavLayoutContent, { ...props });
25028
- return /* @__PURE__ */ jsx204(SideNavLayoutProvider, { children: /* @__PURE__ */ jsx204(SideNavLayoutContent, { ...props }) });
24974
+ if (hasProvider) return /* @__PURE__ */ jsx203(SideNavLayoutContent, { ...props });
24975
+ return /* @__PURE__ */ jsx203(SideNavLayoutProvider, { children: /* @__PURE__ */ jsx203(SideNavLayoutContent, { ...props }) });
25029
24976
  }
25030
24977
  function SideNavLayoutContent(props) {
25031
24978
  const {
@@ -25047,7 +24994,7 @@ function SideNavLayoutContent(props) {
25047
24994
  const railOffsetPx = !showRail ? 0 : !bp.mdAndUp || collapsed ? railCollapsedWidthPx : railWidthPx;
25048
24995
  const navTop = bannerAndNavbarChromeTop();
25049
24996
  const railViewportHeight = `calc(var(${beamLayoutViewportHeightVar}, 100vh) - var(${beamEnvironmentBannerLayoutHeightVar}, 0px) - var(${beamNavbarLayoutHeightVar}, 0px))`;
25050
- const rail = showRail && /* @__PURE__ */ jsxs105("div", { ...trussProps108({
24997
+ const rail = showRail && /* @__PURE__ */ jsxs104("div", { ...trussProps107({
25051
24998
  ...{
25052
24999
  display: "df",
25053
25000
  flexDirection: "fdc",
@@ -25104,18 +25051,18 @@ function SideNavLayoutContent(props) {
25104
25051
  }
25105
25052
  }
25106
25053
  }), ...tid.sideNav, children: [
25107
- showCollapseToggle && /* @__PURE__ */ jsx204("div", { className: "absolute right2 top2 z2", children: /* @__PURE__ */ jsx204(IconButton, { icon: collapsed ? "menuOpen" : "menuClose", label: collapsed ? "Expand navigation" : "Collapse navigation", onClick: () => setNavState(collapsed ? "expanded" : "collapse"), ...tid.toggle }) }),
25108
- /* @__PURE__ */ jsx204("div", { className: "fg1 mh0 df fdc", ...tid.sideNavContent, children: /* @__PURE__ */ jsx204(SideNav, { ...sideNav }) })
25054
+ showCollapseToggle && /* @__PURE__ */ jsx203("div", { className: "absolute right2 top2 z2", children: /* @__PURE__ */ jsx203(IconButton, { icon: collapsed ? "menuOpen" : "menuClose", label: collapsed ? "Expand navigation" : "Collapse navigation", onClick: () => setNavState(collapsed ? "expanded" : "collapse"), ...tid.toggle }) }),
25055
+ /* @__PURE__ */ jsx203("div", { className: "fg1 mh0 df fdc", ...tid.sideNavContent, children: /* @__PURE__ */ jsx203(SideNav, { ...sideNav }) })
25109
25056
  ] });
25110
- return /* @__PURE__ */ jsx204(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs105("div", { ...mergeProps33(void 0, {
25057
+ return /* @__PURE__ */ jsx203(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs104("div", { ...mergeProps33(void 0, {
25111
25058
  [beamSideNavLayoutWidthVar]: `${railOffsetPx}px`
25112
25059
  }, {
25113
25060
  display: "df",
25114
25061
  flexDirection: "fdr",
25115
25062
  width: "w100"
25116
25063
  }), ...tid, children: [
25117
- contrastRail ? /* @__PURE__ */ jsx204(ContrastScope, { children: rail }) : rail,
25118
- /* @__PURE__ */ jsx204("div", { ...trussProps108({
25064
+ contrastRail ? /* @__PURE__ */ jsx203(ContrastScope, { children: rail }) : rail,
25065
+ /* @__PURE__ */ jsx203("div", { ...trussProps107({
25119
25066
  display: "df",
25120
25067
  flexDirection: "fdc",
25121
25068
  flexGrow: "fg1",
@@ -25131,8 +25078,8 @@ function SideNavLayoutContent(props) {
25131
25078
  }
25132
25079
 
25133
25080
  // src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayout.tsx
25134
- import { trussProps as trussProps109, mergeProps as mergeProps34, maybeCssVar as maybeCssVar58 } from "@homebound/truss/runtime";
25135
- import { jsx as jsx205, jsxs as jsxs106 } from "react/jsx-runtime";
25081
+ import { trussProps as trussProps108, mergeProps as mergeProps34, maybeCssVar as maybeCssVar58 } from "@homebound/truss/runtime";
25082
+ import { jsx as jsx204, jsxs as jsxs105 } from "react/jsx-runtime";
25136
25083
  var __maybeInc22 = (inc) => {
25137
25084
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
25138
25085
  };
@@ -25148,18 +25095,18 @@ function EnvironmentBannerLayout(props) {
25148
25095
  [beamEnvironmentBannerLayoutHeightVar]: `${bannerHeightPx}px`
25149
25096
  };
25150
25097
  const innerWidth = `var(${beamLayoutViewportWidthVar}, 100vw)`;
25151
- return /* @__PURE__ */ jsx205(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx205(EnvironmentBannerLayoutHeightProvider, { value: bannerHeightPx, children: /* @__PURE__ */ jsxs106("div", { ...mergeProps34(void 0, style, {
25098
+ return /* @__PURE__ */ jsx204(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx204(EnvironmentBannerLayoutHeightProvider, { value: bannerHeightPx, children: /* @__PURE__ */ jsxs105("div", { ...mergeProps34(void 0, style, {
25152
25099
  display: "df",
25153
25100
  flexDirection: "fdc",
25154
25101
  width: "wfc",
25155
25102
  minWidth: "mw100"
25156
25103
  }), ...tid, children: [
25157
- showBanner && environmentBanner && /* @__PURE__ */ jsx205("div", { ...mergeProps34(void 0, {
25104
+ showBanner && environmentBanner && /* @__PURE__ */ jsx204("div", { ...mergeProps34(void 0, {
25158
25105
  height: environmentBannerSizePx
25159
25106
  }, {
25160
25107
  flexShrink: "fs0",
25161
25108
  width: "w100"
25162
- }), children: /* @__PURE__ */ jsx205("div", { ...trussProps109({
25109
+ }), children: /* @__PURE__ */ jsx204("div", { ...trussProps108({
25163
25110
  position: "fixed",
25164
25111
  top: "top0",
25165
25112
  left: "left0",
@@ -25169,7 +25116,7 @@ function EnvironmentBannerLayout(props) {
25169
25116
  width: ["w_var", {
25170
25117
  "--width": maybeCssVar58(__maybeInc22(innerWidth))
25171
25118
  }]
25172
- }), ...tid.bannerSticky, children: /* @__PURE__ */ jsx205(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
25119
+ }), ...tid.bannerSticky, children: /* @__PURE__ */ jsx204(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
25173
25120
  children
25174
25121
  ] }) }) });
25175
25122
  }
@@ -25287,17 +25234,17 @@ function useMeasuredHeight(ref, enabled) {
25287
25234
 
25288
25235
  // src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
25289
25236
  import { createContext as createContext15, useContext as useContext27 } from "react";
25290
- import { jsx as jsx206 } from "react/jsx-runtime";
25237
+ import { jsx as jsx205 } from "react/jsx-runtime";
25291
25238
  var NavbarLayoutHeightContext = createContext15(0);
25292
25239
  function NavbarLayoutHeightProvider({ value, children }) {
25293
- return /* @__PURE__ */ jsx206(NavbarLayoutHeightContext.Provider, { value, children });
25240
+ return /* @__PURE__ */ jsx205(NavbarLayoutHeightContext.Provider, { value, children });
25294
25241
  }
25295
25242
  function useNavbarLayoutHeight() {
25296
25243
  return useContext27(NavbarLayoutHeightContext);
25297
25244
  }
25298
25245
 
25299
25246
  // src/layouts/NavbarLayout/NavbarLayout.tsx
25300
- import { jsx as jsx207, jsxs as jsxs107 } from "react/jsx-runtime";
25247
+ import { jsx as jsx206, jsxs as jsxs106 } from "react/jsx-runtime";
25301
25248
  var __maybeInc23 = (inc) => {
25302
25249
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
25303
25250
  };
@@ -25350,26 +25297,90 @@ function NavbarLayout(props) {
25350
25297
  const innerStyle = autoHideState !== "static" ? {
25351
25298
  top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
25352
25299
  } : void 0;
25353
- const navbarEl = useMemo56(() => /* @__PURE__ */ jsx207(Navbar, { ...navbar }), [navbar]);
25354
- return /* @__PURE__ */ jsx207(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx207(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ jsxs107("div", { ...mergeProps35(void 0, cssVars, {
25300
+ const navbarEl = useMemo56(() => /* @__PURE__ */ jsx206(Navbar, { ...navbar }), [navbar]);
25301
+ return /* @__PURE__ */ jsx206(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx206(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ jsxs106("div", { ...mergeProps35(void 0, cssVars, {
25355
25302
  display: "df",
25356
25303
  flexDirection: "fdc",
25357
25304
  width: "wfc",
25358
25305
  minWidth: "mw100"
25359
25306
  }), ...tid, children: [
25360
- /* @__PURE__ */ jsx207("div", { ref: spacerRef, ...mergeProps35(void 0, {
25307
+ /* @__PURE__ */ jsx206("div", { ref: spacerRef, ...mergeProps35(void 0, {
25361
25308
  height: navHeight
25362
25309
  }, {
25363
25310
  flexShrink: "fs0",
25364
25311
  width: "w100"
25365
- }), children: /* @__PURE__ */ jsx207("div", { ref: navMetricsRef, ...mergeProps35(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
25366
- /* @__PURE__ */ jsx207("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
25312
+ }), children: /* @__PURE__ */ jsx206("div", { ref: navMetricsRef, ...mergeProps35(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
25313
+ /* @__PURE__ */ jsx206("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
25367
25314
  ] }) }) });
25368
25315
  }
25369
25316
 
25370
25317
  // src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
25371
25318
  import { useCallback as useCallback39, useMemo as useMemo57, useRef as useRef66 } from "react";
25372
25319
 
25320
+ // src/components/Headers/BaseHeader.tsx
25321
+ import { trussProps as trussProps109 } from "@homebound/truss/runtime";
25322
+ import { jsx as jsx207, jsxs as jsxs107 } from "react/jsx-runtime";
25323
+ function BaseHeader(props) {
25324
+ const {
25325
+ title,
25326
+ documentTitleSuffix,
25327
+ rightSlot,
25328
+ breadcrumbs,
25329
+ bottomSlot,
25330
+ ...otherProps
25331
+ } = props;
25332
+ const tid = useTestIds(otherProps, "header");
25333
+ useDocumentTitle(title, documentTitleSuffix);
25334
+ return /* @__PURE__ */ jsxs107("header", { ...tid, ...trussProps109({
25335
+ display: "df",
25336
+ flexDirection: "fdc",
25337
+ paddingTop: "pt3",
25338
+ borderBottomStyle: "bbs_solid",
25339
+ borderBottomWidth: "bbw_1px",
25340
+ gap: "gap2",
25341
+ borderColor: ["bc_var", {
25342
+ "--borderColor": "var(--b-surface-separator)"
25343
+ }],
25344
+ backgroundColor: ["bgColor_var", {
25345
+ "--backgroundColor": "var(--b-surface)"
25346
+ }]
25347
+ }), children: [
25348
+ /* @__PURE__ */ jsxs107("div", { ...trussProps109({
25349
+ ...{
25350
+ display: "df",
25351
+ justifyContent: "jcsb",
25352
+ width: "w100",
25353
+ gap: "gap1",
25354
+ paddingLeft: "pl3",
25355
+ paddingRight: "pr3"
25356
+ },
25357
+ ...{
25358
+ ...!bottomSlot ? {
25359
+ marginBottom: "mb2"
25360
+ } : {}
25361
+ }
25362
+ }), children: [
25363
+ /* @__PURE__ */ jsxs107("div", { className: "mw0", children: [
25364
+ breadcrumbs && /* @__PURE__ */ jsx207(Breadcrumbs, { ...breadcrumbs }),
25365
+ /* @__PURE__ */ jsx207("h1", { ...tid.title, className: "fw6 fz_20px lh_28px", children: title })
25366
+ ] }),
25367
+ /* @__PURE__ */ jsx207("div", { className: "fs0", children: rightSlot })
25368
+ ] }),
25369
+ bottomSlot
25370
+ ] });
25371
+ }
25372
+
25373
+ // src/components/Headers/PageHeader.tsx
25374
+ import { jsx as jsx208 } from "react/jsx-runtime";
25375
+ function PageHeader2(props) {
25376
+ const {
25377
+ tabs,
25378
+ ...otherProps
25379
+ } = props;
25380
+ const tid = useTestIds(otherProps, "header");
25381
+ return /* @__PURE__ */ jsx208(BaseHeader, { ...otherProps, bottomSlot: tabs && /* @__PURE__ */ jsx208("div", { className: "pl3 pr3", children: /* @__PURE__ */ jsx208(Tabs, { ...tabs, ...tid.tabs }) }) });
25382
+ }
25383
+
25373
25384
  // src/layouts/useBannerAndNavbarHeight.ts
25374
25385
  function useBannerAndNavbarHeight() {
25375
25386
  return useEnvironmentBannerLayoutHeight() + useNavbarLayoutHeight();
@@ -25377,7 +25388,7 @@ function useBannerAndNavbarHeight() {
25377
25388
 
25378
25389
  // src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
25379
25390
  import { mergeProps as mergeProps36, maybeCssVar as maybeCssVar60 } from "@homebound/truss/runtime";
25380
- import { jsx as jsx208, jsxs as jsxs108 } from "react/jsx-runtime";
25391
+ import { jsx as jsx209, jsxs as jsxs108 } from "react/jsx-runtime";
25381
25392
  var __maybeInc24 = (inc) => {
25382
25393
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
25383
25394
  };
@@ -25432,19 +25443,19 @@ function PageHeaderLayout(props) {
25432
25443
  const innerStyle = autoHideState !== "static" ? {
25433
25444
  top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
25434
25445
  } : void 0;
25435
- const pageHeaderEl = useMemo57(() => /* @__PURE__ */ jsx208(PageHeader2, { ...pageHeader }), [pageHeader]);
25436
- return /* @__PURE__ */ jsx208(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs108("div", { ...mergeProps36(void 0, cssVars, {
25446
+ const pageHeaderEl = useMemo57(() => /* @__PURE__ */ jsx209(PageHeader2, { ...pageHeader }), [pageHeader]);
25447
+ return /* @__PURE__ */ jsx209(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs108("div", { ...mergeProps36(void 0, cssVars, {
25437
25448
  display: "df",
25438
25449
  flexDirection: "fdc",
25439
25450
  width: "w100"
25440
25451
  }), ...tid, children: [
25441
- /* @__PURE__ */ jsx208("div", { ref: spacerRef, ...mergeProps36(void 0, {
25452
+ /* @__PURE__ */ jsx209("div", { ref: spacerRef, ...mergeProps36(void 0, {
25442
25453
  height: headerHeight
25443
25454
  }, {
25444
25455
  flexShrink: "fs0",
25445
25456
  width: "w100"
25446
- }), children: /* @__PURE__ */ jsx208("div", { ref: headerMetricsRef, ...mergeProps36(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
25447
- /* @__PURE__ */ jsx208("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
25457
+ }), children: /* @__PURE__ */ jsx209("div", { ref: headerMetricsRef, ...mergeProps36(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
25458
+ /* @__PURE__ */ jsx209("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
25448
25459
  ] }) });
25449
25460
  }
25450
25461
  export {
@@ -25554,7 +25565,6 @@ export {
25554
25565
  NavbarLayout,
25555
25566
  NumberField,
25556
25567
  OpenModal,
25557
- PageHeader2 as PageHeader,
25558
25568
  PageHeaderLayout,
25559
25569
  Pagination,
25560
25570
  Palette,