-
This commit is contained in:
43
web-components/dist/components/ActionMenu/ActionMenu.d.ts
vendored
Normal file
43
web-components/dist/components/ActionMenu/ActionMenu.d.ts
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
import React from 'react';
|
||||
import { TablerIconsProps } from '@tabler/icons-react';
|
||||
export interface ActionMenuItem {
|
||||
key: string;
|
||||
label: string;
|
||||
icon?: React.ComponentType<TablerIconsProps>;
|
||||
color?: string;
|
||||
disabled?: boolean;
|
||||
hidden?: boolean;
|
||||
onClick: (item?: any) => void | Promise<void>;
|
||||
confirm?: {
|
||||
title: string;
|
||||
message: string;
|
||||
confirmLabel?: string;
|
||||
cancelLabel?: string;
|
||||
};
|
||||
show?: (item: any) => boolean;
|
||||
}
|
||||
export interface ActionMenuProps {
|
||||
item?: any;
|
||||
actions: ActionMenuItem[];
|
||||
trigger?: 'dots' | 'button' | 'custom';
|
||||
triggerLabel?: string;
|
||||
triggerIcon?: React.ComponentType<TablerIconsProps>;
|
||||
triggerProps?: any;
|
||||
customTrigger?: React.ReactNode;
|
||||
position?: 'bottom-end' | 'bottom-start' | 'top-end' | 'top-start';
|
||||
withArrow?: boolean;
|
||||
withinPortal?: boolean;
|
||||
'aria-label'?: string;
|
||||
}
|
||||
declare const ActionMenu: React.FC<ActionMenuProps>;
|
||||
export default ActionMenu;
|
||||
export declare const createViewAction: (onView: (item: any) => void) => ActionMenuItem;
|
||||
export declare const createEditAction: (onEdit: (item: any) => void) => ActionMenuItem;
|
||||
export declare const createCopyAction: (onCopy: (item: any) => void) => ActionMenuItem;
|
||||
export declare const createDeleteAction: (onDelete: (item: any) => void | Promise<void>, itemName?: string) => ActionMenuItem;
|
||||
export declare const createArchiveAction: (onArchive: (item: any) => void) => ActionMenuItem;
|
||||
export declare const createRestoreAction: (onRestore: (item: any) => void) => ActionMenuItem;
|
||||
export declare const getUserActions: (onEdit: (item: any) => void, onDelete: (item: any) => void, onViewDetails?: (item: any) => void) => ActionMenuItem[];
|
||||
export declare const getApplicationActions: (onEdit: (item: any) => void, onDelete: (item: any) => void, onConfigure?: (item: any) => void) => ActionMenuItem[];
|
||||
export declare const getFunctionActions: (onEdit: (item: any) => void, onDelete: (item: any) => void, onExecute?: (item: any) => void, onViewLogs?: (item: any) => void) => ActionMenuItem[];
|
||||
export declare const getTokenActions: (onRevoke: (item: any) => void, onCopy?: (item: any) => void, onRefresh?: (item: any) => void) => ActionMenuItem[];
|
||||
47
web-components/dist/components/EmptyState/EmptyState.d.ts
vendored
Normal file
47
web-components/dist/components/EmptyState/EmptyState.d.ts
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
import React from 'react';
|
||||
import { TablerIconsProps } from '@tabler/icons-react';
|
||||
export type EmptyStateVariant = 'no-data' | 'no-results' | 'error' | 'loading-failed' | 'access-denied' | 'coming-soon';
|
||||
export type EmptyStateContext = 'users' | 'applications' | 'functions' | 'tokens' | 'executions' | 'permissions' | 'audit' | 'generic';
|
||||
export interface EmptyStateAction {
|
||||
label: string;
|
||||
onClick: () => void;
|
||||
variant?: 'filled' | 'light' | 'outline';
|
||||
color?: string;
|
||||
leftSection?: React.ReactNode;
|
||||
}
|
||||
export interface EmptyStateProps {
|
||||
variant?: EmptyStateVariant;
|
||||
context?: EmptyStateContext;
|
||||
title?: string;
|
||||
message?: string;
|
||||
icon?: React.ComponentType<TablerIconsProps>;
|
||||
iconSize?: number;
|
||||
iconColor?: string;
|
||||
actions?: EmptyStateAction[];
|
||||
height?: number | string;
|
||||
}
|
||||
declare const EmptyState: React.FC<EmptyStateProps & {
|
||||
onAdd?: () => void;
|
||||
onRefresh?: () => void;
|
||||
onClearFilters?: () => void;
|
||||
}>;
|
||||
export default EmptyState;
|
||||
export declare const NoUsersState: React.FC<Omit<EmptyStateProps, 'context' | 'variant'> & {
|
||||
onAddUser?: () => void;
|
||||
}>;
|
||||
export declare const NoApplicationsState: React.FC<Omit<EmptyStateProps, 'context' | 'variant'> & {
|
||||
onCreateApp?: () => void;
|
||||
}>;
|
||||
export declare const NoFunctionsState: React.FC<Omit<EmptyStateProps, 'context' | 'variant'> & {
|
||||
onCreateFunction?: () => void;
|
||||
}>;
|
||||
export declare const NoTokensState: React.FC<Omit<EmptyStateProps, 'context' | 'variant'> & {
|
||||
onGenerateToken?: () => void;
|
||||
}>;
|
||||
export declare const NoSearchResults: React.FC<Omit<EmptyStateProps, 'variant'> & {
|
||||
onClearFilters?: () => void;
|
||||
onRefresh?: () => void;
|
||||
}>;
|
||||
export declare const ErrorState: React.FC<Omit<EmptyStateProps, 'variant'> & {
|
||||
onRetry?: () => void;
|
||||
}>;
|
||||
46
web-components/dist/components/LoadingState/LoadingState.d.ts
vendored
Normal file
46
web-components/dist/components/LoadingState/LoadingState.d.ts
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
import React from 'react';
|
||||
export type LoadingVariant = 'spinner' | 'progress' | 'skeleton-table' | 'skeleton-cards' | 'skeleton-form' | 'skeleton-text' | 'dots' | 'overlay';
|
||||
export type LoadingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
||||
export interface LoadingStateProps {
|
||||
variant?: LoadingVariant;
|
||||
size?: LoadingSize;
|
||||
height?: number | string;
|
||||
message?: string;
|
||||
submessage?: string;
|
||||
progress?: number;
|
||||
progressLabel?: string;
|
||||
rows?: number;
|
||||
columns?: number;
|
||||
color?: string;
|
||||
withContainer?: boolean;
|
||||
animate?: boolean;
|
||||
}
|
||||
declare const LoadingState: React.FC<LoadingStateProps>;
|
||||
export default LoadingState;
|
||||
export declare const TableLoadingState: React.FC<{
|
||||
rows?: number;
|
||||
columns?: number;
|
||||
}>;
|
||||
export declare const CardsLoadingState: React.FC<{
|
||||
count?: number;
|
||||
columns?: number;
|
||||
}>;
|
||||
export declare const FormLoadingState: React.FC<{
|
||||
fields?: number;
|
||||
}>;
|
||||
export declare const PageLoadingState: React.FC<{
|
||||
message?: string;
|
||||
}>;
|
||||
export declare const InlineLoadingState: React.FC<{
|
||||
message?: string;
|
||||
size?: LoadingSize;
|
||||
}>;
|
||||
export declare const useLoadingState: (initialLoading?: boolean) => {
|
||||
loading: boolean;
|
||||
progress: number;
|
||||
startLoading: () => void;
|
||||
stopLoading: () => void;
|
||||
updateProgress: (value: number) => void;
|
||||
setLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
setProgress: React.Dispatch<React.SetStateAction<number>>;
|
||||
};
|
||||
49
web-components/dist/components/Sidebar/Sidebar.d.ts
vendored
Normal file
49
web-components/dist/components/Sidebar/Sidebar.d.ts
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
import React from 'react';
|
||||
export interface SidebarProps {
|
||||
opened: boolean;
|
||||
onClose: () => void;
|
||||
title: string;
|
||||
width?: number;
|
||||
position?: 'left' | 'right';
|
||||
headerActions?: React.ReactNode;
|
||||
footer?: React.ReactNode;
|
||||
children: React.ReactNode;
|
||||
zIndex?: number;
|
||||
offsetTop?: number;
|
||||
backgroundColor?: string;
|
||||
borderColor?: string;
|
||||
animationDuration?: string;
|
||||
'aria-label'?: string;
|
||||
}
|
||||
declare const Sidebar: React.FC<SidebarProps>;
|
||||
export default Sidebar;
|
||||
export interface FormSidebarWrapperProps extends Omit<SidebarProps, 'children'> {
|
||||
children: React.ReactNode;
|
||||
cancelLabel?: string;
|
||||
submitLabel?: string;
|
||||
onCancel?: () => void;
|
||||
onSubmit?: () => void;
|
||||
submitDisabled?: boolean;
|
||||
showFooterActions?: boolean;
|
||||
}
|
||||
export declare const FormSidebarWrapper: React.FC<FormSidebarWrapperProps>;
|
||||
export interface DetailsSidebarProps extends Omit<SidebarProps, 'title'> {
|
||||
itemName: string;
|
||||
itemType?: string;
|
||||
editButton?: React.ReactNode;
|
||||
deleteButton?: React.ReactNode;
|
||||
status?: React.ReactNode;
|
||||
}
|
||||
export declare const DetailsSidebar: React.FC<DetailsSidebarProps>;
|
||||
export interface QuickSidebarProps extends Omit<SidebarProps, 'children'> {
|
||||
content: React.ReactNode;
|
||||
actions?: React.ReactNode;
|
||||
}
|
||||
export declare const QuickSidebar: React.FC<QuickSidebarProps>;
|
||||
export declare const useSidebar: (initialOpened?: boolean) => {
|
||||
opened: boolean;
|
||||
open: () => void;
|
||||
close: () => void;
|
||||
toggle: () => void;
|
||||
setOpened: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
};
|
||||
18
web-components/dist/components/StatusBadge/StatusBadge.d.ts
vendored
Normal file
18
web-components/dist/components/StatusBadge/StatusBadge.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
import React from 'react';
|
||||
import { BadgeProps } from '@mantine/core';
|
||||
export type StatusVariant = 'status' | 'role' | 'runtime' | 'type' | 'severity' | 'execution';
|
||||
export interface StatusBadgeProps extends Omit<BadgeProps, 'color' | 'children'> {
|
||||
value: string;
|
||||
variant?: StatusVariant;
|
||||
customColorMap?: Record<string, string>;
|
||||
}
|
||||
declare const COLOR_MAPS: Record<StatusVariant, Record<string, string>>;
|
||||
declare const DEFAULT_COLORS: Record<StatusVariant, string>;
|
||||
declare const StatusBadge: React.FC<StatusBadgeProps>;
|
||||
export default StatusBadge;
|
||||
export { COLOR_MAPS, DEFAULT_COLORS };
|
||||
export declare const UserRoleBadge: React.FC<Omit<StatusBadgeProps, 'variant'>>;
|
||||
export declare const ApplicationTypeBadge: React.FC<Omit<StatusBadgeProps, 'variant'>>;
|
||||
export declare const RuntimeBadge: React.FC<Omit<StatusBadgeProps, 'variant'>>;
|
||||
export declare const ExecutionStatusBadge: React.FC<Omit<StatusBadgeProps, 'variant'>>;
|
||||
export declare const SeverityBadge: React.FC<Omit<StatusBadgeProps, 'variant'>>;
|
||||
Reference in New Issue
Block a user