@aic-kits/react 0.1.0 → 0.1.2
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/components/Base/types.d.ts +5 -34
- package/dist/components/Button/StyledButton.d.ts +6 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Divider/StyledDivider.d.ts +12 -0
- package/dist/components/Divider/index.d.ts +21 -0
- package/dist/components/Header/index.d.ts +4 -0
- package/dist/components/Header/types.d.ts +57 -0
- package/dist/components/Input/StyledInput.d.ts +11 -0
- package/dist/components/Input/index.d.ts +54 -0
- package/dist/components/List/index.d.ts +46 -0
- package/dist/components/Skeleton/SkeletonBackground.d.ts +11 -0
- package/dist/components/Skeleton/SkeletonWrapper.d.ts +37 -0
- package/dist/components/Skeleton/index.d.ts +4 -0
- package/dist/components/Skeleton/types.d.ts +19 -0
- package/dist/components/Vimeo/Player.d.ts +26 -0
- package/dist/components/Vimeo/constants.d.ts +17 -0
- package/dist/components/Vimeo/index.d.ts +5 -0
- package/dist/components/Vimeo/types.d.ts +115 -0
- package/dist/components/Vimeo/utils.d.ts +17 -0
- package/dist/components/index.d.ts +8 -2
- package/dist/index.cjs +128 -43
- package/dist/index.js +4144 -3523
- package/dist/theme/components/divider.d.ts +6 -0
- package/dist/theme/components/header.d.ts +7 -0
- package/dist/theme/components/index.d.ts +19 -1
- package/dist/theme/components/input.d.ts +14 -0
- package/dist/theme/components/list.d.ts +6 -0
- package/dist/theme/components/skeleton.d.ts +22 -0
- package/dist/theme/components/vimeo.d.ts +15 -0
- package/package.json +2 -2
- package/dist/components/Base/BaseFooter.d.ts +0 -8
|
@@ -1,44 +1,15 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Color } from '../../theme';
|
|
3
2
|
import { BoxProps } from '../Box';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* The title of the button
|
|
7
|
-
*/
|
|
8
|
-
title: string;
|
|
9
|
-
/**
|
|
10
|
-
* The onPress event handler
|
|
11
|
-
*/
|
|
12
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
13
|
-
/**
|
|
14
|
-
* The loading state of the button
|
|
15
|
-
*
|
|
16
|
-
* @default false
|
|
17
|
-
*/
|
|
18
|
-
loading?: boolean;
|
|
19
|
-
};
|
|
20
|
-
export interface BaseFooterProps {
|
|
21
|
-
/**
|
|
22
|
-
* The params for the primary button
|
|
23
|
-
*/
|
|
24
|
-
primaryButton?: BaseButtonParams;
|
|
25
|
-
/**
|
|
26
|
-
* The params for the secondary button
|
|
27
|
-
*/
|
|
28
|
-
secondaryButton?: BaseButtonParams;
|
|
29
|
-
}
|
|
30
|
-
export interface BaseProps extends BoxProps, BaseFooterProps {
|
|
3
|
+
import { HeaderProps } from '../Header/types';
|
|
4
|
+
export interface BaseProps extends BoxProps {
|
|
31
5
|
/**
|
|
32
6
|
* The background color of the Base component
|
|
33
7
|
*/
|
|
34
8
|
backgroundColor?: Color;
|
|
35
9
|
/**
|
|
36
10
|
* The params for the header
|
|
11
|
+
* Can be set to false to hide the header
|
|
12
|
+
* Can provide a HeaderProps object to customize the header
|
|
37
13
|
*/
|
|
38
|
-
header?:
|
|
39
|
-
title?: string;
|
|
40
|
-
showBackButton?: boolean;
|
|
41
|
-
onBackButtonClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
42
|
-
backgroundColor?: Color;
|
|
43
|
-
} | false;
|
|
14
|
+
header?: HeaderProps | false;
|
|
44
15
|
}
|
|
@@ -2,8 +2,13 @@ import { Color } from '../../theme/common';
|
|
|
2
2
|
type ButtonContainerProps = {
|
|
3
3
|
backgroundColor: Color | 'disabled';
|
|
4
4
|
borderRadius: string;
|
|
5
|
+
disabled?: boolean;
|
|
5
6
|
};
|
|
6
|
-
declare const StyledButtonContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('
|
|
7
|
+
declare const StyledButtonContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
|
|
8
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
9
|
+
}, ButtonContainerProps>> & string & Omit<(props: import('..').BoxProps & {
|
|
10
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
11
|
+
}) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof import('react').Component<any, {}, any>>;
|
|
7
12
|
type ButtonTextProps = {
|
|
8
13
|
themeColor: Color | 'disabled';
|
|
9
14
|
themeTextColor?: Color;
|
|
@@ -24,7 +24,7 @@ export interface ButtonProps {
|
|
|
24
24
|
/**
|
|
25
25
|
* Set the handler to handle click event.
|
|
26
26
|
*/
|
|
27
|
-
onClick?: React.MouseEventHandler<
|
|
27
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
28
28
|
/**
|
|
29
29
|
* Places an icon within the button, after the button's text
|
|
30
30
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Color } from '../../theme/common';
|
|
2
|
+
interface StyledDividerProps {
|
|
3
|
+
$orientation: 'horizontal' | 'vertical';
|
|
4
|
+
$color: Color;
|
|
5
|
+
$thickness: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const StyledDivider: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
|
|
8
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
9
|
+
}, StyledDividerProps>> & string & Omit<(props: import('..').BoxProps & {
|
|
10
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
11
|
+
}) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof import('react').Component<any, {}, any>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Color } from '../../theme/common';
|
|
3
|
+
import { BoxProps } from '../Box';
|
|
4
|
+
export interface DividerProps extends BoxProps {
|
|
5
|
+
/**
|
|
6
|
+
* The orientation of the divider.
|
|
7
|
+
* @default 'horizontal'
|
|
8
|
+
*/
|
|
9
|
+
orientation?: 'horizontal' | 'vertical';
|
|
10
|
+
/**
|
|
11
|
+
* The color of the divider.
|
|
12
|
+
* @default 'grey300'
|
|
13
|
+
*/
|
|
14
|
+
color?: Color;
|
|
15
|
+
/**
|
|
16
|
+
* The thickness of the divider in pixels.
|
|
17
|
+
* @default 1
|
|
18
|
+
*/
|
|
19
|
+
thickness?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare const Divider: React.FC<DividerProps>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Color } from '../../theme';
|
|
2
|
+
import { BoxProps } from '../Box';
|
|
3
|
+
export interface NavItem {
|
|
4
|
+
/**
|
|
5
|
+
* Label for the navigation item
|
|
6
|
+
*/
|
|
7
|
+
label: string;
|
|
8
|
+
/**
|
|
9
|
+
* URL or path for the navigation item
|
|
10
|
+
*/
|
|
11
|
+
path: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether this navigation item is currently active
|
|
14
|
+
*/
|
|
15
|
+
isActive?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface HeaderProps extends BoxProps {
|
|
18
|
+
/**
|
|
19
|
+
* Background color of the header
|
|
20
|
+
*/
|
|
21
|
+
backgroundColor?: Color;
|
|
22
|
+
/**
|
|
23
|
+
* Navigation items to display in the center of the header
|
|
24
|
+
*/
|
|
25
|
+
navItems?: NavItem[];
|
|
26
|
+
/**
|
|
27
|
+
* Whether to show the user is signed in
|
|
28
|
+
*/
|
|
29
|
+
isSignedIn?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* User profile information, shown when signed in
|
|
32
|
+
*/
|
|
33
|
+
userProfile?: {
|
|
34
|
+
name?: string;
|
|
35
|
+
avatar?: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Called when the logo is clicked
|
|
39
|
+
*/
|
|
40
|
+
onLogoClick?: () => void;
|
|
41
|
+
/**
|
|
42
|
+
* Called when a navigation item is clicked
|
|
43
|
+
*/
|
|
44
|
+
onNavItemClick?: (item: NavItem) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Called when the sign in button is clicked
|
|
47
|
+
*/
|
|
48
|
+
onSignInClick?: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Called when the register button is clicked
|
|
51
|
+
*/
|
|
52
|
+
onRegisterClick?: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* Called when the profile button is clicked
|
|
55
|
+
*/
|
|
56
|
+
onProfileClick?: () => void;
|
|
57
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Color } from '../../theme/common';
|
|
2
|
+
interface StyledInputContainerProps {
|
|
3
|
+
$isFocused: boolean;
|
|
4
|
+
$isDisabled: boolean;
|
|
5
|
+
$error: boolean;
|
|
6
|
+
$borderColor?: Color;
|
|
7
|
+
$bgColor?: Color;
|
|
8
|
+
}
|
|
9
|
+
export declare const StyledInputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledInputContainerProps>> & string;
|
|
10
|
+
export declare const StyledInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Color } from '../../theme/common';
|
|
3
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
4
|
+
/**
|
|
5
|
+
* The value of the input field
|
|
6
|
+
*/
|
|
7
|
+
value?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Callback when the input value changes
|
|
10
|
+
*/
|
|
11
|
+
onChange?: (text: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* The placeholder text
|
|
14
|
+
*/
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the input is disabled
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Error message to display
|
|
22
|
+
*/
|
|
23
|
+
error?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Label text to display above the input
|
|
26
|
+
*/
|
|
27
|
+
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Helper text to display below the input
|
|
30
|
+
*/
|
|
31
|
+
helperText?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Icon to display on the left side of the input
|
|
34
|
+
*/
|
|
35
|
+
leftIcon?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Icon to display on the right side of the input
|
|
38
|
+
*/
|
|
39
|
+
rightIcon?: React.ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Border color when focused
|
|
42
|
+
*/
|
|
43
|
+
borderColor?: Color;
|
|
44
|
+
/**
|
|
45
|
+
* Background color
|
|
46
|
+
*/
|
|
47
|
+
bgColor?: Color;
|
|
48
|
+
}
|
|
49
|
+
export interface InputRef {
|
|
50
|
+
focus: () => void;
|
|
51
|
+
blur: () => void;
|
|
52
|
+
value: string;
|
|
53
|
+
}
|
|
54
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Space } from '../../theme/common';
|
|
3
|
+
import { BoxProps } from '../Box';
|
|
4
|
+
export interface ListProps<T = any> extends BoxProps {
|
|
5
|
+
/**
|
|
6
|
+
* The data array to be rendered
|
|
7
|
+
*/
|
|
8
|
+
data?: T[];
|
|
9
|
+
/**
|
|
10
|
+
* Function to render an item from the data array
|
|
11
|
+
*/
|
|
12
|
+
renderItem?: (item: T, index: number) => React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Optional key extractor function
|
|
15
|
+
*/
|
|
16
|
+
keyExtractor?: (item: T, index: number) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Component to render when the list is empty
|
|
19
|
+
*/
|
|
20
|
+
ListEmptyComponent?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Component to render at the top of the list
|
|
23
|
+
*/
|
|
24
|
+
ListHeaderComponent?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Component to render at the bottom of the list
|
|
27
|
+
*/
|
|
28
|
+
ListFooterComponent?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Component to render between each item
|
|
31
|
+
*/
|
|
32
|
+
ItemSeparatorComponent?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Gap between items (overrides the theme gap)
|
|
35
|
+
*/
|
|
36
|
+
itemGap?: Space;
|
|
37
|
+
/**
|
|
38
|
+
* Additional props
|
|
39
|
+
*/
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}
|
|
42
|
+
declare function InternalList<T>({ data, renderItem, keyExtractor, ListEmptyComponent, ListHeaderComponent, ListFooterComponent, ItemSeparatorComponent, itemGap, ...rest }: ListProps<T>, ref: React.Ref<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare const List: <T>(props: ListProps<T> & {
|
|
44
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
45
|
+
}) => ReturnType<typeof InternalList>;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface SkeletonBackgroundProps {
|
|
3
|
+
$variant: 'circle' | 'rectangle' | 'rounded';
|
|
4
|
+
$duration: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const SkeletonBackgroundContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBackgroundProps>> & string;
|
|
7
|
+
export declare const SkeletonBackground: React.FC<{
|
|
8
|
+
variant: 'circle' | 'rectangle' | 'rounded';
|
|
9
|
+
duration?: number;
|
|
10
|
+
}>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface SkeletonWrapperProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the skeleton is visible
|
|
5
|
+
*/
|
|
6
|
+
visible: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Style of the skeleton
|
|
9
|
+
*/
|
|
10
|
+
variant: 'circle' | 'rectangle' | 'rounded';
|
|
11
|
+
/**
|
|
12
|
+
* Duration of the animation in ms
|
|
13
|
+
*/
|
|
14
|
+
animationDuration?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Children to render when not in skeleton state
|
|
17
|
+
*/
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Style of the wrapper
|
|
21
|
+
*/
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
/**
|
|
24
|
+
* Class name for the wrapper
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Width of the skeleton
|
|
29
|
+
*/
|
|
30
|
+
width?: string | number;
|
|
31
|
+
/**
|
|
32
|
+
* Height of the skeleton
|
|
33
|
+
*/
|
|
34
|
+
height?: string | number;
|
|
35
|
+
}
|
|
36
|
+
export declare const SkeletonWrapper: React.FC<SkeletonWrapperProps>;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BoxProps } from '../Box';
|
|
2
|
+
export interface SkeletonProps extends BoxProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the skeleton is visible
|
|
5
|
+
*/
|
|
6
|
+
visible?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Style of the skeleton
|
|
9
|
+
*/
|
|
10
|
+
variant?: 'circle' | 'rectangle' | 'rounded';
|
|
11
|
+
/**
|
|
12
|
+
* Children to render when not in skeleton state
|
|
13
|
+
*/
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Duration of the animation in ms
|
|
17
|
+
*/
|
|
18
|
+
animationDuration?: number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VimeoCallbacks, VimeoConfig } from './types';
|
|
3
|
+
interface PlayerProps {
|
|
4
|
+
/**
|
|
5
|
+
* The ID of the Vimeo video to play
|
|
6
|
+
*/
|
|
7
|
+
videoId: string;
|
|
8
|
+
/**
|
|
9
|
+
* Width of the player
|
|
10
|
+
*/
|
|
11
|
+
width?: string | number;
|
|
12
|
+
/**
|
|
13
|
+
* Height of the player
|
|
14
|
+
*/
|
|
15
|
+
height?: string | number;
|
|
16
|
+
/**
|
|
17
|
+
* Configuration options for the Vimeo player
|
|
18
|
+
*/
|
|
19
|
+
config?: VimeoConfig;
|
|
20
|
+
/**
|
|
21
|
+
* Callbacks for Vimeo player events
|
|
22
|
+
*/
|
|
23
|
+
callbacks?: VimeoCallbacks;
|
|
24
|
+
}
|
|
25
|
+
export declare const Player: React.FC<PlayerProps>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const DEFAULT_VIMEO_CONFIG: {
|
|
2
|
+
color: string;
|
|
3
|
+
autoplay: boolean;
|
|
4
|
+
muted: boolean;
|
|
5
|
+
loop: boolean;
|
|
6
|
+
title: boolean;
|
|
7
|
+
byline: boolean;
|
|
8
|
+
portrait: boolean;
|
|
9
|
+
dnt: boolean;
|
|
10
|
+
playsinline: boolean;
|
|
11
|
+
background: boolean;
|
|
12
|
+
controls: boolean;
|
|
13
|
+
pip: boolean;
|
|
14
|
+
responsive: boolean;
|
|
15
|
+
width: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const VIMEO_HOST = "https://player.vimeo.com";
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { BoxProps } from '../Box';
|
|
2
|
+
export interface VimeoConfig {
|
|
3
|
+
/**
|
|
4
|
+
* Whether to autoplay the video once loaded
|
|
5
|
+
*/
|
|
6
|
+
autoplay?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the video should start in a muted state
|
|
9
|
+
*/
|
|
10
|
+
muted?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the video should loop
|
|
13
|
+
*/
|
|
14
|
+
loop?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether to show the video title
|
|
17
|
+
*/
|
|
18
|
+
title?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether to show the author's byline
|
|
21
|
+
*/
|
|
22
|
+
byline?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to show the author's portrait
|
|
25
|
+
*/
|
|
26
|
+
portrait?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to disable tracking by Vimeo
|
|
29
|
+
*/
|
|
30
|
+
dnt?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Accent color for the player controls (hex code)
|
|
33
|
+
*/
|
|
34
|
+
color?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to play the video inline on mobile devices
|
|
37
|
+
*/
|
|
38
|
+
playsinline?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to play the video in the background (removes UI)
|
|
41
|
+
*/
|
|
42
|
+
background?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to show player controls
|
|
45
|
+
*/
|
|
46
|
+
controls?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether to enable picture-in-picture mode
|
|
49
|
+
*/
|
|
50
|
+
pip?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the player should be responsive
|
|
53
|
+
*/
|
|
54
|
+
responsive?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface VimeoCallbacks {
|
|
57
|
+
/**
|
|
58
|
+
* Callback when the video is ready to play
|
|
59
|
+
*/
|
|
60
|
+
onReady?: () => void;
|
|
61
|
+
/**
|
|
62
|
+
* Callback when the video starts playing
|
|
63
|
+
*/
|
|
64
|
+
onPlay?: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* Callback when the video is paused
|
|
67
|
+
*/
|
|
68
|
+
onPlayerPause?: () => void;
|
|
69
|
+
/**
|
|
70
|
+
* Callback when the video ends
|
|
71
|
+
*/
|
|
72
|
+
onEnd?: () => void;
|
|
73
|
+
/**
|
|
74
|
+
* Callback when the video is seeking
|
|
75
|
+
*/
|
|
76
|
+
onSeeking?: () => void;
|
|
77
|
+
/**
|
|
78
|
+
* Callback when the video has seeked
|
|
79
|
+
*/
|
|
80
|
+
onSeeked?: () => void;
|
|
81
|
+
/**
|
|
82
|
+
* Callback when an error occurs
|
|
83
|
+
*/
|
|
84
|
+
onPlayerError?: (error: any) => void;
|
|
85
|
+
/**
|
|
86
|
+
* Callback for time update
|
|
87
|
+
*/
|
|
88
|
+
onTimeUpdate?: (time: number) => void;
|
|
89
|
+
/**
|
|
90
|
+
* Callback for progress update
|
|
91
|
+
*/
|
|
92
|
+
onProgress?: (progress: number) => void;
|
|
93
|
+
}
|
|
94
|
+
export interface VimeoProps extends BoxProps {
|
|
95
|
+
/**
|
|
96
|
+
* The ID of the Vimeo video to play
|
|
97
|
+
*/
|
|
98
|
+
videoId: string;
|
|
99
|
+
/**
|
|
100
|
+
* Specific width for the player
|
|
101
|
+
*/
|
|
102
|
+
playerWidth?: string | number;
|
|
103
|
+
/**
|
|
104
|
+
* Specific height for the player
|
|
105
|
+
*/
|
|
106
|
+
playerHeight?: string | number;
|
|
107
|
+
/**
|
|
108
|
+
* Vimeo player configuration
|
|
109
|
+
*/
|
|
110
|
+
config?: VimeoConfig;
|
|
111
|
+
/**
|
|
112
|
+
* Vimeo player event callbacks
|
|
113
|
+
*/
|
|
114
|
+
callbacks?: VimeoCallbacks;
|
|
115
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VimeoConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the Vimeo embed URL with all necessary parameters
|
|
4
|
+
*
|
|
5
|
+
* @param videoId - The Vimeo video ID
|
|
6
|
+
* @param config - Configuration for the Vimeo player
|
|
7
|
+
* @returns A string containing the complete Vimeo embed URL
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildVimeoEmbedUrl(videoId: string, config?: VimeoConfig): string;
|
|
10
|
+
/**
|
|
11
|
+
* Creates an event handler for Vimeo player iframe messages
|
|
12
|
+
*
|
|
13
|
+
* @param iframe - The iframe element
|
|
14
|
+
* @param onMessageCallback - Callback function for handling Vimeo player messages
|
|
15
|
+
* @returns A function to remove the event listener
|
|
16
|
+
*/
|
|
17
|
+
export declare function createVimeoMessageHandler(iframe: HTMLIFrameElement | null, onMessageCallback: (event: MessageEvent) => void): () => void;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export * from './Art';
|
|
2
2
|
export * from './Base';
|
|
3
|
+
export * from './Box';
|
|
3
4
|
export * from './Button';
|
|
5
|
+
export * from './Divider';
|
|
6
|
+
export * from './Header';
|
|
7
|
+
export * from './Input';
|
|
8
|
+
export * from './List';
|
|
4
9
|
export * from './Loading';
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './Box';
|
|
10
|
+
export * from './Skeleton';
|
|
7
11
|
export * from './Text';
|
|
12
|
+
export * from './Touchable';
|
|
13
|
+
export * from './Vimeo';
|