@alveole/components 1.6.2 → 1.6.4
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/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/ui/Toast/Toast.js +2 -2
- package/dist/ui/Toast/Toast.stories.d.ts +44 -3
- package/dist/ui/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/ui/Toast/Toast.styles.d.ts +44 -3
- package/dist/ui/Toast/Toast.styles.d.ts.map +1 -1
- package/dist/ui/Toast/Toast.styles.js +8 -4
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ALVEOLE_COMPONENTS_VERSION: "1.6.
|
|
1
|
+
export declare const ALVEOLE_COMPONENTS_VERSION: "1.6.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ALVEOLE_COMPONENTS_VERSION = "1.6.
|
|
1
|
+
export const ALVEOLE_COMPONENTS_VERSION = "1.6.4";
|
package/dist/ui/Toast/Toast.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useStyles } from './Toast.styles';
|
|
|
7
7
|
import { ToastType } from './ToastType';
|
|
8
8
|
export function ToastView({ title, message, variant = 'default', icon, onClose }) {
|
|
9
9
|
const styles = useStyles();
|
|
10
|
-
return (_jsxs(Box, { style:
|
|
10
|
+
return (_jsxs(Box, { style: styles.container, children: [_jsx(ToastType, { variant: variant, icon: icon }), _jsxs(Box, { style: styles.contenu, children: [_jsxs(Box, { style: styles.titleContainer, children: [_jsx(Typography, { style: styles.title, children: title }), _jsx(Pressable, { onPress: onClose, children: _jsx(LucideIcon, { name: "X", size: "md" }) })] }), message && (_jsx(Box, { children: _jsx(Typography, { style: styles.message, children: message }) }))] })] }));
|
|
11
11
|
}
|
|
12
12
|
export function Toast() {
|
|
13
13
|
const toast = useToastState();
|
|
@@ -15,5 +15,5 @@ export function Toast() {
|
|
|
15
15
|
const styles = useStyles();
|
|
16
16
|
if (!toast)
|
|
17
17
|
return null;
|
|
18
|
-
return (_jsx(TamaguiToast, { duration: toast.duration, enterStyle: { opacity: 0, y: 10, scale: 0.98 }, exitStyle: { opacity: 0, y: 10, scale: 0.98 }, viewportName: "app-toasts", style:
|
|
18
|
+
return (_jsx(TamaguiToast, { duration: toast.duration, enterStyle: { opacity: 0, y: 10, scale: 0.98 }, exitStyle: { opacity: 0, y: 10, scale: 0.98 }, viewportName: "app-toasts", style: styles.tamaguiToastContainer, children: _jsx(ToastView, { title: toast.title, message: toast.message, variant: toast.customData?.variant ?? 'default', icon: toast.customData?.icon, onClose: () => controller.hide() }) }, toast.id));
|
|
19
19
|
}
|
|
@@ -8,11 +8,33 @@ declare const _default: {
|
|
|
8
8
|
shortDescription: string;
|
|
9
9
|
component: typeof Toast;
|
|
10
10
|
styleFn: () => {
|
|
11
|
-
|
|
11
|
+
tamaguiToastContainer: {
|
|
12
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
13
|
+
padding: number;
|
|
14
|
+
width: number;
|
|
15
|
+
backgroundColor: "transparent";
|
|
16
|
+
} | {
|
|
17
|
+
shadowColor: import("@alveole/theme").Color;
|
|
18
|
+
shadowOffset: {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
shadowOpacity: number;
|
|
23
|
+
shadowRadius: number;
|
|
24
|
+
elevation: number;
|
|
25
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
26
|
+
padding: number;
|
|
27
|
+
width: number;
|
|
28
|
+
backgroundColor: "transparent";
|
|
29
|
+
} | {
|
|
30
|
+
boxShadow: string;
|
|
31
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
32
|
+
padding: number;
|
|
33
|
+
width: number;
|
|
34
|
+
backgroundColor: "transparent";
|
|
35
|
+
} | {
|
|
12
36
|
padding: number;
|
|
13
37
|
width: number;
|
|
14
|
-
};
|
|
15
|
-
tamaguiToastContainer: {
|
|
16
38
|
backgroundColor: "transparent";
|
|
17
39
|
borderRadius: number;
|
|
18
40
|
};
|
|
@@ -23,6 +45,9 @@ declare const _default: {
|
|
|
23
45
|
flexDirection: "row";
|
|
24
46
|
gap: string | number;
|
|
25
47
|
overflow: "hidden";
|
|
48
|
+
width: "100%";
|
|
49
|
+
maxWidth: number;
|
|
50
|
+
padding: number;
|
|
26
51
|
} | {
|
|
27
52
|
shadowColor: import("@alveole/theme").Color;
|
|
28
53
|
shadowOffset: {
|
|
@@ -38,6 +63,9 @@ declare const _default: {
|
|
|
38
63
|
flexDirection: "row";
|
|
39
64
|
gap: string | number;
|
|
40
65
|
overflow: "hidden";
|
|
66
|
+
width: "100%";
|
|
67
|
+
maxWidth: number;
|
|
68
|
+
padding: number;
|
|
41
69
|
} | {
|
|
42
70
|
boxShadow: string;
|
|
43
71
|
backgroundColor: string;
|
|
@@ -46,6 +74,19 @@ declare const _default: {
|
|
|
46
74
|
flexDirection: "row";
|
|
47
75
|
gap: string | number;
|
|
48
76
|
overflow: "hidden";
|
|
77
|
+
width: "100%";
|
|
78
|
+
maxWidth: number;
|
|
79
|
+
padding: number;
|
|
80
|
+
} | {
|
|
81
|
+
backgroundColor: string;
|
|
82
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
83
|
+
display: "flex";
|
|
84
|
+
flexDirection: "row";
|
|
85
|
+
gap: string | number;
|
|
86
|
+
overflow: "hidden";
|
|
87
|
+
width: "100%";
|
|
88
|
+
maxWidth: number;
|
|
89
|
+
padding: number;
|
|
49
90
|
};
|
|
50
91
|
contenu: {
|
|
51
92
|
display: "flex";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Toast/Toast.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"Toast.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Toast/Toast.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAM3C,wBASkB;AAElB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,GAAG,mCA+Bf,CAAC;AAEF,eAAO,MAAM,WAAW,mCAEvB,CAAC;AAEF,eAAO,MAAM,cAAc,mCAE1B,CAAC;AAEF,eAAO,MAAM,YAAY,mCAExB,CAAC;AAEF,eAAO,MAAM,cAAc,mCAE1B,CAAC;AAEF,eAAO,MAAM,cAAc,mCAE1B,CAAC;AAEF,eAAO,MAAM,0BAA0B,mCAA2E,CAAC;AAEnH,eAAO,MAAM,6BAA6B,mCAEzC,CAAC;AAEF,eAAO,MAAM,WAAW,mCAOvB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
export declare const useStyles: () => {
|
|
2
|
-
|
|
2
|
+
tamaguiToastContainer: {
|
|
3
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
4
|
+
padding: number;
|
|
5
|
+
width: number;
|
|
6
|
+
backgroundColor: "transparent";
|
|
7
|
+
} | {
|
|
8
|
+
shadowColor: import("@alveole/theme").Color;
|
|
9
|
+
shadowOffset: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
shadowOpacity: number;
|
|
14
|
+
shadowRadius: number;
|
|
15
|
+
elevation: number;
|
|
16
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
17
|
+
padding: number;
|
|
18
|
+
width: number;
|
|
19
|
+
backgroundColor: "transparent";
|
|
20
|
+
} | {
|
|
21
|
+
boxShadow: string;
|
|
22
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
23
|
+
padding: number;
|
|
24
|
+
width: number;
|
|
25
|
+
backgroundColor: "transparent";
|
|
26
|
+
} | {
|
|
3
27
|
padding: number;
|
|
4
28
|
width: number;
|
|
5
|
-
};
|
|
6
|
-
tamaguiToastContainer: {
|
|
7
29
|
backgroundColor: "transparent";
|
|
8
30
|
borderRadius: number;
|
|
9
31
|
};
|
|
@@ -14,6 +36,9 @@ export declare const useStyles: () => {
|
|
|
14
36
|
flexDirection: "row";
|
|
15
37
|
gap: string | number;
|
|
16
38
|
overflow: "hidden";
|
|
39
|
+
width: "100%";
|
|
40
|
+
maxWidth: number;
|
|
41
|
+
padding: number;
|
|
17
42
|
} | {
|
|
18
43
|
shadowColor: import("@alveole/theme").Color;
|
|
19
44
|
shadowOffset: {
|
|
@@ -29,6 +54,9 @@ export declare const useStyles: () => {
|
|
|
29
54
|
flexDirection: "row";
|
|
30
55
|
gap: string | number;
|
|
31
56
|
overflow: "hidden";
|
|
57
|
+
width: "100%";
|
|
58
|
+
maxWidth: number;
|
|
59
|
+
padding: number;
|
|
32
60
|
} | {
|
|
33
61
|
boxShadow: string;
|
|
34
62
|
backgroundColor: string;
|
|
@@ -37,6 +65,19 @@ export declare const useStyles: () => {
|
|
|
37
65
|
flexDirection: "row";
|
|
38
66
|
gap: string | number;
|
|
39
67
|
overflow: "hidden";
|
|
68
|
+
width: "100%";
|
|
69
|
+
maxWidth: number;
|
|
70
|
+
padding: number;
|
|
71
|
+
} | {
|
|
72
|
+
backgroundColor: string;
|
|
73
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
74
|
+
display: "flex";
|
|
75
|
+
flexDirection: "row";
|
|
76
|
+
gap: string | number;
|
|
77
|
+
overflow: "hidden";
|
|
78
|
+
width: "100%";
|
|
79
|
+
maxWidth: number;
|
|
80
|
+
padding: number;
|
|
40
81
|
};
|
|
41
82
|
contenu: {
|
|
42
83
|
display: "flex";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Toast/Toast.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"Toast.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Toast/Toast.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EnB,CAAC"}
|
|
@@ -2,13 +2,13 @@ import { makeStyles } from '@alveole/theme';
|
|
|
2
2
|
import { Dimensions, Platform } from 'react-native';
|
|
3
3
|
export const useStyles = makeStyles(({ text, color, radius, spacing, shadows }) => ({
|
|
4
4
|
// Container
|
|
5
|
-
|
|
5
|
+
tamaguiToastContainer: {
|
|
6
6
|
padding: 0,
|
|
7
7
|
width: Platform.OS === 'web' ? 384 : Dimensions.get('window').width,
|
|
8
|
-
},
|
|
9
|
-
tamaguiToastContainer: {
|
|
10
8
|
backgroundColor: 'transparent',
|
|
11
9
|
borderRadius: 0,
|
|
10
|
+
// Sur mobile, overflow:hidden sur container clippe le shadow iOS — on le pose ici
|
|
11
|
+
...(Platform.OS !== 'web' ? { borderRadius: radius('sm'), ...shadows(3) } : {}),
|
|
12
12
|
},
|
|
13
13
|
container: {
|
|
14
14
|
backgroundColor: color.light.background['default-grey'],
|
|
@@ -17,7 +17,11 @@ export const useStyles = makeStyles(({ text, color, radius, spacing, shadows })
|
|
|
17
17
|
flexDirection: 'row',
|
|
18
18
|
gap: spacing('1W'),
|
|
19
19
|
overflow: 'hidden',
|
|
20
|
-
|
|
20
|
+
width: '100%',
|
|
21
|
+
maxWidth: 384,
|
|
22
|
+
padding: 0,
|
|
23
|
+
// Sur web, overflow:hidden ne clippe pas le shadow — on le pose ici pour avoir le bon borderRadius
|
|
24
|
+
...(Platform.OS === 'web' ? shadows(3) : {}),
|
|
21
25
|
},
|
|
22
26
|
contenu: {
|
|
23
27
|
display: 'flex',
|