indicator-ui 0.1.41 → 0.1.43

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.
Files changed (25) hide show
  1. package/dist/index.css +78 -14
  2. package/dist/index.css.map +1 -1
  3. package/dist/index.js +403 -330
  4. package/dist/index.js.map +1 -1
  5. package/dist/scss/ui/Buttons/styles/mixins/properties/secondary-color.scss +1 -1
  6. package/dist/scss/ui/Buttons/styles/mixins/properties/secondary-gray.scss +1 -1
  7. package/dist/types/src/hooks/ui-animations/assets/carouselAnimations.d.ts +3 -0
  8. package/dist/types/src/hooks/ui-animations/useCarousel.d.ts +4 -2
  9. package/dist/types/src/hooks/useIsErrorField.d.ts +4 -2
  10. package/dist/types/src/ui/FormBuilder/ui/FormBuilder.d.ts +2 -4
  11. package/dist/types/src/ui/InputFields/TextareaField/types/TextareaFieldTypes.d.ts +1 -0
  12. package/dist/types/src/ui/MediaViewer/types/MediaViewerTypes.d.ts +0 -4
  13. package/dist/types/src/ui/MediaViewer/types/components/index.d.ts +0 -3
  14. package/dist/types/src/ui/MediaViewer/ui/MediaViewer.d.ts +1 -1
  15. package/dist/types/src/ui/MediaViewer/ui/components/ControlBar.d.ts +7 -2
  16. package/dist/types/src/ui/MediaViewer/ui/components/ImageViewer.d.ts +7 -2
  17. package/dist/types/src/ui/MediaViewer/ui/components/VideoViewer.d.ts +14 -2
  18. package/dist/types/src/ui/VideoPlayerBase/index.d.ts +0 -1
  19. package/dist/types/src/ui/VideoPlayerBase/ui/VideoPlayerBase.d.ts +68 -2
  20. package/package.json +1 -1
  21. package/dist/types/src/ui/MediaViewer/types/components/ControlBarTypes.d.ts +0 -9
  22. package/dist/types/src/ui/MediaViewer/types/components/ImageViewerTypes.d.ts +0 -3
  23. package/dist/types/src/ui/MediaViewer/types/components/VideoViewerTypes.d.ts +0 -6
  24. package/dist/types/src/ui/VideoPlayerBase/types/VideoPlayerBaseTypes.d.ts +0 -77
  25. package/dist/types/src/ui/VideoPlayerBase/types/index.d.ts +0 -1
@@ -42,7 +42,7 @@
42
42
  }
43
43
 
44
44
  @mixin secondaryColorDarkThemeButton {
45
- background-color: var(--base-black);
45
+ background-color: transparent;
46
46
  border: 1px solid var(--rose-900);
47
47
 
48
48
  .icon {
@@ -51,7 +51,7 @@
51
51
  }
52
52
 
53
53
  @mixin secondaryGrayDarkThemeButton {
54
- background-color: var(--gray-iron-950);
54
+ background-color: transparent;
55
55
  border: 1px solid var(--gray-iron-700);
56
56
 
57
57
  .icon {
@@ -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' | 'getElInitStyle' | 'getObjInitStyle'> & {
8
+ type FunReturnType = Pick<ReturnType<typeof CAROUSEL_ANIM>, 'getTrackInitStyle' | 'getObjInitStyle'> & {
8
9
  showEl: (el: number | HTMLElement) => void;
9
- showElInstance: (el: number | HTMLElement) => void;
10
+ showElInstant: (el: number | HTMLElement) => void;
11
+ getElStyle: () => CSSProperties;
10
12
  };
11
13
  export declare function useCarousel(...args: PropsType): FunReturnType;
12
14
  export {};
@@ -17,7 +17,9 @@ export type UseIsErrorFieldReturnType = {
17
17
  clearErrors: () => void;
18
18
  isError: UseIsErrorFieldIsErrorType;
19
19
  };
20
- export declare function useIsErrorField({ additionIsErrorFields, sensitiveSearch, }?: {
20
+ type PropsType = {
21
21
  additionIsErrorFields?: UseIsErrorFieldIsErrorType;
22
22
  sensitiveSearch?: boolean;
23
- }): UseIsErrorFieldReturnType;
23
+ };
24
+ export declare function useIsErrorField(props?: PropsType): UseIsErrorFieldReturnType;
25
+ export {};
@@ -2,11 +2,9 @@ import React, { ReactElement } from "react";
2
2
  import { FormBuilderPropsType } from "../types";
3
3
  type RefType<T extends Record<string, unknown>> = {
4
4
  getFormData: () => T;
5
- checkFormDataValid: () => boolean;
6
- highlightErrors: () => void;
7
5
  clearFormData: () => void;
8
- setField: <K extends keyof T>(name: K, value: T[K]) => void;
9
- setFieldError: <K extends keyof T>(name: K, value: T[K]) => void;
6
+ resetFormData: () => void;
7
+ clearErrors: () => void;
10
8
  };
11
9
  export declare const FormBuilder: <T extends Record<string, unknown> = Record<string, unknown>>(props: FormBuilderPropsType<T> & React.RefAttributes<RefType<T>>) => ReactElement | null;
12
10
  export {};
@@ -9,4 +9,5 @@ export type TextareaFieldPropsType = FieldsBasePropsType<string> & {
9
9
  * По умолчанию: ```false```
10
10
  * */
11
11
  autoResize?: boolean;
12
+ theme?: "light" | "dark";
12
13
  };
@@ -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
  };
@@ -1,4 +1 @@
1
- export * from './VideoViewerTypes';
2
- export * from './ImageViewerTypes';
3
- export * from './ControlBarTypes';
4
1
  export * from './ProgressBarTypes';
@@ -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, instance?: boolean) => void;
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
- import { ControlBarPropsType } from "../../types";
2
- export declare function ControlBar({ play, muted, onMute, onPlay, onClose, onPrev, onNext }: ControlBarPropsType): JSX.Element;
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 { ImageViewerPropsType } from "../../types";
2
- export declare function ImageViewer({ src }: ImageViewerPropsType): JSX.Element;
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 { VideoViewerPropsType } from '../../types';
2
- export declare function VideoViewer({ play, muted, src, onChangePlay }: VideoViewerPropsType): JSX.Element;
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,2 +1 @@
1
1
  export * from './ui';
2
- export * from './types';
@@ -1,2 +1,68 @@
1
- import { VideoPlayerBasePropsType } from "../types";
2
- export declare function VideoPlayerBase({ src, browserControl, muted, onChangeDuration, onChangeTime, onChangeVolume, onChangePlay, onCanPlay, onWaiting, time, volume, play, loop, autoPlay, lazyLoad, className, }: VideoPlayerBasePropsType): JSX.Element;
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,6 +1,6 @@
1
1
  {
2
2
  "name": "indicator-ui",
3
- "version": "0.1.41",
3
+ "version": "0.1.43",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/types/src/index.d.ts",
6
6
  "style": "dist/index.css",
@@ -1,9 +0,0 @@
1
- export type ControlBarPropsType = {
2
- muted?: boolean;
3
- play?: boolean;
4
- onClose?: () => void;
5
- onPrev?: () => void;
6
- onNext?: () => void;
7
- onMute?: () => void;
8
- onPlay?: () => void;
9
- };
@@ -1,3 +0,0 @@
1
- export type ImageViewerPropsType = {
2
- src: string;
3
- };
@@ -1,6 +0,0 @@
1
- export type VideoViewerPropsType = {
2
- src: string;
3
- muted?: boolean;
4
- play?: boolean;
5
- onChangePlay?: (play: boolean) => void;
6
- };
@@ -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';