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