@embedreach/components 0.1.39 → 0.1.41
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 +177 -227
- package/dist/index.umd.js +228 -278
- 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 content;
|
|
4323
4323
|
let hydrating = !!sharedConfig.context;
|
|
4324
4324
|
createEffect(
|
|
4325
4325
|
() => {
|
|
4326
4326
|
if (hydrating)
|
|
4327
4327
|
getOwner().user = hydrating = false;
|
|
4328
|
-
|
|
4328
|
+
content || (content = 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() ? content() : dispose2(), null));
|
|
4334
4334
|
onCleanup(cleanup);
|
|
4335
4335
|
} else {
|
|
4336
|
-
const
|
|
4336
|
+
const container = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container.attachShadow ? container.attachShadow({
|
|
4337
4337
|
mode: "open"
|
|
4338
|
-
}) :
|
|
4339
|
-
Object.defineProperty(
|
|
4338
|
+
}) : container;
|
|
4339
|
+
Object.defineProperty(container, "_$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, content);
|
|
4346
|
+
el.appendChild(container);
|
|
4347
|
+
props.ref && props.ref(container);
|
|
4348
|
+
onCleanup(() => el.removeChild(container));
|
|
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$1 = "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$1,
|
|
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
|
|
11582
|
+
const date = "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,
|
|
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 container = containerProp || mounted && globalThis?.document?.body;
|
|
12692
|
+
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { ...portalProps, ref: forwardedRef }), container) : 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(container) {
|
|
13416
13416
|
const textContent = [];
|
|
13417
|
-
const childNodes = Array.from(
|
|
13417
|
+
const childNodes = Array.from(container.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(container) {
|
|
13472
13472
|
const nodes = [];
|
|
13473
|
-
const walker2 = document.createTreeWalker(
|
|
13473
|
+
const walker2 = document.createTreeWalker(container, 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 = (base, 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(base, 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(base, 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
|
|
16562
|
+
toasts.map(function({ id: id2, title, description, 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
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(ToastTitle, { children: title }),
|
|
16566
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(ToastDescription, { children: description })
|
|
16567
16567
|
] }),
|
|
16568
16568
|
action,
|
|
16569
16569
|
/* @__PURE__ */ jsxRuntime.jsx(ToastClose, {})
|
|
@@ -24238,21 +24238,7 @@
|
|
|
24238
24238
|
}
|
|
24239
24239
|
return element.props.ref || element.ref;
|
|
24240
24240
|
}
|
|
24241
|
-
const
|
|
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 styles$6 = {
|
|
24248
|
-
base: base$2,
|
|
24249
|
-
"default": "reach-styles-module__default___ny1h7",
|
|
24250
|
-
destructive: destructive$2,
|
|
24251
|
-
outline: outline$2,
|
|
24252
|
-
secondary: secondary$2,
|
|
24253
|
-
ghost,
|
|
24254
|
-
link
|
|
24255
|
-
};
|
|
24241
|
+
const styles$6 = {};
|
|
24256
24242
|
const buttonVariants = cva([styles$6.base], {
|
|
24257
24243
|
variants: {
|
|
24258
24244
|
variant: {
|
|
@@ -24340,7 +24326,7 @@
|
|
|
24340
24326
|
)
|
|
24341
24327
|
] }) });
|
|
24342
24328
|
};
|
|
24343
|
-
const BigSelector = ({ onClick, title
|
|
24329
|
+
const BigSelector = ({ onClick, title, subtitle, icon, selected, disabled = false }) => {
|
|
24344
24330
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24345
24331
|
"button",
|
|
24346
24332
|
{
|
|
@@ -24349,7 +24335,7 @@
|
|
|
24349
24335
|
children: [
|
|
24350
24336
|
icon,
|
|
24351
24337
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
24352
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-gray-900", children:
|
|
24338
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-gray-900", children: title }),
|
|
24353
24339
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-500", children: subtitle })
|
|
24354
24340
|
] })
|
|
24355
24341
|
]
|
|
@@ -26018,8 +26004,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26018
26004
|
})
|
|
26019
26005
|
);
|
|
26020
26006
|
return dedupeLinkDescriptors(
|
|
26021
|
-
links.flat(1).filter(isHtmlLinkDescriptor).filter((
|
|
26022
|
-
(
|
|
26007
|
+
links.flat(1).filter(isHtmlLinkDescriptor).filter((link) => link.rel === "stylesheet" || link.rel === "preload").map(
|
|
26008
|
+
(link) => link.rel === "stylesheet" ? { ...link, rel: "prefetch", as: "style" } : { ...link, rel: "prefetch" }
|
|
26023
26009
|
)
|
|
26024
26010
|
);
|
|
26025
26011
|
}
|
|
@@ -26318,10 +26304,10 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26318
26304
|
[newMatchesForAssets, manifest]
|
|
26319
26305
|
);
|
|
26320
26306
|
let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
|
|
26321
|
-
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
|
|
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
26308
|
// these don't spread `linkProps` because they are full link descriptors
|
|
26323
26309
|
// already with their own props
|
|
26324
|
-
/* @__PURE__ */ React__namespace.createElement("link", { key, ...
|
|
26310
|
+
/* @__PURE__ */ React__namespace.createElement("link", { key, ...link })
|
|
26325
26311
|
)));
|
|
26326
26312
|
}
|
|
26327
26313
|
function mergeRefs$1(...refs) {
|
|
@@ -26401,7 +26387,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26401
26387
|
internalOnClick(event);
|
|
26402
26388
|
}
|
|
26403
26389
|
}
|
|
26404
|
-
let
|
|
26390
|
+
let link = (
|
|
26405
26391
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
26406
26392
|
/* @__PURE__ */ React__namespace.createElement(
|
|
26407
26393
|
"a",
|
|
@@ -26416,7 +26402,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
26416
26402
|
}
|
|
26417
26403
|
)
|
|
26418
26404
|
);
|
|
26419
|
-
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null,
|
|
26405
|
+
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, link, /* @__PURE__ */ React__namespace.createElement(PrefetchPageLinks, { page: href })) : link;
|
|
26420
26406
|
}
|
|
26421
26407
|
);
|
|
26422
26408
|
Link.displayName = "Link";
|
|
@@ -27131,7 +27117,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27131
27117
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
27132
27118
|
...scopeProps
|
|
27133
27119
|
} = props;
|
|
27134
|
-
const [
|
|
27120
|
+
const [container, setContainer] = React__namespace.useState(null);
|
|
27135
27121
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
27136
27122
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
27137
27123
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
@@ -27148,69 +27134,69 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27148
27134
|
React__namespace.useEffect(() => {
|
|
27149
27135
|
if (trapped) {
|
|
27150
27136
|
let handleFocusIn2 = function(event) {
|
|
27151
|
-
if (focusScope.paused || !
|
|
27137
|
+
if (focusScope.paused || !container) return;
|
|
27152
27138
|
const target = event.target;
|
|
27153
|
-
if (
|
|
27139
|
+
if (container.contains(target)) {
|
|
27154
27140
|
lastFocusedElementRef.current = target;
|
|
27155
27141
|
} else {
|
|
27156
27142
|
focus$1(lastFocusedElementRef.current, { select: true });
|
|
27157
27143
|
}
|
|
27158
27144
|
}, handleFocusOut2 = function(event) {
|
|
27159
|
-
if (focusScope.paused || !
|
|
27145
|
+
if (focusScope.paused || !container) return;
|
|
27160
27146
|
const relatedTarget = event.relatedTarget;
|
|
27161
27147
|
if (relatedTarget === null) return;
|
|
27162
|
-
if (!
|
|
27148
|
+
if (!container.contains(relatedTarget)) {
|
|
27163
27149
|
focus$1(lastFocusedElementRef.current, { select: true });
|
|
27164
27150
|
}
|
|
27165
27151
|
}, handleMutations2 = function(mutations) {
|
|
27166
27152
|
const focusedElement = document.activeElement;
|
|
27167
27153
|
if (focusedElement !== document.body) return;
|
|
27168
27154
|
for (const mutation of mutations) {
|
|
27169
|
-
if (mutation.removedNodes.length > 0) focus$1(
|
|
27155
|
+
if (mutation.removedNodes.length > 0) focus$1(container);
|
|
27170
27156
|
}
|
|
27171
27157
|
};
|
|
27172
27158
|
document.addEventListener("focusin", handleFocusIn2);
|
|
27173
27159
|
document.addEventListener("focusout", handleFocusOut2);
|
|
27174
27160
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
27175
|
-
if (
|
|
27161
|
+
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
27176
27162
|
return () => {
|
|
27177
27163
|
document.removeEventListener("focusin", handleFocusIn2);
|
|
27178
27164
|
document.removeEventListener("focusout", handleFocusOut2);
|
|
27179
27165
|
mutationObserver.disconnect();
|
|
27180
27166
|
};
|
|
27181
27167
|
}
|
|
27182
|
-
}, [trapped,
|
|
27168
|
+
}, [trapped, container, focusScope.paused]);
|
|
27183
27169
|
React__namespace.useEffect(() => {
|
|
27184
|
-
if (
|
|
27170
|
+
if (container) {
|
|
27185
27171
|
focusScopesStack$1.add(focusScope);
|
|
27186
27172
|
const previouslyFocusedElement = document.activeElement;
|
|
27187
|
-
const hasFocusedCandidate =
|
|
27173
|
+
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
27188
27174
|
if (!hasFocusedCandidate) {
|
|
27189
27175
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT$1, EVENT_OPTIONS$3);
|
|
27190
|
-
|
|
27191
|
-
|
|
27176
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
27177
|
+
container.dispatchEvent(mountEvent);
|
|
27192
27178
|
if (!mountEvent.defaultPrevented) {
|
|
27193
|
-
focusFirst$3(removeLinks$1(getTabbableCandidates$1(
|
|
27179
|
+
focusFirst$3(removeLinks$1(getTabbableCandidates$1(container)), { select: true });
|
|
27194
27180
|
if (document.activeElement === previouslyFocusedElement) {
|
|
27195
|
-
focus$1(
|
|
27181
|
+
focus$1(container);
|
|
27196
27182
|
}
|
|
27197
27183
|
}
|
|
27198
27184
|
}
|
|
27199
27185
|
return () => {
|
|
27200
|
-
|
|
27186
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
27201
27187
|
setTimeout(() => {
|
|
27202
27188
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT$1, EVENT_OPTIONS$3);
|
|
27203
|
-
|
|
27204
|
-
|
|
27189
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
27190
|
+
container.dispatchEvent(unmountEvent);
|
|
27205
27191
|
if (!unmountEvent.defaultPrevented) {
|
|
27206
27192
|
focus$1(previouslyFocusedElement ?? document.body, { select: true });
|
|
27207
27193
|
}
|
|
27208
|
-
|
|
27194
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
27209
27195
|
focusScopesStack$1.remove(focusScope);
|
|
27210
27196
|
}, 0);
|
|
27211
27197
|
};
|
|
27212
27198
|
}
|
|
27213
|
-
}, [
|
|
27199
|
+
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
27214
27200
|
const handleKeyDown = React__namespace.useCallback(
|
|
27215
27201
|
(event) => {
|
|
27216
27202
|
if (!loop && !trapped) return;
|
|
@@ -27218,11 +27204,11 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27218
27204
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
27219
27205
|
const focusedElement = document.activeElement;
|
|
27220
27206
|
if (isTabKey && focusedElement) {
|
|
27221
|
-
const
|
|
27222
|
-
const [first, last] = getTabbableEdges$1(
|
|
27207
|
+
const container2 = event.currentTarget;
|
|
27208
|
+
const [first, last] = getTabbableEdges$1(container2);
|
|
27223
27209
|
const hasTabbableElementsInside = first && last;
|
|
27224
27210
|
if (!hasTabbableElementsInside) {
|
|
27225
|
-
if (focusedElement ===
|
|
27211
|
+
if (focusedElement === container2) event.preventDefault();
|
|
27226
27212
|
} else {
|
|
27227
27213
|
if (!event.shiftKey && focusedElement === last) {
|
|
27228
27214
|
event.preventDefault();
|
|
@@ -27246,15 +27232,15 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27246
27232
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
27247
27233
|
}
|
|
27248
27234
|
}
|
|
27249
|
-
function getTabbableEdges$1(
|
|
27250
|
-
const candidates = getTabbableCandidates$1(
|
|
27251
|
-
const first = findVisible$1(candidates,
|
|
27252
|
-
const last = findVisible$1(candidates.reverse(),
|
|
27235
|
+
function getTabbableEdges$1(container) {
|
|
27236
|
+
const candidates = getTabbableCandidates$1(container);
|
|
27237
|
+
const first = findVisible$1(candidates, container);
|
|
27238
|
+
const last = findVisible$1(candidates.reverse(), container);
|
|
27253
27239
|
return [first, last];
|
|
27254
27240
|
}
|
|
27255
|
-
function getTabbableCandidates$1(
|
|
27241
|
+
function getTabbableCandidates$1(container) {
|
|
27256
27242
|
const nodes = [];
|
|
27257
|
-
const walker2 = document.createTreeWalker(
|
|
27243
|
+
const walker2 = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
27258
27244
|
acceptNode: (node) => {
|
|
27259
27245
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
27260
27246
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -27264,9 +27250,9 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27264
27250
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
27265
27251
|
return nodes;
|
|
27266
27252
|
}
|
|
27267
|
-
function findVisible$1(elements,
|
|
27253
|
+
function findVisible$1(elements, container) {
|
|
27268
27254
|
for (const element of elements) {
|
|
27269
|
-
if (!isHidden$1(element, { upTo:
|
|
27255
|
+
if (!isHidden$1(element, { upTo: container })) return element;
|
|
27270
27256
|
}
|
|
27271
27257
|
}
|
|
27272
27258
|
function isHidden$1(node, { upTo }) {
|
|
@@ -27323,8 +27309,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
27323
27309
|
const { container: containerProp, ...portalProps } = props;
|
|
27324
27310
|
const [mounted, setMounted] = React__namespace.useState(false);
|
|
27325
27311
|
useLayoutEffect2(() => setMounted(true), []);
|
|
27326
|
-
const
|
|
27327
|
-
return
|
|
27312
|
+
const container = containerProp || mounted && globalThis?.document?.body;
|
|
27313
|
+
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$2.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
27328
27314
|
});
|
|
27329
27315
|
Portal$5.displayName = PORTAL_NAME$6;
|
|
27330
27316
|
var count = 0;
|
|
@@ -28189,9 +28175,9 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28189
28175
|
forceMount: void 0
|
|
28190
28176
|
});
|
|
28191
28177
|
var DialogPortal$1 = (props) => {
|
|
28192
|
-
const { __scopeDialog, forceMount, children: children2, container
|
|
28178
|
+
const { __scopeDialog, forceMount, children: children2, container } = props;
|
|
28193
28179
|
const context = useDialogContext(PORTAL_NAME$5, __scopeDialog);
|
|
28194
|
-
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
|
|
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
28181
|
};
|
|
28196
28182
|
DialogPortal$1.displayName = PORTAL_NAME$5;
|
|
28197
28183
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -28239,8 +28225,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28239
28225
|
const contentRef = React__namespace.useRef(null);
|
|
28240
28226
|
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
28241
28227
|
React__namespace.useEffect(() => {
|
|
28242
|
-
const
|
|
28243
|
-
if (
|
|
28228
|
+
const content = contentRef.current;
|
|
28229
|
+
if (content) return hideOthers(content);
|
|
28244
28230
|
}, []);
|
|
28245
28231
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28246
28232
|
DialogContentImpl,
|
|
@@ -30689,7 +30675,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
30689
30675
|
...contentProps
|
|
30690
30676
|
} = props;
|
|
30691
30677
|
const context = usePopperContext$1(CONTENT_NAME$6, __scopePopper);
|
|
30692
|
-
const [
|
|
30678
|
+
const [content, setContent] = React__namespace.useState(null);
|
|
30693
30679
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
30694
30680
|
const [arrow3, setArrow] = React__namespace.useState(null);
|
|
30695
30681
|
const arrowSize = useSize(arrow3);
|
|
@@ -30755,8 +30741,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
30755
30741
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
30756
30742
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
30757
30743
|
useLayoutEffect2(() => {
|
|
30758
|
-
if (
|
|
30759
|
-
}, [
|
|
30744
|
+
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
30745
|
+
}, [content]);
|
|
30760
30746
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30761
30747
|
"div",
|
|
30762
30748
|
{
|
|
@@ -31103,9 +31089,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31103
31089
|
forceMount: void 0
|
|
31104
31090
|
});
|
|
31105
31091
|
var TooltipPortal = (props) => {
|
|
31106
|
-
const { __scopeTooltip, forceMount, children: children2, container
|
|
31092
|
+
const { __scopeTooltip, forceMount, children: children2, container } = props;
|
|
31107
31093
|
const context = useTooltipContext(PORTAL_NAME$4, __scopeTooltip);
|
|
31108
|
-
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
|
|
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
31095
|
};
|
|
31110
31096
|
TooltipPortal.displayName = PORTAL_NAME$4;
|
|
31111
31097
|
var CONTENT_NAME$5 = "TooltipContent";
|
|
@@ -31124,7 +31110,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31124
31110
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
31125
31111
|
const [pointerGraceArea, setPointerGraceArea] = React__namespace.useState(null);
|
|
31126
31112
|
const { trigger, onClose } = context;
|
|
31127
|
-
const
|
|
31113
|
+
const content = ref.current;
|
|
31128
31114
|
const { onPointerInTransitChange } = providerContext;
|
|
31129
31115
|
const handleRemoveGraceArea = React__namespace.useCallback(() => {
|
|
31130
31116
|
setPointerGraceArea(null);
|
|
@@ -31147,23 +31133,23 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31147
31133
|
return () => handleRemoveGraceArea();
|
|
31148
31134
|
}, [handleRemoveGraceArea]);
|
|
31149
31135
|
React__namespace.useEffect(() => {
|
|
31150
|
-
if (trigger &&
|
|
31151
|
-
const handleTriggerLeave = (event) => handleCreateGraceArea(event,
|
|
31136
|
+
if (trigger && content) {
|
|
31137
|
+
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);
|
|
31152
31138
|
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
|
31153
31139
|
trigger.addEventListener("pointerleave", handleTriggerLeave);
|
|
31154
|
-
|
|
31140
|
+
content.addEventListener("pointerleave", handleContentLeave);
|
|
31155
31141
|
return () => {
|
|
31156
31142
|
trigger.removeEventListener("pointerleave", handleTriggerLeave);
|
|
31157
|
-
|
|
31143
|
+
content.removeEventListener("pointerleave", handleContentLeave);
|
|
31158
31144
|
};
|
|
31159
31145
|
}
|
|
31160
|
-
}, [trigger,
|
|
31146
|
+
}, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);
|
|
31161
31147
|
React__namespace.useEffect(() => {
|
|
31162
31148
|
if (pointerGraceArea) {
|
|
31163
31149
|
const handleTrackPointerGrace = (event) => {
|
|
31164
31150
|
const target = event.target;
|
|
31165
31151
|
const pointerPosition = { x: event.clientX, y: event.clientY };
|
|
31166
|
-
const hasEnteredTarget = trigger?.contains(target) ||
|
|
31152
|
+
const hasEnteredTarget = trigger?.contains(target) || content?.contains(target);
|
|
31167
31153
|
const isPointerOutsideGraceArea = !isPointInPolygon$2(pointerPosition, pointerGraceArea);
|
|
31168
31154
|
if (hasEnteredTarget) {
|
|
31169
31155
|
handleRemoveGraceArea();
|
|
@@ -31175,7 +31161,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31175
31161
|
document.addEventListener("pointermove", handleTrackPointerGrace);
|
|
31176
31162
|
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
31177
31163
|
}
|
|
31178
|
-
}, [trigger,
|
|
31164
|
+
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
31179
31165
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipContentImpl, { ...props, ref: composedRefs });
|
|
31180
31166
|
});
|
|
31181
31167
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
@@ -31391,7 +31377,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31391
31377
|
}
|
|
31392
31378
|
) }));
|
|
31393
31379
|
TooltipContent.displayName = Content2$4.displayName;
|
|
31394
|
-
const InfoTooltip = ({ title
|
|
31380
|
+
const InfoTooltip = ({ title, alertText, Icon: Icon2 = Info, onClick }) => {
|
|
31395
31381
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
31396
31382
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
31397
31383
|
Icon2,
|
|
@@ -31422,7 +31408,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
31422
31408
|
) }),
|
|
31423
31409
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-amber-500", children: alertText })
|
|
31424
31410
|
] }),
|
|
31425
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] leading-relaxed text-primary-foreground/90", children:
|
|
31411
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] leading-relaxed text-primary-foreground/90", children: title })
|
|
31426
31412
|
] }) })
|
|
31427
31413
|
] }) });
|
|
31428
31414
|
};
|
|
@@ -33135,23 +33121,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
33135
33121
|
function formatDistanceToNow(date2, options2) {
|
|
33136
33122
|
return formatDistance$1(date2, constructNow(date2), options2);
|
|
33137
33123
|
}
|
|
33138
|
-
const
|
|
33139
|
-
const secondary$1 = "reach-styles-module__secondary___VQ4iH";
|
|
33140
|
-
const destructive$1 = "reach-styles-module__destructive___RLaRD";
|
|
33141
|
-
const outline$1 = "reach-styles-module__outline___L2VtW";
|
|
33142
|
-
const google = "reach-styles-module__google___HcEij";
|
|
33143
|
-
const date = "reach-styles-module__date___-6BC4";
|
|
33144
|
-
const container = "reach-styles-module__container___6PQqs";
|
|
33145
|
-
const styles$2 = {
|
|
33146
|
-
base: base$1,
|
|
33147
|
-
"default": "reach-styles-module__default___zeGU1",
|
|
33148
|
-
secondary: secondary$1,
|
|
33149
|
-
destructive: destructive$1,
|
|
33150
|
-
outline: outline$1,
|
|
33151
|
-
google,
|
|
33152
|
-
date,
|
|
33153
|
-
container
|
|
33154
|
-
};
|
|
33124
|
+
const styles$2 = {};
|
|
33155
33125
|
const badgeVariants = cva([styles$2.base], {
|
|
33156
33126
|
variants: {
|
|
33157
33127
|
variant: {
|
|
@@ -34598,11 +34568,11 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34598
34568
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
34599
34569
|
const focusedElement = document.activeElement;
|
|
34600
34570
|
if (isTabKey && focusedElement) {
|
|
34601
|
-
const
|
|
34602
|
-
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(
|
|
34571
|
+
const container = event.currentTarget;
|
|
34572
|
+
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);
|
|
34603
34573
|
const hasTabbableElementsInside = first && last;
|
|
34604
34574
|
if (!hasTabbableElementsInside) {
|
|
34605
|
-
if (focusedElement ===
|
|
34575
|
+
if (focusedElement === container) event.preventDefault();
|
|
34606
34576
|
} else {
|
|
34607
34577
|
if (!event.shiftKey && focusedElement === last) {
|
|
34608
34578
|
event.preventDefault();
|
|
@@ -34638,18 +34608,18 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34638
34608
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
34639
34609
|
}
|
|
34640
34610
|
}
|
|
34641
|
-
function $d3863c46a17e8a28$var$getTabbableEdges(
|
|
34642
|
-
const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(
|
|
34643
|
-
const first = $d3863c46a17e8a28$var$findVisible(candidates,
|
|
34644
|
-
const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(),
|
|
34611
|
+
function $d3863c46a17e8a28$var$getTabbableEdges(container) {
|
|
34612
|
+
const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);
|
|
34613
|
+
const first = $d3863c46a17e8a28$var$findVisible(candidates, container);
|
|
34614
|
+
const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);
|
|
34645
34615
|
return [
|
|
34646
34616
|
first,
|
|
34647
34617
|
last
|
|
34648
34618
|
];
|
|
34649
34619
|
}
|
|
34650
|
-
function $d3863c46a17e8a28$var$getTabbableCandidates(
|
|
34620
|
+
function $d3863c46a17e8a28$var$getTabbableCandidates(container) {
|
|
34651
34621
|
const nodes = [];
|
|
34652
|
-
const walker2 = document.createTreeWalker(
|
|
34622
|
+
const walker2 = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
34653
34623
|
acceptNode: (node) => {
|
|
34654
34624
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
34655
34625
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -34659,10 +34629,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34659
34629
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
34660
34630
|
return nodes;
|
|
34661
34631
|
}
|
|
34662
|
-
function $d3863c46a17e8a28$var$findVisible(elements,
|
|
34632
|
+
function $d3863c46a17e8a28$var$findVisible(elements, container) {
|
|
34663
34633
|
for (const element of elements) {
|
|
34664
34634
|
if (!$d3863c46a17e8a28$var$isHidden(element, {
|
|
34665
|
-
upTo:
|
|
34635
|
+
upTo: container
|
|
34666
34636
|
})) return element;
|
|
34667
34637
|
}
|
|
34668
34638
|
}
|
|
@@ -34719,10 +34689,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
34719
34689
|
}
|
|
34720
34690
|
const $f1701beae083dbae$export$602eac185826482c = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
34721
34691
|
var _globalThis$document;
|
|
34722
|
-
const { container
|
|
34723
|
-
return
|
|
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 container ? /* @__PURE__ */ ReactDOM.createPortal(/* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
|
|
34724
34694
|
ref: forwardedRef
|
|
34725
|
-
})),
|
|
34695
|
+
})), container) : null;
|
|
34726
34696
|
});
|
|
34727
34697
|
const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React.useLayoutEffect : () => {
|
|
34728
34698
|
};
|
|
@@ -35189,7 +35159,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35189
35159
|
forceMount: void 0
|
|
35190
35160
|
});
|
|
35191
35161
|
const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props) => {
|
|
35192
|
-
const { __scopeDialog, forceMount, children: children2, container
|
|
35162
|
+
const { __scopeDialog, forceMount, children: children2, container } = props;
|
|
35193
35163
|
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, __scopeDialog);
|
|
35194
35164
|
return /* @__PURE__ */ React.createElement($5d3850c4d0b4e6c7$var$PortalProvider, {
|
|
35195
35165
|
scope: __scopeDialog,
|
|
@@ -35200,7 +35170,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35200
35170
|
present: forceMount || context.open
|
|
35201
35171
|
}, /* @__PURE__ */ React.createElement($f1701beae083dbae$export$602eac185826482c, {
|
|
35202
35172
|
asChild: true,
|
|
35203
|
-
container
|
|
35173
|
+
container
|
|
35204
35174
|
}, child))
|
|
35205
35175
|
));
|
|
35206
35176
|
};
|
|
@@ -35259,8 +35229,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35259
35229
|
const contentRef = React.useRef(null);
|
|
35260
35230
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.contentRef, contentRef);
|
|
35261
35231
|
React.useEffect(() => {
|
|
35262
|
-
const
|
|
35263
|
-
if (
|
|
35232
|
+
const content = contentRef.current;
|
|
35233
|
+
if (content) return hideOthers(content);
|
|
35264
35234
|
}, []);
|
|
35265
35235
|
return /* @__PURE__ */ React.createElement($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, {
|
|
35266
35236
|
ref: composedRefs,
|
|
@@ -35777,7 +35747,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35777
35747
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
35778
35748
|
...scopeProps
|
|
35779
35749
|
} = props;
|
|
35780
|
-
const [
|
|
35750
|
+
const [container, setContainer] = React__namespace.useState(null);
|
|
35781
35751
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
35782
35752
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
35783
35753
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
@@ -35794,69 +35764,69 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35794
35764
|
React__namespace.useEffect(() => {
|
|
35795
35765
|
if (trapped) {
|
|
35796
35766
|
let handleFocusIn2 = function(event) {
|
|
35797
|
-
if (focusScope.paused || !
|
|
35767
|
+
if (focusScope.paused || !container) return;
|
|
35798
35768
|
const target = event.target;
|
|
35799
|
-
if (
|
|
35769
|
+
if (container.contains(target)) {
|
|
35800
35770
|
lastFocusedElementRef.current = target;
|
|
35801
35771
|
} else {
|
|
35802
35772
|
focus(lastFocusedElementRef.current, { select: true });
|
|
35803
35773
|
}
|
|
35804
35774
|
}, handleFocusOut2 = function(event) {
|
|
35805
|
-
if (focusScope.paused || !
|
|
35775
|
+
if (focusScope.paused || !container) return;
|
|
35806
35776
|
const relatedTarget = event.relatedTarget;
|
|
35807
35777
|
if (relatedTarget === null) return;
|
|
35808
|
-
if (!
|
|
35778
|
+
if (!container.contains(relatedTarget)) {
|
|
35809
35779
|
focus(lastFocusedElementRef.current, { select: true });
|
|
35810
35780
|
}
|
|
35811
35781
|
}, handleMutations2 = function(mutations) {
|
|
35812
35782
|
const focusedElement = document.activeElement;
|
|
35813
35783
|
if (focusedElement !== document.body) return;
|
|
35814
35784
|
for (const mutation of mutations) {
|
|
35815
|
-
if (mutation.removedNodes.length > 0) focus(
|
|
35785
|
+
if (mutation.removedNodes.length > 0) focus(container);
|
|
35816
35786
|
}
|
|
35817
35787
|
};
|
|
35818
35788
|
document.addEventListener("focusin", handleFocusIn2);
|
|
35819
35789
|
document.addEventListener("focusout", handleFocusOut2);
|
|
35820
35790
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
35821
|
-
if (
|
|
35791
|
+
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
35822
35792
|
return () => {
|
|
35823
35793
|
document.removeEventListener("focusin", handleFocusIn2);
|
|
35824
35794
|
document.removeEventListener("focusout", handleFocusOut2);
|
|
35825
35795
|
mutationObserver.disconnect();
|
|
35826
35796
|
};
|
|
35827
35797
|
}
|
|
35828
|
-
}, [trapped,
|
|
35798
|
+
}, [trapped, container, focusScope.paused]);
|
|
35829
35799
|
React__namespace.useEffect(() => {
|
|
35830
|
-
if (
|
|
35800
|
+
if (container) {
|
|
35831
35801
|
focusScopesStack.add(focusScope);
|
|
35832
35802
|
const previouslyFocusedElement = document.activeElement;
|
|
35833
|
-
const hasFocusedCandidate =
|
|
35803
|
+
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
35834
35804
|
if (!hasFocusedCandidate) {
|
|
35835
35805
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS$2);
|
|
35836
|
-
|
|
35837
|
-
|
|
35806
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
35807
|
+
container.dispatchEvent(mountEvent);
|
|
35838
35808
|
if (!mountEvent.defaultPrevented) {
|
|
35839
|
-
focusFirst$2(removeLinks(getTabbableCandidates(
|
|
35809
|
+
focusFirst$2(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
35840
35810
|
if (document.activeElement === previouslyFocusedElement) {
|
|
35841
|
-
focus(
|
|
35811
|
+
focus(container);
|
|
35842
35812
|
}
|
|
35843
35813
|
}
|
|
35844
35814
|
}
|
|
35845
35815
|
return () => {
|
|
35846
|
-
|
|
35816
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
35847
35817
|
setTimeout(() => {
|
|
35848
35818
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS$2);
|
|
35849
|
-
|
|
35850
|
-
|
|
35819
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
35820
|
+
container.dispatchEvent(unmountEvent);
|
|
35851
35821
|
if (!unmountEvent.defaultPrevented) {
|
|
35852
35822
|
focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
35853
35823
|
}
|
|
35854
|
-
|
|
35824
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
35855
35825
|
focusScopesStack.remove(focusScope);
|
|
35856
35826
|
}, 0);
|
|
35857
35827
|
};
|
|
35858
35828
|
}
|
|
35859
|
-
}, [
|
|
35829
|
+
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
35860
35830
|
const handleKeyDown = React__namespace.useCallback(
|
|
35861
35831
|
(event) => {
|
|
35862
35832
|
if (!loop && !trapped) return;
|
|
@@ -35864,11 +35834,11 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35864
35834
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
35865
35835
|
const focusedElement = document.activeElement;
|
|
35866
35836
|
if (isTabKey && focusedElement) {
|
|
35867
|
-
const
|
|
35868
|
-
const [first, last] = getTabbableEdges(
|
|
35837
|
+
const container2 = event.currentTarget;
|
|
35838
|
+
const [first, last] = getTabbableEdges(container2);
|
|
35869
35839
|
const hasTabbableElementsInside = first && last;
|
|
35870
35840
|
if (!hasTabbableElementsInside) {
|
|
35871
|
-
if (focusedElement ===
|
|
35841
|
+
if (focusedElement === container2) event.preventDefault();
|
|
35872
35842
|
} else {
|
|
35873
35843
|
if (!event.shiftKey && focusedElement === last) {
|
|
35874
35844
|
event.preventDefault();
|
|
@@ -35892,15 +35862,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35892
35862
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
35893
35863
|
}
|
|
35894
35864
|
}
|
|
35895
|
-
function getTabbableEdges(
|
|
35896
|
-
const candidates = getTabbableCandidates(
|
|
35897
|
-
const first = findVisible(candidates,
|
|
35898
|
-
const last = findVisible(candidates.reverse(),
|
|
35865
|
+
function getTabbableEdges(container) {
|
|
35866
|
+
const candidates = getTabbableCandidates(container);
|
|
35867
|
+
const first = findVisible(candidates, container);
|
|
35868
|
+
const last = findVisible(candidates.reverse(), container);
|
|
35899
35869
|
return [first, last];
|
|
35900
35870
|
}
|
|
35901
|
-
function getTabbableCandidates(
|
|
35871
|
+
function getTabbableCandidates(container) {
|
|
35902
35872
|
const nodes = [];
|
|
35903
|
-
const walker2 = document.createTreeWalker(
|
|
35873
|
+
const walker2 = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
35904
35874
|
acceptNode: (node) => {
|
|
35905
35875
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
35906
35876
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -35910,9 +35880,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
35910
35880
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
35911
35881
|
return nodes;
|
|
35912
35882
|
}
|
|
35913
|
-
function findVisible(elements,
|
|
35883
|
+
function findVisible(elements, container) {
|
|
35914
35884
|
for (const element of elements) {
|
|
35915
|
-
if (!isHidden(element, { upTo:
|
|
35885
|
+
if (!isHidden(element, { upTo: container })) return element;
|
|
35916
35886
|
}
|
|
35917
35887
|
}
|
|
35918
35888
|
function isHidden(node, { upTo }) {
|
|
@@ -36049,9 +36019,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36049
36019
|
forceMount: void 0
|
|
36050
36020
|
});
|
|
36051
36021
|
var PopoverPortal = (props) => {
|
|
36052
|
-
const { __scopePopover, forceMount, children: children2, container
|
|
36022
|
+
const { __scopePopover, forceMount, children: children2, container } = props;
|
|
36053
36023
|
const context = usePopoverContext(PORTAL_NAME$3, __scopePopover);
|
|
36054
|
-
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
|
|
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 }) }) });
|
|
36055
36025
|
};
|
|
36056
36026
|
PopoverPortal.displayName = PORTAL_NAME$3;
|
|
36057
36027
|
var CONTENT_NAME$4 = "PopoverContent";
|
|
@@ -36071,8 +36041,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36071
36041
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
36072
36042
|
const isRightClickOutsideRef = React__namespace.useRef(false);
|
|
36073
36043
|
React__namespace.useEffect(() => {
|
|
36074
|
-
const
|
|
36075
|
-
if (
|
|
36044
|
+
const content = contentRef.current;
|
|
36045
|
+
if (content) return hideOthers(content);
|
|
36076
36046
|
}, []);
|
|
36077
36047
|
return /* @__PURE__ */ jsxRuntime.jsx(ReactRemoveScroll$1, { as: Slot$3, allowPinchZoom: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36078
36048
|
PopoverContentImpl,
|
|
@@ -36978,7 +36948,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36978
36948
|
...contentProps
|
|
36979
36949
|
} = props;
|
|
36980
36950
|
const context = useSelectContext(CONTENT_NAME$3, __scopeSelect);
|
|
36981
|
-
const [
|
|
36951
|
+
const [content, setContent] = React__namespace.useState(null);
|
|
36982
36952
|
const [viewport, setViewport] = React__namespace.useState(null);
|
|
36983
36953
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
36984
36954
|
const [selectedItem, setSelectedItem] = React__namespace.useState(null);
|
|
@@ -36989,8 +36959,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
36989
36959
|
const [isPositioned, setIsPositioned] = React__namespace.useState(false);
|
|
36990
36960
|
const firstValidItemFoundRef = React__namespace.useRef(false);
|
|
36991
36961
|
React__namespace.useEffect(() => {
|
|
36992
|
-
if (
|
|
36993
|
-
}, [
|
|
36962
|
+
if (content) return hideOthers(content);
|
|
36963
|
+
}, [content]);
|
|
36994
36964
|
useFocusGuards();
|
|
36995
36965
|
const focusFirst2 = React__namespace.useCallback(
|
|
36996
36966
|
(candidates) => {
|
|
@@ -37009,8 +36979,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37009
36979
|
[getItems, viewport]
|
|
37010
36980
|
);
|
|
37011
36981
|
const focusSelectedItem = React__namespace.useCallback(
|
|
37012
|
-
() => focusFirst2([selectedItem,
|
|
37013
|
-
[focusFirst2, selectedItem,
|
|
36982
|
+
() => focusFirst2([selectedItem, content]),
|
|
36983
|
+
[focusFirst2, selectedItem, content]
|
|
37014
36984
|
);
|
|
37015
36985
|
React__namespace.useEffect(() => {
|
|
37016
36986
|
if (isPositioned) {
|
|
@@ -37019,7 +36989,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37019
36989
|
}, [isPositioned, focusSelectedItem]);
|
|
37020
36990
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
37021
36991
|
React__namespace.useEffect(() => {
|
|
37022
|
-
if (
|
|
36992
|
+
if (content) {
|
|
37023
36993
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
37024
36994
|
const handlePointerMove = (event) => {
|
|
37025
36995
|
pointerMoveDelta = {
|
|
@@ -37031,7 +37001,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37031
37001
|
if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {
|
|
37032
37002
|
event.preventDefault();
|
|
37033
37003
|
} else {
|
|
37034
|
-
if (!
|
|
37004
|
+
if (!content.contains(event.target)) {
|
|
37035
37005
|
onOpenChange(false);
|
|
37036
37006
|
}
|
|
37037
37007
|
}
|
|
@@ -37047,7 +37017,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37047
37017
|
document.removeEventListener("pointerup", handlePointerUp, { capture: true });
|
|
37048
37018
|
};
|
|
37049
37019
|
}
|
|
37050
|
-
}, [
|
|
37020
|
+
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
37051
37021
|
React__namespace.useEffect(() => {
|
|
37052
37022
|
const close2 = () => onOpenChange(false);
|
|
37053
37023
|
window.addEventListener("blur", close2);
|
|
@@ -37076,7 +37046,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37076
37046
|
},
|
|
37077
37047
|
[context.value]
|
|
37078
37048
|
);
|
|
37079
|
-
const handleItemLeave = React__namespace.useCallback(() =>
|
|
37049
|
+
const handleItemLeave = React__namespace.useCallback(() => content?.focus(), [content]);
|
|
37080
37050
|
const itemTextRefCallback = React__namespace.useCallback(
|
|
37081
37051
|
(node, value, disabled) => {
|
|
37082
37052
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
@@ -37104,7 +37074,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37104
37074
|
SelectContentProvider,
|
|
37105
37075
|
{
|
|
37106
37076
|
scope: __scopeSelect,
|
|
37107
|
-
content
|
|
37077
|
+
content,
|
|
37108
37078
|
viewport,
|
|
37109
37079
|
onViewportChange: setViewport,
|
|
37110
37080
|
itemRefCallback,
|
|
@@ -37193,16 +37163,16 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37193
37163
|
const context = useSelectContext(CONTENT_NAME$3, __scopeSelect);
|
|
37194
37164
|
const contentContext = useSelectContentContext(CONTENT_NAME$3, __scopeSelect);
|
|
37195
37165
|
const [contentWrapper, setContentWrapper] = React__namespace.useState(null);
|
|
37196
|
-
const [
|
|
37166
|
+
const [content, setContent] = React__namespace.useState(null);
|
|
37197
37167
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
37198
37168
|
const getItems = useCollection$2(__scopeSelect);
|
|
37199
37169
|
const shouldExpandOnScrollRef = React__namespace.useRef(false);
|
|
37200
37170
|
const shouldRepositionRef = React__namespace.useRef(true);
|
|
37201
37171
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
37202
37172
|
const position = React__namespace.useCallback(() => {
|
|
37203
|
-
if (context.trigger && context.valueNode && contentWrapper &&
|
|
37173
|
+
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
37204
37174
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
37205
|
-
const contentRect =
|
|
37175
|
+
const contentRect = content.getBoundingClientRect();
|
|
37206
37176
|
const valueNodeRect = context.valueNode.getBoundingClientRect();
|
|
37207
37177
|
const itemTextRect = selectedItemText.getBoundingClientRect();
|
|
37208
37178
|
if (context.dir !== "rtl") {
|
|
@@ -37240,7 +37210,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37240
37210
|
const items = getItems();
|
|
37241
37211
|
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
37242
37212
|
const itemsHeight = viewport.scrollHeight;
|
|
37243
|
-
const contentStyles = window.getComputedStyle(
|
|
37213
|
+
const contentStyles = window.getComputedStyle(content);
|
|
37244
37214
|
const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);
|
|
37245
37215
|
const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);
|
|
37246
37216
|
const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);
|
|
@@ -37260,7 +37230,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37260
37230
|
if (willAlignWithoutTopOverflow) {
|
|
37261
37231
|
const isLastItem = items.length > 0 && selectedItem === items[items.length - 1].ref.current;
|
|
37262
37232
|
contentWrapper.style.bottom = "0px";
|
|
37263
|
-
const viewportOffsetBottom =
|
|
37233
|
+
const viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight;
|
|
37264
37234
|
const clampedTriggerMiddleToBottomEdge = Math.max(
|
|
37265
37235
|
triggerMiddleToBottomEdge,
|
|
37266
37236
|
selectedItemHalfHeight + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
@@ -37291,7 +37261,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37291
37261
|
context.trigger,
|
|
37292
37262
|
context.valueNode,
|
|
37293
37263
|
contentWrapper,
|
|
37294
|
-
|
|
37264
|
+
content,
|
|
37295
37265
|
viewport,
|
|
37296
37266
|
selectedItem,
|
|
37297
37267
|
selectedItemText,
|
|
@@ -37301,8 +37271,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
37301
37271
|
useLayoutEffect2(() => position(), [position]);
|
|
37302
37272
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
37303
37273
|
useLayoutEffect2(() => {
|
|
37304
|
-
if (
|
|
37305
|
-
}, [
|
|
37274
|
+
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
37275
|
+
}, [content]);
|
|
37306
37276
|
const handleScrollButtonChange = React__namespace.useCallback(
|
|
37307
37277
|
(node) => {
|
|
37308
37278
|
if (node && shouldRepositionRef.current === true) {
|
|
@@ -39591,7 +39561,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39591
39561
|
var Menu$1 = (props) => {
|
|
39592
39562
|
const { __scopeMenu, open = false, children: children2, dir, onOpenChange, modal = true } = props;
|
|
39593
39563
|
const popperScope = usePopperScope(__scopeMenu);
|
|
39594
|
-
const [
|
|
39564
|
+
const [content, setContent] = React__namespace.useState(null);
|
|
39595
39565
|
const isUsingKeyboardRef = React__namespace.useRef(false);
|
|
39596
39566
|
const handleOpenChange = useCallbackRef$1(onOpenChange);
|
|
39597
39567
|
const direction = useDirection(dir);
|
|
@@ -39615,7 +39585,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39615
39585
|
scope: __scopeMenu,
|
|
39616
39586
|
open,
|
|
39617
39587
|
onOpenChange: handleOpenChange,
|
|
39618
|
-
content
|
|
39588
|
+
content,
|
|
39619
39589
|
onContentChange: setContent,
|
|
39620
39590
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
39621
39591
|
MenuRootProvider,
|
|
@@ -39646,9 +39616,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39646
39616
|
forceMount: void 0
|
|
39647
39617
|
});
|
|
39648
39618
|
var MenuPortal$1 = (props) => {
|
|
39649
|
-
const { __scopeMenu, forceMount, children: children2, container
|
|
39619
|
+
const { __scopeMenu, forceMount, children: children2, container } = props;
|
|
39650
39620
|
const context = useMenuContext$1(PORTAL_NAME$1, __scopeMenu);
|
|
39651
|
-
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
|
|
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 }) }) });
|
|
39652
39622
|
};
|
|
39653
39623
|
MenuPortal$1.displayName = PORTAL_NAME$1;
|
|
39654
39624
|
var CONTENT_NAME$1 = "MenuContent";
|
|
@@ -39668,8 +39638,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39668
39638
|
const ref = React__namespace.useRef(null);
|
|
39669
39639
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
39670
39640
|
React__namespace.useEffect(() => {
|
|
39671
|
-
const
|
|
39672
|
-
if (
|
|
39641
|
+
const content = ref.current;
|
|
39642
|
+
if (content) return hideOthers(content);
|
|
39673
39643
|
}, []);
|
|
39674
39644
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39675
39645
|
MenuContentImpl,
|
|
@@ -39846,8 +39816,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
39846
39816
|
if (event.key === "Tab") event.preventDefault();
|
|
39847
39817
|
if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
|
|
39848
39818
|
}
|
|
39849
|
-
const
|
|
39850
|
-
if (event.target !==
|
|
39819
|
+
const content = contentRef.current;
|
|
39820
|
+
if (event.target !== content) return;
|
|
39851
39821
|
if (!FIRST_LAST_KEYS.includes(event.key)) return;
|
|
39852
39822
|
event.preventDefault();
|
|
39853
39823
|
const items = getItems().filter((item) => !item.disabled);
|
|
@@ -40773,27 +40743,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
40773
40743
|
)
|
|
40774
40744
|
] });
|
|
40775
40745
|
};
|
|
40776
|
-
const
|
|
40777
|
-
const destructive = "reach-styles-module__destructive___5EWhN";
|
|
40778
|
-
const outline = "reach-styles-module__outline___gj9sC";
|
|
40779
|
-
const secondary = "reach-styles-module__secondary___cN5Wj";
|
|
40780
|
-
const header = "reach-styles-module__header___-izE2";
|
|
40781
|
-
const title = "reach-styles-module__title___n1hA9";
|
|
40782
|
-
const description = "reach-styles-module__description___EvXM-";
|
|
40783
|
-
const content = "reach-styles-module__content___okv68";
|
|
40784
|
-
const footer = "reach-styles-module__footer___YA4U4";
|
|
40785
|
-
const styles = {
|
|
40786
|
-
base,
|
|
40787
|
-
"default": "reach-styles-module__default___88Q0d",
|
|
40788
|
-
destructive,
|
|
40789
|
-
outline,
|
|
40790
|
-
secondary,
|
|
40791
|
-
header,
|
|
40792
|
-
title,
|
|
40793
|
-
description,
|
|
40794
|
-
content,
|
|
40795
|
-
footer
|
|
40796
|
-
};
|
|
40746
|
+
const styles = {};
|
|
40797
40747
|
const cardVariants = cva(styles.base, {
|
|
40798
40748
|
variants: {
|
|
40799
40749
|
variant: {
|
|
@@ -42137,7 +42087,7 @@ ${message2 ?? ""}`);
|
|
|
42137
42087
|
iconDefinitions,
|
|
42138
42088
|
includeSegments,
|
|
42139
42089
|
excludeSegments,
|
|
42140
|
-
title
|
|
42090
|
+
title = "Estimated Matches",
|
|
42141
42091
|
subtitle
|
|
42142
42092
|
}) => {
|
|
42143
42093
|
const {
|
|
@@ -42163,7 +42113,7 @@ ${message2 ?? ""}`);
|
|
|
42163
42113
|
}, [data?.recipients]);
|
|
42164
42114
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full p-4", children: [
|
|
42165
42115
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 md:mb-6", children: [
|
|
42166
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-semibold text-gray-900", children:
|
|
42116
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-semibold text-gray-900", children: title }),
|
|
42167
42117
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-gray-500", children: subtitle })
|
|
42168
42118
|
] }),
|
|
42169
42119
|
/* @__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: [
|
|
@@ -44604,10 +44554,10 @@ ${message2 ?? ""}`);
|
|
|
44604
44554
|
return jsxRuntime.jsx("div", { className: classNames.caption, style: styles2.caption, children: caption });
|
|
44605
44555
|
}
|
|
44606
44556
|
function Footer(props) {
|
|
44607
|
-
var _a = useDayPicker(),
|
|
44608
|
-
if (!
|
|
44557
|
+
var _a = useDayPicker(), footer = _a.footer, styles2 = _a.styles, tfoot = _a.classNames.tfoot;
|
|
44558
|
+
if (!footer)
|
|
44609
44559
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
44610
|
-
return jsxRuntime.jsx("tfoot", { className: tfoot, style: styles2.tfoot, children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 8, children:
|
|
44560
|
+
return jsxRuntime.jsx("tfoot", { className: tfoot, style: styles2.tfoot, children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 8, children: footer }) }) });
|
|
44611
44561
|
}
|
|
44612
44562
|
function getWeekdays(locale2, weekStartsOn, ISOWeek) {
|
|
44613
44563
|
var start = ISOWeek ? startOfISOWeek(/* @__PURE__ */ new Date()) : startOfWeek(/* @__PURE__ */ new Date(), { locale: locale2, weekStartsOn });
|
|
@@ -45415,15 +45365,15 @@ ${message2 ?? ""}`);
|
|
|
45415
45365
|
function WeekNumber(props) {
|
|
45416
45366
|
var weekNumber = props.number, dates2 = props.dates;
|
|
45417
45367
|
var _a = useDayPicker(), onWeekNumberClick = _a.onWeekNumberClick, styles2 = _a.styles, classNames = _a.classNames, locale2 = _a.locale, labelWeekNumber2 = _a.labels.labelWeekNumber, formatWeekNumber2 = _a.formatters.formatWeekNumber;
|
|
45418
|
-
var
|
|
45368
|
+
var content = formatWeekNumber2(Number(weekNumber), { locale: locale2 });
|
|
45419
45369
|
if (!onWeekNumberClick) {
|
|
45420
|
-
return jsxRuntime.jsx("span", { className: classNames.weeknumber, style: styles2.weeknumber, children:
|
|
45370
|
+
return jsxRuntime.jsx("span", { className: classNames.weeknumber, style: styles2.weeknumber, children: content });
|
|
45421
45371
|
}
|
|
45422
45372
|
var label = labelWeekNumber2(Number(weekNumber), { locale: locale2 });
|
|
45423
45373
|
var handleClick = function(e2) {
|
|
45424
45374
|
onWeekNumberClick(weekNumber, dates2, e2);
|
|
45425
45375
|
};
|
|
45426
|
-
return jsxRuntime.jsx(Button$1, { name: "week-number", "aria-label": label, className: classNames.weeknumber, style: styles2.weeknumber, onClick: handleClick, children:
|
|
45376
|
+
return jsxRuntime.jsx(Button$1, { name: "week-number", "aria-label": label, className: classNames.weeknumber, style: styles2.weeknumber, onClick: handleClick, children: content });
|
|
45427
45377
|
}
|
|
45428
45378
|
function Row(props) {
|
|
45429
45379
|
var _a, _b;
|
|
@@ -46444,13 +46394,13 @@ ${message2 ?? ""}`);
|
|
|
46444
46394
|
] }) })
|
|
46445
46395
|
] });
|
|
46446
46396
|
};
|
|
46447
|
-
const TitleAndContent = ({ title
|
|
46397
|
+
const TitleAndContent = ({ title, subtitle, content }) => {
|
|
46448
46398
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 w-full p-6 rounded-xl bg-gray-100 ", children: [
|
|
46449
46399
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
46450
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-semibold", children:
|
|
46400
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-semibold", children: title }),
|
|
46451
46401
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-600 mt-1", children: subtitle })
|
|
46452
46402
|
] }),
|
|
46453
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white rounded-2xl w-full border border-gray-200 p-6 relative", children:
|
|
46403
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white rounded-2xl w-full border border-gray-200 p-6 relative", children: content })
|
|
46454
46404
|
] });
|
|
46455
46405
|
};
|
|
46456
46406
|
const EditAutomationPopup = ({
|
|
@@ -47412,15 +47362,15 @@ ${message2 ?? ""}`);
|
|
|
47412
47362
|
style2.textContent = cssRules;
|
|
47413
47363
|
pip.document.head.appendChild(style2);
|
|
47414
47364
|
} catch (e2) {
|
|
47415
|
-
const
|
|
47365
|
+
const link = document.createElement("link");
|
|
47416
47366
|
if (styleSheet.href == null) {
|
|
47417
47367
|
return;
|
|
47418
47368
|
}
|
|
47419
|
-
|
|
47420
|
-
|
|
47421
|
-
|
|
47422
|
-
|
|
47423
|
-
pip.document.head.appendChild(
|
|
47369
|
+
link.rel = "stylesheet";
|
|
47370
|
+
link.type = styleSheet.type;
|
|
47371
|
+
link.media = styleSheet.media.toString();
|
|
47372
|
+
link.href = styleSheet.href;
|
|
47373
|
+
pip.document.head.appendChild(link);
|
|
47424
47374
|
}
|
|
47425
47375
|
});
|
|
47426
47376
|
delegateEvents(["focusin", "focusout", "pointermove", "keydown", "pointerdown", "pointerup", "click", "mousedown", "input"], pip.document);
|
|
@@ -48702,11 +48652,11 @@ ${message2 ?? ""}`);
|
|
|
48702
48652
|
var TABBABLE_ELEMENT_SELECTOR = tabbableElements.join(
|
|
48703
48653
|
':not([hidden]):not([tabindex="-1"]),'
|
|
48704
48654
|
);
|
|
48705
|
-
function getAllTabbableIn(
|
|
48706
|
-
const elements = Array.from(
|
|
48655
|
+
function getAllTabbableIn(container, includeContainer) {
|
|
48656
|
+
const elements = Array.from(container.querySelectorAll(FOCUSABLE_ELEMENT_SELECTOR));
|
|
48707
48657
|
const tabbableElements2 = elements.filter(isTabbable);
|
|
48708
|
-
if (includeContainer && isTabbable(
|
|
48709
|
-
tabbableElements2.unshift(
|
|
48658
|
+
if (includeContainer && isTabbable(container)) {
|
|
48659
|
+
tabbableElements2.unshift(container);
|
|
48710
48660
|
}
|
|
48711
48661
|
tabbableElements2.forEach((element, i2) => {
|
|
48712
48662
|
if (isFrame(element) && element.contentDocument) {
|
|
@@ -52498,12 +52448,12 @@ ${message2 ?? ""}`);
|
|
|
52498
52448
|
});
|
|
52499
52449
|
createEffect(() => {
|
|
52500
52450
|
const positioner = positionerRef();
|
|
52501
|
-
const
|
|
52502
|
-
if (!positioner || !
|
|
52451
|
+
const content = mergedProps.contentRef?.();
|
|
52452
|
+
if (!positioner || !content) {
|
|
52503
52453
|
return;
|
|
52504
52454
|
}
|
|
52505
52455
|
queueMicrotask(() => {
|
|
52506
|
-
positioner.style.zIndex = getComputedStyle(
|
|
52456
|
+
positioner.style.zIndex = getComputedStyle(content).zIndex;
|
|
52507
52457
|
});
|
|
52508
52458
|
});
|
|
52509
52459
|
const context = {
|
|
@@ -52569,9 +52519,9 @@ ${message2 ?? ""}`);
|
|
|
52569
52519
|
};
|
|
52570
52520
|
const onPointerDown = (e2) => {
|
|
52571
52521
|
function handler() {
|
|
52572
|
-
const
|
|
52522
|
+
const container = ref();
|
|
52573
52523
|
const target = e2.target;
|
|
52574
|
-
if (!
|
|
52524
|
+
if (!container || !target || !isEventOutside(e2)) {
|
|
52575
52525
|
return;
|
|
52576
52526
|
}
|
|
52577
52527
|
const handler2 = composeEventHandlers([
|
|
@@ -52603,9 +52553,9 @@ ${message2 ?? ""}`);
|
|
|
52603
52553
|
}
|
|
52604
52554
|
};
|
|
52605
52555
|
const onFocusIn = (e2) => {
|
|
52606
|
-
const
|
|
52556
|
+
const container = ref();
|
|
52607
52557
|
const target = e2.target;
|
|
52608
|
-
if (!
|
|
52558
|
+
if (!container || !target || !isEventOutside(e2)) {
|
|
52609
52559
|
return;
|
|
52610
52560
|
}
|
|
52611
52561
|
const handler = composeEventHandlers([
|
|
@@ -53318,11 +53268,11 @@ ${message2 ?? ""}`);
|
|
|
53318
53268
|
return element;
|
|
53319
53269
|
};
|
|
53320
53270
|
const tabbables = () => {
|
|
53321
|
-
const
|
|
53322
|
-
if (!
|
|
53271
|
+
const container = ref();
|
|
53272
|
+
if (!container) {
|
|
53323
53273
|
return [];
|
|
53324
53274
|
}
|
|
53325
|
-
return getAllTabbableIn(
|
|
53275
|
+
return getAllTabbableIn(container, true).filter((el) => !el.hasAttribute("data-focus-trap"));
|
|
53326
53276
|
};
|
|
53327
53277
|
const firstTabbable = () => {
|
|
53328
53278
|
const items = tabbables();
|
|
@@ -53333,60 +53283,60 @@ ${message2 ?? ""}`);
|
|
|
53333
53283
|
return items.length > 0 ? items[items.length - 1] : null;
|
|
53334
53284
|
};
|
|
53335
53285
|
const shouldPreventUnmountAutoFocus = () => {
|
|
53336
|
-
const
|
|
53337
|
-
if (!
|
|
53286
|
+
const container = ref();
|
|
53287
|
+
if (!container) {
|
|
53338
53288
|
return false;
|
|
53339
53289
|
}
|
|
53340
|
-
const activeElement = getActiveElement(
|
|
53290
|
+
const activeElement = getActiveElement(container);
|
|
53341
53291
|
if (!activeElement) {
|
|
53342
53292
|
return false;
|
|
53343
53293
|
}
|
|
53344
|
-
if (contains(
|
|
53294
|
+
if (contains(container, activeElement)) {
|
|
53345
53295
|
return false;
|
|
53346
53296
|
}
|
|
53347
53297
|
return isFocusable(activeElement);
|
|
53348
53298
|
};
|
|
53349
53299
|
createEffect(() => {
|
|
53350
|
-
const
|
|
53351
|
-
if (!
|
|
53300
|
+
const container = ref();
|
|
53301
|
+
if (!container) {
|
|
53352
53302
|
return;
|
|
53353
53303
|
}
|
|
53354
53304
|
focusScopeStack.add(focusScope);
|
|
53355
|
-
const previouslyFocusedElement = getActiveElement(
|
|
53356
|
-
const hasFocusedCandidate = contains(
|
|
53305
|
+
const previouslyFocusedElement = getActiveElement(container);
|
|
53306
|
+
const hasFocusedCandidate = contains(container, previouslyFocusedElement);
|
|
53357
53307
|
if (!hasFocusedCandidate) {
|
|
53358
53308
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT_EVENT, EVENT_OPTIONS);
|
|
53359
|
-
|
|
53360
|
-
|
|
53309
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT_EVENT, onMountAutoFocus);
|
|
53310
|
+
container.dispatchEvent(mountEvent);
|
|
53361
53311
|
if (!mountEvent.defaultPrevented) {
|
|
53362
53312
|
setTimeout(() => {
|
|
53363
53313
|
focusWithoutScrolling(firstTabbable());
|
|
53364
|
-
if (getActiveElement(
|
|
53365
|
-
focusWithoutScrolling(
|
|
53314
|
+
if (getActiveElement(container) === previouslyFocusedElement) {
|
|
53315
|
+
focusWithoutScrolling(container);
|
|
53366
53316
|
}
|
|
53367
53317
|
}, 0);
|
|
53368
53318
|
}
|
|
53369
53319
|
}
|
|
53370
53320
|
onCleanup(() => {
|
|
53371
|
-
|
|
53321
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT_EVENT, onMountAutoFocus);
|
|
53372
53322
|
setTimeout(() => {
|
|
53373
53323
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT_EVENT, EVENT_OPTIONS);
|
|
53374
53324
|
if (shouldPreventUnmountAutoFocus()) {
|
|
53375
53325
|
unmountEvent.preventDefault();
|
|
53376
53326
|
}
|
|
53377
|
-
|
|
53378
|
-
|
|
53327
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT_EVENT, onUnmountAutoFocus);
|
|
53328
|
+
container.dispatchEvent(unmountEvent);
|
|
53379
53329
|
if (!unmountEvent.defaultPrevented) {
|
|
53380
53330
|
focusWithoutScrolling(previouslyFocusedElement ?? ownerDocument().body);
|
|
53381
53331
|
}
|
|
53382
|
-
|
|
53332
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT_EVENT, onUnmountAutoFocus);
|
|
53383
53333
|
focusScopeStack.remove(focusScope);
|
|
53384
53334
|
}, 0);
|
|
53385
53335
|
});
|
|
53386
53336
|
});
|
|
53387
53337
|
createEffect(() => {
|
|
53388
|
-
const
|
|
53389
|
-
if (!
|
|
53338
|
+
const container = ref();
|
|
53339
|
+
if (!container || !access(props.trapFocus) || isPaused()) {
|
|
53390
53340
|
return;
|
|
53391
53341
|
}
|
|
53392
53342
|
const onFocusIn = (event) => {
|
|
@@ -53394,7 +53344,7 @@ ${message2 ?? ""}`);
|
|
|
53394
53344
|
if (target?.closest(`[${DATA_TOP_LAYER_ATTR}]`)) {
|
|
53395
53345
|
return;
|
|
53396
53346
|
}
|
|
53397
|
-
if (contains(
|
|
53347
|
+
if (contains(container, target)) {
|
|
53398
53348
|
lastFocusedElement = target;
|
|
53399
53349
|
} else {
|
|
53400
53350
|
focusWithoutScrolling(lastFocusedElement);
|
|
@@ -53402,11 +53352,11 @@ ${message2 ?? ""}`);
|
|
|
53402
53352
|
};
|
|
53403
53353
|
const onFocusOut = (event) => {
|
|
53404
53354
|
const relatedTarget = event.relatedTarget;
|
|
53405
|
-
const target = relatedTarget ?? getActiveElement(
|
|
53355
|
+
const target = relatedTarget ?? getActiveElement(container);
|
|
53406
53356
|
if (target?.closest(`[${DATA_TOP_LAYER_ATTR}]`)) {
|
|
53407
53357
|
return;
|
|
53408
53358
|
}
|
|
53409
|
-
if (!contains(
|
|
53359
|
+
if (!contains(container, target)) {
|
|
53410
53360
|
focusWithoutScrolling(lastFocusedElement);
|
|
53411
53361
|
}
|
|
53412
53362
|
};
|
|
@@ -53418,14 +53368,14 @@ ${message2 ?? ""}`);
|
|
|
53418
53368
|
});
|
|
53419
53369
|
});
|
|
53420
53370
|
createEffect(() => {
|
|
53421
|
-
const
|
|
53422
|
-
if (!
|
|
53371
|
+
const container = ref();
|
|
53372
|
+
if (!container || !access(props.trapFocus) || isPaused()) {
|
|
53423
53373
|
return;
|
|
53424
53374
|
}
|
|
53425
53375
|
const startSentinel = createSentinel();
|
|
53426
|
-
|
|
53376
|
+
container.insertAdjacentElement("afterbegin", startSentinel);
|
|
53427
53377
|
const endSentinel = createSentinel();
|
|
53428
|
-
|
|
53378
|
+
container.insertAdjacentElement("beforeend", endSentinel);
|
|
53429
53379
|
function onFocus(event) {
|
|
53430
53380
|
const first = firstTabbable();
|
|
53431
53381
|
const last = lastTabbable();
|
|
@@ -53441,15 +53391,15 @@ ${message2 ?? ""}`);
|
|
|
53441
53391
|
for (const mutation of mutations) {
|
|
53442
53392
|
if (mutation.previousSibling === endSentinel) {
|
|
53443
53393
|
endSentinel.remove();
|
|
53444
|
-
|
|
53394
|
+
container.insertAdjacentElement("beforeend", endSentinel);
|
|
53445
53395
|
}
|
|
53446
53396
|
if (mutation.nextSibling === startSentinel) {
|
|
53447
53397
|
startSentinel.remove();
|
|
53448
|
-
|
|
53398
|
+
container.insertAdjacentElement("afterbegin", startSentinel);
|
|
53449
53399
|
}
|
|
53450
53400
|
}
|
|
53451
53401
|
});
|
|
53452
|
-
observer.observe(
|
|
53402
|
+
observer.observe(container, {
|
|
53453
53403
|
childList: true,
|
|
53454
53404
|
subtree: false
|
|
53455
53405
|
});
|
|
@@ -54671,9 +54621,9 @@ ${message2 ?? ""}`);
|
|
|
54671
54621
|
disclosureState.toggle();
|
|
54672
54622
|
};
|
|
54673
54623
|
const _focusContent = () => {
|
|
54674
|
-
const
|
|
54675
|
-
if (
|
|
54676
|
-
focusWithoutScrolling(
|
|
54624
|
+
const content = contentRef();
|
|
54625
|
+
if (content) {
|
|
54626
|
+
focusWithoutScrolling(content);
|
|
54677
54627
|
listState.selectionManager().setFocused(true);
|
|
54678
54628
|
listState.selectionManager().setFocusedKey(void 0);
|
|
54679
54629
|
}
|