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.
56 lines (50 loc) • 1.74 kB
TypeScript
/************
Processor: ts
************/
import * as __beyond_dep_ns_0 from 'framer-motion';
import * as __beyond_dep_ns_1 from 'react';
import __beyond_dep_def_1 from 'react';
// index.tsx
declare namespace ns_0 {
/// <reference types="react" />
import IPUIProps = ns_1.IPUIProps;
interface BaseComponentProps<T = HTMLElement> extends IPUIProps<T> {
motion?: boolean;
}
export function BaseComponent<T = HTMLElement>({
as,
motion: useMotion,
children,
...restProps
}: BaseComponentProps<T>): JSX.Element;
export {};
}
// types.ts
declare namespace ns_1 {
import motion = __beyond_dep_ns_0;
import React = __beyond_dep_def_1;
import HTMLAttributes = __beyond_dep_ns_1.HTMLAttributes;
import AnimationEventHandler = __beyond_dep_ns_1.AnimationEventHandler;
type ConflictingProps = 'onAnimationStart' | 'onAnimationEnd' | 'onAnimationIteration';
type HTMLMotionProps<T> = Omit<HTMLAttributes<T>, ConflictingProps> & motion.MotionProps & {
onAnimationStart?: AnimationEventHandler<T>;
onAnimationEnd?: AnimationEventHandler<T>;
onAnimationIteration?: AnimationEventHandler<T>;
};
export interface IPUIProps<T = unknown> extends HTMLMotionProps<T> {
/**
* @deprecated
*/
type?: string;
title?: string;
children?: React.ReactNode;
variant?: PuiVariant;
className?: string;
as?: string;
}
export type PuiVariant = 'primary' | 'secondary' | 'tertiary' | 'success' | 'info' | 'error' | 'warning' | 'default';
export {};
}
export import BaseComponent = ns_0.BaseComponent;
export import IPUIProps = ns_1.IPUIProps;
export declare const hmr: {on: (event: string, listener: any) => void, off: (event: string, listener: any) => void };