indicator-ui 0.1.42 → 0.1.44
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.css +31 -14
- package/dist/index.css.map +1 -1
- package/dist/index.js +368 -295
- package/dist/index.js.map +1 -1
- package/dist/scss/ui/Buttons/styles/mixins/properties/secondary-color.scss +1 -1
- package/dist/scss/ui/Buttons/styles/mixins/properties/secondary-gray.scss +1 -1
- package/dist/types/src/hooks/ui-animations/assets/carouselAnimations.d.ts +3 -0
- package/dist/types/src/hooks/ui-animations/useCarousel.d.ts +4 -2
- package/dist/types/src/ui/MediaViewer/types/MediaViewerTypes.d.ts +0 -4
- package/dist/types/src/ui/MediaViewer/types/components/index.d.ts +0 -3
- package/dist/types/src/ui/MediaViewer/ui/MediaViewer.d.ts +1 -1
- package/dist/types/src/ui/MediaViewer/ui/components/ControlBar.d.ts +7 -2
- package/dist/types/src/ui/MediaViewer/ui/components/ImageViewer.d.ts +7 -2
- package/dist/types/src/ui/MediaViewer/ui/components/VideoViewer.d.ts +14 -2
- package/dist/types/src/ui/Toggle/types/ToggleTypes.d.ts +2 -0
- package/dist/types/src/ui/VideoPlayerBase/index.d.ts +0 -1
- package/dist/types/src/ui/VideoPlayerBase/ui/VideoPlayerBase.d.ts +68 -2
- package/package.json +1 -1
- package/dist/types/src/ui/MediaViewer/types/components/ControlBarTypes.d.ts +0 -9
- package/dist/types/src/ui/MediaViewer/types/components/ImageViewerTypes.d.ts +0 -3
- package/dist/types/src/ui/MediaViewer/types/components/VideoViewerTypes.d.ts +0 -6
- package/dist/types/src/ui/VideoPlayerBase/types/VideoPlayerBaseTypes.d.ts +0 -77
- package/dist/types/src/ui/VideoPlayerBase/types/index.d.ts +0 -1
|
@@ -3,6 +3,9 @@ export declare function CAROUSEL_ANIM(): {
|
|
|
3
3
|
jumpTo: (track: HTMLElement, timeline: gsap.core.Timeline, params: {
|
|
4
4
|
x: number;
|
|
5
5
|
}) => gsap.core.Timeline;
|
|
6
|
+
instantJumpTo: (track: HTMLElement, timeline: gsap.core.Timeline, params: {
|
|
7
|
+
x: number;
|
|
8
|
+
}) => gsap.core.Timeline;
|
|
6
9
|
getElInitStyle: () => CSSProperties;
|
|
7
10
|
getTrackInitStyle: () => CSSProperties;
|
|
8
11
|
getObjInitStyle: () => CSSProperties;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
1
2
|
import { SmartRefType } from "../../hooks";
|
|
2
3
|
import { CAROUSEL_ANIM } from "./assets";
|
|
3
4
|
type PropsType = [
|
|
4
5
|
ref: SmartRefType<HTMLElement>,
|
|
5
6
|
trackRef: SmartRefType<HTMLElement>
|
|
6
7
|
];
|
|
7
|
-
type FunReturnType = Pick<ReturnType<typeof CAROUSEL_ANIM>, 'getTrackInitStyle' | '
|
|
8
|
+
type FunReturnType = Pick<ReturnType<typeof CAROUSEL_ANIM>, 'getTrackInitStyle' | 'getObjInitStyle'> & {
|
|
8
9
|
showEl: (el: number | HTMLElement) => void;
|
|
9
|
-
|
|
10
|
+
showElInstant: (el: number | HTMLElement) => void;
|
|
11
|
+
getElStyle: () => CSSProperties;
|
|
10
12
|
};
|
|
11
13
|
export declare function useCarousel(...args: PropsType): FunReturnType;
|
|
12
14
|
export {};
|
|
@@ -13,9 +13,5 @@ export type MediaViewerPropsType = {
|
|
|
13
13
|
media?: MediaViewerMediaType;
|
|
14
14
|
mediaIndex?: number;
|
|
15
15
|
onClose?: () => void;
|
|
16
|
-
/**
|
|
17
|
-
* Не показывает элементы, которые находятся не рядом с текущим (curIndex +- 1).
|
|
18
|
-
* */
|
|
19
|
-
nearestElementsOnly?: boolean;
|
|
20
16
|
style?: CSSProperties;
|
|
21
17
|
};
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { MediaViewerPropsType } from "../types";
|
|
3
3
|
type RefType = {
|
|
4
4
|
obj: HTMLDivElement | null;
|
|
5
|
-
changeCurMedia: (idx: number,
|
|
5
|
+
changeCurMedia: (idx: number, instant?: boolean) => void;
|
|
6
6
|
};
|
|
7
7
|
export declare const MediaViewer: React.ForwardRefExoticComponent<MediaViewerPropsType & React.RefAttributes<RefType>>;
|
|
8
8
|
export {};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type PropsType = {
|
|
2
|
+
onClose?: () => void;
|
|
3
|
+
onPrev?: () => void;
|
|
4
|
+
onNext?: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function ControlBar(props: PropsType): JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
|
+
type PropsType = {
|
|
3
|
+
src: string;
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
};
|
|
6
|
+
export declare const ImageViewer: React.ForwardRefExoticComponent<PropsType & React.RefAttributes<HTMLImageElement>>;
|
|
7
|
+
export {};
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
|
+
type PropsType = {
|
|
3
|
+
src: string;
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
};
|
|
6
|
+
type RefType = {
|
|
7
|
+
obj: HTMLDivElement | null;
|
|
8
|
+
mute: () => void;
|
|
9
|
+
unmute: () => void;
|
|
10
|
+
play: () => void;
|
|
11
|
+
pause: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const VideoViewer: React.ForwardRefExoticComponent<PropsType & React.RefAttributes<RefType>>;
|
|
14
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { ToggleBaseSizeType } from "../../../ui";
|
|
2
3
|
type AdditionElementPropsType = {
|
|
3
4
|
isHover?: boolean;
|
|
4
5
|
active?: boolean;
|
|
@@ -34,5 +35,6 @@ export type TogglePropsType = {
|
|
|
34
35
|
* */
|
|
35
36
|
textAfterElement?: AdditionElementType;
|
|
36
37
|
theme?: "light" | "dark";
|
|
38
|
+
size?: ToggleBaseSizeType;
|
|
37
39
|
};
|
|
38
40
|
export {};
|
|
@@ -1,2 +1,68 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
type RefType = {
|
|
3
|
+
obj: HTMLVideoElement | null;
|
|
4
|
+
play: () => void;
|
|
5
|
+
pause: () => void;
|
|
6
|
+
switchPlay: () => boolean;
|
|
7
|
+
time: number | undefined;
|
|
8
|
+
volume: number | undefined;
|
|
9
|
+
setTime: (time: number) => void;
|
|
10
|
+
setVolume: (volume: number) => void;
|
|
11
|
+
};
|
|
12
|
+
type VideoPlayerBasePropsType = {
|
|
13
|
+
/**
|
|
14
|
+
* Ссылка на видео.
|
|
15
|
+
* */
|
|
16
|
+
src?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Включить/Выключить браузерные плеер.
|
|
19
|
+
*
|
|
20
|
+
* *По умолчанию:* false.
|
|
21
|
+
* */
|
|
22
|
+
browserControl?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Включить/Выключить звук.
|
|
25
|
+
*
|
|
26
|
+
* *По умолчанию:* false.
|
|
27
|
+
* */
|
|
28
|
+
muted?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Автоматическое воспроизведение видео.
|
|
31
|
+
*
|
|
32
|
+
* *По умолчанию:* false.
|
|
33
|
+
* */
|
|
34
|
+
autoPlay?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* `Callback` при изменение длинные видео.
|
|
37
|
+
* */
|
|
38
|
+
onChangeDuration?: (duration: number) => void;
|
|
39
|
+
/**
|
|
40
|
+
* `Callback` при изменение текущего момента просмотра видео.
|
|
41
|
+
* */
|
|
42
|
+
onChangeTime?: (time: number) => void;
|
|
43
|
+
/**
|
|
44
|
+
* `Callback` при изменение уровня звука видео.
|
|
45
|
+
* */
|
|
46
|
+
onChangeVolume?: (volume: number) => void;
|
|
47
|
+
/**
|
|
48
|
+
* `Callback` при изменение состояния проигрыша видео.
|
|
49
|
+
* */
|
|
50
|
+
onChangePlay?: (play: boolean) => void;
|
|
51
|
+
/**
|
|
52
|
+
* `Callback`, когда видео не хватает данных для показа (можно показать знак загрузки).
|
|
53
|
+
* */
|
|
54
|
+
onWaiting?: () => void;
|
|
55
|
+
/**
|
|
56
|
+
* `Callback`, когда видео загрузило достаточно данных, чтобы начать воспроизведение (можно убрать знак загрузки).
|
|
57
|
+
* */
|
|
58
|
+
onCanPlay?: () => void;
|
|
59
|
+
/**
|
|
60
|
+
* Зацикливает видео.
|
|
61
|
+
*
|
|
62
|
+
* *По умолчанию:* false.
|
|
63
|
+
* */
|
|
64
|
+
loop?: boolean;
|
|
65
|
+
lazyLoad?: boolean;
|
|
66
|
+
};
|
|
67
|
+
export declare const VideoPlayerBase: React.ForwardRefExoticComponent<VideoPlayerBasePropsType & Omit<React.HTMLAttributes<HTMLVideoElement>, keyof VideoPlayerBasePropsType> & React.RefAttributes<RefType>>;
|
|
68
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
export type VideoPlayerBasePropsType = {
|
|
2
|
-
/**
|
|
3
|
-
* Ссылка на видео.
|
|
4
|
-
* */
|
|
5
|
-
src?: string;
|
|
6
|
-
/**
|
|
7
|
-
* Включить/Выключить браузерные плейр.
|
|
8
|
-
*
|
|
9
|
-
* *По умолчанию:* false.
|
|
10
|
-
* */
|
|
11
|
-
browserControl?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Включить/Выключить звук.
|
|
14
|
-
*
|
|
15
|
-
* *По умолчанию:* false.
|
|
16
|
-
* */
|
|
17
|
-
muted?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Автоматическое воспроизведение видео.
|
|
20
|
-
*
|
|
21
|
-
* *По умолчанию:* false.
|
|
22
|
-
* */
|
|
23
|
-
autoPlay?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* `Callback` при изменение длинные видео.
|
|
26
|
-
* */
|
|
27
|
-
onChangeDuration?: (duration: number) => void;
|
|
28
|
-
/**
|
|
29
|
-
* `Callback` при изменение текущего момента просмотра видео.
|
|
30
|
-
* */
|
|
31
|
-
onChangeTime?: (time: number) => void;
|
|
32
|
-
/**
|
|
33
|
-
* `Callback` при изменение уровня звука видео.
|
|
34
|
-
* */
|
|
35
|
-
onChangeVolume?: (volume: number) => void;
|
|
36
|
-
/**
|
|
37
|
-
* `Callback` при изменение состояния проигрыша видео.
|
|
38
|
-
* */
|
|
39
|
-
onChangePlay?: (play: boolean) => void;
|
|
40
|
-
/**
|
|
41
|
-
* `Callback`, когда видео не хватает данных для показа (можно показать знак загрузки).
|
|
42
|
-
* */
|
|
43
|
-
onWaiting?: () => void;
|
|
44
|
-
/**
|
|
45
|
-
* `Callback`, когда видео загрузило достаточно данных, чтобы начать воспроизведение (можно убрать знак загрузки).
|
|
46
|
-
* */
|
|
47
|
-
onCanPlay?: () => void;
|
|
48
|
-
/**
|
|
49
|
-
* Текущий момент просмотра видео.
|
|
50
|
-
*
|
|
51
|
-
* __Компонент реагирует на его изменение.__
|
|
52
|
-
* */
|
|
53
|
-
time?: number;
|
|
54
|
-
/**
|
|
55
|
-
* Текущий уровень звука видео.
|
|
56
|
-
*
|
|
57
|
-
* __Компонент реагирует на его изменение.__
|
|
58
|
-
* */
|
|
59
|
-
volume?: number;
|
|
60
|
-
/**
|
|
61
|
-
* Play/Pause.
|
|
62
|
-
*
|
|
63
|
-
* * При ```play === true``` состояние *Play*.
|
|
64
|
-
* * При ```play === false``` состояние *Pause*.
|
|
65
|
-
*
|
|
66
|
-
* *По умолчанию:* false.
|
|
67
|
-
* */
|
|
68
|
-
play?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Зацикливает видео.
|
|
71
|
-
*
|
|
72
|
-
* *По умолчанию:* false.
|
|
73
|
-
* */
|
|
74
|
-
loop?: boolean;
|
|
75
|
-
lazyLoad?: boolean;
|
|
76
|
-
className?: string;
|
|
77
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './VideoPlayerBaseTypes';
|