@embedreach/components 0.1.41 → 0.1.42
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 +239 -181
- package/dist/index.umd.js +290 -232
- package/dist/styles.css +55 -55
- 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 = "reach-styles-module__sizeDefault___8kU5A";
|
|
24248
|
+
const sizeSm = "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,
|
|
24260
|
+
sizeSm,
|
|
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: {
|
|
@@ -24326,7 +24348,7 @@
|
|
|
24326
24348
|
)
|
|
24327
24349
|
] }) });
|
|
24328
24350
|
};
|
|
24329
|
-
const BigSelector = ({ onClick, title, subtitle, icon, selected, disabled = false }) => {
|
|
24351
|
+
const BigSelector = ({ onClick, title: title2, subtitle, icon, selected, disabled = false }) => {
|
|
24330
24352
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24331
24353
|
"button",
|
|
24332
24354
|
{
|
|
@@ -24335,7 +24357,7 @@
|
|
|
24335
24357
|
children: [
|
|
24336
24358
|
icon,
|
|
24337
24359
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
24338
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-gray-900", children:
|
|
24360
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-gray-900", children: title2 }),
|
|
24339
24361
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-500", children: subtitle })
|
|
24340
24362
|
] })
|
|
24341
24363
|
]
|
|
@@ -26004,8 +26026,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26004
26026
|
})
|
|
26005
26027
|
);
|
|
26006
26028
|
return dedupeLinkDescriptors(
|
|
26007
|
-
links.flat(1).filter(isHtmlLinkDescriptor).filter((
|
|
26008
|
-
(
|
|
26029
|
+
links.flat(1).filter(isHtmlLinkDescriptor).filter((link2) => link2.rel === "stylesheet" || link2.rel === "preload").map(
|
|
26030
|
+
(link2) => link2.rel === "stylesheet" ? { ...link2, rel: "prefetch", as: "style" } : { ...link2, rel: "prefetch" }
|
|
26009
26031
|
)
|
|
26010
26032
|
);
|
|
26011
26033
|
}
|
|
@@ -26304,10 +26326,10 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26304
26326
|
[newMatchesForAssets, manifest]
|
|
26305
26327
|
);
|
|
26306
26328
|
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 }) => (
|
|
26329
|
+
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
26330
|
// these don't spread `linkProps` because they are full link descriptors
|
|
26309
26331
|
// already with their own props
|
|
26310
|
-
/* @__PURE__ */ React__namespace.createElement("link", { key, ...
|
|
26332
|
+
/* @__PURE__ */ React__namespace.createElement("link", { key, ...link2 })
|
|
26311
26333
|
)));
|
|
26312
26334
|
}
|
|
26313
26335
|
function mergeRefs$1(...refs) {
|
|
@@ -26387,7 +26409,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26387
26409
|
internalOnClick(event);
|
|
26388
26410
|
}
|
|
26389
26411
|
}
|
|
26390
|
-
let
|
|
26412
|
+
let link2 = (
|
|
26391
26413
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
26392
26414
|
/* @__PURE__ */ React__namespace.createElement(
|
|
26393
26415
|
"a",
|
|
@@ -26402,7 +26424,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26402
26424
|
}
|
|
26403
26425
|
)
|
|
26404
26426
|
);
|
|
26405
|
-
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null,
|
|
26427
|
+
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, link2, /* @__PURE__ */ React__namespace.createElement(PrefetchPageLinks, { page: href })) : link2;
|
|
26406
26428
|
}
|
|
26407
26429
|
);
|
|
26408
26430
|
Link.displayName = "Link";
|
|
@@ -27117,7 +27139,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27117
27139
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
27118
27140
|
...scopeProps
|
|
27119
27141
|
} = props;
|
|
27120
|
-
const [
|
|
27142
|
+
const [container2, setContainer] = React__namespace.useState(null);
|
|
27121
27143
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
27122
27144
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
27123
27145
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
@@ -27134,69 +27156,69 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27134
27156
|
React__namespace.useEffect(() => {
|
|
27135
27157
|
if (trapped) {
|
|
27136
27158
|
let handleFocusIn2 = function(event) {
|
|
27137
|
-
if (focusScope.paused || !
|
|
27159
|
+
if (focusScope.paused || !container2) return;
|
|
27138
27160
|
const target = event.target;
|
|
27139
|
-
if (
|
|
27161
|
+
if (container2.contains(target)) {
|
|
27140
27162
|
lastFocusedElementRef.current = target;
|
|
27141
27163
|
} else {
|
|
27142
27164
|
focus$1(lastFocusedElementRef.current, { select: true });
|
|
27143
27165
|
}
|
|
27144
27166
|
}, handleFocusOut2 = function(event) {
|
|
27145
|
-
if (focusScope.paused || !
|
|
27167
|
+
if (focusScope.paused || !container2) return;
|
|
27146
27168
|
const relatedTarget = event.relatedTarget;
|
|
27147
27169
|
if (relatedTarget === null) return;
|
|
27148
|
-
if (!
|
|
27170
|
+
if (!container2.contains(relatedTarget)) {
|
|
27149
27171
|
focus$1(lastFocusedElementRef.current, { select: true });
|
|
27150
27172
|
}
|
|
27151
27173
|
}, handleMutations2 = function(mutations) {
|
|
27152
27174
|
const focusedElement = document.activeElement;
|
|
27153
27175
|
if (focusedElement !== document.body) return;
|
|
27154
27176
|
for (const mutation of mutations) {
|
|
27155
|
-
if (mutation.removedNodes.length > 0) focus$1(
|
|
27177
|
+
if (mutation.removedNodes.length > 0) focus$1(container2);
|
|
27156
27178
|
}
|
|
27157
27179
|
};
|
|
27158
27180
|
document.addEventListener("focusin", handleFocusIn2);
|
|
27159
27181
|
document.addEventListener("focusout", handleFocusOut2);
|
|
27160
27182
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
27161
|
-
if (
|
|
27183
|
+
if (container2) mutationObserver.observe(container2, { childList: true, subtree: true });
|
|
27162
27184
|
return () => {
|
|
27163
27185
|
document.removeEventListener("focusin", handleFocusIn2);
|
|
27164
27186
|
document.removeEventListener("focusout", handleFocusOut2);
|
|
27165
27187
|
mutationObserver.disconnect();
|
|
27166
27188
|
};
|
|
27167
27189
|
}
|
|
27168
|
-
}, [trapped,
|
|
27190
|
+
}, [trapped, container2, focusScope.paused]);
|
|
27169
27191
|
React__namespace.useEffect(() => {
|
|
27170
|
-
if (
|
|
27192
|
+
if (container2) {
|
|
27171
27193
|
focusScopesStack$1.add(focusScope);
|
|
27172
27194
|
const previouslyFocusedElement = document.activeElement;
|
|
27173
|
-
const hasFocusedCandidate =
|
|
27195
|
+
const hasFocusedCandidate = container2.contains(previouslyFocusedElement);
|
|
27174
27196
|
if (!hasFocusedCandidate) {
|
|
27175
27197
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT$1, EVENT_OPTIONS$3);
|
|
27176
|
-
|
|
27177
|
-
|
|
27198
|
+
container2.addEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
27199
|
+
container2.dispatchEvent(mountEvent);
|
|
27178
27200
|
if (!mountEvent.defaultPrevented) {
|
|
27179
|
-
focusFirst$3(removeLinks$1(getTabbableCandidates$1(
|
|
27201
|
+
focusFirst$3(removeLinks$1(getTabbableCandidates$1(container2)), { select: true });
|
|
27180
27202
|
if (document.activeElement === previouslyFocusedElement) {
|
|
27181
|
-
focus$1(
|
|
27203
|
+
focus$1(container2);
|
|
27182
27204
|
}
|
|
27183
27205
|
}
|
|
27184
27206
|
}
|
|
27185
27207
|
return () => {
|
|
27186
|
-
|
|
27208
|
+
container2.removeEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
27187
27209
|
setTimeout(() => {
|
|
27188
27210
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT$1, EVENT_OPTIONS$3);
|
|
27189
|
-
|
|
27190
|
-
|
|
27211
|
+
container2.addEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
27212
|
+
container2.dispatchEvent(unmountEvent);
|
|
27191
27213
|
if (!unmountEvent.defaultPrevented) {
|
|
27192
27214
|
focus$1(previouslyFocusedElement ?? document.body, { select: true });
|
|
27193
27215
|
}
|
|
27194
|
-
|
|
27216
|
+
container2.removeEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
27195
27217
|
focusScopesStack$1.remove(focusScope);
|
|
27196
27218
|
}, 0);
|
|
27197
27219
|
};
|
|
27198
27220
|
}
|
|
27199
|
-
}, [
|
|
27221
|
+
}, [container2, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
27200
27222
|
const handleKeyDown = React__namespace.useCallback(
|
|
27201
27223
|
(event) => {
|
|
27202
27224
|
if (!loop && !trapped) return;
|
|
@@ -27204,11 +27226,11 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27204
27226
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
27205
27227
|
const focusedElement = document.activeElement;
|
|
27206
27228
|
if (isTabKey && focusedElement) {
|
|
27207
|
-
const
|
|
27208
|
-
const [first, last] = getTabbableEdges$1(
|
|
27229
|
+
const container22 = event.currentTarget;
|
|
27230
|
+
const [first, last] = getTabbableEdges$1(container22);
|
|
27209
27231
|
const hasTabbableElementsInside = first && last;
|
|
27210
27232
|
if (!hasTabbableElementsInside) {
|
|
27211
|
-
if (focusedElement ===
|
|
27233
|
+
if (focusedElement === container22) event.preventDefault();
|
|
27212
27234
|
} else {
|
|
27213
27235
|
if (!event.shiftKey && focusedElement === last) {
|
|
27214
27236
|
event.preventDefault();
|
|
@@ -27232,15 +27254,15 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27232
27254
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
27233
27255
|
}
|
|
27234
27256
|
}
|
|
27235
|
-
function getTabbableEdges$1(
|
|
27236
|
-
const candidates = getTabbableCandidates$1(
|
|
27237
|
-
const first = findVisible$1(candidates,
|
|
27238
|
-
const last = findVisible$1(candidates.reverse(),
|
|
27257
|
+
function getTabbableEdges$1(container2) {
|
|
27258
|
+
const candidates = getTabbableCandidates$1(container2);
|
|
27259
|
+
const first = findVisible$1(candidates, container2);
|
|
27260
|
+
const last = findVisible$1(candidates.reverse(), container2);
|
|
27239
27261
|
return [first, last];
|
|
27240
27262
|
}
|
|
27241
|
-
function getTabbableCandidates$1(
|
|
27263
|
+
function getTabbableCandidates$1(container2) {
|
|
27242
27264
|
const nodes = [];
|
|
27243
|
-
const walker2 = document.createTreeWalker(
|
|
27265
|
+
const walker2 = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
27244
27266
|
acceptNode: (node) => {
|
|
27245
27267
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
27246
27268
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -27250,9 +27272,9 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27250
27272
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
27251
27273
|
return nodes;
|
|
27252
27274
|
}
|
|
27253
|
-
function findVisible$1(elements,
|
|
27275
|
+
function findVisible$1(elements, container2) {
|
|
27254
27276
|
for (const element of elements) {
|
|
27255
|
-
if (!isHidden$1(element, { upTo:
|
|
27277
|
+
if (!isHidden$1(element, { upTo: container2 })) return element;
|
|
27256
27278
|
}
|
|
27257
27279
|
}
|
|
27258
27280
|
function isHidden$1(node, { upTo }) {
|
|
@@ -27309,8 +27331,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27309
27331
|
const { container: containerProp, ...portalProps } = props;
|
|
27310
27332
|
const [mounted, setMounted] = React__namespace.useState(false);
|
|
27311
27333
|
useLayoutEffect2(() => setMounted(true), []);
|
|
27312
|
-
const
|
|
27313
|
-
return
|
|
27334
|
+
const container2 = containerProp || mounted && globalThis?.document?.body;
|
|
27335
|
+
return container2 ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$2.div, { ...portalProps, ref: forwardedRef }), container2) : null;
|
|
27314
27336
|
});
|
|
27315
27337
|
Portal$5.displayName = PORTAL_NAME$6;
|
|
27316
27338
|
var count = 0;
|
|
@@ -28175,9 +28197,9 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28175
28197
|
forceMount: void 0
|
|
28176
28198
|
});
|
|
28177
28199
|
var DialogPortal$1 = (props) => {
|
|
28178
|
-
const { __scopeDialog, forceMount, children: children2, container } = props;
|
|
28200
|
+
const { __scopeDialog, forceMount, children: children2, container: container2 } = props;
|
|
28179
28201
|
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 }) })) });
|
|
28202
|
+
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
28203
|
};
|
|
28182
28204
|
DialogPortal$1.displayName = PORTAL_NAME$5;
|
|
28183
28205
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -28225,8 +28247,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28225
28247
|
const contentRef = React__namespace.useRef(null);
|
|
28226
28248
|
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
28227
28249
|
React__namespace.useEffect(() => {
|
|
28228
|
-
const
|
|
28229
|
-
if (
|
|
28250
|
+
const content2 = contentRef.current;
|
|
28251
|
+
if (content2) return hideOthers(content2);
|
|
28230
28252
|
}, []);
|
|
28231
28253
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28232
28254
|
DialogContentImpl,
|
|
@@ -30675,7 +30697,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
30675
30697
|
...contentProps
|
|
30676
30698
|
} = props;
|
|
30677
30699
|
const context = usePopperContext$1(CONTENT_NAME$6, __scopePopper);
|
|
30678
|
-
const [
|
|
30700
|
+
const [content2, setContent] = React__namespace.useState(null);
|
|
30679
30701
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
30680
30702
|
const [arrow3, setArrow] = React__namespace.useState(null);
|
|
30681
30703
|
const arrowSize = useSize(arrow3);
|
|
@@ -30741,8 +30763,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
30741
30763
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
30742
30764
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
30743
30765
|
useLayoutEffect2(() => {
|
|
30744
|
-
if (
|
|
30745
|
-
}, [
|
|
30766
|
+
if (content2) setContentZIndex(window.getComputedStyle(content2).zIndex);
|
|
30767
|
+
}, [content2]);
|
|
30746
30768
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30747
30769
|
"div",
|
|
30748
30770
|
{
|
|
@@ -31089,9 +31111,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31089
31111
|
forceMount: void 0
|
|
31090
31112
|
});
|
|
31091
31113
|
var TooltipPortal = (props) => {
|
|
31092
|
-
const { __scopeTooltip, forceMount, children: children2, container } = props;
|
|
31114
|
+
const { __scopeTooltip, forceMount, children: children2, container: container2 } = props;
|
|
31093
31115
|
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 }) }) });
|
|
31116
|
+
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
31117
|
};
|
|
31096
31118
|
TooltipPortal.displayName = PORTAL_NAME$4;
|
|
31097
31119
|
var CONTENT_NAME$5 = "TooltipContent";
|
|
@@ -31110,7 +31132,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31110
31132
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
31111
31133
|
const [pointerGraceArea, setPointerGraceArea] = React__namespace.useState(null);
|
|
31112
31134
|
const { trigger, onClose } = context;
|
|
31113
|
-
const
|
|
31135
|
+
const content2 = ref.current;
|
|
31114
31136
|
const { onPointerInTransitChange } = providerContext;
|
|
31115
31137
|
const handleRemoveGraceArea = React__namespace.useCallback(() => {
|
|
31116
31138
|
setPointerGraceArea(null);
|
|
@@ -31133,23 +31155,23 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31133
31155
|
return () => handleRemoveGraceArea();
|
|
31134
31156
|
}, [handleRemoveGraceArea]);
|
|
31135
31157
|
React__namespace.useEffect(() => {
|
|
31136
|
-
if (trigger &&
|
|
31137
|
-
const handleTriggerLeave = (event) => handleCreateGraceArea(event,
|
|
31158
|
+
if (trigger && content2) {
|
|
31159
|
+
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content2);
|
|
31138
31160
|
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
|
31139
31161
|
trigger.addEventListener("pointerleave", handleTriggerLeave);
|
|
31140
|
-
|
|
31162
|
+
content2.addEventListener("pointerleave", handleContentLeave);
|
|
31141
31163
|
return () => {
|
|
31142
31164
|
trigger.removeEventListener("pointerleave", handleTriggerLeave);
|
|
31143
|
-
|
|
31165
|
+
content2.removeEventListener("pointerleave", handleContentLeave);
|
|
31144
31166
|
};
|
|
31145
31167
|
}
|
|
31146
|
-
}, [trigger,
|
|
31168
|
+
}, [trigger, content2, handleCreateGraceArea, handleRemoveGraceArea]);
|
|
31147
31169
|
React__namespace.useEffect(() => {
|
|
31148
31170
|
if (pointerGraceArea) {
|
|
31149
31171
|
const handleTrackPointerGrace = (event) => {
|
|
31150
31172
|
const target = event.target;
|
|
31151
31173
|
const pointerPosition = { x: event.clientX, y: event.clientY };
|
|
31152
|
-
const hasEnteredTarget = trigger?.contains(target) ||
|
|
31174
|
+
const hasEnteredTarget = trigger?.contains(target) || content2?.contains(target);
|
|
31153
31175
|
const isPointerOutsideGraceArea = !isPointInPolygon$2(pointerPosition, pointerGraceArea);
|
|
31154
31176
|
if (hasEnteredTarget) {
|
|
31155
31177
|
handleRemoveGraceArea();
|
|
@@ -31161,7 +31183,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31161
31183
|
document.addEventListener("pointermove", handleTrackPointerGrace);
|
|
31162
31184
|
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
31163
31185
|
}
|
|
31164
|
-
}, [trigger,
|
|
31186
|
+
}, [trigger, content2, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
31165
31187
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipContentImpl, { ...props, ref: composedRefs });
|
|
31166
31188
|
});
|
|
31167
31189
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
@@ -31377,7 +31399,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31377
31399
|
}
|
|
31378
31400
|
) }));
|
|
31379
31401
|
TooltipContent.displayName = Content2$4.displayName;
|
|
31380
|
-
const InfoTooltip = ({ title, alertText, Icon: Icon2 = Info, onClick }) => {
|
|
31402
|
+
const InfoTooltip = ({ title: title2, alertText, Icon: Icon2 = Info, onClick }) => {
|
|
31381
31403
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
31382
31404
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
31383
31405
|
Icon2,
|
|
@@ -31408,7 +31430,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31408
31430
|
) }),
|
|
31409
31431
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-amber-500", children: alertText })
|
|
31410
31432
|
] }),
|
|
31411
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] leading-relaxed text-primary-foreground/90", children:
|
|
31433
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] leading-relaxed text-primary-foreground/90", children: title2 })
|
|
31412
31434
|
] }) })
|
|
31413
31435
|
] }) });
|
|
31414
31436
|
};
|
|
@@ -33121,7 +33143,23 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
33121
33143
|
function formatDistanceToNow(date2, options2) {
|
|
33122
33144
|
return formatDistance$1(date2, constructNow(date2), options2);
|
|
33123
33145
|
}
|
|
33124
|
-
const
|
|
33146
|
+
const base$1 = "reach-styles-module__base___WFahB";
|
|
33147
|
+
const secondary$1 = "reach-styles-module__secondary___VQ4iH";
|
|
33148
|
+
const destructive$1 = "reach-styles-module__destructive___RLaRD";
|
|
33149
|
+
const outline$1 = "reach-styles-module__outline___L2VtW";
|
|
33150
|
+
const google = "reach-styles-module__google___HcEij";
|
|
33151
|
+
const date = "reach-styles-module__date___-6BC4";
|
|
33152
|
+
const container = "reach-styles-module__container___6PQqs";
|
|
33153
|
+
const styles$2 = {
|
|
33154
|
+
base: base$1,
|
|
33155
|
+
"default": "reach-styles-module__default___zeGU1",
|
|
33156
|
+
secondary: secondary$1,
|
|
33157
|
+
destructive: destructive$1,
|
|
33158
|
+
outline: outline$1,
|
|
33159
|
+
google,
|
|
33160
|
+
date,
|
|
33161
|
+
container
|
|
33162
|
+
};
|
|
33125
33163
|
const badgeVariants = cva([styles$2.base], {
|
|
33126
33164
|
variants: {
|
|
33127
33165
|
variant: {
|
|
@@ -34568,11 +34606,11 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34568
34606
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
34569
34607
|
const focusedElement = document.activeElement;
|
|
34570
34608
|
if (isTabKey && focusedElement) {
|
|
34571
|
-
const
|
|
34572
|
-
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(
|
|
34609
|
+
const container2 = event.currentTarget;
|
|
34610
|
+
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container2);
|
|
34573
34611
|
const hasTabbableElementsInside = first && last;
|
|
34574
34612
|
if (!hasTabbableElementsInside) {
|
|
34575
|
-
if (focusedElement ===
|
|
34613
|
+
if (focusedElement === container2) event.preventDefault();
|
|
34576
34614
|
} else {
|
|
34577
34615
|
if (!event.shiftKey && focusedElement === last) {
|
|
34578
34616
|
event.preventDefault();
|
|
@@ -34608,18 +34646,18 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34608
34646
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
34609
34647
|
}
|
|
34610
34648
|
}
|
|
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(),
|
|
34649
|
+
function $d3863c46a17e8a28$var$getTabbableEdges(container2) {
|
|
34650
|
+
const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container2);
|
|
34651
|
+
const first = $d3863c46a17e8a28$var$findVisible(candidates, container2);
|
|
34652
|
+
const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container2);
|
|
34615
34653
|
return [
|
|
34616
34654
|
first,
|
|
34617
34655
|
last
|
|
34618
34656
|
];
|
|
34619
34657
|
}
|
|
34620
|
-
function $d3863c46a17e8a28$var$getTabbableCandidates(
|
|
34658
|
+
function $d3863c46a17e8a28$var$getTabbableCandidates(container2) {
|
|
34621
34659
|
const nodes = [];
|
|
34622
|
-
const walker2 = document.createTreeWalker(
|
|
34660
|
+
const walker2 = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
34623
34661
|
acceptNode: (node) => {
|
|
34624
34662
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
34625
34663
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -34629,10 +34667,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34629
34667
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
34630
34668
|
return nodes;
|
|
34631
34669
|
}
|
|
34632
|
-
function $d3863c46a17e8a28$var$findVisible(elements,
|
|
34670
|
+
function $d3863c46a17e8a28$var$findVisible(elements, container2) {
|
|
34633
34671
|
for (const element of elements) {
|
|
34634
34672
|
if (!$d3863c46a17e8a28$var$isHidden(element, {
|
|
34635
|
-
upTo:
|
|
34673
|
+
upTo: container2
|
|
34636
34674
|
})) return element;
|
|
34637
34675
|
}
|
|
34638
34676
|
}
|
|
@@ -34689,10 +34727,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34689
34727
|
}
|
|
34690
34728
|
const $f1701beae083dbae$export$602eac185826482c = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
34691
34729
|
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
|
|
34730
|
+
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;
|
|
34731
|
+
return container2 ? /* @__PURE__ */ ReactDOM.createPortal(/* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
|
|
34694
34732
|
ref: forwardedRef
|
|
34695
|
-
})),
|
|
34733
|
+
})), container2) : null;
|
|
34696
34734
|
});
|
|
34697
34735
|
const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React.useLayoutEffect : () => {
|
|
34698
34736
|
};
|
|
@@ -35159,7 +35197,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35159
35197
|
forceMount: void 0
|
|
35160
35198
|
});
|
|
35161
35199
|
const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props) => {
|
|
35162
|
-
const { __scopeDialog, forceMount, children: children2, container } = props;
|
|
35200
|
+
const { __scopeDialog, forceMount, children: children2, container: container2 } = props;
|
|
35163
35201
|
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, __scopeDialog);
|
|
35164
35202
|
return /* @__PURE__ */ React.createElement($5d3850c4d0b4e6c7$var$PortalProvider, {
|
|
35165
35203
|
scope: __scopeDialog,
|
|
@@ -35170,7 +35208,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35170
35208
|
present: forceMount || context.open
|
|
35171
35209
|
}, /* @__PURE__ */ React.createElement($f1701beae083dbae$export$602eac185826482c, {
|
|
35172
35210
|
asChild: true,
|
|
35173
|
-
container
|
|
35211
|
+
container: container2
|
|
35174
35212
|
}, child))
|
|
35175
35213
|
));
|
|
35176
35214
|
};
|
|
@@ -35229,8 +35267,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35229
35267
|
const contentRef = React.useRef(null);
|
|
35230
35268
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.contentRef, contentRef);
|
|
35231
35269
|
React.useEffect(() => {
|
|
35232
|
-
const
|
|
35233
|
-
if (
|
|
35270
|
+
const content2 = contentRef.current;
|
|
35271
|
+
if (content2) return hideOthers(content2);
|
|
35234
35272
|
}, []);
|
|
35235
35273
|
return /* @__PURE__ */ React.createElement($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, {
|
|
35236
35274
|
ref: composedRefs,
|
|
@@ -35747,7 +35785,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35747
35785
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
35748
35786
|
...scopeProps
|
|
35749
35787
|
} = props;
|
|
35750
|
-
const [
|
|
35788
|
+
const [container2, setContainer] = React__namespace.useState(null);
|
|
35751
35789
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
35752
35790
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
35753
35791
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
@@ -35764,69 +35802,69 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35764
35802
|
React__namespace.useEffect(() => {
|
|
35765
35803
|
if (trapped) {
|
|
35766
35804
|
let handleFocusIn2 = function(event) {
|
|
35767
|
-
if (focusScope.paused || !
|
|
35805
|
+
if (focusScope.paused || !container2) return;
|
|
35768
35806
|
const target = event.target;
|
|
35769
|
-
if (
|
|
35807
|
+
if (container2.contains(target)) {
|
|
35770
35808
|
lastFocusedElementRef.current = target;
|
|
35771
35809
|
} else {
|
|
35772
35810
|
focus(lastFocusedElementRef.current, { select: true });
|
|
35773
35811
|
}
|
|
35774
35812
|
}, handleFocusOut2 = function(event) {
|
|
35775
|
-
if (focusScope.paused || !
|
|
35813
|
+
if (focusScope.paused || !container2) return;
|
|
35776
35814
|
const relatedTarget = event.relatedTarget;
|
|
35777
35815
|
if (relatedTarget === null) return;
|
|
35778
|
-
if (!
|
|
35816
|
+
if (!container2.contains(relatedTarget)) {
|
|
35779
35817
|
focus(lastFocusedElementRef.current, { select: true });
|
|
35780
35818
|
}
|
|
35781
35819
|
}, handleMutations2 = function(mutations) {
|
|
35782
35820
|
const focusedElement = document.activeElement;
|
|
35783
35821
|
if (focusedElement !== document.body) return;
|
|
35784
35822
|
for (const mutation of mutations) {
|
|
35785
|
-
if (mutation.removedNodes.length > 0) focus(
|
|
35823
|
+
if (mutation.removedNodes.length > 0) focus(container2);
|
|
35786
35824
|
}
|
|
35787
35825
|
};
|
|
35788
35826
|
document.addEventListener("focusin", handleFocusIn2);
|
|
35789
35827
|
document.addEventListener("focusout", handleFocusOut2);
|
|
35790
35828
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
35791
|
-
if (
|
|
35829
|
+
if (container2) mutationObserver.observe(container2, { childList: true, subtree: true });
|
|
35792
35830
|
return () => {
|
|
35793
35831
|
document.removeEventListener("focusin", handleFocusIn2);
|
|
35794
35832
|
document.removeEventListener("focusout", handleFocusOut2);
|
|
35795
35833
|
mutationObserver.disconnect();
|
|
35796
35834
|
};
|
|
35797
35835
|
}
|
|
35798
|
-
}, [trapped,
|
|
35836
|
+
}, [trapped, container2, focusScope.paused]);
|
|
35799
35837
|
React__namespace.useEffect(() => {
|
|
35800
|
-
if (
|
|
35838
|
+
if (container2) {
|
|
35801
35839
|
focusScopesStack.add(focusScope);
|
|
35802
35840
|
const previouslyFocusedElement = document.activeElement;
|
|
35803
|
-
const hasFocusedCandidate =
|
|
35841
|
+
const hasFocusedCandidate = container2.contains(previouslyFocusedElement);
|
|
35804
35842
|
if (!hasFocusedCandidate) {
|
|
35805
35843
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS$2);
|
|
35806
|
-
|
|
35807
|
-
|
|
35844
|
+
container2.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
35845
|
+
container2.dispatchEvent(mountEvent);
|
|
35808
35846
|
if (!mountEvent.defaultPrevented) {
|
|
35809
|
-
focusFirst$2(removeLinks(getTabbableCandidates(
|
|
35847
|
+
focusFirst$2(removeLinks(getTabbableCandidates(container2)), { select: true });
|
|
35810
35848
|
if (document.activeElement === previouslyFocusedElement) {
|
|
35811
|
-
focus(
|
|
35849
|
+
focus(container2);
|
|
35812
35850
|
}
|
|
35813
35851
|
}
|
|
35814
35852
|
}
|
|
35815
35853
|
return () => {
|
|
35816
|
-
|
|
35854
|
+
container2.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
35817
35855
|
setTimeout(() => {
|
|
35818
35856
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS$2);
|
|
35819
|
-
|
|
35820
|
-
|
|
35857
|
+
container2.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
35858
|
+
container2.dispatchEvent(unmountEvent);
|
|
35821
35859
|
if (!unmountEvent.defaultPrevented) {
|
|
35822
35860
|
focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
35823
35861
|
}
|
|
35824
|
-
|
|
35862
|
+
container2.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
35825
35863
|
focusScopesStack.remove(focusScope);
|
|
35826
35864
|
}, 0);
|
|
35827
35865
|
};
|
|
35828
35866
|
}
|
|
35829
|
-
}, [
|
|
35867
|
+
}, [container2, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
35830
35868
|
const handleKeyDown = React__namespace.useCallback(
|
|
35831
35869
|
(event) => {
|
|
35832
35870
|
if (!loop && !trapped) return;
|
|
@@ -35834,11 +35872,11 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35834
35872
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
35835
35873
|
const focusedElement = document.activeElement;
|
|
35836
35874
|
if (isTabKey && focusedElement) {
|
|
35837
|
-
const
|
|
35838
|
-
const [first, last] = getTabbableEdges(
|
|
35875
|
+
const container22 = event.currentTarget;
|
|
35876
|
+
const [first, last] = getTabbableEdges(container22);
|
|
35839
35877
|
const hasTabbableElementsInside = first && last;
|
|
35840
35878
|
if (!hasTabbableElementsInside) {
|
|
35841
|
-
if (focusedElement ===
|
|
35879
|
+
if (focusedElement === container22) event.preventDefault();
|
|
35842
35880
|
} else {
|
|
35843
35881
|
if (!event.shiftKey && focusedElement === last) {
|
|
35844
35882
|
event.preventDefault();
|
|
@@ -35862,15 +35900,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35862
35900
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
35863
35901
|
}
|
|
35864
35902
|
}
|
|
35865
|
-
function getTabbableEdges(
|
|
35866
|
-
const candidates = getTabbableCandidates(
|
|
35867
|
-
const first = findVisible(candidates,
|
|
35868
|
-
const last = findVisible(candidates.reverse(),
|
|
35903
|
+
function getTabbableEdges(container2) {
|
|
35904
|
+
const candidates = getTabbableCandidates(container2);
|
|
35905
|
+
const first = findVisible(candidates, container2);
|
|
35906
|
+
const last = findVisible(candidates.reverse(), container2);
|
|
35869
35907
|
return [first, last];
|
|
35870
35908
|
}
|
|
35871
|
-
function getTabbableCandidates(
|
|
35909
|
+
function getTabbableCandidates(container2) {
|
|
35872
35910
|
const nodes = [];
|
|
35873
|
-
const walker2 = document.createTreeWalker(
|
|
35911
|
+
const walker2 = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
35874
35912
|
acceptNode: (node) => {
|
|
35875
35913
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
35876
35914
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -35880,9 +35918,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35880
35918
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
35881
35919
|
return nodes;
|
|
35882
35920
|
}
|
|
35883
|
-
function findVisible(elements,
|
|
35921
|
+
function findVisible(elements, container2) {
|
|
35884
35922
|
for (const element of elements) {
|
|
35885
|
-
if (!isHidden(element, { upTo:
|
|
35923
|
+
if (!isHidden(element, { upTo: container2 })) return element;
|
|
35886
35924
|
}
|
|
35887
35925
|
}
|
|
35888
35926
|
function isHidden(node, { upTo }) {
|
|
@@ -36019,9 +36057,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36019
36057
|
forceMount: void 0
|
|
36020
36058
|
});
|
|
36021
36059
|
var PopoverPortal = (props) => {
|
|
36022
|
-
const { __scopePopover, forceMount, children: children2, container } = props;
|
|
36060
|
+
const { __scopePopover, forceMount, children: children2, container: container2 } = props;
|
|
36023
36061
|
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 }) }) });
|
|
36062
|
+
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
36063
|
};
|
|
36026
36064
|
PopoverPortal.displayName = PORTAL_NAME$3;
|
|
36027
36065
|
var CONTENT_NAME$4 = "PopoverContent";
|
|
@@ -36041,8 +36079,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36041
36079
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
36042
36080
|
const isRightClickOutsideRef = React__namespace.useRef(false);
|
|
36043
36081
|
React__namespace.useEffect(() => {
|
|
36044
|
-
const
|
|
36045
|
-
if (
|
|
36082
|
+
const content2 = contentRef.current;
|
|
36083
|
+
if (content2) return hideOthers(content2);
|
|
36046
36084
|
}, []);
|
|
36047
36085
|
return /* @__PURE__ */ jsxRuntime.jsx(ReactRemoveScroll$1, { as: Slot$3, allowPinchZoom: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36048
36086
|
PopoverContentImpl,
|
|
@@ -36948,7 +36986,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36948
36986
|
...contentProps
|
|
36949
36987
|
} = props;
|
|
36950
36988
|
const context = useSelectContext(CONTENT_NAME$3, __scopeSelect);
|
|
36951
|
-
const [
|
|
36989
|
+
const [content2, setContent] = React__namespace.useState(null);
|
|
36952
36990
|
const [viewport, setViewport] = React__namespace.useState(null);
|
|
36953
36991
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
36954
36992
|
const [selectedItem, setSelectedItem] = React__namespace.useState(null);
|
|
@@ -36959,8 +36997,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36959
36997
|
const [isPositioned, setIsPositioned] = React__namespace.useState(false);
|
|
36960
36998
|
const firstValidItemFoundRef = React__namespace.useRef(false);
|
|
36961
36999
|
React__namespace.useEffect(() => {
|
|
36962
|
-
if (
|
|
36963
|
-
}, [
|
|
37000
|
+
if (content2) return hideOthers(content2);
|
|
37001
|
+
}, [content2]);
|
|
36964
37002
|
useFocusGuards();
|
|
36965
37003
|
const focusFirst2 = React__namespace.useCallback(
|
|
36966
37004
|
(candidates) => {
|
|
@@ -36979,8 +37017,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36979
37017
|
[getItems, viewport]
|
|
36980
37018
|
);
|
|
36981
37019
|
const focusSelectedItem = React__namespace.useCallback(
|
|
36982
|
-
() => focusFirst2([selectedItem,
|
|
36983
|
-
[focusFirst2, selectedItem,
|
|
37020
|
+
() => focusFirst2([selectedItem, content2]),
|
|
37021
|
+
[focusFirst2, selectedItem, content2]
|
|
36984
37022
|
);
|
|
36985
37023
|
React__namespace.useEffect(() => {
|
|
36986
37024
|
if (isPositioned) {
|
|
@@ -36989,7 +37027,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36989
37027
|
}, [isPositioned, focusSelectedItem]);
|
|
36990
37028
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
36991
37029
|
React__namespace.useEffect(() => {
|
|
36992
|
-
if (
|
|
37030
|
+
if (content2) {
|
|
36993
37031
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
36994
37032
|
const handlePointerMove = (event) => {
|
|
36995
37033
|
pointerMoveDelta = {
|
|
@@ -37001,7 +37039,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37001
37039
|
if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {
|
|
37002
37040
|
event.preventDefault();
|
|
37003
37041
|
} else {
|
|
37004
|
-
if (!
|
|
37042
|
+
if (!content2.contains(event.target)) {
|
|
37005
37043
|
onOpenChange(false);
|
|
37006
37044
|
}
|
|
37007
37045
|
}
|
|
@@ -37017,7 +37055,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37017
37055
|
document.removeEventListener("pointerup", handlePointerUp, { capture: true });
|
|
37018
37056
|
};
|
|
37019
37057
|
}
|
|
37020
|
-
}, [
|
|
37058
|
+
}, [content2, onOpenChange, triggerPointerDownPosRef]);
|
|
37021
37059
|
React__namespace.useEffect(() => {
|
|
37022
37060
|
const close2 = () => onOpenChange(false);
|
|
37023
37061
|
window.addEventListener("blur", close2);
|
|
@@ -37046,7 +37084,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37046
37084
|
},
|
|
37047
37085
|
[context.value]
|
|
37048
37086
|
);
|
|
37049
|
-
const handleItemLeave = React__namespace.useCallback(() =>
|
|
37087
|
+
const handleItemLeave = React__namespace.useCallback(() => content2?.focus(), [content2]);
|
|
37050
37088
|
const itemTextRefCallback = React__namespace.useCallback(
|
|
37051
37089
|
(node, value, disabled) => {
|
|
37052
37090
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
@@ -37074,7 +37112,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37074
37112
|
SelectContentProvider,
|
|
37075
37113
|
{
|
|
37076
37114
|
scope: __scopeSelect,
|
|
37077
|
-
content,
|
|
37115
|
+
content: content2,
|
|
37078
37116
|
viewport,
|
|
37079
37117
|
onViewportChange: setViewport,
|
|
37080
37118
|
itemRefCallback,
|
|
@@ -37163,16 +37201,16 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37163
37201
|
const context = useSelectContext(CONTENT_NAME$3, __scopeSelect);
|
|
37164
37202
|
const contentContext = useSelectContentContext(CONTENT_NAME$3, __scopeSelect);
|
|
37165
37203
|
const [contentWrapper, setContentWrapper] = React__namespace.useState(null);
|
|
37166
|
-
const [
|
|
37204
|
+
const [content2, setContent] = React__namespace.useState(null);
|
|
37167
37205
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
37168
37206
|
const getItems = useCollection$2(__scopeSelect);
|
|
37169
37207
|
const shouldExpandOnScrollRef = React__namespace.useRef(false);
|
|
37170
37208
|
const shouldRepositionRef = React__namespace.useRef(true);
|
|
37171
37209
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
37172
37210
|
const position = React__namespace.useCallback(() => {
|
|
37173
|
-
if (context.trigger && context.valueNode && contentWrapper &&
|
|
37211
|
+
if (context.trigger && context.valueNode && contentWrapper && content2 && viewport && selectedItem && selectedItemText) {
|
|
37174
37212
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
37175
|
-
const contentRect =
|
|
37213
|
+
const contentRect = content2.getBoundingClientRect();
|
|
37176
37214
|
const valueNodeRect = context.valueNode.getBoundingClientRect();
|
|
37177
37215
|
const itemTextRect = selectedItemText.getBoundingClientRect();
|
|
37178
37216
|
if (context.dir !== "rtl") {
|
|
@@ -37210,7 +37248,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37210
37248
|
const items = getItems();
|
|
37211
37249
|
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
37212
37250
|
const itemsHeight = viewport.scrollHeight;
|
|
37213
|
-
const contentStyles = window.getComputedStyle(
|
|
37251
|
+
const contentStyles = window.getComputedStyle(content2);
|
|
37214
37252
|
const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);
|
|
37215
37253
|
const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);
|
|
37216
37254
|
const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);
|
|
@@ -37230,7 +37268,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37230
37268
|
if (willAlignWithoutTopOverflow) {
|
|
37231
37269
|
const isLastItem = items.length > 0 && selectedItem === items[items.length - 1].ref.current;
|
|
37232
37270
|
contentWrapper.style.bottom = "0px";
|
|
37233
|
-
const viewportOffsetBottom =
|
|
37271
|
+
const viewportOffsetBottom = content2.clientHeight - viewport.offsetTop - viewport.offsetHeight;
|
|
37234
37272
|
const clampedTriggerMiddleToBottomEdge = Math.max(
|
|
37235
37273
|
triggerMiddleToBottomEdge,
|
|
37236
37274
|
selectedItemHalfHeight + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
@@ -37261,7 +37299,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37261
37299
|
context.trigger,
|
|
37262
37300
|
context.valueNode,
|
|
37263
37301
|
contentWrapper,
|
|
37264
|
-
|
|
37302
|
+
content2,
|
|
37265
37303
|
viewport,
|
|
37266
37304
|
selectedItem,
|
|
37267
37305
|
selectedItemText,
|
|
@@ -37271,8 +37309,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37271
37309
|
useLayoutEffect2(() => position(), [position]);
|
|
37272
37310
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
37273
37311
|
useLayoutEffect2(() => {
|
|
37274
|
-
if (
|
|
37275
|
-
}, [
|
|
37312
|
+
if (content2) setContentZIndex(window.getComputedStyle(content2).zIndex);
|
|
37313
|
+
}, [content2]);
|
|
37276
37314
|
const handleScrollButtonChange = React__namespace.useCallback(
|
|
37277
37315
|
(node) => {
|
|
37278
37316
|
if (node && shouldRepositionRef.current === true) {
|
|
@@ -39561,7 +39599,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39561
39599
|
var Menu$1 = (props) => {
|
|
39562
39600
|
const { __scopeMenu, open = false, children: children2, dir, onOpenChange, modal = true } = props;
|
|
39563
39601
|
const popperScope = usePopperScope(__scopeMenu);
|
|
39564
|
-
const [
|
|
39602
|
+
const [content2, setContent] = React__namespace.useState(null);
|
|
39565
39603
|
const isUsingKeyboardRef = React__namespace.useRef(false);
|
|
39566
39604
|
const handleOpenChange = useCallbackRef$1(onOpenChange);
|
|
39567
39605
|
const direction = useDirection(dir);
|
|
@@ -39585,7 +39623,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39585
39623
|
scope: __scopeMenu,
|
|
39586
39624
|
open,
|
|
39587
39625
|
onOpenChange: handleOpenChange,
|
|
39588
|
-
content,
|
|
39626
|
+
content: content2,
|
|
39589
39627
|
onContentChange: setContent,
|
|
39590
39628
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
39591
39629
|
MenuRootProvider,
|
|
@@ -39616,9 +39654,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39616
39654
|
forceMount: void 0
|
|
39617
39655
|
});
|
|
39618
39656
|
var MenuPortal$1 = (props) => {
|
|
39619
|
-
const { __scopeMenu, forceMount, children: children2, container } = props;
|
|
39657
|
+
const { __scopeMenu, forceMount, children: children2, container: container2 } = props;
|
|
39620
39658
|
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 }) }) });
|
|
39659
|
+
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
39660
|
};
|
|
39623
39661
|
MenuPortal$1.displayName = PORTAL_NAME$1;
|
|
39624
39662
|
var CONTENT_NAME$1 = "MenuContent";
|
|
@@ -39638,8 +39676,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39638
39676
|
const ref = React__namespace.useRef(null);
|
|
39639
39677
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
39640
39678
|
React__namespace.useEffect(() => {
|
|
39641
|
-
const
|
|
39642
|
-
if (
|
|
39679
|
+
const content2 = ref.current;
|
|
39680
|
+
if (content2) return hideOthers(content2);
|
|
39643
39681
|
}, []);
|
|
39644
39682
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39645
39683
|
MenuContentImpl,
|
|
@@ -39816,8 +39854,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39816
39854
|
if (event.key === "Tab") event.preventDefault();
|
|
39817
39855
|
if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
|
|
39818
39856
|
}
|
|
39819
|
-
const
|
|
39820
|
-
if (event.target !==
|
|
39857
|
+
const content2 = contentRef.current;
|
|
39858
|
+
if (event.target !== content2) return;
|
|
39821
39859
|
if (!FIRST_LAST_KEYS.includes(event.key)) return;
|
|
39822
39860
|
event.preventDefault();
|
|
39823
39861
|
const items = getItems().filter((item) => !item.disabled);
|
|
@@ -40743,7 +40781,27 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
40743
40781
|
)
|
|
40744
40782
|
] });
|
|
40745
40783
|
};
|
|
40746
|
-
const
|
|
40784
|
+
const base = "reach-styles-module__base___zJcoE";
|
|
40785
|
+
const destructive = "reach-styles-module__destructive___5EWhN";
|
|
40786
|
+
const outline = "reach-styles-module__outline___gj9sC";
|
|
40787
|
+
const secondary = "reach-styles-module__secondary___cN5Wj";
|
|
40788
|
+
const header = "reach-styles-module__header___-izE2";
|
|
40789
|
+
const title = "reach-styles-module__title___n1hA9";
|
|
40790
|
+
const description = "reach-styles-module__description___EvXM-";
|
|
40791
|
+
const content = "reach-styles-module__content___okv68";
|
|
40792
|
+
const footer = "reach-styles-module__footer___YA4U4";
|
|
40793
|
+
const styles = {
|
|
40794
|
+
base,
|
|
40795
|
+
"default": "reach-styles-module__default___88Q0d",
|
|
40796
|
+
destructive,
|
|
40797
|
+
outline,
|
|
40798
|
+
secondary,
|
|
40799
|
+
header,
|
|
40800
|
+
title,
|
|
40801
|
+
description,
|
|
40802
|
+
content,
|
|
40803
|
+
footer
|
|
40804
|
+
};
|
|
40747
40805
|
const cardVariants = cva(styles.base, {
|
|
40748
40806
|
variants: {
|
|
40749
40807
|
variant: {
|
|
@@ -42087,7 +42145,7 @@ ${message2 ?? ""}`);
|
|
|
42087
42145
|
iconDefinitions,
|
|
42088
42146
|
includeSegments,
|
|
42089
42147
|
excludeSegments,
|
|
42090
|
-
title = "Estimated Matches",
|
|
42148
|
+
title: title2 = "Estimated Matches",
|
|
42091
42149
|
subtitle
|
|
42092
42150
|
}) => {
|
|
42093
42151
|
const {
|
|
@@ -42113,7 +42171,7 @@ ${message2 ?? ""}`);
|
|
|
42113
42171
|
}, [data?.recipients]);
|
|
42114
42172
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full p-4", children: [
|
|
42115
42173
|
/* @__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:
|
|
42174
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-semibold text-gray-900", children: title2 }),
|
|
42117
42175
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-gray-500", children: subtitle })
|
|
42118
42176
|
] }),
|
|
42119
42177
|
/* @__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 +44612,10 @@ ${message2 ?? ""}`);
|
|
|
44554
44612
|
return jsxRuntime.jsx("div", { className: classNames.caption, style: styles2.caption, children: caption });
|
|
44555
44613
|
}
|
|
44556
44614
|
function Footer(props) {
|
|
44557
|
-
var _a = useDayPicker(),
|
|
44558
|
-
if (!
|
|
44615
|
+
var _a = useDayPicker(), footer2 = _a.footer, styles2 = _a.styles, tfoot = _a.classNames.tfoot;
|
|
44616
|
+
if (!footer2)
|
|
44559
44617
|
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:
|
|
44618
|
+
return jsxRuntime.jsx("tfoot", { className: tfoot, style: styles2.tfoot, children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 8, children: footer2 }) }) });
|
|
44561
44619
|
}
|
|
44562
44620
|
function getWeekdays(locale2, weekStartsOn, ISOWeek) {
|
|
44563
44621
|
var start = ISOWeek ? startOfISOWeek(/* @__PURE__ */ new Date()) : startOfWeek(/* @__PURE__ */ new Date(), { locale: locale2, weekStartsOn });
|
|
@@ -45365,15 +45423,15 @@ ${message2 ?? ""}`);
|
|
|
45365
45423
|
function WeekNumber(props) {
|
|
45366
45424
|
var weekNumber = props.number, dates2 = props.dates;
|
|
45367
45425
|
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
|
|
45426
|
+
var content2 = formatWeekNumber2(Number(weekNumber), { locale: locale2 });
|
|
45369
45427
|
if (!onWeekNumberClick) {
|
|
45370
|
-
return jsxRuntime.jsx("span", { className: classNames.weeknumber, style: styles2.weeknumber, children:
|
|
45428
|
+
return jsxRuntime.jsx("span", { className: classNames.weeknumber, style: styles2.weeknumber, children: content2 });
|
|
45371
45429
|
}
|
|
45372
45430
|
var label = labelWeekNumber2(Number(weekNumber), { locale: locale2 });
|
|
45373
45431
|
var handleClick = function(e2) {
|
|
45374
45432
|
onWeekNumberClick(weekNumber, dates2, e2);
|
|
45375
45433
|
};
|
|
45376
|
-
return jsxRuntime.jsx(Button$1, { name: "week-number", "aria-label": label, className: classNames.weeknumber, style: styles2.weeknumber, onClick: handleClick, children:
|
|
45434
|
+
return jsxRuntime.jsx(Button$1, { name: "week-number", "aria-label": label, className: classNames.weeknumber, style: styles2.weeknumber, onClick: handleClick, children: content2 });
|
|
45377
45435
|
}
|
|
45378
45436
|
function Row(props) {
|
|
45379
45437
|
var _a, _b;
|
|
@@ -46394,13 +46452,13 @@ ${message2 ?? ""}`);
|
|
|
46394
46452
|
] }) })
|
|
46395
46453
|
] });
|
|
46396
46454
|
};
|
|
46397
|
-
const TitleAndContent = ({ title, subtitle, content }) => {
|
|
46455
|
+
const TitleAndContent = ({ title: title2, subtitle, content: content2 }) => {
|
|
46398
46456
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 w-full p-6 rounded-xl bg-gray-100 ", children: [
|
|
46399
46457
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
46400
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-semibold", children:
|
|
46458
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-semibold", children: title2 }),
|
|
46401
46459
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-600 mt-1", children: subtitle })
|
|
46402
46460
|
] }),
|
|
46403
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white rounded-2xl w-full border border-gray-200 p-6 relative", children:
|
|
46461
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white rounded-2xl w-full border border-gray-200 p-6 relative", children: content2 })
|
|
46404
46462
|
] });
|
|
46405
46463
|
};
|
|
46406
46464
|
const EditAutomationPopup = ({
|
|
@@ -47362,15 +47420,15 @@ ${message2 ?? ""}`);
|
|
|
47362
47420
|
style2.textContent = cssRules;
|
|
47363
47421
|
pip.document.head.appendChild(style2);
|
|
47364
47422
|
} catch (e2) {
|
|
47365
|
-
const
|
|
47423
|
+
const link2 = document.createElement("link");
|
|
47366
47424
|
if (styleSheet.href == null) {
|
|
47367
47425
|
return;
|
|
47368
47426
|
}
|
|
47369
|
-
|
|
47370
|
-
|
|
47371
|
-
|
|
47372
|
-
|
|
47373
|
-
pip.document.head.appendChild(
|
|
47427
|
+
link2.rel = "stylesheet";
|
|
47428
|
+
link2.type = styleSheet.type;
|
|
47429
|
+
link2.media = styleSheet.media.toString();
|
|
47430
|
+
link2.href = styleSheet.href;
|
|
47431
|
+
pip.document.head.appendChild(link2);
|
|
47374
47432
|
}
|
|
47375
47433
|
});
|
|
47376
47434
|
delegateEvents(["focusin", "focusout", "pointermove", "keydown", "pointerdown", "pointerup", "click", "mousedown", "input"], pip.document);
|
|
@@ -48652,11 +48710,11 @@ ${message2 ?? ""}`);
|
|
|
48652
48710
|
var TABBABLE_ELEMENT_SELECTOR = tabbableElements.join(
|
|
48653
48711
|
':not([hidden]):not([tabindex="-1"]),'
|
|
48654
48712
|
);
|
|
48655
|
-
function getAllTabbableIn(
|
|
48656
|
-
const elements = Array.from(
|
|
48713
|
+
function getAllTabbableIn(container2, includeContainer) {
|
|
48714
|
+
const elements = Array.from(container2.querySelectorAll(FOCUSABLE_ELEMENT_SELECTOR));
|
|
48657
48715
|
const tabbableElements2 = elements.filter(isTabbable);
|
|
48658
|
-
if (includeContainer && isTabbable(
|
|
48659
|
-
tabbableElements2.unshift(
|
|
48716
|
+
if (includeContainer && isTabbable(container2)) {
|
|
48717
|
+
tabbableElements2.unshift(container2);
|
|
48660
48718
|
}
|
|
48661
48719
|
tabbableElements2.forEach((element, i2) => {
|
|
48662
48720
|
if (isFrame(element) && element.contentDocument) {
|
|
@@ -52448,12 +52506,12 @@ ${message2 ?? ""}`);
|
|
|
52448
52506
|
});
|
|
52449
52507
|
createEffect(() => {
|
|
52450
52508
|
const positioner = positionerRef();
|
|
52451
|
-
const
|
|
52452
|
-
if (!positioner || !
|
|
52509
|
+
const content2 = mergedProps.contentRef?.();
|
|
52510
|
+
if (!positioner || !content2) {
|
|
52453
52511
|
return;
|
|
52454
52512
|
}
|
|
52455
52513
|
queueMicrotask(() => {
|
|
52456
|
-
positioner.style.zIndex = getComputedStyle(
|
|
52514
|
+
positioner.style.zIndex = getComputedStyle(content2).zIndex;
|
|
52457
52515
|
});
|
|
52458
52516
|
});
|
|
52459
52517
|
const context = {
|
|
@@ -52519,9 +52577,9 @@ ${message2 ?? ""}`);
|
|
|
52519
52577
|
};
|
|
52520
52578
|
const onPointerDown = (e2) => {
|
|
52521
52579
|
function handler() {
|
|
52522
|
-
const
|
|
52580
|
+
const container2 = ref();
|
|
52523
52581
|
const target = e2.target;
|
|
52524
|
-
if (!
|
|
52582
|
+
if (!container2 || !target || !isEventOutside(e2)) {
|
|
52525
52583
|
return;
|
|
52526
52584
|
}
|
|
52527
52585
|
const handler2 = composeEventHandlers([
|
|
@@ -52553,9 +52611,9 @@ ${message2 ?? ""}`);
|
|
|
52553
52611
|
}
|
|
52554
52612
|
};
|
|
52555
52613
|
const onFocusIn = (e2) => {
|
|
52556
|
-
const
|
|
52614
|
+
const container2 = ref();
|
|
52557
52615
|
const target = e2.target;
|
|
52558
|
-
if (!
|
|
52616
|
+
if (!container2 || !target || !isEventOutside(e2)) {
|
|
52559
52617
|
return;
|
|
52560
52618
|
}
|
|
52561
52619
|
const handler = composeEventHandlers([
|
|
@@ -53268,11 +53326,11 @@ ${message2 ?? ""}`);
|
|
|
53268
53326
|
return element;
|
|
53269
53327
|
};
|
|
53270
53328
|
const tabbables = () => {
|
|
53271
|
-
const
|
|
53272
|
-
if (!
|
|
53329
|
+
const container2 = ref();
|
|
53330
|
+
if (!container2) {
|
|
53273
53331
|
return [];
|
|
53274
53332
|
}
|
|
53275
|
-
return getAllTabbableIn(
|
|
53333
|
+
return getAllTabbableIn(container2, true).filter((el) => !el.hasAttribute("data-focus-trap"));
|
|
53276
53334
|
};
|
|
53277
53335
|
const firstTabbable = () => {
|
|
53278
53336
|
const items = tabbables();
|
|
@@ -53283,60 +53341,60 @@ ${message2 ?? ""}`);
|
|
|
53283
53341
|
return items.length > 0 ? items[items.length - 1] : null;
|
|
53284
53342
|
};
|
|
53285
53343
|
const shouldPreventUnmountAutoFocus = () => {
|
|
53286
|
-
const
|
|
53287
|
-
if (!
|
|
53344
|
+
const container2 = ref();
|
|
53345
|
+
if (!container2) {
|
|
53288
53346
|
return false;
|
|
53289
53347
|
}
|
|
53290
|
-
const activeElement = getActiveElement(
|
|
53348
|
+
const activeElement = getActiveElement(container2);
|
|
53291
53349
|
if (!activeElement) {
|
|
53292
53350
|
return false;
|
|
53293
53351
|
}
|
|
53294
|
-
if (contains(
|
|
53352
|
+
if (contains(container2, activeElement)) {
|
|
53295
53353
|
return false;
|
|
53296
53354
|
}
|
|
53297
53355
|
return isFocusable(activeElement);
|
|
53298
53356
|
};
|
|
53299
53357
|
createEffect(() => {
|
|
53300
|
-
const
|
|
53301
|
-
if (!
|
|
53358
|
+
const container2 = ref();
|
|
53359
|
+
if (!container2) {
|
|
53302
53360
|
return;
|
|
53303
53361
|
}
|
|
53304
53362
|
focusScopeStack.add(focusScope);
|
|
53305
|
-
const previouslyFocusedElement = getActiveElement(
|
|
53306
|
-
const hasFocusedCandidate = contains(
|
|
53363
|
+
const previouslyFocusedElement = getActiveElement(container2);
|
|
53364
|
+
const hasFocusedCandidate = contains(container2, previouslyFocusedElement);
|
|
53307
53365
|
if (!hasFocusedCandidate) {
|
|
53308
53366
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT_EVENT, EVENT_OPTIONS);
|
|
53309
|
-
|
|
53310
|
-
|
|
53367
|
+
container2.addEventListener(AUTOFOCUS_ON_MOUNT_EVENT, onMountAutoFocus);
|
|
53368
|
+
container2.dispatchEvent(mountEvent);
|
|
53311
53369
|
if (!mountEvent.defaultPrevented) {
|
|
53312
53370
|
setTimeout(() => {
|
|
53313
53371
|
focusWithoutScrolling(firstTabbable());
|
|
53314
|
-
if (getActiveElement(
|
|
53315
|
-
focusWithoutScrolling(
|
|
53372
|
+
if (getActiveElement(container2) === previouslyFocusedElement) {
|
|
53373
|
+
focusWithoutScrolling(container2);
|
|
53316
53374
|
}
|
|
53317
53375
|
}, 0);
|
|
53318
53376
|
}
|
|
53319
53377
|
}
|
|
53320
53378
|
onCleanup(() => {
|
|
53321
|
-
|
|
53379
|
+
container2.removeEventListener(AUTOFOCUS_ON_MOUNT_EVENT, onMountAutoFocus);
|
|
53322
53380
|
setTimeout(() => {
|
|
53323
53381
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT_EVENT, EVENT_OPTIONS);
|
|
53324
53382
|
if (shouldPreventUnmountAutoFocus()) {
|
|
53325
53383
|
unmountEvent.preventDefault();
|
|
53326
53384
|
}
|
|
53327
|
-
|
|
53328
|
-
|
|
53385
|
+
container2.addEventListener(AUTOFOCUS_ON_UNMOUNT_EVENT, onUnmountAutoFocus);
|
|
53386
|
+
container2.dispatchEvent(unmountEvent);
|
|
53329
53387
|
if (!unmountEvent.defaultPrevented) {
|
|
53330
53388
|
focusWithoutScrolling(previouslyFocusedElement ?? ownerDocument().body);
|
|
53331
53389
|
}
|
|
53332
|
-
|
|
53390
|
+
container2.removeEventListener(AUTOFOCUS_ON_UNMOUNT_EVENT, onUnmountAutoFocus);
|
|
53333
53391
|
focusScopeStack.remove(focusScope);
|
|
53334
53392
|
}, 0);
|
|
53335
53393
|
});
|
|
53336
53394
|
});
|
|
53337
53395
|
createEffect(() => {
|
|
53338
|
-
const
|
|
53339
|
-
if (!
|
|
53396
|
+
const container2 = ref();
|
|
53397
|
+
if (!container2 || !access(props.trapFocus) || isPaused()) {
|
|
53340
53398
|
return;
|
|
53341
53399
|
}
|
|
53342
53400
|
const onFocusIn = (event) => {
|
|
@@ -53344,7 +53402,7 @@ ${message2 ?? ""}`);
|
|
|
53344
53402
|
if (target?.closest(`[${DATA_TOP_LAYER_ATTR}]`)) {
|
|
53345
53403
|
return;
|
|
53346
53404
|
}
|
|
53347
|
-
if (contains(
|
|
53405
|
+
if (contains(container2, target)) {
|
|
53348
53406
|
lastFocusedElement = target;
|
|
53349
53407
|
} else {
|
|
53350
53408
|
focusWithoutScrolling(lastFocusedElement);
|
|
@@ -53352,11 +53410,11 @@ ${message2 ?? ""}`);
|
|
|
53352
53410
|
};
|
|
53353
53411
|
const onFocusOut = (event) => {
|
|
53354
53412
|
const relatedTarget = event.relatedTarget;
|
|
53355
|
-
const target = relatedTarget ?? getActiveElement(
|
|
53413
|
+
const target = relatedTarget ?? getActiveElement(container2);
|
|
53356
53414
|
if (target?.closest(`[${DATA_TOP_LAYER_ATTR}]`)) {
|
|
53357
53415
|
return;
|
|
53358
53416
|
}
|
|
53359
|
-
if (!contains(
|
|
53417
|
+
if (!contains(container2, target)) {
|
|
53360
53418
|
focusWithoutScrolling(lastFocusedElement);
|
|
53361
53419
|
}
|
|
53362
53420
|
};
|
|
@@ -53368,14 +53426,14 @@ ${message2 ?? ""}`);
|
|
|
53368
53426
|
});
|
|
53369
53427
|
});
|
|
53370
53428
|
createEffect(() => {
|
|
53371
|
-
const
|
|
53372
|
-
if (!
|
|
53429
|
+
const container2 = ref();
|
|
53430
|
+
if (!container2 || !access(props.trapFocus) || isPaused()) {
|
|
53373
53431
|
return;
|
|
53374
53432
|
}
|
|
53375
53433
|
const startSentinel = createSentinel();
|
|
53376
|
-
|
|
53434
|
+
container2.insertAdjacentElement("afterbegin", startSentinel);
|
|
53377
53435
|
const endSentinel = createSentinel();
|
|
53378
|
-
|
|
53436
|
+
container2.insertAdjacentElement("beforeend", endSentinel);
|
|
53379
53437
|
function onFocus(event) {
|
|
53380
53438
|
const first = firstTabbable();
|
|
53381
53439
|
const last = lastTabbable();
|
|
@@ -53391,15 +53449,15 @@ ${message2 ?? ""}`);
|
|
|
53391
53449
|
for (const mutation of mutations) {
|
|
53392
53450
|
if (mutation.previousSibling === endSentinel) {
|
|
53393
53451
|
endSentinel.remove();
|
|
53394
|
-
|
|
53452
|
+
container2.insertAdjacentElement("beforeend", endSentinel);
|
|
53395
53453
|
}
|
|
53396
53454
|
if (mutation.nextSibling === startSentinel) {
|
|
53397
53455
|
startSentinel.remove();
|
|
53398
|
-
|
|
53456
|
+
container2.insertAdjacentElement("afterbegin", startSentinel);
|
|
53399
53457
|
}
|
|
53400
53458
|
}
|
|
53401
53459
|
});
|
|
53402
|
-
observer.observe(
|
|
53460
|
+
observer.observe(container2, {
|
|
53403
53461
|
childList: true,
|
|
53404
53462
|
subtree: false
|
|
53405
53463
|
});
|
|
@@ -54621,9 +54679,9 @@ ${message2 ?? ""}`);
|
|
|
54621
54679
|
disclosureState.toggle();
|
|
54622
54680
|
};
|
|
54623
54681
|
const _focusContent = () => {
|
|
54624
|
-
const
|
|
54625
|
-
if (
|
|
54626
|
-
focusWithoutScrolling(
|
|
54682
|
+
const content2 = contentRef();
|
|
54683
|
+
if (content2) {
|
|
54684
|
+
focusWithoutScrolling(content2);
|
|
54627
54685
|
listState.selectionManager().setFocused(true);
|
|
54628
54686
|
listState.selectionManager().setFocusedKey(void 0);
|
|
54629
54687
|
}
|