@ws-ui/shared 0.0.3 → 0.0.5

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,4 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export declare function Incase(props: PropsWithChildren<{
3
+ of: any;
4
+ }>): JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ import { TTip } from '../interfaces';
3
+ declare const CarouselTip: FC<{
4
+ pages?: TTip[];
5
+ }>;
6
+ export default CarouselTip;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface ITextTipProps {
3
+ body: string;
4
+ isInsideCarousel?: boolean;
5
+ }
6
+ declare const TextTip: React.FC<ITextTipProps>;
7
+ export default TextTip;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { IVideoTip } from '../interfaces';
3
+ declare const VideoTip: FC<Partial<Omit<IVideoTip, 'type'>>>;
4
+ export default VideoTip;
@@ -0,0 +1,3 @@
1
+ import { TTip } from '../interfaces';
2
+ declare const renderTip: (tip: TTip, isInsideCarousel?: boolean) => JSX.Element;
3
+ export default renderTip;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ export declare const Tip: FC<{
3
+ tipKey: string;
4
+ side?: 'left' | 'right';
5
+ alwaysOn?: boolean;
6
+ asButton?: boolean;
7
+ }>;
@@ -0,0 +1,27 @@
1
+ export declare enum ETipType {
2
+ VIDEO = "video",
3
+ CAROUSEL = "carousel",
4
+ TEXT = "text"
5
+ }
6
+ export interface ITip {
7
+ key: string;
8
+ type: ETipType;
9
+ body: string;
10
+ }
11
+ export interface IVideoTip extends ITip {
12
+ type: ETipType.VIDEO;
13
+ title: string;
14
+ video: {
15
+ provider: string;
16
+ link: string;
17
+ };
18
+ isInsideCarousel?: boolean;
19
+ }
20
+ export interface ITextTip extends ITip {
21
+ type: ETipType.TEXT;
22
+ }
23
+ export interface ICarouselTip extends ITip {
24
+ type: ETipType.CAROUSEL;
25
+ pages: (IVideoTip | ITextTip)[];
26
+ }
27
+ export type TTip = IVideoTip | ITextTip | ICarouselTip;
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ import { TTip } from './interfaces';
3
+ export declare const TipsProvider: FC<{
4
+ enabled?: boolean;
5
+ }>;
6
+ export declare const useTip: (key?: string) => {
7
+ tip: TTip | null;
8
+ toggleTips: () => void;
9
+ show: boolean;
10
+ enabled: boolean | undefined;
11
+ };
@@ -2,3 +2,4 @@ export * from './Dialog';
2
2
  export * from './Portal';
3
3
  export * from './Toast';
4
4
  export * from './Tree';
5
+ export * from './Incase';
@@ -3,6 +3,5 @@ export * from './use-hotkeys';
3
3
  export * from './use-outside-click';
4
4
  export * from './use-previous';
5
5
  export * from './use-state-ref';
6
- export * from './use-enhanced-state/useEnhancedState';
7
6
  export * from './useIdentity';
8
7
  export * from './useStateObject';