shadboard 0.0.8 → 0.0.10

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,18 @@ 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
+ onRowClick?: (row: TData) => void;
26
+ }
27
+ declare const ShadboardTable: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData>({ table, onRowClick, }: ShadboardTableProps<TQueryFnData, TError, TData>) => react_jsx_runtime.JSX.Element;
28
+
18
29
  declare const buttonVariants: (props?: ({
19
30
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
20
31
  size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
@@ -63,6 +74,8 @@ type ShowProps = RefineCrudShowProps<DivProps, DivProps, DivProps, DivProps, Div
63
74
 
64
75
  declare const List: (props: ListProps) => react_jsx_runtime.JSX.Element;
65
76
 
77
+ declare const Show: React__default.FC<ShowProps>;
78
+
66
79
  declare const Create: (props: CreateProps) => react_jsx_runtime.JSX.Element;
67
80
 
68
81
  declare const CreateButton: ({ resource: resourceNameFromProps, hideText, accessControl, meta, children, onClick, ...rest }: CreateButtonProps) => react_jsx_runtime.JSX.Element | null;
@@ -104,6 +117,12 @@ declare const TextField: ({ value, ...rest }: TextFieldProps) => react_jsx_runti
104
117
 
105
118
  declare const BooleanField: ({ value, valueLabelTrue, valueLabelFalse, trueIcon, falseIcon, svgIconProps, ...rest }: BooleanFieldProps) => react_jsx_runtime.JSX.Element;
106
119
 
120
+ interface AvatarWithTextCellProps {
121
+ src: string;
122
+ text?: string;
123
+ }
124
+ declare const AvatarField: ({ src, text }: AvatarWithTextCellProps) => react_jsx_runtime.JSX.Element;
125
+
107
126
  declare const NumberField: ({ value, locale, options, ...rest }: NumberFieldProps) => react_jsx_runtime.JSX.Element;
108
127
 
109
128
  declare const ErrorComponent: () => react_jsx_runtime.JSX.Element;
@@ -130,6 +149,8 @@ declare const UndoableNotification: React.FC<UndoableNotificationProps>;
130
149
 
131
150
  declare const AutoSaveIndicator: ({ status, elements: { success, error, loading, idle, }, }: AutoSaveIndicatorProps) => react_jsx_runtime.JSX.Element;
132
151
 
152
+ declare function useIsMobile(): boolean;
153
+
133
154
  declare const useNotificationProvider: () => NotificationProvider;
134
155
 
135
156
  interface ThemedLayoutContext extends ThemeProviderProps {
@@ -141,4 +162,4 @@ type GreetingOptions = {
141
162
  };
142
163
  declare function greet(opts?: GreetingOptions): string;
143
164
 
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 };
165
+ 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,18 @@ 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
+ onRowClick?: (row: TData) => void;
26
+ }
27
+ declare const ShadboardTable: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData>({ table, onRowClick, }: ShadboardTableProps<TQueryFnData, TError, TData>) => react_jsx_runtime.JSX.Element;
28
+
18
29
  declare const buttonVariants: (props?: ({
19
30
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
20
31
  size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
@@ -63,6 +74,8 @@ type ShowProps = RefineCrudShowProps<DivProps, DivProps, DivProps, DivProps, Div
63
74
 
64
75
  declare const List: (props: ListProps) => react_jsx_runtime.JSX.Element;
65
76
 
77
+ declare const Show: React__default.FC<ShowProps>;
78
+
66
79
  declare const Create: (props: CreateProps) => react_jsx_runtime.JSX.Element;
67
80
 
68
81
  declare const CreateButton: ({ resource: resourceNameFromProps, hideText, accessControl, meta, children, onClick, ...rest }: CreateButtonProps) => react_jsx_runtime.JSX.Element | null;
@@ -104,6 +117,12 @@ declare const TextField: ({ value, ...rest }: TextFieldProps) => react_jsx_runti
104
117
 
105
118
  declare const BooleanField: ({ value, valueLabelTrue, valueLabelFalse, trueIcon, falseIcon, svgIconProps, ...rest }: BooleanFieldProps) => react_jsx_runtime.JSX.Element;
106
119
 
120
+ interface AvatarWithTextCellProps {
121
+ src: string;
122
+ text?: string;
123
+ }
124
+ declare const AvatarField: ({ src, text }: AvatarWithTextCellProps) => react_jsx_runtime.JSX.Element;
125
+
107
126
  declare const NumberField: ({ value, locale, options, ...rest }: NumberFieldProps) => react_jsx_runtime.JSX.Element;
108
127
 
109
128
  declare const ErrorComponent: () => react_jsx_runtime.JSX.Element;
@@ -130,6 +149,8 @@ declare const UndoableNotification: React.FC<UndoableNotificationProps>;
130
149
 
131
150
  declare const AutoSaveIndicator: ({ status, elements: { success, error, loading, idle, }, }: AutoSaveIndicatorProps) => react_jsx_runtime.JSX.Element;
132
151
 
152
+ declare function useIsMobile(): boolean;
153
+
133
154
  declare const useNotificationProvider: () => NotificationProvider;
134
155
 
135
156
  interface ThemedLayoutContext extends ThemeProviderProps {
@@ -141,4 +162,4 @@ type GreetingOptions = {
141
162
  };
142
163
  declare function greet(opts?: GreetingOptions): string;
143
164
 
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 };
165
+ 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 };