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.
267 lines (241 loc) • 7.12 kB
TypeScript
/************
Processor: ts
************/
import __beyond_dep_def_0 from 'react';
import * as __beyond_dep_ns_1 from '@beyond-js/reactive/model';
// components\footer.tsx
declare namespace ns_0 {
import React = __beyond_dep_def_0;
export function SwiperFooter(props: any): React.JSX.Element;
}
// components\navigation.tsx
declare namespace ns_1 {
import React = __beyond_dep_def_0;
export function SwiperNavigation(): React.JSX.Element;
}
// components\pagination.tsx
declare namespace ns_2 {
import React = __beyond_dep_def_0;
export function Pagination(): React.JSX.Element;
}
// context.tsx
declare namespace ns_3 {
import React = __beyond_dep_def_0;
import Controller = ns_9.Controller;
export interface ISwiperContext {
footer: boolean;
pagination?: boolean;
navigation?: boolean;
controller?: Controller;
refs: {
next: React.RefObject<HTMLButtonElement>;
container: React.RefObject<HTMLDivElement>;
pagination: React.RefObject<HTMLDivElement>;
prev: React.RefObject<HTMLButtonElement>;
};
}
export const SwiperContext: React.Context<ISwiperContext>;
export const useSwiperContext: () => ISwiperContext;
}
// index.tsx
declare namespace ns_4 {
/// <reference types="react" />
import ISwiperOptions = ns_6.ISwiperOptions;
export function SwiperSlider(props: ISwiperOptions): JSX.Element;
}
// interfaces\options.ts
declare namespace ns_5 {
class Swiper {
constructor(container: string | HTMLElement, options?: SwiperOptions);
slideNext(speed?: number, runCallbacks?: boolean): void;
slidePrev(speed?: number, runCallbacks?: boolean): void;
slideTo(index: number, speed?: number, runCallbacks?: boolean): void;
update(): void;
destroy(deleteInstance?: boolean, cleanStyles?: boolean): void;
}
export interface SwiperOptions {
direction?: 'horizontal' | 'vertical';
loop?: boolean;
slidesPerView?: number | 'auto';
spaceBetween?: number;
centeredSlides?: boolean;
slidesPerGroup?: number;
initialSlide?: number;
speed?: number;
autoplay?: {
delay?: number;
disableOnInteraction?: boolean;
stopOnLastSlide?: boolean;
reverseDirection?: boolean;
waitForTransition?: boolean;
};
pagination?: {
el?: string | HTMLElement;
type?: 'bullets' | 'fraction' | 'progressbar' | 'custom';
clickable?: boolean;
dynamicBullets?: boolean;
renderBullet?: (index: number, className: string) => string;
renderFraction?: (currentClass: string, totalClass: string) => string;
renderProgressbar?: (progressbarFillClass: string) => string;
renderCustom?: (swiper: Swiper, current: number, total: number) => string;
bulletClass?: string;
bulletActiveClass?: string;
modifierClass?: string;
currentClass?: string;
totalClass?: string;
hiddenClass?: string;
progressbarFillClass?: string;
clickableClass?: string;
};
navigation?: {
nextEl?: string | HTMLElement;
prevEl?: string | HTMLElement;
hideOnClick?: boolean;
disabledClass?: string;
hiddenClass?: string;
};
scrollbar?: {
el?: string | HTMLElement;
hide?: boolean;
draggable?: boolean;
snapOnRelease?: boolean;
dragSize?: string | number;
};
effect?: 'slide' | 'fade' | 'cube' | 'coverflow' | 'flip';
fadeEffect?: {
crossFade?: boolean;
};
cubeEffect?: {
shadow?: boolean;
slideShadows?: boolean;
shadowOffset?: number;
shadowScale?: number;
};
coverflowEffect?: {
rotate?: number;
stretch?: number;
depth?: number;
modifier?: number;
slideShadows?: boolean;
};
flipEffect?: {
slideShadows?: boolean;
limitRotation?: boolean;
};
touchRatio?: number;
touchAngle?: number;
simulateTouch?: boolean;
shortSwipes?: boolean;
longSwipes?: boolean;
longSwipesRatio?: number;
longSwipesMs?: number;
followFinger?: boolean;
allowTouchMove?: boolean;
threshold?: number;
touchMoveStopPropagation?: boolean;
touchStartPreventDefault?: boolean;
touchStartForcePreventDefault?: boolean;
touchReleaseOnEdges?: boolean;
uniqueNavElements?: boolean;
resistance?: boolean;
resistanceRatio?: number;
watchSlidesProgress?: boolean;
watchSlidesVisibility?: boolean;
grabCursor?: boolean;
preventClicks?: boolean;
preventClicksPropagation?: boolean;
slideToClickedSlide?: boolean;
loopAdditionalSlides?: number;
loopedSlides?: number;
loopFillGroupWithBlank?: boolean;
breakpoints?: {
[width: number]: SwiperOptions;
};
breakpointsBase?: 'window' | 'container';
runCallbacksOnInit?: boolean;
on?: {
init?: (swiper: Swiper) => void;
slideChange?: (swiper: Swiper) => void;
[event: string]: (swiper: Swiper) => void;
};
}
export {};
}
// interfaces\swiper-props.ts
declare namespace ns_6 {
import SwiperOptions = ns_5.SwiperOptions;
export interface ISwiperOptions extends SwiperOptions {
slideTo?: number;
footer?: any;
header?: any;
children?: any;
pagination?: any;
navigation?: any;
className?: string;
}
}
// slide\index.tsx
declare namespace ns_7 {
import React = __beyond_dep_def_0;
export function SlideItems({
items
}: {
items: any;
}): React.JSX.Element;
}
// slide\slide.tsx
declare namespace ns_8 {
/// <reference types="react" />
export function Slide({
children
}: {
children: any;
}): JSX.Element;
}
// state\controller.ts
declare namespace ns_9 {
import ReactiveModel = __beyond_dep_ns_1.ReactiveModel;
export class Controller extends ReactiveModel<any> {
#private;
lastIndex: number;
get swiper(): any;
setSwiper: (element: any, props: any, ref: any) => void;
nextSlide: () => void;
prevSlide: () => void;
next: () => void;
}
}
// state\interface.ts
declare namespace ns_10 {
/// <reference types="react" />
export interface IProps {
children: Array<JSX.Element>;
footer?: boolean;
navigation?: boolean;
pagination?: boolean;
next?: boolean;
functionNext?: (e: React.SyntheticEvent) => void;
className?: string;
slideTo?: any;
slidesPerView?: string | number;
spaceBetween?: number;
}
}
// use-swiper.tsx
declare namespace ns_11 {
import React = __beyond_dep_def_0;
import ISwiperOptions = ns_6.ISwiperOptions;
export const useSwiperSlider: (props: ISwiperOptions) => {
refs: {
next: React.MutableRefObject<HTMLButtonElement>;
container: React.MutableRefObject<undefined>;
pagination: React.MutableRefObject<undefined>;
prev: React.MutableRefObject<HTMLButtonElement>;
};
state: any;
prev: React.MutableRefObject<HTMLButtonElement>;
container: React.MutableRefObject<undefined>;
};
}
export import SwiperSlider = ns_4.SwiperSlider;
export declare const hmr: {on: (event: string, listener: any) => void, off: (event: string, listener: any) => void };