@admin-layout/gluestack-ui-mobile 10.0.9-alpha.9 → 10.1.1-alpha.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.
- package/CHANGELOG.md +1 -9
- package/lib/components/ui/accordion/index.web.d.ts +209 -0
- package/lib/components/ui/accordion/index.web.js +156 -0
- package/lib/components/ui/accordion/index.web.js.map +1 -0
- package/lib/components/ui/actionsheet/index.web.d.ts +872 -0
- package/lib/components/ui/actionsheet/index.web.js +286 -0
- package/lib/components/ui/actionsheet/index.web.js.map +1 -0
- package/lib/components/ui/alert/index.web.d.ts +135 -0
- package/lib/components/ui/alert/index.web.js +38 -0
- package/lib/components/ui/alert/index.web.js.map +1 -0
- package/lib/components/ui/alert-dialog/index.web.d.ts +64 -0
- package/lib/components/ui/alert-dialog/index.web.js +139 -0
- package/lib/components/ui/alert-dialog/index.web.js.map +1 -0
- package/lib/components/ui/avatar/index.web.d.ts +21 -0
- package/lib/components/ui/avatar/index.web.js +92 -0
- package/lib/components/ui/avatar/index.web.js.map +1 -0
- package/lib/components/ui/badge/index.web.d.ts +382 -0
- package/lib/components/ui/badge/index.web.js +138 -0
- package/lib/components/ui/badge/index.web.js.map +1 -0
- package/lib/components/ui/button/index.web.d.ts +247 -0
- package/lib/components/ui/button/index.web.js +57 -0
- package/lib/components/ui/button/index.web.js.map +1 -0
- package/lib/components/ui/checkbox/index.web.d.ts +265 -0
- package/lib/components/ui/checkbox/index.web.js +77 -0
- package/lib/components/ui/checkbox/index.web.js.map +1 -0
- package/lib/components/ui/divider/index.web.d.ts +53 -0
- package/lib/components/ui/divider/index.web.js +21 -0
- package/lib/components/ui/divider/index.web.js.map +1 -0
- package/lib/components/ui/drawer/index.web.d.ts +174 -0
- package/lib/components/ui/drawer/index.web.js +65 -0
- package/lib/components/ui/drawer/index.web.js.map +1 -0
- package/lib/components/ui/fab/index.web.d.ts +520 -0
- package/lib/components/ui/fab/index.web.js +146 -0
- package/lib/components/ui/fab/index.web.js.map +1 -0
- package/lib/components/ui/flat-list/index.web.d.ts +21 -0
- package/lib/components/ui/flat-list/index.web.js +41 -0
- package/lib/components/ui/flat-list/index.web.js.map +1 -0
- package/lib/components/ui/form-control/index.web.d.ts +2071 -0
- package/lib/components/ui/form-control/index.web.js +290 -0
- package/lib/components/ui/form-control/index.web.js.map +1 -0
- package/lib/components/ui/image/index.web.d.ts +142 -0
- package/lib/components/ui/image/index.web.js +29 -0
- package/lib/components/ui/image/index.web.js.map +1 -0
- package/lib/components/ui/image-background/index.web.d.ts +8 -0
- package/lib/components/ui/image-background/index.web.js +23 -0
- package/lib/components/ui/image-background/index.web.js.map +1 -0
- package/lib/components/ui/input/index.web.d.ts +163 -0
- package/lib/components/ui/input/index.web.js +50 -0
- package/lib/components/ui/input/index.web.js.map +1 -0
- package/lib/components/ui/input-accessory-view/index.web.d.ts +9 -0
- package/lib/components/ui/input-accessory-view/index.web.js +16 -0
- package/lib/components/ui/input-accessory-view/index.web.js.map +1 -0
- package/lib/components/ui/keyboard-avoiding-view/index.web.d.ts +9 -0
- package/lib/components/ui/keyboard-avoiding-view/index.web.js +8 -0
- package/lib/components/ui/keyboard-avoiding-view/index.web.js.map +1 -0
- package/lib/components/ui/link/index.web.d.ts +365 -0
- package/lib/components/ui/link/index.web.js +70 -0
- package/lib/components/ui/link/index.web.js.map +1 -0
- package/lib/components/ui/menu/index.web.d.ts +142 -0
- package/lib/components/ui/menu/index.web.js +83 -0
- package/lib/components/ui/menu/index.web.js.map +1 -0
- package/lib/components/ui/modal/index.web.d.ts +111 -0
- package/lib/components/ui/modal/index.web.js +58 -0
- package/lib/components/ui/modal/index.web.js.map +1 -0
- package/lib/components/ui/popover/index.web.d.ts +309 -0
- package/lib/components/ui/popover/index.web.js +184 -0
- package/lib/components/ui/popover/index.web.js.map +1 -0
- package/lib/components/ui/portal/index.web.d.ts +9 -0
- package/lib/components/ui/portal/index.web.js +16 -0
- package/lib/components/ui/portal/index.web.js.map +1 -0
- package/lib/components/ui/pressable/index.web.d.ts +8 -0
- package/lib/components/ui/pressable/index.web.js +44 -0
- package/lib/components/ui/pressable/index.web.js.map +1 -0
- package/lib/components/ui/progress/index.web.d.ts +237 -0
- package/lib/components/ui/progress/index.web.js +73 -0
- package/lib/components/ui/progress/index.web.js.map +1 -0
- package/lib/components/ui/radio/index.web.d.ts +224 -0
- package/lib/components/ui/radio/index.web.js +69 -0
- package/lib/components/ui/radio/index.web.js.map +1 -0
- package/lib/components/ui/refresh-control/index.web.d.ts +14 -0
- package/lib/components/ui/refresh-control/index.web.js +69 -0
- package/lib/components/ui/refresh-control/index.web.js.map +1 -0
- package/lib/components/ui/safe-area-view/index.web.d.ts +6 -0
- package/lib/components/ui/safe-area-view/index.web.js +10 -0
- package/lib/components/ui/safe-area-view/index.web.js.map +1 -0
- package/lib/components/ui/scroll-view/index.web.d.ts +44 -0
- package/lib/components/ui/scroll-view/index.web.js +41 -0
- package/lib/components/ui/scroll-view/index.web.js.map +1 -0
- package/lib/components/ui/section-list/index.web.d.ts +26 -0
- package/lib/components/ui/section-list/index.web.js +35 -0
- package/lib/components/ui/section-list/index.web.js.map +1 -0
- package/lib/components/ui/select/index.web.d.ts +162 -0
- package/lib/components/ui/select/index.web.js +51 -0
- package/lib/components/ui/select/index.web.js.map +1 -0
- package/lib/components/ui/slider/index.web.d.ts +223 -0
- package/lib/components/ui/slider/index.web.js +189 -0
- package/lib/components/ui/slider/index.web.js.map +1 -0
- package/lib/components/ui/spinner/index.web.d.ts +176 -0
- package/lib/components/ui/spinner/index.web.js +55 -0
- package/lib/components/ui/spinner/index.web.js.map +1 -0
- package/lib/components/ui/status-bar/index.web.d.ts +14 -0
- package/lib/components/ui/status-bar/index.web.js +7 -0
- package/lib/components/ui/status-bar/index.web.js.map +1 -0
- package/lib/components/ui/switch/index.web.d.ts +71 -0
- package/lib/components/ui/switch/index.web.js +27 -0
- package/lib/components/ui/switch/index.web.js.map +1 -0
- package/lib/components/ui/tabs/index.web.d.ts +351 -0
- package/lib/components/ui/tabs/index.web.js +120 -0
- package/lib/components/ui/tabs/index.web.js.map +1 -0
- package/lib/components/ui/textarea/index.web.d.ts +162 -0
- package/lib/components/ui/textarea/index.web.js +50 -0
- package/lib/components/ui/textarea/index.web.js.map +1 -0
- package/lib/components/ui/toast/index.web.d.ts +225 -0
- package/lib/components/ui/toast/index.web.js +80 -0
- package/lib/components/ui/toast/index.web.js.map +1 -0
- package/lib/components/ui/tooltip/index.web.d.ts +86 -0
- package/lib/components/ui/tooltip/index.web.js +110 -0
- package/lib/components/ui/tooltip/index.web.js.map +1 -0
- package/lib/components/ui/view/index.web.d.ts +2 -0
- package/lib/components/ui/view/index.web.js +7 -0
- package/lib/components/ui/view/index.web.js.map +1 -0
- package/lib/components/ui/virtualized-list/index.web.d.ts +19 -0
- package/lib/components/ui/virtualized-list/index.web.js +30 -0
- package/lib/components/ui/virtualized-list/index.web.js.map +1 -0
- package/lib/components/usePermissionAutoFetch.d.ts +7 -19
- package/lib/containers/layout/DrawerBottomNavigationConfig.d.ts +47 -47
- package/lib/containers/layout/DrawerConfig.d.ts +31 -31
- package/lib/redux/settings.d.ts +3 -9
- package/package.json +9 -5
- package/src/components/ui/accordion/index.web.tsx +294 -0
- package/src/components/ui/actionsheet/index.web.tsx +555 -0
- package/src/components/ui/alert/index.web.tsx +71 -0
- package/src/components/ui/alert-dialog/index.web.tsx +241 -0
- package/src/components/ui/avatar/index.web.tsx +150 -0
- package/src/components/ui/badge/index.web.tsx +188 -0
- package/src/components/ui/button/index.web.tsx +86 -0
- package/src/components/ui/checkbox/index.web.tsx +151 -0
- package/src/components/ui/divider/index.web.tsx +37 -0
- package/src/components/ui/drawer/index.web.tsx +144 -0
- package/src/components/ui/fab/index.web.tsx +201 -0
- package/src/components/ui/flat-list/index.web.tsx +89 -0
- package/src/components/ui/form-control/index.web.tsx +451 -0
- package/src/components/ui/image/index.web.tsx +43 -0
- package/src/components/ui/image-background/index.web.tsx +43 -0
- package/src/components/ui/input/index.web.tsx +80 -0
- package/src/components/ui/input-accessory-view/index.web.tsx +31 -0
- package/src/components/ui/keyboard-avoiding-view/index.web.tsx +23 -0
- package/src/components/ui/link/index.web.tsx +103 -0
- package/src/components/ui/menu/index.web.tsx +159 -0
- package/src/components/ui/modal/index.web.tsx +135 -0
- package/src/components/ui/popover/index.web.tsx +326 -0
- package/src/components/ui/portal/index.web.tsx +34 -0
- package/src/components/ui/pressable/index.web.tsx +73 -0
- package/src/components/ui/progress/index.web.tsx +123 -0
- package/src/components/ui/radio/index.web.tsx +130 -0
- package/src/components/ui/refresh-control/index.web.tsx +104 -0
- package/src/components/ui/safe-area-view/index.web.tsx +24 -0
- package/src/components/ui/scroll-view/index.web.tsx +142 -0
- package/src/components/ui/section-list/index.web.tsx +93 -0
- package/src/components/ui/select/index.web.tsx +83 -0
- package/src/components/ui/slider/index.web.tsx +283 -0
- package/src/components/ui/spinner/index.web.tsx +81 -0
- package/src/components/ui/status-bar/index.web.tsx +20 -0
- package/src/components/ui/switch/index.web.tsx +44 -0
- package/src/components/ui/tabs/index.web.tsx +205 -0
- package/src/components/ui/textarea/index.web.tsx +86 -0
- package/src/components/ui/toast/index.web.tsx +132 -0
- package/src/components/ui/tooltip/index.web.tsx +155 -0
- package/src/components/ui/view/index.web.tsx +15 -0
- package/src/components/ui/virtualized-list/index.web.tsx +84 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { createFormControl } from '@gluestack-ui/form-control';
|
|
4
|
+
import { tva } from '@gluestack-ui/nativewind-utils/tva';
|
|
5
|
+
import { withStyleContext, useStyleContext } from '@gluestack-ui/nativewind-utils/withStyleContext';
|
|
6
|
+
import { cssInterop } from 'nativewind';
|
|
7
|
+
import { PrimitiveIcon, UIIcon } from '@gluestack-ui/icon';
|
|
8
|
+
const SCOPE = 'FORM_CONTROL';
|
|
9
|
+
const formControlStyle = tva({
|
|
10
|
+
base: 'flex flex-col',
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
sm: '',
|
|
14
|
+
md: '',
|
|
15
|
+
lg: '',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
const formControlErrorIconStyle = tva({
|
|
20
|
+
base: 'text-error-700 fill-none',
|
|
21
|
+
variants: {
|
|
22
|
+
size: {
|
|
23
|
+
'2xs': 'h-3 w-3',
|
|
24
|
+
xs: 'h-3.5 w-3.5',
|
|
25
|
+
sm: 'h-4 w-4',
|
|
26
|
+
md: 'h-[18px] w-[18px]',
|
|
27
|
+
lg: 'h-5 w-5',
|
|
28
|
+
xl: 'h-6 w-6',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
const formControlErrorStyle = tva({
|
|
33
|
+
base: 'flex flex-row justify-start items-center mt-1 gap-1',
|
|
34
|
+
});
|
|
35
|
+
const formControlErrorTextStyle = tva({
|
|
36
|
+
base: 'text-error-700',
|
|
37
|
+
variants: {
|
|
38
|
+
isTruncated: {
|
|
39
|
+
true: 'truncate',
|
|
40
|
+
},
|
|
41
|
+
bold: {
|
|
42
|
+
true: 'font-bold',
|
|
43
|
+
},
|
|
44
|
+
underline: {
|
|
45
|
+
true: 'underline',
|
|
46
|
+
},
|
|
47
|
+
strikeThrough: {
|
|
48
|
+
true: 'line-through',
|
|
49
|
+
},
|
|
50
|
+
size: {
|
|
51
|
+
'2xs': 'text-2xs',
|
|
52
|
+
xs: 'text-xs',
|
|
53
|
+
sm: 'text-sm',
|
|
54
|
+
md: 'text-base',
|
|
55
|
+
lg: 'text-lg',
|
|
56
|
+
xl: 'text-xl',
|
|
57
|
+
'2xl': 'text-2xl',
|
|
58
|
+
'3xl': 'text-3xl',
|
|
59
|
+
'4xl': 'text-4xl',
|
|
60
|
+
'5xl': 'text-5xl',
|
|
61
|
+
'6xl': 'text-6xl',
|
|
62
|
+
},
|
|
63
|
+
sub: {
|
|
64
|
+
true: 'text-xs',
|
|
65
|
+
},
|
|
66
|
+
italic: {
|
|
67
|
+
true: 'italic',
|
|
68
|
+
},
|
|
69
|
+
highlight: {
|
|
70
|
+
true: 'bg-yellow-500',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
const formControlHelperStyle = tva({
|
|
75
|
+
base: 'flex flex-row justify-start items-center mt-1',
|
|
76
|
+
});
|
|
77
|
+
const formControlHelperTextStyle = tva({
|
|
78
|
+
base: 'text-typography-500',
|
|
79
|
+
variants: {
|
|
80
|
+
isTruncated: {
|
|
81
|
+
true: 'truncate',
|
|
82
|
+
},
|
|
83
|
+
bold: {
|
|
84
|
+
true: 'font-bold',
|
|
85
|
+
},
|
|
86
|
+
underline: {
|
|
87
|
+
true: 'underline',
|
|
88
|
+
},
|
|
89
|
+
strikeThrough: {
|
|
90
|
+
true: 'line-through',
|
|
91
|
+
},
|
|
92
|
+
size: {
|
|
93
|
+
'2xs': 'text-2xs',
|
|
94
|
+
xs: 'text-xs',
|
|
95
|
+
sm: 'text-xs',
|
|
96
|
+
md: 'text-sm',
|
|
97
|
+
lg: 'text-base',
|
|
98
|
+
xl: 'text-xl',
|
|
99
|
+
'2xl': 'text-2xl',
|
|
100
|
+
'3xl': 'text-3xl',
|
|
101
|
+
'4xl': 'text-4xl',
|
|
102
|
+
'5xl': 'text-5xl',
|
|
103
|
+
'6xl': 'text-6xl',
|
|
104
|
+
},
|
|
105
|
+
sub: {
|
|
106
|
+
true: 'text-xs',
|
|
107
|
+
},
|
|
108
|
+
italic: {
|
|
109
|
+
true: 'italic',
|
|
110
|
+
},
|
|
111
|
+
highlight: {
|
|
112
|
+
true: 'bg-yellow-500',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
const formControlLabelStyle = tva({
|
|
117
|
+
base: 'flex flex-row justify-start items-center mb-1',
|
|
118
|
+
});
|
|
119
|
+
const formControlLabelTextStyle = tva({
|
|
120
|
+
base: 'font-medium text-typography-900',
|
|
121
|
+
variants: {
|
|
122
|
+
isTruncated: {
|
|
123
|
+
true: 'truncate',
|
|
124
|
+
},
|
|
125
|
+
bold: {
|
|
126
|
+
true: 'font-bold',
|
|
127
|
+
},
|
|
128
|
+
underline: {
|
|
129
|
+
true: 'underline',
|
|
130
|
+
},
|
|
131
|
+
strikeThrough: {
|
|
132
|
+
true: 'line-through',
|
|
133
|
+
},
|
|
134
|
+
size: {
|
|
135
|
+
'2xs': 'text-2xs',
|
|
136
|
+
xs: 'text-xs',
|
|
137
|
+
sm: 'text-sm',
|
|
138
|
+
md: 'text-base',
|
|
139
|
+
lg: 'text-lg',
|
|
140
|
+
xl: 'text-xl',
|
|
141
|
+
'2xl': 'text-2xl',
|
|
142
|
+
'3xl': 'text-3xl',
|
|
143
|
+
'4xl': 'text-4xl',
|
|
144
|
+
'5xl': 'text-5xl',
|
|
145
|
+
'6xl': 'text-6xl',
|
|
146
|
+
},
|
|
147
|
+
sub: {
|
|
148
|
+
true: 'text-xs',
|
|
149
|
+
},
|
|
150
|
+
italic: {
|
|
151
|
+
true: 'italic',
|
|
152
|
+
},
|
|
153
|
+
highlight: {
|
|
154
|
+
true: 'bg-yellow-500',
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
const formControlLabelAstrickStyle = tva({
|
|
159
|
+
base: 'font-medium text-typography-900',
|
|
160
|
+
variants: {
|
|
161
|
+
isTruncated: {
|
|
162
|
+
true: 'truncate',
|
|
163
|
+
},
|
|
164
|
+
bold: {
|
|
165
|
+
true: 'font-bold',
|
|
166
|
+
},
|
|
167
|
+
underline: {
|
|
168
|
+
true: 'underline',
|
|
169
|
+
},
|
|
170
|
+
strikeThrough: {
|
|
171
|
+
true: 'line-through',
|
|
172
|
+
},
|
|
173
|
+
size: {
|
|
174
|
+
'2xs': 'text-2xs',
|
|
175
|
+
xs: 'text-xs',
|
|
176
|
+
sm: 'text-sm',
|
|
177
|
+
md: 'text-base',
|
|
178
|
+
lg: 'text-lg',
|
|
179
|
+
xl: 'text-xl',
|
|
180
|
+
'2xl': 'text-2xl',
|
|
181
|
+
'3xl': 'text-3xl',
|
|
182
|
+
'4xl': 'text-4xl',
|
|
183
|
+
'5xl': 'text-5xl',
|
|
184
|
+
'6xl': 'text-6xl',
|
|
185
|
+
},
|
|
186
|
+
sub: {
|
|
187
|
+
true: 'text-xs',
|
|
188
|
+
},
|
|
189
|
+
italic: {
|
|
190
|
+
true: 'italic',
|
|
191
|
+
},
|
|
192
|
+
highlight: {
|
|
193
|
+
true: 'bg-yellow-500',
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
});
|
|
197
|
+
const FormControlLabelAstrick = React.forwardRef(({ className, ...props }, ref) => {
|
|
198
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
199
|
+
return (React.createElement("span", { ref: ref, className: formControlLabelAstrickStyle({
|
|
200
|
+
parentVariants: { size: parentSize },
|
|
201
|
+
class: className,
|
|
202
|
+
}), ...props }));
|
|
203
|
+
});
|
|
204
|
+
export const UIFormControl = createFormControl({
|
|
205
|
+
Root: withStyleContext('form', SCOPE),
|
|
206
|
+
Error: 'div',
|
|
207
|
+
ErrorText: 'span',
|
|
208
|
+
ErrorIcon: UIIcon,
|
|
209
|
+
Label: 'label',
|
|
210
|
+
LabelText: 'span',
|
|
211
|
+
LabelAstrick: FormControlLabelAstrick,
|
|
212
|
+
Helper: 'div',
|
|
213
|
+
HelperText: 'span',
|
|
214
|
+
});
|
|
215
|
+
cssInterop(PrimitiveIcon, {
|
|
216
|
+
className: {
|
|
217
|
+
target: 'style',
|
|
218
|
+
nativeStyleToProp: {
|
|
219
|
+
height: true,
|
|
220
|
+
width: true,
|
|
221
|
+
fill: true,
|
|
222
|
+
color: true,
|
|
223
|
+
stroke: true,
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
});
|
|
227
|
+
const FormControl = React.forwardRef(({ className, size = 'md', ...props }, ref) => {
|
|
228
|
+
const contextValue = { size };
|
|
229
|
+
return (React.createElement(UIFormControl, { ref: ref, className: formControlStyle({ size, class: className }), ...props, "data-context": JSON.stringify(contextValue) }));
|
|
230
|
+
});
|
|
231
|
+
const FormControlError = React.forwardRef(({ className, ...props }, ref) => {
|
|
232
|
+
return React.createElement(UIFormControl.Error, { ref: ref, className: formControlErrorStyle({ class: className }), ...props });
|
|
233
|
+
});
|
|
234
|
+
const FormControlErrorText = React.forwardRef(({ className, size, ...props }, ref) => {
|
|
235
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
236
|
+
return (React.createElement(UIFormControl.Error.Text, { ref: ref, className: formControlErrorTextStyle({
|
|
237
|
+
parentVariants: { size: parentSize },
|
|
238
|
+
size,
|
|
239
|
+
class: className,
|
|
240
|
+
}), ...props }));
|
|
241
|
+
});
|
|
242
|
+
const FormControlErrorIcon = React.forwardRef(({ className, size, ...props }, ref) => {
|
|
243
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
244
|
+
if (typeof size === 'number') {
|
|
245
|
+
return (React.createElement(UIFormControl.Error.Icon, { ref: ref, ...props, className: formControlErrorIconStyle({ class: className }), size: size }));
|
|
246
|
+
}
|
|
247
|
+
else if ((props.height !== undefined || props.width !== undefined) && size === undefined) {
|
|
248
|
+
return (React.createElement(UIFormControl.Error.Icon, { ref: ref, ...props, className: formControlErrorIconStyle({ class: className }) }));
|
|
249
|
+
}
|
|
250
|
+
return (React.createElement(UIFormControl.Error.Icon, { className: formControlErrorIconStyle({
|
|
251
|
+
parentVariants: { size: parentSize },
|
|
252
|
+
size,
|
|
253
|
+
class: className,
|
|
254
|
+
}), ...props }));
|
|
255
|
+
});
|
|
256
|
+
const FormControlLabel = React.forwardRef(({ className, ...props }, ref) => {
|
|
257
|
+
return React.createElement(UIFormControl.Label, { ref: ref, className: formControlLabelStyle({ class: className }), ...props });
|
|
258
|
+
});
|
|
259
|
+
const FormControlLabelText = React.forwardRef(({ className, size, ...props }, ref) => {
|
|
260
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
261
|
+
return (React.createElement(UIFormControl.Label.Text, { ref: ref, className: formControlLabelTextStyle({
|
|
262
|
+
parentVariants: { size: parentSize },
|
|
263
|
+
size,
|
|
264
|
+
class: className,
|
|
265
|
+
}), ...props }));
|
|
266
|
+
});
|
|
267
|
+
const FormControlHelper = React.forwardRef(({ className, ...props }, ref) => {
|
|
268
|
+
return (React.createElement(UIFormControl.Helper, { ref: ref, className: formControlHelperStyle({
|
|
269
|
+
class: className,
|
|
270
|
+
}), ...props }));
|
|
271
|
+
});
|
|
272
|
+
const FormControlHelperText = React.forwardRef(({ className, size, ...props }, ref) => {
|
|
273
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
274
|
+
return (React.createElement(UIFormControl.Helper.Text, { ref: ref, className: formControlHelperTextStyle({
|
|
275
|
+
parentVariants: { size: parentSize },
|
|
276
|
+
size,
|
|
277
|
+
class: className,
|
|
278
|
+
}), ...props }));
|
|
279
|
+
});
|
|
280
|
+
FormControl.displayName = 'FormControl';
|
|
281
|
+
FormControlError.displayName = 'FormControlError';
|
|
282
|
+
FormControlErrorText.displayName = 'FormControlErrorText';
|
|
283
|
+
FormControlErrorIcon.displayName = 'FormControlErrorIcon';
|
|
284
|
+
FormControlLabel.displayName = 'FormControlLabel';
|
|
285
|
+
FormControlLabelText.displayName = 'FormControlLabelText';
|
|
286
|
+
FormControlLabelAstrick.displayName = 'FormControlLabelAstrick';
|
|
287
|
+
FormControlHelper.displayName = 'FormControlHelper';
|
|
288
|
+
FormControlHelperText.displayName = 'FormControlHelperText';
|
|
289
|
+
export { FormControl, FormControlError, FormControlErrorText, FormControlErrorIcon, FormControlLabel, FormControlLabelText, FormControlLabelAstrick, FormControlHelper, FormControlHelperText, };
|
|
290
|
+
//# sourceMappingURL=index.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../../../src/components/ui/form-control/index.web.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;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AAC,WAAW,GAAG,aAAa,CAAC;AACxC,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAClD,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAC1D,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAC1D,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAClD,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAC1D,uBAAuB,CAAC,WAAW,GAAG,yBAAyB,CAAC;AAChE,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC;AACpD,qBAAqB,CAAC,WAAW,GAAG,uBAAuB,CAAC;AAE5D,OAAO,EACH,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,GACxB,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { VariantProps } from '@gluestack-ui/nativewind-utils';
|
|
3
|
+
declare const imageStyle: import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
|
|
4
|
+
size: {
|
|
5
|
+
'2xs': string;
|
|
6
|
+
xs: string;
|
|
7
|
+
sm: string;
|
|
8
|
+
md: string;
|
|
9
|
+
lg: string;
|
|
10
|
+
xl: string;
|
|
11
|
+
'2xl': string;
|
|
12
|
+
full: string;
|
|
13
|
+
none: string;
|
|
14
|
+
};
|
|
15
|
+
} | ({
|
|
16
|
+
size: {
|
|
17
|
+
'2xs': string;
|
|
18
|
+
xs: string;
|
|
19
|
+
sm: string;
|
|
20
|
+
md: string;
|
|
21
|
+
lg: string;
|
|
22
|
+
xl: string;
|
|
23
|
+
'2xl': string;
|
|
24
|
+
full: string;
|
|
25
|
+
none: string;
|
|
26
|
+
};
|
|
27
|
+
} & {
|
|
28
|
+
size: {
|
|
29
|
+
'2xs': import("tailwind-merge").ClassNameValue | {
|
|
30
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
31
|
+
};
|
|
32
|
+
xs: import("tailwind-merge").ClassNameValue | {
|
|
33
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
34
|
+
};
|
|
35
|
+
sm: import("tailwind-merge").ClassNameValue | {
|
|
36
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
37
|
+
};
|
|
38
|
+
md: import("tailwind-merge").ClassNameValue | {
|
|
39
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
40
|
+
};
|
|
41
|
+
lg: import("tailwind-merge").ClassNameValue | {
|
|
42
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
43
|
+
};
|
|
44
|
+
xl: import("tailwind-merge").ClassNameValue | {
|
|
45
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
46
|
+
};
|
|
47
|
+
'2xl': import("tailwind-merge").ClassNameValue | {
|
|
48
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
49
|
+
};
|
|
50
|
+
full: import("tailwind-merge").ClassNameValue | {
|
|
51
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
52
|
+
};
|
|
53
|
+
none: import("tailwind-merge").ClassNameValue | {
|
|
54
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}), undefined, "max-w-full", import("tailwind-variants/dist/config").TVConfig<{
|
|
58
|
+
size: {
|
|
59
|
+
'2xs': string;
|
|
60
|
+
xs: string;
|
|
61
|
+
sm: string;
|
|
62
|
+
md: string;
|
|
63
|
+
lg: string;
|
|
64
|
+
xl: string;
|
|
65
|
+
'2xl': string;
|
|
66
|
+
full: string;
|
|
67
|
+
none: string;
|
|
68
|
+
};
|
|
69
|
+
}, {
|
|
70
|
+
size: {
|
|
71
|
+
'2xs': string;
|
|
72
|
+
xs: string;
|
|
73
|
+
sm: string;
|
|
74
|
+
md: string;
|
|
75
|
+
lg: string;
|
|
76
|
+
xl: string;
|
|
77
|
+
'2xl': string;
|
|
78
|
+
full: string;
|
|
79
|
+
none: string;
|
|
80
|
+
};
|
|
81
|
+
}>, {
|
|
82
|
+
size: {
|
|
83
|
+
'2xs': string;
|
|
84
|
+
xs: string;
|
|
85
|
+
sm: string;
|
|
86
|
+
md: string;
|
|
87
|
+
lg: string;
|
|
88
|
+
xl: string;
|
|
89
|
+
'2xl': string;
|
|
90
|
+
full: string;
|
|
91
|
+
none: string;
|
|
92
|
+
};
|
|
93
|
+
}, undefined, import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
|
|
94
|
+
size: {
|
|
95
|
+
'2xs': string;
|
|
96
|
+
xs: string;
|
|
97
|
+
sm: string;
|
|
98
|
+
md: string;
|
|
99
|
+
lg: string;
|
|
100
|
+
xl: string;
|
|
101
|
+
'2xl': string;
|
|
102
|
+
full: string;
|
|
103
|
+
none: string;
|
|
104
|
+
};
|
|
105
|
+
}, undefined, "max-w-full", import("tailwind-variants/dist/config").TVConfig<{
|
|
106
|
+
size: {
|
|
107
|
+
'2xs': string;
|
|
108
|
+
xs: string;
|
|
109
|
+
sm: string;
|
|
110
|
+
md: string;
|
|
111
|
+
lg: string;
|
|
112
|
+
xl: string;
|
|
113
|
+
'2xl': string;
|
|
114
|
+
full: string;
|
|
115
|
+
none: string;
|
|
116
|
+
};
|
|
117
|
+
}, {
|
|
118
|
+
size: {
|
|
119
|
+
'2xs': string;
|
|
120
|
+
xs: string;
|
|
121
|
+
sm: string;
|
|
122
|
+
md: string;
|
|
123
|
+
lg: string;
|
|
124
|
+
xl: string;
|
|
125
|
+
'2xl': string;
|
|
126
|
+
full: string;
|
|
127
|
+
none: string;
|
|
128
|
+
};
|
|
129
|
+
}>, unknown, unknown, undefined>>;
|
|
130
|
+
interface ImageBaseProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'src'> {
|
|
131
|
+
source?: {
|
|
132
|
+
uri: string;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
interface ImageProps extends VariantProps<typeof imageStyle>, ImageBaseProps {
|
|
136
|
+
className?: string;
|
|
137
|
+
}
|
|
138
|
+
declare const Image: {
|
|
139
|
+
({ size, className, ...props }: ImageProps): React.JSX.Element;
|
|
140
|
+
displayName: string;
|
|
141
|
+
};
|
|
142
|
+
export { Image };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { createImage } from '@gluestack-ui/image';
|
|
4
|
+
import { tva } from '@gluestack-ui/nativewind-utils/tva';
|
|
5
|
+
const imageStyle = tva({
|
|
6
|
+
base: 'max-w-full',
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
'2xs': 'h-6 w-6',
|
|
10
|
+
xs: 'h-10 w-10',
|
|
11
|
+
sm: 'h-16 w-16',
|
|
12
|
+
md: 'h-20 w-20',
|
|
13
|
+
lg: 'h-24 w-24',
|
|
14
|
+
xl: 'h-32 w-32',
|
|
15
|
+
'2xl': 'h-64 w-64',
|
|
16
|
+
full: 'h-full w-full',
|
|
17
|
+
none: '',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
const ImgComponent = ({ source, ...props }) => React.createElement("img", { src: source?.uri || '', ...props });
|
|
22
|
+
ImgComponent.displayName = 'ImgComponent';
|
|
23
|
+
const UIImage = createImage({ Root: ImgComponent });
|
|
24
|
+
const Image = ({ size = 'md', className, ...props }) => {
|
|
25
|
+
return React.createElement(UIImage, { className: imageStyle({ size, class: className }), ...props });
|
|
26
|
+
};
|
|
27
|
+
Image.displayName = 'Image';
|
|
28
|
+
export { Image };
|
|
29
|
+
//# sourceMappingURL=index.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../../../src/components/ui/image/index.web.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAGzD,MAAM,UAAU,GAAG,GAAG,CAAC;IACnB,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE;QACN,IAAI,EAAE;YACF,KAAK,EAAE,SAAS;YAChB,EAAE,EAAE,WAAW;YACf,EAAE,EAAE,WAAW;YACf,EAAE,EAAE,WAAW;YACf,EAAE,EAAE,WAAW;YACf,EAAE,EAAE,WAAW;YACf,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,EAAE;SACX;KACJ;CACJ,CAAC,CAAC;AAMH,MAAM,YAAY,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAkB,EAAE,EAAE,CAAC,6BAAK,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAM,KAAK,GAAI,CAAC;AAE1G,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,MAAM,OAAO,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;AAMpD,MAAM,KAAK,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAc,EAAE,EAAE;IAC/D,OAAO,oBAAC,OAAO,IAAC,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,GAAI,CAAC;AACrF,CAAC,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ImageBackground: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
source: {
|
|
4
|
+
uri: string;
|
|
5
|
+
} | number;
|
|
6
|
+
resizeMode?: "cover" | "contain" | "stretch" | "center";
|
|
7
|
+
className?: string;
|
|
8
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import { tva } from '@gluestack-ui/nativewind-utils/tva';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
|
+
const imageBackgroundStyle = tva({
|
|
6
|
+
base: 'bg-no-repeat bg-center bg-cover',
|
|
7
|
+
});
|
|
8
|
+
export const ImageBackground = forwardRef(({ source, resizeMode = 'cover', className, style, children, ...props }, ref) => {
|
|
9
|
+
const imageUrl = typeof source === 'number' ? source : source.uri;
|
|
10
|
+
const backgroundSize = {
|
|
11
|
+
cover: 'cover',
|
|
12
|
+
contain: 'contain',
|
|
13
|
+
stretch: '100% 100%',
|
|
14
|
+
center: 'auto',
|
|
15
|
+
}[resizeMode];
|
|
16
|
+
return (React.createElement("div", { ref: ref, className: imageBackgroundStyle({ class: clsx(className) }), style: {
|
|
17
|
+
...style,
|
|
18
|
+
backgroundImage: `url(${imageUrl})`,
|
|
19
|
+
backgroundSize,
|
|
20
|
+
}, ...props }, children));
|
|
21
|
+
});
|
|
22
|
+
ImageBackground.displayName = 'ImageBackground';
|
|
23
|
+
//# sourceMappingURL=index.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../../../src/components/ui/image-background/index.web.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,MAAM,oBAAoB,GAAG,GAAG,CAAC;IAC7B,IAAI,EAAE,iCAAiC;CAC1C,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CACrC,CAAC,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC5E,MAAM,QAAQ,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;IAClE,MAAM,cAAc,GAAG;QACnB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,WAAW;QACpB,MAAM,EAAE,MAAM;KACjB,CAAC,UAAU,CAAC,CAAC;IAEd,OAAO,CACH,6BACI,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,oBAAoB,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAC3D,KAAK,EAAE;YACH,GAAG,KAAK;YACR,eAAe,EAAE,OAAO,QAAQ,GAAG;YACnC,cAAc;SACjB,KACG,KAAK,IAER,QAAQ,CACP,CACT,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { VariantProps } from '@gluestack-ui/nativewind-utils';
|
|
3
|
+
declare const StyledInput: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
4
|
+
declare const inputStyle: import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
|
|
5
|
+
size: {
|
|
6
|
+
sm: string;
|
|
7
|
+
md: string;
|
|
8
|
+
lg: string;
|
|
9
|
+
};
|
|
10
|
+
variant: {
|
|
11
|
+
outline: string;
|
|
12
|
+
filled: string;
|
|
13
|
+
unstyled: string;
|
|
14
|
+
};
|
|
15
|
+
state: {
|
|
16
|
+
error: string;
|
|
17
|
+
success: string;
|
|
18
|
+
};
|
|
19
|
+
} | ({
|
|
20
|
+
size: {
|
|
21
|
+
sm: string;
|
|
22
|
+
md: string;
|
|
23
|
+
lg: string;
|
|
24
|
+
};
|
|
25
|
+
variant: {
|
|
26
|
+
outline: string;
|
|
27
|
+
filled: string;
|
|
28
|
+
unstyled: string;
|
|
29
|
+
};
|
|
30
|
+
state: {
|
|
31
|
+
error: string;
|
|
32
|
+
success: string;
|
|
33
|
+
};
|
|
34
|
+
} & {
|
|
35
|
+
size: {
|
|
36
|
+
sm: import("tailwind-merge").ClassNameValue | {
|
|
37
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
38
|
+
};
|
|
39
|
+
md: import("tailwind-merge").ClassNameValue | {
|
|
40
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
41
|
+
};
|
|
42
|
+
lg: import("tailwind-merge").ClassNameValue | {
|
|
43
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
variant: {
|
|
47
|
+
outline: import("tailwind-merge").ClassNameValue | {
|
|
48
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
49
|
+
};
|
|
50
|
+
filled: import("tailwind-merge").ClassNameValue | {
|
|
51
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
52
|
+
};
|
|
53
|
+
unstyled: import("tailwind-merge").ClassNameValue | {
|
|
54
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
state: {
|
|
58
|
+
error: import("tailwind-merge").ClassNameValue | {
|
|
59
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
60
|
+
};
|
|
61
|
+
success: import("tailwind-merge").ClassNameValue | {
|
|
62
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}), undefined, "px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent", import("tailwind-variants/dist/config").TVConfig<{
|
|
66
|
+
size: {
|
|
67
|
+
sm: string;
|
|
68
|
+
md: string;
|
|
69
|
+
lg: string;
|
|
70
|
+
};
|
|
71
|
+
variant: {
|
|
72
|
+
outline: string;
|
|
73
|
+
filled: string;
|
|
74
|
+
unstyled: string;
|
|
75
|
+
};
|
|
76
|
+
state: {
|
|
77
|
+
error: string;
|
|
78
|
+
success: string;
|
|
79
|
+
};
|
|
80
|
+
}, {
|
|
81
|
+
size: {
|
|
82
|
+
sm: string;
|
|
83
|
+
md: string;
|
|
84
|
+
lg: string;
|
|
85
|
+
};
|
|
86
|
+
variant: {
|
|
87
|
+
outline: string;
|
|
88
|
+
filled: string;
|
|
89
|
+
unstyled: string;
|
|
90
|
+
};
|
|
91
|
+
state: {
|
|
92
|
+
error: string;
|
|
93
|
+
success: string;
|
|
94
|
+
};
|
|
95
|
+
}>, {
|
|
96
|
+
size: {
|
|
97
|
+
sm: string;
|
|
98
|
+
md: string;
|
|
99
|
+
lg: string;
|
|
100
|
+
};
|
|
101
|
+
variant: {
|
|
102
|
+
outline: string;
|
|
103
|
+
filled: string;
|
|
104
|
+
unstyled: string;
|
|
105
|
+
};
|
|
106
|
+
state: {
|
|
107
|
+
error: string;
|
|
108
|
+
success: string;
|
|
109
|
+
};
|
|
110
|
+
}, undefined, import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
|
|
111
|
+
size: {
|
|
112
|
+
sm: string;
|
|
113
|
+
md: string;
|
|
114
|
+
lg: string;
|
|
115
|
+
};
|
|
116
|
+
variant: {
|
|
117
|
+
outline: string;
|
|
118
|
+
filled: string;
|
|
119
|
+
unstyled: string;
|
|
120
|
+
};
|
|
121
|
+
state: {
|
|
122
|
+
error: string;
|
|
123
|
+
success: string;
|
|
124
|
+
};
|
|
125
|
+
}, undefined, "px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent", import("tailwind-variants/dist/config").TVConfig<{
|
|
126
|
+
size: {
|
|
127
|
+
sm: string;
|
|
128
|
+
md: string;
|
|
129
|
+
lg: string;
|
|
130
|
+
};
|
|
131
|
+
variant: {
|
|
132
|
+
outline: string;
|
|
133
|
+
filled: string;
|
|
134
|
+
unstyled: string;
|
|
135
|
+
};
|
|
136
|
+
state: {
|
|
137
|
+
error: string;
|
|
138
|
+
success: string;
|
|
139
|
+
};
|
|
140
|
+
}, {
|
|
141
|
+
size: {
|
|
142
|
+
sm: string;
|
|
143
|
+
md: string;
|
|
144
|
+
lg: string;
|
|
145
|
+
};
|
|
146
|
+
variant: {
|
|
147
|
+
outline: string;
|
|
148
|
+
filled: string;
|
|
149
|
+
unstyled: string;
|
|
150
|
+
};
|
|
151
|
+
state: {
|
|
152
|
+
error: string;
|
|
153
|
+
success: string;
|
|
154
|
+
};
|
|
155
|
+
}>, unknown, unknown, undefined>>;
|
|
156
|
+
type IInputProps = React.ComponentProps<typeof StyledInput> & VariantProps<typeof inputStyle> & {
|
|
157
|
+
className?: string;
|
|
158
|
+
onChangeText?: (text: string) => void;
|
|
159
|
+
secureTextEntry?: boolean;
|
|
160
|
+
placeholderTextColor?: string;
|
|
161
|
+
};
|
|
162
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<IInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
163
|
+
export { Input };
|