@the-portland-company/shell 0.43.0 → 0.44.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/native.cjs CHANGED
@@ -2582,15 +2582,39 @@ var BETA_BANNER_DEFAULTS = {
2582
2582
  linkLabel: "You can click here to see the Terms & Conditions for Beta users.",
2583
2583
  href: "https://app.politogyvrm.com/beta-terms-and-conditions"
2584
2584
  };
2585
- function NavBetaBanner({ text, linkLabel, href }) {
2585
+ var BETA_BANNER_DISMISS_KEY = "politogy_beta_banner_dismissed";
2586
+ function clearBetaBannerDismissal() {
2587
+ if (typeof window === "undefined") return;
2588
+ try {
2589
+ window.sessionStorage.removeItem(BETA_BANNER_DISMISS_KEY);
2590
+ } catch {
2591
+ }
2592
+ }
2593
+ function NavBetaBanner({ text, linkLabel, href, dismissible = true }) {
2586
2594
  const body = text ?? BETA_BANNER_DEFAULTS.text;
2587
2595
  const label = linkLabel ?? BETA_BANNER_DEFAULTS.linkLabel;
2588
2596
  const target = href ?? BETA_BANNER_DEFAULTS.href;
2597
+ const [dismissed, setDismissed] = react.useState(false);
2598
+ react.useEffect(() => {
2599
+ if (!dismissible) return;
2600
+ try {
2601
+ if (window.sessionStorage.getItem(BETA_BANNER_DISMISS_KEY) === "1") setDismissed(true);
2602
+ } catch {
2603
+ }
2604
+ }, [dismissible]);
2605
+ if (dismissible && dismissed) return null;
2606
+ const onDismiss = () => {
2607
+ setDismissed(true);
2608
+ try {
2609
+ window.sessionStorage.setItem(BETA_BANNER_DISMISS_KEY, "1");
2610
+ } catch {
2611
+ }
2612
+ };
2589
2613
  return /* @__PURE__ */ jsxRuntime.jsxs(
2590
2614
  "div",
2591
2615
  {
2592
2616
  role: "note",
2593
- className: "w-full px-4 py-2 text-center text-sm",
2617
+ className: "relative w-full px-10 py-2 text-center text-sm",
2594
2618
  style: {
2595
2619
  // Amber warning fill, matching the "10DLC Registration Required" notice
2596
2620
  // (HITL 2026-07-29). This used to fall through to `--color-accent`, the
@@ -2612,7 +2636,19 @@ function NavBetaBanner({ text, linkLabel, href }) {
2612
2636
  style: { color: "var(--beta-banner-text, #1A202C)" },
2613
2637
  children: label
2614
2638
  }
2615
- )
2639
+ ),
2640
+ dismissible ? /* @__PURE__ */ jsxRuntime.jsx(
2641
+ "button",
2642
+ {
2643
+ type: "button",
2644
+ onClick: onDismiss,
2645
+ "aria-label": "Dismiss this notice",
2646
+ title: "Dismiss",
2647
+ className: "absolute right-2 top-1/2 -translate-y-1/2 flex h-6 w-6 items-center justify-center rounded text-base leading-none opacity-70 hover:opacity-100",
2648
+ style: { color: "var(--beta-banner-text, #1A202C)" },
2649
+ children: "\xD7"
2650
+ }
2651
+ ) : null
2616
2652
  ]
2617
2653
  }
2618
2654
  );
@@ -2654,6 +2690,7 @@ function NavAppShell({
2654
2690
  ] });
2655
2691
  }
2656
2692
 
2693
+ exports.BETA_BANNER_DISMISS_KEY = BETA_BANNER_DISMISS_KEY;
2657
2694
  exports.CAMPAIGN_FEATURE_AVAILABILITY = CAMPAIGN_FEATURE_AVAILABILITY;
2658
2695
  exports.CORE_APP_ORIGIN = CORE_APP_ORIGIN;
2659
2696
  exports.CORE_BILLING_PATH = CORE_BILLING_PATH;
@@ -2673,6 +2710,7 @@ exports.TopBarPanelArrow = TopBarPanelArrow;
2673
2710
  exports.TopBarPopover = TopBarPopover;
2674
2711
  exports.TopBarTooltip = TopBarTooltip;
2675
2712
  exports.TopBarWidgetSlot = TopBarWidgetSlot;
2713
+ exports.clearBetaBannerDismissal = clearBetaBannerDismissal;
2676
2714
  exports.envChipClasses = envChipClasses;
2677
2715
  exports.isNavItemActive = isNavItemActive;
2678
2716
  exports.resolveOrgLogoUrl = resolveOrgLogoUrl;