@a-little-world/little-world-design-system-native 0.5.1
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/LICENSE.md +175 -0
- package/README.md +160 -0
- package/dist/components/Accordion/Accordion.d.ts +9 -0
- package/dist/components/Accordion/styles.d.ts +50 -0
- package/dist/components/Button/Button.d.ts +12 -0
- package/dist/components/Button/styles.d.ts +31 -0
- package/dist/components/Card/Card.d.ts +10 -0
- package/dist/components/Card/styles.d.ts +22 -0
- package/dist/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/components/Checkbox/styles.d.ts +45 -0
- package/dist/components/Dropdown/Dropdown.d.ts +9 -0
- package/dist/components/Dropdown/styles.d.ts +32 -0
- package/dist/components/Gradient/Gradient.d.ts +9 -0
- package/dist/components/Icon/Icon.d.ts +16 -0
- package/dist/components/Icon/IconGradient.d.ts +4 -0
- package/dist/components/Icon/createIconComponent.d.ts +16 -0
- package/dist/components/Icon/index.d.ts +949 -0
- package/dist/components/Illustrations/Illustration.d.ts +3 -0
- package/dist/components/Illustrations/createIllustrationComponent.d.ts +11 -0
- package/dist/components/Illustrations/index.d.ts +134 -0
- package/dist/components/InputError/InputError.d.ts +5 -0
- package/dist/components/Label/Label.d.ts +12 -0
- package/dist/components/Label/styles.d.ts +9 -0
- package/dist/components/Link/Link.d.ts +17 -0
- package/dist/components/Link/styles.d.ts +12 -0
- package/dist/components/Loading/Loading.d.ts +10 -0
- package/dist/components/Loading/LoadingLogo.d.ts +8 -0
- package/dist/components/Loading/LoadingLogo.styles.d.ts +4 -0
- package/dist/components/Loading/styles.d.ts +4 -0
- package/dist/components/Popover/Popover.d.ts +12 -0
- package/dist/components/Popover/styles.d.ts +51 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +8 -0
- package/dist/components/ProgressBar/styles.d.ts +24 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +15 -0
- package/dist/components/RadioGroup/styles.d.ts +32 -0
- package/dist/components/Separator/Separator.d.ts +8 -0
- package/dist/components/Separator/styles.d.ts +22 -0
- package/dist/components/Tags/Tags.d.ts +11 -0
- package/dist/components/Tags/styles.d.ts +8 -0
- package/dist/components/Text/BaseText.d.ts +9 -0
- package/dist/components/Text/Text.d.ts +7 -0
- package/dist/components/TextInput/TextInput.d.ts +9 -0
- package/dist/components/TextInput/styles.d.ts +54 -0
- package/dist/components/ToolTip/ToolTip.d.ts +12 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.esm.js +2985 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +3148 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +39 -0
- package/dist/theme/index.d.ts +16 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/styles.d.ts +3 -0
- package/dist/utils/createReactNativeSvg.d.ts +4 -0
- package/dist/utils/gradientParser.d.ts +13 -0
- package/dist/utils/parser.d.ts +12 -0
- package/dist/utils/replaceUrlsWithAnchors.d.ts +6 -0
- package/package.json +73 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
import { IllustrationProps, SvgFactoryOptions } from '@a-little-world/little-world-design-system-core';
|
|
4
|
+
import { SvgProps } from 'react-native-svg';
|
|
5
|
+
export declare const createIllustrationComponent: ({ name, svgData, }: SvgFactoryOptions) => {
|
|
6
|
+
({ height, width, style, color, label, labelVisible, }: SvgProps & {
|
|
7
|
+
style?: ViewStyle | undefined;
|
|
8
|
+
color?: string | undefined;
|
|
9
|
+
} & IllustrationProps): React.JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const BrokenChainImage: {
|
|
3
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
4
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
5
|
+
color?: string | undefined;
|
|
6
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const ConfettiImage: {
|
|
10
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
11
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
12
|
+
color?: string | undefined;
|
|
13
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const FriendshipImage: {
|
|
17
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
18
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
19
|
+
color?: string | undefined;
|
|
20
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const GroupHandsImage: {
|
|
24
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
25
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
26
|
+
color?: string | undefined;
|
|
27
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const KeyImage: {
|
|
31
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
32
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
33
|
+
color?: string | undefined;
|
|
34
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const LivingRoomImage: {
|
|
38
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
39
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
40
|
+
color?: string | undefined;
|
|
41
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
export declare const LaptopWithPhoneImage: {
|
|
45
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
46
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
47
|
+
color?: string | undefined;
|
|
48
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
51
|
+
export declare const ManOnRocketImage: {
|
|
52
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
53
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
54
|
+
color?: string | undefined;
|
|
55
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
56
|
+
displayName: string;
|
|
57
|
+
};
|
|
58
|
+
export declare const MatchSearchingImage: {
|
|
59
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
60
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
61
|
+
color?: string | undefined;
|
|
62
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
63
|
+
displayName: string;
|
|
64
|
+
};
|
|
65
|
+
export declare const PaperPlaneImage: {
|
|
66
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
67
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
68
|
+
color?: string | undefined;
|
|
69
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
70
|
+
displayName: string;
|
|
71
|
+
};
|
|
72
|
+
export declare const PeopleTogetherImage: {
|
|
73
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
74
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
75
|
+
color?: string | undefined;
|
|
76
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
77
|
+
displayName: string;
|
|
78
|
+
};
|
|
79
|
+
export declare const QuestionMarksImage: {
|
|
80
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
81
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
82
|
+
color?: string | undefined;
|
|
83
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
84
|
+
displayName: string;
|
|
85
|
+
};
|
|
86
|
+
export declare const RaisingMoneyImage: {
|
|
87
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
88
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
89
|
+
color?: string | undefined;
|
|
90
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
91
|
+
displayName: string;
|
|
92
|
+
};
|
|
93
|
+
export declare const TeacherImage: {
|
|
94
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
95
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
96
|
+
color?: string | undefined;
|
|
97
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
98
|
+
displayName: string;
|
|
99
|
+
};
|
|
100
|
+
export declare const TimeFlexibleImage: {
|
|
101
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
102
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
103
|
+
color?: string | undefined;
|
|
104
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
105
|
+
displayName: string;
|
|
106
|
+
};
|
|
107
|
+
export declare const UnmatchedImage: {
|
|
108
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
109
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
110
|
+
color?: string | undefined;
|
|
111
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
112
|
+
displayName: string;
|
|
113
|
+
};
|
|
114
|
+
export declare const WavyBlockImage: {
|
|
115
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
116
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
117
|
+
color?: string | undefined;
|
|
118
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
119
|
+
displayName: string;
|
|
120
|
+
};
|
|
121
|
+
export declare const WavyLinesImage: {
|
|
122
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
123
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
124
|
+
color?: string | undefined;
|
|
125
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
126
|
+
displayName: string;
|
|
127
|
+
};
|
|
128
|
+
export declare const WomanOnRocketImage: {
|
|
129
|
+
({ height, width, style, color, label, labelVisible, }: import("react-native-svg").SvgProps & {
|
|
130
|
+
style?: import("react-native").ViewStyle | undefined;
|
|
131
|
+
color?: string | undefined;
|
|
132
|
+
} & import("@a-little-world/little-world-design-system-core").IllustrationProps): import("react").JSX.Element;
|
|
133
|
+
displayName: string;
|
|
134
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputErrorBaseProps } from '@a-little-world/little-world-design-system-core';
|
|
3
|
+
export declare const INPUT_ERROR_CSS: import("styled-components/native/dist/types").RuleSet<object>;
|
|
4
|
+
declare const InputError: React.FC<InputErrorBaseProps>;
|
|
5
|
+
export default InputError;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextStyle, StyleProp } from 'react-native';
|
|
3
|
+
export interface LabelProps {
|
|
4
|
+
style?: StyleProp<TextStyle>;
|
|
5
|
+
bold?: boolean;
|
|
6
|
+
children?: any;
|
|
7
|
+
nativeId?: string;
|
|
8
|
+
inline?: boolean;
|
|
9
|
+
marginBottom?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const Label: React.FC<LabelProps>;
|
|
12
|
+
export default Label;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextStyle } from 'react-native';
|
|
2
|
+
import { DefaultTheme } from 'styled-components/native';
|
|
3
|
+
export declare const getLabelStyles: ({ theme, bold, inline, marginBottom, }: {
|
|
4
|
+
theme: DefaultTheme;
|
|
5
|
+
bold?: boolean | undefined;
|
|
6
|
+
children?: any;
|
|
7
|
+
inline?: boolean | undefined;
|
|
8
|
+
marginBottom?: number | undefined;
|
|
9
|
+
}) => TextStyle;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LinkBaseProps } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PressableProps, ViewStyle, StyleProp } from 'react-native';
|
|
4
|
+
export type LinkProps = Omit<PressableProps, 'onPress'> & LinkBaseProps & {
|
|
5
|
+
params?: Record<string, any>;
|
|
6
|
+
style?: StyleProp<ViewStyle>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Link component for React Native
|
|
10
|
+
* - Uses React Navigation for internal navigation (to)
|
|
11
|
+
* - Uses Linking API for external links (href)
|
|
12
|
+
*/
|
|
13
|
+
declare const Link: React.ForwardRefExoticComponent<Omit<PressableProps, "onPress"> & LinkBaseProps & {
|
|
14
|
+
params?: Record<string, any> | undefined;
|
|
15
|
+
style?: StyleProp<ViewStyle>;
|
|
16
|
+
} & React.RefAttributes<any>>;
|
|
17
|
+
export default Link;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonAppearance } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import { DefaultTheme } from 'styled-components/native';
|
|
3
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
4
|
+
export declare const getLinkStyles: ({ theme, }: {
|
|
5
|
+
theme: DefaultTheme;
|
|
6
|
+
}) => ViewStyle;
|
|
7
|
+
export declare const getLinkTextStyles: ({ theme, buttonAppearance, color, textDecoration, }: {
|
|
8
|
+
theme: DefaultTheme;
|
|
9
|
+
buttonAppearance?: ButtonAppearance | undefined;
|
|
10
|
+
color?: string | undefined;
|
|
11
|
+
textDecoration?: boolean | undefined;
|
|
12
|
+
}) => TextStyle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LoadingBaseProps, LoadingSizes, LoadingType } from '@a-little-world/little-world-design-system-core';
|
|
3
|
+
export { LoadingSizes, LoadingType };
|
|
4
|
+
export declare const LOADING_RING_ID = "loadingRing";
|
|
5
|
+
export declare const LOADING_LOGO_ID = "loadingLogo";
|
|
6
|
+
interface LoadingProps extends LoadingBaseProps {
|
|
7
|
+
style?: any;
|
|
8
|
+
}
|
|
9
|
+
declare const Loading: React.FC<LoadingProps>;
|
|
10
|
+
export default Loading;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LoadingSizes } from '@a-little-world/little-world-design-system-core';
|
|
3
|
+
export interface LoadingLogoProps {
|
|
4
|
+
size?: LoadingSizes;
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const LoadingLogo: React.FC<LoadingLogoProps>;
|
|
8
|
+
export default LoadingLogo;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ViewStyle } from 'react-native';
|
|
2
|
+
import { LoadingSizes, LoadingType } from '@a-little-world/little-world-design-system-core';
|
|
3
|
+
export declare const getLoadingContainerStyles: (align?: 'center' | 'flex-start' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly', inline?: boolean, size?: LoadingSizes, type?: LoadingType) => ViewStyle;
|
|
4
|
+
export declare const getLoadingElementStyles: (color?: string, size?: LoadingSizes) => ViewStyle;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PopoverSizes } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import * as PopoverPrimitive from '@rn-primitives/popover';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
type PopoverProps = {
|
|
5
|
+
asToolTip?: boolean;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
showCloseButton?: boolean;
|
|
8
|
+
trigger?: React.ReactNode;
|
|
9
|
+
width?: PopoverSizes;
|
|
10
|
+
} & PopoverPrimitive.RootProps & PopoverPrimitive.ContentProps;
|
|
11
|
+
declare const Popover: React.FC<PopoverProps>;
|
|
12
|
+
export default Popover;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { PopoverSizes } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import { DefaultTheme } from 'styled-components/native';
|
|
3
|
+
export declare const getPopoverContentStyles: ({ theme, width, extraPaddingTop, asToolTip, }: {
|
|
4
|
+
theme: DefaultTheme;
|
|
5
|
+
width?: number | undefined;
|
|
6
|
+
extraPaddingTop?: boolean | undefined;
|
|
7
|
+
asToolTip?: boolean | undefined;
|
|
8
|
+
}) => {
|
|
9
|
+
content: {
|
|
10
|
+
paddingTop?: number | undefined;
|
|
11
|
+
display: "flex";
|
|
12
|
+
flexDirection: "column";
|
|
13
|
+
position: "absolute";
|
|
14
|
+
zIndex: number;
|
|
15
|
+
borderRadius: number;
|
|
16
|
+
padding: number;
|
|
17
|
+
width: number | undefined;
|
|
18
|
+
maxWidth: PopoverSizes;
|
|
19
|
+
shadowColor: string;
|
|
20
|
+
shadowOffset: {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
shadowOpacity: number;
|
|
25
|
+
shadowRadius: number;
|
|
26
|
+
elevation: number;
|
|
27
|
+
backgroundColor: string;
|
|
28
|
+
paddingRight: number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare const getPopoverCloseStyles: ({ theme, asToolTip, }: {
|
|
32
|
+
theme: DefaultTheme;
|
|
33
|
+
asToolTip?: boolean | undefined;
|
|
34
|
+
}) => {
|
|
35
|
+
close: {
|
|
36
|
+
position: "absolute";
|
|
37
|
+
top: number;
|
|
38
|
+
right: number;
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
color: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export declare const getPopoverArrowStyles: ({ theme, asToolTip, }: {
|
|
45
|
+
theme: DefaultTheme;
|
|
46
|
+
asToolTip?: boolean | undefined;
|
|
47
|
+
}) => {
|
|
48
|
+
arrow: {
|
|
49
|
+
backgroundColor: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProgressBarBaseProps } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
+
interface ProgressBarProps extends ProgressBarBaseProps {
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
}
|
|
7
|
+
declare const ProgressBar: React.FC<ProgressBarProps>;
|
|
8
|
+
export default ProgressBar;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components/native';
|
|
2
|
+
export declare const getProgressBarStyles: ({ theme }: {
|
|
3
|
+
theme: DefaultTheme;
|
|
4
|
+
}) => {
|
|
5
|
+
wrapper: {
|
|
6
|
+
flexDirection: "row";
|
|
7
|
+
alignItems: "center";
|
|
8
|
+
width: "100%";
|
|
9
|
+
gap: number;
|
|
10
|
+
display: "flex";
|
|
11
|
+
};
|
|
12
|
+
root: {
|
|
13
|
+
flex: number;
|
|
14
|
+
position: "relative";
|
|
15
|
+
overflow: "hidden";
|
|
16
|
+
borderRadius: number;
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
indicator: {
|
|
21
|
+
backgroundColor: string;
|
|
22
|
+
height: "100%";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from '@rn-primitives/radio-group';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type Props = {
|
|
4
|
+
error?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
labelTooltip?: string;
|
|
7
|
+
items: Array<{
|
|
8
|
+
id: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}>;
|
|
12
|
+
inputRef: React.RefObject<HTMLInputElement>;
|
|
13
|
+
} & RadioGroupPrimitive.RootProps;
|
|
14
|
+
declare const RadioGroup: React.FC<Props>;
|
|
15
|
+
export default RadioGroup;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components/native';
|
|
2
|
+
export declare const getRadioGroupStyles: ({ theme }: {
|
|
3
|
+
theme: DefaultTheme;
|
|
4
|
+
}) => {
|
|
5
|
+
root: {
|
|
6
|
+
display: "flex";
|
|
7
|
+
flexDirection: "column";
|
|
8
|
+
gap: number;
|
|
9
|
+
alignItems: "flex-start";
|
|
10
|
+
};
|
|
11
|
+
itemContainer: {
|
|
12
|
+
display: "flex";
|
|
13
|
+
alignItems: "center";
|
|
14
|
+
};
|
|
15
|
+
item: {
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
borderWidth: number;
|
|
18
|
+
borderColor: string;
|
|
19
|
+
borderRadius: string;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
marginRight: number;
|
|
23
|
+
boxShadow: string;
|
|
24
|
+
};
|
|
25
|
+
indicator: {
|
|
26
|
+
display: "flex";
|
|
27
|
+
alignItems: "center";
|
|
28
|
+
justifyContent: "center";
|
|
29
|
+
width: "100%";
|
|
30
|
+
height: "100%";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { SeparatorBaseProps } from '@a-little-world/little-world-design-system-core';
|
|
4
|
+
interface SeparatorProps extends SeparatorBaseProps {
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
}
|
|
7
|
+
declare const Separator: ({ background, orientation, spacing, style, }: SeparatorProps) => React.JSX.Element;
|
|
8
|
+
export default Separator;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components/native';
|
|
2
|
+
export declare const getSeparatorStyles: ({ theme, background, spacing, }: {
|
|
3
|
+
theme: DefaultTheme;
|
|
4
|
+
background?: string | undefined;
|
|
5
|
+
spacing?: number | undefined;
|
|
6
|
+
}) => {
|
|
7
|
+
wrapper: {
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
height: number;
|
|
10
|
+
width: "100%";
|
|
11
|
+
};
|
|
12
|
+
vertical: {
|
|
13
|
+
height: "100%";
|
|
14
|
+
width: number;
|
|
15
|
+
marginHorizontal: number;
|
|
16
|
+
};
|
|
17
|
+
horizontal: {
|
|
18
|
+
height: number;
|
|
19
|
+
width: "100%";
|
|
20
|
+
marginVertical: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TagBaseProps } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface TagProps extends TagBaseProps {
|
|
4
|
+
style?: any;
|
|
5
|
+
}
|
|
6
|
+
export interface TagsProps extends TagProps {
|
|
7
|
+
content: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare const Tag: React.FC<TagProps>;
|
|
10
|
+
declare function Tags({ appearance, bold, color, content, size, style }: TagsProps): React.JSX.Element;
|
|
11
|
+
export default Tags;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ViewStyle } from 'react-native';
|
|
2
|
+
import { DefaultTheme } from 'styled-components/native';
|
|
3
|
+
export declare const getTagStyles: ({ theme, size, appearance, color, }: {
|
|
4
|
+
theme: DefaultTheme;
|
|
5
|
+
size?: String | undefined;
|
|
6
|
+
appearance?: String | undefined;
|
|
7
|
+
color?: string | undefined;
|
|
8
|
+
}) => ViewStyle;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextStyle as RNTextStyle, StyleProp } from 'react-native';
|
|
3
|
+
import { TextBaseProps } from '@a-little-world/little-world-design-system-core';
|
|
4
|
+
export type BaseTextProps = TextBaseProps & {
|
|
5
|
+
italic?: boolean;
|
|
6
|
+
style?: StyleProp<RNTextStyle>;
|
|
7
|
+
};
|
|
8
|
+
declare const BaseText: ({ id, bold, center, children, color, italic, style, type, }: BaseTextProps) => React.JSX.Element;
|
|
9
|
+
export default BaseText;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextInputBaseProps } from '@a-little-world/little-world-design-system-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { TextInput as RNTextInput } from 'react-native';
|
|
4
|
+
interface Props extends React.ComponentProps<typeof RNTextInput>, TextInputBaseProps {
|
|
5
|
+
inputRef?: React.RefObject<RNTextInput>;
|
|
6
|
+
type?: 'text' | 'password' | 'tel';
|
|
7
|
+
}
|
|
8
|
+
declare const TextInput: React.FC<Props>;
|
|
9
|
+
export default TextInput;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, TextInput as RNTextInput } from 'react-native';
|
|
3
|
+
import { InputHeight, InputWidth } from '@a-little-world/little-world-design-system-core';
|
|
4
|
+
export declare const createStyles: (theme: any) => {
|
|
5
|
+
inputWrapper: {
|
|
6
|
+
display: "flex";
|
|
7
|
+
flexDirection: "column";
|
|
8
|
+
width: "100%";
|
|
9
|
+
maxWidth: InputWidth;
|
|
10
|
+
};
|
|
11
|
+
inputContainer: {
|
|
12
|
+
position: "relative";
|
|
13
|
+
width: "100%";
|
|
14
|
+
};
|
|
15
|
+
input: {
|
|
16
|
+
width: "100%";
|
|
17
|
+
borderWidth: number;
|
|
18
|
+
borderColor: any;
|
|
19
|
+
borderRadius: number;
|
|
20
|
+
padding: any;
|
|
21
|
+
marginBottom: any;
|
|
22
|
+
fontSize: number;
|
|
23
|
+
lineHeight: number;
|
|
24
|
+
};
|
|
25
|
+
inputSmall: {
|
|
26
|
+
padding: number;
|
|
27
|
+
};
|
|
28
|
+
inputError: {
|
|
29
|
+
borderColor: any;
|
|
30
|
+
};
|
|
31
|
+
showPasswordToggle: {
|
|
32
|
+
position: "absolute";
|
|
33
|
+
right: any;
|
|
34
|
+
top: any;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const InputWrapper: ({ children, width, style, }: {
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
width?: InputWidth | undefined;
|
|
40
|
+
style?: any;
|
|
41
|
+
}) => React.JSX.Element;
|
|
42
|
+
export declare const InputContainer: ({ children, style, }: {
|
|
43
|
+
children: React.ReactNode;
|
|
44
|
+
style?: any;
|
|
45
|
+
}) => React.JSX.Element;
|
|
46
|
+
export declare const Input: ({ hasError, height, style, ...props }: {
|
|
47
|
+
hasError?: boolean | undefined;
|
|
48
|
+
height?: InputHeight | undefined;
|
|
49
|
+
style?: any;
|
|
50
|
+
} & import("react-native").TextInputProps) => React.JSX.Element;
|
|
51
|
+
export declare const ShowPasswordToggle: ({ children, style, ...props }: {
|
|
52
|
+
children: React.ReactNode;
|
|
53
|
+
style?: any;
|
|
54
|
+
} & import("react-native").ViewProps) => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type PopoverProps = {
|
|
3
|
+
side?: 'top' | 'bottom';
|
|
4
|
+
sideOffset?: number;
|
|
5
|
+
};
|
|
6
|
+
type PopoverContentProps = {};
|
|
7
|
+
type Props = {
|
|
8
|
+
text: string;
|
|
9
|
+
trigger?: React.ReactNode;
|
|
10
|
+
} & PopoverProps & PopoverContentProps;
|
|
11
|
+
declare const ToolTip: React.FC<Props>;
|
|
12
|
+
export default ToolTip;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { default as Accordion } from './components/Accordion/Accordion';
|
|
2
|
+
export { default as Button } from './components/Button/Button';
|
|
3
|
+
export { default as Card, CardHeader, CardContent, CardFooter, } from './components/Card/Card';
|
|
4
|
+
export { default as Checkbox } from './components/Checkbox/Checkbox';
|
|
5
|
+
export { default as Dropdown } from './components/Dropdown/Dropdown';
|
|
6
|
+
export { default as Gradient } from './components/Gradient/Gradient';
|
|
7
|
+
export * from './components/Icon';
|
|
8
|
+
export * from './components/Illustrations';
|
|
9
|
+
export { default as Label } from './components/Label/Label';
|
|
10
|
+
export type { LabelProps } from './components/Label/Label';
|
|
11
|
+
export { default as Link } from './components/Link/Link';
|
|
12
|
+
export { default as Loading, LoadingSizes, LoadingType, } from './components/Loading/Loading';
|
|
13
|
+
export { default as LoadingLogo } from './components/Loading/LoadingLogo';
|
|
14
|
+
export type { LoadingLogoProps } from './components/Loading/LoadingLogo';
|
|
15
|
+
export { default as Popover } from './components/Popover/Popover';
|
|
16
|
+
export { default as ProgressBar } from './components/ProgressBar/ProgressBar';
|
|
17
|
+
export { default as RadioGroup } from './components/RadioGroup/RadioGroup';
|
|
18
|
+
export { default as Separator } from './components/Separator/Separator';
|
|
19
|
+
export { default as Tags, Tag } from './components/Tags/Tags';
|
|
20
|
+
export type { TagProps, TagsProps } from './components/Tags/Tags';
|
|
21
|
+
export { default as Text } from './components/Text/Text';
|
|
22
|
+
export { default as TextInput } from './components/TextInput/TextInput';
|
|
23
|
+
export { default as ToolTip } from './components/ToolTip/ToolTip';
|
|
24
|
+
export * from './theme';
|
|
25
|
+
export * from './types';
|