prizmux 1.3.2 → 1.4.0

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.
Files changed (41) hide show
  1. package/dist/components/Alert/Alert.d.ts +5 -0
  2. package/dist/components/Alert/Alert.d.ts.map +1 -0
  3. package/dist/components/Alert/Alert.js +88 -0
  4. package/dist/components/Alert/Alert.js.map +1 -0
  5. package/dist/components/Alert/Alert.types.d.ts +21 -0
  6. package/dist/components/Alert/Alert.types.d.ts.map +1 -0
  7. package/dist/components/Alert/Alert.types.js +3 -0
  8. package/dist/components/Alert/Alert.types.js.map +1 -0
  9. package/dist/components/Alert/index.d.ts +3 -0
  10. package/dist/components/Alert/index.d.ts.map +1 -0
  11. package/dist/components/Alert/index.js +6 -0
  12. package/dist/components/Alert/index.js.map +1 -0
  13. package/dist/components/Fab/FAB.d.ts +5 -0
  14. package/dist/components/Fab/FAB.d.ts.map +1 -0
  15. package/dist/components/Fab/FAB.js +120 -0
  16. package/dist/components/Fab/FAB.js.map +1 -0
  17. package/dist/components/Fab/FAB.types.d.ts +25 -0
  18. package/dist/components/Fab/FAB.types.d.ts.map +1 -0
  19. package/dist/components/Fab/FAB.types.js +3 -0
  20. package/dist/components/Fab/FAB.types.js.map +1 -0
  21. package/dist/components/Fab/index.d.ts +3 -0
  22. package/dist/components/Fab/index.d.ts.map +1 -0
  23. package/dist/components/Fab/index.js +6 -0
  24. package/dist/components/Fab/index.js.map +1 -0
  25. package/dist/components/Toast/Toast.d.ts +5 -0
  26. package/dist/components/Toast/Toast.d.ts.map +1 -0
  27. package/dist/components/Toast/Toast.js +222 -0
  28. package/dist/components/Toast/Toast.js.map +1 -0
  29. package/dist/components/Toast/Toast.types.d.ts +32 -0
  30. package/dist/components/Toast/Toast.types.d.ts.map +1 -0
  31. package/dist/components/Toast/Toast.types.js +3 -0
  32. package/dist/components/Toast/Toast.types.js.map +1 -0
  33. package/dist/components/Toast/index.d.ts +3 -0
  34. package/dist/components/Toast/index.d.ts.map +1 -0
  35. package/dist/components/Toast/index.js +6 -0
  36. package/dist/components/Toast/index.js.map +1 -0
  37. package/dist/components/index.d.ts +2 -0
  38. package/dist/components/index.d.ts.map +1 -1
  39. package/dist/components/index.js +2 -0
  40. package/dist/components/index.js.map +1 -1
  41. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { AlertProps } from './Alert.types';
3
+ export declare const Alert: React.FC<AlertProps>;
4
+ export default Alert;
5
+ //# sourceMappingURL=Alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AASjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAiGtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Alert = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const react_native_1 = require("react-native");
7
+ const Alert = ({ visible, onClose, title, message, icon, children, dismissOnBackdropPress = true, borderRadius = 16, backgroundColor = '#FFFFFF', overlayColor = 'rgba(0,0,0,0.5)', style, titleStyle, messageStyle, overlayStyle, iconContainerStyle, contentContainerStyle, }) => {
8
+ const scaleAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0.85)).current;
9
+ const opacityAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
10
+ (0, react_1.useEffect)(() => {
11
+ if (visible) {
12
+ scaleAnim.setValue(0.85);
13
+ opacityAnim.setValue(0);
14
+ react_native_1.Animated.parallel([
15
+ react_native_1.Animated.timing(opacityAnim, {
16
+ toValue: 1,
17
+ duration: 200,
18
+ useNativeDriver: true,
19
+ }),
20
+ react_native_1.Animated.spring(scaleAnim, {
21
+ toValue: 1,
22
+ bounciness: 6,
23
+ useNativeDriver: true,
24
+ }),
25
+ ]).start();
26
+ }
27
+ }, [visible]);
28
+ if (!visible)
29
+ return null;
30
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: visible, animationType: "none", statusBarTranslucent: true, onRequestClose: dismissOnBackdropPress ? onClose : undefined, children: (0, jsx_runtime_1.jsx)(react_native_1.Pressable, { style: [styles.overlay, { backgroundColor: overlayColor }, overlayStyle], onPress: dismissOnBackdropPress ? onClose : undefined, children: (0, jsx_runtime_1.jsx)(react_native_1.Pressable, { onPress: () => { }, children: (0, jsx_runtime_1.jsxs)(react_native_1.Animated.View, { style: [
31
+ styles.alertBox,
32
+ {
33
+ backgroundColor,
34
+ borderRadius,
35
+ opacity: opacityAnim,
36
+ transform: [{ scale: scaleAnim }],
37
+ },
38
+ style,
39
+ ], children: [icon && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles.iconContainer, iconContainerStyle], children: icon })), title && ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.title, titleStyle], children: title })), message && ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.message, messageStyle], children: message })), children && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles.contentContainer, contentContainerStyle], children: children }))] }) }) }) }));
40
+ };
41
+ exports.Alert = Alert;
42
+ exports.default = exports.Alert;
43
+ const styles = react_native_1.StyleSheet.create({
44
+ overlay: {
45
+ flex: 1,
46
+ justifyContent: 'center',
47
+ alignItems: 'center',
48
+ paddingHorizontal: 32,
49
+ },
50
+ alertBox: {
51
+ width: '100%',
52
+ maxWidth: 340,
53
+ paddingTop: 8,
54
+ paddingBottom: 20,
55
+ shadowColor: '#000',
56
+ shadowOffset: { width: 0, height: 8 },
57
+ shadowOpacity: 0.15,
58
+ shadowRadius: 16,
59
+ elevation: 10,
60
+ },
61
+ iconContainer: {
62
+ alignItems: 'center',
63
+ paddingTop: 20,
64
+ paddingBottom: 4,
65
+ },
66
+ title: {
67
+ fontSize: 17,
68
+ fontWeight: '700',
69
+ color: '#111827',
70
+ textAlign: 'center',
71
+ paddingHorizontal: 20,
72
+ paddingTop: 16,
73
+ },
74
+ message: {
75
+ fontSize: 14,
76
+ color: '#6B7280',
77
+ textAlign: 'center',
78
+ lineHeight: 20,
79
+ paddingHorizontal: 20,
80
+ paddingTop: 8,
81
+ },
82
+ contentContainer: {
83
+ paddingHorizontal: 20,
84
+ paddingTop: 16,
85
+ gap: 10,
86
+ },
87
+ });
88
+ //# sourceMappingURL=Alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiD;AACjD,+CAOsB;AAGf,MAAM,KAAK,GAAyB,CAAC,EAC1C,OAAO,EACP,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,sBAAsB,GAAG,IAAI,EAC7B,YAAY,GAAG,EAAE,EACjB,eAAe,GAAG,SAAS,EAC3B,YAAY,GAAG,iBAAiB,EAChC,KAAK,EACL,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,GACtB,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,IAAA,cAAM,EAAC,IAAI,uBAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;IAC3D,MAAM,WAAW,GAAG,IAAA,cAAM,EAAC,IAAI,uBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAE1D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,OAAO,EAAE,CAAC;YACZ,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACzB,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACxB,uBAAQ,CAAC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B,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,EAAE;QACd,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE,CAAC;KACd;IACD,gBAAgB,EAAE;QAChB,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE,EAAE;QACd,GAAG,EAAE,EAAE;KACR;CACF,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { ReactNode } from 'react';
2
+ import { TextStyle, ViewStyle } from 'react-native';
3
+ export interface AlertProps {
4
+ visible: boolean;
5
+ onClose: () => void;
6
+ title?: string;
7
+ message?: string;
8
+ icon?: ReactNode;
9
+ children?: ReactNode;
10
+ dismissOnBackdropPress?: boolean;
11
+ borderRadius?: number;
12
+ backgroundColor?: string;
13
+ overlayColor?: string;
14
+ style?: ViewStyle;
15
+ titleStyle?: TextStyle;
16
+ messageStyle?: TextStyle;
17
+ overlayStyle?: ViewStyle;
18
+ iconContainerStyle?: ViewStyle;
19
+ contentContainerStyle?: ViewStyle;
20
+ }
21
+ //# sourceMappingURL=Alert.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alert.types.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/Alert.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IAGpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAGrB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAGjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,qBAAqB,CAAC,EAAE,SAAS,CAAC;CACnC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Alert.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alert.types.js","sourceRoot":"","sources":["../../../src/components/Alert/Alert.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export { Alert } from './Alert';
2
+ export type { AlertProps } from './Alert.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Alert = void 0;
4
+ var Alert_1 = require("./Alert");
5
+ Object.defineProperty(exports, "Alert", { enumerable: true, get: function () { return Alert_1.Alert; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Alert/index.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAAvB,8FAAA,KAAK,OAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { FABProps } from './FAB.types';
3
+ export declare const FAB: React.FC<FABProps>;
4
+ export default FAB;
5
+ //# sourceMappingURL=FAB.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FAB.d.ts","sourceRoot":"","sources":["../../../src/components/Fab/FAB.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAStC,OAAO,EAAe,QAAQ,EAAW,MAAM,aAAa,CAAC;AAgC7D,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAqIlC,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FAB = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const react_native_1 = require("react-native");
7
+ // Size config
8
+ const SIZE_CONFIG = {
9
+ small: { button: 40, fontSize: 12 },
10
+ medium: { button: 56, fontSize: 14 },
11
+ large: { button: 72, fontSize: 16 },
12
+ };
13
+ // Position config — maps to absolute positioning
14
+ const getPositionStyle = (position, offsetX, offsetY) => {
15
+ switch (position) {
16
+ case 'bottom-right':
17
+ return { bottom: offsetY, right: offsetX };
18
+ case 'bottom-left':
19
+ return { bottom: offsetY, left: offsetX };
20
+ case 'bottom-center':
21
+ return { bottom: offsetY, alignSelf: 'center' };
22
+ case 'top-right':
23
+ return { top: offsetY, right: offsetX };
24
+ case 'top-left':
25
+ return { top: offsetY, left: offsetX };
26
+ case 'top-center':
27
+ return { top: offsetY, alignSelf: 'center' };
28
+ }
29
+ };
30
+ const FAB = ({ onPress, onLongPress, icon, label, labelPosition = 'right', position = 'bottom-right', offsetX = 16, offsetY = 24, size = 'medium', borderRadius, backgroundColor = '#6366F1', iconColor, labelColor = '#FFFFFF', disabled = false, loading = false, style, labelStyle, containerStyle, }) => {
31
+ const scaleAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
32
+ const sizeConfig = SIZE_CONFIG[size];
33
+ const buttonSize = sizeConfig.button;
34
+ // Default to circle (half of size), consumer can override
35
+ const radius = borderRadius ?? buttonSize / 2;
36
+ const handlePressIn = () => {
37
+ react_native_1.Animated.spring(scaleAnim, {
38
+ toValue: 0.92,
39
+ useNativeDriver: true,
40
+ bounciness: 4,
41
+ }).start();
42
+ };
43
+ const handlePressOut = () => {
44
+ react_native_1.Animated.spring(scaleAnim, {
45
+ toValue: 1,
46
+ useNativeDriver: true,
47
+ bounciness: 4,
48
+ }).start();
49
+ };
50
+ const positionStyle = getPositionStyle(position, offsetX, offsetY);
51
+ const hasLabel = !!label;
52
+ const hasIcon = !!icon;
53
+ // When there's a label, the button becomes a pill/row — not a perfect square
54
+ const isExtended = hasLabel && hasIcon;
55
+ const isLabelOnly = hasLabel && !hasIcon;
56
+ // Layout direction based on labelPosition
57
+ const isHorizontal = labelPosition === 'left' || labelPosition === 'right';
58
+ const flexDirection = labelPosition === 'left'
59
+ ? 'row-reverse'
60
+ : labelPosition === 'right'
61
+ ? 'row'
62
+ : labelPosition === 'top'
63
+ ? 'column-reverse'
64
+ : 'column';
65
+ const gap = size === 'small' ? 6 : size === 'medium' ? 8 : 10;
66
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [
67
+ styles.container,
68
+ positionStyle,
69
+ containerStyle,
70
+ ], pointerEvents: "box-none", children: (0, jsx_runtime_1.jsx)(react_native_1.Animated.View, { style: { transform: [{ scale: scaleAnim }] }, children: (0, jsx_runtime_1.jsx)(react_native_1.Pressable, { onPress: onPress, onLongPress: onLongPress, onPressIn: handlePressIn, onPressOut: handlePressOut, disabled: disabled || loading, accessibilityRole: "button", accessibilityLabel: label ?? 'FAB', accessibilityState: { disabled: disabled || loading }, style: [
71
+ styles.button,
72
+ {
73
+ backgroundColor: disabled ? '#9CA3AF' : backgroundColor,
74
+ borderRadius: radius,
75
+ // Square dimensions only when icon-only or label-only with no icon
76
+ width: isExtended ? undefined : isLabelOnly ? undefined : buttonSize,
77
+ height: buttonSize,
78
+ paddingHorizontal: isExtended || isLabelOnly ? 20 : 0,
79
+ flexDirection: flexDirection,
80
+ gap: isExtended ? gap : 0,
81
+ },
82
+ style,
83
+ ], children: loading ? ((0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: size === 'large' ? 'large' : 'small', color: "#FFFFFF" })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [hasIcon && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.iconWrapper, children: icon })), hasLabel && ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [
84
+ styles.label,
85
+ {
86
+ fontSize: sizeConfig.fontSize,
87
+ color: disabled ? '#E5E7EB' : labelColor,
88
+ marginTop: !isHorizontal && hasIcon ? gap / 2 : 0,
89
+ marginBottom: labelPosition === 'top' && hasIcon ? gap / 2 : 0,
90
+ },
91
+ labelStyle,
92
+ ], children: label }))] })) }) }) }));
93
+ };
94
+ exports.FAB = FAB;
95
+ exports.default = exports.FAB;
96
+ const styles = react_native_1.StyleSheet.create({
97
+ container: {
98
+ position: 'absolute',
99
+ zIndex: 99,
100
+ alignItems: 'center',
101
+ },
102
+ button: {
103
+ alignItems: 'center',
104
+ justifyContent: 'center',
105
+ shadowColor: '#000',
106
+ shadowOffset: { width: 0, height: 4 },
107
+ shadowOpacity: 0.25,
108
+ shadowRadius: 8,
109
+ elevation: 8,
110
+ },
111
+ iconWrapper: {
112
+ alignItems: 'center',
113
+ justifyContent: 'center',
114
+ },
115
+ label: {
116
+ fontWeight: '600',
117
+ letterSpacing: 0.3,
118
+ },
119
+ });
120
+ //# sourceMappingURL=FAB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FAB.js","sourceRoot":"","sources":["../../../src/components/Fab/FAB.tsx"],"names":[],"mappings":";;;;AAAA,iCAAsC;AACtC,+CAOsB;AAItB,cAAc;AACd,MAAM,WAAW,GAA0D;IACzE,KAAK,EAAG,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpC,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpC,KAAK,EAAG,EAAE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pB,cAAc,EAAE,QAAQ;KACzB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,KAAK;QACjB,aAAa,EAAE,GAAG;KACnB;CACF,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { ReactNode } from 'react';
2
+ import { TextStyle, ViewStyle } from 'react-native';
3
+ export type FABPosition = 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center';
4
+ export type FABSize = 'small' | 'medium' | 'large';
5
+ export interface FABProps {
6
+ onPress: () => void;
7
+ onLongPress?: () => void;
8
+ icon?: ReactNode;
9
+ label?: string;
10
+ labelPosition?: 'right' | 'left' | 'bottom' | 'top';
11
+ position?: FABPosition;
12
+ offsetX?: number;
13
+ offsetY?: number;
14
+ size?: FABSize;
15
+ borderRadius?: number;
16
+ backgroundColor?: string;
17
+ iconColor?: string;
18
+ labelColor?: string;
19
+ disabled?: boolean;
20
+ loading?: boolean;
21
+ style?: ViewStyle;
22
+ labelStyle?: TextStyle;
23
+ containerStyle?: ViewStyle;
24
+ }
25
+ //# sourceMappingURL=FAB.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FAB.types.d.ts","sourceRoot":"","sources":["../../../src/components/Fab/FAB.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,WAAW,GACnB,cAAc,GACd,aAAa,GACb,eAAe,GACf,WAAW,GACX,UAAU,GACV,YAAY,CAAC;AAEjB,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEnD,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IAGzB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IAGpD,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAGlB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FAB.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FAB.types.js","sourceRoot":"","sources":["../../../src/components/Fab/FAB.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export { FAB } from './FAB';
2
+ export type { FABProps, FABPosition, FABSize } from './FAB.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Fab/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FAB = void 0;
4
+ var FAB_1 = require("./FAB");
5
+ Object.defineProperty(exports, "FAB", { enumerable: true, get: function () { return FAB_1.FAB; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Fab/index.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;AAAnB,0FAAA,GAAG,OAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { ToastProps } from './Toast.types';
3
+ export declare const Toast: React.FC<ToastProps>;
4
+ export default Toast;
5
+ //# sourceMappingURL=Toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAW9D,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,eAAe,CAAC;AAe3D,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA6OtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,222 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Toast = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const react_native_1 = require("react-native");
7
+ const { width: SCREEN_WIDTH } = react_native_1.Dimensions.get('window');
8
+ const TYPE_COLORS = {
9
+ success: { bg: '#166534', text: '#FFFFFF' },
10
+ error: { bg: '#991B1B', text: '#FFFFFF' },
11
+ warning: { bg: '#92400E', text: '#FFFFFF' },
12
+ info: { bg: '#1E3A8A', text: '#FFFFFF' },
13
+ };
14
+ const DefaultCloseIcon = () => ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.defaultCloseIcon, children: "\u2715" }));
15
+ const Toast = ({ visible, onHide, text, description, type = 'info', position = 'top', dismiss = 'auto', duration = 3000, swipeable = false, swipeDirection = 'horizontal', swipeThreshold = 80, icon, closeIcon, backgroundColor, textColor, descriptionColor, borderRadius = 10, style, textStyle, descriptionStyle, iconContainerStyle, closeButtonStyle, overlayStyle, }) => {
16
+ const slideAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(position === 'top' ? -120 : 120)).current;
17
+ const opacityAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
18
+ const swipeX = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
19
+ const swipeY = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
20
+ const timerRef = (0, react_1.useRef)(null);
21
+ const isAnimatingOut = (0, react_1.useRef)(false);
22
+ const colors = TYPE_COLORS[type];
23
+ const bgColor = backgroundColor ?? colors.bg;
24
+ const txtColor = textColor ?? colors.text;
25
+ const descColor = descriptionColor ?? txtColor;
26
+ const isManualOrBoth = dismiss === 'manual' || dismiss === 'both';
27
+ const animateOut = (0, react_1.useCallback)((direction) => {
28
+ if (isAnimatingOut.current)
29
+ return;
30
+ isAnimatingOut.current = true;
31
+ if (timerRef.current)
32
+ clearTimeout(timerRef.current);
33
+ const swipeAnimations = [];
34
+ if (direction === 'left') {
35
+ swipeAnimations.push(react_native_1.Animated.timing(swipeX, { toValue: -SCREEN_WIDTH, duration: 250, useNativeDriver: true }));
36
+ }
37
+ else if (direction === 'right') {
38
+ swipeAnimations.push(react_native_1.Animated.timing(swipeX, { toValue: SCREEN_WIDTH, duration: 250, useNativeDriver: true }));
39
+ }
40
+ else if (direction === 'up') {
41
+ swipeAnimations.push(react_native_1.Animated.timing(swipeY, { toValue: -300, duration: 250, useNativeDriver: true }));
42
+ }
43
+ else if (direction === 'down') {
44
+ swipeAnimations.push(react_native_1.Animated.timing(swipeY, { toValue: 300, duration: 250, useNativeDriver: true }));
45
+ }
46
+ react_native_1.Animated.parallel([
47
+ ...swipeAnimations,
48
+ react_native_1.Animated.timing(slideAnim, {
49
+ toValue: position === 'top' ? -120 : 120,
50
+ duration: direction ? 0 : 250,
51
+ useNativeDriver: true,
52
+ }),
53
+ react_native_1.Animated.timing(opacityAnim, {
54
+ toValue: 0,
55
+ duration: 250,
56
+ useNativeDriver: true,
57
+ }),
58
+ ]).start(() => {
59
+ isAnimatingOut.current = false;
60
+ swipeX.setValue(0);
61
+ swipeY.setValue(0);
62
+ onHide();
63
+ });
64
+ }, [slideAnim, opacityAnim, swipeX, swipeY, position, onHide]);
65
+ const animateIn = (0, react_1.useCallback)(() => {
66
+ isAnimatingOut.current = false;
67
+ swipeX.setValue(0);
68
+ swipeY.setValue(0);
69
+ slideAnim.setValue(position === 'top' ? -120 : 120);
70
+ opacityAnim.setValue(0);
71
+ react_native_1.Animated.parallel([
72
+ react_native_1.Animated.timing(slideAnim, {
73
+ toValue: 0,
74
+ duration: 300,
75
+ useNativeDriver: true,
76
+ }),
77
+ react_native_1.Animated.timing(opacityAnim, {
78
+ toValue: 1,
79
+ duration: 300,
80
+ useNativeDriver: true,
81
+ }),
82
+ ]).start();
83
+ }, [slideAnim, opacityAnim, swipeX, swipeY, position]);
84
+ (0, react_1.useEffect)(() => {
85
+ if (visible) {
86
+ animateIn();
87
+ if (dismiss === 'auto' || dismiss === 'both') {
88
+ timerRef.current = setTimeout(() => animateOut(), duration);
89
+ }
90
+ }
91
+ else {
92
+ slideAnim.setValue(position === 'top' ? -120 : 120);
93
+ opacityAnim.setValue(0);
94
+ }
95
+ return () => {
96
+ if (timerRef.current)
97
+ clearTimeout(timerRef.current);
98
+ };
99
+ }, [visible, dismiss, duration, position]);
100
+ const panResponder = (0, react_1.useRef)(react_native_1.PanResponder.create({
101
+ onStartShouldSetPanResponder: () => swipeable && isManualOrBoth,
102
+ onMoveShouldSetPanResponder: (_, gs) => {
103
+ if (!swipeable || !isManualOrBoth)
104
+ return false;
105
+ const { dx, dy } = gs;
106
+ if (swipeDirection === 'horizontal')
107
+ return Math.abs(dx) > 5;
108
+ if (swipeDirection === 'vertical')
109
+ return Math.abs(dy) > 5;
110
+ return Math.abs(dx) > 5 || Math.abs(dy) > 5;
111
+ },
112
+ onPanResponderMove: (_, gs) => {
113
+ if (swipeDirection === 'horizontal' || swipeDirection === 'both') {
114
+ swipeX.setValue(gs.dx);
115
+ }
116
+ if (swipeDirection === 'vertical' || swipeDirection === 'both') {
117
+ swipeY.setValue(gs.dy);
118
+ }
119
+ },
120
+ onPanResponderRelease: (_, gs) => {
121
+ const { dx, dy, vx, vy } = gs;
122
+ const swipedH = (swipeDirection === 'horizontal' || swipeDirection === 'both') &&
123
+ (Math.abs(dx) > swipeThreshold || Math.abs(vx) > 0.8);
124
+ const swipedV = (swipeDirection === 'vertical' || swipeDirection === 'both') &&
125
+ (Math.abs(dy) > swipeThreshold || Math.abs(vy) > 0.8);
126
+ if (swipedH) {
127
+ animateOut(dx > 0 ? 'right' : 'left');
128
+ }
129
+ else if (swipedV) {
130
+ animateOut(dy > 0 ? 'down' : 'up');
131
+ }
132
+ else {
133
+ react_native_1.Animated.parallel([
134
+ react_native_1.Animated.spring(swipeX, { toValue: 0, useNativeDriver: true, bounciness: 5 }),
135
+ react_native_1.Animated.spring(swipeY, { toValue: 0, useNativeDriver: true, bounciness: 5 }),
136
+ ]).start();
137
+ }
138
+ },
139
+ })).current;
140
+ if (!visible)
141
+ return null;
142
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: visible, animationType: "none", statusBarTranslucent: true, onRequestClose: isManualOrBoth ? () => animateOut() : undefined, children: (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [
143
+ styles.overlay,
144
+ position === 'bottom' ? styles.overlayBottom : styles.overlayTop,
145
+ overlayStyle, // ← full overlay override
146
+ ], pointerEvents: "box-none", children: (0, jsx_runtime_1.jsxs)(react_native_1.Animated.View, { style: [
147
+ styles.toast,
148
+ {
149
+ backgroundColor: bgColor,
150
+ borderRadius, // ← from prop
151
+ transform: [
152
+ { translateY: react_native_1.Animated.add(slideAnim, swipeY) },
153
+ { translateX: swipeX },
154
+ ],
155
+ opacity: opacityAnim,
156
+ },
157
+ style, // ← full toast override
158
+ ], ...panResponder.panHandlers, children: [icon && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles.iconContainer, iconContainerStyle], children: icon })), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.textContainer, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.text, { color: txtColor }, textStyle], children: text }), description && ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [
159
+ styles.description,
160
+ { color: descColor },
161
+ descriptionStyle,
162
+ ], children: description }))] }), isManualOrBoth && ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { onPress: () => animateOut(), style: [styles.closeButton, closeButtonStyle], hitSlop: 10, accessibilityLabel: "Dismiss notification", accessibilityRole: "button", children: closeIcon ?? (0, jsx_runtime_1.jsx)(DefaultCloseIcon, {}) }))] }) }) }));
163
+ };
164
+ exports.Toast = Toast;
165
+ exports.default = exports.Toast;
166
+ const styles = react_native_1.StyleSheet.create({
167
+ overlay: {
168
+ flex: 1,
169
+ alignItems: 'center',
170
+ backgroundColor: 'transparent',
171
+ },
172
+ overlayTop: {
173
+ justifyContent: 'flex-start',
174
+ paddingTop: 50,
175
+ },
176
+ overlayBottom: {
177
+ justifyContent: 'flex-end',
178
+ paddingBottom: 50,
179
+ },
180
+ toast: {
181
+ flexDirection: 'row',
182
+ alignItems: 'center',
183
+ paddingHorizontal: 16,
184
+ paddingVertical: 12,
185
+ maxWidth: SCREEN_WIDTH - 40,
186
+ width: SCREEN_WIDTH - 40,
187
+ shadowColor: '#000',
188
+ shadowOffset: { width: 0, height: 4 },
189
+ shadowOpacity: 0.2,
190
+ shadowRadius: 6,
191
+ elevation: 6,
192
+ gap: 10,
193
+ },
194
+ iconContainer: {
195
+ alignItems: 'center',
196
+ justifyContent: 'center',
197
+ },
198
+ textContainer: {
199
+ flex: 1,
200
+ gap: 2,
201
+ },
202
+ text: {
203
+ fontSize: 14,
204
+ fontWeight: '600',
205
+ },
206
+ description: {
207
+ fontSize: 12,
208
+ fontWeight: '400',
209
+ opacity: 0.85,
210
+ },
211
+ closeButton: {
212
+ alignItems: 'center',
213
+ justifyContent: 'center',
214
+ marginLeft: 4,
215
+ },
216
+ defaultCloseIcon: {
217
+ fontSize: 14,
218
+ color: '#FFFFFF',
219
+ fontWeight: '600',
220
+ },
221
+ });
222
+ //# sourceMappingURL=Toast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":";;;;AAAA,iCAA8D;AAC9D,+CASsB;AAGtB,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,yBAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAEzD,MAAM,WAAW,GAAoD;IACnE,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3C,KAAK,EAAI,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3C,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3C,IAAI,EAAK,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;CAC5C,CAAC;AAEF,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAC7B,uBAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,gBAAgB,uBAAU,CAC/C,CAAC;AAEK,MAAM,KAAK,GAAyB,CAAC,EAC1C,OAAO,EACP,MAAM,EACN,IAAI,EACJ,WAAW,EACX,IAAI,GAAG,MAAM,EACb,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,MAAM,EAChB,QAAQ,GAAG,IAAI,EACf,SAAS,GAAG,KAAK,EACjB,cAAc,GAAG,YAAY,EAC7B,cAAc,GAAG,EAAE,EACnB,IAAI,EACJ,SAAS,EACT,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,YAAY,GAAG,EAAE,EACjB,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,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,UAAU,EAAE,QAAQ;QACpB,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;QACnB,QAAQ,EAAE,YAAY,GAAG,EAAE;QAC3B,KAAK,EAAE,YAAY,GAAG,EAAE;QACxB,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;QACrC,aAAa,EAAE,GAAG;QAClB,YAAY,EAAE,CAAC;QACf,SAAS,EAAE,CAAC;QACZ,GAAG,EAAE,EAAE;KACR;IACD,aAAa,EAAE;QACb,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,CAAC;KACP;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,IAAI;KACd;IACD,WAAW,EAAE;QACX,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,CAAC;KACd;IACD,gBAAgB,EAAE;QAChB,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,KAAK;KAClB;CACF,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { ReactNode } from 'react';
2
+ import { TextStyle, ViewStyle } from 'react-native';
3
+ export type ToastType = 'success' | 'error' | 'info' | 'warning';
4
+ export type ToastPosition = 'top' | 'bottom';
5
+ export type ToastDismiss = 'auto' | 'manual' | 'both';
6
+ export type SwipeDirection = 'horizontal' | 'vertical' | 'both';
7
+ export interface ToastProps {
8
+ visible: boolean;
9
+ onHide: () => void;
10
+ text: string;
11
+ description?: string;
12
+ type?: ToastType;
13
+ position?: ToastPosition;
14
+ dismiss?: ToastDismiss;
15
+ duration?: number;
16
+ swipeable?: boolean;
17
+ swipeDirection?: SwipeDirection;
18
+ swipeThreshold?: number;
19
+ icon?: ReactNode;
20
+ closeIcon?: ReactNode;
21
+ backgroundColor?: string;
22
+ textColor?: string;
23
+ descriptionColor?: string;
24
+ borderRadius?: number;
25
+ style?: ViewStyle;
26
+ textStyle?: TextStyle;
27
+ descriptionStyle?: TextStyle;
28
+ iconContainerStyle?: ViewStyle;
29
+ closeButtonStyle?: ViewStyle;
30
+ overlayStyle?: ViewStyle;
31
+ }
32
+ //# sourceMappingURL=Toast.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.types.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AACjE,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC;AAC7C,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhE,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;IAEnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,SAAS,CAAC;IAGtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Toast.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.types.js","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export { Toast } from './Toast';
2
+ export type { ToastProps, ToastType, ToastPosition, ToastDismiss } from './Toast.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Toast = void 0;
4
+ var Toast_1 = require("./Toast");
5
+ Object.defineProperty(exports, "Toast", { enumerable: true, get: function () { return Toast_1.Toast; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Toast/index.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAAvB,8FAAA,KAAK,OAAA"}
@@ -5,4 +5,6 @@ export * from './ImagePreview';
5
5
  export * from './HeaderWithBack';
6
6
  export * from './EmptyState';
7
7
  export * from './PhoneInput';
8
+ export * from './Toast';
9
+ export * from './Fab';
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
@@ -21,4 +21,6 @@ __exportStar(require("./ImagePreview"), exports);
21
21
  __exportStar(require("./HeaderWithBack"), exports);
22
22
  __exportStar(require("./EmptyState"), exports);
23
23
  __exportStar(require("./PhoneInput"), exports);
24
+ __exportStar(require("./Toast"), exports);
25
+ __exportStar(require("./Fab"), exports);
24
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB;AACvB,gDAA8B;AAC9B,iDAA+B;AAC/B,mDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB;AACvB,gDAA8B;AAC9B,iDAA+B;AAC/B,mDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B;AAC7B,0CAAwB;AACxB,wCAAsB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmux",
3
- "version": "1.3.02",
3
+ "version": "1.4.0",
4
4
  "description": "A smooth and modern UI component library for React Native",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",