dt-shared-front 2.2.117 → 2.2.118

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.
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { PropsWithModal } from '@shared/modal';
3
+ export interface IImageGalleryImage {
4
+ src: string;
5
+ alt?: string;
6
+ thumbnail?: string;
7
+ }
8
+ export interface IImageGalleryModalData {
9
+ images: IImageGalleryImage[];
10
+ initialIndex?: number;
11
+ showThumbnails?: boolean;
12
+ }
13
+ export interface IImageGalleryProps {
14
+ images: IImageGalleryImage[];
15
+ initialIndex?: number;
16
+ className?: string;
17
+ onImageClick?: (index: number) => void;
18
+ showThumbnails?: boolean;
19
+ }
20
+ /**
21
+ * Компонент галереи изображений с превью
22
+ *
23
+ * @param {IImageGalleryImage[]} images - Массив изображений для отображения
24
+ * @param {number} [initialIndex=0] - Начальный индекс активного изображения
25
+ * @param {string} [className] - Дополнительный CSS класс
26
+ * @param {function} [onImageClick] - Обработчик клика по изображению
27
+ * @param {boolean} [showThumbnails=true] - Показывать ли превью изображения
28
+ */
29
+ export declare const ImageGallery: React.FC<IImageGalleryProps>;
30
+ export declare const ImageGalleryModal: React.FC<PropsWithModal<{}, IImageGalleryModalData>>;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { ImageGallery } from './image-gallery';
3
+ declare const meta: Meta<typeof ImageGallery>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof ImageGallery>;
6
+ export declare const ImageGalleryWithModal: Story;
7
+ export declare const BasicImageGallery: Story;
@@ -0,0 +1,4 @@
1
+ export { ImageGallery, ImageGalleryModal } from './image-gallery';
2
+ export type { IImageGalleryProps, IImageGalleryImage, IImageGalleryModalData } from './image-gallery';
3
+ export { sampleImageUrls } from './sample-images';
4
+ export type { IImageUrl } from './sample-images';
@@ -0,0 +1,7 @@
1
+ export interface IImageUrl {
2
+ thumbWebp?: string;
3
+ thumbJpeg?: string;
4
+ jpeg: string;
5
+ webp?: string;
6
+ }
7
+ export declare const sampleImageUrls: IImageUrl[];
@@ -70,4 +70,4 @@ export declare const Input: React.ForwardRefExoticComponent<{
70
70
  onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
71
71
  onSearch?: ((val: string) => void) | ((val: string) => Promise<void>);
72
72
  valueTransformer?: (value: string) => string;
73
- } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "size" | "variant"> & React.RefAttributes<HTMLInputElement>>;
73
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "variant" | "size"> & React.RefAttributes<HTMLInputElement>>;
@@ -8,7 +8,7 @@ declare const _default: {
8
8
  className?: string;
9
9
  onChange?: (value: boolean) => void;
10
10
  disabled?: boolean;
11
- size?: "small" | "large" | "medium";
11
+ size?: "small" | "medium" | "large";
12
12
  }) => React.JSX.Element;
13
13
  };
14
14
  export default _default;
@@ -28,4 +28,4 @@ export declare const TextArea: React.ForwardRefExoticComponent<{
28
28
  onClear?: () => void;
29
29
  onSearch?: (e: any) => void;
30
30
  onChange?: (value: string, event?: ChangeEvent<HTMLTextAreaElement>) => void;
31
- } & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "size" | "variant"> & React.RefAttributes<HTMLTextAreaElement>>;
31
+ } & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "variant" | "size"> & React.RefAttributes<HTMLTextAreaElement>>;
package/dist/index.d.ts CHANGED
@@ -22,6 +22,8 @@ export { Menu } from './components/menu';
22
22
  export { Modal, ModalProvider, useModal } from './components/modal';
23
23
  export type { PropsWithModal } from './components/modal';
24
24
  export { Gallery } from './components/gallery';
25
+ export { ImageGallery } from './components/image-gallery';
26
+ export type { IImageGalleryProps, IImageGalleryImage } from './components/image-gallery';
25
27
  export { Radio } from './components/radio';
26
28
  export { RangePicker } from './components/range-picker';
27
29
  export { Select } from './components/select';