remoraid 2.0.0 → 2.2.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/dist/core/index.cjs +191 -108
- package/dist/core/index.d.ts +74 -44
- package/dist/core/index.js +191 -106
- package/dist/jsonforms/index.cjs +66 -155
- package/dist/jsonforms/index.d.ts +1 -1
- package/dist/jsonforms/index.js +48 -149
- package/dist/modals/index.cjs +63 -0
- package/dist/modals/index.d.ts +15 -0
- package/dist/modals/index.js +31 -0
- package/dist/server/index.cjs +31 -31
- package/dist/server/index.d.ts +11 -7
- package/dist/server/index.js +31 -31
- package/package.json +7 -1
package/dist/core/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { PropsWithChildren as PropsWithChildren4, ReactNode as ReactNode5 } from "react";
|
2
|
-
import { AlertProps, IndicatorProps, MantineBreakpoint, MantineColorScheme, MantineSize, MantineTheme, ScrollAreaProps } from "@mantine/core";
|
2
|
+
import { ActionIconVariant, AlertProps, ButtonVariant, IndicatorProps, MantineBreakpoint, MantineColorScheme, MantineSize, MantineTheme, ScrollAreaProps } from "@mantine/core";
|
3
3
|
import { Icon, IconProps } from "@tabler/icons-react";
|
4
4
|
import { ImageProps } from "next/image";
|
5
5
|
import { ReactNode } from "react";
|
@@ -17,27 +17,21 @@ interface UserExperience {
|
|
17
17
|
showWelcomeMessage: boolean;
|
18
18
|
}
|
19
19
|
type AlertCategory = "negative" | "neutral" | "positive";
|
20
|
+
type TransitionDuration = "short" | "medium" | "long";
|
21
|
+
type RemoraidBreakpoint = "buttonCollapse" | "badgeGroupCollapse";
|
22
|
+
type RemoraidIconSize = "tiny" | "medium";
|
20
23
|
interface RemoraidTheme {
|
21
24
|
complete: true;
|
22
|
-
transitionDurations:
|
23
|
-
|
24
|
-
medium: number
|
25
|
-
long: number
|
26
|
-
};
|
27
|
-
breakpoints: {
|
28
|
-
buttonCollapse: MantineBreakpoint
|
29
|
-
badgeGroupCollapse: MantineBreakpoint
|
30
|
-
};
|
25
|
+
transitionDurations: Record<TransitionDuration, number>;
|
26
|
+
breakpoints: Record<RemoraidBreakpoint, MantineBreakpoint>;
|
31
27
|
scrollAreaProps: ScrollAreaProps;
|
32
|
-
alertProps:
|
28
|
+
alertProps: Record<AlertCategory, AlertProps>;
|
33
29
|
containerSize: MantineSize | number;
|
34
|
-
iconProps:
|
35
|
-
|
36
|
-
medium: IconProps
|
37
|
-
};
|
30
|
+
iconProps: Record<RemoraidIconSize, IconProps>;
|
31
|
+
jsonStringifySpace: string | number;
|
38
32
|
transparentBackground?: string;
|
39
33
|
primaryColor?: string;
|
40
|
-
spacingPx?:
|
34
|
+
spacingPx?: Record<MantineSize, number>;
|
41
35
|
}
|
42
36
|
type RemoraidThemeCallback = (mantineTheme: MantineTheme, colorScheme: MantineColorScheme) => RemoraidTheme;
|
43
37
|
type PartialRemoraidTheme = Omit<Partial<RemoraidTheme>, "complete">;
|
@@ -66,6 +60,14 @@ interface PageConfiguration {
|
|
66
60
|
name: string;
|
67
61
|
registerPageDirectly?: boolean;
|
68
62
|
}
|
63
|
+
type ResponsiveButtonSize = "small" | "medium";
|
64
|
+
interface RemoraidButtonProps {
|
65
|
+
label: string;
|
66
|
+
icon?: Icon;
|
67
|
+
onClick?: () => void;
|
68
|
+
loading?: boolean;
|
69
|
+
variant?: Extract<ButtonVariant, ActionIconVariant>;
|
70
|
+
}
|
69
71
|
declare const defaultNavbarSettings: { [V in NavbarVariant] : NavbarSettings };
|
70
72
|
declare const defaultUserExperience: UserExperience;
|
71
73
|
interface UserExperienceContext {
|
@@ -180,23 +182,38 @@ interface AlertMinimalProps {
|
|
180
182
|
};
|
181
183
|
}
|
182
184
|
declare function AlertMinimal({ children, title, category, text, onClose, mounted, mt, mb, componentsProps }: PropsWithChildren6<AlertMinimalProps>): ReactNode11;
|
183
|
-
import {
|
184
|
-
import {
|
185
|
+
import { ActionIconProps as ActionIconProps2, ButtonProps as MantineButtonProps, MantineBreakpoint as MantineBreakpoint3, TooltipProps as TooltipProps4 } from "@mantine/core";
|
186
|
+
import { IconProps as IconProps3 } from "@tabler/icons-react";
|
187
|
+
import { ReactNode as ReactNode13 } from "react";
|
188
|
+
type Common<
|
189
|
+
A,
|
190
|
+
B
|
191
|
+
> = Pick<A & B, keyof A & keyof B>;
|
192
|
+
import { TooltipProps as TooltipProps3, ActionIconProps } from "@mantine/core";
|
193
|
+
import { IconProps as IconProps2 } from "@tabler/icons-react";
|
185
194
|
import { ReactNode as ReactNode12 } from "react";
|
186
|
-
interface
|
187
|
-
|
188
|
-
icon?: Icon2;
|
189
|
-
onClick?: () => void;
|
190
|
-
breakpoint?: MantineBreakpoint3;
|
191
|
-
loading?: boolean;
|
192
|
-
variant?: Extract<ButtonVariant, ActionIconVariant>;
|
195
|
+
interface ButtonProps extends RemoraidButtonProps {
|
196
|
+
collapsed?: boolean;
|
193
197
|
componentsProps?: {
|
194
198
|
tooltip?: Partial<TooltipProps3>
|
199
|
+
icon?: Partial<IconProps2>
|
200
|
+
button?: Partial<ButtonProps>
|
201
|
+
actionIcon?: Partial<ActionIconProps>
|
202
|
+
};
|
203
|
+
}
|
204
|
+
declare function Button2({ label, collapsed, componentsProps, onClick, loading, variant,...props }: ButtonProps): ReactNode12;
|
205
|
+
interface ResponsiveButtonProps extends RemoraidButtonProps {
|
206
|
+
breakpoint?: MantineBreakpoint3;
|
207
|
+
componentsProps?: {
|
208
|
+
Button?: Partial<ButtonProps>
|
209
|
+
button?: Omit<Partial<Common<MantineButtonProps, ActionIconProps2>>, "variant">
|
210
|
+
tooltip?: Partial<TooltipProps4>
|
211
|
+
icon?: Partial<IconProps3>
|
195
212
|
};
|
196
213
|
}
|
197
|
-
declare function ResponsiveButton(
|
214
|
+
declare function ResponsiveButton({ breakpoint, componentsProps,...remoraidButtonProps }: ResponsiveButtonProps): ReactNode13;
|
198
215
|
import { MantineSize as MantineSize5, PaperProps, TransitionProps as TransitionProps3 } from "@mantine/core";
|
199
|
-
import { PropsWithChildren as PropsWithChildren7, ReactNode as
|
216
|
+
import { PropsWithChildren as PropsWithChildren7, ReactNode as ReactNode14 } from "react";
|
200
217
|
interface WidgetWrapperComponentsProps {
|
201
218
|
container?: Partial<PaperProps>;
|
202
219
|
transition?: Partial<Omit<TransitionProps3, "mounted">>;
|
@@ -207,9 +224,9 @@ interface WidgetWrapperProps {
|
|
207
224
|
withCloseButton?: boolean;
|
208
225
|
componentsProps?: WidgetWrapperComponentsProps;
|
209
226
|
}
|
210
|
-
declare function WidgetWrapper({ children, config, mt, withCloseButton, componentsProps }: PropsWithChildren7<WidgetWrapperProps>):
|
227
|
+
declare function WidgetWrapper({ children, config, mt, withCloseButton, componentsProps }: PropsWithChildren7<WidgetWrapperProps>): ReactNode14;
|
211
228
|
import { MantineSize as MantineSize6, LoaderProps } from "@mantine/core";
|
212
|
-
import { PropsWithChildren as PropsWithChildren8, ReactNode as
|
229
|
+
import { PropsWithChildren as PropsWithChildren8, ReactNode as ReactNode15 } from "react";
|
213
230
|
interface WidgetComponentsProps extends WidgetWrapperComponentsProps {
|
214
231
|
wrapper?: Partial<Omit<WidgetWrapperProps, "widgetId">>;
|
215
232
|
loader?: Partial<LoaderProps>;
|
@@ -219,9 +236,9 @@ interface WidgetProps {
|
|
219
236
|
id: string;
|
220
237
|
title: string;
|
221
238
|
config?: Partial<Omit<WidgetConfiguration, "widgetId">>;
|
222
|
-
badges?: (BadgeMinimalProps |
|
223
|
-
buttons?: (ResponsiveButtonProps |
|
224
|
-
alerts?: (AlertMinimalProps |
|
239
|
+
badges?: (BadgeMinimalProps | ReactNode15)[];
|
240
|
+
buttons?: (ResponsiveButtonProps | ReactNode15)[];
|
241
|
+
alerts?: (AlertMinimalProps | ReactNode15)[];
|
225
242
|
gaps?: MantineSize6 | number | {
|
226
243
|
badges?: MantineSize6 | number
|
227
244
|
buttons?: MantineSize6 | number
|
@@ -231,9 +248,9 @@ interface WidgetProps {
|
|
231
248
|
mt?: MantineSize6 | number;
|
232
249
|
componentsProps?: WidgetComponentsProps;
|
233
250
|
}
|
234
|
-
declare function Widget({ children, id, config, title, badges, buttons, alerts, gaps, loading, mt, componentsProps }: PropsWithChildren8<WidgetProps>):
|
251
|
+
declare function Widget({ children, id, config, title, badges, buttons, alerts, gaps, loading, mt, componentsProps }: PropsWithChildren8<WidgetProps>): ReactNode15;
|
235
252
|
import { ContainerProps, MantineSize as MantineSize7 } from "@mantine/core";
|
236
|
-
import { PropsWithChildren as PropsWithChildren9, ReactNode as
|
253
|
+
import { PropsWithChildren as PropsWithChildren9, ReactNode as ReactNode16 } from "react";
|
237
254
|
interface PageProps {
|
238
255
|
name?: string;
|
239
256
|
config?: Partial<Omit<PageConfiguration, "name">>;
|
@@ -242,8 +259,17 @@ interface PageProps {
|
|
242
259
|
container?: ContainerProps
|
243
260
|
};
|
244
261
|
}
|
245
|
-
declare function Page({ children, name, config, pt, componentsProps }: PropsWithChildren9<PageProps>):
|
246
|
-
import {
|
262
|
+
declare function Page({ children, name, config, pt, componentsProps }: PropsWithChildren9<PageProps>): ReactNode16;
|
263
|
+
import { ContainerProps as ContainerProps2, MantineSize as MantineSize8 } from "@mantine/core";
|
264
|
+
import { PropsWithChildren as PropsWithChildren10, ReactNode as ReactNode17 } from "react";
|
265
|
+
interface PageContainerProps {
|
266
|
+
pt?: MantineSize8 | number;
|
267
|
+
componentsProps?: {
|
268
|
+
container?: ContainerProps2
|
269
|
+
};
|
270
|
+
}
|
271
|
+
declare function PageContainer({ children, pt, componentsProps }: PropsWithChildren10<PageContainerProps>): ReactNode17;
|
272
|
+
import { PropsWithChildren as PropsWithChildren11, ReactNode as ReactNode18 } from "react";
|
247
273
|
import { PageProps as PageProps2 } from "..";
|
248
274
|
interface NotFoundPageProps {
|
249
275
|
message?: string;
|
@@ -251,14 +277,18 @@ interface NotFoundPageProps {
|
|
251
277
|
page?: PageProps2
|
252
278
|
};
|
253
279
|
}
|
254
|
-
declare function NotFoundPage({ children, message, componentsProps }:
|
255
|
-
import { MantineSize as
|
256
|
-
import { PropsWithChildren as
|
280
|
+
declare function NotFoundPage({ children, message, componentsProps }: PropsWithChildren11<NotFoundPageProps>): ReactNode18;
|
281
|
+
import { ContainerProps as ContainerProps3, MantineSize as MantineSize9 } from "@mantine/core";
|
282
|
+
import { PropsWithChildren as PropsWithChildren12, ReactNode as ReactNode19 } from "react";
|
257
283
|
interface EnvironmentShellProps {
|
258
|
-
|
284
|
+
environment: Record<string, string | undefined>;
|
259
285
|
message?: string;
|
260
|
-
m?:
|
261
|
-
mt?:
|
286
|
+
m?: MantineSize9 | number;
|
287
|
+
mt?: MantineSize9 | number;
|
288
|
+
withContainer?: boolean;
|
289
|
+
componentsProps?: {
|
290
|
+
container?: ContainerProps3
|
291
|
+
};
|
262
292
|
}
|
263
|
-
declare function EnvironmentShell({ children,
|
264
|
-
export { userExperienceCookieName, useWidgets, useRemoraidUserExperience, useRemoraidTheme, defaultUserExperience, defaultNavbarSettings, createRemoraidTheme, WidgetWrapper, WidgetSelectionHeader, Widget, ResponsiveButton, RemoraidProvider, Page, NotFoundPage, EnvironmentShell, CloseButton, BadgeMinimal, BadgeGroup, AppShell, AlertMinimal };
|
293
|
+
declare function EnvironmentShell({ children, environment, message, m, mt, withContainer, componentsProps }: PropsWithChildren12<EnvironmentShellProps>): ReactNode19;
|
294
|
+
export { userExperienceCookieName, useWidgets, useRemoraidUserExperience, useRemoraidTheme, defaultUserExperience, defaultNavbarSettings, createRemoraidTheme, WidgetsProviderProps, WidgetWrapperProps, WidgetWrapper, WidgetSelectionHeaderProps, WidgetSelectionHeader, WidgetProps, WidgetConfiguration, Widget, UserExperienceProviderProps, UserExperience, TransitionDuration, ThemeProviderProps, ResponsiveButtonSize, ResponsiveButtonProps, ResponsiveButton, RemoraidThemeCallback, RemoraidTheme, RemoraidProviderProps, RemoraidProvider, RemoraidIconSize, RemoraidButtonProps, RemoraidBreakpoint, PartialRemoraidTheme, PageProps, PageContainerProps, PageContainer, PageConfiguration, Page, NotFoundPageProps, NotFoundPage, NavbarVariant, NavbarSettings, NavbarProps, NavbarLink, EnvironmentShellProps, EnvironmentShell, CloseButtonProps, CloseButton, ButtonProps, Button2 as Button, BadgeMinimalProps, BadgeMinimal, BadgeGroupProps, BadgeGroup, AppShellProps, AppShellLogo, AppShell, AlertMinimalProps, AlertMinimal, AlertCategory };
|