@embedreach/components 0.1.41 → 0.1.43
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/chunks/index.js +258 -199
- package/dist/index.umd.js +309 -250
- package/dist/styles.css +73 -69
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -4319,33 +4319,33 @@
|
|
|
4319
4319
|
}
|
|
4320
4320
|
function Portal$7(props) {
|
|
4321
4321
|
const { useShadow } = props, marker = document.createTextNode(""), mount = () => props.mount || document.body, owner = getOwner();
|
|
4322
|
-
let
|
|
4322
|
+
let content2;
|
|
4323
4323
|
let hydrating = !!sharedConfig.context;
|
|
4324
4324
|
createEffect(
|
|
4325
4325
|
() => {
|
|
4326
4326
|
if (hydrating)
|
|
4327
4327
|
getOwner().user = hydrating = false;
|
|
4328
|
-
|
|
4328
|
+
content2 || (content2 = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
4329
4329
|
const el = mount();
|
|
4330
4330
|
if (el instanceof HTMLHeadElement) {
|
|
4331
4331
|
const [clean, setClean] = createSignal(false);
|
|
4332
4332
|
const cleanup = () => setClean(true);
|
|
4333
|
-
createRoot((dispose2) => insert(el, () => !clean() ?
|
|
4333
|
+
createRoot((dispose2) => insert(el, () => !clean() ? content2() : dispose2(), null));
|
|
4334
4334
|
onCleanup(cleanup);
|
|
4335
4335
|
} else {
|
|
4336
|
-
const
|
|
4336
|
+
const container2 = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container2.attachShadow ? container2.attachShadow({
|
|
4337
4337
|
mode: "open"
|
|
4338
|
-
}) :
|
|
4339
|
-
Object.defineProperty(
|
|
4338
|
+
}) : container2;
|
|
4339
|
+
Object.defineProperty(container2, "_$host", {
|
|
4340
4340
|
get() {
|
|
4341
4341
|
return marker.parentNode;
|
|
4342
4342
|
},
|
|
4343
4343
|
configurable: true
|
|
4344
4344
|
});
|
|
4345
|
-
insert(renderRoot,
|
|
4346
|
-
el.appendChild(
|
|
4347
|
-
props.ref && props.ref(
|
|
4348
|
-
onCleanup(() => el.removeChild(
|
|
4345
|
+
insert(renderRoot, content2);
|
|
4346
|
+
el.appendChild(container2);
|
|
4347
|
+
props.ref && props.ref(container2);
|
|
4348
|
+
onCleanup(() => el.removeChild(container2));
|
|
4349
4349
|
}
|
|
4350
4350
|
},
|
|
4351
4351
|
void 0,
|
|
@@ -11153,7 +11153,7 @@
|
|
|
11153
11153
|
}
|
|
11154
11154
|
Browser.type = "languageDetector";
|
|
11155
11155
|
const ad_spend$1 = "Ad Spend";
|
|
11156
|
-
const date$
|
|
11156
|
+
const date$2 = "Date";
|
|
11157
11157
|
const close$1 = "Close";
|
|
11158
11158
|
const connected$1 = "Connected";
|
|
11159
11159
|
const connecting$1 = "Connecting...";
|
|
@@ -11540,7 +11540,7 @@
|
|
|
11540
11540
|
};
|
|
11541
11541
|
const enCommon = {
|
|
11542
11542
|
ad_spend: ad_spend$1,
|
|
11543
|
-
date: date$
|
|
11543
|
+
date: date$2,
|
|
11544
11544
|
close: close$1,
|
|
11545
11545
|
"continue": "Continue",
|
|
11546
11546
|
connected: connected$1,
|
|
@@ -11579,7 +11579,7 @@
|
|
|
11579
11579
|
empty_state: empty_state$1
|
|
11580
11580
|
};
|
|
11581
11581
|
const ad_spend = "Gasto en anuncios";
|
|
11582
|
-
const date = "Fecha";
|
|
11582
|
+
const date$1 = "Fecha";
|
|
11583
11583
|
const close = "Cerrar";
|
|
11584
11584
|
const connected = "Conectado";
|
|
11585
11585
|
const connecting = "Conectando...";
|
|
@@ -11966,7 +11966,7 @@
|
|
|
11966
11966
|
};
|
|
11967
11967
|
const esCommon = {
|
|
11968
11968
|
ad_spend,
|
|
11969
|
-
date,
|
|
11969
|
+
date: date$1,
|
|
11970
11970
|
close,
|
|
11971
11971
|
"continue": "Continuar",
|
|
11972
11972
|
connected,
|
|
@@ -12688,8 +12688,8 @@
|
|
|
12688
12688
|
const { container: containerProp, ...portalProps } = props;
|
|
12689
12689
|
const [mounted, setMounted] = React__namespace.useState(false);
|
|
12690
12690
|
useLayoutEffect2(() => setMounted(true), []);
|
|
12691
|
-
const
|
|
12692
|
-
return
|
|
12691
|
+
const container2 = containerProp || mounted && globalThis?.document?.body;
|
|
12692
|
+
return container2 ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { ...portalProps, ref: forwardedRef }), container2) : null;
|
|
12693
12693
|
});
|
|
12694
12694
|
Portal$6.displayName = PORTAL_NAME$7;
|
|
12695
12695
|
function useStateMachine(initialState, machine) {
|
|
@@ -13412,9 +13412,9 @@
|
|
|
13412
13412
|
}
|
|
13413
13413
|
);
|
|
13414
13414
|
});
|
|
13415
|
-
function getAnnounceTextContent(
|
|
13415
|
+
function getAnnounceTextContent(container2) {
|
|
13416
13416
|
const textContent = [];
|
|
13417
|
-
const childNodes = Array.from(
|
|
13417
|
+
const childNodes = Array.from(container2.childNodes);
|
|
13418
13418
|
childNodes.forEach((node) => {
|
|
13419
13419
|
if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent);
|
|
13420
13420
|
if (isHTMLElement$2(node)) {
|
|
@@ -13468,9 +13468,9 @@
|
|
|
13468
13468
|
function isHTMLElement$2(node) {
|
|
13469
13469
|
return node.nodeType === node.ELEMENT_NODE;
|
|
13470
13470
|
}
|
|
13471
|
-
function getTabbableCandidates$2(
|
|
13471
|
+
function getTabbableCandidates$2(container2) {
|
|
13472
13472
|
const nodes = [];
|
|
13473
|
-
const walker2 = document.createTreeWalker(
|
|
13473
|
+
const walker2 = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
13474
13474
|
acceptNode: (node) => {
|
|
13475
13475
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
13476
13476
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -13510,9 +13510,9 @@
|
|
|
13510
13510
|
}
|
|
13511
13511
|
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
13512
13512
|
const cx = clsx$1;
|
|
13513
|
-
const cva = (
|
|
13513
|
+
const cva = (base2, config) => (props) => {
|
|
13514
13514
|
var _config_compoundVariants;
|
|
13515
|
-
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(
|
|
13515
|
+
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base2, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
13516
13516
|
const { variants, defaultVariants } = config;
|
|
13517
13517
|
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
13518
13518
|
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
@@ -13546,7 +13546,7 @@
|
|
|
13546
13546
|
cvClassName
|
|
13547
13547
|
] : acc;
|
|
13548
13548
|
}, []);
|
|
13549
|
-
return cx(
|
|
13549
|
+
return cx(base2, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
13550
13550
|
};
|
|
13551
13551
|
/**
|
|
13552
13552
|
* @license lucide-react v0.464.0 - ISC
|
|
@@ -16559,11 +16559,11 @@
|
|
|
16559
16559
|
function Toaster() {
|
|
16560
16560
|
const { toasts } = useToast();
|
|
16561
16561
|
return /* @__PURE__ */ jsxRuntime.jsxs(ToastProvider, { children: [
|
|
16562
|
-
toasts.map(function({ id: id2, title, description, action, ...props }) {
|
|
16562
|
+
toasts.map(function({ id: id2, title: title2, description: description2, action, ...props }) {
|
|
16563
16563
|
return /* @__PURE__ */ jsxRuntime.jsxs(Toast, { ...props, children: [
|
|
16564
16564
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-1", children: [
|
|
16565
|
-
|
|
16566
|
-
|
|
16565
|
+
title2 && /* @__PURE__ */ jsxRuntime.jsx(ToastTitle, { children: title2 }),
|
|
16566
|
+
description2 && /* @__PURE__ */ jsxRuntime.jsx(ToastDescription, { children: description2 })
|
|
16567
16567
|
] }),
|
|
16568
16568
|
action,
|
|
16569
16569
|
/* @__PURE__ */ jsxRuntime.jsx(ToastClose, {})
|
|
@@ -24238,7 +24238,29 @@
|
|
|
24238
24238
|
}
|
|
24239
24239
|
return element.props.ref || element.ref;
|
|
24240
24240
|
}
|
|
24241
|
-
const
|
|
24241
|
+
const base$2 = "reach-styles-module__base___gfFyc";
|
|
24242
|
+
const destructive$2 = "reach-styles-module__destructive___XjBvS";
|
|
24243
|
+
const outline$2 = "reach-styles-module__outline___gFp3i";
|
|
24244
|
+
const secondary$2 = "reach-styles-module__secondary___Pd-e3";
|
|
24245
|
+
const ghost = "reach-styles-module__ghost___GcnJq";
|
|
24246
|
+
const link = "reach-styles-module__link___EgS2H";
|
|
24247
|
+
const sizeDefault$1 = "reach-styles-module__sizeDefault___8kU5A";
|
|
24248
|
+
const sizeSm$1 = "reach-styles-module__sizeSm___zPIEh";
|
|
24249
|
+
const sizeLg = "reach-styles-module__sizeLg___D2G8z";
|
|
24250
|
+
const sizeIcon = "reach-styles-module__sizeIcon___5XkYW";
|
|
24251
|
+
const styles$6 = {
|
|
24252
|
+
base: base$2,
|
|
24253
|
+
"default": "reach-styles-module__default___ny1h7",
|
|
24254
|
+
destructive: destructive$2,
|
|
24255
|
+
outline: outline$2,
|
|
24256
|
+
secondary: secondary$2,
|
|
24257
|
+
ghost,
|
|
24258
|
+
link,
|
|
24259
|
+
sizeDefault: sizeDefault$1,
|
|
24260
|
+
sizeSm: sizeSm$1,
|
|
24261
|
+
sizeLg,
|
|
24262
|
+
sizeIcon
|
|
24263
|
+
};
|
|
24242
24264
|
const buttonVariants = cva([styles$6.base], {
|
|
24243
24265
|
variants: {
|
|
24244
24266
|
variant: {
|
|
@@ -24250,10 +24272,10 @@
|
|
|
24250
24272
|
link: styles$6.link
|
|
24251
24273
|
},
|
|
24252
24274
|
size: {
|
|
24253
|
-
default: styles$6
|
|
24254
|
-
sm: styles$6
|
|
24255
|
-
lg: styles$6
|
|
24256
|
-
icon: styles$6
|
|
24275
|
+
default: styles$6.sizeDefault,
|
|
24276
|
+
sm: styles$6.sizeSm,
|
|
24277
|
+
lg: styles$6.sizeLg,
|
|
24278
|
+
icon: styles$6.sizeIcon
|
|
24257
24279
|
}
|
|
24258
24280
|
},
|
|
24259
24281
|
defaultVariants: {
|
|
@@ -24264,13 +24286,6 @@
|
|
|
24264
24286
|
const Button$2 = React__namespace.forwardRef(
|
|
24265
24287
|
({ className: className2, variant, size: size3, asChild = false, ...props }, ref) => {
|
|
24266
24288
|
const Comp = asChild ? Slot$2 : "button";
|
|
24267
|
-
console.log(
|
|
24268
|
-
`BUTTON VARIANTS`,
|
|
24269
|
-
size3,
|
|
24270
|
-
variant,
|
|
24271
|
-
className2,
|
|
24272
|
-
buttonVariants({ variant, size: size3, className: className2 })
|
|
24273
|
-
);
|
|
24274
24289
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
24275
24290
|
Comp,
|
|
24276
24291
|
{
|
|
@@ -24326,16 +24341,16 @@
|
|
|
24326
24341
|
)
|
|
24327
24342
|
] }) });
|
|
24328
24343
|
};
|
|
24329
|
-
const BigSelector = ({ onClick, title, subtitle, icon, selected, disabled = false }) => {
|
|
24344
|
+
const BigSelector = ({ onClick, title: title2, subtitle, icon, selected, disabled = false }) => {
|
|
24330
24345
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24331
24346
|
"button",
|
|
24332
24347
|
{
|
|
24333
24348
|
onClick,
|
|
24334
|
-
className: `flex flex-col items-center justify-center rounded-lg border-[3px] p-4 transition-all duration-300 ease-in-out ${disabled ? "opacity-50 cursor-not-allowed" : selected ? "scale-[1.02] hover:scale-[1.04] border-primary
|
|
24349
|
+
className: `flex flex-col items-center justify-center rounded-lg border-[3px] p-4 transition-all duration-300 ease-in-out ${disabled ? "opacity-50 cursor-not-allowed" : selected ? "scale-[1.02] hover:scale-[1.04] [border-color:hsl(var(--reach-primary))] [background-color:hsl(var(--reach-primary)/0.05)]" : "border-gray-200 hover:[border-color:hsl(var(--reach-primary))] hover:bg-gray-50"}`,
|
|
24335
24350
|
children: [
|
|
24336
24351
|
icon,
|
|
24337
24352
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
24338
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-gray-900", children:
|
|
24353
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-gray-900", children: title2 }),
|
|
24339
24354
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-500", children: subtitle })
|
|
24340
24355
|
] })
|
|
24341
24356
|
]
|
|
@@ -26004,8 +26019,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26004
26019
|
})
|
|
26005
26020
|
);
|
|
26006
26021
|
return dedupeLinkDescriptors(
|
|
26007
|
-
links.flat(1).filter(isHtmlLinkDescriptor).filter((
|
|
26008
|
-
(
|
|
26022
|
+
links.flat(1).filter(isHtmlLinkDescriptor).filter((link2) => link2.rel === "stylesheet" || link2.rel === "preload").map(
|
|
26023
|
+
(link2) => link2.rel === "stylesheet" ? { ...link2, rel: "prefetch", as: "style" } : { ...link2, rel: "prefetch" }
|
|
26009
26024
|
)
|
|
26010
26025
|
);
|
|
26011
26026
|
}
|
|
@@ -26304,10 +26319,10 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26304
26319
|
[newMatchesForAssets, manifest]
|
|
26305
26320
|
);
|
|
26306
26321
|
let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
|
|
26307
|
-
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React__namespace.createElement("link", { key: href, rel: "prefetch", as: "fetch", href, ...linkProps })), moduleHrefs.map((href) => /* @__PURE__ */ React__namespace.createElement("link", { key: href, rel: "modulepreload", href, ...linkProps })), keyedPrefetchLinks.map(({ key, link }) => (
|
|
26322
|
+
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React__namespace.createElement("link", { key: href, rel: "prefetch", as: "fetch", href, ...linkProps })), moduleHrefs.map((href) => /* @__PURE__ */ React__namespace.createElement("link", { key: href, rel: "modulepreload", href, ...linkProps })), keyedPrefetchLinks.map(({ key, link: link2 }) => (
|
|
26308
26323
|
// these don't spread `linkProps` because they are full link descriptors
|
|
26309
26324
|
// already with their own props
|
|
26310
|
-
/* @__PURE__ */ React__namespace.createElement("link", { key, ...
|
|
26325
|
+
/* @__PURE__ */ React__namespace.createElement("link", { key, ...link2 })
|
|
26311
26326
|
)));
|
|
26312
26327
|
}
|
|
26313
26328
|
function mergeRefs$1(...refs) {
|
|
@@ -26387,7 +26402,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26387
26402
|
internalOnClick(event);
|
|
26388
26403
|
}
|
|
26389
26404
|
}
|
|
26390
|
-
let
|
|
26405
|
+
let link2 = (
|
|
26391
26406
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
26392
26407
|
/* @__PURE__ */ React__namespace.createElement(
|
|
26393
26408
|
"a",
|
|
@@ -26402,7 +26417,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26402
26417
|
}
|
|
26403
26418
|
)
|
|
26404
26419
|
);
|
|
26405
|
-
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null,
|
|
26420
|
+
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, link2, /* @__PURE__ */ React__namespace.createElement(PrefetchPageLinks, { page: href })) : link2;
|
|
26406
26421
|
}
|
|
26407
26422
|
);
|
|
26408
26423
|
Link.displayName = "Link";
|
|
@@ -27117,7 +27132,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27117
27132
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
27118
27133
|
...scopeProps
|
|
27119
27134
|
} = props;
|
|
27120
|
-
const [
|
|
27135
|
+
const [container2, setContainer] = React__namespace.useState(null);
|
|
27121
27136
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
27122
27137
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
27123
27138
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
@@ -27134,69 +27149,69 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27134
27149
|
React__namespace.useEffect(() => {
|
|
27135
27150
|
if (trapped) {
|
|
27136
27151
|
let handleFocusIn2 = function(event) {
|
|
27137
|
-
if (focusScope.paused || !
|
|
27152
|
+
if (focusScope.paused || !container2) return;
|
|
27138
27153
|
const target = event.target;
|
|
27139
|
-
if (
|
|
27154
|
+
if (container2.contains(target)) {
|
|
27140
27155
|
lastFocusedElementRef.current = target;
|
|
27141
27156
|
} else {
|
|
27142
27157
|
focus$1(lastFocusedElementRef.current, { select: true });
|
|
27143
27158
|
}
|
|
27144
27159
|
}, handleFocusOut2 = function(event) {
|
|
27145
|
-
if (focusScope.paused || !
|
|
27160
|
+
if (focusScope.paused || !container2) return;
|
|
27146
27161
|
const relatedTarget = event.relatedTarget;
|
|
27147
27162
|
if (relatedTarget === null) return;
|
|
27148
|
-
if (!
|
|
27163
|
+
if (!container2.contains(relatedTarget)) {
|
|
27149
27164
|
focus$1(lastFocusedElementRef.current, { select: true });
|
|
27150
27165
|
}
|
|
27151
27166
|
}, handleMutations2 = function(mutations) {
|
|
27152
27167
|
const focusedElement = document.activeElement;
|
|
27153
27168
|
if (focusedElement !== document.body) return;
|
|
27154
27169
|
for (const mutation of mutations) {
|
|
27155
|
-
if (mutation.removedNodes.length > 0) focus$1(
|
|
27170
|
+
if (mutation.removedNodes.length > 0) focus$1(container2);
|
|
27156
27171
|
}
|
|
27157
27172
|
};
|
|
27158
27173
|
document.addEventListener("focusin", handleFocusIn2);
|
|
27159
27174
|
document.addEventListener("focusout", handleFocusOut2);
|
|
27160
27175
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
27161
|
-
if (
|
|
27176
|
+
if (container2) mutationObserver.observe(container2, { childList: true, subtree: true });
|
|
27162
27177
|
return () => {
|
|
27163
27178
|
document.removeEventListener("focusin", handleFocusIn2);
|
|
27164
27179
|
document.removeEventListener("focusout", handleFocusOut2);
|
|
27165
27180
|
mutationObserver.disconnect();
|
|
27166
27181
|
};
|
|
27167
27182
|
}
|
|
27168
|
-
}, [trapped,
|
|
27183
|
+
}, [trapped, container2, focusScope.paused]);
|
|
27169
27184
|
React__namespace.useEffect(() => {
|
|
27170
|
-
if (
|
|
27185
|
+
if (container2) {
|
|
27171
27186
|
focusScopesStack$1.add(focusScope);
|
|
27172
27187
|
const previouslyFocusedElement = document.activeElement;
|
|
27173
|
-
const hasFocusedCandidate =
|
|
27188
|
+
const hasFocusedCandidate = container2.contains(previouslyFocusedElement);
|
|
27174
27189
|
if (!hasFocusedCandidate) {
|
|
27175
27190
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT$1, EVENT_OPTIONS$3);
|
|
27176
|
-
|
|
27177
|
-
|
|
27191
|
+
container2.addEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
27192
|
+
container2.dispatchEvent(mountEvent);
|
|
27178
27193
|
if (!mountEvent.defaultPrevented) {
|
|
27179
|
-
focusFirst$3(removeLinks$1(getTabbableCandidates$1(
|
|
27194
|
+
focusFirst$3(removeLinks$1(getTabbableCandidates$1(container2)), { select: true });
|
|
27180
27195
|
if (document.activeElement === previouslyFocusedElement) {
|
|
27181
|
-
focus$1(
|
|
27196
|
+
focus$1(container2);
|
|
27182
27197
|
}
|
|
27183
27198
|
}
|
|
27184
27199
|
}
|
|
27185
27200
|
return () => {
|
|
27186
|
-
|
|
27201
|
+
container2.removeEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
27187
27202
|
setTimeout(() => {
|
|
27188
27203
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT$1, EVENT_OPTIONS$3);
|
|
27189
|
-
|
|
27190
|
-
|
|
27204
|
+
container2.addEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
27205
|
+
container2.dispatchEvent(unmountEvent);
|
|
27191
27206
|
if (!unmountEvent.defaultPrevented) {
|
|
27192
27207
|
focus$1(previouslyFocusedElement ?? document.body, { select: true });
|
|
27193
27208
|
}
|
|
27194
|
-
|
|
27209
|
+
container2.removeEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
27195
27210
|
focusScopesStack$1.remove(focusScope);
|
|
27196
27211
|
}, 0);
|
|
27197
27212
|
};
|
|
27198
27213
|
}
|
|
27199
|
-
}, [
|
|
27214
|
+
}, [container2, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
27200
27215
|
const handleKeyDown = React__namespace.useCallback(
|
|
27201
27216
|
(event) => {
|
|
27202
27217
|
if (!loop && !trapped) return;
|
|
@@ -27204,11 +27219,11 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27204
27219
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
27205
27220
|
const focusedElement = document.activeElement;
|
|
27206
27221
|
if (isTabKey && focusedElement) {
|
|
27207
|
-
const
|
|
27208
|
-
const [first, last] = getTabbableEdges$1(
|
|
27222
|
+
const container22 = event.currentTarget;
|
|
27223
|
+
const [first, last] = getTabbableEdges$1(container22);
|
|
27209
27224
|
const hasTabbableElementsInside = first && last;
|
|
27210
27225
|
if (!hasTabbableElementsInside) {
|
|
27211
|
-
if (focusedElement ===
|
|
27226
|
+
if (focusedElement === container22) event.preventDefault();
|
|
27212
27227
|
} else {
|
|
27213
27228
|
if (!event.shiftKey && focusedElement === last) {
|
|
27214
27229
|
event.preventDefault();
|
|
@@ -27232,15 +27247,15 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27232
27247
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
27233
27248
|
}
|
|
27234
27249
|
}
|
|
27235
|
-
function getTabbableEdges$1(
|
|
27236
|
-
const candidates = getTabbableCandidates$1(
|
|
27237
|
-
const first = findVisible$1(candidates,
|
|
27238
|
-
const last = findVisible$1(candidates.reverse(),
|
|
27250
|
+
function getTabbableEdges$1(container2) {
|
|
27251
|
+
const candidates = getTabbableCandidates$1(container2);
|
|
27252
|
+
const first = findVisible$1(candidates, container2);
|
|
27253
|
+
const last = findVisible$1(candidates.reverse(), container2);
|
|
27239
27254
|
return [first, last];
|
|
27240
27255
|
}
|
|
27241
|
-
function getTabbableCandidates$1(
|
|
27256
|
+
function getTabbableCandidates$1(container2) {
|
|
27242
27257
|
const nodes = [];
|
|
27243
|
-
const walker2 = document.createTreeWalker(
|
|
27258
|
+
const walker2 = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
27244
27259
|
acceptNode: (node) => {
|
|
27245
27260
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
27246
27261
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -27250,9 +27265,9 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27250
27265
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
27251
27266
|
return nodes;
|
|
27252
27267
|
}
|
|
27253
|
-
function findVisible$1(elements,
|
|
27268
|
+
function findVisible$1(elements, container2) {
|
|
27254
27269
|
for (const element of elements) {
|
|
27255
|
-
if (!isHidden$1(element, { upTo:
|
|
27270
|
+
if (!isHidden$1(element, { upTo: container2 })) return element;
|
|
27256
27271
|
}
|
|
27257
27272
|
}
|
|
27258
27273
|
function isHidden$1(node, { upTo }) {
|
|
@@ -27309,8 +27324,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27309
27324
|
const { container: containerProp, ...portalProps } = props;
|
|
27310
27325
|
const [mounted, setMounted] = React__namespace.useState(false);
|
|
27311
27326
|
useLayoutEffect2(() => setMounted(true), []);
|
|
27312
|
-
const
|
|
27313
|
-
return
|
|
27327
|
+
const container2 = containerProp || mounted && globalThis?.document?.body;
|
|
27328
|
+
return container2 ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$2.div, { ...portalProps, ref: forwardedRef }), container2) : null;
|
|
27314
27329
|
});
|
|
27315
27330
|
Portal$5.displayName = PORTAL_NAME$6;
|
|
27316
27331
|
var count = 0;
|
|
@@ -28175,9 +28190,9 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28175
28190
|
forceMount: void 0
|
|
28176
28191
|
});
|
|
28177
28192
|
var DialogPortal$1 = (props) => {
|
|
28178
|
-
const { __scopeDialog, forceMount, children: children2, container } = props;
|
|
28193
|
+
const { __scopeDialog, forceMount, children: children2, container: container2 } = props;
|
|
28179
28194
|
const context = useDialogContext(PORTAL_NAME$5, __scopeDialog);
|
|
28180
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider$3, { scope: __scopeDialog, forceMount, children: React__namespace.Children.map(children2, (child) => /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Portal$5, { asChild: true, container, children: child }) })) });
|
|
28195
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider$3, { scope: __scopeDialog, forceMount, children: React__namespace.Children.map(children2, (child) => /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Portal$5, { asChild: true, container: container2, children: child }) })) });
|
|
28181
28196
|
};
|
|
28182
28197
|
DialogPortal$1.displayName = PORTAL_NAME$5;
|
|
28183
28198
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -28225,8 +28240,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28225
28240
|
const contentRef = React__namespace.useRef(null);
|
|
28226
28241
|
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
28227
28242
|
React__namespace.useEffect(() => {
|
|
28228
|
-
const
|
|
28229
|
-
if (
|
|
28243
|
+
const content2 = contentRef.current;
|
|
28244
|
+
if (content2) return hideOthers(content2);
|
|
28230
28245
|
}, []);
|
|
28231
28246
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28232
28247
|
DialogContentImpl,
|
|
@@ -30675,7 +30690,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
30675
30690
|
...contentProps
|
|
30676
30691
|
} = props;
|
|
30677
30692
|
const context = usePopperContext$1(CONTENT_NAME$6, __scopePopper);
|
|
30678
|
-
const [
|
|
30693
|
+
const [content2, setContent] = React__namespace.useState(null);
|
|
30679
30694
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
30680
30695
|
const [arrow3, setArrow] = React__namespace.useState(null);
|
|
30681
30696
|
const arrowSize = useSize(arrow3);
|
|
@@ -30741,8 +30756,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
30741
30756
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
30742
30757
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
30743
30758
|
useLayoutEffect2(() => {
|
|
30744
|
-
if (
|
|
30745
|
-
}, [
|
|
30759
|
+
if (content2) setContentZIndex(window.getComputedStyle(content2).zIndex);
|
|
30760
|
+
}, [content2]);
|
|
30746
30761
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30747
30762
|
"div",
|
|
30748
30763
|
{
|
|
@@ -31089,9 +31104,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31089
31104
|
forceMount: void 0
|
|
31090
31105
|
});
|
|
31091
31106
|
var TooltipPortal = (props) => {
|
|
31092
|
-
const { __scopeTooltip, forceMount, children: children2, container } = props;
|
|
31107
|
+
const { __scopeTooltip, forceMount, children: children2, container: container2 } = props;
|
|
31093
31108
|
const context = useTooltipContext(PORTAL_NAME$4, __scopeTooltip);
|
|
31094
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider$2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Portal$6, { asChild: true, container, children: children2 }) }) });
|
|
31109
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider$2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Portal$6, { asChild: true, container: container2, children: children2 }) }) });
|
|
31095
31110
|
};
|
|
31096
31111
|
TooltipPortal.displayName = PORTAL_NAME$4;
|
|
31097
31112
|
var CONTENT_NAME$5 = "TooltipContent";
|
|
@@ -31110,7 +31125,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31110
31125
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
31111
31126
|
const [pointerGraceArea, setPointerGraceArea] = React__namespace.useState(null);
|
|
31112
31127
|
const { trigger, onClose } = context;
|
|
31113
|
-
const
|
|
31128
|
+
const content2 = ref.current;
|
|
31114
31129
|
const { onPointerInTransitChange } = providerContext;
|
|
31115
31130
|
const handleRemoveGraceArea = React__namespace.useCallback(() => {
|
|
31116
31131
|
setPointerGraceArea(null);
|
|
@@ -31133,23 +31148,23 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31133
31148
|
return () => handleRemoveGraceArea();
|
|
31134
31149
|
}, [handleRemoveGraceArea]);
|
|
31135
31150
|
React__namespace.useEffect(() => {
|
|
31136
|
-
if (trigger &&
|
|
31137
|
-
const handleTriggerLeave = (event) => handleCreateGraceArea(event,
|
|
31151
|
+
if (trigger && content2) {
|
|
31152
|
+
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content2);
|
|
31138
31153
|
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
|
31139
31154
|
trigger.addEventListener("pointerleave", handleTriggerLeave);
|
|
31140
|
-
|
|
31155
|
+
content2.addEventListener("pointerleave", handleContentLeave);
|
|
31141
31156
|
return () => {
|
|
31142
31157
|
trigger.removeEventListener("pointerleave", handleTriggerLeave);
|
|
31143
|
-
|
|
31158
|
+
content2.removeEventListener("pointerleave", handleContentLeave);
|
|
31144
31159
|
};
|
|
31145
31160
|
}
|
|
31146
|
-
}, [trigger,
|
|
31161
|
+
}, [trigger, content2, handleCreateGraceArea, handleRemoveGraceArea]);
|
|
31147
31162
|
React__namespace.useEffect(() => {
|
|
31148
31163
|
if (pointerGraceArea) {
|
|
31149
31164
|
const handleTrackPointerGrace = (event) => {
|
|
31150
31165
|
const target = event.target;
|
|
31151
31166
|
const pointerPosition = { x: event.clientX, y: event.clientY };
|
|
31152
|
-
const hasEnteredTarget = trigger?.contains(target) ||
|
|
31167
|
+
const hasEnteredTarget = trigger?.contains(target) || content2?.contains(target);
|
|
31153
31168
|
const isPointerOutsideGraceArea = !isPointInPolygon$2(pointerPosition, pointerGraceArea);
|
|
31154
31169
|
if (hasEnteredTarget) {
|
|
31155
31170
|
handleRemoveGraceArea();
|
|
@@ -31161,7 +31176,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31161
31176
|
document.addEventListener("pointermove", handleTrackPointerGrace);
|
|
31162
31177
|
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
31163
31178
|
}
|
|
31164
|
-
}, [trigger,
|
|
31179
|
+
}, [trigger, content2, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
31165
31180
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipContentImpl, { ...props, ref: composedRefs });
|
|
31166
31181
|
});
|
|
31167
31182
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
@@ -31377,7 +31392,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31377
31392
|
}
|
|
31378
31393
|
) }));
|
|
31379
31394
|
TooltipContent.displayName = Content2$4.displayName;
|
|
31380
|
-
const InfoTooltip = ({ title, alertText, Icon: Icon2 = Info, onClick }) => {
|
|
31395
|
+
const InfoTooltip = ({ title: title2, alertText, Icon: Icon2 = Info, onClick }) => {
|
|
31381
31396
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
31382
31397
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
31383
31398
|
Icon2,
|
|
@@ -31408,7 +31423,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31408
31423
|
) }),
|
|
31409
31424
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-amber-500", children: alertText })
|
|
31410
31425
|
] }),
|
|
31411
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] leading-relaxed text-primary-foreground/90", children:
|
|
31426
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] leading-relaxed text-primary-foreground/90", children: title2 })
|
|
31412
31427
|
] }) })
|
|
31413
31428
|
] }) });
|
|
31414
31429
|
};
|
|
@@ -33121,7 +33136,31 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
33121
33136
|
function formatDistanceToNow(date2, options2) {
|
|
33122
33137
|
return formatDistance$1(date2, constructNow(date2), options2);
|
|
33123
33138
|
}
|
|
33124
|
-
const
|
|
33139
|
+
const base$1 = "reach-styles-module__base___WFahB";
|
|
33140
|
+
const secondary$1 = "reach-styles-module__secondary___VQ4iH";
|
|
33141
|
+
const destructive$1 = "reach-styles-module__destructive___RLaRD";
|
|
33142
|
+
const outline$1 = "reach-styles-module__outline___L2VtW";
|
|
33143
|
+
const google = "reach-styles-module__google___HcEij";
|
|
33144
|
+
const date = "reach-styles-module__date___-6BC4";
|
|
33145
|
+
const sizeDefault = "reach-styles-module__sizeDefault___iGTp4";
|
|
33146
|
+
const sizeSm = "reach-styles-module__sizeSm___6T2oK";
|
|
33147
|
+
const iconOnly = "reach-styles-module__iconOnly___8vUSp";
|
|
33148
|
+
const iconOnlySm = "reach-styles-module__iconOnlySm___9ZKv9";
|
|
33149
|
+
const container = "reach-styles-module__container___6PQqs";
|
|
33150
|
+
const styles$2 = {
|
|
33151
|
+
base: base$1,
|
|
33152
|
+
"default": "reach-styles-module__default___zeGU1",
|
|
33153
|
+
secondary: secondary$1,
|
|
33154
|
+
destructive: destructive$1,
|
|
33155
|
+
outline: outline$1,
|
|
33156
|
+
google,
|
|
33157
|
+
date,
|
|
33158
|
+
sizeDefault,
|
|
33159
|
+
sizeSm,
|
|
33160
|
+
iconOnly,
|
|
33161
|
+
iconOnlySm,
|
|
33162
|
+
container
|
|
33163
|
+
};
|
|
33125
33164
|
const badgeVariants = cva([styles$2.base], {
|
|
33126
33165
|
variants: {
|
|
33127
33166
|
variant: {
|
|
@@ -33133,11 +33172,11 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
33133
33172
|
date: styles$2.date
|
|
33134
33173
|
},
|
|
33135
33174
|
size: {
|
|
33136
|
-
default: styles$2
|
|
33137
|
-
sm: styles$2
|
|
33175
|
+
default: styles$2.sizeDefault,
|
|
33176
|
+
sm: styles$2.sizeSm
|
|
33138
33177
|
},
|
|
33139
33178
|
iconOnly: {
|
|
33140
|
-
true: styles$2
|
|
33179
|
+
true: styles$2.iconOnly,
|
|
33141
33180
|
false: ""
|
|
33142
33181
|
}
|
|
33143
33182
|
},
|
|
@@ -33145,7 +33184,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
33145
33184
|
{
|
|
33146
33185
|
iconOnly: true,
|
|
33147
33186
|
size: "sm",
|
|
33148
|
-
class: styles$2
|
|
33187
|
+
class: styles$2.iconOnlySm
|
|
33149
33188
|
}
|
|
33150
33189
|
],
|
|
33151
33190
|
defaultVariants: {
|
|
@@ -33155,13 +33194,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
33155
33194
|
}
|
|
33156
33195
|
});
|
|
33157
33196
|
const Badge = React__namespace.forwardRef(
|
|
33158
|
-
({ className: className2, variant, size: size3, iconOnly, truncate, ...props }, ref) => {
|
|
33197
|
+
({ className: className2, variant, size: size3, iconOnly: iconOnly2, truncate, ...props }, ref) => {
|
|
33159
33198
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33160
33199
|
"div",
|
|
33161
33200
|
{
|
|
33162
33201
|
ref,
|
|
33163
33202
|
className: cn$1(
|
|
33164
|
-
badgeVariants({ variant, size: size3, iconOnly }),
|
|
33203
|
+
badgeVariants({ variant, size: size3, iconOnly: iconOnly2 }),
|
|
33165
33204
|
truncate && "max-w-[90px]",
|
|
33166
33205
|
className2
|
|
33167
33206
|
),
|
|
@@ -34568,11 +34607,11 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34568
34607
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
34569
34608
|
const focusedElement = document.activeElement;
|
|
34570
34609
|
if (isTabKey && focusedElement) {
|
|
34571
|
-
const
|
|
34572
|
-
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(
|
|
34610
|
+
const container2 = event.currentTarget;
|
|
34611
|
+
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container2);
|
|
34573
34612
|
const hasTabbableElementsInside = first && last;
|
|
34574
34613
|
if (!hasTabbableElementsInside) {
|
|
34575
|
-
if (focusedElement ===
|
|
34614
|
+
if (focusedElement === container2) event.preventDefault();
|
|
34576
34615
|
} else {
|
|
34577
34616
|
if (!event.shiftKey && focusedElement === last) {
|
|
34578
34617
|
event.preventDefault();
|
|
@@ -34608,18 +34647,18 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34608
34647
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
34609
34648
|
}
|
|
34610
34649
|
}
|
|
34611
|
-
function $d3863c46a17e8a28$var$getTabbableEdges(
|
|
34612
|
-
const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(
|
|
34613
|
-
const first = $d3863c46a17e8a28$var$findVisible(candidates,
|
|
34614
|
-
const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(),
|
|
34650
|
+
function $d3863c46a17e8a28$var$getTabbableEdges(container2) {
|
|
34651
|
+
const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container2);
|
|
34652
|
+
const first = $d3863c46a17e8a28$var$findVisible(candidates, container2);
|
|
34653
|
+
const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container2);
|
|
34615
34654
|
return [
|
|
34616
34655
|
first,
|
|
34617
34656
|
last
|
|
34618
34657
|
];
|
|
34619
34658
|
}
|
|
34620
|
-
function $d3863c46a17e8a28$var$getTabbableCandidates(
|
|
34659
|
+
function $d3863c46a17e8a28$var$getTabbableCandidates(container2) {
|
|
34621
34660
|
const nodes = [];
|
|
34622
|
-
const walker2 = document.createTreeWalker(
|
|
34661
|
+
const walker2 = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
34623
34662
|
acceptNode: (node) => {
|
|
34624
34663
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
34625
34664
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -34629,10 +34668,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34629
34668
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
34630
34669
|
return nodes;
|
|
34631
34670
|
}
|
|
34632
|
-
function $d3863c46a17e8a28$var$findVisible(elements,
|
|
34671
|
+
function $d3863c46a17e8a28$var$findVisible(elements, container2) {
|
|
34633
34672
|
for (const element of elements) {
|
|
34634
34673
|
if (!$d3863c46a17e8a28$var$isHidden(element, {
|
|
34635
|
-
upTo:
|
|
34674
|
+
upTo: container2
|
|
34636
34675
|
})) return element;
|
|
34637
34676
|
}
|
|
34638
34677
|
}
|
|
@@ -34689,10 +34728,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34689
34728
|
}
|
|
34690
34729
|
const $f1701beae083dbae$export$602eac185826482c = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
34691
34730
|
var _globalThis$document;
|
|
34692
|
-
const { container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body, ...portalProps } = props;
|
|
34693
|
-
return
|
|
34731
|
+
const { container: container2 = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body, ...portalProps } = props;
|
|
34732
|
+
return container2 ? /* @__PURE__ */ ReactDOM.createPortal(/* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
|
|
34694
34733
|
ref: forwardedRef
|
|
34695
|
-
})),
|
|
34734
|
+
})), container2) : null;
|
|
34696
34735
|
});
|
|
34697
34736
|
const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React.useLayoutEffect : () => {
|
|
34698
34737
|
};
|
|
@@ -35159,7 +35198,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35159
35198
|
forceMount: void 0
|
|
35160
35199
|
});
|
|
35161
35200
|
const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props) => {
|
|
35162
|
-
const { __scopeDialog, forceMount, children: children2, container } = props;
|
|
35201
|
+
const { __scopeDialog, forceMount, children: children2, container: container2 } = props;
|
|
35163
35202
|
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, __scopeDialog);
|
|
35164
35203
|
return /* @__PURE__ */ React.createElement($5d3850c4d0b4e6c7$var$PortalProvider, {
|
|
35165
35204
|
scope: __scopeDialog,
|
|
@@ -35170,7 +35209,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35170
35209
|
present: forceMount || context.open
|
|
35171
35210
|
}, /* @__PURE__ */ React.createElement($f1701beae083dbae$export$602eac185826482c, {
|
|
35172
35211
|
asChild: true,
|
|
35173
|
-
container
|
|
35212
|
+
container: container2
|
|
35174
35213
|
}, child))
|
|
35175
35214
|
));
|
|
35176
35215
|
};
|
|
@@ -35229,8 +35268,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35229
35268
|
const contentRef = React.useRef(null);
|
|
35230
35269
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.contentRef, contentRef);
|
|
35231
35270
|
React.useEffect(() => {
|
|
35232
|
-
const
|
|
35233
|
-
if (
|
|
35271
|
+
const content2 = contentRef.current;
|
|
35272
|
+
if (content2) return hideOthers(content2);
|
|
35234
35273
|
}, []);
|
|
35235
35274
|
return /* @__PURE__ */ React.createElement($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, {
|
|
35236
35275
|
ref: composedRefs,
|
|
@@ -35747,7 +35786,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35747
35786
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
35748
35787
|
...scopeProps
|
|
35749
35788
|
} = props;
|
|
35750
|
-
const [
|
|
35789
|
+
const [container2, setContainer] = React__namespace.useState(null);
|
|
35751
35790
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
35752
35791
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
35753
35792
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
@@ -35764,69 +35803,69 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35764
35803
|
React__namespace.useEffect(() => {
|
|
35765
35804
|
if (trapped) {
|
|
35766
35805
|
let handleFocusIn2 = function(event) {
|
|
35767
|
-
if (focusScope.paused || !
|
|
35806
|
+
if (focusScope.paused || !container2) return;
|
|
35768
35807
|
const target = event.target;
|
|
35769
|
-
if (
|
|
35808
|
+
if (container2.contains(target)) {
|
|
35770
35809
|
lastFocusedElementRef.current = target;
|
|
35771
35810
|
} else {
|
|
35772
35811
|
focus(lastFocusedElementRef.current, { select: true });
|
|
35773
35812
|
}
|
|
35774
35813
|
}, handleFocusOut2 = function(event) {
|
|
35775
|
-
if (focusScope.paused || !
|
|
35814
|
+
if (focusScope.paused || !container2) return;
|
|
35776
35815
|
const relatedTarget = event.relatedTarget;
|
|
35777
35816
|
if (relatedTarget === null) return;
|
|
35778
|
-
if (!
|
|
35817
|
+
if (!container2.contains(relatedTarget)) {
|
|
35779
35818
|
focus(lastFocusedElementRef.current, { select: true });
|
|
35780
35819
|
}
|
|
35781
35820
|
}, handleMutations2 = function(mutations) {
|
|
35782
35821
|
const focusedElement = document.activeElement;
|
|
35783
35822
|
if (focusedElement !== document.body) return;
|
|
35784
35823
|
for (const mutation of mutations) {
|
|
35785
|
-
if (mutation.removedNodes.length > 0) focus(
|
|
35824
|
+
if (mutation.removedNodes.length > 0) focus(container2);
|
|
35786
35825
|
}
|
|
35787
35826
|
};
|
|
35788
35827
|
document.addEventListener("focusin", handleFocusIn2);
|
|
35789
35828
|
document.addEventListener("focusout", handleFocusOut2);
|
|
35790
35829
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
35791
|
-
if (
|
|
35830
|
+
if (container2) mutationObserver.observe(container2, { childList: true, subtree: true });
|
|
35792
35831
|
return () => {
|
|
35793
35832
|
document.removeEventListener("focusin", handleFocusIn2);
|
|
35794
35833
|
document.removeEventListener("focusout", handleFocusOut2);
|
|
35795
35834
|
mutationObserver.disconnect();
|
|
35796
35835
|
};
|
|
35797
35836
|
}
|
|
35798
|
-
}, [trapped,
|
|
35837
|
+
}, [trapped, container2, focusScope.paused]);
|
|
35799
35838
|
React__namespace.useEffect(() => {
|
|
35800
|
-
if (
|
|
35839
|
+
if (container2) {
|
|
35801
35840
|
focusScopesStack.add(focusScope);
|
|
35802
35841
|
const previouslyFocusedElement = document.activeElement;
|
|
35803
|
-
const hasFocusedCandidate =
|
|
35842
|
+
const hasFocusedCandidate = container2.contains(previouslyFocusedElement);
|
|
35804
35843
|
if (!hasFocusedCandidate) {
|
|
35805
35844
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS$2);
|
|
35806
|
-
|
|
35807
|
-
|
|
35845
|
+
container2.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
35846
|
+
container2.dispatchEvent(mountEvent);
|
|
35808
35847
|
if (!mountEvent.defaultPrevented) {
|
|
35809
|
-
focusFirst$2(removeLinks(getTabbableCandidates(
|
|
35848
|
+
focusFirst$2(removeLinks(getTabbableCandidates(container2)), { select: true });
|
|
35810
35849
|
if (document.activeElement === previouslyFocusedElement) {
|
|
35811
|
-
focus(
|
|
35850
|
+
focus(container2);
|
|
35812
35851
|
}
|
|
35813
35852
|
}
|
|
35814
35853
|
}
|
|
35815
35854
|
return () => {
|
|
35816
|
-
|
|
35855
|
+
container2.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
35817
35856
|
setTimeout(() => {
|
|
35818
35857
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS$2);
|
|
35819
|
-
|
|
35820
|
-
|
|
35858
|
+
container2.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
35859
|
+
container2.dispatchEvent(unmountEvent);
|
|
35821
35860
|
if (!unmountEvent.defaultPrevented) {
|
|
35822
35861
|
focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
35823
35862
|
}
|
|
35824
|
-
|
|
35863
|
+
container2.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
35825
35864
|
focusScopesStack.remove(focusScope);
|
|
35826
35865
|
}, 0);
|
|
35827
35866
|
};
|
|
35828
35867
|
}
|
|
35829
|
-
}, [
|
|
35868
|
+
}, [container2, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
35830
35869
|
const handleKeyDown = React__namespace.useCallback(
|
|
35831
35870
|
(event) => {
|
|
35832
35871
|
if (!loop && !trapped) return;
|
|
@@ -35834,11 +35873,11 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35834
35873
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
35835
35874
|
const focusedElement = document.activeElement;
|
|
35836
35875
|
if (isTabKey && focusedElement) {
|
|
35837
|
-
const
|
|
35838
|
-
const [first, last] = getTabbableEdges(
|
|
35876
|
+
const container22 = event.currentTarget;
|
|
35877
|
+
const [first, last] = getTabbableEdges(container22);
|
|
35839
35878
|
const hasTabbableElementsInside = first && last;
|
|
35840
35879
|
if (!hasTabbableElementsInside) {
|
|
35841
|
-
if (focusedElement ===
|
|
35880
|
+
if (focusedElement === container22) event.preventDefault();
|
|
35842
35881
|
} else {
|
|
35843
35882
|
if (!event.shiftKey && focusedElement === last) {
|
|
35844
35883
|
event.preventDefault();
|
|
@@ -35862,15 +35901,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35862
35901
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
35863
35902
|
}
|
|
35864
35903
|
}
|
|
35865
|
-
function getTabbableEdges(
|
|
35866
|
-
const candidates = getTabbableCandidates(
|
|
35867
|
-
const first = findVisible(candidates,
|
|
35868
|
-
const last = findVisible(candidates.reverse(),
|
|
35904
|
+
function getTabbableEdges(container2) {
|
|
35905
|
+
const candidates = getTabbableCandidates(container2);
|
|
35906
|
+
const first = findVisible(candidates, container2);
|
|
35907
|
+
const last = findVisible(candidates.reverse(), container2);
|
|
35869
35908
|
return [first, last];
|
|
35870
35909
|
}
|
|
35871
|
-
function getTabbableCandidates(
|
|
35910
|
+
function getTabbableCandidates(container2) {
|
|
35872
35911
|
const nodes = [];
|
|
35873
|
-
const walker2 = document.createTreeWalker(
|
|
35912
|
+
const walker2 = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
35874
35913
|
acceptNode: (node) => {
|
|
35875
35914
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
35876
35915
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -35880,9 +35919,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35880
35919
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
35881
35920
|
return nodes;
|
|
35882
35921
|
}
|
|
35883
|
-
function findVisible(elements,
|
|
35922
|
+
function findVisible(elements, container2) {
|
|
35884
35923
|
for (const element of elements) {
|
|
35885
|
-
if (!isHidden(element, { upTo:
|
|
35924
|
+
if (!isHidden(element, { upTo: container2 })) return element;
|
|
35886
35925
|
}
|
|
35887
35926
|
}
|
|
35888
35927
|
function isHidden(node, { upTo }) {
|
|
@@ -36019,9 +36058,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36019
36058
|
forceMount: void 0
|
|
36020
36059
|
});
|
|
36021
36060
|
var PopoverPortal = (props) => {
|
|
36022
|
-
const { __scopePopover, forceMount, children: children2, container } = props;
|
|
36061
|
+
const { __scopePopover, forceMount, children: children2, container: container2 } = props;
|
|
36023
36062
|
const context = usePopoverContext(PORTAL_NAME$3, __scopePopover);
|
|
36024
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider$1, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Portal$6, { asChild: true, container, children: children2 }) }) });
|
|
36063
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider$1, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Portal$6, { asChild: true, container: container2, children: children2 }) }) });
|
|
36025
36064
|
};
|
|
36026
36065
|
PopoverPortal.displayName = PORTAL_NAME$3;
|
|
36027
36066
|
var CONTENT_NAME$4 = "PopoverContent";
|
|
@@ -36041,8 +36080,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36041
36080
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
36042
36081
|
const isRightClickOutsideRef = React__namespace.useRef(false);
|
|
36043
36082
|
React__namespace.useEffect(() => {
|
|
36044
|
-
const
|
|
36045
|
-
if (
|
|
36083
|
+
const content2 = contentRef.current;
|
|
36084
|
+
if (content2) return hideOthers(content2);
|
|
36046
36085
|
}, []);
|
|
36047
36086
|
return /* @__PURE__ */ jsxRuntime.jsx(ReactRemoveScroll$1, { as: Slot$3, allowPinchZoom: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36048
36087
|
PopoverContentImpl,
|
|
@@ -36948,7 +36987,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36948
36987
|
...contentProps
|
|
36949
36988
|
} = props;
|
|
36950
36989
|
const context = useSelectContext(CONTENT_NAME$3, __scopeSelect);
|
|
36951
|
-
const [
|
|
36990
|
+
const [content2, setContent] = React__namespace.useState(null);
|
|
36952
36991
|
const [viewport, setViewport] = React__namespace.useState(null);
|
|
36953
36992
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
36954
36993
|
const [selectedItem, setSelectedItem] = React__namespace.useState(null);
|
|
@@ -36959,8 +36998,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36959
36998
|
const [isPositioned, setIsPositioned] = React__namespace.useState(false);
|
|
36960
36999
|
const firstValidItemFoundRef = React__namespace.useRef(false);
|
|
36961
37000
|
React__namespace.useEffect(() => {
|
|
36962
|
-
if (
|
|
36963
|
-
}, [
|
|
37001
|
+
if (content2) return hideOthers(content2);
|
|
37002
|
+
}, [content2]);
|
|
36964
37003
|
useFocusGuards();
|
|
36965
37004
|
const focusFirst2 = React__namespace.useCallback(
|
|
36966
37005
|
(candidates) => {
|
|
@@ -36979,8 +37018,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36979
37018
|
[getItems, viewport]
|
|
36980
37019
|
);
|
|
36981
37020
|
const focusSelectedItem = React__namespace.useCallback(
|
|
36982
|
-
() => focusFirst2([selectedItem,
|
|
36983
|
-
[focusFirst2, selectedItem,
|
|
37021
|
+
() => focusFirst2([selectedItem, content2]),
|
|
37022
|
+
[focusFirst2, selectedItem, content2]
|
|
36984
37023
|
);
|
|
36985
37024
|
React__namespace.useEffect(() => {
|
|
36986
37025
|
if (isPositioned) {
|
|
@@ -36989,7 +37028,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36989
37028
|
}, [isPositioned, focusSelectedItem]);
|
|
36990
37029
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
36991
37030
|
React__namespace.useEffect(() => {
|
|
36992
|
-
if (
|
|
37031
|
+
if (content2) {
|
|
36993
37032
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
36994
37033
|
const handlePointerMove = (event) => {
|
|
36995
37034
|
pointerMoveDelta = {
|
|
@@ -37001,7 +37040,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37001
37040
|
if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {
|
|
37002
37041
|
event.preventDefault();
|
|
37003
37042
|
} else {
|
|
37004
|
-
if (!
|
|
37043
|
+
if (!content2.contains(event.target)) {
|
|
37005
37044
|
onOpenChange(false);
|
|
37006
37045
|
}
|
|
37007
37046
|
}
|
|
@@ -37017,7 +37056,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37017
37056
|
document.removeEventListener("pointerup", handlePointerUp, { capture: true });
|
|
37018
37057
|
};
|
|
37019
37058
|
}
|
|
37020
|
-
}, [
|
|
37059
|
+
}, [content2, onOpenChange, triggerPointerDownPosRef]);
|
|
37021
37060
|
React__namespace.useEffect(() => {
|
|
37022
37061
|
const close2 = () => onOpenChange(false);
|
|
37023
37062
|
window.addEventListener("blur", close2);
|
|
@@ -37046,7 +37085,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37046
37085
|
},
|
|
37047
37086
|
[context.value]
|
|
37048
37087
|
);
|
|
37049
|
-
const handleItemLeave = React__namespace.useCallback(() =>
|
|
37088
|
+
const handleItemLeave = React__namespace.useCallback(() => content2?.focus(), [content2]);
|
|
37050
37089
|
const itemTextRefCallback = React__namespace.useCallback(
|
|
37051
37090
|
(node, value, disabled) => {
|
|
37052
37091
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
@@ -37074,7 +37113,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37074
37113
|
SelectContentProvider,
|
|
37075
37114
|
{
|
|
37076
37115
|
scope: __scopeSelect,
|
|
37077
|
-
content,
|
|
37116
|
+
content: content2,
|
|
37078
37117
|
viewport,
|
|
37079
37118
|
onViewportChange: setViewport,
|
|
37080
37119
|
itemRefCallback,
|
|
@@ -37163,16 +37202,16 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37163
37202
|
const context = useSelectContext(CONTENT_NAME$3, __scopeSelect);
|
|
37164
37203
|
const contentContext = useSelectContentContext(CONTENT_NAME$3, __scopeSelect);
|
|
37165
37204
|
const [contentWrapper, setContentWrapper] = React__namespace.useState(null);
|
|
37166
|
-
const [
|
|
37205
|
+
const [content2, setContent] = React__namespace.useState(null);
|
|
37167
37206
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
37168
37207
|
const getItems = useCollection$2(__scopeSelect);
|
|
37169
37208
|
const shouldExpandOnScrollRef = React__namespace.useRef(false);
|
|
37170
37209
|
const shouldRepositionRef = React__namespace.useRef(true);
|
|
37171
37210
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
37172
37211
|
const position = React__namespace.useCallback(() => {
|
|
37173
|
-
if (context.trigger && context.valueNode && contentWrapper &&
|
|
37212
|
+
if (context.trigger && context.valueNode && contentWrapper && content2 && viewport && selectedItem && selectedItemText) {
|
|
37174
37213
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
37175
|
-
const contentRect =
|
|
37214
|
+
const contentRect = content2.getBoundingClientRect();
|
|
37176
37215
|
const valueNodeRect = context.valueNode.getBoundingClientRect();
|
|
37177
37216
|
const itemTextRect = selectedItemText.getBoundingClientRect();
|
|
37178
37217
|
if (context.dir !== "rtl") {
|
|
@@ -37210,7 +37249,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37210
37249
|
const items = getItems();
|
|
37211
37250
|
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
37212
37251
|
const itemsHeight = viewport.scrollHeight;
|
|
37213
|
-
const contentStyles = window.getComputedStyle(
|
|
37252
|
+
const contentStyles = window.getComputedStyle(content2);
|
|
37214
37253
|
const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);
|
|
37215
37254
|
const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);
|
|
37216
37255
|
const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);
|
|
@@ -37230,7 +37269,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37230
37269
|
if (willAlignWithoutTopOverflow) {
|
|
37231
37270
|
const isLastItem = items.length > 0 && selectedItem === items[items.length - 1].ref.current;
|
|
37232
37271
|
contentWrapper.style.bottom = "0px";
|
|
37233
|
-
const viewportOffsetBottom =
|
|
37272
|
+
const viewportOffsetBottom = content2.clientHeight - viewport.offsetTop - viewport.offsetHeight;
|
|
37234
37273
|
const clampedTriggerMiddleToBottomEdge = Math.max(
|
|
37235
37274
|
triggerMiddleToBottomEdge,
|
|
37236
37275
|
selectedItemHalfHeight + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
@@ -37261,7 +37300,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37261
37300
|
context.trigger,
|
|
37262
37301
|
context.valueNode,
|
|
37263
37302
|
contentWrapper,
|
|
37264
|
-
|
|
37303
|
+
content2,
|
|
37265
37304
|
viewport,
|
|
37266
37305
|
selectedItem,
|
|
37267
37306
|
selectedItemText,
|
|
@@ -37271,8 +37310,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37271
37310
|
useLayoutEffect2(() => position(), [position]);
|
|
37272
37311
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
37273
37312
|
useLayoutEffect2(() => {
|
|
37274
|
-
if (
|
|
37275
|
-
}, [
|
|
37313
|
+
if (content2) setContentZIndex(window.getComputedStyle(content2).zIndex);
|
|
37314
|
+
}, [content2]);
|
|
37276
37315
|
const handleScrollButtonChange = React__namespace.useCallback(
|
|
37277
37316
|
(node) => {
|
|
37278
37317
|
if (node && shouldRepositionRef.current === true) {
|
|
@@ -39561,7 +39600,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39561
39600
|
var Menu$1 = (props) => {
|
|
39562
39601
|
const { __scopeMenu, open = false, children: children2, dir, onOpenChange, modal = true } = props;
|
|
39563
39602
|
const popperScope = usePopperScope(__scopeMenu);
|
|
39564
|
-
const [
|
|
39603
|
+
const [content2, setContent] = React__namespace.useState(null);
|
|
39565
39604
|
const isUsingKeyboardRef = React__namespace.useRef(false);
|
|
39566
39605
|
const handleOpenChange = useCallbackRef$1(onOpenChange);
|
|
39567
39606
|
const direction = useDirection(dir);
|
|
@@ -39585,7 +39624,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39585
39624
|
scope: __scopeMenu,
|
|
39586
39625
|
open,
|
|
39587
39626
|
onOpenChange: handleOpenChange,
|
|
39588
|
-
content,
|
|
39627
|
+
content: content2,
|
|
39589
39628
|
onContentChange: setContent,
|
|
39590
39629
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
39591
39630
|
MenuRootProvider,
|
|
@@ -39616,9 +39655,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39616
39655
|
forceMount: void 0
|
|
39617
39656
|
});
|
|
39618
39657
|
var MenuPortal$1 = (props) => {
|
|
39619
|
-
const { __scopeMenu, forceMount, children: children2, container } = props;
|
|
39658
|
+
const { __scopeMenu, forceMount, children: children2, container: container2 } = props;
|
|
39620
39659
|
const context = useMenuContext$1(PORTAL_NAME$1, __scopeMenu);
|
|
39621
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Portal$6, { asChild: true, container, children: children2 }) }) });
|
|
39660
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Portal$6, { asChild: true, container: container2, children: children2 }) }) });
|
|
39622
39661
|
};
|
|
39623
39662
|
MenuPortal$1.displayName = PORTAL_NAME$1;
|
|
39624
39663
|
var CONTENT_NAME$1 = "MenuContent";
|
|
@@ -39638,8 +39677,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39638
39677
|
const ref = React__namespace.useRef(null);
|
|
39639
39678
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
39640
39679
|
React__namespace.useEffect(() => {
|
|
39641
|
-
const
|
|
39642
|
-
if (
|
|
39680
|
+
const content2 = ref.current;
|
|
39681
|
+
if (content2) return hideOthers(content2);
|
|
39643
39682
|
}, []);
|
|
39644
39683
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39645
39684
|
MenuContentImpl,
|
|
@@ -39816,8 +39855,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39816
39855
|
if (event.key === "Tab") event.preventDefault();
|
|
39817
39856
|
if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
|
|
39818
39857
|
}
|
|
39819
|
-
const
|
|
39820
|
-
if (event.target !==
|
|
39858
|
+
const content2 = contentRef.current;
|
|
39859
|
+
if (event.target !== content2) return;
|
|
39821
39860
|
if (!FIRST_LAST_KEYS.includes(event.key)) return;
|
|
39822
39861
|
event.preventDefault();
|
|
39823
39862
|
const items = getItems().filter((item) => !item.disabled);
|
|
@@ -40743,7 +40782,27 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
40743
40782
|
)
|
|
40744
40783
|
] });
|
|
40745
40784
|
};
|
|
40746
|
-
const
|
|
40785
|
+
const base = "reach-styles-module__base___zJcoE";
|
|
40786
|
+
const destructive = "reach-styles-module__destructive___5EWhN";
|
|
40787
|
+
const outline = "reach-styles-module__outline___gj9sC";
|
|
40788
|
+
const secondary = "reach-styles-module__secondary___cN5Wj";
|
|
40789
|
+
const header = "reach-styles-module__header___-izE2";
|
|
40790
|
+
const title = "reach-styles-module__title___n1hA9";
|
|
40791
|
+
const description = "reach-styles-module__description___EvXM-";
|
|
40792
|
+
const content = "reach-styles-module__content___okv68";
|
|
40793
|
+
const footer = "reach-styles-module__footer___YA4U4";
|
|
40794
|
+
const styles = {
|
|
40795
|
+
base,
|
|
40796
|
+
"default": "reach-styles-module__default___88Q0d",
|
|
40797
|
+
destructive,
|
|
40798
|
+
outline,
|
|
40799
|
+
secondary,
|
|
40800
|
+
header,
|
|
40801
|
+
title,
|
|
40802
|
+
description,
|
|
40803
|
+
content,
|
|
40804
|
+
footer
|
|
40805
|
+
};
|
|
40747
40806
|
const cardVariants = cva(styles.base, {
|
|
40748
40807
|
variants: {
|
|
40749
40808
|
variant: {
|
|
@@ -41909,8 +41968,8 @@ ${message2 ?? ""}`);
|
|
|
41909
41968
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
41910
41969
|
Button$2,
|
|
41911
41970
|
{
|
|
41912
|
-
|
|
41913
|
-
|
|
41971
|
+
variant: selectedChannels.includes("email") ? "default" : "outline",
|
|
41972
|
+
className: `${buttonStyle}`,
|
|
41914
41973
|
onClick: toggleEmail,
|
|
41915
41974
|
children: [
|
|
41916
41975
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsx(iconDefinitions.EmailIcon, { size: 15 }) }),
|
|
@@ -41921,8 +41980,8 @@ ${message2 ?? ""}`);
|
|
|
41921
41980
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
41922
41981
|
Button$2,
|
|
41923
41982
|
{
|
|
41924
|
-
|
|
41925
|
-
|
|
41983
|
+
variant: selectedChannels.includes("sms") ? "default" : "outline",
|
|
41984
|
+
className: `${buttonStyle}`,
|
|
41926
41985
|
onClick: toggleSMS,
|
|
41927
41986
|
children: [
|
|
41928
41987
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsx(iconDefinitions.SmsIcon, { size: 15 }) }),
|
|
@@ -42087,7 +42146,7 @@ ${message2 ?? ""}`);
|
|
|
42087
42146
|
iconDefinitions,
|
|
42088
42147
|
includeSegments,
|
|
42089
42148
|
excludeSegments,
|
|
42090
|
-
title = "Estimated Matches",
|
|
42149
|
+
title: title2 = "Estimated Matches",
|
|
42091
42150
|
subtitle
|
|
42092
42151
|
}) => {
|
|
42093
42152
|
const {
|
|
@@ -42113,7 +42172,7 @@ ${message2 ?? ""}`);
|
|
|
42113
42172
|
}, [data?.recipients]);
|
|
42114
42173
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full p-4", children: [
|
|
42115
42174
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 md:mb-6", children: [
|
|
42116
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-semibold text-gray-900", children:
|
|
42175
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-semibold text-gray-900", children: title2 }),
|
|
42117
42176
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-gray-500", children: subtitle })
|
|
42118
42177
|
] }),
|
|
42119
42178
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "@container", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 @[30rem]:grid-cols-3 gap-2 md:gap-3 mb-4 md:mb-6", children: [
|
|
@@ -44554,10 +44613,10 @@ ${message2 ?? ""}`);
|
|
|
44554
44613
|
return jsxRuntime.jsx("div", { className: classNames.caption, style: styles2.caption, children: caption });
|
|
44555
44614
|
}
|
|
44556
44615
|
function Footer(props) {
|
|
44557
|
-
var _a = useDayPicker(),
|
|
44558
|
-
if (!
|
|
44616
|
+
var _a = useDayPicker(), footer2 = _a.footer, styles2 = _a.styles, tfoot = _a.classNames.tfoot;
|
|
44617
|
+
if (!footer2)
|
|
44559
44618
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
44560
|
-
return jsxRuntime.jsx("tfoot", { className: tfoot, style: styles2.tfoot, children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 8, children:
|
|
44619
|
+
return jsxRuntime.jsx("tfoot", { className: tfoot, style: styles2.tfoot, children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 8, children: footer2 }) }) });
|
|
44561
44620
|
}
|
|
44562
44621
|
function getWeekdays(locale2, weekStartsOn, ISOWeek) {
|
|
44563
44622
|
var start = ISOWeek ? startOfISOWeek(/* @__PURE__ */ new Date()) : startOfWeek(/* @__PURE__ */ new Date(), { locale: locale2, weekStartsOn });
|
|
@@ -45365,15 +45424,15 @@ ${message2 ?? ""}`);
|
|
|
45365
45424
|
function WeekNumber(props) {
|
|
45366
45425
|
var weekNumber = props.number, dates2 = props.dates;
|
|
45367
45426
|
var _a = useDayPicker(), onWeekNumberClick = _a.onWeekNumberClick, styles2 = _a.styles, classNames = _a.classNames, locale2 = _a.locale, labelWeekNumber2 = _a.labels.labelWeekNumber, formatWeekNumber2 = _a.formatters.formatWeekNumber;
|
|
45368
|
-
var
|
|
45427
|
+
var content2 = formatWeekNumber2(Number(weekNumber), { locale: locale2 });
|
|
45369
45428
|
if (!onWeekNumberClick) {
|
|
45370
|
-
return jsxRuntime.jsx("span", { className: classNames.weeknumber, style: styles2.weeknumber, children:
|
|
45429
|
+
return jsxRuntime.jsx("span", { className: classNames.weeknumber, style: styles2.weeknumber, children: content2 });
|
|
45371
45430
|
}
|
|
45372
45431
|
var label = labelWeekNumber2(Number(weekNumber), { locale: locale2 });
|
|
45373
45432
|
var handleClick = function(e2) {
|
|
45374
45433
|
onWeekNumberClick(weekNumber, dates2, e2);
|
|
45375
45434
|
};
|
|
45376
|
-
return jsxRuntime.jsx(Button$1, { name: "week-number", "aria-label": label, className: classNames.weeknumber, style: styles2.weeknumber, onClick: handleClick, children:
|
|
45435
|
+
return jsxRuntime.jsx(Button$1, { name: "week-number", "aria-label": label, className: classNames.weeknumber, style: styles2.weeknumber, onClick: handleClick, children: content2 });
|
|
45377
45436
|
}
|
|
45378
45437
|
function Row(props) {
|
|
45379
45438
|
var _a, _b;
|
|
@@ -46394,13 +46453,13 @@ ${message2 ?? ""}`);
|
|
|
46394
46453
|
] }) })
|
|
46395
46454
|
] });
|
|
46396
46455
|
};
|
|
46397
|
-
const TitleAndContent = ({ title, subtitle, content }) => {
|
|
46456
|
+
const TitleAndContent = ({ title: title2, subtitle, content: content2 }) => {
|
|
46398
46457
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 w-full p-6 rounded-xl bg-gray-100 ", children: [
|
|
46399
46458
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
46400
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-semibold", children:
|
|
46459
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-semibold", children: title2 }),
|
|
46401
46460
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-600 mt-1", children: subtitle })
|
|
46402
46461
|
] }),
|
|
46403
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white rounded-2xl w-full border border-gray-200 p-6 relative", children:
|
|
46462
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white rounded-2xl w-full border border-gray-200 p-6 relative", children: content2 })
|
|
46404
46463
|
] });
|
|
46405
46464
|
};
|
|
46406
46465
|
const EditAutomationPopup = ({
|
|
@@ -47362,15 +47421,15 @@ ${message2 ?? ""}`);
|
|
|
47362
47421
|
style2.textContent = cssRules;
|
|
47363
47422
|
pip.document.head.appendChild(style2);
|
|
47364
47423
|
} catch (e2) {
|
|
47365
|
-
const
|
|
47424
|
+
const link2 = document.createElement("link");
|
|
47366
47425
|
if (styleSheet.href == null) {
|
|
47367
47426
|
return;
|
|
47368
47427
|
}
|
|
47369
|
-
|
|
47370
|
-
|
|
47371
|
-
|
|
47372
|
-
|
|
47373
|
-
pip.document.head.appendChild(
|
|
47428
|
+
link2.rel = "stylesheet";
|
|
47429
|
+
link2.type = styleSheet.type;
|
|
47430
|
+
link2.media = styleSheet.media.toString();
|
|
47431
|
+
link2.href = styleSheet.href;
|
|
47432
|
+
pip.document.head.appendChild(link2);
|
|
47374
47433
|
}
|
|
47375
47434
|
});
|
|
47376
47435
|
delegateEvents(["focusin", "focusout", "pointermove", "keydown", "pointerdown", "pointerup", "click", "mousedown", "input"], pip.document);
|
|
@@ -48652,11 +48711,11 @@ ${message2 ?? ""}`);
|
|
|
48652
48711
|
var TABBABLE_ELEMENT_SELECTOR = tabbableElements.join(
|
|
48653
48712
|
':not([hidden]):not([tabindex="-1"]),'
|
|
48654
48713
|
);
|
|
48655
|
-
function getAllTabbableIn(
|
|
48656
|
-
const elements = Array.from(
|
|
48714
|
+
function getAllTabbableIn(container2, includeContainer) {
|
|
48715
|
+
const elements = Array.from(container2.querySelectorAll(FOCUSABLE_ELEMENT_SELECTOR));
|
|
48657
48716
|
const tabbableElements2 = elements.filter(isTabbable);
|
|
48658
|
-
if (includeContainer && isTabbable(
|
|
48659
|
-
tabbableElements2.unshift(
|
|
48717
|
+
if (includeContainer && isTabbable(container2)) {
|
|
48718
|
+
tabbableElements2.unshift(container2);
|
|
48660
48719
|
}
|
|
48661
48720
|
tabbableElements2.forEach((element, i2) => {
|
|
48662
48721
|
if (isFrame(element) && element.contentDocument) {
|
|
@@ -52448,12 +52507,12 @@ ${message2 ?? ""}`);
|
|
|
52448
52507
|
});
|
|
52449
52508
|
createEffect(() => {
|
|
52450
52509
|
const positioner = positionerRef();
|
|
52451
|
-
const
|
|
52452
|
-
if (!positioner || !
|
|
52510
|
+
const content2 = mergedProps.contentRef?.();
|
|
52511
|
+
if (!positioner || !content2) {
|
|
52453
52512
|
return;
|
|
52454
52513
|
}
|
|
52455
52514
|
queueMicrotask(() => {
|
|
52456
|
-
positioner.style.zIndex = getComputedStyle(
|
|
52515
|
+
positioner.style.zIndex = getComputedStyle(content2).zIndex;
|
|
52457
52516
|
});
|
|
52458
52517
|
});
|
|
52459
52518
|
const context = {
|
|
@@ -52519,9 +52578,9 @@ ${message2 ?? ""}`);
|
|
|
52519
52578
|
};
|
|
52520
52579
|
const onPointerDown = (e2) => {
|
|
52521
52580
|
function handler() {
|
|
52522
|
-
const
|
|
52581
|
+
const container2 = ref();
|
|
52523
52582
|
const target = e2.target;
|
|
52524
|
-
if (!
|
|
52583
|
+
if (!container2 || !target || !isEventOutside(e2)) {
|
|
52525
52584
|
return;
|
|
52526
52585
|
}
|
|
52527
52586
|
const handler2 = composeEventHandlers([
|
|
@@ -52553,9 +52612,9 @@ ${message2 ?? ""}`);
|
|
|
52553
52612
|
}
|
|
52554
52613
|
};
|
|
52555
52614
|
const onFocusIn = (e2) => {
|
|
52556
|
-
const
|
|
52615
|
+
const container2 = ref();
|
|
52557
52616
|
const target = e2.target;
|
|
52558
|
-
if (!
|
|
52617
|
+
if (!container2 || !target || !isEventOutside(e2)) {
|
|
52559
52618
|
return;
|
|
52560
52619
|
}
|
|
52561
52620
|
const handler = composeEventHandlers([
|
|
@@ -53268,11 +53327,11 @@ ${message2 ?? ""}`);
|
|
|
53268
53327
|
return element;
|
|
53269
53328
|
};
|
|
53270
53329
|
const tabbables = () => {
|
|
53271
|
-
const
|
|
53272
|
-
if (!
|
|
53330
|
+
const container2 = ref();
|
|
53331
|
+
if (!container2) {
|
|
53273
53332
|
return [];
|
|
53274
53333
|
}
|
|
53275
|
-
return getAllTabbableIn(
|
|
53334
|
+
return getAllTabbableIn(container2, true).filter((el) => !el.hasAttribute("data-focus-trap"));
|
|
53276
53335
|
};
|
|
53277
53336
|
const firstTabbable = () => {
|
|
53278
53337
|
const items = tabbables();
|
|
@@ -53283,60 +53342,60 @@ ${message2 ?? ""}`);
|
|
|
53283
53342
|
return items.length > 0 ? items[items.length - 1] : null;
|
|
53284
53343
|
};
|
|
53285
53344
|
const shouldPreventUnmountAutoFocus = () => {
|
|
53286
|
-
const
|
|
53287
|
-
if (!
|
|
53345
|
+
const container2 = ref();
|
|
53346
|
+
if (!container2) {
|
|
53288
53347
|
return false;
|
|
53289
53348
|
}
|
|
53290
|
-
const activeElement = getActiveElement(
|
|
53349
|
+
const activeElement = getActiveElement(container2);
|
|
53291
53350
|
if (!activeElement) {
|
|
53292
53351
|
return false;
|
|
53293
53352
|
}
|
|
53294
|
-
if (contains(
|
|
53353
|
+
if (contains(container2, activeElement)) {
|
|
53295
53354
|
return false;
|
|
53296
53355
|
}
|
|
53297
53356
|
return isFocusable(activeElement);
|
|
53298
53357
|
};
|
|
53299
53358
|
createEffect(() => {
|
|
53300
|
-
const
|
|
53301
|
-
if (!
|
|
53359
|
+
const container2 = ref();
|
|
53360
|
+
if (!container2) {
|
|
53302
53361
|
return;
|
|
53303
53362
|
}
|
|
53304
53363
|
focusScopeStack.add(focusScope);
|
|
53305
|
-
const previouslyFocusedElement = getActiveElement(
|
|
53306
|
-
const hasFocusedCandidate = contains(
|
|
53364
|
+
const previouslyFocusedElement = getActiveElement(container2);
|
|
53365
|
+
const hasFocusedCandidate = contains(container2, previouslyFocusedElement);
|
|
53307
53366
|
if (!hasFocusedCandidate) {
|
|
53308
53367
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT_EVENT, EVENT_OPTIONS);
|
|
53309
|
-
|
|
53310
|
-
|
|
53368
|
+
container2.addEventListener(AUTOFOCUS_ON_MOUNT_EVENT, onMountAutoFocus);
|
|
53369
|
+
container2.dispatchEvent(mountEvent);
|
|
53311
53370
|
if (!mountEvent.defaultPrevented) {
|
|
53312
53371
|
setTimeout(() => {
|
|
53313
53372
|
focusWithoutScrolling(firstTabbable());
|
|
53314
|
-
if (getActiveElement(
|
|
53315
|
-
focusWithoutScrolling(
|
|
53373
|
+
if (getActiveElement(container2) === previouslyFocusedElement) {
|
|
53374
|
+
focusWithoutScrolling(container2);
|
|
53316
53375
|
}
|
|
53317
53376
|
}, 0);
|
|
53318
53377
|
}
|
|
53319
53378
|
}
|
|
53320
53379
|
onCleanup(() => {
|
|
53321
|
-
|
|
53380
|
+
container2.removeEventListener(AUTOFOCUS_ON_MOUNT_EVENT, onMountAutoFocus);
|
|
53322
53381
|
setTimeout(() => {
|
|
53323
53382
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT_EVENT, EVENT_OPTIONS);
|
|
53324
53383
|
if (shouldPreventUnmountAutoFocus()) {
|
|
53325
53384
|
unmountEvent.preventDefault();
|
|
53326
53385
|
}
|
|
53327
|
-
|
|
53328
|
-
|
|
53386
|
+
container2.addEventListener(AUTOFOCUS_ON_UNMOUNT_EVENT, onUnmountAutoFocus);
|
|
53387
|
+
container2.dispatchEvent(unmountEvent);
|
|
53329
53388
|
if (!unmountEvent.defaultPrevented) {
|
|
53330
53389
|
focusWithoutScrolling(previouslyFocusedElement ?? ownerDocument().body);
|
|
53331
53390
|
}
|
|
53332
|
-
|
|
53391
|
+
container2.removeEventListener(AUTOFOCUS_ON_UNMOUNT_EVENT, onUnmountAutoFocus);
|
|
53333
53392
|
focusScopeStack.remove(focusScope);
|
|
53334
53393
|
}, 0);
|
|
53335
53394
|
});
|
|
53336
53395
|
});
|
|
53337
53396
|
createEffect(() => {
|
|
53338
|
-
const
|
|
53339
|
-
if (!
|
|
53397
|
+
const container2 = ref();
|
|
53398
|
+
if (!container2 || !access(props.trapFocus) || isPaused()) {
|
|
53340
53399
|
return;
|
|
53341
53400
|
}
|
|
53342
53401
|
const onFocusIn = (event) => {
|
|
@@ -53344,7 +53403,7 @@ ${message2 ?? ""}`);
|
|
|
53344
53403
|
if (target?.closest(`[${DATA_TOP_LAYER_ATTR}]`)) {
|
|
53345
53404
|
return;
|
|
53346
53405
|
}
|
|
53347
|
-
if (contains(
|
|
53406
|
+
if (contains(container2, target)) {
|
|
53348
53407
|
lastFocusedElement = target;
|
|
53349
53408
|
} else {
|
|
53350
53409
|
focusWithoutScrolling(lastFocusedElement);
|
|
@@ -53352,11 +53411,11 @@ ${message2 ?? ""}`);
|
|
|
53352
53411
|
};
|
|
53353
53412
|
const onFocusOut = (event) => {
|
|
53354
53413
|
const relatedTarget = event.relatedTarget;
|
|
53355
|
-
const target = relatedTarget ?? getActiveElement(
|
|
53414
|
+
const target = relatedTarget ?? getActiveElement(container2);
|
|
53356
53415
|
if (target?.closest(`[${DATA_TOP_LAYER_ATTR}]`)) {
|
|
53357
53416
|
return;
|
|
53358
53417
|
}
|
|
53359
|
-
if (!contains(
|
|
53418
|
+
if (!contains(container2, target)) {
|
|
53360
53419
|
focusWithoutScrolling(lastFocusedElement);
|
|
53361
53420
|
}
|
|
53362
53421
|
};
|
|
@@ -53368,14 +53427,14 @@ ${message2 ?? ""}`);
|
|
|
53368
53427
|
});
|
|
53369
53428
|
});
|
|
53370
53429
|
createEffect(() => {
|
|
53371
|
-
const
|
|
53372
|
-
if (!
|
|
53430
|
+
const container2 = ref();
|
|
53431
|
+
if (!container2 || !access(props.trapFocus) || isPaused()) {
|
|
53373
53432
|
return;
|
|
53374
53433
|
}
|
|
53375
53434
|
const startSentinel = createSentinel();
|
|
53376
|
-
|
|
53435
|
+
container2.insertAdjacentElement("afterbegin", startSentinel);
|
|
53377
53436
|
const endSentinel = createSentinel();
|
|
53378
|
-
|
|
53437
|
+
container2.insertAdjacentElement("beforeend", endSentinel);
|
|
53379
53438
|
function onFocus(event) {
|
|
53380
53439
|
const first = firstTabbable();
|
|
53381
53440
|
const last = lastTabbable();
|
|
@@ -53391,15 +53450,15 @@ ${message2 ?? ""}`);
|
|
|
53391
53450
|
for (const mutation of mutations) {
|
|
53392
53451
|
if (mutation.previousSibling === endSentinel) {
|
|
53393
53452
|
endSentinel.remove();
|
|
53394
|
-
|
|
53453
|
+
container2.insertAdjacentElement("beforeend", endSentinel);
|
|
53395
53454
|
}
|
|
53396
53455
|
if (mutation.nextSibling === startSentinel) {
|
|
53397
53456
|
startSentinel.remove();
|
|
53398
|
-
|
|
53457
|
+
container2.insertAdjacentElement("afterbegin", startSentinel);
|
|
53399
53458
|
}
|
|
53400
53459
|
}
|
|
53401
53460
|
});
|
|
53402
|
-
observer.observe(
|
|
53461
|
+
observer.observe(container2, {
|
|
53403
53462
|
childList: true,
|
|
53404
53463
|
subtree: false
|
|
53405
53464
|
});
|
|
@@ -54621,9 +54680,9 @@ ${message2 ?? ""}`);
|
|
|
54621
54680
|
disclosureState.toggle();
|
|
54622
54681
|
};
|
|
54623
54682
|
const _focusContent = () => {
|
|
54624
|
-
const
|
|
54625
|
-
if (
|
|
54626
|
-
focusWithoutScrolling(
|
|
54683
|
+
const content2 = contentRef();
|
|
54684
|
+
if (content2) {
|
|
54685
|
+
focusWithoutScrolling(content2);
|
|
54627
54686
|
listState.selectionManager().setFocused(true);
|
|
54628
54687
|
listState.selectionManager().setFocusedKey(void 0);
|
|
54629
54688
|
}
|