shadboard 0.0.8 → 0.0.9

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/index.d.mts CHANGED
@@ -1,11 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { RefineThemedLayoutProps, RefineLayoutThemedTitleProps, RefineCreateButtonProps, RefineSaveButtonProps, RefineDeleteButtonProps, RefineRefreshButtonProps, RefineListButtonProps, RefineEditButtonProps, RefineShowButtonProps, RefineImportButtonProps, RefineCloneButtonProps, RefineExportButtonProps, RefineCrudListProps, RefineCrudCreateProps, RefineCrudEditProps, RefineCrudShowProps, RefineFieldTextProps, RefineFieldBooleanProps, RefineFieldNumberProps, RefineFieldDateProps, RefineFieldMarkdownProps, RefineBreadcrumbProps } from '@refinedev/ui-types';
2
+ import { RefineThemedLayoutProps, RefineLayoutThemedTitleProps, RefineCreateButtonProps, RefineEditButtonProps, RefineDeleteButtonProps, RefineRefreshButtonProps, RefineListButtonProps, RefineSaveButtonProps, RefineShowButtonProps, RefineImportButtonProps, RefineCloneButtonProps, RefineExportButtonProps, RefineCrudListProps, RefineCrudShowProps, RefineCrudCreateProps, RefineCrudEditProps, RefineFieldTextProps, RefineFieldBooleanProps, RefineFieldNumberProps, RefineFieldDateProps, RefineFieldMarkdownProps, RefineBreadcrumbProps } from '@refinedev/ui-types';
3
+ import { BaseRecord, HttpError, UseImportInputPropsType, AuthPageProps, OpenNotificationParams, AutoSaveIndicatorProps, NotificationProvider } from '@refinedev/core';
4
+ import { UseTableReturnType } from '@refinedev/react-table';
3
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
6
  import * as React$1 from 'react';
5
7
  import React__default, { HTMLAttributes, ReactNode } from 'react';
6
8
  import { VariantProps } from 'class-variance-authority';
7
9
  import { LucideProps } from 'lucide-react';
8
- import { UseImportInputPropsType, AuthPageProps, OpenNotificationParams, AutoSaveIndicatorProps, NotificationProvider } from '@refinedev/core';
9
10
  import { ConfigType } from 'dayjs';
10
11
  import { TooltipProps } from '@radix-ui/react-tooltip';
11
12
  import { FieldValues, UseFormProps } from 'react-hook-form';
@@ -13,8 +14,17 @@ import { ThemeProviderProps } from 'next-themes';
13
14
 
14
15
  declare const ThemedLayout: ({ Sider, Header, Title, Footer, OffLayoutArea, children, initialSiderCollapsed, onSiderCollapsed, }: RefineThemedLayoutProps) => react_jsx_runtime.JSX.Element;
15
16
 
17
+ declare const BaseLayout: ({ children }: {
18
+ children: React.ReactNode;
19
+ }) => react_jsx_runtime.JSX.Element;
20
+
16
21
  declare const ThemedTitle: ({ collapsed, icon: iconFromProps, text: textFromProps, }: RefineLayoutThemedTitleProps) => react_jsx_runtime.JSX.Element;
17
22
 
23
+ interface ShadboardTableProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData> {
24
+ table: UseTableReturnType<TData, TError>;
25
+ }
26
+ declare const ShadboardTable: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData>({ table, }: ShadboardTableProps<TQueryFnData, TError, TData>) => react_jsx_runtime.JSX.Element;
27
+
18
28
  declare const buttonVariants: (props?: ({
19
29
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
20
30
  size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
@@ -63,6 +73,8 @@ type ShowProps = RefineCrudShowProps<DivProps, DivProps, DivProps, DivProps, Div
63
73
 
64
74
  declare const List: (props: ListProps) => react_jsx_runtime.JSX.Element;
65
75
 
76
+ declare const Show: React__default.FC<ShowProps>;
77
+
66
78
  declare const Create: (props: CreateProps) => react_jsx_runtime.JSX.Element;
67
79
 
68
80
  declare const CreateButton: ({ resource: resourceNameFromProps, hideText, accessControl, meta, children, onClick, ...rest }: CreateButtonProps) => react_jsx_runtime.JSX.Element | null;
@@ -104,6 +116,12 @@ declare const TextField: ({ value, ...rest }: TextFieldProps) => react_jsx_runti
104
116
 
105
117
  declare const BooleanField: ({ value, valueLabelTrue, valueLabelFalse, trueIcon, falseIcon, svgIconProps, ...rest }: BooleanFieldProps) => react_jsx_runtime.JSX.Element;
106
118
 
119
+ interface AvatarWithTextCellProps {
120
+ src: string;
121
+ text?: string;
122
+ }
123
+ declare const AvatarField: ({ src, text }: AvatarWithTextCellProps) => react_jsx_runtime.JSX.Element;
124
+
107
125
  declare const NumberField: ({ value, locale, options, ...rest }: NumberFieldProps) => react_jsx_runtime.JSX.Element;
108
126
 
109
127
  declare const ErrorComponent: () => react_jsx_runtime.JSX.Element;
@@ -130,6 +148,8 @@ declare const UndoableNotification: React.FC<UndoableNotificationProps>;
130
148
 
131
149
  declare const AutoSaveIndicator: ({ status, elements: { success, error, loading, idle, }, }: AutoSaveIndicatorProps) => react_jsx_runtime.JSX.Element;
132
150
 
151
+ declare function useIsMobile(): boolean;
152
+
133
153
  declare const useNotificationProvider: () => NotificationProvider;
134
154
 
135
155
  interface ThemedLayoutContext extends ThemeProviderProps {
@@ -141,4 +161,4 @@ type GreetingOptions = {
141
161
  };
142
162
  declare function greet(opts?: GreetingOptions): string;
143
163
 
144
- export { AuthPage, type AuthProps, AutoSaveIndicator, BooleanField, type BooleanFieldProps, Breadcrumb, type BreadcrumbProps, CloneButton, type CloneButtonProps, Create, CreateButton, type CreateButtonProps, type CreateProps, type DateFieldProps, DeleteButton, type DeleteButtonProps, type DivProps, EditButton, type EditButtonProps, type EditProps, ErrorComponent, ExportButton, type ExportButtonProps, type FormPropsType, type GreetingOptions, ImportButton, type ImportButtonProps, List, ListButton, type ListButtonProps, type ListProps, type MarkdownFieldProps, NumberField, type NumberFieldProps, RefreshButton, type RefreshButtonProps, SaveButton, type SaveButtonProps, ShowButton, type ShowButtonProps, type ShowProps, TextField, type TextFieldProps, ThemedLayout, type ThemedLayoutContext, ThemedLayoutContextProvider, ThemedTitle, UndoableNotification, type UndoableNotificationProps, greet, useNotificationProvider };
164
+ export { AuthPage, type AuthProps, AutoSaveIndicator, AvatarField, BaseLayout, BooleanField, type BooleanFieldProps, Breadcrumb, type BreadcrumbProps, CloneButton, type CloneButtonProps, Create, CreateButton, type CreateButtonProps, type CreateProps, type DateFieldProps, DeleteButton, type DeleteButtonProps, type DivProps, EditButton, type EditButtonProps, type EditProps, ErrorComponent, ExportButton, type ExportButtonProps, type FormPropsType, type GreetingOptions, ImportButton, type ImportButtonProps, List, ListButton, type ListButtonProps, type ListProps, type MarkdownFieldProps, NumberField, type NumberFieldProps, RefreshButton, type RefreshButtonProps, SaveButton, type SaveButtonProps, ShadboardTable, Show, ShowButton, type ShowButtonProps, type ShowProps, TextField, type TextFieldProps, ThemedLayout, type ThemedLayoutContext, ThemedLayoutContextProvider, ThemedTitle, UndoableNotification, type UndoableNotificationProps, greet, useIsMobile, useNotificationProvider };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { RefineThemedLayoutProps, RefineLayoutThemedTitleProps, RefineCreateButtonProps, RefineSaveButtonProps, RefineDeleteButtonProps, RefineRefreshButtonProps, RefineListButtonProps, RefineEditButtonProps, RefineShowButtonProps, RefineImportButtonProps, RefineCloneButtonProps, RefineExportButtonProps, RefineCrudListProps, RefineCrudCreateProps, RefineCrudEditProps, RefineCrudShowProps, RefineFieldTextProps, RefineFieldBooleanProps, RefineFieldNumberProps, RefineFieldDateProps, RefineFieldMarkdownProps, RefineBreadcrumbProps } from '@refinedev/ui-types';
2
+ import { RefineThemedLayoutProps, RefineLayoutThemedTitleProps, RefineCreateButtonProps, RefineEditButtonProps, RefineDeleteButtonProps, RefineRefreshButtonProps, RefineListButtonProps, RefineSaveButtonProps, RefineShowButtonProps, RefineImportButtonProps, RefineCloneButtonProps, RefineExportButtonProps, RefineCrudListProps, RefineCrudShowProps, RefineCrudCreateProps, RefineCrudEditProps, RefineFieldTextProps, RefineFieldBooleanProps, RefineFieldNumberProps, RefineFieldDateProps, RefineFieldMarkdownProps, RefineBreadcrumbProps } from '@refinedev/ui-types';
3
+ import { BaseRecord, HttpError, UseImportInputPropsType, AuthPageProps, OpenNotificationParams, AutoSaveIndicatorProps, NotificationProvider } from '@refinedev/core';
4
+ import { UseTableReturnType } from '@refinedev/react-table';
3
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
6
  import * as React$1 from 'react';
5
7
  import React__default, { HTMLAttributes, ReactNode } from 'react';
6
8
  import { VariantProps } from 'class-variance-authority';
7
9
  import { LucideProps } from 'lucide-react';
8
- import { UseImportInputPropsType, AuthPageProps, OpenNotificationParams, AutoSaveIndicatorProps, NotificationProvider } from '@refinedev/core';
9
10
  import { ConfigType } from 'dayjs';
10
11
  import { TooltipProps } from '@radix-ui/react-tooltip';
11
12
  import { FieldValues, UseFormProps } from 'react-hook-form';
@@ -13,8 +14,17 @@ import { ThemeProviderProps } from 'next-themes';
13
14
 
14
15
  declare const ThemedLayout: ({ Sider, Header, Title, Footer, OffLayoutArea, children, initialSiderCollapsed, onSiderCollapsed, }: RefineThemedLayoutProps) => react_jsx_runtime.JSX.Element;
15
16
 
17
+ declare const BaseLayout: ({ children }: {
18
+ children: React.ReactNode;
19
+ }) => react_jsx_runtime.JSX.Element;
20
+
16
21
  declare const ThemedTitle: ({ collapsed, icon: iconFromProps, text: textFromProps, }: RefineLayoutThemedTitleProps) => react_jsx_runtime.JSX.Element;
17
22
 
23
+ interface ShadboardTableProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData> {
24
+ table: UseTableReturnType<TData, TError>;
25
+ }
26
+ declare const ShadboardTable: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData>({ table, }: ShadboardTableProps<TQueryFnData, TError, TData>) => react_jsx_runtime.JSX.Element;
27
+
18
28
  declare const buttonVariants: (props?: ({
19
29
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
20
30
  size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
@@ -63,6 +73,8 @@ type ShowProps = RefineCrudShowProps<DivProps, DivProps, DivProps, DivProps, Div
63
73
 
64
74
  declare const List: (props: ListProps) => react_jsx_runtime.JSX.Element;
65
75
 
76
+ declare const Show: React__default.FC<ShowProps>;
77
+
66
78
  declare const Create: (props: CreateProps) => react_jsx_runtime.JSX.Element;
67
79
 
68
80
  declare const CreateButton: ({ resource: resourceNameFromProps, hideText, accessControl, meta, children, onClick, ...rest }: CreateButtonProps) => react_jsx_runtime.JSX.Element | null;
@@ -104,6 +116,12 @@ declare const TextField: ({ value, ...rest }: TextFieldProps) => react_jsx_runti
104
116
 
105
117
  declare const BooleanField: ({ value, valueLabelTrue, valueLabelFalse, trueIcon, falseIcon, svgIconProps, ...rest }: BooleanFieldProps) => react_jsx_runtime.JSX.Element;
106
118
 
119
+ interface AvatarWithTextCellProps {
120
+ src: string;
121
+ text?: string;
122
+ }
123
+ declare const AvatarField: ({ src, text }: AvatarWithTextCellProps) => react_jsx_runtime.JSX.Element;
124
+
107
125
  declare const NumberField: ({ value, locale, options, ...rest }: NumberFieldProps) => react_jsx_runtime.JSX.Element;
108
126
 
109
127
  declare const ErrorComponent: () => react_jsx_runtime.JSX.Element;
@@ -130,6 +148,8 @@ declare const UndoableNotification: React.FC<UndoableNotificationProps>;
130
148
 
131
149
  declare const AutoSaveIndicator: ({ status, elements: { success, error, loading, idle, }, }: AutoSaveIndicatorProps) => react_jsx_runtime.JSX.Element;
132
150
 
151
+ declare function useIsMobile(): boolean;
152
+
133
153
  declare const useNotificationProvider: () => NotificationProvider;
134
154
 
135
155
  interface ThemedLayoutContext extends ThemeProviderProps {
@@ -141,4 +161,4 @@ type GreetingOptions = {
141
161
  };
142
162
  declare function greet(opts?: GreetingOptions): string;
143
163
 
144
- export { AuthPage, type AuthProps, AutoSaveIndicator, BooleanField, type BooleanFieldProps, Breadcrumb, type BreadcrumbProps, CloneButton, type CloneButtonProps, Create, CreateButton, type CreateButtonProps, type CreateProps, type DateFieldProps, DeleteButton, type DeleteButtonProps, type DivProps, EditButton, type EditButtonProps, type EditProps, ErrorComponent, ExportButton, type ExportButtonProps, type FormPropsType, type GreetingOptions, ImportButton, type ImportButtonProps, List, ListButton, type ListButtonProps, type ListProps, type MarkdownFieldProps, NumberField, type NumberFieldProps, RefreshButton, type RefreshButtonProps, SaveButton, type SaveButtonProps, ShowButton, type ShowButtonProps, type ShowProps, TextField, type TextFieldProps, ThemedLayout, type ThemedLayoutContext, ThemedLayoutContextProvider, ThemedTitle, UndoableNotification, type UndoableNotificationProps, greet, useNotificationProvider };
164
+ export { AuthPage, type AuthProps, AutoSaveIndicator, AvatarField, BaseLayout, BooleanField, type BooleanFieldProps, Breadcrumb, type BreadcrumbProps, CloneButton, type CloneButtonProps, Create, CreateButton, type CreateButtonProps, type CreateProps, type DateFieldProps, DeleteButton, type DeleteButtonProps, type DivProps, EditButton, type EditButtonProps, type EditProps, ErrorComponent, ExportButton, type ExportButtonProps, type FormPropsType, type GreetingOptions, ImportButton, type ImportButtonProps, List, ListButton, type ListButtonProps, type ListProps, type MarkdownFieldProps, NumberField, type NumberFieldProps, RefreshButton, type RefreshButtonProps, SaveButton, type SaveButtonProps, ShadboardTable, Show, ShowButton, type ShowButtonProps, type ShowProps, TextField, type TextFieldProps, ThemedLayout, type ThemedLayoutContext, ThemedLayoutContextProvider, ThemedTitle, UndoableNotification, type UndoableNotificationProps, greet, useIsMobile, useNotificationProvider };