@cnc-ti/layout-basic 8.3.18 → 8.3.19
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/index.css +0 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +731 -2194
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +741 -2204
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -57,16 +57,16 @@ __export(src_exports, {
|
|
|
57
57
|
CommandList: () => CommandList,
|
|
58
58
|
CommandSeparator: () => CommandSeparator,
|
|
59
59
|
CommandShortcut: () => CommandShortcut,
|
|
60
|
-
Dialog: () =>
|
|
61
|
-
DialogClose: () =>
|
|
62
|
-
DialogContent: () =>
|
|
63
|
-
DialogDescription: () =>
|
|
60
|
+
Dialog: () => Dialog,
|
|
61
|
+
DialogClose: () => DialogClose,
|
|
62
|
+
DialogContent: () => DialogContent,
|
|
63
|
+
DialogDescription: () => DialogDescription,
|
|
64
64
|
DialogFooter: () => DialogFooter,
|
|
65
65
|
DialogHeader: () => DialogHeader,
|
|
66
|
-
DialogOverlay: () =>
|
|
67
|
-
DialogPortal: () =>
|
|
68
|
-
DialogTitle: () =>
|
|
69
|
-
DialogTrigger: () =>
|
|
66
|
+
DialogOverlay: () => DialogOverlay,
|
|
67
|
+
DialogPortal: () => DialogPortal,
|
|
68
|
+
DialogTitle: () => DialogTitle,
|
|
69
|
+
DialogTrigger: () => DialogTrigger,
|
|
70
70
|
DropdownMenu: () => DropdownMenu2,
|
|
71
71
|
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem2,
|
|
72
72
|
DropdownMenuContent: () => DropdownMenuContent2,
|
|
@@ -8181,7 +8181,11 @@ function getInitials(fullName) {
|
|
|
8181
8181
|
const lastNameInitial = nameParts[nameParts.length - 1][0].toUpperCase();
|
|
8182
8182
|
return `${firstNameInitial}${lastNameInitial}`;
|
|
8183
8183
|
}
|
|
8184
|
-
function Header({
|
|
8184
|
+
function Header({
|
|
8185
|
+
variant = "default",
|
|
8186
|
+
className,
|
|
8187
|
+
...props
|
|
8188
|
+
}) {
|
|
8185
8189
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8186
8190
|
"header",
|
|
8187
8191
|
{
|
|
@@ -8219,1581 +8223,110 @@ var HeaderContainer = ({
|
|
|
8219
8223
|
"cnc-flex cnc-flex-1 cnc-justify-between cnc-items-center",
|
|
8220
8224
|
container && "cnc-container cnc-mx-auto",
|
|
8221
8225
|
className
|
|
8222
|
-
),
|
|
8223
|
-
...props,
|
|
8224
|
-
children: [
|
|
8225
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "cnc-flex cnc-items-center", children: onOpenMenu && !isOpen && hasSidebar ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
}
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
icon,
|
|
8258
|
-
children
|
|
8259
|
-
}) => {
|
|
8260
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuItem2, { onClick, children: [
|
|
8261
|
-
icon,
|
|
8262
|
-
children
|
|
8263
|
-
] });
|
|
8264
|
-
};
|
|
8265
|
-
var AplicationsHeader = ({ children }) => {
|
|
8266
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenu2, { children: [
|
|
8267
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "cnc-flex cnc-flex-row cnc-gap-2 cnc-items-center cnc-justify-center hover:cnc-bg-gray-100 cnc-transition cnc-duration-300 cnc-ease-in-out cnc-cursor-pointer cnc-px-4 cnc-py-2 cnc-rounded-lg cnc-header-item", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8268
|
-
"svg",
|
|
8269
|
-
{
|
|
8270
|
-
width: "18",
|
|
8271
|
-
height: "18",
|
|
8272
|
-
viewBox: "0 0 16 16",
|
|
8273
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
8274
|
-
className: "cnc-header-item",
|
|
8275
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8276
|
-
"path",
|
|
8277
|
-
{
|
|
8278
|
-
d: "M2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4ZM8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16ZM2 16C3.1 16 4 15.1 4 14C4 12.9 3.1 12 2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16ZM2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10ZM8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10ZM12 2C12 3.1 12.9 4 14 4C15.1 4 16 3.1 16 2C16 0.9 15.1 0 14 0C12.9 0 12 0.9 12 2ZM8 4C9.1 4 10 3.1 10 2C10 0.9 9.1 0 8 0C6.9 0 6 0.9 6 2C6 3.1 6.9 4 8 4ZM14 10C15.1 10 16 9.1 16 8C16 6.9 15.1 6 14 6C12.9 6 12 6.9 12 8C12 9.1 12.9 10 14 10ZM14 16C15.1 16 16 15.1 16 14C16 12.9 15.1 12 14 12C12.9 12 12 12.9 12 14C12 15.1 12.9 16 14 16Z"
|
|
8279
|
-
}
|
|
8280
|
-
)
|
|
8281
|
-
}
|
|
8282
|
-
) }) }),
|
|
8283
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuContent2, { className: "flex", children })
|
|
8284
|
-
] }) });
|
|
8285
|
-
};
|
|
8286
|
-
|
|
8287
|
-
// ../../node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
8288
|
-
var React49 = __toESM(require("react"), 1);
|
|
8289
|
-
|
|
8290
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
8291
|
-
function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
8292
|
-
return function handleEvent(event) {
|
|
8293
|
-
originalEventHandler?.(event);
|
|
8294
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
8295
|
-
return ourEventHandler?.(event);
|
|
8296
|
-
}
|
|
8297
|
-
};
|
|
8298
|
-
}
|
|
8299
|
-
|
|
8300
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
8301
|
-
var React33 = __toESM(require("react"), 1);
|
|
8302
|
-
function setRef2(ref, value) {
|
|
8303
|
-
if (typeof ref === "function") {
|
|
8304
|
-
return ref(value);
|
|
8305
|
-
} else if (ref !== null && ref !== void 0) {
|
|
8306
|
-
ref.current = value;
|
|
8307
|
-
}
|
|
8308
|
-
}
|
|
8309
|
-
function composeRefs2(...refs) {
|
|
8310
|
-
return (node) => {
|
|
8311
|
-
let hasCleanup = false;
|
|
8312
|
-
const cleanups = refs.map((ref) => {
|
|
8313
|
-
const cleanup = setRef2(ref, node);
|
|
8314
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
8315
|
-
hasCleanup = true;
|
|
8316
|
-
}
|
|
8317
|
-
return cleanup;
|
|
8318
|
-
});
|
|
8319
|
-
if (hasCleanup) {
|
|
8320
|
-
return () => {
|
|
8321
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
8322
|
-
const cleanup = cleanups[i];
|
|
8323
|
-
if (typeof cleanup == "function") {
|
|
8324
|
-
cleanup();
|
|
8325
|
-
} else {
|
|
8326
|
-
setRef2(refs[i], null);
|
|
8327
|
-
}
|
|
8328
|
-
}
|
|
8329
|
-
};
|
|
8330
|
-
}
|
|
8331
|
-
};
|
|
8332
|
-
}
|
|
8333
|
-
function useComposedRefs2(...refs) {
|
|
8334
|
-
return React33.useCallback(composeRefs2(...refs), refs);
|
|
8335
|
-
}
|
|
8336
|
-
|
|
8337
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
8338
|
-
var React34 = __toESM(require("react"), 1);
|
|
8339
|
-
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
8340
|
-
function createContext22(rootComponentName, defaultContext) {
|
|
8341
|
-
const Context = React34.createContext(defaultContext);
|
|
8342
|
-
const Provider = (props) => {
|
|
8343
|
-
const { children, ...context } = props;
|
|
8344
|
-
const value = React34.useMemo(() => context, Object.values(context));
|
|
8345
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Context.Provider, { value, children });
|
|
8346
|
-
};
|
|
8347
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
8348
|
-
function useContext22(consumerName) {
|
|
8349
|
-
const context = React34.useContext(Context);
|
|
8350
|
-
if (context) return context;
|
|
8351
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
8352
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
8353
|
-
}
|
|
8354
|
-
return [Provider, useContext22];
|
|
8355
|
-
}
|
|
8356
|
-
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
8357
|
-
let defaultContexts = [];
|
|
8358
|
-
function createContext32(rootComponentName, defaultContext) {
|
|
8359
|
-
const BaseContext = React34.createContext(defaultContext);
|
|
8360
|
-
const index2 = defaultContexts.length;
|
|
8361
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
8362
|
-
const Provider = (props) => {
|
|
8363
|
-
const { scope, children, ...context } = props;
|
|
8364
|
-
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
8365
|
-
const value = React34.useMemo(() => context, Object.values(context));
|
|
8366
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Context.Provider, { value, children });
|
|
8367
|
-
};
|
|
8368
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
8369
|
-
function useContext22(consumerName, scope) {
|
|
8370
|
-
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
8371
|
-
const context = React34.useContext(Context);
|
|
8372
|
-
if (context) return context;
|
|
8373
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
8374
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
8375
|
-
}
|
|
8376
|
-
return [Provider, useContext22];
|
|
8377
|
-
}
|
|
8378
|
-
const createScope = () => {
|
|
8379
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
8380
|
-
return React34.createContext(defaultContext);
|
|
8381
|
-
});
|
|
8382
|
-
return function useScope(scope) {
|
|
8383
|
-
const contexts = scope?.[scopeName] || scopeContexts;
|
|
8384
|
-
return React34.useMemo(
|
|
8385
|
-
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
8386
|
-
[scope, contexts]
|
|
8387
|
-
);
|
|
8388
|
-
};
|
|
8389
|
-
};
|
|
8390
|
-
createScope.scopeName = scopeName;
|
|
8391
|
-
return [createContext32, composeContextScopes2(createScope, ...createContextScopeDeps)];
|
|
8392
|
-
}
|
|
8393
|
-
function composeContextScopes2(...scopes) {
|
|
8394
|
-
const baseScope = scopes[0];
|
|
8395
|
-
if (scopes.length === 1) return baseScope;
|
|
8396
|
-
const createScope = () => {
|
|
8397
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
8398
|
-
useScope: createScope2(),
|
|
8399
|
-
scopeName: createScope2.scopeName
|
|
8400
|
-
}));
|
|
8401
|
-
return function useComposedScopes(overrideScopes) {
|
|
8402
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
8403
|
-
const scopeProps = useScope(overrideScopes);
|
|
8404
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
8405
|
-
return { ...nextScopes2, ...currentScope };
|
|
8406
|
-
}, {});
|
|
8407
|
-
return React34.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
8408
|
-
};
|
|
8409
|
-
};
|
|
8410
|
-
createScope.scopeName = baseScope.scopeName;
|
|
8411
|
-
return createScope;
|
|
8412
|
-
}
|
|
8413
|
-
|
|
8414
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
8415
|
-
var React36 = __toESM(require("react"), 1);
|
|
8416
|
-
|
|
8417
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
8418
|
-
var React35 = __toESM(require("react"), 1);
|
|
8419
|
-
var useLayoutEffect22 = globalThis?.document ? React35.useLayoutEffect : () => {
|
|
8420
|
-
};
|
|
8421
|
-
|
|
8422
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
8423
|
-
var useReactId2 = React36[" useId ".trim().toString()] || (() => void 0);
|
|
8424
|
-
var count3 = 0;
|
|
8425
|
-
function useId2(deterministicId) {
|
|
8426
|
-
const [id, setId] = React36.useState(useReactId2());
|
|
8427
|
-
useLayoutEffect22(() => {
|
|
8428
|
-
if (!deterministicId) setId((reactId) => reactId ?? String(count3++));
|
|
8429
|
-
}, [deterministicId]);
|
|
8430
|
-
return deterministicId || (id ? `radix-${id}` : "");
|
|
8431
|
-
}
|
|
8432
|
-
|
|
8433
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
8434
|
-
var React37 = __toESM(require("react"), 1);
|
|
8435
|
-
var React210 = __toESM(require("react"), 1);
|
|
8436
|
-
var useInsertionEffect = React37[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
|
|
8437
|
-
function useControllableState2({
|
|
8438
|
-
prop,
|
|
8439
|
-
defaultProp,
|
|
8440
|
-
onChange = () => {
|
|
8441
|
-
},
|
|
8442
|
-
caller
|
|
8443
|
-
}) {
|
|
8444
|
-
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState2({
|
|
8445
|
-
defaultProp,
|
|
8446
|
-
onChange
|
|
8447
|
-
});
|
|
8448
|
-
const isControlled = prop !== void 0;
|
|
8449
|
-
const value = isControlled ? prop : uncontrolledProp;
|
|
8450
|
-
if (true) {
|
|
8451
|
-
const isControlledRef = React37.useRef(prop !== void 0);
|
|
8452
|
-
React37.useEffect(() => {
|
|
8453
|
-
const wasControlled = isControlledRef.current;
|
|
8454
|
-
if (wasControlled !== isControlled) {
|
|
8455
|
-
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
8456
|
-
const to = isControlled ? "controlled" : "uncontrolled";
|
|
8457
|
-
console.warn(
|
|
8458
|
-
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
8459
|
-
);
|
|
8460
|
-
}
|
|
8461
|
-
isControlledRef.current = isControlled;
|
|
8462
|
-
}, [isControlled, caller]);
|
|
8463
|
-
}
|
|
8464
|
-
const setValue = React37.useCallback(
|
|
8465
|
-
(nextValue) => {
|
|
8466
|
-
if (isControlled) {
|
|
8467
|
-
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
8468
|
-
if (value2 !== prop) {
|
|
8469
|
-
onChangeRef.current?.(value2);
|
|
8470
|
-
}
|
|
8471
|
-
} else {
|
|
8472
|
-
setUncontrolledProp(nextValue);
|
|
8473
|
-
}
|
|
8474
|
-
},
|
|
8475
|
-
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
8476
|
-
);
|
|
8477
|
-
return [value, setValue];
|
|
8478
|
-
}
|
|
8479
|
-
function useUncontrolledState2({
|
|
8480
|
-
defaultProp,
|
|
8481
|
-
onChange
|
|
8482
|
-
}) {
|
|
8483
|
-
const [value, setValue] = React37.useState(defaultProp);
|
|
8484
|
-
const prevValueRef = React37.useRef(value);
|
|
8485
|
-
const onChangeRef = React37.useRef(onChange);
|
|
8486
|
-
useInsertionEffect(() => {
|
|
8487
|
-
onChangeRef.current = onChange;
|
|
8488
|
-
}, [onChange]);
|
|
8489
|
-
React37.useEffect(() => {
|
|
8490
|
-
if (prevValueRef.current !== value) {
|
|
8491
|
-
onChangeRef.current?.(value);
|
|
8492
|
-
prevValueRef.current = value;
|
|
8493
|
-
}
|
|
8494
|
-
}, [value, prevValueRef]);
|
|
8495
|
-
return [value, setValue, onChangeRef];
|
|
8496
|
-
}
|
|
8497
|
-
function isFunction(value) {
|
|
8498
|
-
return typeof value === "function";
|
|
8499
|
-
}
|
|
8500
|
-
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
8501
|
-
|
|
8502
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
8503
|
-
var React41 = __toESM(require("react"), 1);
|
|
8504
|
-
|
|
8505
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
8506
|
-
var React38 = __toESM(require("react"), 1);
|
|
8507
|
-
var ReactDOM4 = __toESM(require("react-dom"), 1);
|
|
8508
|
-
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
8509
|
-
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
8510
|
-
var NODES2 = [
|
|
8511
|
-
"a",
|
|
8512
|
-
"button",
|
|
8513
|
-
"div",
|
|
8514
|
-
"form",
|
|
8515
|
-
"h2",
|
|
8516
|
-
"h3",
|
|
8517
|
-
"img",
|
|
8518
|
-
"input",
|
|
8519
|
-
"label",
|
|
8520
|
-
"li",
|
|
8521
|
-
"nav",
|
|
8522
|
-
"ol",
|
|
8523
|
-
"p",
|
|
8524
|
-
"select",
|
|
8525
|
-
"span",
|
|
8526
|
-
"svg",
|
|
8527
|
-
"ul"
|
|
8528
|
-
];
|
|
8529
|
-
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
8530
|
-
const Slot8 = (0, import_react_slot5.createSlot)(`Primitive.${node}`);
|
|
8531
|
-
const Node2 = React38.forwardRef((props, forwardedRef) => {
|
|
8532
|
-
const { asChild, ...primitiveProps } = props;
|
|
8533
|
-
const Comp = asChild ? Slot8 : node;
|
|
8534
|
-
if (typeof window !== "undefined") {
|
|
8535
|
-
window[Symbol.for("radix-ui")] = true;
|
|
8536
|
-
}
|
|
8537
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
8538
|
-
});
|
|
8539
|
-
Node2.displayName = `Primitive.${node}`;
|
|
8540
|
-
return { ...primitive, [node]: Node2 };
|
|
8541
|
-
}, {});
|
|
8542
|
-
function dispatchDiscreteCustomEvent2(target, event) {
|
|
8543
|
-
if (target) ReactDOM4.flushSync(() => target.dispatchEvent(event));
|
|
8544
|
-
}
|
|
8545
|
-
|
|
8546
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
8547
|
-
var React39 = __toESM(require("react"), 1);
|
|
8548
|
-
function useCallbackRef3(callback) {
|
|
8549
|
-
const callbackRef = React39.useRef(callback);
|
|
8550
|
-
React39.useEffect(() => {
|
|
8551
|
-
callbackRef.current = callback;
|
|
8552
|
-
});
|
|
8553
|
-
return React39.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
8554
|
-
}
|
|
8555
|
-
|
|
8556
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
8557
|
-
var React40 = __toESM(require("react"), 1);
|
|
8558
|
-
function useEscapeKeydown2(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
8559
|
-
const onEscapeKeyDown = useCallbackRef3(onEscapeKeyDownProp);
|
|
8560
|
-
React40.useEffect(() => {
|
|
8561
|
-
const handleKeyDown = (event) => {
|
|
8562
|
-
if (event.key === "Escape") {
|
|
8563
|
-
onEscapeKeyDown(event);
|
|
8564
|
-
}
|
|
8565
|
-
};
|
|
8566
|
-
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
8567
|
-
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
8568
|
-
}, [onEscapeKeyDown, ownerDocument]);
|
|
8569
|
-
}
|
|
8570
|
-
|
|
8571
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
8572
|
-
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
8573
|
-
var DISMISSABLE_LAYER_NAME2 = "DismissableLayer";
|
|
8574
|
-
var CONTEXT_UPDATE2 = "dismissableLayer.update";
|
|
8575
|
-
var POINTER_DOWN_OUTSIDE2 = "dismissableLayer.pointerDownOutside";
|
|
8576
|
-
var FOCUS_OUTSIDE2 = "dismissableLayer.focusOutside";
|
|
8577
|
-
var originalBodyPointerEvents2;
|
|
8578
|
-
var DismissableLayerContext2 = React41.createContext({
|
|
8579
|
-
layers: /* @__PURE__ */ new Set(),
|
|
8580
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
8581
|
-
branches: /* @__PURE__ */ new Set()
|
|
8582
|
-
});
|
|
8583
|
-
var DismissableLayer2 = React41.forwardRef(
|
|
8584
|
-
(props, forwardedRef) => {
|
|
8585
|
-
const {
|
|
8586
|
-
disableOutsidePointerEvents = false,
|
|
8587
|
-
onEscapeKeyDown,
|
|
8588
|
-
onPointerDownOutside,
|
|
8589
|
-
onFocusOutside,
|
|
8590
|
-
onInteractOutside,
|
|
8591
|
-
onDismiss,
|
|
8592
|
-
...layerProps
|
|
8593
|
-
} = props;
|
|
8594
|
-
const context = React41.useContext(DismissableLayerContext2);
|
|
8595
|
-
const [node, setNode] = React41.useState(null);
|
|
8596
|
-
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
8597
|
-
const [, force] = React41.useState({});
|
|
8598
|
-
const composedRefs = useComposedRefs2(forwardedRef, (node2) => setNode(node2));
|
|
8599
|
-
const layers = Array.from(context.layers);
|
|
8600
|
-
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
8601
|
-
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
8602
|
-
const index2 = node ? layers.indexOf(node) : -1;
|
|
8603
|
-
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
8604
|
-
const isPointerEventsEnabled = index2 >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
8605
|
-
const pointerDownOutside = usePointerDownOutside2((event) => {
|
|
8606
|
-
const target = event.target;
|
|
8607
|
-
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
8608
|
-
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
8609
|
-
onPointerDownOutside?.(event);
|
|
8610
|
-
onInteractOutside?.(event);
|
|
8611
|
-
if (!event.defaultPrevented) onDismiss?.();
|
|
8612
|
-
}, ownerDocument);
|
|
8613
|
-
const focusOutside = useFocusOutside2((event) => {
|
|
8614
|
-
const target = event.target;
|
|
8615
|
-
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
8616
|
-
if (isFocusInBranch) return;
|
|
8617
|
-
onFocusOutside?.(event);
|
|
8618
|
-
onInteractOutside?.(event);
|
|
8619
|
-
if (!event.defaultPrevented) onDismiss?.();
|
|
8620
|
-
}, ownerDocument);
|
|
8621
|
-
useEscapeKeydown2((event) => {
|
|
8622
|
-
const isHighestLayer = index2 === context.layers.size - 1;
|
|
8623
|
-
if (!isHighestLayer) return;
|
|
8624
|
-
onEscapeKeyDown?.(event);
|
|
8625
|
-
if (!event.defaultPrevented && onDismiss) {
|
|
8626
|
-
event.preventDefault();
|
|
8627
|
-
onDismiss();
|
|
8628
|
-
}
|
|
8629
|
-
}, ownerDocument);
|
|
8630
|
-
React41.useEffect(() => {
|
|
8631
|
-
if (!node) return;
|
|
8632
|
-
if (disableOutsidePointerEvents) {
|
|
8633
|
-
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
8634
|
-
originalBodyPointerEvents2 = ownerDocument.body.style.pointerEvents;
|
|
8635
|
-
ownerDocument.body.style.pointerEvents = "none";
|
|
8636
|
-
}
|
|
8637
|
-
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
8638
|
-
}
|
|
8639
|
-
context.layers.add(node);
|
|
8640
|
-
dispatchUpdate2();
|
|
8641
|
-
return () => {
|
|
8642
|
-
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
|
8643
|
-
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents2;
|
|
8644
|
-
}
|
|
8645
|
-
};
|
|
8646
|
-
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
8647
|
-
React41.useEffect(() => {
|
|
8648
|
-
return () => {
|
|
8649
|
-
if (!node) return;
|
|
8650
|
-
context.layers.delete(node);
|
|
8651
|
-
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
8652
|
-
dispatchUpdate2();
|
|
8653
|
-
};
|
|
8654
|
-
}, [node, context]);
|
|
8655
|
-
React41.useEffect(() => {
|
|
8656
|
-
const handleUpdate = () => force({});
|
|
8657
|
-
document.addEventListener(CONTEXT_UPDATE2, handleUpdate);
|
|
8658
|
-
return () => document.removeEventListener(CONTEXT_UPDATE2, handleUpdate);
|
|
8659
|
-
}, []);
|
|
8660
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8661
|
-
Primitive2.div,
|
|
8662
|
-
{
|
|
8663
|
-
...layerProps,
|
|
8664
|
-
ref: composedRefs,
|
|
8665
|
-
style: {
|
|
8666
|
-
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
8667
|
-
...props.style
|
|
8668
|
-
},
|
|
8669
|
-
onFocusCapture: composeEventHandlers2(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
8670
|
-
onBlurCapture: composeEventHandlers2(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
8671
|
-
onPointerDownCapture: composeEventHandlers2(
|
|
8672
|
-
props.onPointerDownCapture,
|
|
8673
|
-
pointerDownOutside.onPointerDownCapture
|
|
8674
|
-
)
|
|
8675
|
-
}
|
|
8676
|
-
);
|
|
8677
|
-
}
|
|
8678
|
-
);
|
|
8679
|
-
DismissableLayer2.displayName = DISMISSABLE_LAYER_NAME2;
|
|
8680
|
-
var BRANCH_NAME2 = "DismissableLayerBranch";
|
|
8681
|
-
var DismissableLayerBranch2 = React41.forwardRef((props, forwardedRef) => {
|
|
8682
|
-
const context = React41.useContext(DismissableLayerContext2);
|
|
8683
|
-
const ref = React41.useRef(null);
|
|
8684
|
-
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
8685
|
-
React41.useEffect(() => {
|
|
8686
|
-
const node = ref.current;
|
|
8687
|
-
if (node) {
|
|
8688
|
-
context.branches.add(node);
|
|
8689
|
-
return () => {
|
|
8690
|
-
context.branches.delete(node);
|
|
8691
|
-
};
|
|
8692
|
-
}
|
|
8693
|
-
}, [context.branches]);
|
|
8694
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Primitive2.div, { ...props, ref: composedRefs });
|
|
8695
|
-
});
|
|
8696
|
-
DismissableLayerBranch2.displayName = BRANCH_NAME2;
|
|
8697
|
-
function usePointerDownOutside2(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
8698
|
-
const handlePointerDownOutside = useCallbackRef3(onPointerDownOutside);
|
|
8699
|
-
const isPointerInsideReactTreeRef = React41.useRef(false);
|
|
8700
|
-
const handleClickRef = React41.useRef(() => {
|
|
8701
|
-
});
|
|
8702
|
-
React41.useEffect(() => {
|
|
8703
|
-
const handlePointerDown = (event) => {
|
|
8704
|
-
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
8705
|
-
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
8706
|
-
handleAndDispatchCustomEvent2(
|
|
8707
|
-
POINTER_DOWN_OUTSIDE2,
|
|
8708
|
-
handlePointerDownOutside,
|
|
8709
|
-
eventDetail,
|
|
8710
|
-
{ discrete: true }
|
|
8711
|
-
);
|
|
8712
|
-
};
|
|
8713
|
-
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
|
8714
|
-
const eventDetail = { originalEvent: event };
|
|
8715
|
-
if (event.pointerType === "touch") {
|
|
8716
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
8717
|
-
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
8718
|
-
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
8719
|
-
} else {
|
|
8720
|
-
handleAndDispatchPointerDownOutsideEvent2();
|
|
8721
|
-
}
|
|
8722
|
-
} else {
|
|
8723
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
8724
|
-
}
|
|
8725
|
-
isPointerInsideReactTreeRef.current = false;
|
|
8726
|
-
};
|
|
8727
|
-
const timerId = window.setTimeout(() => {
|
|
8728
|
-
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
8729
|
-
}, 0);
|
|
8730
|
-
return () => {
|
|
8731
|
-
window.clearTimeout(timerId);
|
|
8732
|
-
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
8733
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
8734
|
-
};
|
|
8735
|
-
}, [ownerDocument, handlePointerDownOutside]);
|
|
8736
|
-
return {
|
|
8737
|
-
// ensures we check React component tree (not just DOM tree)
|
|
8738
|
-
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
8739
|
-
};
|
|
8740
|
-
}
|
|
8741
|
-
function useFocusOutside2(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
8742
|
-
const handleFocusOutside = useCallbackRef3(onFocusOutside);
|
|
8743
|
-
const isFocusInsideReactTreeRef = React41.useRef(false);
|
|
8744
|
-
React41.useEffect(() => {
|
|
8745
|
-
const handleFocus = (event) => {
|
|
8746
|
-
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
8747
|
-
const eventDetail = { originalEvent: event };
|
|
8748
|
-
handleAndDispatchCustomEvent2(FOCUS_OUTSIDE2, handleFocusOutside, eventDetail, {
|
|
8749
|
-
discrete: false
|
|
8750
|
-
});
|
|
8751
|
-
}
|
|
8752
|
-
};
|
|
8753
|
-
ownerDocument.addEventListener("focusin", handleFocus);
|
|
8754
|
-
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
8755
|
-
}, [ownerDocument, handleFocusOutside]);
|
|
8756
|
-
return {
|
|
8757
|
-
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
8758
|
-
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
8759
|
-
};
|
|
8760
|
-
}
|
|
8761
|
-
function dispatchUpdate2() {
|
|
8762
|
-
const event = new CustomEvent(CONTEXT_UPDATE2);
|
|
8763
|
-
document.dispatchEvent(event);
|
|
8764
|
-
}
|
|
8765
|
-
function handleAndDispatchCustomEvent2(name, handler, detail, { discrete }) {
|
|
8766
|
-
const target = detail.originalEvent.target;
|
|
8767
|
-
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
|
8768
|
-
if (handler) target.addEventListener(name, handler, { once: true });
|
|
8769
|
-
if (discrete) {
|
|
8770
|
-
dispatchDiscreteCustomEvent2(target, event);
|
|
8771
|
-
} else {
|
|
8772
|
-
target.dispatchEvent(event);
|
|
8773
|
-
}
|
|
8774
|
-
}
|
|
8775
|
-
|
|
8776
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
8777
|
-
var React42 = __toESM(require("react"), 1);
|
|
8778
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
8779
|
-
var AUTOFOCUS_ON_MOUNT2 = "focusScope.autoFocusOnMount";
|
|
8780
|
-
var AUTOFOCUS_ON_UNMOUNT2 = "focusScope.autoFocusOnUnmount";
|
|
8781
|
-
var EVENT_OPTIONS3 = { bubbles: false, cancelable: true };
|
|
8782
|
-
var FOCUS_SCOPE_NAME2 = "FocusScope";
|
|
8783
|
-
var FocusScope2 = React42.forwardRef((props, forwardedRef) => {
|
|
8784
|
-
const {
|
|
8785
|
-
loop = false,
|
|
8786
|
-
trapped = false,
|
|
8787
|
-
onMountAutoFocus: onMountAutoFocusProp,
|
|
8788
|
-
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
8789
|
-
...scopeProps
|
|
8790
|
-
} = props;
|
|
8791
|
-
const [container, setContainer] = React42.useState(null);
|
|
8792
|
-
const onMountAutoFocus = useCallbackRef3(onMountAutoFocusProp);
|
|
8793
|
-
const onUnmountAutoFocus = useCallbackRef3(onUnmountAutoFocusProp);
|
|
8794
|
-
const lastFocusedElementRef = React42.useRef(null);
|
|
8795
|
-
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContainer(node));
|
|
8796
|
-
const focusScope = React42.useRef({
|
|
8797
|
-
paused: false,
|
|
8798
|
-
pause() {
|
|
8799
|
-
this.paused = true;
|
|
8800
|
-
},
|
|
8801
|
-
resume() {
|
|
8802
|
-
this.paused = false;
|
|
8803
|
-
}
|
|
8804
|
-
}).current;
|
|
8805
|
-
React42.useEffect(() => {
|
|
8806
|
-
if (trapped) {
|
|
8807
|
-
let handleFocusIn2 = function(event) {
|
|
8808
|
-
if (focusScope.paused || !container) return;
|
|
8809
|
-
const target = event.target;
|
|
8810
|
-
if (container.contains(target)) {
|
|
8811
|
-
lastFocusedElementRef.current = target;
|
|
8812
|
-
} else {
|
|
8813
|
-
focus2(lastFocusedElementRef.current, { select: true });
|
|
8814
|
-
}
|
|
8815
|
-
}, handleFocusOut2 = function(event) {
|
|
8816
|
-
if (focusScope.paused || !container) return;
|
|
8817
|
-
const relatedTarget = event.relatedTarget;
|
|
8818
|
-
if (relatedTarget === null) return;
|
|
8819
|
-
if (!container.contains(relatedTarget)) {
|
|
8820
|
-
focus2(lastFocusedElementRef.current, { select: true });
|
|
8821
|
-
}
|
|
8822
|
-
}, handleMutations2 = function(mutations) {
|
|
8823
|
-
const focusedElement = document.activeElement;
|
|
8824
|
-
if (focusedElement !== document.body) return;
|
|
8825
|
-
for (const mutation of mutations) {
|
|
8826
|
-
if (mutation.removedNodes.length > 0) focus2(container);
|
|
8827
|
-
}
|
|
8828
|
-
};
|
|
8829
|
-
var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
|
|
8830
|
-
document.addEventListener("focusin", handleFocusIn2);
|
|
8831
|
-
document.addEventListener("focusout", handleFocusOut2);
|
|
8832
|
-
const mutationObserver = new MutationObserver(handleMutations2);
|
|
8833
|
-
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
8834
|
-
return () => {
|
|
8835
|
-
document.removeEventListener("focusin", handleFocusIn2);
|
|
8836
|
-
document.removeEventListener("focusout", handleFocusOut2);
|
|
8837
|
-
mutationObserver.disconnect();
|
|
8838
|
-
};
|
|
8839
|
-
}
|
|
8840
|
-
}, [trapped, container, focusScope.paused]);
|
|
8841
|
-
React42.useEffect(() => {
|
|
8842
|
-
if (container) {
|
|
8843
|
-
focusScopesStack2.add(focusScope);
|
|
8844
|
-
const previouslyFocusedElement = document.activeElement;
|
|
8845
|
-
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
8846
|
-
if (!hasFocusedCandidate) {
|
|
8847
|
-
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT2, EVENT_OPTIONS3);
|
|
8848
|
-
container.addEventListener(AUTOFOCUS_ON_MOUNT2, onMountAutoFocus);
|
|
8849
|
-
container.dispatchEvent(mountEvent);
|
|
8850
|
-
if (!mountEvent.defaultPrevented) {
|
|
8851
|
-
focusFirst4(removeLinks2(getTabbableCandidates2(container)), { select: true });
|
|
8852
|
-
if (document.activeElement === previouslyFocusedElement) {
|
|
8853
|
-
focus2(container);
|
|
8854
|
-
}
|
|
8855
|
-
}
|
|
8856
|
-
}
|
|
8857
|
-
return () => {
|
|
8858
|
-
container.removeEventListener(AUTOFOCUS_ON_MOUNT2, onMountAutoFocus);
|
|
8859
|
-
setTimeout(() => {
|
|
8860
|
-
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT2, EVENT_OPTIONS3);
|
|
8861
|
-
container.addEventListener(AUTOFOCUS_ON_UNMOUNT2, onUnmountAutoFocus);
|
|
8862
|
-
container.dispatchEvent(unmountEvent);
|
|
8863
|
-
if (!unmountEvent.defaultPrevented) {
|
|
8864
|
-
focus2(previouslyFocusedElement ?? document.body, { select: true });
|
|
8865
|
-
}
|
|
8866
|
-
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT2, onUnmountAutoFocus);
|
|
8867
|
-
focusScopesStack2.remove(focusScope);
|
|
8868
|
-
}, 0);
|
|
8869
|
-
};
|
|
8870
|
-
}
|
|
8871
|
-
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
8872
|
-
const handleKeyDown = React42.useCallback(
|
|
8873
|
-
(event) => {
|
|
8874
|
-
if (!loop && !trapped) return;
|
|
8875
|
-
if (focusScope.paused) return;
|
|
8876
|
-
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
8877
|
-
const focusedElement = document.activeElement;
|
|
8878
|
-
if (isTabKey && focusedElement) {
|
|
8879
|
-
const container2 = event.currentTarget;
|
|
8880
|
-
const [first, last] = getTabbableEdges2(container2);
|
|
8881
|
-
const hasTabbableElementsInside = first && last;
|
|
8882
|
-
if (!hasTabbableElementsInside) {
|
|
8883
|
-
if (focusedElement === container2) event.preventDefault();
|
|
8884
|
-
} else {
|
|
8885
|
-
if (!event.shiftKey && focusedElement === last) {
|
|
8886
|
-
event.preventDefault();
|
|
8887
|
-
if (loop) focus2(first, { select: true });
|
|
8888
|
-
} else if (event.shiftKey && focusedElement === first) {
|
|
8889
|
-
event.preventDefault();
|
|
8890
|
-
if (loop) focus2(last, { select: true });
|
|
8891
|
-
}
|
|
8892
|
-
}
|
|
8893
|
-
}
|
|
8894
|
-
},
|
|
8895
|
-
[loop, trapped, focusScope.paused]
|
|
8896
|
-
);
|
|
8897
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Primitive2.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
8898
|
-
});
|
|
8899
|
-
FocusScope2.displayName = FOCUS_SCOPE_NAME2;
|
|
8900
|
-
function focusFirst4(candidates, { select = false } = {}) {
|
|
8901
|
-
const previouslyFocusedElement = document.activeElement;
|
|
8902
|
-
for (const candidate of candidates) {
|
|
8903
|
-
focus2(candidate, { select });
|
|
8904
|
-
if (document.activeElement !== previouslyFocusedElement) return;
|
|
8905
|
-
}
|
|
8906
|
-
}
|
|
8907
|
-
function getTabbableEdges2(container) {
|
|
8908
|
-
const candidates = getTabbableCandidates2(container);
|
|
8909
|
-
const first = findVisible2(candidates, container);
|
|
8910
|
-
const last = findVisible2(candidates.reverse(), container);
|
|
8911
|
-
return [first, last];
|
|
8912
|
-
}
|
|
8913
|
-
function getTabbableCandidates2(container) {
|
|
8914
|
-
const nodes = [];
|
|
8915
|
-
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
8916
|
-
acceptNode: (node) => {
|
|
8917
|
-
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
8918
|
-
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
8919
|
-
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
8920
|
-
}
|
|
8921
|
-
});
|
|
8922
|
-
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
8923
|
-
return nodes;
|
|
8924
|
-
}
|
|
8925
|
-
function findVisible2(elements, container) {
|
|
8926
|
-
for (const element of elements) {
|
|
8927
|
-
if (!isHidden2(element, { upTo: container })) return element;
|
|
8928
|
-
}
|
|
8929
|
-
}
|
|
8930
|
-
function isHidden2(node, { upTo }) {
|
|
8931
|
-
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
8932
|
-
while (node) {
|
|
8933
|
-
if (upTo !== void 0 && node === upTo) return false;
|
|
8934
|
-
if (getComputedStyle(node).display === "none") return true;
|
|
8935
|
-
node = node.parentElement;
|
|
8936
|
-
}
|
|
8937
|
-
return false;
|
|
8938
|
-
}
|
|
8939
|
-
function isSelectableInput2(element) {
|
|
8940
|
-
return element instanceof HTMLInputElement && "select" in element;
|
|
8941
|
-
}
|
|
8942
|
-
function focus2(element, { select = false } = {}) {
|
|
8943
|
-
if (element && element.focus) {
|
|
8944
|
-
const previouslyFocusedElement = document.activeElement;
|
|
8945
|
-
element.focus({ preventScroll: true });
|
|
8946
|
-
if (element !== previouslyFocusedElement && isSelectableInput2(element) && select)
|
|
8947
|
-
element.select();
|
|
8948
|
-
}
|
|
8949
|
-
}
|
|
8950
|
-
var focusScopesStack2 = createFocusScopesStack2();
|
|
8951
|
-
function createFocusScopesStack2() {
|
|
8952
|
-
let stack = [];
|
|
8953
|
-
return {
|
|
8954
|
-
add(focusScope) {
|
|
8955
|
-
const activeFocusScope = stack[0];
|
|
8956
|
-
if (focusScope !== activeFocusScope) {
|
|
8957
|
-
activeFocusScope?.pause();
|
|
8958
|
-
}
|
|
8959
|
-
stack = arrayRemove2(stack, focusScope);
|
|
8960
|
-
stack.unshift(focusScope);
|
|
8961
|
-
},
|
|
8962
|
-
remove(focusScope) {
|
|
8963
|
-
stack = arrayRemove2(stack, focusScope);
|
|
8964
|
-
stack[0]?.resume();
|
|
8965
|
-
}
|
|
8966
|
-
};
|
|
8967
|
-
}
|
|
8968
|
-
function arrayRemove2(array, item) {
|
|
8969
|
-
const updatedArray = [...array];
|
|
8970
|
-
const index2 = updatedArray.indexOf(item);
|
|
8971
|
-
if (index2 !== -1) {
|
|
8972
|
-
updatedArray.splice(index2, 1);
|
|
8973
|
-
}
|
|
8974
|
-
return updatedArray;
|
|
8975
|
-
}
|
|
8976
|
-
function removeLinks2(items) {
|
|
8977
|
-
return items.filter((item) => item.tagName !== "A");
|
|
8978
|
-
}
|
|
8979
|
-
|
|
8980
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
8981
|
-
var React43 = __toESM(require("react"), 1);
|
|
8982
|
-
var import_react_dom3 = __toESM(require("react-dom"), 1);
|
|
8983
|
-
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
8984
|
-
var PORTAL_NAME4 = "Portal";
|
|
8985
|
-
var Portal3 = React43.forwardRef((props, forwardedRef) => {
|
|
8986
|
-
const { container: containerProp, ...portalProps } = props;
|
|
8987
|
-
const [mounted, setMounted] = React43.useState(false);
|
|
8988
|
-
useLayoutEffect22(() => setMounted(true), []);
|
|
8989
|
-
const container = containerProp || mounted && globalThis?.document?.body;
|
|
8990
|
-
return container ? import_react_dom3.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Primitive2.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
8991
|
-
});
|
|
8992
|
-
Portal3.displayName = PORTAL_NAME4;
|
|
8993
|
-
|
|
8994
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
8995
|
-
var React211 = __toESM(require("react"), 1);
|
|
8996
|
-
var React44 = __toESM(require("react"), 1);
|
|
8997
|
-
function useStateMachine2(initialState, machine) {
|
|
8998
|
-
return React44.useReducer((state, event) => {
|
|
8999
|
-
const nextState = machine[state][event];
|
|
9000
|
-
return nextState ?? state;
|
|
9001
|
-
}, initialState);
|
|
9002
|
-
}
|
|
9003
|
-
var Presence2 = (props) => {
|
|
9004
|
-
const { present, children } = props;
|
|
9005
|
-
const presence = usePresence2(present);
|
|
9006
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React211.Children.only(children);
|
|
9007
|
-
const ref = useComposedRefs2(presence.ref, getElementRef2(child));
|
|
9008
|
-
const forceMount = typeof children === "function";
|
|
9009
|
-
return forceMount || presence.isPresent ? React211.cloneElement(child, { ref }) : null;
|
|
9010
|
-
};
|
|
9011
|
-
Presence2.displayName = "Presence";
|
|
9012
|
-
function usePresence2(present) {
|
|
9013
|
-
const [node, setNode] = React211.useState();
|
|
9014
|
-
const stylesRef = React211.useRef(null);
|
|
9015
|
-
const prevPresentRef = React211.useRef(present);
|
|
9016
|
-
const prevAnimationNameRef = React211.useRef("none");
|
|
9017
|
-
const initialState = present ? "mounted" : "unmounted";
|
|
9018
|
-
const [state, send] = useStateMachine2(initialState, {
|
|
9019
|
-
mounted: {
|
|
9020
|
-
UNMOUNT: "unmounted",
|
|
9021
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
9022
|
-
},
|
|
9023
|
-
unmountSuspended: {
|
|
9024
|
-
MOUNT: "mounted",
|
|
9025
|
-
ANIMATION_END: "unmounted"
|
|
9026
|
-
},
|
|
9027
|
-
unmounted: {
|
|
9028
|
-
MOUNT: "mounted"
|
|
9029
|
-
}
|
|
9030
|
-
});
|
|
9031
|
-
React211.useEffect(() => {
|
|
9032
|
-
const currentAnimationName = getAnimationName2(stylesRef.current);
|
|
9033
|
-
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
9034
|
-
}, [state]);
|
|
9035
|
-
useLayoutEffect22(() => {
|
|
9036
|
-
const styles = stylesRef.current;
|
|
9037
|
-
const wasPresent = prevPresentRef.current;
|
|
9038
|
-
const hasPresentChanged = wasPresent !== present;
|
|
9039
|
-
if (hasPresentChanged) {
|
|
9040
|
-
const prevAnimationName = prevAnimationNameRef.current;
|
|
9041
|
-
const currentAnimationName = getAnimationName2(styles);
|
|
9042
|
-
if (present) {
|
|
9043
|
-
send("MOUNT");
|
|
9044
|
-
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
9045
|
-
send("UNMOUNT");
|
|
9046
|
-
} else {
|
|
9047
|
-
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
9048
|
-
if (wasPresent && isAnimating) {
|
|
9049
|
-
send("ANIMATION_OUT");
|
|
9050
|
-
} else {
|
|
9051
|
-
send("UNMOUNT");
|
|
9052
|
-
}
|
|
9053
|
-
}
|
|
9054
|
-
prevPresentRef.current = present;
|
|
9055
|
-
}
|
|
9056
|
-
}, [present, send]);
|
|
9057
|
-
useLayoutEffect22(() => {
|
|
9058
|
-
if (node) {
|
|
9059
|
-
let timeoutId;
|
|
9060
|
-
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
9061
|
-
const handleAnimationEnd = (event) => {
|
|
9062
|
-
const currentAnimationName = getAnimationName2(stylesRef.current);
|
|
9063
|
-
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
9064
|
-
if (event.target === node && isCurrentAnimation) {
|
|
9065
|
-
send("ANIMATION_END");
|
|
9066
|
-
if (!prevPresentRef.current) {
|
|
9067
|
-
const currentFillMode = node.style.animationFillMode;
|
|
9068
|
-
node.style.animationFillMode = "forwards";
|
|
9069
|
-
timeoutId = ownerWindow.setTimeout(() => {
|
|
9070
|
-
if (node.style.animationFillMode === "forwards") {
|
|
9071
|
-
node.style.animationFillMode = currentFillMode;
|
|
9072
|
-
}
|
|
9073
|
-
});
|
|
9074
|
-
}
|
|
9075
|
-
}
|
|
9076
|
-
};
|
|
9077
|
-
const handleAnimationStart = (event) => {
|
|
9078
|
-
if (event.target === node) {
|
|
9079
|
-
prevAnimationNameRef.current = getAnimationName2(stylesRef.current);
|
|
9080
|
-
}
|
|
9081
|
-
};
|
|
9082
|
-
node.addEventListener("animationstart", handleAnimationStart);
|
|
9083
|
-
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
9084
|
-
node.addEventListener("animationend", handleAnimationEnd);
|
|
9085
|
-
return () => {
|
|
9086
|
-
ownerWindow.clearTimeout(timeoutId);
|
|
9087
|
-
node.removeEventListener("animationstart", handleAnimationStart);
|
|
9088
|
-
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
9089
|
-
node.removeEventListener("animationend", handleAnimationEnd);
|
|
9090
|
-
};
|
|
9091
|
-
} else {
|
|
9092
|
-
send("ANIMATION_END");
|
|
9093
|
-
}
|
|
9094
|
-
}, [node, send]);
|
|
9095
|
-
return {
|
|
9096
|
-
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
9097
|
-
ref: React211.useCallback((node2) => {
|
|
9098
|
-
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
9099
|
-
setNode(node2);
|
|
9100
|
-
}, [])
|
|
9101
|
-
};
|
|
9102
|
-
}
|
|
9103
|
-
function getAnimationName2(styles) {
|
|
9104
|
-
return styles?.animationName || "none";
|
|
9105
|
-
}
|
|
9106
|
-
function getElementRef2(element) {
|
|
9107
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
9108
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
9109
|
-
if (mayWarn) {
|
|
9110
|
-
return element.ref;
|
|
9111
|
-
}
|
|
9112
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
9113
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
9114
|
-
if (mayWarn) {
|
|
9115
|
-
return element.props.ref;
|
|
9116
|
-
}
|
|
9117
|
-
return element.props.ref || element.ref;
|
|
9118
|
-
}
|
|
9119
|
-
|
|
9120
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
9121
|
-
var React45 = __toESM(require("react"), 1);
|
|
9122
|
-
var count4 = 0;
|
|
9123
|
-
function useFocusGuards2() {
|
|
9124
|
-
React45.useEffect(() => {
|
|
9125
|
-
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
9126
|
-
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard2());
|
|
9127
|
-
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard2());
|
|
9128
|
-
count4++;
|
|
9129
|
-
return () => {
|
|
9130
|
-
if (count4 === 1) {
|
|
9131
|
-
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
9132
|
-
}
|
|
9133
|
-
count4--;
|
|
9134
|
-
};
|
|
9135
|
-
}, []);
|
|
9136
|
-
}
|
|
9137
|
-
function createFocusGuard2() {
|
|
9138
|
-
const element = document.createElement("span");
|
|
9139
|
-
element.setAttribute("data-radix-focus-guard", "");
|
|
9140
|
-
element.tabIndex = 0;
|
|
9141
|
-
element.style.outline = "none";
|
|
9142
|
-
element.style.opacity = "0";
|
|
9143
|
-
element.style.position = "fixed";
|
|
9144
|
-
element.style.pointerEvents = "none";
|
|
9145
|
-
return element;
|
|
9146
|
-
}
|
|
9147
|
-
|
|
9148
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
9149
|
-
var React48 = __toESM(require("react"));
|
|
9150
|
-
|
|
9151
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
9152
|
-
var React46 = __toESM(require("react"));
|
|
9153
|
-
|
|
9154
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
9155
|
-
var effectCar2 = createSidecarMedium();
|
|
9156
|
-
|
|
9157
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
9158
|
-
var nothing2 = function() {
|
|
9159
|
-
return;
|
|
9160
|
-
};
|
|
9161
|
-
var RemoveScroll2 = React46.forwardRef(function(props, parentRef) {
|
|
9162
|
-
var ref = React46.useRef(null);
|
|
9163
|
-
var _a = React46.useState({
|
|
9164
|
-
onScrollCapture: nothing2,
|
|
9165
|
-
onWheelCapture: nothing2,
|
|
9166
|
-
onTouchMoveCapture: nothing2
|
|
9167
|
-
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
9168
|
-
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
9169
|
-
var SideCar2 = sideCar;
|
|
9170
|
-
var containerRef = useMergeRefs([ref, parentRef]);
|
|
9171
|
-
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
9172
|
-
return React46.createElement(
|
|
9173
|
-
React46.Fragment,
|
|
9174
|
-
null,
|
|
9175
|
-
enabled && React46.createElement(SideCar2, { sideCar: effectCar2, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
9176
|
-
forwardProps ? React46.cloneElement(React46.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React46.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
9177
|
-
);
|
|
9178
|
-
});
|
|
9179
|
-
RemoveScroll2.defaultProps = {
|
|
9180
|
-
enabled: true,
|
|
9181
|
-
removeScrollBar: true,
|
|
9182
|
-
inert: false
|
|
9183
|
-
};
|
|
9184
|
-
RemoveScroll2.classNames = {
|
|
9185
|
-
fullWidth: fullWidthClassName,
|
|
9186
|
-
zeroRight: zeroRightClassName
|
|
9187
|
-
};
|
|
9188
|
-
|
|
9189
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
9190
|
-
var React47 = __toESM(require("react"));
|
|
9191
|
-
|
|
9192
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
9193
|
-
var passiveSupported2 = false;
|
|
9194
|
-
if (typeof window !== "undefined") {
|
|
9195
|
-
try {
|
|
9196
|
-
options = Object.defineProperty({}, "passive", {
|
|
9197
|
-
get: function() {
|
|
9198
|
-
passiveSupported2 = true;
|
|
9199
|
-
return true;
|
|
9200
|
-
}
|
|
9201
|
-
});
|
|
9202
|
-
window.addEventListener("test", options, options);
|
|
9203
|
-
window.removeEventListener("test", options, options);
|
|
9204
|
-
} catch (err) {
|
|
9205
|
-
passiveSupported2 = false;
|
|
9206
|
-
}
|
|
9207
|
-
}
|
|
9208
|
-
var options;
|
|
9209
|
-
var nonPassive2 = passiveSupported2 ? { passive: false } : false;
|
|
9210
|
-
|
|
9211
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
|
9212
|
-
var alwaysContainsScroll2 = function(node) {
|
|
9213
|
-
return node.tagName === "TEXTAREA";
|
|
9214
|
-
};
|
|
9215
|
-
var elementCanBeScrolled2 = function(node, overflow) {
|
|
9216
|
-
if (!(node instanceof Element)) {
|
|
9217
|
-
return false;
|
|
9218
|
-
}
|
|
9219
|
-
var styles = window.getComputedStyle(node);
|
|
9220
|
-
return (
|
|
9221
|
-
// not-not-scrollable
|
|
9222
|
-
styles[overflow] !== "hidden" && // contains scroll inside self
|
|
9223
|
-
!(styles.overflowY === styles.overflowX && !alwaysContainsScroll2(node) && styles[overflow] === "visible")
|
|
9224
|
-
);
|
|
9225
|
-
};
|
|
9226
|
-
var elementCouldBeVScrolled2 = function(node) {
|
|
9227
|
-
return elementCanBeScrolled2(node, "overflowY");
|
|
9228
|
-
};
|
|
9229
|
-
var elementCouldBeHScrolled2 = function(node) {
|
|
9230
|
-
return elementCanBeScrolled2(node, "overflowX");
|
|
9231
|
-
};
|
|
9232
|
-
var locationCouldBeScrolled2 = function(axis, node) {
|
|
9233
|
-
var ownerDocument = node.ownerDocument;
|
|
9234
|
-
var current = node;
|
|
9235
|
-
do {
|
|
9236
|
-
if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
|
|
9237
|
-
current = current.host;
|
|
9238
|
-
}
|
|
9239
|
-
var isScrollable = elementCouldBeScrolled2(axis, current);
|
|
9240
|
-
if (isScrollable) {
|
|
9241
|
-
var _a = getScrollVariables2(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
|
|
9242
|
-
if (scrollHeight > clientHeight) {
|
|
9243
|
-
return true;
|
|
9244
|
-
}
|
|
9245
|
-
}
|
|
9246
|
-
current = current.parentNode;
|
|
9247
|
-
} while (current && current !== ownerDocument.body);
|
|
9248
|
-
return false;
|
|
9249
|
-
};
|
|
9250
|
-
var getVScrollVariables2 = function(_a) {
|
|
9251
|
-
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
|
9252
|
-
return [
|
|
9253
|
-
scrollTop,
|
|
9254
|
-
scrollHeight,
|
|
9255
|
-
clientHeight
|
|
9256
|
-
];
|
|
9257
|
-
};
|
|
9258
|
-
var getHScrollVariables2 = function(_a) {
|
|
9259
|
-
var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
|
|
9260
|
-
return [
|
|
9261
|
-
scrollLeft,
|
|
9262
|
-
scrollWidth,
|
|
9263
|
-
clientWidth
|
|
9264
|
-
];
|
|
9265
|
-
};
|
|
9266
|
-
var elementCouldBeScrolled2 = function(axis, node) {
|
|
9267
|
-
return axis === "v" ? elementCouldBeVScrolled2(node) : elementCouldBeHScrolled2(node);
|
|
9268
|
-
};
|
|
9269
|
-
var getScrollVariables2 = function(axis, node) {
|
|
9270
|
-
return axis === "v" ? getVScrollVariables2(node) : getHScrollVariables2(node);
|
|
9271
|
-
};
|
|
9272
|
-
var getDirectionFactor2 = function(axis, direction) {
|
|
9273
|
-
return axis === "h" && direction === "rtl" ? -1 : 1;
|
|
9274
|
-
};
|
|
9275
|
-
var handleScroll2 = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
9276
|
-
var directionFactor = getDirectionFactor2(axis, window.getComputedStyle(endTarget).direction);
|
|
9277
|
-
var delta = directionFactor * sourceDelta;
|
|
9278
|
-
var target = event.target;
|
|
9279
|
-
var targetInLock = endTarget.contains(target);
|
|
9280
|
-
var shouldCancelScroll = false;
|
|
9281
|
-
var isDeltaPositive = delta > 0;
|
|
9282
|
-
var availableScroll = 0;
|
|
9283
|
-
var availableScrollTop = 0;
|
|
9284
|
-
do {
|
|
9285
|
-
var _a = getScrollVariables2(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
|
|
9286
|
-
var elementScroll = scroll_1 - capacity - directionFactor * position;
|
|
9287
|
-
if (position || elementScroll) {
|
|
9288
|
-
if (elementCouldBeScrolled2(axis, target)) {
|
|
9289
|
-
availableScroll += elementScroll;
|
|
9290
|
-
availableScrollTop += position;
|
|
9291
|
-
}
|
|
9292
|
-
}
|
|
9293
|
-
target = target.parentNode.host || target.parentNode;
|
|
9294
|
-
} while (
|
|
9295
|
-
// portaled content
|
|
9296
|
-
!targetInLock && target !== document.body || // self content
|
|
9297
|
-
targetInLock && (endTarget.contains(target) || endTarget === target)
|
|
9298
|
-
);
|
|
9299
|
-
if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
|
|
9300
|
-
shouldCancelScroll = true;
|
|
9301
|
-
} else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
|
|
9302
|
-
shouldCancelScroll = true;
|
|
9303
|
-
}
|
|
9304
|
-
return shouldCancelScroll;
|
|
9305
|
-
};
|
|
9306
|
-
|
|
9307
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
9308
|
-
var getTouchXY2 = function(event) {
|
|
9309
|
-
return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
9310
|
-
};
|
|
9311
|
-
var getDeltaXY2 = function(event) {
|
|
9312
|
-
return [event.deltaX, event.deltaY];
|
|
9313
|
-
};
|
|
9314
|
-
var extractRef2 = function(ref) {
|
|
9315
|
-
return ref && "current" in ref ? ref.current : ref;
|
|
9316
|
-
};
|
|
9317
|
-
var deltaCompare2 = function(x, y) {
|
|
9318
|
-
return x[0] === y[0] && x[1] === y[1];
|
|
9319
|
-
};
|
|
9320
|
-
var generateStyle2 = function(id) {
|
|
9321
|
-
return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
|
|
9322
|
-
};
|
|
9323
|
-
var idCounter2 = 0;
|
|
9324
|
-
var lockStack2 = [];
|
|
9325
|
-
function RemoveScrollSideCar2(props) {
|
|
9326
|
-
var shouldPreventQueue = React47.useRef([]);
|
|
9327
|
-
var touchStartRef = React47.useRef([0, 0]);
|
|
9328
|
-
var activeAxis = React47.useRef();
|
|
9329
|
-
var id = React47.useState(idCounter2++)[0];
|
|
9330
|
-
var Style2 = React47.useState(styleSingleton)[0];
|
|
9331
|
-
var lastProps = React47.useRef(props);
|
|
9332
|
-
React47.useEffect(function() {
|
|
9333
|
-
lastProps.current = props;
|
|
9334
|
-
}, [props]);
|
|
9335
|
-
React47.useEffect(function() {
|
|
9336
|
-
if (props.inert) {
|
|
9337
|
-
document.body.classList.add("block-interactivity-".concat(id));
|
|
9338
|
-
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef2), true).filter(Boolean);
|
|
9339
|
-
allow_1.forEach(function(el) {
|
|
9340
|
-
return el.classList.add("allow-interactivity-".concat(id));
|
|
9341
|
-
});
|
|
9342
|
-
return function() {
|
|
9343
|
-
document.body.classList.remove("block-interactivity-".concat(id));
|
|
9344
|
-
allow_1.forEach(function(el) {
|
|
9345
|
-
return el.classList.remove("allow-interactivity-".concat(id));
|
|
9346
|
-
});
|
|
9347
|
-
};
|
|
9348
|
-
}
|
|
9349
|
-
return;
|
|
9350
|
-
}, [props.inert, props.lockRef.current, props.shards]);
|
|
9351
|
-
var shouldCancelEvent = React47.useCallback(function(event, parent) {
|
|
9352
|
-
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
9353
|
-
return !lastProps.current.allowPinchZoom;
|
|
9354
|
-
}
|
|
9355
|
-
var touch = getTouchXY2(event);
|
|
9356
|
-
var touchStart = touchStartRef.current;
|
|
9357
|
-
var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
|
|
9358
|
-
var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
|
|
9359
|
-
var currentAxis;
|
|
9360
|
-
var target = event.target;
|
|
9361
|
-
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
|
|
9362
|
-
if ("touches" in event && moveDirection === "h" && target.type === "range") {
|
|
9363
|
-
return false;
|
|
9364
|
-
}
|
|
9365
|
-
var canBeScrolledInMainDirection = locationCouldBeScrolled2(moveDirection, target);
|
|
9366
|
-
if (!canBeScrolledInMainDirection) {
|
|
9367
|
-
return true;
|
|
9368
|
-
}
|
|
9369
|
-
if (canBeScrolledInMainDirection) {
|
|
9370
|
-
currentAxis = moveDirection;
|
|
9371
|
-
} else {
|
|
9372
|
-
currentAxis = moveDirection === "v" ? "h" : "v";
|
|
9373
|
-
canBeScrolledInMainDirection = locationCouldBeScrolled2(moveDirection, target);
|
|
9374
|
-
}
|
|
9375
|
-
if (!canBeScrolledInMainDirection) {
|
|
9376
|
-
return false;
|
|
9377
|
-
}
|
|
9378
|
-
if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
|
|
9379
|
-
activeAxis.current = currentAxis;
|
|
9380
|
-
}
|
|
9381
|
-
if (!currentAxis) {
|
|
9382
|
-
return true;
|
|
9383
|
-
}
|
|
9384
|
-
var cancelingAxis = activeAxis.current || currentAxis;
|
|
9385
|
-
return handleScroll2(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
9386
|
-
}, []);
|
|
9387
|
-
var shouldPrevent = React47.useCallback(function(_event) {
|
|
9388
|
-
var event = _event;
|
|
9389
|
-
if (!lockStack2.length || lockStack2[lockStack2.length - 1] !== Style2) {
|
|
9390
|
-
return;
|
|
9391
|
-
}
|
|
9392
|
-
var delta = "deltaY" in event ? getDeltaXY2(event) : getTouchXY2(event);
|
|
9393
|
-
var sourceEvent = shouldPreventQueue.current.filter(function(e) {
|
|
9394
|
-
return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare2(e.delta, delta);
|
|
9395
|
-
})[0];
|
|
9396
|
-
if (sourceEvent && sourceEvent.should) {
|
|
9397
|
-
if (event.cancelable) {
|
|
9398
|
-
event.preventDefault();
|
|
9399
|
-
}
|
|
9400
|
-
return;
|
|
9401
|
-
}
|
|
9402
|
-
if (!sourceEvent) {
|
|
9403
|
-
var shardNodes = (lastProps.current.shards || []).map(extractRef2).filter(Boolean).filter(function(node) {
|
|
9404
|
-
return node.contains(event.target);
|
|
9405
|
-
});
|
|
9406
|
-
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
|
|
9407
|
-
if (shouldStop) {
|
|
9408
|
-
if (event.cancelable) {
|
|
9409
|
-
event.preventDefault();
|
|
9410
|
-
}
|
|
9411
|
-
}
|
|
9412
|
-
}
|
|
9413
|
-
}, []);
|
|
9414
|
-
var shouldCancel = React47.useCallback(function(name, delta, target, should) {
|
|
9415
|
-
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent2(target) };
|
|
9416
|
-
shouldPreventQueue.current.push(event);
|
|
9417
|
-
setTimeout(function() {
|
|
9418
|
-
shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
|
|
9419
|
-
return e !== event;
|
|
9420
|
-
});
|
|
9421
|
-
}, 1);
|
|
9422
|
-
}, []);
|
|
9423
|
-
var scrollTouchStart = React47.useCallback(function(event) {
|
|
9424
|
-
touchStartRef.current = getTouchXY2(event);
|
|
9425
|
-
activeAxis.current = void 0;
|
|
9426
|
-
}, []);
|
|
9427
|
-
var scrollWheel = React47.useCallback(function(event) {
|
|
9428
|
-
shouldCancel(event.type, getDeltaXY2(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
9429
|
-
}, []);
|
|
9430
|
-
var scrollTouchMove = React47.useCallback(function(event) {
|
|
9431
|
-
shouldCancel(event.type, getTouchXY2(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
9432
|
-
}, []);
|
|
9433
|
-
React47.useEffect(function() {
|
|
9434
|
-
lockStack2.push(Style2);
|
|
9435
|
-
props.setCallbacks({
|
|
9436
|
-
onScrollCapture: scrollWheel,
|
|
9437
|
-
onWheelCapture: scrollWheel,
|
|
9438
|
-
onTouchMoveCapture: scrollTouchMove
|
|
9439
|
-
});
|
|
9440
|
-
document.addEventListener("wheel", shouldPrevent, nonPassive2);
|
|
9441
|
-
document.addEventListener("touchmove", shouldPrevent, nonPassive2);
|
|
9442
|
-
document.addEventListener("touchstart", scrollTouchStart, nonPassive2);
|
|
9443
|
-
return function() {
|
|
9444
|
-
lockStack2 = lockStack2.filter(function(inst) {
|
|
9445
|
-
return inst !== Style2;
|
|
9446
|
-
});
|
|
9447
|
-
document.removeEventListener("wheel", shouldPrevent, nonPassive2);
|
|
9448
|
-
document.removeEventListener("touchmove", shouldPrevent, nonPassive2);
|
|
9449
|
-
document.removeEventListener("touchstart", scrollTouchStart, nonPassive2);
|
|
9450
|
-
};
|
|
9451
|
-
}, []);
|
|
9452
|
-
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
9453
|
-
return React47.createElement(
|
|
9454
|
-
React47.Fragment,
|
|
9455
|
-
null,
|
|
9456
|
-
inert ? React47.createElement(Style2, { styles: generateStyle2(id) }) : null,
|
|
9457
|
-
removeScrollBar ? React47.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
9458
|
-
);
|
|
9459
|
-
}
|
|
9460
|
-
function getOutermostShadowParent2(node) {
|
|
9461
|
-
var shadowParent = null;
|
|
9462
|
-
while (node !== null) {
|
|
9463
|
-
if (node instanceof ShadowRoot) {
|
|
9464
|
-
shadowParent = node.host;
|
|
9465
|
-
node = node.host;
|
|
9466
|
-
}
|
|
9467
|
-
node = node.parentNode;
|
|
9468
|
-
}
|
|
9469
|
-
return shadowParent;
|
|
9470
|
-
}
|
|
9471
|
-
|
|
9472
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
9473
|
-
var sidecar_default2 = exportSidecar(effectCar2, RemoveScrollSideCar2);
|
|
9474
|
-
|
|
9475
|
-
// ../../node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
9476
|
-
var ReactRemoveScroll2 = React48.forwardRef(function(props, ref) {
|
|
9477
|
-
return React48.createElement(RemoveScroll2, __assign({}, props, { ref, sideCar: sidecar_default2 }));
|
|
9478
|
-
});
|
|
9479
|
-
ReactRemoveScroll2.classNames = RemoveScroll2.classNames;
|
|
9480
|
-
var Combination_default2 = ReactRemoveScroll2;
|
|
9481
|
-
|
|
9482
|
-
// ../../node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
9483
|
-
var import_react_slot6 = require("@radix-ui/react-slot");
|
|
9484
|
-
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
9485
|
-
var DIALOG_NAME = "Dialog";
|
|
9486
|
-
var [createDialogContext, createDialogScope] = createContextScope2(DIALOG_NAME);
|
|
9487
|
-
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
9488
|
-
var Dialog = (props) => {
|
|
9489
|
-
const {
|
|
9490
|
-
__scopeDialog,
|
|
9491
|
-
children,
|
|
9492
|
-
open: openProp,
|
|
9493
|
-
defaultOpen,
|
|
9494
|
-
onOpenChange,
|
|
9495
|
-
modal = true
|
|
9496
|
-
} = props;
|
|
9497
|
-
const triggerRef = React49.useRef(null);
|
|
9498
|
-
const contentRef = React49.useRef(null);
|
|
9499
|
-
const [open, setOpen] = useControllableState2({
|
|
9500
|
-
prop: openProp,
|
|
9501
|
-
defaultProp: defaultOpen ?? false,
|
|
9502
|
-
onChange: onOpenChange,
|
|
9503
|
-
caller: DIALOG_NAME
|
|
9504
|
-
});
|
|
9505
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
9506
|
-
DialogProvider,
|
|
9507
|
-
{
|
|
9508
|
-
scope: __scopeDialog,
|
|
9509
|
-
triggerRef,
|
|
9510
|
-
contentRef,
|
|
9511
|
-
contentId: useId2(),
|
|
9512
|
-
titleId: useId2(),
|
|
9513
|
-
descriptionId: useId2(),
|
|
9514
|
-
open,
|
|
9515
|
-
onOpenChange: setOpen,
|
|
9516
|
-
onOpenToggle: React49.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
9517
|
-
modal,
|
|
9518
|
-
children
|
|
8226
|
+
),
|
|
8227
|
+
...props,
|
|
8228
|
+
children: [
|
|
8229
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "cnc-flex cnc-items-center", children: onOpenMenu && !isOpen && hasSidebar ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8230
|
+
"button",
|
|
8231
|
+
{
|
|
8232
|
+
onClick: onOpenMenu,
|
|
8233
|
+
className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden cnc-cursor-pointer",
|
|
8234
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8235
|
+
"svg",
|
|
8236
|
+
{
|
|
8237
|
+
stroke: "currentColor",
|
|
8238
|
+
fill: "currentColor",
|
|
8239
|
+
strokeWidth: "0",
|
|
8240
|
+
viewBox: "0 0 512 512",
|
|
8241
|
+
className: "cnc-size-6 cnc-text-brand-blue-900 cnc-header-item",
|
|
8242
|
+
height: "1em",
|
|
8243
|
+
width: "1em",
|
|
8244
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8245
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8246
|
+
"path",
|
|
8247
|
+
{
|
|
8248
|
+
fill: "none",
|
|
8249
|
+
strokeLinecap: "round",
|
|
8250
|
+
strokeMiterlimit: "10",
|
|
8251
|
+
strokeWidth: "48",
|
|
8252
|
+
d: "M88 152h336M88 256h336M88 360h336"
|
|
8253
|
+
}
|
|
8254
|
+
)
|
|
8255
|
+
}
|
|
8256
|
+
)
|
|
8257
|
+
}
|
|
8258
|
+
) : !hasSidebar && renderLogo() }),
|
|
8259
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "cnc-flex", children })
|
|
8260
|
+
]
|
|
9519
8261
|
}
|
|
9520
8262
|
);
|
|
9521
8263
|
};
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
8264
|
+
var HeaderProfileHeader = ({
|
|
8265
|
+
user,
|
|
8266
|
+
children
|
|
8267
|
+
}) => {
|
|
8268
|
+
const { userName, entityName } = user;
|
|
8269
|
+
const initials = getInitials(userName);
|
|
8270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenu2, { modal: false, children: [
|
|
8271
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8272
|
+
"div",
|
|
9531
8273
|
{
|
|
9532
|
-
|
|
9533
|
-
"
|
|
9534
|
-
"
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
8274
|
+
id: "cnc-border-lateral",
|
|
8275
|
+
className: "cnc-border-solid cnc-border-l-2 cnc-border-brand-blue-60 cnc-header-item",
|
|
8276
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "cnc-flex cnc-flex-row cnc-gap-2 cnc-items-center cnc-justify-center hover:cnc-bg-gray-100 cnc-transition cnc-duration-300 cnc-ease-in-out cnc-cursor-pointer cnc-px-4 cnc-py-2 cnc-rounded-lg cnc-ml-8 cnc-header-item", children: [
|
|
8277
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "cnc-flex cnc-flex-col cnc-justify-end cnc-text-end", children: [
|
|
8278
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "cnc-text-xs cnc-font-extrabold cnc-text-brand-blue-900 cnc-header-item", children: entityName }),
|
|
8279
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "cnc-text-xs cnc-font-normal cnc-text-brand-gray-700 cnc-header-item/50", children: userName })
|
|
8280
|
+
] }),
|
|
8281
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "cnc-flex cnc-items-center cnc-justify-center cnc-w-10 cnc-h-10 cnc-rounded-full cnc-bg-brand-white cnc-text-brand-blue-900 cnc-text-sm cnc-font-normal cnc-border-solid cnc-border-2 cnc-header-item", children: initials }) })
|
|
8282
|
+
] })
|
|
9540
8283
|
}
|
|
9541
|
-
)
|
|
9542
|
-
|
|
9543
|
-
);
|
|
9544
|
-
DialogTrigger.displayName = TRIGGER_NAME2;
|
|
9545
|
-
var PORTAL_NAME5 = "DialogPortal";
|
|
9546
|
-
var [PortalProvider2, usePortalContext2] = createDialogContext(PORTAL_NAME5, {
|
|
9547
|
-
forceMount: void 0
|
|
9548
|
-
});
|
|
9549
|
-
var DialogPortal = (props) => {
|
|
9550
|
-
const { __scopeDialog, forceMount, children, container } = props;
|
|
9551
|
-
const context = useDialogContext(PORTAL_NAME5, __scopeDialog);
|
|
9552
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PortalProvider2, { scope: __scopeDialog, forceMount, children: React49.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Presence2, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Portal3, { asChild: true, container, children: child }) })) });
|
|
8284
|
+
) }),
|
|
8285
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuContent2, { children })
|
|
8286
|
+
] });
|
|
9553
8287
|
};
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
}
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
const { __scopeDialog, ...overlayProps } = props;
|
|
9569
|
-
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
9570
|
-
return (
|
|
9571
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
9572
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
9573
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Combination_default2, { as: Slot5, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
9574
|
-
Primitive2.div,
|
|
9575
|
-
{
|
|
9576
|
-
"data-state": getState(context.open),
|
|
9577
|
-
...overlayProps,
|
|
9578
|
-
ref: forwardedRef,
|
|
9579
|
-
style: { pointerEvents: "auto", ...overlayProps.style }
|
|
9580
|
-
}
|
|
9581
|
-
) })
|
|
9582
|
-
);
|
|
9583
|
-
}
|
|
9584
|
-
);
|
|
9585
|
-
var CONTENT_NAME4 = "DialogContent";
|
|
9586
|
-
var DialogContent = React49.forwardRef(
|
|
9587
|
-
(props, forwardedRef) => {
|
|
9588
|
-
const portalContext = usePortalContext2(CONTENT_NAME4, props.__scopeDialog);
|
|
9589
|
-
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
9590
|
-
const context = useDialogContext(CONTENT_NAME4, props.__scopeDialog);
|
|
9591
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Presence2, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
9592
|
-
}
|
|
9593
|
-
);
|
|
9594
|
-
DialogContent.displayName = CONTENT_NAME4;
|
|
9595
|
-
var DialogContentModal = React49.forwardRef(
|
|
9596
|
-
(props, forwardedRef) => {
|
|
9597
|
-
const context = useDialogContext(CONTENT_NAME4, props.__scopeDialog);
|
|
9598
|
-
const contentRef = React49.useRef(null);
|
|
9599
|
-
const composedRefs = useComposedRefs2(forwardedRef, context.contentRef, contentRef);
|
|
9600
|
-
React49.useEffect(() => {
|
|
9601
|
-
const content = contentRef.current;
|
|
9602
|
-
if (content) return hideOthers(content);
|
|
9603
|
-
}, []);
|
|
9604
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
9605
|
-
DialogContentImpl,
|
|
9606
|
-
{
|
|
9607
|
-
...props,
|
|
9608
|
-
ref: composedRefs,
|
|
9609
|
-
trapFocus: context.open,
|
|
9610
|
-
disableOutsidePointerEvents: true,
|
|
9611
|
-
onCloseAutoFocus: composeEventHandlers2(props.onCloseAutoFocus, (event) => {
|
|
9612
|
-
event.preventDefault();
|
|
9613
|
-
context.triggerRef.current?.focus();
|
|
9614
|
-
}),
|
|
9615
|
-
onPointerDownOutside: composeEventHandlers2(props.onPointerDownOutside, (event) => {
|
|
9616
|
-
const originalEvent = event.detail.originalEvent;
|
|
9617
|
-
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
9618
|
-
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
9619
|
-
if (isRightClick) event.preventDefault();
|
|
9620
|
-
}),
|
|
9621
|
-
onFocusOutside: composeEventHandlers2(
|
|
9622
|
-
props.onFocusOutside,
|
|
9623
|
-
(event) => event.preventDefault()
|
|
9624
|
-
)
|
|
9625
|
-
}
|
|
9626
|
-
);
|
|
9627
|
-
}
|
|
9628
|
-
);
|
|
9629
|
-
var DialogContentNonModal = React49.forwardRef(
|
|
9630
|
-
(props, forwardedRef) => {
|
|
9631
|
-
const context = useDialogContext(CONTENT_NAME4, props.__scopeDialog);
|
|
9632
|
-
const hasInteractedOutsideRef = React49.useRef(false);
|
|
9633
|
-
const hasPointerDownOutsideRef = React49.useRef(false);
|
|
9634
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
9635
|
-
DialogContentImpl,
|
|
8288
|
+
var HeaderProfileItem = ({
|
|
8289
|
+
onClick,
|
|
8290
|
+
icon,
|
|
8291
|
+
children
|
|
8292
|
+
}) => {
|
|
8293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuItem2, { onClick, children: [
|
|
8294
|
+
icon,
|
|
8295
|
+
children
|
|
8296
|
+
] });
|
|
8297
|
+
};
|
|
8298
|
+
var AplicationsHeader = ({ children }) => {
|
|
8299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenu2, { children: [
|
|
8300
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "cnc-flex cnc-flex-row cnc-gap-2 cnc-items-center cnc-justify-center hover:cnc-bg-gray-100 cnc-transition cnc-duration-300 cnc-ease-in-out cnc-cursor-pointer cnc-px-4 cnc-py-2 cnc-rounded-lg cnc-header-item", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8301
|
+
"svg",
|
|
9636
8302
|
{
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
}
|
|
9647
|
-
hasInteractedOutsideRef.current = false;
|
|
9648
|
-
hasPointerDownOutsideRef.current = false;
|
|
9649
|
-
},
|
|
9650
|
-
onInteractOutside: (event) => {
|
|
9651
|
-
props.onInteractOutside?.(event);
|
|
9652
|
-
if (!event.defaultPrevented) {
|
|
9653
|
-
hasInteractedOutsideRef.current = true;
|
|
9654
|
-
if (event.detail.originalEvent.type === "pointerdown") {
|
|
9655
|
-
hasPointerDownOutsideRef.current = true;
|
|
9656
|
-
}
|
|
9657
|
-
}
|
|
9658
|
-
const target = event.target;
|
|
9659
|
-
const targetIsTrigger = context.triggerRef.current?.contains(target);
|
|
9660
|
-
if (targetIsTrigger) event.preventDefault();
|
|
9661
|
-
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
9662
|
-
event.preventDefault();
|
|
8303
|
+
width: "18",
|
|
8304
|
+
height: "18",
|
|
8305
|
+
viewBox: "0 0 16 16",
|
|
8306
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8307
|
+
className: "cnc-header-item",
|
|
8308
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
8309
|
+
"path",
|
|
8310
|
+
{
|
|
8311
|
+
d: "M2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4ZM8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16ZM2 16C3.1 16 4 15.1 4 14C4 12.9 3.1 12 2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16ZM2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10ZM8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10ZM12 2C12 3.1 12.9 4 14 4C15.1 4 16 3.1 16 2C16 0.9 15.1 0 14 0C12.9 0 12 0.9 12 2ZM8 4C9.1 4 10 3.1 10 2C10 0.9 9.1 0 8 0C6.9 0 6 0.9 6 2C6 3.1 6.9 4 8 4ZM14 10C15.1 10 16 9.1 16 8C16 6.9 15.1 6 14 6C12.9 6 12 6.9 12 8C12 9.1 12.9 10 14 10ZM14 16C15.1 16 16 15.1 16 14C16 12.9 15.1 12 14 12C12.9 12 12 12.9 12 14C12 15.1 12.9 16 14 16Z"
|
|
9663
8312
|
}
|
|
9664
|
-
|
|
9665
|
-
}
|
|
9666
|
-
);
|
|
9667
|
-
}
|
|
9668
|
-
);
|
|
9669
|
-
var DialogContentImpl = React49.forwardRef(
|
|
9670
|
-
(props, forwardedRef) => {
|
|
9671
|
-
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
|
9672
|
-
const context = useDialogContext(CONTENT_NAME4, __scopeDialog);
|
|
9673
|
-
const contentRef = React49.useRef(null);
|
|
9674
|
-
const composedRefs = useComposedRefs2(forwardedRef, contentRef);
|
|
9675
|
-
useFocusGuards2();
|
|
9676
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
9677
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
9678
|
-
FocusScope2,
|
|
9679
|
-
{
|
|
9680
|
-
asChild: true,
|
|
9681
|
-
loop: true,
|
|
9682
|
-
trapped: trapFocus,
|
|
9683
|
-
onMountAutoFocus: onOpenAutoFocus,
|
|
9684
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
9685
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
9686
|
-
DismissableLayer2,
|
|
9687
|
-
{
|
|
9688
|
-
role: "dialog",
|
|
9689
|
-
id: context.contentId,
|
|
9690
|
-
"aria-describedby": context.descriptionId,
|
|
9691
|
-
"aria-labelledby": context.titleId,
|
|
9692
|
-
"data-state": getState(context.open),
|
|
9693
|
-
...contentProps,
|
|
9694
|
-
ref: composedRefs,
|
|
9695
|
-
onDismiss: () => context.onOpenChange(false)
|
|
9696
|
-
}
|
|
9697
|
-
)
|
|
9698
|
-
}
|
|
9699
|
-
),
|
|
9700
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
9701
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TitleWarning, { titleId: context.titleId }),
|
|
9702
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
9703
|
-
] })
|
|
9704
|
-
] });
|
|
9705
|
-
}
|
|
9706
|
-
);
|
|
9707
|
-
var TITLE_NAME = "DialogTitle";
|
|
9708
|
-
var DialogTitle = React49.forwardRef(
|
|
9709
|
-
(props, forwardedRef) => {
|
|
9710
|
-
const { __scopeDialog, ...titleProps } = props;
|
|
9711
|
-
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
9712
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Primitive2.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
9713
|
-
}
|
|
9714
|
-
);
|
|
9715
|
-
DialogTitle.displayName = TITLE_NAME;
|
|
9716
|
-
var DESCRIPTION_NAME = "DialogDescription";
|
|
9717
|
-
var DialogDescription = React49.forwardRef(
|
|
9718
|
-
(props, forwardedRef) => {
|
|
9719
|
-
const { __scopeDialog, ...descriptionProps } = props;
|
|
9720
|
-
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
9721
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Primitive2.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
9722
|
-
}
|
|
9723
|
-
);
|
|
9724
|
-
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
9725
|
-
var CLOSE_NAME = "DialogClose";
|
|
9726
|
-
var DialogClose = React49.forwardRef(
|
|
9727
|
-
(props, forwardedRef) => {
|
|
9728
|
-
const { __scopeDialog, ...closeProps } = props;
|
|
9729
|
-
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
9730
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
9731
|
-
Primitive2.button,
|
|
9732
|
-
{
|
|
9733
|
-
type: "button",
|
|
9734
|
-
...closeProps,
|
|
9735
|
-
ref: forwardedRef,
|
|
9736
|
-
onClick: composeEventHandlers2(props.onClick, () => context.onOpenChange(false))
|
|
8313
|
+
)
|
|
9737
8314
|
}
|
|
9738
|
-
)
|
|
9739
|
-
|
|
9740
|
-
);
|
|
9741
|
-
DialogClose.displayName = CLOSE_NAME;
|
|
9742
|
-
function getState(open) {
|
|
9743
|
-
return open ? "open" : "closed";
|
|
9744
|
-
}
|
|
9745
|
-
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
9746
|
-
var [WarningProvider, useWarningContext] = createContext22(TITLE_WARNING_NAME, {
|
|
9747
|
-
contentName: CONTENT_NAME4,
|
|
9748
|
-
titleName: TITLE_NAME,
|
|
9749
|
-
docsSlug: "dialog"
|
|
9750
|
-
});
|
|
9751
|
-
var TitleWarning = ({ titleId }) => {
|
|
9752
|
-
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
9753
|
-
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
9754
|
-
|
|
9755
|
-
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
9756
|
-
|
|
9757
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
9758
|
-
React49.useEffect(() => {
|
|
9759
|
-
if (titleId) {
|
|
9760
|
-
const hasTitle = document.getElementById(titleId);
|
|
9761
|
-
if (!hasTitle) console.error(MESSAGE);
|
|
9762
|
-
}
|
|
9763
|
-
}, [MESSAGE, titleId]);
|
|
9764
|
-
return null;
|
|
9765
|
-
};
|
|
9766
|
-
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
9767
|
-
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
9768
|
-
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
9769
|
-
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
9770
|
-
React49.useEffect(() => {
|
|
9771
|
-
const describedById = contentRef.current?.getAttribute("aria-describedby");
|
|
9772
|
-
if (descriptionId && describedById) {
|
|
9773
|
-
const hasDescription = document.getElementById(descriptionId);
|
|
9774
|
-
if (!hasDescription) console.warn(MESSAGE);
|
|
9775
|
-
}
|
|
9776
|
-
}, [MESSAGE, contentRef, descriptionId]);
|
|
9777
|
-
return null;
|
|
8315
|
+
) }) }),
|
|
8316
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuContent2, { className: "flex", children })
|
|
8317
|
+
] }) });
|
|
9778
8318
|
};
|
|
9779
|
-
var Root4 = Dialog;
|
|
9780
|
-
var Trigger2 = DialogTrigger;
|
|
9781
|
-
var Portal4 = DialogPortal;
|
|
9782
|
-
var Overlay = DialogOverlay;
|
|
9783
|
-
var Content3 = DialogContent;
|
|
9784
|
-
var Title = DialogTitle;
|
|
9785
|
-
var Description = DialogDescription;
|
|
9786
|
-
var Close = DialogClose;
|
|
9787
8319
|
|
|
9788
8320
|
// src/components/Dialog/index.tsx
|
|
9789
|
-
var
|
|
9790
|
-
var
|
|
9791
|
-
var
|
|
9792
|
-
var
|
|
9793
|
-
var
|
|
9794
|
-
var
|
|
9795
|
-
var
|
|
9796
|
-
|
|
8321
|
+
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
8322
|
+
var React33 = __toESM(require("react"));
|
|
8323
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
8324
|
+
var Dialog = DialogPrimitive.Root;
|
|
8325
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
8326
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
8327
|
+
var DialogClose = DialogPrimitive.Close;
|
|
8328
|
+
var DialogOverlay = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8329
|
+
DialogPrimitive.Overlay,
|
|
9797
8330
|
{
|
|
9798
8331
|
ref,
|
|
9799
8332
|
className: cn(
|
|
@@ -9803,11 +8336,11 @@ var DialogOverlay2 = React50.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
9803
8336
|
...props
|
|
9804
8337
|
}
|
|
9805
8338
|
));
|
|
9806
|
-
|
|
9807
|
-
var
|
|
9808
|
-
/* @__PURE__ */ (0,
|
|
9809
|
-
/* @__PURE__ */ (0,
|
|
9810
|
-
|
|
8339
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
8340
|
+
var DialogContent = React33.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DialogPortal, { children: [
|
|
8341
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DialogOverlay, {}),
|
|
8342
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8343
|
+
DialogPrimitive.Content,
|
|
9811
8344
|
{
|
|
9812
8345
|
ref,
|
|
9813
8346
|
className: cn(
|
|
@@ -9817,19 +8350,19 @@ var DialogContent2 = React50.forwardRef(({ className, children, ...props }, ref)
|
|
|
9817
8350
|
...props,
|
|
9818
8351
|
children: [
|
|
9819
8352
|
children,
|
|
9820
|
-
/* @__PURE__ */ (0,
|
|
9821
|
-
/* @__PURE__ */ (0,
|
|
9822
|
-
/* @__PURE__ */ (0,
|
|
8353
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DialogPrimitive.Close, { className: "cnc-absolute cnc-right-4 cnc-top-4 cnc-rounded-sm cnc-opacity-70 cnc-ring-offset-background cnc-transition-opacity hover:cnc-opacity-100 focus:cnc-outline-none focus:cnc-ring-2 focus:cnc-ring-ring focus:cnc-ring-offset-2 disabled:cnc-pointer-events-none data-[state=open]:cnc-bg-accent data-[state=open]:cnc-text-muted-foreground", children: [
|
|
8354
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(X, { className: "cnc-h-4 cnc-w-4" }),
|
|
8355
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "cnc-sr-only", children: "Close" })
|
|
9823
8356
|
] })
|
|
9824
8357
|
]
|
|
9825
8358
|
}
|
|
9826
8359
|
)
|
|
9827
8360
|
] }));
|
|
9828
|
-
|
|
8361
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
9829
8362
|
var DialogHeader = ({
|
|
9830
8363
|
className,
|
|
9831
8364
|
...props
|
|
9832
|
-
}) => /* @__PURE__ */ (0,
|
|
8365
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
9833
8366
|
"div",
|
|
9834
8367
|
{
|
|
9835
8368
|
className: cn(
|
|
@@ -9843,7 +8376,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
9843
8376
|
var DialogFooter = ({
|
|
9844
8377
|
className,
|
|
9845
8378
|
...props
|
|
9846
|
-
}) => /* @__PURE__ */ (0,
|
|
8379
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
9847
8380
|
"div",
|
|
9848
8381
|
{
|
|
9849
8382
|
className: cn(
|
|
@@ -9854,8 +8387,8 @@ var DialogFooter = ({
|
|
|
9854
8387
|
}
|
|
9855
8388
|
);
|
|
9856
8389
|
DialogFooter.displayName = "DialogFooter";
|
|
9857
|
-
var
|
|
9858
|
-
Title,
|
|
8390
|
+
var DialogTitle = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8391
|
+
DialogPrimitive.Title,
|
|
9859
8392
|
{
|
|
9860
8393
|
ref,
|
|
9861
8394
|
className: cn(
|
|
@@ -9865,53 +8398,56 @@ var DialogTitle2 = React50.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
9865
8398
|
...props
|
|
9866
8399
|
}
|
|
9867
8400
|
));
|
|
9868
|
-
|
|
9869
|
-
var
|
|
9870
|
-
Description,
|
|
8401
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
8402
|
+
var DialogDescription = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
8403
|
+
DialogPrimitive.Description,
|
|
9871
8404
|
{
|
|
9872
8405
|
ref,
|
|
9873
8406
|
className: cn("cnc-text-sm cnc-text-muted-foreground", className),
|
|
9874
8407
|
...props
|
|
9875
8408
|
}
|
|
9876
8409
|
));
|
|
9877
|
-
|
|
8410
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
9878
8411
|
|
|
9879
8412
|
// src/components/Modal/index.tsx
|
|
9880
|
-
var
|
|
8413
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
9881
8414
|
var Modal = ({
|
|
9882
8415
|
title,
|
|
9883
8416
|
content,
|
|
9884
8417
|
visibleModal,
|
|
9885
8418
|
onClose
|
|
9886
8419
|
}) => {
|
|
9887
|
-
return /* @__PURE__ */ (0,
|
|
9888
|
-
/* @__PURE__ */ (0,
|
|
9889
|
-
/* @__PURE__ */ (0,
|
|
9890
|
-
title && /* @__PURE__ */ (0,
|
|
9891
|
-
/* @__PURE__ */ (0,
|
|
8420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Dialog, { open: visibleModal, onOpenChange: onClose, children: [
|
|
8421
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogOverlay, { className: "cnc-inset-0 cnc-bg-blackA6= data-[state=open]:cnc-animate-overlayShow" }),
|
|
8422
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DialogContent, { className: "cnc-max-h-[100vh] cnc-p-0 cnc-rounded-sm cnc-bg-white cnc-focus:outline-none data-[state=open]:cnc-animate-contentShow", children: [
|
|
8423
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogHeader, { className: "cnc-text-sm cnc-h-14 cnc-text-black cnc-font- cnc-border-b cnc-w-full cnc-leading-10", children: title }),
|
|
8424
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "cnc-flex cnc-flex-col cnc-mb-16 cnc-mx-20 cnc-align-middle cnc-items-left cnc-justify-center", children: content })
|
|
9892
8425
|
] })
|
|
9893
8426
|
] });
|
|
9894
8427
|
};
|
|
9895
8428
|
|
|
9896
8429
|
// src/components/Modal/ModalMudancaEntidade/index.tsx
|
|
9897
|
-
var
|
|
9898
|
-
function ModalEntidade({
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
8430
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
8431
|
+
function ModalEntidade({
|
|
8432
|
+
isOpen,
|
|
8433
|
+
onOpenChange,
|
|
8434
|
+
title = "Selecionar a entidade",
|
|
8435
|
+
children,
|
|
8436
|
+
className
|
|
8437
|
+
}) {
|
|
8438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog, { open: isOpen, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(DialogContent, { className: "cnc-max-h-[100vh] cnc-p-0 cnc-rounded-sm cnc-bg-white cnc-focus:outline-none data-[state=open]:cnc-animate-contentShow", children: [
|
|
8439
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogTitle, { className: "cnc-font-normal cnc-text-base", children: title }) }),
|
|
8440
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8441
|
+
"div",
|
|
8442
|
+
{
|
|
8443
|
+
className: cn(
|
|
8444
|
+
"cnc-flex cnc-flex-col cnc-w-full cnc-max-w-[513px] cnc-mx-auto cnc-py-6",
|
|
8445
|
+
className
|
|
8446
|
+
),
|
|
8447
|
+
children
|
|
8448
|
+
}
|
|
8449
|
+
)
|
|
8450
|
+
] }) });
|
|
9915
8451
|
}
|
|
9916
8452
|
var ModalMudancaEntidade = ({
|
|
9917
8453
|
title,
|
|
@@ -9920,17 +8456,17 @@ var ModalMudancaEntidade = ({
|
|
|
9920
8456
|
SelectComponent,
|
|
9921
8457
|
buttonAction
|
|
9922
8458
|
}) => {
|
|
9923
|
-
return /* @__PURE__ */ (0,
|
|
8459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
9924
8460
|
Modal,
|
|
9925
8461
|
{
|
|
9926
8462
|
title,
|
|
9927
8463
|
onClose,
|
|
9928
8464
|
visibleModal,
|
|
9929
|
-
content: /* @__PURE__ */ (0,
|
|
9930
|
-
/* @__PURE__ */ (0,
|
|
9931
|
-
/* @__PURE__ */ (0,
|
|
9932
|
-
/* @__PURE__ */ (0,
|
|
9933
|
-
/* @__PURE__ */ (0,
|
|
8465
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
8466
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogTitle, { className: "cnc-DialogTitle cnc-mt-10 cnc-mb-4 ", children: "Selecionar a entidadess" }),
|
|
8467
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "cnc-flex cnc-mb-5 ", children: [
|
|
8468
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectComponent, {}),
|
|
8469
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { className: "cnc-text-white cnc-ml-5", onClick: buttonAction, children: "Trocar entidade" })
|
|
9934
8470
|
] })
|
|
9935
8471
|
] })
|
|
9936
8472
|
}
|
|
@@ -9939,13 +8475,13 @@ var ModalMudancaEntidade = ({
|
|
|
9939
8475
|
|
|
9940
8476
|
// src/components/Sidebar/index.tsx
|
|
9941
8477
|
var Accordion = __toESM(require("@radix-ui/react-accordion"));
|
|
9942
|
-
var
|
|
8478
|
+
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
9943
8479
|
var import_react7 = require("react");
|
|
9944
8480
|
|
|
9945
8481
|
// src/components/assets/logotipo-default.tsx
|
|
9946
|
-
var
|
|
8482
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
9947
8483
|
function LogotipoDefault() {
|
|
9948
|
-
return /* @__PURE__ */ (0,
|
|
8484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
9949
8485
|
"svg",
|
|
9950
8486
|
{
|
|
9951
8487
|
width: "209",
|
|
@@ -9954,14 +8490,14 @@ function LogotipoDefault() {
|
|
|
9954
8490
|
fill: "none",
|
|
9955
8491
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9956
8492
|
children: [
|
|
9957
|
-
/* @__PURE__ */ (0,
|
|
8493
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
9958
8494
|
"path",
|
|
9959
8495
|
{
|
|
9960
8496
|
d: "M20.539 0H36.2809C36.2809 0 36.9745 4.48363 30.7294 6.63394C31.7327 5.31688 31.7006 3.41772 31.7006 3.41772H20.202C9.32 3.41772 1.29805 18.1019 0.207031 20.0001C0.207031 20.0001 4.07335 8.64018 11.9375 3.02348C13.5682 1.85731 17.0906 0 20.539 0Z",
|
|
9961
8497
|
fill: "#C89633"
|
|
9962
8498
|
}
|
|
9963
8499
|
),
|
|
9964
|
-
/* @__PURE__ */ (0,
|
|
8500
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
9965
8501
|
"path",
|
|
9966
8502
|
{
|
|
9967
8503
|
fillRule: "evenodd",
|
|
@@ -9970,133 +8506,133 @@ function LogotipoDefault() {
|
|
|
9970
8506
|
fill: "#C89633"
|
|
9971
8507
|
}
|
|
9972
8508
|
),
|
|
9973
|
-
/* @__PURE__ */ (0,
|
|
8509
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
9974
8510
|
"path",
|
|
9975
8511
|
{
|
|
9976
8512
|
d: "M15.6289 10.2526C17.6892 10.2994 18.8026 10.313 18.8026 10.313C19.9394 10.3344 20.9691 10.2497 21.9198 10.1621C21.1415 11.8189 19.2049 13.5127 13.9602 13.4134C7.19489 13.2859 3.46398 16.9946 1.55469 18.9863L1.56405 18.9719C3.47675 16.0444 7.38469 10.0631 15.6289 10.2526Z",
|
|
9977
8513
|
fill: "white"
|
|
9978
8514
|
}
|
|
9979
8515
|
),
|
|
9980
|
-
/* @__PURE__ */ (0,
|
|
8516
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
9981
8517
|
"path",
|
|
9982
8518
|
{
|
|
9983
8519
|
d: "M60.457 3.08307V4.09961H61.9417H63.4264V3.08307V2.06652H61.9417H60.457V3.08307Z",
|
|
9984
8520
|
fill: "white"
|
|
9985
8521
|
}
|
|
9986
8522
|
),
|
|
9987
|
-
/* @__PURE__ */ (0,
|
|
8523
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
9988
8524
|
"path",
|
|
9989
8525
|
{
|
|
9990
8526
|
d: "M53.2447 2.39671C51.2817 2.622 49.907 3.55062 49.4231 4.97928C49.2636 5.43535 49.2746 6.85851 49.4396 7.2926C49.885 8.49596 50.8803 9.12237 53.3052 9.7268C55.1198 10.1829 55.4222 10.2873 55.8456 10.6005C56.0601 10.7598 56.1866 11.117 56.1536 11.4906C56.0986 12.1665 55.5432 12.5017 54.372 12.5456C53.1732 12.6006 52.222 12.2929 50.9682 11.4467L50.4789 11.117L50.017 11.606C49.2581 12.4083 48.7248 13.0017 48.7467 13.0237C49.797 13.8699 51.0562 14.4853 52.2605 14.7436C53.1348 14.9304 54.6139 14.9799 55.4662 14.8425C57.3633 14.5513 58.617 13.5787 59.0019 12.1225C59.1174 11.6994 59.1284 10.6994 59.0294 10.2873C58.793 9.3092 57.9682 8.51794 56.621 7.97945C56.3405 7.86955 55.4552 7.6058 54.6524 7.397C52.8048 6.91345 52.4584 6.74861 52.2824 6.25957C51.9635 5.36391 52.6619 4.7375 53.9651 4.74849C54.4655 4.75399 54.7679 4.81443 56.0161 5.18258C56.1041 5.21006 56.1096 5.12764 56.1096 3.94625C56.1096 2.78684 56.1041 2.67694 56.0161 2.64947C55.9611 2.63299 55.6367 2.57254 55.2903 2.5066C54.5314 2.37473 53.8001 2.33626 53.2447 2.39671Z",
|
|
9991
8527
|
fill: "white"
|
|
9992
8528
|
}
|
|
9993
8529
|
),
|
|
9994
|
-
/* @__PURE__ */ (0,
|
|
8530
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
9995
8531
|
"path",
|
|
9996
8532
|
{
|
|
9997
8533
|
d: "M74.6953 7.57213C74.6953 11.2592 74.7173 11.7647 74.8933 12.3142C75.1297 13.056 75.872 13.8912 76.5924 14.2374C77.4667 14.655 78.198 14.8088 79.5507 14.8528L80.469 14.8857V13.8692V12.8582L79.8806 12.7867C78.8579 12.6713 78.1045 12.3252 77.8846 11.8746C77.6976 11.4844 77.6646 11.1108 77.6646 9.23157V7.3963H79.0668H80.469V6.4347V5.47311L79.0833 5.46212L77.6921 5.44563L77.6756 4.65987L77.6591 3.87961H76.18H74.6953V7.57213Z",
|
|
9998
8534
|
fill: "white"
|
|
9999
8535
|
}
|
|
10000
8536
|
),
|
|
10001
|
-
/* @__PURE__ */ (0,
|
|
8537
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10002
8538
|
"path",
|
|
10003
8539
|
{
|
|
10004
8540
|
d: "M68.4882 5.25987C67.9383 5.3258 66.9375 5.6445 66.5031 5.89726C65.5024 6.47972 64.9305 7.50725 65.046 8.52379C65.0899 8.95239 65.2274 9.2546 65.5134 9.56231C65.9203 10.0019 66.6406 10.3151 67.8503 10.5789C68.1528 10.6448 68.6256 10.7492 68.9006 10.8096C69.5164 10.9415 70.1268 11.2272 70.2918 11.4525C70.5392 11.7987 70.3907 12.3042 69.9728 12.5515C69.7309 12.6944 69.6869 12.6999 69.0051 12.6999C68.0098 12.6944 66.6351 12.3812 65.8323 11.98C65.6288 11.8756 65.4474 11.7932 65.4309 11.7932C65.4144 11.7932 65.4034 12.3097 65.4034 12.9416V14.0955L65.6948 14.1999C66.8056 14.6121 67.6744 14.8044 68.7081 14.8538C70.1103 14.9253 71.353 14.5901 72.2658 13.9087C72.9037 13.4307 73.2831 12.8702 73.4646 12.1449C73.5855 11.6613 73.514 11.0734 73.2666 10.5624C72.8762 9.73815 71.7544 9.13372 69.8519 8.7216C69.0875 8.55676 68.4882 8.34796 68.3067 8.18311C68.1528 8.04574 68.1747 7.71605 68.3507 7.50725C68.6201 7.18855 68.7576 7.15008 69.5989 7.15008H70.3523V6.21047V5.27085L70.0168 5.23239C69.5879 5.18843 69.0106 5.19942 68.4882 5.25987Z",
|
|
10005
8541
|
fill: "white"
|
|
10006
8542
|
}
|
|
10007
8543
|
),
|
|
10008
|
-
/* @__PURE__ */ (0,
|
|
8544
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10009
8545
|
"path",
|
|
10010
8546
|
{
|
|
10011
8547
|
d: "M97.0316 5.25947C96.8116 5.28695 96.3607 5.39684 96.0253 5.50674C94.8156 5.90786 93.9523 6.67714 93.5069 7.74863C93.166 8.57285 93.1605 8.6278 93.133 11.8038L93.1055 14.7051H94.6231H96.1408V12.0511C96.1408 10.4905 96.1628 9.25971 96.1958 9.0509C96.3002 8.44098 96.6467 7.90798 97.1086 7.6717C97.345 7.55082 97.4495 7.53433 97.9554 7.53433C98.4942 7.53433 98.5547 7.54532 98.8242 7.69368C99.2861 7.95194 99.5995 8.419 99.7095 9.01793C99.748 9.22124 99.77 10.3202 99.77 12.0236V14.7051H101.282H102.794V11.9412C102.794 10.2817 102.822 9.08937 102.855 8.94101C103.064 8.02337 103.685 7.50686 104.581 7.50686C105.571 7.50686 106.215 8.11129 106.363 9.17179C106.401 9.43005 106.423 10.6169 106.423 12.1555V14.7051H107.914H109.398L109.382 11.7489C109.36 8.92452 109.354 8.78166 109.239 8.36955C108.854 6.99034 107.897 5.9738 106.572 5.52872C105.786 5.27046 105.527 5.232 104.526 5.2375C103.702 5.2375 103.526 5.25947 103.047 5.38586C102.448 5.53971 101.942 5.7595 101.563 6.01776C101.425 6.11117 101.299 6.1881 101.271 6.1881C101.249 6.1881 101.057 6.07271 100.848 5.94083C99.9459 5.35289 98.4723 5.09463 97.0316 5.25947Z",
|
|
10012
8548
|
fill: "white"
|
|
10013
8549
|
}
|
|
10014
8550
|
),
|
|
10015
|
-
/* @__PURE__ */ (0,
|
|
8551
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10016
8552
|
"path",
|
|
10017
8553
|
{
|
|
10018
8554
|
d: "M86.1337 5.30344C84.3081 5.57818 82.9884 6.49581 82.2296 8.02338C81.8887 8.71572 81.7732 9.35862 81.8062 10.3367C81.8447 11.2488 81.9327 11.65 82.2351 12.2489C82.785 13.3369 83.3898 13.9138 84.5171 14.4194C85.1274 14.6941 85.6938 14.815 86.4966 14.8534C87.085 14.8809 88.1462 14.8095 88.5532 14.7106C88.6576 14.6831 88.8116 14.6446 88.8996 14.6282L89.048 14.5952V13.5786C89.048 13.0182 89.0425 12.5621 89.037 12.5621C89.026 12.5621 88.8336 12.617 88.6081 12.6775C88.0253 12.8368 86.898 12.8808 86.3866 12.7599C85.6333 12.5841 85.0449 12.117 84.726 11.4412C84.616 11.2159 84.5446 11.0016 84.5666 10.9686C84.5885 10.9301 85.7433 10.9137 88.1682 10.9137H91.7369L91.7754 10.6609C91.8304 10.2872 91.7534 9.46851 91.605 8.80914C91.286 7.38598 90.3567 6.22657 89.1195 5.69357C88.3552 5.36938 86.9475 5.18255 86.1337 5.30344ZM87.5909 7.52884C87.7448 7.56731 87.9648 7.64973 88.0858 7.71567C88.5257 7.93546 89.0041 8.60033 89.081 9.09487L89.1195 9.32016H86.8265C84.9845 9.32016 84.5391 9.30367 84.5391 9.24872C84.5391 9.06739 84.99 8.26515 85.2099 8.05634C85.4738 7.80358 85.8588 7.58379 86.1722 7.51236C86.4911 7.43543 87.2829 7.44642 87.5909 7.52884Z",
|
|
10019
8555
|
fill: "white"
|
|
10020
8556
|
}
|
|
10021
8557
|
),
|
|
10022
|
-
/* @__PURE__ */ (0,
|
|
8558
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10023
8559
|
"path",
|
|
10024
8560
|
{
|
|
10025
8561
|
d: "M114.892 5.30939C114.634 5.33686 114.315 5.38082 114.178 5.4028L113.93 5.45225L113.914 6.58419L113.903 7.71612L114.134 7.65568C114.266 7.62821 114.815 7.60073 115.36 7.59524C116.179 7.58974 116.405 7.60623 116.652 7.68865C117.125 7.8425 117.46 8.12274 117.631 8.4854C117.779 8.80959 117.862 9.37556 117.768 9.37556C117.735 9.37556 117.515 9.32611 117.279 9.27116C116.223 9.00741 114.639 8.98543 113.573 9.20522C111.956 9.5459 110.988 10.6009 110.988 12.0296C110.988 13.2879 111.879 14.3319 113.27 14.711C113.864 14.8759 115.316 14.8924 115.91 14.744C116.41 14.6176 117.152 14.244 117.477 13.9473C117.625 13.8209 117.757 13.7165 117.774 13.7165C117.79 13.7165 117.807 13.9363 117.807 14.211V14.7055H119.242H120.672L120.65 11.5295C120.628 7.97438 120.628 7.99636 120.226 7.24357C119.517 5.9303 118.318 5.34236 116.212 5.28741C115.745 5.27093 115.151 5.28191 114.892 5.30939ZM117.235 10.7712C117.851 10.9251 117.862 10.9306 117.862 11.3537C117.862 12.2329 117.251 12.7933 116.069 12.9912C115.64 13.0681 115.497 13.0681 115.156 13.0131C114.628 12.9252 114.211 12.7164 114.04 12.4637C113.864 12.1999 113.848 11.6394 114.007 11.3757C114.205 11.0515 114.656 10.7822 115.167 10.6888C115.525 10.6229 116.844 10.6778 117.235 10.7712Z",
|
|
10026
8562
|
fill: "white"
|
|
10027
8563
|
}
|
|
10028
8564
|
),
|
|
10029
|
-
/* @__PURE__ */ (0,
|
|
8565
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10030
8566
|
"path",
|
|
10031
8567
|
{
|
|
10032
8568
|
d: "M60.457 10.1169V14.7051H61.9417H63.4264V10.1169V5.52872H61.9417H60.457V10.1169Z",
|
|
10033
8569
|
fill: "white"
|
|
10034
8570
|
}
|
|
10035
8571
|
),
|
|
10036
|
-
/* @__PURE__ */ (0,
|
|
8572
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10037
8573
|
"path",
|
|
10038
8574
|
{
|
|
10039
8575
|
d: "M173.197 1.72126C172.114 3.40817 171.586 4.24338 171.586 4.28185C171.586 4.30383 172.02 4.32031 172.554 4.32031H173.527L173.752 4.117C174.324 3.61148 175.71 2.27074 175.71 2.22678C175.71 2.19931 175.655 2.14986 175.589 2.12238C175.518 2.09491 175.034 1.8861 174.511 1.65532C173.994 1.43003 173.554 1.24321 173.538 1.24321C173.521 1.24321 173.368 1.45751 173.197 1.72126Z",
|
|
10040
8576
|
fill: "white"
|
|
10041
8577
|
}
|
|
10042
8578
|
),
|
|
10043
|
-
/* @__PURE__ */ (0,
|
|
8579
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10044
8580
|
"path",
|
|
10045
8581
|
{
|
|
10046
8582
|
d: "M194.074 2.97369V3.99023H195.559H197.044L197.033 2.98468L197.016 1.98462L195.548 1.96814L194.074 1.95715V2.97369Z",
|
|
10047
8583
|
fill: "white"
|
|
10048
8584
|
}
|
|
10049
8585
|
),
|
|
10050
|
-
/* @__PURE__ */ (0,
|
|
8586
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10051
8587
|
"path",
|
|
10052
8588
|
{
|
|
10053
8589
|
d: "M135.845 2.43604C133.887 2.63386 132.37 3.21082 131.144 4.22736C130.346 4.88674 129.653 5.94724 129.4 6.89784C129.241 7.51326 129.197 8.99687 129.323 9.76614C129.664 11.8322 131.138 13.4861 133.398 14.3488C134.173 14.6455 135.872 14.9258 136.873 14.9258H137.275V13.7554V12.5905L136.543 12.585C135.702 12.574 135.257 12.4751 134.525 12.1344C132.997 11.4201 132.144 9.99692 132.238 8.30452C132.287 7.30446 132.59 6.63409 133.283 5.94174C134.091 5.14499 135.059 4.77684 136.494 4.72189L137.275 4.68892V3.546V2.39758L136.659 2.40857C136.318 2.40857 135.949 2.42506 135.845 2.43604Z",
|
|
10054
8590
|
fill: "white"
|
|
10055
8591
|
}
|
|
10056
8592
|
),
|
|
10057
|
-
/* @__PURE__ */ (0,
|
|
8593
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10058
8594
|
"path",
|
|
10059
8595
|
{
|
|
10060
8596
|
d: "M142.609 5.13944C140.503 5.44715 138.831 6.8813 138.342 8.80449C137.797 10.964 138.847 13.1839 140.915 14.2224C141.652 14.5905 142.141 14.7114 143.104 14.7444C143.774 14.7664 143.983 14.7554 144.407 14.6565C145.424 14.4312 146.227 13.9971 146.953 13.2773C148.173 12.0519 148.635 10.4255 148.223 8.79899C148.08 8.24951 147.689 7.46375 147.349 7.04065C146.441 5.91421 144.973 5.1834 143.488 5.12296C143.17 5.10647 142.774 5.11746 142.609 5.13944ZM144.297 7.44727C144.682 7.61761 145.089 8.0517 145.237 8.45282C145.578 9.36496 145.545 10.8156 145.166 11.6014C144.83 12.2992 144.253 12.6179 143.312 12.6179C142.565 12.6179 142.174 12.497 141.778 12.1398C141.311 11.7167 141.107 11.0464 141.107 9.95291C141.107 8.48579 141.514 7.68904 142.411 7.39781C142.889 7.23846 143.884 7.26594 144.297 7.44727Z",
|
|
10061
8597
|
fill: "white"
|
|
10062
8598
|
}
|
|
10063
8599
|
),
|
|
10064
|
-
/* @__PURE__ */ (0,
|
|
8600
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10065
8601
|
"path",
|
|
10066
8602
|
{
|
|
10067
8603
|
d: "M154.046 5.12263C153.667 5.16659 152.831 5.37539 152.501 5.50177C152.044 5.6831 151.302 6.18862 150.994 6.5293C150.675 6.88097 150.345 7.43595 150.197 7.85905C149.944 8.60635 149.922 8.89208 149.922 11.8263V14.5957H151.434H152.941L152.957 11.6944L152.974 8.79866L153.106 8.46897C153.386 7.78212 153.963 7.39748 154.733 7.39748C155.267 7.39748 155.597 7.52387 155.932 7.85355C156.52 8.42502 156.575 8.79317 156.575 12.1011V14.5957H158.088H159.594L159.611 11.667C159.633 8.35358 159.616 8.45799 160.078 7.94697C160.474 7.50738 160.672 7.42496 161.359 7.42496C161.849 7.42496 161.97 7.44694 162.157 7.54584C162.448 7.70519 162.767 8.0184 162.893 8.26567C163.168 8.80416 163.174 8.88658 163.174 11.8318V14.5957H164.692H166.204L166.187 11.6944L166.165 8.79866L165.995 8.2327C165.725 7.35902 165.439 6.86449 164.922 6.36995C164.345 5.83146 163.79 5.52924 162.943 5.30945C161.348 4.89184 159.512 5.13362 158.357 5.91388C158.219 6.0018 158.088 6.07873 158.06 6.07873C158.038 6.07873 157.835 5.96883 157.615 5.83146C157.23 5.59518 156.729 5.40286 156.042 5.22703C155.712 5.14461 154.425 5.07867 154.046 5.12263Z",
|
|
10068
8604
|
fill: "white"
|
|
10069
8605
|
}
|
|
10070
8606
|
),
|
|
10071
|
-
/* @__PURE__ */ (0,
|
|
8607
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10072
8608
|
"path",
|
|
10073
8609
|
{
|
|
10074
8610
|
d: "M182.994 5.1446C181.399 5.38638 180.184 6.17763 179.579 7.36451C179.177 8.14478 179.172 8.20522 179.172 11.5845V14.5957H180.684H182.196V11.6395C182.202 8.969 182.207 8.66129 182.295 8.40853C182.526 7.74915 183.12 7.3755 184.192 7.23264C184.44 7.19967 184.726 7.15571 184.825 7.14472L185.001 7.11725L184.99 6.11719L184.973 5.11713L184.121 5.11164C183.653 5.10614 183.147 5.12263 182.994 5.1446Z",
|
|
10075
8611
|
fill: "white"
|
|
10076
8612
|
}
|
|
10077
8613
|
),
|
|
10078
|
-
/* @__PURE__ */ (0,
|
|
8614
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10079
8615
|
"path",
|
|
10080
8616
|
{
|
|
10081
8617
|
d: "M190.311 5.1395C189.706 5.2384 188.705 5.54062 188.21 5.7769C187.248 6.23297 186.61 6.81542 186.126 7.6836C185.73 8.38694 185.609 8.93642 185.609 9.98044C185.615 11.3267 185.928 12.1729 186.737 13.0465C187.479 13.8433 188.425 14.3323 189.788 14.6236C190.514 14.7829 191.62 14.8379 192.169 14.7445L192.428 14.7005V13.7004V12.7004L191.993 12.7169C190.844 12.7718 189.832 12.3927 189.107 11.6289C188.617 11.1179 188.425 10.5299 188.485 9.71669C188.54 8.88147 188.881 8.33748 189.678 7.7935C190.305 7.3649 191.136 7.12313 191.988 7.12313H192.428V6.16703C192.428 5.4582 192.411 5.19444 192.362 5.16148C192.263 5.10653 190.646 5.09004 190.311 5.1395Z",
|
|
10082
8618
|
fill: "white"
|
|
10083
8619
|
}
|
|
10084
8620
|
),
|
|
10085
|
-
/* @__PURE__ */ (0,
|
|
8621
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10086
8622
|
"path",
|
|
10087
8623
|
{
|
|
10088
8624
|
d: "M203.01 5.14533C201.784 5.32666 200.524 5.99703 199.776 6.86521C198.93 7.85428 198.473 9.26095 198.627 10.4259C198.842 12.0908 199.82 13.459 201.344 14.2228C202.168 14.6349 202.614 14.7338 203.725 14.7283C204.808 14.7283 205.22 14.6404 205.996 14.2667C208.487 13.0414 209.487 10.25 208.289 7.85977C207.491 6.27177 205.781 5.20028 203.917 5.12335C203.598 5.10686 203.191 5.11785 203.01 5.14533ZM204.72 7.44766C204.874 7.5136 205.116 7.68394 205.253 7.8268C205.666 8.24441 205.831 8.74993 205.88 9.73351C205.93 10.8105 205.71 11.6512 205.259 12.0908C204.901 12.437 204.533 12.5743 203.901 12.6073C202.592 12.6677 201.932 12.2282 201.624 11.0633C201.492 10.5742 201.498 9.24996 201.63 8.79939C201.861 8.03561 202.24 7.59602 202.839 7.39821C203.312 7.24435 204.313 7.26633 204.72 7.44766Z",
|
|
10089
8625
|
fill: "white"
|
|
10090
8626
|
}
|
|
10091
8627
|
),
|
|
10092
|
-
/* @__PURE__ */ (0,
|
|
8628
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10093
8629
|
"path",
|
|
10094
8630
|
{
|
|
10095
8631
|
d: "M171.532 5.33081C170.025 5.68797 168.931 6.54517 168.26 7.8914C167.93 8.55627 167.793 9.1662 167.793 10.0344C167.793 11.9081 168.651 13.3752 170.212 14.1775C170.768 14.4632 171.059 14.5621 171.725 14.683C172.533 14.8314 174.199 14.7434 174.958 14.5072C175.04 14.4797 175.051 14.3808 175.051 13.4741V12.4686L174.49 12.6005C173.809 12.7543 172.83 12.7708 172.34 12.6444C171.637 12.4631 171.103 12.0565 170.806 11.4795C170.696 11.2762 170.592 11.0509 170.57 10.9795L170.537 10.8586H174.133H177.735L177.768 10.6883C177.916 9.95196 177.619 8.36395 177.179 7.52324C176.684 6.56165 175.711 5.74292 174.721 5.4462C173.77 5.16597 172.434 5.11651 171.532 5.33081ZM173.523 7.40236C173.93 7.49028 174.199 7.63864 174.512 7.95184C174.804 8.24307 175.046 8.69914 175.09 9.05081L175.123 9.2651L172.846 9.25411L170.57 9.23763L170.586 9.10026C170.592 9.02333 170.685 8.78705 170.79 8.56726C170.988 8.16614 171.373 7.75952 171.719 7.57819C172.148 7.35291 172.934 7.27598 173.523 7.40236Z",
|
|
10096
8632
|
fill: "white"
|
|
10097
8633
|
}
|
|
10098
8634
|
),
|
|
10099
|
-
/* @__PURE__ */ (0,
|
|
8635
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10100
8636
|
"path",
|
|
10101
8637
|
{
|
|
10102
8638
|
d: "M194.074 10.0075V14.5957H195.559H197.044V10.0075V5.41934H195.559H194.074V10.0075Z",
|
|
@@ -10109,12 +8645,12 @@ function LogotipoDefault() {
|
|
|
10109
8645
|
}
|
|
10110
8646
|
|
|
10111
8647
|
// src/components/Sidebar/index.tsx
|
|
10112
|
-
var
|
|
8648
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
10113
8649
|
function SidebarContainer({
|
|
10114
8650
|
isOpen = true,
|
|
10115
8651
|
...rest
|
|
10116
8652
|
}) {
|
|
10117
|
-
return /* @__PURE__ */ (0,
|
|
8653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10118
8654
|
"div",
|
|
10119
8655
|
{
|
|
10120
8656
|
"data-is-open": isOpen,
|
|
@@ -10130,21 +8666,21 @@ function SidebarImageBrand({
|
|
|
10130
8666
|
img,
|
|
10131
8667
|
children
|
|
10132
8668
|
}) {
|
|
10133
|
-
return /* @__PURE__ */ (0,
|
|
10134
|
-
/* @__PURE__ */ (0,
|
|
8669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "cnc-flex cnc-items-center cnc-justify-between cnc-bg-primary-900 cnc-w-full cnc-h-full cnc-max-h-[70px] cnc-py-5 cnc-px-6 cnc-transition-all cnc-duration-300 cnc-ease-in-out cnc-sidebar-child-w-0", children: [
|
|
8670
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "cnc-sidebar-child-hidden", children: asChild && !img ? children : img && img.src ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10135
8671
|
"img",
|
|
10136
8672
|
{
|
|
10137
8673
|
src: img.src,
|
|
10138
8674
|
alt: img?.alt,
|
|
10139
8675
|
className: "cnc-w-[159px] cnc-h-[28px] cnc-object-contain"
|
|
10140
8676
|
}
|
|
10141
|
-
) : /* @__PURE__ */ (0,
|
|
10142
|
-
onChangeToggle && /* @__PURE__ */ (0,
|
|
8677
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LogotipoDefault, {}) }),
|
|
8678
|
+
onChangeToggle && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10143
8679
|
"button",
|
|
10144
8680
|
{
|
|
10145
8681
|
onClick: onChangeToggle,
|
|
10146
8682
|
className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden",
|
|
10147
|
-
children: /* @__PURE__ */ (0,
|
|
8683
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10148
8684
|
"svg",
|
|
10149
8685
|
{
|
|
10150
8686
|
stroke: "currentColor",
|
|
@@ -10155,7 +8691,7 @@ function SidebarImageBrand({
|
|
|
10155
8691
|
height: "1em",
|
|
10156
8692
|
width: "1em",
|
|
10157
8693
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10158
|
-
children: /* @__PURE__ */ (0,
|
|
8694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10159
8695
|
"path",
|
|
10160
8696
|
{
|
|
10161
8697
|
fill: "none",
|
|
@@ -10172,7 +8708,7 @@ function SidebarImageBrand({
|
|
|
10172
8708
|
] });
|
|
10173
8709
|
}
|
|
10174
8710
|
function Sidebar({ children, ...rest }) {
|
|
10175
|
-
return /* @__PURE__ */ (0,
|
|
8711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Accordion.Root, { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10176
8712
|
"div",
|
|
10177
8713
|
{
|
|
10178
8714
|
className: "cnc-w-full cnc-h-screen-minus-70 cnc-flex cnc-flex-col cnc-py-8 cnc-bg-primary-800 cnc-px-5 \n cnc-scroll-smooth cnc-overflow-y-auto\n [&::-webkit-scrollbar]:cnc-w-1\n [&::-webkit-scrollbar-track]:cnc-bg-brand-blue-500\n [&::-webkit-scrollbar-thumb]:cnc-rounded\n [&::-webkit-scrollbar-thumb]:cnc-border\n [&::-webkit-scrollbar-thumb]:cnc-border-solid\n [&::-webkit-scrollbar-thumb]:cnc-border-brand-gray-400\n [&::-webkit-scrollbar-thumb]:cnc-bg-brand-gray-200\n cnc-sidebar-child-w-0",
|
|
@@ -10185,8 +8721,8 @@ function SidebarNavLink({
|
|
|
10185
8721
|
type = "primary",
|
|
10186
8722
|
...rest
|
|
10187
8723
|
}) {
|
|
10188
|
-
const Component = asChild ?
|
|
10189
|
-
return /* @__PURE__ */ (0,
|
|
8724
|
+
const Component = asChild ? import_react_slot5.Slot : "a";
|
|
8725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10190
8726
|
Component,
|
|
10191
8727
|
{
|
|
10192
8728
|
"data-type": type,
|
|
@@ -10201,13 +8737,13 @@ function SidebarNavCollapse({
|
|
|
10201
8737
|
icon,
|
|
10202
8738
|
...rest
|
|
10203
8739
|
}) {
|
|
10204
|
-
return /* @__PURE__ */ (0,
|
|
10205
|
-
/* @__PURE__ */ (0,
|
|
10206
|
-
/* @__PURE__ */ (0,
|
|
8740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Accordion.Item, { ...rest, className: "cnc-sidebar-item", children: [
|
|
8741
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Accordion.Trigger, { className: "group cnc-w-full cnc-py-4 cnc-text-base cnc-text-white cnc-flex cnc-gap-2 cnc-items-center cnc-justify-between hover:cnc-text-blue-600 cnc-sidebar-child-hidden", children: [
|
|
8742
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "cnc-flex cnc-items-center cnc-gap-2", children: [
|
|
10207
8743
|
icon && renderIconItem(icon),
|
|
10208
8744
|
title
|
|
10209
8745
|
] }),
|
|
10210
|
-
/* @__PURE__ */ (0,
|
|
8746
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "cnc-w-4 cnc-h-4", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10211
8747
|
"svg",
|
|
10212
8748
|
{
|
|
10213
8749
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10220,11 +8756,11 @@ function SidebarNavCollapse({
|
|
|
10220
8756
|
strokeLinecap: "round",
|
|
10221
8757
|
strokeLinejoin: "round",
|
|
10222
8758
|
className: "cnc-w-full cnc-h-full cnc-text-violet10 cnc-transition-transform cnc-duration-300 cnc-ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:cnc-rotate-90",
|
|
10223
|
-
children: /* @__PURE__ */ (0,
|
|
8759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "m9 18 6-6-6-6" })
|
|
10224
8760
|
}
|
|
10225
8761
|
) })
|
|
10226
8762
|
] }),
|
|
10227
|
-
/* @__PURE__ */ (0,
|
|
8763
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Accordion.Content, { className: "cnc-overflow-hidden data-[state=closed]:cnc-animate-slideUp data-[state=open]:cnc-animate-slideDown cnc-py-2", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "cnc-bg-white/10 cnc-rounded-md cnc-font-normal cnc-px-5 cnc-py-3", children }) })
|
|
10228
8764
|
] });
|
|
10229
8765
|
}
|
|
10230
8766
|
function renderIconItem(icon) {
|
|
@@ -10237,16 +8773,16 @@ function renderIconItem(icon) {
|
|
|
10237
8773
|
});
|
|
10238
8774
|
}
|
|
10239
8775
|
if ((0, import_react7.isValidElement)(icon)) {
|
|
10240
|
-
return /* @__PURE__ */ (0,
|
|
8776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "cnc-w-5 cnc-h-5 cnc-overflow-hidden", children: icon });
|
|
10241
8777
|
}
|
|
10242
|
-
return /* @__PURE__ */ (0,
|
|
8778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "cnc-w-5 cnc-h-5 cnc-overflow-hidden", children: icon });
|
|
10243
8779
|
}
|
|
10244
8780
|
|
|
10245
8781
|
// ../../node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
10246
|
-
var
|
|
8782
|
+
var React54 = __toESM(require("react"), 1);
|
|
10247
8783
|
|
|
10248
8784
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
10249
|
-
function
|
|
8785
|
+
function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
10250
8786
|
return function handleEvent(event) {
|
|
10251
8787
|
originalEventHandler?.(event);
|
|
10252
8788
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -10256,19 +8792,19 @@ function composeEventHandlers3(originalEventHandler, ourEventHandler, { checkFor
|
|
|
10256
8792
|
}
|
|
10257
8793
|
|
|
10258
8794
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
10259
|
-
var
|
|
10260
|
-
function
|
|
8795
|
+
var React35 = __toESM(require("react"), 1);
|
|
8796
|
+
function setRef2(ref, value) {
|
|
10261
8797
|
if (typeof ref === "function") {
|
|
10262
8798
|
return ref(value);
|
|
10263
8799
|
} else if (ref !== null && ref !== void 0) {
|
|
10264
8800
|
ref.current = value;
|
|
10265
8801
|
}
|
|
10266
8802
|
}
|
|
10267
|
-
function
|
|
8803
|
+
function composeRefs2(...refs) {
|
|
10268
8804
|
return (node) => {
|
|
10269
8805
|
let hasCleanup = false;
|
|
10270
8806
|
const cleanups = refs.map((ref) => {
|
|
10271
|
-
const cleanup =
|
|
8807
|
+
const cleanup = setRef2(ref, node);
|
|
10272
8808
|
if (!hasCleanup && typeof cleanup == "function") {
|
|
10273
8809
|
hasCleanup = true;
|
|
10274
8810
|
}
|
|
@@ -10281,36 +8817,36 @@ function composeRefs3(...refs) {
|
|
|
10281
8817
|
if (typeof cleanup == "function") {
|
|
10282
8818
|
cleanup();
|
|
10283
8819
|
} else {
|
|
10284
|
-
|
|
8820
|
+
setRef2(refs[i], null);
|
|
10285
8821
|
}
|
|
10286
8822
|
}
|
|
10287
8823
|
};
|
|
10288
8824
|
}
|
|
10289
8825
|
};
|
|
10290
8826
|
}
|
|
10291
|
-
function
|
|
10292
|
-
return
|
|
8827
|
+
function useComposedRefs2(...refs) {
|
|
8828
|
+
return React35.useCallback(composeRefs2(...refs), refs);
|
|
10293
8829
|
}
|
|
10294
8830
|
|
|
10295
8831
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
10296
|
-
var
|
|
10297
|
-
var
|
|
10298
|
-
function
|
|
8832
|
+
var React36 = __toESM(require("react"), 1);
|
|
8833
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
8834
|
+
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
10299
8835
|
let defaultContexts = [];
|
|
10300
8836
|
function createContext32(rootComponentName, defaultContext) {
|
|
10301
|
-
const BaseContext =
|
|
8837
|
+
const BaseContext = React36.createContext(defaultContext);
|
|
10302
8838
|
const index2 = defaultContexts.length;
|
|
10303
8839
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
10304
8840
|
const Provider = (props) => {
|
|
10305
8841
|
const { scope, children, ...context } = props;
|
|
10306
8842
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
10307
|
-
const value =
|
|
10308
|
-
return /* @__PURE__ */ (0,
|
|
8843
|
+
const value = React36.useMemo(() => context, Object.values(context));
|
|
8844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Context.Provider, { value, children });
|
|
10309
8845
|
};
|
|
10310
8846
|
Provider.displayName = rootComponentName + "Provider";
|
|
10311
8847
|
function useContext22(consumerName, scope) {
|
|
10312
8848
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
10313
|
-
const context =
|
|
8849
|
+
const context = React36.useContext(Context);
|
|
10314
8850
|
if (context) return context;
|
|
10315
8851
|
if (defaultContext !== void 0) return defaultContext;
|
|
10316
8852
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -10319,20 +8855,20 @@ function createContextScope3(scopeName, createContextScopeDeps = []) {
|
|
|
10319
8855
|
}
|
|
10320
8856
|
const createScope = () => {
|
|
10321
8857
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
10322
|
-
return
|
|
8858
|
+
return React36.createContext(defaultContext);
|
|
10323
8859
|
});
|
|
10324
8860
|
return function useScope(scope) {
|
|
10325
8861
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
10326
|
-
return
|
|
8862
|
+
return React36.useMemo(
|
|
10327
8863
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
10328
8864
|
[scope, contexts]
|
|
10329
8865
|
);
|
|
10330
8866
|
};
|
|
10331
8867
|
};
|
|
10332
8868
|
createScope.scopeName = scopeName;
|
|
10333
|
-
return [createContext32,
|
|
8869
|
+
return [createContext32, composeContextScopes2(createScope, ...createContextScopeDeps)];
|
|
10334
8870
|
}
|
|
10335
|
-
function
|
|
8871
|
+
function composeContextScopes2(...scopes) {
|
|
10336
8872
|
const baseScope = scopes[0];
|
|
10337
8873
|
if (scopes.length === 1) return baseScope;
|
|
10338
8874
|
const createScope = () => {
|
|
@@ -10346,7 +8882,7 @@ function composeContextScopes3(...scopes) {
|
|
|
10346
8882
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
10347
8883
|
return { ...nextScopes2, ...currentScope };
|
|
10348
8884
|
}, {});
|
|
10349
|
-
return
|
|
8885
|
+
return React36.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
10350
8886
|
};
|
|
10351
8887
|
};
|
|
10352
8888
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -10354,14 +8890,14 @@ function composeContextScopes3(...scopes) {
|
|
|
10354
8890
|
}
|
|
10355
8891
|
|
|
10356
8892
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
10357
|
-
var
|
|
8893
|
+
var React40 = __toESM(require("react"), 1);
|
|
10358
8894
|
|
|
10359
8895
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
10360
|
-
var
|
|
10361
|
-
var
|
|
10362
|
-
var
|
|
10363
|
-
var
|
|
10364
|
-
var
|
|
8896
|
+
var React37 = __toESM(require("react"), 1);
|
|
8897
|
+
var ReactDOM4 = __toESM(require("react-dom"), 1);
|
|
8898
|
+
var import_react_slot6 = require("@radix-ui/react-slot");
|
|
8899
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
8900
|
+
var NODES2 = [
|
|
10365
8901
|
"a",
|
|
10366
8902
|
"button",
|
|
10367
8903
|
"div",
|
|
@@ -10380,38 +8916,38 @@ var NODES3 = [
|
|
|
10380
8916
|
"svg",
|
|
10381
8917
|
"ul"
|
|
10382
8918
|
];
|
|
10383
|
-
var
|
|
10384
|
-
const
|
|
10385
|
-
const Node2 =
|
|
8919
|
+
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
8920
|
+
const Slot7 = (0, import_react_slot6.createSlot)(`Primitive.${node}`);
|
|
8921
|
+
const Node2 = React37.forwardRef((props, forwardedRef) => {
|
|
10386
8922
|
const { asChild, ...primitiveProps } = props;
|
|
10387
|
-
const Comp = asChild ?
|
|
8923
|
+
const Comp = asChild ? Slot7 : node;
|
|
10388
8924
|
if (typeof window !== "undefined") {
|
|
10389
8925
|
window[Symbol.for("radix-ui")] = true;
|
|
10390
8926
|
}
|
|
10391
|
-
return /* @__PURE__ */ (0,
|
|
8927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
10392
8928
|
});
|
|
10393
8929
|
Node2.displayName = `Primitive.${node}`;
|
|
10394
8930
|
return { ...primitive, [node]: Node2 };
|
|
10395
8931
|
}, {});
|
|
10396
|
-
function
|
|
10397
|
-
if (target)
|
|
8932
|
+
function dispatchDiscreteCustomEvent2(target, event) {
|
|
8933
|
+
if (target) ReactDOM4.flushSync(() => target.dispatchEvent(event));
|
|
10398
8934
|
}
|
|
10399
8935
|
|
|
10400
8936
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
10401
|
-
var
|
|
10402
|
-
function
|
|
10403
|
-
const callbackRef =
|
|
10404
|
-
|
|
8937
|
+
var React38 = __toESM(require("react"), 1);
|
|
8938
|
+
function useCallbackRef3(callback) {
|
|
8939
|
+
const callbackRef = React38.useRef(callback);
|
|
8940
|
+
React38.useEffect(() => {
|
|
10405
8941
|
callbackRef.current = callback;
|
|
10406
8942
|
});
|
|
10407
|
-
return
|
|
8943
|
+
return React38.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
10408
8944
|
}
|
|
10409
8945
|
|
|
10410
8946
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
10411
|
-
var
|
|
10412
|
-
function
|
|
10413
|
-
const onEscapeKeyDown =
|
|
10414
|
-
|
|
8947
|
+
var React39 = __toESM(require("react"), 1);
|
|
8948
|
+
function useEscapeKeydown2(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
8949
|
+
const onEscapeKeyDown = useCallbackRef3(onEscapeKeyDownProp);
|
|
8950
|
+
React39.useEffect(() => {
|
|
10415
8951
|
const handleKeyDown = (event) => {
|
|
10416
8952
|
if (event.key === "Escape") {
|
|
10417
8953
|
onEscapeKeyDown(event);
|
|
@@ -10423,18 +8959,18 @@ function useEscapeKeydown3(onEscapeKeyDownProp, ownerDocument = globalThis?.docu
|
|
|
10423
8959
|
}
|
|
10424
8960
|
|
|
10425
8961
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
10426
|
-
var
|
|
10427
|
-
var
|
|
10428
|
-
var
|
|
10429
|
-
var
|
|
10430
|
-
var
|
|
10431
|
-
var
|
|
10432
|
-
var
|
|
8962
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
8963
|
+
var DISMISSABLE_LAYER_NAME2 = "DismissableLayer";
|
|
8964
|
+
var CONTEXT_UPDATE2 = "dismissableLayer.update";
|
|
8965
|
+
var POINTER_DOWN_OUTSIDE2 = "dismissableLayer.pointerDownOutside";
|
|
8966
|
+
var FOCUS_OUTSIDE2 = "dismissableLayer.focusOutside";
|
|
8967
|
+
var originalBodyPointerEvents2;
|
|
8968
|
+
var DismissableLayerContext2 = React40.createContext({
|
|
10433
8969
|
layers: /* @__PURE__ */ new Set(),
|
|
10434
8970
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
10435
8971
|
branches: /* @__PURE__ */ new Set()
|
|
10436
8972
|
});
|
|
10437
|
-
var
|
|
8973
|
+
var DismissableLayer2 = React40.forwardRef(
|
|
10438
8974
|
(props, forwardedRef) => {
|
|
10439
8975
|
const {
|
|
10440
8976
|
disableOutsidePointerEvents = false,
|
|
@@ -10445,18 +8981,18 @@ var DismissableLayer3 = React57.forwardRef(
|
|
|
10445
8981
|
onDismiss,
|
|
10446
8982
|
...layerProps
|
|
10447
8983
|
} = props;
|
|
10448
|
-
const context =
|
|
10449
|
-
const [node, setNode] =
|
|
8984
|
+
const context = React40.useContext(DismissableLayerContext2);
|
|
8985
|
+
const [node, setNode] = React40.useState(null);
|
|
10450
8986
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
10451
|
-
const [, force] =
|
|
10452
|
-
const composedRefs =
|
|
8987
|
+
const [, force] = React40.useState({});
|
|
8988
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node2) => setNode(node2));
|
|
10453
8989
|
const layers = Array.from(context.layers);
|
|
10454
8990
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
10455
8991
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
10456
8992
|
const index2 = node ? layers.indexOf(node) : -1;
|
|
10457
8993
|
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
10458
8994
|
const isPointerEventsEnabled = index2 >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
10459
|
-
const pointerDownOutside =
|
|
8995
|
+
const pointerDownOutside = usePointerDownOutside2((event) => {
|
|
10460
8996
|
const target = event.target;
|
|
10461
8997
|
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
10462
8998
|
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
@@ -10464,7 +9000,7 @@ var DismissableLayer3 = React57.forwardRef(
|
|
|
10464
9000
|
onInteractOutside?.(event);
|
|
10465
9001
|
if (!event.defaultPrevented) onDismiss?.();
|
|
10466
9002
|
}, ownerDocument);
|
|
10467
|
-
const focusOutside =
|
|
9003
|
+
const focusOutside = useFocusOutside2((event) => {
|
|
10468
9004
|
const target = event.target;
|
|
10469
9005
|
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
10470
9006
|
if (isFocusInBranch) return;
|
|
@@ -10472,7 +9008,7 @@ var DismissableLayer3 = React57.forwardRef(
|
|
|
10472
9008
|
onInteractOutside?.(event);
|
|
10473
9009
|
if (!event.defaultPrevented) onDismiss?.();
|
|
10474
9010
|
}, ownerDocument);
|
|
10475
|
-
|
|
9011
|
+
useEscapeKeydown2((event) => {
|
|
10476
9012
|
const isHighestLayer = index2 === context.layers.size - 1;
|
|
10477
9013
|
if (!isHighestLayer) return;
|
|
10478
9014
|
onEscapeKeyDown?.(event);
|
|
@@ -10481,38 +9017,38 @@ var DismissableLayer3 = React57.forwardRef(
|
|
|
10481
9017
|
onDismiss();
|
|
10482
9018
|
}
|
|
10483
9019
|
}, ownerDocument);
|
|
10484
|
-
|
|
9020
|
+
React40.useEffect(() => {
|
|
10485
9021
|
if (!node) return;
|
|
10486
9022
|
if (disableOutsidePointerEvents) {
|
|
10487
9023
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
10488
|
-
|
|
9024
|
+
originalBodyPointerEvents2 = ownerDocument.body.style.pointerEvents;
|
|
10489
9025
|
ownerDocument.body.style.pointerEvents = "none";
|
|
10490
9026
|
}
|
|
10491
9027
|
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
10492
9028
|
}
|
|
10493
9029
|
context.layers.add(node);
|
|
10494
|
-
|
|
9030
|
+
dispatchUpdate2();
|
|
10495
9031
|
return () => {
|
|
10496
9032
|
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
|
10497
|
-
ownerDocument.body.style.pointerEvents =
|
|
9033
|
+
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents2;
|
|
10498
9034
|
}
|
|
10499
9035
|
};
|
|
10500
9036
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
10501
|
-
|
|
9037
|
+
React40.useEffect(() => {
|
|
10502
9038
|
return () => {
|
|
10503
9039
|
if (!node) return;
|
|
10504
9040
|
context.layers.delete(node);
|
|
10505
9041
|
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
10506
|
-
|
|
9042
|
+
dispatchUpdate2();
|
|
10507
9043
|
};
|
|
10508
9044
|
}, [node, context]);
|
|
10509
|
-
|
|
9045
|
+
React40.useEffect(() => {
|
|
10510
9046
|
const handleUpdate = () => force({});
|
|
10511
|
-
document.addEventListener(
|
|
10512
|
-
return () => document.removeEventListener(
|
|
9047
|
+
document.addEventListener(CONTEXT_UPDATE2, handleUpdate);
|
|
9048
|
+
return () => document.removeEventListener(CONTEXT_UPDATE2, handleUpdate);
|
|
10513
9049
|
}, []);
|
|
10514
|
-
return /* @__PURE__ */ (0,
|
|
10515
|
-
|
|
9050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
9051
|
+
Primitive2.div,
|
|
10516
9052
|
{
|
|
10517
9053
|
...layerProps,
|
|
10518
9054
|
ref: composedRefs,
|
|
@@ -10520,9 +9056,9 @@ var DismissableLayer3 = React57.forwardRef(
|
|
|
10520
9056
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
10521
9057
|
...props.style
|
|
10522
9058
|
},
|
|
10523
|
-
onFocusCapture:
|
|
10524
|
-
onBlurCapture:
|
|
10525
|
-
onPointerDownCapture:
|
|
9059
|
+
onFocusCapture: composeEventHandlers2(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
9060
|
+
onBlurCapture: composeEventHandlers2(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
9061
|
+
onPointerDownCapture: composeEventHandlers2(
|
|
10526
9062
|
props.onPointerDownCapture,
|
|
10527
9063
|
pointerDownOutside.onPointerDownCapture
|
|
10528
9064
|
)
|
|
@@ -10530,13 +9066,13 @@ var DismissableLayer3 = React57.forwardRef(
|
|
|
10530
9066
|
);
|
|
10531
9067
|
}
|
|
10532
9068
|
);
|
|
10533
|
-
|
|
10534
|
-
var
|
|
10535
|
-
var
|
|
10536
|
-
const context =
|
|
10537
|
-
const ref =
|
|
10538
|
-
const composedRefs =
|
|
10539
|
-
|
|
9069
|
+
DismissableLayer2.displayName = DISMISSABLE_LAYER_NAME2;
|
|
9070
|
+
var BRANCH_NAME2 = "DismissableLayerBranch";
|
|
9071
|
+
var DismissableLayerBranch2 = React40.forwardRef((props, forwardedRef) => {
|
|
9072
|
+
const context = React40.useContext(DismissableLayerContext2);
|
|
9073
|
+
const ref = React40.useRef(null);
|
|
9074
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
9075
|
+
React40.useEffect(() => {
|
|
10540
9076
|
const node = ref.current;
|
|
10541
9077
|
if (node) {
|
|
10542
9078
|
context.branches.add(node);
|
|
@@ -10545,20 +9081,20 @@ var DismissableLayerBranch3 = React57.forwardRef((props, forwardedRef) => {
|
|
|
10545
9081
|
};
|
|
10546
9082
|
}
|
|
10547
9083
|
}, [context.branches]);
|
|
10548
|
-
return /* @__PURE__ */ (0,
|
|
9084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Primitive2.div, { ...props, ref: composedRefs });
|
|
10549
9085
|
});
|
|
10550
|
-
|
|
10551
|
-
function
|
|
10552
|
-
const handlePointerDownOutside =
|
|
10553
|
-
const isPointerInsideReactTreeRef =
|
|
10554
|
-
const handleClickRef =
|
|
9086
|
+
DismissableLayerBranch2.displayName = BRANCH_NAME2;
|
|
9087
|
+
function usePointerDownOutside2(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
9088
|
+
const handlePointerDownOutside = useCallbackRef3(onPointerDownOutside);
|
|
9089
|
+
const isPointerInsideReactTreeRef = React40.useRef(false);
|
|
9090
|
+
const handleClickRef = React40.useRef(() => {
|
|
10555
9091
|
});
|
|
10556
|
-
|
|
9092
|
+
React40.useEffect(() => {
|
|
10557
9093
|
const handlePointerDown = (event) => {
|
|
10558
9094
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
10559
9095
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
10560
|
-
|
|
10561
|
-
|
|
9096
|
+
handleAndDispatchCustomEvent2(
|
|
9097
|
+
POINTER_DOWN_OUTSIDE2,
|
|
10562
9098
|
handlePointerDownOutside,
|
|
10563
9099
|
eventDetail,
|
|
10564
9100
|
{ discrete: true }
|
|
@@ -10592,14 +9128,14 @@ function usePointerDownOutside3(onPointerDownOutside, ownerDocument = globalThis
|
|
|
10592
9128
|
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
10593
9129
|
};
|
|
10594
9130
|
}
|
|
10595
|
-
function
|
|
10596
|
-
const handleFocusOutside =
|
|
10597
|
-
const isFocusInsideReactTreeRef =
|
|
10598
|
-
|
|
9131
|
+
function useFocusOutside2(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
9132
|
+
const handleFocusOutside = useCallbackRef3(onFocusOutside);
|
|
9133
|
+
const isFocusInsideReactTreeRef = React40.useRef(false);
|
|
9134
|
+
React40.useEffect(() => {
|
|
10599
9135
|
const handleFocus = (event) => {
|
|
10600
9136
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
10601
9137
|
const eventDetail = { originalEvent: event };
|
|
10602
|
-
|
|
9138
|
+
handleAndDispatchCustomEvent2(FOCUS_OUTSIDE2, handleFocusOutside, eventDetail, {
|
|
10603
9139
|
discrete: false
|
|
10604
9140
|
});
|
|
10605
9141
|
}
|
|
@@ -10612,39 +9148,39 @@ function useFocusOutside3(onFocusOutside, ownerDocument = globalThis?.document)
|
|
|
10612
9148
|
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
10613
9149
|
};
|
|
10614
9150
|
}
|
|
10615
|
-
function
|
|
10616
|
-
const event = new CustomEvent(
|
|
9151
|
+
function dispatchUpdate2() {
|
|
9152
|
+
const event = new CustomEvent(CONTEXT_UPDATE2);
|
|
10617
9153
|
document.dispatchEvent(event);
|
|
10618
9154
|
}
|
|
10619
|
-
function
|
|
9155
|
+
function handleAndDispatchCustomEvent2(name, handler, detail, { discrete }) {
|
|
10620
9156
|
const target = detail.originalEvent.target;
|
|
10621
9157
|
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
|
10622
9158
|
if (handler) target.addEventListener(name, handler, { once: true });
|
|
10623
9159
|
if (discrete) {
|
|
10624
|
-
|
|
9160
|
+
dispatchDiscreteCustomEvent2(target, event);
|
|
10625
9161
|
} else {
|
|
10626
9162
|
target.dispatchEvent(event);
|
|
10627
9163
|
}
|
|
10628
9164
|
}
|
|
10629
9165
|
|
|
10630
9166
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
10631
|
-
var
|
|
10632
|
-
var
|
|
10633
|
-
function
|
|
10634
|
-
|
|
9167
|
+
var React41 = __toESM(require("react"), 1);
|
|
9168
|
+
var count3 = 0;
|
|
9169
|
+
function useFocusGuards2() {
|
|
9170
|
+
React41.useEffect(() => {
|
|
10635
9171
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
10636
|
-
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ??
|
|
10637
|
-
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ??
|
|
10638
|
-
|
|
9172
|
+
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard2());
|
|
9173
|
+
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard2());
|
|
9174
|
+
count3++;
|
|
10639
9175
|
return () => {
|
|
10640
|
-
if (
|
|
9176
|
+
if (count3 === 1) {
|
|
10641
9177
|
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
10642
9178
|
}
|
|
10643
|
-
|
|
9179
|
+
count3--;
|
|
10644
9180
|
};
|
|
10645
9181
|
}, []);
|
|
10646
9182
|
}
|
|
10647
|
-
function
|
|
9183
|
+
function createFocusGuard2() {
|
|
10648
9184
|
const element = document.createElement("span");
|
|
10649
9185
|
element.setAttribute("data-radix-focus-guard", "");
|
|
10650
9186
|
element.tabIndex = 0;
|
|
@@ -10656,13 +9192,13 @@ function createFocusGuard3() {
|
|
|
10656
9192
|
}
|
|
10657
9193
|
|
|
10658
9194
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
10659
|
-
var
|
|
10660
|
-
var
|
|
10661
|
-
var
|
|
10662
|
-
var
|
|
10663
|
-
var
|
|
10664
|
-
var
|
|
10665
|
-
var
|
|
9195
|
+
var React42 = __toESM(require("react"), 1);
|
|
9196
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
9197
|
+
var AUTOFOCUS_ON_MOUNT2 = "focusScope.autoFocusOnMount";
|
|
9198
|
+
var AUTOFOCUS_ON_UNMOUNT2 = "focusScope.autoFocusOnUnmount";
|
|
9199
|
+
var EVENT_OPTIONS3 = { bubbles: false, cancelable: true };
|
|
9200
|
+
var FOCUS_SCOPE_NAME2 = "FocusScope";
|
|
9201
|
+
var FocusScope2 = React42.forwardRef((props, forwardedRef) => {
|
|
10666
9202
|
const {
|
|
10667
9203
|
loop = false,
|
|
10668
9204
|
trapped = false,
|
|
@@ -10670,12 +9206,12 @@ var FocusScope3 = React59.forwardRef((props, forwardedRef) => {
|
|
|
10670
9206
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
10671
9207
|
...scopeProps
|
|
10672
9208
|
} = props;
|
|
10673
|
-
const [container, setContainer] =
|
|
10674
|
-
const onMountAutoFocus =
|
|
10675
|
-
const onUnmountAutoFocus =
|
|
10676
|
-
const lastFocusedElementRef =
|
|
10677
|
-
const composedRefs =
|
|
10678
|
-
const focusScope =
|
|
9209
|
+
const [container, setContainer] = React42.useState(null);
|
|
9210
|
+
const onMountAutoFocus = useCallbackRef3(onMountAutoFocusProp);
|
|
9211
|
+
const onUnmountAutoFocus = useCallbackRef3(onUnmountAutoFocusProp);
|
|
9212
|
+
const lastFocusedElementRef = React42.useRef(null);
|
|
9213
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContainer(node));
|
|
9214
|
+
const focusScope = React42.useRef({
|
|
10679
9215
|
paused: false,
|
|
10680
9216
|
pause() {
|
|
10681
9217
|
this.paused = true;
|
|
@@ -10684,7 +9220,7 @@ var FocusScope3 = React59.forwardRef((props, forwardedRef) => {
|
|
|
10684
9220
|
this.paused = false;
|
|
10685
9221
|
}
|
|
10686
9222
|
}).current;
|
|
10687
|
-
|
|
9223
|
+
React42.useEffect(() => {
|
|
10688
9224
|
if (trapped) {
|
|
10689
9225
|
let handleFocusIn2 = function(event) {
|
|
10690
9226
|
if (focusScope.paused || !container) return;
|
|
@@ -10692,20 +9228,20 @@ var FocusScope3 = React59.forwardRef((props, forwardedRef) => {
|
|
|
10692
9228
|
if (container.contains(target)) {
|
|
10693
9229
|
lastFocusedElementRef.current = target;
|
|
10694
9230
|
} else {
|
|
10695
|
-
|
|
9231
|
+
focus2(lastFocusedElementRef.current, { select: true });
|
|
10696
9232
|
}
|
|
10697
9233
|
}, handleFocusOut2 = function(event) {
|
|
10698
9234
|
if (focusScope.paused || !container) return;
|
|
10699
9235
|
const relatedTarget = event.relatedTarget;
|
|
10700
9236
|
if (relatedTarget === null) return;
|
|
10701
9237
|
if (!container.contains(relatedTarget)) {
|
|
10702
|
-
|
|
9238
|
+
focus2(lastFocusedElementRef.current, { select: true });
|
|
10703
9239
|
}
|
|
10704
9240
|
}, handleMutations2 = function(mutations) {
|
|
10705
9241
|
const focusedElement = document.activeElement;
|
|
10706
9242
|
if (focusedElement !== document.body) return;
|
|
10707
9243
|
for (const mutation of mutations) {
|
|
10708
|
-
if (mutation.removedNodes.length > 0)
|
|
9244
|
+
if (mutation.removedNodes.length > 0) focus2(container);
|
|
10709
9245
|
}
|
|
10710
9246
|
};
|
|
10711
9247
|
var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
|
|
@@ -10720,38 +9256,38 @@ var FocusScope3 = React59.forwardRef((props, forwardedRef) => {
|
|
|
10720
9256
|
};
|
|
10721
9257
|
}
|
|
10722
9258
|
}, [trapped, container, focusScope.paused]);
|
|
10723
|
-
|
|
9259
|
+
React42.useEffect(() => {
|
|
10724
9260
|
if (container) {
|
|
10725
|
-
|
|
9261
|
+
focusScopesStack2.add(focusScope);
|
|
10726
9262
|
const previouslyFocusedElement = document.activeElement;
|
|
10727
9263
|
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
10728
9264
|
if (!hasFocusedCandidate) {
|
|
10729
|
-
const mountEvent = new CustomEvent(
|
|
10730
|
-
container.addEventListener(
|
|
9265
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT2, EVENT_OPTIONS3);
|
|
9266
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT2, onMountAutoFocus);
|
|
10731
9267
|
container.dispatchEvent(mountEvent);
|
|
10732
9268
|
if (!mountEvent.defaultPrevented) {
|
|
10733
|
-
|
|
9269
|
+
focusFirst4(removeLinks2(getTabbableCandidates2(container)), { select: true });
|
|
10734
9270
|
if (document.activeElement === previouslyFocusedElement) {
|
|
10735
|
-
|
|
9271
|
+
focus2(container);
|
|
10736
9272
|
}
|
|
10737
9273
|
}
|
|
10738
9274
|
}
|
|
10739
9275
|
return () => {
|
|
10740
|
-
container.removeEventListener(
|
|
9276
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT2, onMountAutoFocus);
|
|
10741
9277
|
setTimeout(() => {
|
|
10742
|
-
const unmountEvent = new CustomEvent(
|
|
10743
|
-
container.addEventListener(
|
|
9278
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT2, EVENT_OPTIONS3);
|
|
9279
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT2, onUnmountAutoFocus);
|
|
10744
9280
|
container.dispatchEvent(unmountEvent);
|
|
10745
9281
|
if (!unmountEvent.defaultPrevented) {
|
|
10746
|
-
|
|
9282
|
+
focus2(previouslyFocusedElement ?? document.body, { select: true });
|
|
10747
9283
|
}
|
|
10748
|
-
container.removeEventListener(
|
|
10749
|
-
|
|
9284
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT2, onUnmountAutoFocus);
|
|
9285
|
+
focusScopesStack2.remove(focusScope);
|
|
10750
9286
|
}, 0);
|
|
10751
9287
|
};
|
|
10752
9288
|
}
|
|
10753
9289
|
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
10754
|
-
const handleKeyDown =
|
|
9290
|
+
const handleKeyDown = React42.useCallback(
|
|
10755
9291
|
(event) => {
|
|
10756
9292
|
if (!loop && !trapped) return;
|
|
10757
9293
|
if (focusScope.paused) return;
|
|
@@ -10759,40 +9295,40 @@ var FocusScope3 = React59.forwardRef((props, forwardedRef) => {
|
|
|
10759
9295
|
const focusedElement = document.activeElement;
|
|
10760
9296
|
if (isTabKey && focusedElement) {
|
|
10761
9297
|
const container2 = event.currentTarget;
|
|
10762
|
-
const [first, last] =
|
|
9298
|
+
const [first, last] = getTabbableEdges2(container2);
|
|
10763
9299
|
const hasTabbableElementsInside = first && last;
|
|
10764
9300
|
if (!hasTabbableElementsInside) {
|
|
10765
9301
|
if (focusedElement === container2) event.preventDefault();
|
|
10766
9302
|
} else {
|
|
10767
9303
|
if (!event.shiftKey && focusedElement === last) {
|
|
10768
9304
|
event.preventDefault();
|
|
10769
|
-
if (loop)
|
|
9305
|
+
if (loop) focus2(first, { select: true });
|
|
10770
9306
|
} else if (event.shiftKey && focusedElement === first) {
|
|
10771
9307
|
event.preventDefault();
|
|
10772
|
-
if (loop)
|
|
9308
|
+
if (loop) focus2(last, { select: true });
|
|
10773
9309
|
}
|
|
10774
9310
|
}
|
|
10775
9311
|
}
|
|
10776
9312
|
},
|
|
10777
9313
|
[loop, trapped, focusScope.paused]
|
|
10778
9314
|
);
|
|
10779
|
-
return /* @__PURE__ */ (0,
|
|
9315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Primitive2.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
10780
9316
|
});
|
|
10781
|
-
|
|
10782
|
-
function
|
|
9317
|
+
FocusScope2.displayName = FOCUS_SCOPE_NAME2;
|
|
9318
|
+
function focusFirst4(candidates, { select = false } = {}) {
|
|
10783
9319
|
const previouslyFocusedElement = document.activeElement;
|
|
10784
9320
|
for (const candidate of candidates) {
|
|
10785
|
-
|
|
9321
|
+
focus2(candidate, { select });
|
|
10786
9322
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
10787
9323
|
}
|
|
10788
9324
|
}
|
|
10789
|
-
function
|
|
10790
|
-
const candidates =
|
|
10791
|
-
const first =
|
|
10792
|
-
const last =
|
|
9325
|
+
function getTabbableEdges2(container) {
|
|
9326
|
+
const candidates = getTabbableCandidates2(container);
|
|
9327
|
+
const first = findVisible2(candidates, container);
|
|
9328
|
+
const last = findVisible2(candidates.reverse(), container);
|
|
10793
9329
|
return [first, last];
|
|
10794
9330
|
}
|
|
10795
|
-
function
|
|
9331
|
+
function getTabbableCandidates2(container) {
|
|
10796
9332
|
const nodes = [];
|
|
10797
9333
|
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
10798
9334
|
acceptNode: (node) => {
|
|
@@ -10804,12 +9340,12 @@ function getTabbableCandidates3(container) {
|
|
|
10804
9340
|
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
10805
9341
|
return nodes;
|
|
10806
9342
|
}
|
|
10807
|
-
function
|
|
9343
|
+
function findVisible2(elements, container) {
|
|
10808
9344
|
for (const element of elements) {
|
|
10809
|
-
if (!
|
|
9345
|
+
if (!isHidden2(element, { upTo: container })) return element;
|
|
10810
9346
|
}
|
|
10811
9347
|
}
|
|
10812
|
-
function
|
|
9348
|
+
function isHidden2(node, { upTo }) {
|
|
10813
9349
|
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
10814
9350
|
while (node) {
|
|
10815
9351
|
if (upTo !== void 0 && node === upTo) return false;
|
|
@@ -10818,19 +9354,19 @@ function isHidden3(node, { upTo }) {
|
|
|
10818
9354
|
}
|
|
10819
9355
|
return false;
|
|
10820
9356
|
}
|
|
10821
|
-
function
|
|
9357
|
+
function isSelectableInput2(element) {
|
|
10822
9358
|
return element instanceof HTMLInputElement && "select" in element;
|
|
10823
9359
|
}
|
|
10824
|
-
function
|
|
9360
|
+
function focus2(element, { select = false } = {}) {
|
|
10825
9361
|
if (element && element.focus) {
|
|
10826
9362
|
const previouslyFocusedElement = document.activeElement;
|
|
10827
9363
|
element.focus({ preventScroll: true });
|
|
10828
|
-
if (element !== previouslyFocusedElement &&
|
|
9364
|
+
if (element !== previouslyFocusedElement && isSelectableInput2(element) && select)
|
|
10829
9365
|
element.select();
|
|
10830
9366
|
}
|
|
10831
9367
|
}
|
|
10832
|
-
var
|
|
10833
|
-
function
|
|
9368
|
+
var focusScopesStack2 = createFocusScopesStack2();
|
|
9369
|
+
function createFocusScopesStack2() {
|
|
10834
9370
|
let stack = [];
|
|
10835
9371
|
return {
|
|
10836
9372
|
add(focusScope) {
|
|
@@ -10838,16 +9374,16 @@ function createFocusScopesStack3() {
|
|
|
10838
9374
|
if (focusScope !== activeFocusScope) {
|
|
10839
9375
|
activeFocusScope?.pause();
|
|
10840
9376
|
}
|
|
10841
|
-
stack =
|
|
9377
|
+
stack = arrayRemove2(stack, focusScope);
|
|
10842
9378
|
stack.unshift(focusScope);
|
|
10843
9379
|
},
|
|
10844
9380
|
remove(focusScope) {
|
|
10845
|
-
stack =
|
|
9381
|
+
stack = arrayRemove2(stack, focusScope);
|
|
10846
9382
|
stack[0]?.resume();
|
|
10847
9383
|
}
|
|
10848
9384
|
};
|
|
10849
9385
|
}
|
|
10850
|
-
function
|
|
9386
|
+
function arrayRemove2(array, item) {
|
|
10851
9387
|
const updatedArray = [...array];
|
|
10852
9388
|
const index2 = updatedArray.indexOf(item);
|
|
10853
9389
|
if (index2 !== -1) {
|
|
@@ -10855,40 +9391,40 @@ function arrayRemove3(array, item) {
|
|
|
10855
9391
|
}
|
|
10856
9392
|
return updatedArray;
|
|
10857
9393
|
}
|
|
10858
|
-
function
|
|
9394
|
+
function removeLinks2(items) {
|
|
10859
9395
|
return items.filter((item) => item.tagName !== "A");
|
|
10860
9396
|
}
|
|
10861
9397
|
|
|
10862
9398
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
10863
|
-
var
|
|
9399
|
+
var React44 = __toESM(require("react"), 1);
|
|
10864
9400
|
|
|
10865
9401
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
10866
|
-
var
|
|
10867
|
-
var
|
|
9402
|
+
var React43 = __toESM(require("react"), 1);
|
|
9403
|
+
var useLayoutEffect22 = globalThis?.document ? React43.useLayoutEffect : () => {
|
|
10868
9404
|
};
|
|
10869
9405
|
|
|
10870
9406
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
10871
|
-
var
|
|
10872
|
-
var
|
|
10873
|
-
function
|
|
10874
|
-
const [id, setId] =
|
|
10875
|
-
|
|
10876
|
-
if (!deterministicId) setId((reactId) => reactId ?? String(
|
|
9407
|
+
var useReactId2 = React44[" useId ".trim().toString()] || (() => void 0);
|
|
9408
|
+
var count4 = 0;
|
|
9409
|
+
function useId2(deterministicId) {
|
|
9410
|
+
const [id, setId] = React44.useState(useReactId2());
|
|
9411
|
+
useLayoutEffect22(() => {
|
|
9412
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count4++));
|
|
10877
9413
|
}, [deterministicId]);
|
|
10878
9414
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
10879
9415
|
}
|
|
10880
9416
|
|
|
10881
9417
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
10882
|
-
var
|
|
9418
|
+
var React47 = __toESM(require("react"), 1);
|
|
10883
9419
|
|
|
10884
9420
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-arrow/dist/index.mjs
|
|
10885
|
-
var
|
|
10886
|
-
var
|
|
9421
|
+
var React45 = __toESM(require("react"), 1);
|
|
9422
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
10887
9423
|
var NAME2 = "Arrow";
|
|
10888
|
-
var Arrow3 =
|
|
9424
|
+
var Arrow3 = React45.forwardRef((props, forwardedRef) => {
|
|
10889
9425
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
10890
|
-
return /* @__PURE__ */ (0,
|
|
10891
|
-
|
|
9426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
9427
|
+
Primitive2.svg,
|
|
10892
9428
|
{
|
|
10893
9429
|
...arrowProps,
|
|
10894
9430
|
ref: forwardedRef,
|
|
@@ -10896,7 +9432,7 @@ var Arrow3 = React62.forwardRef((props, forwardedRef) => {
|
|
|
10896
9432
|
height,
|
|
10897
9433
|
viewBox: "0 0 30 10",
|
|
10898
9434
|
preserveAspectRatio: "none",
|
|
10899
|
-
children: props.asChild ? children : /* @__PURE__ */ (0,
|
|
9435
|
+
children: props.asChild ? children : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("polygon", { points: "0,0 30,0 15,10" })
|
|
10900
9436
|
}
|
|
10901
9437
|
);
|
|
10902
9438
|
});
|
|
@@ -10904,10 +9440,10 @@ Arrow3.displayName = NAME2;
|
|
|
10904
9440
|
var Root6 = Arrow3;
|
|
10905
9441
|
|
|
10906
9442
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
10907
|
-
var
|
|
9443
|
+
var React46 = __toESM(require("react"), 1);
|
|
10908
9444
|
function useSize2(element) {
|
|
10909
|
-
const [size4, setSize] =
|
|
10910
|
-
|
|
9445
|
+
const [size4, setSize] = React46.useState(void 0);
|
|
9446
|
+
useLayoutEffect22(() => {
|
|
10911
9447
|
if (element) {
|
|
10912
9448
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
10913
9449
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -10941,33 +9477,33 @@ function useSize2(element) {
|
|
|
10941
9477
|
}
|
|
10942
9478
|
|
|
10943
9479
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
10944
|
-
var
|
|
9480
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
10945
9481
|
var POPPER_NAME2 = "Popper";
|
|
10946
|
-
var [createPopperContext2, createPopperScope2] =
|
|
9482
|
+
var [createPopperContext2, createPopperScope2] = createContextScope2(POPPER_NAME2);
|
|
10947
9483
|
var [PopperProvider2, usePopperContext2] = createPopperContext2(POPPER_NAME2);
|
|
10948
9484
|
var Popper2 = (props) => {
|
|
10949
9485
|
const { __scopePopper, children } = props;
|
|
10950
|
-
const [anchor, setAnchor] =
|
|
10951
|
-
return /* @__PURE__ */ (0,
|
|
9486
|
+
const [anchor, setAnchor] = React47.useState(null);
|
|
9487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PopperProvider2, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
10952
9488
|
};
|
|
10953
9489
|
Popper2.displayName = POPPER_NAME2;
|
|
10954
9490
|
var ANCHOR_NAME3 = "PopperAnchor";
|
|
10955
|
-
var PopperAnchor2 =
|
|
9491
|
+
var PopperAnchor2 = React47.forwardRef(
|
|
10956
9492
|
(props, forwardedRef) => {
|
|
10957
9493
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
10958
9494
|
const context = usePopperContext2(ANCHOR_NAME3, __scopePopper);
|
|
10959
|
-
const ref =
|
|
10960
|
-
const composedRefs =
|
|
10961
|
-
|
|
9495
|
+
const ref = React47.useRef(null);
|
|
9496
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
9497
|
+
React47.useEffect(() => {
|
|
10962
9498
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
10963
9499
|
});
|
|
10964
|
-
return virtualRef ? null : /* @__PURE__ */ (0,
|
|
9500
|
+
return virtualRef ? null : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Primitive2.div, { ...anchorProps, ref: composedRefs });
|
|
10965
9501
|
}
|
|
10966
9502
|
);
|
|
10967
9503
|
PopperAnchor2.displayName = ANCHOR_NAME3;
|
|
10968
|
-
var
|
|
10969
|
-
var [PopperContentProvider2, useContentContext2] = createPopperContext2(
|
|
10970
|
-
var PopperContent2 =
|
|
9504
|
+
var CONTENT_NAME4 = "PopperContent";
|
|
9505
|
+
var [PopperContentProvider2, useContentContext2] = createPopperContext2(CONTENT_NAME4);
|
|
9506
|
+
var PopperContent2 = React47.forwardRef(
|
|
10971
9507
|
(props, forwardedRef) => {
|
|
10972
9508
|
const {
|
|
10973
9509
|
__scopePopper,
|
|
@@ -10985,10 +9521,10 @@ var PopperContent2 = React64.forwardRef(
|
|
|
10985
9521
|
onPlaced,
|
|
10986
9522
|
...contentProps
|
|
10987
9523
|
} = props;
|
|
10988
|
-
const context = usePopperContext2(
|
|
10989
|
-
const [content, setContent] =
|
|
10990
|
-
const composedRefs =
|
|
10991
|
-
const [arrow4, setArrow] =
|
|
9524
|
+
const context = usePopperContext2(CONTENT_NAME4, __scopePopper);
|
|
9525
|
+
const [content, setContent] = React47.useState(null);
|
|
9526
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
9527
|
+
const [arrow4, setArrow] = React47.useState(null);
|
|
10992
9528
|
const arrowSize = useSize2(arrow4);
|
|
10993
9529
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
10994
9530
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -11041,8 +9577,8 @@ var PopperContent2 = React64.forwardRef(
|
|
|
11041
9577
|
]
|
|
11042
9578
|
});
|
|
11043
9579
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement2(placement);
|
|
11044
|
-
const handlePlaced =
|
|
11045
|
-
|
|
9580
|
+
const handlePlaced = useCallbackRef3(onPlaced);
|
|
9581
|
+
useLayoutEffect22(() => {
|
|
11046
9582
|
if (isPositioned) {
|
|
11047
9583
|
handlePlaced?.();
|
|
11048
9584
|
}
|
|
@@ -11050,11 +9586,11 @@ var PopperContent2 = React64.forwardRef(
|
|
|
11050
9586
|
const arrowX = middlewareData.arrow?.x;
|
|
11051
9587
|
const arrowY = middlewareData.arrow?.y;
|
|
11052
9588
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
11053
|
-
const [contentZIndex, setContentZIndex] =
|
|
11054
|
-
|
|
9589
|
+
const [contentZIndex, setContentZIndex] = React47.useState();
|
|
9590
|
+
useLayoutEffect22(() => {
|
|
11055
9591
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
11056
9592
|
}, [content]);
|
|
11057
|
-
return /* @__PURE__ */ (0,
|
|
9593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
11058
9594
|
"div",
|
|
11059
9595
|
{
|
|
11060
9596
|
ref: refs.setFloating,
|
|
@@ -11078,7 +9614,7 @@ var PopperContent2 = React64.forwardRef(
|
|
|
11078
9614
|
}
|
|
11079
9615
|
},
|
|
11080
9616
|
dir: props.dir,
|
|
11081
|
-
children: /* @__PURE__ */ (0,
|
|
9617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
11082
9618
|
PopperContentProvider2,
|
|
11083
9619
|
{
|
|
11084
9620
|
scope: __scopePopper,
|
|
@@ -11087,8 +9623,8 @@ var PopperContent2 = React64.forwardRef(
|
|
|
11087
9623
|
arrowX,
|
|
11088
9624
|
arrowY,
|
|
11089
9625
|
shouldHideArrow: cannotCenterArrow,
|
|
11090
|
-
children: /* @__PURE__ */ (0,
|
|
11091
|
-
|
|
9626
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
9627
|
+
Primitive2.div,
|
|
11092
9628
|
{
|
|
11093
9629
|
"data-side": placedSide,
|
|
11094
9630
|
"data-align": placedAlign,
|
|
@@ -11108,7 +9644,7 @@ var PopperContent2 = React64.forwardRef(
|
|
|
11108
9644
|
);
|
|
11109
9645
|
}
|
|
11110
9646
|
);
|
|
11111
|
-
PopperContent2.displayName =
|
|
9647
|
+
PopperContent2.displayName = CONTENT_NAME4;
|
|
11112
9648
|
var ARROW_NAME4 = "PopperArrow";
|
|
11113
9649
|
var OPPOSITE_SIDE2 = {
|
|
11114
9650
|
top: "bottom",
|
|
@@ -11116,7 +9652,7 @@ var OPPOSITE_SIDE2 = {
|
|
|
11116
9652
|
bottom: "top",
|
|
11117
9653
|
left: "right"
|
|
11118
9654
|
};
|
|
11119
|
-
var PopperArrow3 =
|
|
9655
|
+
var PopperArrow3 = React47.forwardRef(function PopperArrow22(props, forwardedRef) {
|
|
11120
9656
|
const { __scopePopper, ...arrowProps } = props;
|
|
11121
9657
|
const contentContext = useContentContext2(ARROW_NAME4, __scopePopper);
|
|
11122
9658
|
const baseSide = OPPOSITE_SIDE2[contentContext.placedSide];
|
|
@@ -11124,7 +9660,7 @@ var PopperArrow3 = React64.forwardRef(function PopperArrow22(props, forwardedRef
|
|
|
11124
9660
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
11125
9661
|
// doesn't report size as we'd expect on SVG elements.
|
|
11126
9662
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
11127
|
-
/* @__PURE__ */ (0,
|
|
9663
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
11128
9664
|
"span",
|
|
11129
9665
|
{
|
|
11130
9666
|
ref: contentContext.onArrowChange,
|
|
@@ -11147,7 +9683,7 @@ var PopperArrow3 = React64.forwardRef(function PopperArrow22(props, forwardedRef
|
|
|
11147
9683
|
}[contentContext.placedSide],
|
|
11148
9684
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
11149
9685
|
},
|
|
11150
|
-
children: /* @__PURE__ */ (0,
|
|
9686
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
11151
9687
|
Root6,
|
|
11152
9688
|
{
|
|
11153
9689
|
...arrowProps,
|
|
@@ -11208,44 +9744,44 @@ var Content5 = PopperContent2;
|
|
|
11208
9744
|
var Arrow4 = PopperArrow3;
|
|
11209
9745
|
|
|
11210
9746
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
11211
|
-
var
|
|
11212
|
-
var
|
|
11213
|
-
var
|
|
11214
|
-
var
|
|
11215
|
-
var
|
|
9747
|
+
var React48 = __toESM(require("react"), 1);
|
|
9748
|
+
var import_react_dom4 = __toESM(require("react-dom"), 1);
|
|
9749
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
9750
|
+
var PORTAL_NAME4 = "Portal";
|
|
9751
|
+
var Portal4 = React48.forwardRef((props, forwardedRef) => {
|
|
11216
9752
|
const { container: containerProp, ...portalProps } = props;
|
|
11217
|
-
const [mounted, setMounted] =
|
|
11218
|
-
|
|
9753
|
+
const [mounted, setMounted] = React48.useState(false);
|
|
9754
|
+
useLayoutEffect22(() => setMounted(true), []);
|
|
11219
9755
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
11220
|
-
return container ?
|
|
9756
|
+
return container ? import_react_dom4.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Primitive2.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
11221
9757
|
});
|
|
11222
|
-
|
|
9758
|
+
Portal4.displayName = PORTAL_NAME4;
|
|
11223
9759
|
|
|
11224
9760
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
11225
|
-
var
|
|
11226
|
-
var
|
|
11227
|
-
function
|
|
11228
|
-
return
|
|
9761
|
+
var React210 = __toESM(require("react"), 1);
|
|
9762
|
+
var React49 = __toESM(require("react"), 1);
|
|
9763
|
+
function useStateMachine2(initialState, machine) {
|
|
9764
|
+
return React49.useReducer((state, event) => {
|
|
11229
9765
|
const nextState = machine[state][event];
|
|
11230
9766
|
return nextState ?? state;
|
|
11231
9767
|
}, initialState);
|
|
11232
9768
|
}
|
|
11233
|
-
var
|
|
9769
|
+
var Presence2 = (props) => {
|
|
11234
9770
|
const { present, children } = props;
|
|
11235
|
-
const presence =
|
|
11236
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) :
|
|
11237
|
-
const ref =
|
|
9771
|
+
const presence = usePresence2(present);
|
|
9772
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React210.Children.only(children);
|
|
9773
|
+
const ref = useComposedRefs2(presence.ref, getElementRef2(child));
|
|
11238
9774
|
const forceMount = typeof children === "function";
|
|
11239
|
-
return forceMount || presence.isPresent ?
|
|
9775
|
+
return forceMount || presence.isPresent ? React210.cloneElement(child, { ref }) : null;
|
|
11240
9776
|
};
|
|
11241
|
-
|
|
11242
|
-
function
|
|
11243
|
-
const [node, setNode] =
|
|
11244
|
-
const stylesRef =
|
|
11245
|
-
const prevPresentRef =
|
|
11246
|
-
const prevAnimationNameRef =
|
|
9777
|
+
Presence2.displayName = "Presence";
|
|
9778
|
+
function usePresence2(present) {
|
|
9779
|
+
const [node, setNode] = React210.useState();
|
|
9780
|
+
const stylesRef = React210.useRef(null);
|
|
9781
|
+
const prevPresentRef = React210.useRef(present);
|
|
9782
|
+
const prevAnimationNameRef = React210.useRef("none");
|
|
11247
9783
|
const initialState = present ? "mounted" : "unmounted";
|
|
11248
|
-
const [state, send] =
|
|
9784
|
+
const [state, send] = useStateMachine2(initialState, {
|
|
11249
9785
|
mounted: {
|
|
11250
9786
|
UNMOUNT: "unmounted",
|
|
11251
9787
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -11258,17 +9794,17 @@ function usePresence3(present) {
|
|
|
11258
9794
|
MOUNT: "mounted"
|
|
11259
9795
|
}
|
|
11260
9796
|
});
|
|
11261
|
-
|
|
11262
|
-
const currentAnimationName =
|
|
9797
|
+
React210.useEffect(() => {
|
|
9798
|
+
const currentAnimationName = getAnimationName2(stylesRef.current);
|
|
11263
9799
|
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
11264
9800
|
}, [state]);
|
|
11265
|
-
|
|
9801
|
+
useLayoutEffect22(() => {
|
|
11266
9802
|
const styles = stylesRef.current;
|
|
11267
9803
|
const wasPresent = prevPresentRef.current;
|
|
11268
9804
|
const hasPresentChanged = wasPresent !== present;
|
|
11269
9805
|
if (hasPresentChanged) {
|
|
11270
9806
|
const prevAnimationName = prevAnimationNameRef.current;
|
|
11271
|
-
const currentAnimationName =
|
|
9807
|
+
const currentAnimationName = getAnimationName2(styles);
|
|
11272
9808
|
if (present) {
|
|
11273
9809
|
send("MOUNT");
|
|
11274
9810
|
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
@@ -11284,12 +9820,12 @@ function usePresence3(present) {
|
|
|
11284
9820
|
prevPresentRef.current = present;
|
|
11285
9821
|
}
|
|
11286
9822
|
}, [present, send]);
|
|
11287
|
-
|
|
9823
|
+
useLayoutEffect22(() => {
|
|
11288
9824
|
if (node) {
|
|
11289
9825
|
let timeoutId;
|
|
11290
9826
|
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
11291
9827
|
const handleAnimationEnd = (event) => {
|
|
11292
|
-
const currentAnimationName =
|
|
9828
|
+
const currentAnimationName = getAnimationName2(stylesRef.current);
|
|
11293
9829
|
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
11294
9830
|
if (event.target === node && isCurrentAnimation) {
|
|
11295
9831
|
send("ANIMATION_END");
|
|
@@ -11306,7 +9842,7 @@ function usePresence3(present) {
|
|
|
11306
9842
|
};
|
|
11307
9843
|
const handleAnimationStart = (event) => {
|
|
11308
9844
|
if (event.target === node) {
|
|
11309
|
-
prevAnimationNameRef.current =
|
|
9845
|
+
prevAnimationNameRef.current = getAnimationName2(stylesRef.current);
|
|
11310
9846
|
}
|
|
11311
9847
|
};
|
|
11312
9848
|
node.addEventListener("animationstart", handleAnimationStart);
|
|
@@ -11324,16 +9860,16 @@ function usePresence3(present) {
|
|
|
11324
9860
|
}, [node, send]);
|
|
11325
9861
|
return {
|
|
11326
9862
|
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
11327
|
-
ref:
|
|
9863
|
+
ref: React210.useCallback((node2) => {
|
|
11328
9864
|
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
11329
9865
|
setNode(node2);
|
|
11330
9866
|
}, [])
|
|
11331
9867
|
};
|
|
11332
9868
|
}
|
|
11333
|
-
function
|
|
9869
|
+
function getAnimationName2(styles) {
|
|
11334
9870
|
return styles?.animationName || "none";
|
|
11335
9871
|
}
|
|
11336
|
-
function
|
|
9872
|
+
function getElementRef2(element) {
|
|
11337
9873
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
11338
9874
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
11339
9875
|
if (mayWarn) {
|
|
@@ -11348,28 +9884,28 @@ function getElementRef3(element) {
|
|
|
11348
9884
|
}
|
|
11349
9885
|
|
|
11350
9886
|
// ../../node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
11351
|
-
var
|
|
9887
|
+
var import_react_slot7 = require("@radix-ui/react-slot");
|
|
11352
9888
|
|
|
11353
9889
|
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
11354
|
-
var
|
|
11355
|
-
var
|
|
11356
|
-
var
|
|
11357
|
-
function
|
|
9890
|
+
var React50 = __toESM(require("react"), 1);
|
|
9891
|
+
var React211 = __toESM(require("react"), 1);
|
|
9892
|
+
var useInsertionEffect = React50[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
|
|
9893
|
+
function useControllableState2({
|
|
11358
9894
|
prop,
|
|
11359
9895
|
defaultProp,
|
|
11360
9896
|
onChange = () => {
|
|
11361
9897
|
},
|
|
11362
9898
|
caller
|
|
11363
9899
|
}) {
|
|
11364
|
-
const [uncontrolledProp, setUncontrolledProp, onChangeRef] =
|
|
9900
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState2({
|
|
11365
9901
|
defaultProp,
|
|
11366
9902
|
onChange
|
|
11367
9903
|
});
|
|
11368
9904
|
const isControlled = prop !== void 0;
|
|
11369
9905
|
const value = isControlled ? prop : uncontrolledProp;
|
|
11370
9906
|
if (true) {
|
|
11371
|
-
const isControlledRef =
|
|
11372
|
-
|
|
9907
|
+
const isControlledRef = React50.useRef(prop !== void 0);
|
|
9908
|
+
React50.useEffect(() => {
|
|
11373
9909
|
const wasControlled = isControlledRef.current;
|
|
11374
9910
|
if (wasControlled !== isControlled) {
|
|
11375
9911
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -11381,10 +9917,10 @@ function useControllableState3({
|
|
|
11381
9917
|
isControlledRef.current = isControlled;
|
|
11382
9918
|
}, [isControlled, caller]);
|
|
11383
9919
|
}
|
|
11384
|
-
const setValue =
|
|
9920
|
+
const setValue = React50.useCallback(
|
|
11385
9921
|
(nextValue) => {
|
|
11386
9922
|
if (isControlled) {
|
|
11387
|
-
const value2 =
|
|
9923
|
+
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
11388
9924
|
if (value2 !== prop) {
|
|
11389
9925
|
onChangeRef.current?.(value2);
|
|
11390
9926
|
}
|
|
@@ -11396,17 +9932,17 @@ function useControllableState3({
|
|
|
11396
9932
|
);
|
|
11397
9933
|
return [value, setValue];
|
|
11398
9934
|
}
|
|
11399
|
-
function
|
|
9935
|
+
function useUncontrolledState2({
|
|
11400
9936
|
defaultProp,
|
|
11401
9937
|
onChange
|
|
11402
9938
|
}) {
|
|
11403
|
-
const [value, setValue] =
|
|
11404
|
-
const prevValueRef =
|
|
11405
|
-
const onChangeRef =
|
|
11406
|
-
|
|
9939
|
+
const [value, setValue] = React50.useState(defaultProp);
|
|
9940
|
+
const prevValueRef = React50.useRef(value);
|
|
9941
|
+
const onChangeRef = React50.useRef(onChange);
|
|
9942
|
+
useInsertionEffect(() => {
|
|
11407
9943
|
onChangeRef.current = onChange;
|
|
11408
9944
|
}, [onChange]);
|
|
11409
|
-
|
|
9945
|
+
React50.useEffect(() => {
|
|
11410
9946
|
if (prevValueRef.current !== value) {
|
|
11411
9947
|
onChangeRef.current?.(value);
|
|
11412
9948
|
prevValueRef.current = value;
|
|
@@ -11414,79 +9950,79 @@ function useUncontrolledState3({
|
|
|
11414
9950
|
}, [value, prevValueRef]);
|
|
11415
9951
|
return [value, setValue, onChangeRef];
|
|
11416
9952
|
}
|
|
11417
|
-
function
|
|
9953
|
+
function isFunction(value) {
|
|
11418
9954
|
return typeof value === "function";
|
|
11419
9955
|
}
|
|
11420
|
-
var
|
|
9956
|
+
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
11421
9957
|
|
|
11422
9958
|
// ../../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
11423
|
-
var
|
|
9959
|
+
var React53 = __toESM(require("react"));
|
|
11424
9960
|
|
|
11425
9961
|
// ../../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
11426
|
-
var
|
|
9962
|
+
var React51 = __toESM(require("react"));
|
|
11427
9963
|
|
|
11428
9964
|
// ../../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
11429
|
-
var
|
|
9965
|
+
var effectCar2 = createSidecarMedium();
|
|
11430
9966
|
|
|
11431
9967
|
// ../../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
11432
|
-
var
|
|
9968
|
+
var nothing2 = function() {
|
|
11433
9969
|
return;
|
|
11434
9970
|
};
|
|
11435
|
-
var
|
|
11436
|
-
var ref =
|
|
11437
|
-
var _a =
|
|
11438
|
-
onScrollCapture:
|
|
11439
|
-
onWheelCapture:
|
|
11440
|
-
onTouchMoveCapture:
|
|
9971
|
+
var RemoveScroll2 = React51.forwardRef(function(props, parentRef) {
|
|
9972
|
+
var ref = React51.useRef(null);
|
|
9973
|
+
var _a = React51.useState({
|
|
9974
|
+
onScrollCapture: nothing2,
|
|
9975
|
+
onWheelCapture: nothing2,
|
|
9976
|
+
onTouchMoveCapture: nothing2
|
|
11441
9977
|
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
11442
9978
|
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
11443
9979
|
var SideCar2 = sideCar;
|
|
11444
9980
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
11445
9981
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
11446
|
-
return
|
|
11447
|
-
|
|
9982
|
+
return React51.createElement(
|
|
9983
|
+
React51.Fragment,
|
|
11448
9984
|
null,
|
|
11449
|
-
enabled &&
|
|
11450
|
-
forwardProps ?
|
|
9985
|
+
enabled && React51.createElement(SideCar2, { sideCar: effectCar2, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
9986
|
+
forwardProps ? React51.cloneElement(React51.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React51.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
11451
9987
|
);
|
|
11452
9988
|
});
|
|
11453
|
-
|
|
9989
|
+
RemoveScroll2.defaultProps = {
|
|
11454
9990
|
enabled: true,
|
|
11455
9991
|
removeScrollBar: true,
|
|
11456
9992
|
inert: false
|
|
11457
9993
|
};
|
|
11458
|
-
|
|
9994
|
+
RemoveScroll2.classNames = {
|
|
11459
9995
|
fullWidth: fullWidthClassName,
|
|
11460
9996
|
zeroRight: zeroRightClassName
|
|
11461
9997
|
};
|
|
11462
9998
|
|
|
11463
9999
|
// ../../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
11464
|
-
var
|
|
10000
|
+
var React52 = __toESM(require("react"));
|
|
11465
10001
|
|
|
11466
10002
|
// ../../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
11467
|
-
var
|
|
10003
|
+
var passiveSupported2 = false;
|
|
11468
10004
|
if (typeof window !== "undefined") {
|
|
11469
10005
|
try {
|
|
11470
10006
|
options = Object.defineProperty({}, "passive", {
|
|
11471
10007
|
get: function() {
|
|
11472
|
-
|
|
10008
|
+
passiveSupported2 = true;
|
|
11473
10009
|
return true;
|
|
11474
10010
|
}
|
|
11475
10011
|
});
|
|
11476
10012
|
window.addEventListener("test", options, options);
|
|
11477
10013
|
window.removeEventListener("test", options, options);
|
|
11478
10014
|
} catch (err) {
|
|
11479
|
-
|
|
10015
|
+
passiveSupported2 = false;
|
|
11480
10016
|
}
|
|
11481
10017
|
}
|
|
11482
10018
|
var options;
|
|
11483
|
-
var
|
|
10019
|
+
var nonPassive2 = passiveSupported2 ? { passive: false } : false;
|
|
11484
10020
|
|
|
11485
10021
|
// ../../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
|
11486
|
-
var
|
|
10022
|
+
var alwaysContainsScroll2 = function(node) {
|
|
11487
10023
|
return node.tagName === "TEXTAREA";
|
|
11488
10024
|
};
|
|
11489
|
-
var
|
|
10025
|
+
var elementCanBeScrolled2 = function(node, overflow) {
|
|
11490
10026
|
if (!(node instanceof Element)) {
|
|
11491
10027
|
return false;
|
|
11492
10028
|
}
|
|
@@ -11494,25 +10030,25 @@ var elementCanBeScrolled3 = function(node, overflow) {
|
|
|
11494
10030
|
return (
|
|
11495
10031
|
// not-not-scrollable
|
|
11496
10032
|
styles[overflow] !== "hidden" && // contains scroll inside self
|
|
11497
|
-
!(styles.overflowY === styles.overflowX && !
|
|
10033
|
+
!(styles.overflowY === styles.overflowX && !alwaysContainsScroll2(node) && styles[overflow] === "visible")
|
|
11498
10034
|
);
|
|
11499
10035
|
};
|
|
11500
|
-
var
|
|
11501
|
-
return
|
|
10036
|
+
var elementCouldBeVScrolled2 = function(node) {
|
|
10037
|
+
return elementCanBeScrolled2(node, "overflowY");
|
|
11502
10038
|
};
|
|
11503
|
-
var
|
|
11504
|
-
return
|
|
10039
|
+
var elementCouldBeHScrolled2 = function(node) {
|
|
10040
|
+
return elementCanBeScrolled2(node, "overflowX");
|
|
11505
10041
|
};
|
|
11506
|
-
var
|
|
10042
|
+
var locationCouldBeScrolled2 = function(axis, node) {
|
|
11507
10043
|
var ownerDocument = node.ownerDocument;
|
|
11508
10044
|
var current = node;
|
|
11509
10045
|
do {
|
|
11510
10046
|
if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
|
|
11511
10047
|
current = current.host;
|
|
11512
10048
|
}
|
|
11513
|
-
var isScrollable =
|
|
10049
|
+
var isScrollable = elementCouldBeScrolled2(axis, current);
|
|
11514
10050
|
if (isScrollable) {
|
|
11515
|
-
var _a =
|
|
10051
|
+
var _a = getScrollVariables2(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
|
|
11516
10052
|
if (scrollHeight > clientHeight) {
|
|
11517
10053
|
return true;
|
|
11518
10054
|
}
|
|
@@ -11521,7 +10057,7 @@ var locationCouldBeScrolled3 = function(axis, node) {
|
|
|
11521
10057
|
} while (current && current !== ownerDocument.body);
|
|
11522
10058
|
return false;
|
|
11523
10059
|
};
|
|
11524
|
-
var
|
|
10060
|
+
var getVScrollVariables2 = function(_a) {
|
|
11525
10061
|
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
|
11526
10062
|
return [
|
|
11527
10063
|
scrollTop,
|
|
@@ -11529,7 +10065,7 @@ var getVScrollVariables3 = function(_a) {
|
|
|
11529
10065
|
clientHeight
|
|
11530
10066
|
];
|
|
11531
10067
|
};
|
|
11532
|
-
var
|
|
10068
|
+
var getHScrollVariables2 = function(_a) {
|
|
11533
10069
|
var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
|
|
11534
10070
|
return [
|
|
11535
10071
|
scrollLeft,
|
|
@@ -11537,17 +10073,17 @@ var getHScrollVariables3 = function(_a) {
|
|
|
11537
10073
|
clientWidth
|
|
11538
10074
|
];
|
|
11539
10075
|
};
|
|
11540
|
-
var
|
|
11541
|
-
return axis === "v" ?
|
|
10076
|
+
var elementCouldBeScrolled2 = function(axis, node) {
|
|
10077
|
+
return axis === "v" ? elementCouldBeVScrolled2(node) : elementCouldBeHScrolled2(node);
|
|
11542
10078
|
};
|
|
11543
|
-
var
|
|
11544
|
-
return axis === "v" ?
|
|
10079
|
+
var getScrollVariables2 = function(axis, node) {
|
|
10080
|
+
return axis === "v" ? getVScrollVariables2(node) : getHScrollVariables2(node);
|
|
11545
10081
|
};
|
|
11546
|
-
var
|
|
10082
|
+
var getDirectionFactor2 = function(axis, direction) {
|
|
11547
10083
|
return axis === "h" && direction === "rtl" ? -1 : 1;
|
|
11548
10084
|
};
|
|
11549
|
-
var
|
|
11550
|
-
var directionFactor =
|
|
10085
|
+
var handleScroll2 = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
10086
|
+
var directionFactor = getDirectionFactor2(axis, window.getComputedStyle(endTarget).direction);
|
|
11551
10087
|
var delta = directionFactor * sourceDelta;
|
|
11552
10088
|
var target = event.target;
|
|
11553
10089
|
var targetInLock = endTarget.contains(target);
|
|
@@ -11556,10 +10092,10 @@ var handleScroll3 = function(axis, endTarget, event, sourceDelta, noOverscroll)
|
|
|
11556
10092
|
var availableScroll = 0;
|
|
11557
10093
|
var availableScrollTop = 0;
|
|
11558
10094
|
do {
|
|
11559
|
-
var _a =
|
|
10095
|
+
var _a = getScrollVariables2(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
|
|
11560
10096
|
var elementScroll = scroll_1 - capacity - directionFactor * position;
|
|
11561
10097
|
if (position || elementScroll) {
|
|
11562
|
-
if (
|
|
10098
|
+
if (elementCouldBeScrolled2(axis, target)) {
|
|
11563
10099
|
availableScroll += elementScroll;
|
|
11564
10100
|
availableScrollTop += position;
|
|
11565
10101
|
}
|
|
@@ -11579,37 +10115,37 @@ var handleScroll3 = function(axis, endTarget, event, sourceDelta, noOverscroll)
|
|
|
11579
10115
|
};
|
|
11580
10116
|
|
|
11581
10117
|
// ../../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
11582
|
-
var
|
|
10118
|
+
var getTouchXY2 = function(event) {
|
|
11583
10119
|
return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
11584
10120
|
};
|
|
11585
|
-
var
|
|
10121
|
+
var getDeltaXY2 = function(event) {
|
|
11586
10122
|
return [event.deltaX, event.deltaY];
|
|
11587
10123
|
};
|
|
11588
|
-
var
|
|
10124
|
+
var extractRef2 = function(ref) {
|
|
11589
10125
|
return ref && "current" in ref ? ref.current : ref;
|
|
11590
10126
|
};
|
|
11591
|
-
var
|
|
10127
|
+
var deltaCompare2 = function(x, y) {
|
|
11592
10128
|
return x[0] === y[0] && x[1] === y[1];
|
|
11593
10129
|
};
|
|
11594
|
-
var
|
|
10130
|
+
var generateStyle2 = function(id) {
|
|
11595
10131
|
return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
|
|
11596
10132
|
};
|
|
11597
|
-
var
|
|
11598
|
-
var
|
|
11599
|
-
function
|
|
11600
|
-
var shouldPreventQueue =
|
|
11601
|
-
var touchStartRef =
|
|
11602
|
-
var activeAxis =
|
|
11603
|
-
var id =
|
|
11604
|
-
var Style2 =
|
|
11605
|
-
var lastProps =
|
|
11606
|
-
|
|
10133
|
+
var idCounter2 = 0;
|
|
10134
|
+
var lockStack2 = [];
|
|
10135
|
+
function RemoveScrollSideCar2(props) {
|
|
10136
|
+
var shouldPreventQueue = React52.useRef([]);
|
|
10137
|
+
var touchStartRef = React52.useRef([0, 0]);
|
|
10138
|
+
var activeAxis = React52.useRef();
|
|
10139
|
+
var id = React52.useState(idCounter2++)[0];
|
|
10140
|
+
var Style2 = React52.useState(styleSingleton)[0];
|
|
10141
|
+
var lastProps = React52.useRef(props);
|
|
10142
|
+
React52.useEffect(function() {
|
|
11607
10143
|
lastProps.current = props;
|
|
11608
10144
|
}, [props]);
|
|
11609
|
-
|
|
10145
|
+
React52.useEffect(function() {
|
|
11610
10146
|
if (props.inert) {
|
|
11611
10147
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
11612
|
-
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(
|
|
10148
|
+
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef2), true).filter(Boolean);
|
|
11613
10149
|
allow_1.forEach(function(el) {
|
|
11614
10150
|
return el.classList.add("allow-interactivity-".concat(id));
|
|
11615
10151
|
});
|
|
@@ -11622,11 +10158,11 @@ function RemoveScrollSideCar3(props) {
|
|
|
11622
10158
|
}
|
|
11623
10159
|
return;
|
|
11624
10160
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
11625
|
-
var shouldCancelEvent =
|
|
10161
|
+
var shouldCancelEvent = React52.useCallback(function(event, parent) {
|
|
11626
10162
|
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
11627
10163
|
return !lastProps.current.allowPinchZoom;
|
|
11628
10164
|
}
|
|
11629
|
-
var touch =
|
|
10165
|
+
var touch = getTouchXY2(event);
|
|
11630
10166
|
var touchStart = touchStartRef.current;
|
|
11631
10167
|
var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
|
|
11632
10168
|
var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
|
|
@@ -11636,7 +10172,7 @@ function RemoveScrollSideCar3(props) {
|
|
|
11636
10172
|
if ("touches" in event && moveDirection === "h" && target.type === "range") {
|
|
11637
10173
|
return false;
|
|
11638
10174
|
}
|
|
11639
|
-
var canBeScrolledInMainDirection =
|
|
10175
|
+
var canBeScrolledInMainDirection = locationCouldBeScrolled2(moveDirection, target);
|
|
11640
10176
|
if (!canBeScrolledInMainDirection) {
|
|
11641
10177
|
return true;
|
|
11642
10178
|
}
|
|
@@ -11644,7 +10180,7 @@ function RemoveScrollSideCar3(props) {
|
|
|
11644
10180
|
currentAxis = moveDirection;
|
|
11645
10181
|
} else {
|
|
11646
10182
|
currentAxis = moveDirection === "v" ? "h" : "v";
|
|
11647
|
-
canBeScrolledInMainDirection =
|
|
10183
|
+
canBeScrolledInMainDirection = locationCouldBeScrolled2(moveDirection, target);
|
|
11648
10184
|
}
|
|
11649
10185
|
if (!canBeScrolledInMainDirection) {
|
|
11650
10186
|
return false;
|
|
@@ -11656,16 +10192,16 @@ function RemoveScrollSideCar3(props) {
|
|
|
11656
10192
|
return true;
|
|
11657
10193
|
}
|
|
11658
10194
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
11659
|
-
return
|
|
10195
|
+
return handleScroll2(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
11660
10196
|
}, []);
|
|
11661
|
-
var shouldPrevent =
|
|
10197
|
+
var shouldPrevent = React52.useCallback(function(_event) {
|
|
11662
10198
|
var event = _event;
|
|
11663
|
-
if (!
|
|
10199
|
+
if (!lockStack2.length || lockStack2[lockStack2.length - 1] !== Style2) {
|
|
11664
10200
|
return;
|
|
11665
10201
|
}
|
|
11666
|
-
var delta = "deltaY" in event ?
|
|
10202
|
+
var delta = "deltaY" in event ? getDeltaXY2(event) : getTouchXY2(event);
|
|
11667
10203
|
var sourceEvent = shouldPreventQueue.current.filter(function(e) {
|
|
11668
|
-
return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) &&
|
|
10204
|
+
return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare2(e.delta, delta);
|
|
11669
10205
|
})[0];
|
|
11670
10206
|
if (sourceEvent && sourceEvent.should) {
|
|
11671
10207
|
if (event.cancelable) {
|
|
@@ -11674,7 +10210,7 @@ function RemoveScrollSideCar3(props) {
|
|
|
11674
10210
|
return;
|
|
11675
10211
|
}
|
|
11676
10212
|
if (!sourceEvent) {
|
|
11677
|
-
var shardNodes = (lastProps.current.shards || []).map(
|
|
10213
|
+
var shardNodes = (lastProps.current.shards || []).map(extractRef2).filter(Boolean).filter(function(node) {
|
|
11678
10214
|
return node.contains(event.target);
|
|
11679
10215
|
});
|
|
11680
10216
|
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
|
|
@@ -11685,8 +10221,8 @@ function RemoveScrollSideCar3(props) {
|
|
|
11685
10221
|
}
|
|
11686
10222
|
}
|
|
11687
10223
|
}, []);
|
|
11688
|
-
var shouldCancel =
|
|
11689
|
-
var event = { name, delta, target, should, shadowParent:
|
|
10224
|
+
var shouldCancel = React52.useCallback(function(name, delta, target, should) {
|
|
10225
|
+
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent2(target) };
|
|
11690
10226
|
shouldPreventQueue.current.push(event);
|
|
11691
10227
|
setTimeout(function() {
|
|
11692
10228
|
shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
|
|
@@ -11694,44 +10230,44 @@ function RemoveScrollSideCar3(props) {
|
|
|
11694
10230
|
});
|
|
11695
10231
|
}, 1);
|
|
11696
10232
|
}, []);
|
|
11697
|
-
var scrollTouchStart =
|
|
11698
|
-
touchStartRef.current =
|
|
10233
|
+
var scrollTouchStart = React52.useCallback(function(event) {
|
|
10234
|
+
touchStartRef.current = getTouchXY2(event);
|
|
11699
10235
|
activeAxis.current = void 0;
|
|
11700
10236
|
}, []);
|
|
11701
|
-
var scrollWheel =
|
|
11702
|
-
shouldCancel(event.type,
|
|
10237
|
+
var scrollWheel = React52.useCallback(function(event) {
|
|
10238
|
+
shouldCancel(event.type, getDeltaXY2(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
11703
10239
|
}, []);
|
|
11704
|
-
var scrollTouchMove =
|
|
11705
|
-
shouldCancel(event.type,
|
|
10240
|
+
var scrollTouchMove = React52.useCallback(function(event) {
|
|
10241
|
+
shouldCancel(event.type, getTouchXY2(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
11706
10242
|
}, []);
|
|
11707
|
-
|
|
11708
|
-
|
|
10243
|
+
React52.useEffect(function() {
|
|
10244
|
+
lockStack2.push(Style2);
|
|
11709
10245
|
props.setCallbacks({
|
|
11710
10246
|
onScrollCapture: scrollWheel,
|
|
11711
10247
|
onWheelCapture: scrollWheel,
|
|
11712
10248
|
onTouchMoveCapture: scrollTouchMove
|
|
11713
10249
|
});
|
|
11714
|
-
document.addEventListener("wheel", shouldPrevent,
|
|
11715
|
-
document.addEventListener("touchmove", shouldPrevent,
|
|
11716
|
-
document.addEventListener("touchstart", scrollTouchStart,
|
|
10250
|
+
document.addEventListener("wheel", shouldPrevent, nonPassive2);
|
|
10251
|
+
document.addEventListener("touchmove", shouldPrevent, nonPassive2);
|
|
10252
|
+
document.addEventListener("touchstart", scrollTouchStart, nonPassive2);
|
|
11717
10253
|
return function() {
|
|
11718
|
-
|
|
10254
|
+
lockStack2 = lockStack2.filter(function(inst) {
|
|
11719
10255
|
return inst !== Style2;
|
|
11720
10256
|
});
|
|
11721
|
-
document.removeEventListener("wheel", shouldPrevent,
|
|
11722
|
-
document.removeEventListener("touchmove", shouldPrevent,
|
|
11723
|
-
document.removeEventListener("touchstart", scrollTouchStart,
|
|
10257
|
+
document.removeEventListener("wheel", shouldPrevent, nonPassive2);
|
|
10258
|
+
document.removeEventListener("touchmove", shouldPrevent, nonPassive2);
|
|
10259
|
+
document.removeEventListener("touchstart", scrollTouchStart, nonPassive2);
|
|
11724
10260
|
};
|
|
11725
10261
|
}, []);
|
|
11726
10262
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
11727
|
-
return
|
|
11728
|
-
|
|
10263
|
+
return React52.createElement(
|
|
10264
|
+
React52.Fragment,
|
|
11729
10265
|
null,
|
|
11730
|
-
inert ?
|
|
11731
|
-
removeScrollBar ?
|
|
10266
|
+
inert ? React52.createElement(Style2, { styles: generateStyle2(id) }) : null,
|
|
10267
|
+
removeScrollBar ? React52.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
11732
10268
|
);
|
|
11733
10269
|
}
|
|
11734
|
-
function
|
|
10270
|
+
function getOutermostShadowParent2(node) {
|
|
11735
10271
|
var shadowParent = null;
|
|
11736
10272
|
while (node !== null) {
|
|
11737
10273
|
if (node instanceof ShadowRoot) {
|
|
@@ -11744,19 +10280,19 @@ function getOutermostShadowParent3(node) {
|
|
|
11744
10280
|
}
|
|
11745
10281
|
|
|
11746
10282
|
// ../../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
11747
|
-
var
|
|
10283
|
+
var sidecar_default2 = exportSidecar(effectCar2, RemoveScrollSideCar2);
|
|
11748
10284
|
|
|
11749
10285
|
// ../../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
11750
|
-
var
|
|
11751
|
-
return
|
|
10286
|
+
var ReactRemoveScroll2 = React53.forwardRef(function(props, ref) {
|
|
10287
|
+
return React53.createElement(RemoveScroll2, __assign({}, props, { ref, sideCar: sidecar_default2 }));
|
|
11752
10288
|
});
|
|
11753
|
-
|
|
11754
|
-
var
|
|
10289
|
+
ReactRemoveScroll2.classNames = RemoveScroll2.classNames;
|
|
10290
|
+
var Combination_default2 = ReactRemoveScroll2;
|
|
11755
10291
|
|
|
11756
10292
|
// ../../node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
11757
|
-
var
|
|
10293
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
11758
10294
|
var POPOVER_NAME = "Popover";
|
|
11759
|
-
var [createPopoverContext, createPopoverScope] =
|
|
10295
|
+
var [createPopoverContext, createPopoverScope] = createContextScope2(POPOVER_NAME, [
|
|
11760
10296
|
createPopperScope2
|
|
11761
10297
|
]);
|
|
11762
10298
|
var usePopperScope2 = createPopperScope2();
|
|
@@ -11771,26 +10307,26 @@ var Popover = (props) => {
|
|
|
11771
10307
|
modal = false
|
|
11772
10308
|
} = props;
|
|
11773
10309
|
const popperScope = usePopperScope2(__scopePopover);
|
|
11774
|
-
const triggerRef =
|
|
11775
|
-
const [hasCustomAnchor, setHasCustomAnchor] =
|
|
11776
|
-
const [open, setOpen] =
|
|
10310
|
+
const triggerRef = React54.useRef(null);
|
|
10311
|
+
const [hasCustomAnchor, setHasCustomAnchor] = React54.useState(false);
|
|
10312
|
+
const [open, setOpen] = useControllableState2({
|
|
11777
10313
|
prop: openProp,
|
|
11778
10314
|
defaultProp: defaultOpen ?? false,
|
|
11779
10315
|
onChange: onOpenChange,
|
|
11780
10316
|
caller: POPOVER_NAME
|
|
11781
10317
|
});
|
|
11782
|
-
return /* @__PURE__ */ (0,
|
|
10318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Root23, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11783
10319
|
PopoverProvider,
|
|
11784
10320
|
{
|
|
11785
10321
|
scope: __scopePopover,
|
|
11786
|
-
contentId:
|
|
10322
|
+
contentId: useId2(),
|
|
11787
10323
|
triggerRef,
|
|
11788
10324
|
open,
|
|
11789
10325
|
onOpenChange: setOpen,
|
|
11790
|
-
onOpenToggle:
|
|
10326
|
+
onOpenToggle: React54.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
11791
10327
|
hasCustomAnchor,
|
|
11792
|
-
onCustomAnchorAdd:
|
|
11793
|
-
onCustomAnchorRemove:
|
|
10328
|
+
onCustomAnchorAdd: React54.useCallback(() => setHasCustomAnchor(true), []),
|
|
10329
|
+
onCustomAnchorRemove: React54.useCallback(() => setHasCustomAnchor(false), []),
|
|
11794
10330
|
modal,
|
|
11795
10331
|
children
|
|
11796
10332
|
}
|
|
@@ -11798,87 +10334,87 @@ var Popover = (props) => {
|
|
|
11798
10334
|
};
|
|
11799
10335
|
Popover.displayName = POPOVER_NAME;
|
|
11800
10336
|
var ANCHOR_NAME4 = "PopoverAnchor";
|
|
11801
|
-
var PopoverAnchor =
|
|
10337
|
+
var PopoverAnchor = React54.forwardRef(
|
|
11802
10338
|
(props, forwardedRef) => {
|
|
11803
10339
|
const { __scopePopover, ...anchorProps } = props;
|
|
11804
10340
|
const context = usePopoverContext(ANCHOR_NAME4, __scopePopover);
|
|
11805
10341
|
const popperScope = usePopperScope2(__scopePopover);
|
|
11806
10342
|
const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
|
|
11807
|
-
|
|
10343
|
+
React54.useEffect(() => {
|
|
11808
10344
|
onCustomAnchorAdd();
|
|
11809
10345
|
return () => onCustomAnchorRemove();
|
|
11810
10346
|
}, [onCustomAnchorAdd, onCustomAnchorRemove]);
|
|
11811
|
-
return /* @__PURE__ */ (0,
|
|
10347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Anchor3, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
11812
10348
|
}
|
|
11813
10349
|
);
|
|
11814
10350
|
PopoverAnchor.displayName = ANCHOR_NAME4;
|
|
11815
|
-
var
|
|
11816
|
-
var PopoverTrigger =
|
|
10351
|
+
var TRIGGER_NAME2 = "PopoverTrigger";
|
|
10352
|
+
var PopoverTrigger = React54.forwardRef(
|
|
11817
10353
|
(props, forwardedRef) => {
|
|
11818
10354
|
const { __scopePopover, ...triggerProps } = props;
|
|
11819
|
-
const context = usePopoverContext(
|
|
10355
|
+
const context = usePopoverContext(TRIGGER_NAME2, __scopePopover);
|
|
11820
10356
|
const popperScope = usePopperScope2(__scopePopover);
|
|
11821
|
-
const composedTriggerRef =
|
|
11822
|
-
const trigger = /* @__PURE__ */ (0,
|
|
11823
|
-
|
|
10357
|
+
const composedTriggerRef = useComposedRefs2(forwardedRef, context.triggerRef);
|
|
10358
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
10359
|
+
Primitive2.button,
|
|
11824
10360
|
{
|
|
11825
10361
|
type: "button",
|
|
11826
10362
|
"aria-haspopup": "dialog",
|
|
11827
10363
|
"aria-expanded": context.open,
|
|
11828
10364
|
"aria-controls": context.contentId,
|
|
11829
|
-
"data-state":
|
|
10365
|
+
"data-state": getState(context.open),
|
|
11830
10366
|
...triggerProps,
|
|
11831
10367
|
ref: composedTriggerRef,
|
|
11832
|
-
onClick:
|
|
10368
|
+
onClick: composeEventHandlers2(props.onClick, context.onOpenToggle)
|
|
11833
10369
|
}
|
|
11834
10370
|
);
|
|
11835
|
-
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0,
|
|
10371
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Anchor3, { asChild: true, ...popperScope, children: trigger });
|
|
11836
10372
|
}
|
|
11837
10373
|
);
|
|
11838
|
-
PopoverTrigger.displayName =
|
|
11839
|
-
var
|
|
11840
|
-
var [
|
|
10374
|
+
PopoverTrigger.displayName = TRIGGER_NAME2;
|
|
10375
|
+
var PORTAL_NAME5 = "PopoverPortal";
|
|
10376
|
+
var [PortalProvider2, usePortalContext2] = createPopoverContext(PORTAL_NAME5, {
|
|
11841
10377
|
forceMount: void 0
|
|
11842
10378
|
});
|
|
11843
10379
|
var PopoverPortal = (props) => {
|
|
11844
10380
|
const { __scopePopover, forceMount, children, container } = props;
|
|
11845
|
-
const context = usePopoverContext(
|
|
11846
|
-
return /* @__PURE__ */ (0,
|
|
10381
|
+
const context = usePopoverContext(PORTAL_NAME5, __scopePopover);
|
|
10382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PortalProvider2, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Presence2, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Portal4, { asChild: true, container, children }) }) });
|
|
11847
10383
|
};
|
|
11848
|
-
PopoverPortal.displayName =
|
|
11849
|
-
var
|
|
11850
|
-
var PopoverContent =
|
|
10384
|
+
PopoverPortal.displayName = PORTAL_NAME5;
|
|
10385
|
+
var CONTENT_NAME5 = "PopoverContent";
|
|
10386
|
+
var PopoverContent = React54.forwardRef(
|
|
11851
10387
|
(props, forwardedRef) => {
|
|
11852
|
-
const portalContext =
|
|
10388
|
+
const portalContext = usePortalContext2(CONTENT_NAME5, props.__scopePopover);
|
|
11853
10389
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
11854
|
-
const context = usePopoverContext(
|
|
11855
|
-
return /* @__PURE__ */ (0,
|
|
10390
|
+
const context = usePopoverContext(CONTENT_NAME5, props.__scopePopover);
|
|
10391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Presence2, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
11856
10392
|
}
|
|
11857
10393
|
);
|
|
11858
|
-
PopoverContent.displayName =
|
|
11859
|
-
var
|
|
11860
|
-
var PopoverContentModal =
|
|
10394
|
+
PopoverContent.displayName = CONTENT_NAME5;
|
|
10395
|
+
var Slot6 = (0, import_react_slot7.createSlot)("PopoverContent.RemoveScroll");
|
|
10396
|
+
var PopoverContentModal = React54.forwardRef(
|
|
11861
10397
|
(props, forwardedRef) => {
|
|
11862
|
-
const context = usePopoverContext(
|
|
11863
|
-
const contentRef =
|
|
11864
|
-
const composedRefs =
|
|
11865
|
-
const isRightClickOutsideRef =
|
|
11866
|
-
|
|
10398
|
+
const context = usePopoverContext(CONTENT_NAME5, props.__scopePopover);
|
|
10399
|
+
const contentRef = React54.useRef(null);
|
|
10400
|
+
const composedRefs = useComposedRefs2(forwardedRef, contentRef);
|
|
10401
|
+
const isRightClickOutsideRef = React54.useRef(false);
|
|
10402
|
+
React54.useEffect(() => {
|
|
11867
10403
|
const content = contentRef.current;
|
|
11868
10404
|
if (content) return hideOthers(content);
|
|
11869
10405
|
}, []);
|
|
11870
|
-
return /* @__PURE__ */ (0,
|
|
10406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Combination_default2, { as: Slot6, allowPinchZoom: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11871
10407
|
PopoverContentImpl,
|
|
11872
10408
|
{
|
|
11873
10409
|
...props,
|
|
11874
10410
|
ref: composedRefs,
|
|
11875
10411
|
trapFocus: context.open,
|
|
11876
10412
|
disableOutsidePointerEvents: true,
|
|
11877
|
-
onCloseAutoFocus:
|
|
10413
|
+
onCloseAutoFocus: composeEventHandlers2(props.onCloseAutoFocus, (event) => {
|
|
11878
10414
|
event.preventDefault();
|
|
11879
10415
|
if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
|
|
11880
10416
|
}),
|
|
11881
|
-
onPointerDownOutside:
|
|
10417
|
+
onPointerDownOutside: composeEventHandlers2(
|
|
11882
10418
|
props.onPointerDownOutside,
|
|
11883
10419
|
(event) => {
|
|
11884
10420
|
const originalEvent = event.detail.originalEvent;
|
|
@@ -11888,7 +10424,7 @@ var PopoverContentModal = React71.forwardRef(
|
|
|
11888
10424
|
},
|
|
11889
10425
|
{ checkForDefaultPrevented: false }
|
|
11890
10426
|
),
|
|
11891
|
-
onFocusOutside:
|
|
10427
|
+
onFocusOutside: composeEventHandlers2(
|
|
11892
10428
|
props.onFocusOutside,
|
|
11893
10429
|
(event) => event.preventDefault(),
|
|
11894
10430
|
{ checkForDefaultPrevented: false }
|
|
@@ -11897,12 +10433,12 @@ var PopoverContentModal = React71.forwardRef(
|
|
|
11897
10433
|
) });
|
|
11898
10434
|
}
|
|
11899
10435
|
);
|
|
11900
|
-
var PopoverContentNonModal =
|
|
10436
|
+
var PopoverContentNonModal = React54.forwardRef(
|
|
11901
10437
|
(props, forwardedRef) => {
|
|
11902
|
-
const context = usePopoverContext(
|
|
11903
|
-
const hasInteractedOutsideRef =
|
|
11904
|
-
const hasPointerDownOutsideRef =
|
|
11905
|
-
return /* @__PURE__ */ (0,
|
|
10438
|
+
const context = usePopoverContext(CONTENT_NAME5, props.__scopePopover);
|
|
10439
|
+
const hasInteractedOutsideRef = React54.useRef(false);
|
|
10440
|
+
const hasPointerDownOutsideRef = React54.useRef(false);
|
|
10441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11906
10442
|
PopoverContentImpl,
|
|
11907
10443
|
{
|
|
11908
10444
|
...props,
|
|
@@ -11937,7 +10473,7 @@ var PopoverContentNonModal = React71.forwardRef(
|
|
|
11937
10473
|
);
|
|
11938
10474
|
}
|
|
11939
10475
|
);
|
|
11940
|
-
var PopoverContentImpl =
|
|
10476
|
+
var PopoverContentImpl = React54.forwardRef(
|
|
11941
10477
|
(props, forwardedRef) => {
|
|
11942
10478
|
const {
|
|
11943
10479
|
__scopePopover,
|
|
@@ -11951,19 +10487,19 @@ var PopoverContentImpl = React71.forwardRef(
|
|
|
11951
10487
|
onInteractOutside,
|
|
11952
10488
|
...contentProps
|
|
11953
10489
|
} = props;
|
|
11954
|
-
const context = usePopoverContext(
|
|
10490
|
+
const context = usePopoverContext(CONTENT_NAME5, __scopePopover);
|
|
11955
10491
|
const popperScope = usePopperScope2(__scopePopover);
|
|
11956
|
-
|
|
11957
|
-
return /* @__PURE__ */ (0,
|
|
11958
|
-
|
|
10492
|
+
useFocusGuards2();
|
|
10493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
10494
|
+
FocusScope2,
|
|
11959
10495
|
{
|
|
11960
10496
|
asChild: true,
|
|
11961
10497
|
loop: true,
|
|
11962
10498
|
trapped: trapFocus,
|
|
11963
10499
|
onMountAutoFocus: onOpenAutoFocus,
|
|
11964
10500
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
11965
|
-
children: /* @__PURE__ */ (0,
|
|
11966
|
-
|
|
10501
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
10502
|
+
DismissableLayer2,
|
|
11967
10503
|
{
|
|
11968
10504
|
asChild: true,
|
|
11969
10505
|
disableOutsidePointerEvents,
|
|
@@ -11972,10 +10508,10 @@ var PopoverContentImpl = React71.forwardRef(
|
|
|
11972
10508
|
onPointerDownOutside,
|
|
11973
10509
|
onFocusOutside,
|
|
11974
10510
|
onDismiss: () => context.onOpenChange(false),
|
|
11975
|
-
children: /* @__PURE__ */ (0,
|
|
10511
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11976
10512
|
Content5,
|
|
11977
10513
|
{
|
|
11978
|
-
"data-state":
|
|
10514
|
+
"data-state": getState(context.open),
|
|
11979
10515
|
role: "dialog",
|
|
11980
10516
|
id: context.contentId,
|
|
11981
10517
|
...popperScope,
|
|
@@ -12000,46 +10536,46 @@ var PopoverContentImpl = React71.forwardRef(
|
|
|
12000
10536
|
);
|
|
12001
10537
|
}
|
|
12002
10538
|
);
|
|
12003
|
-
var
|
|
12004
|
-
var PopoverClose =
|
|
10539
|
+
var CLOSE_NAME = "PopoverClose";
|
|
10540
|
+
var PopoverClose = React54.forwardRef(
|
|
12005
10541
|
(props, forwardedRef) => {
|
|
12006
10542
|
const { __scopePopover, ...closeProps } = props;
|
|
12007
|
-
const context = usePopoverContext(
|
|
12008
|
-
return /* @__PURE__ */ (0,
|
|
12009
|
-
|
|
10543
|
+
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
10544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
10545
|
+
Primitive2.button,
|
|
12010
10546
|
{
|
|
12011
10547
|
type: "button",
|
|
12012
10548
|
...closeProps,
|
|
12013
10549
|
ref: forwardedRef,
|
|
12014
|
-
onClick:
|
|
10550
|
+
onClick: composeEventHandlers2(props.onClick, () => context.onOpenChange(false))
|
|
12015
10551
|
}
|
|
12016
10552
|
);
|
|
12017
10553
|
}
|
|
12018
10554
|
);
|
|
12019
|
-
PopoverClose.displayName =
|
|
10555
|
+
PopoverClose.displayName = CLOSE_NAME;
|
|
12020
10556
|
var ARROW_NAME5 = "PopoverArrow";
|
|
12021
|
-
var PopoverArrow =
|
|
10557
|
+
var PopoverArrow = React54.forwardRef(
|
|
12022
10558
|
(props, forwardedRef) => {
|
|
12023
10559
|
const { __scopePopover, ...arrowProps } = props;
|
|
12024
10560
|
const popperScope = usePopperScope2(__scopePopover);
|
|
12025
|
-
return /* @__PURE__ */ (0,
|
|
10561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Arrow4, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
12026
10562
|
}
|
|
12027
10563
|
);
|
|
12028
10564
|
PopoverArrow.displayName = ARROW_NAME5;
|
|
12029
|
-
function
|
|
10565
|
+
function getState(open) {
|
|
12030
10566
|
return open ? "open" : "closed";
|
|
12031
10567
|
}
|
|
12032
10568
|
var Root24 = Popover;
|
|
12033
10569
|
var Trigger4 = PopoverTrigger;
|
|
12034
|
-
var
|
|
10570
|
+
var Portal5 = PopoverPortal;
|
|
12035
10571
|
var Content23 = PopoverContent;
|
|
12036
10572
|
|
|
12037
10573
|
// src/components/Popover/index.tsx
|
|
12038
|
-
var
|
|
12039
|
-
var
|
|
10574
|
+
var React55 = __toESM(require("react"));
|
|
10575
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
12040
10576
|
var Popover2 = Root24;
|
|
12041
10577
|
var PopoverTrigger2 = Trigger4;
|
|
12042
|
-
var PopoverContent2 =
|
|
10578
|
+
var PopoverContent2 = React55.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Portal5, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
12043
10579
|
Content23,
|
|
12044
10580
|
{
|
|
12045
10581
|
ref,
|
|
@@ -12055,15 +10591,15 @@ var PopoverContent2 = React72.forwardRef(({ className, align = "center", sideOff
|
|
|
12055
10591
|
PopoverContent2.displayName = Content23.displayName;
|
|
12056
10592
|
|
|
12057
10593
|
// src/components/Select/index.tsx
|
|
12058
|
-
var
|
|
10594
|
+
var React56 = __toESM(require("react"));
|
|
12059
10595
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
12060
|
-
var
|
|
10596
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
12061
10597
|
var Select = SelectPrimitive.Root;
|
|
12062
10598
|
var SelectGroup = SelectPrimitive.Group;
|
|
12063
10599
|
var SelectValue = SelectPrimitive.Value;
|
|
12064
10600
|
var SelectPortal = SelectPrimitive.Portal;
|
|
12065
10601
|
var SelectViewport = SelectPrimitive.Viewport;
|
|
12066
|
-
var SelectTrigger =
|
|
10602
|
+
var SelectTrigger = React56.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
12067
10603
|
SelectPrimitive.Trigger,
|
|
12068
10604
|
{
|
|
12069
10605
|
ref,
|
|
@@ -12074,12 +10610,12 @@ var SelectTrigger = React73.forwardRef(({ className, children, ...props }, ref)
|
|
|
12074
10610
|
...props,
|
|
12075
10611
|
children: [
|
|
12076
10612
|
children,
|
|
12077
|
-
/* @__PURE__ */ (0,
|
|
10613
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
12078
10614
|
]
|
|
12079
10615
|
}
|
|
12080
10616
|
));
|
|
12081
10617
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
12082
|
-
var SelectScrollUpButton =
|
|
10618
|
+
var SelectScrollUpButton = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
12083
10619
|
SelectPrimitive.ScrollUpButton,
|
|
12084
10620
|
{
|
|
12085
10621
|
ref,
|
|
@@ -12088,11 +10624,11 @@ var SelectScrollUpButton = React73.forwardRef(({ className, ...props }, ref) =>
|
|
|
12088
10624
|
className
|
|
12089
10625
|
),
|
|
12090
10626
|
...props,
|
|
12091
|
-
children: /* @__PURE__ */ (0,
|
|
10627
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ChevronUp, { className: "cnc-h-4 cnc-w-4" })
|
|
12092
10628
|
}
|
|
12093
10629
|
));
|
|
12094
10630
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
12095
|
-
var SelectScrollDownButton =
|
|
10631
|
+
var SelectScrollDownButton = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
12096
10632
|
SelectPrimitive.ScrollDownButton,
|
|
12097
10633
|
{
|
|
12098
10634
|
ref,
|
|
@@ -12101,11 +10637,11 @@ var SelectScrollDownButton = React73.forwardRef(({ className, ...props }, ref) =
|
|
|
12101
10637
|
className
|
|
12102
10638
|
),
|
|
12103
10639
|
...props,
|
|
12104
|
-
children: /* @__PURE__ */ (0,
|
|
10640
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ChevronDown, { className: "cnc-h-4 cnc-w-4" })
|
|
12105
10641
|
}
|
|
12106
10642
|
));
|
|
12107
10643
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
12108
|
-
var SelectContent =
|
|
10644
|
+
var SelectContent = React56.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
12109
10645
|
SelectPrimitive.Content,
|
|
12110
10646
|
{
|
|
12111
10647
|
ref,
|
|
@@ -12117,8 +10653,8 @@ var SelectContent = React73.forwardRef(({ className, children, position = "poppe
|
|
|
12117
10653
|
position,
|
|
12118
10654
|
...props,
|
|
12119
10655
|
children: [
|
|
12120
|
-
/* @__PURE__ */ (0,
|
|
12121
|
-
/* @__PURE__ */ (0,
|
|
10656
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectScrollUpButton, {}),
|
|
10657
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
12122
10658
|
SelectPrimitive.Viewport,
|
|
12123
10659
|
{
|
|
12124
10660
|
className: cn(
|
|
@@ -12128,12 +10664,12 @@ var SelectContent = React73.forwardRef(({ className, children, position = "poppe
|
|
|
12128
10664
|
children
|
|
12129
10665
|
}
|
|
12130
10666
|
),
|
|
12131
|
-
/* @__PURE__ */ (0,
|
|
10667
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectScrollDownButton, {})
|
|
12132
10668
|
]
|
|
12133
10669
|
}
|
|
12134
10670
|
) }));
|
|
12135
10671
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
12136
|
-
var SelectLabel =
|
|
10672
|
+
var SelectLabel = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
12137
10673
|
SelectPrimitive.Label,
|
|
12138
10674
|
{
|
|
12139
10675
|
ref,
|
|
@@ -12145,7 +10681,7 @@ var SelectLabel = React73.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
12145
10681
|
}
|
|
12146
10682
|
));
|
|
12147
10683
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
12148
|
-
var SelectItem =
|
|
10684
|
+
var SelectItem = React56.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
12149
10685
|
SelectPrimitive.Item,
|
|
12150
10686
|
{
|
|
12151
10687
|
ref,
|
|
@@ -12155,13 +10691,13 @@ var SelectItem = React73.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
12155
10691
|
),
|
|
12156
10692
|
...props,
|
|
12157
10693
|
children: [
|
|
12158
|
-
/* @__PURE__ */ (0,
|
|
12159
|
-
/* @__PURE__ */ (0,
|
|
10694
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "cnc-absolute cnc-left-2 cnc-flex cnc-h-3.5 cnc-w-3.5 cnc-cnc-items-center cnc-justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Check, { className: "cnc-h-4 cnc-w-4" }) }) }),
|
|
10695
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectPrimitive.ItemText, { children })
|
|
12160
10696
|
]
|
|
12161
10697
|
}
|
|
12162
10698
|
));
|
|
12163
10699
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
12164
|
-
var SelectSeparator =
|
|
10700
|
+
var SelectSeparator = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
12165
10701
|
SelectPrimitive.Separator,
|
|
12166
10702
|
{
|
|
12167
10703
|
ref,
|
|
@@ -12172,13 +10708,13 @@ var SelectSeparator = React73.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
12172
10708
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
12173
10709
|
|
|
12174
10710
|
// src/components/atoms/forms/input.tsx
|
|
12175
|
-
var
|
|
12176
|
-
var
|
|
12177
|
-
var Input =
|
|
10711
|
+
var React57 = __toESM(require("react"));
|
|
10712
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
10713
|
+
var Input = React57.forwardRef(
|
|
12178
10714
|
({ className, type, id, label, ...props }, ref) => {
|
|
12179
10715
|
const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
|
|
12180
|
-
return /* @__PURE__ */ (0,
|
|
12181
|
-
label && /* @__PURE__ */ (0,
|
|
10716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "cnc-w-full", children: [
|
|
10717
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
12182
10718
|
"label",
|
|
12183
10719
|
{
|
|
12184
10720
|
htmlFor: idGenerate,
|
|
@@ -12186,7 +10722,7 @@ var Input = React74.forwardRef(
|
|
|
12186
10722
|
children: label
|
|
12187
10723
|
}
|
|
12188
10724
|
),
|
|
12189
|
-
/* @__PURE__ */ (0,
|
|
10725
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
12190
10726
|
"input",
|
|
12191
10727
|
{
|
|
12192
10728
|
type,
|
|
@@ -12208,14 +10744,14 @@ var Input = React74.forwardRef(
|
|
|
12208
10744
|
Input.displayName = "Input";
|
|
12209
10745
|
|
|
12210
10746
|
// src/components/atoms/forms/checkbox.tsx
|
|
12211
|
-
var
|
|
12212
|
-
var
|
|
12213
|
-
var Checkbox =
|
|
10747
|
+
var React58 = __toESM(require("react"));
|
|
10748
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
10749
|
+
var Checkbox = React58.forwardRef(
|
|
12214
10750
|
({ className, id, label, ...props }, ref) => {
|
|
12215
10751
|
console.log();
|
|
12216
10752
|
const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
|
|
12217
|
-
return /* @__PURE__ */ (0,
|
|
12218
|
-
/* @__PURE__ */ (0,
|
|
10753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "cnc-w-full cnc-flex cnc-flex-row", children: [
|
|
10754
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
12219
10755
|
"input",
|
|
12220
10756
|
{
|
|
12221
10757
|
type: "checkbox",
|
|
@@ -12225,7 +10761,7 @@ var Checkbox = React75.forwardRef(
|
|
|
12225
10761
|
...props
|
|
12226
10762
|
}
|
|
12227
10763
|
),
|
|
12228
|
-
label && /* @__PURE__ */ (0,
|
|
10764
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
12229
10765
|
"label",
|
|
12230
10766
|
{
|
|
12231
10767
|
htmlFor: idGenerate,
|
|
@@ -12239,7 +10775,7 @@ var Checkbox = React75.forwardRef(
|
|
|
12239
10775
|
Checkbox.displayName = "Checkbox";
|
|
12240
10776
|
|
|
12241
10777
|
// src/components/atoms/display/badge.tsx
|
|
12242
|
-
var
|
|
10778
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
12243
10779
|
var Badge = ({
|
|
12244
10780
|
variant = "default",
|
|
12245
10781
|
rounded = true,
|
|
@@ -12261,7 +10797,7 @@ var Badge = ({
|
|
|
12261
10797
|
md: "cnc-text-sm cnc-px-3 cnc-py-1",
|
|
12262
10798
|
lg: "cnc-text-base cnc-px-4 cnc-py-2"
|
|
12263
10799
|
};
|
|
12264
|
-
return /* @__PURE__ */ (0,
|
|
10800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
12265
10801
|
"span",
|
|
12266
10802
|
{
|
|
12267
10803
|
className: cn(
|
|
@@ -12277,12 +10813,12 @@ var Badge = ({
|
|
|
12277
10813
|
};
|
|
12278
10814
|
|
|
12279
10815
|
// src/components/molecules/card.tsx
|
|
12280
|
-
var
|
|
10816
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
12281
10817
|
function Card({
|
|
12282
10818
|
className,
|
|
12283
10819
|
...rest
|
|
12284
10820
|
}) {
|
|
12285
|
-
return /* @__PURE__ */ (0,
|
|
10821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12286
10822
|
"div",
|
|
12287
10823
|
{
|
|
12288
10824
|
className: cn(
|
|
@@ -12297,7 +10833,7 @@ function CardHeader({
|
|
|
12297
10833
|
className,
|
|
12298
10834
|
...rest
|
|
12299
10835
|
}) {
|
|
12300
|
-
return /* @__PURE__ */ (0,
|
|
10836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "cnc-px-6 cnc-pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12301
10837
|
"div",
|
|
12302
10838
|
{
|
|
12303
10839
|
className: cn(
|
|
@@ -12312,13 +10848,13 @@ function CardContent({
|
|
|
12312
10848
|
className,
|
|
12313
10849
|
...rest
|
|
12314
10850
|
}) {
|
|
12315
|
-
return /* @__PURE__ */ (0,
|
|
10851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn("cnc-px-6 cnc-py-2", className), ...rest });
|
|
12316
10852
|
}
|
|
12317
10853
|
function CardFooter({
|
|
12318
10854
|
className,
|
|
12319
10855
|
...rest
|
|
12320
10856
|
}) {
|
|
12321
|
-
return /* @__PURE__ */ (0,
|
|
10857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12322
10858
|
"div",
|
|
12323
10859
|
{
|
|
12324
10860
|
className: cn(
|
|
@@ -12333,7 +10869,7 @@ function CardFooterItem({
|
|
|
12333
10869
|
className,
|
|
12334
10870
|
...rest
|
|
12335
10871
|
}) {
|
|
12336
|
-
return /* @__PURE__ */ (0,
|
|
10872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12337
10873
|
"div",
|
|
12338
10874
|
{
|
|
12339
10875
|
className: cn(
|
|
@@ -12347,7 +10883,7 @@ function CardFooterItem({
|
|
|
12347
10883
|
|
|
12348
10884
|
// src/components/molecules/collapsible.tsx
|
|
12349
10885
|
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
|
|
12350
|
-
var
|
|
10886
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
12351
10887
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
12352
10888
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
12353
10889
|
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
@@ -12355,16 +10891,16 @@ var AnimatedCollapsibleContent = ({
|
|
|
12355
10891
|
className,
|
|
12356
10892
|
...rest
|
|
12357
10893
|
}) => {
|
|
12358
|
-
return /* @__PURE__ */ (0,
|
|
10894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CollapsibleContent2, { className: "cnc-collapsible-content", ...rest });
|
|
12359
10895
|
};
|
|
12360
10896
|
|
|
12361
10897
|
// src/components/molecules/display/page-header.tsx
|
|
12362
|
-
var
|
|
10898
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
12363
10899
|
function PageHeader({
|
|
12364
10900
|
children,
|
|
12365
10901
|
className
|
|
12366
10902
|
}) {
|
|
12367
|
-
return /* @__PURE__ */ (0,
|
|
10903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
12368
10904
|
"header",
|
|
12369
10905
|
{
|
|
12370
10906
|
className: cn(
|
|
@@ -12379,7 +10915,7 @@ function PageHeaderTitleContent({
|
|
|
12379
10915
|
children,
|
|
12380
10916
|
className
|
|
12381
10917
|
}) {
|
|
12382
|
-
return /* @__PURE__ */ (0,
|
|
10918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
12383
10919
|
"div",
|
|
12384
10920
|
{
|
|
12385
10921
|
className: cn(
|
|
@@ -12396,16 +10932,16 @@ function PageHeaderTitle({
|
|
|
12396
10932
|
titleAs = "h1"
|
|
12397
10933
|
}) {
|
|
12398
10934
|
const ComponentTitle = titleAs;
|
|
12399
|
-
return /* @__PURE__ */ (0,
|
|
12400
|
-
/* @__PURE__ */ (0,
|
|
12401
|
-
description && /* @__PURE__ */ (0,
|
|
10935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { children: [
|
|
10936
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ComponentTitle, { className: "cnc-text-2xl cnc-font-semibold cnc-text-brand-blue-600", children: title }),
|
|
10937
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "cnc-text-sm cnc-text-brand-gray-500", children: description })
|
|
12402
10938
|
] });
|
|
12403
10939
|
}
|
|
12404
10940
|
function PageHeaderActionsContainer({
|
|
12405
10941
|
children,
|
|
12406
10942
|
className
|
|
12407
10943
|
}) {
|
|
12408
|
-
return /* @__PURE__ */ (0,
|
|
10944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
12409
10945
|
"div",
|
|
12410
10946
|
{
|
|
12411
10947
|
className: cn(
|
|
@@ -12417,14 +10953,14 @@ function PageHeaderActionsContainer({
|
|
|
12417
10953
|
);
|
|
12418
10954
|
}
|
|
12419
10955
|
function Title2({ title, as: Component = "h1" }) {
|
|
12420
|
-
return /* @__PURE__ */ (0,
|
|
10956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Component, { className: "cnc-text-[24px] cnc-text-[#1F2C4D] cnc-font-bold cnc-mt-2 cnc-mb-4 text-center md:cnc-text-[28px] md:cnc-text-left", children: title });
|
|
12421
10957
|
}
|
|
12422
10958
|
|
|
12423
10959
|
// src/components/molecules/forms/combobox.tsx
|
|
12424
|
-
var
|
|
10960
|
+
var React63 = __toESM(require("react"));
|
|
12425
10961
|
|
|
12426
10962
|
// src/components/molecules/overlay/command.tsx
|
|
12427
|
-
var
|
|
10963
|
+
var React61 = __toESM(require("react"));
|
|
12428
10964
|
|
|
12429
10965
|
// ../../node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
|
|
12430
10966
|
var U = 1;
|
|
@@ -12454,14 +10990,15 @@ function W(_, C, h) {
|
|
|
12454
10990
|
}
|
|
12455
10991
|
|
|
12456
10992
|
// ../../node_modules/cmdk/dist/index.mjs
|
|
10993
|
+
var w = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
12457
10994
|
var t = __toESM(require("react"), 1);
|
|
12458
10995
|
|
|
12459
10996
|
// ../../node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
12460
|
-
var
|
|
12461
|
-
var
|
|
12462
|
-
var
|
|
12463
|
-
var
|
|
12464
|
-
var
|
|
10997
|
+
var React59 = __toESM(require("react"), 1);
|
|
10998
|
+
var ReactDOM6 = __toESM(require("react-dom"), 1);
|
|
10999
|
+
var import_react_slot8 = require("@radix-ui/react-slot");
|
|
11000
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
11001
|
+
var NODES3 = [
|
|
12465
11002
|
"a",
|
|
12466
11003
|
"button",
|
|
12467
11004
|
"div",
|
|
@@ -12480,34 +11017,34 @@ var NODES4 = [
|
|
|
12480
11017
|
"svg",
|
|
12481
11018
|
"ul"
|
|
12482
11019
|
];
|
|
12483
|
-
var
|
|
12484
|
-
const
|
|
12485
|
-
const Node2 =
|
|
11020
|
+
var Primitive3 = NODES3.reduce((primitive, node) => {
|
|
11021
|
+
const Slot7 = (0, import_react_slot8.createSlot)(`Primitive.${node}`);
|
|
11022
|
+
const Node2 = React59.forwardRef((props, forwardedRef) => {
|
|
12486
11023
|
const { asChild, ...primitiveProps } = props;
|
|
12487
|
-
const Comp = asChild ?
|
|
11024
|
+
const Comp = asChild ? Slot7 : node;
|
|
12488
11025
|
if (typeof window !== "undefined") {
|
|
12489
11026
|
window[Symbol.for("radix-ui")] = true;
|
|
12490
11027
|
}
|
|
12491
|
-
return /* @__PURE__ */ (0,
|
|
11028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
12492
11029
|
});
|
|
12493
11030
|
Node2.displayName = `Primitive.${node}`;
|
|
12494
11031
|
return { ...primitive, [node]: Node2 };
|
|
12495
11032
|
}, {});
|
|
12496
11033
|
|
|
12497
11034
|
// ../../node_modules/cmdk/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
12498
|
-
var
|
|
12499
|
-
function
|
|
11035
|
+
var React60 = __toESM(require("react"), 1);
|
|
11036
|
+
function setRef3(ref, value) {
|
|
12500
11037
|
if (typeof ref === "function") {
|
|
12501
11038
|
return ref(value);
|
|
12502
11039
|
} else if (ref !== null && ref !== void 0) {
|
|
12503
11040
|
ref.current = value;
|
|
12504
11041
|
}
|
|
12505
11042
|
}
|
|
12506
|
-
function
|
|
11043
|
+
function composeRefs3(...refs) {
|
|
12507
11044
|
return (node) => {
|
|
12508
11045
|
let hasCleanup = false;
|
|
12509
11046
|
const cleanups = refs.map((ref) => {
|
|
12510
|
-
const cleanup =
|
|
11047
|
+
const cleanup = setRef3(ref, node);
|
|
12511
11048
|
if (!hasCleanup && typeof cleanup == "function") {
|
|
12512
11049
|
hasCleanup = true;
|
|
12513
11050
|
}
|
|
@@ -12520,7 +11057,7 @@ function composeRefs4(...refs) {
|
|
|
12520
11057
|
if (typeof cleanup == "function") {
|
|
12521
11058
|
cleanup();
|
|
12522
11059
|
} else {
|
|
12523
|
-
|
|
11060
|
+
setRef3(refs[i], null);
|
|
12524
11061
|
}
|
|
12525
11062
|
}
|
|
12526
11063
|
};
|
|
@@ -12676,7 +11213,7 @@ var me = t.forwardRef((r2, o) => {
|
|
|
12676
11213
|
}, se = (e) => {
|
|
12677
11214
|
e.preventDefault(), e.metaKey ? X3(0) : e.altKey ? re(-1) : Q(-1);
|
|
12678
11215
|
};
|
|
12679
|
-
return t.createElement(
|
|
11216
|
+
return t.createElement(Primitive3.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
|
|
12680
11217
|
var s;
|
|
12681
11218
|
(s = O.onKeyDown) == null || s.call(O, e);
|
|
12682
11219
|
let a = e.nativeEvent.isComposing || e.keyCode === 229;
|
|
@@ -12738,23 +11275,23 @@ var he = t.forwardRef((r2, o) => {
|
|
|
12738
11275
|
}
|
|
12739
11276
|
if (!x) return null;
|
|
12740
11277
|
let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $2, ...q } = r2;
|
|
12741
|
-
return t.createElement(
|
|
11278
|
+
return t.createElement(Primitive3.div, { ref: composeRefs3(u2, o), ...q, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
|
|
12742
11279
|
});
|
|
12743
11280
|
var Ee = t.forwardRef((r2, o) => {
|
|
12744
11281
|
let { heading: n, children: u2, forceMount: c, ...d } = r2, f = useId(), p2 = t.useRef(null), b = t.useRef(null), m2 = useId(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
|
|
12745
11282
|
k2(() => R.group(f), []), ve(f, p2, [r2.value, r2.heading, b]);
|
|
12746
11283
|
let C = t.useMemo(() => ({ id: f, forceMount: c }), [c]);
|
|
12747
|
-
return t.createElement(
|
|
11284
|
+
return t.createElement(Primitive3.div, { ref: composeRefs3(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r2, (S) => t.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t.createElement(fe.Provider, { value: C }, S))));
|
|
12748
11285
|
});
|
|
12749
11286
|
var ye = t.forwardRef((r2, o) => {
|
|
12750
11287
|
let { alwaysRender: n, ...u2 } = r2, c = t.useRef(null), d = P((f) => !f.search);
|
|
12751
|
-
return !n && !d ? null : t.createElement(
|
|
11288
|
+
return !n && !d ? null : t.createElement(Primitive3.div, { ref: composeRefs3(c, o), ...u2, "cmdk-separator": "", role: "separator" });
|
|
12752
11289
|
});
|
|
12753
11290
|
var Se = t.forwardRef((r2, o) => {
|
|
12754
11291
|
let { onValueChange: n, ...u2 } = r2, c = r2.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b = K2();
|
|
12755
11292
|
return t.useEffect(() => {
|
|
12756
11293
|
r2.value != null && d.setState("search", r2.value);
|
|
12757
|
-
}, [r2.value]), t.createElement(
|
|
11294
|
+
}, [r2.value]), t.createElement(Primitive3.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": p2, id: b.inputId, type: "text", value: c ? r2.value : f, onChange: (m2) => {
|
|
12758
11295
|
c || d.setState("search", m2.target.value), n == null || n(m2.target.value);
|
|
12759
11296
|
} });
|
|
12760
11297
|
});
|
|
@@ -12772,16 +11309,16 @@ var Ce = t.forwardRef((r2, o) => {
|
|
|
12772
11309
|
cancelAnimationFrame(x), C.unobserve(m2);
|
|
12773
11310
|
};
|
|
12774
11311
|
}
|
|
12775
|
-
}, []), t.createElement(
|
|
11312
|
+
}, []), t.createElement(Primitive3.div, { ref: composeRefs3(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r2, (m2) => t.createElement("div", { ref: composeRefs3(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
|
|
12776
11313
|
});
|
|
12777
11314
|
var xe = t.forwardRef((r2, o) => {
|
|
12778
11315
|
let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r2;
|
|
12779
|
-
return t.createElement(
|
|
11316
|
+
return t.createElement(w.Root, { open: n, onOpenChange: u2 }, t.createElement(w.Portal, { container: f }, t.createElement(w.Overlay, { "cmdk-overlay": "", className: c }), t.createElement(w.Content, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, t.createElement(me, { ref: o, ...p2 }))));
|
|
12780
11317
|
});
|
|
12781
|
-
var Ie = t.forwardRef((r2, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(
|
|
11318
|
+
var Ie = t.forwardRef((r2, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive3.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null);
|
|
12782
11319
|
var Pe = t.forwardRef((r2, o) => {
|
|
12783
11320
|
let { progress: n, children: u2, label: c = "Loading...", ...d } = r2;
|
|
12784
|
-
return t.createElement(
|
|
11321
|
+
return t.createElement(Primitive3.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r2, (f) => t.createElement("div", { "aria-hidden": true }, f)));
|
|
12785
11322
|
});
|
|
12786
11323
|
var _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
|
|
12787
11324
|
function we(r2, o) {
|
|
@@ -12845,8 +11382,8 @@ function B2({ asChild: r2, children: o }, n) {
|
|
|
12845
11382
|
var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
12846
11383
|
|
|
12847
11384
|
// src/components/molecules/overlay/command.tsx
|
|
12848
|
-
var
|
|
12849
|
-
var Command =
|
|
11385
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
11386
|
+
var Command = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12850
11387
|
_e,
|
|
12851
11388
|
{
|
|
12852
11389
|
ref,
|
|
@@ -12859,16 +11396,16 @@ var Command = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
12859
11396
|
));
|
|
12860
11397
|
Command.displayName = _e.displayName;
|
|
12861
11398
|
var CommandDialog = ({ children, ...props }) => {
|
|
12862
|
-
return /* @__PURE__ */ (0,
|
|
11399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Dialog, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DialogContent, { className: "cnc-overflow-hidden cnc-p-0", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Command, { className: "cnc-[&_cmdk-group-heading]:cnc-px-2 cnc-[&_cmdk-group-heading]:cnc-font-medium cnc-[&_cmdk-group-heading]:cnc-text-muted-foreground cnc-[&_cmdk-group]:not([hidden])~[cmdk-group]:cnc-pt-0 cnc-[&_cmdk-group]:cnc-px-2 cnc-[&_cmdk-input-wrapper]_svg:cnc-h-5 cnc-[&_cmdk-input-wrapper]_svg:cnc-w-5 cnc-[&_cmdk-input]:cnc-h-12 cnc-[&_cmdk-item]:cnc-px-2 cnc-[&_cmdk-item]:cnc-py-3 cnc-[&_cmdk-item]_svg:cnc-h-5 cnc-[&_cmdk-item]_svg:cnc-w-5", children }) }) });
|
|
12863
11400
|
};
|
|
12864
|
-
var CommandInput =
|
|
11401
|
+
var CommandInput = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
12865
11402
|
"div",
|
|
12866
11403
|
{
|
|
12867
11404
|
className: "cnc-flex cnc-items-center cnc-border-b cnc-px-3",
|
|
12868
11405
|
"cmdk-input-wrapper": "",
|
|
12869
11406
|
children: [
|
|
12870
|
-
/* @__PURE__ */ (0,
|
|
12871
|
-
/* @__PURE__ */ (0,
|
|
11407
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Search, { className: "cnc-mr-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" }),
|
|
11408
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12872
11409
|
_e.Input,
|
|
12873
11410
|
{
|
|
12874
11411
|
ref,
|
|
@@ -12883,7 +11420,7 @@ var CommandInput = React78.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
12883
11420
|
}
|
|
12884
11421
|
));
|
|
12885
11422
|
CommandInput.displayName = _e.Input.displayName;
|
|
12886
|
-
var CommandList =
|
|
11423
|
+
var CommandList = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12887
11424
|
_e.List,
|
|
12888
11425
|
{
|
|
12889
11426
|
ref,
|
|
@@ -12895,7 +11432,7 @@ var CommandList = React78.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
12895
11432
|
}
|
|
12896
11433
|
));
|
|
12897
11434
|
CommandList.displayName = _e.List.displayName;
|
|
12898
|
-
var CommandEmpty =
|
|
11435
|
+
var CommandEmpty = React61.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12899
11436
|
_e.Empty,
|
|
12900
11437
|
{
|
|
12901
11438
|
ref,
|
|
@@ -12904,7 +11441,7 @@ var CommandEmpty = React78.forwardRef((props, ref) => /* @__PURE__ */ (0, import
|
|
|
12904
11441
|
}
|
|
12905
11442
|
));
|
|
12906
11443
|
CommandEmpty.displayName = _e.Empty.displayName;
|
|
12907
|
-
var CommandGroup =
|
|
11444
|
+
var CommandGroup = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12908
11445
|
_e.Group,
|
|
12909
11446
|
{
|
|
12910
11447
|
ref,
|
|
@@ -12916,7 +11453,7 @@ var CommandGroup = React78.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
12916
11453
|
}
|
|
12917
11454
|
));
|
|
12918
11455
|
CommandGroup.displayName = _e.Group.displayName;
|
|
12919
|
-
var CommandSeparator =
|
|
11456
|
+
var CommandSeparator = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12920
11457
|
_e.Separator,
|
|
12921
11458
|
{
|
|
12922
11459
|
ref,
|
|
@@ -12925,12 +11462,12 @@ var CommandSeparator = React78.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
12925
11462
|
}
|
|
12926
11463
|
));
|
|
12927
11464
|
CommandSeparator.displayName = _e.Separator.displayName;
|
|
12928
|
-
var CommandItem =
|
|
11465
|
+
var CommandItem = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12929
11466
|
_e.Item,
|
|
12930
11467
|
{
|
|
12931
11468
|
ref,
|
|
12932
11469
|
className: cn(
|
|
12933
|
-
"cnc-relative cnc-flex cnc-cursor-default cnc-gap-2 cnc-select-none cnc-items-center cnc-rounded-sm cnc-px-2 cnc-py-1.5 cnc-text-sm cnc-outline-none data-[disabled=true]:cnc-pointer-events-none data-[disabled=true]:cnc-opacity-50 data-[selected=true]:cnc-bg-accent data-[selected=true]:cnc-text-accent-foreground
|
|
11470
|
+
"cnc-relative cnc-flex cnc-cursor-default cnc-gap-2 cnc-select-none cnc-items-center cnc-rounded-sm cnc-px-2 cnc-py-1.5 cnc-text-sm cnc-outline-none data-[disabled=true]:cnc-pointer-events-none data-[disabled=true]:cnc-opacity-50 data-[selected=true]:cnc-bg-accent data-[selected=true]:cnc-text-accent-foreground [&_svg]:cnc-size-4 [&_svg]:cnc-shrink-0",
|
|
12934
11471
|
className
|
|
12935
11472
|
),
|
|
12936
11473
|
...props
|
|
@@ -12941,7 +11478,7 @@ var CommandShortcut = ({
|
|
|
12941
11478
|
className,
|
|
12942
11479
|
...props
|
|
12943
11480
|
}) => {
|
|
12944
|
-
return /* @__PURE__ */ (0,
|
|
11481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12945
11482
|
"span",
|
|
12946
11483
|
{
|
|
12947
11484
|
className: cn(
|
|
@@ -12955,11 +11492,11 @@ var CommandShortcut = ({
|
|
|
12955
11492
|
CommandShortcut.displayName = "CommandShortcut";
|
|
12956
11493
|
|
|
12957
11494
|
// src/components/molecules/overlay/popover.tsx
|
|
12958
|
-
var
|
|
12959
|
-
var
|
|
11495
|
+
var React62 = __toESM(require("react"));
|
|
11496
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
12960
11497
|
var Popover3 = Root24;
|
|
12961
11498
|
var PopoverTrigger3 = Trigger4;
|
|
12962
|
-
var PopoverContent3 =
|
|
11499
|
+
var PopoverContent3 = React62.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Portal5, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
12963
11500
|
Content23,
|
|
12964
11501
|
{
|
|
12965
11502
|
ref,
|
|
@@ -12975,7 +11512,7 @@ var PopoverContent3 = React79.forwardRef(({ className, align = "center", sideOff
|
|
|
12975
11512
|
PopoverContent3.displayName = Content23.displayName;
|
|
12976
11513
|
|
|
12977
11514
|
// src/components/molecules/forms/combobox.tsx
|
|
12978
|
-
var
|
|
11515
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
12979
11516
|
function Combobox({
|
|
12980
11517
|
options,
|
|
12981
11518
|
placeholder = "",
|
|
@@ -12983,9 +11520,9 @@ function Combobox({
|
|
|
12983
11520
|
onChange,
|
|
12984
11521
|
value = ""
|
|
12985
11522
|
}) {
|
|
12986
|
-
const [open, setOpen] =
|
|
12987
|
-
return /* @__PURE__ */ (0,
|
|
12988
|
-
/* @__PURE__ */ (0,
|
|
11523
|
+
const [open, setOpen] = React63.useState(false);
|
|
11524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Popover3, { open, onOpenChange: setOpen, children: [
|
|
11525
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(PopoverTrigger3, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
12989
11526
|
Button,
|
|
12990
11527
|
{
|
|
12991
11528
|
variant: "outline",
|
|
@@ -12993,21 +11530,21 @@ function Combobox({
|
|
|
12993
11530
|
"aria-expanded": open,
|
|
12994
11531
|
className: "cnc-w-full cnc-justify-between cnc-truncate ",
|
|
12995
11532
|
children: [
|
|
12996
|
-
/* @__PURE__ */ (0,
|
|
12997
|
-
/* @__PURE__ */ (0,
|
|
11533
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: value ? options?.find((framework) => framework.value === value)?.label : placeholder }),
|
|
11534
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ChevronsUpDown, { className: "cnc-ml-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" })
|
|
12998
11535
|
]
|
|
12999
11536
|
}
|
|
13000
11537
|
) }),
|
|
13001
|
-
/* @__PURE__ */ (0,
|
|
11538
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
13002
11539
|
PopoverContent3,
|
|
13003
11540
|
{
|
|
13004
11541
|
align: "start",
|
|
13005
11542
|
className: "cnc-w-[--radix-popover-trigger-width] cnc-p-0",
|
|
13006
|
-
children: /* @__PURE__ */ (0,
|
|
13007
|
-
/* @__PURE__ */ (0,
|
|
13008
|
-
/* @__PURE__ */ (0,
|
|
13009
|
-
/* @__PURE__ */ (0,
|
|
13010
|
-
/* @__PURE__ */ (0,
|
|
11543
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Command, { children: [
|
|
11544
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CommandInput, { placeholder: command?.placeholder }),
|
|
11545
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(CommandList, { children: [
|
|
11546
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CommandEmpty, { children: command?.emptyMessage ?? "Nenhum item encontrado" }),
|
|
11547
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CommandGroup, { children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
13011
11548
|
CommandItem,
|
|
13012
11549
|
{
|
|
13013
11550
|
value: option.value,
|
|
@@ -13018,7 +11555,7 @@ function Combobox({
|
|
|
13018
11555
|
},
|
|
13019
11556
|
keywords: [option.value, option.label],
|
|
13020
11557
|
children: [
|
|
13021
|
-
/* @__PURE__ */ (0,
|
|
11558
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
13022
11559
|
Check,
|
|
13023
11560
|
{
|
|
13024
11561
|
className: cn(
|