pragmate-ui
Version:
An advanced, on-demand React UI library optimized for BeyondJS. Pragmate UI provides modular, responsive, and accessible components with a focus on efficient bundle sizes and a streamlined development process.
95 lines (83 loc) • 2.35 kB
TypeScript
/************
Processor: ts
************/
import * as __beyond_dep_ns_0 from 'react';
import __beyond_dep_def_0 from 'react';
import * as __beyond_dep_ns_1 from '@beyond-js/events/events';
// definitions.ts
declare namespace ns_0 {
import HTMLAttributes = __beyond_dep_ns_0.HTMLAttributes;
import ToastTypes = ns_2.ToastTypes;
export interface IProps extends HTMLAttributes<HTMLDivElement> {
className: string;
position: Partial<IPosition>;
}
export interface IProps {
key: string;
type: ToastTypes;
message: string;
duration?: number;
id: string;
}
export interface IPosition {
top: string;
left: string;
right: string;
bottom: string;
}
}
// index.tsx
declare namespace ns_1 {
import IProps = ns_0.IProps;
export function Toasts({
position,
className,
...props
}: Partial<IProps>): JSX.Element;
}
// model.ts
declare namespace ns_2 {
import Events = __beyond_dep_ns_1.Events;
export type ToastTypes = 'success' | 'error' | 'info' | 'loading' | 'warning';
export interface IToast {
id: string;
message: string;
type: ToastTypes;
duration?: number;
}
class Toast extends Events {
#private;
get current(): Array<IToast | undefined>;
set current(newValue: Array<IToast | undefined>);
constructor();
remove(toastId: string): void;
success(message: string, duration?: number): string;
error(message: string, duration?: number): string;
warning(message: string, duration?: number): string;
info(message: string, duration?: number): string;
loading(message: string, duration?: number): string;
}
export const toast: Toast;
export {};
}
// toast.tsx
declare namespace ns_3 {
import IProps = ns_0.IProps;
export function Toast({
type,
message,
duration,
id
}: IProps): JSX.Element;
}
// use-toast.tsx
declare namespace ns_4 {
import React = __beyond_dep_def_0;
export function useToastAnimation(ref: React.RefObject<HTMLDivElement>, duration: number, id: string): void;
}
export import Toasts = ns_1.Toasts;
export import ToastTypes = ns_2.ToastTypes;
export import IToast = ns_2.IToast;
export import toast = ns_2.toast;
export import Toast = ns_3.Toast;
export declare const hmr: {on: (event: string, listener: any) => void, off: (event: string, listener: any) => void };