indicator-ui 0.0.375 → 0.0.376

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.
@@ -11,6 +11,6 @@ export * from './useSmartPosition';
11
11
  export * from './useSmartScroll';
12
12
  export * from './useInteractiveZone';
13
13
  export * from './useSmartPlacementResolver';
14
- export * from './animations';
14
+ export * from './ui-animations';
15
15
  export * from './modalWindows';
16
16
  export * from './useScrollIndicators';
@@ -1,10 +1,10 @@
1
1
  import { RefObject } from "react";
2
- import { useBackgroundModalAnim } from "../animations";
2
+ import { useBackgroundModalAnim } from "../ui-animations";
3
3
  type UseBackgroundModalAnimOptionsPropsType = Exclude<Parameters<typeof useBackgroundModalAnim>['1'], undefined>;
4
4
  type OptionsType<C extends HTMLElement = HTMLElement> = UseBackgroundModalAnimOptionsPropsType & {
5
- containerClickAreaRef?: RefObject<C>;
5
+ containerClickAreaRef?: RefObject<C | null>;
6
6
  };
7
- type PropsType<T extends HTMLElement = HTMLElement> = [ref: RefObject<T>, options?: OptionsType];
7
+ type PropsType<T extends HTMLElement = HTMLElement> = [ref: RefObject<T | null>, options?: OptionsType];
8
8
  /**
9
9
  * Хук для backdrop-модального окна.
10
10
  *
@@ -1,10 +1,10 @@
1
1
  import { RefObject } from "react";
2
2
  import { useInteractiveZone } from "../useInteractiveZone";
3
- import { useModalAnim } from "../animations";
3
+ import { useModalAnim } from "../ui-animations";
4
4
  type UseModalAnimOptionsPropsType = Exclude<Parameters<typeof useModalAnim>['1'], undefined>;
5
5
  type UseInteractiveZoneOptionsPropsType = Exclude<Parameters<typeof useInteractiveZone>['2'], undefined>;
6
6
  type OptionsType = Pick<UseInteractiveZoneOptionsPropsType, 'addition'> & UseModalAnimOptionsPropsType;
7
- type PropsType<T extends HTMLElement = HTMLElement> = [ref: RefObject<T>, options?: OptionsType];
7
+ type PropsType<T extends HTMLElement = HTMLElement> = [ref: RefObject<T | null>, options?: OptionsType];
8
8
  /**
9
9
  * Хук для модального окна.
10
10
  *
@@ -1,2 +1,3 @@
1
1
  export * from './modalAnimations';
2
2
  export * from './backdropModalAnimations';
3
+ export * from './shimmerAnimation';
@@ -0,0 +1,14 @@
1
+ type AnimationTypes = 'default';
2
+ type TimelineType = gsap.core.Timeline;
3
+ type AnimationItemType = (timeline: TimelineType) => TimelineType;
4
+ type AnimationItemWithOptionsType = (timeline: TimelineType, options?: {
5
+ instance?: boolean;
6
+ }) => TimelineType;
7
+ type AnimationValueType = {
8
+ appear: AnimationItemWithOptionsType;
9
+ disappear: AnimationItemType;
10
+ };
11
+ type AnimationsType = Record<AnimationTypes, AnimationValueType>;
12
+ type PropsType = [element: HTMLElement];
13
+ export declare const SHIMMER_ANIMATIONS: (...args: PropsType) => AnimationsType;
14
+ export {};
@@ -1,2 +1,3 @@
1
1
  export * from './useModalAnim';
2
2
  export * from './useBackgroundModalAnim';
3
+ export * from './useShimmer';
@@ -0,0 +1,17 @@
1
+ import { CSSProperties, RefObject } from "react";
2
+ type OptionsType = {
3
+ initIsActive?: boolean;
4
+ shimmerClassName?: string;
5
+ shimmerStyle?: CSSProperties;
6
+ };
7
+ type PropsType<T extends HTMLElement = HTMLElement> = [
8
+ ref: RefObject<T>,
9
+ options?: OptionsType
10
+ ];
11
+ type FunReturnType = {
12
+ startLoading: () => void;
13
+ stopLoading: () => void;
14
+ switchLoading: () => void;
15
+ };
16
+ export declare function useShimmer(...args: PropsType): FunReturnType;
17
+ export {};
@@ -31,7 +31,7 @@ type OnScrollPropsType = {
31
31
  parts: [number, number, number];
32
32
  };
33
33
  type PropsType<T> = [
34
- ref: React.RefObject<T>,
34
+ ref: React.RefObject<T | null>,
35
35
  callbacks?: {
36
36
  onScrollStart?: () => void;
37
37
  onScrollEnd?: () => void;
@@ -0,0 +1 @@
1
+ export declare function UIAnimationsPage(): JSX.Element;
@@ -22,3 +22,4 @@ export * from './DateTimeFieldsPage';
22
22
  export * from './UseSmartPositionPage';
23
23
  export * from './UseSmartScrollPage';
24
24
  export * from './ModalsPage';
25
+ export * from './UiAnimationsPage';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "indicator-ui",
3
- "version": "0.0.375",
3
+ "version": "0.0.376",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/types/src/index.d.ts",
6
6
  "style": "dist/index.css",