remoraid 2.45.0 → 3.1.1

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 CHANGED
@@ -1,12 +1,27 @@
1
1
  # Usage
2
2
 
3
- `RemoraidProvider` must be rendered at the root of your application and should be used only once.
3
+ Import Mantine and Remoraid styles once at the root of your application.
4
+ `@mantine/dates/styles.css` is required when using `remoraid/jsonforms`.
4
5
 
5
6
  ```typescript
6
- import { RemoraidProvider } from "remoraid";
7
+ import "@mantine/core/styles.css";
8
+ import "@mantine/dates/styles.css";
9
+ import "remoraid/core/styles.css";
10
+ ```
11
+
12
+ `RemoraidProvider` must be rendered inside `MantineProvider` at the root of
13
+ your application and should be used only once.
14
+
15
+ ```tsx
16
+ import { MantineProvider } from "@mantine/core";
17
+ import { RemoraidProvider } from "remoraid/core";
7
18
 
8
19
  function Demo() {
9
- return <RemoraidProvider>{/_ Your app here _/}</RemoraidProvider>;
20
+ return (
21
+ <MantineProvider>
22
+ <RemoraidProvider>{/* Your app here */}</RemoraidProvider>
23
+ </MantineProvider>
24
+ );
10
25
  }
11
26
  ```
12
27
 
@@ -6532,7 +6532,7 @@ function FooterMinimal({
6532
6532
  ...componentsProps?.container,
6533
6533
  children: /* @__PURE__ */ jsx_runtime13.jsx(import_core6.Center, {
6534
6534
  children: /* @__PURE__ */ jsx_runtime13.jsx(Icon2, {
6535
- color: "var(--mantine-color-default-border)",
6535
+ color: "var(--mantine-color-disabled)",
6536
6536
  ...theme.componentsProps.icons.huge,
6537
6537
  ...componentsProps?.icon
6538
6538
  })
@@ -6599,10 +6599,10 @@ function NavigationMenu({
6599
6599
  const mantineTheme = import_core7.useMantineTheme();
6600
6600
  const router = useRemoraidRouter();
6601
6601
  const { pathname } = router;
6602
- const item = (element) => /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Transition, {
6603
- mounted: element.mounted ?? true,
6604
- ...componentsProps?.transition,
6605
- children: (transitionStyle) => /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Item, {
6602
+ const item = (element, style) => {
6603
+ const isLeaf2 = element.children === undefined || element.children.length === 0;
6604
+ const Menu2 = isLeaf2 ? import_core7.Menu : import_core7.Menu.Sub;
6605
+ return /* @__PURE__ */ jsx_runtime15.jsx(Menu2.Item, {
6606
6606
  leftSection: element.icon ? /* @__PURE__ */ jsx_runtime15.jsx(element.icon, {
6607
6607
  ...theme.componentsProps.icons.small
6608
6608
  }) : undefined,
@@ -6615,36 +6615,48 @@ function NavigationMenu({
6615
6615
  element.onClick(e);
6616
6616
  }
6617
6617
  },
6618
- style: transitionStyle,
6618
+ style,
6619
6619
  children: element.label
6620
- })
6621
- });
6622
- const targetElement = import_react12.isValidElement(target) ? target : item(target);
6623
- if (elements === undefined || elements.length === 0) {
6624
- return targetElement;
6625
- }
6626
- return /* @__PURE__ */ jsx_runtime15.jsxs(import_core7.Menu, {
6627
- trigger: "click-hover",
6628
- ...componentsProps?.Menu,
6629
- children: [
6630
- /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Target, {
6631
- children: /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Box, {
6632
- children: targetElement
6633
- })
6634
- }),
6635
- /* @__PURE__ */ jsx_runtime15.jsxs(import_core7.Menu.Dropdown, {
6620
+ });
6621
+ };
6622
+ const isRoot = import_react12.isValidElement(target);
6623
+ const isLeaf = elements === undefined || elements.length === 0;
6624
+ const Menu = isRoot ? import_core7.Menu : import_core7.Menu.Sub;
6625
+ const menuProps = isRoot ? { trigger: "click-hover", ...componentsProps?.Menu } : { ...componentsProps?.MenuSub };
6626
+ return /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Transition, {
6627
+ mounted: isRoot ? true : target.mounted ?? true,
6628
+ ...componentsProps?.transition,
6629
+ children: (transitionStyle) => {
6630
+ if (isLeaf) {
6631
+ if (isRoot) {
6632
+ return target;
6633
+ }
6634
+ return item(target, transitionStyle);
6635
+ }
6636
+ return /* @__PURE__ */ jsx_runtime15.jsxs(Menu, {
6637
+ ...menuProps,
6636
6638
  children: [
6637
- label !== undefined && /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Label, {
6638
- children: label
6639
+ /* @__PURE__ */ jsx_runtime15.jsx(Menu.Target, {
6640
+ children: isRoot ? /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Box, {
6641
+ ...componentsProps?.rootTargetContainer,
6642
+ children: target
6643
+ }) : item(target, transitionStyle)
6639
6644
  }),
6640
- elements.map((element, i) => /* @__PURE__ */ jsx_runtime15.jsx(NavigationMenu, {
6641
- target: item(element),
6642
- elements: element.children,
6643
- componentsProps
6644
- }, `navigation-menu-${i}`))
6645
+ /* @__PURE__ */ jsx_runtime15.jsxs(Menu.Dropdown, {
6646
+ children: [
6647
+ label !== undefined && /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Label, {
6648
+ children: label
6649
+ }),
6650
+ elements.map((element, i) => /* @__PURE__ */ jsx_runtime15.jsx(NavigationMenu, {
6651
+ target: element,
6652
+ elements: element.children,
6653
+ componentsProps
6654
+ }, `navigation-menu-${i}`))
6655
+ ]
6656
+ })
6645
6657
  ]
6646
- })
6647
- ]
6658
+ });
6659
+ }
6648
6660
  });
6649
6661
  }
6650
6662
 
@@ -294,7 +294,7 @@ interface RemoraidProviderProps {
294
294
  };
295
295
  }
296
296
  declare function RemoraidProvider({ children, theme, initialUserExperience, router, componentsProps }: PropsWithChildren7<RemoraidProviderProps>): ReactNode7;
297
- import { BoxProps as BoxProps2 } from "@mantine/core";
297
+ import { BoxProps as BoxProps3 } from "@mantine/core";
298
298
  import { ComponentProps as ComponentProps7, PropsWithChildren as PropsWithChildren13, ReactNode as ReactNode22 } from "react";
299
299
  import { PropsWithChildren as PropsWithChildren8, ReactNode as ReactNode8 } from "react";
300
300
  import { SetOptional } from "type-fest";
@@ -307,7 +307,7 @@ declare function AppProvider2<V extends CustomAppVariables>({ appContext: appCon
307
307
  import { ComponentProps as ComponentProps4, ReactNode as ReactNode18 } from "react";
308
308
  import { ReactNode as ReactNode17 } from "react";
309
309
  import { MantineBreakpoint as MantineBreakpoint3, PaperProps } from "@mantine/core";
310
- import { MenuProps, TransitionProps as TransitionProps2 } from "@mantine/core";
310
+ import { BoxProps, MenuProps, MenuSubProps, TransitionProps as TransitionProps2 } from "@mantine/core";
311
311
  import { ReactElement as ReactElement2 } from "react";
312
312
  interface NavigationMenuProps {
313
313
  target: ReactElement2 | NavigationElement;
@@ -315,7 +315,9 @@ interface NavigationMenuProps {
315
315
  label?: string;
316
316
  componentsProps?: {
317
317
  transition?: Partial<TransitionProps2>
318
+ rootTargetContainer?: Partial<BoxProps>
318
319
  Menu?: Partial<MenuProps>
320
+ MenuSub?: Partial<MenuSubProps>
319
321
  };
320
322
  }
321
323
  import { ActionIconProps, ActionIconVariant, ButtonProps, ButtonVariant, MantineBreakpoint as MantineBreakpoint2, MantineColor, MantineSize as MantineSize3, TooltipProps, TransitionProps as TransitionProps3 } from "@mantine/core";
@@ -414,7 +416,7 @@ interface PageContainerProps {
414
416
  }
415
417
  declare function PageContainer2({ children, p, hidden, componentsProps }: PropsWithChildren9<PageContainerProps>): ReactNode12;
416
418
  import { PropsWithChildren as PropsWithChildren10, ReactNode as ReactNode13 } from "react";
417
- import { BoxProps } from "@mantine/core";
419
+ import { BoxProps as BoxProps2 } from "@mantine/core";
418
420
  declare const useFrameLayoutElement: () => LayoutElementContext<LayoutType.Frame> | null;
419
421
  interface FrameLayoutElementProps {
420
422
  section: FrameLayoutSection;
@@ -423,7 +425,7 @@ interface FrameLayoutElementProps {
423
425
  layoutId?: string;
424
426
  hidden?: boolean;
425
427
  componentsProps?: {
426
- container?: Partial<BoxProps>
428
+ container?: Partial<BoxProps2>
427
429
  PageContainer?: Partial<PageContainerProps>
428
430
  };
429
431
  }
@@ -564,7 +566,7 @@ interface AppShellProps<V extends CustomAppVariables> {
564
566
  initialUserExperience?: UserExperienceProviderProps<AppShellUserExperience>["initialValue"];
565
567
  gutter?: FrameLayoutProps["gutter"];
566
568
  componentsProps?: {
567
- container?: Partial<BoxProps2>
569
+ container?: Partial<BoxProps3>
568
570
  layout?: Partial<FrameLayoutProps>
569
571
  navbar?: Partial<NavbarProps>
570
572
  footer?: Partial<FooterProps>
@@ -821,7 +823,7 @@ declare function ContextClusterProvider<
821
823
  Context,
822
824
  StaticID extends string = never
823
825
  >({ cluster, values, children }: PropsWithChildren25<ContextClusterProviderProps<Context, StaticID>>): ReactNode41;
824
- import { BoxProps as BoxProps3, InputWrapperProps, ScrollAreaProps as ScrollAreaProps3 } from "@mantine/core";
826
+ import { BoxProps as BoxProps4, InputWrapperProps, ScrollAreaProps as ScrollAreaProps3 } from "@mantine/core";
825
827
  import { PropsWithChildren as PropsWithChildren26, ReactNode as ReactNode42 } from "react";
826
828
  interface InputWrapperScrollAreaProps {
827
829
  label?: string;
@@ -832,7 +834,7 @@ interface InputWrapperScrollAreaProps {
832
834
  componentsProps?: {
833
835
  container?: Partial<InputWrapperProps>
834
836
  ScrollArea?: Partial<ScrollAreaProps3>
835
- childrenContainer?: Partial<BoxProps3>
837
+ childrenContainer?: Partial<BoxProps4>
836
838
  };
837
839
  }
838
840
  declare function InputWrapperScrollArea({ children, label, mah, description, error, required, componentsProps }: PropsWithChildren26<InputWrapperScrollAreaProps>): ReactNode42;
@@ -6451,7 +6451,7 @@ function FooterMinimal({
6451
6451
  ...componentsProps?.container,
6452
6452
  children: /* @__PURE__ */ jsx13(Center, {
6453
6453
  children: /* @__PURE__ */ jsx13(Icon2, {
6454
- color: "var(--mantine-color-default-border)",
6454
+ color: "var(--mantine-color-disabled)",
6455
6455
  ...theme.componentsProps.icons.huge,
6456
6456
  ...componentsProps?.icon
6457
6457
  })
@@ -6513,7 +6513,7 @@ var import_lodash8 = __toESM(require_lodash(), 1);
6513
6513
  // src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
6514
6514
  import {
6515
6515
  Box as Box2,
6516
- Menu,
6516
+ Menu as MantineMenu,
6517
6517
  Transition,
6518
6518
  useMantineTheme as useMantineTheme2
6519
6519
  } from "@mantine/core";
@@ -6529,10 +6529,10 @@ function NavigationMenu({
6529
6529
  const mantineTheme = useMantineTheme2();
6530
6530
  const router = useRemoraidRouter();
6531
6531
  const { pathname } = router;
6532
- const item = (element) => /* @__PURE__ */ jsx15(Transition, {
6533
- mounted: element.mounted ?? true,
6534
- ...componentsProps?.transition,
6535
- children: (transitionStyle) => /* @__PURE__ */ jsx15(Menu.Item, {
6532
+ const item = (element, style) => {
6533
+ const isLeaf2 = element.children === undefined || element.children.length === 0;
6534
+ const Menu2 = isLeaf2 ? MantineMenu : MantineMenu.Sub;
6535
+ return /* @__PURE__ */ jsx15(Menu2.Item, {
6536
6536
  leftSection: element.icon ? /* @__PURE__ */ jsx15(element.icon, {
6537
6537
  ...theme.componentsProps.icons.small
6538
6538
  }) : undefined,
@@ -6545,36 +6545,48 @@ function NavigationMenu({
6545
6545
  element.onClick(e);
6546
6546
  }
6547
6547
  },
6548
- style: transitionStyle,
6548
+ style,
6549
6549
  children: element.label
6550
- })
6551
- });
6552
- const targetElement = isValidElement2(target) ? target : item(target);
6553
- if (elements === undefined || elements.length === 0) {
6554
- return targetElement;
6555
- }
6556
- return /* @__PURE__ */ jsxs2(Menu, {
6557
- trigger: "click-hover",
6558
- ...componentsProps?.Menu,
6559
- children: [
6560
- /* @__PURE__ */ jsx15(Menu.Target, {
6561
- children: /* @__PURE__ */ jsx15(Box2, {
6562
- children: targetElement
6563
- })
6564
- }),
6565
- /* @__PURE__ */ jsxs2(Menu.Dropdown, {
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,
6566
6568
  children: [
6567
- label !== undefined && /* @__PURE__ */ jsx15(Menu.Label, {
6568
- children: label
6569
+ /* @__PURE__ */ jsx15(Menu.Target, {
6570
+ children: isRoot ? /* @__PURE__ */ jsx15(Box2, {
6571
+ ...componentsProps?.rootTargetContainer,
6572
+ children: target
6573
+ }) : item(target, transitionStyle)
6569
6574
  }),
6570
- elements.map((element, i) => /* @__PURE__ */ jsx15(NavigationMenu, {
6571
- target: item(element),
6572
- elements: element.children,
6573
- componentsProps
6574
- }, `navigation-menu-${i}`))
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
+ })
6575
6587
  ]
6576
- })
6577
- ]
6588
+ });
6589
+ }
6578
6590
  });
6579
6591
  }
6580
6592
 
@@ -7378,7 +7390,7 @@ import {
7378
7390
  Chip as Chip2,
7379
7391
  Divider,
7380
7392
  Flex as Flex2,
7381
- Menu as Menu2,
7393
+ Menu,
7382
7394
  Text,
7383
7395
  useMantineTheme as useMantineTheme3
7384
7396
  } from "@mantine/core";
@@ -7540,11 +7552,11 @@ function WidgetSelectionHeader({
7540
7552
  if (!widget) {
7541
7553
  return;
7542
7554
  }
7543
- return /* @__PURE__ */ jsxs8(Menu2, {
7555
+ return /* @__PURE__ */ jsxs8(Menu, {
7544
7556
  trigger: "hover",
7545
7557
  ...componentsProps?.widgetMenu,
7546
7558
  children: [
7547
- /* @__PURE__ */ jsx27(Menu2.Target, {
7559
+ /* @__PURE__ */ jsx27(Menu.Target, {
7548
7560
  children: /* @__PURE__ */ jsx27(Box6, {
7549
7561
  children: /* @__PURE__ */ jsx27(Chip2, {
7550
7562
  variant: selectedWidgets.includes(widgetId) ? "filled" : "outline",
@@ -7566,9 +7578,9 @@ function WidgetSelectionHeader({
7566
7578
  })
7567
7579
  })
7568
7580
  }),
7569
- /* @__PURE__ */ jsxs8(Menu2.Dropdown, {
7581
+ /* @__PURE__ */ jsxs8(Menu.Dropdown, {
7570
7582
  children: [
7571
- /* @__PURE__ */ jsx27(Menu2.Item, {
7583
+ /* @__PURE__ */ jsx27(Menu.Item, {
7572
7584
  leftSection: /* @__PURE__ */ jsx27(IconNavigation, {
7573
7585
  ...theme.componentsProps.icons.small
7574
7586
  }),
@@ -7579,7 +7591,7 @@ function WidgetSelectionHeader({
7579
7591
  disabled: !widget.selected,
7580
7592
  children: "Scroll to widget"
7581
7593
  }),
7582
- /* @__PURE__ */ jsx27(Menu2.Item, {
7594
+ /* @__PURE__ */ jsx27(Menu.Item, {
7583
7595
  leftSection: /* @__PURE__ */ jsx27(IconFocus, {
7584
7596
  ...theme.componentsProps.icons.small
7585
7597
  }),
@@ -6048,7 +6048,7 @@ function FooterMinimal({
6048
6048
  ...componentsProps?.container,
6049
6049
  children: /* @__PURE__ */ jsx_runtime13.jsx(import_core6.Center, {
6050
6050
  children: /* @__PURE__ */ jsx_runtime13.jsx(Icon2, {
6051
- color: "var(--mantine-color-default-border)",
6051
+ color: "var(--mantine-color-disabled)",
6052
6052
  ...theme.componentsProps.icons.huge,
6053
6053
  ...componentsProps?.icon
6054
6054
  })
@@ -6115,10 +6115,10 @@ function NavigationMenu({
6115
6115
  const mantineTheme = import_core7.useMantineTheme();
6116
6116
  const router = useRemoraidRouter();
6117
6117
  const { pathname } = router;
6118
- const item = (element) => /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Transition, {
6119
- mounted: element.mounted ?? true,
6120
- ...componentsProps?.transition,
6121
- children: (transitionStyle) => /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Item, {
6118
+ const item = (element, style) => {
6119
+ const isLeaf2 = element.children === undefined || element.children.length === 0;
6120
+ const Menu2 = isLeaf2 ? import_core7.Menu : import_core7.Menu.Sub;
6121
+ return /* @__PURE__ */ jsx_runtime15.jsx(Menu2.Item, {
6122
6122
  leftSection: element.icon ? /* @__PURE__ */ jsx_runtime15.jsx(element.icon, {
6123
6123
  ...theme.componentsProps.icons.small
6124
6124
  }) : undefined,
@@ -6131,36 +6131,48 @@ function NavigationMenu({
6131
6131
  element.onClick(e);
6132
6132
  }
6133
6133
  },
6134
- style: transitionStyle,
6134
+ style,
6135
6135
  children: element.label
6136
- })
6137
- });
6138
- const targetElement = import_react12.isValidElement(target) ? target : item(target);
6139
- if (elements === undefined || elements.length === 0) {
6140
- return targetElement;
6141
- }
6142
- return /* @__PURE__ */ jsx_runtime15.jsxs(import_core7.Menu, {
6143
- trigger: "click-hover",
6144
- ...componentsProps?.Menu,
6145
- children: [
6146
- /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Target, {
6147
- children: /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Box, {
6148
- children: targetElement
6149
- })
6150
- }),
6151
- /* @__PURE__ */ jsx_runtime15.jsxs(import_core7.Menu.Dropdown, {
6136
+ });
6137
+ };
6138
+ const isRoot = import_react12.isValidElement(target);
6139
+ const isLeaf = elements === undefined || elements.length === 0;
6140
+ const Menu = isRoot ? import_core7.Menu : import_core7.Menu.Sub;
6141
+ const menuProps = isRoot ? { trigger: "click-hover", ...componentsProps?.Menu } : { ...componentsProps?.MenuSub };
6142
+ return /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Transition, {
6143
+ mounted: isRoot ? true : target.mounted ?? true,
6144
+ ...componentsProps?.transition,
6145
+ children: (transitionStyle) => {
6146
+ if (isLeaf) {
6147
+ if (isRoot) {
6148
+ return target;
6149
+ }
6150
+ return item(target, transitionStyle);
6151
+ }
6152
+ return /* @__PURE__ */ jsx_runtime15.jsxs(Menu, {
6153
+ ...menuProps,
6152
6154
  children: [
6153
- label !== undefined && /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Label, {
6154
- children: label
6155
+ /* @__PURE__ */ jsx_runtime15.jsx(Menu.Target, {
6156
+ children: isRoot ? /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Box, {
6157
+ ...componentsProps?.rootTargetContainer,
6158
+ children: target
6159
+ }) : item(target, transitionStyle)
6155
6160
  }),
6156
- elements.map((element, i) => /* @__PURE__ */ jsx_runtime15.jsx(NavigationMenu, {
6157
- target: item(element),
6158
- elements: element.children,
6159
- componentsProps
6160
- }, `navigation-menu-${i}`))
6161
+ /* @__PURE__ */ jsx_runtime15.jsxs(Menu.Dropdown, {
6162
+ children: [
6163
+ label !== undefined && /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Label, {
6164
+ children: label
6165
+ }),
6166
+ elements.map((element, i) => /* @__PURE__ */ jsx_runtime15.jsx(NavigationMenu, {
6167
+ target: element,
6168
+ elements: element.children,
6169
+ componentsProps
6170
+ }, `navigation-menu-${i}`))
6171
+ ]
6172
+ })
6161
6173
  ]
6162
- })
6163
- ]
6174
+ });
6175
+ }
6164
6176
  });
6165
6177
  }
6166
6178
 
@@ -8301,6 +8313,7 @@ var TextControl_default = TextControl;
8301
8313
  // src/jsonforms/renderers/TimestampControl.tsx
8302
8314
  var import_react40 = require("@jsonforms/react");
8303
8315
  var import_dates = require("@mantine/dates");
8316
+ var import_dayjs = __toESM(require("dayjs"));
8304
8317
  var jsx_runtime52 = require("react/jsx-runtime");
8305
8318
  function PlainTimestampControl2({
8306
8319
  data,
@@ -8314,15 +8327,14 @@ function PlainTimestampControl2({
8314
8327
  formOptions: { withDescriptions }
8315
8328
  } = useFormOptions();
8316
8329
  return /* @__PURE__ */ jsx_runtime52.jsx(jsx_runtime52.Fragment, {
8317
- children: /* @__PURE__ */ jsx_runtime52.jsx(import_dates.DatePickerInput, {
8330
+ children: /* @__PURE__ */ jsx_runtime52.jsx(import_dates.DateTimePicker, {
8318
8331
  variant: "default",
8319
8332
  label,
8320
- placeholder: "Pick a date",
8321
- value: new Date(data * 1000),
8333
+ placeholder: "Pick date and time",
8334
+ value: data === null || data === undefined ? data : import_dates.toDateTimeString(new Date(data * 1000)),
8335
+ withSeconds: true,
8322
8336
  onChange: (newValue) => {
8323
- if (newValue) {
8324
- handleChange(path, newValue.getTime() / 1000);
8325
- }
8337
+ handleChange(path, newValue === null || newValue === undefined ? newValue : import_dayjs.default(newValue).toDate().getTime() / 1000);
8326
8338
  },
8327
8339
  required,
8328
8340
  description: withDescriptions ? schema.description || null : null
@@ -6049,7 +6049,7 @@ function FooterMinimal({
6049
6049
  ...componentsProps?.container,
6050
6050
  children: /* @__PURE__ */ jsx13(Center, {
6051
6051
  children: /* @__PURE__ */ jsx13(Icon2, {
6052
- color: "var(--mantine-color-default-border)",
6052
+ color: "var(--mantine-color-disabled)",
6053
6053
  ...theme.componentsProps.icons.huge,
6054
6054
  ...componentsProps?.icon
6055
6055
  })
@@ -6111,7 +6111,7 @@ var import_lodash8 = __toESM(require_lodash(), 1);
6111
6111
  // src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
6112
6112
  import {
6113
6113
  Box as Box2,
6114
- Menu,
6114
+ Menu as MantineMenu,
6115
6115
  Transition,
6116
6116
  useMantineTheme as useMantineTheme2
6117
6117
  } from "@mantine/core";
@@ -6127,10 +6127,10 @@ function NavigationMenu({
6127
6127
  const mantineTheme = useMantineTheme2();
6128
6128
  const router = useRemoraidRouter();
6129
6129
  const { pathname } = router;
6130
- const item = (element) => /* @__PURE__ */ jsx15(Transition, {
6131
- mounted: element.mounted ?? true,
6132
- ...componentsProps?.transition,
6133
- children: (transitionStyle) => /* @__PURE__ */ jsx15(Menu.Item, {
6130
+ const item = (element, style) => {
6131
+ const isLeaf2 = element.children === undefined || element.children.length === 0;
6132
+ const Menu2 = isLeaf2 ? MantineMenu : MantineMenu.Sub;
6133
+ return /* @__PURE__ */ jsx15(Menu2.Item, {
6134
6134
  leftSection: element.icon ? /* @__PURE__ */ jsx15(element.icon, {
6135
6135
  ...theme.componentsProps.icons.small
6136
6136
  }) : undefined,
@@ -6143,36 +6143,48 @@ function NavigationMenu({
6143
6143
  element.onClick(e);
6144
6144
  }
6145
6145
  },
6146
- style: transitionStyle,
6146
+ style,
6147
6147
  children: element.label
6148
- })
6149
- });
6150
- const targetElement = isValidElement2(target) ? target : item(target);
6151
- if (elements === undefined || elements.length === 0) {
6152
- return targetElement;
6153
- }
6154
- return /* @__PURE__ */ jsxs2(Menu, {
6155
- trigger: "click-hover",
6156
- ...componentsProps?.Menu,
6157
- children: [
6158
- /* @__PURE__ */ jsx15(Menu.Target, {
6159
- children: /* @__PURE__ */ jsx15(Box2, {
6160
- children: targetElement
6161
- })
6162
- }),
6163
- /* @__PURE__ */ jsxs2(Menu.Dropdown, {
6148
+ });
6149
+ };
6150
+ const isRoot = isValidElement2(target);
6151
+ const isLeaf = elements === undefined || elements.length === 0;
6152
+ const Menu = isRoot ? MantineMenu : MantineMenu.Sub;
6153
+ const menuProps = isRoot ? { trigger: "click-hover", ...componentsProps?.Menu } : { ...componentsProps?.MenuSub };
6154
+ return /* @__PURE__ */ jsx15(Transition, {
6155
+ mounted: isRoot ? true : target.mounted ?? true,
6156
+ ...componentsProps?.transition,
6157
+ children: (transitionStyle) => {
6158
+ if (isLeaf) {
6159
+ if (isRoot) {
6160
+ return target;
6161
+ }
6162
+ return item(target, transitionStyle);
6163
+ }
6164
+ return /* @__PURE__ */ jsxs2(Menu, {
6165
+ ...menuProps,
6164
6166
  children: [
6165
- label !== undefined && /* @__PURE__ */ jsx15(Menu.Label, {
6166
- children: label
6167
+ /* @__PURE__ */ jsx15(Menu.Target, {
6168
+ children: isRoot ? /* @__PURE__ */ jsx15(Box2, {
6169
+ ...componentsProps?.rootTargetContainer,
6170
+ children: target
6171
+ }) : item(target, transitionStyle)
6167
6172
  }),
6168
- elements.map((element, i) => /* @__PURE__ */ jsx15(NavigationMenu, {
6169
- target: item(element),
6170
- elements: element.children,
6171
- componentsProps
6172
- }, `navigation-menu-${i}`))
6173
+ /* @__PURE__ */ jsxs2(Menu.Dropdown, {
6174
+ children: [
6175
+ label !== undefined && /* @__PURE__ */ jsx15(MantineMenu.Label, {
6176
+ children: label
6177
+ }),
6178
+ elements.map((element, i) => /* @__PURE__ */ jsx15(NavigationMenu, {
6179
+ target: element,
6180
+ elements: element.children,
6181
+ componentsProps
6182
+ }, `navigation-menu-${i}`))
6183
+ ]
6184
+ })
6173
6185
  ]
6174
- })
6175
- ]
6186
+ });
6187
+ }
6176
6188
  });
6177
6189
  }
6178
6190
 
@@ -6976,7 +6988,7 @@ import {
6976
6988
  Chip as Chip2,
6977
6989
  Divider,
6978
6990
  Flex as Flex2,
6979
- Menu as Menu2,
6991
+ Menu,
6980
6992
  Text,
6981
6993
  useMantineTheme as useMantineTheme3
6982
6994
  } from "@mantine/core";
@@ -8460,7 +8472,8 @@ var TextControl_default = TextControl;
8460
8472
 
8461
8473
  // src/jsonforms/renderers/TimestampControl.tsx
8462
8474
  import { withJsonFormsControlProps as withJsonFormsControlProps9 } from "@jsonforms/react";
8463
- import { DatePickerInput } from "@mantine/dates";
8475
+ import { DateTimePicker, toDateTimeString } from "@mantine/dates";
8476
+ import dayjs from "dayjs";
8464
8477
  import { jsx as jsx52, Fragment as Fragment10 } from "react/jsx-runtime";
8465
8478
  function PlainTimestampControl2({
8466
8479
  data,
@@ -8474,15 +8487,14 @@ function PlainTimestampControl2({
8474
8487
  formOptions: { withDescriptions }
8475
8488
  } = useFormOptions();
8476
8489
  return /* @__PURE__ */ jsx52(Fragment10, {
8477
- children: /* @__PURE__ */ jsx52(DatePickerInput, {
8490
+ children: /* @__PURE__ */ jsx52(DateTimePicker, {
8478
8491
  variant: "default",
8479
8492
  label,
8480
- placeholder: "Pick a date",
8481
- value: new Date(data * 1000),
8493
+ placeholder: "Pick date and time",
8494
+ value: data === null || data === undefined ? data : toDateTimeString(new Date(data * 1000)),
8495
+ withSeconds: true,
8482
8496
  onChange: (newValue) => {
8483
- if (newValue) {
8484
- handleChange(path, newValue.getTime() / 1000);
8485
- }
8497
+ handleChange(path, newValue === null || newValue === undefined ? newValue : dayjs(newValue).toDate().getTime() / 1000);
8486
8498
  },
8487
8499
  required,
8488
8500
  description: withDescriptions ? schema.description || null : null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remoraid",
3
- "version": "2.45.0",
3
+ "version": "3.1.1",
4
4
  "author": "Konrad Goldammer",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,32 +8,48 @@
8
8
  },
9
9
  "main": "./dist/index.cjs",
10
10
  "module": "./dist/index.js",
11
+ "dependencies": {
12
+ "clsx": "^2.1.1",
13
+ "lodash": "^4.17.21",
14
+ "type-fest": "^4.41.0"
15
+ },
11
16
  "devDependencies": {
12
- "@types/bun": "^1.1.10",
17
+ "@jsonforms/core": "^3.5.1",
18
+ "@jsonforms/react": "^3.5.1",
19
+ "@jsonforms/vanilla-renderers": "^3.5.1",
20
+ "@mantine/core": "^9.1.1",
21
+ "@mantine/dates": "^9.1.1",
22
+ "@mantine/hooks": "^9.1.1",
23
+ "@mantine/modals": "^9.1.1",
24
+ "@tabler/icons-react": "^3.42.0",
25
+ "@types/bun": "^1.3.13",
13
26
  "@types/css-modules": "^1.0.5",
14
27
  "@types/lodash": "^4.17.17",
15
- "@types/react": "^19.1.2",
16
- "@types/react-dom": "^19.1.6",
28
+ "@types/react": "^19.2.14",
29
+ "@types/react-dom": "^19.2.3",
17
30
  "bun-dts": "^0.1.22",
18
- "next": "16.0.3",
19
- "react": "^19.1.0",
31
+ "dayjs": "^1.11.0",
32
+ "next": "^16.0.3",
33
+ "react": "^19.2.0",
20
34
  "react-cookie": "^8.0.1",
21
- "react-router-dom": "^7.12.0"
35
+ "react-dom": "^19.2.0",
36
+ "react-router-dom": "^7.14.2"
22
37
  },
23
38
  "peerDependencies": {
24
- "react": "^19.1.0",
25
- "react-dom": "^19.1.0",
26
- "react-cookie": "^8.0.1",
27
- "next": "16.0.3",
28
- "react-router-dom": "^7.12.0",
29
- "@mantine/core": "^7.17.4",
30
- "@mantine/hooks": "^7.17.4",
31
- "@mantine/dates": "7.17.4",
32
- "@mantine/modals": "7.17.4",
33
- "@tabler/icons-react": "^3.31.0",
34
39
  "@jsonforms/core": "^3.5.1",
35
40
  "@jsonforms/react": "^3.5.1",
36
- "@jsonforms/vanilla-renderers": "^3.5.1"
41
+ "@jsonforms/vanilla-renderers": "^3.5.1",
42
+ "@mantine/core": "^9.1.1",
43
+ "@mantine/dates": "^9.1.1",
44
+ "@mantine/hooks": "^9.1.1",
45
+ "@mantine/modals": "^9.1.1",
46
+ "@tabler/icons-react": "^3.42.0",
47
+ "dayjs": "^1.11.0",
48
+ "next": "^16.0.3",
49
+ "react": "^19.2.0",
50
+ "react-cookie": "^8.0.1",
51
+ "react-dom": "^19.2.0",
52
+ "react-router-dom": "^7.14.2"
37
53
  },
38
54
  "peerDependenciesMeta": {
39
55
  "next": {
@@ -93,10 +109,5 @@
93
109
  "build": "bun run build.ts",
94
110
  "prepublishOnly": "bun run build"
95
111
  },
96
- "type": "module",
97
- "dependencies": {
98
- "clsx": "^2.1.1",
99
- "lodash": "^4.17.21",
100
- "type-fest": "^4.41.0"
101
- }
112
+ "type": "module"
102
113
  }