@alveole/components 1.6.1 → 1.6.3

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.
@@ -1,2 +1,2 @@
1
- export declare const ALVEOLE_COMPONENTS_VERSION: "1.6.1";
1
+ export declare const ALVEOLE_COMPONENTS_VERSION: "1.6.3";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- export const ALVEOLE_COMPONENTS_VERSION = "1.6.1";
1
+ export const ALVEOLE_COMPONENTS_VERSION = "1.6.3";
@@ -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: [styles.dualContainer, 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 }) }))] })] }));
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: [styles.dualContainer, 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));
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,9 @@ declare const _default: {
8
8
  shortDescription: string;
9
9
  component: typeof Toast;
10
10
  styleFn: () => {
11
- dualContainer: {
12
- padding: number;
13
- width: number | `${string}%` | undefined;
14
- };
15
11
  tamaguiToastContainer: {
12
+ padding: number;
13
+ width: number;
16
14
  backgroundColor: "transparent";
17
15
  borderRadius: number;
18
16
  };
@@ -23,6 +21,9 @@ declare const _default: {
23
21
  flexDirection: "row";
24
22
  gap: string | number;
25
23
  overflow: "hidden";
24
+ width: "100%";
25
+ maxWidth: number;
26
+ padding: number;
26
27
  } | {
27
28
  shadowColor: import("@alveole/theme").Color;
28
29
  shadowOffset: {
@@ -38,6 +39,9 @@ declare const _default: {
38
39
  flexDirection: "row";
39
40
  gap: string | number;
40
41
  overflow: "hidden";
42
+ width: "100%";
43
+ maxWidth: number;
44
+ padding: number;
41
45
  } | {
42
46
  boxShadow: string;
43
47
  backgroundColor: string;
@@ -46,6 +50,9 @@ declare const _default: {
46
50
  flexDirection: "row";
47
51
  gap: string | number;
48
52
  overflow: "hidden";
53
+ width: "100%";
54
+ maxWidth: number;
55
+ padding: number;
49
56
  };
50
57
  contenu: {
51
58
  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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MAAM,WAAW,mCAOvB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,yBAAyB,CAAC"}
@@ -1,9 +1,7 @@
1
1
  export declare const useStyles: () => {
2
- dualContainer: {
3
- padding: number;
4
- width: number | `${string}%` | undefined;
5
- };
6
2
  tamaguiToastContainer: {
3
+ padding: number;
4
+ width: number;
7
5
  backgroundColor: "transparent";
8
6
  borderRadius: number;
9
7
  };
@@ -14,6 +12,9 @@ export declare const useStyles: () => {
14
12
  flexDirection: "row";
15
13
  gap: string | number;
16
14
  overflow: "hidden";
15
+ width: "100%";
16
+ maxWidth: number;
17
+ padding: number;
17
18
  } | {
18
19
  shadowColor: import("@alveole/theme").Color;
19
20
  shadowOffset: {
@@ -29,6 +30,9 @@ export declare const useStyles: () => {
29
30
  flexDirection: "row";
30
31
  gap: string | number;
31
32
  overflow: "hidden";
33
+ width: "100%";
34
+ maxWidth: number;
35
+ padding: number;
32
36
  } | {
33
37
  boxShadow: string;
34
38
  backgroundColor: string;
@@ -37,6 +41,9 @@ export declare const useStyles: () => {
37
41
  flexDirection: "row";
38
42
  gap: string | number;
39
43
  overflow: "hidden";
44
+ width: "100%";
45
+ maxWidth: number;
46
+ padding: number;
40
47
  };
41
48
  contenu: {
42
49
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EnB,CAAC"}
1
+ {"version":3,"file":"Toast.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Toast/Toast.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2EnB,CAAC"}
@@ -1,12 +1,10 @@
1
1
  import { makeStyles } from '@alveole/theme';
2
- import { Platform } from 'react-native';
2
+ import { Dimensions, Platform } from 'react-native';
3
3
  export const useStyles = makeStyles(({ text, color, radius, spacing, shadows }) => ({
4
4
  // Container
5
- dualContainer: {
6
- padding: 0,
7
- width: Platform.select({ web: 384, default: '100%' }),
8
- },
9
5
  tamaguiToastContainer: {
6
+ padding: 0,
7
+ width: Platform.OS === 'web' ? 384 : Dimensions.get('window').width - 32,
10
8
  backgroundColor: 'transparent',
11
9
  borderRadius: 0,
12
10
  },
@@ -17,6 +15,9 @@ export const useStyles = makeStyles(({ text, color, radius, spacing, shadows })
17
15
  flexDirection: 'row',
18
16
  gap: spacing('1W'),
19
17
  overflow: 'hidden',
18
+ width: '100%',
19
+ maxWidth: 384,
20
+ padding: 0,
20
21
  ...shadows(3),
21
22
  },
22
23
  contenu: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alveole/components",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "description": "Shared UI components.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",