@mateosuarezdev/react-ui 1.0.54 → 1.0.56
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.cjs +3 -11
- package/dist/index.d.ts +43 -0
- package/dist/index.js +1350 -1288
- package/package.json +6 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,10 +13,12 @@ import { ClassValue } from 'clsx';
|
|
|
13
13
|
import { ComponentPropsWithoutRef } from 'react';
|
|
14
14
|
import { CSSProperties } from 'react';
|
|
15
15
|
import { default as default_2 } from 'react';
|
|
16
|
+
import { DetailedHTMLProps } from 'react';
|
|
16
17
|
import { EventEmitter as EventEmitter_2 } from '@mateosuarezdev/event-emitter';
|
|
17
18
|
import { FieldErrors } from 'react-hook-form';
|
|
18
19
|
import { FieldValues } from 'react-hook-form';
|
|
19
20
|
import { ForwardRefExoticComponent } from 'react';
|
|
21
|
+
import { ImgHTMLAttributes } from 'react';
|
|
20
22
|
import { InputHTMLAttributes } from 'react';
|
|
21
23
|
import { JSX } from 'react/jsx-runtime';
|
|
22
24
|
import { Locale } from 'date-fns';
|
|
@@ -423,6 +425,47 @@ declare type KeyMapping = {
|
|
|
423
425
|
[key: string]: (event: KeyboardEvent) => void;
|
|
424
426
|
};
|
|
425
427
|
|
|
428
|
+
/**
|
|
429
|
+
* LazyImage - Just the img element with lazy loading
|
|
430
|
+
* Use this when you want to provide your own wrapper
|
|
431
|
+
*/
|
|
432
|
+
export declare const LazyImage: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref">, "src"> & {
|
|
433
|
+
src: string;
|
|
434
|
+
alt: string;
|
|
435
|
+
/** Load image immediately without waiting for viewport */
|
|
436
|
+
eager?: boolean;
|
|
437
|
+
/** Intersection Observer root margin (e.g., '50px' to load before entering viewport) */
|
|
438
|
+
rootMargin?: string;
|
|
439
|
+
/** Intersection Observer threshold */
|
|
440
|
+
threshold?: number;
|
|
441
|
+
/** Disable fade-in animation */
|
|
442
|
+
noFade?: boolean;
|
|
443
|
+
} & RefAttributes<HTMLImageElement>>;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* LazyImageWrapped - Img element with a wrapper div
|
|
447
|
+
* Includes placeholder background and supports children overlays
|
|
448
|
+
*/
|
|
449
|
+
export declare const LazyImageWrapped: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref">, "src"> & {
|
|
450
|
+
src: string;
|
|
451
|
+
alt: string;
|
|
452
|
+
/** Load image immediately without waiting for viewport */
|
|
453
|
+
eager?: boolean;
|
|
454
|
+
/** Intersection Observer root margin (e.g., '50px' to load before entering viewport) */
|
|
455
|
+
rootMargin?: string;
|
|
456
|
+
/** Intersection Observer threshold */
|
|
457
|
+
threshold?: number;
|
|
458
|
+
/** Disable fade-in animation */
|
|
459
|
+
noFade?: boolean;
|
|
460
|
+
} & {
|
|
461
|
+
/** Custom className for the wrapper div */
|
|
462
|
+
wrapperClassName?: string;
|
|
463
|
+
/** Custom className for the img element */
|
|
464
|
+
imageClassName?: string;
|
|
465
|
+
/** Optional children to render inside the wrapper */
|
|
466
|
+
children?: React.ReactNode;
|
|
467
|
+
} & RefAttributes<HTMLImageElement>>;
|
|
468
|
+
|
|
426
469
|
export declare const List: ({ lightSolid, className, children, ...others }: {
|
|
427
470
|
lightSolid?: boolean;
|
|
428
471
|
className?: string;
|