@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/chunks/index.js
CHANGED
|
@@ -4302,33 +4302,33 @@ function createElement(tagName, isSVG = false) {
|
|
|
4302
4302
|
}
|
|
4303
4303
|
function Portal$7(props) {
|
|
4304
4304
|
const { useShadow } = props, marker = document.createTextNode(""), mount = () => props.mount || document.body, owner = getOwner();
|
|
4305
|
-
let
|
|
4305
|
+
let content2;
|
|
4306
4306
|
let hydrating = !!sharedConfig.context;
|
|
4307
4307
|
createEffect(
|
|
4308
4308
|
() => {
|
|
4309
4309
|
if (hydrating)
|
|
4310
4310
|
getOwner().user = hydrating = false;
|
|
4311
|
-
|
|
4311
|
+
content2 || (content2 = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
4312
4312
|
const el = mount();
|
|
4313
4313
|
if (el instanceof HTMLHeadElement) {
|
|
4314
4314
|
const [clean, setClean] = createSignal(false);
|
|
4315
4315
|
const cleanup = () => setClean(true);
|
|
4316
|
-
createRoot((dispose2) => insert(el, () => !clean() ?
|
|
4316
|
+
createRoot((dispose2) => insert(el, () => !clean() ? content2() : dispose2(), null));
|
|
4317
4317
|
onCleanup(cleanup);
|
|
4318
4318
|
} else {
|
|
4319
|
-
const
|
|
4319
|
+
const container2 = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container2.attachShadow ? container2.attachShadow({
|
|
4320
4320
|
mode: "open"
|
|
4321
|
-
}) :
|
|
4322
|
-
Object.defineProperty(
|
|
4321
|
+
}) : container2;
|
|
4322
|
+
Object.defineProperty(container2, "_$host", {
|
|
4323
4323
|
get() {
|
|
4324
4324
|
return marker.parentNode;
|
|
4325
4325
|
},
|
|
4326
4326
|
configurable: true
|
|
4327
4327
|
});
|
|
4328
|
-
insert(renderRoot,
|
|
4329
|
-
el.appendChild(
|
|
4330
|
-
props.ref && props.ref(
|
|
4331
|
-
onCleanup(() => el.removeChild(
|
|
4328
|
+
insert(renderRoot, content2);
|
|
4329
|
+
el.appendChild(container2);
|
|
4330
|
+
props.ref && props.ref(container2);
|
|
4331
|
+
onCleanup(() => el.removeChild(container2));
|
|
4332
4332
|
}
|
|
4333
4333
|
},
|
|
4334
4334
|
void 0,
|
|
@@ -11136,7 +11136,7 @@ class Browser {
|
|
|
11136
11136
|
}
|
|
11137
11137
|
Browser.type = "languageDetector";
|
|
11138
11138
|
const ad_spend$1 = "Ad Spend";
|
|
11139
|
-
const date$
|
|
11139
|
+
const date$2 = "Date";
|
|
11140
11140
|
const close$1 = "Close";
|
|
11141
11141
|
const connected$1 = "Connected";
|
|
11142
11142
|
const connecting$1 = "Connecting...";
|
|
@@ -11523,7 +11523,7 @@ const empty_state$1 = {
|
|
|
11523
11523
|
};
|
|
11524
11524
|
const enCommon = {
|
|
11525
11525
|
ad_spend: ad_spend$1,
|
|
11526
|
-
date: date$
|
|
11526
|
+
date: date$2,
|
|
11527
11527
|
close: close$1,
|
|
11528
11528
|
"continue": "Continue",
|
|
11529
11529
|
connected: connected$1,
|
|
@@ -11562,7 +11562,7 @@ const enCommon = {
|
|
|
11562
11562
|
empty_state: empty_state$1
|
|
11563
11563
|
};
|
|
11564
11564
|
const ad_spend = "Gasto en anuncios";
|
|
11565
|
-
const date = "Fecha";
|
|
11565
|
+
const date$1 = "Fecha";
|
|
11566
11566
|
const close = "Cerrar";
|
|
11567
11567
|
const connected = "Conectado";
|
|
11568
11568
|
const connecting = "Conectando...";
|
|
@@ -11949,7 +11949,7 @@ const empty_state = {
|
|
|
11949
11949
|
};
|
|
11950
11950
|
const esCommon = {
|
|
11951
11951
|
ad_spend,
|
|
11952
|
-
date,
|
|
11952
|
+
date: date$1,
|
|
11953
11953
|
close,
|
|
11954
11954
|
"continue": "Continuar",
|
|
11955
11955
|
connected,
|
|
@@ -12671,8 +12671,8 @@ var Portal$6 = React.forwardRef((props, forwardedRef) => {
|
|
|
12671
12671
|
const { container: containerProp, ...portalProps } = props;
|
|
12672
12672
|
const [mounted, setMounted] = React.useState(false);
|
|
12673
12673
|
useLayoutEffect2(() => setMounted(true), []);
|
|
12674
|
-
const
|
|
12675
|
-
return
|
|
12674
|
+
const container2 = containerProp || mounted && globalThis?.document?.body;
|
|
12675
|
+
return container2 ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive$3.div, { ...portalProps, ref: forwardedRef }), container2) : null;
|
|
12676
12676
|
});
|
|
12677
12677
|
Portal$6.displayName = PORTAL_NAME$7;
|
|
12678
12678
|
function useStateMachine(initialState, machine) {
|
|
@@ -13395,9 +13395,9 @@ var ToastAnnounceExclude = React.forwardRef((props, forwardedRef) => {
|
|
|
13395
13395
|
}
|
|
13396
13396
|
);
|
|
13397
13397
|
});
|
|
13398
|
-
function getAnnounceTextContent(
|
|
13398
|
+
function getAnnounceTextContent(container2) {
|
|
13399
13399
|
const textContent = [];
|
|
13400
|
-
const childNodes = Array.from(
|
|
13400
|
+
const childNodes = Array.from(container2.childNodes);
|
|
13401
13401
|
childNodes.forEach((node) => {
|
|
13402
13402
|
if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent);
|
|
13403
13403
|
if (isHTMLElement$1(node)) {
|
|
@@ -13451,9 +13451,9 @@ function useNextFrame(callback = () => {
|
|
|
13451
13451
|
function isHTMLElement$1(node) {
|
|
13452
13452
|
return node.nodeType === node.ELEMENT_NODE;
|
|
13453
13453
|
}
|
|
13454
|
-
function getTabbableCandidates$2(
|
|
13454
|
+
function getTabbableCandidates$2(container2) {
|
|
13455
13455
|
const nodes = [];
|
|
13456
|
-
const walker2 = document.createTreeWalker(
|
|
13456
|
+
const walker2 = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
13457
13457
|
acceptNode: (node) => {
|
|
13458
13458
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
13459
13459
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -13493,9 +13493,9 @@ function clsx() {
|
|
|
13493
13493
|
}
|
|
13494
13494
|
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
13495
13495
|
const cx = clsx;
|
|
13496
|
-
const cva = (
|
|
13496
|
+
const cva = (base2, config) => (props) => {
|
|
13497
13497
|
var _config_compoundVariants;
|
|
13498
|
-
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(
|
|
13498
|
+
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);
|
|
13499
13499
|
const { variants, defaultVariants } = config;
|
|
13500
13500
|
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
13501
13501
|
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
@@ -13529,7 +13529,7 @@ const cva = (base, config) => (props) => {
|
|
|
13529
13529
|
cvClassName
|
|
13530
13530
|
] : acc;
|
|
13531
13531
|
}, []);
|
|
13532
|
-
return cx(
|
|
13532
|
+
return cx(base2, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
13533
13533
|
};
|
|
13534
13534
|
/**
|
|
13535
13535
|
* @license lucide-react v0.464.0 - ISC
|
|
@@ -16542,11 +16542,11 @@ ToastDescription.displayName = Description$1.displayName;
|
|
|
16542
16542
|
function Toaster() {
|
|
16543
16543
|
const { toasts } = useToast();
|
|
16544
16544
|
return /* @__PURE__ */ jsxs(ToastProvider, { children: [
|
|
16545
|
-
toasts.map(function({ id: id2, title, description, action, ...props }) {
|
|
16545
|
+
toasts.map(function({ id: id2, title: title2, description: description2, action, ...props }) {
|
|
16546
16546
|
return /* @__PURE__ */ jsxs(Toast, { ...props, children: [
|
|
16547
16547
|
/* @__PURE__ */ jsxs("div", { className: "grid gap-1", children: [
|
|
16548
|
-
|
|
16549
|
-
|
|
16548
|
+
title2 && /* @__PURE__ */ jsx(ToastTitle, { children: title2 }),
|
|
16549
|
+
description2 && /* @__PURE__ */ jsx(ToastDescription, { children: description2 })
|
|
16550
16550
|
] }),
|
|
16551
16551
|
action,
|
|
16552
16552
|
/* @__PURE__ */ jsx(ToastClose, {})
|
|
@@ -24221,7 +24221,29 @@ function getElementRef$2(element) {
|
|
|
24221
24221
|
}
|
|
24222
24222
|
return element.props.ref || element.ref;
|
|
24223
24223
|
}
|
|
24224
|
-
const
|
|
24224
|
+
const base$2 = "reach-styles-module__base___gfFyc";
|
|
24225
|
+
const destructive$2 = "reach-styles-module__destructive___XjBvS";
|
|
24226
|
+
const outline$2 = "reach-styles-module__outline___gFp3i";
|
|
24227
|
+
const secondary$2 = "reach-styles-module__secondary___Pd-e3";
|
|
24228
|
+
const ghost = "reach-styles-module__ghost___GcnJq";
|
|
24229
|
+
const link = "reach-styles-module__link___EgS2H";
|
|
24230
|
+
const sizeDefault = "reach-styles-module__sizeDefault___8kU5A";
|
|
24231
|
+
const sizeSm = "reach-styles-module__sizeSm___zPIEh";
|
|
24232
|
+
const sizeLg = "reach-styles-module__sizeLg___D2G8z";
|
|
24233
|
+
const sizeIcon = "reach-styles-module__sizeIcon___5XkYW";
|
|
24234
|
+
const styles$6 = {
|
|
24235
|
+
base: base$2,
|
|
24236
|
+
"default": "reach-styles-module__default___ny1h7",
|
|
24237
|
+
destructive: destructive$2,
|
|
24238
|
+
outline: outline$2,
|
|
24239
|
+
secondary: secondary$2,
|
|
24240
|
+
ghost,
|
|
24241
|
+
link,
|
|
24242
|
+
sizeDefault,
|
|
24243
|
+
sizeSm,
|
|
24244
|
+
sizeLg,
|
|
24245
|
+
sizeIcon
|
|
24246
|
+
};
|
|
24225
24247
|
const buttonVariants = cva([styles$6.base], {
|
|
24226
24248
|
variants: {
|
|
24227
24249
|
variant: {
|
|
@@ -24233,10 +24255,10 @@ const buttonVariants = cva([styles$6.base], {
|
|
|
24233
24255
|
link: styles$6.link
|
|
24234
24256
|
},
|
|
24235
24257
|
size: {
|
|
24236
|
-
default: styles$6
|
|
24237
|
-
sm: styles$6
|
|
24238
|
-
lg: styles$6
|
|
24239
|
-
icon: styles$6
|
|
24258
|
+
default: styles$6.sizeDefault,
|
|
24259
|
+
sm: styles$6.sizeSm,
|
|
24260
|
+
lg: styles$6.sizeLg,
|
|
24261
|
+
icon: styles$6.sizeIcon
|
|
24240
24262
|
}
|
|
24241
24263
|
},
|
|
24242
24264
|
defaultVariants: {
|
|
@@ -24309,7 +24331,7 @@ const ActionButtons$1 = ({
|
|
|
24309
24331
|
)
|
|
24310
24332
|
] }) });
|
|
24311
24333
|
};
|
|
24312
|
-
const BigSelector = ({ onClick, title, subtitle, icon, selected, disabled = false }) => {
|
|
24334
|
+
const BigSelector = ({ onClick, title: title2, subtitle, icon, selected, disabled = false }) => {
|
|
24313
24335
|
return /* @__PURE__ */ jsxs(
|
|
24314
24336
|
"button",
|
|
24315
24337
|
{
|
|
@@ -24318,7 +24340,7 @@ const BigSelector = ({ onClick, title, subtitle, icon, selected, disabled = fals
|
|
|
24318
24340
|
children: [
|
|
24319
24341
|
icon,
|
|
24320
24342
|
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
24321
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-gray-900", children:
|
|
24343
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-gray-900", children: title2 }),
|
|
24322
24344
|
/* @__PURE__ */ jsx("div", { className: "text-xs text-gray-500", children: subtitle })
|
|
24323
24345
|
] })
|
|
24324
24346
|
]
|
|
@@ -25987,8 +26009,8 @@ async function getKeyedPrefetchLinks(matches, manifest, routeModules) {
|
|
|
25987
26009
|
})
|
|
25988
26010
|
);
|
|
25989
26011
|
return dedupeLinkDescriptors(
|
|
25990
|
-
links.flat(1).filter(isHtmlLinkDescriptor).filter((
|
|
25991
|
-
(
|
|
26012
|
+
links.flat(1).filter(isHtmlLinkDescriptor).filter((link2) => link2.rel === "stylesheet" || link2.rel === "preload").map(
|
|
26013
|
+
(link2) => link2.rel === "stylesheet" ? { ...link2, rel: "prefetch", as: "style" } : { ...link2, rel: "prefetch" }
|
|
25992
26014
|
)
|
|
25993
26015
|
);
|
|
25994
26016
|
}
|
|
@@ -26287,10 +26309,10 @@ function PrefetchPageLinksImpl({
|
|
|
26287
26309
|
[newMatchesForAssets, manifest]
|
|
26288
26310
|
);
|
|
26289
26311
|
let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
|
|
26290
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React.createElement("link", { key: href, rel: "prefetch", as: "fetch", href, ...linkProps })), moduleHrefs.map((href) => /* @__PURE__ */ React.createElement("link", { key: href, rel: "modulepreload", href, ...linkProps })), keyedPrefetchLinks.map(({ key, link }) => (
|
|
26312
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React.createElement("link", { key: href, rel: "prefetch", as: "fetch", href, ...linkProps })), moduleHrefs.map((href) => /* @__PURE__ */ React.createElement("link", { key: href, rel: "modulepreload", href, ...linkProps })), keyedPrefetchLinks.map(({ key, link: link2 }) => (
|
|
26291
26313
|
// these don't spread `linkProps` because they are full link descriptors
|
|
26292
26314
|
// already with their own props
|
|
26293
|
-
/* @__PURE__ */ React.createElement("link", { key, ...
|
|
26315
|
+
/* @__PURE__ */ React.createElement("link", { key, ...link2 })
|
|
26294
26316
|
)));
|
|
26295
26317
|
}
|
|
26296
26318
|
function mergeRefs(...refs) {
|
|
@@ -26370,7 +26392,7 @@ var Link = React.forwardRef(
|
|
|
26370
26392
|
internalOnClick(event);
|
|
26371
26393
|
}
|
|
26372
26394
|
}
|
|
26373
|
-
let
|
|
26395
|
+
let link2 = (
|
|
26374
26396
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
26375
26397
|
/* @__PURE__ */ React.createElement(
|
|
26376
26398
|
"a",
|
|
@@ -26385,7 +26407,7 @@ var Link = React.forwardRef(
|
|
|
26385
26407
|
}
|
|
26386
26408
|
)
|
|
26387
26409
|
);
|
|
26388
|
-
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null,
|
|
26410
|
+
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link2, /* @__PURE__ */ React.createElement(PrefetchPageLinks, { page: href })) : link2;
|
|
26389
26411
|
}
|
|
26390
26412
|
);
|
|
26391
26413
|
Link.displayName = "Link";
|
|
@@ -27100,7 +27122,7 @@ var FocusScope$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
27100
27122
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
27101
27123
|
...scopeProps
|
|
27102
27124
|
} = props;
|
|
27103
|
-
const [
|
|
27125
|
+
const [container2, setContainer] = React.useState(null);
|
|
27104
27126
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
27105
27127
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
27106
27128
|
const lastFocusedElementRef = React.useRef(null);
|
|
@@ -27117,69 +27139,69 @@ var FocusScope$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
27117
27139
|
React.useEffect(() => {
|
|
27118
27140
|
if (trapped) {
|
|
27119
27141
|
let handleFocusIn2 = function(event) {
|
|
27120
|
-
if (focusScope.paused || !
|
|
27142
|
+
if (focusScope.paused || !container2) return;
|
|
27121
27143
|
const target = event.target;
|
|
27122
|
-
if (
|
|
27144
|
+
if (container2.contains(target)) {
|
|
27123
27145
|
lastFocusedElementRef.current = target;
|
|
27124
27146
|
} else {
|
|
27125
27147
|
focus$1(lastFocusedElementRef.current, { select: true });
|
|
27126
27148
|
}
|
|
27127
27149
|
}, handleFocusOut2 = function(event) {
|
|
27128
|
-
if (focusScope.paused || !
|
|
27150
|
+
if (focusScope.paused || !container2) return;
|
|
27129
27151
|
const relatedTarget = event.relatedTarget;
|
|
27130
27152
|
if (relatedTarget === null) return;
|
|
27131
|
-
if (!
|
|
27153
|
+
if (!container2.contains(relatedTarget)) {
|
|
27132
27154
|
focus$1(lastFocusedElementRef.current, { select: true });
|
|
27133
27155
|
}
|
|
27134
27156
|
}, handleMutations2 = function(mutations) {
|
|
27135
27157
|
const focusedElement = document.activeElement;
|
|
27136
27158
|
if (focusedElement !== document.body) return;
|
|
27137
27159
|
for (const mutation of mutations) {
|
|
27138
|
-
if (mutation.removedNodes.length > 0) focus$1(
|
|
27160
|
+
if (mutation.removedNodes.length > 0) focus$1(container2);
|
|
27139
27161
|
}
|
|
27140
27162
|
};
|
|
27141
27163
|
document.addEventListener("focusin", handleFocusIn2);
|
|
27142
27164
|
document.addEventListener("focusout", handleFocusOut2);
|
|
27143
27165
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
27144
|
-
if (
|
|
27166
|
+
if (container2) mutationObserver.observe(container2, { childList: true, subtree: true });
|
|
27145
27167
|
return () => {
|
|
27146
27168
|
document.removeEventListener("focusin", handleFocusIn2);
|
|
27147
27169
|
document.removeEventListener("focusout", handleFocusOut2);
|
|
27148
27170
|
mutationObserver.disconnect();
|
|
27149
27171
|
};
|
|
27150
27172
|
}
|
|
27151
|
-
}, [trapped,
|
|
27173
|
+
}, [trapped, container2, focusScope.paused]);
|
|
27152
27174
|
React.useEffect(() => {
|
|
27153
|
-
if (
|
|
27175
|
+
if (container2) {
|
|
27154
27176
|
focusScopesStack$1.add(focusScope);
|
|
27155
27177
|
const previouslyFocusedElement = document.activeElement;
|
|
27156
|
-
const hasFocusedCandidate =
|
|
27178
|
+
const hasFocusedCandidate = container2.contains(previouslyFocusedElement);
|
|
27157
27179
|
if (!hasFocusedCandidate) {
|
|
27158
27180
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT$1, EVENT_OPTIONS$2);
|
|
27159
|
-
|
|
27160
|
-
|
|
27181
|
+
container2.addEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
27182
|
+
container2.dispatchEvent(mountEvent);
|
|
27161
27183
|
if (!mountEvent.defaultPrevented) {
|
|
27162
|
-
focusFirst$3(removeLinks$1(getTabbableCandidates$1(
|
|
27184
|
+
focusFirst$3(removeLinks$1(getTabbableCandidates$1(container2)), { select: true });
|
|
27163
27185
|
if (document.activeElement === previouslyFocusedElement) {
|
|
27164
|
-
focus$1(
|
|
27186
|
+
focus$1(container2);
|
|
27165
27187
|
}
|
|
27166
27188
|
}
|
|
27167
27189
|
}
|
|
27168
27190
|
return () => {
|
|
27169
|
-
|
|
27191
|
+
container2.removeEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
27170
27192
|
setTimeout(() => {
|
|
27171
27193
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT$1, EVENT_OPTIONS$2);
|
|
27172
|
-
|
|
27173
|
-
|
|
27194
|
+
container2.addEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
27195
|
+
container2.dispatchEvent(unmountEvent);
|
|
27174
27196
|
if (!unmountEvent.defaultPrevented) {
|
|
27175
27197
|
focus$1(previouslyFocusedElement ?? document.body, { select: true });
|
|
27176
27198
|
}
|
|
27177
|
-
|
|
27199
|
+
container2.removeEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
27178
27200
|
focusScopesStack$1.remove(focusScope);
|
|
27179
27201
|
}, 0);
|
|
27180
27202
|
};
|
|
27181
27203
|
}
|
|
27182
|
-
}, [
|
|
27204
|
+
}, [container2, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
27183
27205
|
const handleKeyDown = React.useCallback(
|
|
27184
27206
|
(event) => {
|
|
27185
27207
|
if (!loop && !trapped) return;
|
|
@@ -27187,11 +27209,11 @@ var FocusScope$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
27187
27209
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
27188
27210
|
const focusedElement = document.activeElement;
|
|
27189
27211
|
if (isTabKey && focusedElement) {
|
|
27190
|
-
const
|
|
27191
|
-
const [first, last] = getTabbableEdges$1(
|
|
27212
|
+
const container22 = event.currentTarget;
|
|
27213
|
+
const [first, last] = getTabbableEdges$1(container22);
|
|
27192
27214
|
const hasTabbableElementsInside = first && last;
|
|
27193
27215
|
if (!hasTabbableElementsInside) {
|
|
27194
|
-
if (focusedElement ===
|
|
27216
|
+
if (focusedElement === container22) event.preventDefault();
|
|
27195
27217
|
} else {
|
|
27196
27218
|
if (!event.shiftKey && focusedElement === last) {
|
|
27197
27219
|
event.preventDefault();
|
|
@@ -27215,15 +27237,15 @@ function focusFirst$3(candidates, { select = false } = {}) {
|
|
|
27215
27237
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
27216
27238
|
}
|
|
27217
27239
|
}
|
|
27218
|
-
function getTabbableEdges$1(
|
|
27219
|
-
const candidates = getTabbableCandidates$1(
|
|
27220
|
-
const first = findVisible$1(candidates,
|
|
27221
|
-
const last = findVisible$1(candidates.reverse(),
|
|
27240
|
+
function getTabbableEdges$1(container2) {
|
|
27241
|
+
const candidates = getTabbableCandidates$1(container2);
|
|
27242
|
+
const first = findVisible$1(candidates, container2);
|
|
27243
|
+
const last = findVisible$1(candidates.reverse(), container2);
|
|
27222
27244
|
return [first, last];
|
|
27223
27245
|
}
|
|
27224
|
-
function getTabbableCandidates$1(
|
|
27246
|
+
function getTabbableCandidates$1(container2) {
|
|
27225
27247
|
const nodes = [];
|
|
27226
|
-
const walker2 = document.createTreeWalker(
|
|
27248
|
+
const walker2 = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
27227
27249
|
acceptNode: (node) => {
|
|
27228
27250
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
27229
27251
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -27233,9 +27255,9 @@ function getTabbableCandidates$1(container) {
|
|
|
27233
27255
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
27234
27256
|
return nodes;
|
|
27235
27257
|
}
|
|
27236
|
-
function findVisible$1(elements,
|
|
27258
|
+
function findVisible$1(elements, container2) {
|
|
27237
27259
|
for (const element of elements) {
|
|
27238
|
-
if (!isHidden$1(element, { upTo:
|
|
27260
|
+
if (!isHidden$1(element, { upTo: container2 })) return element;
|
|
27239
27261
|
}
|
|
27240
27262
|
}
|
|
27241
27263
|
function isHidden$1(node, { upTo }) {
|
|
@@ -27292,8 +27314,8 @@ var Portal$5 = React.forwardRef((props, forwardedRef) => {
|
|
|
27292
27314
|
const { container: containerProp, ...portalProps } = props;
|
|
27293
27315
|
const [mounted, setMounted] = React.useState(false);
|
|
27294
27316
|
useLayoutEffect2(() => setMounted(true), []);
|
|
27295
|
-
const
|
|
27296
|
-
return
|
|
27317
|
+
const container2 = containerProp || mounted && globalThis?.document?.body;
|
|
27318
|
+
return container2 ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive$2.div, { ...portalProps, ref: forwardedRef }), container2) : null;
|
|
27297
27319
|
});
|
|
27298
27320
|
Portal$5.displayName = PORTAL_NAME$6;
|
|
27299
27321
|
var count = 0;
|
|
@@ -28158,9 +28180,9 @@ var [PortalProvider$3, usePortalContext$3] = createDialogContext(PORTAL_NAME$5,
|
|
|
28158
28180
|
forceMount: void 0
|
|
28159
28181
|
});
|
|
28160
28182
|
var DialogPortal$1 = (props) => {
|
|
28161
|
-
const { __scopeDialog, forceMount, children: children2, container } = props;
|
|
28183
|
+
const { __scopeDialog, forceMount, children: children2, container: container2 } = props;
|
|
28162
28184
|
const context = useDialogContext(PORTAL_NAME$5, __scopeDialog);
|
|
28163
|
-
return /* @__PURE__ */ jsx(PortalProvider$3, { scope: __scopeDialog, forceMount, children: React.Children.map(children2, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$5, { asChild: true, container, children: child }) })) });
|
|
28185
|
+
return /* @__PURE__ */ jsx(PortalProvider$3, { scope: __scopeDialog, forceMount, children: React.Children.map(children2, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$5, { asChild: true, container: container2, children: child }) })) });
|
|
28164
28186
|
};
|
|
28165
28187
|
DialogPortal$1.displayName = PORTAL_NAME$5;
|
|
28166
28188
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -28208,8 +28230,8 @@ var DialogContentModal = React.forwardRef(
|
|
|
28208
28230
|
const contentRef = React.useRef(null);
|
|
28209
28231
|
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
28210
28232
|
React.useEffect(() => {
|
|
28211
|
-
const
|
|
28212
|
-
if (
|
|
28233
|
+
const content2 = contentRef.current;
|
|
28234
|
+
if (content2) return hideOthers(content2);
|
|
28213
28235
|
}, []);
|
|
28214
28236
|
return /* @__PURE__ */ jsx(
|
|
28215
28237
|
DialogContentImpl,
|
|
@@ -30658,7 +30680,7 @@ var PopperContent = React.forwardRef(
|
|
|
30658
30680
|
...contentProps
|
|
30659
30681
|
} = props;
|
|
30660
30682
|
const context = usePopperContext(CONTENT_NAME$6, __scopePopper);
|
|
30661
|
-
const [
|
|
30683
|
+
const [content2, setContent] = React.useState(null);
|
|
30662
30684
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
30663
30685
|
const [arrow$12, setArrow] = React.useState(null);
|
|
30664
30686
|
const arrowSize = useSize(arrow$12);
|
|
@@ -30724,8 +30746,8 @@ var PopperContent = React.forwardRef(
|
|
|
30724
30746
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
30725
30747
|
const [contentZIndex, setContentZIndex] = React.useState();
|
|
30726
30748
|
useLayoutEffect2(() => {
|
|
30727
|
-
if (
|
|
30728
|
-
}, [
|
|
30749
|
+
if (content2) setContentZIndex(window.getComputedStyle(content2).zIndex);
|
|
30750
|
+
}, [content2]);
|
|
30729
30751
|
return /* @__PURE__ */ jsx(
|
|
30730
30752
|
"div",
|
|
30731
30753
|
{
|
|
@@ -31072,9 +31094,9 @@ var [PortalProvider$2, usePortalContext$2] = createTooltipContext(PORTAL_NAME$4,
|
|
|
31072
31094
|
forceMount: void 0
|
|
31073
31095
|
});
|
|
31074
31096
|
var TooltipPortal = (props) => {
|
|
31075
|
-
const { __scopeTooltip, forceMount, children: children2, container } = props;
|
|
31097
|
+
const { __scopeTooltip, forceMount, children: children2, container: container2 } = props;
|
|
31076
31098
|
const context = useTooltipContext(PORTAL_NAME$4, __scopeTooltip);
|
|
31077
|
-
return /* @__PURE__ */ jsx(PortalProvider$2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$6, { asChild: true, container, children: children2 }) }) });
|
|
31099
|
+
return /* @__PURE__ */ jsx(PortalProvider$2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$6, { asChild: true, container: container2, children: children2 }) }) });
|
|
31078
31100
|
};
|
|
31079
31101
|
TooltipPortal.displayName = PORTAL_NAME$4;
|
|
31080
31102
|
var CONTENT_NAME$5 = "TooltipContent";
|
|
@@ -31093,7 +31115,7 @@ var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
|
|
31093
31115
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
31094
31116
|
const [pointerGraceArea, setPointerGraceArea] = React.useState(null);
|
|
31095
31117
|
const { trigger, onClose } = context;
|
|
31096
|
-
const
|
|
31118
|
+
const content2 = ref.current;
|
|
31097
31119
|
const { onPointerInTransitChange } = providerContext;
|
|
31098
31120
|
const handleRemoveGraceArea = React.useCallback(() => {
|
|
31099
31121
|
setPointerGraceArea(null);
|
|
@@ -31116,23 +31138,23 @@ var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
|
|
31116
31138
|
return () => handleRemoveGraceArea();
|
|
31117
31139
|
}, [handleRemoveGraceArea]);
|
|
31118
31140
|
React.useEffect(() => {
|
|
31119
|
-
if (trigger &&
|
|
31120
|
-
const handleTriggerLeave = (event) => handleCreateGraceArea(event,
|
|
31141
|
+
if (trigger && content2) {
|
|
31142
|
+
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content2);
|
|
31121
31143
|
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
|
31122
31144
|
trigger.addEventListener("pointerleave", handleTriggerLeave);
|
|
31123
|
-
|
|
31145
|
+
content2.addEventListener("pointerleave", handleContentLeave);
|
|
31124
31146
|
return () => {
|
|
31125
31147
|
trigger.removeEventListener("pointerleave", handleTriggerLeave);
|
|
31126
|
-
|
|
31148
|
+
content2.removeEventListener("pointerleave", handleContentLeave);
|
|
31127
31149
|
};
|
|
31128
31150
|
}
|
|
31129
|
-
}, [trigger,
|
|
31151
|
+
}, [trigger, content2, handleCreateGraceArea, handleRemoveGraceArea]);
|
|
31130
31152
|
React.useEffect(() => {
|
|
31131
31153
|
if (pointerGraceArea) {
|
|
31132
31154
|
const handleTrackPointerGrace = (event) => {
|
|
31133
31155
|
const target = event.target;
|
|
31134
31156
|
const pointerPosition = { x: event.clientX, y: event.clientY };
|
|
31135
|
-
const hasEnteredTarget = trigger?.contains(target) ||
|
|
31157
|
+
const hasEnteredTarget = trigger?.contains(target) || content2?.contains(target);
|
|
31136
31158
|
const isPointerOutsideGraceArea = !isPointInPolygon$1(pointerPosition, pointerGraceArea);
|
|
31137
31159
|
if (hasEnteredTarget) {
|
|
31138
31160
|
handleRemoveGraceArea();
|
|
@@ -31144,7 +31166,7 @@ var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
|
|
31144
31166
|
document.addEventListener("pointermove", handleTrackPointerGrace);
|
|
31145
31167
|
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
31146
31168
|
}
|
|
31147
|
-
}, [trigger,
|
|
31169
|
+
}, [trigger, content2, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
31148
31170
|
return /* @__PURE__ */ jsx(TooltipContentImpl, { ...props, ref: composedRefs });
|
|
31149
31171
|
});
|
|
31150
31172
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
@@ -31360,7 +31382,7 @@ const TooltipContent = React.forwardRef(({ className: className2, sideOffset = 4
|
|
|
31360
31382
|
}
|
|
31361
31383
|
) }));
|
|
31362
31384
|
TooltipContent.displayName = Content2$4.displayName;
|
|
31363
|
-
const InfoTooltip = ({ title, alertText, Icon: Icon2 = Info, onClick }) => {
|
|
31385
|
+
const InfoTooltip = ({ title: title2, alertText, Icon: Icon2 = Info, onClick }) => {
|
|
31364
31386
|
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
31365
31387
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
31366
31388
|
Icon2,
|
|
@@ -31391,7 +31413,7 @@ const InfoTooltip = ({ title, alertText, Icon: Icon2 = Info, onClick }) => {
|
|
|
31391
31413
|
) }),
|
|
31392
31414
|
/* @__PURE__ */ jsx("p", { className: "font-semibold text-amber-500", children: alertText })
|
|
31393
31415
|
] }),
|
|
31394
|
-
/* @__PURE__ */ jsx("p", { className: "text-[13px] leading-relaxed text-primary-foreground/90", children:
|
|
31416
|
+
/* @__PURE__ */ jsx("p", { className: "text-[13px] leading-relaxed text-primary-foreground/90", children: title2 })
|
|
31395
31417
|
] }) })
|
|
31396
31418
|
] }) });
|
|
31397
31419
|
};
|
|
@@ -33104,7 +33126,23 @@ function formatDistance$1(date2, baseDate, options) {
|
|
|
33104
33126
|
function formatDistanceToNow(date2, options) {
|
|
33105
33127
|
return formatDistance$1(date2, constructNow(date2), options);
|
|
33106
33128
|
}
|
|
33107
|
-
const
|
|
33129
|
+
const base$1 = "reach-styles-module__base___WFahB";
|
|
33130
|
+
const secondary$1 = "reach-styles-module__secondary___VQ4iH";
|
|
33131
|
+
const destructive$1 = "reach-styles-module__destructive___RLaRD";
|
|
33132
|
+
const outline$1 = "reach-styles-module__outline___L2VtW";
|
|
33133
|
+
const google = "reach-styles-module__google___HcEij";
|
|
33134
|
+
const date = "reach-styles-module__date___-6BC4";
|
|
33135
|
+
const container = "reach-styles-module__container___6PQqs";
|
|
33136
|
+
const styles$2 = {
|
|
33137
|
+
base: base$1,
|
|
33138
|
+
"default": "reach-styles-module__default___zeGU1",
|
|
33139
|
+
secondary: secondary$1,
|
|
33140
|
+
destructive: destructive$1,
|
|
33141
|
+
outline: outline$1,
|
|
33142
|
+
google,
|
|
33143
|
+
date,
|
|
33144
|
+
container
|
|
33145
|
+
};
|
|
33108
33146
|
const badgeVariants = cva([styles$2.base], {
|
|
33109
33147
|
variants: {
|
|
33110
33148
|
variant: {
|
|
@@ -34551,11 +34589,11 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /* @__PURE__ */ forwardRef((pr
|
|
|
34551
34589
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
34552
34590
|
const focusedElement = document.activeElement;
|
|
34553
34591
|
if (isTabKey && focusedElement) {
|
|
34554
|
-
const
|
|
34555
|
-
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(
|
|
34592
|
+
const container2 = event.currentTarget;
|
|
34593
|
+
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container2);
|
|
34556
34594
|
const hasTabbableElementsInside = first && last;
|
|
34557
34595
|
if (!hasTabbableElementsInside) {
|
|
34558
|
-
if (focusedElement ===
|
|
34596
|
+
if (focusedElement === container2) event.preventDefault();
|
|
34559
34597
|
} else {
|
|
34560
34598
|
if (!event.shiftKey && focusedElement === last) {
|
|
34561
34599
|
event.preventDefault();
|
|
@@ -34591,18 +34629,18 @@ function $d3863c46a17e8a28$var$focusFirst(candidates, { select = false } = {}) {
|
|
|
34591
34629
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
34592
34630
|
}
|
|
34593
34631
|
}
|
|
34594
|
-
function $d3863c46a17e8a28$var$getTabbableEdges(
|
|
34595
|
-
const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(
|
|
34596
|
-
const first = $d3863c46a17e8a28$var$findVisible(candidates,
|
|
34597
|
-
const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(),
|
|
34632
|
+
function $d3863c46a17e8a28$var$getTabbableEdges(container2) {
|
|
34633
|
+
const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container2);
|
|
34634
|
+
const first = $d3863c46a17e8a28$var$findVisible(candidates, container2);
|
|
34635
|
+
const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container2);
|
|
34598
34636
|
return [
|
|
34599
34637
|
first,
|
|
34600
34638
|
last
|
|
34601
34639
|
];
|
|
34602
34640
|
}
|
|
34603
|
-
function $d3863c46a17e8a28$var$getTabbableCandidates(
|
|
34641
|
+
function $d3863c46a17e8a28$var$getTabbableCandidates(container2) {
|
|
34604
34642
|
const nodes = [];
|
|
34605
|
-
const walker2 = document.createTreeWalker(
|
|
34643
|
+
const walker2 = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
34606
34644
|
acceptNode: (node) => {
|
|
34607
34645
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
34608
34646
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -34612,10 +34650,10 @@ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {
|
|
|
34612
34650
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
34613
34651
|
return nodes;
|
|
34614
34652
|
}
|
|
34615
|
-
function $d3863c46a17e8a28$var$findVisible(elements,
|
|
34653
|
+
function $d3863c46a17e8a28$var$findVisible(elements, container2) {
|
|
34616
34654
|
for (const element of elements) {
|
|
34617
34655
|
if (!$d3863c46a17e8a28$var$isHidden(element, {
|
|
34618
|
-
upTo:
|
|
34656
|
+
upTo: container2
|
|
34619
34657
|
})) return element;
|
|
34620
34658
|
}
|
|
34621
34659
|
}
|
|
@@ -34672,10 +34710,10 @@ function $d3863c46a17e8a28$var$removeLinks(items) {
|
|
|
34672
34710
|
}
|
|
34673
34711
|
const $f1701beae083dbae$export$602eac185826482c = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
|
|
34674
34712
|
var _globalThis$document;
|
|
34675
|
-
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;
|
|
34676
|
-
return
|
|
34713
|
+
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;
|
|
34714
|
+
return container2 ? /* @__PURE__ */ ReactDOM__default.createPortal(/* @__PURE__ */ createElement$1($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
|
|
34677
34715
|
ref: forwardedRef
|
|
34678
|
-
})),
|
|
34716
|
+
})), container2) : null;
|
|
34679
34717
|
});
|
|
34680
34718
|
const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : () => {
|
|
34681
34719
|
};
|
|
@@ -35142,7 +35180,7 @@ const [$5d3850c4d0b4e6c7$var$PortalProvider, $5d3850c4d0b4e6c7$var$usePortalCont
|
|
|
35142
35180
|
forceMount: void 0
|
|
35143
35181
|
});
|
|
35144
35182
|
const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props) => {
|
|
35145
|
-
const { __scopeDialog, forceMount, children: children2, container } = props;
|
|
35183
|
+
const { __scopeDialog, forceMount, children: children2, container: container2 } = props;
|
|
35146
35184
|
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, __scopeDialog);
|
|
35147
35185
|
return /* @__PURE__ */ createElement$1($5d3850c4d0b4e6c7$var$PortalProvider, {
|
|
35148
35186
|
scope: __scopeDialog,
|
|
@@ -35153,7 +35191,7 @@ const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props) => {
|
|
|
35153
35191
|
present: forceMount || context.open
|
|
35154
35192
|
}, /* @__PURE__ */ createElement$1($f1701beae083dbae$export$602eac185826482c, {
|
|
35155
35193
|
asChild: true,
|
|
35156
|
-
container
|
|
35194
|
+
container: container2
|
|
35157
35195
|
}, child))
|
|
35158
35196
|
));
|
|
35159
35197
|
};
|
|
@@ -35212,8 +35250,8 @@ const $5d3850c4d0b4e6c7$var$DialogContentModal = /* @__PURE__ */ forwardRef((pro
|
|
|
35212
35250
|
const contentRef = useRef(null);
|
|
35213
35251
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.contentRef, contentRef);
|
|
35214
35252
|
useEffect(() => {
|
|
35215
|
-
const
|
|
35216
|
-
if (
|
|
35253
|
+
const content2 = contentRef.current;
|
|
35254
|
+
if (content2) return hideOthers(content2);
|
|
35217
35255
|
}, []);
|
|
35218
35256
|
return /* @__PURE__ */ createElement$1($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, {
|
|
35219
35257
|
ref: composedRefs,
|
|
@@ -35730,7 +35768,7 @@ var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
|
35730
35768
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
35731
35769
|
...scopeProps
|
|
35732
35770
|
} = props;
|
|
35733
|
-
const [
|
|
35771
|
+
const [container2, setContainer] = React.useState(null);
|
|
35734
35772
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
35735
35773
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
35736
35774
|
const lastFocusedElementRef = React.useRef(null);
|
|
@@ -35747,69 +35785,69 @@ var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
|
35747
35785
|
React.useEffect(() => {
|
|
35748
35786
|
if (trapped) {
|
|
35749
35787
|
let handleFocusIn2 = function(event) {
|
|
35750
|
-
if (focusScope.paused || !
|
|
35788
|
+
if (focusScope.paused || !container2) return;
|
|
35751
35789
|
const target = event.target;
|
|
35752
|
-
if (
|
|
35790
|
+
if (container2.contains(target)) {
|
|
35753
35791
|
lastFocusedElementRef.current = target;
|
|
35754
35792
|
} else {
|
|
35755
35793
|
focus(lastFocusedElementRef.current, { select: true });
|
|
35756
35794
|
}
|
|
35757
35795
|
}, handleFocusOut2 = function(event) {
|
|
35758
|
-
if (focusScope.paused || !
|
|
35796
|
+
if (focusScope.paused || !container2) return;
|
|
35759
35797
|
const relatedTarget = event.relatedTarget;
|
|
35760
35798
|
if (relatedTarget === null) return;
|
|
35761
|
-
if (!
|
|
35799
|
+
if (!container2.contains(relatedTarget)) {
|
|
35762
35800
|
focus(lastFocusedElementRef.current, { select: true });
|
|
35763
35801
|
}
|
|
35764
35802
|
}, handleMutations2 = function(mutations) {
|
|
35765
35803
|
const focusedElement = document.activeElement;
|
|
35766
35804
|
if (focusedElement !== document.body) return;
|
|
35767
35805
|
for (const mutation of mutations) {
|
|
35768
|
-
if (mutation.removedNodes.length > 0) focus(
|
|
35806
|
+
if (mutation.removedNodes.length > 0) focus(container2);
|
|
35769
35807
|
}
|
|
35770
35808
|
};
|
|
35771
35809
|
document.addEventListener("focusin", handleFocusIn2);
|
|
35772
35810
|
document.addEventListener("focusout", handleFocusOut2);
|
|
35773
35811
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
35774
|
-
if (
|
|
35812
|
+
if (container2) mutationObserver.observe(container2, { childList: true, subtree: true });
|
|
35775
35813
|
return () => {
|
|
35776
35814
|
document.removeEventListener("focusin", handleFocusIn2);
|
|
35777
35815
|
document.removeEventListener("focusout", handleFocusOut2);
|
|
35778
35816
|
mutationObserver.disconnect();
|
|
35779
35817
|
};
|
|
35780
35818
|
}
|
|
35781
|
-
}, [trapped,
|
|
35819
|
+
}, [trapped, container2, focusScope.paused]);
|
|
35782
35820
|
React.useEffect(() => {
|
|
35783
|
-
if (
|
|
35821
|
+
if (container2) {
|
|
35784
35822
|
focusScopesStack.add(focusScope);
|
|
35785
35823
|
const previouslyFocusedElement = document.activeElement;
|
|
35786
|
-
const hasFocusedCandidate =
|
|
35824
|
+
const hasFocusedCandidate = container2.contains(previouslyFocusedElement);
|
|
35787
35825
|
if (!hasFocusedCandidate) {
|
|
35788
35826
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS$1);
|
|
35789
|
-
|
|
35790
|
-
|
|
35827
|
+
container2.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
35828
|
+
container2.dispatchEvent(mountEvent);
|
|
35791
35829
|
if (!mountEvent.defaultPrevented) {
|
|
35792
|
-
focusFirst$2(removeLinks(getTabbableCandidates(
|
|
35830
|
+
focusFirst$2(removeLinks(getTabbableCandidates(container2)), { select: true });
|
|
35793
35831
|
if (document.activeElement === previouslyFocusedElement) {
|
|
35794
|
-
focus(
|
|
35832
|
+
focus(container2);
|
|
35795
35833
|
}
|
|
35796
35834
|
}
|
|
35797
35835
|
}
|
|
35798
35836
|
return () => {
|
|
35799
|
-
|
|
35837
|
+
container2.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
35800
35838
|
setTimeout(() => {
|
|
35801
35839
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS$1);
|
|
35802
|
-
|
|
35803
|
-
|
|
35840
|
+
container2.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
35841
|
+
container2.dispatchEvent(unmountEvent);
|
|
35804
35842
|
if (!unmountEvent.defaultPrevented) {
|
|
35805
35843
|
focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
35806
35844
|
}
|
|
35807
|
-
|
|
35845
|
+
container2.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
35808
35846
|
focusScopesStack.remove(focusScope);
|
|
35809
35847
|
}, 0);
|
|
35810
35848
|
};
|
|
35811
35849
|
}
|
|
35812
|
-
}, [
|
|
35850
|
+
}, [container2, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
35813
35851
|
const handleKeyDown = React.useCallback(
|
|
35814
35852
|
(event) => {
|
|
35815
35853
|
if (!loop && !trapped) return;
|
|
@@ -35817,11 +35855,11 @@ var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
|
35817
35855
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
35818
35856
|
const focusedElement = document.activeElement;
|
|
35819
35857
|
if (isTabKey && focusedElement) {
|
|
35820
|
-
const
|
|
35821
|
-
const [first, last] = getTabbableEdges(
|
|
35858
|
+
const container22 = event.currentTarget;
|
|
35859
|
+
const [first, last] = getTabbableEdges(container22);
|
|
35822
35860
|
const hasTabbableElementsInside = first && last;
|
|
35823
35861
|
if (!hasTabbableElementsInside) {
|
|
35824
|
-
if (focusedElement ===
|
|
35862
|
+
if (focusedElement === container22) event.preventDefault();
|
|
35825
35863
|
} else {
|
|
35826
35864
|
if (!event.shiftKey && focusedElement === last) {
|
|
35827
35865
|
event.preventDefault();
|
|
@@ -35845,15 +35883,15 @@ function focusFirst$2(candidates, { select = false } = {}) {
|
|
|
35845
35883
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
35846
35884
|
}
|
|
35847
35885
|
}
|
|
35848
|
-
function getTabbableEdges(
|
|
35849
|
-
const candidates = getTabbableCandidates(
|
|
35850
|
-
const first = findVisible(candidates,
|
|
35851
|
-
const last = findVisible(candidates.reverse(),
|
|
35886
|
+
function getTabbableEdges(container2) {
|
|
35887
|
+
const candidates = getTabbableCandidates(container2);
|
|
35888
|
+
const first = findVisible(candidates, container2);
|
|
35889
|
+
const last = findVisible(candidates.reverse(), container2);
|
|
35852
35890
|
return [first, last];
|
|
35853
35891
|
}
|
|
35854
|
-
function getTabbableCandidates(
|
|
35892
|
+
function getTabbableCandidates(container2) {
|
|
35855
35893
|
const nodes = [];
|
|
35856
|
-
const walker2 = document.createTreeWalker(
|
|
35894
|
+
const walker2 = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
35857
35895
|
acceptNode: (node) => {
|
|
35858
35896
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
35859
35897
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -35863,9 +35901,9 @@ function getTabbableCandidates(container) {
|
|
|
35863
35901
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
35864
35902
|
return nodes;
|
|
35865
35903
|
}
|
|
35866
|
-
function findVisible(elements,
|
|
35904
|
+
function findVisible(elements, container2) {
|
|
35867
35905
|
for (const element of elements) {
|
|
35868
|
-
if (!isHidden(element, { upTo:
|
|
35906
|
+
if (!isHidden(element, { upTo: container2 })) return element;
|
|
35869
35907
|
}
|
|
35870
35908
|
}
|
|
35871
35909
|
function isHidden(node, { upTo }) {
|
|
@@ -36002,9 +36040,9 @@ var [PortalProvider$1, usePortalContext$1] = createPopoverContext(PORTAL_NAME$3,
|
|
|
36002
36040
|
forceMount: void 0
|
|
36003
36041
|
});
|
|
36004
36042
|
var PopoverPortal = (props) => {
|
|
36005
|
-
const { __scopePopover, forceMount, children: children2, container } = props;
|
|
36043
|
+
const { __scopePopover, forceMount, children: children2, container: container2 } = props;
|
|
36006
36044
|
const context = usePopoverContext(PORTAL_NAME$3, __scopePopover);
|
|
36007
|
-
return /* @__PURE__ */ jsx(PortalProvider$1, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$6, { asChild: true, container, children: children2 }) }) });
|
|
36045
|
+
return /* @__PURE__ */ jsx(PortalProvider$1, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$6, { asChild: true, container: container2, children: children2 }) }) });
|
|
36008
36046
|
};
|
|
36009
36047
|
PopoverPortal.displayName = PORTAL_NAME$3;
|
|
36010
36048
|
var CONTENT_NAME$4 = "PopoverContent";
|
|
@@ -36024,8 +36062,8 @@ var PopoverContentModal = React.forwardRef(
|
|
|
36024
36062
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
36025
36063
|
const isRightClickOutsideRef = React.useRef(false);
|
|
36026
36064
|
React.useEffect(() => {
|
|
36027
|
-
const
|
|
36028
|
-
if (
|
|
36065
|
+
const content2 = contentRef.current;
|
|
36066
|
+
if (content2) return hideOthers(content2);
|
|
36029
36067
|
}, []);
|
|
36030
36068
|
return /* @__PURE__ */ jsx(ReactRemoveScroll$1, { as: Slot$3, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
|
|
36031
36069
|
PopoverContentImpl,
|
|
@@ -36931,7 +36969,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
36931
36969
|
...contentProps
|
|
36932
36970
|
} = props;
|
|
36933
36971
|
const context = useSelectContext(CONTENT_NAME$3, __scopeSelect);
|
|
36934
|
-
const [
|
|
36972
|
+
const [content2, setContent] = React.useState(null);
|
|
36935
36973
|
const [viewport, setViewport] = React.useState(null);
|
|
36936
36974
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
36937
36975
|
const [selectedItem, setSelectedItem] = React.useState(null);
|
|
@@ -36942,8 +36980,8 @@ var SelectContentImpl = React.forwardRef(
|
|
|
36942
36980
|
const [isPositioned, setIsPositioned] = React.useState(false);
|
|
36943
36981
|
const firstValidItemFoundRef = React.useRef(false);
|
|
36944
36982
|
React.useEffect(() => {
|
|
36945
|
-
if (
|
|
36946
|
-
}, [
|
|
36983
|
+
if (content2) return hideOthers(content2);
|
|
36984
|
+
}, [content2]);
|
|
36947
36985
|
useFocusGuards();
|
|
36948
36986
|
const focusFirst2 = React.useCallback(
|
|
36949
36987
|
(candidates) => {
|
|
@@ -36962,8 +37000,8 @@ var SelectContentImpl = React.forwardRef(
|
|
|
36962
37000
|
[getItems, viewport]
|
|
36963
37001
|
);
|
|
36964
37002
|
const focusSelectedItem = React.useCallback(
|
|
36965
|
-
() => focusFirst2([selectedItem,
|
|
36966
|
-
[focusFirst2, selectedItem,
|
|
37003
|
+
() => focusFirst2([selectedItem, content2]),
|
|
37004
|
+
[focusFirst2, selectedItem, content2]
|
|
36967
37005
|
);
|
|
36968
37006
|
React.useEffect(() => {
|
|
36969
37007
|
if (isPositioned) {
|
|
@@ -36972,7 +37010,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
36972
37010
|
}, [isPositioned, focusSelectedItem]);
|
|
36973
37011
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
36974
37012
|
React.useEffect(() => {
|
|
36975
|
-
if (
|
|
37013
|
+
if (content2) {
|
|
36976
37014
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
36977
37015
|
const handlePointerMove = (event) => {
|
|
36978
37016
|
pointerMoveDelta = {
|
|
@@ -36984,7 +37022,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
36984
37022
|
if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {
|
|
36985
37023
|
event.preventDefault();
|
|
36986
37024
|
} else {
|
|
36987
|
-
if (!
|
|
37025
|
+
if (!content2.contains(event.target)) {
|
|
36988
37026
|
onOpenChange(false);
|
|
36989
37027
|
}
|
|
36990
37028
|
}
|
|
@@ -37000,7 +37038,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
37000
37038
|
document.removeEventListener("pointerup", handlePointerUp, { capture: true });
|
|
37001
37039
|
};
|
|
37002
37040
|
}
|
|
37003
|
-
}, [
|
|
37041
|
+
}, [content2, onOpenChange, triggerPointerDownPosRef]);
|
|
37004
37042
|
React.useEffect(() => {
|
|
37005
37043
|
const close2 = () => onOpenChange(false);
|
|
37006
37044
|
window.addEventListener("blur", close2);
|
|
@@ -37029,7 +37067,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
37029
37067
|
},
|
|
37030
37068
|
[context.value]
|
|
37031
37069
|
);
|
|
37032
|
-
const handleItemLeave = React.useCallback(() =>
|
|
37070
|
+
const handleItemLeave = React.useCallback(() => content2?.focus(), [content2]);
|
|
37033
37071
|
const itemTextRefCallback = React.useCallback(
|
|
37034
37072
|
(node, value, disabled) => {
|
|
37035
37073
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
@@ -37057,7 +37095,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
37057
37095
|
SelectContentProvider,
|
|
37058
37096
|
{
|
|
37059
37097
|
scope: __scopeSelect,
|
|
37060
|
-
content,
|
|
37098
|
+
content: content2,
|
|
37061
37099
|
viewport,
|
|
37062
37100
|
onViewportChange: setViewport,
|
|
37063
37101
|
itemRefCallback,
|
|
@@ -37146,16 +37184,16 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
37146
37184
|
const context = useSelectContext(CONTENT_NAME$3, __scopeSelect);
|
|
37147
37185
|
const contentContext = useSelectContentContext(CONTENT_NAME$3, __scopeSelect);
|
|
37148
37186
|
const [contentWrapper, setContentWrapper] = React.useState(null);
|
|
37149
|
-
const [
|
|
37187
|
+
const [content2, setContent] = React.useState(null);
|
|
37150
37188
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
37151
37189
|
const getItems = useCollection$2(__scopeSelect);
|
|
37152
37190
|
const shouldExpandOnScrollRef = React.useRef(false);
|
|
37153
37191
|
const shouldRepositionRef = React.useRef(true);
|
|
37154
37192
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
37155
37193
|
const position = React.useCallback(() => {
|
|
37156
|
-
if (context.trigger && context.valueNode && contentWrapper &&
|
|
37194
|
+
if (context.trigger && context.valueNode && contentWrapper && content2 && viewport && selectedItem && selectedItemText) {
|
|
37157
37195
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
37158
|
-
const contentRect =
|
|
37196
|
+
const contentRect = content2.getBoundingClientRect();
|
|
37159
37197
|
const valueNodeRect = context.valueNode.getBoundingClientRect();
|
|
37160
37198
|
const itemTextRect = selectedItemText.getBoundingClientRect();
|
|
37161
37199
|
if (context.dir !== "rtl") {
|
|
@@ -37193,7 +37231,7 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
37193
37231
|
const items = getItems();
|
|
37194
37232
|
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
37195
37233
|
const itemsHeight = viewport.scrollHeight;
|
|
37196
|
-
const contentStyles = window.getComputedStyle(
|
|
37234
|
+
const contentStyles = window.getComputedStyle(content2);
|
|
37197
37235
|
const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);
|
|
37198
37236
|
const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);
|
|
37199
37237
|
const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);
|
|
@@ -37213,7 +37251,7 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
37213
37251
|
if (willAlignWithoutTopOverflow) {
|
|
37214
37252
|
const isLastItem = items.length > 0 && selectedItem === items[items.length - 1].ref.current;
|
|
37215
37253
|
contentWrapper.style.bottom = "0px";
|
|
37216
|
-
const viewportOffsetBottom =
|
|
37254
|
+
const viewportOffsetBottom = content2.clientHeight - viewport.offsetTop - viewport.offsetHeight;
|
|
37217
37255
|
const clampedTriggerMiddleToBottomEdge = Math.max(
|
|
37218
37256
|
triggerMiddleToBottomEdge,
|
|
37219
37257
|
selectedItemHalfHeight + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
@@ -37244,7 +37282,7 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
37244
37282
|
context.trigger,
|
|
37245
37283
|
context.valueNode,
|
|
37246
37284
|
contentWrapper,
|
|
37247
|
-
|
|
37285
|
+
content2,
|
|
37248
37286
|
viewport,
|
|
37249
37287
|
selectedItem,
|
|
37250
37288
|
selectedItemText,
|
|
@@ -37254,8 +37292,8 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
37254
37292
|
useLayoutEffect2(() => position(), [position]);
|
|
37255
37293
|
const [contentZIndex, setContentZIndex] = React.useState();
|
|
37256
37294
|
useLayoutEffect2(() => {
|
|
37257
|
-
if (
|
|
37258
|
-
}, [
|
|
37295
|
+
if (content2) setContentZIndex(window.getComputedStyle(content2).zIndex);
|
|
37296
|
+
}, [content2]);
|
|
37259
37297
|
const handleScrollButtonChange = React.useCallback(
|
|
37260
37298
|
(node) => {
|
|
37261
37299
|
if (node && shouldRepositionRef.current === true) {
|
|
@@ -39544,7 +39582,7 @@ var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
|
|
|
39544
39582
|
var Menu = (props) => {
|
|
39545
39583
|
const { __scopeMenu, open = false, children: children2, dir, onOpenChange, modal = true } = props;
|
|
39546
39584
|
const popperScope = usePopperScope(__scopeMenu);
|
|
39547
|
-
const [
|
|
39585
|
+
const [content2, setContent] = React.useState(null);
|
|
39548
39586
|
const isUsingKeyboardRef = React.useRef(false);
|
|
39549
39587
|
const handleOpenChange = useCallbackRef$1(onOpenChange);
|
|
39550
39588
|
const direction = useDirection(dir);
|
|
@@ -39568,7 +39606,7 @@ var Menu = (props) => {
|
|
|
39568
39606
|
scope: __scopeMenu,
|
|
39569
39607
|
open,
|
|
39570
39608
|
onOpenChange: handleOpenChange,
|
|
39571
|
-
content,
|
|
39609
|
+
content: content2,
|
|
39572
39610
|
onContentChange: setContent,
|
|
39573
39611
|
children: /* @__PURE__ */ jsx(
|
|
39574
39612
|
MenuRootProvider,
|
|
@@ -39599,9 +39637,9 @@ var [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME$1, {
|
|
|
39599
39637
|
forceMount: void 0
|
|
39600
39638
|
});
|
|
39601
39639
|
var MenuPortal = (props) => {
|
|
39602
|
-
const { __scopeMenu, forceMount, children: children2, container } = props;
|
|
39640
|
+
const { __scopeMenu, forceMount, children: children2, container: container2 } = props;
|
|
39603
39641
|
const context = useMenuContext(PORTAL_NAME$1, __scopeMenu);
|
|
39604
|
-
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$6, { asChild: true, container, children: children2 }) }) });
|
|
39642
|
+
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$6, { asChild: true, container: container2, children: children2 }) }) });
|
|
39605
39643
|
};
|
|
39606
39644
|
MenuPortal.displayName = PORTAL_NAME$1;
|
|
39607
39645
|
var CONTENT_NAME$1 = "MenuContent";
|
|
@@ -39621,8 +39659,8 @@ var MenuRootContentModal = React.forwardRef(
|
|
|
39621
39659
|
const ref = React.useRef(null);
|
|
39622
39660
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
39623
39661
|
React.useEffect(() => {
|
|
39624
|
-
const
|
|
39625
|
-
if (
|
|
39662
|
+
const content2 = ref.current;
|
|
39663
|
+
if (content2) return hideOthers(content2);
|
|
39626
39664
|
}, []);
|
|
39627
39665
|
return /* @__PURE__ */ jsx(
|
|
39628
39666
|
MenuContentImpl,
|
|
@@ -39799,8 +39837,8 @@ var MenuContentImpl = React.forwardRef(
|
|
|
39799
39837
|
if (event.key === "Tab") event.preventDefault();
|
|
39800
39838
|
if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
|
|
39801
39839
|
}
|
|
39802
|
-
const
|
|
39803
|
-
if (event.target !==
|
|
39840
|
+
const content2 = contentRef.current;
|
|
39841
|
+
if (event.target !== content2) return;
|
|
39804
39842
|
if (!FIRST_LAST_KEYS.includes(event.key)) return;
|
|
39805
39843
|
event.preventDefault();
|
|
39806
39844
|
const items = getItems().filter((item) => !item.disabled);
|
|
@@ -40726,7 +40764,27 @@ const BackNextButtonGroup = ({
|
|
|
40726
40764
|
)
|
|
40727
40765
|
] });
|
|
40728
40766
|
};
|
|
40729
|
-
const
|
|
40767
|
+
const base = "reach-styles-module__base___zJcoE";
|
|
40768
|
+
const destructive = "reach-styles-module__destructive___5EWhN";
|
|
40769
|
+
const outline = "reach-styles-module__outline___gj9sC";
|
|
40770
|
+
const secondary = "reach-styles-module__secondary___cN5Wj";
|
|
40771
|
+
const header = "reach-styles-module__header___-izE2";
|
|
40772
|
+
const title = "reach-styles-module__title___n1hA9";
|
|
40773
|
+
const description = "reach-styles-module__description___EvXM-";
|
|
40774
|
+
const content = "reach-styles-module__content___okv68";
|
|
40775
|
+
const footer = "reach-styles-module__footer___YA4U4";
|
|
40776
|
+
const styles = {
|
|
40777
|
+
base,
|
|
40778
|
+
"default": "reach-styles-module__default___88Q0d",
|
|
40779
|
+
destructive,
|
|
40780
|
+
outline,
|
|
40781
|
+
secondary,
|
|
40782
|
+
header,
|
|
40783
|
+
title,
|
|
40784
|
+
description,
|
|
40785
|
+
content,
|
|
40786
|
+
footer
|
|
40787
|
+
};
|
|
40730
40788
|
const cardVariants = cva(styles.base, {
|
|
40731
40789
|
variants: {
|
|
40732
40790
|
variant: {
|
|
@@ -42070,7 +42128,7 @@ const EstimatedMatchesView = ({
|
|
|
42070
42128
|
iconDefinitions,
|
|
42071
42129
|
includeSegments,
|
|
42072
42130
|
excludeSegments,
|
|
42073
|
-
title = "Estimated Matches",
|
|
42131
|
+
title: title2 = "Estimated Matches",
|
|
42074
42132
|
subtitle
|
|
42075
42133
|
}) => {
|
|
42076
42134
|
const {
|
|
@@ -42096,7 +42154,7 @@ const EstimatedMatchesView = ({
|
|
|
42096
42154
|
}, [data?.recipients]);
|
|
42097
42155
|
return /* @__PURE__ */ jsxs("div", { className: "w-full p-4", children: [
|
|
42098
42156
|
/* @__PURE__ */ jsxs("div", { className: "mb-4 md:mb-6", children: [
|
|
42099
|
-
/* @__PURE__ */ jsx("h3", { className: "text-xl font-semibold text-gray-900", children:
|
|
42157
|
+
/* @__PURE__ */ jsx("h3", { className: "text-xl font-semibold text-gray-900", children: title2 }),
|
|
42100
42158
|
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500", children: subtitle })
|
|
42101
42159
|
] }),
|
|
42102
42160
|
/* @__PURE__ */ jsx("div", { className: "@container", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 @[30rem]:grid-cols-3 gap-2 md:gap-3 mb-4 md:mb-6", children: [
|
|
@@ -44537,10 +44595,10 @@ function Caption(props) {
|
|
|
44537
44595
|
return jsx("div", { className: classNames.caption, style: styles2.caption, children: caption });
|
|
44538
44596
|
}
|
|
44539
44597
|
function Footer(props) {
|
|
44540
|
-
var _a = useDayPicker(),
|
|
44541
|
-
if (!
|
|
44598
|
+
var _a = useDayPicker(), footer2 = _a.footer, styles2 = _a.styles, tfoot = _a.classNames.tfoot;
|
|
44599
|
+
if (!footer2)
|
|
44542
44600
|
return jsx(Fragment, {});
|
|
44543
|
-
return jsx("tfoot", { className: tfoot, style: styles2.tfoot, children: jsx("tr", { children: jsx("td", { colSpan: 8, children:
|
|
44601
|
+
return jsx("tfoot", { className: tfoot, style: styles2.tfoot, children: jsx("tr", { children: jsx("td", { colSpan: 8, children: footer2 }) }) });
|
|
44544
44602
|
}
|
|
44545
44603
|
function getWeekdays(locale2, weekStartsOn, ISOWeek) {
|
|
44546
44604
|
var start = ISOWeek ? startOfISOWeek(/* @__PURE__ */ new Date()) : startOfWeek(/* @__PURE__ */ new Date(), { locale: locale2, weekStartsOn });
|
|
@@ -45348,15 +45406,15 @@ function Day(props) {
|
|
|
45348
45406
|
function WeekNumber(props) {
|
|
45349
45407
|
var weekNumber = props.number, dates2 = props.dates;
|
|
45350
45408
|
var _a = useDayPicker(), onWeekNumberClick = _a.onWeekNumberClick, styles2 = _a.styles, classNames = _a.classNames, locale2 = _a.locale, labelWeekNumber2 = _a.labels.labelWeekNumber, formatWeekNumber2 = _a.formatters.formatWeekNumber;
|
|
45351
|
-
var
|
|
45409
|
+
var content2 = formatWeekNumber2(Number(weekNumber), { locale: locale2 });
|
|
45352
45410
|
if (!onWeekNumberClick) {
|
|
45353
|
-
return jsx("span", { className: classNames.weeknumber, style: styles2.weeknumber, children:
|
|
45411
|
+
return jsx("span", { className: classNames.weeknumber, style: styles2.weeknumber, children: content2 });
|
|
45354
45412
|
}
|
|
45355
45413
|
var label = labelWeekNumber2(Number(weekNumber), { locale: locale2 });
|
|
45356
45414
|
var handleClick = function(e4) {
|
|
45357
45415
|
onWeekNumberClick(weekNumber, dates2, e4);
|
|
45358
45416
|
};
|
|
45359
|
-
return jsx(Button, { name: "week-number", "aria-label": label, className: classNames.weeknumber, style: styles2.weeknumber, onClick: handleClick, children:
|
|
45417
|
+
return jsx(Button, { name: "week-number", "aria-label": label, className: classNames.weeknumber, style: styles2.weeknumber, onClick: handleClick, children: content2 });
|
|
45360
45418
|
}
|
|
45361
45419
|
function Row(props) {
|
|
45362
45420
|
var _a, _b;
|
|
@@ -46377,13 +46435,13 @@ const SelectAudience = ({ iconDefinitions, automation }) => {
|
|
|
46377
46435
|
] }) })
|
|
46378
46436
|
] });
|
|
46379
46437
|
};
|
|
46380
|
-
const TitleAndContent = ({ title, subtitle, content }) => {
|
|
46438
|
+
const TitleAndContent = ({ title: title2, subtitle, content: content2 }) => {
|
|
46381
46439
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 w-full p-6 rounded-xl bg-gray-100 ", children: [
|
|
46382
46440
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
46383
|
-
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-semibold", children:
|
|
46441
|
+
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-semibold", children: title2 }),
|
|
46384
46442
|
subtitle && /* @__PURE__ */ jsx("p", { className: "text-gray-600 mt-1", children: subtitle })
|
|
46385
46443
|
] }),
|
|
46386
|
-
/* @__PURE__ */ jsx("div", { className: "bg-white rounded-2xl w-full border border-gray-200 p-6 relative", children:
|
|
46444
|
+
/* @__PURE__ */ jsx("div", { className: "bg-white rounded-2xl w-full border border-gray-200 p-6 relative", children: content2 })
|
|
46387
46445
|
] });
|
|
46388
46446
|
};
|
|
46389
46447
|
const EditAutomationPopup = ({
|