@thewhileloop/whileui 0.2.1 → 0.2.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.
- package/LICENSE +21 -0
- package/README.md +126 -73
- package/dist/blocks/auth/forgot-password-form.d.ts +9 -1
- package/dist/blocks/auth/forgot-password-form.d.ts.map +1 -1
- package/dist/blocks/auth/forgot-password-form.js +8 -2
- package/dist/blocks/auth/forgot-password-form.js.map +1 -1
- package/dist/blocks/auth/reset-password-form.d.ts +8 -1
- package/dist/blocks/auth/reset-password-form.d.ts.map +1 -1
- package/dist/blocks/auth/reset-password-form.js +8 -2
- package/dist/blocks/auth/reset-password-form.js.map +1 -1
- package/dist/blocks/auth/sign-in-form.d.ts +16 -1
- package/dist/blocks/auth/sign-in-form.d.ts.map +1 -1
- package/dist/blocks/auth/sign-in-form.js +9 -2
- package/dist/blocks/auth/sign-in-form.js.map +1 -1
- package/dist/blocks/auth/sign-up-form.d.ts +16 -1
- package/dist/blocks/auth/sign-up-form.d.ts.map +1 -1
- package/dist/blocks/auth/sign-up-form.js +11 -2
- package/dist/blocks/auth/sign-up-form.js.map +1 -1
- package/dist/blocks/auth/social-connections.d.ts +9 -1
- package/dist/blocks/auth/social-connections.d.ts.map +1 -1
- package/dist/blocks/auth/social-connections.js +2 -2
- package/dist/blocks/auth/social-connections.js.map +1 -1
- package/dist/blocks/auth/user-menu.d.ts +11 -1
- package/dist/blocks/auth/user-menu.d.ts.map +1 -1
- package/dist/blocks/auth/user-menu.js +2 -2
- package/dist/blocks/auth/user-menu.js.map +1 -1
- package/dist/blocks/auth/verify-email-form.d.ts +9 -1
- package/dist/blocks/auth/verify-email-form.d.ts.map +1 -1
- package/dist/blocks/auth/verify-email-form.js +8 -2
- package/dist/blocks/auth/verify-email-form.js.map +1 -1
- package/dist/blocks/commerce/index.d.ts +1 -0
- package/dist/blocks/commerce/index.d.ts.map +1 -1
- package/dist/blocks/commerce/index.js +1 -0
- package/dist/blocks/commerce/index.js.map +1 -1
- package/dist/blocks/commerce/metric-card.d.ts +54 -0
- package/dist/blocks/commerce/metric-card.d.ts.map +1 -0
- package/dist/blocks/commerce/metric-card.js +23 -0
- package/dist/blocks/commerce/metric-card.js.map +1 -0
- package/dist/blocks/layout/form-modal-screen.d.ts +18 -0
- package/dist/blocks/layout/form-modal-screen.d.ts.map +1 -0
- package/dist/blocks/layout/form-modal-screen.js +14 -0
- package/dist/blocks/layout/form-modal-screen.js.map +1 -0
- package/dist/blocks/layout/index.d.ts +1 -0
- package/dist/blocks/layout/index.d.ts.map +1 -1
- package/dist/blocks/layout/index.js +1 -0
- package/dist/blocks/layout/index.js.map +1 -1
- package/dist/blocks/layout/smart-image.d.ts +9 -0
- package/dist/blocks/layout/smart-image.d.ts.map +1 -0
- package/dist/blocks/layout/smart-image.js +23 -0
- package/dist/blocks/layout/smart-image.js.map +1 -0
- package/dist/blocks/lists/index.d.ts +1 -0
- package/dist/blocks/lists/index.d.ts.map +1 -1
- package/dist/blocks/lists/index.js +1 -0
- package/dist/blocks/lists/index.js.map +1 -1
- package/dist/blocks/lists/timeline-feed.d.ts +18 -0
- package/dist/blocks/lists/timeline-feed.d.ts.map +1 -0
- package/dist/blocks/lists/timeline-feed.js +9 -0
- package/dist/blocks/lists/timeline-feed.js.map +1 -0
- package/dist/blocks/media/index.d.ts +2 -0
- package/dist/blocks/media/index.d.ts.map +1 -0
- package/dist/blocks/media/index.js +2 -0
- package/dist/blocks/media/index.js.map +1 -0
- package/dist/blocks/media/smart-image.d.ts +123 -0
- package/dist/blocks/media/smart-image.d.ts.map +1 -0
- package/dist/blocks/media/smart-image.js +48 -0
- package/dist/blocks/media/smart-image.js.map +1 -0
- package/dist/blocks/navigation/drawer-menu.d.ts.map +1 -1
- package/dist/blocks/navigation/drawer-menu.js +13 -6
- package/dist/blocks/navigation/drawer-menu.js.map +1 -1
- package/dist/components/badge/badge.d.ts +84 -0
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +12 -0
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/box/box.d.ts +143 -0
- package/dist/components/box/box.d.ts.map +1 -0
- package/dist/components/box/box.js +38 -0
- package/dist/components/box/box.js.map +1 -0
- package/dist/components/box/index.d.ts +2 -0
- package/dist/components/box/index.d.ts.map +1 -0
- package/dist/components/box/index.js +2 -0
- package/dist/components/box/index.js.map +1 -0
- package/dist/components/input/input.d.ts +3 -0
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +4 -4
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/layout/index.js +2 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/layout/layout.d.ts +395 -0
- package/dist/components/layout/layout.d.ts.map +1 -0
- package/dist/components/layout/layout.js +93 -0
- package/dist/components/layout/layout.js.map +1 -0
- package/dist/components/row/index.d.ts +2 -0
- package/dist/components/row/index.d.ts.map +1 -0
- package/dist/components/row/index.js +2 -0
- package/dist/components/row/index.js.map +1 -0
- package/dist/components/row/row.d.ts +185 -0
- package/dist/components/row/row.d.ts.map +1 -0
- package/dist/components/row/row.js +45 -0
- package/dist/components/row/row.js.map +1 -0
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/stack/index.d.ts +2 -0
- package/dist/components/stack/index.d.ts.map +1 -0
- package/dist/components/stack/index.js +2 -0
- package/dist/components/stack/index.js.map +1 -0
- package/dist/components/stack/stack.d.ts +185 -0
- package/dist/components/stack/stack.d.ts.map +1 -0
- package/dist/components/stack/stack.js +45 -0
- package/dist/components/stack/stack.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
|
@@ -4,9 +4,9 @@ import { View, Pressable, useWindowDimensions, StyleSheet, } from 'react-native'
|
|
|
4
4
|
import Animated, { useSharedValue, useAnimatedStyle, withTiming, Easing, interpolate, } from 'react-native-reanimated';
|
|
5
5
|
import { Text } from '../../components/text';
|
|
6
6
|
import { cn } from '../../lib/cn';
|
|
7
|
-
const DRAWER_WIDTH_RATIO = 0.
|
|
8
|
-
const OPEN_DURATION =
|
|
9
|
-
const CLOSE_DURATION =
|
|
7
|
+
const DRAWER_WIDTH_RATIO = 0.82;
|
|
8
|
+
const OPEN_DURATION = 300;
|
|
9
|
+
const CLOSE_DURATION = 220;
|
|
10
10
|
export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, header, footer, className, style, }) {
|
|
11
11
|
const { width: screenWidth } = useWindowDimensions();
|
|
12
12
|
const drawerWidth = screenWidth * DRAWER_WIDTH_RATIO;
|
|
@@ -14,7 +14,9 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
|
|
|
14
14
|
React.useEffect(() => {
|
|
15
15
|
progress.value = withTiming(visible ? 1 : 0, {
|
|
16
16
|
duration: visible ? OPEN_DURATION : CLOSE_DURATION,
|
|
17
|
-
easing: visible
|
|
17
|
+
easing: visible
|
|
18
|
+
? Easing.bezier(0.2, 0.8, 0.2, 1) // Swift, decelerating entrance
|
|
19
|
+
: Easing.bezier(0.4, 0, 1, 1), // Accelerating, sharp exit
|
|
18
20
|
});
|
|
19
21
|
}, [visible, progress]);
|
|
20
22
|
const backdropStyle = useAnimatedStyle(() => ({
|
|
@@ -37,12 +39,17 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
|
|
|
37
39
|
bottom: 0,
|
|
38
40
|
left: 0,
|
|
39
41
|
width: drawerWidth,
|
|
42
|
+
shadowColor: '#000',
|
|
43
|
+
shadowOffset: { width: 4, height: 0 },
|
|
44
|
+
shadowOpacity: 0.15,
|
|
45
|
+
shadowRadius: 24,
|
|
46
|
+
elevation: 16,
|
|
40
47
|
},
|
|
41
48
|
drawerStyle,
|
|
42
49
|
style,
|
|
43
|
-
], className: cn('bg-background border-r border-border', className), children: _jsxs(View, { className: "flex-1 pt-14", children: [header && _jsx(View, { className: "px-5 pb-4 mb-2 border-b border-border", children: header }), _jsx(View, { className: "flex-1 px-3", children: sections.map((section, sectionIndex) => (_jsxs(View, { className: "mb-4", children: [section.title && (_jsx(Text, { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide px-3 mb-2", children: section.title })), _jsx(View, { className: "gap-0.5", children: section.items.map((item) => {
|
|
50
|
+
], className: cn('bg-background border-r border-border rounded-r-2xl', className), children: _jsxs(View, { className: "flex-1 pt-14 pb-8", children: [header && _jsx(View, { className: "px-5 pb-4 mb-2 border-b border-border", children: header }), _jsx(View, { className: "flex-1 px-3", children: sections.map((section, sectionIndex) => (_jsxs(View, { className: "mb-4", children: [section.title && (_jsx(Text, { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide px-3 mb-2", children: section.title })), _jsx(View, { className: "gap-0.5", children: section.items.map((item) => {
|
|
44
51
|
const isActive = activeKey === item.key;
|
|
45
|
-
return (_jsxs(Pressable, { onPress: () => handleItemPress(item.key), className: cn('flex-row items-center gap-3 px-
|
|
52
|
+
return (_jsxs(Pressable, { onPress: () => handleItemPress(item.key), className: cn('flex-row items-center gap-3 px-4 py-3 mx-1 rounded-xl active:opacity-70 transition-colors', isActive && 'bg-primary/5'), children: [item.icon, _jsx(Text, { className: cn('flex-1 text-[15px] font-semibold tracking-tight', item.destructive
|
|
46
53
|
? 'text-destructive'
|
|
47
54
|
: isActive
|
|
48
55
|
? 'text-primary'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-menu.js","sourceRoot":"","sources":["../../../src/blocks/navigation/drawer-menu.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,IAAI,EACJ,SAAS,EACT,mBAAmB,EACnB,UAAU,GAGX,MAAM,cAAc,CAAC;AACtB,OAAO,QAAQ,EAAE,EACf,cAAc,EACd,gBAAgB,EAChB,UAAU,E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AK,GACN,GACF,CACR,KA1BI,IAAI,CAAC,GAAG,CA2BH,CACb,CAAC;wCACJ,CAAC,CAAC,GACG,KAzCE,YAAY,CA0ChB,CACR,CAAC,GACG,EAGN,MAAM,IAAI,KAAC,IAAI,IAAC,SAAS,EAAC,0CAA0C,YAAE,MAAM,GAAQ,IAChF,GACO,IACF,CACjB,CAAC;AACJ,CAAC"}
|
|
@@ -9,6 +9,12 @@ declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
9
9
|
success: string;
|
|
10
10
|
warning: string;
|
|
11
11
|
info: string;
|
|
12
|
+
soft: string;
|
|
13
|
+
'soft-secondary': string;
|
|
14
|
+
'soft-destructive': string;
|
|
15
|
+
'soft-success': string;
|
|
16
|
+
'soft-warning': string;
|
|
17
|
+
'soft-info': string;
|
|
12
18
|
};
|
|
13
19
|
}, undefined, "inline-flex items-center rounded-full px-2.5 py-0.5", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
14
20
|
variant: {
|
|
@@ -19,6 +25,12 @@ declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
19
25
|
success: string;
|
|
20
26
|
warning: string;
|
|
21
27
|
info: string;
|
|
28
|
+
soft: string;
|
|
29
|
+
'soft-secondary': string;
|
|
30
|
+
'soft-destructive': string;
|
|
31
|
+
'soft-success': string;
|
|
32
|
+
'soft-warning': string;
|
|
33
|
+
'soft-info': string;
|
|
22
34
|
};
|
|
23
35
|
}, {
|
|
24
36
|
variant: {
|
|
@@ -29,6 +41,12 @@ declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
29
41
|
success: string;
|
|
30
42
|
warning: string;
|
|
31
43
|
info: string;
|
|
44
|
+
soft: string;
|
|
45
|
+
'soft-secondary': string;
|
|
46
|
+
'soft-destructive': string;
|
|
47
|
+
'soft-success': string;
|
|
48
|
+
'soft-warning': string;
|
|
49
|
+
'soft-info': string;
|
|
32
50
|
};
|
|
33
51
|
}>, {
|
|
34
52
|
variant: {
|
|
@@ -39,6 +57,12 @@ declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
39
57
|
success: string;
|
|
40
58
|
warning: string;
|
|
41
59
|
info: string;
|
|
60
|
+
soft: string;
|
|
61
|
+
'soft-secondary': string;
|
|
62
|
+
'soft-destructive': string;
|
|
63
|
+
'soft-success': string;
|
|
64
|
+
'soft-warning': string;
|
|
65
|
+
'soft-info': string;
|
|
42
66
|
};
|
|
43
67
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
44
68
|
variant: {
|
|
@@ -49,6 +73,12 @@ declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
49
73
|
success: string;
|
|
50
74
|
warning: string;
|
|
51
75
|
info: string;
|
|
76
|
+
soft: string;
|
|
77
|
+
'soft-secondary': string;
|
|
78
|
+
'soft-destructive': string;
|
|
79
|
+
'soft-success': string;
|
|
80
|
+
'soft-warning': string;
|
|
81
|
+
'soft-info': string;
|
|
52
82
|
};
|
|
53
83
|
}, undefined, "inline-flex items-center rounded-full px-2.5 py-0.5", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
54
84
|
variant: {
|
|
@@ -59,6 +89,12 @@ declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
59
89
|
success: string;
|
|
60
90
|
warning: string;
|
|
61
91
|
info: string;
|
|
92
|
+
soft: string;
|
|
93
|
+
'soft-secondary': string;
|
|
94
|
+
'soft-destructive': string;
|
|
95
|
+
'soft-success': string;
|
|
96
|
+
'soft-warning': string;
|
|
97
|
+
'soft-info': string;
|
|
62
98
|
};
|
|
63
99
|
}, {
|
|
64
100
|
variant: {
|
|
@@ -69,6 +105,12 @@ declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
69
105
|
success: string;
|
|
70
106
|
warning: string;
|
|
71
107
|
info: string;
|
|
108
|
+
soft: string;
|
|
109
|
+
'soft-secondary': string;
|
|
110
|
+
'soft-destructive': string;
|
|
111
|
+
'soft-success': string;
|
|
112
|
+
'soft-warning': string;
|
|
113
|
+
'soft-info': string;
|
|
72
114
|
};
|
|
73
115
|
}>, unknown, unknown, undefined>>;
|
|
74
116
|
declare const badgeTextVariants: import("tailwind-variants").TVReturnType<{
|
|
@@ -80,6 +122,12 @@ declare const badgeTextVariants: import("tailwind-variants").TVReturnType<{
|
|
|
80
122
|
success: string;
|
|
81
123
|
warning: string;
|
|
82
124
|
info: string;
|
|
125
|
+
soft: string;
|
|
126
|
+
'soft-secondary': string;
|
|
127
|
+
'soft-destructive': string;
|
|
128
|
+
'soft-success': string;
|
|
129
|
+
'soft-warning': string;
|
|
130
|
+
'soft-info': string;
|
|
83
131
|
};
|
|
84
132
|
}, undefined, "text-xs font-semibold", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
85
133
|
variant: {
|
|
@@ -90,6 +138,12 @@ declare const badgeTextVariants: import("tailwind-variants").TVReturnType<{
|
|
|
90
138
|
success: string;
|
|
91
139
|
warning: string;
|
|
92
140
|
info: string;
|
|
141
|
+
soft: string;
|
|
142
|
+
'soft-secondary': string;
|
|
143
|
+
'soft-destructive': string;
|
|
144
|
+
'soft-success': string;
|
|
145
|
+
'soft-warning': string;
|
|
146
|
+
'soft-info': string;
|
|
93
147
|
};
|
|
94
148
|
}, {
|
|
95
149
|
variant: {
|
|
@@ -100,6 +154,12 @@ declare const badgeTextVariants: import("tailwind-variants").TVReturnType<{
|
|
|
100
154
|
success: string;
|
|
101
155
|
warning: string;
|
|
102
156
|
info: string;
|
|
157
|
+
soft: string;
|
|
158
|
+
'soft-secondary': string;
|
|
159
|
+
'soft-destructive': string;
|
|
160
|
+
'soft-success': string;
|
|
161
|
+
'soft-warning': string;
|
|
162
|
+
'soft-info': string;
|
|
103
163
|
};
|
|
104
164
|
}>, {
|
|
105
165
|
variant: {
|
|
@@ -110,6 +170,12 @@ declare const badgeTextVariants: import("tailwind-variants").TVReturnType<{
|
|
|
110
170
|
success: string;
|
|
111
171
|
warning: string;
|
|
112
172
|
info: string;
|
|
173
|
+
soft: string;
|
|
174
|
+
'soft-secondary': string;
|
|
175
|
+
'soft-destructive': string;
|
|
176
|
+
'soft-success': string;
|
|
177
|
+
'soft-warning': string;
|
|
178
|
+
'soft-info': string;
|
|
113
179
|
};
|
|
114
180
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
115
181
|
variant: {
|
|
@@ -120,6 +186,12 @@ declare const badgeTextVariants: import("tailwind-variants").TVReturnType<{
|
|
|
120
186
|
success: string;
|
|
121
187
|
warning: string;
|
|
122
188
|
info: string;
|
|
189
|
+
soft: string;
|
|
190
|
+
'soft-secondary': string;
|
|
191
|
+
'soft-destructive': string;
|
|
192
|
+
'soft-success': string;
|
|
193
|
+
'soft-warning': string;
|
|
194
|
+
'soft-info': string;
|
|
123
195
|
};
|
|
124
196
|
}, undefined, "text-xs font-semibold", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
125
197
|
variant: {
|
|
@@ -130,6 +202,12 @@ declare const badgeTextVariants: import("tailwind-variants").TVReturnType<{
|
|
|
130
202
|
success: string;
|
|
131
203
|
warning: string;
|
|
132
204
|
info: string;
|
|
205
|
+
soft: string;
|
|
206
|
+
'soft-secondary': string;
|
|
207
|
+
'soft-destructive': string;
|
|
208
|
+
'soft-success': string;
|
|
209
|
+
'soft-warning': string;
|
|
210
|
+
'soft-info': string;
|
|
133
211
|
};
|
|
134
212
|
}, {
|
|
135
213
|
variant: {
|
|
@@ -140,6 +218,12 @@ declare const badgeTextVariants: import("tailwind-variants").TVReturnType<{
|
|
|
140
218
|
success: string;
|
|
141
219
|
warning: string;
|
|
142
220
|
info: string;
|
|
221
|
+
soft: string;
|
|
222
|
+
'soft-secondary': string;
|
|
223
|
+
'soft-destructive': string;
|
|
224
|
+
'soft-success': string;
|
|
225
|
+
'soft-warning': string;
|
|
226
|
+
'soft-info': string;
|
|
143
227
|
};
|
|
144
228
|
}>, unknown, unknown, undefined>>;
|
|
145
229
|
export interface BadgeProps extends ViewProps, VariantProps<typeof badgeVariants> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAYrD,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAYrD,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAsBjB,CAAC;AAEH,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAsBrB,CAAC;AAEH,MAAM,WAAW,UAAW,SAAQ,SAAS,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEpF,MAAM,WAAW,cAAe,SAAQ,SAAS,EAAE,YAAY,CAAC,OAAO,iBAAiB,CAAC;CAAG;AAE5F,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAQhF;kBARQ,KAAK;;;AAUd,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,2CAK/E;kBALQ,SAAS;;;AAUlB,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -17,6 +17,12 @@ const badgeVariants = tv({
|
|
|
17
17
|
success: 'bg-success',
|
|
18
18
|
warning: 'bg-warning',
|
|
19
19
|
info: 'bg-info',
|
|
20
|
+
soft: 'bg-primary/10',
|
|
21
|
+
'soft-secondary': 'bg-secondary/60',
|
|
22
|
+
'soft-destructive': 'bg-destructive/10',
|
|
23
|
+
'soft-success': 'bg-success/10',
|
|
24
|
+
'soft-warning': 'bg-warning/10',
|
|
25
|
+
'soft-info': 'bg-info/10',
|
|
20
26
|
},
|
|
21
27
|
},
|
|
22
28
|
defaultVariants: {
|
|
@@ -34,6 +40,12 @@ const badgeTextVariants = tv({
|
|
|
34
40
|
success: 'text-success-foreground',
|
|
35
41
|
warning: 'text-warning-foreground',
|
|
36
42
|
info: 'text-info-foreground',
|
|
43
|
+
soft: 'text-primary',
|
|
44
|
+
'soft-secondary': 'text-secondary-foreground',
|
|
45
|
+
'soft-destructive': 'text-destructive',
|
|
46
|
+
'soft-success': 'text-success',
|
|
47
|
+
'soft-warning': 'text-warning',
|
|
48
|
+
'soft-info': 'text-info',
|
|
37
49
|
},
|
|
38
50
|
},
|
|
39
51
|
defaultVariants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,EAAE,EAAqB,MAAM,cAAc,CAAC;AAQrD,MAAM,YAAY,GAAG,aAAa,CAAoB;IACpD,OAAO,EAAE,SAAS;CACnB,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,EAAE,CAAC;IACvB,IAAI,E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AiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, type ViewProps } from 'react-native';
|
|
3
|
+
import { type VariantProps } from '../../lib/tv';
|
|
4
|
+
declare const boxVariants: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
padding: {
|
|
6
|
+
none: string;
|
|
7
|
+
xs: string;
|
|
8
|
+
sm: string;
|
|
9
|
+
md: string;
|
|
10
|
+
lg: string;
|
|
11
|
+
xl: string;
|
|
12
|
+
'2xl': string;
|
|
13
|
+
};
|
|
14
|
+
margin: {
|
|
15
|
+
none: string;
|
|
16
|
+
xs: string;
|
|
17
|
+
sm: string;
|
|
18
|
+
md: string;
|
|
19
|
+
lg: string;
|
|
20
|
+
xl: string;
|
|
21
|
+
'2xl': string;
|
|
22
|
+
};
|
|
23
|
+
}, undefined, "", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
24
|
+
padding: {
|
|
25
|
+
none: string;
|
|
26
|
+
xs: string;
|
|
27
|
+
sm: string;
|
|
28
|
+
md: string;
|
|
29
|
+
lg: string;
|
|
30
|
+
xl: string;
|
|
31
|
+
'2xl': string;
|
|
32
|
+
};
|
|
33
|
+
margin: {
|
|
34
|
+
none: string;
|
|
35
|
+
xs: string;
|
|
36
|
+
sm: string;
|
|
37
|
+
md: string;
|
|
38
|
+
lg: string;
|
|
39
|
+
xl: string;
|
|
40
|
+
'2xl': string;
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
padding: {
|
|
44
|
+
none: string;
|
|
45
|
+
xs: string;
|
|
46
|
+
sm: string;
|
|
47
|
+
md: string;
|
|
48
|
+
lg: string;
|
|
49
|
+
xl: string;
|
|
50
|
+
'2xl': string;
|
|
51
|
+
};
|
|
52
|
+
margin: {
|
|
53
|
+
none: string;
|
|
54
|
+
xs: string;
|
|
55
|
+
sm: string;
|
|
56
|
+
md: string;
|
|
57
|
+
lg: string;
|
|
58
|
+
xl: string;
|
|
59
|
+
'2xl': string;
|
|
60
|
+
};
|
|
61
|
+
}>, {
|
|
62
|
+
padding: {
|
|
63
|
+
none: string;
|
|
64
|
+
xs: string;
|
|
65
|
+
sm: string;
|
|
66
|
+
md: string;
|
|
67
|
+
lg: string;
|
|
68
|
+
xl: string;
|
|
69
|
+
'2xl': string;
|
|
70
|
+
};
|
|
71
|
+
margin: {
|
|
72
|
+
none: string;
|
|
73
|
+
xs: string;
|
|
74
|
+
sm: string;
|
|
75
|
+
md: string;
|
|
76
|
+
lg: string;
|
|
77
|
+
xl: string;
|
|
78
|
+
'2xl': string;
|
|
79
|
+
};
|
|
80
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
81
|
+
padding: {
|
|
82
|
+
none: string;
|
|
83
|
+
xs: string;
|
|
84
|
+
sm: string;
|
|
85
|
+
md: string;
|
|
86
|
+
lg: string;
|
|
87
|
+
xl: string;
|
|
88
|
+
'2xl': string;
|
|
89
|
+
};
|
|
90
|
+
margin: {
|
|
91
|
+
none: string;
|
|
92
|
+
xs: string;
|
|
93
|
+
sm: string;
|
|
94
|
+
md: string;
|
|
95
|
+
lg: string;
|
|
96
|
+
xl: string;
|
|
97
|
+
'2xl': string;
|
|
98
|
+
};
|
|
99
|
+
}, undefined, "", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
100
|
+
padding: {
|
|
101
|
+
none: string;
|
|
102
|
+
xs: string;
|
|
103
|
+
sm: string;
|
|
104
|
+
md: string;
|
|
105
|
+
lg: string;
|
|
106
|
+
xl: string;
|
|
107
|
+
'2xl': string;
|
|
108
|
+
};
|
|
109
|
+
margin: {
|
|
110
|
+
none: string;
|
|
111
|
+
xs: string;
|
|
112
|
+
sm: string;
|
|
113
|
+
md: string;
|
|
114
|
+
lg: string;
|
|
115
|
+
xl: string;
|
|
116
|
+
'2xl': string;
|
|
117
|
+
};
|
|
118
|
+
}, {
|
|
119
|
+
padding: {
|
|
120
|
+
none: string;
|
|
121
|
+
xs: string;
|
|
122
|
+
sm: string;
|
|
123
|
+
md: string;
|
|
124
|
+
lg: string;
|
|
125
|
+
xl: string;
|
|
126
|
+
'2xl': string;
|
|
127
|
+
};
|
|
128
|
+
margin: {
|
|
129
|
+
none: string;
|
|
130
|
+
xs: string;
|
|
131
|
+
sm: string;
|
|
132
|
+
md: string;
|
|
133
|
+
lg: string;
|
|
134
|
+
xl: string;
|
|
135
|
+
'2xl': string;
|
|
136
|
+
};
|
|
137
|
+
}>, unknown, unknown, undefined>>;
|
|
138
|
+
export interface BoxProps extends Omit<ViewProps, 'className'>, VariantProps<typeof boxVariants> {
|
|
139
|
+
className?: string;
|
|
140
|
+
}
|
|
141
|
+
declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<View>>;
|
|
142
|
+
export { Box, boxVariants };
|
|
143
|
+
//# sourceMappingURL=box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../src/components/box/box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAErD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA0Bf,CAAC;AAEH,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,GAAG,uEAMR,CAAC;AAIF,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { cn } from '../../lib/cn';
|
|
5
|
+
import { tv } from '../../lib/tv';
|
|
6
|
+
const boxVariants = tv({
|
|
7
|
+
base: '',
|
|
8
|
+
variants: {
|
|
9
|
+
padding: {
|
|
10
|
+
none: '',
|
|
11
|
+
xs: 'p-1',
|
|
12
|
+
sm: 'p-2',
|
|
13
|
+
md: 'p-3',
|
|
14
|
+
lg: 'p-4',
|
|
15
|
+
xl: 'p-6',
|
|
16
|
+
'2xl': 'p-8',
|
|
17
|
+
},
|
|
18
|
+
margin: {
|
|
19
|
+
none: '',
|
|
20
|
+
xs: 'm-1',
|
|
21
|
+
sm: 'm-2',
|
|
22
|
+
md: 'm-3',
|
|
23
|
+
lg: 'm-4',
|
|
24
|
+
xl: 'm-6',
|
|
25
|
+
'2xl': 'm-8',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
padding: 'none',
|
|
30
|
+
margin: 'none',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const Box = React.forwardRef(({ className, padding, margin, ...props }, ref) => {
|
|
34
|
+
return (_jsx(View, { ref: ref, className: cn(boxVariants({ padding, margin }), className), ...props }));
|
|
35
|
+
});
|
|
36
|
+
Box.displayName = 'Box';
|
|
37
|
+
export { Box, boxVariants };
|
|
38
|
+
//# sourceMappingURL=box.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.js","sourceRoot":"","sources":["../../../src/components/box/box.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,EAAE,EAAqB,MAAM,cAAc,CAAC;AAErD,MAAM,WAAW,GAAG,EAAE,CAAC;IACrB,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,IAAI,EAAE,EAAE;YACR,EAAE,EAAE,KAAK;YACT,EAAE,EAAE,KAAK;YACT,EAAE,EAAE,KAAK;YACT,EAAE,EAAE,KAAK;YACT,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,KAAK;SACb;QACD,MAAM,EAAE;YACN,IAAI,EAAE,EAAE;YACR,EAAE,EAAE,KAAK;YACT,EAAE,EAAE,KAAK;YACT,EAAE,EAAE,KAAK;YACT,EAAE,EAAE,KAAK;YACT,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,MAAM;KACf;CACF,CAAC,CAAC;AAMH,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAC1B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAChD,OAAO,CACL,KAAC,IAAI,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAC1F,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC;AAExB,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAiB,MAAM,OAAO,CAAC"}
|
|
@@ -39,6 +39,9 @@ declare const inputVariants: import("tailwind-variants").TVReturnType<{
|
|
|
39
39
|
}>, unknown, unknown, undefined>>;
|
|
40
40
|
export interface InputProps extends TextInputProps, VariantProps<typeof inputVariants> {
|
|
41
41
|
className?: string;
|
|
42
|
+
prefix?: React.ReactNode;
|
|
43
|
+
suffix?: React.ReactNode;
|
|
44
|
+
inputClassName?: string;
|
|
42
45
|
}
|
|
43
46
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<TextInput>>;
|
|
44
47
|
export { Input, inputVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAErD,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAWjB,CAAC;AAEH,MAAM,WAAW,UAAW,SAAQ,cAAc,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,QAAA,MAAM,KAAK,8EAwCV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { TextInput } from 'react-native';
|
|
3
|
+
import { View, TextInput } from 'react-native';
|
|
4
4
|
import { cn } from '../../lib/cn';
|
|
5
5
|
import { tv } from '../../lib/tv';
|
|
6
6
|
const inputVariants = tv({
|
|
@@ -15,8 +15,8 @@ const inputVariants = tv({
|
|
|
15
15
|
variant: 'default',
|
|
16
16
|
},
|
|
17
17
|
});
|
|
18
|
-
const Input = React.forwardRef(({ className, variant, editable = true, placeholderTextColor = '#737373', ...props }, ref) => {
|
|
19
|
-
return (
|
|
18
|
+
const Input = React.forwardRef(({ className, prefix, suffix, inputClassName, variant, editable = true, placeholderTextColor = '#737373', ...props }, ref) => {
|
|
19
|
+
return (_jsxs(View, { className: cn('flex-row items-center rounded-md border border-input bg-background', inputVariants({ variant }), !editable && 'opacity-50', className), children: [prefix && _jsx(View, { className: "pl-3", children: prefix }), _jsx(TextInput, { ref: ref, className: cn('flex-1 py-2 text-sm text-foreground placeholder:text-muted-foreground', prefix && 'pl-2', suffix && 'pr-2', inputClassName), editable: editable, placeholderTextColor: placeholderTextColor, ...props }), suffix && _jsx(View, { className: "pr-3", children: suffix })] }));
|
|
20
20
|
});
|
|
21
21
|
Input.displayName = 'Input';
|
|
22
22
|
export { Input, inputVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAuB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,E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+1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|