remoraid 3.1.1 → 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/README.md +5 -1
- package/dist/core/index.cjs +622 -538
- package/dist/core/index.d.ts +59 -26
- package/dist/core/index.js +589 -503
- package/dist/core/styles.css +73 -16
- package/dist/data-visualization/index.cjs +6546 -0
- package/dist/data-visualization/index.d.ts +529 -0
- package/dist/data-visualization/index.js +6584 -0
- package/dist/jsonforms/index.cjs +150 -2294
- package/dist/jsonforms/index.js +98 -2358
- package/package.json +29 -10
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,11 +5753,41 @@ 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";
|
|
5757
5787
|
import {
|
|
5758
5788
|
IconAlertCircle,
|
|
5789
|
+
IconArrowLeft,
|
|
5790
|
+
IconArrowRight,
|
|
5759
5791
|
IconCircleCheck,
|
|
5760
5792
|
IconInfoCircle
|
|
5761
5793
|
} from "@tabler/icons-react";
|
|
@@ -5866,6 +5898,18 @@ var createRemoraidTheme = (customTheme, dependencies) => {
|
|
|
5866
5898
|
["medium" /* Medium */]: { size: 24, stroke: 1.7 },
|
|
5867
5899
|
["large" /* Large */]: { size: 28, stroke: 1.7 },
|
|
5868
5900
|
["huge" /* Huge */]: { size: 44, stroke: 1.7 }
|
|
5901
|
+
},
|
|
5902
|
+
Scroller: {
|
|
5903
|
+
edgeGradientColor: "transparent",
|
|
5904
|
+
className: "remoraid-masked-scroller",
|
|
5905
|
+
startControlIcon: /* @__PURE__ */ jsx3(IconArrowLeft, {
|
|
5906
|
+
size: "var(--remoraid-icon-size-extraSmall)",
|
|
5907
|
+
stroke: "var(--remoraid-icon-stroke-extraSmall)"
|
|
5908
|
+
}),
|
|
5909
|
+
endControlIcon: /* @__PURE__ */ jsx3(IconArrowRight, {
|
|
5910
|
+
size: "var(--remoraid-icon-size-extraSmall)",
|
|
5911
|
+
stroke: "var(--remoraid-icon-stroke-extraSmall)"
|
|
5912
|
+
})
|
|
5869
5913
|
}
|
|
5870
5914
|
}
|
|
5871
5915
|
};
|
|
@@ -5877,7 +5921,8 @@ var getCssVars = (theme) => {
|
|
|
5877
5921
|
transitionDurations,
|
|
5878
5922
|
primaryGutter,
|
|
5879
5923
|
containerSize,
|
|
5880
|
-
transparentBackground
|
|
5924
|
+
transparentBackground,
|
|
5925
|
+
componentsProps: { icons }
|
|
5881
5926
|
} = theme;
|
|
5882
5927
|
return {
|
|
5883
5928
|
"--mantine-color-body": bodyColor,
|
|
@@ -5889,6 +5934,11 @@ var getCssVars = (theme) => {
|
|
|
5889
5934
|
...Object.entries(transitionDurations).reduce((t, [key, value]) => ({
|
|
5890
5935
|
...t,
|
|
5891
5936
|
[`--remoraid-transition-duration-${key}`]: `${value}ms`
|
|
5937
|
+
}), {}),
|
|
5938
|
+
...Object.entries(icons).reduce((t, [key, { size, stroke }]) => ({
|
|
5939
|
+
...t,
|
|
5940
|
+
[`--remoraid-icon-size-${key}`]: typeof size === "number" ? `${size}px` : size,
|
|
5941
|
+
[`--remoraid-icon-stroke-${key}`]: `${stroke}`
|
|
5892
5942
|
}), {})
|
|
5893
5943
|
};
|
|
5894
5944
|
};
|
|
@@ -6137,7 +6187,9 @@ var defaultAppContext = {
|
|
|
6137
6187
|
name: "Hello, World!",
|
|
6138
6188
|
nav: [],
|
|
6139
6189
|
navbarVariant: "minimal" /* Minimal */,
|
|
6190
|
+
navbarMetadata: navbarMetadata["minimal" /* Minimal */],
|
|
6140
6191
|
footerVariant: "minimal" /* Minimal */,
|
|
6192
|
+
footerMetadata: footerMetadata["minimal" /* Minimal */],
|
|
6141
6193
|
navbarMobileVariant: null
|
|
6142
6194
|
};
|
|
6143
6195
|
var appContext = createContext5(defaultAppContext);
|
|
@@ -6148,9 +6200,30 @@ function AppProvider({
|
|
|
6148
6200
|
appContext: appContextProp,
|
|
6149
6201
|
children
|
|
6150
6202
|
}) {
|
|
6151
|
-
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;
|
|
6152
6216
|
return /* @__PURE__ */ jsx9(appContext.Provider, {
|
|
6153
|
-
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
|
+
},
|
|
6154
6227
|
children
|
|
6155
6228
|
});
|
|
6156
6229
|
}
|
|
@@ -6159,16 +6232,170 @@ function AppProvider({
|
|
|
6159
6232
|
var import_lodash13 = __toESM(require_lodash(), 1);
|
|
6160
6233
|
|
|
6161
6234
|
// src/core/components/AppShell/AppShellUserExperienceProvider/index.tsx
|
|
6162
|
-
var
|
|
6163
|
-
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
|
+
}
|
|
6164
6290
|
|
|
6165
|
-
// src/core/components/AppShell/
|
|
6166
|
-
import {
|
|
6167
|
-
import { IconPennant } from "@tabler/icons-react";
|
|
6168
|
-
var import_lodash6 = __toESM(require_lodash(), 1);
|
|
6291
|
+
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
6292
|
+
import { useState as useState7 } from "react";
|
|
6169
6293
|
|
|
6170
|
-
// src/core/components/
|
|
6171
|
-
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";
|
|
6172
6399
|
|
|
6173
6400
|
// node_modules/clsx/dist/clsx.mjs
|
|
6174
6401
|
function r(e) {
|
|
@@ -6192,26 +6419,95 @@ function clsx() {
|
|
|
6192
6419
|
}
|
|
6193
6420
|
var clsx_default = clsx;
|
|
6194
6421
|
|
|
6195
|
-
// src/core/components/
|
|
6196
|
-
import { jsx as
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
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 */,
|
|
6201
6439
|
componentsProps
|
|
6202
6440
|
}) {
|
|
6203
6441
|
const theme = useRemoraidTheme();
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
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
|
+
})
|
|
6212
6504
|
});
|
|
6213
6505
|
}
|
|
6214
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
|
+
|
|
6215
6511
|
// src/core/components/FrameLayout/index.tsx
|
|
6216
6512
|
import {
|
|
6217
6513
|
Group,
|
|
@@ -6219,82 +6515,13 @@ import {
|
|
|
6219
6515
|
Stack
|
|
6220
6516
|
} from "@mantine/core";
|
|
6221
6517
|
import {
|
|
6222
|
-
createContext as
|
|
6518
|
+
createContext as createContext6,
|
|
6223
6519
|
useCallback,
|
|
6224
6520
|
useContext as useContext9,
|
|
6225
6521
|
useMemo as useMemo3
|
|
6226
6522
|
} from "react";
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
import { createContext as createContext6, useContext as useContext8 } from "react";
|
|
6230
|
-
import { Box, Portal } from "@mantine/core";
|
|
6231
|
-
|
|
6232
|
-
// src/core/lib/errors.ts
|
|
6233
|
-
class InvalidComponentUsageError extends Error {
|
|
6234
|
-
constructor(component, rule) {
|
|
6235
|
-
super(`Invalid usage of '${component}': ${rule}`);
|
|
6236
|
-
this.name = "InvalidComponentUsageError";
|
|
6237
|
-
}
|
|
6238
|
-
}
|
|
6239
|
-
|
|
6240
|
-
// src/core/components/FrameLayout/Element/index.tsx
|
|
6241
|
-
var import_lodash5 = __toESM(require_lodash(), 1);
|
|
6242
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
6243
|
-
var layoutElementContext = createContext6(null);
|
|
6244
|
-
var useFrameLayoutElement = () => {
|
|
6245
|
-
return useContext8(layoutElementContext);
|
|
6246
|
-
};
|
|
6247
|
-
function Element2({
|
|
6248
|
-
section,
|
|
6249
|
-
includeContainer = true,
|
|
6250
|
-
includePageContainer = false,
|
|
6251
|
-
layoutId,
|
|
6252
|
-
hidden = false,
|
|
6253
|
-
componentsProps,
|
|
6254
|
-
children
|
|
6255
|
-
}) {
|
|
6256
|
-
const { layouts } = useLayouts();
|
|
6257
|
-
const closestLayout = useFrameLayout();
|
|
6258
|
-
if (!closestLayout) {
|
|
6259
|
-
throw new InvalidComponentUsageError("FrameLayout.Element", "must be used as child of 'FrameLayout'.");
|
|
6260
|
-
}
|
|
6261
|
-
const layout = layouts[layoutId ?? closestLayout.layoutId];
|
|
6262
|
-
if (!layout) {
|
|
6263
|
-
return null;
|
|
6264
|
-
}
|
|
6265
|
-
if (layout.type !== "frame" /* Frame */) {
|
|
6266
|
-
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.");
|
|
6267
|
-
}
|
|
6268
|
-
if (!layout.sections[section]) {
|
|
6269
|
-
return null;
|
|
6270
|
-
}
|
|
6271
|
-
let containerProps = {};
|
|
6272
|
-
if (section === "left" /* Left */ || section === "right" /* Right */) {
|
|
6273
|
-
containerProps.h = "100%";
|
|
6274
|
-
}
|
|
6275
|
-
const element = includePageContainer ? /* @__PURE__ */ jsx11(PageContainer, {
|
|
6276
|
-
p: 0,
|
|
6277
|
-
hidden,
|
|
6278
|
-
...componentsProps?.PageContainer,
|
|
6279
|
-
children
|
|
6280
|
-
}) : children;
|
|
6281
|
-
return /* @__PURE__ */ jsx11(Portal, {
|
|
6282
|
-
target: layout.sections[section],
|
|
6283
|
-
children: /* @__PURE__ */ jsx11(layoutElementContext.Provider, {
|
|
6284
|
-
value: { layoutType: "frame" /* Frame */, section },
|
|
6285
|
-
children: includeContainer ? /* @__PURE__ */ jsx11(Box, {
|
|
6286
|
-
"data-hidden": hidden,
|
|
6287
|
-
...import_lodash5.merge(containerProps, componentsProps?.container),
|
|
6288
|
-
className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
|
|
6289
|
-
children: element
|
|
6290
|
-
}) : element
|
|
6291
|
-
})
|
|
6292
|
-
});
|
|
6293
|
-
}
|
|
6294
|
-
|
|
6295
|
-
// src/core/components/FrameLayout/index.tsx
|
|
6296
|
-
import { jsx as jsx12, jsxs } from "react/jsx-runtime";
|
|
6297
|
-
var layoutContext = createContext7(null);
|
|
6523
|
+
import { jsx as jsx13, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
6524
|
+
var layoutContext = createContext6(null);
|
|
6298
6525
|
var useFrameLayout = () => {
|
|
6299
6526
|
return useContext9(layoutContext);
|
|
6300
6527
|
};
|
|
@@ -6353,7 +6580,7 @@ function FrameLayout({
|
|
|
6353
6580
|
["content" /* Content */]: n
|
|
6354
6581
|
}));
|
|
6355
6582
|
}, [setSections]);
|
|
6356
|
-
const contentSection = /* @__PURE__ */
|
|
6583
|
+
const contentSection = /* @__PURE__ */ jsx13(Stack, {
|
|
6357
6584
|
ref: contentSectionRef,
|
|
6358
6585
|
h: "100%",
|
|
6359
6586
|
gap: gutter,
|
|
@@ -6368,9 +6595,9 @@ function FrameLayout({
|
|
|
6368
6595
|
...layout,
|
|
6369
6596
|
layoutId
|
|
6370
6597
|
}), [layout?.sections, defaultSections, layoutId]);
|
|
6371
|
-
return /* @__PURE__ */
|
|
6598
|
+
return /* @__PURE__ */ jsx13(layoutContext.Provider, {
|
|
6372
6599
|
value: layoutContextValue,
|
|
6373
|
-
children: /* @__PURE__ */
|
|
6600
|
+
children: /* @__PURE__ */ jsxs3(Group, {
|
|
6374
6601
|
gap: 0,
|
|
6375
6602
|
h: "100%",
|
|
6376
6603
|
w: "100%",
|
|
@@ -6381,7 +6608,7 @@ function FrameLayout({
|
|
|
6381
6608
|
},
|
|
6382
6609
|
className: clsx_default("remoraid-frame-layout", componentsProps?.horizontalContainer?.className),
|
|
6383
6610
|
children: [
|
|
6384
|
-
/* @__PURE__ */
|
|
6611
|
+
/* @__PURE__ */ jsx13(Group, {
|
|
6385
6612
|
ref: leftSectionRef,
|
|
6386
6613
|
h: "100%",
|
|
6387
6614
|
wrap: "nowrap",
|
|
@@ -6390,26 +6617,26 @@ function FrameLayout({
|
|
|
6390
6617
|
...componentsProps?.sectionContainers?.["left" /* Left */],
|
|
6391
6618
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-left-section", componentsProps?.sectionContainers?.["left" /* Left */]?.className)
|
|
6392
6619
|
}),
|
|
6393
|
-
/* @__PURE__ */
|
|
6620
|
+
/* @__PURE__ */ jsxs3(Stack, {
|
|
6394
6621
|
h: "100%",
|
|
6395
6622
|
flex: 1,
|
|
6396
6623
|
gap: 0,
|
|
6397
6624
|
...componentsProps?.verticalContainer,
|
|
6398
6625
|
className: clsx_default("remoraid-frame-layout-vertical-container", componentsProps?.verticalContainer?.className),
|
|
6399
6626
|
children: [
|
|
6400
|
-
/* @__PURE__ */
|
|
6627
|
+
/* @__PURE__ */ jsx13(Stack, {
|
|
6401
6628
|
ref: topSectionRef,
|
|
6402
6629
|
gap: gutter,
|
|
6403
6630
|
flex: 0,
|
|
6404
6631
|
...componentsProps?.sectionContainers?.["top" /* Top */],
|
|
6405
6632
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-top-section", componentsProps?.sectionContainers?.["top" /* Top */]?.className)
|
|
6406
6633
|
}),
|
|
6407
|
-
includeScrollArea ? /* @__PURE__ */
|
|
6634
|
+
includeScrollArea ? /* @__PURE__ */ jsx13(ScrollArea, {
|
|
6408
6635
|
flex: 1,
|
|
6409
6636
|
...componentsProps?.ScrollArea,
|
|
6410
6637
|
children: contentSection
|
|
6411
6638
|
}) : contentSection,
|
|
6412
|
-
/* @__PURE__ */
|
|
6639
|
+
/* @__PURE__ */ jsx13(Stack, {
|
|
6413
6640
|
ref: bottomSectionRef,
|
|
6414
6641
|
gap: gutter,
|
|
6415
6642
|
flex: 0,
|
|
@@ -6418,7 +6645,7 @@ function FrameLayout({
|
|
|
6418
6645
|
})
|
|
6419
6646
|
]
|
|
6420
6647
|
}),
|
|
6421
|
-
/* @__PURE__ */
|
|
6648
|
+
/* @__PURE__ */ jsx13(Group, {
|
|
6422
6649
|
ref: rightSectionRef,
|
|
6423
6650
|
h: "100%",
|
|
6424
6651
|
gap: gutter,
|
|
@@ -6435,266 +6662,97 @@ var FrameLayout_default = Object.assign(FrameLayout, {
|
|
|
6435
6662
|
Element: Element2
|
|
6436
6663
|
});
|
|
6437
6664
|
|
|
6438
|
-
// src/core/
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
}) {
|
|
6444
|
-
const theme = useRemoraidTheme();
|
|
6445
|
-
const {
|
|
6446
|
-
userExperience: {
|
|
6447
|
-
footer: { position }
|
|
6448
|
-
}
|
|
6449
|
-
} = useAppShellUserExperience();
|
|
6450
|
-
const content = /* @__PURE__ */ jsx13(PageContainer, {
|
|
6451
|
-
...componentsProps?.container,
|
|
6452
|
-
children: /* @__PURE__ */ jsx13(Center, {
|
|
6453
|
-
children: /* @__PURE__ */ jsx13(Icon2, {
|
|
6454
|
-
color: "var(--mantine-color-disabled)",
|
|
6455
|
-
...theme.componentsProps.icons.huge,
|
|
6456
|
-
...componentsProps?.icon
|
|
6457
|
-
})
|
|
6458
|
-
})
|
|
6459
|
-
});
|
|
6460
|
-
if (position === "bottom" /* Bottom */) {
|
|
6461
|
-
return /* @__PURE__ */ jsx13(FrameLayout_default.Element, {
|
|
6462
|
-
section: position,
|
|
6463
|
-
includeContainer: true,
|
|
6464
|
-
...componentsProps?.layoutElement,
|
|
6465
|
-
componentsProps: import_lodash6.merge({ container: { style: { order: -50 } } }, componentsProps?.layoutElement?.componentsProps),
|
|
6466
|
-
children: content
|
|
6467
|
-
});
|
|
6468
|
-
}
|
|
6469
|
-
if (position === "content" /* Content */) {
|
|
6470
|
-
return content;
|
|
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";
|
|
6471
6670
|
}
|
|
6472
|
-
return null;
|
|
6473
6671
|
}
|
|
6474
6672
|
|
|
6475
|
-
// src/core/components/
|
|
6673
|
+
// src/core/components/Page/PageContainer/index.tsx
|
|
6674
|
+
import { Container } from "@mantine/core";
|
|
6476
6675
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
"content" /* Content */
|
|
6482
|
-
]
|
|
6483
|
-
};
|
|
6484
|
-
var defaultFooterPositions = {
|
|
6485
|
-
["minimal" /* Minimal */]: "content" /* Content */
|
|
6486
|
-
};
|
|
6487
|
-
function Footer({ componentsProps }) {
|
|
6488
|
-
const { footerVariant } = useRemoraidApp();
|
|
6489
|
-
if (footerVariant === "minimal" /* Minimal */) {
|
|
6490
|
-
return /* @__PURE__ */ jsx14(FooterMinimal, {
|
|
6491
|
-
...componentsProps?.FooterMinimal
|
|
6492
|
-
});
|
|
6493
|
-
}
|
|
6494
|
-
return null;
|
|
6495
|
-
}
|
|
6496
|
-
var Footer_default = Object.assign(Footer, {
|
|
6497
|
-
FooterMinimal
|
|
6498
|
-
});
|
|
6499
|
-
|
|
6500
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
6501
|
-
import { useState as useState7 } from "react";
|
|
6502
|
-
|
|
6503
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6504
|
-
import {
|
|
6505
|
-
Box as Box3,
|
|
6506
|
-
Group as Group2,
|
|
6507
|
-
Paper,
|
|
6508
|
-
ScrollArea as ScrollArea2,
|
|
6509
|
-
Stack as Stack2
|
|
6510
|
-
} from "@mantine/core";
|
|
6511
|
-
var import_lodash8 = __toESM(require_lodash(), 1);
|
|
6512
|
-
|
|
6513
|
-
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
|
|
6514
|
-
import {
|
|
6515
|
-
Box as Box2,
|
|
6516
|
-
Menu as MantineMenu,
|
|
6517
|
-
Transition,
|
|
6518
|
-
useMantineTheme as useMantineTheme2
|
|
6519
|
-
} from "@mantine/core";
|
|
6520
|
-
import { isValidElement as isValidElement2 } from "react";
|
|
6521
|
-
import { jsx as jsx15, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
6522
|
-
function NavigationMenu({
|
|
6523
|
-
target,
|
|
6524
|
-
elements,
|
|
6525
|
-
label,
|
|
6676
|
+
function PageContainer({
|
|
6677
|
+
children,
|
|
6678
|
+
p = 0,
|
|
6679
|
+
hidden = false,
|
|
6526
6680
|
componentsProps
|
|
6527
6681
|
}) {
|
|
6528
|
-
const theme = useRemoraidTheme();
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
...theme.componentsProps.icons.small
|
|
6538
|
-
}) : undefined,
|
|
6539
|
-
c: element.type === "anchor" /* Anchor */ && element.href === pathname ? mantineTheme.primaryColor : undefined,
|
|
6540
|
-
onClick: (e) => {
|
|
6541
|
-
if (element.type === "anchor" /* Anchor */) {
|
|
6542
|
-
router.push(element.href);
|
|
6543
|
-
}
|
|
6544
|
-
if (element.type === "button" /* Button */) {
|
|
6545
|
-
element.onClick(e);
|
|
6546
|
-
}
|
|
6547
|
-
},
|
|
6548
|
-
style,
|
|
6549
|
-
children: element.label
|
|
6550
|
-
});
|
|
6551
|
-
};
|
|
6552
|
-
const isRoot = isValidElement2(target);
|
|
6553
|
-
const isLeaf = elements === undefined || elements.length === 0;
|
|
6554
|
-
const Menu = isRoot ? MantineMenu : MantineMenu.Sub;
|
|
6555
|
-
const menuProps = isRoot ? { trigger: "click-hover", ...componentsProps?.Menu } : { ...componentsProps?.MenuSub };
|
|
6556
|
-
return /* @__PURE__ */ jsx15(Transition, {
|
|
6557
|
-
mounted: isRoot ? true : target.mounted ?? true,
|
|
6558
|
-
...componentsProps?.transition,
|
|
6559
|
-
children: (transitionStyle) => {
|
|
6560
|
-
if (isLeaf) {
|
|
6561
|
-
if (isRoot) {
|
|
6562
|
-
return target;
|
|
6563
|
-
}
|
|
6564
|
-
return item(target, transitionStyle);
|
|
6565
|
-
}
|
|
6566
|
-
return /* @__PURE__ */ jsxs2(Menu, {
|
|
6567
|
-
...menuProps,
|
|
6568
|
-
children: [
|
|
6569
|
-
/* @__PURE__ */ jsx15(Menu.Target, {
|
|
6570
|
-
children: isRoot ? /* @__PURE__ */ jsx15(Box2, {
|
|
6571
|
-
...componentsProps?.rootTargetContainer,
|
|
6572
|
-
children: target
|
|
6573
|
-
}) : item(target, transitionStyle)
|
|
6574
|
-
}),
|
|
6575
|
-
/* @__PURE__ */ jsxs2(Menu.Dropdown, {
|
|
6576
|
-
children: [
|
|
6577
|
-
label !== undefined && /* @__PURE__ */ jsx15(MantineMenu.Label, {
|
|
6578
|
-
children: label
|
|
6579
|
-
}),
|
|
6580
|
-
elements.map((element, i) => /* @__PURE__ */ jsx15(NavigationMenu, {
|
|
6581
|
-
target: element,
|
|
6582
|
-
elements: element.children,
|
|
6583
|
-
componentsProps
|
|
6584
|
-
}, `navigation-menu-${i}`))
|
|
6585
|
-
]
|
|
6586
|
-
})
|
|
6587
|
-
]
|
|
6588
|
-
});
|
|
6589
|
-
}
|
|
6682
|
+
const theme = useRemoraidTheme();
|
|
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
|
|
6590
6691
|
});
|
|
6591
6692
|
}
|
|
6592
6693
|
|
|
6593
|
-
// src/core/components/
|
|
6594
|
-
import { IconDots } from "@tabler/icons-react";
|
|
6595
|
-
|
|
6596
|
-
// src/core/components/RemoraidButton/index.tsx
|
|
6694
|
+
// src/core/components/FrameLayout/Element/index.tsx
|
|
6597
6695
|
var import_lodash7 = __toESM(require_lodash(), 1);
|
|
6598
|
-
import {
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
label,
|
|
6612
|
-
responsive: responsiveProp,
|
|
6613
|
-
breakpoint: breakpointProp,
|
|
6614
|
-
collapsed: collapsedProp,
|
|
6615
|
-
size = defaultRemoraidButtonSize,
|
|
6616
|
-
color,
|
|
6617
|
-
onClick,
|
|
6618
|
-
loading,
|
|
6619
|
-
variant = "default",
|
|
6620
|
-
mounted = true,
|
|
6621
|
-
icon: iconProp,
|
|
6622
|
-
iconSize: iconSizeProp,
|
|
6623
|
-
clickTransformation = "default" /* Default */,
|
|
6624
|
-
componentsProps
|
|
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
|
|
6625
6709
|
}) {
|
|
6626
|
-
const
|
|
6627
|
-
const
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
const
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
}
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
size: size ? `input-${size}` : "input-sm",
|
|
6662
|
-
color,
|
|
6663
|
-
...componentsProps?.button,
|
|
6664
|
-
...componentsProps?.ActionIcon,
|
|
6665
|
-
hiddenFrom: !responsive ? undefined : breakpoint,
|
|
6666
|
-
display: !responsive && !collapsed ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
|
|
6667
|
-
style: import_lodash7.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.ActionIcon?.style),
|
|
6668
|
-
className: clsx_default(clickTransformationClass, componentsProps?.ActionIcon?.className, componentsProps?.button?.className),
|
|
6669
|
-
children: iconElement
|
|
6670
|
-
})
|
|
6671
|
-
}),
|
|
6672
|
-
/* @__PURE__ */ jsx16(Button, {
|
|
6673
|
-
onClick,
|
|
6674
|
-
loading,
|
|
6675
|
-
variant,
|
|
6676
|
-
size,
|
|
6677
|
-
color,
|
|
6678
|
-
leftSection: iconProp !== undefined ? iconElement : undefined,
|
|
6679
|
-
...componentsProps?.button,
|
|
6680
|
-
...componentsProps?.Button,
|
|
6681
|
-
visibleFrom: !responsive ? undefined : breakpoint,
|
|
6682
|
-
display: !responsive && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
|
|
6683
|
-
style: import_lodash7.merge(transitionStyle, componentsProps?.button?.style, componentsProps?.Button?.style),
|
|
6684
|
-
className: clsx_default(clickTransformationClass, componentsProps?.Button?.className, componentsProps?.button?.className),
|
|
6685
|
-
children: label
|
|
6686
|
-
})
|
|
6687
|
-
]
|
|
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
|
|
6688
6745
|
})
|
|
6689
6746
|
});
|
|
6690
6747
|
}
|
|
6691
6748
|
|
|
6692
6749
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6693
|
-
import { jsx as
|
|
6750
|
+
import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
6694
6751
|
function NavbarMinimalContent({
|
|
6695
6752
|
orientation,
|
|
6696
6753
|
maxElements,
|
|
6697
6754
|
collapseStaticElementsBreakpoint: collapseStaticElementsBreakpointProp,
|
|
6755
|
+
includeDefaultNavigationElements = true,
|
|
6698
6756
|
componentsProps
|
|
6699
6757
|
}) {
|
|
6700
6758
|
const theme = useRemoraidTheme();
|
|
@@ -6722,7 +6780,7 @@ function NavbarMinimalContent({
|
|
|
6722
6780
|
buttonCollapsed = false;
|
|
6723
6781
|
}
|
|
6724
6782
|
const buttonClickTransformation = orientation === "horizontal" /* Horizontal */ ? "tiltRight" /* TiltRight */ : "default" /* Default */;
|
|
6725
|
-
const logoButton = app.logo ? /* @__PURE__ */
|
|
6783
|
+
const logoButton = app.logo ? /* @__PURE__ */ jsx16(RemoraidButton, {
|
|
6726
6784
|
label: app.name,
|
|
6727
6785
|
variant: "subtle",
|
|
6728
6786
|
icon: app.logo,
|
|
@@ -6743,9 +6801,9 @@ function NavbarMinimalContent({
|
|
|
6743
6801
|
componentsProps?.logoButton?.onClick?.(e);
|
|
6744
6802
|
}
|
|
6745
6803
|
}) : undefined;
|
|
6746
|
-
const button = (element, key) => /* @__PURE__ */
|
|
6804
|
+
const button = (element, key) => /* @__PURE__ */ jsx16(NavigationMenu, {
|
|
6747
6805
|
label: element.label,
|
|
6748
|
-
target: /* @__PURE__ */
|
|
6806
|
+
target: /* @__PURE__ */ jsx16(RemoraidButton, {
|
|
6749
6807
|
mounted: element.mounted,
|
|
6750
6808
|
label: element.label,
|
|
6751
6809
|
icon: element.icon,
|
|
@@ -6782,17 +6840,21 @@ function NavbarMinimalContent({
|
|
|
6782
6840
|
}, key);
|
|
6783
6841
|
const elements = [
|
|
6784
6842
|
...app.nav,
|
|
6785
|
-
...getDefaultNavigationElements({
|
|
6843
|
+
...includeDefaultNavigationElements ? getDefaultNavigationElements({
|
|
6844
|
+
colorScheme,
|
|
6845
|
+
setColorScheme,
|
|
6846
|
+
auth: app.auth
|
|
6847
|
+
}) : []
|
|
6786
6848
|
];
|
|
6787
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}`));
|
|
6788
6850
|
const staticElements = elements.filter((element) => element.static);
|
|
6789
6851
|
const staticButtons = staticElements.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0)).map((element, i) => button(element, `static-nav-element-${i}`));
|
|
6790
6852
|
const collapseStaticElements = staticElements.filter((element) => element.mounted ?? true).length > 1;
|
|
6791
|
-
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */
|
|
6853
|
+
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */ jsx16(Box3, {
|
|
6792
6854
|
hiddenFrom: collapseStaticElementsBreakpoint,
|
|
6793
|
-
children: /* @__PURE__ */
|
|
6855
|
+
children: /* @__PURE__ */ jsx16(NavigationMenu, {
|
|
6794
6856
|
elements: staticElements,
|
|
6795
|
-
target: /* @__PURE__ */
|
|
6857
|
+
target: /* @__PURE__ */ jsx16(RemoraidButton, {
|
|
6796
6858
|
label: "Static elements",
|
|
6797
6859
|
icon: IconDots,
|
|
6798
6860
|
responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
|
|
@@ -6813,7 +6875,7 @@ function NavbarMinimalContent({
|
|
|
6813
6875
|
}, componentsProps?.NavigationMenu?.componentsProps)
|
|
6814
6876
|
})
|
|
6815
6877
|
}) : null;
|
|
6816
|
-
return /* @__PURE__ */
|
|
6878
|
+
return /* @__PURE__ */ jsx16(Paper, {
|
|
6817
6879
|
bg: theme.transparentBackground,
|
|
6818
6880
|
h: "100%",
|
|
6819
6881
|
p: "md",
|
|
@@ -6823,13 +6885,13 @@ function NavbarMinimalContent({
|
|
|
6823
6885
|
h: "100%",
|
|
6824
6886
|
children: [
|
|
6825
6887
|
logoButton,
|
|
6826
|
-
/* @__PURE__ */
|
|
6888
|
+
/* @__PURE__ */ jsx16(ScrollArea2, {
|
|
6827
6889
|
flex: 1,
|
|
6828
|
-
children: /* @__PURE__ */
|
|
6890
|
+
children: /* @__PURE__ */ jsx16(Stack2, {
|
|
6829
6891
|
children: buttons
|
|
6830
6892
|
})
|
|
6831
6893
|
}),
|
|
6832
|
-
/* @__PURE__ */
|
|
6894
|
+
/* @__PURE__ */ jsx16(Stack2, {
|
|
6833
6895
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6834
6896
|
children: staticButtons
|
|
6835
6897
|
}),
|
|
@@ -6839,15 +6901,15 @@ function NavbarMinimalContent({
|
|
|
6839
6901
|
wrap: "nowrap",
|
|
6840
6902
|
children: [
|
|
6841
6903
|
logoButton,
|
|
6842
|
-
/* @__PURE__ */
|
|
6904
|
+
/* @__PURE__ */ jsx16(ScrollArea2, {
|
|
6843
6905
|
flex: 1,
|
|
6844
6906
|
style: { contain: "inline-size" },
|
|
6845
|
-
children: /* @__PURE__ */
|
|
6907
|
+
children: /* @__PURE__ */ jsx16(Group2, {
|
|
6846
6908
|
wrap: "nowrap",
|
|
6847
6909
|
children: buttons
|
|
6848
6910
|
})
|
|
6849
6911
|
}),
|
|
6850
|
-
/* @__PURE__ */
|
|
6912
|
+
/* @__PURE__ */ jsx16(Group2, {
|
|
6851
6913
|
wrap: "nowrap",
|
|
6852
6914
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6853
6915
|
children: staticButtons
|
|
@@ -6879,9 +6941,9 @@ import {
|
|
|
6879
6941
|
} from "@mantine/core";
|
|
6880
6942
|
import { IconClick as IconClick2 } from "@tabler/icons-react";
|
|
6881
6943
|
var import_lodash9 = __toESM(require_lodash(), 1);
|
|
6882
|
-
import { jsx as
|
|
6944
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
6883
6945
|
function ControlButton({
|
|
6884
|
-
icon:
|
|
6946
|
+
icon: Icon3 = IconClick2,
|
|
6885
6947
|
mounted = true,
|
|
6886
6948
|
size = "xs",
|
|
6887
6949
|
iconSize = "tiny" /* Tiny */,
|
|
@@ -6892,17 +6954,17 @@ function ControlButton({
|
|
|
6892
6954
|
componentsProps
|
|
6893
6955
|
}) {
|
|
6894
6956
|
const theme = useRemoraidTheme();
|
|
6895
|
-
return /* @__PURE__ */
|
|
6957
|
+
return /* @__PURE__ */ jsx17(Transition3, {
|
|
6896
6958
|
mounted,
|
|
6897
6959
|
transition: "fade",
|
|
6898
6960
|
duration: theme.transitionDurations.short,
|
|
6899
6961
|
timingFunction: "ease",
|
|
6900
6962
|
...componentsProps?.transition,
|
|
6901
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
6963
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx17(Tooltip2, {
|
|
6902
6964
|
label: tooltip,
|
|
6903
6965
|
disabled: !Boolean(tooltip),
|
|
6904
6966
|
...componentsProps?.tooltip,
|
|
6905
|
-
children: /* @__PURE__ */
|
|
6967
|
+
children: /* @__PURE__ */ jsx17(ActionIcon2, {
|
|
6906
6968
|
"data-control-button": true,
|
|
6907
6969
|
size,
|
|
6908
6970
|
color,
|
|
@@ -6913,7 +6975,7 @@ function ControlButton({
|
|
|
6913
6975
|
order,
|
|
6914
6976
|
...import_lodash9.merge(transitionStyle, componentsProps?.button?.style)
|
|
6915
6977
|
},
|
|
6916
|
-
children: /* @__PURE__ */
|
|
6978
|
+
children: /* @__PURE__ */ jsx17(Icon3, {
|
|
6917
6979
|
...import_lodash9.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6918
6980
|
})
|
|
6919
6981
|
})
|
|
@@ -6930,7 +6992,7 @@ import {
|
|
|
6930
6992
|
} from "@mantine/core";
|
|
6931
6993
|
import { IconGripHorizontal } from "@tabler/icons-react";
|
|
6932
6994
|
var import_lodash10 = __toESM(require_lodash(), 1);
|
|
6933
|
-
import { jsx as
|
|
6995
|
+
import { jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
6934
6996
|
function Controls({
|
|
6935
6997
|
groupRef,
|
|
6936
6998
|
mounted = true,
|
|
@@ -6988,14 +7050,14 @@ function Controls({
|
|
|
6988
7050
|
const handlePointerUp = (e) => {
|
|
6989
7051
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
6990
7052
|
};
|
|
6991
|
-
return /* @__PURE__ */
|
|
7053
|
+
return /* @__PURE__ */ jsx18(Transition4, {
|
|
6992
7054
|
mounted,
|
|
6993
7055
|
keepMounted: true,
|
|
6994
7056
|
transition: "pop",
|
|
6995
7057
|
duration: theme.transitionDurations.short,
|
|
6996
7058
|
timingFunction: "ease",
|
|
6997
7059
|
...componentsProps?.transition,
|
|
6998
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7060
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx18(Paper2, {
|
|
6999
7061
|
ref: containerRef,
|
|
7000
7062
|
pos: "absolute",
|
|
7001
7063
|
p: gutter,
|
|
@@ -7018,7 +7080,7 @@ function Controls({
|
|
|
7018
7080
|
...componentsProps?.group,
|
|
7019
7081
|
className: clsx_default("remoraid-controls-group", componentsProps?.group?.className),
|
|
7020
7082
|
children: [
|
|
7021
|
-
/* @__PURE__ */
|
|
7083
|
+
/* @__PURE__ */ jsx18(IconGripHorizontal, {
|
|
7022
7084
|
...import_lodash10.merge({}, theme.componentsProps.icons[iconSize], { order: -100, color: "var(--mantine-color-default-border)" }, componentsProps?.gripIcon)
|
|
7023
7085
|
}),
|
|
7024
7086
|
children,
|
|
@@ -7026,7 +7088,7 @@ function Controls({
|
|
|
7026
7088
|
if (isValidElementOfType(ControlButton, button)) {
|
|
7027
7089
|
return button;
|
|
7028
7090
|
}
|
|
7029
|
-
return /* @__PURE__ */
|
|
7091
|
+
return /* @__PURE__ */ jsx18(ControlButton, {
|
|
7030
7092
|
...button
|
|
7031
7093
|
}, i);
|
|
7032
7094
|
})
|
|
@@ -7037,7 +7099,7 @@ function Controls({
|
|
|
7037
7099
|
}
|
|
7038
7100
|
|
|
7039
7101
|
// src/core/components/Pinnable/index.tsx
|
|
7040
|
-
import { jsx as
|
|
7102
|
+
import { jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
7041
7103
|
function Pinnable({
|
|
7042
7104
|
layoutType: layoutTypeProp,
|
|
7043
7105
|
section,
|
|
@@ -7057,7 +7119,7 @@ function Pinnable({
|
|
|
7057
7119
|
if (layout && layout.type !== layoutType) {
|
|
7058
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.`);
|
|
7059
7121
|
}
|
|
7060
|
-
const controlButton = useMemo4(() => /* @__PURE__ */
|
|
7122
|
+
const controlButton = useMemo4(() => /* @__PURE__ */ jsx19(ControlButton, {
|
|
7061
7123
|
icon: pinned ? IconPinnedOff : IconPin,
|
|
7062
7124
|
tooltip: pinned ? "Unpin" : "Pin",
|
|
7063
7125
|
color: "green",
|
|
@@ -7076,11 +7138,11 @@ function Pinnable({
|
|
|
7076
7138
|
...componentsProps?.container,
|
|
7077
7139
|
className: clsx_default("remoraid-pinnable", componentsProps?.container?.className),
|
|
7078
7140
|
children: [
|
|
7079
|
-
controlsContainer === undefined ? /* @__PURE__ */
|
|
7141
|
+
controlsContainer === undefined ? /* @__PURE__ */ jsx19(Controls, {
|
|
7080
7142
|
dragContainerRef: containerRef,
|
|
7081
7143
|
...componentsProps?.controls,
|
|
7082
7144
|
children: controlButton
|
|
7083
|
-
}) : controlsContainer !== null && /* @__PURE__ */
|
|
7145
|
+
}) : controlsContainer !== null && /* @__PURE__ */ jsx19(Portal2, {
|
|
7084
7146
|
target: controlsContainer,
|
|
7085
7147
|
children: controlButton
|
|
7086
7148
|
}),
|
|
@@ -7094,7 +7156,7 @@ function Pinnable({
|
|
|
7094
7156
|
return null;
|
|
7095
7157
|
}
|
|
7096
7158
|
if (pinned && layoutType === "frame" /* Frame */) {
|
|
7097
|
-
return /* @__PURE__ */
|
|
7159
|
+
return /* @__PURE__ */ jsx19(FrameLayout_default.Element, {
|
|
7098
7160
|
layoutId,
|
|
7099
7161
|
section,
|
|
7100
7162
|
hidden,
|
|
@@ -7106,9 +7168,10 @@ function Pinnable({
|
|
|
7106
7168
|
}
|
|
7107
7169
|
|
|
7108
7170
|
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
7109
|
-
import { jsx as
|
|
7171
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
7110
7172
|
function NavbarMinimal({
|
|
7111
7173
|
pinnable = true,
|
|
7174
|
+
includeDefaultNavigationElements = true,
|
|
7112
7175
|
componentsProps
|
|
7113
7176
|
}) {
|
|
7114
7177
|
const {
|
|
@@ -7123,8 +7186,12 @@ function NavbarMinimal({
|
|
|
7123
7186
|
const handleLeave = () => {
|
|
7124
7187
|
setHover(false);
|
|
7125
7188
|
};
|
|
7189
|
+
const contentProps = {
|
|
7190
|
+
includeDefaultNavigationElements,
|
|
7191
|
+
...componentsProps?.content
|
|
7192
|
+
};
|
|
7126
7193
|
if (position === "left" /* Left */ || position === "right" /* Right */) {
|
|
7127
|
-
return /* @__PURE__ */
|
|
7194
|
+
return /* @__PURE__ */ jsx20(FrameLayout_default.Element, {
|
|
7128
7195
|
section: position,
|
|
7129
7196
|
includeContainer: true,
|
|
7130
7197
|
...componentsProps?.layoutElement,
|
|
@@ -7135,19 +7202,19 @@ function NavbarMinimal({
|
|
|
7135
7202
|
}
|
|
7136
7203
|
}
|
|
7137
7204
|
}, componentsProps?.layoutElement?.componentsProps),
|
|
7138
|
-
children: /* @__PURE__ */
|
|
7205
|
+
children: /* @__PURE__ */ jsx20(NavbarMinimalContent, {
|
|
7139
7206
|
orientation: "vertical" /* Vertical */,
|
|
7140
|
-
...
|
|
7207
|
+
...contentProps
|
|
7141
7208
|
})
|
|
7142
7209
|
});
|
|
7143
7210
|
}
|
|
7144
7211
|
if (position === "top" /* Top */ || position === "bottom" /* Bottom */) {
|
|
7145
|
-
const content = /* @__PURE__ */
|
|
7212
|
+
const content = /* @__PURE__ */ jsx20(NavbarMinimalContent, {
|
|
7146
7213
|
orientation: "horizontal" /* Horizontal */,
|
|
7147
|
-
...
|
|
7214
|
+
...contentProps
|
|
7148
7215
|
});
|
|
7149
7216
|
if (pinnable) {
|
|
7150
|
-
return /* @__PURE__ */
|
|
7217
|
+
return /* @__PURE__ */ jsx20(PageContainer, {
|
|
7151
7218
|
...componentsProps?.container,
|
|
7152
7219
|
componentsProps: {
|
|
7153
7220
|
...componentsProps?.container?.componentsProps,
|
|
@@ -7156,7 +7223,7 @@ function NavbarMinimal({
|
|
|
7156
7223
|
className: clsx_default("hide-if-empty", componentsProps?.container?.componentsProps?.container?.className)
|
|
7157
7224
|
}
|
|
7158
7225
|
},
|
|
7159
|
-
children: /* @__PURE__ */
|
|
7226
|
+
children: /* @__PURE__ */ jsx20(Pinnable, {
|
|
7160
7227
|
section: position,
|
|
7161
7228
|
initialValue: true,
|
|
7162
7229
|
...componentsProps?.Pinnable,
|
|
@@ -7199,11 +7266,11 @@ function NavbarMinimal({
|
|
|
7199
7266
|
return content;
|
|
7200
7267
|
}
|
|
7201
7268
|
if (position === "content" /* Content */) {
|
|
7202
|
-
return /* @__PURE__ */
|
|
7269
|
+
return /* @__PURE__ */ jsx20(PageContainer, {
|
|
7203
7270
|
...componentsProps?.container,
|
|
7204
|
-
children: /* @__PURE__ */
|
|
7271
|
+
children: /* @__PURE__ */ jsx20(NavbarMinimalContent, {
|
|
7205
7272
|
orientation: "horizontal" /* Horizontal */,
|
|
7206
|
-
...
|
|
7273
|
+
...contentProps
|
|
7207
7274
|
})
|
|
7208
7275
|
});
|
|
7209
7276
|
}
|
|
@@ -7212,18 +7279,7 @@ function NavbarMinimal({
|
|
|
7212
7279
|
|
|
7213
7280
|
// src/core/components/AppShell/Navbar/index.tsx
|
|
7214
7281
|
import { IconLogin, IconLogout, IconMoon, IconSun } from "@tabler/icons-react";
|
|
7215
|
-
import { jsx as
|
|
7216
|
-
var supportedNavbarPositions = {
|
|
7217
|
-
["minimal" /* Minimal */]: [
|
|
7218
|
-
null,
|
|
7219
|
-
"top" /* Top */,
|
|
7220
|
-
"bottom" /* Bottom */,
|
|
7221
|
-
"left" /* Left */,
|
|
7222
|
-
"right" /* Right */,
|
|
7223
|
-
"content" /* Content */
|
|
7224
|
-
]
|
|
7225
|
-
};
|
|
7226
|
-
var defaultNavbarPositions = { ["minimal" /* Minimal */]: "left" /* Left */ };
|
|
7282
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
7227
7283
|
var getDefaultNavigationElements = ({
|
|
7228
7284
|
colorScheme,
|
|
7229
7285
|
setColorScheme,
|
|
@@ -7263,7 +7319,7 @@ var getDefaultNavigationElements = ({
|
|
|
7263
7319
|
function Navbar({ componentsProps }) {
|
|
7264
7320
|
const { navbarVariant } = useRemoraidApp();
|
|
7265
7321
|
if (navbarVariant === "minimal" /* Minimal */) {
|
|
7266
|
-
return /* @__PURE__ */
|
|
7322
|
+
return /* @__PURE__ */ jsx21(NavbarMinimal, {
|
|
7267
7323
|
...componentsProps?.NavbarMinimal
|
|
7268
7324
|
});
|
|
7269
7325
|
}
|
|
@@ -7273,60 +7329,60 @@ var Navbar_default = Object.assign(Navbar, {
|
|
|
7273
7329
|
NavbarMinimal
|
|
7274
7330
|
});
|
|
7275
7331
|
|
|
7276
|
-
// src/core/components/AppShell/
|
|
7277
|
-
import {
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
footer: {
|
|
7285
|
-
position: null
|
|
7286
|
-
}
|
|
7287
|
-
};
|
|
7288
|
-
var defaultAppShellUserExperienceCookieName = "remoraid-app-shell-user-experience";
|
|
7289
|
-
var appShellUserExperienceContext = createUserExperienceContext(defaultAppShellUserExperience);
|
|
7290
|
-
var useAppShellUserExperience = () => {
|
|
7291
|
-
return useContext10(appShellUserExperienceContext);
|
|
7292
|
-
};
|
|
7293
|
-
function AppShellUserExperienceProvider({
|
|
7294
|
-
children,
|
|
7295
|
-
initialValue,
|
|
7296
|
-
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
|
|
7297
7340
|
}) {
|
|
7298
|
-
const
|
|
7299
|
-
const
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
}
|
|
7303
|
-
if (x === null) {
|
|
7304
|
-
return false;
|
|
7305
|
-
}
|
|
7306
|
-
if (!("navbar" in x)) {
|
|
7307
|
-
return false;
|
|
7308
|
-
}
|
|
7309
|
-
if (!("footer" in x)) {
|
|
7310
|
-
return false;
|
|
7341
|
+
const theme = useRemoraidTheme();
|
|
7342
|
+
const {
|
|
7343
|
+
userExperience: {
|
|
7344
|
+
footer: { position }
|
|
7311
7345
|
}
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
},
|
|
7323
|
-
footer: {
|
|
7324
|
-
position: footerVariant === null ? null : defaultFooterPositions[footerVariant]
|
|
7325
|
-
}
|
|
7326
|
-
}, initialValue),
|
|
7327
|
-
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
|
+
})
|
|
7328
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;
|
|
7329
7382
|
}
|
|
7383
|
+
var Footer_default = Object.assign(Footer, {
|
|
7384
|
+
FooterMinimal
|
|
7385
|
+
});
|
|
7330
7386
|
|
|
7331
7387
|
// src/core/components/AppShell/index.tsx
|
|
7332
7388
|
import { jsx as jsx24, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
@@ -7446,25 +7502,30 @@ import { useEffect as useEffect6, useRef as useRef3, useState as useState8 } fro
|
|
|
7446
7502
|
import {
|
|
7447
7503
|
Chip,
|
|
7448
7504
|
Flex,
|
|
7449
|
-
|
|
7505
|
+
Scroller
|
|
7450
7506
|
} from "@mantine/core";
|
|
7507
|
+
var import_lodash14 = __toESM(require_lodash(), 1);
|
|
7451
7508
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
7452
7509
|
function ScrollableChipGroup({
|
|
7453
7510
|
value,
|
|
7454
|
-
ref,
|
|
7455
7511
|
onChange,
|
|
7456
7512
|
gap = "xs",
|
|
7457
7513
|
componentsProps,
|
|
7458
7514
|
children
|
|
7459
7515
|
}) {
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
...componentsProps?.
|
|
7463
|
-
|
|
7516
|
+
const theme = useRemoraidTheme();
|
|
7517
|
+
return /* @__PURE__ */ jsx26(Scroller, {
|
|
7518
|
+
...theme.componentsProps?.Scroller,
|
|
7519
|
+
...componentsProps?.Scroller,
|
|
7520
|
+
className: clsx_default("remoraid-masked-scroller", theme.componentsProps?.Scroller?.className, componentsProps?.Scroller?.className),
|
|
7521
|
+
style: import_lodash14.merge({ contain: "inline-size" }, theme.componentsProps?.Scroller?.style, componentsProps?.Scroller?.style),
|
|
7522
|
+
attributes: import_lodash14.merge({
|
|
7523
|
+
container: { "data-remoraid-scroller-container": true }
|
|
7524
|
+
}, theme.componentsProps?.Scroller?.attributes, componentsProps?.Scroller?.attributes),
|
|
7464
7525
|
children: /* @__PURE__ */ jsx26(Chip.Group, {
|
|
7465
7526
|
value,
|
|
7466
7527
|
onChange,
|
|
7467
|
-
...componentsProps?.
|
|
7528
|
+
...componentsProps?.ChipGroup,
|
|
7468
7529
|
multiple: true,
|
|
7469
7530
|
children: /* @__PURE__ */ jsx26(Flex, {
|
|
7470
7531
|
justify: "flex-start",
|
|
@@ -7479,12 +7540,12 @@ function ScrollableChipGroup({
|
|
|
7479
7540
|
}
|
|
7480
7541
|
|
|
7481
7542
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
7482
|
-
var
|
|
7543
|
+
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
7483
7544
|
import { jsx as jsx27, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
7484
7545
|
function WidgetSelectionHeader({
|
|
7485
7546
|
title,
|
|
7486
7547
|
pinnableSection = "top" /* Top */,
|
|
7487
|
-
initiallyPinned
|
|
7548
|
+
initiallyPinned: initiallyPinnedProp,
|
|
7488
7549
|
disabledWidgets,
|
|
7489
7550
|
componentsProps
|
|
7490
7551
|
}) {
|
|
@@ -7500,6 +7561,7 @@ function WidgetSelectionHeader({
|
|
|
7500
7561
|
if (!page) {
|
|
7501
7562
|
throw new InvalidComponentUsageError("WidgetSelectionHeader", "must be used as child of 'Page'.");
|
|
7502
7563
|
}
|
|
7564
|
+
const initiallyPinned = pinnableSection ? initiallyPinnedProp ?? true : false;
|
|
7503
7565
|
const [hover, setHover] = useState8(false);
|
|
7504
7566
|
const [isPinned, setIsPinned] = useState8(initiallyPinned);
|
|
7505
7567
|
const handleEnter = () => {
|
|
@@ -7508,7 +7570,7 @@ function WidgetSelectionHeader({
|
|
|
7508
7570
|
const handleLeave = () => {
|
|
7509
7571
|
setHover(false);
|
|
7510
7572
|
};
|
|
7511
|
-
const
|
|
7573
|
+
const containerRef = useRef3(null);
|
|
7512
7574
|
const widgets = widgetsContext2.widgets[page.pageId] ?? {};
|
|
7513
7575
|
const selectedWidgets = Object.entries(widgets).reduce((t, [widgetId, widget]) => widget?.selected ? [...t, widgetId] : t, []);
|
|
7514
7576
|
const element = /* @__PURE__ */ jsxs8(Flex2, {
|
|
@@ -7516,6 +7578,7 @@ function WidgetSelectionHeader({
|
|
|
7516
7578
|
align: "center",
|
|
7517
7579
|
gap: "md",
|
|
7518
7580
|
...componentsProps?.container,
|
|
7581
|
+
ref: containerRef,
|
|
7519
7582
|
onMouseEnter: (e) => {
|
|
7520
7583
|
if (!pinnableSection) {
|
|
7521
7584
|
handleEnter();
|
|
@@ -7526,13 +7589,14 @@ function WidgetSelectionHeader({
|
|
|
7526
7589
|
if (!pinnableSection) {
|
|
7527
7590
|
handleLeave();
|
|
7528
7591
|
}
|
|
7529
|
-
componentsProps?.container?.
|
|
7592
|
+
componentsProps?.container?.onMouseLeave?.(e);
|
|
7530
7593
|
},
|
|
7531
7594
|
className: clsx_default(!pinnableSection ? "remoraid-non-widget-segment" : undefined, !pinnableSection ? "remoraid-segment" : undefined, componentsProps?.container?.className),
|
|
7532
7595
|
children: [
|
|
7533
7596
|
/* @__PURE__ */ jsx27(Text, {
|
|
7534
7597
|
size: "md",
|
|
7535
7598
|
...componentsProps?.title,
|
|
7599
|
+
style: { whiteSpace: "nowrap", ...componentsProps?.title?.style },
|
|
7536
7600
|
children: title ?? page.name
|
|
7537
7601
|
}),
|
|
7538
7602
|
/* @__PURE__ */ jsx27(Divider, {
|
|
@@ -7541,13 +7605,17 @@ function WidgetSelectionHeader({
|
|
|
7541
7605
|
}),
|
|
7542
7606
|
isPageRegistered(page.pageId) && /* @__PURE__ */ jsx27(ScrollableChipGroup, {
|
|
7543
7607
|
value: selectedWidgets,
|
|
7544
|
-
ref: scrollAreaRef,
|
|
7545
7608
|
...componentsProps?.ScrollableChipGroup,
|
|
7546
7609
|
onChange: (value) => {
|
|
7547
7610
|
updateWidgetSelectionBulk(page.pageId, value);
|
|
7548
7611
|
componentsProps?.ScrollableChipGroup?.onChange?.(value);
|
|
7549
7612
|
},
|
|
7550
|
-
componentsProps:
|
|
7613
|
+
componentsProps: import_lodash15.merge({
|
|
7614
|
+
Scroller: {
|
|
7615
|
+
flex: 1,
|
|
7616
|
+
miw: 0
|
|
7617
|
+
}
|
|
7618
|
+
}, componentsProps?.ScrollableChipGroup?.componentsProps),
|
|
7551
7619
|
children: Object.entries(widgets).map(([widgetId, widget]) => {
|
|
7552
7620
|
if (!widget) {
|
|
7553
7621
|
return;
|
|
@@ -7568,12 +7636,15 @@ function WidgetSelectionHeader({
|
|
|
7568
7636
|
...theme.componentsProps.icons.extraSmall
|
|
7569
7637
|
}),
|
|
7570
7638
|
...componentsProps?.Chip,
|
|
7571
|
-
styles:
|
|
7639
|
+
styles: import_lodash15.merge({
|
|
7572
7640
|
label: {
|
|
7573
7641
|
transition: "background-color var(--remoraid-transition-duration-short)"
|
|
7574
7642
|
}
|
|
7575
7643
|
}, componentsProps?.Chip?.styles),
|
|
7576
|
-
|
|
7644
|
+
wrapperProps: {
|
|
7645
|
+
...componentsProps?.Chip?.wrapperProps,
|
|
7646
|
+
id: `remoraid-widget-selection-header-chip-${widgetId}`
|
|
7647
|
+
},
|
|
7577
7648
|
children: widget.name
|
|
7578
7649
|
})
|
|
7579
7650
|
})
|
|
@@ -7614,19 +7685,20 @@ function WidgetSelectionHeader({
|
|
|
7614
7685
|
if (!activeWidget) {
|
|
7615
7686
|
return;
|
|
7616
7687
|
}
|
|
7617
|
-
if (!
|
|
7688
|
+
if (!containerRef?.current) {
|
|
7618
7689
|
return;
|
|
7619
7690
|
}
|
|
7620
|
-
|
|
7691
|
+
const activeWidgetChipElement = containerRef.current.querySelector(`#remoraid-widget-selection-header-chip-${activeWidget}`);
|
|
7692
|
+
if (!activeWidgetChipElement) {
|
|
7621
7693
|
return;
|
|
7622
7694
|
}
|
|
7623
|
-
const
|
|
7624
|
-
if (!
|
|
7695
|
+
const scrollContainerElement = activeWidgetChipElement.closest("[data-remoraid-scroller-container]");
|
|
7696
|
+
if (!scrollContainerElement) {
|
|
7625
7697
|
return;
|
|
7626
7698
|
}
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7699
|
+
scrollContainerElement.scrollTo({
|
|
7700
|
+
left: activeWidgetChipElement.offsetLeft - scrollContainerElement.clientWidth / 2 + activeWidgetChipElement.clientWidth / 2,
|
|
7701
|
+
behavior: "smooth"
|
|
7630
7702
|
});
|
|
7631
7703
|
}, [activeWidget]);
|
|
7632
7704
|
if (pinnableSection) {
|
|
@@ -7720,7 +7792,7 @@ function BadgeMinimal({
|
|
|
7720
7792
|
}
|
|
7721
7793
|
|
|
7722
7794
|
// src/core/components/BadgeGroup/index.tsx
|
|
7723
|
-
var
|
|
7795
|
+
var import_lodash16 = __toESM(require_lodash(), 1);
|
|
7724
7796
|
import { jsx as jsx29, jsxs as jsxs9, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
7725
7797
|
import { createElement } from "react";
|
|
7726
7798
|
function BadgeGroup({
|
|
@@ -7768,7 +7840,7 @@ function BadgeGroup({
|
|
|
7768
7840
|
...componentsProps?.cumulativeBadge,
|
|
7769
7841
|
style: {
|
|
7770
7842
|
cursor: "pointer",
|
|
7771
|
-
...
|
|
7843
|
+
...import_lodash16.merge(transitionStyle, componentsProps?.cumulativeBadge?.style)
|
|
7772
7844
|
},
|
|
7773
7845
|
children: [
|
|
7774
7846
|
numVisibleBadges,
|
|
@@ -7792,7 +7864,7 @@ function BadgeGroup({
|
|
|
7792
7864
|
}
|
|
7793
7865
|
// src/core/components/AlertMinimal/index.tsx
|
|
7794
7866
|
import { Alert, Transition as Transition7 } from "@mantine/core";
|
|
7795
|
-
var
|
|
7867
|
+
var import_lodash17 = __toESM(require_lodash(), 1);
|
|
7796
7868
|
import { jsx as jsx30, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
7797
7869
|
function AlertMinimal({
|
|
7798
7870
|
category,
|
|
@@ -7809,7 +7881,7 @@ function AlertMinimal({
|
|
|
7809
7881
|
icon: Icon4,
|
|
7810
7882
|
iconSize = "small" /* Small */,
|
|
7811
7883
|
componentsProps
|
|
7812
|
-
} =
|
|
7884
|
+
} = import_lodash17.merge({}, theme.componentsProps.alerts[category], props);
|
|
7813
7885
|
return /* @__PURE__ */ jsx30(Transition7, {
|
|
7814
7886
|
mounted,
|
|
7815
7887
|
transition: "fade",
|
|
@@ -7823,10 +7895,10 @@ function AlertMinimal({
|
|
|
7823
7895
|
onClose,
|
|
7824
7896
|
withCloseButton: onClose !== undefined,
|
|
7825
7897
|
icon: Icon4 ? /* @__PURE__ */ jsx30(Icon4, {
|
|
7826
|
-
...
|
|
7898
|
+
...import_lodash17.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
7827
7899
|
}) : undefined,
|
|
7828
7900
|
...componentsProps?.alert,
|
|
7829
|
-
style:
|
|
7901
|
+
style: import_lodash17.merge(transitionStyle, componentsProps?.alert?.style),
|
|
7830
7902
|
children: [
|
|
7831
7903
|
text,
|
|
7832
7904
|
children
|
|
@@ -7843,7 +7915,7 @@ import {
|
|
|
7843
7915
|
useState as useState9
|
|
7844
7916
|
} from "react";
|
|
7845
7917
|
import { IconX } from "@tabler/icons-react";
|
|
7846
|
-
var
|
|
7918
|
+
var import_lodash18 = __toESM(require_lodash(), 1);
|
|
7847
7919
|
import { jsx as jsx31, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
7848
7920
|
function WidgetWrapper({
|
|
7849
7921
|
config,
|
|
@@ -7914,7 +7986,7 @@ function WidgetWrapper({
|
|
|
7914
7986
|
handleLeave(e);
|
|
7915
7987
|
componentsProps?.container?.onMouseLeave?.(e);
|
|
7916
7988
|
},
|
|
7917
|
-
style:
|
|
7989
|
+
style: import_lodash18.merge(transitionStyle, { flexDirection: "column" }, componentsProps?.container?.style),
|
|
7918
7990
|
className: clsx_default("remoraid-segment", componentsProps?.container?.className),
|
|
7919
7991
|
id: config.widgetId,
|
|
7920
7992
|
children: [
|
|
@@ -7994,12 +8066,12 @@ import {
|
|
|
7994
8066
|
Title,
|
|
7995
8067
|
Stack as Stack5,
|
|
7996
8068
|
Box as Box7,
|
|
7997
|
-
ScrollArea as
|
|
8069
|
+
ScrollArea as ScrollArea3,
|
|
7998
8070
|
Transition as Transition9,
|
|
7999
8071
|
Text as Text2
|
|
8000
8072
|
} from "@mantine/core";
|
|
8001
8073
|
import { Children } from "react";
|
|
8002
|
-
var
|
|
8074
|
+
var import_lodash19 = __toESM(require_lodash(), 1);
|
|
8003
8075
|
import { jsx as jsx32, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
8004
8076
|
import { createElement as createElement2 } from "react";
|
|
8005
8077
|
function Widget({
|
|
@@ -8071,7 +8143,7 @@ function Widget({
|
|
|
8071
8143
|
size: "sm",
|
|
8072
8144
|
c: "dimmed",
|
|
8073
8145
|
...componentsProps?.description,
|
|
8074
|
-
style:
|
|
8146
|
+
style: import_lodash19.merge(transitionStyle, componentsProps?.description?.style),
|
|
8075
8147
|
children: description
|
|
8076
8148
|
})
|
|
8077
8149
|
})
|
|
@@ -8112,7 +8184,7 @@ function Widget({
|
|
|
8112
8184
|
});
|
|
8113
8185
|
})
|
|
8114
8186
|
}),
|
|
8115
|
-
(loading || Children.toArray(children).length > 0) && /* @__PURE__ */ jsx32(
|
|
8187
|
+
(loading || Children.toArray(children).length > 0) && /* @__PURE__ */ jsx32(ScrollArea3.Autosize, {
|
|
8116
8188
|
flex: 1,
|
|
8117
8189
|
...componentsProps?.childrenContainer,
|
|
8118
8190
|
className: clsx_default("remoraid-widget-children-container", componentsProps?.childrenContainer?.className),
|
|
@@ -8342,7 +8414,7 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
|
8342
8414
|
Row
|
|
8343
8415
|
});
|
|
8344
8416
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
|
8345
|
-
var
|
|
8417
|
+
var import_lodash20 = __toESM(require_lodash(), 1);
|
|
8346
8418
|
import { Select } from "@mantine/core";
|
|
8347
8419
|
import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
8348
8420
|
var defaultNavbarSettingsWidgetId = "navbar-settings";
|
|
@@ -8353,7 +8425,7 @@ function NavbarSettingsWidget({
|
|
|
8353
8425
|
}) {
|
|
8354
8426
|
const additionalRows = additionalRowsProp?.map((additionalRow) => asElementOrPropsOfType(SettingsTable_default.Row, additionalRow, "Check the 'additionalRows' property of 'NavbarSettingsWidget'."));
|
|
8355
8427
|
const { userExperience, updateUserExperience, initialUserExperience } = useAppShellUserExperience();
|
|
8356
|
-
const
|
|
8428
|
+
const { navbarVariant, navbarMetadata: navbarMetadata2 } = useRemoraidApp();
|
|
8357
8429
|
const modeLabels = {
|
|
8358
8430
|
["responsive" /* Responsive */]: "Responsive",
|
|
8359
8431
|
["collapsed" /* Collapsed */]: "Collapsed",
|
|
@@ -8370,7 +8442,15 @@ function NavbarSettingsWidget({
|
|
|
8370
8442
|
widgetProps: {
|
|
8371
8443
|
id: defaultNavbarSettingsWidgetId,
|
|
8372
8444
|
title: "Navbar Settings",
|
|
8373
|
-
...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
|
+
]
|
|
8374
8454
|
},
|
|
8375
8455
|
onRestoreDefaultValues: () => {
|
|
8376
8456
|
updateUserExperience((prev) => ({
|
|
@@ -8378,15 +8458,15 @@ function NavbarSettingsWidget({
|
|
|
8378
8458
|
navbar: initialUserExperience.navbar
|
|
8379
8459
|
}));
|
|
8380
8460
|
},
|
|
8381
|
-
custom: !
|
|
8382
|
-
children: /* @__PURE__ */ jsxs15(SettingsTable_default, {
|
|
8461
|
+
custom: !import_lodash20.isEqual(userExperience.navbar, initialUserExperience.navbar),
|
|
8462
|
+
children: navbarVariant !== null && /* @__PURE__ */ jsxs15(SettingsTable_default, {
|
|
8383
8463
|
...componentsProps?.table,
|
|
8384
8464
|
children: [
|
|
8385
8465
|
/* @__PURE__ */ jsx39(SettingsTable_default.Row, {
|
|
8386
8466
|
label: "Select navbar position",
|
|
8387
8467
|
children: /* @__PURE__ */ jsx39(Select, {
|
|
8388
8468
|
value: userExperience.navbar.position ?? "hidden",
|
|
8389
|
-
data:
|
|
8469
|
+
data: navbarMetadata2.supportedPositions.map((position) => ({
|
|
8390
8470
|
value: position ?? "hidden",
|
|
8391
8471
|
label: position === null ? "Hidden" : positionLabels[position]
|
|
8392
8472
|
})),
|
|
@@ -8408,7 +8488,7 @@ function NavbarSettingsWidget({
|
|
|
8408
8488
|
label: "Select navbar mode",
|
|
8409
8489
|
children: /* @__PURE__ */ jsx39(Select, {
|
|
8410
8490
|
value: userExperience.navbar.mode,
|
|
8411
|
-
data:
|
|
8491
|
+
data: navbarMetadata2.supportedModes.map((mode) => ({
|
|
8412
8492
|
value: mode,
|
|
8413
8493
|
label: modeLabels[mode]
|
|
8414
8494
|
})),
|
|
@@ -8436,7 +8516,7 @@ function NavbarSettingsWidget({
|
|
|
8436
8516
|
});
|
|
8437
8517
|
}
|
|
8438
8518
|
// src/core/components/FooterSettingsWidget/index.tsx
|
|
8439
|
-
var
|
|
8519
|
+
var import_lodash21 = __toESM(require_lodash(), 1);
|
|
8440
8520
|
import { Select as Select2 } from "@mantine/core";
|
|
8441
8521
|
import { jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
8442
8522
|
var defaultFooterSettingsWidgetId = "footer-settings";
|
|
@@ -8447,7 +8527,7 @@ function FooterSettingsWidget({
|
|
|
8447
8527
|
}) {
|
|
8448
8528
|
const additionalRows = additionalRowsProp?.map((additionalRow) => asElementOrPropsOfType(SettingsTable_default.Row, additionalRow, "Check the 'additionalRows' property of 'FooterSettingsWidget'."));
|
|
8449
8529
|
const { userExperience, updateUserExperience, initialUserExperience } = useAppShellUserExperience();
|
|
8450
|
-
const
|
|
8530
|
+
const { footerVariant, footerMetadata: footerMetadata2 } = useRemoraidApp();
|
|
8451
8531
|
const positionLabels = {
|
|
8452
8532
|
["bottom" /* Bottom */]: "Bottom",
|
|
8453
8533
|
["top" /* Top */]: "Top",
|
|
@@ -8459,7 +8539,15 @@ function FooterSettingsWidget({
|
|
|
8459
8539
|
widgetProps: {
|
|
8460
8540
|
id: defaultFooterSettingsWidgetId,
|
|
8461
8541
|
title: "Footer Settings",
|
|
8462
|
-
...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
|
+
]
|
|
8463
8551
|
},
|
|
8464
8552
|
onRestoreDefaultValues: () => {
|
|
8465
8553
|
updateUserExperience((prev) => ({
|
|
@@ -8467,15 +8555,15 @@ function FooterSettingsWidget({
|
|
|
8467
8555
|
footer: initialUserExperience.footer
|
|
8468
8556
|
}));
|
|
8469
8557
|
},
|
|
8470
|
-
custom: !
|
|
8471
|
-
children: /* @__PURE__ */ jsxs16(SettingsTable_default, {
|
|
8558
|
+
custom: !import_lodash21.isEqual(userExperience.footer, initialUserExperience.footer),
|
|
8559
|
+
children: footerVariant !== null && /* @__PURE__ */ jsxs16(SettingsTable_default, {
|
|
8472
8560
|
...componentsProps?.table,
|
|
8473
8561
|
children: [
|
|
8474
8562
|
/* @__PURE__ */ jsx40(SettingsTable_default.Row, {
|
|
8475
8563
|
label: "Select footer position",
|
|
8476
8564
|
children: /* @__PURE__ */ jsx40(Select2, {
|
|
8477
8565
|
value: userExperience.footer.position ?? "hidden",
|
|
8478
|
-
data:
|
|
8566
|
+
data: footerMetadata2.supportedPositions.map((position) => ({
|
|
8479
8567
|
value: position ?? "hidden",
|
|
8480
8568
|
label: position === null ? "Hidden" : positionLabels[position]
|
|
8481
8569
|
})),
|
|
@@ -8552,7 +8640,7 @@ import {
|
|
|
8552
8640
|
Box as Box8,
|
|
8553
8641
|
Input,
|
|
8554
8642
|
Paper as Paper4,
|
|
8555
|
-
ScrollArea as
|
|
8643
|
+
ScrollArea as ScrollArea4
|
|
8556
8644
|
} from "@mantine/core";
|
|
8557
8645
|
import { useState as useState10 } from "react";
|
|
8558
8646
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
@@ -8586,7 +8674,7 @@ function InputWrapperScrollArea({
|
|
|
8586
8674
|
transition: "border-color .1s",
|
|
8587
8675
|
borderColor: error ? "var(--mantine-color-error)" : isHovering ? "var(--mantine-primary-color-filled)" : undefined
|
|
8588
8676
|
},
|
|
8589
|
-
children: /* @__PURE__ */ jsx42(
|
|
8677
|
+
children: /* @__PURE__ */ jsx42(ScrollArea4, {
|
|
8590
8678
|
mah,
|
|
8591
8679
|
px: "md",
|
|
8592
8680
|
flex: 1,
|
|
@@ -8615,10 +8703,9 @@ export {
|
|
|
8615
8703
|
useFrameLayoutElement,
|
|
8616
8704
|
useFrameLayout,
|
|
8617
8705
|
useAppShellUserExperience,
|
|
8618
|
-
supportedNavbarPositions,
|
|
8619
|
-
supportedFooterPositions,
|
|
8620
8706
|
scrollToWidget,
|
|
8621
8707
|
remoraidAppShellLayoutId,
|
|
8708
|
+
navbarMetadata,
|
|
8622
8709
|
isValidElementOfType,
|
|
8623
8710
|
isIcon,
|
|
8624
8711
|
getElementTypeName,
|
|
@@ -8626,6 +8713,7 @@ export {
|
|
|
8626
8713
|
getDefaultNavigationElements,
|
|
8627
8714
|
getDefaultButtonIconSize,
|
|
8628
8715
|
getCssVars,
|
|
8716
|
+
footerMetadata,
|
|
8629
8717
|
defaultUserExperienceCookieName,
|
|
8630
8718
|
defaultUserExperience,
|
|
8631
8719
|
defaultTransitionDurations,
|
|
@@ -8633,10 +8721,8 @@ export {
|
|
|
8633
8721
|
defaultSettingsTableOptions,
|
|
8634
8722
|
defaultRemoraidButtonSize,
|
|
8635
8723
|
defaultNavbarSettingsWidgetId,
|
|
8636
|
-
defaultNavbarPositions,
|
|
8637
8724
|
defaultLayoutsContext,
|
|
8638
8725
|
defaultFooterSettingsWidgetId,
|
|
8639
|
-
defaultFooterPositions,
|
|
8640
8726
|
defaultAppShellUserExperienceCookieName,
|
|
8641
8727
|
defaultAppShellUserExperience,
|
|
8642
8728
|
defaultAppContext,
|