@embedreach/components 0.1.40 → 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 +180 -229
- package/dist/index.umd.js +231 -280
- 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 content;
|
|
4306
4306
|
let hydrating = !!sharedConfig.context;
|
|
4307
4307
|
createEffect(
|
|
4308
4308
|
() => {
|
|
4309
4309
|
if (hydrating)
|
|
4310
4310
|
getOwner().user = hydrating = false;
|
|
4311
|
-
|
|
4311
|
+
content || (content = 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() ? content() : dispose2(), null));
|
|
4317
4317
|
onCleanup(cleanup);
|
|
4318
4318
|
} else {
|
|
4319
|
-
const
|
|
4319
|
+
const container = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container.attachShadow ? container.attachShadow({
|
|
4320
4320
|
mode: "open"
|
|
4321
|
-
}) :
|
|
4322
|
-
Object.defineProperty(
|
|
4321
|
+
}) : container;
|
|
4322
|
+
Object.defineProperty(container, "_$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, content);
|
|
4329
|
+
el.appendChild(container);
|
|
4330
|
+
props.ref && props.ref(container);
|
|
4331
|
+
onCleanup(() => el.removeChild(container));
|
|
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$1 = "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$1,
|
|
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
|
|
11565
|
+
const date = "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,
|
|
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 container = containerProp || mounted && globalThis?.document?.body;
|
|
12675
|
+
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive$3.div, { ...portalProps, ref: forwardedRef }), container) : 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(container) {
|
|
13399
13399
|
const textContent = [];
|
|
13400
|
-
const childNodes = Array.from(
|
|
13400
|
+
const childNodes = Array.from(container.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(container) {
|
|
13455
13455
|
const nodes = [];
|
|
13456
|
-
const walker2 = document.createTreeWalker(
|
|
13456
|
+
const walker2 = document.createTreeWalker(container, 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 = (base, 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(base, 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 = (base2, config) => (props) => {
|
|
|
13529
13529
|
cvClassName
|
|
13530
13530
|
] : acc;
|
|
13531
13531
|
}, []);
|
|
13532
|
-
return cx(
|
|
13532
|
+
return cx(base, 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
|
|
16545
|
+
toasts.map(function({ id: id2, title, description, action, ...props }) {
|
|
16546
16546
|
return /* @__PURE__ */ jsxs(Toast, { ...props, children: [
|
|
16547
16547
|
/* @__PURE__ */ jsxs("div", { className: "grid gap-1", children: [
|
|
16548
|
-
|
|
16549
|
-
|
|
16548
|
+
title && /* @__PURE__ */ jsx(ToastTitle, { children: title }),
|
|
16549
|
+
description && /* @__PURE__ */ jsx(ToastDescription, { children: description })
|
|
16550
16550
|
] }),
|
|
16551
16551
|
action,
|
|
16552
16552
|
/* @__PURE__ */ jsx(ToastClose, {})
|
|
@@ -24221,21 +24221,7 @@ function getElementRef$2(element) {
|
|
|
24221
24221
|
}
|
|
24222
24222
|
return element.props.ref || element.ref;
|
|
24223
24223
|
}
|
|
24224
|
-
const
|
|
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 styles$6 = {
|
|
24231
|
-
base: base$2,
|
|
24232
|
-
"default": "reach-styles-module__default___ny1h7",
|
|
24233
|
-
destructive: destructive$2,
|
|
24234
|
-
outline: outline$2,
|
|
24235
|
-
secondary: secondary$2,
|
|
24236
|
-
ghost,
|
|
24237
|
-
link
|
|
24238
|
-
};
|
|
24224
|
+
const styles$6 = {};
|
|
24239
24225
|
const buttonVariants = cva([styles$6.base], {
|
|
24240
24226
|
variants: {
|
|
24241
24227
|
variant: {
|
|
@@ -24265,12 +24251,13 @@ const Button$1 = React.forwardRef(
|
|
|
24265
24251
|
`BUTTON VARIANTS`,
|
|
24266
24252
|
size2,
|
|
24267
24253
|
variant,
|
|
24268
|
-
|
|
24254
|
+
className2,
|
|
24255
|
+
buttonVariants({ variant, size: size2, className: className2 })
|
|
24269
24256
|
);
|
|
24270
24257
|
return /* @__PURE__ */ jsx(
|
|
24271
24258
|
Comp,
|
|
24272
24259
|
{
|
|
24273
|
-
className: cn$1(buttonVariants({ variant, size: size2
|
|
24260
|
+
className: cn$1(buttonVariants({ variant, size: size2, className: className2 })),
|
|
24274
24261
|
ref,
|
|
24275
24262
|
...props
|
|
24276
24263
|
}
|
|
@@ -24322,7 +24309,7 @@ const ActionButtons$1 = ({
|
|
|
24322
24309
|
)
|
|
24323
24310
|
] }) });
|
|
24324
24311
|
};
|
|
24325
|
-
const BigSelector = ({ onClick, title
|
|
24312
|
+
const BigSelector = ({ onClick, title, subtitle, icon, selected, disabled = false }) => {
|
|
24326
24313
|
return /* @__PURE__ */ jsxs(
|
|
24327
24314
|
"button",
|
|
24328
24315
|
{
|
|
@@ -24331,7 +24318,7 @@ const BigSelector = ({ onClick, title: title2, subtitle, icon, selected, disable
|
|
|
24331
24318
|
children: [
|
|
24332
24319
|
icon,
|
|
24333
24320
|
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
24334
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-gray-900", children:
|
|
24321
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-gray-900", children: title }),
|
|
24335
24322
|
/* @__PURE__ */ jsx("div", { className: "text-xs text-gray-500", children: subtitle })
|
|
24336
24323
|
] })
|
|
24337
24324
|
]
|
|
@@ -26000,8 +25987,8 @@ async function getKeyedPrefetchLinks(matches, manifest, routeModules) {
|
|
|
26000
25987
|
})
|
|
26001
25988
|
);
|
|
26002
25989
|
return dedupeLinkDescriptors(
|
|
26003
|
-
links.flat(1).filter(isHtmlLinkDescriptor).filter((
|
|
26004
|
-
(
|
|
25990
|
+
links.flat(1).filter(isHtmlLinkDescriptor).filter((link) => link.rel === "stylesheet" || link.rel === "preload").map(
|
|
25991
|
+
(link) => link.rel === "stylesheet" ? { ...link, rel: "prefetch", as: "style" } : { ...link, rel: "prefetch" }
|
|
26005
25992
|
)
|
|
26006
25993
|
);
|
|
26007
25994
|
}
|
|
@@ -26300,10 +26287,10 @@ function PrefetchPageLinksImpl({
|
|
|
26300
26287
|
[newMatchesForAssets, manifest]
|
|
26301
26288
|
);
|
|
26302
26289
|
let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
|
|
26303
|
-
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
|
|
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 }) => (
|
|
26304
26291
|
// these don't spread `linkProps` because they are full link descriptors
|
|
26305
26292
|
// already with their own props
|
|
26306
|
-
/* @__PURE__ */ React.createElement("link", { key, ...
|
|
26293
|
+
/* @__PURE__ */ React.createElement("link", { key, ...link })
|
|
26307
26294
|
)));
|
|
26308
26295
|
}
|
|
26309
26296
|
function mergeRefs(...refs) {
|
|
@@ -26383,7 +26370,7 @@ var Link = React.forwardRef(
|
|
|
26383
26370
|
internalOnClick(event);
|
|
26384
26371
|
}
|
|
26385
26372
|
}
|
|
26386
|
-
let
|
|
26373
|
+
let link = (
|
|
26387
26374
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
26388
26375
|
/* @__PURE__ */ React.createElement(
|
|
26389
26376
|
"a",
|
|
@@ -26398,7 +26385,7 @@ var Link = React.forwardRef(
|
|
|
26398
26385
|
}
|
|
26399
26386
|
)
|
|
26400
26387
|
);
|
|
26401
|
-
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null,
|
|
26388
|
+
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(PrefetchPageLinks, { page: href })) : link;
|
|
26402
26389
|
}
|
|
26403
26390
|
);
|
|
26404
26391
|
Link.displayName = "Link";
|
|
@@ -27113,7 +27100,7 @@ var FocusScope$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
27113
27100
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
27114
27101
|
...scopeProps
|
|
27115
27102
|
} = props;
|
|
27116
|
-
const [
|
|
27103
|
+
const [container, setContainer] = React.useState(null);
|
|
27117
27104
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
27118
27105
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
27119
27106
|
const lastFocusedElementRef = React.useRef(null);
|
|
@@ -27130,69 +27117,69 @@ var FocusScope$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
27130
27117
|
React.useEffect(() => {
|
|
27131
27118
|
if (trapped) {
|
|
27132
27119
|
let handleFocusIn2 = function(event) {
|
|
27133
|
-
if (focusScope.paused || !
|
|
27120
|
+
if (focusScope.paused || !container) return;
|
|
27134
27121
|
const target = event.target;
|
|
27135
|
-
if (
|
|
27122
|
+
if (container.contains(target)) {
|
|
27136
27123
|
lastFocusedElementRef.current = target;
|
|
27137
27124
|
} else {
|
|
27138
27125
|
focus$1(lastFocusedElementRef.current, { select: true });
|
|
27139
27126
|
}
|
|
27140
27127
|
}, handleFocusOut2 = function(event) {
|
|
27141
|
-
if (focusScope.paused || !
|
|
27128
|
+
if (focusScope.paused || !container) return;
|
|
27142
27129
|
const relatedTarget = event.relatedTarget;
|
|
27143
27130
|
if (relatedTarget === null) return;
|
|
27144
|
-
if (!
|
|
27131
|
+
if (!container.contains(relatedTarget)) {
|
|
27145
27132
|
focus$1(lastFocusedElementRef.current, { select: true });
|
|
27146
27133
|
}
|
|
27147
27134
|
}, handleMutations2 = function(mutations) {
|
|
27148
27135
|
const focusedElement = document.activeElement;
|
|
27149
27136
|
if (focusedElement !== document.body) return;
|
|
27150
27137
|
for (const mutation of mutations) {
|
|
27151
|
-
if (mutation.removedNodes.length > 0) focus$1(
|
|
27138
|
+
if (mutation.removedNodes.length > 0) focus$1(container);
|
|
27152
27139
|
}
|
|
27153
27140
|
};
|
|
27154
27141
|
document.addEventListener("focusin", handleFocusIn2);
|
|
27155
27142
|
document.addEventListener("focusout", handleFocusOut2);
|
|
27156
27143
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
27157
|
-
if (
|
|
27144
|
+
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
27158
27145
|
return () => {
|
|
27159
27146
|
document.removeEventListener("focusin", handleFocusIn2);
|
|
27160
27147
|
document.removeEventListener("focusout", handleFocusOut2);
|
|
27161
27148
|
mutationObserver.disconnect();
|
|
27162
27149
|
};
|
|
27163
27150
|
}
|
|
27164
|
-
}, [trapped,
|
|
27151
|
+
}, [trapped, container, focusScope.paused]);
|
|
27165
27152
|
React.useEffect(() => {
|
|
27166
|
-
if (
|
|
27153
|
+
if (container) {
|
|
27167
27154
|
focusScopesStack$1.add(focusScope);
|
|
27168
27155
|
const previouslyFocusedElement = document.activeElement;
|
|
27169
|
-
const hasFocusedCandidate =
|
|
27156
|
+
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
27170
27157
|
if (!hasFocusedCandidate) {
|
|
27171
27158
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT$1, EVENT_OPTIONS$2);
|
|
27172
|
-
|
|
27173
|
-
|
|
27159
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
27160
|
+
container.dispatchEvent(mountEvent);
|
|
27174
27161
|
if (!mountEvent.defaultPrevented) {
|
|
27175
|
-
focusFirst$3(removeLinks$1(getTabbableCandidates$1(
|
|
27162
|
+
focusFirst$3(removeLinks$1(getTabbableCandidates$1(container)), { select: true });
|
|
27176
27163
|
if (document.activeElement === previouslyFocusedElement) {
|
|
27177
|
-
focus$1(
|
|
27164
|
+
focus$1(container);
|
|
27178
27165
|
}
|
|
27179
27166
|
}
|
|
27180
27167
|
}
|
|
27181
27168
|
return () => {
|
|
27182
|
-
|
|
27169
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
27183
27170
|
setTimeout(() => {
|
|
27184
27171
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT$1, EVENT_OPTIONS$2);
|
|
27185
|
-
|
|
27186
|
-
|
|
27172
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
27173
|
+
container.dispatchEvent(unmountEvent);
|
|
27187
27174
|
if (!unmountEvent.defaultPrevented) {
|
|
27188
27175
|
focus$1(previouslyFocusedElement ?? document.body, { select: true });
|
|
27189
27176
|
}
|
|
27190
|
-
|
|
27177
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
27191
27178
|
focusScopesStack$1.remove(focusScope);
|
|
27192
27179
|
}, 0);
|
|
27193
27180
|
};
|
|
27194
27181
|
}
|
|
27195
|
-
}, [
|
|
27182
|
+
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
27196
27183
|
const handleKeyDown = React.useCallback(
|
|
27197
27184
|
(event) => {
|
|
27198
27185
|
if (!loop && !trapped) return;
|
|
@@ -27200,11 +27187,11 @@ var FocusScope$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
27200
27187
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
27201
27188
|
const focusedElement = document.activeElement;
|
|
27202
27189
|
if (isTabKey && focusedElement) {
|
|
27203
|
-
const
|
|
27204
|
-
const [first, last] = getTabbableEdges$1(
|
|
27190
|
+
const container2 = event.currentTarget;
|
|
27191
|
+
const [first, last] = getTabbableEdges$1(container2);
|
|
27205
27192
|
const hasTabbableElementsInside = first && last;
|
|
27206
27193
|
if (!hasTabbableElementsInside) {
|
|
27207
|
-
if (focusedElement ===
|
|
27194
|
+
if (focusedElement === container2) event.preventDefault();
|
|
27208
27195
|
} else {
|
|
27209
27196
|
if (!event.shiftKey && focusedElement === last) {
|
|
27210
27197
|
event.preventDefault();
|
|
@@ -27228,15 +27215,15 @@ function focusFirst$3(candidates, { select = false } = {}) {
|
|
|
27228
27215
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
27229
27216
|
}
|
|
27230
27217
|
}
|
|
27231
|
-
function getTabbableEdges$1(
|
|
27232
|
-
const candidates = getTabbableCandidates$1(
|
|
27233
|
-
const first = findVisible$1(candidates,
|
|
27234
|
-
const last = findVisible$1(candidates.reverse(),
|
|
27218
|
+
function getTabbableEdges$1(container) {
|
|
27219
|
+
const candidates = getTabbableCandidates$1(container);
|
|
27220
|
+
const first = findVisible$1(candidates, container);
|
|
27221
|
+
const last = findVisible$1(candidates.reverse(), container);
|
|
27235
27222
|
return [first, last];
|
|
27236
27223
|
}
|
|
27237
|
-
function getTabbableCandidates$1(
|
|
27224
|
+
function getTabbableCandidates$1(container) {
|
|
27238
27225
|
const nodes = [];
|
|
27239
|
-
const walker2 = document.createTreeWalker(
|
|
27226
|
+
const walker2 = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
27240
27227
|
acceptNode: (node) => {
|
|
27241
27228
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
27242
27229
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -27246,9 +27233,9 @@ function getTabbableCandidates$1(container2) {
|
|
|
27246
27233
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
27247
27234
|
return nodes;
|
|
27248
27235
|
}
|
|
27249
|
-
function findVisible$1(elements,
|
|
27236
|
+
function findVisible$1(elements, container) {
|
|
27250
27237
|
for (const element of elements) {
|
|
27251
|
-
if (!isHidden$1(element, { upTo:
|
|
27238
|
+
if (!isHidden$1(element, { upTo: container })) return element;
|
|
27252
27239
|
}
|
|
27253
27240
|
}
|
|
27254
27241
|
function isHidden$1(node, { upTo }) {
|
|
@@ -27305,8 +27292,8 @@ var Portal$5 = React.forwardRef((props, forwardedRef) => {
|
|
|
27305
27292
|
const { container: containerProp, ...portalProps } = props;
|
|
27306
27293
|
const [mounted, setMounted] = React.useState(false);
|
|
27307
27294
|
useLayoutEffect2(() => setMounted(true), []);
|
|
27308
|
-
const
|
|
27309
|
-
return
|
|
27295
|
+
const container = containerProp || mounted && globalThis?.document?.body;
|
|
27296
|
+
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive$2.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
27310
27297
|
});
|
|
27311
27298
|
Portal$5.displayName = PORTAL_NAME$6;
|
|
27312
27299
|
var count = 0;
|
|
@@ -28171,9 +28158,9 @@ var [PortalProvider$3, usePortalContext$3] = createDialogContext(PORTAL_NAME$5,
|
|
|
28171
28158
|
forceMount: void 0
|
|
28172
28159
|
});
|
|
28173
28160
|
var DialogPortal$1 = (props) => {
|
|
28174
|
-
const { __scopeDialog, forceMount, children: children2, container
|
|
28161
|
+
const { __scopeDialog, forceMount, children: children2, container } = props;
|
|
28175
28162
|
const context = useDialogContext(PORTAL_NAME$5, __scopeDialog);
|
|
28176
|
-
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
|
|
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 }) })) });
|
|
28177
28164
|
};
|
|
28178
28165
|
DialogPortal$1.displayName = PORTAL_NAME$5;
|
|
28179
28166
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -28221,8 +28208,8 @@ var DialogContentModal = React.forwardRef(
|
|
|
28221
28208
|
const contentRef = React.useRef(null);
|
|
28222
28209
|
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
28223
28210
|
React.useEffect(() => {
|
|
28224
|
-
const
|
|
28225
|
-
if (
|
|
28211
|
+
const content = contentRef.current;
|
|
28212
|
+
if (content) return hideOthers(content);
|
|
28226
28213
|
}, []);
|
|
28227
28214
|
return /* @__PURE__ */ jsx(
|
|
28228
28215
|
DialogContentImpl,
|
|
@@ -30671,7 +30658,7 @@ var PopperContent = React.forwardRef(
|
|
|
30671
30658
|
...contentProps
|
|
30672
30659
|
} = props;
|
|
30673
30660
|
const context = usePopperContext(CONTENT_NAME$6, __scopePopper);
|
|
30674
|
-
const [
|
|
30661
|
+
const [content, setContent] = React.useState(null);
|
|
30675
30662
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
30676
30663
|
const [arrow$12, setArrow] = React.useState(null);
|
|
30677
30664
|
const arrowSize = useSize(arrow$12);
|
|
@@ -30737,8 +30724,8 @@ var PopperContent = React.forwardRef(
|
|
|
30737
30724
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
30738
30725
|
const [contentZIndex, setContentZIndex] = React.useState();
|
|
30739
30726
|
useLayoutEffect2(() => {
|
|
30740
|
-
if (
|
|
30741
|
-
}, [
|
|
30727
|
+
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
30728
|
+
}, [content]);
|
|
30742
30729
|
return /* @__PURE__ */ jsx(
|
|
30743
30730
|
"div",
|
|
30744
30731
|
{
|
|
@@ -31085,9 +31072,9 @@ var [PortalProvider$2, usePortalContext$2] = createTooltipContext(PORTAL_NAME$4,
|
|
|
31085
31072
|
forceMount: void 0
|
|
31086
31073
|
});
|
|
31087
31074
|
var TooltipPortal = (props) => {
|
|
31088
|
-
const { __scopeTooltip, forceMount, children: children2, container
|
|
31075
|
+
const { __scopeTooltip, forceMount, children: children2, container } = props;
|
|
31089
31076
|
const context = useTooltipContext(PORTAL_NAME$4, __scopeTooltip);
|
|
31090
|
-
return /* @__PURE__ */ jsx(PortalProvider$2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$6, { asChild: true, container
|
|
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 }) }) });
|
|
31091
31078
|
};
|
|
31092
31079
|
TooltipPortal.displayName = PORTAL_NAME$4;
|
|
31093
31080
|
var CONTENT_NAME$5 = "TooltipContent";
|
|
@@ -31106,7 +31093,7 @@ var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
|
|
31106
31093
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
31107
31094
|
const [pointerGraceArea, setPointerGraceArea] = React.useState(null);
|
|
31108
31095
|
const { trigger, onClose } = context;
|
|
31109
|
-
const
|
|
31096
|
+
const content = ref.current;
|
|
31110
31097
|
const { onPointerInTransitChange } = providerContext;
|
|
31111
31098
|
const handleRemoveGraceArea = React.useCallback(() => {
|
|
31112
31099
|
setPointerGraceArea(null);
|
|
@@ -31129,23 +31116,23 @@ var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
|
|
31129
31116
|
return () => handleRemoveGraceArea();
|
|
31130
31117
|
}, [handleRemoveGraceArea]);
|
|
31131
31118
|
React.useEffect(() => {
|
|
31132
|
-
if (trigger &&
|
|
31133
|
-
const handleTriggerLeave = (event) => handleCreateGraceArea(event,
|
|
31119
|
+
if (trigger && content) {
|
|
31120
|
+
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);
|
|
31134
31121
|
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
|
31135
31122
|
trigger.addEventListener("pointerleave", handleTriggerLeave);
|
|
31136
|
-
|
|
31123
|
+
content.addEventListener("pointerleave", handleContentLeave);
|
|
31137
31124
|
return () => {
|
|
31138
31125
|
trigger.removeEventListener("pointerleave", handleTriggerLeave);
|
|
31139
|
-
|
|
31126
|
+
content.removeEventListener("pointerleave", handleContentLeave);
|
|
31140
31127
|
};
|
|
31141
31128
|
}
|
|
31142
|
-
}, [trigger,
|
|
31129
|
+
}, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);
|
|
31143
31130
|
React.useEffect(() => {
|
|
31144
31131
|
if (pointerGraceArea) {
|
|
31145
31132
|
const handleTrackPointerGrace = (event) => {
|
|
31146
31133
|
const target = event.target;
|
|
31147
31134
|
const pointerPosition = { x: event.clientX, y: event.clientY };
|
|
31148
|
-
const hasEnteredTarget = trigger?.contains(target) ||
|
|
31135
|
+
const hasEnteredTarget = trigger?.contains(target) || content?.contains(target);
|
|
31149
31136
|
const isPointerOutsideGraceArea = !isPointInPolygon$1(pointerPosition, pointerGraceArea);
|
|
31150
31137
|
if (hasEnteredTarget) {
|
|
31151
31138
|
handleRemoveGraceArea();
|
|
@@ -31157,7 +31144,7 @@ var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
|
|
31157
31144
|
document.addEventListener("pointermove", handleTrackPointerGrace);
|
|
31158
31145
|
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
31159
31146
|
}
|
|
31160
|
-
}, [trigger,
|
|
31147
|
+
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
31161
31148
|
return /* @__PURE__ */ jsx(TooltipContentImpl, { ...props, ref: composedRefs });
|
|
31162
31149
|
});
|
|
31163
31150
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
@@ -31373,7 +31360,7 @@ const TooltipContent = React.forwardRef(({ className: className2, sideOffset = 4
|
|
|
31373
31360
|
}
|
|
31374
31361
|
) }));
|
|
31375
31362
|
TooltipContent.displayName = Content2$4.displayName;
|
|
31376
|
-
const InfoTooltip = ({ title
|
|
31363
|
+
const InfoTooltip = ({ title, alertText, Icon: Icon2 = Info, onClick }) => {
|
|
31377
31364
|
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
31378
31365
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
31379
31366
|
Icon2,
|
|
@@ -31404,7 +31391,7 @@ const InfoTooltip = ({ title: title2, alertText, Icon: Icon2 = Info, onClick })
|
|
|
31404
31391
|
) }),
|
|
31405
31392
|
/* @__PURE__ */ jsx("p", { className: "font-semibold text-amber-500", children: alertText })
|
|
31406
31393
|
] }),
|
|
31407
|
-
/* @__PURE__ */ jsx("p", { className: "text-[13px] leading-relaxed text-primary-foreground/90", children:
|
|
31394
|
+
/* @__PURE__ */ jsx("p", { className: "text-[13px] leading-relaxed text-primary-foreground/90", children: title })
|
|
31408
31395
|
] }) })
|
|
31409
31396
|
] }) });
|
|
31410
31397
|
};
|
|
@@ -33117,23 +33104,7 @@ function formatDistance$1(date2, baseDate, options) {
|
|
|
33117
33104
|
function formatDistanceToNow(date2, options) {
|
|
33118
33105
|
return formatDistance$1(date2, constructNow(date2), options);
|
|
33119
33106
|
}
|
|
33120
|
-
const
|
|
33121
|
-
const secondary$1 = "reach-styles-module__secondary___VQ4iH";
|
|
33122
|
-
const destructive$1 = "reach-styles-module__destructive___RLaRD";
|
|
33123
|
-
const outline$1 = "reach-styles-module__outline___L2VtW";
|
|
33124
|
-
const google = "reach-styles-module__google___HcEij";
|
|
33125
|
-
const date = "reach-styles-module__date___-6BC4";
|
|
33126
|
-
const container = "reach-styles-module__container___6PQqs";
|
|
33127
|
-
const styles$2 = {
|
|
33128
|
-
base: base$1,
|
|
33129
|
-
"default": "reach-styles-module__default___zeGU1",
|
|
33130
|
-
secondary: secondary$1,
|
|
33131
|
-
destructive: destructive$1,
|
|
33132
|
-
outline: outline$1,
|
|
33133
|
-
google,
|
|
33134
|
-
date,
|
|
33135
|
-
container
|
|
33136
|
-
};
|
|
33107
|
+
const styles$2 = {};
|
|
33137
33108
|
const badgeVariants = cva([styles$2.base], {
|
|
33138
33109
|
variants: {
|
|
33139
33110
|
variant: {
|
|
@@ -34580,11 +34551,11 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /* @__PURE__ */ forwardRef((pr
|
|
|
34580
34551
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
34581
34552
|
const focusedElement = document.activeElement;
|
|
34582
34553
|
if (isTabKey && focusedElement) {
|
|
34583
|
-
const
|
|
34584
|
-
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(
|
|
34554
|
+
const container = event.currentTarget;
|
|
34555
|
+
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);
|
|
34585
34556
|
const hasTabbableElementsInside = first && last;
|
|
34586
34557
|
if (!hasTabbableElementsInside) {
|
|
34587
|
-
if (focusedElement ===
|
|
34558
|
+
if (focusedElement === container) event.preventDefault();
|
|
34588
34559
|
} else {
|
|
34589
34560
|
if (!event.shiftKey && focusedElement === last) {
|
|
34590
34561
|
event.preventDefault();
|
|
@@ -34620,18 +34591,18 @@ function $d3863c46a17e8a28$var$focusFirst(candidates, { select = false } = {}) {
|
|
|
34620
34591
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
34621
34592
|
}
|
|
34622
34593
|
}
|
|
34623
|
-
function $d3863c46a17e8a28$var$getTabbableEdges(
|
|
34624
|
-
const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(
|
|
34625
|
-
const first = $d3863c46a17e8a28$var$findVisible(candidates,
|
|
34626
|
-
const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(),
|
|
34594
|
+
function $d3863c46a17e8a28$var$getTabbableEdges(container) {
|
|
34595
|
+
const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);
|
|
34596
|
+
const first = $d3863c46a17e8a28$var$findVisible(candidates, container);
|
|
34597
|
+
const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);
|
|
34627
34598
|
return [
|
|
34628
34599
|
first,
|
|
34629
34600
|
last
|
|
34630
34601
|
];
|
|
34631
34602
|
}
|
|
34632
|
-
function $d3863c46a17e8a28$var$getTabbableCandidates(
|
|
34603
|
+
function $d3863c46a17e8a28$var$getTabbableCandidates(container) {
|
|
34633
34604
|
const nodes = [];
|
|
34634
|
-
const walker2 = document.createTreeWalker(
|
|
34605
|
+
const walker2 = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
34635
34606
|
acceptNode: (node) => {
|
|
34636
34607
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
34637
34608
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -34641,10 +34612,10 @@ function $d3863c46a17e8a28$var$getTabbableCandidates(container2) {
|
|
|
34641
34612
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
34642
34613
|
return nodes;
|
|
34643
34614
|
}
|
|
34644
|
-
function $d3863c46a17e8a28$var$findVisible(elements,
|
|
34615
|
+
function $d3863c46a17e8a28$var$findVisible(elements, container) {
|
|
34645
34616
|
for (const element of elements) {
|
|
34646
34617
|
if (!$d3863c46a17e8a28$var$isHidden(element, {
|
|
34647
|
-
upTo:
|
|
34618
|
+
upTo: container
|
|
34648
34619
|
})) return element;
|
|
34649
34620
|
}
|
|
34650
34621
|
}
|
|
@@ -34701,10 +34672,10 @@ function $d3863c46a17e8a28$var$removeLinks(items) {
|
|
|
34701
34672
|
}
|
|
34702
34673
|
const $f1701beae083dbae$export$602eac185826482c = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
|
|
34703
34674
|
var _globalThis$document;
|
|
34704
|
-
const { container
|
|
34705
|
-
return
|
|
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 container ? /* @__PURE__ */ ReactDOM__default.createPortal(/* @__PURE__ */ createElement$1($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
|
|
34706
34677
|
ref: forwardedRef
|
|
34707
|
-
})),
|
|
34678
|
+
})), container) : null;
|
|
34708
34679
|
});
|
|
34709
34680
|
const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : () => {
|
|
34710
34681
|
};
|
|
@@ -35171,7 +35142,7 @@ const [$5d3850c4d0b4e6c7$var$PortalProvider, $5d3850c4d0b4e6c7$var$usePortalCont
|
|
|
35171
35142
|
forceMount: void 0
|
|
35172
35143
|
});
|
|
35173
35144
|
const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props) => {
|
|
35174
|
-
const { __scopeDialog, forceMount, children: children2, container
|
|
35145
|
+
const { __scopeDialog, forceMount, children: children2, container } = props;
|
|
35175
35146
|
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, __scopeDialog);
|
|
35176
35147
|
return /* @__PURE__ */ createElement$1($5d3850c4d0b4e6c7$var$PortalProvider, {
|
|
35177
35148
|
scope: __scopeDialog,
|
|
@@ -35182,7 +35153,7 @@ const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props) => {
|
|
|
35182
35153
|
present: forceMount || context.open
|
|
35183
35154
|
}, /* @__PURE__ */ createElement$1($f1701beae083dbae$export$602eac185826482c, {
|
|
35184
35155
|
asChild: true,
|
|
35185
|
-
container
|
|
35156
|
+
container
|
|
35186
35157
|
}, child))
|
|
35187
35158
|
));
|
|
35188
35159
|
};
|
|
@@ -35241,8 +35212,8 @@ const $5d3850c4d0b4e6c7$var$DialogContentModal = /* @__PURE__ */ forwardRef((pro
|
|
|
35241
35212
|
const contentRef = useRef(null);
|
|
35242
35213
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.contentRef, contentRef);
|
|
35243
35214
|
useEffect(() => {
|
|
35244
|
-
const
|
|
35245
|
-
if (
|
|
35215
|
+
const content = contentRef.current;
|
|
35216
|
+
if (content) return hideOthers(content);
|
|
35246
35217
|
}, []);
|
|
35247
35218
|
return /* @__PURE__ */ createElement$1($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, {
|
|
35248
35219
|
ref: composedRefs,
|
|
@@ -35759,7 +35730,7 @@ var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
|
35759
35730
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
35760
35731
|
...scopeProps
|
|
35761
35732
|
} = props;
|
|
35762
|
-
const [
|
|
35733
|
+
const [container, setContainer] = React.useState(null);
|
|
35763
35734
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
35764
35735
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
35765
35736
|
const lastFocusedElementRef = React.useRef(null);
|
|
@@ -35776,69 +35747,69 @@ var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
|
35776
35747
|
React.useEffect(() => {
|
|
35777
35748
|
if (trapped) {
|
|
35778
35749
|
let handleFocusIn2 = function(event) {
|
|
35779
|
-
if (focusScope.paused || !
|
|
35750
|
+
if (focusScope.paused || !container) return;
|
|
35780
35751
|
const target = event.target;
|
|
35781
|
-
if (
|
|
35752
|
+
if (container.contains(target)) {
|
|
35782
35753
|
lastFocusedElementRef.current = target;
|
|
35783
35754
|
} else {
|
|
35784
35755
|
focus(lastFocusedElementRef.current, { select: true });
|
|
35785
35756
|
}
|
|
35786
35757
|
}, handleFocusOut2 = function(event) {
|
|
35787
|
-
if (focusScope.paused || !
|
|
35758
|
+
if (focusScope.paused || !container) return;
|
|
35788
35759
|
const relatedTarget = event.relatedTarget;
|
|
35789
35760
|
if (relatedTarget === null) return;
|
|
35790
|
-
if (!
|
|
35761
|
+
if (!container.contains(relatedTarget)) {
|
|
35791
35762
|
focus(lastFocusedElementRef.current, { select: true });
|
|
35792
35763
|
}
|
|
35793
35764
|
}, handleMutations2 = function(mutations) {
|
|
35794
35765
|
const focusedElement = document.activeElement;
|
|
35795
35766
|
if (focusedElement !== document.body) return;
|
|
35796
35767
|
for (const mutation of mutations) {
|
|
35797
|
-
if (mutation.removedNodes.length > 0) focus(
|
|
35768
|
+
if (mutation.removedNodes.length > 0) focus(container);
|
|
35798
35769
|
}
|
|
35799
35770
|
};
|
|
35800
35771
|
document.addEventListener("focusin", handleFocusIn2);
|
|
35801
35772
|
document.addEventListener("focusout", handleFocusOut2);
|
|
35802
35773
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
35803
|
-
if (
|
|
35774
|
+
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
35804
35775
|
return () => {
|
|
35805
35776
|
document.removeEventListener("focusin", handleFocusIn2);
|
|
35806
35777
|
document.removeEventListener("focusout", handleFocusOut2);
|
|
35807
35778
|
mutationObserver.disconnect();
|
|
35808
35779
|
};
|
|
35809
35780
|
}
|
|
35810
|
-
}, [trapped,
|
|
35781
|
+
}, [trapped, container, focusScope.paused]);
|
|
35811
35782
|
React.useEffect(() => {
|
|
35812
|
-
if (
|
|
35783
|
+
if (container) {
|
|
35813
35784
|
focusScopesStack.add(focusScope);
|
|
35814
35785
|
const previouslyFocusedElement = document.activeElement;
|
|
35815
|
-
const hasFocusedCandidate =
|
|
35786
|
+
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
35816
35787
|
if (!hasFocusedCandidate) {
|
|
35817
35788
|
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS$1);
|
|
35818
|
-
|
|
35819
|
-
|
|
35789
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
35790
|
+
container.dispatchEvent(mountEvent);
|
|
35820
35791
|
if (!mountEvent.defaultPrevented) {
|
|
35821
|
-
focusFirst$2(removeLinks(getTabbableCandidates(
|
|
35792
|
+
focusFirst$2(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
35822
35793
|
if (document.activeElement === previouslyFocusedElement) {
|
|
35823
|
-
focus(
|
|
35794
|
+
focus(container);
|
|
35824
35795
|
}
|
|
35825
35796
|
}
|
|
35826
35797
|
}
|
|
35827
35798
|
return () => {
|
|
35828
|
-
|
|
35799
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
35829
35800
|
setTimeout(() => {
|
|
35830
35801
|
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS$1);
|
|
35831
|
-
|
|
35832
|
-
|
|
35802
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
35803
|
+
container.dispatchEvent(unmountEvent);
|
|
35833
35804
|
if (!unmountEvent.defaultPrevented) {
|
|
35834
35805
|
focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
35835
35806
|
}
|
|
35836
|
-
|
|
35807
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
35837
35808
|
focusScopesStack.remove(focusScope);
|
|
35838
35809
|
}, 0);
|
|
35839
35810
|
};
|
|
35840
35811
|
}
|
|
35841
|
-
}, [
|
|
35812
|
+
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
35842
35813
|
const handleKeyDown = React.useCallback(
|
|
35843
35814
|
(event) => {
|
|
35844
35815
|
if (!loop && !trapped) return;
|
|
@@ -35846,11 +35817,11 @@ var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
|
35846
35817
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
35847
35818
|
const focusedElement = document.activeElement;
|
|
35848
35819
|
if (isTabKey && focusedElement) {
|
|
35849
|
-
const
|
|
35850
|
-
const [first, last] = getTabbableEdges(
|
|
35820
|
+
const container2 = event.currentTarget;
|
|
35821
|
+
const [first, last] = getTabbableEdges(container2);
|
|
35851
35822
|
const hasTabbableElementsInside = first && last;
|
|
35852
35823
|
if (!hasTabbableElementsInside) {
|
|
35853
|
-
if (focusedElement ===
|
|
35824
|
+
if (focusedElement === container2) event.preventDefault();
|
|
35854
35825
|
} else {
|
|
35855
35826
|
if (!event.shiftKey && focusedElement === last) {
|
|
35856
35827
|
event.preventDefault();
|
|
@@ -35874,15 +35845,15 @@ function focusFirst$2(candidates, { select = false } = {}) {
|
|
|
35874
35845
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
35875
35846
|
}
|
|
35876
35847
|
}
|
|
35877
|
-
function getTabbableEdges(
|
|
35878
|
-
const candidates = getTabbableCandidates(
|
|
35879
|
-
const first = findVisible(candidates,
|
|
35880
|
-
const last = findVisible(candidates.reverse(),
|
|
35848
|
+
function getTabbableEdges(container) {
|
|
35849
|
+
const candidates = getTabbableCandidates(container);
|
|
35850
|
+
const first = findVisible(candidates, container);
|
|
35851
|
+
const last = findVisible(candidates.reverse(), container);
|
|
35881
35852
|
return [first, last];
|
|
35882
35853
|
}
|
|
35883
|
-
function getTabbableCandidates(
|
|
35854
|
+
function getTabbableCandidates(container) {
|
|
35884
35855
|
const nodes = [];
|
|
35885
|
-
const walker2 = document.createTreeWalker(
|
|
35856
|
+
const walker2 = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
35886
35857
|
acceptNode: (node) => {
|
|
35887
35858
|
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
35888
35859
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
@@ -35892,9 +35863,9 @@ function getTabbableCandidates(container2) {
|
|
|
35892
35863
|
while (walker2.nextNode()) nodes.push(walker2.currentNode);
|
|
35893
35864
|
return nodes;
|
|
35894
35865
|
}
|
|
35895
|
-
function findVisible(elements,
|
|
35866
|
+
function findVisible(elements, container) {
|
|
35896
35867
|
for (const element of elements) {
|
|
35897
|
-
if (!isHidden(element, { upTo:
|
|
35868
|
+
if (!isHidden(element, { upTo: container })) return element;
|
|
35898
35869
|
}
|
|
35899
35870
|
}
|
|
35900
35871
|
function isHidden(node, { upTo }) {
|
|
@@ -36031,9 +36002,9 @@ var [PortalProvider$1, usePortalContext$1] = createPopoverContext(PORTAL_NAME$3,
|
|
|
36031
36002
|
forceMount: void 0
|
|
36032
36003
|
});
|
|
36033
36004
|
var PopoverPortal = (props) => {
|
|
36034
|
-
const { __scopePopover, forceMount, children: children2, container
|
|
36005
|
+
const { __scopePopover, forceMount, children: children2, container } = props;
|
|
36035
36006
|
const context = usePopoverContext(PORTAL_NAME$3, __scopePopover);
|
|
36036
|
-
return /* @__PURE__ */ jsx(PortalProvider$1, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$6, { asChild: true, container
|
|
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 }) }) });
|
|
36037
36008
|
};
|
|
36038
36009
|
PopoverPortal.displayName = PORTAL_NAME$3;
|
|
36039
36010
|
var CONTENT_NAME$4 = "PopoverContent";
|
|
@@ -36053,8 +36024,8 @@ var PopoverContentModal = React.forwardRef(
|
|
|
36053
36024
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
36054
36025
|
const isRightClickOutsideRef = React.useRef(false);
|
|
36055
36026
|
React.useEffect(() => {
|
|
36056
|
-
const
|
|
36057
|
-
if (
|
|
36027
|
+
const content = contentRef.current;
|
|
36028
|
+
if (content) return hideOthers(content);
|
|
36058
36029
|
}, []);
|
|
36059
36030
|
return /* @__PURE__ */ jsx(ReactRemoveScroll$1, { as: Slot$3, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
|
|
36060
36031
|
PopoverContentImpl,
|
|
@@ -36960,7 +36931,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
36960
36931
|
...contentProps
|
|
36961
36932
|
} = props;
|
|
36962
36933
|
const context = useSelectContext(CONTENT_NAME$3, __scopeSelect);
|
|
36963
|
-
const [
|
|
36934
|
+
const [content, setContent] = React.useState(null);
|
|
36964
36935
|
const [viewport, setViewport] = React.useState(null);
|
|
36965
36936
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
36966
36937
|
const [selectedItem, setSelectedItem] = React.useState(null);
|
|
@@ -36971,8 +36942,8 @@ var SelectContentImpl = React.forwardRef(
|
|
|
36971
36942
|
const [isPositioned, setIsPositioned] = React.useState(false);
|
|
36972
36943
|
const firstValidItemFoundRef = React.useRef(false);
|
|
36973
36944
|
React.useEffect(() => {
|
|
36974
|
-
if (
|
|
36975
|
-
}, [
|
|
36945
|
+
if (content) return hideOthers(content);
|
|
36946
|
+
}, [content]);
|
|
36976
36947
|
useFocusGuards();
|
|
36977
36948
|
const focusFirst2 = React.useCallback(
|
|
36978
36949
|
(candidates) => {
|
|
@@ -36991,8 +36962,8 @@ var SelectContentImpl = React.forwardRef(
|
|
|
36991
36962
|
[getItems, viewport]
|
|
36992
36963
|
);
|
|
36993
36964
|
const focusSelectedItem = React.useCallback(
|
|
36994
|
-
() => focusFirst2([selectedItem,
|
|
36995
|
-
[focusFirst2, selectedItem,
|
|
36965
|
+
() => focusFirst2([selectedItem, content]),
|
|
36966
|
+
[focusFirst2, selectedItem, content]
|
|
36996
36967
|
);
|
|
36997
36968
|
React.useEffect(() => {
|
|
36998
36969
|
if (isPositioned) {
|
|
@@ -37001,7 +36972,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
37001
36972
|
}, [isPositioned, focusSelectedItem]);
|
|
37002
36973
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
37003
36974
|
React.useEffect(() => {
|
|
37004
|
-
if (
|
|
36975
|
+
if (content) {
|
|
37005
36976
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
37006
36977
|
const handlePointerMove = (event) => {
|
|
37007
36978
|
pointerMoveDelta = {
|
|
@@ -37013,7 +36984,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
37013
36984
|
if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {
|
|
37014
36985
|
event.preventDefault();
|
|
37015
36986
|
} else {
|
|
37016
|
-
if (!
|
|
36987
|
+
if (!content.contains(event.target)) {
|
|
37017
36988
|
onOpenChange(false);
|
|
37018
36989
|
}
|
|
37019
36990
|
}
|
|
@@ -37029,7 +37000,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
37029
37000
|
document.removeEventListener("pointerup", handlePointerUp, { capture: true });
|
|
37030
37001
|
};
|
|
37031
37002
|
}
|
|
37032
|
-
}, [
|
|
37003
|
+
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
37033
37004
|
React.useEffect(() => {
|
|
37034
37005
|
const close2 = () => onOpenChange(false);
|
|
37035
37006
|
window.addEventListener("blur", close2);
|
|
@@ -37058,7 +37029,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
37058
37029
|
},
|
|
37059
37030
|
[context.value]
|
|
37060
37031
|
);
|
|
37061
|
-
const handleItemLeave = React.useCallback(() =>
|
|
37032
|
+
const handleItemLeave = React.useCallback(() => content?.focus(), [content]);
|
|
37062
37033
|
const itemTextRefCallback = React.useCallback(
|
|
37063
37034
|
(node, value, disabled) => {
|
|
37064
37035
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
@@ -37086,7 +37057,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
37086
37057
|
SelectContentProvider,
|
|
37087
37058
|
{
|
|
37088
37059
|
scope: __scopeSelect,
|
|
37089
|
-
content
|
|
37060
|
+
content,
|
|
37090
37061
|
viewport,
|
|
37091
37062
|
onViewportChange: setViewport,
|
|
37092
37063
|
itemRefCallback,
|
|
@@ -37175,16 +37146,16 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
37175
37146
|
const context = useSelectContext(CONTENT_NAME$3, __scopeSelect);
|
|
37176
37147
|
const contentContext = useSelectContentContext(CONTENT_NAME$3, __scopeSelect);
|
|
37177
37148
|
const [contentWrapper, setContentWrapper] = React.useState(null);
|
|
37178
|
-
const [
|
|
37149
|
+
const [content, setContent] = React.useState(null);
|
|
37179
37150
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
37180
37151
|
const getItems = useCollection$2(__scopeSelect);
|
|
37181
37152
|
const shouldExpandOnScrollRef = React.useRef(false);
|
|
37182
37153
|
const shouldRepositionRef = React.useRef(true);
|
|
37183
37154
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
37184
37155
|
const position = React.useCallback(() => {
|
|
37185
|
-
if (context.trigger && context.valueNode && contentWrapper &&
|
|
37156
|
+
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
37186
37157
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
37187
|
-
const contentRect =
|
|
37158
|
+
const contentRect = content.getBoundingClientRect();
|
|
37188
37159
|
const valueNodeRect = context.valueNode.getBoundingClientRect();
|
|
37189
37160
|
const itemTextRect = selectedItemText.getBoundingClientRect();
|
|
37190
37161
|
if (context.dir !== "rtl") {
|
|
@@ -37222,7 +37193,7 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
37222
37193
|
const items = getItems();
|
|
37223
37194
|
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
37224
37195
|
const itemsHeight = viewport.scrollHeight;
|
|
37225
|
-
const contentStyles = window.getComputedStyle(
|
|
37196
|
+
const contentStyles = window.getComputedStyle(content);
|
|
37226
37197
|
const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);
|
|
37227
37198
|
const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);
|
|
37228
37199
|
const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);
|
|
@@ -37242,7 +37213,7 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
37242
37213
|
if (willAlignWithoutTopOverflow) {
|
|
37243
37214
|
const isLastItem = items.length > 0 && selectedItem === items[items.length - 1].ref.current;
|
|
37244
37215
|
contentWrapper.style.bottom = "0px";
|
|
37245
|
-
const viewportOffsetBottom =
|
|
37216
|
+
const viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight;
|
|
37246
37217
|
const clampedTriggerMiddleToBottomEdge = Math.max(
|
|
37247
37218
|
triggerMiddleToBottomEdge,
|
|
37248
37219
|
selectedItemHalfHeight + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
@@ -37273,7 +37244,7 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
37273
37244
|
context.trigger,
|
|
37274
37245
|
context.valueNode,
|
|
37275
37246
|
contentWrapper,
|
|
37276
|
-
|
|
37247
|
+
content,
|
|
37277
37248
|
viewport,
|
|
37278
37249
|
selectedItem,
|
|
37279
37250
|
selectedItemText,
|
|
@@ -37283,8 +37254,8 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
37283
37254
|
useLayoutEffect2(() => position(), [position]);
|
|
37284
37255
|
const [contentZIndex, setContentZIndex] = React.useState();
|
|
37285
37256
|
useLayoutEffect2(() => {
|
|
37286
|
-
if (
|
|
37287
|
-
}, [
|
|
37257
|
+
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
37258
|
+
}, [content]);
|
|
37288
37259
|
const handleScrollButtonChange = React.useCallback(
|
|
37289
37260
|
(node) => {
|
|
37290
37261
|
if (node && shouldRepositionRef.current === true) {
|
|
@@ -39573,7 +39544,7 @@ var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
|
|
|
39573
39544
|
var Menu = (props) => {
|
|
39574
39545
|
const { __scopeMenu, open = false, children: children2, dir, onOpenChange, modal = true } = props;
|
|
39575
39546
|
const popperScope = usePopperScope(__scopeMenu);
|
|
39576
|
-
const [
|
|
39547
|
+
const [content, setContent] = React.useState(null);
|
|
39577
39548
|
const isUsingKeyboardRef = React.useRef(false);
|
|
39578
39549
|
const handleOpenChange = useCallbackRef$1(onOpenChange);
|
|
39579
39550
|
const direction = useDirection(dir);
|
|
@@ -39597,7 +39568,7 @@ var Menu = (props) => {
|
|
|
39597
39568
|
scope: __scopeMenu,
|
|
39598
39569
|
open,
|
|
39599
39570
|
onOpenChange: handleOpenChange,
|
|
39600
|
-
content
|
|
39571
|
+
content,
|
|
39601
39572
|
onContentChange: setContent,
|
|
39602
39573
|
children: /* @__PURE__ */ jsx(
|
|
39603
39574
|
MenuRootProvider,
|
|
@@ -39628,9 +39599,9 @@ var [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME$1, {
|
|
|
39628
39599
|
forceMount: void 0
|
|
39629
39600
|
});
|
|
39630
39601
|
var MenuPortal = (props) => {
|
|
39631
|
-
const { __scopeMenu, forceMount, children: children2, container
|
|
39602
|
+
const { __scopeMenu, forceMount, children: children2, container } = props;
|
|
39632
39603
|
const context = useMenuContext(PORTAL_NAME$1, __scopeMenu);
|
|
39633
|
-
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$6, { asChild: true, container
|
|
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 }) }) });
|
|
39634
39605
|
};
|
|
39635
39606
|
MenuPortal.displayName = PORTAL_NAME$1;
|
|
39636
39607
|
var CONTENT_NAME$1 = "MenuContent";
|
|
@@ -39650,8 +39621,8 @@ var MenuRootContentModal = React.forwardRef(
|
|
|
39650
39621
|
const ref = React.useRef(null);
|
|
39651
39622
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
39652
39623
|
React.useEffect(() => {
|
|
39653
|
-
const
|
|
39654
|
-
if (
|
|
39624
|
+
const content = ref.current;
|
|
39625
|
+
if (content) return hideOthers(content);
|
|
39655
39626
|
}, []);
|
|
39656
39627
|
return /* @__PURE__ */ jsx(
|
|
39657
39628
|
MenuContentImpl,
|
|
@@ -39828,8 +39799,8 @@ var MenuContentImpl = React.forwardRef(
|
|
|
39828
39799
|
if (event.key === "Tab") event.preventDefault();
|
|
39829
39800
|
if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
|
|
39830
39801
|
}
|
|
39831
|
-
const
|
|
39832
|
-
if (event.target !==
|
|
39802
|
+
const content = contentRef.current;
|
|
39803
|
+
if (event.target !== content) return;
|
|
39833
39804
|
if (!FIRST_LAST_KEYS.includes(event.key)) return;
|
|
39834
39805
|
event.preventDefault();
|
|
39835
39806
|
const items = getItems().filter((item) => !item.disabled);
|
|
@@ -40755,27 +40726,7 @@ const BackNextButtonGroup = ({
|
|
|
40755
40726
|
)
|
|
40756
40727
|
] });
|
|
40757
40728
|
};
|
|
40758
|
-
const
|
|
40759
|
-
const destructive = "reach-styles-module__destructive___5EWhN";
|
|
40760
|
-
const outline = "reach-styles-module__outline___gj9sC";
|
|
40761
|
-
const secondary = "reach-styles-module__secondary___cN5Wj";
|
|
40762
|
-
const header = "reach-styles-module__header___-izE2";
|
|
40763
|
-
const title = "reach-styles-module__title___n1hA9";
|
|
40764
|
-
const description = "reach-styles-module__description___EvXM-";
|
|
40765
|
-
const content = "reach-styles-module__content___okv68";
|
|
40766
|
-
const footer = "reach-styles-module__footer___YA4U4";
|
|
40767
|
-
const styles = {
|
|
40768
|
-
base,
|
|
40769
|
-
"default": "reach-styles-module__default___88Q0d",
|
|
40770
|
-
destructive,
|
|
40771
|
-
outline,
|
|
40772
|
-
secondary,
|
|
40773
|
-
header,
|
|
40774
|
-
title,
|
|
40775
|
-
description,
|
|
40776
|
-
content,
|
|
40777
|
-
footer
|
|
40778
|
-
};
|
|
40729
|
+
const styles = {};
|
|
40779
40730
|
const cardVariants = cva(styles.base, {
|
|
40780
40731
|
variants: {
|
|
40781
40732
|
variant: {
|
|
@@ -42119,7 +42070,7 @@ const EstimatedMatchesView = ({
|
|
|
42119
42070
|
iconDefinitions,
|
|
42120
42071
|
includeSegments,
|
|
42121
42072
|
excludeSegments,
|
|
42122
|
-
title
|
|
42073
|
+
title = "Estimated Matches",
|
|
42123
42074
|
subtitle
|
|
42124
42075
|
}) => {
|
|
42125
42076
|
const {
|
|
@@ -42145,7 +42096,7 @@ const EstimatedMatchesView = ({
|
|
|
42145
42096
|
}, [data?.recipients]);
|
|
42146
42097
|
return /* @__PURE__ */ jsxs("div", { className: "w-full p-4", children: [
|
|
42147
42098
|
/* @__PURE__ */ jsxs("div", { className: "mb-4 md:mb-6", children: [
|
|
42148
|
-
/* @__PURE__ */ jsx("h3", { className: "text-xl font-semibold text-gray-900", children:
|
|
42099
|
+
/* @__PURE__ */ jsx("h3", { className: "text-xl font-semibold text-gray-900", children: title }),
|
|
42149
42100
|
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500", children: subtitle })
|
|
42150
42101
|
] }),
|
|
42151
42102
|
/* @__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: [
|
|
@@ -44586,10 +44537,10 @@ function Caption(props) {
|
|
|
44586
44537
|
return jsx("div", { className: classNames.caption, style: styles2.caption, children: caption });
|
|
44587
44538
|
}
|
|
44588
44539
|
function Footer(props) {
|
|
44589
|
-
var _a = useDayPicker(),
|
|
44590
|
-
if (!
|
|
44540
|
+
var _a = useDayPicker(), footer = _a.footer, styles2 = _a.styles, tfoot = _a.classNames.tfoot;
|
|
44541
|
+
if (!footer)
|
|
44591
44542
|
return jsx(Fragment, {});
|
|
44592
|
-
return jsx("tfoot", { className: tfoot, style: styles2.tfoot, children: jsx("tr", { children: jsx("td", { colSpan: 8, children:
|
|
44543
|
+
return jsx("tfoot", { className: tfoot, style: styles2.tfoot, children: jsx("tr", { children: jsx("td", { colSpan: 8, children: footer }) }) });
|
|
44593
44544
|
}
|
|
44594
44545
|
function getWeekdays(locale2, weekStartsOn, ISOWeek) {
|
|
44595
44546
|
var start = ISOWeek ? startOfISOWeek(/* @__PURE__ */ new Date()) : startOfWeek(/* @__PURE__ */ new Date(), { locale: locale2, weekStartsOn });
|
|
@@ -45397,15 +45348,15 @@ function Day(props) {
|
|
|
45397
45348
|
function WeekNumber(props) {
|
|
45398
45349
|
var weekNumber = props.number, dates2 = props.dates;
|
|
45399
45350
|
var _a = useDayPicker(), onWeekNumberClick = _a.onWeekNumberClick, styles2 = _a.styles, classNames = _a.classNames, locale2 = _a.locale, labelWeekNumber2 = _a.labels.labelWeekNumber, formatWeekNumber2 = _a.formatters.formatWeekNumber;
|
|
45400
|
-
var
|
|
45351
|
+
var content = formatWeekNumber2(Number(weekNumber), { locale: locale2 });
|
|
45401
45352
|
if (!onWeekNumberClick) {
|
|
45402
|
-
return jsx("span", { className: classNames.weeknumber, style: styles2.weeknumber, children:
|
|
45353
|
+
return jsx("span", { className: classNames.weeknumber, style: styles2.weeknumber, children: content });
|
|
45403
45354
|
}
|
|
45404
45355
|
var label = labelWeekNumber2(Number(weekNumber), { locale: locale2 });
|
|
45405
45356
|
var handleClick = function(e4) {
|
|
45406
45357
|
onWeekNumberClick(weekNumber, dates2, e4);
|
|
45407
45358
|
};
|
|
45408
|
-
return jsx(Button, { name: "week-number", "aria-label": label, className: classNames.weeknumber, style: styles2.weeknumber, onClick: handleClick, children:
|
|
45359
|
+
return jsx(Button, { name: "week-number", "aria-label": label, className: classNames.weeknumber, style: styles2.weeknumber, onClick: handleClick, children: content });
|
|
45409
45360
|
}
|
|
45410
45361
|
function Row(props) {
|
|
45411
45362
|
var _a, _b;
|
|
@@ -46426,13 +46377,13 @@ const SelectAudience = ({ iconDefinitions, automation }) => {
|
|
|
46426
46377
|
] }) })
|
|
46427
46378
|
] });
|
|
46428
46379
|
};
|
|
46429
|
-
const TitleAndContent = ({ title
|
|
46380
|
+
const TitleAndContent = ({ title, subtitle, content }) => {
|
|
46430
46381
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 w-full p-6 rounded-xl bg-gray-100 ", children: [
|
|
46431
46382
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
46432
|
-
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-semibold", children:
|
|
46383
|
+
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-semibold", children: title }),
|
|
46433
46384
|
subtitle && /* @__PURE__ */ jsx("p", { className: "text-gray-600 mt-1", children: subtitle })
|
|
46434
46385
|
] }),
|
|
46435
|
-
/* @__PURE__ */ jsx("div", { className: "bg-white rounded-2xl w-full border border-gray-200 p-6 relative", children:
|
|
46386
|
+
/* @__PURE__ */ jsx("div", { className: "bg-white rounded-2xl w-full border border-gray-200 p-6 relative", children: content })
|
|
46436
46387
|
] });
|
|
46437
46388
|
};
|
|
46438
46389
|
const EditAutomationPopup = ({
|