@streamoid/ui 0.6.52 → 0.6.54

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.d.mts CHANGED
@@ -911,7 +911,14 @@ interface ScSidebarWorkspaceTriggerProps {
911
911
  className?: string;
912
912
  style?: CSSProperties;
913
913
  }
914
- declare function ScSidebarWorkspaceTrigger({ workspaceName, workspaceImage, expanded, open, onClick, className, style, }: ScSidebarWorkspaceTriggerProps): JSX.Element;
914
+ /**
915
+ * FORWARDS ITS REF, for the same reason `ScSidebarAppIdentity` does: the
916
+ * workspace popover's caret points HERE, and without a ref every host wraps
917
+ * this in a div to get one. Those wrappers are load-bearing in ways the host
918
+ * has to remember — see the app identity, where one shipped crammed against
919
+ * the footer's left edge.
920
+ */
921
+ declare const ScSidebarWorkspaceTrigger: React$1.ForwardRefExoticComponent<ScSidebarWorkspaceTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
915
922
  interface ScSidebarSearchTriggerProps {
916
923
  expanded: boolean;
917
924
  label?: string;
@@ -930,7 +937,16 @@ interface ScSidebarAppIdentityProps {
930
937
  label?: string;
931
938
  className?: string;
932
939
  }
933
- declare function ScSidebarAppIdentity({ expanded, product, collapsedLabel, collapsedMark, label, className, }: ScSidebarAppIdentityProps): JSX.Element;
940
+ /**
941
+ * FORWARDS ITS REF, so a host can anchor a popover to it directly.
942
+ *
943
+ * Without one, a host that needs to point a caret here has to wrap this in a
944
+ * div — and a bare div inside the footer's row-flex is an ITEM sized to its
945
+ * content, so the `width: 100%` + `space-between` below resolve against the
946
+ * wrapper instead of the row and the wordmark and app-grid icon end up crammed
947
+ * together. That shipped in CXO. The wrapper was never the point; the ref was.
948
+ */
949
+ declare const ScSidebarAppIdentity: React$1.ForwardRefExoticComponent<ScSidebarAppIdentityProps & React$1.RefAttributes<HTMLSpanElement>>;
934
950
  interface ScWorkspaceAccountMenuProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
935
951
  workspaceName: string;
936
952
  workspaceRole?: string;
@@ -1187,10 +1203,18 @@ interface IScSidebarPopoverProps {
1187
1203
  role?: string;
1188
1204
  ariaLabel?: string;
1189
1205
  testId?: string;
1206
+ /** Render the dismiss catcher. On by default.
1207
+ *
1208
+ * Pass `false` when the host already has its own outside-click handling and
1209
+ * that handling is ANCHOR-AWARE. A catcher covers the trigger too, so a
1210
+ * press on the trigger closes the panel and the trailing click then reopens
1211
+ * it — the flicker Tactix's switcher was written to avoid. Escape still
1212
+ * works either way. */
1213
+ backdrop?: boolean;
1190
1214
  className?: string;
1191
1215
  style?: CSSProperties;
1192
1216
  }
1193
- declare function ScSidebarPopover({ anchorRef, alignRef, width, onClose, children, role, ariaLabel, testId, className, style, }: IScSidebarPopoverProps): React$1.ReactPortal | null;
1217
+ declare function ScSidebarPopover({ anchorRef, alignRef, width, onClose, children, role, ariaLabel, testId, backdrop, className, style, }: IScSidebarPopoverProps): React$1.ReactPortal | null;
1194
1218
 
1195
1219
  interface AppSidebarMenuItem {
1196
1220
  id: string;
package/dist/index.d.ts CHANGED
@@ -911,7 +911,14 @@ interface ScSidebarWorkspaceTriggerProps {
911
911
  className?: string;
912
912
  style?: CSSProperties;
913
913
  }
914
- declare function ScSidebarWorkspaceTrigger({ workspaceName, workspaceImage, expanded, open, onClick, className, style, }: ScSidebarWorkspaceTriggerProps): JSX.Element;
914
+ /**
915
+ * FORWARDS ITS REF, for the same reason `ScSidebarAppIdentity` does: the
916
+ * workspace popover's caret points HERE, and without a ref every host wraps
917
+ * this in a div to get one. Those wrappers are load-bearing in ways the host
918
+ * has to remember — see the app identity, where one shipped crammed against
919
+ * the footer's left edge.
920
+ */
921
+ declare const ScSidebarWorkspaceTrigger: React$1.ForwardRefExoticComponent<ScSidebarWorkspaceTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
915
922
  interface ScSidebarSearchTriggerProps {
916
923
  expanded: boolean;
917
924
  label?: string;
@@ -930,7 +937,16 @@ interface ScSidebarAppIdentityProps {
930
937
  label?: string;
931
938
  className?: string;
932
939
  }
933
- declare function ScSidebarAppIdentity({ expanded, product, collapsedLabel, collapsedMark, label, className, }: ScSidebarAppIdentityProps): JSX.Element;
940
+ /**
941
+ * FORWARDS ITS REF, so a host can anchor a popover to it directly.
942
+ *
943
+ * Without one, a host that needs to point a caret here has to wrap this in a
944
+ * div — and a bare div inside the footer's row-flex is an ITEM sized to its
945
+ * content, so the `width: 100%` + `space-between` below resolve against the
946
+ * wrapper instead of the row and the wordmark and app-grid icon end up crammed
947
+ * together. That shipped in CXO. The wrapper was never the point; the ref was.
948
+ */
949
+ declare const ScSidebarAppIdentity: React$1.ForwardRefExoticComponent<ScSidebarAppIdentityProps & React$1.RefAttributes<HTMLSpanElement>>;
934
950
  interface ScWorkspaceAccountMenuProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
935
951
  workspaceName: string;
936
952
  workspaceRole?: string;
@@ -1187,10 +1203,18 @@ interface IScSidebarPopoverProps {
1187
1203
  role?: string;
1188
1204
  ariaLabel?: string;
1189
1205
  testId?: string;
1206
+ /** Render the dismiss catcher. On by default.
1207
+ *
1208
+ * Pass `false` when the host already has its own outside-click handling and
1209
+ * that handling is ANCHOR-AWARE. A catcher covers the trigger too, so a
1210
+ * press on the trigger closes the panel and the trailing click then reopens
1211
+ * it — the flicker Tactix's switcher was written to avoid. Escape still
1212
+ * works either way. */
1213
+ backdrop?: boolean;
1190
1214
  className?: string;
1191
1215
  style?: CSSProperties;
1192
1216
  }
1193
- declare function ScSidebarPopover({ anchorRef, alignRef, width, onClose, children, role, ariaLabel, testId, className, style, }: IScSidebarPopoverProps): React$1.ReactPortal | null;
1217
+ declare function ScSidebarPopover({ anchorRef, alignRef, width, onClose, children, role, ariaLabel, testId, backdrop, className, style, }: IScSidebarPopoverProps): React$1.ReactPortal | null;
1194
1218
 
1195
1219
  interface AppSidebarMenuItem {
1196
1220
  id: string;
package/dist/index.js CHANGED
@@ -5626,6 +5626,7 @@ function StreamoidSidebar({
5626
5626
  }
5627
5627
 
5628
5628
  // src/SC-SidebarShell/ScSidebarShell.tsx
5629
+ var import_react16 = require("react");
5629
5630
  var import_icons37 = require("@streamoid/icons");
5630
5631
 
5631
5632
  // src/SC-SidebarShell/ScSidebarShell.module.css
@@ -5667,7 +5668,7 @@ var ScSidebarShell_default = {
5667
5668
 
5668
5669
  // src/SC-SidebarShell/ScSidebarShell.tsx
5669
5670
  var import_jsx_runtime54 = require("react/jsx-runtime");
5670
- function ScSidebarWorkspaceTrigger({
5671
+ var ScSidebarWorkspaceTrigger = (0, import_react16.forwardRef)(function ScSidebarWorkspaceTrigger2({
5671
5672
  workspaceName,
5672
5673
  workspaceImage,
5673
5674
  expanded,
@@ -5675,11 +5676,12 @@ function ScSidebarWorkspaceTrigger({
5675
5676
  onClick,
5676
5677
  className,
5677
5678
  style
5678
- }) {
5679
+ }, ref) {
5679
5680
  const initial = (workspaceName || "W").charAt(0).toUpperCase();
5680
5681
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
5681
5682
  "button",
5682
5683
  {
5684
+ ref,
5683
5685
  type: "button",
5684
5686
  "aria-label": `Open ${workspaceName} workspace menu`,
5685
5687
  "aria-expanded": open,
@@ -5711,7 +5713,7 @@ function ScSidebarWorkspaceTrigger({
5711
5713
  ]
5712
5714
  }
5713
5715
  );
5714
- }
5716
+ });
5715
5717
  function ScSidebarSearchTrigger({
5716
5718
  expanded,
5717
5719
  label = "Search or Ask CXO",
@@ -5754,18 +5756,19 @@ var COMPACT_APP_LABELS = {
5754
5756
  catalogix: "Ca",
5755
5757
  photogenix: "Ph"
5756
5758
  };
5757
- function ScSidebarAppIdentity({
5759
+ var ScSidebarAppIdentity = (0, import_react16.forwardRef)(function ScSidebarAppIdentity2({
5758
5760
  expanded,
5759
5761
  product = "streamoid",
5760
5762
  collapsedLabel,
5761
5763
  collapsedMark,
5762
5764
  label,
5763
5765
  className
5764
- }) {
5766
+ }, ref) {
5765
5767
  const appLabel = label ?? (product === "streamoid" ? "Streamoid" : product);
5766
5768
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5767
5769
  "span",
5768
5770
  {
5771
+ ref,
5769
5772
  "aria-label": `Switch Apps. Current app: ${appLabel}`,
5770
5773
  title: "Switch Apps",
5771
5774
  className: `${ScSidebarShell_default.appIdentity} ${expanded ? ScSidebarShell_default.appIdentityExpanded : ScSidebarShell_default.appIdentityCollapsed}${className ? ` ${className}` : ""}`,
@@ -5781,7 +5784,7 @@ function ScSidebarAppIdentity({
5781
5784
  ] }) : collapsedMark ?? (product === "streamoid" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ScStreamoidMascot, { size: 40 }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": true, className: ScSidebarShell_default.collapsedProductMark, children: collapsedLabel ?? COMPACT_APP_LABELS[product] }))
5782
5785
  }
5783
5786
  );
5784
- }
5787
+ });
5785
5788
  function MenuActionRow({
5786
5789
  icon,
5787
5790
  label,
@@ -5973,7 +5976,7 @@ function ScWorkspaceAccountMenu({
5973
5976
  }
5974
5977
 
5975
5978
  // src/SC-SidebarShell/useStreamoidShellPreferences.ts
5976
- var import_react16 = require("react");
5979
+ var import_react17 = require("react");
5977
5980
  var THEME_COOKIE = "streamoid_theme";
5978
5981
  var SIDEBAR_COOKIE = "streamoid_sidebar";
5979
5982
  var THEME_STORAGE_KEY = "streamoid.shell.theme";
@@ -6055,7 +6058,7 @@ function readExpanded(options) {
6055
6058
  }
6056
6059
  function useStreamoidThemePreference(options = {}) {
6057
6060
  const legacyKeySignature = (options.legacyStorageKeys ?? []).join("\0");
6058
- const stableOptions = (0, import_react16.useMemo)(
6061
+ const stableOptions = (0, import_react17.useMemo)(
6059
6062
  () => ({
6060
6063
  defaultMode: options.defaultMode,
6061
6064
  legacyStorageKeys: legacyKeySignature ? legacyKeySignature.split("\0") : [],
@@ -6063,31 +6066,31 @@ function useStreamoidThemePreference(options = {}) {
6063
6066
  }),
6064
6067
  [options.defaultMode, options.applyToDocument, legacyKeySignature]
6065
6068
  );
6066
- const [preference, setPreferenceState] = (0, import_react16.useState)(
6069
+ const [preference, setPreferenceState] = (0, import_react17.useState)(
6067
6070
  () => readTheme(stableOptions)
6068
6071
  );
6069
- const [systemDark, setSystemDark] = (0, import_react16.useState)(
6072
+ const [systemDark, setSystemDark] = (0, import_react17.useState)(
6070
6073
  () => canUseDom() && window.matchMedia("(prefers-color-scheme: dark)").matches
6071
6074
  );
6072
- const setPreference = (0, import_react16.useCallback)((mode) => {
6075
+ const setPreference = (0, import_react17.useCallback)((mode) => {
6073
6076
  setPreferenceState(mode);
6074
6077
  writeStorage(THEME_STORAGE_KEY, mode);
6075
6078
  stableOptions.legacyStorageKeys.forEach((key) => writeStorage(key, mode));
6076
6079
  writeCookie(THEME_COOKIE, mode);
6077
6080
  }, [stableOptions]);
6078
- (0, import_react16.useEffect)(() => {
6081
+ (0, import_react17.useEffect)(() => {
6079
6082
  writeStorage(THEME_STORAGE_KEY, preference);
6080
6083
  stableOptions.legacyStorageKeys.forEach((key) => writeStorage(key, preference));
6081
6084
  writeCookie(THEME_COOKIE, preference);
6082
6085
  }, [preference, stableOptions]);
6083
- (0, import_react16.useEffect)(() => {
6086
+ (0, import_react17.useEffect)(() => {
6084
6087
  if (!canUseDom()) return;
6085
6088
  const media = window.matchMedia("(prefers-color-scheme: dark)");
6086
6089
  const onChange = (event) => setSystemDark(event.matches);
6087
6090
  media.addEventListener("change", onChange);
6088
6091
  return () => media.removeEventListener("change", onChange);
6089
6092
  }, []);
6090
- (0, import_react16.useEffect)(() => {
6093
+ (0, import_react17.useEffect)(() => {
6091
6094
  if (!canUseDom()) return;
6092
6095
  const sync = () => setPreferenceState(readTheme(stableOptions));
6093
6096
  const onStorage = (event) => {
@@ -6103,7 +6106,7 @@ function useStreamoidThemePreference(options = {}) {
6103
6106
  };
6104
6107
  }, [stableOptions]);
6105
6108
  const resolved = preference === "system" ? systemDark ? "dark" : "light" : preference;
6106
- (0, import_react16.useEffect)(() => {
6109
+ (0, import_react17.useEffect)(() => {
6107
6110
  if (!canUseDom() || !stableOptions.applyToDocument) return;
6108
6111
  const root = document.documentElement;
6109
6112
  root.setAttribute("data-theme", resolved === "light" ? "Light" : "Dark");
@@ -6113,15 +6116,15 @@ function useStreamoidThemePreference(options = {}) {
6113
6116
  }
6114
6117
  function useStreamoidSidebarPreference(options = {}) {
6115
6118
  const legacyKeySignature = (options.legacyCollapsedKeys ?? []).join("\0");
6116
- const stableOptions = (0, import_react16.useMemo)(
6119
+ const stableOptions = (0, import_react17.useMemo)(
6117
6120
  () => ({
6118
6121
  defaultExpanded: options.defaultExpanded,
6119
6122
  legacyCollapsedKeys: legacyKeySignature ? legacyKeySignature.split("\0") : []
6120
6123
  }),
6121
6124
  [options.defaultExpanded, legacyKeySignature]
6122
6125
  );
6123
- const [expanded, setExpandedState] = (0, import_react16.useState)(() => readExpanded(stableOptions));
6124
- const setExpanded = (0, import_react16.useCallback)((nextExpanded) => {
6126
+ const [expanded, setExpandedState] = (0, import_react17.useState)(() => readExpanded(stableOptions));
6127
+ const setExpanded = (0, import_react17.useCallback)((nextExpanded) => {
6125
6128
  setExpandedState(nextExpanded);
6126
6129
  const serialized = nextExpanded ? "expanded" : "collapsed";
6127
6130
  writeStorage(SIDEBAR_STORAGE_KEY, serialized);
@@ -6130,7 +6133,7 @@ function useStreamoidSidebarPreference(options = {}) {
6130
6133
  );
6131
6134
  writeCookie(SIDEBAR_COOKIE, serialized);
6132
6135
  }, [stableOptions]);
6133
- const toggle = (0, import_react16.useCallback)(() => {
6136
+ const toggle = (0, import_react17.useCallback)(() => {
6134
6137
  setExpandedState((current) => {
6135
6138
  const next = !current;
6136
6139
  const serialized = next ? "expanded" : "collapsed";
@@ -6142,7 +6145,7 @@ function useStreamoidSidebarPreference(options = {}) {
6142
6145
  return next;
6143
6146
  });
6144
6147
  }, [stableOptions]);
6145
- (0, import_react16.useEffect)(() => {
6148
+ (0, import_react17.useEffect)(() => {
6146
6149
  const serialized = expanded ? "expanded" : "collapsed";
6147
6150
  writeStorage(SIDEBAR_STORAGE_KEY, serialized);
6148
6151
  stableOptions.legacyCollapsedKeys.forEach(
@@ -6150,7 +6153,7 @@ function useStreamoidSidebarPreference(options = {}) {
6150
6153
  );
6151
6154
  writeCookie(SIDEBAR_COOKIE, serialized);
6152
6155
  }, [expanded, stableOptions]);
6153
- (0, import_react16.useEffect)(() => {
6156
+ (0, import_react17.useEffect)(() => {
6154
6157
  if (!canUseDom()) return;
6155
6158
  const sync = () => setExpandedState(readExpanded(stableOptions));
6156
6159
  const onStorage = (event) => {
@@ -6169,7 +6172,7 @@ function useStreamoidSidebarPreference(options = {}) {
6169
6172
  }
6170
6173
 
6171
6174
  // src/SC-SidebarShell/useStreamoidAnchoredPopoverPosition.ts
6172
- var import_react17 = require("react");
6175
+ var import_react18 = require("react");
6173
6176
  var ARROW_EDGE_INSET = 18;
6174
6177
  function resolveAnchoredPopoverArrow({
6175
6178
  anchor,
@@ -6224,7 +6227,7 @@ function useStreamoidAnchoredPopover(anchorRef, panelRef, {
6224
6227
  inset = DEFAULT_INSET,
6225
6228
  alignRef
6226
6229
  }) {
6227
- const [state, setState] = (0, import_react17.useState)({
6230
+ const [state, setState] = (0, import_react18.useState)({
6228
6231
  style: {
6229
6232
  position: "fixed",
6230
6233
  left: 0,
@@ -6236,7 +6239,7 @@ function useStreamoidAnchoredPopover(anchorRef, panelRef, {
6236
6239
  },
6237
6240
  arrow: null
6238
6241
  });
6239
- (0, import_react17.useLayoutEffect)(() => {
6242
+ (0, import_react18.useLayoutEffect)(() => {
6240
6243
  const anchor = anchorRef.current;
6241
6244
  if (!anchor || typeof window === "undefined") return;
6242
6245
  const measure = () => {
@@ -6287,7 +6290,7 @@ function useStreamoidAnchoredPopover(anchorRef, panelRef, {
6287
6290
  return state;
6288
6291
  }
6289
6292
  function useStreamoidAnchoredPopoverPosition(anchorRef, panelRef, { width, gap = DEFAULT_GAP, inset = DEFAULT_INSET }) {
6290
- const [position, setPosition] = (0, import_react17.useState)({
6293
+ const [position, setPosition] = (0, import_react18.useState)({
6291
6294
  position: "fixed",
6292
6295
  left: 0,
6293
6296
  top: 0,
@@ -6296,7 +6299,7 @@ function useStreamoidAnchoredPopoverPosition(anchorRef, panelRef, { width, gap =
6296
6299
  maxHeight: `calc(100dvh - ${inset * 2}px)`,
6297
6300
  visibility: "hidden"
6298
6301
  });
6299
- (0, import_react17.useLayoutEffect)(() => {
6302
+ (0, import_react18.useLayoutEffect)(() => {
6300
6303
  const anchor = anchorRef.current;
6301
6304
  if (!anchor || typeof window === "undefined") return;
6302
6305
  const measure = () => {
@@ -6340,7 +6343,7 @@ function useStreamoidAnchoredPopoverPosition(anchorRef, panelRef, { width, gap =
6340
6343
  }
6341
6344
 
6342
6345
  // src/SC-SidebarShell/useStreamoidSidebarPopoverPosition.ts
6343
- var import_react18 = require("react");
6346
+ var import_react19 = require("react");
6344
6347
  var VIEWPORT_INSET = 16;
6345
6348
  function useStreamoidSidebarPopoverPosition(sidebarRef, {
6346
6349
  placement,
@@ -6348,7 +6351,7 @@ function useStreamoidSidebarPopoverPosition(sidebarRef, {
6348
6351
  gap = 8,
6349
6352
  inset = 0
6350
6353
  }) {
6351
- const [position, setPosition] = (0, import_react18.useState)({
6354
+ const [position, setPosition] = (0, import_react19.useState)({
6352
6355
  position: "fixed",
6353
6356
  left: 0,
6354
6357
  top: 0,
@@ -6357,7 +6360,7 @@ function useStreamoidSidebarPopoverPosition(sidebarRef, {
6357
6360
  maxHeight: `calc(100dvh - ${VIEWPORT_INSET * 2}px)`,
6358
6361
  visibility: "hidden"
6359
6362
  });
6360
- (0, import_react18.useLayoutEffect)(() => {
6363
+ (0, import_react19.useLayoutEffect)(() => {
6361
6364
  const sidebar = sidebarRef.current;
6362
6365
  if (!sidebar || typeof window === "undefined") return;
6363
6366
  const findCard = () => (sidebar.matches("[data-streamoid-sidebar-card]") ? sidebar : sidebar.querySelector(
@@ -6418,7 +6421,7 @@ function useStreamoidSidebarPopoverPosition(sidebarRef, {
6418
6421
  }
6419
6422
 
6420
6423
  // src/SC-SidebarShell/ScSidebarPopover.tsx
6421
- var import_react19 = require("react");
6424
+ var import_react20 = require("react");
6422
6425
  var import_react_dom = require("react-dom");
6423
6426
  var import_jsx_runtime55 = require("react/jsx-runtime");
6424
6427
  var SURFACE = "var(--sc-sidebar-popover-surface, var(--alias-surface-base, #101010))";
@@ -6433,16 +6436,17 @@ function ScSidebarPopover({
6433
6436
  role = "menu",
6434
6437
  ariaLabel,
6435
6438
  testId,
6439
+ backdrop = true,
6436
6440
  className,
6437
6441
  style
6438
6442
  }) {
6439
- const panelRef = (0, import_react19.useRef)(null);
6443
+ const panelRef = (0, import_react20.useRef)(null);
6440
6444
  const { style: position, arrow } = useStreamoidAnchoredPopover(
6441
6445
  anchorRef,
6442
6446
  panelRef,
6443
6447
  { width, alignRef }
6444
6448
  );
6445
- (0, import_react19.useEffect)(() => {
6449
+ (0, import_react20.useEffect)(() => {
6446
6450
  const onKeyDown = (event) => {
6447
6451
  if (event.key === "Escape") onClose();
6448
6452
  };
@@ -6450,47 +6454,50 @@ function ScSidebarPopover({
6450
6454
  return () => document.removeEventListener("keydown", onKeyDown);
6451
6455
  }, [onClose]);
6452
6456
  if (typeof document === "undefined") return null;
6457
+ const panel = /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
6458
+ "div",
6459
+ {
6460
+ ref: panelRef,
6461
+ onMouseDown: (event) => event.stopPropagation(),
6462
+ role,
6463
+ "aria-label": ariaLabel,
6464
+ "data-testid": testId,
6465
+ className,
6466
+ style: {
6467
+ ...position,
6468
+ backgroundColor: SURFACE,
6469
+ border: `1px solid ${BORDER}`,
6470
+ borderRadius: RADIUS,
6471
+ boxShadow: "var(--sc-sidebar-popover-shadow, 0 12px 32px rgba(0, 0, 0, 0.24))",
6472
+ zIndex: 50,
6473
+ ...style
6474
+ },
6475
+ children: [
6476
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ScPopoverArrow, { arrow, background: SURFACE, borderColor: BORDER }),
6477
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { style: { borderRadius: RADIUS, overflow: "hidden" }, children })
6478
+ ]
6479
+ }
6480
+ );
6453
6481
  return (0, import_react_dom.createPortal)(
6454
- /* The backdrop is what makes a click anywhere else dismiss this, without
6455
- a document-level listener that fires before the opening click has
6456
- finished and closes the popover as it opens. */
6457
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6458
- "div",
6459
- {
6460
- style: { position: "fixed", inset: 0, zIndex: 40 },
6461
- onMouseDown: onClose,
6462
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
6463
- "div",
6464
- {
6465
- ref: panelRef,
6466
- onMouseDown: (event) => event.stopPropagation(),
6467
- role,
6468
- "aria-label": ariaLabel,
6469
- "data-testid": testId,
6470
- className,
6471
- style: {
6472
- ...position,
6473
- backgroundColor: SURFACE,
6474
- border: `1px solid ${BORDER}`,
6475
- borderRadius: RADIUS,
6476
- boxShadow: "var(--sc-sidebar-popover-shadow, 0 12px 32px rgba(0, 0, 0, 0.24))",
6477
- zIndex: 50,
6478
- ...style
6479
- },
6480
- children: [
6481
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ScPopoverArrow, { arrow, background: SURFACE, borderColor: BORDER }),
6482
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { style: { borderRadius: RADIUS, overflow: "hidden" }, children })
6483
- ]
6484
- }
6485
- )
6486
- }
6487
- ),
6482
+ backdrop ? (
6483
+ /* The catcher is what makes a click anywhere else dismiss this, without
6484
+ a document-level listener that fires before the opening click has
6485
+ finished and closes the popover as it opens. */
6486
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6487
+ "div",
6488
+ {
6489
+ style: { position: "fixed", inset: 0, zIndex: 40 },
6490
+ onMouseDown: onClose,
6491
+ children: panel
6492
+ }
6493
+ )
6494
+ ) : panel,
6488
6495
  document.body
6489
6496
  );
6490
6497
  }
6491
6498
 
6492
6499
  // src/SC-Artifax-Sidebar/ScArtifaxSidebar.tsx
6493
- var import_react20 = require("react");
6500
+ var import_react21 = require("react");
6494
6501
 
6495
6502
  // src/SC-Artifax-Sidebar/ScArtifaxSidebar.module.css
6496
6503
  var ScArtifaxSidebar_default = {
@@ -6606,8 +6613,8 @@ function SidebarHeader({
6606
6613
  );
6607
6614
  }
6608
6615
  function useScrolled() {
6609
- const [scrolled, setScrolled] = (0, import_react20.useState)(false);
6610
- const onScroll = (0, import_react20.useCallback)((event) => {
6616
+ const [scrolled, setScrolled] = (0, import_react21.useState)(false);
6617
+ const onScroll = (0, import_react21.useCallback)((event) => {
6611
6618
  const next = event.currentTarget.scrollTop > 0;
6612
6619
  setScrolled((prev) => prev === next ? prev : next);
6613
6620
  }, []);
@@ -6648,7 +6655,7 @@ var ScAppSidebar = ({
6648
6655
  };
6649
6656
  const isControlled = !!openSections;
6650
6657
  const { scrolled, onScroll } = useScrolled();
6651
- const [internalOpen, setInternalOpen] = (0, import_react20.useState)(
6658
+ const [internalOpen, setInternalOpen] = (0, import_react21.useState)(
6652
6659
  () => {
6653
6660
  const init = {};
6654
6661
  sections.forEach((s) => {
@@ -6658,7 +6665,7 @@ var ScAppSidebar = ({
6658
6665
  }
6659
6666
  );
6660
6667
  const isSectionOpen = (id) => isControlled ? !!openSections?.[id] : !!internalOpen[id];
6661
- const handleSectionToggle = (0, import_react20.useCallback)(
6668
+ const handleSectionToggle = (0, import_react21.useCallback)(
6662
6669
  (id) => {
6663
6670
  const next = !isSectionOpen(id);
6664
6671
  if (isControlled) {
@@ -6892,7 +6899,7 @@ var ScAppSidebar = ({
6892
6899
  var ScArtifaxSidebar = ScAppSidebar;
6893
6900
 
6894
6901
  // src/SC-Catalogix-Sidebar/ScCatalogixSidebar.tsx
6895
- var import_react21 = require("react");
6902
+ var import_react22 = require("react");
6896
6903
 
6897
6904
  // src/SC-Sidebar Switch menu/ScSidebarSwitchMenu.module.css
6898
6905
  var ScSidebarSwitchMenu_default = {
@@ -7534,7 +7541,7 @@ var ScCatalogixSidebar = ({
7534
7541
  className,
7535
7542
  style
7536
7543
  }) => {
7537
- const [appListOpen, setAppListOpen] = (0, import_react21.useState)(false);
7544
+ const [appListOpen, setAppListOpen] = (0, import_react22.useState)(false);
7538
7545
  const handleSwitch = () => {
7539
7546
  setAppListOpen((prev) => !prev);
7540
7547
  onLogoClick?.();
@@ -7777,7 +7784,7 @@ var ScSlider = ({
7777
7784
  };
7778
7785
 
7779
7786
  // src/SC-WorkspaceSwitcher/streamoid-workspace-switcher.tsx
7780
- var import_react22 = require("react");
7787
+ var import_react23 = require("react");
7781
7788
  var import_icons42 = require("@streamoid/icons");
7782
7789
  var import_jsx_runtime63 = require("react/jsx-runtime");
7783
7790
  var PRIMARY_ICON = "var(--alias-text---icons-primary)";
@@ -7968,12 +7975,12 @@ function StreamoidWorkspaceSwitcher({
7968
7975
  onSwitchWorkspace,
7969
7976
  config
7970
7977
  }) {
7971
- const modalRef = (0, import_react22.useRef)(null);
7978
+ const modalRef = (0, import_react23.useRef)(null);
7972
7979
  const title = config?.title || "Switch workspace";
7973
7980
  const loadingText = config?.loadingText || "Loading workspaces\u2026";
7974
7981
  const currentWorkspaceText = config?.currentWorkspaceText || "Current workspace";
7975
7982
  const switchWorkspaceText = config?.switchWorkspaceText || "Switch workspace";
7976
- (0, import_react22.useEffect)(() => {
7983
+ (0, import_react23.useEffect)(() => {
7977
7984
  if (!open) return;
7978
7985
  function handleKeyDown(e) {
7979
7986
  if (e.key === "Escape") onClose();
@@ -9384,7 +9391,7 @@ var ScWorkspaceCard = ({
9384
9391
  };
9385
9392
 
9386
9393
  // src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
9387
- var import_react23 = require("react");
9394
+ var import_react24 = require("react");
9388
9395
  var import_icons62 = require("@streamoid/icons");
9389
9396
 
9390
9397
  // src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.module.css
@@ -9425,7 +9432,7 @@ function ScWorkspaceSwitchCard({
9425
9432
  onSettings,
9426
9433
  onLeave
9427
9434
  }) {
9428
- const [internalHover, setInternalHover] = (0, import_react23.useState)(false);
9435
+ const [internalHover, setInternalHover] = (0, import_react24.useState)(false);
9429
9436
  const isHover = hover !== void 0 ? hover : internalHover;
9430
9437
  const isCurrent = type === "currentWS";
9431
9438
  const isOther = type === "otherWS";
@@ -9553,7 +9560,7 @@ function ScWorkspaceSwitchCard({
9553
9560
  var NscWorkspaceSwitch = ScWorkspaceSwitchCard;
9554
9561
 
9555
9562
  // src/SC-Modal/ScModal.tsx
9556
- var import_react24 = require("react");
9563
+ var import_react25 = require("react");
9557
9564
  var import_react_dom2 = require("react-dom");
9558
9565
 
9559
9566
  // src/SC-Modal/ScModal.module.css
@@ -9575,7 +9582,7 @@ var ScModal = ({
9575
9582
  closeOnBackdrop = true,
9576
9583
  closeOnEsc = true
9577
9584
  }) => {
9578
- (0, import_react24.useEffect)(() => {
9585
+ (0, import_react25.useEffect)(() => {
9579
9586
  if (!open || !closeOnEsc) return;
9580
9587
  const onKey = (e) => {
9581
9588
  if (e.key === "Escape") onClose?.();
@@ -9608,7 +9615,7 @@ var ScModal = ({
9608
9615
  };
9609
9616
 
9610
9617
  // src/SC-Drawer/ScDrawer.tsx
9611
- var import_react25 = require("react");
9618
+ var import_react26 = require("react");
9612
9619
  var import_react_dom3 = require("react-dom");
9613
9620
 
9614
9621
  // src/SC-Drawer/ScDrawer.module.css
@@ -9636,8 +9643,8 @@ var ScDrawer = ({
9636
9643
  backdrop = false,
9637
9644
  zIndex
9638
9645
  }) => {
9639
- const panelRef = (0, import_react25.useRef)(null);
9640
- (0, import_react25.useEffect)(() => {
9646
+ const panelRef = (0, import_react26.useRef)(null);
9647
+ (0, import_react26.useEffect)(() => {
9641
9648
  if (!open) return;
9642
9649
  const onKey = (e) => {
9643
9650
  if (closeOnEsc && e.key === "Escape") onClose?.();
@@ -9735,7 +9742,7 @@ var ScTabs = ({
9735
9742
  };
9736
9743
 
9737
9744
  // src/SC-Counter/ScCounter.tsx
9738
- var import_react26 = require("react");
9745
+ var import_react27 = require("react");
9739
9746
  var import_icons63 = require("@streamoid/icons");
9740
9747
 
9741
9748
  // src/SC-Counter/ScCounter.module.css
@@ -9757,7 +9764,7 @@ var ScCounter = ({
9757
9764
  className,
9758
9765
  style
9759
9766
  }) => {
9760
- const [showInput, setShowInput] = (0, import_react26.useState)(false);
9767
+ const [showInput, setShowInput] = (0, import_react27.useState)(false);
9761
9768
  const set = (n) => {
9762
9769
  let v = n;
9763
9770
  if (min !== void 0) v = Math.max(min, v);
@@ -10846,7 +10853,7 @@ var ScSelectionList = ({
10846
10853
  };
10847
10854
 
10848
10855
  // src/SC-textArea/ScTextArea.tsx
10849
- var import_react27 = require("react");
10856
+ var import_react28 = require("react");
10850
10857
 
10851
10858
  // src/SC-textArea/ScTextArea.module.css
10852
10859
  var ScTextArea_default = {
@@ -10876,7 +10883,7 @@ var ScTextArea = ({
10876
10883
  style,
10877
10884
  ...props
10878
10885
  }) => {
10879
- const [focused, setFocused] = (0, import_react27.useState)(false);
10886
+ const [focused, setFocused] = (0, import_react28.useState)(false);
10880
10887
  const derivedState = state ?? (props.disabled ? "disabled" : focused ? "active" : (props.value !== void 0 ? String(props.value).length > 0 : false) ? "filled" : "default");
10881
10888
  const stateClass = ScTextArea_default["state-" + derivedState];
10882
10889
  const labelGroupClass = ScTextArea_default["label-group-" + (labelGroup || "none")];
@@ -10918,7 +10925,7 @@ var ScTextArea = ({
10918
10925
  };
10919
10926
 
10920
10927
  // src/SC-select/ScSelect.tsx
10921
- var import_react28 = require("react");
10928
+ var import_react29 = require("react");
10922
10929
 
10923
10930
  // src/SC-select/ScSelect.module.css
10924
10931
  var ScSelect_default = {
@@ -10955,9 +10962,9 @@ var ScSelect = (props) => {
10955
10962
  disabled = false,
10956
10963
  className
10957
10964
  } = props;
10958
- const [open, setOpen] = (0, import_react28.useState)(false);
10959
- const rootRef = (0, import_react28.useRef)(null);
10960
- (0, import_react28.useEffect)(() => {
10965
+ const [open, setOpen] = (0, import_react29.useState)(false);
10966
+ const rootRef = (0, import_react29.useRef)(null);
10967
+ (0, import_react29.useEffect)(() => {
10961
10968
  if (!open) return;
10962
10969
  const handleClick = (e) => {
10963
10970
  if (rootRef.current && !rootRef.current.contains(e.target)) {
@@ -11048,7 +11055,7 @@ var ScSelect = (props) => {
11048
11055
  };
11049
11056
 
11050
11057
  // src/SC-fileField/ScFileField.tsx
11051
- var import_react29 = require("react");
11058
+ var import_react30 = require("react");
11052
11059
 
11053
11060
  // src/SC-fileField/ScFileField.module.css
11054
11061
  var ScFileField_default = {
@@ -11086,7 +11093,7 @@ var ScFileField = (props) => {
11086
11093
  label,
11087
11094
  className
11088
11095
  } = props;
11089
- const inputRef = (0, import_react29.useRef)(null);
11096
+ const inputRef = (0, import_react30.useRef)(null);
11090
11097
  const hasFile = Boolean(fileName);
11091
11098
  const isUploading = Boolean(uploading);
11092
11099
  const clampedProgress = Math.max(0, Math.min(100, progress));
@@ -11205,7 +11212,7 @@ var ScFileField = (props) => {
11205
11212
  };
11206
11213
 
11207
11214
  // src/SC-mediaApproval/ScMediaApproval.tsx
11208
- var import_react30 = require("react");
11215
+ var import_react31 = require("react");
11209
11216
 
11210
11217
  // src/SC-mediaApproval/ScMediaApproval.module.css
11211
11218
  var ScMediaApproval_default = {
@@ -11252,9 +11259,9 @@ var ScMediaApproval = (props) => {
11252
11259
  className
11253
11260
  } = props;
11254
11261
  const total = mediaUrls.length;
11255
- const [index, setIndex] = (0, import_react30.useState)(activeIndex ?? 0);
11256
- const [mediaLoading, setMediaLoading] = (0, import_react30.useState)(false);
11257
- (0, import_react30.useEffect)(() => {
11262
+ const [index, setIndex] = (0, import_react31.useState)(activeIndex ?? 0);
11263
+ const [mediaLoading, setMediaLoading] = (0, import_react31.useState)(false);
11264
+ (0, import_react31.useEffect)(() => {
11258
11265
  if (typeof activeIndex === "number") {
11259
11266
  setIndex(activeIndex);
11260
11267
  }
@@ -11389,7 +11396,7 @@ var ScMediaApproval = (props) => {
11389
11396
  };
11390
11397
 
11391
11398
  // src/SC-mediaSelect/ScMediaSelect.tsx
11392
- var import_react31 = require("react");
11399
+ var import_react32 = require("react");
11393
11400
 
11394
11401
  // src/SC-mediaSelect/ScMediaSelect.module.css
11395
11402
  var ScMediaSelect_default = {
@@ -11445,7 +11452,7 @@ var ScMediaSelect = (props) => {
11445
11452
  } = props;
11446
11453
  const total = items.length;
11447
11454
  const resolvedMax = typeof max === "number" ? max : total;
11448
- const selectedSet = (0, import_react31.useMemo)(() => new Set(selected), [selected]);
11455
+ const selectedSet = (0, import_react32.useMemo)(() => new Set(selected), [selected]);
11449
11456
  const selectedCount = selectedSet.size;
11450
11457
  let countLabel = selectedCount + " of " + total + " selected";
11451
11458
  if (min > 0) countLabel += " (min " + min + ")";
@@ -11514,7 +11521,7 @@ var ScMediaSelect = (props) => {
11514
11521
  };
11515
11522
 
11516
11523
  // src/SC-todoList/ScTodoList.tsx
11517
- var import_react32 = require("react");
11524
+ var import_react33 = require("react");
11518
11525
 
11519
11526
  // src/SC-todoList/ScTodoList.module.css
11520
11527
  var ScTodoList_default = {
@@ -11547,9 +11554,9 @@ var ScTodoList = ({
11547
11554
  addPlaceholder = "Add an item",
11548
11555
  className
11549
11556
  }) => {
11550
- const [editingId, setEditingId] = (0, import_react32.useState)(null);
11551
- const [editValue, setEditValue] = (0, import_react32.useState)("");
11552
- const [newValue, setNewValue] = (0, import_react32.useState)("");
11557
+ const [editingId, setEditingId] = (0, import_react33.useState)(null);
11558
+ const [editValue, setEditValue] = (0, import_react33.useState)("");
11559
+ const [newValue, setNewValue] = (0, import_react33.useState)("");
11553
11560
  const total = items.length;
11554
11561
  const completed = items.filter((i) => i.status === "completed").length;
11555
11562
  const startEditing = (item) => {
@@ -12403,7 +12410,7 @@ var ScWorkspaceSwitchMobileV2 = ({
12403
12410
  };
12404
12411
 
12405
12412
  // src/SC-imageField/ScImageField.tsx
12406
- var import_react33 = require("react");
12413
+ var import_react34 = require("react");
12407
12414
 
12408
12415
  // src/SC-imageField/ScImageField.module.css
12409
12416
  var ScImageField_default = {
@@ -12430,7 +12437,7 @@ var ScImageField = ({
12430
12437
  onRemove,
12431
12438
  className
12432
12439
  }) => {
12433
- const inputRef = (0, import_react33.useRef)(null);
12440
+ const inputRef = (0, import_react34.useRef)(null);
12434
12441
  const hasImage = !!imagePreview;
12435
12442
  function handleClick() {
12436
12443
  if (!hasImage) {
@@ -12666,7 +12673,7 @@ var ScPlanDetailsCardMobile = ({
12666
12673
  };
12667
12674
 
12668
12675
  // src/SC-ProfilePopup/ScProfilePopup.tsx
12669
- var import_react34 = require("react");
12676
+ var import_react35 = require("react");
12670
12677
 
12671
12678
  // src/SC-ProfilePopup/ScProfilePopup.module.css
12672
12679
  var ScProfilePopup_default = {
@@ -12700,7 +12707,7 @@ var activateOnKey = (handler) => (event) => {
12700
12707
  handler();
12701
12708
  }
12702
12709
  };
12703
- var ScProfilePopup = (0, import_react34.forwardRef)(
12710
+ var ScProfilePopup = (0, import_react35.forwardRef)(
12704
12711
  ({
12705
12712
  name = "Chris Hemsworth",
12706
12713
  email = "chris@kepler.com",
package/dist/index.mjs CHANGED
@@ -5433,6 +5433,7 @@ function StreamoidSidebar({
5433
5433
  }
5434
5434
 
5435
5435
  // src/SC-SidebarShell/ScSidebarShell.tsx
5436
+ import { forwardRef as forwardRef2 } from "react";
5436
5437
  import {
5437
5438
  SiconBilling as SiconBilling4,
5438
5439
  SiconDark as SiconDark2,
@@ -5483,7 +5484,7 @@ var ScSidebarShell_default = {
5483
5484
 
5484
5485
  // src/SC-SidebarShell/ScSidebarShell.tsx
5485
5486
  import { Fragment as Fragment16, jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
5486
- function ScSidebarWorkspaceTrigger({
5487
+ var ScSidebarWorkspaceTrigger = forwardRef2(function ScSidebarWorkspaceTrigger2({
5487
5488
  workspaceName,
5488
5489
  workspaceImage,
5489
5490
  expanded,
@@ -5491,11 +5492,12 @@ function ScSidebarWorkspaceTrigger({
5491
5492
  onClick,
5492
5493
  className,
5493
5494
  style
5494
- }) {
5495
+ }, ref) {
5495
5496
  const initial = (workspaceName || "W").charAt(0).toUpperCase();
5496
5497
  return /* @__PURE__ */ jsxs42(
5497
5498
  "button",
5498
5499
  {
5500
+ ref,
5499
5501
  type: "button",
5500
5502
  "aria-label": `Open ${workspaceName} workspace menu`,
5501
5503
  "aria-expanded": open,
@@ -5527,7 +5529,7 @@ function ScSidebarWorkspaceTrigger({
5527
5529
  ]
5528
5530
  }
5529
5531
  );
5530
- }
5532
+ });
5531
5533
  function ScSidebarSearchTrigger({
5532
5534
  expanded,
5533
5535
  label = "Search or Ask CXO",
@@ -5570,18 +5572,19 @@ var COMPACT_APP_LABELS = {
5570
5572
  catalogix: "Ca",
5571
5573
  photogenix: "Ph"
5572
5574
  };
5573
- function ScSidebarAppIdentity({
5575
+ var ScSidebarAppIdentity = forwardRef2(function ScSidebarAppIdentity2({
5574
5576
  expanded,
5575
5577
  product = "streamoid",
5576
5578
  collapsedLabel,
5577
5579
  collapsedMark,
5578
5580
  label,
5579
5581
  className
5580
- }) {
5582
+ }, ref) {
5581
5583
  const appLabel = label ?? (product === "streamoid" ? "Streamoid" : product);
5582
5584
  return /* @__PURE__ */ jsx53(
5583
5585
  "span",
5584
5586
  {
5587
+ ref,
5585
5588
  "aria-label": `Switch Apps. Current app: ${appLabel}`,
5586
5589
  title: "Switch Apps",
5587
5590
  className: `${ScSidebarShell_default.appIdentity} ${expanded ? ScSidebarShell_default.appIdentityExpanded : ScSidebarShell_default.appIdentityCollapsed}${className ? ` ${className}` : ""}`,
@@ -5597,7 +5600,7 @@ function ScSidebarAppIdentity({
5597
5600
  ] }) : collapsedMark ?? (product === "streamoid" ? /* @__PURE__ */ jsx53(ScStreamoidMascot, { size: 40 }) : /* @__PURE__ */ jsx53("span", { "aria-hidden": true, className: ScSidebarShell_default.collapsedProductMark, children: collapsedLabel ?? COMPACT_APP_LABELS[product] }))
5598
5601
  }
5599
5602
  );
5600
- }
5603
+ });
5601
5604
  function MenuActionRow({
5602
5605
  icon,
5603
5606
  label,
@@ -6258,6 +6261,7 @@ function ScSidebarPopover({
6258
6261
  role = "menu",
6259
6262
  ariaLabel,
6260
6263
  testId,
6264
+ backdrop = true,
6261
6265
  className,
6262
6266
  style
6263
6267
  }) {
@@ -6275,41 +6279,44 @@ function ScSidebarPopover({
6275
6279
  return () => document.removeEventListener("keydown", onKeyDown);
6276
6280
  }, [onClose]);
6277
6281
  if (typeof document === "undefined") return null;
6282
+ const panel = /* @__PURE__ */ jsxs43(
6283
+ "div",
6284
+ {
6285
+ ref: panelRef,
6286
+ onMouseDown: (event) => event.stopPropagation(),
6287
+ role,
6288
+ "aria-label": ariaLabel,
6289
+ "data-testid": testId,
6290
+ className,
6291
+ style: {
6292
+ ...position,
6293
+ backgroundColor: SURFACE,
6294
+ border: `1px solid ${BORDER}`,
6295
+ borderRadius: RADIUS,
6296
+ boxShadow: "var(--sc-sidebar-popover-shadow, 0 12px 32px rgba(0, 0, 0, 0.24))",
6297
+ zIndex: 50,
6298
+ ...style
6299
+ },
6300
+ children: [
6301
+ /* @__PURE__ */ jsx54(ScPopoverArrow, { arrow, background: SURFACE, borderColor: BORDER }),
6302
+ /* @__PURE__ */ jsx54("div", { style: { borderRadius: RADIUS, overflow: "hidden" }, children })
6303
+ ]
6304
+ }
6305
+ );
6278
6306
  return createPortal(
6279
- /* The backdrop is what makes a click anywhere else dismiss this, without
6280
- a document-level listener that fires before the opening click has
6281
- finished and closes the popover as it opens. */
6282
- /* @__PURE__ */ jsx54(
6283
- "div",
6284
- {
6285
- style: { position: "fixed", inset: 0, zIndex: 40 },
6286
- onMouseDown: onClose,
6287
- children: /* @__PURE__ */ jsxs43(
6288
- "div",
6289
- {
6290
- ref: panelRef,
6291
- onMouseDown: (event) => event.stopPropagation(),
6292
- role,
6293
- "aria-label": ariaLabel,
6294
- "data-testid": testId,
6295
- className,
6296
- style: {
6297
- ...position,
6298
- backgroundColor: SURFACE,
6299
- border: `1px solid ${BORDER}`,
6300
- borderRadius: RADIUS,
6301
- boxShadow: "var(--sc-sidebar-popover-shadow, 0 12px 32px rgba(0, 0, 0, 0.24))",
6302
- zIndex: 50,
6303
- ...style
6304
- },
6305
- children: [
6306
- /* @__PURE__ */ jsx54(ScPopoverArrow, { arrow, background: SURFACE, borderColor: BORDER }),
6307
- /* @__PURE__ */ jsx54("div", { style: { borderRadius: RADIUS, overflow: "hidden" }, children })
6308
- ]
6309
- }
6310
- )
6311
- }
6312
- ),
6307
+ backdrop ? (
6308
+ /* The catcher is what makes a click anywhere else dismiss this, without
6309
+ a document-level listener that fires before the opening click has
6310
+ finished and closes the popover as it opens. */
6311
+ /* @__PURE__ */ jsx54(
6312
+ "div",
6313
+ {
6314
+ style: { position: "fixed", inset: 0, zIndex: 40 },
6315
+ onMouseDown: onClose,
6316
+ children: panel
6317
+ }
6318
+ )
6319
+ ) : panel,
6313
6320
  document.body
6314
6321
  );
6315
6322
  }
@@ -12516,7 +12523,7 @@ var ScPlanDetailsCardMobile = ({
12516
12523
  };
12517
12524
 
12518
12525
  // src/SC-ProfilePopup/ScProfilePopup.tsx
12519
- import { forwardRef as forwardRef2 } from "react";
12526
+ import { forwardRef as forwardRef3 } from "react";
12520
12527
 
12521
12528
  // src/SC-ProfilePopup/ScProfilePopup.module.css
12522
12529
  var ScProfilePopup_default = {
@@ -12561,7 +12568,7 @@ var activateOnKey = (handler) => (event) => {
12561
12568
  handler();
12562
12569
  }
12563
12570
  };
12564
- var ScProfilePopup = forwardRef2(
12571
+ var ScProfilePopup = forwardRef3(
12565
12572
  ({
12566
12573
  name = "Chris Hemsworth",
12567
12574
  email = "chris@kepler.com",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamoid/ui",
3
- "version": "0.6.52",
3
+ "version": "0.6.54",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",