remoraid 3.3.2 → 3.5.0
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/core/index.cjs +524 -474
- package/dist/core/index.d.ts +48 -15
- package/dist/core/index.js +525 -475
- package/package.json +1 -1
package/dist/core/index.js
CHANGED
|
@@ -5610,10 +5610,12 @@ function WidgetsProvider({
|
|
|
5610
5610
|
var NavbarVariant;
|
|
5611
5611
|
((NavbarVariant2) => {
|
|
5612
5612
|
NavbarVariant2["Minimal"] = "minimal";
|
|
5613
|
+
NavbarVariant2["Custom"] = "custom";
|
|
5613
5614
|
})(NavbarVariant ||= {});
|
|
5614
5615
|
var FooterVariant;
|
|
5615
5616
|
((FooterVariant2) => {
|
|
5616
5617
|
FooterVariant2["Minimal"] = "minimal";
|
|
5618
|
+
FooterVariant2["Custom"] = "custom";
|
|
5617
5619
|
})(FooterVariant ||= {});
|
|
5618
5620
|
var NavbarMode;
|
|
5619
5621
|
((NavbarMode2) => {
|
|
@@ -5751,6 +5753,34 @@ var isIcon = (value) => {
|
|
|
5751
5753
|
const candidate = value;
|
|
5752
5754
|
return "render" in candidate && typeof candidate.render === "function";
|
|
5753
5755
|
};
|
|
5756
|
+
var navbarMetadata = {
|
|
5757
|
+
["minimal" /* Minimal */]: {
|
|
5758
|
+
defaultPosition: "left" /* Left */,
|
|
5759
|
+
supportedModes: [
|
|
5760
|
+
"collapsed" /* Collapsed */,
|
|
5761
|
+
"expanded" /* Expanded */,
|
|
5762
|
+
"responsive" /* Responsive */
|
|
5763
|
+
],
|
|
5764
|
+
supportedPositions: [
|
|
5765
|
+
null,
|
|
5766
|
+
"top" /* Top */,
|
|
5767
|
+
"bottom" /* Bottom */,
|
|
5768
|
+
"left" /* Left */,
|
|
5769
|
+
"right" /* Right */,
|
|
5770
|
+
"content" /* Content */
|
|
5771
|
+
]
|
|
5772
|
+
}
|
|
5773
|
+
};
|
|
5774
|
+
var footerMetadata = {
|
|
5775
|
+
["minimal" /* Minimal */]: {
|
|
5776
|
+
defaultPosition: "content" /* Content */,
|
|
5777
|
+
supportedPositions: [
|
|
5778
|
+
null,
|
|
5779
|
+
"bottom" /* Bottom */,
|
|
5780
|
+
"content" /* Content */
|
|
5781
|
+
]
|
|
5782
|
+
}
|
|
5783
|
+
};
|
|
5754
5784
|
|
|
5755
5785
|
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
|
5756
5786
|
import { px, rgba, useMantineTheme } from "@mantine/core";
|
|
@@ -6157,7 +6187,9 @@ var defaultAppContext = {
|
|
|
6157
6187
|
name: "Hello, World!",
|
|
6158
6188
|
nav: [],
|
|
6159
6189
|
navbarVariant: "minimal" /* Minimal */,
|
|
6190
|
+
navbarMetadata: navbarMetadata["minimal" /* Minimal */],
|
|
6160
6191
|
footerVariant: "minimal" /* Minimal */,
|
|
6192
|
+
footerMetadata: footerMetadata["minimal" /* Minimal */],
|
|
6161
6193
|
navbarMobileVariant: null
|
|
6162
6194
|
};
|
|
6163
6195
|
var appContext = createContext5(defaultAppContext);
|
|
@@ -6168,9 +6200,30 @@ function AppProvider({
|
|
|
6168
6200
|
appContext: appContextProp,
|
|
6169
6201
|
children
|
|
6170
6202
|
}) {
|
|
6171
|
-
const {
|
|
6203
|
+
const {
|
|
6204
|
+
navbarMetadata: navbarMetadataProp,
|
|
6205
|
+
footerMetadata: footerMetadataProp,
|
|
6206
|
+
logo,
|
|
6207
|
+
...mergeableAppContext
|
|
6208
|
+
} = appContextProp;
|
|
6209
|
+
const {
|
|
6210
|
+
navbarMetadata: _defaultNavbarMetadata,
|
|
6211
|
+
footerMetadata: _defaultFooterMetadata,
|
|
6212
|
+
...defaultAppContextWithoutMetadata
|
|
6213
|
+
} = defaultAppContext;
|
|
6214
|
+
const resolvedNavbarVariant = appContextProp.navbarVariant === undefined ? defaultAppContext.navbarVariant : appContextProp.navbarVariant;
|
|
6215
|
+
const resolvedFooterVariant = appContextProp.footerVariant === undefined ? defaultAppContext.footerVariant : appContextProp.footerVariant;
|
|
6172
6216
|
return /* @__PURE__ */ jsx9(appContext.Provider, {
|
|
6173
|
-
value: {
|
|
6217
|
+
value: {
|
|
6218
|
+
...import_lodash4.merge({}, defaultAppContextWithoutMetadata, mergeableAppContext),
|
|
6219
|
+
logo,
|
|
6220
|
+
...resolvedNavbarVariant === null ? {} : {
|
|
6221
|
+
navbarMetadata: resolvedNavbarVariant === "custom" /* Custom */ ? navbarMetadataProp : navbarMetadata[resolvedNavbarVariant]
|
|
6222
|
+
},
|
|
6223
|
+
...resolvedFooterVariant === null ? {} : {
|
|
6224
|
+
footerMetadata: resolvedFooterVariant === "custom" /* Custom */ ? footerMetadataProp : footerMetadata[resolvedFooterVariant]
|
|
6225
|
+
}
|
|
6226
|
+
},
|
|
6174
6227
|
children
|
|
6175
6228
|
});
|
|
6176
6229
|
}
|
|
@@ -6179,16 +6232,170 @@ function AppProvider({
|
|
|
6179
6232
|
var import_lodash13 = __toESM(require_lodash(), 1);
|
|
6180
6233
|
|
|
6181
6234
|
// src/core/components/AppShell/AppShellUserExperienceProvider/index.tsx
|
|
6182
|
-
var
|
|
6183
|
-
import { useContext as
|
|
6235
|
+
var import_lodash5 = __toESM(require_lodash(), 1);
|
|
6236
|
+
import { useContext as useContext8 } from "react";
|
|
6237
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
6238
|
+
var defaultAppShellUserExperience = {
|
|
6239
|
+
navbar: {
|
|
6240
|
+
position: null,
|
|
6241
|
+
mobilePosition: null,
|
|
6242
|
+
mode: "responsive" /* Responsive */
|
|
6243
|
+
},
|
|
6244
|
+
footer: {
|
|
6245
|
+
position: null
|
|
6246
|
+
}
|
|
6247
|
+
};
|
|
6248
|
+
var defaultAppShellUserExperienceCookieName = "remoraid-app-shell-user-experience";
|
|
6249
|
+
var appShellUserExperienceContext = createUserExperienceContext(defaultAppShellUserExperience);
|
|
6250
|
+
var useAppShellUserExperience = () => {
|
|
6251
|
+
return useContext8(appShellUserExperienceContext);
|
|
6252
|
+
};
|
|
6253
|
+
function AppShellUserExperienceProvider({
|
|
6254
|
+
children,
|
|
6255
|
+
initialValue,
|
|
6256
|
+
cookieName
|
|
6257
|
+
}) {
|
|
6258
|
+
const { navbarVariant, navbarMetadata: navbarMetadata2, footerVariant, footerMetadata: footerMetadata2 } = useRemoraidApp();
|
|
6259
|
+
const isValidUserExperience = (x) => {
|
|
6260
|
+
if (typeof x !== "object") {
|
|
6261
|
+
return false;
|
|
6262
|
+
}
|
|
6263
|
+
if (x === null) {
|
|
6264
|
+
return false;
|
|
6265
|
+
}
|
|
6266
|
+
if (!("navbar" in x)) {
|
|
6267
|
+
return false;
|
|
6268
|
+
}
|
|
6269
|
+
if (!("footer" in x)) {
|
|
6270
|
+
return false;
|
|
6271
|
+
}
|
|
6272
|
+
return true;
|
|
6273
|
+
};
|
|
6274
|
+
return /* @__PURE__ */ jsx10(UserExperienceProviderWrapper, {
|
|
6275
|
+
context: appShellUserExperienceContext,
|
|
6276
|
+
isValidUserExperience,
|
|
6277
|
+
cookieName: cookieName ?? defaultAppShellUserExperienceCookieName,
|
|
6278
|
+
defaultUserExperience: defaultAppShellUserExperience,
|
|
6279
|
+
initialValue: import_lodash5.merge({
|
|
6280
|
+
navbar: {
|
|
6281
|
+
position: navbarVariant === null ? null : navbarMetadata2.defaultPosition
|
|
6282
|
+
},
|
|
6283
|
+
footer: {
|
|
6284
|
+
position: footerVariant === null ? null : footerMetadata2.defaultPosition
|
|
6285
|
+
}
|
|
6286
|
+
}, initialValue),
|
|
6287
|
+
children
|
|
6288
|
+
});
|
|
6289
|
+
}
|
|
6184
6290
|
|
|
6185
|
-
// src/core/components/AppShell/
|
|
6186
|
-
import {
|
|
6187
|
-
import { IconPennant } from "@tabler/icons-react";
|
|
6188
|
-
var import_lodash6 = __toESM(require_lodash(), 1);
|
|
6291
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
6292
|
+
import { useState as useState7 } from "react";
|
|
6189
6293
|
|
|
6190
|
-
// src/core/components/
|
|
6191
|
-
import {
|
|
6294
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6295
|
+
import {
|
|
6296
|
+
Box as Box3,
|
|
6297
|
+
Group as Group2,
|
|
6298
|
+
Paper,
|
|
6299
|
+
ScrollArea as ScrollArea2,
|
|
6300
|
+
Stack as Stack2
|
|
6301
|
+
} from "@mantine/core";
|
|
6302
|
+
var import_lodash8 = __toESM(require_lodash(), 1);
|
|
6303
|
+
|
|
6304
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
|
|
6305
|
+
import {
|
|
6306
|
+
Box,
|
|
6307
|
+
Menu as MantineMenu,
|
|
6308
|
+
Transition,
|
|
6309
|
+
useMantineTheme as useMantineTheme2
|
|
6310
|
+
} from "@mantine/core";
|
|
6311
|
+
import { isValidElement as isValidElement2 } from "react";
|
|
6312
|
+
import { jsx as jsx11, jsxs } from "react/jsx-runtime";
|
|
6313
|
+
function NavigationMenu({
|
|
6314
|
+
target,
|
|
6315
|
+
elements,
|
|
6316
|
+
label,
|
|
6317
|
+
componentsProps
|
|
6318
|
+
}) {
|
|
6319
|
+
const theme = useRemoraidTheme();
|
|
6320
|
+
const mantineTheme = useMantineTheme2();
|
|
6321
|
+
const router = useRemoraidRouter();
|
|
6322
|
+
const { pathname } = router;
|
|
6323
|
+
const item = (element, style) => {
|
|
6324
|
+
const isLeaf2 = element.children === undefined || element.children.length === 0;
|
|
6325
|
+
const Menu2 = isLeaf2 ? MantineMenu : MantineMenu.Sub;
|
|
6326
|
+
return /* @__PURE__ */ jsx11(Menu2.Item, {
|
|
6327
|
+
leftSection: element.icon ? /* @__PURE__ */ jsx11(element.icon, {
|
|
6328
|
+
...theme.componentsProps.icons.small
|
|
6329
|
+
}) : undefined,
|
|
6330
|
+
c: element.type === "anchor" /* Anchor */ && element.href === pathname ? mantineTheme.primaryColor : undefined,
|
|
6331
|
+
onClick: (e) => {
|
|
6332
|
+
if (element.type === "anchor" /* Anchor */) {
|
|
6333
|
+
router.push(element.href);
|
|
6334
|
+
}
|
|
6335
|
+
if (element.type === "button" /* Button */) {
|
|
6336
|
+
element.onClick(e);
|
|
6337
|
+
}
|
|
6338
|
+
},
|
|
6339
|
+
style,
|
|
6340
|
+
children: element.label
|
|
6341
|
+
});
|
|
6342
|
+
};
|
|
6343
|
+
const isRoot = isValidElement2(target);
|
|
6344
|
+
const isLeaf = elements === undefined || elements.length === 0;
|
|
6345
|
+
const Menu = isRoot ? MantineMenu : MantineMenu.Sub;
|
|
6346
|
+
const menuProps = isRoot ? { trigger: "click-hover", ...componentsProps?.Menu } : { ...componentsProps?.MenuSub };
|
|
6347
|
+
return /* @__PURE__ */ jsx11(Transition, {
|
|
6348
|
+
mounted: isRoot ? true : target.mounted ?? true,
|
|
6349
|
+
...componentsProps?.transition,
|
|
6350
|
+
children: (transitionStyle) => {
|
|
6351
|
+
if (isLeaf) {
|
|
6352
|
+
if (isRoot) {
|
|
6353
|
+
return target;
|
|
6354
|
+
}
|
|
6355
|
+
return item(target, transitionStyle);
|
|
6356
|
+
}
|
|
6357
|
+
return /* @__PURE__ */ jsxs(Menu, {
|
|
6358
|
+
...menuProps,
|
|
6359
|
+
children: [
|
|
6360
|
+
/* @__PURE__ */ jsx11(Menu.Target, {
|
|
6361
|
+
children: isRoot ? /* @__PURE__ */ jsx11(Box, {
|
|
6362
|
+
...componentsProps?.rootTargetContainer,
|
|
6363
|
+
children: target
|
|
6364
|
+
}) : item(target, transitionStyle)
|
|
6365
|
+
}),
|
|
6366
|
+
/* @__PURE__ */ jsxs(Menu.Dropdown, {
|
|
6367
|
+
children: [
|
|
6368
|
+
label !== undefined && /* @__PURE__ */ jsx11(MantineMenu.Label, {
|
|
6369
|
+
children: label
|
|
6370
|
+
}),
|
|
6371
|
+
elements.map((element, i) => /* @__PURE__ */ jsx11(NavigationMenu, {
|
|
6372
|
+
target: element,
|
|
6373
|
+
elements: element.children,
|
|
6374
|
+
componentsProps
|
|
6375
|
+
}, `navigation-menu-${i}`))
|
|
6376
|
+
]
|
|
6377
|
+
})
|
|
6378
|
+
]
|
|
6379
|
+
});
|
|
6380
|
+
}
|
|
6381
|
+
});
|
|
6382
|
+
}
|
|
6383
|
+
|
|
6384
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6385
|
+
import { IconDots } from "@tabler/icons-react";
|
|
6386
|
+
|
|
6387
|
+
// src/core/components/RemoraidButton/index.tsx
|
|
6388
|
+
var import_lodash6 = __toESM(require_lodash(), 1);
|
|
6389
|
+
import {
|
|
6390
|
+
ActionIcon,
|
|
6391
|
+
Button,
|
|
6392
|
+
Tooltip,
|
|
6393
|
+
Transition as Transition2
|
|
6394
|
+
} from "@mantine/core";
|
|
6395
|
+
import { IconClick } from "@tabler/icons-react";
|
|
6396
|
+
import {
|
|
6397
|
+
isValidElement as isValidElement3
|
|
6398
|
+
} from "react";
|
|
6192
6399
|
|
|
6193
6400
|
// node_modules/clsx/dist/clsx.mjs
|
|
6194
6401
|
function r(e) {
|
|
@@ -6212,26 +6419,95 @@ function clsx() {
|
|
|
6212
6419
|
}
|
|
6213
6420
|
var clsx_default = clsx;
|
|
6214
6421
|
|
|
6215
|
-
// src/core/components/
|
|
6216
|
-
import { jsx as
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6422
|
+
// src/core/components/RemoraidButton/index.tsx
|
|
6423
|
+
import { jsx as jsx12, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
|
|
6424
|
+
var defaultRemoraidButtonSize = "sm";
|
|
6425
|
+
function RemoraidButton({
|
|
6426
|
+
label,
|
|
6427
|
+
responsive: responsiveProp,
|
|
6428
|
+
breakpoint: breakpointProp,
|
|
6429
|
+
collapsed: collapsedProp,
|
|
6430
|
+
size = defaultRemoraidButtonSize,
|
|
6431
|
+
color,
|
|
6432
|
+
onClick,
|
|
6433
|
+
loading,
|
|
6434
|
+
variant = "default",
|
|
6435
|
+
mounted = true,
|
|
6436
|
+
icon: iconProp,
|
|
6437
|
+
iconSize: iconSizeProp,
|
|
6438
|
+
clickTransformation = "default" /* Default */,
|
|
6221
6439
|
componentsProps
|
|
6222
6440
|
}) {
|
|
6223
6441
|
const theme = useRemoraidTheme();
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6442
|
+
const responsive = responsiveProp ?? true;
|
|
6443
|
+
const breakpoint = breakpointProp ?? theme.breakpoints.buttonCollapse;
|
|
6444
|
+
const collapsed = collapsedProp ?? false;
|
|
6445
|
+
const iconSize = iconSizeProp ?? getDefaultButtonIconSize(size);
|
|
6446
|
+
const Icon2 = iconProp ?? IconClick;
|
|
6447
|
+
const iconElement = isValidElement3(Icon2) ? Icon2 : /* @__PURE__ */ jsx12(Icon2, {
|
|
6448
|
+
...import_lodash6.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6449
|
+
});
|
|
6450
|
+
const clickTransformationClassNames = {
|
|
6451
|
+
["default" /* Default */]: null,
|
|
6452
|
+
["none" /* None */]: "remoraid-button-none",
|
|
6453
|
+
["scale" /* Scale */]: "remoraid-button-scale",
|
|
6454
|
+
["tiltDown" /* TiltDown */]: "remoraid-button-tilt-down",
|
|
6455
|
+
["tiltUp" /* TiltUp */]: "remoraid-button-tilt-up",
|
|
6456
|
+
["tiltLeft" /* TiltLeft */]: "remoraid-button-tilt-left",
|
|
6457
|
+
["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
|
|
6458
|
+
};
|
|
6459
|
+
const clickTransformationClass = clickTransformationClassNames[clickTransformation];
|
|
6460
|
+
return /* @__PURE__ */ jsx12(Transition2, {
|
|
6461
|
+
mounted,
|
|
6462
|
+
transition: "fade",
|
|
6463
|
+
duration: theme.transitionDurations.short,
|
|
6464
|
+
timingFunction: "ease",
|
|
6465
|
+
...componentsProps?.transition,
|
|
6466
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxs2(Fragment, {
|
|
6467
|
+
children: [
|
|
6468
|
+
/* @__PURE__ */ jsx12(Tooltip, {
|
|
6469
|
+
label,
|
|
6470
|
+
...componentsProps?.tooltip,
|
|
6471
|
+
children: /* @__PURE__ */ jsx12(ActionIcon, {
|
|
6472
|
+
"aria-label": label,
|
|
6473
|
+
variant,
|
|
6474
|
+
onClick,
|
|
6475
|
+
loading,
|
|
6476
|
+
size: size ? `input-${size}` : "input-sm",
|
|
6477
|
+
color,
|
|
6478
|
+
...componentsProps?.button,
|
|
6479
|
+
...componentsProps?.ActionIcon,
|
|
6480
|
+
hiddenFrom: !responsive ? undefined : breakpoint,
|
|
6481
|
+
display: !responsive && !collapsed ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
|
|
6482
|
+
style: import_lodash6.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.ActionIcon?.style),
|
|
6483
|
+
className: clsx_default(clickTransformationClass, componentsProps?.ActionIcon?.className, componentsProps?.button?.className),
|
|
6484
|
+
children: iconElement
|
|
6485
|
+
})
|
|
6486
|
+
}),
|
|
6487
|
+
/* @__PURE__ */ jsx12(Button, {
|
|
6488
|
+
onClick,
|
|
6489
|
+
loading,
|
|
6490
|
+
variant,
|
|
6491
|
+
size,
|
|
6492
|
+
color,
|
|
6493
|
+
leftSection: iconProp !== undefined ? iconElement : undefined,
|
|
6494
|
+
...componentsProps?.button,
|
|
6495
|
+
...componentsProps?.Button,
|
|
6496
|
+
visibleFrom: !responsive ? undefined : breakpoint,
|
|
6497
|
+
display: !responsive && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
|
|
6498
|
+
style: import_lodash6.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.Button?.style),
|
|
6499
|
+
className: clsx_default(clickTransformationClass, componentsProps?.Button?.className, componentsProps?.button?.className),
|
|
6500
|
+
children: label
|
|
6501
|
+
})
|
|
6502
|
+
]
|
|
6503
|
+
})
|
|
6232
6504
|
});
|
|
6233
6505
|
}
|
|
6234
6506
|
|
|
6507
|
+
// src/core/components/FrameLayout/Element/index.tsx
|
|
6508
|
+
import { createContext as createContext7, useContext as useContext10 } from "react";
|
|
6509
|
+
import { Box as Box2, Portal } from "@mantine/core";
|
|
6510
|
+
|
|
6235
6511
|
// src/core/components/FrameLayout/index.tsx
|
|
6236
6512
|
import {
|
|
6237
6513
|
Group,
|
|
@@ -6239,82 +6515,13 @@ import {
|
|
|
6239
6515
|
Stack
|
|
6240
6516
|
} from "@mantine/core";
|
|
6241
6517
|
import {
|
|
6242
|
-
createContext as
|
|
6518
|
+
createContext as createContext6,
|
|
6243
6519
|
useCallback,
|
|
6244
6520
|
useContext as useContext9,
|
|
6245
6521
|
useMemo as useMemo3
|
|
6246
6522
|
} from "react";
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
import { createContext as createContext6, useContext as useContext8 } from "react";
|
|
6250
|
-
import { Box, Portal } from "@mantine/core";
|
|
6251
|
-
|
|
6252
|
-
// src/core/lib/errors.ts
|
|
6253
|
-
class InvalidComponentUsageError extends Error {
|
|
6254
|
-
constructor(component, rule) {
|
|
6255
|
-
super(`Invalid usage of '${component}': ${rule}`);
|
|
6256
|
-
this.name = "InvalidComponentUsageError";
|
|
6257
|
-
}
|
|
6258
|
-
}
|
|
6259
|
-
|
|
6260
|
-
// src/core/components/FrameLayout/Element/index.tsx
|
|
6261
|
-
var import_lodash5 = __toESM(require_lodash(), 1);
|
|
6262
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
6263
|
-
var layoutElementContext = createContext6(null);
|
|
6264
|
-
var useFrameLayoutElement = () => {
|
|
6265
|
-
return useContext8(layoutElementContext);
|
|
6266
|
-
};
|
|
6267
|
-
function Element2({
|
|
6268
|
-
section,
|
|
6269
|
-
includeContainer = true,
|
|
6270
|
-
includePageContainer = false,
|
|
6271
|
-
layoutId,
|
|
6272
|
-
hidden = false,
|
|
6273
|
-
componentsProps,
|
|
6274
|
-
children
|
|
6275
|
-
}) {
|
|
6276
|
-
const { layouts } = useLayouts();
|
|
6277
|
-
const closestLayout = useFrameLayout();
|
|
6278
|
-
if (!closestLayout) {
|
|
6279
|
-
throw new InvalidComponentUsageError("FrameLayout.Element", "must be used as child of 'FrameLayout'.");
|
|
6280
|
-
}
|
|
6281
|
-
const layout = layouts[layoutId ?? closestLayout.layoutId];
|
|
6282
|
-
if (!layout) {
|
|
6283
|
-
return null;
|
|
6284
|
-
}
|
|
6285
|
-
if (layout.type !== "frame" /* Frame */) {
|
|
6286
|
-
throw new TypeError("Prop 'layoutId' in 'FrameLayout.Element' must refer to a valid 'FrameLayout' component. Leave 'layoutId' undefined, if you want to use the closest 'FrameLayout' as reference layout.");
|
|
6287
|
-
}
|
|
6288
|
-
if (!layout.sections[section]) {
|
|
6289
|
-
return null;
|
|
6290
|
-
}
|
|
6291
|
-
let containerProps = {};
|
|
6292
|
-
if (section === "left" /* Left */ || section === "right" /* Right */) {
|
|
6293
|
-
containerProps.h = "100%";
|
|
6294
|
-
}
|
|
6295
|
-
const element = includePageContainer ? /* @__PURE__ */ jsx11(PageContainer, {
|
|
6296
|
-
p: 0,
|
|
6297
|
-
hidden,
|
|
6298
|
-
...componentsProps?.PageContainer,
|
|
6299
|
-
children
|
|
6300
|
-
}) : children;
|
|
6301
|
-
return /* @__PURE__ */ jsx11(Portal, {
|
|
6302
|
-
target: layout.sections[section],
|
|
6303
|
-
children: /* @__PURE__ */ jsx11(layoutElementContext.Provider, {
|
|
6304
|
-
value: { layoutType: "frame" /* Frame */, section },
|
|
6305
|
-
children: includeContainer ? /* @__PURE__ */ jsx11(Box, {
|
|
6306
|
-
"data-hidden": hidden,
|
|
6307
|
-
...import_lodash5.merge(containerProps, componentsProps?.container),
|
|
6308
|
-
className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
|
|
6309
|
-
children: element
|
|
6310
|
-
}) : element
|
|
6311
|
-
})
|
|
6312
|
-
});
|
|
6313
|
-
}
|
|
6314
|
-
|
|
6315
|
-
// src/core/components/FrameLayout/index.tsx
|
|
6316
|
-
import { jsx as jsx12, jsxs } from "react/jsx-runtime";
|
|
6317
|
-
var layoutContext = createContext7(null);
|
|
6523
|
+
import { jsx as jsx13, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
6524
|
+
var layoutContext = createContext6(null);
|
|
6318
6525
|
var useFrameLayout = () => {
|
|
6319
6526
|
return useContext9(layoutContext);
|
|
6320
6527
|
};
|
|
@@ -6373,7 +6580,7 @@ function FrameLayout({
|
|
|
6373
6580
|
["content" /* Content */]: n
|
|
6374
6581
|
}));
|
|
6375
6582
|
}, [setSections]);
|
|
6376
|
-
const contentSection = /* @__PURE__ */
|
|
6583
|
+
const contentSection = /* @__PURE__ */ jsx13(Stack, {
|
|
6377
6584
|
ref: contentSectionRef,
|
|
6378
6585
|
h: "100%",
|
|
6379
6586
|
gap: gutter,
|
|
@@ -6388,9 +6595,9 @@ function FrameLayout({
|
|
|
6388
6595
|
...layout,
|
|
6389
6596
|
layoutId
|
|
6390
6597
|
}), [layout?.sections, defaultSections, layoutId]);
|
|
6391
|
-
return /* @__PURE__ */
|
|
6598
|
+
return /* @__PURE__ */ jsx13(layoutContext.Provider, {
|
|
6392
6599
|
value: layoutContextValue,
|
|
6393
|
-
children: /* @__PURE__ */
|
|
6600
|
+
children: /* @__PURE__ */ jsxs3(Group, {
|
|
6394
6601
|
gap: 0,
|
|
6395
6602
|
h: "100%",
|
|
6396
6603
|
w: "100%",
|
|
@@ -6401,7 +6608,7 @@ function FrameLayout({
|
|
|
6401
6608
|
},
|
|
6402
6609
|
className: clsx_default("remoraid-frame-layout", componentsProps?.horizontalContainer?.className),
|
|
6403
6610
|
children: [
|
|
6404
|
-
/* @__PURE__ */
|
|
6611
|
+
/* @__PURE__ */ jsx13(Group, {
|
|
6405
6612
|
ref: leftSectionRef,
|
|
6406
6613
|
h: "100%",
|
|
6407
6614
|
wrap: "nowrap",
|
|
@@ -6410,26 +6617,26 @@ function FrameLayout({
|
|
|
6410
6617
|
...componentsProps?.sectionContainers?.["left" /* Left */],
|
|
6411
6618
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-left-section", componentsProps?.sectionContainers?.["left" /* Left */]?.className)
|
|
6412
6619
|
}),
|
|
6413
|
-
/* @__PURE__ */
|
|
6620
|
+
/* @__PURE__ */ jsxs3(Stack, {
|
|
6414
6621
|
h: "100%",
|
|
6415
6622
|
flex: 1,
|
|
6416
6623
|
gap: 0,
|
|
6417
6624
|
...componentsProps?.verticalContainer,
|
|
6418
6625
|
className: clsx_default("remoraid-frame-layout-vertical-container", componentsProps?.verticalContainer?.className),
|
|
6419
6626
|
children: [
|
|
6420
|
-
/* @__PURE__ */
|
|
6627
|
+
/* @__PURE__ */ jsx13(Stack, {
|
|
6421
6628
|
ref: topSectionRef,
|
|
6422
6629
|
gap: gutter,
|
|
6423
6630
|
flex: 0,
|
|
6424
6631
|
...componentsProps?.sectionContainers?.["top" /* Top */],
|
|
6425
6632
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-top-section", componentsProps?.sectionContainers?.["top" /* Top */]?.className)
|
|
6426
6633
|
}),
|
|
6427
|
-
includeScrollArea ? /* @__PURE__ */
|
|
6634
|
+
includeScrollArea ? /* @__PURE__ */ jsx13(ScrollArea, {
|
|
6428
6635
|
flex: 1,
|
|
6429
6636
|
...componentsProps?.ScrollArea,
|
|
6430
6637
|
children: contentSection
|
|
6431
6638
|
}) : contentSection,
|
|
6432
|
-
/* @__PURE__ */
|
|
6639
|
+
/* @__PURE__ */ jsx13(Stack, {
|
|
6433
6640
|
ref: bottomSectionRef,
|
|
6434
6641
|
gap: gutter,
|
|
6435
6642
|
flex: 0,
|
|
@@ -6438,283 +6645,114 @@ function FrameLayout({
|
|
|
6438
6645
|
})
|
|
6439
6646
|
]
|
|
6440
6647
|
}),
|
|
6441
|
-
/* @__PURE__ */
|
|
6648
|
+
/* @__PURE__ */ jsx13(Group, {
|
|
6442
6649
|
ref: rightSectionRef,
|
|
6443
6650
|
h: "100%",
|
|
6444
6651
|
gap: gutter,
|
|
6445
6652
|
pl: 0,
|
|
6446
6653
|
wrap: "nowrap",
|
|
6447
6654
|
...componentsProps?.sectionContainers?.["right" /* Right */],
|
|
6448
|
-
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-right-section", componentsProps?.sectionContainers?.["right" /* Right */]?.className)
|
|
6449
|
-
})
|
|
6450
|
-
]
|
|
6451
|
-
})
|
|
6452
|
-
});
|
|
6453
|
-
}
|
|
6454
|
-
var FrameLayout_default = Object.assign(FrameLayout, {
|
|
6455
|
-
Element: Element2
|
|
6456
|
-
});
|
|
6457
|
-
|
|
6458
|
-
// src/core/components/AppShell/Footer/FooterMinimal/index.tsx
|
|
6459
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
6460
|
-
function FooterMinimal({
|
|
6461
|
-
icon: Icon2 = IconPennant,
|
|
6462
|
-
componentsProps
|
|
6463
|
-
}) {
|
|
6464
|
-
const theme = useRemoraidTheme();
|
|
6465
|
-
const {
|
|
6466
|
-
userExperience: {
|
|
6467
|
-
footer: { position }
|
|
6468
|
-
}
|
|
6469
|
-
} = useAppShellUserExperience();
|
|
6470
|
-
const content = /* @__PURE__ */ jsx13(PageContainer, {
|
|
6471
|
-
...componentsProps?.container,
|
|
6472
|
-
children: /* @__PURE__ */ jsx13(Center, {
|
|
6473
|
-
children: /* @__PURE__ */ jsx13(Icon2, {
|
|
6474
|
-
color: "var(--mantine-color-disabled)",
|
|
6475
|
-
...theme.componentsProps.icons.huge,
|
|
6476
|
-
...componentsProps?.icon
|
|
6477
|
-
})
|
|
6478
|
-
})
|
|
6479
|
-
});
|
|
6480
|
-
if (position === "bottom" /* Bottom */) {
|
|
6481
|
-
return /* @__PURE__ */ jsx13(FrameLayout_default.Element, {
|
|
6482
|
-
section: position,
|
|
6483
|
-
includeContainer: true,
|
|
6484
|
-
...componentsProps?.layoutElement,
|
|
6485
|
-
componentsProps: import_lodash6.merge({ container: { style: { order: -50 } } }, componentsProps?.layoutElement?.componentsProps),
|
|
6486
|
-
children: content
|
|
6487
|
-
});
|
|
6488
|
-
}
|
|
6489
|
-
if (position === "content" /* Content */) {
|
|
6490
|
-
return content;
|
|
6491
|
-
}
|
|
6492
|
-
return null;
|
|
6493
|
-
}
|
|
6494
|
-
|
|
6495
|
-
// src/core/components/AppShell/Footer/index.tsx
|
|
6496
|
-
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
6497
|
-
var supportedFooterPositions = {
|
|
6498
|
-
["minimal" /* Minimal */]: [
|
|
6499
|
-
null,
|
|
6500
|
-
"bottom" /* Bottom */,
|
|
6501
|
-
"content" /* Content */
|
|
6502
|
-
]
|
|
6503
|
-
};
|
|
6504
|
-
var defaultFooterPositions = {
|
|
6505
|
-
["minimal" /* Minimal */]: "content" /* Content */
|
|
6506
|
-
};
|
|
6507
|
-
function Footer({ componentsProps }) {
|
|
6508
|
-
const { footerVariant } = useRemoraidApp();
|
|
6509
|
-
if (footerVariant === "minimal" /* Minimal */) {
|
|
6510
|
-
return /* @__PURE__ */ jsx14(FooterMinimal, {
|
|
6511
|
-
...componentsProps?.FooterMinimal
|
|
6512
|
-
});
|
|
6513
|
-
}
|
|
6514
|
-
return null;
|
|
6515
|
-
}
|
|
6516
|
-
var Footer_default = Object.assign(Footer, {
|
|
6517
|
-
FooterMinimal
|
|
6518
|
-
});
|
|
6519
|
-
|
|
6520
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
6521
|
-
import { useState as useState7 } from "react";
|
|
6522
|
-
|
|
6523
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6524
|
-
import {
|
|
6525
|
-
Box as Box3,
|
|
6526
|
-
Group as Group2,
|
|
6527
|
-
Paper,
|
|
6528
|
-
ScrollArea as ScrollArea2,
|
|
6529
|
-
Stack as Stack2
|
|
6530
|
-
} from "@mantine/core";
|
|
6531
|
-
var import_lodash8 = __toESM(require_lodash(), 1);
|
|
6532
|
-
|
|
6533
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
|
|
6534
|
-
import {
|
|
6535
|
-
Box as Box2,
|
|
6536
|
-
Menu as MantineMenu,
|
|
6537
|
-
Transition,
|
|
6538
|
-
useMantineTheme as useMantineTheme2
|
|
6539
|
-
} from "@mantine/core";
|
|
6540
|
-
import { isValidElement as isValidElement2 } from "react";
|
|
6541
|
-
import { jsx as jsx15, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
6542
|
-
function NavigationMenu({
|
|
6543
|
-
target,
|
|
6544
|
-
elements,
|
|
6545
|
-
label,
|
|
6546
|
-
componentsProps
|
|
6547
|
-
}) {
|
|
6548
|
-
const theme = useRemoraidTheme();
|
|
6549
|
-
const mantineTheme = useMantineTheme2();
|
|
6550
|
-
const router = useRemoraidRouter();
|
|
6551
|
-
const { pathname } = router;
|
|
6552
|
-
const item = (element, style) => {
|
|
6553
|
-
const isLeaf2 = element.children === undefined || element.children.length === 0;
|
|
6554
|
-
const Menu2 = isLeaf2 ? MantineMenu : MantineMenu.Sub;
|
|
6555
|
-
return /* @__PURE__ */ jsx15(Menu2.Item, {
|
|
6556
|
-
leftSection: element.icon ? /* @__PURE__ */ jsx15(element.icon, {
|
|
6557
|
-
...theme.componentsProps.icons.small
|
|
6558
|
-
}) : undefined,
|
|
6559
|
-
c: element.type === "anchor" /* Anchor */ && element.href === pathname ? mantineTheme.primaryColor : undefined,
|
|
6560
|
-
onClick: (e) => {
|
|
6561
|
-
if (element.type === "anchor" /* Anchor */) {
|
|
6562
|
-
router.push(element.href);
|
|
6563
|
-
}
|
|
6564
|
-
if (element.type === "button" /* Button */) {
|
|
6565
|
-
element.onClick(e);
|
|
6566
|
-
}
|
|
6567
|
-
},
|
|
6568
|
-
style,
|
|
6569
|
-
children: element.label
|
|
6570
|
-
});
|
|
6571
|
-
};
|
|
6572
|
-
const isRoot = isValidElement2(target);
|
|
6573
|
-
const isLeaf = elements === undefined || elements.length === 0;
|
|
6574
|
-
const Menu = isRoot ? MantineMenu : MantineMenu.Sub;
|
|
6575
|
-
const menuProps = isRoot ? { trigger: "click-hover", ...componentsProps?.Menu } : { ...componentsProps?.MenuSub };
|
|
6576
|
-
return /* @__PURE__ */ jsx15(Transition, {
|
|
6577
|
-
mounted: isRoot ? true : target.mounted ?? true,
|
|
6578
|
-
...componentsProps?.transition,
|
|
6579
|
-
children: (transitionStyle) => {
|
|
6580
|
-
if (isLeaf) {
|
|
6581
|
-
if (isRoot) {
|
|
6582
|
-
return target;
|
|
6583
|
-
}
|
|
6584
|
-
return item(target, transitionStyle);
|
|
6585
|
-
}
|
|
6586
|
-
return /* @__PURE__ */ jsxs2(Menu, {
|
|
6587
|
-
...menuProps,
|
|
6588
|
-
children: [
|
|
6589
|
-
/* @__PURE__ */ jsx15(Menu.Target, {
|
|
6590
|
-
children: isRoot ? /* @__PURE__ */ jsx15(Box2, {
|
|
6591
|
-
...componentsProps?.rootTargetContainer,
|
|
6592
|
-
children: target
|
|
6593
|
-
}) : item(target, transitionStyle)
|
|
6594
|
-
}),
|
|
6595
|
-
/* @__PURE__ */ jsxs2(Menu.Dropdown, {
|
|
6596
|
-
children: [
|
|
6597
|
-
label !== undefined && /* @__PURE__ */ jsx15(MantineMenu.Label, {
|
|
6598
|
-
children: label
|
|
6599
|
-
}),
|
|
6600
|
-
elements.map((element, i) => /* @__PURE__ */ jsx15(NavigationMenu, {
|
|
6601
|
-
target: element,
|
|
6602
|
-
elements: element.children,
|
|
6603
|
-
componentsProps
|
|
6604
|
-
}, `navigation-menu-${i}`))
|
|
6605
|
-
]
|
|
6606
|
-
})
|
|
6607
|
-
]
|
|
6608
|
-
});
|
|
6609
|
-
}
|
|
6655
|
+
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-right-section", componentsProps?.sectionContainers?.["right" /* Right */]?.className)
|
|
6656
|
+
})
|
|
6657
|
+
]
|
|
6658
|
+
})
|
|
6610
6659
|
});
|
|
6611
6660
|
}
|
|
6661
|
+
var FrameLayout_default = Object.assign(FrameLayout, {
|
|
6662
|
+
Element: Element2
|
|
6663
|
+
});
|
|
6612
6664
|
|
|
6613
|
-
// src/core/
|
|
6614
|
-
|
|
6665
|
+
// src/core/lib/errors.ts
|
|
6666
|
+
class InvalidComponentUsageError extends Error {
|
|
6667
|
+
constructor(component, rule) {
|
|
6668
|
+
super(`Invalid usage of '${component}': ${rule}`);
|
|
6669
|
+
this.name = "InvalidComponentUsageError";
|
|
6670
|
+
}
|
|
6671
|
+
}
|
|
6615
6672
|
|
|
6616
|
-
// src/core/components/
|
|
6617
|
-
|
|
6618
|
-
import {
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
} from "@mantine/core";
|
|
6624
|
-
import { IconClick } from "@tabler/icons-react";
|
|
6625
|
-
import {
|
|
6626
|
-
isValidElement as isValidElement3
|
|
6627
|
-
} from "react";
|
|
6628
|
-
import { jsx as jsx16, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
6629
|
-
var defaultRemoraidButtonSize = "sm";
|
|
6630
|
-
function RemoraidButton({
|
|
6631
|
-
label,
|
|
6632
|
-
responsive: responsiveProp,
|
|
6633
|
-
breakpoint: breakpointProp,
|
|
6634
|
-
collapsed: collapsedProp,
|
|
6635
|
-
size = defaultRemoraidButtonSize,
|
|
6636
|
-
color,
|
|
6637
|
-
onClick,
|
|
6638
|
-
loading,
|
|
6639
|
-
variant = "default",
|
|
6640
|
-
mounted = true,
|
|
6641
|
-
icon: iconProp,
|
|
6642
|
-
iconSize: iconSizeProp,
|
|
6643
|
-
clickTransformation = "default" /* Default */,
|
|
6673
|
+
// src/core/components/Page/PageContainer/index.tsx
|
|
6674
|
+
import { Container } from "@mantine/core";
|
|
6675
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
6676
|
+
function PageContainer({
|
|
6677
|
+
children,
|
|
6678
|
+
p = 0,
|
|
6679
|
+
hidden = false,
|
|
6644
6680
|
componentsProps
|
|
6645
6681
|
}) {
|
|
6646
6682
|
const theme = useRemoraidTheme();
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6683
|
+
return /* @__PURE__ */ jsx14(Container, {
|
|
6684
|
+
size: theme.containerSize,
|
|
6685
|
+
p,
|
|
6686
|
+
w: "100%",
|
|
6687
|
+
"data-hidden": hidden,
|
|
6688
|
+
...componentsProps?.container,
|
|
6689
|
+
className: clsx_default("remoraid-page-container", componentsProps?.container?.className),
|
|
6690
|
+
children
|
|
6654
6691
|
});
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6692
|
+
}
|
|
6693
|
+
|
|
6694
|
+
// src/core/components/FrameLayout/Element/index.tsx
|
|
6695
|
+
var import_lodash7 = __toESM(require_lodash(), 1);
|
|
6696
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
6697
|
+
var layoutElementContext = createContext7(null);
|
|
6698
|
+
var useFrameLayoutElement = () => {
|
|
6699
|
+
return useContext10(layoutElementContext);
|
|
6700
|
+
};
|
|
6701
|
+
function Element2({
|
|
6702
|
+
section,
|
|
6703
|
+
includeContainer = true,
|
|
6704
|
+
includePageContainer = false,
|
|
6705
|
+
layoutId,
|
|
6706
|
+
hidden = false,
|
|
6707
|
+
componentsProps,
|
|
6708
|
+
children
|
|
6709
|
+
}) {
|
|
6710
|
+
const { layouts } = useLayouts();
|
|
6711
|
+
const closestLayout = useFrameLayout();
|
|
6712
|
+
if (!closestLayout) {
|
|
6713
|
+
throw new InvalidComponentUsageError("FrameLayout.Element", "must be used as child of 'FrameLayout'.");
|
|
6714
|
+
}
|
|
6715
|
+
const layout = layouts[layoutId ?? closestLayout.layoutId];
|
|
6716
|
+
if (!layout) {
|
|
6717
|
+
return null;
|
|
6718
|
+
}
|
|
6719
|
+
if (layout.type !== "frame" /* Frame */) {
|
|
6720
|
+
throw new TypeError("Prop 'layoutId' in 'FrameLayout.Element' must refer to a valid 'FrameLayout' component. Leave 'layoutId' undefined, if you want to use the closest 'FrameLayout' as reference layout.");
|
|
6721
|
+
}
|
|
6722
|
+
if (!layout.sections[section]) {
|
|
6723
|
+
return null;
|
|
6724
|
+
}
|
|
6725
|
+
let containerProps = {};
|
|
6726
|
+
if (section === "left" /* Left */ || section === "right" /* Right */) {
|
|
6727
|
+
containerProps.h = "100%";
|
|
6728
|
+
}
|
|
6729
|
+
const element = includePageContainer ? /* @__PURE__ */ jsx15(PageContainer, {
|
|
6730
|
+
p: 0,
|
|
6731
|
+
hidden,
|
|
6732
|
+
...componentsProps?.PageContainer,
|
|
6733
|
+
children
|
|
6734
|
+
}) : children;
|
|
6735
|
+
return /* @__PURE__ */ jsx15(Portal, {
|
|
6736
|
+
target: layout.sections[section],
|
|
6737
|
+
children: /* @__PURE__ */ jsx15(layoutElementContext.Provider, {
|
|
6738
|
+
value: { layoutType: "frame" /* Frame */, section },
|
|
6739
|
+
children: includeContainer ? /* @__PURE__ */ jsx15(Box2, {
|
|
6740
|
+
"data-hidden": hidden,
|
|
6741
|
+
...import_lodash7.merge(containerProps, componentsProps?.container),
|
|
6742
|
+
className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
|
|
6743
|
+
children: element
|
|
6744
|
+
}) : element
|
|
6708
6745
|
})
|
|
6709
6746
|
});
|
|
6710
6747
|
}
|
|
6711
6748
|
|
|
6712
6749
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6713
|
-
import { jsx as
|
|
6750
|
+
import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
6714
6751
|
function NavbarMinimalContent({
|
|
6715
6752
|
orientation,
|
|
6716
6753
|
maxElements,
|
|
6717
6754
|
collapseStaticElementsBreakpoint: collapseStaticElementsBreakpointProp,
|
|
6755
|
+
includeDefaultNavigationElements = true,
|
|
6718
6756
|
componentsProps
|
|
6719
6757
|
}) {
|
|
6720
6758
|
const theme = useRemoraidTheme();
|
|
@@ -6742,7 +6780,7 @@ function NavbarMinimalContent({
|
|
|
6742
6780
|
buttonCollapsed = false;
|
|
6743
6781
|
}
|
|
6744
6782
|
const buttonClickTransformation = orientation === "horizontal" /* Horizontal */ ? "tiltRight" /* TiltRight */ : "default" /* Default */;
|
|
6745
|
-
const logoButton = app.logo ? /* @__PURE__ */
|
|
6783
|
+
const logoButton = app.logo ? /* @__PURE__ */ jsx16(RemoraidButton, {
|
|
6746
6784
|
label: app.name,
|
|
6747
6785
|
variant: "subtle",
|
|
6748
6786
|
icon: app.logo,
|
|
@@ -6763,9 +6801,9 @@ function NavbarMinimalContent({
|
|
|
6763
6801
|
componentsProps?.logoButton?.onClick?.(e);
|
|
6764
6802
|
}
|
|
6765
6803
|
}) : undefined;
|
|
6766
|
-
const button = (element, key) => /* @__PURE__ */
|
|
6804
|
+
const button = (element, key) => /* @__PURE__ */ jsx16(NavigationMenu, {
|
|
6767
6805
|
label: element.label,
|
|
6768
|
-
target: /* @__PURE__ */
|
|
6806
|
+
target: /* @__PURE__ */ jsx16(RemoraidButton, {
|
|
6769
6807
|
mounted: element.mounted,
|
|
6770
6808
|
label: element.label,
|
|
6771
6809
|
icon: element.icon,
|
|
@@ -6802,17 +6840,21 @@ function NavbarMinimalContent({
|
|
|
6802
6840
|
}, key);
|
|
6803
6841
|
const elements = [
|
|
6804
6842
|
...app.nav,
|
|
6805
|
-
...getDefaultNavigationElements({
|
|
6843
|
+
...includeDefaultNavigationElements ? getDefaultNavigationElements({
|
|
6844
|
+
colorScheme,
|
|
6845
|
+
setColorScheme,
|
|
6846
|
+
auth: app.auth
|
|
6847
|
+
}) : []
|
|
6806
6848
|
];
|
|
6807
6849
|
const buttons = elements.filter((element) => !element.static).sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0)).slice(0, maxElements).map((element, i) => button(element, `nav-element-${i}`));
|
|
6808
6850
|
const staticElements = elements.filter((element) => element.static);
|
|
6809
6851
|
const staticButtons = staticElements.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0)).map((element, i) => button(element, `static-nav-element-${i}`));
|
|
6810
6852
|
const collapseStaticElements = staticElements.filter((element) => element.mounted ?? true).length > 1;
|
|
6811
|
-
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */
|
|
6853
|
+
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */ jsx16(Box3, {
|
|
6812
6854
|
hiddenFrom: collapseStaticElementsBreakpoint,
|
|
6813
|
-
children: /* @__PURE__ */
|
|
6855
|
+
children: /* @__PURE__ */ jsx16(NavigationMenu, {
|
|
6814
6856
|
elements: staticElements,
|
|
6815
|
-
target: /* @__PURE__ */
|
|
6857
|
+
target: /* @__PURE__ */ jsx16(RemoraidButton, {
|
|
6816
6858
|
label: "Static elements",
|
|
6817
6859
|
icon: IconDots,
|
|
6818
6860
|
responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
|
|
@@ -6833,7 +6875,7 @@ function NavbarMinimalContent({
|
|
|
6833
6875
|
}, componentsProps?.NavigationMenu?.componentsProps)
|
|
6834
6876
|
})
|
|
6835
6877
|
}) : null;
|
|
6836
|
-
return /* @__PURE__ */
|
|
6878
|
+
return /* @__PURE__ */ jsx16(Paper, {
|
|
6837
6879
|
bg: theme.transparentBackground,
|
|
6838
6880
|
h: "100%",
|
|
6839
6881
|
p: "md",
|
|
@@ -6843,13 +6885,13 @@ function NavbarMinimalContent({
|
|
|
6843
6885
|
h: "100%",
|
|
6844
6886
|
children: [
|
|
6845
6887
|
logoButton,
|
|
6846
|
-
/* @__PURE__ */
|
|
6888
|
+
/* @__PURE__ */ jsx16(ScrollArea2, {
|
|
6847
6889
|
flex: 1,
|
|
6848
|
-
children: /* @__PURE__ */
|
|
6890
|
+
children: /* @__PURE__ */ jsx16(Stack2, {
|
|
6849
6891
|
children: buttons
|
|
6850
6892
|
})
|
|
6851
6893
|
}),
|
|
6852
|
-
/* @__PURE__ */
|
|
6894
|
+
/* @__PURE__ */ jsx16(Stack2, {
|
|
6853
6895
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6854
6896
|
children: staticButtons
|
|
6855
6897
|
}),
|
|
@@ -6859,15 +6901,15 @@ function NavbarMinimalContent({
|
|
|
6859
6901
|
wrap: "nowrap",
|
|
6860
6902
|
children: [
|
|
6861
6903
|
logoButton,
|
|
6862
|
-
/* @__PURE__ */
|
|
6904
|
+
/* @__PURE__ */ jsx16(ScrollArea2, {
|
|
6863
6905
|
flex: 1,
|
|
6864
6906
|
style: { contain: "inline-size" },
|
|
6865
|
-
children: /* @__PURE__ */
|
|
6907
|
+
children: /* @__PURE__ */ jsx16(Group2, {
|
|
6866
6908
|
wrap: "nowrap",
|
|
6867
6909
|
children: buttons
|
|
6868
6910
|
})
|
|
6869
6911
|
}),
|
|
6870
|
-
/* @__PURE__ */
|
|
6912
|
+
/* @__PURE__ */ jsx16(Group2, {
|
|
6871
6913
|
wrap: "nowrap",
|
|
6872
6914
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6873
6915
|
children: staticButtons
|
|
@@ -6899,9 +6941,9 @@ import {
|
|
|
6899
6941
|
} from "@mantine/core";
|
|
6900
6942
|
import { IconClick as IconClick2 } from "@tabler/icons-react";
|
|
6901
6943
|
var import_lodash9 = __toESM(require_lodash(), 1);
|
|
6902
|
-
import { jsx as
|
|
6944
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
6903
6945
|
function ControlButton({
|
|
6904
|
-
icon:
|
|
6946
|
+
icon: Icon3 = IconClick2,
|
|
6905
6947
|
mounted = true,
|
|
6906
6948
|
size = "xs",
|
|
6907
6949
|
iconSize = "tiny" /* Tiny */,
|
|
@@ -6912,17 +6954,17 @@ function ControlButton({
|
|
|
6912
6954
|
componentsProps
|
|
6913
6955
|
}) {
|
|
6914
6956
|
const theme = useRemoraidTheme();
|
|
6915
|
-
return /* @__PURE__ */
|
|
6957
|
+
return /* @__PURE__ */ jsx17(Transition3, {
|
|
6916
6958
|
mounted,
|
|
6917
6959
|
transition: "fade",
|
|
6918
6960
|
duration: theme.transitionDurations.short,
|
|
6919
6961
|
timingFunction: "ease",
|
|
6920
6962
|
...componentsProps?.transition,
|
|
6921
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
6963
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx17(Tooltip2, {
|
|
6922
6964
|
label: tooltip,
|
|
6923
6965
|
disabled: !Boolean(tooltip),
|
|
6924
6966
|
...componentsProps?.tooltip,
|
|
6925
|
-
children: /* @__PURE__ */
|
|
6967
|
+
children: /* @__PURE__ */ jsx17(ActionIcon2, {
|
|
6926
6968
|
"data-control-button": true,
|
|
6927
6969
|
size,
|
|
6928
6970
|
color,
|
|
@@ -6933,7 +6975,7 @@ function ControlButton({
|
|
|
6933
6975
|
order,
|
|
6934
6976
|
...import_lodash9.merge(transitionStyle, componentsProps?.button?.style)
|
|
6935
6977
|
},
|
|
6936
|
-
children: /* @__PURE__ */
|
|
6978
|
+
children: /* @__PURE__ */ jsx17(Icon3, {
|
|
6937
6979
|
...import_lodash9.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6938
6980
|
})
|
|
6939
6981
|
})
|
|
@@ -6950,7 +6992,7 @@ import {
|
|
|
6950
6992
|
} from "@mantine/core";
|
|
6951
6993
|
import { IconGripHorizontal } from "@tabler/icons-react";
|
|
6952
6994
|
var import_lodash10 = __toESM(require_lodash(), 1);
|
|
6953
|
-
import { jsx as
|
|
6995
|
+
import { jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
6954
6996
|
function Controls({
|
|
6955
6997
|
groupRef,
|
|
6956
6998
|
mounted = true,
|
|
@@ -7008,14 +7050,14 @@ function Controls({
|
|
|
7008
7050
|
const handlePointerUp = (e) => {
|
|
7009
7051
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
7010
7052
|
};
|
|
7011
|
-
return /* @__PURE__ */
|
|
7053
|
+
return /* @__PURE__ */ jsx18(Transition4, {
|
|
7012
7054
|
mounted,
|
|
7013
7055
|
keepMounted: true,
|
|
7014
7056
|
transition: "pop",
|
|
7015
7057
|
duration: theme.transitionDurations.short,
|
|
7016
7058
|
timingFunction: "ease",
|
|
7017
7059
|
...componentsProps?.transition,
|
|
7018
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7060
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx18(Paper2, {
|
|
7019
7061
|
ref: containerRef,
|
|
7020
7062
|
pos: "absolute",
|
|
7021
7063
|
p: gutter,
|
|
@@ -7038,7 +7080,7 @@ function Controls({
|
|
|
7038
7080
|
...componentsProps?.group,
|
|
7039
7081
|
className: clsx_default("remoraid-controls-group", componentsProps?.group?.className),
|
|
7040
7082
|
children: [
|
|
7041
|
-
/* @__PURE__ */
|
|
7083
|
+
/* @__PURE__ */ jsx18(IconGripHorizontal, {
|
|
7042
7084
|
...import_lodash10.merge({}, theme.componentsProps.icons[iconSize], { order: -100, color: "var(--mantine-color-default-border)" }, componentsProps?.gripIcon)
|
|
7043
7085
|
}),
|
|
7044
7086
|
children,
|
|
@@ -7046,7 +7088,7 @@ function Controls({
|
|
|
7046
7088
|
if (isValidElementOfType(ControlButton, button)) {
|
|
7047
7089
|
return button;
|
|
7048
7090
|
}
|
|
7049
|
-
return /* @__PURE__ */
|
|
7091
|
+
return /* @__PURE__ */ jsx18(ControlButton, {
|
|
7050
7092
|
...button
|
|
7051
7093
|
}, i);
|
|
7052
7094
|
})
|
|
@@ -7057,7 +7099,7 @@ function Controls({
|
|
|
7057
7099
|
}
|
|
7058
7100
|
|
|
7059
7101
|
// src/core/components/Pinnable/index.tsx
|
|
7060
|
-
import { jsx as
|
|
7102
|
+
import { jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
7061
7103
|
function Pinnable({
|
|
7062
7104
|
layoutType: layoutTypeProp,
|
|
7063
7105
|
section,
|
|
@@ -7077,7 +7119,7 @@ function Pinnable({
|
|
|
7077
7119
|
if (layout && layout.type !== layoutType) {
|
|
7078
7120
|
throw new TypeError(`Prop 'layoutId' in '${Pinnable.name}' refers to a layout of type ${layout.type}, expected ${layoutType}. Leave 'layoutId' undefined, if you want to use the layout in '${AppShell_default.name}' as reference layout.`);
|
|
7079
7121
|
}
|
|
7080
|
-
const controlButton = useMemo4(() => /* @__PURE__ */
|
|
7122
|
+
const controlButton = useMemo4(() => /* @__PURE__ */ jsx19(ControlButton, {
|
|
7081
7123
|
icon: pinned ? IconPinnedOff : IconPin,
|
|
7082
7124
|
tooltip: pinned ? "Unpin" : "Pin",
|
|
7083
7125
|
color: "green",
|
|
@@ -7096,11 +7138,11 @@ function Pinnable({
|
|
|
7096
7138
|
...componentsProps?.container,
|
|
7097
7139
|
className: clsx_default("remoraid-pinnable", componentsProps?.container?.className),
|
|
7098
7140
|
children: [
|
|
7099
|
-
controlsContainer === undefined ? /* @__PURE__ */
|
|
7141
|
+
controlsContainer === undefined ? /* @__PURE__ */ jsx19(Controls, {
|
|
7100
7142
|
dragContainerRef: containerRef,
|
|
7101
7143
|
...componentsProps?.controls,
|
|
7102
7144
|
children: controlButton
|
|
7103
|
-
}) : controlsContainer !== null && /* @__PURE__ */
|
|
7145
|
+
}) : controlsContainer !== null && /* @__PURE__ */ jsx19(Portal2, {
|
|
7104
7146
|
target: controlsContainer,
|
|
7105
7147
|
children: controlButton
|
|
7106
7148
|
}),
|
|
@@ -7114,7 +7156,7 @@ function Pinnable({
|
|
|
7114
7156
|
return null;
|
|
7115
7157
|
}
|
|
7116
7158
|
if (pinned && layoutType === "frame" /* Frame */) {
|
|
7117
|
-
return /* @__PURE__ */
|
|
7159
|
+
return /* @__PURE__ */ jsx19(FrameLayout_default.Element, {
|
|
7118
7160
|
layoutId,
|
|
7119
7161
|
section,
|
|
7120
7162
|
hidden,
|
|
@@ -7126,9 +7168,10 @@ function Pinnable({
|
|
|
7126
7168
|
}
|
|
7127
7169
|
|
|
7128
7170
|
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
7129
|
-
import { jsx as
|
|
7171
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
7130
7172
|
function NavbarMinimal({
|
|
7131
7173
|
pinnable = true,
|
|
7174
|
+
includeDefaultNavigationElements = true,
|
|
7132
7175
|
componentsProps
|
|
7133
7176
|
}) {
|
|
7134
7177
|
const {
|
|
@@ -7143,8 +7186,12 @@ function NavbarMinimal({
|
|
|
7143
7186
|
const handleLeave = () => {
|
|
7144
7187
|
setHover(false);
|
|
7145
7188
|
};
|
|
7189
|
+
const contentProps = {
|
|
7190
|
+
includeDefaultNavigationElements,
|
|
7191
|
+
...componentsProps?.content
|
|
7192
|
+
};
|
|
7146
7193
|
if (position === "left" /* Left */ || position === "right" /* Right */) {
|
|
7147
|
-
return /* @__PURE__ */
|
|
7194
|
+
return /* @__PURE__ */ jsx20(FrameLayout_default.Element, {
|
|
7148
7195
|
section: position,
|
|
7149
7196
|
includeContainer: true,
|
|
7150
7197
|
...componentsProps?.layoutElement,
|
|
@@ -7155,19 +7202,19 @@ function NavbarMinimal({
|
|
|
7155
7202
|
}
|
|
7156
7203
|
}
|
|
7157
7204
|
}, componentsProps?.layoutElement?.componentsProps),
|
|
7158
|
-
children: /* @__PURE__ */
|
|
7205
|
+
children: /* @__PURE__ */ jsx20(NavbarMinimalContent, {
|
|
7159
7206
|
orientation: "vertical" /* Vertical */,
|
|
7160
|
-
...
|
|
7207
|
+
...contentProps
|
|
7161
7208
|
})
|
|
7162
7209
|
});
|
|
7163
7210
|
}
|
|
7164
7211
|
if (position === "top" /* Top */ || position === "bottom" /* Bottom */) {
|
|
7165
|
-
const content = /* @__PURE__ */
|
|
7212
|
+
const content = /* @__PURE__ */ jsx20(NavbarMinimalContent, {
|
|
7166
7213
|
orientation: "horizontal" /* Horizontal */,
|
|
7167
|
-
...
|
|
7214
|
+
...contentProps
|
|
7168
7215
|
});
|
|
7169
7216
|
if (pinnable) {
|
|
7170
|
-
return /* @__PURE__ */
|
|
7217
|
+
return /* @__PURE__ */ jsx20(PageContainer, {
|
|
7171
7218
|
...componentsProps?.container,
|
|
7172
7219
|
componentsProps: {
|
|
7173
7220
|
...componentsProps?.container?.componentsProps,
|
|
@@ -7176,7 +7223,7 @@ function NavbarMinimal({
|
|
|
7176
7223
|
className: clsx_default("hide-if-empty", componentsProps?.container?.componentsProps?.container?.className)
|
|
7177
7224
|
}
|
|
7178
7225
|
},
|
|
7179
|
-
children: /* @__PURE__ */
|
|
7226
|
+
children: /* @__PURE__ */ jsx20(Pinnable, {
|
|
7180
7227
|
section: position,
|
|
7181
7228
|
initialValue: true,
|
|
7182
7229
|
...componentsProps?.Pinnable,
|
|
@@ -7219,11 +7266,11 @@ function NavbarMinimal({
|
|
|
7219
7266
|
return content;
|
|
7220
7267
|
}
|
|
7221
7268
|
if (position === "content" /* Content */) {
|
|
7222
|
-
return /* @__PURE__ */
|
|
7269
|
+
return /* @__PURE__ */ jsx20(PageContainer, {
|
|
7223
7270
|
...componentsProps?.container,
|
|
7224
|
-
children: /* @__PURE__ */
|
|
7271
|
+
children: /* @__PURE__ */ jsx20(NavbarMinimalContent, {
|
|
7225
7272
|
orientation: "horizontal" /* Horizontal */,
|
|
7226
|
-
...
|
|
7273
|
+
...contentProps
|
|
7227
7274
|
})
|
|
7228
7275
|
});
|
|
7229
7276
|
}
|
|
@@ -7232,18 +7279,7 @@ function NavbarMinimal({
|
|
|
7232
7279
|
|
|
7233
7280
|
// src/core/components/AppShell/Navbar/index.tsx
|
|
7234
7281
|
import { IconLogin, IconLogout, IconMoon, IconSun } from "@tabler/icons-react";
|
|
7235
|
-
import { jsx as
|
|
7236
|
-
var supportedNavbarPositions = {
|
|
7237
|
-
["minimal" /* Minimal */]: [
|
|
7238
|
-
null,
|
|
7239
|
-
"top" /* Top */,
|
|
7240
|
-
"bottom" /* Bottom */,
|
|
7241
|
-
"left" /* Left */,
|
|
7242
|
-
"right" /* Right */,
|
|
7243
|
-
"content" /* Content */
|
|
7244
|
-
]
|
|
7245
|
-
};
|
|
7246
|
-
var defaultNavbarPositions = { ["minimal" /* Minimal */]: "left" /* Left */ };
|
|
7282
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
7247
7283
|
var getDefaultNavigationElements = ({
|
|
7248
7284
|
colorScheme,
|
|
7249
7285
|
setColorScheme,
|
|
@@ -7283,7 +7319,7 @@ var getDefaultNavigationElements = ({
|
|
|
7283
7319
|
function Navbar({ componentsProps }) {
|
|
7284
7320
|
const { navbarVariant } = useRemoraidApp();
|
|
7285
7321
|
if (navbarVariant === "minimal" /* Minimal */) {
|
|
7286
|
-
return /* @__PURE__ */
|
|
7322
|
+
return /* @__PURE__ */ jsx21(NavbarMinimal, {
|
|
7287
7323
|
...componentsProps?.NavbarMinimal
|
|
7288
7324
|
});
|
|
7289
7325
|
}
|
|
@@ -7293,60 +7329,60 @@ var Navbar_default = Object.assign(Navbar, {
|
|
|
7293
7329
|
NavbarMinimal
|
|
7294
7330
|
});
|
|
7295
7331
|
|
|
7296
|
-
// src/core/components/AppShell/
|
|
7297
|
-
import {
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
footer: {
|
|
7305
|
-
position: null
|
|
7306
|
-
}
|
|
7307
|
-
};
|
|
7308
|
-
var defaultAppShellUserExperienceCookieName = "remoraid-app-shell-user-experience";
|
|
7309
|
-
var appShellUserExperienceContext = createUserExperienceContext(defaultAppShellUserExperience);
|
|
7310
|
-
var useAppShellUserExperience = () => {
|
|
7311
|
-
return useContext10(appShellUserExperienceContext);
|
|
7312
|
-
};
|
|
7313
|
-
function AppShellUserExperienceProvider({
|
|
7314
|
-
children,
|
|
7315
|
-
initialValue,
|
|
7316
|
-
cookieName
|
|
7332
|
+
// src/core/components/AppShell/Footer/FooterMinimal/index.tsx
|
|
7333
|
+
import { Center } from "@mantine/core";
|
|
7334
|
+
import { IconPennant } from "@tabler/icons-react";
|
|
7335
|
+
var import_lodash12 = __toESM(require_lodash(), 1);
|
|
7336
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
7337
|
+
function FooterMinimal({
|
|
7338
|
+
icon: Icon4 = IconPennant,
|
|
7339
|
+
componentsProps
|
|
7317
7340
|
}) {
|
|
7318
|
-
const
|
|
7319
|
-
const
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
}
|
|
7323
|
-
if (x === null) {
|
|
7324
|
-
return false;
|
|
7325
|
-
}
|
|
7326
|
-
if (!("navbar" in x)) {
|
|
7327
|
-
return false;
|
|
7328
|
-
}
|
|
7329
|
-
if (!("footer" in x)) {
|
|
7330
|
-
return false;
|
|
7341
|
+
const theme = useRemoraidTheme();
|
|
7342
|
+
const {
|
|
7343
|
+
userExperience: {
|
|
7344
|
+
footer: { position }
|
|
7331
7345
|
}
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
},
|
|
7343
|
-
footer: {
|
|
7344
|
-
position: footerVariant === null ? null : defaultFooterPositions[footerVariant]
|
|
7345
|
-
}
|
|
7346
|
-
}, initialValue),
|
|
7347
|
-
children
|
|
7346
|
+
} = useAppShellUserExperience();
|
|
7347
|
+
const content = /* @__PURE__ */ jsx22(PageContainer, {
|
|
7348
|
+
...componentsProps?.container,
|
|
7349
|
+
children: /* @__PURE__ */ jsx22(Center, {
|
|
7350
|
+
children: /* @__PURE__ */ jsx22(Icon4, {
|
|
7351
|
+
color: "var(--mantine-color-disabled)",
|
|
7352
|
+
...theme.componentsProps.icons.huge,
|
|
7353
|
+
...componentsProps?.icon
|
|
7354
|
+
})
|
|
7355
|
+
})
|
|
7348
7356
|
});
|
|
7357
|
+
if (position === "bottom" /* Bottom */) {
|
|
7358
|
+
return /* @__PURE__ */ jsx22(FrameLayout_default.Element, {
|
|
7359
|
+
section: position,
|
|
7360
|
+
includeContainer: true,
|
|
7361
|
+
...componentsProps?.layoutElement,
|
|
7362
|
+
componentsProps: import_lodash12.merge({ container: { style: { order: -50 } } }, componentsProps?.layoutElement?.componentsProps),
|
|
7363
|
+
children: content
|
|
7364
|
+
});
|
|
7365
|
+
}
|
|
7366
|
+
if (position === "content" /* Content */) {
|
|
7367
|
+
return content;
|
|
7368
|
+
}
|
|
7369
|
+
return null;
|
|
7370
|
+
}
|
|
7371
|
+
|
|
7372
|
+
// src/core/components/AppShell/Footer/index.tsx
|
|
7373
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
7374
|
+
function Footer({ componentsProps }) {
|
|
7375
|
+
const { footerVariant } = useRemoraidApp();
|
|
7376
|
+
if (footerVariant === "minimal" /* Minimal */) {
|
|
7377
|
+
return /* @__PURE__ */ jsx23(FooterMinimal, {
|
|
7378
|
+
...componentsProps?.FooterMinimal
|
|
7379
|
+
});
|
|
7380
|
+
}
|
|
7381
|
+
return null;
|
|
7349
7382
|
}
|
|
7383
|
+
var Footer_default = Object.assign(Footer, {
|
|
7384
|
+
FooterMinimal
|
|
7385
|
+
});
|
|
7350
7386
|
|
|
7351
7387
|
// src/core/components/AppShell/index.tsx
|
|
7352
7388
|
import { jsx as jsx24, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
@@ -8389,7 +8425,7 @@ function NavbarSettingsWidget({
|
|
|
8389
8425
|
}) {
|
|
8390
8426
|
const additionalRows = additionalRowsProp?.map((additionalRow) => asElementOrPropsOfType(SettingsTable_default.Row, additionalRow, "Check the 'additionalRows' property of 'NavbarSettingsWidget'."));
|
|
8391
8427
|
const { userExperience, updateUserExperience, initialUserExperience } = useAppShellUserExperience();
|
|
8392
|
-
const
|
|
8428
|
+
const { navbarVariant, navbarMetadata: navbarMetadata2 } = useRemoraidApp();
|
|
8393
8429
|
const modeLabels = {
|
|
8394
8430
|
["responsive" /* Responsive */]: "Responsive",
|
|
8395
8431
|
["collapsed" /* Collapsed */]: "Collapsed",
|
|
@@ -8406,7 +8442,15 @@ function NavbarSettingsWidget({
|
|
|
8406
8442
|
widgetProps: {
|
|
8407
8443
|
id: defaultNavbarSettingsWidgetId,
|
|
8408
8444
|
title: "Navbar Settings",
|
|
8409
|
-
...widgetProps
|
|
8445
|
+
...widgetProps,
|
|
8446
|
+
alerts: [
|
|
8447
|
+
{
|
|
8448
|
+
category: "negative" /* Negative */,
|
|
8449
|
+
text: "This app does not contain a registered navbar.",
|
|
8450
|
+
mounted: navbarVariant === null
|
|
8451
|
+
},
|
|
8452
|
+
...widgetProps?.alerts ?? []
|
|
8453
|
+
]
|
|
8410
8454
|
},
|
|
8411
8455
|
onRestoreDefaultValues: () => {
|
|
8412
8456
|
updateUserExperience((prev) => ({
|
|
@@ -8415,14 +8459,14 @@ function NavbarSettingsWidget({
|
|
|
8415
8459
|
}));
|
|
8416
8460
|
},
|
|
8417
8461
|
custom: !import_lodash20.isEqual(userExperience.navbar, initialUserExperience.navbar),
|
|
8418
|
-
children: /* @__PURE__ */ jsxs15(SettingsTable_default, {
|
|
8462
|
+
children: navbarVariant !== null && /* @__PURE__ */ jsxs15(SettingsTable_default, {
|
|
8419
8463
|
...componentsProps?.table,
|
|
8420
8464
|
children: [
|
|
8421
8465
|
/* @__PURE__ */ jsx39(SettingsTable_default.Row, {
|
|
8422
8466
|
label: "Select navbar position",
|
|
8423
8467
|
children: /* @__PURE__ */ jsx39(Select, {
|
|
8424
8468
|
value: userExperience.navbar.position ?? "hidden",
|
|
8425
|
-
data:
|
|
8469
|
+
data: navbarMetadata2.supportedPositions.map((position) => ({
|
|
8426
8470
|
value: position ?? "hidden",
|
|
8427
8471
|
label: position === null ? "Hidden" : positionLabels[position]
|
|
8428
8472
|
})),
|
|
@@ -8444,7 +8488,7 @@ function NavbarSettingsWidget({
|
|
|
8444
8488
|
label: "Select navbar mode",
|
|
8445
8489
|
children: /* @__PURE__ */ jsx39(Select, {
|
|
8446
8490
|
value: userExperience.navbar.mode,
|
|
8447
|
-
data:
|
|
8491
|
+
data: navbarMetadata2.supportedModes.map((mode) => ({
|
|
8448
8492
|
value: mode,
|
|
8449
8493
|
label: modeLabels[mode]
|
|
8450
8494
|
})),
|
|
@@ -8483,7 +8527,7 @@ function FooterSettingsWidget({
|
|
|
8483
8527
|
}) {
|
|
8484
8528
|
const additionalRows = additionalRowsProp?.map((additionalRow) => asElementOrPropsOfType(SettingsTable_default.Row, additionalRow, "Check the 'additionalRows' property of 'FooterSettingsWidget'."));
|
|
8485
8529
|
const { userExperience, updateUserExperience, initialUserExperience } = useAppShellUserExperience();
|
|
8486
|
-
const
|
|
8530
|
+
const { footerVariant, footerMetadata: footerMetadata2 } = useRemoraidApp();
|
|
8487
8531
|
const positionLabels = {
|
|
8488
8532
|
["bottom" /* Bottom */]: "Bottom",
|
|
8489
8533
|
["top" /* Top */]: "Top",
|
|
@@ -8495,7 +8539,15 @@ function FooterSettingsWidget({
|
|
|
8495
8539
|
widgetProps: {
|
|
8496
8540
|
id: defaultFooterSettingsWidgetId,
|
|
8497
8541
|
title: "Footer Settings",
|
|
8498
|
-
...widgetProps
|
|
8542
|
+
...widgetProps,
|
|
8543
|
+
alerts: [
|
|
8544
|
+
{
|
|
8545
|
+
category: "negative" /* Negative */,
|
|
8546
|
+
text: "This app does not contain a registered footer.",
|
|
8547
|
+
mounted: footerVariant === null
|
|
8548
|
+
},
|
|
8549
|
+
...widgetProps?.alerts ?? []
|
|
8550
|
+
]
|
|
8499
8551
|
},
|
|
8500
8552
|
onRestoreDefaultValues: () => {
|
|
8501
8553
|
updateUserExperience((prev) => ({
|
|
@@ -8504,14 +8556,14 @@ function FooterSettingsWidget({
|
|
|
8504
8556
|
}));
|
|
8505
8557
|
},
|
|
8506
8558
|
custom: !import_lodash21.isEqual(userExperience.footer, initialUserExperience.footer),
|
|
8507
|
-
children: /* @__PURE__ */ jsxs16(SettingsTable_default, {
|
|
8559
|
+
children: footerVariant !== null && /* @__PURE__ */ jsxs16(SettingsTable_default, {
|
|
8508
8560
|
...componentsProps?.table,
|
|
8509
8561
|
children: [
|
|
8510
8562
|
/* @__PURE__ */ jsx40(SettingsTable_default.Row, {
|
|
8511
8563
|
label: "Select footer position",
|
|
8512
8564
|
children: /* @__PURE__ */ jsx40(Select2, {
|
|
8513
8565
|
value: userExperience.footer.position ?? "hidden",
|
|
8514
|
-
data:
|
|
8566
|
+
data: footerMetadata2.supportedPositions.map((position) => ({
|
|
8515
8567
|
value: position ?? "hidden",
|
|
8516
8568
|
label: position === null ? "Hidden" : positionLabels[position]
|
|
8517
8569
|
})),
|
|
@@ -8651,10 +8703,9 @@ export {
|
|
|
8651
8703
|
useFrameLayoutElement,
|
|
8652
8704
|
useFrameLayout,
|
|
8653
8705
|
useAppShellUserExperience,
|
|
8654
|
-
supportedNavbarPositions,
|
|
8655
|
-
supportedFooterPositions,
|
|
8656
8706
|
scrollToWidget,
|
|
8657
8707
|
remoraidAppShellLayoutId,
|
|
8708
|
+
navbarMetadata,
|
|
8658
8709
|
isValidElementOfType,
|
|
8659
8710
|
isIcon,
|
|
8660
8711
|
getElementTypeName,
|
|
@@ -8662,6 +8713,7 @@ export {
|
|
|
8662
8713
|
getDefaultNavigationElements,
|
|
8663
8714
|
getDefaultButtonIconSize,
|
|
8664
8715
|
getCssVars,
|
|
8716
|
+
footerMetadata,
|
|
8665
8717
|
defaultUserExperienceCookieName,
|
|
8666
8718
|
defaultUserExperience,
|
|
8667
8719
|
defaultTransitionDurations,
|
|
@@ -8669,10 +8721,8 @@ export {
|
|
|
8669
8721
|
defaultSettingsTableOptions,
|
|
8670
8722
|
defaultRemoraidButtonSize,
|
|
8671
8723
|
defaultNavbarSettingsWidgetId,
|
|
8672
|
-
defaultNavbarPositions,
|
|
8673
8724
|
defaultLayoutsContext,
|
|
8674
8725
|
defaultFooterSettingsWidgetId,
|
|
8675
|
-
defaultFooterPositions,
|
|
8676
8726
|
defaultAppShellUserExperienceCookieName,
|
|
8677
8727
|
defaultAppShellUserExperience,
|
|
8678
8728
|
defaultAppContext,
|