remoraid 2.45.0 → 3.3.2
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 +22 -3
- package/dist/core/index.cjs +113 -67
- package/dist/core/index.d.ts +19 -17
- package/dist/core/index.js +127 -79
- 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 +155 -2287
- package/dist/jsonforms/index.js +104 -2352
- package/package.json +54 -24
package/README.md
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
# Usage
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Import Mantine and Remoraid styles once at the root of your application.
|
|
4
|
+
Some subpackages require additional Mantine stylesheets:
|
|
5
|
+
|
|
6
|
+
- `@mantine/dates/styles.css` when using `remoraid/jsonforms`
|
|
7
|
+
- `@mantine/charts/styles.css` when using `remoraid/data-visualization`
|
|
4
8
|
|
|
5
9
|
```typescript
|
|
6
|
-
import
|
|
10
|
+
import "@mantine/core/styles.css";
|
|
11
|
+
import "@mantine/dates/styles.css";
|
|
12
|
+
import "@mantine/charts/styles.css";
|
|
13
|
+
import "remoraid/core/styles.css";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`RemoraidProvider` must be rendered inside `MantineProvider` at the root of
|
|
17
|
+
your application and should be used only once.
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import { MantineProvider } from "@mantine/core";
|
|
21
|
+
import { RemoraidProvider } from "remoraid/core";
|
|
7
22
|
|
|
8
23
|
function Demo() {
|
|
9
|
-
return
|
|
24
|
+
return (
|
|
25
|
+
<MantineProvider>
|
|
26
|
+
<RemoraidProvider>{/* Your app here */}</RemoraidProvider>
|
|
27
|
+
</MantineProvider>
|
|
28
|
+
);
|
|
10
29
|
}
|
|
11
30
|
```
|
|
12
31
|
|
package/dist/core/index.cjs
CHANGED
|
@@ -5967,6 +5967,18 @@ var createRemoraidTheme = (customTheme, dependencies) => {
|
|
|
5967
5967
|
["medium" /* Medium */]: { size: 24, stroke: 1.7 },
|
|
5968
5968
|
["large" /* Large */]: { size: 28, stroke: 1.7 },
|
|
5969
5969
|
["huge" /* Huge */]: { size: 44, stroke: 1.7 }
|
|
5970
|
+
},
|
|
5971
|
+
Scroller: {
|
|
5972
|
+
edgeGradientColor: "transparent",
|
|
5973
|
+
className: "remoraid-masked-scroller",
|
|
5974
|
+
startControlIcon: /* @__PURE__ */ jsx_runtime3.jsx(import_icons_react.IconArrowLeft, {
|
|
5975
|
+
size: "var(--remoraid-icon-size-extraSmall)",
|
|
5976
|
+
stroke: "var(--remoraid-icon-stroke-extraSmall)"
|
|
5977
|
+
}),
|
|
5978
|
+
endControlIcon: /* @__PURE__ */ jsx_runtime3.jsx(import_icons_react.IconArrowRight, {
|
|
5979
|
+
size: "var(--remoraid-icon-size-extraSmall)",
|
|
5980
|
+
stroke: "var(--remoraid-icon-stroke-extraSmall)"
|
|
5981
|
+
})
|
|
5970
5982
|
}
|
|
5971
5983
|
}
|
|
5972
5984
|
};
|
|
@@ -5978,7 +5990,8 @@ var getCssVars = (theme) => {
|
|
|
5978
5990
|
transitionDurations,
|
|
5979
5991
|
primaryGutter,
|
|
5980
5992
|
containerSize,
|
|
5981
|
-
transparentBackground
|
|
5993
|
+
transparentBackground,
|
|
5994
|
+
componentsProps: { icons }
|
|
5982
5995
|
} = theme;
|
|
5983
5996
|
return {
|
|
5984
5997
|
"--mantine-color-body": bodyColor,
|
|
@@ -5990,6 +6003,11 @@ var getCssVars = (theme) => {
|
|
|
5990
6003
|
...Object.entries(transitionDurations).reduce((t, [key, value]) => ({
|
|
5991
6004
|
...t,
|
|
5992
6005
|
[`--remoraid-transition-duration-${key}`]: `${value}ms`
|
|
6006
|
+
}), {}),
|
|
6007
|
+
...Object.entries(icons).reduce((t, [key, { size, stroke }]) => ({
|
|
6008
|
+
...t,
|
|
6009
|
+
[`--remoraid-icon-size-${key}`]: typeof size === "number" ? `${size}px` : size,
|
|
6010
|
+
[`--remoraid-icon-stroke-${key}`]: `${stroke}`
|
|
5993
6011
|
}), {})
|
|
5994
6012
|
};
|
|
5995
6013
|
};
|
|
@@ -6532,7 +6550,7 @@ function FooterMinimal({
|
|
|
6532
6550
|
...componentsProps?.container,
|
|
6533
6551
|
children: /* @__PURE__ */ jsx_runtime13.jsx(import_core6.Center, {
|
|
6534
6552
|
children: /* @__PURE__ */ jsx_runtime13.jsx(Icon2, {
|
|
6535
|
-
color: "var(--mantine-color-
|
|
6553
|
+
color: "var(--mantine-color-disabled)",
|
|
6536
6554
|
...theme.componentsProps.icons.huge,
|
|
6537
6555
|
...componentsProps?.icon
|
|
6538
6556
|
})
|
|
@@ -6599,10 +6617,10 @@ function NavigationMenu({
|
|
|
6599
6617
|
const mantineTheme = import_core7.useMantineTheme();
|
|
6600
6618
|
const router = useRemoraidRouter();
|
|
6601
6619
|
const { pathname } = router;
|
|
6602
|
-
const item = (element) =>
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6620
|
+
const item = (element, style) => {
|
|
6621
|
+
const isLeaf2 = element.children === undefined || element.children.length === 0;
|
|
6622
|
+
const Menu2 = isLeaf2 ? import_core7.Menu : import_core7.Menu.Sub;
|
|
6623
|
+
return /* @__PURE__ */ jsx_runtime15.jsx(Menu2.Item, {
|
|
6606
6624
|
leftSection: element.icon ? /* @__PURE__ */ jsx_runtime15.jsx(element.icon, {
|
|
6607
6625
|
...theme.componentsProps.icons.small
|
|
6608
6626
|
}) : undefined,
|
|
@@ -6615,36 +6633,48 @@ function NavigationMenu({
|
|
|
6615
6633
|
element.onClick(e);
|
|
6616
6634
|
}
|
|
6617
6635
|
},
|
|
6618
|
-
style
|
|
6636
|
+
style,
|
|
6619
6637
|
children: element.label
|
|
6620
|
-
})
|
|
6621
|
-
}
|
|
6622
|
-
const
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
}
|
|
6626
|
-
return /* @__PURE__ */ jsx_runtime15.
|
|
6627
|
-
|
|
6628
|
-
...componentsProps?.
|
|
6629
|
-
children:
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
}
|
|
6634
|
-
|
|
6635
|
-
|
|
6638
|
+
});
|
|
6639
|
+
};
|
|
6640
|
+
const isRoot = import_react12.isValidElement(target);
|
|
6641
|
+
const isLeaf = elements === undefined || elements.length === 0;
|
|
6642
|
+
const Menu = isRoot ? import_core7.Menu : import_core7.Menu.Sub;
|
|
6643
|
+
const menuProps = isRoot ? { trigger: "click-hover", ...componentsProps?.Menu } : { ...componentsProps?.MenuSub };
|
|
6644
|
+
return /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Transition, {
|
|
6645
|
+
mounted: isRoot ? true : target.mounted ?? true,
|
|
6646
|
+
...componentsProps?.transition,
|
|
6647
|
+
children: (transitionStyle) => {
|
|
6648
|
+
if (isLeaf) {
|
|
6649
|
+
if (isRoot) {
|
|
6650
|
+
return target;
|
|
6651
|
+
}
|
|
6652
|
+
return item(target, transitionStyle);
|
|
6653
|
+
}
|
|
6654
|
+
return /* @__PURE__ */ jsx_runtime15.jsxs(Menu, {
|
|
6655
|
+
...menuProps,
|
|
6636
6656
|
children: [
|
|
6637
|
-
|
|
6638
|
-
children:
|
|
6657
|
+
/* @__PURE__ */ jsx_runtime15.jsx(Menu.Target, {
|
|
6658
|
+
children: isRoot ? /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Box, {
|
|
6659
|
+
...componentsProps?.rootTargetContainer,
|
|
6660
|
+
children: target
|
|
6661
|
+
}) : item(target, transitionStyle)
|
|
6639
6662
|
}),
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6663
|
+
/* @__PURE__ */ jsx_runtime15.jsxs(Menu.Dropdown, {
|
|
6664
|
+
children: [
|
|
6665
|
+
label !== undefined && /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Label, {
|
|
6666
|
+
children: label
|
|
6667
|
+
}),
|
|
6668
|
+
elements.map((element, i) => /* @__PURE__ */ jsx_runtime15.jsx(NavigationMenu, {
|
|
6669
|
+
target: element,
|
|
6670
|
+
elements: element.children,
|
|
6671
|
+
componentsProps
|
|
6672
|
+
}, `navigation-menu-${i}`))
|
|
6673
|
+
]
|
|
6674
|
+
})
|
|
6645
6675
|
]
|
|
6646
|
-
})
|
|
6647
|
-
|
|
6676
|
+
});
|
|
6677
|
+
}
|
|
6648
6678
|
});
|
|
6649
6679
|
}
|
|
6650
6680
|
|
|
@@ -7471,23 +7501,28 @@ var import_react20 = require("react");
|
|
|
7471
7501
|
|
|
7472
7502
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
7473
7503
|
var import_core15 = require("@mantine/core");
|
|
7504
|
+
var import_lodash14 = __toESM(require_lodash());
|
|
7474
7505
|
var jsx_runtime26 = require("react/jsx-runtime");
|
|
7475
7506
|
function ScrollableChipGroup({
|
|
7476
7507
|
value,
|
|
7477
|
-
ref,
|
|
7478
7508
|
onChange,
|
|
7479
7509
|
gap = "xs",
|
|
7480
7510
|
componentsProps,
|
|
7481
7511
|
children
|
|
7482
7512
|
}) {
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
...componentsProps?.
|
|
7486
|
-
|
|
7513
|
+
const theme = useRemoraidTheme();
|
|
7514
|
+
return /* @__PURE__ */ jsx_runtime26.jsx(import_core15.Scroller, {
|
|
7515
|
+
...theme.componentsProps?.Scroller,
|
|
7516
|
+
...componentsProps?.Scroller,
|
|
7517
|
+
className: clsx_default("remoraid-masked-scroller", theme.componentsProps?.Scroller?.className, componentsProps?.Scroller?.className),
|
|
7518
|
+
style: import_lodash14.merge({ contain: "inline-size" }, theme.componentsProps?.Scroller?.style, componentsProps?.Scroller?.style),
|
|
7519
|
+
attributes: import_lodash14.merge({
|
|
7520
|
+
container: { "data-remoraid-scroller-container": true }
|
|
7521
|
+
}, theme.componentsProps?.Scroller?.attributes, componentsProps?.Scroller?.attributes),
|
|
7487
7522
|
children: /* @__PURE__ */ jsx_runtime26.jsx(import_core15.Chip.Group, {
|
|
7488
7523
|
value,
|
|
7489
7524
|
onChange,
|
|
7490
|
-
...componentsProps?.
|
|
7525
|
+
...componentsProps?.ChipGroup,
|
|
7491
7526
|
multiple: true,
|
|
7492
7527
|
children: /* @__PURE__ */ jsx_runtime26.jsx(import_core15.Flex, {
|
|
7493
7528
|
justify: "flex-start",
|
|
@@ -7502,12 +7537,12 @@ function ScrollableChipGroup({
|
|
|
7502
7537
|
}
|
|
7503
7538
|
|
|
7504
7539
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
7505
|
-
var
|
|
7540
|
+
var import_lodash15 = __toESM(require_lodash());
|
|
7506
7541
|
var jsx_runtime27 = require("react/jsx-runtime");
|
|
7507
7542
|
function WidgetSelectionHeader({
|
|
7508
7543
|
title,
|
|
7509
7544
|
pinnableSection = "top" /* Top */,
|
|
7510
|
-
initiallyPinned
|
|
7545
|
+
initiallyPinned: initiallyPinnedProp,
|
|
7511
7546
|
disabledWidgets,
|
|
7512
7547
|
componentsProps
|
|
7513
7548
|
}) {
|
|
@@ -7523,6 +7558,7 @@ function WidgetSelectionHeader({
|
|
|
7523
7558
|
if (!page) {
|
|
7524
7559
|
throw new InvalidComponentUsageError("WidgetSelectionHeader", "must be used as child of 'Page'.");
|
|
7525
7560
|
}
|
|
7561
|
+
const initiallyPinned = pinnableSection ? initiallyPinnedProp ?? true : false;
|
|
7526
7562
|
const [hover, setHover] = import_react20.useState(false);
|
|
7527
7563
|
const [isPinned, setIsPinned] = import_react20.useState(initiallyPinned);
|
|
7528
7564
|
const handleEnter = () => {
|
|
@@ -7531,7 +7567,7 @@ function WidgetSelectionHeader({
|
|
|
7531
7567
|
const handleLeave = () => {
|
|
7532
7568
|
setHover(false);
|
|
7533
7569
|
};
|
|
7534
|
-
const
|
|
7570
|
+
const containerRef = import_react20.useRef(null);
|
|
7535
7571
|
const widgets = widgetsContext2.widgets[page.pageId] ?? {};
|
|
7536
7572
|
const selectedWidgets = Object.entries(widgets).reduce((t, [widgetId, widget]) => widget?.selected ? [...t, widgetId] : t, []);
|
|
7537
7573
|
const element = /* @__PURE__ */ jsx_runtime27.jsxs(import_core16.Flex, {
|
|
@@ -7539,6 +7575,7 @@ function WidgetSelectionHeader({
|
|
|
7539
7575
|
align: "center",
|
|
7540
7576
|
gap: "md",
|
|
7541
7577
|
...componentsProps?.container,
|
|
7578
|
+
ref: containerRef,
|
|
7542
7579
|
onMouseEnter: (e) => {
|
|
7543
7580
|
if (!pinnableSection) {
|
|
7544
7581
|
handleEnter();
|
|
@@ -7549,13 +7586,14 @@ function WidgetSelectionHeader({
|
|
|
7549
7586
|
if (!pinnableSection) {
|
|
7550
7587
|
handleLeave();
|
|
7551
7588
|
}
|
|
7552
|
-
componentsProps?.container?.
|
|
7589
|
+
componentsProps?.container?.onMouseLeave?.(e);
|
|
7553
7590
|
},
|
|
7554
7591
|
className: clsx_default(!pinnableSection ? "remoraid-non-widget-segment" : undefined, !pinnableSection ? "remoraid-segment" : undefined, componentsProps?.container?.className),
|
|
7555
7592
|
children: [
|
|
7556
7593
|
/* @__PURE__ */ jsx_runtime27.jsx(import_core16.Text, {
|
|
7557
7594
|
size: "md",
|
|
7558
7595
|
...componentsProps?.title,
|
|
7596
|
+
style: { whiteSpace: "nowrap", ...componentsProps?.title?.style },
|
|
7559
7597
|
children: title ?? page.name
|
|
7560
7598
|
}),
|
|
7561
7599
|
/* @__PURE__ */ jsx_runtime27.jsx(import_core16.Divider, {
|
|
@@ -7564,13 +7602,17 @@ function WidgetSelectionHeader({
|
|
|
7564
7602
|
}),
|
|
7565
7603
|
isPageRegistered(page.pageId) && /* @__PURE__ */ jsx_runtime27.jsx(ScrollableChipGroup, {
|
|
7566
7604
|
value: selectedWidgets,
|
|
7567
|
-
ref: scrollAreaRef,
|
|
7568
7605
|
...componentsProps?.ScrollableChipGroup,
|
|
7569
7606
|
onChange: (value) => {
|
|
7570
7607
|
updateWidgetSelectionBulk(page.pageId, value);
|
|
7571
7608
|
componentsProps?.ScrollableChipGroup?.onChange?.(value);
|
|
7572
7609
|
},
|
|
7573
|
-
componentsProps:
|
|
7610
|
+
componentsProps: import_lodash15.merge({
|
|
7611
|
+
Scroller: {
|
|
7612
|
+
flex: 1,
|
|
7613
|
+
miw: 0
|
|
7614
|
+
}
|
|
7615
|
+
}, componentsProps?.ScrollableChipGroup?.componentsProps),
|
|
7574
7616
|
children: Object.entries(widgets).map(([widgetId, widget]) => {
|
|
7575
7617
|
if (!widget) {
|
|
7576
7618
|
return;
|
|
@@ -7591,12 +7633,15 @@ function WidgetSelectionHeader({
|
|
|
7591
7633
|
...theme.componentsProps.icons.extraSmall
|
|
7592
7634
|
}),
|
|
7593
7635
|
...componentsProps?.Chip,
|
|
7594
|
-
styles:
|
|
7636
|
+
styles: import_lodash15.merge({
|
|
7595
7637
|
label: {
|
|
7596
7638
|
transition: "background-color var(--remoraid-transition-duration-short)"
|
|
7597
7639
|
}
|
|
7598
7640
|
}, componentsProps?.Chip?.styles),
|
|
7599
|
-
|
|
7641
|
+
wrapperProps: {
|
|
7642
|
+
...componentsProps?.Chip?.wrapperProps,
|
|
7643
|
+
id: `remoraid-widget-selection-header-chip-${widgetId}`
|
|
7644
|
+
},
|
|
7600
7645
|
children: widget.name
|
|
7601
7646
|
})
|
|
7602
7647
|
})
|
|
@@ -7637,19 +7682,20 @@ function WidgetSelectionHeader({
|
|
|
7637
7682
|
if (!activeWidget) {
|
|
7638
7683
|
return;
|
|
7639
7684
|
}
|
|
7640
|
-
if (!
|
|
7685
|
+
if (!containerRef?.current) {
|
|
7641
7686
|
return;
|
|
7642
7687
|
}
|
|
7643
|
-
|
|
7688
|
+
const activeWidgetChipElement = containerRef.current.querySelector(`#remoraid-widget-selection-header-chip-${activeWidget}`);
|
|
7689
|
+
if (!activeWidgetChipElement) {
|
|
7644
7690
|
return;
|
|
7645
7691
|
}
|
|
7646
|
-
const
|
|
7647
|
-
if (!
|
|
7692
|
+
const scrollContainerElement = activeWidgetChipElement.closest("[data-remoraid-scroller-container]");
|
|
7693
|
+
if (!scrollContainerElement) {
|
|
7648
7694
|
return;
|
|
7649
7695
|
}
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7696
|
+
scrollContainerElement.scrollTo({
|
|
7697
|
+
left: activeWidgetChipElement.offsetLeft - scrollContainerElement.clientWidth / 2 + activeWidgetChipElement.clientWidth / 2,
|
|
7698
|
+
behavior: "smooth"
|
|
7653
7699
|
});
|
|
7654
7700
|
}, [activeWidget]);
|
|
7655
7701
|
if (pinnableSection) {
|
|
@@ -7733,7 +7779,7 @@ function BadgeMinimal({
|
|
|
7733
7779
|
}
|
|
7734
7780
|
|
|
7735
7781
|
// src/core/components/BadgeGroup/index.tsx
|
|
7736
|
-
var
|
|
7782
|
+
var import_lodash16 = __toESM(require_lodash());
|
|
7737
7783
|
var jsx_runtime29 = require("react/jsx-runtime");
|
|
7738
7784
|
var react = require("react");
|
|
7739
7785
|
function BadgeGroup({
|
|
@@ -7781,7 +7827,7 @@ function BadgeGroup({
|
|
|
7781
7827
|
...componentsProps?.cumulativeBadge,
|
|
7782
7828
|
style: {
|
|
7783
7829
|
cursor: "pointer",
|
|
7784
|
-
...
|
|
7830
|
+
...import_lodash16.merge(transitionStyle, componentsProps?.cumulativeBadge?.style)
|
|
7785
7831
|
},
|
|
7786
7832
|
children: [
|
|
7787
7833
|
numVisibleBadges,
|
|
@@ -7805,7 +7851,7 @@ function BadgeGroup({
|
|
|
7805
7851
|
}
|
|
7806
7852
|
// src/core/components/AlertMinimal/index.tsx
|
|
7807
7853
|
var import_core19 = require("@mantine/core");
|
|
7808
|
-
var
|
|
7854
|
+
var import_lodash17 = __toESM(require_lodash());
|
|
7809
7855
|
var jsx_runtime30 = require("react/jsx-runtime");
|
|
7810
7856
|
function AlertMinimal({
|
|
7811
7857
|
category,
|
|
@@ -7822,7 +7868,7 @@ function AlertMinimal({
|
|
|
7822
7868
|
icon: Icon4,
|
|
7823
7869
|
iconSize = "small" /* Small */,
|
|
7824
7870
|
componentsProps
|
|
7825
|
-
} =
|
|
7871
|
+
} = import_lodash17.merge({}, theme.componentsProps.alerts[category], props);
|
|
7826
7872
|
return /* @__PURE__ */ jsx_runtime30.jsx(import_core19.Transition, {
|
|
7827
7873
|
mounted,
|
|
7828
7874
|
transition: "fade",
|
|
@@ -7836,10 +7882,10 @@ function AlertMinimal({
|
|
|
7836
7882
|
onClose,
|
|
7837
7883
|
withCloseButton: onClose !== undefined,
|
|
7838
7884
|
icon: Icon4 ? /* @__PURE__ */ jsx_runtime30.jsx(Icon4, {
|
|
7839
|
-
...
|
|
7885
|
+
...import_lodash17.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
7840
7886
|
}) : undefined,
|
|
7841
7887
|
...componentsProps?.alert,
|
|
7842
|
-
style:
|
|
7888
|
+
style: import_lodash17.merge(transitionStyle, componentsProps?.alert?.style),
|
|
7843
7889
|
children: [
|
|
7844
7890
|
text,
|
|
7845
7891
|
children
|
|
@@ -7851,7 +7897,7 @@ function AlertMinimal({
|
|
|
7851
7897
|
var import_core20 = require("@mantine/core");
|
|
7852
7898
|
var import_react22 = require("react");
|
|
7853
7899
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
7854
|
-
var
|
|
7900
|
+
var import_lodash18 = __toESM(require_lodash());
|
|
7855
7901
|
var jsx_runtime31 = require("react/jsx-runtime");
|
|
7856
7902
|
function WidgetWrapper({
|
|
7857
7903
|
config,
|
|
@@ -7922,7 +7968,7 @@ function WidgetWrapper({
|
|
|
7922
7968
|
handleLeave(e);
|
|
7923
7969
|
componentsProps?.container?.onMouseLeave?.(e);
|
|
7924
7970
|
},
|
|
7925
|
-
style:
|
|
7971
|
+
style: import_lodash18.merge(transitionStyle, { flexDirection: "column" }, componentsProps?.container?.style),
|
|
7926
7972
|
className: clsx_default("remoraid-segment", componentsProps?.container?.className),
|
|
7927
7973
|
id: config.widgetId,
|
|
7928
7974
|
children: [
|
|
@@ -7996,7 +8042,7 @@ function WidgetWrapper({
|
|
|
7996
8042
|
// src/core/components/Widget/index.tsx
|
|
7997
8043
|
var import_core21 = require("@mantine/core");
|
|
7998
8044
|
var import_react23 = require("react");
|
|
7999
|
-
var
|
|
8045
|
+
var import_lodash19 = __toESM(require_lodash());
|
|
8000
8046
|
var jsx_runtime32 = require("react/jsx-runtime");
|
|
8001
8047
|
var react2 = require("react");
|
|
8002
8048
|
function Widget({
|
|
@@ -8068,7 +8114,7 @@ function Widget({
|
|
|
8068
8114
|
size: "sm",
|
|
8069
8115
|
c: "dimmed",
|
|
8070
8116
|
...componentsProps?.description,
|
|
8071
|
-
style:
|
|
8117
|
+
style: import_lodash19.merge(transitionStyle, componentsProps?.description?.style),
|
|
8072
8118
|
children: description
|
|
8073
8119
|
})
|
|
8074
8120
|
})
|
|
@@ -8339,7 +8385,7 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
|
8339
8385
|
Row
|
|
8340
8386
|
});
|
|
8341
8387
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
|
8342
|
-
var
|
|
8388
|
+
var import_lodash20 = __toESM(require_lodash());
|
|
8343
8389
|
var import_core25 = require("@mantine/core");
|
|
8344
8390
|
var jsx_runtime39 = require("react/jsx-runtime");
|
|
8345
8391
|
var defaultNavbarSettingsWidgetId = "navbar-settings";
|
|
@@ -8375,7 +8421,7 @@ function NavbarSettingsWidget({
|
|
|
8375
8421
|
navbar: initialUserExperience.navbar
|
|
8376
8422
|
}));
|
|
8377
8423
|
},
|
|
8378
|
-
custom: !
|
|
8424
|
+
custom: !import_lodash20.isEqual(userExperience.navbar, initialUserExperience.navbar),
|
|
8379
8425
|
children: /* @__PURE__ */ jsx_runtime39.jsxs(SettingsTable_default, {
|
|
8380
8426
|
...componentsProps?.table,
|
|
8381
8427
|
children: [
|
|
@@ -8433,7 +8479,7 @@ function NavbarSettingsWidget({
|
|
|
8433
8479
|
});
|
|
8434
8480
|
}
|
|
8435
8481
|
// src/core/components/FooterSettingsWidget/index.tsx
|
|
8436
|
-
var
|
|
8482
|
+
var import_lodash21 = __toESM(require_lodash());
|
|
8437
8483
|
var import_core26 = require("@mantine/core");
|
|
8438
8484
|
var jsx_runtime40 = require("react/jsx-runtime");
|
|
8439
8485
|
var defaultFooterSettingsWidgetId = "footer-settings";
|
|
@@ -8464,7 +8510,7 @@ function FooterSettingsWidget({
|
|
|
8464
8510
|
footer: initialUserExperience.footer
|
|
8465
8511
|
}));
|
|
8466
8512
|
},
|
|
8467
|
-
custom: !
|
|
8513
|
+
custom: !import_lodash21.isEqual(userExperience.footer, initialUserExperience.footer),
|
|
8468
8514
|
children: /* @__PURE__ */ jsx_runtime40.jsxs(SettingsTable_default, {
|
|
8469
8515
|
...componentsProps?.table,
|
|
8470
8516
|
children: [
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren as PropsWithChildren7, ReactNode as ReactNode7 } from "react";
|
|
2
|
-
import { MantineBreakpoint, MantineColorScheme, MantineSize, MantineTheme } from "@mantine/core";
|
|
2
|
+
import { MantineBreakpoint, MantineColorScheme, MantineSize, MantineTheme, ScrollerProps } from "@mantine/core";
|
|
3
3
|
import { Icon as Icon2, IconProps as IconProps2 } from "@tabler/icons-react";
|
|
4
4
|
import React2, { Dispatch, MouseEventHandler, ReactElement, SetStateAction } from "react";
|
|
5
5
|
import { PartialDeep } from "type-fest";
|
|
@@ -168,8 +168,9 @@ interface RemoraidTheme {
|
|
|
168
168
|
transparentBackground?: string;
|
|
169
169
|
spacingPx?: Record<MantineSize, number>;
|
|
170
170
|
componentsProps: {
|
|
171
|
-
icons: Record<RemoraidIconSize, Partial<IconProps2
|
|
171
|
+
icons: Record<RemoraidIconSize, Partial<IconProps2> & Required<Pick<IconProps2, "size" | "stroke">>>
|
|
172
172
|
alerts: Record<AlertCategory, Omit<Partial<AlertMinimalProps>, "category">>
|
|
173
|
+
Scroller: Partial<ScrollerProps>
|
|
173
174
|
};
|
|
174
175
|
}
|
|
175
176
|
interface RemoraidThemeDependencies {
|
|
@@ -294,7 +295,7 @@ interface RemoraidProviderProps {
|
|
|
294
295
|
};
|
|
295
296
|
}
|
|
296
297
|
declare function RemoraidProvider({ children, theme, initialUserExperience, router, componentsProps }: PropsWithChildren7<RemoraidProviderProps>): ReactNode7;
|
|
297
|
-
import { BoxProps as
|
|
298
|
+
import { BoxProps as BoxProps3 } from "@mantine/core";
|
|
298
299
|
import { ComponentProps as ComponentProps7, PropsWithChildren as PropsWithChildren13, ReactNode as ReactNode22 } from "react";
|
|
299
300
|
import { PropsWithChildren as PropsWithChildren8, ReactNode as ReactNode8 } from "react";
|
|
300
301
|
import { SetOptional } from "type-fest";
|
|
@@ -307,7 +308,7 @@ declare function AppProvider2<V extends CustomAppVariables>({ appContext: appCon
|
|
|
307
308
|
import { ComponentProps as ComponentProps4, ReactNode as ReactNode18 } from "react";
|
|
308
309
|
import { ReactNode as ReactNode17 } from "react";
|
|
309
310
|
import { MantineBreakpoint as MantineBreakpoint3, PaperProps } from "@mantine/core";
|
|
310
|
-
import { MenuProps, TransitionProps as TransitionProps2 } from "@mantine/core";
|
|
311
|
+
import { BoxProps, MenuProps, MenuSubProps, TransitionProps as TransitionProps2 } from "@mantine/core";
|
|
311
312
|
import { ReactElement as ReactElement2 } from "react";
|
|
312
313
|
interface NavigationMenuProps {
|
|
313
314
|
target: ReactElement2 | NavigationElement;
|
|
@@ -315,7 +316,9 @@ interface NavigationMenuProps {
|
|
|
315
316
|
label?: string;
|
|
316
317
|
componentsProps?: {
|
|
317
318
|
transition?: Partial<TransitionProps2>
|
|
319
|
+
rootTargetContainer?: Partial<BoxProps>
|
|
318
320
|
Menu?: Partial<MenuProps>
|
|
321
|
+
MenuSub?: Partial<MenuSubProps>
|
|
319
322
|
};
|
|
320
323
|
}
|
|
321
324
|
import { ActionIconProps, ActionIconVariant, ButtonProps, ButtonVariant, MantineBreakpoint as MantineBreakpoint2, MantineColor, MantineSize as MantineSize3, TooltipProps, TransitionProps as TransitionProps3 } from "@mantine/core";
|
|
@@ -414,7 +417,7 @@ interface PageContainerProps {
|
|
|
414
417
|
}
|
|
415
418
|
declare function PageContainer2({ children, p, hidden, componentsProps }: PropsWithChildren9<PageContainerProps>): ReactNode12;
|
|
416
419
|
import { PropsWithChildren as PropsWithChildren10, ReactNode as ReactNode13 } from "react";
|
|
417
|
-
import { BoxProps } from "@mantine/core";
|
|
420
|
+
import { BoxProps as BoxProps2 } from "@mantine/core";
|
|
418
421
|
declare const useFrameLayoutElement: () => LayoutElementContext<LayoutType.Frame> | null;
|
|
419
422
|
interface FrameLayoutElementProps {
|
|
420
423
|
section: FrameLayoutSection;
|
|
@@ -423,7 +426,7 @@ interface FrameLayoutElementProps {
|
|
|
423
426
|
layoutId?: string;
|
|
424
427
|
hidden?: boolean;
|
|
425
428
|
componentsProps?: {
|
|
426
|
-
container?: Partial<
|
|
429
|
+
container?: Partial<BoxProps2>
|
|
427
430
|
PageContainer?: Partial<PageContainerProps>
|
|
428
431
|
};
|
|
429
432
|
}
|
|
@@ -564,7 +567,7 @@ interface AppShellProps<V extends CustomAppVariables> {
|
|
|
564
567
|
initialUserExperience?: UserExperienceProviderProps<AppShellUserExperience>["initialValue"];
|
|
565
568
|
gutter?: FrameLayoutProps["gutter"];
|
|
566
569
|
componentsProps?: {
|
|
567
|
-
container?: Partial<
|
|
570
|
+
container?: Partial<BoxProps3>
|
|
568
571
|
layout?: Partial<FrameLayoutProps>
|
|
569
572
|
navbar?: Partial<NavbarProps>
|
|
570
573
|
footer?: Partial<FooterProps>
|
|
@@ -598,20 +601,19 @@ declare const defaultUserExperienceCookieName = "remoraid-core-user-experience";
|
|
|
598
601
|
declare const useRemoraidUserExperience: () => UserExperienceContext<CoreUserExperience>;
|
|
599
602
|
import { ChipProps, DividerProps, FlexProps as FlexProps2, MenuProps as MenuProps2, TextProps } from "@mantine/core";
|
|
600
603
|
import { ReactNode as ReactNode27 } from "react";
|
|
601
|
-
import { ChipGroupProps, FlexProps, MantineSize as MantineSize7,
|
|
602
|
-
import { PropsWithChildren as PropsWithChildren17, ReactNode as ReactNode26
|
|
604
|
+
import { ChipGroupProps, FlexProps, MantineSize as MantineSize7, ScrollerProps as ScrollerProps2 } from "@mantine/core";
|
|
605
|
+
import { PropsWithChildren as PropsWithChildren17, ReactNode as ReactNode26 } from "react";
|
|
603
606
|
interface ScrollableChipGroupProps {
|
|
604
607
|
value: string[];
|
|
605
|
-
ref?: RefObject2<HTMLDivElement | null>;
|
|
606
608
|
onChange?: (value: string[]) => void;
|
|
607
609
|
gap?: MantineSize7 | number;
|
|
608
610
|
componentsProps?: {
|
|
609
|
-
chipGroup?: Partial<ChipGroupProps<true>>
|
|
610
611
|
container?: Partial<FlexProps>
|
|
611
|
-
|
|
612
|
+
ChipGroup?: Partial<ChipGroupProps<true>>
|
|
613
|
+
Scroller?: Partial<ScrollerProps2>
|
|
612
614
|
};
|
|
613
615
|
}
|
|
614
|
-
declare function ScrollableChipGroup2({ value,
|
|
616
|
+
declare function ScrollableChipGroup2({ value, onChange, gap, componentsProps, children }: PropsWithChildren17<ScrollableChipGroupProps>): ReactNode26;
|
|
615
617
|
interface WidgetSelectionHeaderProps {
|
|
616
618
|
title?: string;
|
|
617
619
|
pinnableSection?: FrameLayoutSection.Top | FrameLayoutSection.Bottom | null;
|
|
@@ -627,7 +629,7 @@ interface WidgetSelectionHeaderProps {
|
|
|
627
629
|
Pinnable?: Partial<PinnableProps>
|
|
628
630
|
};
|
|
629
631
|
}
|
|
630
|
-
declare function WidgetSelectionHeader({ title, pinnableSection, initiallyPinned, disabledWidgets, componentsProps }: WidgetSelectionHeaderProps): ReactNode27;
|
|
632
|
+
declare function WidgetSelectionHeader({ title, pinnableSection, initiallyPinned: initiallyPinnedProp, disabledWidgets, componentsProps }: WidgetSelectionHeaderProps): ReactNode27;
|
|
631
633
|
import { BadgeProps as BadgeProps2, GroupProps as GroupProps3, HoverCardProps, MantineBreakpoint as MantineBreakpoint4, MantineSize as MantineSize8, StackProps as StackProps2, TransitionProps as TransitionProps7 } from "@mantine/core";
|
|
632
634
|
import { ReactNode as ReactNode29 } from "react";
|
|
633
635
|
import { BadgeProps, TooltipProps as TooltipProps3, TransitionProps as TransitionProps6 } from "@mantine/core";
|
|
@@ -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
|
|
826
|
+
import { BoxProps as BoxProps4, InputWrapperProps, ScrollAreaProps as ScrollAreaProps2 } from "@mantine/core";
|
|
825
827
|
import { PropsWithChildren as PropsWithChildren26, ReactNode as ReactNode42 } from "react";
|
|
826
828
|
interface InputWrapperScrollAreaProps {
|
|
827
829
|
label?: string;
|
|
@@ -831,8 +833,8 @@ interface InputWrapperScrollAreaProps {
|
|
|
831
833
|
required?: boolean;
|
|
832
834
|
componentsProps?: {
|
|
833
835
|
container?: Partial<InputWrapperProps>
|
|
834
|
-
ScrollArea?: Partial<
|
|
835
|
-
childrenContainer?: Partial<
|
|
836
|
+
ScrollArea?: Partial<ScrollAreaProps2>
|
|
837
|
+
childrenContainer?: Partial<BoxProps4>
|
|
836
838
|
};
|
|
837
839
|
}
|
|
838
840
|
declare function InputWrapperScrollArea({ children, label, mah, description, error, required, componentsProps }: PropsWithChildren26<InputWrapperScrollAreaProps>): ReactNode42;
|