@idealyst/components 1.0.24 → 1.0.25
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/README.md +567 -567
- package/package.json +2 -2
- package/plugin/web.js +319 -185
- package/src/Avatar/Avatar.native.tsx +43 -43
- package/src/Avatar/Avatar.styles.tsx +66 -66
- package/src/Avatar/Avatar.web.tsx +50 -50
- package/src/Avatar/index.native.ts +1 -1
- package/src/Avatar/index.ts +1 -1
- package/src/Avatar/index.web.ts +1 -1
- package/src/Avatar/types.ts +42 -42
- package/src/Badge/Badge.native.tsx +42 -42
- package/src/Badge/Badge.styles.tsx +153 -153
- package/src/Badge/Badge.web.tsx +44 -44
- package/src/Badge/index.native.ts +1 -1
- package/src/Badge/index.ts +1 -1
- package/src/Badge/index.web.ts +1 -1
- package/src/Badge/types.ts +33 -33
- package/src/Button/Button.native.tsx +38 -38
- package/src/Button/Button.styles.tsx +214 -214
- package/src/Button/Button.types.ts +11 -11
- package/src/Button/Button.web.tsx +55 -55
- package/src/Button/index.native.ts +2 -2
- package/src/Button/index.ts +4 -4
- package/src/Button/index.web.ts +2 -2
- package/src/Button/types.ts +48 -48
- package/src/Card/Card.native.tsx +51 -51
- package/src/Card/Card.styles.tsx +239 -239
- package/src/Card/Card.web.tsx +61 -61
- package/src/Card/index.native.ts +2 -2
- package/src/Card/index.ts +4 -4
- package/src/Card/index.web.ts +2 -2
- package/src/Card/types.ts +58 -58
- package/src/Checkbox/Checkbox.native.tsx +98 -98
- package/src/Checkbox/Checkbox.styles.tsx +291 -291
- package/src/Checkbox/Checkbox.web.tsx +130 -130
- package/src/Checkbox/index.native.ts +2 -2
- package/src/Checkbox/index.ts +4 -4
- package/src/Checkbox/index.web.ts +2 -2
- package/src/Checkbox/types.ts +78 -78
- package/src/Divider/Divider.native.tsx +144 -144
- package/src/Divider/Divider.styles.tsx +601 -601
- package/src/Divider/Divider.web.tsx +72 -72
- package/src/Divider/index.native.ts +2 -2
- package/src/Divider/index.ts +4 -4
- package/src/Divider/index.web.ts +2 -2
- package/src/Divider/types.ts +53 -53
- package/src/Icon/Icon.native.tsx +38 -38
- package/src/Icon/Icon.styles.tsx +49 -49
- package/src/Icon/Icon.web.tsx +46 -46
- package/src/Icon/icon-types.ts +7452 -7452
- package/src/Icon/index.native.ts +2 -2
- package/src/Icon/index.ts +4 -4
- package/src/Icon/index.web.ts +2 -2
- package/src/Icon/types.ts +35 -35
- package/src/Input/Input.native.tsx +74 -74
- package/src/Input/Input.styles.tsx +176 -176
- package/src/Input/Input.web.tsx +70 -70
- package/src/Input/index.native.ts +2 -2
- package/src/Input/index.ts +4 -4
- package/src/Input/index.web.ts +2 -2
- package/src/Input/types.ts +68 -68
- package/src/Screen/Screen.native.tsx +40 -40
- package/src/Screen/Screen.styles.tsx +59 -59
- package/src/Screen/Screen.web.tsx +32 -32
- package/src/Screen/index.native.ts +1 -1
- package/src/Screen/index.ts +1 -1
- package/src/Screen/index.web.ts +1 -1
- package/src/Screen/types.ts +37 -37
- package/src/Text/Text.native.tsx +35 -35
- package/src/Text/Text.styles.tsx +66 -66
- package/src/Text/Text.web.tsx +40 -40
- package/src/Text/index.native.ts +2 -2
- package/src/Text/index.ts +4 -4
- package/src/Text/index.web.ts +2 -2
- package/src/Text/types.ts +38 -38
- package/src/View/View.native.tsx +55 -55
- package/src/View/View.styles.tsx +102 -102
- package/src/View/View.web.tsx +59 -59
- package/src/View/index.native.ts +2 -2
- package/src/View/index.ts +4 -4
- package/src/View/index.web.ts +2 -2
- package/src/View/types.ts +72 -72
- package/src/examples/AllExamples.tsx +71 -71
- package/src/examples/AvatarExamples.tsx +96 -96
- package/src/examples/BadgeExamples.tsx +199 -199
- package/src/examples/ButtonExamples.tsx +149 -149
- package/src/examples/CardExamples.tsx +175 -175
- package/src/examples/CheckboxExamples.tsx +216 -216
- package/src/examples/DividerExamples.tsx +217 -217
- package/src/examples/IconExamples.tsx +341 -341
- package/src/examples/InputExamples.tsx +133 -133
- package/src/examples/README.md +135 -135
- package/src/examples/ScreenExamples.tsx +153 -153
- package/src/examples/TextExamples.tsx +88 -88
- package/src/examples/ThemeExtensionExamples.tsx +90 -90
- package/src/examples/ValidationExamples.tsx +94 -94
- package/src/examples/ViewExamples.tsx +128 -128
- package/src/examples/extendedTheme.ts +328 -328
- package/src/examples/index.ts +14 -14
- package/src/index.native.ts +48 -48
- package/src/index.ts +47 -47
- package/src/theme/breakpoints.ts +8 -8
- package/src/theme/colorResolver.ts +217 -217
- package/src/theme/colors.ts +314 -314
- package/src/theme/defaultThemes.ts +325 -325
- package/src/theme/index.ts +187 -187
- package/src/theme/themeBuilder.ts +601 -601
- package/src/theme/unistyles.d.ts +5 -5
- package/src/theme/variantHelpers.ts +583 -583
- package/src/theme/variants.ts +55 -55
package/src/View/View.styles.tsx
CHANGED
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
2
|
-
|
|
3
|
-
const viewStyles = StyleSheet.create((theme) => ({
|
|
4
|
-
view: {
|
|
5
|
-
variants: {
|
|
6
|
-
spacing: {
|
|
7
|
-
none: {
|
|
8
|
-
padding: 0,
|
|
9
|
-
},
|
|
10
|
-
xs: {
|
|
11
|
-
padding: theme.spacing.xs,
|
|
12
|
-
},
|
|
13
|
-
sm: {
|
|
14
|
-
padding: theme.spacing.sm,
|
|
15
|
-
},
|
|
16
|
-
md: {
|
|
17
|
-
padding: theme.spacing.md,
|
|
18
|
-
},
|
|
19
|
-
lg: {
|
|
20
|
-
padding: theme.spacing.lg,
|
|
21
|
-
},
|
|
22
|
-
xl: {
|
|
23
|
-
padding: theme.spacing.xl,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
margin: {
|
|
27
|
-
none: {
|
|
28
|
-
margin: 0,
|
|
29
|
-
},
|
|
30
|
-
xs: {
|
|
31
|
-
margin: theme.spacing.xs,
|
|
32
|
-
},
|
|
33
|
-
sm: {
|
|
34
|
-
margin: theme.spacing.sm,
|
|
35
|
-
},
|
|
36
|
-
md: {
|
|
37
|
-
margin: theme.spacing.md,
|
|
38
|
-
},
|
|
39
|
-
lg: {
|
|
40
|
-
margin: theme.spacing.lg,
|
|
41
|
-
},
|
|
42
|
-
xl: {
|
|
43
|
-
margin: theme.spacing.xl,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
background: {
|
|
47
|
-
transparent: {
|
|
48
|
-
backgroundColor: 'transparent',
|
|
49
|
-
},
|
|
50
|
-
surface: {
|
|
51
|
-
backgroundColor: theme.colors.surface,
|
|
52
|
-
},
|
|
53
|
-
primary: {
|
|
54
|
-
backgroundColor: theme.colors.primary,
|
|
55
|
-
},
|
|
56
|
-
secondary: {
|
|
57
|
-
backgroundColor: theme.colors.secondary,
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
radius: {
|
|
61
|
-
none: {
|
|
62
|
-
borderRadius: 0,
|
|
63
|
-
},
|
|
64
|
-
xs: {
|
|
65
|
-
borderRadius: theme.borderRadius.xs,
|
|
66
|
-
},
|
|
67
|
-
sm: {
|
|
68
|
-
borderRadius: theme.borderRadius.sm,
|
|
69
|
-
},
|
|
70
|
-
md: {
|
|
71
|
-
borderRadius: theme.borderRadius.md,
|
|
72
|
-
},
|
|
73
|
-
lg: {
|
|
74
|
-
borderRadius: theme.borderRadius.lg,
|
|
75
|
-
},
|
|
76
|
-
xl: {
|
|
77
|
-
borderRadius: theme.borderRadius.xl,
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
border: {
|
|
81
|
-
none: {
|
|
82
|
-
borderWidth: 0,
|
|
83
|
-
},
|
|
84
|
-
thin: {
|
|
85
|
-
borderWidth: 1,
|
|
86
|
-
borderColor: theme.colors.border,
|
|
87
|
-
},
|
|
88
|
-
thick: {
|
|
89
|
-
borderWidth: 2,
|
|
90
|
-
borderColor: theme.colors.border,
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
// Web-specific styles
|
|
95
|
-
_web: {
|
|
96
|
-
display: 'flex',
|
|
97
|
-
flexDirection: 'column',
|
|
98
|
-
boxSizing: 'border-box',
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
}));
|
|
102
|
-
|
|
1
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
2
|
+
|
|
3
|
+
const viewStyles = StyleSheet.create((theme) => ({
|
|
4
|
+
view: {
|
|
5
|
+
variants: {
|
|
6
|
+
spacing: {
|
|
7
|
+
none: {
|
|
8
|
+
padding: 0,
|
|
9
|
+
},
|
|
10
|
+
xs: {
|
|
11
|
+
padding: theme.spacing.xs,
|
|
12
|
+
},
|
|
13
|
+
sm: {
|
|
14
|
+
padding: theme.spacing.sm,
|
|
15
|
+
},
|
|
16
|
+
md: {
|
|
17
|
+
padding: theme.spacing.md,
|
|
18
|
+
},
|
|
19
|
+
lg: {
|
|
20
|
+
padding: theme.spacing.lg,
|
|
21
|
+
},
|
|
22
|
+
xl: {
|
|
23
|
+
padding: theme.spacing.xl,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
margin: {
|
|
27
|
+
none: {
|
|
28
|
+
margin: 0,
|
|
29
|
+
},
|
|
30
|
+
xs: {
|
|
31
|
+
margin: theme.spacing.xs,
|
|
32
|
+
},
|
|
33
|
+
sm: {
|
|
34
|
+
margin: theme.spacing.sm,
|
|
35
|
+
},
|
|
36
|
+
md: {
|
|
37
|
+
margin: theme.spacing.md,
|
|
38
|
+
},
|
|
39
|
+
lg: {
|
|
40
|
+
margin: theme.spacing.lg,
|
|
41
|
+
},
|
|
42
|
+
xl: {
|
|
43
|
+
margin: theme.spacing.xl,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
background: {
|
|
47
|
+
transparent: {
|
|
48
|
+
backgroundColor: 'transparent',
|
|
49
|
+
},
|
|
50
|
+
surface: {
|
|
51
|
+
backgroundColor: theme.colors.surface,
|
|
52
|
+
},
|
|
53
|
+
primary: {
|
|
54
|
+
backgroundColor: theme.colors.primary,
|
|
55
|
+
},
|
|
56
|
+
secondary: {
|
|
57
|
+
backgroundColor: theme.colors.secondary,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
radius: {
|
|
61
|
+
none: {
|
|
62
|
+
borderRadius: 0,
|
|
63
|
+
},
|
|
64
|
+
xs: {
|
|
65
|
+
borderRadius: theme.borderRadius.xs,
|
|
66
|
+
},
|
|
67
|
+
sm: {
|
|
68
|
+
borderRadius: theme.borderRadius.sm,
|
|
69
|
+
},
|
|
70
|
+
md: {
|
|
71
|
+
borderRadius: theme.borderRadius.md,
|
|
72
|
+
},
|
|
73
|
+
lg: {
|
|
74
|
+
borderRadius: theme.borderRadius.lg,
|
|
75
|
+
},
|
|
76
|
+
xl: {
|
|
77
|
+
borderRadius: theme.borderRadius.xl,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
border: {
|
|
81
|
+
none: {
|
|
82
|
+
borderWidth: 0,
|
|
83
|
+
},
|
|
84
|
+
thin: {
|
|
85
|
+
borderWidth: 1,
|
|
86
|
+
borderColor: theme.colors.border,
|
|
87
|
+
},
|
|
88
|
+
thick: {
|
|
89
|
+
borderWidth: 2,
|
|
90
|
+
borderColor: theme.colors.border,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
// Web-specific styles
|
|
95
|
+
_web: {
|
|
96
|
+
display: 'flex',
|
|
97
|
+
flexDirection: 'column',
|
|
98
|
+
boxSizing: 'border-box',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
}));
|
|
102
|
+
|
|
103
103
|
export default viewStyles;
|
package/src/View/View.web.tsx
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { getWebProps } from 'react-native-unistyles/web';
|
|
3
|
-
import { ViewProps } from './types';
|
|
4
|
-
import viewStyles from './View.styles';
|
|
5
|
-
|
|
6
|
-
const View: React.FC<ViewProps> = ({
|
|
7
|
-
children,
|
|
8
|
-
spacing = 'none',
|
|
9
|
-
marginVariant = 'none',
|
|
10
|
-
background = 'transparent',
|
|
11
|
-
radius = 'none',
|
|
12
|
-
border = 'none',
|
|
13
|
-
backgroundColor,
|
|
14
|
-
padding,
|
|
15
|
-
margin,
|
|
16
|
-
borderRadius,
|
|
17
|
-
borderWidth,
|
|
18
|
-
borderColor,
|
|
19
|
-
style,
|
|
20
|
-
testID,
|
|
21
|
-
}) => {
|
|
22
|
-
viewStyles.useVariants({
|
|
23
|
-
spacing,
|
|
24
|
-
margin: marginVariant,
|
|
25
|
-
background,
|
|
26
|
-
radius,
|
|
27
|
-
border,
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// Create dynamic styles based on custom props (overrides variants)
|
|
31
|
-
const dynamicStyles: any = {};
|
|
32
|
-
|
|
33
|
-
if (backgroundColor) dynamicStyles.backgroundColor = backgroundColor;
|
|
34
|
-
if (padding !== undefined) dynamicStyles.padding = padding;
|
|
35
|
-
if (margin !== undefined) dynamicStyles.margin = margin;
|
|
36
|
-
if (borderRadius !== undefined) dynamicStyles.borderRadius = borderRadius;
|
|
37
|
-
if (borderWidth !== undefined) dynamicStyles.borderWidth = borderWidth;
|
|
38
|
-
if (borderColor) dynamicStyles.borderColor = borderColor;
|
|
39
|
-
|
|
40
|
-
// Create the style array following the official documentation pattern
|
|
41
|
-
const viewStyleArray = [
|
|
42
|
-
viewStyles.view,
|
|
43
|
-
dynamicStyles,
|
|
44
|
-
style,
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
// Use getWebProps to generate className and ref for web
|
|
48
|
-
const webProps = getWebProps(viewStyleArray);
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<div
|
|
52
|
-
{...webProps}
|
|
53
|
-
data-testid={testID}
|
|
54
|
-
>
|
|
55
|
-
{children}
|
|
56
|
-
</div>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { getWebProps } from 'react-native-unistyles/web';
|
|
3
|
+
import { ViewProps } from './types';
|
|
4
|
+
import viewStyles from './View.styles';
|
|
5
|
+
|
|
6
|
+
const View: React.FC<ViewProps> = ({
|
|
7
|
+
children,
|
|
8
|
+
spacing = 'none',
|
|
9
|
+
marginVariant = 'none',
|
|
10
|
+
background = 'transparent',
|
|
11
|
+
radius = 'none',
|
|
12
|
+
border = 'none',
|
|
13
|
+
backgroundColor,
|
|
14
|
+
padding,
|
|
15
|
+
margin,
|
|
16
|
+
borderRadius,
|
|
17
|
+
borderWidth,
|
|
18
|
+
borderColor,
|
|
19
|
+
style,
|
|
20
|
+
testID,
|
|
21
|
+
}) => {
|
|
22
|
+
viewStyles.useVariants({
|
|
23
|
+
spacing,
|
|
24
|
+
margin: marginVariant,
|
|
25
|
+
background,
|
|
26
|
+
radius,
|
|
27
|
+
border,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Create dynamic styles based on custom props (overrides variants)
|
|
31
|
+
const dynamicStyles: any = {};
|
|
32
|
+
|
|
33
|
+
if (backgroundColor) dynamicStyles.backgroundColor = backgroundColor;
|
|
34
|
+
if (padding !== undefined) dynamicStyles.padding = padding;
|
|
35
|
+
if (margin !== undefined) dynamicStyles.margin = margin;
|
|
36
|
+
if (borderRadius !== undefined) dynamicStyles.borderRadius = borderRadius;
|
|
37
|
+
if (borderWidth !== undefined) dynamicStyles.borderWidth = borderWidth;
|
|
38
|
+
if (borderColor) dynamicStyles.borderColor = borderColor;
|
|
39
|
+
|
|
40
|
+
// Create the style array following the official documentation pattern
|
|
41
|
+
const viewStyleArray = [
|
|
42
|
+
viewStyles.view,
|
|
43
|
+
dynamicStyles,
|
|
44
|
+
style,
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
// Use getWebProps to generate className and ref for web
|
|
48
|
+
const webProps = getWebProps(viewStyleArray);
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div
|
|
52
|
+
{...webProps}
|
|
53
|
+
data-testid={testID}
|
|
54
|
+
>
|
|
55
|
+
{children}
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
60
|
export default View;
|
package/src/View/index.native.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
// React Native-specific View export
|
|
2
|
-
export { default } from './View.native';
|
|
1
|
+
// React Native-specific View export
|
|
2
|
+
export { default } from './View.native';
|
|
3
3
|
export * from './types';
|
package/src/View/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Platform-agnostic View export
|
|
2
|
-
// Bundlers will resolve to index.web.ts (web) or index.native.ts (React Native)
|
|
3
|
-
// This file serves as fallback for web environments
|
|
4
|
-
export { default } from './View.web';
|
|
1
|
+
// Platform-agnostic View export
|
|
2
|
+
// Bundlers will resolve to index.web.ts (web) or index.native.ts (React Native)
|
|
3
|
+
// This file serves as fallback for web environments
|
|
4
|
+
export { default } from './View.web';
|
|
5
5
|
export * from './types';
|
package/src/View/index.web.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
// Web-specific View export
|
|
2
|
-
export { default } from './View.web';
|
|
1
|
+
// Web-specific View export
|
|
2
|
+
export { default } from './View.web';
|
|
3
3
|
export * from './types';
|
package/src/View/types.ts
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface ViewProps {
|
|
4
|
-
/**
|
|
5
|
-
* The content to display inside the view
|
|
6
|
-
*/
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Padding variant
|
|
11
|
-
*/
|
|
12
|
-
spacing?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Margin variant
|
|
16
|
-
*/
|
|
17
|
-
marginVariant?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Background variant
|
|
21
|
-
*/
|
|
22
|
-
background?: 'transparent' | 'surface' | 'primary' | 'secondary';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Border radius variant
|
|
26
|
-
*/
|
|
27
|
-
radius?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Border variant
|
|
31
|
-
*/
|
|
32
|
-
border?: 'none' | 'thin' | 'thick';
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Custom background color (overrides background variant)
|
|
36
|
-
*/
|
|
37
|
-
backgroundColor?: string;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Custom padding (overrides spacing variant)
|
|
41
|
-
*/
|
|
42
|
-
padding?: number;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Custom margin (overrides marginVariant)
|
|
46
|
-
*/
|
|
47
|
-
margin?: number;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Custom border radius (overrides radius variant)
|
|
51
|
-
*/
|
|
52
|
-
borderRadius?: number;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Custom border width (overrides border variant)
|
|
56
|
-
*/
|
|
57
|
-
borderWidth?: number;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Custom border color
|
|
61
|
-
*/
|
|
62
|
-
borderColor?: string;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Additional styles (platform-specific)
|
|
66
|
-
*/
|
|
67
|
-
style?: any;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Test ID for testing
|
|
71
|
-
*/
|
|
72
|
-
testID?: string;
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* The content to display inside the view
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Padding variant
|
|
11
|
+
*/
|
|
12
|
+
spacing?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Margin variant
|
|
16
|
+
*/
|
|
17
|
+
marginVariant?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Background variant
|
|
21
|
+
*/
|
|
22
|
+
background?: 'transparent' | 'surface' | 'primary' | 'secondary';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Border radius variant
|
|
26
|
+
*/
|
|
27
|
+
radius?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Border variant
|
|
31
|
+
*/
|
|
32
|
+
border?: 'none' | 'thin' | 'thick';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Custom background color (overrides background variant)
|
|
36
|
+
*/
|
|
37
|
+
backgroundColor?: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Custom padding (overrides spacing variant)
|
|
41
|
+
*/
|
|
42
|
+
padding?: number;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Custom margin (overrides marginVariant)
|
|
46
|
+
*/
|
|
47
|
+
margin?: number;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Custom border radius (overrides radius variant)
|
|
51
|
+
*/
|
|
52
|
+
borderRadius?: number;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Custom border width (overrides border variant)
|
|
56
|
+
*/
|
|
57
|
+
borderWidth?: number;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Custom border color
|
|
61
|
+
*/
|
|
62
|
+
borderColor?: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Additional styles (platform-specific)
|
|
66
|
+
*/
|
|
67
|
+
style?: any;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Test ID for testing
|
|
71
|
+
*/
|
|
72
|
+
testID?: string;
|
|
73
73
|
}
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Screen, View, Text, Divider } from '../index';
|
|
3
|
-
import { ButtonExamples } from './ButtonExamples';
|
|
4
|
-
import { TextExamples } from './TextExamples';
|
|
5
|
-
import { ViewExamples } from './ViewExamples';
|
|
6
|
-
import { InputExamples } from './InputExamples';
|
|
7
|
-
import { IconExamples } from './IconExamples';
|
|
8
|
-
import { CardExamples } from './CardExamples';
|
|
9
|
-
import { CheckboxExamples } from './CheckboxExamples';
|
|
10
|
-
import { DividerExamples } from './DividerExamples';
|
|
11
|
-
import { BadgeExamples } from './BadgeExamples';
|
|
12
|
-
import { AvatarExamples } from './AvatarExamples';
|
|
13
|
-
import { ScreenExamples } from './ScreenExamples';
|
|
14
|
-
import { ThemeExtensionExamples } from './ThemeExtensionExamples';
|
|
15
|
-
|
|
16
|
-
export const AllExamples = () => {
|
|
17
|
-
return (
|
|
18
|
-
<Screen background="primary" padding="xl">
|
|
19
|
-
<View spacing="none" style={{ maxWidth: 800, alignSelf: 'center' }}>
|
|
20
|
-
<Text size="xlarge" weight="bold" align="center" color="primary">
|
|
21
|
-
Idealyst Component Library Examples
|
|
22
|
-
</Text>
|
|
23
|
-
<Text size="medium" align="center" color="secondary">
|
|
24
|
-
Comprehensive showcase of all available components
|
|
25
|
-
</Text>
|
|
26
|
-
|
|
27
|
-
<Divider spacing="large" intent="primary">
|
|
28
|
-
<Text size="small" weight="semibold" color="primary">COMPONENTS</Text>
|
|
29
|
-
</Divider>
|
|
30
|
-
|
|
31
|
-
<ButtonExamples />
|
|
32
|
-
<Divider spacing="medium" />
|
|
33
|
-
|
|
34
|
-
<TextExamples />
|
|
35
|
-
<Divider spacing="medium" />
|
|
36
|
-
|
|
37
|
-
<ViewExamples />
|
|
38
|
-
<Divider spacing="medium" />
|
|
39
|
-
|
|
40
|
-
<InputExamples />
|
|
41
|
-
<Divider spacing="medium" />
|
|
42
|
-
|
|
43
|
-
<IconExamples />
|
|
44
|
-
<Divider spacing="medium" />
|
|
45
|
-
|
|
46
|
-
<CardExamples />
|
|
47
|
-
<Divider spacing="medium" />
|
|
48
|
-
|
|
49
|
-
<CheckboxExamples />
|
|
50
|
-
<Divider spacing="medium" />
|
|
51
|
-
|
|
52
|
-
<DividerExamples />
|
|
53
|
-
<Divider spacing="medium" />
|
|
54
|
-
|
|
55
|
-
<BadgeExamples />
|
|
56
|
-
<Divider spacing="medium" />
|
|
57
|
-
|
|
58
|
-
<AvatarExamples />
|
|
59
|
-
<Divider spacing="medium" />
|
|
60
|
-
|
|
61
|
-
<ScreenExamples />
|
|
62
|
-
<Divider spacing="medium" />
|
|
63
|
-
|
|
64
|
-
<Divider spacing="large" intent="success">
|
|
65
|
-
<Text size="small" weight="semibold" color="green">THEME SYSTEM</Text>
|
|
66
|
-
</Divider>
|
|
67
|
-
|
|
68
|
-
<ThemeExtensionExamples />
|
|
69
|
-
</View>
|
|
70
|
-
</Screen>
|
|
71
|
-
);
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Screen, View, Text, Divider } from '../index';
|
|
3
|
+
import { ButtonExamples } from './ButtonExamples';
|
|
4
|
+
import { TextExamples } from './TextExamples';
|
|
5
|
+
import { ViewExamples } from './ViewExamples';
|
|
6
|
+
import { InputExamples } from './InputExamples';
|
|
7
|
+
import { IconExamples } from './IconExamples';
|
|
8
|
+
import { CardExamples } from './CardExamples';
|
|
9
|
+
import { CheckboxExamples } from './CheckboxExamples';
|
|
10
|
+
import { DividerExamples } from './DividerExamples';
|
|
11
|
+
import { BadgeExamples } from './BadgeExamples';
|
|
12
|
+
import { AvatarExamples } from './AvatarExamples';
|
|
13
|
+
import { ScreenExamples } from './ScreenExamples';
|
|
14
|
+
import { ThemeExtensionExamples } from './ThemeExtensionExamples';
|
|
15
|
+
|
|
16
|
+
export const AllExamples = () => {
|
|
17
|
+
return (
|
|
18
|
+
<Screen background="primary" padding="xl">
|
|
19
|
+
<View spacing="none" style={{ maxWidth: 800, alignSelf: 'center' }}>
|
|
20
|
+
<Text size="xlarge" weight="bold" align="center" color="primary">
|
|
21
|
+
Idealyst Component Library Examples
|
|
22
|
+
</Text>
|
|
23
|
+
<Text size="medium" align="center" color="secondary">
|
|
24
|
+
Comprehensive showcase of all available components
|
|
25
|
+
</Text>
|
|
26
|
+
|
|
27
|
+
<Divider spacing="large" intent="primary">
|
|
28
|
+
<Text size="small" weight="semibold" color="primary">COMPONENTS</Text>
|
|
29
|
+
</Divider>
|
|
30
|
+
|
|
31
|
+
<ButtonExamples />
|
|
32
|
+
<Divider spacing="medium" />
|
|
33
|
+
|
|
34
|
+
<TextExamples />
|
|
35
|
+
<Divider spacing="medium" />
|
|
36
|
+
|
|
37
|
+
<ViewExamples />
|
|
38
|
+
<Divider spacing="medium" />
|
|
39
|
+
|
|
40
|
+
<InputExamples />
|
|
41
|
+
<Divider spacing="medium" />
|
|
42
|
+
|
|
43
|
+
<IconExamples />
|
|
44
|
+
<Divider spacing="medium" />
|
|
45
|
+
|
|
46
|
+
<CardExamples />
|
|
47
|
+
<Divider spacing="medium" />
|
|
48
|
+
|
|
49
|
+
<CheckboxExamples />
|
|
50
|
+
<Divider spacing="medium" />
|
|
51
|
+
|
|
52
|
+
<DividerExamples />
|
|
53
|
+
<Divider spacing="medium" />
|
|
54
|
+
|
|
55
|
+
<BadgeExamples />
|
|
56
|
+
<Divider spacing="medium" />
|
|
57
|
+
|
|
58
|
+
<AvatarExamples />
|
|
59
|
+
<Divider spacing="medium" />
|
|
60
|
+
|
|
61
|
+
<ScreenExamples />
|
|
62
|
+
<Divider spacing="medium" />
|
|
63
|
+
|
|
64
|
+
<Divider spacing="large" intent="success">
|
|
65
|
+
<Text size="small" weight="semibold" color="green">THEME SYSTEM</Text>
|
|
66
|
+
</Divider>
|
|
67
|
+
|
|
68
|
+
<ThemeExtensionExamples />
|
|
69
|
+
</View>
|
|
70
|
+
</Screen>
|
|
71
|
+
);
|
|
72
72
|
};
|