@streamoid/ui 0.6.52 → 0.6.53
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 +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +38 -34
- package/dist/index.mjs +38 -34
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1187,10 +1187,18 @@ interface IScSidebarPopoverProps {
|
|
|
1187
1187
|
role?: string;
|
|
1188
1188
|
ariaLabel?: string;
|
|
1189
1189
|
testId?: string;
|
|
1190
|
+
/** Render the dismiss catcher. On by default.
|
|
1191
|
+
*
|
|
1192
|
+
* Pass `false` when the host already has its own outside-click handling and
|
|
1193
|
+
* that handling is ANCHOR-AWARE. A catcher covers the trigger too, so a
|
|
1194
|
+
* press on the trigger closes the panel and the trailing click then reopens
|
|
1195
|
+
* it — the flicker Tactix's switcher was written to avoid. Escape still
|
|
1196
|
+
* works either way. */
|
|
1197
|
+
backdrop?: boolean;
|
|
1190
1198
|
className?: string;
|
|
1191
1199
|
style?: CSSProperties;
|
|
1192
1200
|
}
|
|
1193
|
-
declare function ScSidebarPopover({ anchorRef, alignRef, width, onClose, children, role, ariaLabel, testId, className, style, }: IScSidebarPopoverProps): React$1.ReactPortal | null;
|
|
1201
|
+
declare function ScSidebarPopover({ anchorRef, alignRef, width, onClose, children, role, ariaLabel, testId, backdrop, className, style, }: IScSidebarPopoverProps): React$1.ReactPortal | null;
|
|
1194
1202
|
|
|
1195
1203
|
interface AppSidebarMenuItem {
|
|
1196
1204
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1187,10 +1187,18 @@ interface IScSidebarPopoverProps {
|
|
|
1187
1187
|
role?: string;
|
|
1188
1188
|
ariaLabel?: string;
|
|
1189
1189
|
testId?: string;
|
|
1190
|
+
/** Render the dismiss catcher. On by default.
|
|
1191
|
+
*
|
|
1192
|
+
* Pass `false` when the host already has its own outside-click handling and
|
|
1193
|
+
* that handling is ANCHOR-AWARE. A catcher covers the trigger too, so a
|
|
1194
|
+
* press on the trigger closes the panel and the trailing click then reopens
|
|
1195
|
+
* it — the flicker Tactix's switcher was written to avoid. Escape still
|
|
1196
|
+
* works either way. */
|
|
1197
|
+
backdrop?: boolean;
|
|
1190
1198
|
className?: string;
|
|
1191
1199
|
style?: CSSProperties;
|
|
1192
1200
|
}
|
|
1193
|
-
declare function ScSidebarPopover({ anchorRef, alignRef, width, onClose, children, role, ariaLabel, testId, className, style, }: IScSidebarPopoverProps): React$1.ReactPortal | null;
|
|
1201
|
+
declare function ScSidebarPopover({ anchorRef, alignRef, width, onClose, children, role, ariaLabel, testId, backdrop, className, style, }: IScSidebarPopoverProps): React$1.ReactPortal | null;
|
|
1194
1202
|
|
|
1195
1203
|
interface AppSidebarMenuItem {
|
|
1196
1204
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -6433,6 +6433,7 @@ function ScSidebarPopover({
|
|
|
6433
6433
|
role = "menu",
|
|
6434
6434
|
ariaLabel,
|
|
6435
6435
|
testId,
|
|
6436
|
+
backdrop = true,
|
|
6436
6437
|
className,
|
|
6437
6438
|
style
|
|
6438
6439
|
}) {
|
|
@@ -6450,41 +6451,44 @@ function ScSidebarPopover({
|
|
|
6450
6451
|
return () => document.removeEventListener("keydown", onKeyDown);
|
|
6451
6452
|
}, [onClose]);
|
|
6452
6453
|
if (typeof document === "undefined") return null;
|
|
6454
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
6455
|
+
"div",
|
|
6456
|
+
{
|
|
6457
|
+
ref: panelRef,
|
|
6458
|
+
onMouseDown: (event) => event.stopPropagation(),
|
|
6459
|
+
role,
|
|
6460
|
+
"aria-label": ariaLabel,
|
|
6461
|
+
"data-testid": testId,
|
|
6462
|
+
className,
|
|
6463
|
+
style: {
|
|
6464
|
+
...position,
|
|
6465
|
+
backgroundColor: SURFACE,
|
|
6466
|
+
border: `1px solid ${BORDER}`,
|
|
6467
|
+
borderRadius: RADIUS,
|
|
6468
|
+
boxShadow: "var(--sc-sidebar-popover-shadow, 0 12px 32px rgba(0, 0, 0, 0.24))",
|
|
6469
|
+
zIndex: 50,
|
|
6470
|
+
...style
|
|
6471
|
+
},
|
|
6472
|
+
children: [
|
|
6473
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ScPopoverArrow, { arrow, background: SURFACE, borderColor: BORDER }),
|
|
6474
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { style: { borderRadius: RADIUS, overflow: "hidden" }, children })
|
|
6475
|
+
]
|
|
6476
|
+
}
|
|
6477
|
+
);
|
|
6453
6478
|
return (0, import_react_dom.createPortal)(
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
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
|
-
),
|
|
6479
|
+
backdrop ? (
|
|
6480
|
+
/* The catcher is what makes a click anywhere else dismiss this, without
|
|
6481
|
+
a document-level listener that fires before the opening click has
|
|
6482
|
+
finished and closes the popover as it opens. */
|
|
6483
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6484
|
+
"div",
|
|
6485
|
+
{
|
|
6486
|
+
style: { position: "fixed", inset: 0, zIndex: 40 },
|
|
6487
|
+
onMouseDown: onClose,
|
|
6488
|
+
children: panel
|
|
6489
|
+
}
|
|
6490
|
+
)
|
|
6491
|
+
) : panel,
|
|
6488
6492
|
document.body
|
|
6489
6493
|
);
|
|
6490
6494
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -6258,6 +6258,7 @@ function ScSidebarPopover({
|
|
|
6258
6258
|
role = "menu",
|
|
6259
6259
|
ariaLabel,
|
|
6260
6260
|
testId,
|
|
6261
|
+
backdrop = true,
|
|
6261
6262
|
className,
|
|
6262
6263
|
style
|
|
6263
6264
|
}) {
|
|
@@ -6275,41 +6276,44 @@ function ScSidebarPopover({
|
|
|
6275
6276
|
return () => document.removeEventListener("keydown", onKeyDown);
|
|
6276
6277
|
}, [onClose]);
|
|
6277
6278
|
if (typeof document === "undefined") return null;
|
|
6279
|
+
const panel = /* @__PURE__ */ jsxs43(
|
|
6280
|
+
"div",
|
|
6281
|
+
{
|
|
6282
|
+
ref: panelRef,
|
|
6283
|
+
onMouseDown: (event) => event.stopPropagation(),
|
|
6284
|
+
role,
|
|
6285
|
+
"aria-label": ariaLabel,
|
|
6286
|
+
"data-testid": testId,
|
|
6287
|
+
className,
|
|
6288
|
+
style: {
|
|
6289
|
+
...position,
|
|
6290
|
+
backgroundColor: SURFACE,
|
|
6291
|
+
border: `1px solid ${BORDER}`,
|
|
6292
|
+
borderRadius: RADIUS,
|
|
6293
|
+
boxShadow: "var(--sc-sidebar-popover-shadow, 0 12px 32px rgba(0, 0, 0, 0.24))",
|
|
6294
|
+
zIndex: 50,
|
|
6295
|
+
...style
|
|
6296
|
+
},
|
|
6297
|
+
children: [
|
|
6298
|
+
/* @__PURE__ */ jsx54(ScPopoverArrow, { arrow, background: SURFACE, borderColor: BORDER }),
|
|
6299
|
+
/* @__PURE__ */ jsx54("div", { style: { borderRadius: RADIUS, overflow: "hidden" }, children })
|
|
6300
|
+
]
|
|
6301
|
+
}
|
|
6302
|
+
);
|
|
6278
6303
|
return createPortal(
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
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
|
-
),
|
|
6304
|
+
backdrop ? (
|
|
6305
|
+
/* The catcher is what makes a click anywhere else dismiss this, without
|
|
6306
|
+
a document-level listener that fires before the opening click has
|
|
6307
|
+
finished and closes the popover as it opens. */
|
|
6308
|
+
/* @__PURE__ */ jsx54(
|
|
6309
|
+
"div",
|
|
6310
|
+
{
|
|
6311
|
+
style: { position: "fixed", inset: 0, zIndex: 40 },
|
|
6312
|
+
onMouseDown: onClose,
|
|
6313
|
+
children: panel
|
|
6314
|
+
}
|
|
6315
|
+
)
|
|
6316
|
+
) : panel,
|
|
6313
6317
|
document.body
|
|
6314
6318
|
);
|
|
6315
6319
|
}
|