remoraid 3.3.2 → 3.6.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/dist/data-visualization/index.cjs +65 -44
- package/dist/data-visualization/index.d.ts +8 -3
- package/dist/data-visualization/index.js +65 -44
- package/package.json +1 -1
package/dist/core/index.cjs
CHANGED
|
@@ -5475,10 +5475,9 @@ __export(exports_core, {
|
|
|
5475
5475
|
useFrameLayoutElement: () => useFrameLayoutElement,
|
|
5476
5476
|
useFrameLayout: () => useFrameLayout,
|
|
5477
5477
|
useAppShellUserExperience: () => useAppShellUserExperience,
|
|
5478
|
-
supportedNavbarPositions: () => supportedNavbarPositions,
|
|
5479
|
-
supportedFooterPositions: () => supportedFooterPositions,
|
|
5480
5478
|
scrollToWidget: () => scrollToWidget,
|
|
5481
5479
|
remoraidAppShellLayoutId: () => remoraidAppShellLayoutId,
|
|
5480
|
+
navbarMetadata: () => navbarMetadata,
|
|
5482
5481
|
isValidElementOfType: () => isValidElementOfType,
|
|
5483
5482
|
isIcon: () => isIcon,
|
|
5484
5483
|
getElementTypeName: () => getElementTypeName,
|
|
@@ -5486,6 +5485,7 @@ __export(exports_core, {
|
|
|
5486
5485
|
getDefaultNavigationElements: () => getDefaultNavigationElements,
|
|
5487
5486
|
getDefaultButtonIconSize: () => getDefaultButtonIconSize,
|
|
5488
5487
|
getCssVars: () => getCssVars,
|
|
5488
|
+
footerMetadata: () => footerMetadata,
|
|
5489
5489
|
defaultUserExperienceCookieName: () => defaultUserExperienceCookieName,
|
|
5490
5490
|
defaultUserExperience: () => defaultUserExperience,
|
|
5491
5491
|
defaultTransitionDurations: () => defaultTransitionDurations,
|
|
@@ -5493,10 +5493,8 @@ __export(exports_core, {
|
|
|
5493
5493
|
defaultSettingsTableOptions: () => defaultSettingsTableOptions,
|
|
5494
5494
|
defaultRemoraidButtonSize: () => defaultRemoraidButtonSize,
|
|
5495
5495
|
defaultNavbarSettingsWidgetId: () => defaultNavbarSettingsWidgetId,
|
|
5496
|
-
defaultNavbarPositions: () => defaultNavbarPositions,
|
|
5497
5496
|
defaultLayoutsContext: () => defaultLayoutsContext,
|
|
5498
5497
|
defaultFooterSettingsWidgetId: () => defaultFooterSettingsWidgetId,
|
|
5499
|
-
defaultFooterPositions: () => defaultFooterPositions,
|
|
5500
5498
|
defaultAppShellUserExperienceCookieName: () => defaultAppShellUserExperienceCookieName,
|
|
5501
5499
|
defaultAppShellUserExperience: () => defaultAppShellUserExperience,
|
|
5502
5500
|
defaultAppContext: () => defaultAppContext,
|
|
@@ -5727,10 +5725,12 @@ function WidgetsProvider({
|
|
|
5727
5725
|
var NavbarVariant;
|
|
5728
5726
|
((NavbarVariant2) => {
|
|
5729
5727
|
NavbarVariant2["Minimal"] = "minimal";
|
|
5728
|
+
NavbarVariant2["Custom"] = "custom";
|
|
5730
5729
|
})(NavbarVariant ||= {});
|
|
5731
5730
|
var FooterVariant;
|
|
5732
5731
|
((FooterVariant2) => {
|
|
5733
5732
|
FooterVariant2["Minimal"] = "minimal";
|
|
5733
|
+
FooterVariant2["Custom"] = "custom";
|
|
5734
5734
|
})(FooterVariant ||= {});
|
|
5735
5735
|
var NavbarMode;
|
|
5736
5736
|
((NavbarMode2) => {
|
|
@@ -5866,6 +5866,34 @@ var isIcon = (value) => {
|
|
|
5866
5866
|
const candidate = value;
|
|
5867
5867
|
return "render" in candidate && typeof candidate.render === "function";
|
|
5868
5868
|
};
|
|
5869
|
+
var navbarMetadata = {
|
|
5870
|
+
["minimal" /* Minimal */]: {
|
|
5871
|
+
defaultPosition: "left" /* Left */,
|
|
5872
|
+
supportedModes: [
|
|
5873
|
+
"collapsed" /* Collapsed */,
|
|
5874
|
+
"expanded" /* Expanded */,
|
|
5875
|
+
"responsive" /* Responsive */
|
|
5876
|
+
],
|
|
5877
|
+
supportedPositions: [
|
|
5878
|
+
null,
|
|
5879
|
+
"top" /* Top */,
|
|
5880
|
+
"bottom" /* Bottom */,
|
|
5881
|
+
"left" /* Left */,
|
|
5882
|
+
"right" /* Right */,
|
|
5883
|
+
"content" /* Content */
|
|
5884
|
+
]
|
|
5885
|
+
}
|
|
5886
|
+
};
|
|
5887
|
+
var footerMetadata = {
|
|
5888
|
+
["minimal" /* Minimal */]: {
|
|
5889
|
+
defaultPosition: "content" /* Content */,
|
|
5890
|
+
supportedPositions: [
|
|
5891
|
+
null,
|
|
5892
|
+
"bottom" /* Bottom */,
|
|
5893
|
+
"content" /* Content */
|
|
5894
|
+
]
|
|
5895
|
+
}
|
|
5896
|
+
};
|
|
5869
5897
|
|
|
5870
5898
|
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
|
5871
5899
|
var import_core2 = require("@mantine/core");
|
|
@@ -6245,7 +6273,9 @@ var defaultAppContext = {
|
|
|
6245
6273
|
name: "Hello, World!",
|
|
6246
6274
|
nav: [],
|
|
6247
6275
|
navbarVariant: "minimal" /* Minimal */,
|
|
6276
|
+
navbarMetadata: navbarMetadata["minimal" /* Minimal */],
|
|
6248
6277
|
footerVariant: "minimal" /* Minimal */,
|
|
6278
|
+
footerMetadata: footerMetadata["minimal" /* Minimal */],
|
|
6249
6279
|
navbarMobileVariant: null
|
|
6250
6280
|
};
|
|
6251
6281
|
var appContext = import_react9.createContext(defaultAppContext);
|
|
@@ -6256,9 +6286,30 @@ function AppProvider({
|
|
|
6256
6286
|
appContext: appContextProp,
|
|
6257
6287
|
children
|
|
6258
6288
|
}) {
|
|
6259
|
-
const {
|
|
6289
|
+
const {
|
|
6290
|
+
navbarMetadata: navbarMetadataProp,
|
|
6291
|
+
footerMetadata: footerMetadataProp,
|
|
6292
|
+
logo,
|
|
6293
|
+
...mergeableAppContext
|
|
6294
|
+
} = appContextProp;
|
|
6295
|
+
const {
|
|
6296
|
+
navbarMetadata: _defaultNavbarMetadata,
|
|
6297
|
+
footerMetadata: _defaultFooterMetadata,
|
|
6298
|
+
...defaultAppContextWithoutMetadata
|
|
6299
|
+
} = defaultAppContext;
|
|
6300
|
+
const resolvedNavbarVariant = appContextProp.navbarVariant === undefined ? defaultAppContext.navbarVariant : appContextProp.navbarVariant;
|
|
6301
|
+
const resolvedFooterVariant = appContextProp.footerVariant === undefined ? defaultAppContext.footerVariant : appContextProp.footerVariant;
|
|
6260
6302
|
return /* @__PURE__ */ jsx_runtime9.jsx(appContext.Provider, {
|
|
6261
|
-
value: {
|
|
6303
|
+
value: {
|
|
6304
|
+
...import_lodash4.merge({}, defaultAppContextWithoutMetadata, mergeableAppContext),
|
|
6305
|
+
logo,
|
|
6306
|
+
...resolvedNavbarVariant === null ? {} : {
|
|
6307
|
+
navbarMetadata: resolvedNavbarVariant === "custom" /* Custom */ ? navbarMetadataProp : navbarMetadata[resolvedNavbarVariant]
|
|
6308
|
+
},
|
|
6309
|
+
...resolvedFooterVariant === null ? {} : {
|
|
6310
|
+
footerMetadata: resolvedFooterVariant === "custom" /* Custom */ ? footerMetadataProp : footerMetadata[resolvedFooterVariant]
|
|
6311
|
+
}
|
|
6312
|
+
},
|
|
6262
6313
|
children
|
|
6263
6314
|
});
|
|
6264
6315
|
}
|
|
@@ -6267,16 +6318,152 @@ function AppProvider({
|
|
|
6267
6318
|
var import_lodash13 = __toESM(require_lodash());
|
|
6268
6319
|
|
|
6269
6320
|
// src/core/components/AppShell/AppShellUserExperienceProvider/index.tsx
|
|
6321
|
+
var import_react10 = require("react");
|
|
6322
|
+
var import_lodash5 = __toESM(require_lodash());
|
|
6323
|
+
var jsx_runtime10 = require("react/jsx-runtime");
|
|
6324
|
+
var defaultAppShellUserExperience = {
|
|
6325
|
+
navbar: {
|
|
6326
|
+
position: null,
|
|
6327
|
+
mobilePosition: null,
|
|
6328
|
+
mode: "responsive" /* Responsive */
|
|
6329
|
+
},
|
|
6330
|
+
footer: {
|
|
6331
|
+
position: null
|
|
6332
|
+
}
|
|
6333
|
+
};
|
|
6334
|
+
var defaultAppShellUserExperienceCookieName = "remoraid-app-shell-user-experience";
|
|
6335
|
+
var appShellUserExperienceContext = createUserExperienceContext(defaultAppShellUserExperience);
|
|
6336
|
+
var useAppShellUserExperience = () => {
|
|
6337
|
+
return import_react10.useContext(appShellUserExperienceContext);
|
|
6338
|
+
};
|
|
6339
|
+
function AppShellUserExperienceProvider({
|
|
6340
|
+
children,
|
|
6341
|
+
initialValue,
|
|
6342
|
+
cookieName
|
|
6343
|
+
}) {
|
|
6344
|
+
const { navbarVariant, navbarMetadata: navbarMetadata2, footerVariant, footerMetadata: footerMetadata2 } = useRemoraidApp();
|
|
6345
|
+
const isValidUserExperience = (x) => {
|
|
6346
|
+
if (typeof x !== "object") {
|
|
6347
|
+
return false;
|
|
6348
|
+
}
|
|
6349
|
+
if (x === null) {
|
|
6350
|
+
return false;
|
|
6351
|
+
}
|
|
6352
|
+
if (!("navbar" in x)) {
|
|
6353
|
+
return false;
|
|
6354
|
+
}
|
|
6355
|
+
if (!("footer" in x)) {
|
|
6356
|
+
return false;
|
|
6357
|
+
}
|
|
6358
|
+
return true;
|
|
6359
|
+
};
|
|
6360
|
+
return /* @__PURE__ */ jsx_runtime10.jsx(UserExperienceProviderWrapper, {
|
|
6361
|
+
context: appShellUserExperienceContext,
|
|
6362
|
+
isValidUserExperience,
|
|
6363
|
+
cookieName: cookieName ?? defaultAppShellUserExperienceCookieName,
|
|
6364
|
+
defaultUserExperience: defaultAppShellUserExperience,
|
|
6365
|
+
initialValue: import_lodash5.merge({
|
|
6366
|
+
navbar: {
|
|
6367
|
+
position: navbarVariant === null ? null : navbarMetadata2.defaultPosition
|
|
6368
|
+
},
|
|
6369
|
+
footer: {
|
|
6370
|
+
position: footerVariant === null ? null : footerMetadata2.defaultPosition
|
|
6371
|
+
}
|
|
6372
|
+
}, initialValue),
|
|
6373
|
+
children
|
|
6374
|
+
});
|
|
6375
|
+
}
|
|
6376
|
+
|
|
6377
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
6270
6378
|
var import_react17 = require("react");
|
|
6271
|
-
var import_lodash12 = __toESM(require_lodash());
|
|
6272
6379
|
|
|
6273
|
-
// src/core/components/AppShell/
|
|
6274
|
-
var
|
|
6275
|
-
var
|
|
6276
|
-
var import_lodash6 = __toESM(require_lodash());
|
|
6380
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6381
|
+
var import_core8 = require("@mantine/core");
|
|
6382
|
+
var import_lodash8 = __toESM(require_lodash());
|
|
6277
6383
|
|
|
6278
|
-
// src/core/components/
|
|
6384
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
|
|
6279
6385
|
var import_core3 = require("@mantine/core");
|
|
6386
|
+
var import_react11 = require("react");
|
|
6387
|
+
var jsx_runtime11 = require("react/jsx-runtime");
|
|
6388
|
+
function NavigationMenu({
|
|
6389
|
+
target,
|
|
6390
|
+
elements,
|
|
6391
|
+
label,
|
|
6392
|
+
componentsProps
|
|
6393
|
+
}) {
|
|
6394
|
+
const theme = useRemoraidTheme();
|
|
6395
|
+
const mantineTheme = import_core3.useMantineTheme();
|
|
6396
|
+
const router = useRemoraidRouter();
|
|
6397
|
+
const { pathname } = router;
|
|
6398
|
+
const item = (element, style) => {
|
|
6399
|
+
const isLeaf2 = element.children === undefined || element.children.length === 0;
|
|
6400
|
+
const Menu2 = isLeaf2 ? import_core3.Menu : import_core3.Menu.Sub;
|
|
6401
|
+
return /* @__PURE__ */ jsx_runtime11.jsx(Menu2.Item, {
|
|
6402
|
+
leftSection: element.icon ? /* @__PURE__ */ jsx_runtime11.jsx(element.icon, {
|
|
6403
|
+
...theme.componentsProps.icons.small
|
|
6404
|
+
}) : undefined,
|
|
6405
|
+
c: element.type === "anchor" /* Anchor */ && element.href === pathname ? mantineTheme.primaryColor : undefined,
|
|
6406
|
+
onClick: (e) => {
|
|
6407
|
+
if (element.type === "anchor" /* Anchor */) {
|
|
6408
|
+
router.push(element.href);
|
|
6409
|
+
}
|
|
6410
|
+
if (element.type === "button" /* Button */) {
|
|
6411
|
+
element.onClick(e);
|
|
6412
|
+
}
|
|
6413
|
+
},
|
|
6414
|
+
style,
|
|
6415
|
+
children: element.label
|
|
6416
|
+
});
|
|
6417
|
+
};
|
|
6418
|
+
const isRoot = import_react11.isValidElement(target);
|
|
6419
|
+
const isLeaf = elements === undefined || elements.length === 0;
|
|
6420
|
+
const Menu = isRoot ? import_core3.Menu : import_core3.Menu.Sub;
|
|
6421
|
+
const menuProps = isRoot ? { trigger: "click-hover", ...componentsProps?.Menu } : { ...componentsProps?.MenuSub };
|
|
6422
|
+
return /* @__PURE__ */ jsx_runtime11.jsx(import_core3.Transition, {
|
|
6423
|
+
mounted: isRoot ? true : target.mounted ?? true,
|
|
6424
|
+
...componentsProps?.transition,
|
|
6425
|
+
children: (transitionStyle) => {
|
|
6426
|
+
if (isLeaf) {
|
|
6427
|
+
if (isRoot) {
|
|
6428
|
+
return target;
|
|
6429
|
+
}
|
|
6430
|
+
return item(target, transitionStyle);
|
|
6431
|
+
}
|
|
6432
|
+
return /* @__PURE__ */ jsx_runtime11.jsxs(Menu, {
|
|
6433
|
+
...menuProps,
|
|
6434
|
+
children: [
|
|
6435
|
+
/* @__PURE__ */ jsx_runtime11.jsx(Menu.Target, {
|
|
6436
|
+
children: isRoot ? /* @__PURE__ */ jsx_runtime11.jsx(import_core3.Box, {
|
|
6437
|
+
...componentsProps?.rootTargetContainer,
|
|
6438
|
+
children: target
|
|
6439
|
+
}) : item(target, transitionStyle)
|
|
6440
|
+
}),
|
|
6441
|
+
/* @__PURE__ */ jsx_runtime11.jsxs(Menu.Dropdown, {
|
|
6442
|
+
children: [
|
|
6443
|
+
label !== undefined && /* @__PURE__ */ jsx_runtime11.jsx(import_core3.Menu.Label, {
|
|
6444
|
+
children: label
|
|
6445
|
+
}),
|
|
6446
|
+
elements.map((element, i) => /* @__PURE__ */ jsx_runtime11.jsx(NavigationMenu, {
|
|
6447
|
+
target: element,
|
|
6448
|
+
elements: element.children,
|
|
6449
|
+
componentsProps
|
|
6450
|
+
}, `navigation-menu-${i}`))
|
|
6451
|
+
]
|
|
6452
|
+
})
|
|
6453
|
+
]
|
|
6454
|
+
});
|
|
6455
|
+
}
|
|
6456
|
+
});
|
|
6457
|
+
}
|
|
6458
|
+
|
|
6459
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6460
|
+
var import_icons_react3 = require("@tabler/icons-react");
|
|
6461
|
+
|
|
6462
|
+
// src/core/components/RemoraidButton/index.tsx
|
|
6463
|
+
var import_core4 = require("@mantine/core");
|
|
6464
|
+
var import_icons_react2 = require("@tabler/icons-react");
|
|
6465
|
+
var import_react12 = require("react");
|
|
6466
|
+
var import_lodash6 = __toESM(require_lodash());
|
|
6280
6467
|
|
|
6281
6468
|
// node_modules/clsx/dist/clsx.mjs
|
|
6282
6469
|
function r(e) {
|
|
@@ -6300,102 +6487,102 @@ function clsx() {
|
|
|
6300
6487
|
}
|
|
6301
6488
|
var clsx_default = clsx;
|
|
6302
6489
|
|
|
6303
|
-
// src/core/components/
|
|
6304
|
-
var
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6490
|
+
// src/core/components/RemoraidButton/index.tsx
|
|
6491
|
+
var jsx_runtime12 = require("react/jsx-runtime");
|
|
6492
|
+
var defaultRemoraidButtonSize = "sm";
|
|
6493
|
+
function RemoraidButton({
|
|
6494
|
+
label,
|
|
6495
|
+
responsive: responsiveProp,
|
|
6496
|
+
breakpoint: breakpointProp,
|
|
6497
|
+
collapsed: collapsedProp,
|
|
6498
|
+
size = defaultRemoraidButtonSize,
|
|
6499
|
+
color,
|
|
6500
|
+
onClick,
|
|
6501
|
+
loading,
|
|
6502
|
+
variant = "default",
|
|
6503
|
+
mounted = true,
|
|
6504
|
+
icon: iconProp,
|
|
6505
|
+
iconSize: iconSizeProp,
|
|
6506
|
+
clickTransformation = "default" /* Default */,
|
|
6309
6507
|
componentsProps
|
|
6310
6508
|
}) {
|
|
6311
6509
|
const theme = useRemoraidTheme();
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
children
|
|
6510
|
+
const responsive = responsiveProp ?? true;
|
|
6511
|
+
const breakpoint = breakpointProp ?? theme.breakpoints.buttonCollapse;
|
|
6512
|
+
const collapsed = collapsedProp ?? false;
|
|
6513
|
+
const iconSize = iconSizeProp ?? getDefaultButtonIconSize(size);
|
|
6514
|
+
const Icon2 = iconProp ?? import_icons_react2.IconClick;
|
|
6515
|
+
const iconElement = import_react12.isValidElement(Icon2) ? Icon2 : /* @__PURE__ */ jsx_runtime12.jsx(Icon2, {
|
|
6516
|
+
...import_lodash6.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6320
6517
|
});
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
const element = includePageContainer ? /* @__PURE__ */ jsx_runtime11.jsx(PageContainer, {
|
|
6375
|
-
p: 0,
|
|
6376
|
-
hidden,
|
|
6377
|
-
...componentsProps?.PageContainer,
|
|
6378
|
-
children
|
|
6379
|
-
}) : children;
|
|
6380
|
-
return /* @__PURE__ */ jsx_runtime11.jsx(import_core4.Portal, {
|
|
6381
|
-
target: layout.sections[section],
|
|
6382
|
-
children: /* @__PURE__ */ jsx_runtime11.jsx(layoutElementContext.Provider, {
|
|
6383
|
-
value: { layoutType: "frame" /* Frame */, section },
|
|
6384
|
-
children: includeContainer ? /* @__PURE__ */ jsx_runtime11.jsx(import_core4.Box, {
|
|
6385
|
-
"data-hidden": hidden,
|
|
6386
|
-
...import_lodash5.merge(containerProps, componentsProps?.container),
|
|
6387
|
-
className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
|
|
6388
|
-
children: element
|
|
6389
|
-
}) : element
|
|
6518
|
+
const clickTransformationClassNames = {
|
|
6519
|
+
["default" /* Default */]: null,
|
|
6520
|
+
["none" /* None */]: "remoraid-button-none",
|
|
6521
|
+
["scale" /* Scale */]: "remoraid-button-scale",
|
|
6522
|
+
["tiltDown" /* TiltDown */]: "remoraid-button-tilt-down",
|
|
6523
|
+
["tiltUp" /* TiltUp */]: "remoraid-button-tilt-up",
|
|
6524
|
+
["tiltLeft" /* TiltLeft */]: "remoraid-button-tilt-left",
|
|
6525
|
+
["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
|
|
6526
|
+
};
|
|
6527
|
+
const clickTransformationClass = clickTransformationClassNames[clickTransformation];
|
|
6528
|
+
return /* @__PURE__ */ jsx_runtime12.jsx(import_core4.Transition, {
|
|
6529
|
+
mounted,
|
|
6530
|
+
transition: "fade",
|
|
6531
|
+
duration: theme.transitionDurations.short,
|
|
6532
|
+
timingFunction: "ease",
|
|
6533
|
+
...componentsProps?.transition,
|
|
6534
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime12.jsxs(jsx_runtime12.Fragment, {
|
|
6535
|
+
children: [
|
|
6536
|
+
/* @__PURE__ */ jsx_runtime12.jsx(import_core4.Tooltip, {
|
|
6537
|
+
label,
|
|
6538
|
+
...componentsProps?.tooltip,
|
|
6539
|
+
children: /* @__PURE__ */ jsx_runtime12.jsx(import_core4.ActionIcon, {
|
|
6540
|
+
"aria-label": label,
|
|
6541
|
+
variant,
|
|
6542
|
+
onClick,
|
|
6543
|
+
loading,
|
|
6544
|
+
size: size ? `input-${size}` : "input-sm",
|
|
6545
|
+
color,
|
|
6546
|
+
...componentsProps?.button,
|
|
6547
|
+
...componentsProps?.ActionIcon,
|
|
6548
|
+
hiddenFrom: !responsive ? undefined : breakpoint,
|
|
6549
|
+
display: !responsive && !collapsed ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
|
|
6550
|
+
style: import_lodash6.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.ActionIcon?.style),
|
|
6551
|
+
className: clsx_default(clickTransformationClass, componentsProps?.ActionIcon?.className, componentsProps?.button?.className),
|
|
6552
|
+
children: iconElement
|
|
6553
|
+
})
|
|
6554
|
+
}),
|
|
6555
|
+
/* @__PURE__ */ jsx_runtime12.jsx(import_core4.Button, {
|
|
6556
|
+
onClick,
|
|
6557
|
+
loading,
|
|
6558
|
+
variant,
|
|
6559
|
+
size,
|
|
6560
|
+
color,
|
|
6561
|
+
leftSection: iconProp !== undefined ? iconElement : undefined,
|
|
6562
|
+
...componentsProps?.button,
|
|
6563
|
+
...componentsProps?.Button,
|
|
6564
|
+
visibleFrom: !responsive ? undefined : breakpoint,
|
|
6565
|
+
display: !responsive && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
|
|
6566
|
+
style: import_lodash6.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.Button?.style),
|
|
6567
|
+
className: clsx_default(clickTransformationClass, componentsProps?.Button?.className, componentsProps?.button?.className),
|
|
6568
|
+
children: label
|
|
6569
|
+
})
|
|
6570
|
+
]
|
|
6390
6571
|
})
|
|
6391
6572
|
});
|
|
6392
6573
|
}
|
|
6393
6574
|
|
|
6575
|
+
// src/core/components/FrameLayout/Element/index.tsx
|
|
6576
|
+
var import_react14 = require("react");
|
|
6577
|
+
var import_core7 = require("@mantine/core");
|
|
6578
|
+
|
|
6394
6579
|
// src/core/components/FrameLayout/index.tsx
|
|
6395
|
-
var
|
|
6396
|
-
var
|
|
6580
|
+
var import_core5 = require("@mantine/core");
|
|
6581
|
+
var import_react13 = require("react");
|
|
6582
|
+
var jsx_runtime13 = require("react/jsx-runtime");
|
|
6583
|
+
var layoutContext = import_react13.createContext(null);
|
|
6397
6584
|
var useFrameLayout = () => {
|
|
6398
|
-
return
|
|
6585
|
+
return import_react13.useContext(layoutContext);
|
|
6399
6586
|
};
|
|
6400
6587
|
function FrameLayout({
|
|
6401
6588
|
layoutId,
|
|
@@ -6406,14 +6593,14 @@ function FrameLayout({
|
|
|
6406
6593
|
}) {
|
|
6407
6594
|
const { layouts, setLayouts } = useLayouts();
|
|
6408
6595
|
const layout = layouts[layoutId];
|
|
6409
|
-
const defaultSections =
|
|
6596
|
+
const defaultSections = import_react13.useMemo(() => ({
|
|
6410
6597
|
["bottom" /* Bottom */]: null,
|
|
6411
6598
|
["right" /* Right */]: null,
|
|
6412
6599
|
["top" /* Top */]: null,
|
|
6413
6600
|
["left" /* Left */]: null,
|
|
6414
6601
|
["content" /* Content */]: null
|
|
6415
6602
|
}), []);
|
|
6416
|
-
const setSections =
|
|
6603
|
+
const setSections = import_react13.useCallback((value) => {
|
|
6417
6604
|
setLayouts((prev) => ({
|
|
6418
6605
|
...prev,
|
|
6419
6606
|
[layoutId]: {
|
|
@@ -6422,37 +6609,37 @@ function FrameLayout({
|
|
|
6422
6609
|
}
|
|
6423
6610
|
}));
|
|
6424
6611
|
}, [layoutId, setLayouts, defaultSections]);
|
|
6425
|
-
const topSectionRef =
|
|
6612
|
+
const topSectionRef = import_react13.useCallback((n) => {
|
|
6426
6613
|
setSections((prev) => ({
|
|
6427
6614
|
...prev,
|
|
6428
6615
|
["top" /* Top */]: n
|
|
6429
6616
|
}));
|
|
6430
6617
|
}, [setSections]);
|
|
6431
|
-
const bottomSectionRef =
|
|
6618
|
+
const bottomSectionRef = import_react13.useCallback((n) => {
|
|
6432
6619
|
setSections((prev) => ({
|
|
6433
6620
|
...prev,
|
|
6434
6621
|
["bottom" /* Bottom */]: n
|
|
6435
6622
|
}));
|
|
6436
6623
|
}, [setSections]);
|
|
6437
|
-
const leftSectionRef =
|
|
6624
|
+
const leftSectionRef = import_react13.useCallback((n) => {
|
|
6438
6625
|
setSections((prev) => ({
|
|
6439
6626
|
...prev,
|
|
6440
6627
|
["left" /* Left */]: n
|
|
6441
6628
|
}));
|
|
6442
6629
|
}, [setSections]);
|
|
6443
|
-
const rightSectionRef =
|
|
6630
|
+
const rightSectionRef = import_react13.useCallback((n) => {
|
|
6444
6631
|
setSections((prev) => ({
|
|
6445
6632
|
...prev,
|
|
6446
6633
|
["right" /* Right */]: n
|
|
6447
6634
|
}));
|
|
6448
6635
|
}, [setSections]);
|
|
6449
|
-
const contentSectionRef =
|
|
6636
|
+
const contentSectionRef = import_react13.useCallback((n) => {
|
|
6450
6637
|
setSections((prev) => ({
|
|
6451
6638
|
...prev,
|
|
6452
6639
|
["content" /* Content */]: n
|
|
6453
6640
|
}));
|
|
6454
6641
|
}, [setSections]);
|
|
6455
|
-
const contentSection = /* @__PURE__ */
|
|
6642
|
+
const contentSection = /* @__PURE__ */ jsx_runtime13.jsx(import_core5.Stack, {
|
|
6456
6643
|
ref: contentSectionRef,
|
|
6457
6644
|
h: "100%",
|
|
6458
6645
|
gap: gutter,
|
|
@@ -6461,15 +6648,15 @@ function FrameLayout({
|
|
|
6461
6648
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-content-section", componentsProps?.sectionContainers?.["content" /* Content */]?.className),
|
|
6462
6649
|
children
|
|
6463
6650
|
});
|
|
6464
|
-
const layoutContextValue =
|
|
6651
|
+
const layoutContextValue = import_react13.useMemo(() => ({
|
|
6465
6652
|
type: "frame" /* Frame */,
|
|
6466
6653
|
sections: defaultSections,
|
|
6467
6654
|
...layout,
|
|
6468
6655
|
layoutId
|
|
6469
6656
|
}), [layout?.sections, defaultSections, layoutId]);
|
|
6470
|
-
return /* @__PURE__ */
|
|
6657
|
+
return /* @__PURE__ */ jsx_runtime13.jsx(layoutContext.Provider, {
|
|
6471
6658
|
value: layoutContextValue,
|
|
6472
|
-
children: /* @__PURE__ */
|
|
6659
|
+
children: /* @__PURE__ */ jsx_runtime13.jsxs(import_core5.Group, {
|
|
6473
6660
|
gap: 0,
|
|
6474
6661
|
h: "100%",
|
|
6475
6662
|
w: "100%",
|
|
@@ -6480,7 +6667,7 @@ function FrameLayout({
|
|
|
6480
6667
|
},
|
|
6481
6668
|
className: clsx_default("remoraid-frame-layout", componentsProps?.horizontalContainer?.className),
|
|
6482
6669
|
children: [
|
|
6483
|
-
/* @__PURE__ */
|
|
6670
|
+
/* @__PURE__ */ jsx_runtime13.jsx(import_core5.Group, {
|
|
6484
6671
|
ref: leftSectionRef,
|
|
6485
6672
|
h: "100%",
|
|
6486
6673
|
wrap: "nowrap",
|
|
@@ -6489,26 +6676,26 @@ function FrameLayout({
|
|
|
6489
6676
|
...componentsProps?.sectionContainers?.["left" /* Left */],
|
|
6490
6677
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-left-section", componentsProps?.sectionContainers?.["left" /* Left */]?.className)
|
|
6491
6678
|
}),
|
|
6492
|
-
/* @__PURE__ */
|
|
6679
|
+
/* @__PURE__ */ jsx_runtime13.jsxs(import_core5.Stack, {
|
|
6493
6680
|
h: "100%",
|
|
6494
6681
|
flex: 1,
|
|
6495
6682
|
gap: 0,
|
|
6496
6683
|
...componentsProps?.verticalContainer,
|
|
6497
6684
|
className: clsx_default("remoraid-frame-layout-vertical-container", componentsProps?.verticalContainer?.className),
|
|
6498
6685
|
children: [
|
|
6499
|
-
/* @__PURE__ */
|
|
6686
|
+
/* @__PURE__ */ jsx_runtime13.jsx(import_core5.Stack, {
|
|
6500
6687
|
ref: topSectionRef,
|
|
6501
6688
|
gap: gutter,
|
|
6502
6689
|
flex: 0,
|
|
6503
6690
|
...componentsProps?.sectionContainers?.["top" /* Top */],
|
|
6504
6691
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-top-section", componentsProps?.sectionContainers?.["top" /* Top */]?.className)
|
|
6505
6692
|
}),
|
|
6506
|
-
includeScrollArea ? /* @__PURE__ */
|
|
6693
|
+
includeScrollArea ? /* @__PURE__ */ jsx_runtime13.jsx(import_core5.ScrollArea, {
|
|
6507
6694
|
flex: 1,
|
|
6508
6695
|
...componentsProps?.ScrollArea,
|
|
6509
6696
|
children: contentSection
|
|
6510
6697
|
}) : contentSection,
|
|
6511
|
-
/* @__PURE__ */
|
|
6698
|
+
/* @__PURE__ */ jsx_runtime13.jsx(import_core5.Stack, {
|
|
6512
6699
|
ref: bottomSectionRef,
|
|
6513
6700
|
gap: gutter,
|
|
6514
6701
|
flex: 0,
|
|
@@ -6517,7 +6704,7 @@ function FrameLayout({
|
|
|
6517
6704
|
})
|
|
6518
6705
|
]
|
|
6519
6706
|
}),
|
|
6520
|
-
/* @__PURE__ */
|
|
6707
|
+
/* @__PURE__ */ jsx_runtime13.jsx(import_core5.Group, {
|
|
6521
6708
|
ref: rightSectionRef,
|
|
6522
6709
|
h: "100%",
|
|
6523
6710
|
gap: gutter,
|
|
@@ -6534,248 +6721,97 @@ var FrameLayout_default = Object.assign(FrameLayout, {
|
|
|
6534
6721
|
Element: Element2
|
|
6535
6722
|
});
|
|
6536
6723
|
|
|
6537
|
-
// src/core/
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
}) {
|
|
6543
|
-
const theme = useRemoraidTheme();
|
|
6544
|
-
const {
|
|
6545
|
-
userExperience: {
|
|
6546
|
-
footer: { position }
|
|
6547
|
-
}
|
|
6548
|
-
} = useAppShellUserExperience();
|
|
6549
|
-
const content = /* @__PURE__ */ jsx_runtime13.jsx(PageContainer, {
|
|
6550
|
-
...componentsProps?.container,
|
|
6551
|
-
children: /* @__PURE__ */ jsx_runtime13.jsx(import_core6.Center, {
|
|
6552
|
-
children: /* @__PURE__ */ jsx_runtime13.jsx(Icon2, {
|
|
6553
|
-
color: "var(--mantine-color-disabled)",
|
|
6554
|
-
...theme.componentsProps.icons.huge,
|
|
6555
|
-
...componentsProps?.icon
|
|
6556
|
-
})
|
|
6557
|
-
})
|
|
6558
|
-
});
|
|
6559
|
-
if (position === "bottom" /* Bottom */) {
|
|
6560
|
-
return /* @__PURE__ */ jsx_runtime13.jsx(FrameLayout_default.Element, {
|
|
6561
|
-
section: position,
|
|
6562
|
-
includeContainer: true,
|
|
6563
|
-
...componentsProps?.layoutElement,
|
|
6564
|
-
componentsProps: import_lodash6.merge({ container: { style: { order: -50 } } }, componentsProps?.layoutElement?.componentsProps),
|
|
6565
|
-
children: content
|
|
6566
|
-
});
|
|
6567
|
-
}
|
|
6568
|
-
if (position === "content" /* Content */) {
|
|
6569
|
-
return content;
|
|
6724
|
+
// src/core/lib/errors.ts
|
|
6725
|
+
class InvalidComponentUsageError extends Error {
|
|
6726
|
+
constructor(component, rule) {
|
|
6727
|
+
super(`Invalid usage of '${component}': ${rule}`);
|
|
6728
|
+
this.name = "InvalidComponentUsageError";
|
|
6570
6729
|
}
|
|
6571
|
-
return null;
|
|
6572
6730
|
}
|
|
6573
6731
|
|
|
6574
|
-
// src/core/components/
|
|
6732
|
+
// src/core/components/Page/PageContainer/index.tsx
|
|
6733
|
+
var import_core6 = require("@mantine/core");
|
|
6575
6734
|
var jsx_runtime14 = require("react/jsx-runtime");
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
"content" /* Content */
|
|
6581
|
-
]
|
|
6582
|
-
};
|
|
6583
|
-
var defaultFooterPositions = {
|
|
6584
|
-
["minimal" /* Minimal */]: "content" /* Content */
|
|
6585
|
-
};
|
|
6586
|
-
function Footer({ componentsProps }) {
|
|
6587
|
-
const { footerVariant } = useRemoraidApp();
|
|
6588
|
-
if (footerVariant === "minimal" /* Minimal */) {
|
|
6589
|
-
return /* @__PURE__ */ jsx_runtime14.jsx(FooterMinimal, {
|
|
6590
|
-
...componentsProps?.FooterMinimal
|
|
6591
|
-
});
|
|
6592
|
-
}
|
|
6593
|
-
return null;
|
|
6594
|
-
}
|
|
6595
|
-
var Footer_default = Object.assign(Footer, {
|
|
6596
|
-
FooterMinimal
|
|
6597
|
-
});
|
|
6598
|
-
|
|
6599
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
6600
|
-
var import_react16 = require("react");
|
|
6601
|
-
|
|
6602
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6603
|
-
var import_core9 = require("@mantine/core");
|
|
6604
|
-
var import_lodash8 = __toESM(require_lodash());
|
|
6605
|
-
|
|
6606
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
|
|
6607
|
-
var import_core7 = require("@mantine/core");
|
|
6608
|
-
var import_react12 = require("react");
|
|
6609
|
-
var jsx_runtime15 = require("react/jsx-runtime");
|
|
6610
|
-
function NavigationMenu({
|
|
6611
|
-
target,
|
|
6612
|
-
elements,
|
|
6613
|
-
label,
|
|
6735
|
+
function PageContainer({
|
|
6736
|
+
children,
|
|
6737
|
+
p = 0,
|
|
6738
|
+
hidden = false,
|
|
6614
6739
|
componentsProps
|
|
6615
6740
|
}) {
|
|
6616
6741
|
const theme = useRemoraidTheme();
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
...theme.componentsProps.icons.small
|
|
6626
|
-
}) : undefined,
|
|
6627
|
-
c: element.type === "anchor" /* Anchor */ && element.href === pathname ? mantineTheme.primaryColor : undefined,
|
|
6628
|
-
onClick: (e) => {
|
|
6629
|
-
if (element.type === "anchor" /* Anchor */) {
|
|
6630
|
-
router.push(element.href);
|
|
6631
|
-
}
|
|
6632
|
-
if (element.type === "button" /* Button */) {
|
|
6633
|
-
element.onClick(e);
|
|
6634
|
-
}
|
|
6635
|
-
},
|
|
6636
|
-
style,
|
|
6637
|
-
children: element.label
|
|
6638
|
-
});
|
|
6639
|
-
};
|
|
6640
|
-
const isRoot = import_react12.isValidElement(target);
|
|
6641
|
-
const isLeaf = elements === undefined || elements.length === 0;
|
|
6642
|
-
const Menu = isRoot ? import_core7.Menu : import_core7.Menu.Sub;
|
|
6643
|
-
const menuProps = isRoot ? { trigger: "click-hover", ...componentsProps?.Menu } : { ...componentsProps?.MenuSub };
|
|
6644
|
-
return /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Transition, {
|
|
6645
|
-
mounted: isRoot ? true : target.mounted ?? true,
|
|
6646
|
-
...componentsProps?.transition,
|
|
6647
|
-
children: (transitionStyle) => {
|
|
6648
|
-
if (isLeaf) {
|
|
6649
|
-
if (isRoot) {
|
|
6650
|
-
return target;
|
|
6651
|
-
}
|
|
6652
|
-
return item(target, transitionStyle);
|
|
6653
|
-
}
|
|
6654
|
-
return /* @__PURE__ */ jsx_runtime15.jsxs(Menu, {
|
|
6655
|
-
...menuProps,
|
|
6656
|
-
children: [
|
|
6657
|
-
/* @__PURE__ */ jsx_runtime15.jsx(Menu.Target, {
|
|
6658
|
-
children: isRoot ? /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Box, {
|
|
6659
|
-
...componentsProps?.rootTargetContainer,
|
|
6660
|
-
children: target
|
|
6661
|
-
}) : item(target, transitionStyle)
|
|
6662
|
-
}),
|
|
6663
|
-
/* @__PURE__ */ jsx_runtime15.jsxs(Menu.Dropdown, {
|
|
6664
|
-
children: [
|
|
6665
|
-
label !== undefined && /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Label, {
|
|
6666
|
-
children: label
|
|
6667
|
-
}),
|
|
6668
|
-
elements.map((element, i) => /* @__PURE__ */ jsx_runtime15.jsx(NavigationMenu, {
|
|
6669
|
-
target: element,
|
|
6670
|
-
elements: element.children,
|
|
6671
|
-
componentsProps
|
|
6672
|
-
}, `navigation-menu-${i}`))
|
|
6673
|
-
]
|
|
6674
|
-
})
|
|
6675
|
-
]
|
|
6676
|
-
});
|
|
6677
|
-
}
|
|
6742
|
+
return /* @__PURE__ */ jsx_runtime14.jsx(import_core6.Container, {
|
|
6743
|
+
size: theme.containerSize,
|
|
6744
|
+
p,
|
|
6745
|
+
w: "100%",
|
|
6746
|
+
"data-hidden": hidden,
|
|
6747
|
+
...componentsProps?.container,
|
|
6748
|
+
className: clsx_default("remoraid-page-container", componentsProps?.container?.className),
|
|
6749
|
+
children
|
|
6678
6750
|
});
|
|
6679
6751
|
}
|
|
6680
6752
|
|
|
6681
|
-
// src/core/components/
|
|
6682
|
-
var import_icons_react4 = require("@tabler/icons-react");
|
|
6683
|
-
|
|
6684
|
-
// src/core/components/RemoraidButton/index.tsx
|
|
6685
|
-
var import_core8 = require("@mantine/core");
|
|
6686
|
-
var import_icons_react3 = require("@tabler/icons-react");
|
|
6687
|
-
var import_react13 = require("react");
|
|
6753
|
+
// src/core/components/FrameLayout/Element/index.tsx
|
|
6688
6754
|
var import_lodash7 = __toESM(require_lodash());
|
|
6689
|
-
var
|
|
6690
|
-
var
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
icon: iconProp,
|
|
6703
|
-
iconSize: iconSizeProp,
|
|
6704
|
-
clickTransformation = "default" /* Default */,
|
|
6705
|
-
componentsProps
|
|
6755
|
+
var jsx_runtime15 = require("react/jsx-runtime");
|
|
6756
|
+
var layoutElementContext = import_react14.createContext(null);
|
|
6757
|
+
var useFrameLayoutElement = () => {
|
|
6758
|
+
return import_react14.useContext(layoutElementContext);
|
|
6759
|
+
};
|
|
6760
|
+
function Element2({
|
|
6761
|
+
section,
|
|
6762
|
+
includeContainer = true,
|
|
6763
|
+
includePageContainer = false,
|
|
6764
|
+
layoutId,
|
|
6765
|
+
hidden = false,
|
|
6766
|
+
componentsProps,
|
|
6767
|
+
children
|
|
6706
6768
|
}) {
|
|
6707
|
-
const
|
|
6708
|
-
const
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
const
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
}
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
size: size ? `input-${size}` : "input-sm",
|
|
6743
|
-
color,
|
|
6744
|
-
...componentsProps?.button,
|
|
6745
|
-
...componentsProps?.ActionIcon,
|
|
6746
|
-
hiddenFrom: !responsive ? undefined : breakpoint,
|
|
6747
|
-
display: !responsive && !collapsed ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
|
|
6748
|
-
style: import_lodash7.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.ActionIcon?.style),
|
|
6749
|
-
className: clsx_default(clickTransformationClass, componentsProps?.ActionIcon?.className, componentsProps?.button?.className),
|
|
6750
|
-
children: iconElement
|
|
6751
|
-
})
|
|
6752
|
-
}),
|
|
6753
|
-
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.Button, {
|
|
6754
|
-
onClick,
|
|
6755
|
-
loading,
|
|
6756
|
-
variant,
|
|
6757
|
-
size,
|
|
6758
|
-
color,
|
|
6759
|
-
leftSection: iconProp !== undefined ? iconElement : undefined,
|
|
6760
|
-
...componentsProps?.button,
|
|
6761
|
-
...componentsProps?.Button,
|
|
6762
|
-
visibleFrom: !responsive ? undefined : breakpoint,
|
|
6763
|
-
display: !responsive && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
|
|
6764
|
-
style: import_lodash7.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.Button?.style),
|
|
6765
|
-
className: clsx_default(clickTransformationClass, componentsProps?.Button?.className, componentsProps?.button?.className),
|
|
6766
|
-
children: label
|
|
6767
|
-
})
|
|
6768
|
-
]
|
|
6769
|
+
const { layouts } = useLayouts();
|
|
6770
|
+
const closestLayout = useFrameLayout();
|
|
6771
|
+
if (!closestLayout) {
|
|
6772
|
+
throw new InvalidComponentUsageError("FrameLayout.Element", "must be used as child of 'FrameLayout'.");
|
|
6773
|
+
}
|
|
6774
|
+
const layout = layouts[layoutId ?? closestLayout.layoutId];
|
|
6775
|
+
if (!layout) {
|
|
6776
|
+
return null;
|
|
6777
|
+
}
|
|
6778
|
+
if (layout.type !== "frame" /* Frame */) {
|
|
6779
|
+
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.");
|
|
6780
|
+
}
|
|
6781
|
+
if (!layout.sections[section]) {
|
|
6782
|
+
return null;
|
|
6783
|
+
}
|
|
6784
|
+
let containerProps = {};
|
|
6785
|
+
if (section === "left" /* Left */ || section === "right" /* Right */) {
|
|
6786
|
+
containerProps.h = "100%";
|
|
6787
|
+
}
|
|
6788
|
+
const element = includePageContainer ? /* @__PURE__ */ jsx_runtime15.jsx(PageContainer, {
|
|
6789
|
+
p: 0,
|
|
6790
|
+
hidden,
|
|
6791
|
+
...componentsProps?.PageContainer,
|
|
6792
|
+
children
|
|
6793
|
+
}) : children;
|
|
6794
|
+
return /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Portal, {
|
|
6795
|
+
target: layout.sections[section],
|
|
6796
|
+
children: /* @__PURE__ */ jsx_runtime15.jsx(layoutElementContext.Provider, {
|
|
6797
|
+
value: { layoutType: "frame" /* Frame */, section },
|
|
6798
|
+
children: includeContainer ? /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Box, {
|
|
6799
|
+
"data-hidden": hidden,
|
|
6800
|
+
...import_lodash7.merge(containerProps, componentsProps?.container),
|
|
6801
|
+
className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
|
|
6802
|
+
children: element
|
|
6803
|
+
}) : element
|
|
6769
6804
|
})
|
|
6770
6805
|
});
|
|
6771
6806
|
}
|
|
6772
6807
|
|
|
6773
6808
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6774
|
-
var
|
|
6809
|
+
var jsx_runtime16 = require("react/jsx-runtime");
|
|
6775
6810
|
function NavbarMinimalContent({
|
|
6776
6811
|
orientation,
|
|
6777
6812
|
maxElements,
|
|
6778
6813
|
collapseStaticElementsBreakpoint: collapseStaticElementsBreakpointProp,
|
|
6814
|
+
includeDefaultNavigationElements = true,
|
|
6779
6815
|
componentsProps
|
|
6780
6816
|
}) {
|
|
6781
6817
|
const theme = useRemoraidTheme();
|
|
@@ -6803,7 +6839,7 @@ function NavbarMinimalContent({
|
|
|
6803
6839
|
buttonCollapsed = false;
|
|
6804
6840
|
}
|
|
6805
6841
|
const buttonClickTransformation = orientation === "horizontal" /* Horizontal */ ? "tiltRight" /* TiltRight */ : "default" /* Default */;
|
|
6806
|
-
const logoButton = app.logo ? /* @__PURE__ */
|
|
6842
|
+
const logoButton = app.logo ? /* @__PURE__ */ jsx_runtime16.jsx(RemoraidButton, {
|
|
6807
6843
|
label: app.name,
|
|
6808
6844
|
variant: "subtle",
|
|
6809
6845
|
icon: app.logo,
|
|
@@ -6824,9 +6860,9 @@ function NavbarMinimalContent({
|
|
|
6824
6860
|
componentsProps?.logoButton?.onClick?.(e);
|
|
6825
6861
|
}
|
|
6826
6862
|
}) : undefined;
|
|
6827
|
-
const button = (element, key) => /* @__PURE__ */
|
|
6863
|
+
const button = (element, key) => /* @__PURE__ */ jsx_runtime16.jsx(NavigationMenu, {
|
|
6828
6864
|
label: element.label,
|
|
6829
|
-
target: /* @__PURE__ */
|
|
6865
|
+
target: /* @__PURE__ */ jsx_runtime16.jsx(RemoraidButton, {
|
|
6830
6866
|
mounted: element.mounted,
|
|
6831
6867
|
label: element.label,
|
|
6832
6868
|
icon: element.icon,
|
|
@@ -6863,19 +6899,23 @@ function NavbarMinimalContent({
|
|
|
6863
6899
|
}, key);
|
|
6864
6900
|
const elements = [
|
|
6865
6901
|
...app.nav,
|
|
6866
|
-
...getDefaultNavigationElements({
|
|
6902
|
+
...includeDefaultNavigationElements ? getDefaultNavigationElements({
|
|
6903
|
+
colorScheme,
|
|
6904
|
+
setColorScheme,
|
|
6905
|
+
auth: app.auth
|
|
6906
|
+
}) : []
|
|
6867
6907
|
];
|
|
6868
6908
|
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}`));
|
|
6869
6909
|
const staticElements = elements.filter((element) => element.static);
|
|
6870
6910
|
const staticButtons = staticElements.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0)).map((element, i) => button(element, `static-nav-element-${i}`));
|
|
6871
6911
|
const collapseStaticElements = staticElements.filter((element) => element.mounted ?? true).length > 1;
|
|
6872
|
-
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */
|
|
6912
|
+
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */ jsx_runtime16.jsx(import_core8.Box, {
|
|
6873
6913
|
hiddenFrom: collapseStaticElementsBreakpoint,
|
|
6874
|
-
children: /* @__PURE__ */
|
|
6914
|
+
children: /* @__PURE__ */ jsx_runtime16.jsx(NavigationMenu, {
|
|
6875
6915
|
elements: staticElements,
|
|
6876
|
-
target: /* @__PURE__ */
|
|
6916
|
+
target: /* @__PURE__ */ jsx_runtime16.jsx(RemoraidButton, {
|
|
6877
6917
|
label: "Static elements",
|
|
6878
|
-
icon:
|
|
6918
|
+
icon: import_icons_react3.IconDots,
|
|
6879
6919
|
responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
|
|
6880
6920
|
collapsed: orientation === "vertical" /* Vertical */ ? buttonCollapsed : true,
|
|
6881
6921
|
clickTransformation: buttonClickTransformation,
|
|
@@ -6894,41 +6934,41 @@ function NavbarMinimalContent({
|
|
|
6894
6934
|
}, componentsProps?.NavigationMenu?.componentsProps)
|
|
6895
6935
|
})
|
|
6896
6936
|
}) : null;
|
|
6897
|
-
return /* @__PURE__ */
|
|
6937
|
+
return /* @__PURE__ */ jsx_runtime16.jsx(import_core8.Paper, {
|
|
6898
6938
|
bg: theme.transparentBackground,
|
|
6899
6939
|
h: "100%",
|
|
6900
6940
|
p: "md",
|
|
6901
6941
|
shadow: "md",
|
|
6902
6942
|
...componentsProps?.container,
|
|
6903
|
-
children: orientation === "vertical" /* Vertical */ ? /* @__PURE__ */
|
|
6943
|
+
children: orientation === "vertical" /* Vertical */ ? /* @__PURE__ */ jsx_runtime16.jsxs(import_core8.Stack, {
|
|
6904
6944
|
h: "100%",
|
|
6905
6945
|
children: [
|
|
6906
6946
|
logoButton,
|
|
6907
|
-
/* @__PURE__ */
|
|
6947
|
+
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.ScrollArea, {
|
|
6908
6948
|
flex: 1,
|
|
6909
|
-
children: /* @__PURE__ */
|
|
6949
|
+
children: /* @__PURE__ */ jsx_runtime16.jsx(import_core8.Stack, {
|
|
6910
6950
|
children: buttons
|
|
6911
6951
|
})
|
|
6912
6952
|
}),
|
|
6913
|
-
/* @__PURE__ */
|
|
6953
|
+
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.Stack, {
|
|
6914
6954
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6915
6955
|
children: staticButtons
|
|
6916
6956
|
}),
|
|
6917
6957
|
staticMenuButton
|
|
6918
6958
|
]
|
|
6919
|
-
}) : /* @__PURE__ */
|
|
6959
|
+
}) : /* @__PURE__ */ jsx_runtime16.jsxs(import_core8.Group, {
|
|
6920
6960
|
wrap: "nowrap",
|
|
6921
6961
|
children: [
|
|
6922
6962
|
logoButton,
|
|
6923
|
-
/* @__PURE__ */
|
|
6963
|
+
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.ScrollArea, {
|
|
6924
6964
|
flex: 1,
|
|
6925
6965
|
style: { contain: "inline-size" },
|
|
6926
|
-
children: /* @__PURE__ */
|
|
6966
|
+
children: /* @__PURE__ */ jsx_runtime16.jsx(import_core8.Group, {
|
|
6927
6967
|
wrap: "nowrap",
|
|
6928
6968
|
children: buttons
|
|
6929
6969
|
})
|
|
6930
6970
|
}),
|
|
6931
|
-
/* @__PURE__ */
|
|
6971
|
+
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.Group, {
|
|
6932
6972
|
wrap: "nowrap",
|
|
6933
6973
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6934
6974
|
children: staticButtons
|
|
@@ -6943,17 +6983,17 @@ function NavbarMinimalContent({
|
|
|
6943
6983
|
var import_lodash11 = __toESM(require_lodash());
|
|
6944
6984
|
|
|
6945
6985
|
// src/core/components/Pinnable/index.tsx
|
|
6946
|
-
var
|
|
6947
|
-
var
|
|
6948
|
-
var
|
|
6986
|
+
var import_react16 = require("react");
|
|
6987
|
+
var import_icons_react6 = require("@tabler/icons-react");
|
|
6988
|
+
var import_core11 = require("@mantine/core");
|
|
6949
6989
|
|
|
6950
6990
|
// src/core/components/Controls/ControlButton/index.tsx
|
|
6951
|
-
var
|
|
6952
|
-
var
|
|
6991
|
+
var import_core9 = require("@mantine/core");
|
|
6992
|
+
var import_icons_react4 = require("@tabler/icons-react");
|
|
6953
6993
|
var import_lodash9 = __toESM(require_lodash());
|
|
6954
|
-
var
|
|
6994
|
+
var jsx_runtime17 = require("react/jsx-runtime");
|
|
6955
6995
|
function ControlButton({
|
|
6956
|
-
icon:
|
|
6996
|
+
icon: Icon3 = import_icons_react4.IconClick,
|
|
6957
6997
|
mounted = true,
|
|
6958
6998
|
size = "xs",
|
|
6959
6999
|
iconSize = "tiny" /* Tiny */,
|
|
@@ -6964,17 +7004,17 @@ function ControlButton({
|
|
|
6964
7004
|
componentsProps
|
|
6965
7005
|
}) {
|
|
6966
7006
|
const theme = useRemoraidTheme();
|
|
6967
|
-
return /* @__PURE__ */
|
|
7007
|
+
return /* @__PURE__ */ jsx_runtime17.jsx(import_core9.Transition, {
|
|
6968
7008
|
mounted,
|
|
6969
7009
|
transition: "fade",
|
|
6970
7010
|
duration: theme.transitionDurations.short,
|
|
6971
7011
|
timingFunction: "ease",
|
|
6972
7012
|
...componentsProps?.transition,
|
|
6973
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7013
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime17.jsx(import_core9.Tooltip, {
|
|
6974
7014
|
label: tooltip,
|
|
6975
7015
|
disabled: !Boolean(tooltip),
|
|
6976
7016
|
...componentsProps?.tooltip,
|
|
6977
|
-
children: /* @__PURE__ */
|
|
7017
|
+
children: /* @__PURE__ */ jsx_runtime17.jsx(import_core9.ActionIcon, {
|
|
6978
7018
|
"data-control-button": true,
|
|
6979
7019
|
size,
|
|
6980
7020
|
color,
|
|
@@ -6985,7 +7025,7 @@ function ControlButton({
|
|
|
6985
7025
|
order,
|
|
6986
7026
|
...import_lodash9.merge(transitionStyle, componentsProps?.button?.style)
|
|
6987
7027
|
},
|
|
6988
|
-
children: /* @__PURE__ */
|
|
7028
|
+
children: /* @__PURE__ */ jsx_runtime17.jsx(Icon3, {
|
|
6989
7029
|
...import_lodash9.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6990
7030
|
})
|
|
6991
7031
|
})
|
|
@@ -6994,11 +7034,11 @@ function ControlButton({
|
|
|
6994
7034
|
}
|
|
6995
7035
|
|
|
6996
7036
|
// src/core/components/Controls/index.tsx
|
|
6997
|
-
var
|
|
6998
|
-
var
|
|
6999
|
-
var
|
|
7037
|
+
var import_react15 = require("react");
|
|
7038
|
+
var import_core10 = require("@mantine/core");
|
|
7039
|
+
var import_icons_react5 = require("@tabler/icons-react");
|
|
7000
7040
|
var import_lodash10 = __toESM(require_lodash());
|
|
7001
|
-
var
|
|
7041
|
+
var jsx_runtime18 = require("react/jsx-runtime");
|
|
7002
7042
|
function Controls({
|
|
7003
7043
|
groupRef,
|
|
7004
7044
|
mounted = true,
|
|
@@ -7012,12 +7052,12 @@ function Controls({
|
|
|
7012
7052
|
const additionalButtons = additionalButtonsProp?.map((additionalButton) => asElementOrPropsOfType(ControlButton, additionalButton, "Check the 'additionalButtons' property of 'Controls'."));
|
|
7013
7053
|
const children = asChildrenOfType(ControlButton, childrenProp, "Check children passed to 'Controls' component.");
|
|
7014
7054
|
const theme = useRemoraidTheme();
|
|
7015
|
-
const [pos, setPos] =
|
|
7055
|
+
const [pos, setPos] = import_react15.useState({
|
|
7016
7056
|
x: 0,
|
|
7017
7057
|
y: 0
|
|
7018
7058
|
});
|
|
7019
|
-
const offsetRef =
|
|
7020
|
-
const containerRef =
|
|
7059
|
+
const offsetRef = import_react15.useRef({ x: 0, y: 0 });
|
|
7060
|
+
const containerRef = import_react15.useRef(null);
|
|
7021
7061
|
const clamp = (v, min, max) => {
|
|
7022
7062
|
return Math.min(Math.max(v, min), max);
|
|
7023
7063
|
};
|
|
@@ -7056,14 +7096,14 @@ function Controls({
|
|
|
7056
7096
|
const handlePointerUp = (e) => {
|
|
7057
7097
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
7058
7098
|
};
|
|
7059
|
-
return /* @__PURE__ */
|
|
7099
|
+
return /* @__PURE__ */ jsx_runtime18.jsx(import_core10.Transition, {
|
|
7060
7100
|
mounted,
|
|
7061
7101
|
keepMounted: true,
|
|
7062
7102
|
transition: "pop",
|
|
7063
7103
|
duration: theme.transitionDurations.short,
|
|
7064
7104
|
timingFunction: "ease",
|
|
7065
7105
|
...componentsProps?.transition,
|
|
7066
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7106
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime18.jsx(import_core10.Paper, {
|
|
7067
7107
|
ref: containerRef,
|
|
7068
7108
|
pos: "absolute",
|
|
7069
7109
|
p: gutter,
|
|
@@ -7079,14 +7119,14 @@ function Controls({
|
|
|
7079
7119
|
...import_lodash10.merge(transitionStyle, componentsProps?.container?.style)
|
|
7080
7120
|
},
|
|
7081
7121
|
className: clsx_default("remoraid-controls", componentsProps?.container?.className),
|
|
7082
|
-
children: /* @__PURE__ */
|
|
7122
|
+
children: /* @__PURE__ */ jsx_runtime18.jsxs(import_core10.Group, {
|
|
7083
7123
|
gap: gutter,
|
|
7084
7124
|
ref: groupRef,
|
|
7085
7125
|
wrap: "nowrap",
|
|
7086
7126
|
...componentsProps?.group,
|
|
7087
7127
|
className: clsx_default("remoraid-controls-group", componentsProps?.group?.className),
|
|
7088
7128
|
children: [
|
|
7089
|
-
/* @__PURE__ */
|
|
7129
|
+
/* @__PURE__ */ jsx_runtime18.jsx(import_icons_react5.IconGripHorizontal, {
|
|
7090
7130
|
...import_lodash10.merge({}, theme.componentsProps.icons[iconSize], { order: -100, color: "var(--mantine-color-default-border)" }, componentsProps?.gripIcon)
|
|
7091
7131
|
}),
|
|
7092
7132
|
children,
|
|
@@ -7094,7 +7134,7 @@ function Controls({
|
|
|
7094
7134
|
if (isValidElementOfType(ControlButton, button)) {
|
|
7095
7135
|
return button;
|
|
7096
7136
|
}
|
|
7097
|
-
return /* @__PURE__ */
|
|
7137
|
+
return /* @__PURE__ */ jsx_runtime18.jsx(ControlButton, {
|
|
7098
7138
|
...button
|
|
7099
7139
|
}, i);
|
|
7100
7140
|
})
|
|
@@ -7105,7 +7145,7 @@ function Controls({
|
|
|
7105
7145
|
}
|
|
7106
7146
|
|
|
7107
7147
|
// src/core/components/Pinnable/index.tsx
|
|
7108
|
-
var
|
|
7148
|
+
var jsx_runtime19 = require("react/jsx-runtime");
|
|
7109
7149
|
function Pinnable({
|
|
7110
7150
|
layoutType: layoutTypeProp,
|
|
7111
7151
|
section,
|
|
@@ -7119,14 +7159,14 @@ function Pinnable({
|
|
|
7119
7159
|
}) {
|
|
7120
7160
|
const layoutType = layoutTypeProp ?? "frame" /* Frame */;
|
|
7121
7161
|
const { layouts } = useLayouts();
|
|
7122
|
-
const [pinned, setPinned] =
|
|
7123
|
-
const containerRef =
|
|
7162
|
+
const [pinned, setPinned] = import_react16.useState(initialValue);
|
|
7163
|
+
const containerRef = import_react16.useRef(null);
|
|
7124
7164
|
const layout = layouts[layoutId ?? remoraidAppShellLayoutId];
|
|
7125
7165
|
if (layout && layout.type !== layoutType) {
|
|
7126
7166
|
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.`);
|
|
7127
7167
|
}
|
|
7128
|
-
const controlButton =
|
|
7129
|
-
icon: pinned ?
|
|
7168
|
+
const controlButton = import_react16.useMemo(() => /* @__PURE__ */ jsx_runtime19.jsx(ControlButton, {
|
|
7169
|
+
icon: pinned ? import_icons_react6.IconPinnedOff : import_icons_react6.IconPin,
|
|
7130
7170
|
tooltip: pinned ? "Unpin" : "Pin",
|
|
7131
7171
|
color: "green",
|
|
7132
7172
|
order: 100,
|
|
@@ -7136,7 +7176,7 @@ function Pinnable({
|
|
|
7136
7176
|
componentsProps?.button?.onClick?.(e);
|
|
7137
7177
|
}
|
|
7138
7178
|
}), [pinned, componentsProps?.button]);
|
|
7139
|
-
const element = /* @__PURE__ */
|
|
7179
|
+
const element = /* @__PURE__ */ jsx_runtime19.jsxs(import_core11.Box, {
|
|
7140
7180
|
pos: "relative",
|
|
7141
7181
|
ref: containerRef,
|
|
7142
7182
|
"data-hidden": hidden,
|
|
@@ -7144,25 +7184,25 @@ function Pinnable({
|
|
|
7144
7184
|
...componentsProps?.container,
|
|
7145
7185
|
className: clsx_default("remoraid-pinnable", componentsProps?.container?.className),
|
|
7146
7186
|
children: [
|
|
7147
|
-
controlsContainer === undefined ? /* @__PURE__ */
|
|
7187
|
+
controlsContainer === undefined ? /* @__PURE__ */ jsx_runtime19.jsx(Controls, {
|
|
7148
7188
|
dragContainerRef: containerRef,
|
|
7149
7189
|
...componentsProps?.controls,
|
|
7150
7190
|
children: controlButton
|
|
7151
|
-
}) : controlsContainer !== null && /* @__PURE__ */
|
|
7191
|
+
}) : controlsContainer !== null && /* @__PURE__ */ jsx_runtime19.jsx(import_core11.Portal, {
|
|
7152
7192
|
target: controlsContainer,
|
|
7153
7193
|
children: controlButton
|
|
7154
7194
|
}),
|
|
7155
7195
|
children
|
|
7156
7196
|
]
|
|
7157
7197
|
});
|
|
7158
|
-
|
|
7198
|
+
import_react16.useEffect(() => {
|
|
7159
7199
|
onPinnedValueChange?.(pinned);
|
|
7160
7200
|
}, [pinned]);
|
|
7161
7201
|
if (!layout) {
|
|
7162
7202
|
return null;
|
|
7163
7203
|
}
|
|
7164
7204
|
if (pinned && layoutType === "frame" /* Frame */) {
|
|
7165
|
-
return /* @__PURE__ */
|
|
7205
|
+
return /* @__PURE__ */ jsx_runtime19.jsx(FrameLayout_default.Element, {
|
|
7166
7206
|
layoutId,
|
|
7167
7207
|
section,
|
|
7168
7208
|
hidden,
|
|
@@ -7174,9 +7214,10 @@ function Pinnable({
|
|
|
7174
7214
|
}
|
|
7175
7215
|
|
|
7176
7216
|
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
7177
|
-
var
|
|
7217
|
+
var jsx_runtime20 = require("react/jsx-runtime");
|
|
7178
7218
|
function NavbarMinimal({
|
|
7179
7219
|
pinnable = true,
|
|
7220
|
+
includeDefaultNavigationElements = true,
|
|
7180
7221
|
componentsProps
|
|
7181
7222
|
}) {
|
|
7182
7223
|
const {
|
|
@@ -7184,15 +7225,19 @@ function NavbarMinimal({
|
|
|
7184
7225
|
navbar: { position }
|
|
7185
7226
|
}
|
|
7186
7227
|
} = useAppShellUserExperience();
|
|
7187
|
-
const [hover, setHover] =
|
|
7228
|
+
const [hover, setHover] = import_react17.useState(false);
|
|
7188
7229
|
const handleEnter = () => {
|
|
7189
7230
|
setHover(true);
|
|
7190
7231
|
};
|
|
7191
7232
|
const handleLeave = () => {
|
|
7192
7233
|
setHover(false);
|
|
7193
7234
|
};
|
|
7235
|
+
const contentProps = {
|
|
7236
|
+
includeDefaultNavigationElements,
|
|
7237
|
+
...componentsProps?.content
|
|
7238
|
+
};
|
|
7194
7239
|
if (position === "left" /* Left */ || position === "right" /* Right */) {
|
|
7195
|
-
return /* @__PURE__ */
|
|
7240
|
+
return /* @__PURE__ */ jsx_runtime20.jsx(FrameLayout_default.Element, {
|
|
7196
7241
|
section: position,
|
|
7197
7242
|
includeContainer: true,
|
|
7198
7243
|
...componentsProps?.layoutElement,
|
|
@@ -7203,19 +7248,19 @@ function NavbarMinimal({
|
|
|
7203
7248
|
}
|
|
7204
7249
|
}
|
|
7205
7250
|
}, componentsProps?.layoutElement?.componentsProps),
|
|
7206
|
-
children: /* @__PURE__ */
|
|
7251
|
+
children: /* @__PURE__ */ jsx_runtime20.jsx(NavbarMinimalContent, {
|
|
7207
7252
|
orientation: "vertical" /* Vertical */,
|
|
7208
|
-
...
|
|
7253
|
+
...contentProps
|
|
7209
7254
|
})
|
|
7210
7255
|
});
|
|
7211
7256
|
}
|
|
7212
7257
|
if (position === "top" /* Top */ || position === "bottom" /* Bottom */) {
|
|
7213
|
-
const content = /* @__PURE__ */
|
|
7258
|
+
const content = /* @__PURE__ */ jsx_runtime20.jsx(NavbarMinimalContent, {
|
|
7214
7259
|
orientation: "horizontal" /* Horizontal */,
|
|
7215
|
-
...
|
|
7260
|
+
...contentProps
|
|
7216
7261
|
});
|
|
7217
7262
|
if (pinnable) {
|
|
7218
|
-
return /* @__PURE__ */
|
|
7263
|
+
return /* @__PURE__ */ jsx_runtime20.jsx(PageContainer, {
|
|
7219
7264
|
...componentsProps?.container,
|
|
7220
7265
|
componentsProps: {
|
|
7221
7266
|
...componentsProps?.container?.componentsProps,
|
|
@@ -7224,7 +7269,7 @@ function NavbarMinimal({
|
|
|
7224
7269
|
className: clsx_default("hide-if-empty", componentsProps?.container?.componentsProps?.container?.className)
|
|
7225
7270
|
}
|
|
7226
7271
|
},
|
|
7227
|
-
children: /* @__PURE__ */
|
|
7272
|
+
children: /* @__PURE__ */ jsx_runtime20.jsx(Pinnable, {
|
|
7228
7273
|
section: position,
|
|
7229
7274
|
initialValue: true,
|
|
7230
7275
|
...componentsProps?.Pinnable,
|
|
@@ -7267,11 +7312,11 @@ function NavbarMinimal({
|
|
|
7267
7312
|
return content;
|
|
7268
7313
|
}
|
|
7269
7314
|
if (position === "content" /* Content */) {
|
|
7270
|
-
return /* @__PURE__ */
|
|
7315
|
+
return /* @__PURE__ */ jsx_runtime20.jsx(PageContainer, {
|
|
7271
7316
|
...componentsProps?.container,
|
|
7272
|
-
children: /* @__PURE__ */
|
|
7317
|
+
children: /* @__PURE__ */ jsx_runtime20.jsx(NavbarMinimalContent, {
|
|
7273
7318
|
orientation: "horizontal" /* Horizontal */,
|
|
7274
|
-
...
|
|
7319
|
+
...contentProps
|
|
7275
7320
|
})
|
|
7276
7321
|
});
|
|
7277
7322
|
}
|
|
@@ -7279,19 +7324,8 @@ function NavbarMinimal({
|
|
|
7279
7324
|
}
|
|
7280
7325
|
|
|
7281
7326
|
// src/core/components/AppShell/Navbar/index.tsx
|
|
7282
|
-
var
|
|
7283
|
-
var
|
|
7284
|
-
var supportedNavbarPositions = {
|
|
7285
|
-
["minimal" /* Minimal */]: [
|
|
7286
|
-
null,
|
|
7287
|
-
"top" /* Top */,
|
|
7288
|
-
"bottom" /* Bottom */,
|
|
7289
|
-
"left" /* Left */,
|
|
7290
|
-
"right" /* Right */,
|
|
7291
|
-
"content" /* Content */
|
|
7292
|
-
]
|
|
7293
|
-
};
|
|
7294
|
-
var defaultNavbarPositions = { ["minimal" /* Minimal */]: "left" /* Left */ };
|
|
7327
|
+
var import_icons_react7 = require("@tabler/icons-react");
|
|
7328
|
+
var jsx_runtime21 = require("react/jsx-runtime");
|
|
7295
7329
|
var getDefaultNavigationElements = ({
|
|
7296
7330
|
colorScheme,
|
|
7297
7331
|
setColorScheme,
|
|
@@ -7300,7 +7334,7 @@ var getDefaultNavigationElements = ({
|
|
|
7300
7334
|
{
|
|
7301
7335
|
type: "button" /* Button */,
|
|
7302
7336
|
label: colorScheme === "dark" ? "Light mode" : "Dark mode",
|
|
7303
|
-
icon: colorScheme === "dark" ?
|
|
7337
|
+
icon: colorScheme === "dark" ? import_icons_react7.IconSun : import_icons_react7.IconMoon,
|
|
7304
7338
|
static: true,
|
|
7305
7339
|
onClick: () => {
|
|
7306
7340
|
if (!colorScheme || !setColorScheme) {
|
|
@@ -7315,14 +7349,14 @@ var getDefaultNavigationElements = ({
|
|
|
7315
7349
|
label: "Login",
|
|
7316
7350
|
href: "/login",
|
|
7317
7351
|
static: true,
|
|
7318
|
-
icon:
|
|
7352
|
+
icon: import_icons_react7.IconLogin
|
|
7319
7353
|
},
|
|
7320
7354
|
{
|
|
7321
7355
|
mounted: auth !== undefined && auth.user !== null,
|
|
7322
7356
|
type: "button" /* Button */,
|
|
7323
7357
|
label: "Logout",
|
|
7324
7358
|
static: true,
|
|
7325
|
-
icon:
|
|
7359
|
+
icon: import_icons_react7.IconLogout,
|
|
7326
7360
|
onClick: () => {
|
|
7327
7361
|
auth?.onLogout?.();
|
|
7328
7362
|
}
|
|
@@ -7331,7 +7365,7 @@ var getDefaultNavigationElements = ({
|
|
|
7331
7365
|
function Navbar({ componentsProps }) {
|
|
7332
7366
|
const { navbarVariant } = useRemoraidApp();
|
|
7333
7367
|
if (navbarVariant === "minimal" /* Minimal */) {
|
|
7334
|
-
return /* @__PURE__ */
|
|
7368
|
+
return /* @__PURE__ */ jsx_runtime21.jsx(NavbarMinimal, {
|
|
7335
7369
|
...componentsProps?.NavbarMinimal
|
|
7336
7370
|
});
|
|
7337
7371
|
}
|
|
@@ -7341,60 +7375,60 @@ var Navbar_default = Object.assign(Navbar, {
|
|
|
7341
7375
|
NavbarMinimal
|
|
7342
7376
|
});
|
|
7343
7377
|
|
|
7344
|
-
// src/core/components/AppShell/
|
|
7345
|
-
var
|
|
7346
|
-
var
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
footer: {
|
|
7353
|
-
position: null
|
|
7354
|
-
}
|
|
7355
|
-
};
|
|
7356
|
-
var defaultAppShellUserExperienceCookieName = "remoraid-app-shell-user-experience";
|
|
7357
|
-
var appShellUserExperienceContext = createUserExperienceContext(defaultAppShellUserExperience);
|
|
7358
|
-
var useAppShellUserExperience = () => {
|
|
7359
|
-
return import_react17.useContext(appShellUserExperienceContext);
|
|
7360
|
-
};
|
|
7361
|
-
function AppShellUserExperienceProvider({
|
|
7362
|
-
children,
|
|
7363
|
-
initialValue,
|
|
7364
|
-
cookieName
|
|
7378
|
+
// src/core/components/AppShell/Footer/FooterMinimal/index.tsx
|
|
7379
|
+
var import_core12 = require("@mantine/core");
|
|
7380
|
+
var import_icons_react8 = require("@tabler/icons-react");
|
|
7381
|
+
var import_lodash12 = __toESM(require_lodash());
|
|
7382
|
+
var jsx_runtime22 = require("react/jsx-runtime");
|
|
7383
|
+
function FooterMinimal({
|
|
7384
|
+
icon: Icon4 = import_icons_react8.IconPennant,
|
|
7385
|
+
componentsProps
|
|
7365
7386
|
}) {
|
|
7366
|
-
const
|
|
7367
|
-
const
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
}
|
|
7371
|
-
if (x === null) {
|
|
7372
|
-
return false;
|
|
7373
|
-
}
|
|
7374
|
-
if (!("navbar" in x)) {
|
|
7375
|
-
return false;
|
|
7376
|
-
}
|
|
7377
|
-
if (!("footer" in x)) {
|
|
7378
|
-
return false;
|
|
7387
|
+
const theme = useRemoraidTheme();
|
|
7388
|
+
const {
|
|
7389
|
+
userExperience: {
|
|
7390
|
+
footer: { position }
|
|
7379
7391
|
}
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
},
|
|
7391
|
-
footer: {
|
|
7392
|
-
position: footerVariant === null ? null : defaultFooterPositions[footerVariant]
|
|
7393
|
-
}
|
|
7394
|
-
}, initialValue),
|
|
7395
|
-
children
|
|
7392
|
+
} = useAppShellUserExperience();
|
|
7393
|
+
const content = /* @__PURE__ */ jsx_runtime22.jsx(PageContainer, {
|
|
7394
|
+
...componentsProps?.container,
|
|
7395
|
+
children: /* @__PURE__ */ jsx_runtime22.jsx(import_core12.Center, {
|
|
7396
|
+
children: /* @__PURE__ */ jsx_runtime22.jsx(Icon4, {
|
|
7397
|
+
color: "var(--mantine-color-disabled)",
|
|
7398
|
+
...theme.componentsProps.icons.huge,
|
|
7399
|
+
...componentsProps?.icon
|
|
7400
|
+
})
|
|
7401
|
+
})
|
|
7396
7402
|
});
|
|
7403
|
+
if (position === "bottom" /* Bottom */) {
|
|
7404
|
+
return /* @__PURE__ */ jsx_runtime22.jsx(FrameLayout_default.Element, {
|
|
7405
|
+
section: position,
|
|
7406
|
+
includeContainer: true,
|
|
7407
|
+
...componentsProps?.layoutElement,
|
|
7408
|
+
componentsProps: import_lodash12.merge({ container: { style: { order: -50 } } }, componentsProps?.layoutElement?.componentsProps),
|
|
7409
|
+
children: content
|
|
7410
|
+
});
|
|
7411
|
+
}
|
|
7412
|
+
if (position === "content" /* Content */) {
|
|
7413
|
+
return content;
|
|
7414
|
+
}
|
|
7415
|
+
return null;
|
|
7416
|
+
}
|
|
7417
|
+
|
|
7418
|
+
// src/core/components/AppShell/Footer/index.tsx
|
|
7419
|
+
var jsx_runtime23 = require("react/jsx-runtime");
|
|
7420
|
+
function Footer({ componentsProps }) {
|
|
7421
|
+
const { footerVariant } = useRemoraidApp();
|
|
7422
|
+
if (footerVariant === "minimal" /* Minimal */) {
|
|
7423
|
+
return /* @__PURE__ */ jsx_runtime23.jsx(FooterMinimal, {
|
|
7424
|
+
...componentsProps?.FooterMinimal
|
|
7425
|
+
});
|
|
7426
|
+
}
|
|
7427
|
+
return null;
|
|
7397
7428
|
}
|
|
7429
|
+
var Footer_default = Object.assign(Footer, {
|
|
7430
|
+
FooterMinimal
|
|
7431
|
+
});
|
|
7398
7432
|
|
|
7399
7433
|
// src/core/components/AppShell/index.tsx
|
|
7400
7434
|
var jsx_runtime24 = require("react/jsx-runtime");
|
|
@@ -8396,7 +8430,7 @@ function NavbarSettingsWidget({
|
|
|
8396
8430
|
}) {
|
|
8397
8431
|
const additionalRows = additionalRowsProp?.map((additionalRow) => asElementOrPropsOfType(SettingsTable_default.Row, additionalRow, "Check the 'additionalRows' property of 'NavbarSettingsWidget'."));
|
|
8398
8432
|
const { userExperience, updateUserExperience, initialUserExperience } = useAppShellUserExperience();
|
|
8399
|
-
const
|
|
8433
|
+
const { navbarVariant, navbarMetadata: navbarMetadata2 } = useRemoraidApp();
|
|
8400
8434
|
const modeLabels = {
|
|
8401
8435
|
["responsive" /* Responsive */]: "Responsive",
|
|
8402
8436
|
["collapsed" /* Collapsed */]: "Collapsed",
|
|
@@ -8413,7 +8447,15 @@ function NavbarSettingsWidget({
|
|
|
8413
8447
|
widgetProps: {
|
|
8414
8448
|
id: defaultNavbarSettingsWidgetId,
|
|
8415
8449
|
title: "Navbar Settings",
|
|
8416
|
-
...widgetProps
|
|
8450
|
+
...widgetProps,
|
|
8451
|
+
alerts: [
|
|
8452
|
+
{
|
|
8453
|
+
category: "negative" /* Negative */,
|
|
8454
|
+
text: "This app does not contain a registered navbar.",
|
|
8455
|
+
mounted: navbarVariant === null
|
|
8456
|
+
},
|
|
8457
|
+
...widgetProps?.alerts ?? []
|
|
8458
|
+
]
|
|
8417
8459
|
},
|
|
8418
8460
|
onRestoreDefaultValues: () => {
|
|
8419
8461
|
updateUserExperience((prev) => ({
|
|
@@ -8422,14 +8464,14 @@ function NavbarSettingsWidget({
|
|
|
8422
8464
|
}));
|
|
8423
8465
|
},
|
|
8424
8466
|
custom: !import_lodash20.isEqual(userExperience.navbar, initialUserExperience.navbar),
|
|
8425
|
-
children: /* @__PURE__ */ jsx_runtime39.jsxs(SettingsTable_default, {
|
|
8467
|
+
children: navbarVariant !== null && /* @__PURE__ */ jsx_runtime39.jsxs(SettingsTable_default, {
|
|
8426
8468
|
...componentsProps?.table,
|
|
8427
8469
|
children: [
|
|
8428
8470
|
/* @__PURE__ */ jsx_runtime39.jsx(SettingsTable_default.Row, {
|
|
8429
8471
|
label: "Select navbar position",
|
|
8430
8472
|
children: /* @__PURE__ */ jsx_runtime39.jsx(import_core25.Select, {
|
|
8431
8473
|
value: userExperience.navbar.position ?? "hidden",
|
|
8432
|
-
data:
|
|
8474
|
+
data: navbarMetadata2.supportedPositions.map((position) => ({
|
|
8433
8475
|
value: position ?? "hidden",
|
|
8434
8476
|
label: position === null ? "Hidden" : positionLabels[position]
|
|
8435
8477
|
})),
|
|
@@ -8451,7 +8493,7 @@ function NavbarSettingsWidget({
|
|
|
8451
8493
|
label: "Select navbar mode",
|
|
8452
8494
|
children: /* @__PURE__ */ jsx_runtime39.jsx(import_core25.Select, {
|
|
8453
8495
|
value: userExperience.navbar.mode,
|
|
8454
|
-
data:
|
|
8496
|
+
data: navbarMetadata2.supportedModes.map((mode) => ({
|
|
8455
8497
|
value: mode,
|
|
8456
8498
|
label: modeLabels[mode]
|
|
8457
8499
|
})),
|
|
@@ -8490,7 +8532,7 @@ function FooterSettingsWidget({
|
|
|
8490
8532
|
}) {
|
|
8491
8533
|
const additionalRows = additionalRowsProp?.map((additionalRow) => asElementOrPropsOfType(SettingsTable_default.Row, additionalRow, "Check the 'additionalRows' property of 'FooterSettingsWidget'."));
|
|
8492
8534
|
const { userExperience, updateUserExperience, initialUserExperience } = useAppShellUserExperience();
|
|
8493
|
-
const
|
|
8535
|
+
const { footerVariant, footerMetadata: footerMetadata2 } = useRemoraidApp();
|
|
8494
8536
|
const positionLabels = {
|
|
8495
8537
|
["bottom" /* Bottom */]: "Bottom",
|
|
8496
8538
|
["top" /* Top */]: "Top",
|
|
@@ -8502,7 +8544,15 @@ function FooterSettingsWidget({
|
|
|
8502
8544
|
widgetProps: {
|
|
8503
8545
|
id: defaultFooterSettingsWidgetId,
|
|
8504
8546
|
title: "Footer Settings",
|
|
8505
|
-
...widgetProps
|
|
8547
|
+
...widgetProps,
|
|
8548
|
+
alerts: [
|
|
8549
|
+
{
|
|
8550
|
+
category: "negative" /* Negative */,
|
|
8551
|
+
text: "This app does not contain a registered footer.",
|
|
8552
|
+
mounted: footerVariant === null
|
|
8553
|
+
},
|
|
8554
|
+
...widgetProps?.alerts ?? []
|
|
8555
|
+
]
|
|
8506
8556
|
},
|
|
8507
8557
|
onRestoreDefaultValues: () => {
|
|
8508
8558
|
updateUserExperience((prev) => ({
|
|
@@ -8511,14 +8561,14 @@ function FooterSettingsWidget({
|
|
|
8511
8561
|
}));
|
|
8512
8562
|
},
|
|
8513
8563
|
custom: !import_lodash21.isEqual(userExperience.footer, initialUserExperience.footer),
|
|
8514
|
-
children: /* @__PURE__ */ jsx_runtime40.jsxs(SettingsTable_default, {
|
|
8564
|
+
children: footerVariant !== null && /* @__PURE__ */ jsx_runtime40.jsxs(SettingsTable_default, {
|
|
8515
8565
|
...componentsProps?.table,
|
|
8516
8566
|
children: [
|
|
8517
8567
|
/* @__PURE__ */ jsx_runtime40.jsx(SettingsTable_default.Row, {
|
|
8518
8568
|
label: "Select footer position",
|
|
8519
8569
|
children: /* @__PURE__ */ jsx_runtime40.jsx(import_core26.Select, {
|
|
8520
8570
|
value: userExperience.footer.position ?? "hidden",
|
|
8521
|
-
data:
|
|
8571
|
+
data: footerMetadata2.supportedPositions.map((position) => ({
|
|
8522
8572
|
value: position ?? "hidden",
|
|
8523
8573
|
label: position === null ? "Hidden" : positionLabels[position]
|
|
8524
8574
|
})),
|